[21468] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
[22728] | 3 | # configure -- Configure script for gs2-core
|
---|
[21468] | 4 | #
|
---|
[22728] | 5 | # By Michael Dewsnip
|
---|
[21468] | 6 | #
|
---|
[22728] | 7 | # Copyright (C) 2010 DL Consulting Ltd.
|
---|
[21468] | 8 | #
|
---|
| 9 | ###########################################################################
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | AC_INIT([greenstone2], [2.84-svn], [[email protected]])
|
---|
| 13 | AC_CONFIG_AUX_DIR([.])
|
---|
[21542] | 14 | AC_CONFIG_HEADERS([config.h])
|
---|
[21468] | 15 | AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
|
---|
| 16 |
|
---|
| 17 | # This package requires C++ compilation and library creation
|
---|
| 18 | AC_PROG_CXX
|
---|
| 19 | AC_PROG_INSTALL
|
---|
| 20 | AC_PROG_RANLIB
|
---|
| 21 |
|
---|
| 22 | # Check for 64-bit machines
|
---|
| 23 | AC_CANONICAL_HOST
|
---|
| 24 | AC_MSG_CHECKING(if architecture is 64-bit)
|
---|
| 25 | arch_64bit=no
|
---|
| 26 | case "$host_cpu" in
|
---|
| 27 | x86_64) arch_64bit=yes ;;
|
---|
| 28 | esac
|
---|
| 29 | if test "$arch_64bit" = yes; then
|
---|
| 30 | AC_MSG_RESULT(yes)
|
---|
| 31 | if test -z "$COMPAT32BITFLAGS" ; then
|
---|
| 32 | COMPAT32BITFLAGS="-m32"
|
---|
| 33 | fi
|
---|
| 34 | else
|
---|
| 35 | AC_MSG_RESULT(no)
|
---|
| 36 | fi
|
---|
| 37 | AC_SUBST(COMPAT32BITFLAGS)
|
---|
| 38 |
|
---|
[21534] | 39 | # Option: Lucene support (enabled by default)
|
---|
| 40 | AC_ARG_ENABLE([lucene], [AS_HELP_STRING([--disable-lucene], [Disable Lucene support])], [], [enable_lucene=yes])
|
---|
| 41 | if test "x$enable_lucene" != xno; then
|
---|
| 42 | AC_DEFINE(ENABLE_LUCENE, 1, [Lucene support])
|
---|
| 43 | fi
|
---|
| 44 | AM_CONDITIONAL(ENABLE_LUCENE, test "x$enable_lucene" != xno)
|
---|
| 45 |
|
---|
[21519] | 46 | # Option: SQLite support (enabled by default)
|
---|
| 47 | AC_ARG_ENABLE([sqlite], [AS_HELP_STRING([--disable-sqlite], [Disable SQLite support])], [], [enable_sqlite=yes])
|
---|
| 48 | if test "x$enable_sqlite" != xno; then
|
---|
| 49 | AC_DEFINE(USE_SQLITE, 1, [SQLite support])
|
---|
| 50 | fi
|
---|
| 51 | AM_CONDITIONAL(USE_SQLITE, test "x$enable_sqlite" != xno)
|
---|
[21468] | 52 |
|
---|
[21624] | 53 | # Determine the OS we're running on, and set the --bindir option appropriately
|
---|
| 54 | gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
---|
| 55 | if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ; then
|
---|
| 56 | # Cygwin
|
---|
| 57 | gsdlos=windows
|
---|
| 58 | fi
|
---|
| 59 | ac_configure_args="$ac_configure_args --bindir=`pwd`/bin/$gsdlos"
|
---|
| 60 |
|
---|
[21517] | 61 | # Configure the common-src subdirectory
|
---|
| 62 | if test -d "$srcdir/common-src"; then
|
---|
| 63 | AC_CONFIG_SUBDIRS([common-src])
|
---|
| 64 | fi
|
---|
| 65 |
|
---|
[21681] | 66 | # Configure the build-src subdirectory
|
---|
| 67 | if test -d "$srcdir/build-src"; then
|
---|
| 68 | AC_CONFIG_SUBDIRS([build-src])
|
---|
| 69 | fi
|
---|
| 70 |
|
---|
[21517] | 71 | # Configure the runtime-src subdirectory
|
---|
| 72 | if test -d "$srcdir/runtime-src"; then
|
---|
| 73 | AC_CONFIG_SUBDIRS([runtime-src])
|
---|
| 74 | fi
|
---|
| 75 |
|
---|
[21468] | 76 | # Generate the Makefiles for this package
|
---|
| 77 | AC_OUTPUT(Makefile)
|
---|