apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <da...@jetnet.co.uk>
Subject [PATCH] improve berkeley detection on FreeBSD
Date Fri, 20 Feb 2004 00:15:59 GMT
This improves the detection of the BerkeleyDB on FreeBSD. It basically
correct what's looks like some copy/paste oversights (looking for db4 when
in a db4.2 block for instance) and adds the ability of the apu_hints.m4 to
pass in a platform_places to look for the directory. This is added to the
user_places prior to checking any user supplied dirs.

The patch also adds the APRUTIL_LIBS and _LDFLAGS to the link line for the
final lib as otherwise it craps out when we try and use the lib during the
httpd build :(

david

Index: Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/Makefile.in,v
retrieving revision 1.83
diff -u -r1.83 Makefile.in
--- Makefile.in 17 Feb 2004 08:13:40 -0000      1.83
+++ Makefile.in 20 Feb 2004 00:13:33 -0000
@@ -69,7 +69,7 @@
        chmod 755 $(DESTDIR)$(bindir)/apu-config

 $(TARGET_LIB): $(OBJECTS)
-       $(LINK) @lib_target@ $(ALL_LIBS)
+       $(LINK) @lib_target@ $(ALL_LIBS) $(APRUTIL_LDFLAGS) $(APRUTIL_LIBS)

 exports.c: $(HEADERS)
        $(AWK) -f @APR_SOURCE_DIR@/build/make_exports.awk $(HEADERS) > $@
Index: build/apu-hints.m4
===================================================================
RCS file: /home/cvs/apr-util/build/apu-hints.m4,v
retrieving revision 1.4
diff -u -r1.4 apu-hints.m4
--- build/apu-hints.m4  22 Dec 2003 23:02:33 -0000      1.4
+++ build/apu-hints.m4  19 Feb 2004 23:52:11 -0000
@@ -37,6 +37,9 @@
     *-sco3.2v5*)
        APR_SETIFNULL(apu_db_xtra_libs, [-lsocket])
        ;;
+    *-freebsd*)
+        APR_ADDTO(platform_places, "/usr/local")
+        ;;
     esac

 fi
Index: build/dbm.m4
===================================================================
RCS file: /home/cvs/apr-util/build/dbm.m4,v
retrieving revision 1.8
diff -u -r1.8 dbm.m4
--- build/dbm.m4        5 Jan 2004 12:21:46 -0000       1.8
+++ build/dbm.m4        19 Feb 2004 23:52:11 -0000
@@ -382,8 +382,8 @@
   fi
   APU_CHECK_BERKELEY_DB("4", "1", "-1",
     "$places",
-    "db4/db.h db.h",
-    "db-4.1 db4 db"
+    "db41/db.h db.h",
+    "db-4.1 db41 db"
   )
   if test "$apu_have_db" = "1"; then
     apu_db_version=4
@@ -403,8 +403,8 @@
   fi
   APU_CHECK_BERKELEY_DB("4", "2", "-1",
     "$places",
-    "db4/db.h db.h",
-    "db-4.2 db4 db"
+    "db42/db.h db.h",
+    "db-4.2 db42 db"
   )
   if test "$apu_have_db" = "1"; then
     apu_db_version=4
@@ -639,12 +639,12 @@
   ], [
     if test "$withval" = "yes"; then
       apu_want_db=1
-      user_places=""
+      user_places="$platform_places"
     elif test "$withval" = "no"; then
       apu_want_db=0
     else
       apu_want_db=1
-      user_places="$withval"
+      user_places="$platform_places $withval"
     fi

     if test "$apu_want_db" != "0"; then
@@ -654,7 +654,7 @@
       fi
     fi
   ],[
-    APU_CHECK_DB($requested, "")
+    APU_CHECK_DB($requested, $platform_places)
   ])

   if test -n "$apu_db_xtra_libs"; then


Mime
View raw message