Changeset 18214 for gsdl/trunk/common-src/configure.in
- Timestamp:
- 2008-12-16T15:52:32+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/configure.in
r16595 r18214 61 61 AC_SUBST(USE_YAZ) 62 62 dnl fi 63 64 dnl65 dnl look for libgdbm if not in standard location66 dnl67 AC_ARG_WITH(gdbm, [ --with-gdbm=dir Use local gdbm library and headers], gdbmdir=$withval)68 63 69 64 dnl … … 251 246 dnl 252 247 AC_LANG_CPLUSPLUS 253 254 dnl255 dnl Check that the GDBM library is available256 dnl257 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" ; then261 # look in given directory for header file262 if test -r $gdbmdir/include/gdbm.h ; then263 GDBM_INCLUDE="-I$gdbmdir/include" ;264 elif test -r $gdbmdir/gdbm.h ; then265 GDBM_INCLUDE="-I$gdbmdir" ;266 fi267 268 # look in given directory for library269 if test -r $gdbmdir/libgdbm.a ; then270 GDBM_LIBPATH="-L$gdbmdir" ;271 elif test -r $gdbmdir/lib/libgdbm.a ; then272 GDBM_LIBPATH="-L$gdbmdir/lib" ;273 elif test -r $gdbmdir/.libs/libgdbm.a ; then274 GDBM_LIBPATH="-L$gdbmdir/.libs" ;275 fi276 277 if test ! -z "$GDBM_LIBPATH" -a ! -z "$GDBM_INCLUDE" ; then278 AC_MSG_RESULT($gdbmdir) ;279 else280 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 fi283 fi284 285 # look in default path and in /usr/local286 if test -z "$GDBM_INCLUDE" ; then287 # try in system directory288 AC_TRY_COMPILE(289 [#include <gdbm.h>290 ],291 [],292 success=yes,293 success=no294 )295 296 if test $success = "no"; then297 # last chance - look in /usr/local (eg FreeBSD)298 GDBM_LIBPATH=-L/usr/local/lib299 GDBM_INCLUDE=-I/usr/local/include300 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=no311 )312 CXXFLAGS=$ac_save_CXXFLAGS313 LIBS=$ac_save_LIBS314 fi315 316 AC_MSG_RESULT($success)317 if test $success = "no"; then318 AC_MSG_ERROR(GDBM Library not available - cannot install)319 fi320 fi321 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)326 248 327 249 dnl
Note:
See TracChangeset
for help on using the changeset viewer.