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/build-src/configure.in

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