1 AC_INIT([libfprint], [0.0.1])
3 AC_CONFIG_SRCDIR([libfprint/core.c])
4 AM_CONFIG_HEADER([config.h])
20 PKG_CHECK_MODULES(LIBUSB, "libusb")
21 AC_SUBST(LIBUSB_CFLAGS)
24 PKG_CHECK_MODULES(GLIB, "glib-2.0")
28 PKG_CHECK_MODULES(IMAGEMAGICK, "ImageMagick")
29 AC_SUBST(IMAGEMAGICK_CFLAGS)
30 AC_SUBST(IMAGEMAGICK_LIBS)
33 AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
34 [build example applications (default n)])],
35 [build_examples=$enableval],
36 [build_examples='no'])
37 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
40 AC_ARG_ENABLE([x11-examples-build], [AS_HELP_STRING([--enable-x11-examples-build],
41 [build X11 example applications (default n)])],
42 [build_x11_examples=$enableval],
43 [build_x11_examples='no'])
44 AM_CONDITIONAL([BUILD_X11_EXAMPLES], [test "x$build_x11_examples" != "xno"])
47 if test "x$build_x11_examples" != "xno"; then
48 # check for Xv extensions
49 # imported from Coriander
50 AC_DEFUN([AC_CHECK_XV],[
53 AC_MSG_CHECKING(for Xv extensions)
56 #include <X11/extensions/Xvlib.h>],[
57 int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
60 if test x$xv = xyes; then
63 AC_DEFINE(HAVE_XV,1,[defined if XV video overlay is available])
65 AC_MSG_ERROR([XV is required for X11 examples])
72 AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
73 [log_enabled=$enableval],
75 if test "x$log_enabled" != "xno"; then
76 AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
79 AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
80 [enable debug logging (default n)])],
81 [debug_log_enabled=$enableval],
82 [debug_log_enabled='no'])
83 if test "x$debug_log_enabled" != "xno"; then
84 AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
88 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
89 AM_CFLAGS="-Werror-implicit-function-declaration -Wimplicit-int -Wunreachable-code -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wnonnull -Wreturn-type -Wextra -Wshadow"
92 AC_CONFIG_FILES([libfprint.pc] [Makefile] [libfprint/Makefile] [examples/Makefile] [doc/Makefile])