1 dnl -------------------------------------------------------- -*- autoconf -*-
2 dnl Licensed to the Apache Software Foundation (ASF) under one or more
3 dnl contributor license agreements. See the NOTICE file distributed with
4 dnl this work for additional information regarding copyright ownership.
5 dnl The ASF licenses this file to You under the Apache License, Version 2.0
6 dnl (the "License"); you may not use this file except in compliance with
7 dnl the License. You may obtain a copy of the License at
9 dnl http://www.apache.org/licenses/LICENSE-2.0
11 dnl Unless required by applicable law or agreed to in writing, software
12 dnl distributed under the License is distributed on an "AS IS" BASIS,
13 dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 dnl See the License for the specific language governing permissions and
15 dnl limitations under the License.
22 dnl APU_LIB_BERKELEY_DB(major, minor, patch, places, headers, libnames)
24 dnl Search for a useable version of Berkeley DB in a number of
25 dnl common places. The installed DB must be no older than the
26 dnl version given by MAJOR, MINOR, and PATCH. All of these
27 dnl arguments are allowed to be '-1', indicating we don't care.
28 dnl PLACES is a list of places to search for a Berkeley DB
29 dnl installation. HEADERS is a list of headers to try. LIBNAMES
30 dnl is a list of names of the library to attempt to link against,
31 dnl typically 'db' and 'db4'.
33 dnl If we find a useable version, set CPPFLAGS and LIBS as
34 dnl appropriate, and set the shell variable `apu_have_db' to
35 dnl `1', and apu_db_lib to the matching lib name, and apu_db_header
36 dnl to the header to use. Otherwise, set `apu_have_db' to `0'.
38 dnl This macro also checks for the `--with-berkeley-db=PATH' flag;
39 dnl if given, the macro will use the PATH specified, and the
40 dnl configuration script will die if it can't find the library. If
41 dnl the user gives the `--without-berkeley-db' flag, the entire
42 dnl search is skipped.
44 dnl We cache the results of individual searches under particular
45 dnl prefixes, not the overall result of whether we found Berkeley
46 dnl DB. That way, the user can re-run the configure script with
47 dnl different --with-berkeley-db switch values, without interference
51 AC_DEFUN([APU_CHECK_BERKELEY_DB], [
53 if test "$2" != "-1"; then
54 bdb_version="$bdb_version.$2"
55 if test "$3" != "-1"; then
56 bdb_version="$bdb_version.$3"
60 bdb_default_search_headers=$5
61 bdb_default_search_lib_names=$6
65 # Save the original values of the flags we tweak.
66 apu_check_lib_save_libs="$LIBS"
67 apu_check_lib_save_ldflags="$LDFLAGS"
68 apu_check_lib_save_cppflags="$CPPFLAGS"
70 # The variable `found' is the prefix under which we've found
71 # Berkeley DB, or `not' if we haven't found it anywhere yet.
73 for bdb_place in $bdb_places; do
75 LDFLAGS="$apu_check_lib_save_ldflags"
76 CPPFLAGS="$apu_check_lib_save_cppflags"
79 description="the standard places"
82 header="`echo $bdb_place | sed -e 's/:.*$//'`"
83 lib="`echo $bdb_place | sed -e 's/^.*://'`"
84 CPPFLAGS="$CPPFLAGS -I$header"
85 LDFLAGS="$LDFLAGS -L$lib"
86 description="$header and $lib"
89 if test -d $bdb_place; then
90 LDFLAGS="$LDFLAGS -L$bdb_place/lib"
91 CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
93 AC_MSG_CHECKING([for Berkeley DB $bdb_version in $bdb_place])
94 AC_MSG_RESULT([directory not found])
97 description="$bdb_place"
101 # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
102 # trick to display a message instead.
103 AC_MSG_CHECKING([for Berkeley DB $bdb_version in $description])
106 for bdb_libname in $bdb_default_search_lib_names; do
107 for bdb_header in $bdb_default_search_headers; do
108 # Clear the header cache variable for each location
110 cache_id="`echo ac_cv_header_${bdb_header} \
111 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
114 AC_CHECK_HEADER([$bdb_header], [
115 if test "$1" = "3" -o "$1" = "4"; then
116 # We generate a separate cache variable for each prefix and libname
117 # we search under. That way, we avoid caching information that
118 # changes if the user runs `configure' with a different set of
121 cache_id="`echo apu_cv_check_berkeley_db_$1_$2_$3_${bdb_header}_${bdb_libname}_in_${bdb_place} \
122 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
125 AC_MSG_CHECKING([for -l$bdb_libname])
126 dnl We can't use AC_CACHE_CHECK here, because that won't print out
127 dnl the value of the computed cache variable properly.
128 AC_CACHE_VAL($cache_id,
130 APU_TRY_BERKELEY_DB($1, $2, $3, $bdb_header, $bdb_libname)
131 eval "$cache_id=$apu_try_berkeley_db"
133 result="`eval echo '$'$cache_id`"
134 AC_MSG_RESULT($result)
135 elif test "$1" = "1"; then
136 AC_CHECK_LIB($bdb_libname,
141 elif test "$1" = "2"; then
142 AC_CHECK_LIB($bdb_libname,
150 # If we found it, no need to search any more.
151 if test "$result" = "yes"; then
156 test "$found" != "not" && break
158 test "$found" != "not" && break
161 # Restore the original values of the flags we tweak.
162 LDFLAGS="$apu_check_lib_save_ldflags"
163 CPPFLAGS="$apu_check_lib_save_cppflags"
170 apu_db_header=$bdb_header
171 apu_db_lib=$bdb_libname
175 header="`echo $found | sed -e 's/:.*$//'`"
176 lib="`echo $found | sed -e 's/^.*://'`"
178 APR_ADDTO(APRUTIL_INCLUDES, [-I$header])
179 APR_ADDTO(APRUTIL_LDFLAGS, [-L$lib])
180 apu_db_header=$bdb_header
181 apu_db_lib=$bdb_libname
185 APR_ADDTO(APRUTIL_INCLUDES, [-I$found/include])
186 APR_ADDTO(APRUTIL_LDFLAGS, [-L$found/lib])
187 apu_db_header=$bdb_header
188 apu_db_lib=$bdb_libname
195 dnl APU_TRY_BERKELEY_DB(major, minor, patch, header, libname)
197 dnl A subroutine of APU_CHECK_BERKELEY_DB.
199 dnl Check that a new-enough version of Berkeley DB is installed.
200 dnl "New enough" means no older than the version given by MAJOR,
201 dnl MINOR, and PATCH. The result of the test is not cached; no
202 dnl messages are printed. Use HEADER as the header file to include.
203 dnl Use LIBNAME as the library to link against.
204 dnl (e.g. LIBNAME should usually be "db" or "db4".)
206 dnl Set the shell variable `apu_try_berkeley_db' to `yes' if we found
207 dnl an appropriate version installed, or `no' otherwise.
209 dnl This macro uses the Berkeley DB library function `db_version' to
210 dnl find the version. If the library installed doesn't have this
211 dnl function, then this macro assumes it is too old.
213 dnl NOTE: This is pretty messed up. It seems that the FreeBSD port of
214 dnl Berkeley DB 4 puts the header file in /usr/local/include/db4, but the
215 dnl database library in /usr/local/lib, as libdb4.[a|so]. There is no
216 dnl /usr/local/include/db.h. So if you check for /usr/local first, you'll
217 dnl get the old header file from /usr/include, and the new library from
218 dnl /usr/local/lib. Disaster. Thus this test compares the version constants
219 dnl in the db.h header with the ones returned by db_version().
222 AC_DEFUN([APU_TRY_BERKELEY_DB],
224 apu_try_berkeley_db_save_libs="$LIBS"
226 apu_check_berkeley_db_major=$1
227 apu_check_berkeley_db_minor=$2
228 apu_check_berkeley_db_patch=$3
229 apu_try_berkeley_db_header=$4
230 apu_try_berkeley_db_libname=$5
232 LIBS="$LIBS -l$apu_try_berkeley_db_libname"
237 #include <$apu_try_berkeley_db_header>
240 int major, minor, patch;
242 db_version(&major, &minor, &patch);
244 /* Sanity check: ensure that db.h constants actually match the db library */
245 if (major != DB_VERSION_MAJOR
246 || minor != DB_VERSION_MINOR
247 || patch != DB_VERSION_PATCH)
250 /* Run-time check: ensure the library claims to be the correct version. */
252 if ($apu_check_berkeley_db_major != -1) {
253 if (major < $apu_check_berkeley_db_major)
255 if (major > $apu_check_berkeley_db_major)
259 if ($apu_check_berkeley_db_minor != -1) {
260 if (minor < $apu_check_berkeley_db_minor)
262 if (minor > $apu_check_berkeley_db_minor)
266 if ($apu_check_berkeley_db_patch == -1
267 || patch >= $apu_check_berkeley_db_patch)
273 [apu_try_berkeley_db=yes],
274 [apu_try_berkeley_db=no],
275 [apu_try_berkeley_db=yes]
278 LIBS="$apu_try_berkeley_db_save_libs"
284 dnl APU_CHECK_DB1: is DB1 present?
286 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
288 AC_DEFUN([APU_CHECK_DB1], [
290 if test -z "$places"; then
293 APU_CHECK_BERKELEY_DB(1, 0, 0,
298 if test "$apu_have_db" = "1"; then
305 dnl APU_CHECK_DB185: is DB1.85 present?
307 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
309 dnl NB: BerkelyDB v2 and above can be compiled in 1.85 mode
310 dnl which has a libdb not libdb1 or libdb185
311 AC_DEFUN([APU_CHECK_DB185], [
313 if test -z "$places"; then
316 APU_CHECK_BERKELEY_DB(1, -1, -1,
321 if test "$apu_have_db" = "1"; then
328 dnl APU_CHECK_DB2: is DB2 present?
330 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
332 AC_DEFUN([APU_CHECK_DB2], [
334 if test -z "$places"; then
337 APU_CHECK_BERKELEY_DB(2, -1, -1,
342 if test "$apu_have_db" = "1"; then
349 dnl APU_CHECK_DB3: is DB3 present?
351 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
353 AC_DEFUN([APU_CHECK_DB3], [
355 if test -z "$places"; then
358 APU_CHECK_BERKELEY_DB(3, -1, -1,
363 if test "$apu_have_db" = "1"; then
370 dnl APU_CHECK_DB4: is DB4 present?
372 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
374 AC_DEFUN([APU_CHECK_DB4], [
376 if test -z "$places"; then
377 places="std /usr/local /usr/local/BerkeleyDB.4.0 /boot/home/config"
379 APU_CHECK_BERKELEY_DB("4", "0", "-1",
384 if test "$apu_have_db" = "1"; then
391 dnl APU_CHECK_DB41: is DB4.1 present?
393 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
395 AC_DEFUN([APU_CHECK_DB41], [
397 if test -z "$places"; then
398 places="std /usr/local /usr/local/BerkeleyDB.4.1 /boot/home/config"
400 APU_CHECK_BERKELEY_DB("4", "1", "-1",
402 "db41/db.h db4/db.h db.h",
405 if test "$apu_have_db" = "1"; then
412 dnl APU_CHECK_DB42: is DB4.2 present?
414 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
416 AC_DEFUN([APU_CHECK_DB42], [
418 if test -z "$places"; then
419 places="std /usr/local /usr/local/BerkeleyDB.4.2 /boot/home/config"
421 APU_CHECK_BERKELEY_DB("4", "2", "-1",
423 "db42/db.h db4/db.h db.h",
426 if test "$apu_have_db" = "1"; then
431 dnl APU_CHECK_DB43: is DB4.3 present?
433 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
435 AC_DEFUN([APU_CHECK_DB43], [
437 if test -z "$places"; then
438 places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
440 APU_CHECK_BERKELEY_DB("4", "3", "-1",
442 "db43/db.h db4/db.h db.h",
443 "db-4.3 db4-4.3 db43 db4 db"
445 if test "$apu_have_db" = "1"; then
450 dnl APU_CHECK_DB44: is DB4.4 present?
452 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
454 AC_DEFUN([APU_CHECK_DB44], [
456 if test -z "$places"; then
457 places="std /usr/local/BerkeleyDB.4.4 /boot/home/config"
459 APU_CHECK_BERKELEY_DB("4", "4", "-1",
461 "db44/db.h db4/db.h db.h",
462 "db-4.4 db4-4.4 db44 db4 db"
464 if test "$apu_have_db" = "1"; then
469 dnl APU_CHECK_DB45: is DB4.5 present?
471 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
473 AC_DEFUN([APU_CHECK_DB45], [
475 if test -z "$places"; then
476 places="std /usr/local/BerkeleyDB.4.5 /boot/home/config"
478 APU_CHECK_BERKELEY_DB("4", "5", "-1",
480 "db45/db.h db4/db.h db.h",
481 "db-4.5 db4-4.5 db45 db4 db"
483 if test "$apu_have_db" = "1"; then
488 dnl APU_CHECK_DB46: is DB4.6 present?
490 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
492 AC_DEFUN([APU_CHECK_DB46], [
494 if test -z "$places"; then
495 places="std /usr/local/BerkeleyDB.4.6 /boot/home/config"
497 APU_CHECK_BERKELEY_DB("4", "6", "-1",
499 "db46/db.h db4/db.h db.h",
500 "db-4.6 db4-4.6 db46 db4 db"
502 if test "$apu_have_db" = "1"; then
507 dnl APU_CHECK_DB47: is DB4.7 present?
509 dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
511 AC_DEFUN([APU_CHECK_DB47], [
513 if test -z "$places"; then
514 places="std /usr/local/BerkeleyDB.4.7 /boot/home/config"
516 APU_CHECK_BERKELEY_DB("4", "7", "-1",
518 "db47/db.h db4/db.h db.h",
519 "db-4.7 db4-4.7 db47 db4 db"
521 if test "$apu_have_db" = "1"; then
526 AC_DEFUN([APU_CHECK_DB], [
532 APU_CHECK_DB_ALL("$check_places")
533 if test "$apu_have_db" = "0"; then
534 AC_MSG_ERROR(Berkeley db requested, but not found)
538 APU_CHECK_DB1("$check_places")
539 if test "$apu_db_version" != "1"; then
540 AC_MSG_ERROR(Berkeley db1 not found)
544 APU_CHECK_DB185("$check_places")
545 if test "$apu_db_version" != "185"; then
546 AC_MSG_ERROR(Berkeley db185 not found)
550 APU_CHECK_DB2("$check_places")
551 if test "$apu_db_version" != "2"; then
552 AC_MSG_ERROR(Berkeley db2 not found)
556 APU_CHECK_DB3("$check_places")
557 if test "$apu_db_version" != "3"; then
558 AC_MSG_ERROR(Berkeley db3 not found)
562 APU_CHECK_DB4("$check_places")
563 if test "$apu_db_version" != "4"; then
564 AC_MSG_ERROR(Berkeley db4 not found)
568 APU_CHECK_DB41("$check_places")
569 if test "$apu_db_version" != "4"; then
570 AC_MSG_ERROR(Berkeley db4 not found)
574 APU_CHECK_DB42("$check_places")
575 if test "$apu_db_version" != "4"; then
576 AC_MSG_ERROR(Berkeley db4 not found)
580 APU_CHECK_DB43("$check_places")
581 if test "$apu_db_version" != "4"; then
582 AC_MSG_ERROR(Berkeley db4 not found)
586 APU_CHECK_DB44("$check_places")
587 if test "$apu_db_version" != "4"; then
588 AC_MSG_ERROR(Berkeley db4 not found)
592 APU_CHECK_DB45("$check_places")
593 if test "$apu_db_version" != "4"; then
594 AC_MSG_ERROR(Berkeley db4 not found)
598 APU_CHECK_DB46("$check_places")
599 if test "$apu_db_version" != "4"; then
600 AC_MSG_ERROR(Berkeley db4 not found)
604 APU_CHECK_DB47("$check_places")
605 if test "$apu_db_version" != "4"; then
606 AC_MSG_ERROR(Berkeley db4 not found)
610 APU_CHECK_DB_ALL("$check_places")
616 dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.7 to 1.
618 AC_DEFUN([APU_CHECK_DB_ALL], [
621 APU_CHECK_DB47("$all_places")
622 if test "$apu_db_version" != "4"; then
623 APU_CHECK_DB46("$all_places")
624 if test "$apu_db_version" != "4"; then
625 APU_CHECK_DB45("$all_places")
626 if test "$apu_db_version" != "4"; then
627 APU_CHECK_DB44("$all_places")
628 if test "$apu_db_version" != "4"; then
629 APU_CHECK_DB43("$all_places")
630 if test "$apu_db_version" != "4"; then
631 APU_CHECK_DB42("$all_places")
632 if test "$apu_db_version" != "4"; then
633 APU_CHECK_DB41("$all_places")
634 if test "$apu_db_version" != "4"; then
635 APU_CHECK_DB4("$all_places")
636 if test "$apu_db_version" != "4"; then
637 APU_CHECK_DB3("$all_places")
638 if test "$apu_db_version" != "3"; then
639 APU_CHECK_DB2("$all_places")
640 if test "$apu_db_version" != "2"; then
641 APU_CHECK_DB1("$all_places")
642 if test "$apu_db_version" != "1"; then
643 APU_CHECK_DB185("$all_places")
655 AC_MSG_CHECKING(for Berkeley DB)
656 if test "$apu_have_db" = "1"; then
657 AC_MSG_RESULT(found db$apu_db_version)
659 AC_MSG_RESULT(not found)
665 dnl APU_CHECK_DBM: see what kind of DBM backend to use for apr_dbm.
667 AC_DEFUN([APU_CHECK_DBM], [
672 dnl it's in our codebase
678 apu_db_header=db.h # default so apu_select_dbm.h is syntactically correct
681 AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
682 DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47}])],
684 if test "$withval" = "yes"; then
685 AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
686 One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
693 dnl We don't pull in GDBM unless the user asks for it, since it's GPL
694 AC_ARG_WITH([gdbm], [APR_HELP_STRING([--with-gdbm=DIR], [enable GDBM support])],
697 if test "$withval" = "yes"; then
698 AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
699 elif test "$withval" = "no"; then
702 saved_cppflags="$CPPFLAGS"
703 saved_ldflags="$LDFLAGS"
704 CPPFLAGS="$CPPFLAGS -I$withval/include"
705 LDFLAGS="$LDFLAGS -L$withval/lib "
707 AC_MSG_CHECKING(checking for gdbm in $withval)
708 AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
709 if test "$apu_have_gdbm" != "0"; then
710 APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
711 APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
713 CPPFLAGS="$saved_cppflags"
714 LDFLAGS="$saved_ldflags"
718 AC_ARG_WITH([ndbm], [APR_HELP_STRING([--with-ndbm=PATH], [
719 Find the NDBM header and library in `PATH/include' and
720 `PATH/lib'. If PATH is of the form `HEADER:LIB', then search
721 for header files in HEADER, and the library in LIB. If you omit
722 the `=PATH' part completely, the configure script will search
723 for NDBM in a number of standard places.])],
726 if test "$withval" = "yes"; then
727 AC_MSG_CHECKING(checking for ndbm in the usual places)
731 elif test "$withval" = "no"; then
737 NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
738 NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
739 AC_MSG_CHECKING(checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS )
742 NDBM_INC="-I$withval/include"
743 NDBM_LDFLAGS="-L$withval/lib"
744 AC_MSG_CHECKING(checking for ndbm includes in $withval)
749 save_cppflags="$CPPFLAGS"
750 save_ldflags="$LDFLAGS"
751 CPPFLAGS="$CPPFLAGS $NDBM_INC"
752 LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
753 dnl db_ndbm_open is what sleepcat's compatibility library actually has in it's lib
754 if test "$apu_want_ndbm" != "0"; then
755 AC_CHECK_HEADER(ndbm.h,
756 AC_CHECK_LIB(c, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=c],
757 AC_CHECK_LIB(dbm, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=dbm],
758 AC_CHECK_LIB(db, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db],
759 AC_CHECK_LIB(db, __db_ndbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db])
764 if test "$apu_have_ndbm" != "0"; then
765 if test "$withval" != "yes"; then
766 APR_ADDTO(APRUTIL_INCLUDES, [$NDBM_INC])
767 APR_ADDTO(APRUTIL_LDFLAGS, [$NDBM_LDFLAGS])
769 elif test "$withval" != "yes"; then
770 AC_ERROR( NDBM not found in the specified directory)
773 CPPFLAGS="$save_cppflags"
774 LDFLAGS="$save_ldflags"
776 dnl don't check it no one has asked us for it
781 if test -n "$apu_db_xtra_libs"; then
782 saveddbxtralibs="$LIBS"
783 LIBS="$apu_db_xtra_libs $LIBS"
786 dnl We're going to try to find the highest version of Berkeley DB supported.
788 dnl Note that we only do this if the user requested it, since the Sleepycat
789 dnl license is viral and requires distribution of source along with programs
791 AC_ARG_WITH([berkeley-db], [APR_HELP_STRING([--with-berkeley-db=PATH],
792 [Find the Berkeley DB header and library in `PATH/include' and
793 `PATH/lib'. If PATH is of the form `HEADER:LIB', then search
794 for header files in HEADER, and the library in LIB. If you omit
795 the `=PATH' part completely, the configure script will search
796 for Berkeley DB in a number of standard places.])],
798 if test "$withval" = "yes"; then
801 elif test "$withval" = "no"; then
805 user_places="$withval"
808 if test "$apu_want_db" != "0"; then
809 APU_CHECK_DB($requested, $user_places)
810 if test "$apu_have_db" = "0"; then
811 AC_ERROR(Berkeley DB not found.)
816 if test -n "$apu_db_xtra_libs"; then
817 LIBS="$saveddbxtralibs"
843 apu_default_dbm=db185
886 dnl ### use more sophisticated DBMs for the default?
887 apu_default_dbm="sdbm (default)"
891 AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
892 Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
896 dnl Yes, it'd be nice if we could collate the output in an order
897 dnl so that the AC_MSG_CHECKING would be output before the actual
898 dnl checks, but it isn't happening now.
899 AC_MSG_CHECKING(for default DBM)
900 AC_MSG_RESULT($apu_default_dbm)
902 AC_SUBST(apu_use_sdbm)
903 AC_SUBST(apu_use_gdbm)
904 AC_SUBST(apu_use_ndbm)
907 AC_SUBST(apu_have_sdbm)
908 AC_SUBST(apu_have_gdbm)
909 AC_SUBST(apu_have_ndbm)
910 AC_SUBST(apu_have_db)
911 AC_SUBST(apu_db_header)
912 AC_SUBST(apu_db_version)
914 dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
915 dnl we know the library is there.
916 if test "$apu_have_gdbm" = "1"; then
917 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lgdbm])
918 APR_ADDTO(APRUTIL_LIBS,[-lgdbm])
921 if test "$apu_have_ndbm" = "1"; then
922 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_ndbm_lib])
923 APR_ADDTO(APRUTIL_LIBS,[-l$apu_ndbm_lib])
926 if test "$apu_have_db" = "1"; then
927 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_db_lib])
928 APR_ADDTO(APRUTIL_LIBS,[-l$apu_db_lib])
929 if test -n "apu_db_xtra_libs"; then
930 APR_ADDTO(APRUTIL_EXPORT_LIBS,[$apu_db_xtra_libs])
931 APR_ADDTO(APRUTIL_LIBS,[$apu_db_xtra_libs])