X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=macros%2Fdb3-check.m4;h=4135e5ce2801915853e598ef0f8596726b4bcc42;hp=2cc59cbbb6200f40785c98d22d2c1df944dc1050;hb=3a84db87064922ad10ac10cc1d6833380e575995;hpb=06b7f576daa4a127964febf210869f4729235dc3 diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 index 2cc59cbb..4135e5ce 100644 --- a/macros/db3-check.m4 +++ b/macros/db3-check.m4 @@ -1,4 +1,3 @@ -dnl $Id: db3-check.m4,v 1.23 2010-04-12 14:28:48 franklahm Exp $ dnl Autoconf macros to check for the Berkeley DB library dnl -- check header for minimum version and return version in @@ -83,7 +82,8 @@ AC_DEFUN([NETATALK_BDB_TRY_LINK],[ ]) dnl -- This is called from configure -AC_DEFUN([AC_PATH_BDB],[ +AC_DEFUN([AC_NETATALK_PATH_BDB],[ +if test "x$bdb_required" = "xyes"; then trybdbdir="" dobdbsearch=yes bdb_search_dirs="/usr/local /usr" @@ -155,6 +155,9 @@ AC_DEFUN([AC_PATH_BDB],[ if test x"${atalk_cv_bdb_version}" = x"yes"; then BDB_CFLAGS="-I${bdbdir}/include${subdir}" BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}" + if test x"$need_dash_r" = x"yes"; then + BDB_LIBS="$BDB_LIBS -R${bdblibdir}" + fi BDB_BIN="$bdbbindir" BDB_PATH="$bdbdir" bdbfound=yes @@ -178,6 +181,9 @@ AC_DEFUN([AC_PATH_BDB],[ if test x"${atalk_cv_bdb_version}" = x"yes"; then BDB_CFLAGS="-I${bdbdir}/include${subdir}" BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}" + if test x"$need_dash_r" = x"yes"; then + BDB_LIBS="$BDB_LIBS -R${bdblibdir}" + fi BDB_BIN="$bdbbindir" BDB_PATH="$bdbdir" bdbfound=yes @@ -206,6 +212,7 @@ AC_DEFUN([AC_PATH_BDB],[ ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) + AC_MSG_ERROR([Berkeley DB library required but not found!]) fi CFLAGS_REMOVE_USR_INCLUDE(BDB_CFLAGS) @@ -214,6 +221,7 @@ AC_DEFUN([AC_PATH_BDB],[ AC_SUBST(BDB_LIBS) AC_SUBST(BDB_BIN) AC_SUBST(BDB_PATH) +fi ])