[552] | 1 | dnl Process this file with autoconf to produce a configure script.
|
---|
[8758] | 2 | dnl Use autoconf-2.59 or later... it might not work anymore with
|
---|
| 3 | dnl the older 2.1x versions - jrm21 12/2004
|
---|
[16563] | 4 | AC_INIT()
|
---|
[684] | 5 | AC_CONFIG_HEADER(config.h)
|
---|
[552] | 6 |
|
---|
[554] | 7 | PACKAGE=gsdl
|
---|
[16563] | 8 | VERSION=2.82-svn
|
---|
[552] | 9 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
---|
| 10 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
---|
| 11 | AC_SUBST(PACKAGE)
|
---|
| 12 | AC_SUBST(VERSION)
|
---|
[567] | 13 |
|
---|
[18483] | 14 |
|
---|
[1860] | 15 | dnl
|
---|
| 16 | dnl Set use of fast cgi
|
---|
| 17 | dnl
|
---|
[566] | 18 | USE_FASTCGI=0
|
---|
| 19 | if test USE_FASTCGI = 1; then
|
---|
| 20 | AC_DEFINE(USE_FASTCGI)
|
---|
| 21 | AC_SUBST(USE_FASTCGI)
|
---|
| 22 | fi
|
---|
[552] | 23 |
|
---|
[1860] | 24 | dnl
|
---|
[3631] | 25 | dnl Set use of langaction
|
---|
| 26 | dnl
|
---|
| 27 | dnl USE_LANGACTION=0
|
---|
| 28 | if test USE_LANGACTION = 1; then
|
---|
| 29 | AC_DEFINE(USE_LANGACTION)
|
---|
| 30 | AC_SUBST(USE_LANGACTION)
|
---|
| 31 | fi
|
---|
| 32 |
|
---|
| 33 | dnl
|
---|
[1860] | 34 | dnl Set use of corba
|
---|
| 35 | dnl
|
---|
[21446] | 36 | AC_ARG_ENABLE(corba, [ --enable-corba Enable CORBA support], USE_CORBA=$enableval, USE_CORBA=no)
|
---|
| 37 | if test $USE_CORBA = "yes" -o $USE_CORBA = "1" ; then
|
---|
| 38 | USE_CORBA=1
|
---|
| 39 | AC_DEFINE(USE_CORBA,[])
|
---|
| 40 | else
|
---|
| 41 | USE_CORBA=0
|
---|
| 42 | fi
|
---|
[2051] | 43 | AC_SUBST(USE_CORBA)
|
---|
[1860] | 44 |
|
---|
[21330] | 45 | AC_ARG_WITH(micodir, [ --with-micodir Use installed MICO directory], MICO_DIR=$withval, MICO_DIR="default")
|
---|
[2296] | 46 | AC_DEFINE_UNQUOTED(MICO_DIR, "$MICO_DIR")
|
---|
[2051] | 47 | AC_SUBST(MICO_DIR)
|
---|
[1860] | 48 |
|
---|
[1938] | 49 | dnl
|
---|
| 50 | dnl Set use of z39.50
|
---|
| 51 | dnl
|
---|
[21446] | 52 | AC_ARG_ENABLE(z3950, [ --enable-z3950 Enable Z39.50 client support], USE_Z3950=$enableval, USE_Z3950=no)
|
---|
| 53 | if test $USE_Z3950 = "yes" -o $USE_Z3950 = "1" ; then
|
---|
| 54 | USE_Z3950=1
|
---|
| 55 | AC_DEFINE(USE_Z3950,[])
|
---|
| 56 | else
|
---|
| 57 | USE_Z3950=0
|
---|
| 58 | fi
|
---|
[1938] | 59 | AC_SUBST(USE_Z3950)
|
---|
| 60 |
|
---|
[2279] | 61 | dnl
|
---|
[12492] | 62 | dnl Set use of yaz - now compiled by default even when z3950 support not required
|
---|
| 63 | dnl
|
---|
[21446] | 64 | AC_ARG_ENABLE(yaz, [ --disable-yaz Disable YAZ compilation], USE_YAZ=$enableval, USE_YAZ=yes)
|
---|
| 65 | if test $USE_YAZ = "yes" -o $USE_YAZ = "1" ; then
|
---|
| 66 | USE_YAZ=1
|
---|
| 67 | AC_DEFINE(USE_YAZ,[])
|
---|
| 68 | else
|
---|
| 69 | USE_YAZ=0
|
---|
| 70 | fi
|
---|
[12492] | 71 | AC_SUBST(USE_YAZ)
|
---|
| 72 |
|
---|
[22058] | 73 | dnl
|
---|
| 74 | dnl Set use of JDBM (enabled by default)
|
---|
| 75 | dnl
|
---|
| 76 | AC_ARG_ENABLE(jdbm, [ --disable-jdbm Disable JDBM compilation], USE_JDBM=$enableval, USE_JDBM=yes)
|
---|
| 77 | if test $USE_JDBM = "yes" -o $USE_JDBM = "1" ; then
|
---|
| 78 | USE_JDBM=1
|
---|
| 79 | AC_DEFINE(USE_JDBM,[])
|
---|
| 80 | else
|
---|
| 81 | USE_JDBM=0
|
---|
| 82 | fi
|
---|
| 83 | AC_SUBST(USE_JDBM)
|
---|
| 84 |
|
---|
| 85 | dnl
|
---|
| 86 | dnl Set use of GDBM (enabled by default)
|
---|
| 87 | dnl
|
---|
| 88 | AC_ARG_ENABLE(gdbm, [ --disable-gdbm Disable GDBM compilation], USE_GDBM=$enableval, USE_GDBM=yes)
|
---|
| 89 | if test $USE_GDBM = "yes" -o $USE_GDBM = "1" ; then
|
---|
| 90 | USE_GDBM=1
|
---|
| 91 | AC_DEFINE(USE_GDBM,[])
|
---|
| 92 | else
|
---|
| 93 | USE_GDBM=0
|
---|
| 94 | fi
|
---|
| 95 | AC_SUBST(USE_GDBM)
|
---|
| 96 |
|
---|
[12922] | 97 | dnl
|
---|
| 98 | dnl disable compilation of accent folding stuff for mgpp (and one day mg)
|
---|
| 99 | dnl
|
---|
[21446] | 100 | AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
|
---|
| 101 | if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
|
---|
| 102 | ENABLE_ACCENTFOLD=1
|
---|
| 103 | AC_DEFINE(ENABLE_ACCENTFOLD,[])
|
---|
| 104 | else
|
---|
| 105 | ENABLE_ACCENTFOLD=0
|
---|
| 106 | fi
|
---|
[12922] | 107 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
| 108 |
|
---|
[15901] | 109 | dnl
|
---|
[16288] | 110 | dnl Set use of SQLite (enabled by default)
|
---|
[15901] | 111 | dnl
|
---|
[21446] | 112 | AC_ARG_ENABLE(sqlite, [ --disable-sqlite Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
|
---|
| 113 | if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
|
---|
| 114 | USE_SQLITE=1
|
---|
| 115 | AC_DEFINE(USE_SQLITE,[])
|
---|
| 116 | else
|
---|
| 117 | USE_SQLITE=0
|
---|
| 118 | fi
|
---|
[15901] | 119 | AC_SUBST(USE_SQLITE)
|
---|
| 120 |
|
---|
[18483] | 121 | dnl
|
---|
[20853] | 122 | dnl Set use of Apache httpd (disabled by default)
|
---|
[18483] | 123 | dnl
|
---|
[21377] | 124 | if test -d runtime-src; then
|
---|
[21446] | 125 | AC_ARG_ENABLE(apache-httpd, [ --enable-apache-httpd Enable Apache httpd support], USE_APACHE_HTTPD=$enableval, USE_APACHE_HTTPD=no)
|
---|
| 126 | if test $USE_APACHE_HTTPD = "yes" -o $USE_APACHE_HTTPD = "1" ; then
|
---|
| 127 | USE_APACHE_HTTPD=1
|
---|
| 128 | AC_DEFINE(USE_APACHE_HTTPD,[])
|
---|
| 129 | else
|
---|
| 130 | USE_APACHE_HTTPD=0
|
---|
| 131 | fi
|
---|
[21377] | 132 | AC_SUBST(USE_APACHE_HTTPD)
|
---|
| 133 | fi
|
---|
[18483] | 134 |
|
---|
[21366] | 135 | dnl
|
---|
| 136 | dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
|
---|
| 137 | dnl
|
---|
| 138 | AC_ARG_ENABLE(jni, [ --enable-jni Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
|
---|
| 139 | if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
|
---|
| 140 | ENABLE_JNI=1
|
---|
| 141 | AC_DEFINE(ENABLE_JNI,[])
|
---|
| 142 | else
|
---|
| 143 | ENABLE_JNI=0
|
---|
| 144 | fi
|
---|
| 145 | AC_SUBST(ENABLE_JNI)
|
---|
[18483] | 146 |
|
---|
[21330] | 147 | dnl
|
---|
| 148 | dnl Set compilation of MG (enabled by default)
|
---|
| 149 | dnl
|
---|
| 150 | AC_ARG_ENABLE(mg, [ --disable-mg Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
|
---|
| 151 | if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
|
---|
| 152 | ENABLE_MG=1
|
---|
| 153 | AC_DEFINE(ENABLE_MG,[])
|
---|
| 154 | else
|
---|
| 155 | ENABLE_MG=0
|
---|
| 156 | fi
|
---|
| 157 | AC_SUBST(ENABLE_MG)
|
---|
| 158 |
|
---|
| 159 |
|
---|
| 160 | dnl
|
---|
| 161 | dnl Set compilation of MGPP (enabled by default)
|
---|
| 162 | dnl
|
---|
| 163 | AC_ARG_ENABLE(mgpp, [ --disable-mgpp Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
|
---|
| 164 | if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
|
---|
| 165 | ENABLE_MGPP=1
|
---|
| 166 | AC_DEFINE(ENABLE_MGPP,[])
|
---|
| 167 | else
|
---|
| 168 | ENABLE_MGPP=0
|
---|
| 169 | fi
|
---|
| 170 | AC_SUBST(ENABLE_MGPP)
|
---|
| 171 |
|
---|
| 172 | dnl
|
---|
| 173 | dnl Set compilation of lucene (enabled by default)
|
---|
| 174 | dnl
|
---|
| 175 | AC_ARG_ENABLE(lucene, [ --disable-lucene Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
|
---|
| 176 | if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then
|
---|
| 177 | ENABLE_LUCENE=1
|
---|
[21446] | 178 | AC_DEFINE(ENABLE_LUCENE,[])
|
---|
[21330] | 179 | else
|
---|
| 180 | ENABLE_LUCENE=0
|
---|
| 181 | fi
|
---|
| 182 | AC_SUBST(ENABLE_LUCENE)
|
---|
| 183 |
|
---|
| 184 |
|
---|
[552] | 185 | dnl Checks for programs.
|
---|
[14169] | 186 | LDFLAGS=$LDFLAGS
|
---|
[15551] | 187 | AC_SUBST(LDFLAGS)
|
---|
[1722] | 188 | dnl only set CFLAGS if not already set in environment
|
---|
| 189 | if test -z "$CFLAGS"; then
|
---|
[794] | 190 | CFLAGS=-O2
|
---|
[1722] | 191 | fi
|
---|
[575] | 192 | AC_SUBST(CFLAGS)
|
---|
| 193 |
|
---|
[15551] | 194 |
|
---|
[552] | 195 | AC_PROG_CC
|
---|
| 196 | AC_PROG_CXX
|
---|
[684] | 197 | AC_PROG_AWK
|
---|
| 198 | AC_PROG_YACC
|
---|
[2279] | 199 | dnl get $target_cpu, $target_vendor, and $target_os
|
---|
| 200 | dnl (as well as host_*)
|
---|
| 201 | AC_CANONICAL_SYSTEM
|
---|
| 202 | dnl do we actually want this? It adds a prefix based on host, system etc
|
---|
| 203 | dnl AC_ARG_PROGRAM
|
---|
[703] | 204 | AC_PROG_INSTALL
|
---|
[552] | 205 | AC_PROG_LN_S
|
---|
| 206 | AC_PROG_MAKE_SET
|
---|
| 207 | AC_PROG_RANLIB
|
---|
| 208 |
|
---|
[15551] | 209 | AC_MSG_CHECKING(to see if architecture is 64-bit)
|
---|
| 210 | arch_64bit=no
|
---|
| 211 | case "$host_cpu" in
|
---|
| 212 | x86_64) arch_64bit=yes ;;
|
---|
| 213 | esac
|
---|
| 214 |
|
---|
| 215 | if test "$arch_64bit" = yes; then
|
---|
| 216 | AC_MSG_RESULT(yes)
|
---|
| 217 | if test -z "$COMPAT32BITFLAGS" ; then
|
---|
| 218 | COMPAT32BITFLAGS="-m32"
|
---|
| 219 | fi
|
---|
| 220 | else
|
---|
| 221 | AC_MSG_RESULT(no)
|
---|
| 222 | if test -z "$COMPAT32BITFLAGS" ; then
|
---|
| 223 | COMPAT32BITFLAGS=
|
---|
| 224 | fi
|
---|
| 225 | fi
|
---|
[21432] | 226 |
|
---|
| 227 | # Only need compat32bitflag if using MG or MGPP
|
---|
| 228 | if test "$ENABLE_MG" = "0" ; then
|
---|
| 229 | COMPAT32BITFLAGS=
|
---|
| 230 | else
|
---|
| 231 | if test "$ENABLE_MGPP" = "0" ; then
|
---|
| 232 | COMPAT32BITFLAGS=
|
---|
| 233 | fi
|
---|
| 234 | fi
|
---|
| 235 |
|
---|
[15551] | 236 | export COMPAT32BITFLAGS
|
---|
| 237 | AC_SUBST(COMPAT32BITFLAGS)
|
---|
| 238 |
|
---|
| 239 |
|
---|
[2173] | 240 | #moved CORBA MICO directory test to get version of MICO
|
---|
| 241 | if test $USE_CORBA = 1; then
|
---|
| 242 |
|
---|
[2213] | 243 | if test $MICO_DIR = "default"; then
|
---|
[2173] | 244 | #do something
|
---|
| 245 | MICO_INC="-I packages/mico/mico/include"
|
---|
| 246 | else
|
---|
| 247 | #build the micotest program
|
---|
| 248 | MICO_INC= ""
|
---|
| 249 | if test $MICO_DIR != yes; then
|
---|
| 250 | MICO_INC="-I $MICO_DIR"
|
---|
| 251 | fi
|
---|
| 252 | fi
|
---|
| 253 |
|
---|
| 254 | #get MICO_VER value
|
---|
| 255 | sh -c "$CC -c micotest.cpp -o micotest.o $MICO_INC 2>&1" > /dev/null
|
---|
| 256 | sh -c "$CC -o micotest micotest.o -lstdc++ 2>&1" > /dev/null
|
---|
[2214] | 257 | MICO_VER=`./micotest` || MICO_VER=2.3.5
|
---|
[2173] | 258 | sh -c "rm micotest"
|
---|
| 259 | sh -c "rm micotest.o"
|
---|
| 260 |
|
---|
| 261 | #do test of MICO_VER
|
---|
| 262 | if test MICO_VER != 0; then
|
---|
| 263 | AC_DEFINE(MICO_VER)
|
---|
| 264 | AC_SUBST(MICO_VER)
|
---|
| 265 | fi
|
---|
| 266 | #end USE_CORBA test
|
---|
| 267 | fi
|
---|
| 268 |
|
---|
[684] | 269 | dnl Checks for typedefs, structures, and compiler characteristics.
|
---|
| 270 | AC_AIX
|
---|
| 271 | AC_ISC_POSIX
|
---|
| 272 | AC_MINIX
|
---|
| 273 | fp_C_PROTOTYPES
|
---|
| 274 | AC_C_CONST
|
---|
| 275 | AC_TYPE_OFF_T
|
---|
| 276 | AC_TYPE_SIZE_T
|
---|
| 277 | AC_HEADER_TIME
|
---|
| 278 | AC_STRUCT_TM
|
---|
| 279 |
|
---|
| 280 | dnl --- This should be in the stdc checking -----------------
|
---|
| 281 | if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
|
---|
| 282 | dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
|
---|
| 283 | dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
|
---|
| 284 | dnl XOPEN extensions (like popen).
|
---|
| 285 | dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
|
---|
| 286 | dnl needs. So drop back to -Xa
|
---|
| 287 | AC_TRY_COMPILE(
|
---|
| 288 | [#include <stdio.h>
|
---|
| 289 | ], [ FILE *rubbish = popen("yes", "r"); ],,
|
---|
| 290 | [CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
|
---|
| 291 | fi
|
---|
| 292 | dnl ----------------------
|
---|
| 293 |
|
---|
| 294 |
|
---|
[552] | 295 | dnl Checks for libraries.
|
---|
[8756] | 296 | dnl check for -lg:
|
---|
| 297 | AC_HAVE_LIBRARY(g)
|
---|
| 298 | dnl check for -lm:
|
---|
| 299 | AC_HAVE_LIBRARY(m)
|
---|
| 300 | dnl check for -lcrypt:
|
---|
| 301 | AC_HAVE_LIBRARY(crypt)
|
---|
[20842] | 302 | #if test $ENABLE_ACCENTFOLD = 1; then
|
---|
| 303 | #AC_HAVE_LIBRARY(iconv)
|
---|
| 304 | #fi
|
---|
[552] | 305 |
|
---|
| 306 | dnl Checks for header files.
|
---|
[684] | 307 | AC_HEADER_DIRENT
|
---|
[552] | 308 | AC_HEADER_STDC
|
---|
[10181] | 309 | AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h sys/stat.h)
|
---|
[684] | 310 | AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
|
---|
| 311 | AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
|
---|
| 312 | AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
|
---|
[552] | 313 |
|
---|
[684] | 314 | dnl Checks for library functions.
|
---|
| 315 | AC_FUNC_ALLOCA
|
---|
| 316 | AC_PROG_GCC_TRADITIONAL
|
---|
| 317 | AC_TYPE_SIGNAL
|
---|
| 318 | AC_FUNC_VPRINTF
|
---|
[786] | 319 | AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
|
---|
[684] | 320 | AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
|
---|
[552] | 321 |
|
---|
[3705] | 322 | dnl see if gettext is in libc. (try the textdomain() function).
|
---|
[8202] | 323 | AC_CHECK_FUNC(textdomain, AC_DEFINE(ENABLE_NLS ,1) )
|
---|
[552] | 324 |
|
---|
[684] | 325 | # *** Custom checking (based on GNU tar configure.in) ***
|
---|
| 326 | # ---------------------------------------------------------------------------
|
---|
| 327 | AC_MSG_CHECKING(for HP-UX needing gmalloc)
|
---|
| 328 | if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
|
---|
| 329 | AC_MSG_RESULT(yes)
|
---|
[8756] | 330 | AC_LIBOBJ([gmalloc])
|
---|
[684] | 331 | AC_DEFINE(HAVE_VALLOC)
|
---|
| 332 | else
|
---|
| 333 | AC_MSG_RESULT(no)
|
---|
| 334 | AC_CHECK_FUNCS(valloc)
|
---|
| 335 | fi
|
---|
| 336 |
|
---|
[8183] | 337 | # we cannot generate static libraries under Darwin
|
---|
| 338 | AC_MSG_CHECKING(for Apple MacOS X/Darwin)
|
---|
| 339 | if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
|
---|
| 340 | AC_MSG_RESULT(yes)
|
---|
[8199] | 341 | STATIC=""
|
---|
[8183] | 342 | else
|
---|
| 343 | AC_MSG_RESULT(no)
|
---|
[8199] | 344 | STATIC="-static "
|
---|
[8183] | 345 | fi
|
---|
| 346 | AC_SUBST(STATIC)
|
---|
| 347 |
|
---|
[684] | 348 | fp_WITH_DMALLOC
|
---|
| 349 | fp_WITH_REGEX
|
---|
| 350 |
|
---|
| 351 | # ---------------------------------------------------------------------------
|
---|
| 352 | if test "$ac_cv_func_alloca" = 'no'; then
|
---|
| 353 | dnl support functions for alloca.c
|
---|
[8756] | 354 | AC_LIBOBJ([xmalloc])
|
---|
| 355 | AC_LIBOBJ([error])
|
---|
[684] | 356 | fi
|
---|
| 357 |
|
---|
| 358 |
|
---|
| 359 | # ---------------------------------------------------------------------------
|
---|
| 360 |
|
---|
[552] | 361 | dnl
|
---|
[684] | 362 | dnl Switch into C++
|
---|
| 363 | dnl
|
---|
| 364 | AC_LANG_CPLUSPLUS
|
---|
| 365 |
|
---|
| 366 | dnl
|
---|
| 367 | dnl Now check that Perl is actually around, and can be found
|
---|
| 368 | dnl
|
---|
[2279] | 369 | AC_MSG_CHECKING(that Perl 5 is available)
|
---|
[684] | 370 | success="no"
|
---|
| 371 | pl_path="$PATH"
|
---|
| 372 | IFS="${IFS= }"; pl_save_ifs="$IFS"; IFS=":"
|
---|
| 373 | for pl_dir in $pl_path; do
|
---|
| 374 | test -z "$pl_dir" && pl_dir=.
|
---|
| 375 | if test -x $pl_dir/perl; then
|
---|
| 376 | success="yes"
|
---|
| 377 | break
|
---|
| 378 | fi
|
---|
| 379 | done
|
---|
| 380 | IFS="$pl_save_ifs"
|
---|
| 381 |
|
---|
| 382 | dnl
|
---|
| 383 | dnl Perl actually can be run; now we see if it is version 5 by
|
---|
| 384 | dnl running a sample script (which returns a "clean" version number
|
---|
| 385 | dnl and then tests the result using expr. If perl errors in some
|
---|
| 386 | dnl way (eg. broken Perl executable, missing script), we set a failure
|
---|
| 387 | dnl value ("0") and then proceed as best we can
|
---|
| 388 | dnl
|
---|
| 389 | if test $success = "yes"; then
|
---|
| 390 | try=`perl configtest.pl` || try="0"
|
---|
| 391 | try=`expr $try \> 5.000`
|
---|
| 392 | if test $try = "1"; then
|
---|
| 393 | AC_MSG_RESULT("yes")
|
---|
| 394 | else
|
---|
| 395 | success="no"
|
---|
| 396 | fi
|
---|
| 397 | fi
|
---|
| 398 |
|
---|
| 399 | if test $success = "no"; then
|
---|
| 400 | AC_MSG_RESULT("no")
|
---|
| 401 | AC_MSG_ERROR("Perl 5 not available - cannot install")
|
---|
| 402 | fi
|
---|
| 403 |
|
---|
| 404 | dnl
|
---|
[552] | 405 | dnl Check if the STL library has any known faults;
|
---|
| 406 | dnl In GCC 2.7.2.x series, some STL library headers are missing
|
---|
| 407 | dnl a file called "new" which is referred to by other headers
|
---|
| 408 | dnl (eg. vector/vector.h); if this applies, then all use of the
|
---|
| 409 | dnl STL will cause a compile fail, so we'd better let the user
|
---|
| 410 | dnl know now, before things really go wrong!
|
---|
| 411 | dnl
|
---|
| 412 | success=no
|
---|
| 413 | AC_MSG_CHECKING("whether STL library has known faults")
|
---|
| 414 |
|
---|
| 415 | dnl - first shot, try simple good old vector on its own
|
---|
| 416 | AC_TRY_COMPILE(
|
---|
| 417 | [#include <vector>
|
---|
| 418 | ],
|
---|
| 419 | [],
|
---|
| 420 | success=yes,
|
---|
| 421 | )
|
---|
| 422 |
|
---|
| 423 | dnl - try using the .h equivalent
|
---|
| 424 | if test $success = "no"; then
|
---|
| 425 | AC_TRY_COMPILE(
|
---|
| 426 | [#include <vector.h>
|
---|
| 427 | ],
|
---|
| 428 | [],
|
---|
| 429 | success="yes",
|
---|
| 430 | )
|
---|
| 431 | fi
|
---|
| 432 |
|
---|
| 433 | dnl - now try for the objectspace headers
|
---|
| 434 | if test $success = "no"; then
|
---|
| 435 | AC_TRY_COMPILE(
|
---|
| 436 | [#include <ospace\\std\\vector>
|
---|
| 437 | ],
|
---|
| 438 | [],
|
---|
| 439 | success="yes",
|
---|
| 440 | )
|
---|
| 441 | fi
|
---|
| 442 |
|
---|
| 443 | if test $success = yes; then
|
---|
| 444 | AC_MSG_RESULT("no")
|
---|
| 445 | else
|
---|
| 446 | AC_MSG_RESULT("yes")
|
---|
[684] | 447 | AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler")
|
---|
[552] | 448 | fi
|
---|
| 449 |
|
---|
[2950] | 450 | gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
---|
[2951] | 451 | # check for running bash under cygwin
|
---|
| 452 | if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ;
|
---|
| 453 | then
|
---|
| 454 | gsdlos=windows
|
---|
| 455 | fi
|
---|
[557] | 456 | AC_SUBST(gsdlos)
|
---|
| 457 |
|
---|
[10856] | 458 | # check for endianness
|
---|
| 459 | AC_C_BIGENDIAN
|
---|
[684] | 460 | # ---------------------------------------------------------------------------
|
---|
| 461 | if test "$ac_cv_func_alloca" = 'no'; then
|
---|
| 462 | dnl support functions for alloca.c
|
---|
[8756] | 463 | AC_LIBOBJ([xmalloc.o])
|
---|
| 464 | AC_LIBOBJ([error])
|
---|
[684] | 465 | fi
|
---|
[552] | 466 |
|
---|
[3062] | 467 | # ---------------------------------------------------------------------------
|
---|
[552] | 468 |
|
---|
[3062] | 469 | dnl
|
---|
| 470 | dnl Locate all children of the modules folder
|
---|
| 471 | dnl
|
---|
| 472 | moduleDirs=""
|
---|
| 473 | MODULEDIRS=""
|
---|
[16619] | 474 | if test -d modules ; then
|
---|
[15300] | 475 | for x in `find modules -mindepth 1 -maxdepth 2`; do
|
---|
| 476 | if test -d "$x"; then
|
---|
| 477 | d="$x/Makefile.in"
|
---|
| 478 | if test -e "$d"; then
|
---|
| 479 | dnl echo $d
|
---|
| 480 | moduleDirs="$moduleDirs $x/Makefile"
|
---|
| 481 | MODULEDIRS="$MODULEDIRS $x"
|
---|
| 482 | fi
|
---|
[3062] | 483 | fi
|
---|
[15300] | 484 | done
|
---|
| 485 | echo "Making $moduleDirs in modules directory"
|
---|
| 486 | AC_SUBST(MODULEDIRS)
|
---|
| 487 | fi
|
---|
[3062] | 488 |
|
---|
[15300] | 489 |
|
---|
[684] | 490 | # ---------------------------------------------------------------------------
|
---|
[2279] | 491 | dnl for Darwin, as our packages don't (yet) correctly guess our system type.
|
---|
[8202] | 492 | dnl not needed any more?
|
---|
| 493 | dnl ac_configure_args="$ac_configure_args --build=$build --target=$target"
|
---|
[1668] | 494 |
|
---|
[13777] | 495 | # indexers needs a bindir option to get the binaries into the right place
|
---|
| 496 | gsdlprefix=`pwd`
|
---|
[19264] | 497 | ac_configure_args="$ac_configure_args --bindir=$gsdlprefix/bin/$gsdlos --libdir=$gsdlprefix/lib/$gsdlos"
|
---|
[21377] | 498 | AC_CONFIG_SUBDIRS(common-src)
|
---|
| 499 | AC_CONFIG_SUBDIRS(build-src)
|
---|
[13777] | 500 |
|
---|
[3062] | 501 | # the list of folders in the src folder
|
---|
[16572] | 502 | srclist="common-src/Makefile \
|
---|
[21377] | 503 | build-src/Makefile"
|
---|
| 504 |
|
---|
| 505 | if test -d runtime-src; then
|
---|
| 506 | AC_CONFIG_SUBDIRS(runtime-src)
|
---|
| 507 | srclist="$srclist \
|
---|
[16572] | 508 | runtime-src/Makefile"
|
---|
[21377] | 509 | fi
|
---|
[3062] | 510 |
|
---|
[16561] | 511 | AC_OUTPUT(Makefile $srclist $moduleDirs)
|
---|
[684] | 512 |
|
---|
| 513 |
|
---|