From 56519b44ddd9339a085c7aecb0c7b132cea97e73 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 2 May 2006 03:12:45 +0000 Subject: [PATCH] * configure.in: check if libc already includes dbm functionality (as in FreeBSD 6), then don't bother to check specific libraries such as libdbm, gdbm, etc. --- ChangeLog | 6 ++++++ NEWS | 1 + configure.in | 11 +++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b4d696..3af0152 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-01 Erez Zadok + + * configure.in: check if libc already includes dbm functionality + (as in FreeBSD 6), then don't bother to check specific libraries + such as libdbm, gdbm, etc. + 2006-04-21 Erez Zadok * configure.in: detect G/DBM support via gdbm_compat library diff --git a/NEWS b/NEWS index fba2cfd..48b1db1 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,7 @@ better tune Amd's responsiveness under heavy scheduler loads. * don't turn off attribute cache for regular NFS mounts (improves performance) * detect G/DBM support via gdbm_compat library (Debian) + * detect NDBM support in libc (FreeBSD 6) *** Notes specific to am-utils version 6.2a1 diff --git a/configure.in b/configure.in index 66db7c7..e63be2e 100644 --- a/configure.in +++ b/configure.in @@ -55,7 +55,7 @@ AH_BOTTOM([ dnl dnl AC_CONFIG_AUX_DIR(m4) AC_PREREQ(2.52) -AC_REVISION($Revision: 1.125 $) +AC_REVISION($Revision: 1.126 $) AC_COPYRIGHT([Copyright (c) 1997-2006 Erez Zadok]) dnl find out system type AC_MSG_NOTICE(*** SYSTEM TYPES ***) @@ -659,6 +659,10 @@ dnl libgdbm for dbm_pagfno, so check for this. AC_CHECK_LIB(ndbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm", AC_CHECK_LIB(gdbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm -lgdbm"))) fi +dnl check if dbm_open is part of libc +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then + AC_CHECK_LIB(c, dbm_open, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c") +fi if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then AC_CHECK_LIB(db1, dbm_open, ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1") fi @@ -678,7 +682,10 @@ else fi if test "$ac_cv_header_new_dbm" != "" -a "$ac_cv_lib_new_dbm" != ""; then AC_DEFINE_UNQUOTED(NEW_DBM_H, "$ac_cv_header_new_dbm") - LIBS="-l$ac_cv_lib_new_dbm $LIBS" +dnl don't bother adding "-lc" when it's the default anyway + if test "$ac_cv_lib_new_dbm" != "c" ; then + LIBS="-l$ac_cv_lib_new_dbm $LIBS" + fi fi fi dnl ====================================================================== -- 2.34.1