10925
10926
places="$all_places"
10926
10927
if test -z "$places"; then
10928
places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
10932
if test ""1"" != "-1"; then
10933
bdb_version="$bdb_version."1""
10934
if test ""-1"" != "-1"; then
10935
bdb_version="$bdb_version."-1""
10938
bdb_places="$places"
10939
bdb_default_search_headers="db51/db.h db5/db.h db.h"
10940
bdb_default_search_lib_names="db-5.1 db5-5.1 db51 db5 db"
10945
# Save the original values of the flags we tweak.
10946
apu_check_lib_save_libs="$LIBS"
10947
apu_check_lib_save_ldflags="$LDFLAGS"
10948
apu_check_lib_save_cppflags="$CPPFLAGS"
10950
# The variable `found' is the prefix under which we've found
10951
# Berkeley DB, or `not' if we haven't found it anywhere yet.
10953
for bdb_place in $bdb_places; do
10955
LDFLAGS="$apu_check_lib_save_ldflags"
10956
CPPFLAGS="$apu_check_lib_save_cppflags"
10957
case "$bdb_place" in
10959
description="the standard places"
10962
header="`echo $bdb_place | sed -e 's/:.*$//'`"
10963
lib="`echo $bdb_place | sed -e 's/^.*://'`"
10964
CPPFLAGS="$CPPFLAGS -I$header"
10965
LDFLAGS="$LDFLAGS -L$lib"
10966
description="$header and $lib"
10969
if test -d $bdb_place; then
10970
LDFLAGS="$LDFLAGS -L$bdb_place/lib"
10971
CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
10973
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
10974
$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
10975
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
10976
$as_echo "directory not found" >&6; }
10979
description="$bdb_place"
10983
# Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
10984
# trick to display a message instead.
10985
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
10986
$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
10987
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
10990
for bdb_libname in $bdb_default_search_lib_names; do
10991
for bdb_header in $bdb_default_search_headers; do
10992
# Clear the header cache variable for each location
10994
cache_id="`echo ac_cv_header_${bdb_header} \
10995
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10998
as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
10999
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
11000
eval as_val=\$$as_ac_Header
11001
if test "x$as_val" = x""yes; then :
11003
if test ""5"" = "3" -o ""5"" = "4" -o ""5"" = "5"; then
11004
# We generate a separate cache variable for each prefix and libname
11005
# we search under. That way, we avoid caching information that
11006
# changes if the user runs `configure' with a different set of
11009
cache_id="`echo apu_cv_check_berkeley_db_"5"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
11010
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
11013
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
11014
$as_echo_n "checking for -l$bdb_libname... " >&6; }
11015
if { as_var=$cache_id; eval "test \"\${$as_var+set}\" = set"; }; then :
11016
$as_echo_n "(cached) " >&6
11020
apu_try_berkeley_db_save_libs="$LIBS"
11022
apu_check_berkeley_db_major="5"
11023
apu_check_berkeley_db_minor="1"
11024
apu_check_berkeley_db_patch="-1"
11025
apu_try_berkeley_db_header=$bdb_header
11026
apu_try_berkeley_db_libname=$bdb_libname
11028
LIBS="$LIBS -l$apu_try_berkeley_db_libname"
11029
if test "$cross_compiling" = yes; then :
11030
apu_try_berkeley_db=yes
11033
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034
/* end confdefs.h. */
11036
#include <stdlib.h>
11038
#include <$apu_try_berkeley_db_header>
11041
int major, minor, patch;
11043
db_version(&major, &minor, &patch);
11045
/* Sanity check: ensure that db.h constants actually match the db library */
11046
if (major != DB_VERSION_MAJOR
11047
|| minor != DB_VERSION_MINOR
11048
|| patch != DB_VERSION_PATCH)
11051
/* Run-time check: ensure the library claims to be the correct version. */
11053
if ($apu_check_berkeley_db_major != -1) {
11054
if (major < $apu_check_berkeley_db_major)
11056
if (major > $apu_check_berkeley_db_major)
11060
if ($apu_check_berkeley_db_minor != -1) {
11061
if (minor < $apu_check_berkeley_db_minor)
11063
if (minor > $apu_check_berkeley_db_minor)
11067
if ($apu_check_berkeley_db_patch == -1
11068
|| patch >= $apu_check_berkeley_db_patch)
11075
if ac_fn_c_try_run "$LINENO"; then :
11076
apu_try_berkeley_db=yes
11078
apu_try_berkeley_db=no
11080
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11081
conftest.$ac_objext conftest.beam conftest.$ac_ext
11085
LIBS="$apu_try_berkeley_db_save_libs"
11088
eval "$cache_id=$apu_try_berkeley_db"
11092
result="`eval echo '$'$cache_id`"
11093
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
11094
$as_echo "$result" >&6; }
11095
elif test ""5"" = "1"; then
11096
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
11097
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
11098
$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
11099
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11100
$as_echo_n "(cached) " >&6
11102
ac_check_lib_save_LIBS=$LIBS
11103
LIBS="-l$bdb_libname $LIBS"
11104
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11105
/* end confdefs.h. */
11107
/* Override any GCC internal prototype to avoid an error.
11108
Use char because int might match the return type of a GCC
11109
builtin and then its argument prototype would still apply. */
11122
if ac_fn_c_try_link "$LINENO"; then :
11123
eval "$as_ac_Lib=yes"
11125
eval "$as_ac_Lib=no"
11127
rm -f core conftest.err conftest.$ac_objext \
11128
conftest$ac_exeext conftest.$ac_ext
11129
LIBS=$ac_check_lib_save_LIBS
11131
eval ac_res=\$$as_ac_Lib
11132
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11133
$as_echo "$ac_res" >&6; }
11134
eval as_val=\$$as_ac_Lib
11135
if test "x$as_val" = x""yes; then :
11142
elif test ""5"" = "2"; then
11143
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
11144
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
11145
$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
11146
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11147
$as_echo_n "(cached) " >&6
11149
ac_check_lib_save_LIBS=$LIBS
11150
LIBS="-l$bdb_libname $LIBS"
11151
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11152
/* end confdefs.h. */
11154
/* Override any GCC internal prototype to avoid an error.
11155
Use char because int might match the return type of a GCC
11156
builtin and then its argument prototype would still apply. */
11169
if ac_fn_c_try_link "$LINENO"; then :
11170
eval "$as_ac_Lib=yes"
11172
eval "$as_ac_Lib=no"
11174
rm -f core conftest.err conftest.$ac_objext \
11175
conftest$ac_exeext conftest.$ac_ext
11176
LIBS=$ac_check_lib_save_LIBS
11178
eval ac_res=\$$as_ac_Lib
11179
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11180
$as_echo "$ac_res" >&6; }
11181
eval as_val=\$$as_ac_Lib
11182
if test "x$as_val" = x""yes; then :
11197
# If we found it, no need to search any more.
11198
if test "$result" = "yes"; then
11203
test "$found" != "not" && break
11205
test "$found" != "not" && break
11208
# Restore the original values of the flags we tweak.
11209
LDFLAGS="$apu_check_lib_save_ldflags"
11210
CPPFLAGS="$apu_check_lib_save_cppflags"
11217
apu_db_header=$bdb_header
11218
apu_db_lib=$bdb_libname
11222
header="`echo $found | sed -e 's/:.*$//'`"
11223
lib="`echo $found | sed -e 's/^.*://'`"
11226
if test "x$APRUTIL_INCLUDES" = "x"; then
11227
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$header\""
11228
APRUTIL_INCLUDES="-I$header"
11230
apr_addto_bugger="-I$header"
11231
for i in $apr_addto_bugger; do
11232
apr_addto_duplicate="0"
11233
for j in $APRUTIL_INCLUDES; do
11234
if test "x$i" = "x$j"; then
11235
apr_addto_duplicate="1"
11239
if test $apr_addto_duplicate = "0"; then
11240
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
11241
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11247
if test "x$APRUTIL_LDFLAGS" = "x"; then
11248
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$lib\""
11249
APRUTIL_LDFLAGS="-L$lib"
11251
apr_addto_bugger="-L$lib"
11252
for i in $apr_addto_bugger; do
11253
apr_addto_duplicate="0"
11254
for j in $APRUTIL_LDFLAGS; do
11255
if test "x$i" = "x$j"; then
11256
apr_addto_duplicate="1"
11260
if test $apr_addto_duplicate = "0"; then
11261
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
11262
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
11267
apu_db_header=$bdb_header
11268
apu_db_lib=$bdb_libname
11273
if test "x$APRUTIL_INCLUDES" = "x"; then
11274
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$found/include\""
11275
APRUTIL_INCLUDES="-I$found/include"
11277
apr_addto_bugger="-I$found/include"
11278
for i in $apr_addto_bugger; do
11279
apr_addto_duplicate="0"
11280
for j in $APRUTIL_INCLUDES; do
11281
if test "x$i" = "x$j"; then
11282
apr_addto_duplicate="1"
11286
if test $apr_addto_duplicate = "0"; then
11287
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
11288
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11294
if test "x$APRUTIL_LDFLAGS" = "x"; then
11295
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$found/lib\""
11296
APRUTIL_LDFLAGS="-L$found/lib"
11298
apr_addto_bugger="-L$found/lib"
11299
for i in $apr_addto_bugger; do
11300
apr_addto_duplicate="0"
11301
for j in $APRUTIL_LDFLAGS; do
11302
if test "x$i" = "x$j"; then
11303
apr_addto_duplicate="1"
11307
if test $apr_addto_duplicate = "0"; then
11308
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
11309
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
11314
apu_db_header=$bdb_header
11315
apu_db_lib=$bdb_libname
11320
if test "$apu_have_db" = "1"; then
11324
if test "$apu_db_version" != "5"; then
11326
places="$all_places"
11327
if test -z "$places"; then
10927
11328
places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
22204
22606
as_fn_error "Berkeley db5 not found" "$LINENO" 5
22611
places="$check_places"
22612
if test -z "$places"; then
22613
places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
22617
if test ""1"" != "-1"; then
22618
bdb_version="$bdb_version."1""
22619
if test ""-1"" != "-1"; then
22620
bdb_version="$bdb_version."-1""
22623
bdb_places="$places"
22624
bdb_default_search_headers="db51/db.h db5/db.h db.h"
22625
bdb_default_search_lib_names="db-5.1 db5-5.1 db51 db5 db"
22630
# Save the original values of the flags we tweak.
22631
apu_check_lib_save_libs="$LIBS"
22632
apu_check_lib_save_ldflags="$LDFLAGS"
22633
apu_check_lib_save_cppflags="$CPPFLAGS"
22635
# The variable `found' is the prefix under which we've found
22636
# Berkeley DB, or `not' if we haven't found it anywhere yet.
22638
for bdb_place in $bdb_places; do
22640
LDFLAGS="$apu_check_lib_save_ldflags"
22641
CPPFLAGS="$apu_check_lib_save_cppflags"
22642
case "$bdb_place" in
22644
description="the standard places"
22647
header="`echo $bdb_place | sed -e 's/:.*$//'`"
22648
lib="`echo $bdb_place | sed -e 's/^.*://'`"
22649
CPPFLAGS="$CPPFLAGS -I$header"
22650
LDFLAGS="$LDFLAGS -L$lib"
22651
description="$header and $lib"
22654
if test -d $bdb_place; then
22655
LDFLAGS="$LDFLAGS -L$bdb_place/lib"
22656
CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
22658
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
22659
$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
22660
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
22661
$as_echo "directory not found" >&6; }
22664
description="$bdb_place"
22668
# Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
22669
# trick to display a message instead.
22670
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
22671
$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
22672
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
22675
for bdb_libname in $bdb_default_search_lib_names; do
22676
for bdb_header in $bdb_default_search_headers; do
22677
# Clear the header cache variable for each location
22679
cache_id="`echo ac_cv_header_${bdb_header} \
22680
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
22683
as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
22684
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
22685
eval as_val=\$$as_ac_Header
22686
if test "x$as_val" = x""yes; then :
22688
if test ""5"" = "3" -o ""5"" = "4" -o ""5"" = "5"; then
22689
# We generate a separate cache variable for each prefix and libname
22690
# we search under. That way, we avoid caching information that
22691
# changes if the user runs `configure' with a different set of
22694
cache_id="`echo apu_cv_check_berkeley_db_"5"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
22695
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
22698
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
22699
$as_echo_n "checking for -l$bdb_libname... " >&6; }
22700
if { as_var=$cache_id; eval "test \"\${$as_var+set}\" = set"; }; then :
22701
$as_echo_n "(cached) " >&6
22705
apu_try_berkeley_db_save_libs="$LIBS"
22707
apu_check_berkeley_db_major="5"
22708
apu_check_berkeley_db_minor="1"
22709
apu_check_berkeley_db_patch="-1"
22710
apu_try_berkeley_db_header=$bdb_header
22711
apu_try_berkeley_db_libname=$bdb_libname
22713
LIBS="$LIBS -l$apu_try_berkeley_db_libname"
22714
if test "$cross_compiling" = yes; then :
22715
apu_try_berkeley_db=yes
22718
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22719
/* end confdefs.h. */
22721
#include <stdlib.h>
22723
#include <$apu_try_berkeley_db_header>
22726
int major, minor, patch;
22728
db_version(&major, &minor, &patch);
22730
/* Sanity check: ensure that db.h constants actually match the db library */
22731
if (major != DB_VERSION_MAJOR
22732
|| minor != DB_VERSION_MINOR
22733
|| patch != DB_VERSION_PATCH)
22736
/* Run-time check: ensure the library claims to be the correct version. */
22738
if ($apu_check_berkeley_db_major != -1) {
22739
if (major < $apu_check_berkeley_db_major)
22741
if (major > $apu_check_berkeley_db_major)
22745
if ($apu_check_berkeley_db_minor != -1) {
22746
if (minor < $apu_check_berkeley_db_minor)
22748
if (minor > $apu_check_berkeley_db_minor)
22752
if ($apu_check_berkeley_db_patch == -1
22753
|| patch >= $apu_check_berkeley_db_patch)
22760
if ac_fn_c_try_run "$LINENO"; then :
22761
apu_try_berkeley_db=yes
22763
apu_try_berkeley_db=no
22765
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22766
conftest.$ac_objext conftest.beam conftest.$ac_ext
22770
LIBS="$apu_try_berkeley_db_save_libs"
22773
eval "$cache_id=$apu_try_berkeley_db"
22777
result="`eval echo '$'$cache_id`"
22778
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
22779
$as_echo "$result" >&6; }
22780
elif test ""5"" = "1"; then
22781
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
22782
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
22783
$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
22784
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
22785
$as_echo_n "(cached) " >&6
22787
ac_check_lib_save_LIBS=$LIBS
22788
LIBS="-l$bdb_libname $LIBS"
22789
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22790
/* end confdefs.h. */
22792
/* Override any GCC internal prototype to avoid an error.
22793
Use char because int might match the return type of a GCC
22794
builtin and then its argument prototype would still apply. */
22807
if ac_fn_c_try_link "$LINENO"; then :
22808
eval "$as_ac_Lib=yes"
22810
eval "$as_ac_Lib=no"
22812
rm -f core conftest.err conftest.$ac_objext \
22813
conftest$ac_exeext conftest.$ac_ext
22814
LIBS=$ac_check_lib_save_LIBS
22816
eval ac_res=\$$as_ac_Lib
22817
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22818
$as_echo "$ac_res" >&6; }
22819
eval as_val=\$$as_ac_Lib
22820
if test "x$as_val" = x""yes; then :
22827
elif test ""5"" = "2"; then
22828
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
22829
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
22830
$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
22831
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
22832
$as_echo_n "(cached) " >&6
22834
ac_check_lib_save_LIBS=$LIBS
22835
LIBS="-l$bdb_libname $LIBS"
22836
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22837
/* end confdefs.h. */
22839
/* Override any GCC internal prototype to avoid an error.
22840
Use char because int might match the return type of a GCC
22841
builtin and then its argument prototype would still apply. */
22854
if ac_fn_c_try_link "$LINENO"; then :
22855
eval "$as_ac_Lib=yes"
22857
eval "$as_ac_Lib=no"
22859
rm -f core conftest.err conftest.$ac_objext \
22860
conftest$ac_exeext conftest.$ac_ext
22861
LIBS=$ac_check_lib_save_LIBS
22863
eval ac_res=\$$as_ac_Lib
22864
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22865
$as_echo "$ac_res" >&6; }
22866
eval as_val=\$$as_ac_Lib
22867
if test "x$as_val" = x""yes; then :
22882
# If we found it, no need to search any more.
22883
if test "$result" = "yes"; then
22888
test "$found" != "not" && break
22890
test "$found" != "not" && break
22893
# Restore the original values of the flags we tweak.
22894
LDFLAGS="$apu_check_lib_save_ldflags"
22895
CPPFLAGS="$apu_check_lib_save_cppflags"
22902
apu_db_header=$bdb_header
22903
apu_db_lib=$bdb_libname
22907
header="`echo $found | sed -e 's/:.*$//'`"
22908
lib="`echo $found | sed -e 's/^.*://'`"
22911
if test "x$APRUTIL_INCLUDES" = "x"; then
22912
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$header\""
22913
APRUTIL_INCLUDES="-I$header"
22915
apr_addto_bugger="-I$header"
22916
for i in $apr_addto_bugger; do
22917
apr_addto_duplicate="0"
22918
for j in $APRUTIL_INCLUDES; do
22919
if test "x$i" = "x$j"; then
22920
apr_addto_duplicate="1"
22924
if test $apr_addto_duplicate = "0"; then
22925
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
22926
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22932
if test "x$APRUTIL_LDFLAGS" = "x"; then
22933
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$lib\""
22934
APRUTIL_LDFLAGS="-L$lib"
22936
apr_addto_bugger="-L$lib"
22937
for i in $apr_addto_bugger; do
22938
apr_addto_duplicate="0"
22939
for j in $APRUTIL_LDFLAGS; do
22940
if test "x$i" = "x$j"; then
22941
apr_addto_duplicate="1"
22945
if test $apr_addto_duplicate = "0"; then
22946
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
22947
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22952
apu_db_header=$bdb_header
22953
apu_db_lib=$bdb_libname
22958
if test "x$APRUTIL_INCLUDES" = "x"; then
22959
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$found/include\""
22960
APRUTIL_INCLUDES="-I$found/include"
22962
apr_addto_bugger="-I$found/include"
22963
for i in $apr_addto_bugger; do
22964
apr_addto_duplicate="0"
22965
for j in $APRUTIL_INCLUDES; do
22966
if test "x$i" = "x$j"; then
22967
apr_addto_duplicate="1"
22971
if test $apr_addto_duplicate = "0"; then
22972
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
22973
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22979
if test "x$APRUTIL_LDFLAGS" = "x"; then
22980
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$found/lib\""
22981
APRUTIL_LDFLAGS="-L$found/lib"
22983
apr_addto_bugger="-L$found/lib"
22984
for i in $apr_addto_bugger; do
22985
apr_addto_duplicate="0"
22986
for j in $APRUTIL_LDFLAGS; do
22987
if test "x$i" = "x$j"; then
22988
apr_addto_duplicate="1"
22992
if test $apr_addto_duplicate = "0"; then
22993
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
22994
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22999
apu_db_header=$bdb_header
23000
apu_db_lib=$bdb_libname
23005
if test "$apu_have_db" = "1"; then
23009
if test "$apu_db_version" != "5"; then
23010
as_fn_error "Berkeley db5 not found" "$LINENO" 5
22209
23015
all_places="$check_places"
22212
23018
places="$all_places"
22213
23019
if test -z "$places"; then
23020
places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
23024
if test ""1"" != "-1"; then
23025
bdb_version="$bdb_version."1""
23026
if test ""-1"" != "-1"; then
23027
bdb_version="$bdb_version."-1""
23030
bdb_places="$places"
23031
bdb_default_search_headers="db51/db.h db5/db.h db.h"
23032
bdb_default_search_lib_names="db-5.1 db5-5.1 db51 db5 db"
23037
# Save the original values of the flags we tweak.
23038
apu_check_lib_save_libs="$LIBS"
23039
apu_check_lib_save_ldflags="$LDFLAGS"
23040
apu_check_lib_save_cppflags="$CPPFLAGS"
23042
# The variable `found' is the prefix under which we've found
23043
# Berkeley DB, or `not' if we haven't found it anywhere yet.
23045
for bdb_place in $bdb_places; do
23047
LDFLAGS="$apu_check_lib_save_ldflags"
23048
CPPFLAGS="$apu_check_lib_save_cppflags"
23049
case "$bdb_place" in
23051
description="the standard places"
23054
header="`echo $bdb_place | sed -e 's/:.*$//'`"
23055
lib="`echo $bdb_place | sed -e 's/^.*://'`"
23056
CPPFLAGS="$CPPFLAGS -I$header"
23057
LDFLAGS="$LDFLAGS -L$lib"
23058
description="$header and $lib"
23061
if test -d $bdb_place; then
23062
LDFLAGS="$LDFLAGS -L$bdb_place/lib"
23063
CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
23065
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
23066
$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
23067
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
23068
$as_echo "directory not found" >&6; }
23071
description="$bdb_place"
23075
# Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
23076
# trick to display a message instead.
23077
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
23078
$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
23079
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
23082
for bdb_libname in $bdb_default_search_lib_names; do
23083
for bdb_header in $bdb_default_search_headers; do
23084
# Clear the header cache variable for each location
23086
cache_id="`echo ac_cv_header_${bdb_header} \
23087
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
23090
as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
23091
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
23092
eval as_val=\$$as_ac_Header
23093
if test "x$as_val" = x""yes; then :
23095
if test ""5"" = "3" -o ""5"" = "4" -o ""5"" = "5"; then
23096
# We generate a separate cache variable for each prefix and libname
23097
# we search under. That way, we avoid caching information that
23098
# changes if the user runs `configure' with a different set of
23101
cache_id="`echo apu_cv_check_berkeley_db_"5"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
23102
| sed -e 's/[^a-zA-Z0-9_]/_/g'`"
23105
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
23106
$as_echo_n "checking for -l$bdb_libname... " >&6; }
23107
if { as_var=$cache_id; eval "test \"\${$as_var+set}\" = set"; }; then :
23108
$as_echo_n "(cached) " >&6
23112
apu_try_berkeley_db_save_libs="$LIBS"
23114
apu_check_berkeley_db_major="5"
23115
apu_check_berkeley_db_minor="1"
23116
apu_check_berkeley_db_patch="-1"
23117
apu_try_berkeley_db_header=$bdb_header
23118
apu_try_berkeley_db_libname=$bdb_libname
23120
LIBS="$LIBS -l$apu_try_berkeley_db_libname"
23121
if test "$cross_compiling" = yes; then :
23122
apu_try_berkeley_db=yes
23125
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23126
/* end confdefs.h. */
23128
#include <stdlib.h>
23130
#include <$apu_try_berkeley_db_header>
23133
int major, minor, patch;
23135
db_version(&major, &minor, &patch);
23137
/* Sanity check: ensure that db.h constants actually match the db library */
23138
if (major != DB_VERSION_MAJOR
23139
|| minor != DB_VERSION_MINOR
23140
|| patch != DB_VERSION_PATCH)
23143
/* Run-time check: ensure the library claims to be the correct version. */
23145
if ($apu_check_berkeley_db_major != -1) {
23146
if (major < $apu_check_berkeley_db_major)
23148
if (major > $apu_check_berkeley_db_major)
23152
if ($apu_check_berkeley_db_minor != -1) {
23153
if (minor < $apu_check_berkeley_db_minor)
23155
if (minor > $apu_check_berkeley_db_minor)
23159
if ($apu_check_berkeley_db_patch == -1
23160
|| patch >= $apu_check_berkeley_db_patch)
23167
if ac_fn_c_try_run "$LINENO"; then :
23168
apu_try_berkeley_db=yes
23170
apu_try_berkeley_db=no
23172
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23173
conftest.$ac_objext conftest.beam conftest.$ac_ext
23177
LIBS="$apu_try_berkeley_db_save_libs"
23180
eval "$cache_id=$apu_try_berkeley_db"
23184
result="`eval echo '$'$cache_id`"
23185
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
23186
$as_echo "$result" >&6; }
23187
elif test ""5"" = "1"; then
23188
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
23189
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
23190
$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
23191
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
23192
$as_echo_n "(cached) " >&6
23194
ac_check_lib_save_LIBS=$LIBS
23195
LIBS="-l$bdb_libname $LIBS"
23196
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23197
/* end confdefs.h. */
23199
/* Override any GCC internal prototype to avoid an error.
23200
Use char because int might match the return type of a GCC
23201
builtin and then its argument prototype would still apply. */
23214
if ac_fn_c_try_link "$LINENO"; then :
23215
eval "$as_ac_Lib=yes"
23217
eval "$as_ac_Lib=no"
23219
rm -f core conftest.err conftest.$ac_objext \
23220
conftest$ac_exeext conftest.$ac_ext
23221
LIBS=$ac_check_lib_save_LIBS
23223
eval ac_res=\$$as_ac_Lib
23224
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23225
$as_echo "$ac_res" >&6; }
23226
eval as_val=\$$as_ac_Lib
23227
if test "x$as_val" = x""yes; then :
23234
elif test ""5"" = "2"; then
23235
as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
23236
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
23237
$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
23238
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
23239
$as_echo_n "(cached) " >&6
23241
ac_check_lib_save_LIBS=$LIBS
23242
LIBS="-l$bdb_libname $LIBS"
23243
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23244
/* end confdefs.h. */
23246
/* Override any GCC internal prototype to avoid an error.
23247
Use char because int might match the return type of a GCC
23248
builtin and then its argument prototype would still apply. */
23261
if ac_fn_c_try_link "$LINENO"; then :
23262
eval "$as_ac_Lib=yes"
23264
eval "$as_ac_Lib=no"
23266
rm -f core conftest.err conftest.$ac_objext \
23267
conftest$ac_exeext conftest.$ac_ext
23268
LIBS=$ac_check_lib_save_LIBS
23270
eval ac_res=\$$as_ac_Lib
23271
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23272
$as_echo "$ac_res" >&6; }
23273
eval as_val=\$$as_ac_Lib
23274
if test "x$as_val" = x""yes; then :
23289
# If we found it, no need to search any more.
23290
if test "$result" = "yes"; then
23295
test "$found" != "not" && break
23297
test "$found" != "not" && break
23300
# Restore the original values of the flags we tweak.
23301
LDFLAGS="$apu_check_lib_save_ldflags"
23302
CPPFLAGS="$apu_check_lib_save_cppflags"
23309
apu_db_header=$bdb_header
23310
apu_db_lib=$bdb_libname
23314
header="`echo $found | sed -e 's/:.*$//'`"
23315
lib="`echo $found | sed -e 's/^.*://'`"
23318
if test "x$APRUTIL_INCLUDES" = "x"; then
23319
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$header\""
23320
APRUTIL_INCLUDES="-I$header"
23322
apr_addto_bugger="-I$header"
23323
for i in $apr_addto_bugger; do
23324
apr_addto_duplicate="0"
23325
for j in $APRUTIL_INCLUDES; do
23326
if test "x$i" = "x$j"; then
23327
apr_addto_duplicate="1"
23331
if test $apr_addto_duplicate = "0"; then
23332
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
23333
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23339
if test "x$APRUTIL_LDFLAGS" = "x"; then
23340
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$lib\""
23341
APRUTIL_LDFLAGS="-L$lib"
23343
apr_addto_bugger="-L$lib"
23344
for i in $apr_addto_bugger; do
23345
apr_addto_duplicate="0"
23346
for j in $APRUTIL_LDFLAGS; do
23347
if test "x$i" = "x$j"; then
23348
apr_addto_duplicate="1"
23352
if test $apr_addto_duplicate = "0"; then
23353
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
23354
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23359
apu_db_header=$bdb_header
23360
apu_db_lib=$bdb_libname
23365
if test "x$APRUTIL_INCLUDES" = "x"; then
23366
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$found/include\""
23367
APRUTIL_INCLUDES="-I$found/include"
23369
apr_addto_bugger="-I$found/include"
23370
for i in $apr_addto_bugger; do
23371
apr_addto_duplicate="0"
23372
for j in $APRUTIL_INCLUDES; do
23373
if test "x$i" = "x$j"; then
23374
apr_addto_duplicate="1"
23378
if test $apr_addto_duplicate = "0"; then
23379
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
23380
APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23386
if test "x$APRUTIL_LDFLAGS" = "x"; then
23387
test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$found/lib\""
23388
APRUTIL_LDFLAGS="-L$found/lib"
23390
apr_addto_bugger="-L$found/lib"
23391
for i in $apr_addto_bugger; do
23392
apr_addto_duplicate="0"
23393
for j in $APRUTIL_LDFLAGS; do
23394
if test "x$i" = "x$j"; then
23395
apr_addto_duplicate="1"
23399
if test $apr_addto_duplicate = "0"; then
23400
test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
23401
APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23406
apu_db_header=$bdb_header
23407
apu_db_lib=$bdb_libname
23412
if test "$apu_have_db" = "1"; then
23416
if test "$apu_db_version" != "5"; then
23418
places="$all_places"
23419
if test -z "$places"; then
22214
23420
places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"