Verification infrastructure
[libfprint.git] / configure.ac
blob45b956533772c0217f3e2f57691eb9b0e5fac19d
1 AC_INIT([libfprint], [0.0])
2 AM_INIT_AUTOMAKE
3 AC_CONFIG_SRCDIR([libfprint/core.c])
4 AM_CONFIG_HEADER([config.h])
6 AC_PREREQ([2.61])
7 AC_PROG_CC
8 AC_PROG_LIBTOOL
9 AC_C_INLINE
11 # Library versioning
12 lt_major="0"
13 lt_revision="0"
14 lt_age="0"
15 AC_SUBST(lt_major)
16 AC_SUBST(lt_revision)
17 AC_SUBST(lt_age)
19 PKG_CHECK_MODULES(LIBUSB, "libusb")
20 AC_SUBST(LIBUSB_CFLAGS)
21 AC_SUBST(LIBUSB_LIBS)
23 PKG_CHECK_MODULES(GLIB, "glib-2.0")
24 AC_SUBST(GLIB_CFLAGS)
25 AC_SUBST(GLIB_LIBS)
27 # Examples build
28 AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
29         [build example applications (default n)])],
30         [build_examples=$enableval],
31         [build_examples='no'])
32 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
34 # Message logging
35 AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
36         [log_enabled=$enableval],
37         [log_enabled='yes'])
38 if test "x$log_enabled" != "xno"; then
39         AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
42 AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
43         [enable debug logging (default n)])],
44         [debug_log_enabled=$enableval],
45         [debug_log_enabled='no'])
46 if test "x$debug_log_enabled" != "xno"; then
47         AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
51 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
52 AM_CFLAGS="-Werror-implicit-function-declaration -Wimplicit-int -Wunreachable-code -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wnonnull -Wreturn-type -Wextra -Wshadow"
53 AC_SUBST(AM_CFLAGS)
55 AC_CONFIG_FILES([Makefile] [libfprint/Makefile] [examples/Makefile])
56 AC_OUTPUT