Changeset 18214 for gsdl/trunk/runtime-src/configure.in
- Timestamp:
- 2008-12-16T15:52:32+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/configure.in
r16571 r18214 60 60 AC_SUBST(USE_YAZ) 61 61 dnl fi 62 63 dnl64 dnl look for libgdbm if not in standard location65 dnl66 AC_ARG_WITH(gdbm, [ --with-gdbm=dir Use local gdbm library and headers], gdbmdir=$withval)67 62 68 63 dnl … … 250 245 dnl 251 246 AC_LANG_CPLUSPLUS 252 253 dnl254 dnl Check that the GDBM library is available255 dnl256 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" ; then260 # look in given directory for header file261 if test -r $gdbmdir/include/gdbm.h ; then262 GDBM_INCLUDE="-I$gdbmdir/include" ;263 elif test -r $gdbmdir/gdbm.h ; then264 GDBM_INCLUDE="-I$gdbmdir" ;265 fi266 267 # look in given directory for library268 if test -r $gdbmdir/libgdbm.a ; then269 GDBM_LIBPATH="-L$gdbmdir" ;270 elif test -r $gdbmdir/lib/libgdbm.a ; then271 GDBM_LIBPATH="-L$gdbmdir/lib" ;272 elif test -r $gdbmdir/.libs/libgdbm.a ; then273 GDBM_LIBPATH="-L$gdbmdir/.libs" ;274 fi275 276 if test ! -z "$GDBM_LIBPATH" -a ! -z "$GDBM_INCLUDE" ; then277 AC_MSG_RESULT($gdbmdir) ;278 else279 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 fi282 fi283 284 # look in default path and in /usr/local285 if test -z "$GDBM_INCLUDE" ; then286 # try in system directory287 AC_TRY_COMPILE(288 [#include <gdbm.h>289 ],290 [],291 success=yes,292 success=no293 )294 295 if test $success = "no"; then296 # last chance - look in /usr/local (eg FreeBSD)297 GDBM_LIBPATH=-L/usr/local/lib298 GDBM_INCLUDE=-I/usr/local/include299 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=no310 )311 CXXFLAGS=$ac_save_CXXFLAGS312 LIBS=$ac_save_LIBS313 fi314 315 AC_MSG_RESULT($success)316 if test $success = "no"; then317 AC_MSG_ERROR(GDBM Library not available - cannot install)318 fi319 fi320 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)325 247 326 248 dnl
Note:
See TracChangeset
for help on using the changeset viewer.