Ignore:
Timestamp:
2010-01-12T14:01:03+13:00 (12 years ago)
Author:
davidb
Message:

If statement should use 'test' not '[...]' in autoconfigure file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gs2runtime/configure.in

    r16613 r21444  
    5959dnl fi
    6060
    61 dnl
    62 dnl look for libgdbm if not in standard location
    63 dnl
    64 AC_ARG_WITH(gdbm, [  --with-gdbm=dir         Use local gdbm library and headers], gdbmdir=$withval)
    65 
    66 dnl
    6761dnl disable compilation of accent folding stuff for mgpp (and one day mg)
    6862dnl
     
    250244
    251245dnl
    252 dnl Check that the GDBM library is available
    253 dnl
    254 dnl check libgdbm manually, in case it's not in the standard location.
    255 
    256 AC_MSG_CHECKING(that the GDBM library is available)
    257 if test ! -z "$gdbmdir" ; then
    258   # look in given directory for header file
    259   if test -r $gdbmdir/include/gdbm.h ; then
    260     GDBM_INCLUDE="-I$gdbmdir/include" ;
    261   elif test -r $gdbmdir/gdbm.h ; then
    262     GDBM_INCLUDE="-I$gdbmdir" ;
    263   fi
    264 
    265   # look in given directory for library
    266   if test -r $gdbmdir/libgdbm.a ; then
    267     GDBM_LIBPATH="-L$gdbmdir" ;
    268   elif test -r $gdbmdir/lib/libgdbm.a ; then
    269     GDBM_LIBPATH="-L$gdbmdir/lib" ;
    270   elif test -r $gdbmdir/.libs/libgdbm.a ; then
    271     GDBM_LIBPATH="-L$gdbmdir/.libs" ;
    272   fi
    273 
    274   if test ! -z "$GDBM_LIBPATH" -a ! -z "$GDBM_INCLUDE" ; then
    275     AC_MSG_RESULT($gdbmdir) ;
    276   else
    277     AC_MSG_RESULT(can't find gdbm.h and libgdbm.a in $gdbmdir);
    278     AC_MSG_CHECKING(   looking for GDBM library in default locations)
    279   fi
    280 fi
    281 
    282 # look in default path and in /usr/local
    283 if test -z "$GDBM_INCLUDE" ; then
    284   # try in system directory
    285   AC_TRY_COMPILE(
    286   [#include <gdbm.h>
    287 ],
    288   [],
    289   success=yes,
    290   success=no
    291   )
    292 
    293   if test $success = "no"; then
    294 # last chance - look in /usr/local (eg FreeBSD)
    295     GDBM_LIBPATH=-L/usr/local/lib
    296     GDBM_INCLUDE=-I/usr/local/include
    297     ac_save_CXXFLAGS="$CXXFLAGS"
    298     ac_save_LIBS="$LIBS"
    299       CXXFLAGS="$CXXFLAGS -I/usr/local/include"
    300       LIBS="$LIBS -L/usr/local/lib -lgdbm"
    301       AC_TRY_LINK(
    302     [#include <gdbm.h>
    303 #include <stdio.h>
    304     ],
    305     [printf("%s",gdbm_version);],
    306     success=/usr/local,
    307     success=no
    308       )
    309       CXXFLAGS=$ac_save_CXXFLAGS
    310       LIBS=$ac_save_LIBS
    311   fi
    312 
    313   AC_MSG_RESULT($success)
    314   if test $success = "no"; then
    315   AC_MSG_ERROR(GDBM Library not available - cannot install)
    316   fi
    317 fi
    318 dnl I don't think anything actually checks this define, but...
    319 AC_DEFINE(HAVE_LIBGDBM , 1)
    320 
    321 AC_SUBST(GDBM_LIBPATH)
    322 AC_SUBST(GDBM_INCLUDE)
    323 
    324 dnl
    325246dnl Check if the STL library has any known faults;
    326247dnl In GCC 2.7.2.x series, some STL library headers are missing
     
    392313moduleDirs=""
    393314MODULEDIRS=""
    394 if [ -d modules ] ; then
     315if test -d modules ; then
    395316  for x in `find modules -mindepth 1 -maxdepth 2`; do
    396317    if test -d "$x"; then
Note: See TracChangeset for help on using the changeset viewer.