Changeset 18214 for gsdl/trunk/build-src/configure.in
- Timestamp:
- 2008-12-16T15:52:32+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/build-src/configure.in
r16594 r18214 59 59 AC_SUBST(USE_YAZ) 60 60 dnl fi 61 62 dnl63 dnl look for libgdbm if not in standard location64 dnl65 AC_ARG_WITH(gdbm, [ --with-gdbm=dir Use local gdbm library and headers], gdbmdir=$withval)66 61 67 62 dnl … … 249 244 dnl 250 245 AC_LANG_CPLUSPLUS 251 252 dnl253 dnl Check that the GDBM library is available254 dnl255 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" ; then259 # look in given directory for header file260 if test -r $gdbmdir/include/gdbm.h ; then261 GDBM_INCLUDE="-I$gdbmdir/include" ;262 elif test -r $gdbmdir/gdbm.h ; then263 GDBM_INCLUDE="-I$gdbmdir" ;264 fi265 266 # look in given directory for library267 if test -r $gdbmdir/libgdbm.a ; then268 GDBM_LIBPATH="-L$gdbmdir" ;269 elif test -r $gdbmdir/lib/libgdbm.a ; then270 GDBM_LIBPATH="-L$gdbmdir/lib" ;271 elif test -r $gdbmdir/.libs/libgdbm.a ; then272 GDBM_LIBPATH="-L$gdbmdir/.libs" ;273 fi274 275 if test ! -z "$GDBM_LIBPATH" -a ! -z "$GDBM_INCLUDE" ; then276 AC_MSG_RESULT($gdbmdir) ;277 else278 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 fi281 fi282 283 # look in default path and in /usr/local284 if test -z "$GDBM_INCLUDE" ; then285 # try in system directory286 AC_TRY_COMPILE(287 [#include <gdbm.h>288 ],289 [],290 success=yes,291 success=no292 )293 294 if test $success = "no"; then295 # last chance - look in /usr/local (eg FreeBSD)296 GDBM_LIBPATH=-L/usr/local/lib297 GDBM_INCLUDE=-I/usr/local/include298 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=no309 )310 CXXFLAGS=$ac_save_CXXFLAGS311 LIBS=$ac_save_LIBS312 fi313 314 AC_MSG_RESULT($success)315 if test $success = "no"; then316 AC_MSG_ERROR(GDBM Library not available - cannot install)317 fi318 fi319 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)324 246 325 247 dnl
Note:
See TracChangeset
for help on using the changeset viewer.