root/main/trunk/gs2-core/configure.ac @ 26341

Revision 22728, 2.2 KB (checked in by mdewsnip, 10 years ago)

Changing all the configure scripts and makefiles I created (from scratch, to use autoconf and automake) to have my name and copyright DL Consulting Ltd.

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