--- build-tree/apache_1.3.26/src/helpers/find-dbm-lib.orig	Tue Jan 22 00:39:15 2002
+++ build-tree/apache_1.3.26/src/helpers/find-dbm-lib	Mon Jan 28 00:47:57 2002
@@ -13,16 +13,16 @@
 	    *-linux*)
 		# many systems don't have -ldbm
 		DBM_LIB=""
-		if ./helpers/TestCompile lib ndbm dbm_open; then
+		if ./helpers/TestCompile lib db1 dbm_open; then
+		    # For Red Hat 7, if not handled by the ndbm case above
+		    DBM_LIB="-ldb1"
+		    CFLAGS="$CFLAGS -I/usr/include/db1"
+		elif ./helpers/TestCompile lib ndbm dbm_open; then
 		    DBM_LIB="-lndbm"
 		    if ./helpers/TestCompile lib db1 dbm_open; then
 			# Red Hat needs this; ndbm.h lives in db1
 			CFLAGS="$CFLAGS -I/usr/include/db1"
 		    fi
-		elif ./helpers/TestCompile lib db1 dbm_open; then
-		    # For Red Hat 7, if not handled by the ndbm case above
-		    DBM_LIB="-ldb1"
-		    CFLAGS="$CFLAGS -I/usr/include/db1"
                 elif ./helpers/TestCompile lib gdbm dbm_open; then
                     DBM_LIB="-lgdbm"
                     CFLAGS="$CFLAGS -I/usr/include/gdbm"
