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

Revision 21681, 3.0 KB (checked in by mdewsnip, 10 years ago)

Changed top-level configure and Makefile so the build-src directory is done as well.

Line 
1###########################################################################
2#
3# configure -- Configure script for top-level
4#
5# A component of the Greenstone digital library software
6# from the New Zealand Digital Library Project at the
7# University of Waikato, New Zealand.
8#
9# Copyright (C) 1999-2010  The New Zealand Digital Library Project
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27
28AC_INIT([greenstone2], [2.84-svn], [greenstone@cs.waikato.ac.nz])
29AC_CONFIG_AUX_DIR([.])
30AC_CONFIG_HEADERS([config.h])
31AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
32
33# This package requires C++ compilation and library creation
34AC_PROG_CXX
35AC_PROG_INSTALL
36AC_PROG_RANLIB
37
38# Check for 64-bit machines
39AC_CANONICAL_HOST
40AC_MSG_CHECKING(if architecture is 64-bit)
41arch_64bit=no
42case "$host_cpu" in
43  x86_64) arch_64bit=yes ;;
44esac
45if test "$arch_64bit" = yes; then
46  AC_MSG_RESULT(yes)
47  if test -z "$COMPAT32BITFLAGS" ; then
48    COMPAT32BITFLAGS="-m32"
49  fi
50else
51  AC_MSG_RESULT(no)
52fi
53AC_SUBST(COMPAT32BITFLAGS)
54
55# Option: Lucene support (enabled by default)
56AC_ARG_ENABLE([lucene], [AS_HELP_STRING([--disable-lucene], [Disable Lucene support])], [], [enable_lucene=yes])
57if test "x$enable_lucene" != xno; then
58  AC_DEFINE(ENABLE_LUCENE, 1, [Lucene support])
59fi
60AM_CONDITIONAL(ENABLE_LUCENE, test "x$enable_lucene" != xno)
61
62# Option: SQLite support (enabled by default)
63AC_ARG_ENABLE([sqlite], [AS_HELP_STRING([--disable-sqlite], [Disable SQLite support])], [], [enable_sqlite=yes])
64if test "x$enable_sqlite" != xno; then
65  AC_DEFINE(USE_SQLITE, 1, [SQLite support])
66fi
67AM_CONDITIONAL(USE_SQLITE, test "x$enable_sqlite" != xno)
68
69# Determine the OS we're running on, and set the --bindir option appropriately
70gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
71if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ; then
72  # Cygwin 
73  gsdlos=windows
74fi
75ac_configure_args="$ac_configure_args --bindir=`pwd`/bin/$gsdlos"
76
77# Configure the common-src subdirectory
78if test -d "$srcdir/common-src"; then
79  AC_CONFIG_SUBDIRS([common-src])
80fi
81
82# Configure the build-src subdirectory
83if test -d "$srcdir/build-src"; then
84  AC_CONFIG_SUBDIRS([build-src])
85fi
86
87# Configure the runtime-src subdirectory
88if test -d "$srcdir/runtime-src"; then
89  AC_CONFIG_SUBDIRS([runtime-src])
90fi
91
92# Generate the Makefiles for this package
93AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the browser.