summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-24 02:11:32 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-24 02:11:32 -0400
commit1fd37a432d060a08254ecb1a9129050563075140 (patch)
treef80ee5bf2b780f315348c2767150b9643e9d9488 /configure.ac
parent73e2abd1b2e2bacbd353999a7b3edd95a04112c4 (diff)
downloadfork-ledger-1fd37a432d060a08254ecb1a9129050563075140.tar.gz
fork-ledger-1fd37a432d060a08254ecb1a9129050563075140.tar.bz2
fork-ledger-1fd37a432d060a08254ecb1a9129050563075140.zip
cleanup; fully switched to autoconf -- use scripts/acprep
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 20 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c5f319f1..c88d8ead 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,9 +13,26 @@ AC_PROG_MAKE_SET
AC_PROG_RANLIB
# Checks for libraries.
-AC_CHECK_LIB([gmp], [__gmpz_add],, [AC_MSG_FAILURE("Could not find libgmp!")])
-AC_CHECK_LIB([pcre], [pcre_compile],, [AC_MSG_FAILURE("Could not find libpcre!")])
-AC_CHECK_LIB([xmlparse], [XML_ParserCreate])
+AC_CHECK_LIB([gmp], [__gmpz_add], [],
+ AC_MSG_FAILURE("Could not find gmp (GNU multi-precision) library"))
+AC_CHECK_LIB([pcre], [pcre_compile], [],
+ AC_MSG_FAILURE("Could not find pcre (Perl regular expression) library"))
+AC_CHECK_LIB([xmlparse], [XML_ParserCreate],
+ [AC_DEFINE([READ_GNUCASH], [1], [Support reading gnucash files])
+ AM_CONDITIONAL(READ_GNUCASH, true)
+ AC_SUBST(LIBS, "-lxmlparse -lxmltok $LIBS")],
+ AC_MSG_NOTICE([Could not find xmlparse library; gnucash support disabled]),
+ [-lxmltok])
+
+# Check for options
+AC_ARG_ENABLE(debug,
+ [ --enable-debug Turn on debugging],
+ [case "${enableval}" in
+ yes) debug=true ;;
+ no) debug=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+ esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
# Checks for header files.
AC_STDC_HEADERS