]> arthur.barton.de Git - netatalk.git/blobdiff - macros/db3-check.m4
Writing metadata xattr on directories with sticky bit set, FR#94
[netatalk.git] / macros / db3-check.m4
index 081d27be75f28222122d1fb283ef21b24cdd4f44..4135e5ce2801915853e598ef0f8596726b4bcc42 100644 (file)
@@ -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,11 +82,12 @@ 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"
-    search_subdirs="/ /db5 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
+    search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
 
     bdbfound=no
     savedcflags="$CFLAGS"
@@ -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
 ])