1 AC_INIT([libfprint], [0.1.0-pre1])
3 AC_CONFIG_SRCDIR([libfprint/core.c])
4 AM_CONFIG_HEADER([config.h])
11 AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
21 all_drivers="upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes2501 aes4000"
23 require_imagemagick='no'
35 AC_ARG_WITH([drivers],[AS_HELP_STRING([--with-drivers],
36 [List of drivers to enable])],
38 [drivers="$all_drivers"])
40 for driver in `echo ${drivers} | sed -e 's/,/ /g' -e 's/,$//g'`; do
43 AC_DEFINE([ENABLE_UPEKTS], [], [Build UPEK TouchStrip driver])
47 AC_DEFINE([ENABLE_UPEKTC], [], [Build UPEK TouchChip driver])
51 AC_DEFINE([ENABLE_UPEKSONLY], [], [Build UPEK TouchStrip sensor-only driver])
52 enable_upeksonly="yes"
55 AC_DEFINE([ENABLE_URU4000], [], [Build Digital Persona U.are.U 4000 driver])
59 AC_DEFINE([ENABLE_FDU2000], [], [Build Secugen FDU 2000 driver])
63 AC_DEFINE([ENABLE_VCOM5S], [], [Build Veridicom 5thSense driver])
67 AC_DEFINE([ENABLE_AES2501], [], [Build AuthenTec AES2501 driver])
72 AC_DEFINE([ENABLE_AES1610], [], [Build AuthenTec AES1610 driver])
77 AC_DEFINE([ENABLE_AES4000], [], [Build AuthenTec AES4000 driver])
79 require_imagemagick="yes"
85 AM_CONDITIONAL([ENABLE_UPEKTS], [test "$enable_upekts" != "no"])
86 #AM_CONDITIONAL([ENABLE_UPEKTC], [test "$enable_upektc" != "no"])
87 AM_CONDITIONAL([ENABLE_UPEKSONLY], [test "$enable_upeksonly" != "no"])
88 AM_CONDITIONAL([ENABLE_VCOM5S], [test "$enable_vcom5s" != "no"])
89 AM_CONDITIONAL([ENABLE_URU4000], [test "$enable_uru4000" != "no"])
90 #AM_CONDITIONAL([ENABLE_FDU2000], [test "$enable_fdu2000" != "no"])
91 #AM_CONDITIONAL([ENABLE_AES1610], [test "$enable_aes1610" != "no"])
92 AM_CONDITIONAL([ENABLE_AES2501], [test "$enable_aes2501" != "no"])
93 AM_CONDITIONAL([ENABLE_AES4000], [test "$enable_aes4000" != "no"])
94 AM_CONDITIONAL([REQUIRE_IMAGEMAGICK], [test "$require_imagemagick" != "no"])
95 AM_CONDITIONAL([REQUIRE_AESLIB], [test "$require_aeslib" != "no"])
98 PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 0.9.1])
99 AC_SUBST(LIBUSB_CFLAGS)
100 AC_SUBST(LIBUSB_LIBS)
102 # check for OpenSSL's libcrypto
103 PKG_CHECK_MODULES(CRYPTO, "libcrypto")
104 AC_SUBST(CRYPTO_CFLAGS)
105 AC_SUBST(CRYPTO_LIBS)
107 PKG_CHECK_MODULES(GLIB, "glib-2.0")
108 AC_SUBST(GLIB_CFLAGS)
111 if test "$require_imagemagick" != "no"; then
112 PKG_CHECK_MODULES(IMAGEMAGICK, "ImageMagick")
113 AC_SUBST(IMAGEMAGICK_CFLAGS)
114 AC_SUBST(IMAGEMAGICK_LIBS)
118 AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
119 [build example applications (default n)])],
120 [build_examples=$enableval],
121 [build_examples='no'])
122 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
125 AC_ARG_ENABLE([x11-examples-build], [AS_HELP_STRING([--enable-x11-examples-build],
126 [build X11 example applications (default n)])],
127 [build_x11_examples=$enableval],
128 [build_x11_examples='no'])
129 AM_CONDITIONAL([BUILD_X11_EXAMPLES], [test "x$build_x11_examples" != "xno"])
132 if test "x$build_x11_examples" != "xno"; then
133 # check for Xv extensions
134 # imported from Coriander
135 AC_DEFUN([AC_CHECK_XV],[
138 AC_MSG_CHECKING(for Xv extensions)
140 #include <X11/Xlib.h>
141 #include <X11/extensions/Xvlib.h>],[
142 int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
145 if test x$xv = xyes; then
146 XV_LIBS="-lXv -lXext"
148 AC_DEFINE(HAVE_XV,1,[defined if XV video overlay is available])
150 AC_MSG_ERROR([XV is required for X11 examples])
157 AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
158 [log_enabled=$enableval],
160 if test "x$log_enabled" != "xno"; then
161 AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
164 AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
165 [enable debug logging (default n)])],
166 [debug_log_enabled=$enableval],
167 [debug_log_enabled='no'])
168 if test "x$debug_log_enabled" != "xno"; then
169 AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
172 # Restore gnu89 inline semantics on gcc 4.3 and newer
173 saved_cflags="$CFLAGS"
174 CFLAGS="$CFLAGS -fgnu89-inline"
175 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), inline_cflags="-fgnu89-inline", inline_cflags="")
176 CFLAGS="$saved_cflags"
178 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
179 AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
182 AC_CONFIG_FILES([libfprint.pc] [Makefile] [libfprint/Makefile] [examples/Makefile] [doc/Makefile])