########################################################################### # # configure -- Configure script for gs2-core # # By Michael Dewsnip # # Copyright (C) 2010 DL Consulting Ltd. # ########################################################################### AC_INIT([greenstone2], [2.84-svn], [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]) 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]) fi AM_CONDITIONAL(USE_SQLITE, test "x$enable_sqlite" != xno) # Determine the OS we're running on, and set the --bindir option appropriately gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ; then # Cygwin gsdlos=windows fi ac_configure_args="$ac_configure_args --bindir=`pwd`/bin/$gsdlos" # Configure the common-src subdirectory if test -d "$srcdir/common-src"; then AC_CONFIG_SUBDIRS([common-src]) fi # Configure the build-src subdirectory if test -d "$srcdir/build-src"; then AC_CONFIG_SUBDIRS([build-src]) fi # Configure the runtime-src subdirectory if test -d "$srcdir/runtime-src"; then AC_CONFIG_SUBDIRS([runtime-src]) fi # Generate the Makefiles for this package AC_OUTPUT(Makefile)