1 AC_INIT([libfprint], [0.0])
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")
29 AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
30 [build example applications (default n)])],
31 [build_examples=$enableval],
32 [build_examples='no'])
33 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
36 AC_ARG_ENABLE([x11-examples-build], [AS_HELP_STRING([--enable-x11-examples-build],
37 [build X11 example applications (default n)])],
38 [build_x11_examples=$enableval],
39 [build_x11_examples='no'])
40 AM_CONDITIONAL([BUILD_X11_EXAMPLES], [test "x$build_x11_examples" != "xno"])
43 if test "x$build_x11_examples" != "xno"; then
44 # check for Xv extensions
45 # imported from Coriander
46 AC_DEFUN([AC_CHECK_XV],[
49 AC_MSG_CHECKING(for Xv extensions)
52 #include <X11/extensions/Xvlib.h>],[
53 int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
56 if test x$xv = xyes; then
59 AC_DEFINE(HAVE_XV,1,[defined if XV video overlay is available])
61 AC_MSG_ERROR([XV is required for X11 examples])
68 AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
69 [log_enabled=$enableval],
71 if test "x$log_enabled" != "xno"; then
72 AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
75 AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
76 [enable debug logging (default n)])],
77 [debug_log_enabled=$enableval],
78 [debug_log_enabled='no'])
79 if test "x$debug_log_enabled" != "xno"; then
80 AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
84 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
85 AM_CFLAGS="-Werror-implicit-function-declaration -Wimplicit-int -Wunreachable-code -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wnonnull -Wreturn-type -Wextra -Wshadow"
88 AC_CONFIG_FILES([libfprint.pc] [Makefile] [libfprint/Makefile] [examples/Makefile] [doc/Makefile])