summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 18 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 5f99d95..10c7f9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,11 +19,6 @@ LIBPLIST_SO_VERSION=3:0:0
19 19
20AC_SUBST(LIBPLIST_SO_VERSION) 20AC_SUBST(LIBPLIST_SO_VERSION)
21 21
22dnl Minimum package versions
23LIBXML2_VERSION=2.7.8
24
25AC_SUBST(LIBXML2_VERSION)
26
27# Checks for programs. 22# Checks for programs.
28AC_PROG_CC 23AC_PROG_CC
29AC_PROG_CXX 24AC_PROG_CXX
@@ -40,9 +35,6 @@ AC_LANG_POP
40AM_PROG_CC_C_O 35AM_PROG_CC_C_O
41AC_PROG_LIBTOOL 36AC_PROG_LIBTOOL
42 37
43# Checks for libraries.
44PKG_CHECK_MODULES(libxml2, libxml-2.0 >= $LIBXML2_VERSION)
45
46# Checks for header files. 38# Checks for header files.
47AC_HEADER_STDC 39AC_HEADER_STDC
48AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) 40AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
@@ -139,6 +131,22 @@ AM_CONDITIONAL([HAVE_CYTHON],[test "x$CYTHON_SUB" = "xcython"])
139AC_SUBST([CYTHON_SUB]) 131AC_SUBST([CYTHON_SUB])
140 132
141AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden") 133AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden")
134
135AC_ARG_ENABLE(debug,
136AS_HELP_STRING([--enable-debug],
137 [enable debugging, default: no]),
138[case "${enableval}" in
139 yes) debug=yes ;;
140 no) debug=no ;;
141 *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
142esac],
143[debug=no])
144
145if (test "x$debug" = "xyes"); then
146 AC_DEFINE(DEBUG, 1, [Define if debug code should be enabled.])
147 GLOBAL_CFLAGS+=" -g"
148fi
149
142AC_SUBST(GLOBAL_CFLAGS) 150AC_SUBST(GLOBAL_CFLAGS)
143 151
144case "$GLOBAL_CFLAGS" in 152case "$GLOBAL_CFLAGS" in
@@ -165,7 +173,8 @@ echo "
165Configuration for $PACKAGE $VERSION: 173Configuration for $PACKAGE $VERSION:
166------------------------------------------- 174-------------------------------------------
167 175
168 Install prefix: .........: $prefix 176 Install prefix ..........: $prefix
177 Debug code ..............: $debug
169 Python bindings .........: $cython_python_bindings 178 Python bindings .........: $cython_python_bindings
170 179
171 Now type 'make' to build $PACKAGE $VERSION, 180 Now type 'make' to build $PACKAGE $VERSION,