You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by David Reid <dr...@jetnet.co.uk> on 2001/12/28 18:01:02 UTC

apr-util db choice

FreeBSD.

bash-2.04$ pwd
/usr/home/dreid/httpd-2.0/srclib/apr-util
bash-2.04$ ./buildconf
Creating include/private/apu_config.h ...
Creating configure ...
Invoking xml/expat/buildconf.sh ...
Incorporating /usr/local/share/aclocal/libtool.m4 into aclocal.m4 ...
Copying libtool helper files ...
Putting files in AC_CONFIG_AUX_DIR, `conftools'.
Creating config.h.in ...
Creating configure ...
bash-2.04$ ./configure
loading cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for gdbm.h... no
checking for db4/db.h... no
test: 4: unexpected operator
test: 4: unexpected operator
checking for Berkeley DB... test: 0: unexpected operator
not found
configure: error: --with-dbm= is an unknown DBM type.
Use one of: sdbm, gdbm, db, db1, db185, db2, db3, db4

Any ideas what's wrong?

bash-2.04$ libtool --version
ltmain.sh (GNU libtool) 1.3.5 (1.385.2.206 2000/05/27 11:12:27)
bash-2.04$ autoconf --version
Autoconf version 2.13

david



[PATCH] Re: apr-util db choice

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Dec 28, 2001 at 05:01:02PM -0000, David Reid wrote:
> FreeBSD.
> bash-2.04$ ./configure
> loading cache ./config.cache
> checking how to run the C preprocessor... cc -E
> checking for gdbm.h... no
> checking for db4/db.h... no
> test: 4: unexpected operator
> test: 4: unexpected operator
> checking for Berkeley DB... test: 0: unexpected operator

Oh, grumble.  Your /bin/sh doesn't like the non-quoted test
checks.  Try this.  If it works, feel free to commit.  -- justin

Index: build/apu-conf.m4
===================================================================
RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
retrieving revision 1.21
diff -u -r1.21 apu-conf.m4
--- build/apu-conf.m4	2001/12/09 20:19:43	1.21
+++ build/apu-conf.m4	2001/12/28 18:22:25
@@ -98,7 +98,7 @@
   apu_db_lib=db2
   apu_db_version=2
   ])])
-if test $apu_db_version != 2; then
+if test "$apu_db_version" != "2"; then
 AC_CHECK_HEADER(db.h, [
   AC_CHECK_LIB(db, db_open, [
   apu_db_header=db.h
@@ -120,7 +120,7 @@
   apu_db_lib=db3
   apu_db_version=3
   ])])
-if test $apu_db_version != 3; then
+if test "$apu_db_version" != "3"; then
 AC_CHECK_HEADER(db.h, [
   AC_CHECK_LIB(db, db_create, [
   apu_db_header=db.h
@@ -146,7 +146,7 @@
   apu_db_lib=db4
   apu_db_version=4
   ])])
-if test $apu_db_version != 4; then
+if test "$apu_db_version" != 4; then
 AC_CHECK_HEADER(db.h, [
   AC_CHECK_LIB(db, db_create, [
     AC_CHECK_LIB(db, lock_get, [], [
@@ -188,13 +188,13 @@
 
 dnl We're going to try to find the highest version of Berkeley DB supported.
 APU_CHECK_DB4
-if test $apu_db_version != 4; then
+if test "$apu_db_version" != "4"; then
   APU_CHECK_DB3
-  if test $apu_db_version != 3; then
+  if test "$apu_db_version" != "3"; then
     APU_CHECK_DB2
-    if test $apu_db_version != 2; then
+    if test "$apu_db_version" != "2"; then
       APU_CHECK_DB1
-      if test $apu_db_version != 1; then
+      if test "$apu_db_version" != "1"; then
         APU_CHECK_DB185
       fi
     fi
@@ -205,7 +205,7 @@
 dnl so that the AC_MSG_CHECKING would be output before the actual
 dnl checks, but it isn't happening now.
 AC_MSG_CHECKING(for Berkeley DB)
-if test $apu_db_version != 0; then
+if test "$apu_db_version" != "0"; then
   apu_have_db=1
   AC_MSG_RESULT(found db$apu_db_version)
 else
@@ -226,7 +226,7 @@
     apu_default_dbm=gdbm
     ;;
   db)
-    if test $apu_db_version != 0; then
+    if test "$apu_db_version" != "0"; then
       apu_use_db=1
       apu_default_dbm=db
     else
@@ -235,7 +235,7 @@
     ;;
   db1)
     APU_CHECK_DB1
-    if test $apu_db_version = 1; then
+    if test "$apu_db_version" = "1"; then
       apu_use_db=1
       apu_default_dbm=db1
     else
@@ -244,7 +244,7 @@
     ;;
   db185)
     APU_CHECK_DB185
-    if test $apu_db_version = 185; then
+    if test "$apu_db_version" = "185"; then
       apu_use_db=1
       apu_default_dbm=db185
     else
@@ -253,7 +253,7 @@
     ;;
   db2)
     APU_CHECK_DB2
-    if test $apu_db_version = 2; then
+    if test "$apu_db_version" = "2"; then
       apu_use_db=1
       apu_default_dbm=db2
     else
@@ -262,7 +262,7 @@
     ;;
   db3)
     APU_CHECK_DB3
-    if test $apu_db_version = 3; then
+    if test "$apu_db_version" = "3"; then
       apu_use_db=1
       apu_default_dbm=db3
     else
@@ -271,7 +271,7 @@
     ;;
   db4)
     APU_CHECK_DB4
-    if test $apu_db_version = 4; then
+    if test "$apu_db_version" = "4"; then
       apu_use_db=1
       apu_default_dbm=db4
     else
@@ -307,12 +307,12 @@
 
 dnl Since we have already done the AC_CHECK_LIB tests, if we have it, 
 dnl we know the library is there.
-if test $apu_have_gdbm = 1; then
+if test "$apu_have_gdbm" = "1"; then
   APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lgdbm])
   APR_ADDTO(LIBS,[-lgdbm])
 fi
 
-if test $apu_db_version != 0; then
+if test "$apu_db_version" != "0"; then
   APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_db_lib])
   APR_ADDTO(LIBS,[-l$apu_db_lib])
 fi