########################################################################### # # configure -- Configure script for top-level # # A component of the Greenstone digital library software # from the New Zealand Digital Library Project at the # University of Waikato, New Zealand. # # Copyright (C) 1999-2010 The New Zealand Digital Library Project # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### 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)