2
# Process this file with autoconf to produce a configure script.
5
AC_INIT([libee], [0.1.0], [rgerhards@adiscon.com])
8
AC_CONFIG_SRCDIR([src/ctx.c])
9
AC_CONFIG_HEADER([config.h])
11
# Checks for programs.
14
if test "$GCC" = "yes"
15
then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
20
# Checks for libraries.
23
#AC_SEARCH_LIBS(clock_gettime, rt)
28
[HAVE_LIBXML2_CONFIG],
32
if test "x${HAVE_LIBXML2_CONFIG}" != "xyes"; then
33
AC_MSG_FAILURE([xml2-config not found in PATH - this means libxml2 development package is missing])
38
[LIBXML2_CFLAGS=`xml2-config --cflags`
39
LIBXML2_LIBS=`xml2-config --libs`
41
[AC_MSG_FAILURE([libxml2 is missing])],
42
[`xml2-config --libs`]
44
AC_SUBST(LIBXML2_CFLAGS)
45
AC_SUBST(LIBXML2_LIBS)
49
# Checks for header files.
53
# Checks for typedefs, structures, and compiler characteristics.
59
# Checks for library functions.
61
#AC_FUNC_SELECT_ARGTYPES
65
LIBEE_CFLAGS="-I\$(top_srcdir)/include"
66
LIBEE_LIBS="\$(top_builddir)/src/libee.la"
67
AC_SUBST(LIBEE_CFLAGS)
71
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.0.0)
73
# enable/disable the testbench (e.g. because some important parts
75
AC_ARG_ENABLE(testbench,
76
[AS_HELP_STRING([--enable-testbench],[file input module enabled @<:@default=yes@:>@])],
77
[case "${enableval}" in
78
yes) enable_testbench="yes" ;;
79
no) enable_testbench="no" ;;
80
*) AC_MSG_ERROR(bad value ${enableval} for --enable-testbench) ;;
82
[enable_testbench=yes]
84
AM_CONDITIONAL(ENABLE_TESTBENCH, test x$enable_testbench = xyes)
89
[AS_HELP_STRING([--enable-debug],[Enable debug mode @<:@default=no@:>@])],
90
[case "${enableval}" in
91
yes) enable_debug="yes" ;;
92
no) enable_debug="no" ;;
93
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
97
AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
98
if test "$enable_debug" = "yes"; then
99
AC_DEFINE(DEBUG, 1, [Defined if debug mode is enabled (it's easier to check in the code).])
101
if test "$enable_debug" = "no"; then
102
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
107
AC_CONFIG_FILES([Makefile \
111
include/libee/Makefile \
114
AC_CONFIG_MACRO_DIR([m4])
117
echo "*****************************************************"
118
echo "libee will be compiled with the following settings:"
120
echo "Debug mode enabled: $enable_debug"
121
echo "Testbench enabled: $enable_testbench"