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