########################################################################### # # configure -- Configure script for common-src # # By Michael Dewsnip # # Copyright (C) 2010 DL Consulting Ltd. # ########################################################################### AC_INIT([greenstone2-common-src], [2.84], [greenstone@cs.waikato.ac.nz]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define]) # This package requires C++ compilation and library creation AC_PROG_CXX AC_PROG_INSTALL AC_PROG_RANLIB # Check for 64-bit machines AC_CANONICAL_HOST AC_MSG_CHECKING(if architecture is 64-bit) arch_64bit=no case "$host_cpu" in x86_64) arch_64bit=yes ;; esac if test "$arch_64bit" = yes; then AC_MSG_RESULT(yes) if test -z "$COMPAT32BITFLAGS" ; then COMPAT32BITFLAGS="-m32" fi else AC_MSG_RESULT(no) fi AC_SUBST(COMPAT32BITFLAGS) # Option: Lucene support (enabled by default) AC_ARG_ENABLE([lucene], [AS_HELP_STRING([--disable-lucene], [Disable Lucene support])], [], [enable_lucene=yes]) if test "x$enable_lucene" != xno; then AC_DEFINE(ENABLE_LUCENE, 1, [Lucene support]) # Unpack Expat (if it hasn't already been done) if test ! -d "packages/expat/expat-1.95.8"; then cd packages/expat gzip -dc expat-1.95.8.tar.gz | tar -xf - cd ../.. fi # Configure Expat manually cd packages/expat/expat-1.95.8 ./configure --prefix=`pwd`/.. cd ../../.. fi AM_CONDITIONAL(ENABLE_LUCENE, test "x$enable_lucene" != xno) # Option: SQLite support (enabled by default) AC_ARG_ENABLE([sqlite], [AS_HELP_STRING([--disable-sqlite], [Disable SQLite support])], [], [enable_sqlite=yes]) if test "x$enable_sqlite" != xno; then AC_DEFINE(USE_SQLITE, 1, [SQLite support]) # Unpack SQLite (if it hasn't already been done) if test ! -d "packages/sqlite/sqlite-amalgamation-3.5.9"; then cd packages/sqlite gzip -dc sqlite-amalgamation-3.5.9.tar.gz | tar -xf - cd ../.. fi # Configure SQLite manually cd packages/sqlite/sqlite-amalgamation-3.5.9 ./configure --prefix=`pwd`/.. --bindir="$bindir" cd ../../.. fi AM_CONDITIONAL(USE_SQLITE, test "x$enable_sqlite" != xno) # Generate the Makefiles for this package AC_OUTPUT(Makefile src/lib/Makefile)