From 013ed96d50afbe2c8211b4043e9db587eb38b612 Mon Sep 17 00:00:00 2001 From: morgana Date: Tue, 2 Dec 2008 18:22:01 +0000 Subject: [PATCH] Link DBD using -R on systems that need -R. Closes bug #1240793. --- configure.in | 28 ++++++++++++++-------------- macros/db3-check.m4 | 8 +++++++- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/configure.in b/configure.in index 21f11863..b822b507 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.207 2008-11-30 17:36:08 didg Exp $ +dnl $Id: configure.in,v 1.208 2008-12-02 18:22:01 morgana Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -380,19 +380,6 @@ dnl Check for CNID database backends bdb_required=no AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no]) -dnl Check for Berkeley DB library -if test "x$bdb_required" = "xyes"; then - AC_PATH_BDB(, [ - AC_MSG_RESULT([]) - AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.]) - AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.]) - AC_MSG_RESULT([If you have installed BDB in a non standard location use the]) - AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure]) - AC_MSG_RESULT([your linker is configured to check for libraries there.]) - AC_MSG_ERROR([Berkeley DB library required but not found!]) - ]) -fi - dnl Check for quota support AC_CHECK_QUOTA @@ -930,6 +917,19 @@ AM_PATH_LIBGCRYPT([1:1.2.3],[neta_cv_compile_dhx2=yes dnl -- look for openssl, if found enables DHX UAM and Randnum UAM AC_PATH_SSL +dnl Check for Berkeley DB library +if test "x$bdb_required" = "xyes"; then + AC_PATH_BDB(, [ + AC_MSG_RESULT([]) + AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.]) + AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.]) + AC_MSG_RESULT([If you have installed BDB in a non standard location use the]) + AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure]) + AC_MSG_RESULT([your linker is configured to check for libraries there.]) + AC_MSG_ERROR([Berkeley DB library required but not found!]) + ]) +fi + dnl -- check for crypt AC_CRYPT diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 index 453ed790..6c27193c 100644 --- a/macros/db3-check.m4 +++ b/macros/db3-check.m4 @@ -1,4 +1,4 @@ -dnl $Id: db3-check.m4,v 1.14 2006-09-09 03:52:41 didg Exp $ +dnl $Id: db3-check.m4,v 1.15 2008-12-02 18:22:01 morgana Exp $ dnl Autoconf macros to check for the Berkeley DB library @@ -207,11 +207,17 @@ dnl bdbbindir="`echo $bdbdir | sed 's/include\/db4\.*.*/bin/'`" CPPFLAGS="-I${bdbdir}${subdir} $CFLAGS" CFLAGS="" LDFLAGS="-L$bdblibdir $LDFLAGS" + if test "x$need_dash_r" = "xyes"; then + LDFLAGS="$LDFLAGS -R${bdblibdir}" + fi NETATALK_BERKELEY_LINK if test x"${atalk_cv_lib_db}" != x"no"; then NETATALK_BDB_CHECK_VERSION if test x"${atalk_cv_bdb_version}" != x"no"; then BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}" + if test "x$need_dash_r" = "xyes"; then + BDB_LIBS="$BDB_LIBS -R${bdblibdir}" + fi BDB_CFLAGS="-I${bdbdir}${subdir}" BDB_BIN=$bdbbindir BDB_PATH="`echo $bdbdir | sed 's,include\/db4$,,'`" -- 2.39.2