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

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