apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@apache.org>
Subject [PATCH] disable gdbm/specifiy the path of gdbm
Date Wed, 16 Jan 2002 22:00:43 GMT
Can someone who knows autoconf better than I please verify
that this is correct.
If it is all good.
the --with-berkeley-db equivalent will do something similiar to this.

TIA
Ian

Index: build/apu-conf.m4
===================================================================
RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
retrieving revision 1.24
diff -u -u -r1.24 apu-conf.m4
--- build/apu-conf.m4   2 Jan 2002 23:59:26 -0000       1.24
+++ build/apu-conf.m4   16 Jan 2002 21:58:13 -0000
@@ -184,8 +184,28 @@
  ],[
    requested=default
  ])
-
-AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
+AC_ARG_WITH([gdbm],
+[ --with-gdbm=DIR          specify GDBM location], [
+    apu_have_gdbm=0
+    if test "$withval" = "yes"; then
+      AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, 
[apu_have_gdbm=1]))
+    elif test "$withval" = "no"; then
+      apu_have_gdbm=0
+    else
+        CPPFLAGS="-I$withval/include"
+        LDFLAGS="-L$withval/lib -R$withval/lib"
+        AC_MSG_CHECKING(checking for gdbm in $withval)
+        AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, 
[apu_have_gdbm=1]))
+        if test "$apu_have_gdbm" != "0"; then
+            APR_ADDTO(APRUTIL_EXPORT_LIBS, [-L$withval/lib])
+            APR_ADDTO(INCLUDES, [-I$withval/include])
+        fi
+    fi
+],[
+    apu_have_gdbm=0
+    AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, 
[apu_have_gdbm=1]))
+])
+

  dnl We're going to try to find the highest version of Berkeley DB 
supported.
  APU_CHECK_DB4


Mime
View raw message