[16565] | 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 | PACKAGE=gsdl
|
---|
[23356] | 9 | VERSION=2.x-svn
|
---|
[16565] | 10 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
---|
| 11 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
---|
| 12 | AC_SUBST(PACKAGE)
|
---|
| 13 | AC_SUBST(VERSION)
|
---|
| 14 |
|
---|
| 15 | dnl
|
---|
| 16 | dnl Set use of fast cgi
|
---|
| 17 | dnl
|
---|
| 18 | USE_FASTCGI=0
|
---|
| 19 | if test USE_FASTCGI = 1; then
|
---|
| 20 | AC_DEFINE(USE_FASTCGI)
|
---|
| 21 | AC_SUBST(USE_FASTCGI)
|
---|
| 22 | fi
|
---|
| 23 |
|
---|
| 24 | dnl
|
---|
| 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
|
---|
| 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
|
---|
[16565] | 43 | AC_SUBST(USE_CORBA)
|
---|
| 44 |
|
---|
[21440] | 45 | AC_ARG_WITH(micodir, [ --with-micodir Use installed MICO directory], MICO_DIR=$withval, MICO_DIR="default")
|
---|
[16565] | 46 | AC_DEFINE_UNQUOTED(MICO_DIR, "$MICO_DIR")
|
---|
| 47 | AC_SUBST(MICO_DIR)
|
---|
| 48 |
|
---|
| 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
|
---|
[16565] | 59 | AC_SUBST(USE_Z3950)
|
---|
| 60 |
|
---|
| 61 | dnl
|
---|
| 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
|
---|
[16565] | 71 | AC_SUBST(USE_YAZ)
|
---|
| 72 |
|
---|
[22058] | 73 | dnl
|
---|
[23356] | 74 | dnl Disable all Java compilation
|
---|
| 75 | dnl
|
---|
| 76 | AC_ARG_ENABLE(java, [ --disable-java Disable Java compilation], ENABLE_JAVA=$enableval, ENABLE_JAVA=yes)
|
---|
| 77 | if test $ENABLE_JAVA = "yes" -o $ENABLE_JAVA = "1" ; then
|
---|
| 78 | ENABLE_JAVA=1
|
---|
| 79 | if test "x$JAVA_HOME" != "x" ; then
|
---|
| 80 | echo "Detected JAVA_HOME is set, however this will not be used during compilation"
|
---|
| 81 | echo "To control the version of 'javac' and 'java' set environment variables JAVAC"
|
---|
| 82 | echo "and JAVA respectively"
|
---|
| 83 | export JAVA_HOME=
|
---|
| 84 | fi
|
---|
| 85 | else
|
---|
| 86 | ENABLE_JAVA=0
|
---|
| 87 | fi
|
---|
| 88 | AC_SUBST(ENABLE_JAVA)
|
---|
| 89 |
|
---|
| 90 | dnl
|
---|
[23800] | 91 | dnl Set use of wvware (enabled by default)
|
---|
| 92 | dnl
|
---|
| 93 | AC_ARG_ENABLE(wvware, [ --disable-wvware Disable wvWare compilation], USE_WVWARE=$enableval, USE_WVWARE=yes)
|
---|
| 94 | if test $USE_WVWARE = "yes" -o $USE_WVWARE = "1" ; then
|
---|
| 95 | USE_WVWARE=1
|
---|
| 96 | AC_DEFINE(USE_WVWARE,[])
|
---|
| 97 | else
|
---|
| 98 | USE_WVWARE=0
|
---|
| 99 | fi
|
---|
| 100 | AC_SUBST(USE_WVWARE)
|
---|
| 101 |
|
---|
| 102 | dnl
|
---|
[22058] | 103 | dnl Set use of JDBM (enabled by default)
|
---|
| 104 | dnl
|
---|
[23356] | 105 | AC_ARG_ENABLE(jdbm, [ --disable-jdbm Disable JDBM compilation], USE_JDBM=$enableval, USE_JDBM=yes)
|
---|
| 106 | if test $ENABLE_JAVA = "1" -a \( $USE_JDBM = "yes" -o $USE_JDBM = "1" \) ; then
|
---|
[22058] | 107 | USE_JDBM=1
|
---|
| 108 | AC_DEFINE(USE_JDBM,[])
|
---|
| 109 | else
|
---|
| 110 | USE_JDBM=0
|
---|
| 111 | fi
|
---|
| 112 | AC_SUBST(USE_JDBM)
|
---|
| 113 |
|
---|
| 114 | dnl
|
---|
| 115 | dnl Set use of GDBM (enabled by default)
|
---|
| 116 | dnl
|
---|
[23356] | 117 | AC_ARG_ENABLE(gdbm, [ --disable-gdbm Disable GDBM compilation], USE_GDBM=$enableval, USE_GDBM=yes)
|
---|
[22058] | 118 | if test $USE_GDBM = "yes" -o $USE_GDBM = "1" ; then
|
---|
| 119 | USE_GDBM=1
|
---|
| 120 | AC_DEFINE(USE_GDBM,[])
|
---|
| 121 | else
|
---|
| 122 | USE_GDBM=0
|
---|
| 123 | fi
|
---|
| 124 | AC_SUBST(USE_GDBM)
|
---|
| 125 |
|
---|
[16565] | 126 | dnl
|
---|
| 127 | dnl disable compilation of accent folding stuff for mgpp (and one day mg)
|
---|
| 128 | dnl
|
---|
[21446] | 129 | AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
|
---|
| 130 | if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
|
---|
| 131 | ENABLE_ACCENTFOLD=1
|
---|
| 132 | AC_DEFINE(ENABLE_ACCENTFOLD,[])
|
---|
| 133 | else
|
---|
| 134 | ENABLE_ACCENTFOLD=0
|
---|
| 135 | fi
|
---|
[16565] | 136 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
| 137 |
|
---|
| 138 | dnl
|
---|
| 139 | dnl Set use of SQLite (enabled by default)
|
---|
| 140 | dnl
|
---|
[21446] | 141 | AC_ARG_ENABLE(sqlite, [ --disable-sqlite Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
|
---|
| 142 | if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
|
---|
| 143 | USE_SQLITE=1
|
---|
| 144 | AC_DEFINE(USE_SQLITE,[])
|
---|
| 145 | else
|
---|
| 146 | USE_SQLITE=0
|
---|
| 147 | fi
|
---|
[16565] | 148 | AC_SUBST(USE_SQLITE)
|
---|
| 149 |
|
---|
[28308] | 150 | dnl
|
---|
| 151 | dnl Set compilation and/or sourcing of gnome-lib extension (disabled by default)
|
---|
| 152 | dnl
|
---|
| 153 | AC_ARG_ENABLE(gnome-lib-ext, [ --enable-gnome-lib-ext Enable the gnome-lib extension], ENABLE_GNOMELIB_EXT=1, ENABLE_GNOMELIB_EXT=0)
|
---|
| 154 |
|
---|
| 155 | if test -z "$GSDLHOME"; then
|
---|
| 156 | gshome=..
|
---|
| 157 | else
|
---|
| 158 | gshome=$GSDLHOME
|
---|
| 159 | fi
|
---|
| 160 | if test -d $gshome/ext/gnome-lib ; then
|
---|
| 161 | AC_DEFINE(ENABLE_GNOMELIB_EXT, $ENABLE_GNOMELIB_EXT)
|
---|
[28509] | 162 | elif test -f $gshome/ext/gnome-lib-minimal/devel.bash ; then
|
---|
[28308] | 163 | AC_DEFINE(ENABLE_GNOMELIB_EXT, $ENABLE_GNOMELIB_EXT)
|
---|
| 164 | else
|
---|
[28509] | 165 | echo "**** WARNING: No gnome-lib or gnome-lib-minimal(/devel.bash) in gs2build/ext folder. Disabling gnome-lib-ext"
|
---|
[28308] | 166 | AC_DEFINE(ENABLE_GNOMELIB_EXT, 0)
|
---|
| 167 | fi
|
---|
| 168 | AC_SUBST(ENABLE_GNOMELIB_EXT)
|
---|
| 169 |
|
---|
[16565] | 170 | dnl Checks for programs.
|
---|
| 171 | LDFLAGS=$LDFLAGS
|
---|
| 172 | AC_SUBST(LDFLAGS)
|
---|
| 173 | dnl only set CFLAGS if not already set in environment
|
---|
| 174 | if test -z "$CFLAGS"; then
|
---|
| 175 | CFLAGS=-O2
|
---|
| 176 | fi
|
---|
| 177 | AC_SUBST(CFLAGS)
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | AC_PROG_CC
|
---|
| 181 | AC_PROG_CXX
|
---|
[23356] | 182 | if test $ENABLE_JAVA = "1" ; then
|
---|
| 183 | AC_PROG_JAVAC
|
---|
| 184 | AC_PROG_JAVA
|
---|
| 185 | fi
|
---|
[16565] | 186 | AC_PROG_AWK
|
---|
| 187 | AC_PROG_YACC
|
---|
| 188 | dnl get $target_cpu, $target_vendor, and $target_os
|
---|
| 189 | dnl (as well as host_*)
|
---|
| 190 | AC_CANONICAL_SYSTEM
|
---|
| 191 | dnl do we actually want this? It adds a prefix based on host, system etc
|
---|
| 192 | dnl AC_ARG_PROGRAM
|
---|
| 193 | AC_PROG_INSTALL
|
---|
| 194 | AC_PROG_LN_S
|
---|
| 195 | AC_PROG_MAKE_SET
|
---|
| 196 | AC_PROG_RANLIB
|
---|
[26809] | 197 | AC_CHECK_TOOL([STRIP],[strip])
|
---|
[16565] | 198 |
|
---|
| 199 | AC_MSG_CHECKING(to see if architecture is 64-bit)
|
---|
| 200 | arch_64bit=no
|
---|
| 201 | case "$host_cpu" in
|
---|
| 202 | x86_64) arch_64bit=yes ;;
|
---|
| 203 | esac
|
---|
| 204 |
|
---|
| 205 | if test "$arch_64bit" = yes; then
|
---|
| 206 | AC_MSG_RESULT(yes)
|
---|
[25149] | 207 | if test -z "$ARCH_DEP_FLAGS" ; then
|
---|
| 208 | ARCH_DEP_FLAGS="-fPIC"
|
---|
[16565] | 209 | fi
|
---|
| 210 | else
|
---|
| 211 | AC_MSG_RESULT(no)
|
---|
[25149] | 212 | if test -z "$ARCH_DEP_FLAGS" ; then
|
---|
| 213 | ARCH_DEP_FLAGS=
|
---|
[16565] | 214 | fi
|
---|
| 215 | fi
|
---|
[21432] | 216 |
|
---|
[25149] | 217 | export ARCH_DEP_FLAGS
|
---|
| 218 | AC_SUBST(ARCH_DEP_FLAGS)
|
---|
[21432] | 219 |
|
---|
[16565] | 220 |
|
---|
| 221 | #moved CORBA MICO directory test to get version of MICO
|
---|
| 222 | if test $USE_CORBA = 1; then
|
---|
| 223 |
|
---|
| 224 | if test $MICO_DIR = "default"; then
|
---|
| 225 | #do something
|
---|
| 226 | MICO_INC="-I packages/mico/mico/include"
|
---|
| 227 | else
|
---|
| 228 | #build the micotest program
|
---|
| 229 | MICO_INC= ""
|
---|
| 230 | if test $MICO_DIR != yes; then
|
---|
| 231 | MICO_INC="-I $MICO_DIR"
|
---|
| 232 | fi
|
---|
| 233 | fi
|
---|
| 234 |
|
---|
| 235 | #get MICO_VER value
|
---|
| 236 | sh -c "$CC -c micotest.cpp -o micotest.o $MICO_INC 2>&1" > /dev/null
|
---|
| 237 | sh -c "$CC -o micotest micotest.o -lstdc++ 2>&1" > /dev/null
|
---|
| 238 | MICO_VER=`./micotest` || MICO_VER=2.3.5
|
---|
| 239 | sh -c "rm micotest"
|
---|
| 240 | sh -c "rm micotest.o"
|
---|
| 241 |
|
---|
| 242 | #do test of MICO_VER
|
---|
| 243 | if test MICO_VER != 0; then
|
---|
| 244 | AC_DEFINE(MICO_VER)
|
---|
| 245 | AC_SUBST(MICO_VER)
|
---|
| 246 | fi
|
---|
| 247 | #end USE_CORBA test
|
---|
| 248 | fi
|
---|
| 249 |
|
---|
| 250 | dnl Checks for typedefs, structures, and compiler characteristics.
|
---|
| 251 | AC_AIX
|
---|
| 252 | AC_ISC_POSIX
|
---|
| 253 | AC_MINIX
|
---|
| 254 | fp_C_PROTOTYPES
|
---|
| 255 | AC_C_CONST
|
---|
| 256 | AC_TYPE_OFF_T
|
---|
| 257 | AC_TYPE_SIZE_T
|
---|
| 258 | AC_HEADER_TIME
|
---|
| 259 | AC_STRUCT_TM
|
---|
| 260 |
|
---|
| 261 | dnl --- This should be in the stdc checking -----------------
|
---|
| 262 | if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
|
---|
| 263 | dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
|
---|
| 264 | dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
|
---|
| 265 | dnl XOPEN extensions (like popen).
|
---|
| 266 | dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
|
---|
| 267 | dnl needs. So drop back to -Xa
|
---|
| 268 | AC_TRY_COMPILE(
|
---|
| 269 | [#include <stdio.h>
|
---|
| 270 | ], [ FILE *rubbish = popen("yes", "r"); ],,
|
---|
| 271 | [CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
|
---|
| 272 | fi
|
---|
| 273 | dnl ----------------------
|
---|
| 274 |
|
---|
| 275 |
|
---|
| 276 | dnl Checks for libraries.
|
---|
| 277 | dnl check for -lg:
|
---|
| 278 | AC_HAVE_LIBRARY(g)
|
---|
| 279 | dnl check for -lm:
|
---|
| 280 | AC_HAVE_LIBRARY(m)
|
---|
| 281 | dnl check for -lcrypt:
|
---|
| 282 | AC_HAVE_LIBRARY(crypt)
|
---|
| 283 | if test $ENABLE_ACCENTFOLD = 1; then
|
---|
| 284 | AC_HAVE_LIBRARY(iconv)
|
---|
| 285 | fi
|
---|
| 286 |
|
---|
| 287 | dnl Checks for header files.
|
---|
| 288 | AC_HEADER_DIRENT
|
---|
| 289 | AC_HEADER_STDC
|
---|
| 290 | AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h sys/stat.h)
|
---|
| 291 | AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
|
---|
| 292 | AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
|
---|
| 293 | AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
|
---|
| 294 |
|
---|
| 295 | dnl Checks for library functions.
|
---|
| 296 | AC_FUNC_ALLOCA
|
---|
| 297 | AC_PROG_GCC_TRADITIONAL
|
---|
| 298 | AC_TYPE_SIGNAL
|
---|
| 299 | AC_FUNC_VPRINTF
|
---|
| 300 | AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
|
---|
| 301 | AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
|
---|
| 302 |
|
---|
| 303 | dnl see if gettext is in libc. (try the textdomain() function).
|
---|
| 304 | AC_CHECK_FUNC(textdomain, AC_DEFINE(ENABLE_NLS ,1) )
|
---|
| 305 |
|
---|
| 306 | # *** Custom checking (based on GNU tar configure.in) ***
|
---|
| 307 | # ---------------------------------------------------------------------------
|
---|
| 308 | AC_MSG_CHECKING(for HP-UX needing gmalloc)
|
---|
| 309 | if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
|
---|
| 310 | AC_MSG_RESULT(yes)
|
---|
| 311 | AC_LIBOBJ([gmalloc])
|
---|
| 312 | AC_DEFINE(HAVE_VALLOC)
|
---|
| 313 | else
|
---|
| 314 | AC_MSG_RESULT(no)
|
---|
| 315 | AC_CHECK_FUNCS(valloc)
|
---|
| 316 | fi
|
---|
| 317 |
|
---|
| 318 | # we cannot generate static libraries under Darwin
|
---|
| 319 | AC_MSG_CHECKING(for Apple MacOS X/Darwin)
|
---|
| 320 | if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
|
---|
| 321 | AC_MSG_RESULT(yes)
|
---|
| 322 | STATIC=""
|
---|
| 323 | else
|
---|
| 324 | AC_MSG_RESULT(no)
|
---|
| 325 | STATIC="-static "
|
---|
| 326 | fi
|
---|
| 327 | AC_SUBST(STATIC)
|
---|
| 328 |
|
---|
| 329 | fp_WITH_DMALLOC
|
---|
| 330 | fp_WITH_REGEX
|
---|
| 331 |
|
---|
| 332 | # ---------------------------------------------------------------------------
|
---|
| 333 | if test "$ac_cv_func_alloca" = 'no'; then
|
---|
| 334 | dnl support functions for alloca.c
|
---|
| 335 | AC_LIBOBJ([xmalloc])
|
---|
| 336 | AC_LIBOBJ([error])
|
---|
| 337 | fi
|
---|
| 338 |
|
---|
| 339 |
|
---|
| 340 | # ---------------------------------------------------------------------------
|
---|
| 341 |
|
---|
| 342 | dnl
|
---|
| 343 | dnl Switch into C++
|
---|
| 344 | dnl
|
---|
| 345 | AC_LANG_CPLUSPLUS
|
---|
| 346 |
|
---|
| 347 | dnl
|
---|
| 348 | dnl Now check that Perl is actually around, and can be found
|
---|
| 349 | dnl
|
---|
| 350 | AC_MSG_CHECKING(that Perl 5 is available)
|
---|
| 351 | success="no"
|
---|
| 352 | pl_path="$PATH"
|
---|
| 353 | IFS="${IFS= }"; pl_save_ifs="$IFS"; IFS=":"
|
---|
| 354 | for pl_dir in $pl_path; do
|
---|
| 355 | test -z "$pl_dir" && pl_dir=.
|
---|
| 356 | if test -x $pl_dir/perl; then
|
---|
| 357 | success="yes"
|
---|
| 358 | break
|
---|
| 359 | fi
|
---|
| 360 | done
|
---|
| 361 | IFS="$pl_save_ifs"
|
---|
| 362 |
|
---|
| 363 | dnl
|
---|
| 364 | dnl Perl actually can be run; now we see if it is version 5 by
|
---|
| 365 | dnl running a sample script (which returns a "clean" version number
|
---|
| 366 | dnl and then tests the result using expr. If perl errors in some
|
---|
| 367 | dnl way (eg. broken Perl executable, missing script), we set a failure
|
---|
| 368 | dnl value ("0") and then proceed as best we can
|
---|
| 369 | dnl
|
---|
| 370 | if test $success = "yes"; then
|
---|
| 371 | try=`perl configtest.pl` || try="0"
|
---|
| 372 | try=`expr $try \> 5.000`
|
---|
| 373 | if test $try = "1"; then
|
---|
| 374 | AC_MSG_RESULT("yes")
|
---|
| 375 | else
|
---|
| 376 | success="no"
|
---|
| 377 | fi
|
---|
| 378 | fi
|
---|
| 379 |
|
---|
| 380 | if test $success = "no"; then
|
---|
| 381 | AC_MSG_RESULT("no")
|
---|
| 382 | AC_MSG_ERROR("Perl 5 not available - cannot install")
|
---|
| 383 | fi
|
---|
| 384 |
|
---|
| 385 | dnl
|
---|
| 386 | dnl Check if the STL library has any known faults;
|
---|
| 387 | dnl In GCC 2.7.2.x series, some STL library headers are missing
|
---|
| 388 | dnl a file called "new" which is referred to by other headers
|
---|
| 389 | dnl (eg. vector/vector.h); if this applies, then all use of the
|
---|
| 390 | dnl STL will cause a compile fail, so we'd better let the user
|
---|
| 391 | dnl know now, before things really go wrong!
|
---|
| 392 | dnl
|
---|
| 393 | success=no
|
---|
| 394 | AC_MSG_CHECKING("whether STL library has known faults")
|
---|
| 395 |
|
---|
| 396 | dnl - first shot, try simple good old vector on its own
|
---|
| 397 | AC_TRY_COMPILE(
|
---|
| 398 | [#include <vector>
|
---|
| 399 | ],
|
---|
| 400 | [],
|
---|
| 401 | success=yes,
|
---|
| 402 | )
|
---|
| 403 |
|
---|
| 404 | dnl - try using the .h equivalent
|
---|
| 405 | if test $success = "no"; then
|
---|
| 406 | AC_TRY_COMPILE(
|
---|
| 407 | [#include <vector.h>
|
---|
| 408 | ],
|
---|
| 409 | [],
|
---|
| 410 | success="yes",
|
---|
| 411 | )
|
---|
| 412 | fi
|
---|
| 413 |
|
---|
| 414 | dnl - now try for the objectspace headers
|
---|
| 415 | if test $success = "no"; then
|
---|
| 416 | AC_TRY_COMPILE(
|
---|
| 417 | [#include <ospace\\std\\vector>
|
---|
| 418 | ],
|
---|
| 419 | [],
|
---|
| 420 | success="yes",
|
---|
| 421 | )
|
---|
| 422 | fi
|
---|
| 423 |
|
---|
| 424 | if test $success = yes; then
|
---|
| 425 | AC_MSG_RESULT("no")
|
---|
| 426 | else
|
---|
| 427 | AC_MSG_RESULT("yes")
|
---|
| 428 | AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler")
|
---|
| 429 | fi
|
---|
| 430 |
|
---|
| 431 | gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
---|
| 432 | # check for running bash under cygwin
|
---|
| 433 | if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ;
|
---|
| 434 | then
|
---|
| 435 | gsdlos=windows
|
---|
| 436 | fi
|
---|
[26663] | 437 | if test "x$crossOS" != "x" ; then
|
---|
| 438 | gsdlos=$crossOS
|
---|
| 439 | gsdlarch=""
|
---|
| 440 | fi
|
---|
| 441 |
|
---|
[16565] | 442 | AC_SUBST(gsdlos)
|
---|
| 443 |
|
---|
| 444 | # check for endianness
|
---|
| 445 | AC_C_BIGENDIAN
|
---|
| 446 | # ---------------------------------------------------------------------------
|
---|
| 447 | if test "$ac_cv_func_alloca" = 'no'; then
|
---|
| 448 | dnl support functions for alloca.c
|
---|
| 449 | AC_LIBOBJ([xmalloc.o])
|
---|
| 450 | AC_LIBOBJ([error])
|
---|
| 451 | fi
|
---|
| 452 |
|
---|
| 453 | # ---------------------------------------------------------------------------
|
---|
| 454 |
|
---|
| 455 | dnl
|
---|
| 456 | dnl Locate all children of the modules folder
|
---|
| 457 | dnl
|
---|
| 458 | moduleDirs=""
|
---|
| 459 | MODULEDIRS=""
|
---|
[16594] | 460 | if test -d modules ; then
|
---|
[16565] | 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 |
|
---|
[28308] | 475 | #----------------------------------------------------------------------------
|
---|
| 476 | # GS3 uses this to set up gnome-lib env, GS2 uses the configure in gs2build/toplevel GS2 installation
|
---|
| 477 | # For gnome-lib-minimal need to source its ./devel.bash before wvware can even be configured
|
---|
| 478 | # For a gnome-lib that's already compiled, don't need to its source ./devel.bash to configure wvware
|
---|
| 479 | # If a gnome-lib is not yet compiled, we compile it first with CASCADE-MAKE.sh
|
---|
[28509] | 480 | # Need to make sure that the gnome-lib-minimal is not the cut-down gnome-lib-minimal (which contains
|
---|
| 481 | # only the linux/lib subfolder) that's included with linux and mac binaries, because we can't compile
|
---|
| 482 | # wvware with the cut-down one, only run wvware with it. The test for the cut-down version is that
|
---|
| 483 | # it does not contain devel.bash.
|
---|
[16565] | 484 |
|
---|
[28308] | 485 | if test $ENABLE_GNOMELIB_EXT = 1; then
|
---|
| 486 |
|
---|
| 487 | if test -z "$GSDLHOME"; then
|
---|
| 488 | cd ..
|
---|
| 489 | gshome=`pwd`
|
---|
| 490 | cd build-src
|
---|
| 491 | else
|
---|
| 492 | gshome=$GSDLHOME
|
---|
| 493 | fi
|
---|
| 494 |
|
---|
[28509] | 495 | if test -f $gshome/ext/gnome-lib-minimal/devel.bash; then
|
---|
[28308] | 496 | echo "*** gnome-lib (minimal) detected. Sourcing the gnomelib env for configuring wvware..."
|
---|
| 497 | cd $gshome/ext/gnome-lib-minimal
|
---|
| 498 | source ./devel.bash
|
---|
| 499 | cd $gshome/build-src
|
---|
| 500 | elif test -d $gshome/ext/gnome-lib; then
|
---|
[28328] | 501 | if test -d $gshome/ext/gnome-lib/$gsdlos; then
|
---|
[28308] | 502 | echo "*** Sourcing the gnomelib env for configuring wvware..."
|
---|
| 503 | cd $gshome/ext/gnome-lib
|
---|
| 504 | source ./devel.bash
|
---|
| 505 | cd $gshome/build-src
|
---|
| 506 | fi
|
---|
| 507 | fi
|
---|
| 508 |
|
---|
| 509 | fi
|
---|
| 510 |
|
---|
[16565] | 511 | # ---------------------------------------------------------------------------
|
---|
| 512 | AC_CONFIG_SUBDIRS(packages)
|
---|
| 513 |
|
---|
| 514 | # the list of folders in the src folder
|
---|
| 515 | srclist="src/hashfile/Makefile \
|
---|
[23356] | 516 | src/phind/generate/Makefile \
|
---|
| 517 | src/java/org/nzdl/gsdl/Makefile"
|
---|
[16565] | 518 |
|
---|
| 519 | AC_OUTPUT(packages/Makefile Makefile $srclist $moduleDirs)
|
---|
| 520 |
|
---|
| 521 |
|
---|