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

    r16619 r18214  
    5858AC_SUBST(USE_YAZ)
    5959dnl fi
    60 
    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)
    6560
    6661dnl
     
    248243dnl
    249244AC_LANG_CPLUSPLUS
    250 
    251 dnl
    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)
    323245
    324246dnl
Note: See TracChangeset for help on using the changeset viewer.