summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 997e73a..2e5f435 100644
--- a/configure.in
+++ b/configure.in
@@ -55,13 +55,30 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+# Debug mode
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug],
+ [Compile binaries in debug mode]))
+
+if test "$enable_debug" = "yes"; then
+ CFLAGS="$CFLAGS -g -O0"
+ AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
+ echo "enabling debug compile mode"
+fi
+
# Check for libraries
AC_CHECK_LIB(c, iconv, [ LIB_ICONV=""; ],
[ AC_CHECK_LIB(iconv, iconv, [ LIB_ICONV="-liconv"; LIBS="-liconv $LIBS" ],
[echo "ERROR: Must have iconv routines."; exit 1])
])
-AC_CHECK_LIB(expat, XML_Parse, ,
- [echo "ERROR: Must install sablotron libraries."; exit 1])
+
+# Sablotron can depend on these libraries so include if present
+AC_CHECK_LIB(termcap, tgetnum)
+AC_CHECK_LIB(readline, readline)
+AC_CHECK_LIB(expat, XML_Parse)
+AC_CHECK_LIB(js, JS_NewContext)
+
+# Check for Sablotron
AC_CHECK_LIB(sablot, SDOM_createElement, ,
[echo "ERROR: Must install sablotron libraries."; exit 1])