Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 53478 invoked by uid 500); 21 Aug 2001 00:44:59 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 53467 invoked by uid 500); 21 Aug 2001 00:44:59 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 21 Aug 2001 00:39:56 -0000 Message-ID: <20010821003956.98054.qmail@icarus.apache.org> From: fielding@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/aaa config.m4 mod_auth_dbm.c X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Status: O X-Status: X-Keywords: X-UID: 403 fielding 01/08/20 17:39:56 Modified: modules/aaa config.m4 mod_auth_dbm.c Log: Due to some lunacy in ndbm.h on some platforms, we need to find the right include directory for db.h if we include ndbm.h. Submitted by: Justin Erenkrantz Reviewed by: Roy Fielding Revision Changes Path 1.48 +14 -0 httpd-2.0/modules/aaa/config.m4 Index: config.m4 =================================================================== RCS file: /home/cvs/httpd-2.0/modules/aaa/config.m4,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- config.m4 2001/08/20 23:32:34 1.47 +++ config.m4 2001/08/21 00:39:56 1.48 @@ -9,6 +9,20 @@ APACHE_MODULE(auth_anon, anonymous user access, , , most) APACHE_MODULE(auth_dbm, DBM-based access databases, , , most, [ AC_SEARCH_LIBS(dbm_open,[c db1],,enable_auth_dbm=no) + dnl Glibc 2.2's ndbm.h includes in ndbm.h. So, we need to find + dnl where ndbm.h lives. (2.2.4 looks like it includes .) + AC_TRY_COMPILE([#include "ndbm.h"], [dbm_open("/dev/null", 0, 0)], + _good_db_path="yes", _good_db_path="no") + if test "$_good_db_path" = "no"; then + _old_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I/usr/include/db1" + AC_TRY_COMPILE([#include "ndbm.h"], [dbm_open("/dev/null", 0, 0)], + _good_db_path="yes", _good_db_path="no") + if test "$_good_db_path" = "no"; then + CPPFLAGS=$_old_cppflags + enable_auth_dbm=no + fi + fi ]) APACHE_MODULE(auth_db, DB-based access databases, , , , [ 1.37 +0 -3 httpd-2.0/modules/aaa/mod_auth_dbm.c Index: mod_auth_dbm.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_dbm.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- mod_auth_dbm.c 2001/08/19 05:48:18 1.36 +++ mod_auth_dbm.c 2001/08/21 00:39:56 1.37 @@ -82,9 +82,6 @@ #define dbm_open apr_dbm_open #define dbm_fetch apr_dbm_fetch #define dbm_close apr_dbm_close -#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \ - && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 -#include #else #include #endif