Add czp_connection_close()
[libisds.git] / configure.ac
blob00e7db7c2d5bac63e16b1f5cb6144a407d181e67
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.63])
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.
12 AC_PROG_CC
13 AC_PROG_CPP
14 #AC_PROG_MAKE_SET
15 LT_INIT
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"])
22 AS_IF([test "$enable_example" = "yes"], AC_CONFIG_FILES([client/Makefile]))
24 # Enable tests
25 AC_ARG_ENABLE(test, [AS_HELP_STRING([--enable-test],
26                               [Enable internal library tests])])
27 AM_CONDITIONAL([BUILD_TEST], [test "$enable_test" = "yes"])
28 AS_IF([test "$enable_test" = "yes"], AC_CONFIG_FILES([test/Makefile]))
30 # Enable gettext
31 AM_GNU_GETTEXT_VERSION([0.17])
32 AM_GNU_GETTEXT([external])
34 # Enable debug
35 AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],
36                         [Compile in debugging mode])])
37 AS_IF([test "$enable_debug" = "yes"],
38       CFLAGS="${CFLAGS} -g"
39       dnl AC_SUBST(DEBUG_CFLAGS)
40       AC_DEFINE([ENABLE_DEBUG], [1],
41                 [Define if you want include debugging code])
42       )
45 # Checks for libraries.
46 #TODO: Verify minimal version. libxml2-2.6.26 is just a guess.
47 AM_PATH_XML2([2.6.26])
48 #TODO: Determine minimal version
49 LIBCURL_CHECK_CONFIG()
50 #TODO: Determine minimal version
51 AM_PATH_LIBGCRYPT([1:1.4.0])
53 # GPGME is compiled with large file support by default. We need to follow not
54 # to break ABI.
55 AC_SYS_LARGEFILE
56 #TODO: Determine minimal version
57 AM_PATH_GPGME()
59 # Check for expat
60 #TODO: Verify minimal version. See src/phys.c: init_expat()
61 AC_CHECK_LIB([expat], [XML_ExpatVersionInfo],
62              EXPAT_LIBS=-lexpat
63              AC_SUBST(EXPAT_LIBS))
66 # Do not consider compiler warnings as errors
67 # This harms libxml confgure test
68 AC_ARG_ENABLE(fatalwarnings, [AS_HELP_STRING([--disable-fatalwarnings],
69                         [Do not consider compiler warnings as errors])])
70 AS_IF([test "$enable_fatalwarnings" = "no"], , CFLAGS="${CFLAGS} -Werror")
73 # Checks for header files.
74 AC_CHECK_HEADERS([fcntl.h locale.h stdint.h stdlib.h string.h unistd.h])
76 # Checks for typedefs, structures, and compiler characteristics.
77 AC_TYPE_SIZE_T
78 #AC_TYPE_SSIZE_T
79 AC_TYPE_UINT8_T
81 # Checks for library functions.
82 AC_FUNC_MALLOC
83 AC_FUNC_MKTIME
84 AC_FUNC_MMAP
85 AC_CHECK_FUNCS([localtime_r memset munmap setlocale strdup strerror])
87 # Default CFLAGS
88 CFLAGS="${CFLAGS} -std=c99 -Wall"
90 AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in])
92 #AC_CONFIG_SUBDIRS([src])
93 AC_OUTPUT