6 dnl APU_LIB_BERKELEY_DB(major, minor, patch, places, headers, libnames)
8 dnl Search for a useable version of Berkeley DB in a number of
9 dnl common places. The installed DB must be no older than the
10 dnl version given by MAJOR, MINOR, and PATCH. All of these
11 dnl arguments are allowed to be '-1', indicating we don't care.
12 dnl PLACES is a list of places to search for a Berkeley DB
13 dnl installation. HEADERS is a list of headers to try. LIBNAMES
14 dnl is a list of names of the library to attempt to link against,
15 dnl typically 'db' and 'db4'.
17 dnl If we find a useable version, set CPPFLAGS and LIBS as
18 dnl appropriate, and set the shell variable `apu_have_db' to
19 dnl `1', and apu_db_lib to the matching lib name, and apu_db_header
20 dnl to the header to use. Otherwise, set `apu_have_db' to `0'.
22 dnl This macro also checks for the `--with-berkeley-db=PATH' flag;
23 dnl if given, the macro will use the PATH specified, and the
24 dnl configuration script will die if it can't find the library. If
25 dnl the user gives the `--without-berkeley-db' flag, the entire
26 dnl search is skipped.
28 dnl We cache the results of individual searches under particular
29 dnl prefixes, not the overall result of whether we found Berkeley
30 dnl DB. That way, the user can re-run the configure script with
31 dnl different --with-berkeley-db switch values, without interference
35 AC_DEFUN(APU_CHECK_BERKELEY_DB, [
37 if test "$2" != "-1"; then
38 bdb_version="$bdb_version.$2"
39 if test "$3" != "-1"; then
40 bdb_version="$bdb_version.$3"
44 bdb_default_search_headers=$5
45 bdb_default_search_lib_names=$6
49 # Save the original values of the flags we tweak.
50 apu_check_lib_save_libs="$LIBS"
51 apu_check_lib_save_ldflags="$LDFLAGS"
52 apu_check_lib_save_cppflags="$CPPFLAGS"
54 # The variable `found' is the prefix under which we've found
55 # Berkeley DB, or `not' if we haven't found it anywhere yet.
57 for bdb_place in $bdb_places; do
59 LDFLAGS="$apu_check_lib_save_ldflags"
60 CPPFLAGS="$apu_check_lib_save_cppflags"
63 description="the standard places"
66 header="`echo $bdb_place | sed -e 's/:.*$//'`"
67 lib="`echo $bdb_place | sed -e 's/^.*://'`"
68 CPPFLAGS="$CPPFLAGS -I$header"
69 LDFLAGS="$LDFLAGS -L$lib"
70 description="$header and $lib"
73 if test -d $bdb_place; then
74 LDFLAGS="$LDFLAGS -L$bdb_place/lib"
75 CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
77 AC_MSG_CHECKING([for Berkeley DB $bdb_version in $bdb_place])
78 AC_MSG_RESULT([directory not found])
81 description="$bdb_place"
85 # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
86 # trick to display a message instead.
87 AC_MSG_CHECKING([for Berkeley DB $bdb_version in $description])
90 for bdb_libname in $bdb_default_search_lib_names; do
91 for bdb_header in $bdb_default_search_headers; do
92 # Clear the header cache variable for each location
94 cache_id="`echo ac_cv_header_${bdb_header} \
95 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
98 AC_CHECK_HEADER([$bdb_header], [
99 if test "$1" = "3" -o "$1" = "4"; then
100 # We generate a separate cache variable for each prefix and libname
101 # we search under. That way, we avoid caching information that
102 # changes if the user runs `configure' with a different set of
105 cache_id="`echo apu_cv_check_berkeley_db_$1_$2_$3_${bdb_header}_${bdb_libname}_in_${bdb_place} \
106 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
109 AC_MSG_CHECKING([for -l$bdb_libname])
110 dnl We can't use AC_CACHE_CHECK here, because that won't print out
111 dnl the value of the computed cache variable properly.
112 AC_CACHE_VAL($cache_id,
114 APU_TRY_BERKELEY_DB($1, $2, $3, $bdb_header, $bdb_libname)
115 eval "$cache_id=$apu_try_berkeley_db"
117 result="`eval echo '$'$cache_id`"
118 AC_MSG_RESULT($result)
119 elif test "$1" = "1"; then
120 AC_CHECK_LIB($bdb_libname,
125 elif test "$1" = "2"; then
126 AC_CHECK_LIB($bdb_libname,
134 # If we found it, no need to search any more.
135 if test "$result" = "yes"; then
140 test "$found" != "not" && break
142 test "$found" != "not" && break
145 # Restore the original values of the flags we tweak.
146 LDFLAGS="$apu_check_lib_save_ldflags"
147 CPPFLAGS="$apu_check_lib_save_cppflags"
154 apu_db_header=$bdb_header
155 apu_db_lib=$bdb_libname
159 header="`echo $found | sed -e 's/:.*$//'`"
160 lib="`echo $found | sed -e 's/^.*://'`"
162 APR_ADDTO(APRUTIL_INCLUDES, [-I$header])
163 APR_ADDTO(APRUTIL_LDFLAGS, [-L$lib])
164 apu_db_header=$bdb_header
165 apu_db_lib=$bdb_libname
169 APR_ADDTO(APRUTIL_INCLUDES, [-I$found/include])
170 APR_ADDTO(APRUTIL_LDFLAGS, [-L$found/lib])
171 apu_db_header=$bdb_header
172 apu_db_lib=$bdb_libname
179 dnl APU_TRY_BERKELEY_DB(major, minor, patch, header, libname)
181 dnl A subroutine of APU_CHECK_BERKELEY_DB.
183 dnl Check that a new-enough version of Berkeley DB is installed.
184 dnl "New enough" means no older than the version given by MAJOR,
185 dnl MINOR, and PATCH. The result of the test is not cached; no
186 dnl messages are printed. Use HEADER as the header file to include.
187 dnl Use LIBNAME as the library to link against.
188 dnl (e.g. LIBNAME should usually be "db" or "db4".)
190 dnl Set the shell variable `apu_try_berkeley_db' to `yes' if we found
191 dnl an appropriate version installed, or `no' otherwise.
193 dnl This macro uses the Berkeley DB library function `db_version' to
194 dnl find the version. If the library installed doesn't have this
195 dnl function, then this macro assumes it is too old.
197 dnl NOTE: This is pretty messed up. It seems that the FreeBSD port of
198 dnl Berkeley DB 4 puts the header file in /usr/local/include/db4, but the
199 dnl database library in /usr/local/lib, as libdb4.[a|so]. There is no
200 dnl /usr/local/include/db.h. So if you check for /usr/local first, you'll
201 dnl get the old header file from /usr/include, and the new library from
202 dnl /usr/local/lib. Disaster. Thus this test compares the version constants
203 dnl in the db.h header with the ones returned by db_version().
206 AC_DEFUN(APU_TRY_BERKELEY_DB,
208 apu_try_berkeley_db_save_libs="$LIBS"
210 apu_check_berkeley_db_major=$1
211 apu_check_berkeley_db_minor=$2
212 apu_check_berkeley_db_patch=$3
213 apu_try_berkeley_db_header=$4
214 apu_try_berkeley_db_libname=$5
216 LIBS="$LIBS -l$apu_try_berkeley_db_libname"
221 #include <$apu_try_berkeley_db_header>
224 int major, minor, patch;
226 db_version(&major, &minor, &patch);
228 /* Sanity check: ensure that db.h constants actually match the db library */
229 if (major != DB_VERSION_MAJOR
230 || minor != DB_VERSION_MINOR
231 || patch != DB_VERSION_PATCH)
234 /* Run-time check: ensure the library claims to be the correct version. */
236 if ($apu_check_berkeley_db_major != -1) {
237 if (major < $apu_check_berkeley_db_major)
239 if (major > $apu_check_berkeley_db_major)
243 if ($apu_check_berkeley_db_minor != -1) {
244 if (minor < $apu_check_berkeley_db_minor)
246 if (minor > $apu_check_berkeley_db_minor)
250 if ($apu_check_berkeley_db_patch == -1
251 || patch >= $apu_check_berkeley_db_patch)
257 [apu_try_berkeley_db=yes],
258 [apu_try_berkeley_db=no],
259 [apu_try_berkeley_db=yes]
262 LIBS="$apu_try_berkeley_db_save_libs"
268 dnl APU_CHECK_DB1: is DB1 present?
270 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
272 AC_DEFUN(APU_CHECK_DB1, [
274 if test -z "$places"; then
277 APU_CHECK_BERKELEY_DB(1, 0, 0,
282 if test "$apu_have_db" = "1"; then
289 dnl APU_CHECK_DB185: is DB1.85 present?
291 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
293 dnl NB: BerkelyDB v2 and above can be compiled in 1.85 mode
294 dnl which has a libdb not libdb1 or libdb185
295 AC_DEFUN(APU_CHECK_DB185, [
297 if test -z "$places"; then
300 APU_CHECK_BERKELEY_DB(1, -1, -1,
305 if test "$apu_have_db" = "1"; then
312 dnl APU_CHECK_DB2: is DB2 present?
314 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
316 AC_DEFUN(APU_CHECK_DB2, [
318 if test -z "$places"; then
321 APU_CHECK_BERKELEY_DB(2, -1, -1,
326 if test "$apu_have_db" = "1"; then
333 dnl APU_CHECK_DB3: is DB3 present?
335 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
337 AC_DEFUN(APU_CHECK_DB3, [
339 if test -z "$places"; then
342 APU_CHECK_BERKELEY_DB(3, -1, -1,
347 if test "$apu_have_db" = "1"; then
354 dnl APU_CHECK_DB4: is DB4 present?
356 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
358 AC_DEFUN(APU_CHECK_DB4, [
360 if test -z "$places"; then
361 places="std /usr/local /usr/local/BerkeleyDB.4.0 /boot/home/config"
363 APU_CHECK_BERKELEY_DB("4", "0", "-1",
368 if test "$apu_have_db" = "1"; then
375 dnl APU_CHECK_DB41: is DB4.1 present?
377 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
379 AC_DEFUN(APU_CHECK_DB41, [
381 if test -z "$places"; then
382 places="std /usr/local /usr/local/BerkeleyDB.4.1 /boot/home/config"
384 APU_CHECK_BERKELEY_DB("4", "1", "-1",
386 "db41/db.h db4/db.h db.h",
389 if test "$apu_have_db" = "1"; then
396 dnl APU_CHECK_DB42: is DB4.2 present?
398 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
400 AC_DEFUN(APU_CHECK_DB42, [
402 if test -z "$places"; then
403 places="std /usr/local /usr/local/BerkeleyDB.4.2 /boot/home/config"
405 APU_CHECK_BERKELEY_DB("4", "2", "-1",
407 "db42/db.h db4/db.h db.h",
410 if test "$apu_have_db" = "1"; then
415 dnl APU_CHECK_DB43: is DB4.3 present?
417 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
419 AC_DEFUN(APU_CHECK_DB43, [
421 if test -z "$places"; then
422 places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
424 APU_CHECK_BERKELEY_DB("4", "3", "-1",
426 "db43/db.h db4/db.h db.h",
427 "db-4.3 db4-4.3 db43 db4 db"
429 if test "$apu_have_db" = "1"; then
434 dnl APU_CHECK_DB44: is DB4.4 present?
436 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
438 AC_DEFUN([APU_CHECK_DB44], [
440 if test -z "$places"; then
441 places="std /usr/local/BerkeleyDB.4.4 /boot/home/config"
443 APU_CHECK_BERKELEY_DB("4", "4", "-1",
445 "db44/db.h db4/db.h db.h",
446 "db-4.4 db4-4.4 db44 db4 db"
448 if test "$apu_have_db" = "1"; then
453 dnl APU_CHECK_DB45: is DB4.5 present?
455 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
457 AC_DEFUN([APU_CHECK_DB45], [
459 if test -z "$places"; then
460 places="std /usr/local/BerkeleyDB.4.5 /boot/home/config"
462 APU_CHECK_BERKELEY_DB("4", "5", "-1",
464 "db45/db.h db4/db.h db.h",
465 "db-4.5 db4-4.5 db45 db4 db"
467 if test "$apu_have_db" = "1"; then
472 dnl APU_CHECK_DB46: is DB4.6 present?
474 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
476 AC_DEFUN([APU_CHECK_DB46], [
478 if test -z "$places"; then
479 places="std /usr/local/BerkeleyDB.4.6 /boot/home/config"
481 APU_CHECK_BERKELEY_DB("4", "6", "-1",
483 "db46/db.h db4/db.h db.h",
484 "db-4.6 db4-4.6 db46 db4 db"
486 if test "$apu_have_db" = "1"; then
491 dnl APU_CHECK_DB47: is DB4.7 present?
493 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
495 AC_DEFUN([APU_CHECK_DB47], [
497 if test -z "$places"; then
498 places="std /usr/local/BerkeleyDB.4.7 /boot/home/config"
500 APU_CHECK_BERKELEY_DB("4", "7", "-1",
502 "db47/db.h db4/db.h db.h",
503 "db-4.7 db4-4.7 db47 db4 db"
505 if test "$apu_have_db" = "1"; then
510 dnl APU_CHECK_DB48: is DB4.8 present?
512 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
514 AC_DEFUN([APU_CHECK_DB48], [
516 if test -z "$places"; then
517 places="std /usr/local/BerkeleyDB.4.8 /boot/home/config"
519 APU_CHECK_BERKELEY_DB("4", "8", "-1",
521 "db48/db.h db4/db.h db.h",
522 "db-4.8 db4-4.8 db48 db4 db"
524 if test "$apu_have_db" = "1"; then
529 AC_DEFUN(APU_CHECK_DB, [
535 APU_CHECK_DB_ALL("$check_places")
536 if test "$apu_have_db" = "0"; then
537 AC_MSG_ERROR(Berkeley db requested, but not found)
541 APU_CHECK_DB1("$check_places")
542 if test "$apu_db_version" != "1"; then
543 AC_MSG_ERROR(Berkeley db1 not found)
547 APU_CHECK_DB185("$check_places")
548 if test "$apu_db_version" != "185"; then
549 AC_MSG_ERROR(Berkeley db185 not found)
553 APU_CHECK_DB2("$check_places")
554 if test "$apu_db_version" != "2"; then
555 AC_MSG_ERROR(Berkeley db2 not found)
559 APU_CHECK_DB3("$check_places")
560 if test "$apu_db_version" != "3"; then
561 AC_MSG_ERROR(Berkeley db3 not found)
565 APU_CHECK_DB4("$check_places")
566 if test "$apu_db_version" != "4"; then
567 AC_MSG_ERROR(Berkeley db4 not found)
571 APU_CHECK_DB41("$check_places")
572 if test "$apu_db_version" != "4"; then
573 AC_MSG_ERROR(Berkeley db4 not found)
577 APU_CHECK_DB42("$check_places")
578 if test "$apu_db_version" != "4"; then
579 AC_MSG_ERROR(Berkeley db4 not found)
583 APU_CHECK_DB43("$check_places")
584 if test "$apu_db_version" != "4"; then
585 AC_MSG_ERROR(Berkeley db4 not found)
589 APU_CHECK_DB44("$check_places")
590 if test "$apu_db_version" != "4"; then
591 AC_MSG_ERROR(Berkeley db4 not found)
595 APU_CHECK_DB45("$check_places")
596 if test "$apu_db_version" != "4"; then
597 AC_MSG_ERROR(Berkeley db4 not found)
601 APU_CHECK_DB46("$check_places")
602 if test "$apu_db_version" != "4"; then
603 AC_MSG_ERROR(Berkeley db4 not found)
607 APU_CHECK_DB47("$check_places")
608 if test "$apu_db_version" != "4"; then
609 AC_MSG_ERROR(Berkeley db4 not found)
613 APU_CHECK_DB48("$check_places")
614 if test "$apu_db_version" != "4"; then
615 AC_MSG_ERROR(Berkeley db4 not found)
619 APU_CHECK_DB_ALL("$check_places")
625 dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.8 to 1.
627 AC_DEFUN(APU_CHECK_DB_ALL, [
630 APU_CHECK_DB48("$all_places")
631 if test "$apu_db_version" != "4"; then
632 APU_CHECK_DB47("$all_places")
633 if test "$apu_db_version" != "4"; then
634 APU_CHECK_DB46("$all_places")
635 if test "$apu_db_version" != "4"; then
636 APU_CHECK_DB45("$all_places")
637 if test "$apu_db_version" != "4"; then
638 APU_CHECK_DB44("$all_places")
639 if test "$apu_db_version" != "4"; then
640 APU_CHECK_DB43("$all_places")
641 if test "$apu_db_version" != "4"; then
642 APU_CHECK_DB42("$all_places")
643 if test "$apu_db_version" != "4"; then
644 APU_CHECK_DB41("$all_places")
645 if test "$apu_db_version" != "4"; then
646 APU_CHECK_DB4("$all_places")
647 if test "$apu_db_version" != "4"; then
648 APU_CHECK_DB3("$all_places")
649 if test "$apu_db_version" != "3"; then
650 APU_CHECK_DB2("$all_places")
651 if test "$apu_db_version" != "2"; then
652 APU_CHECK_DB1("$all_places")
653 if test "$apu_db_version" != "1"; then
654 APU_CHECK_DB185("$all_places")
667 AC_MSG_CHECKING(for Berkeley DB)
668 if test "$apu_have_db" = "1"; then
669 AC_MSG_RESULT(found db$apu_db_version)
671 AC_MSG_RESULT(not found)
677 dnl APU_CHECK_DBM: see what kind of DBM backend to use for apr_dbm.
679 AC_DEFUN(APU_CHECK_DBM, [
684 dnl it's in our codebase
690 apu_db_header=db.h # default so apu_select_dbm.h is syntactically correct
694 --with-dbm=DBM choose the DBM type to use.
695 DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48}
697 if test "$withval" = "yes"; then
698 AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
699 One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48])
706 dnl We don't pull in GDBM unless the user asks for it, since it's GPL
707 AC_ARG_WITH([gdbm], [
708 --with-gdbm=DIR specify GDBM location
711 if test "$withval" = "yes"; then
712 AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
713 elif test "$withval" = "no"; then
716 CPPFLAGS="-I$withval/include"
717 LIBS="-L$withval/lib "
719 AC_MSG_CHECKING(checking for gdbm in $withval)
720 AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
721 if test "$apu_have_gdbm" != "0"; then
722 APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
723 APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
728 AC_ARG_WITH([ndbm], [
730 Find the NDBM header and library in \`PATH/include' and
731 \`PATH/lib'. If PATH is of the form \`HEADER:LIB', then search
732 for header files in HEADER, and the library in LIB. If you omit
733 the \`=PATH' part completely, the configure script will search
734 for NDBM in a number of standard places.
737 if test "$withval" = "yes"; then
738 AC_MSG_CHECKING(checking for ndbm in the usual places)
742 elif test "$withval" = "no"; then
748 NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
749 NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
750 AC_MSG_CHECKING(checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS )
753 NDBM_INC="-I$withval/include"
754 NDBM_LDFLAGS="-L$withval/lib"
755 AC_MSG_CHECKING(checking for ndbm includes in $withval)
760 save_cppflags="$CPPFLAGS"
761 save_ldflags="$LDFLAGS"
762 CPPFLAGS="$CPPFLAGS $NDBM_INC"
763 LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
764 dnl db_ndbm_open is what sleepcat's compatibility library actually has in it's lib
765 if test "$apu_want_ndbm" != "0"; then
766 AC_CHECK_HEADER(ndbm.h,
767 AC_CHECK_LIB(c, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=c],
768 AC_CHECK_LIB(dbm, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=dbm],
769 AC_CHECK_LIB(db, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db],
770 AC_CHECK_LIB(db, __db_ndbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db])
775 if test "$apu_have_ndbm" != "0"; then
776 if test "$withval" != "yes"; then
777 APR_ADDTO(APRUTIL_INCLUDES, [$NDBM_INC])
778 APR_ADDTO(APRUTIL_LDFLAGS, [$NDBM_LDFLAGS])
780 elif test "$withval" != "yes"; then
781 AC_ERROR( NDBM not found in the specified directory)
784 CPPFLAGS="$save_cppflags"
785 LDFLAGS="$save_ldflags"
787 dnl don't check it no one has asked us for it
792 if test -n "$apu_db_xtra_libs"; then
793 saveddbxtralibs="$LIBS"
794 LIBS="$apu_db_xtra_libs $LIBS"
797 dnl We're going to try to find the highest version of Berkeley DB supported.
799 dnl Note that we only do this if the user requested it, since the Sleepycat
800 dnl license is viral and requires distribution of source along with programs
802 AC_ARG_WITH([berkeley-db], [
803 --with-berkeley-db=PATH
804 Find the Berkeley DB header and library in \`PATH/include' and
805 \`PATH/lib'. If PATH is of the form \`HEADER:LIB', then search
806 for header files in HEADER, and the library in LIB. If you omit
807 the \`=PATH' part completely, the configure script will search
808 for Berkeley DB in a number of standard places.
810 if test "$withval" = "yes"; then
813 elif test "$withval" = "no"; then
817 user_places="$withval"
820 if test "$apu_want_db" != "0"; then
821 APU_CHECK_DB($requested, $user_places)
822 if test "$apu_have_db" = "0"; then
823 AC_ERROR(Berkeley DB not found.)
828 if test -n "$apu_db_xtra_libs"; then
829 LIBS="$saveddbxtralibs"
855 apu_default_dbm=db185
902 dnl ### use more sophisticated DBMs for the default?
903 apu_default_dbm="sdbm (default)"
907 AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
908 Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48])
912 dnl Yes, it'd be nice if we could collate the output in an order
913 dnl so that the AC_MSG_CHECKING would be output before the actual
914 dnl checks, but it isn't happening now.
915 AC_MSG_CHECKING(for default DBM)
916 AC_MSG_RESULT($apu_default_dbm)
918 AC_SUBST(apu_use_sdbm)
919 AC_SUBST(apu_use_gdbm)
920 AC_SUBST(apu_use_ndbm)
923 AC_SUBST(apu_have_sdbm)
924 AC_SUBST(apu_have_gdbm)
925 AC_SUBST(apu_have_ndbm)
926 AC_SUBST(apu_have_db)
927 AC_SUBST(apu_db_header)
928 AC_SUBST(apu_db_version)
930 dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
931 dnl we know the library is there.
932 if test "$apu_have_gdbm" = "1"; then
933 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lgdbm])
934 APR_ADDTO(APRUTIL_LIBS,[-lgdbm])
937 if test "$apu_have_ndbm" = "1"; then
938 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_ndbm_lib])
939 APR_ADDTO(APRUTIL_LIBS,[-l$apu_ndbm_lib])
942 if test "$apu_have_db" = "1"; then
943 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_db_lib])
944 APR_ADDTO(APRUTIL_LIBS,[-l$apu_db_lib])
945 if test -n "apu_db_xtra_libs"; then
946 APR_ADDTO(APRUTIL_EXPORT_LIBS,[$apu_db_xtra_libs])
947 APR_ADDTO(APRUTIL_LIBS,[$apu_db_xtra_libs])