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