2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libisds], [0.1], [petr.pisar@atlas.cz])
6 AM_INIT_AUTOMAKE(libisds, 0.1)
7 AC_CONFIG_SRCDIR([src/isds.c])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CONFIG_HEADERS([config.h])
11 # Checks for programs.
18 # Enable example clients
19 AC_ARG_ENABLE(example, [AS_HELP_STRING([--enable-example],
20 [Build library usage examples])])
21 AM_CONDITIONAL([BUILD_EXAMPLE], [test "$enable_example" = "yes"])
24 AC_ARG_ENABLE(test, [AS_HELP_STRING([--enable-test],
25 [Enable internal library tests])])
26 AM_CONDITIONAL([BUILD_TEST], [test "$enable_test" = "yes"])
29 AM_GNU_GETTEXT_VERSION([0.17])
30 AM_GNU_GETTEXT([external])
33 AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],
34 [Compile in debugging mode])])
35 AS_IF([test "$enable_debug" = "yes"],
37 dnl AC_SUBST(DEBUG_CFLAGS)
38 AC_DEFINE([ENABLE_DEBUG], [1],
39 [Define if you want include debugging code])
43 # Checks for libraries.
44 #TODO: Verify minimal version. libxml2-2.6.26 is just a guess.
45 AM_PATH_XML2([2.6.26])
46 #TODO: Determine minimal version
47 LIBCURL_CHECK_CONFIG()
48 #TODO: Determine minimal version
49 AM_PATH_LIBGCRYPT([1:1.4.0])
51 # GPGME is compiled with large file support by default. We need to follow not
54 #TODO: Determine minimal version
58 #TODO: Verify minimal version. See src/phys.c: init_expat()
59 AC_CHECK_LIB([expat], [XML_ExpatVersionInfo],
64 # Do not consider compiler warnings as errors
65 # This harms libxml confgure test
66 AC_ARG_ENABLE(fatalwarnings, [AS_HELP_STRING([--disable-fatalwarnings],
67 [Do not consider compiler warnings as errors])])
68 AS_IF([test "$enable_fatalwarnings" = "no"], , CFLAGS="${CFLAGS} -Werror")
71 # Checks for header files.
72 AC_CHECK_HEADERS([fcntl.h locale.h stdint.h stdlib.h string.h unistd.h])
74 # Checks for typedefs, structures, and compiler characteristics.
79 # Checks for library functions.
83 AC_CHECK_FUNCS([localtime_r memset munmap setlocale strdup strerror])
86 CFLAGS="${CFLAGS} -std=c99 -Wall"
88 AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in client/Makefile
91 #AC_CONFIG_SUBDIRS([src])