source: main/trunk/gs2-core/common-src/configure.ac@ 22728

Last change on this file since 22728 was 22728, checked in by mdewsnip, 14 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.

File size: 2.2 KB
Line 
1###########################################################################
2#
3# configure -- Configure script for common-src
4#
5# By Michael Dewsnip
6#
7# Copyright (C) 2010 DL Consulting Ltd.
8#
9###########################################################################
10
11
12AC_INIT([greenstone2-common-src], [2.84], [[email protected]])
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])
43
44 # Unpack Expat (if it hasn't already been done)
45 if test ! -d "packages/expat/expat-1.95.8"; then
46 cd packages/expat
47 gzip -dc expat-1.95.8.tar.gz | tar -xf -
48 cd ../..
49 fi
50
51 # Configure Expat manually
52 cd packages/expat/expat-1.95.8
53 ./configure --prefix=`pwd`/..
54 cd ../../..
55fi
56AM_CONDITIONAL(ENABLE_LUCENE, test "x$enable_lucene" != xno)
57
58# Option: SQLite support (enabled by default)
59AC_ARG_ENABLE([sqlite], [AS_HELP_STRING([--disable-sqlite], [Disable SQLite support])], [], [enable_sqlite=yes])
60if test "x$enable_sqlite" != xno; then
61 AC_DEFINE(USE_SQLITE, 1, [SQLite support])
62
63 # Unpack SQLite (if it hasn't already been done)
64 if test ! -d "packages/sqlite/sqlite-amalgamation-3.5.9"; then
65 cd packages/sqlite
66 gzip -dc sqlite-amalgamation-3.5.9.tar.gz | tar -xf -
67 cd ../..
68 fi
69
70 # Configure SQLite manually
71 cd packages/sqlite/sqlite-amalgamation-3.5.9
72 ./configure --prefix=`pwd`/.. --bindir="$bindir"
73 cd ../../..
74fi
75AM_CONDITIONAL(USE_SQLITE, test "x$enable_sqlite" != xno)
76
77# Generate the Makefiles for this package
78AC_OUTPUT(Makefile src/lib/Makefile)
Note: See TracBrowser for help on using the repository browser.