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