Ignore:
Timestamp:
2008-12-16T15:52:32+13:00 (15 years ago)
Author:
mdewsnip
Message:

Removed --with-gdbm option and no longer checks for GDBM library existing, because we know we have it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/configure.in

    r16571 r18214  
    6060AC_SUBST(USE_YAZ)
    6161dnl fi
    62 
    63 dnl
    64 dnl look for libgdbm if not in standard location
    65 dnl
    66 AC_ARG_WITH(gdbm, [  --with-gdbm=dir         Use local gdbm library and headers], gdbmdir=$withval)
    6762
    6863dnl
     
    250245dnl
    251246AC_LANG_CPLUSPLUS
    252 
    253 dnl
    254 dnl Check that the GDBM library is available
    255 dnl
    256 dnl check libgdbm manually, in case it's not in the standard location.
    257 
    258 AC_MSG_CHECKING(that the GDBM library is available)
    259 if test ! -z "$gdbmdir" ; then
    260   # look in given directory for header file
    261   if test -r $gdbmdir/include/gdbm.h ; then
    262     GDBM_INCLUDE="-I$gdbmdir/include" ;
    263   elif test -r $gdbmdir/gdbm.h ; then
    264     GDBM_INCLUDE="-I$gdbmdir" ;
    265   fi
    266 
    267   # look in given directory for library
    268   if test -r $gdbmdir/libgdbm.a ; then
    269     GDBM_LIBPATH="-L$gdbmdir" ;
    270   elif test -r $gdbmdir/lib/libgdbm.a ; then
    271     GDBM_LIBPATH="-L$gdbmdir/lib" ;
    272   elif test -r $gdbmdir/.libs/libgdbm.a ; then
    273     GDBM_LIBPATH="-L$gdbmdir/.libs" ;
    274   fi
    275 
    276   if test ! -z "$GDBM_LIBPATH" -a ! -z "$GDBM_INCLUDE" ; then
    277     AC_MSG_RESULT($gdbmdir) ;
    278   else
    279     AC_MSG_RESULT(can't find gdbm.h and libgdbm.a in $gdbmdir);
    280     AC_MSG_CHECKING(   looking for GDBM library in default locations)
    281   fi
    282 fi
    283 
    284 # look in default path and in /usr/local
    285 if test -z "$GDBM_INCLUDE" ; then
    286   # try in system directory
    287   AC_TRY_COMPILE(
    288   [#include <gdbm.h>
    289 ],
    290   [],
    291   success=yes,
    292   success=no
    293   )
    294 
    295   if test $success = "no"; then
    296 # last chance - look in /usr/local (eg FreeBSD)
    297     GDBM_LIBPATH=-L/usr/local/lib
    298     GDBM_INCLUDE=-I/usr/local/include
    299     ac_save_CXXFLAGS="$CXXFLAGS"
    300     ac_save_LIBS="$LIBS"
    301       CXXFLAGS="$CXXFLAGS -I/usr/local/include"
    302       LIBS="$LIBS -L/usr/local/lib -lgdbm"
    303       AC_TRY_LINK(
    304     [#include <gdbm.h>
    305 #include <stdio.h>
    306     ],
    307     [printf("%s",gdbm_version);],
    308     success=/usr/local,
    309     success=no
    310       )
    311       CXXFLAGS=$ac_save_CXXFLAGS
    312       LIBS=$ac_save_LIBS
    313   fi
    314 
    315   AC_MSG_RESULT($success)
    316   if test $success = "no"; then
    317   AC_MSG_ERROR(GDBM Library not available - cannot install)
    318   fi
    319 fi
    320 dnl I don't think anything actually checks this define, but...
    321 AC_DEFINE(HAVE_LIBGDBM , 1)
    322 
    323 AC_SUBST(GDBM_LIBPATH)
    324 AC_SUBST(GDBM_INCLUDE)
    325247
    326248dnl
Note: See TracChangeset for help on using the changeset viewer.