2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([Persistence Client Library], [0.1], [not-valid@xse.de])
5 AC_CONFIG_SRCDIR([Makefile.am])
6 AM_INIT_AUTOMAKE([dist-bzip2])
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11 # Overwrite the build in defaults
14 # Checks for programs.
25 # Checks for header files.
26 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h])
28 # Checks for typedefs, structures, and compiler characteristics.
36 AC_ARG_ENABLE([tests],
37 [AS_HELP_STRING([--enable-tests],[Enable tests])],
38 [enable_tests=$enableval],[enable_tests="no"])
40 AM_CONDITIONAL([WANT_TESTS], [test x"$enable_tests" = "xyes"])
43 # Checks for library functions.
45 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
47 AC_CHECK_FUNCS([fdatasync ftruncate mkdir munmap rmdir strerror utime dlopen])
49 PKG_CHECK_MODULES(DEPS,
58 AC_ARG_WITH([localcheck],
59 [AS_HELP_STRING([--with-localcheck],[Path to local check])],
60 [localcheck=$withval],[localcheck=""])
62 if test "x$enable_tests" != "xno" ; then
63 if test -z "$localcheck" ; then
64 PKG_CHECK_MODULES(CHECK, check)
66 CHECK_CFLAGS="-I$localcheck/include"
67 CHECK_LIBS="-L$localcheck/lib -lcheck"
69 AC_SUBST(CHECK_CFLAGS)
72 AC_DEFINE_UNQUOTED([TESTS_ENABLED], [1], [tests enabled])
74 AC_DEFINE_UNQUOTED([TESTS_ENABLED], [0], [tests enabled])
76 AC_MSG_NOTICE([Tests enabled: $enable_tests])
77 AC_MSG_NOTICE([Local check enabled: $localcheck])
81 AS_HELP_STRING([--enable-debug],
82 [enable debugging, default: no]),
83 [case "${enableval}" in
86 *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
90 AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
93 #AC_CONFIG_FILES([Makefile
94 # persistence_client_library.pc
97 AC_CONFIG_FILES([Makefile