2007-12-07 15:03:27 +00:00
|
|
|
AC_INIT([libfprint], [0.0.5])
|
2007-10-07 22:20:12 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_CONFIG_SRCDIR([libfprint/core.c])
|
|
|
|
AM_CONFIG_HEADER([config.h])
|
|
|
|
|
2007-10-29 23:37:28 +00:00
|
|
|
AC_PREREQ([2.50])
|
2007-10-07 22:20:12 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_C_INLINE
|
2007-10-27 14:17:19 +00:00
|
|
|
AM_PROG_CC_C_O
|
2007-10-07 22:20:12 +00:00
|
|
|
|
|
|
|
# Library versioning
|
|
|
|
lt_major="0"
|
|
|
|
lt_revision="0"
|
|
|
|
lt_age="0"
|
|
|
|
AC_SUBST(lt_major)
|
|
|
|
AC_SUBST(lt_revision)
|
|
|
|
AC_SUBST(lt_age)
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(LIBUSB, "libusb")
|
|
|
|
AC_SUBST(LIBUSB_CFLAGS)
|
|
|
|
AC_SUBST(LIBUSB_LIBS)
|
|
|
|
|
2007-11-16 17:25:41 +00:00
|
|
|
# check for OpenSSL's libcrypto
|
|
|
|
PKG_CHECK_MODULES(CRYPTO, "libcrypto")
|
|
|
|
AC_SUBST(CRYPTO_CFLAGS)
|
|
|
|
AC_SUBST(CRYPTO_LIBS)
|
|
|
|
|
2007-10-07 22:20:12 +00:00
|
|
|
PKG_CHECK_MODULES(GLIB, "glib-2.0")
|
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
|
2007-11-08 17:04:45 +00:00
|
|
|
PKG_CHECK_MODULES(IMAGEMAGICK, "ImageMagick")
|
|
|
|
AC_SUBST(IMAGEMAGICK_CFLAGS)
|
|
|
|
AC_SUBST(IMAGEMAGICK_LIBS)
|
|
|
|
|
2007-10-08 16:15:21 +00:00
|
|
|
# Examples build
|
|
|
|
AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
|
|
|
|
[build example applications (default n)])],
|
|
|
|
[build_examples=$enableval],
|
|
|
|
[build_examples='no'])
|
|
|
|
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
|
|
|
|
|
2007-10-27 14:17:19 +00:00
|
|
|
# Examples build
|
|
|
|
AC_ARG_ENABLE([x11-examples-build], [AS_HELP_STRING([--enable-x11-examples-build],
|
|
|
|
[build X11 example applications (default n)])],
|
|
|
|
[build_x11_examples=$enableval],
|
|
|
|
[build_x11_examples='no'])
|
|
|
|
AM_CONDITIONAL([BUILD_X11_EXAMPLES], [test "x$build_x11_examples" != "xno"])
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$build_x11_examples" != "xno"; then
|
|
|
|
# check for Xv extensions
|
|
|
|
# imported from Coriander
|
|
|
|
AC_DEFUN([AC_CHECK_XV],[
|
|
|
|
AC_SUBST(XV_CFLAGS)
|
|
|
|
AC_SUBST(XV_LIBS)
|
|
|
|
AC_MSG_CHECKING(for Xv extensions)
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/Xvlib.h>],[
|
|
|
|
int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
|
|
|
|
],xv=yes,xv=no);
|
|
|
|
AC_MSG_RESULT($xv)
|
|
|
|
if test x$xv = xyes; then
|
|
|
|
XV_LIBS="-lXv -lXext"
|
|
|
|
XV_CFLAGS=""
|
|
|
|
AC_DEFINE(HAVE_XV,1,[defined if XV video overlay is available])
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([XV is required for X11 examples])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
AC_CHECK_XV
|
|
|
|
fi
|
|
|
|
|
2007-10-13 14:52:50 +00:00
|
|
|
# Message logging
|
|
|
|
AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
|
|
|
|
[log_enabled=$enableval],
|
|
|
|
[log_enabled='yes'])
|
|
|
|
if test "x$log_enabled" != "xno"; then
|
|
|
|
AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
|
|
|
|
[enable debug logging (default n)])],
|
|
|
|
[debug_log_enabled=$enableval],
|
|
|
|
[debug_log_enabled='no'])
|
|
|
|
if test "x$debug_log_enabled" != "xno"; then
|
|
|
|
AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2007-10-07 22:20:12 +00:00
|
|
|
AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
|
2007-12-27 00:46:11 +00:00
|
|
|
AM_CFLAGS="-std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
|
2007-10-13 14:52:50 +00:00
|
|
|
AC_SUBST(AM_CFLAGS)
|
2007-10-07 22:20:12 +00:00
|
|
|
|
2007-11-01 23:11:29 +00:00
|
|
|
AC_CONFIG_FILES([libfprint.pc] [Makefile] [libfprint/Makefile] [examples/Makefile] [doc/Makefile])
|
2007-10-07 22:20:12 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|