From c9a974fb46cc29dcb2de5603f9d38f8c960f7e92 Mon Sep 17 00:00:00 2001 From: Gerald Schmidt Date: Sun, 4 Oct 2009 22:55:11 +0000 Subject: [PATCH] Updated for 1.2.0.6 --- configure.in | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index fc4c65d..dd62399 100755 --- a/configure.in +++ b/configure.in @@ -87,14 +87,17 @@ CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS" AC_SUBST(WX_LIBS) +AC_ARG_ENABLE(debug, +[ --enable-debug, Enable debug build], +[ + debugbuild="y" + CXXFLAGS="${CXXFLAGS} -ggdb -O0" +]) + # Check pcre is available AC_CHECK_HEADER(pcre.h, , AC_MSG_ERROR([PCRE headers not found])) -# Check ASPELL is available -AC_CHECK_HEADER(aspell.h, , - AC_MSG_ERROR([Aspell headers not found])) - # Check boost::shared_ptr is available AC_LANG(C++) AC_CHECK_HEADER(boost/shared_ptr.hpp, , @@ -110,4 +113,25 @@ AC_LANG(C++) AC_CHECK_HEADER(expat.h, , AC_MSG_ERROR([Expat headers not found])) +# Check enchant is available +PKG_CHECK_MODULES(ENCHANT, [enchant], [CXXFLAGS="$CXXFLAGS -DUSE_ENCHANT"], + # otherwise Check ASPELL is available + [AC_CHECK_HEADER(aspell.h, [ASPELL_LIBS="-laspell"], + AC_MSG_ERROR([Aspell headers not found]))] +) + +AC_SUBST(ASPELL_LIBS) + AC_OUTPUT(Makefile src/Makefile) + +dnl Summarized output +echo +echo "***************************************" +echo + +if [[ "$debugbuild" = "y" ]]; then +echo "Debug Enabled" +else +echo "Debug Disabled" +fi +