~ubuntu-branches/ubuntu/saucy/apr-util/saucy-proposed

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch
  • Date: 2011-05-22 01:27:59 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110522012759-i80zd90uo6q1z4gr
Tags: 1.3.12+dfsg-1
* New upstream version
* Make apu-config not output dbm libs by default. Closes: #622081
* Set DEB_GCC_NO_O3=1 for the benefit of ppc64 on Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1398
1398
  --with-ldap-lib=path    path to ldap lib file
1399
1399
  --with-ldap=library     ldap library to use
1400
1400
  --with-dbm=DBM          choose the DBM type to use.
1401
 
                          DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50}
 
1401
                          DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50,db51}
1402
1402
  --with-gdbm=DIR         enable GDBM support
1403
1403
  --with-ndbm=PATH        Find the NDBM header and library in `PATH/include'
1404
1404
                          and `PATH/lib'. If PATH is of the form `HEADER:LIB',
2418
2418
 
2419
2419
 
2420
2420
 
 
2421
 
2421
2422
  rm -f config.nice
2422
2423
  cat >config.nice<<EOF
2423
2424
#! /bin/sh
3931
3932
      done
3932
3933
    fi
3933
3934
        if test "$apr_found" = "no" && test -d ""; then
3934
 
      apr_temp_abs_srcdir="`cd  && pwd`"
 
3935
      apr_temp_abs_srcdir="`cd \"\" && pwd`"
3935
3936
      apr_found="reconfig"
3936
3937
      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
3937
3938
      case $apr_bundled_major in
10456
10457
  withval=$with_dbm;
10457
10458
    if test "$withval" = "yes"; then
10458
10459
      as_fn_error "--with-dbm needs to specify a DBM type to use.
10459
 
        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50" "$LINENO" 5
 
10460
        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50, db51" "$LINENO" 5
10460
10461
    fi
10461
10462
    requested="$withval"
10462
10463
 
10924
10925
 
10925
10926
  places="$all_places"
10926
10927
  if test -z "$places"; then
 
10928
    places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
 
10929
  fi
 
10930
 
 
10931
  bdb_version="5"
 
10932
  if test ""1"" != "-1"; then
 
10933
    bdb_version="$bdb_version."1""
 
10934
    if test ""-1"" != "-1"; then
 
10935
      bdb_version="$bdb_version."-1""
 
10936
    fi
 
10937
  fi
 
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"
 
10941
 
 
10942
 
 
10943
  apu_have_db=0
 
10944
 
 
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"
 
10949
 
 
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.
 
10952
  found=not
 
10953
  for bdb_place in $bdb_places; do
 
10954
 
 
10955
    LDFLAGS="$apu_check_lib_save_ldflags"
 
10956
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
10957
    case "$bdb_place" in
 
10958
      "std" )
 
10959
        description="the standard places"
 
10960
      ;;
 
10961
      *":"* )
 
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"
 
10967
      ;;
 
10968
      * )
 
10969
        if test -d $bdb_place; then
 
10970
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
10971
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
10972
        else
 
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; }
 
10977
          continue
 
10978
        fi
 
10979
        description="$bdb_place"
 
10980
      ;;
 
10981
    esac
 
10982
 
 
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
 
10988
$as_echo "" >&6; }
 
10989
 
 
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
 
10993
 
 
10994
        cache_id="`echo ac_cv_header_${bdb_header} \
 
10995
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
10996
 
 
10997
        unset $cache_id
 
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 :
 
11002
 
 
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
 
11007
            # switches.
 
11008
 
 
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'`"
 
11011
 
 
11012
 
 
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
 
11017
else
 
11018
 
 
11019
 
 
11020
    apu_try_berkeley_db_save_libs="$LIBS"
 
11021
 
 
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
 
11027
 
 
11028
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
11029
    if test "$cross_compiling" = yes; then :
 
11030
  apu_try_berkeley_db=yes
 
11031
 
 
11032
else
 
11033
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
11034
/* end confdefs.h.  */
 
11035
 
 
11036
#include <stdlib.h>
 
11037
#include <stdio.h>
 
11038
#include <$apu_try_berkeley_db_header>
 
11039
main ()
 
11040
{
 
11041
  int major, minor, patch;
 
11042
 
 
11043
  db_version(&major, &minor, &patch);
 
11044
 
 
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)
 
11049
    exit (1);
 
11050
 
 
11051
  /* Run-time check:  ensure the library claims to be the correct version. */
 
11052
 
 
11053
  if ($apu_check_berkeley_db_major != -1) {
 
11054
    if (major < $apu_check_berkeley_db_major)
 
11055
      exit (1);
 
11056
    if (major > $apu_check_berkeley_db_major)
 
11057
      exit (0);
 
11058
  }
 
11059
 
 
11060
  if ($apu_check_berkeley_db_minor != -1) {
 
11061
    if (minor < $apu_check_berkeley_db_minor)
 
11062
      exit (1);
 
11063
    if (minor > $apu_check_berkeley_db_minor)
 
11064
      exit (0);
 
11065
  }
 
11066
 
 
11067
  if ($apu_check_berkeley_db_patch == -1
 
11068
      || patch >= $apu_check_berkeley_db_patch)
 
11069
    exit (0);
 
11070
  else
 
11071
    exit (1);
 
11072
}
 
11073
 
 
11074
_ACEOF
 
11075
if ac_fn_c_try_run "$LINENO"; then :
 
11076
  apu_try_berkeley_db=yes
 
11077
else
 
11078
  apu_try_berkeley_db=no
 
11079
fi
 
11080
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
11081
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
11082
fi
 
11083
 
 
11084
 
 
11085
    LIBS="$apu_try_berkeley_db_save_libs"
 
11086
 
 
11087
 
 
11088
                eval "$cache_id=$apu_try_berkeley_db"
 
11089
 
 
11090
fi
 
11091
 
 
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
 
11101
else
 
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.  */
 
11106
 
 
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.  */
 
11110
#ifdef __cplusplus
 
11111
extern "C"
 
11112
#endif
 
11113
char dbopen ();
 
11114
int
 
11115
main ()
 
11116
{
 
11117
return dbopen ();
 
11118
  ;
 
11119
  return 0;
 
11120
}
 
11121
_ACEOF
 
11122
if ac_fn_c_try_link "$LINENO"; then :
 
11123
  eval "$as_ac_Lib=yes"
 
11124
else
 
11125
  eval "$as_ac_Lib=no"
 
11126
fi
 
11127
rm -f core conftest.err conftest.$ac_objext \
 
11128
    conftest$ac_exeext conftest.$ac_ext
 
11129
LIBS=$ac_check_lib_save_LIBS
 
11130
fi
 
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 :
 
11136
  result=yes
 
11137
else
 
11138
  result=no
 
11139
 
 
11140
fi
 
11141
 
 
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
 
11148
else
 
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.  */
 
11153
 
 
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.  */
 
11157
#ifdef __cplusplus
 
11158
extern "C"
 
11159
#endif
 
11160
char db_open ();
 
11161
int
 
11162
main ()
 
11163
{
 
11164
return db_open ();
 
11165
  ;
 
11166
  return 0;
 
11167
}
 
11168
_ACEOF
 
11169
if ac_fn_c_try_link "$LINENO"; then :
 
11170
  eval "$as_ac_Lib=yes"
 
11171
else
 
11172
  eval "$as_ac_Lib=no"
 
11173
fi
 
11174
rm -f core conftest.err conftest.$ac_objext \
 
11175
    conftest$ac_exeext conftest.$ac_ext
 
11176
LIBS=$ac_check_lib_save_LIBS
 
11177
fi
 
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 :
 
11183
  result=yes
 
11184
else
 
11185
  result=no
 
11186
 
 
11187
fi
 
11188
 
 
11189
          fi
 
11190
 
 
11191
else
 
11192
  result="no"
 
11193
fi
 
11194
 
 
11195
 
 
11196
 
 
11197
        # If we found it, no need to search any more.
 
11198
        if test "$result" = "yes"; then
 
11199
          found="$bdb_place"
 
11200
          break
 
11201
        fi
 
11202
      done
 
11203
      test "$found" != "not" && break
 
11204
    done
 
11205
    test "$found" != "not" && break
 
11206
  done
 
11207
 
 
11208
  # Restore the original values of the flags we tweak.
 
11209
  LDFLAGS="$apu_check_lib_save_ldflags"
 
11210
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
11211
 
 
11212
  case "$found" in
 
11213
  "not")
 
11214
    apu_have_db=0
 
11215
    ;;
 
11216
  "std")
 
11217
    apu_db_header=$bdb_header
 
11218
    apu_db_lib=$bdb_libname
 
11219
    apu_have_db=1
 
11220
    ;;
 
11221
  *":"*)
 
11222
    header="`echo $found | sed -e 's/:.*$//'`"
 
11223
    lib="`echo $found | sed -e 's/^.*://'`"
 
11224
 
 
11225
 
 
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"
 
11229
  else
 
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"
 
11236
          break
 
11237
        fi
 
11238
      done
 
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"
 
11242
      fi
 
11243
    done
 
11244
  fi
 
11245
 
 
11246
 
 
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"
 
11250
  else
 
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"
 
11257
          break
 
11258
        fi
 
11259
      done
 
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"
 
11263
      fi
 
11264
    done
 
11265
  fi
 
11266
 
 
11267
    apu_db_header=$bdb_header
 
11268
    apu_db_lib=$bdb_libname
 
11269
    apu_have_db=1
 
11270
    ;;
 
11271
  *)
 
11272
 
 
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"
 
11276
  else
 
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"
 
11283
          break
 
11284
        fi
 
11285
      done
 
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"
 
11289
      fi
 
11290
    done
 
11291
  fi
 
11292
 
 
11293
 
 
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"
 
11297
  else
 
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"
 
11304
          break
 
11305
        fi
 
11306
      done
 
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"
 
11310
      fi
 
11311
    done
 
11312
  fi
 
11313
 
 
11314
    apu_db_header=$bdb_header
 
11315
    apu_db_lib=$bdb_libname
 
11316
    apu_have_db=1
 
11317
    ;;
 
11318
  esac
 
11319
 
 
11320
  if test "$apu_have_db" = "1"; then
 
11321
    apu_db_version=5
 
11322
  fi
 
11323
 
 
11324
  if test "$apu_db_version" != "5"; then
 
11325
 
 
11326
  places="$all_places"
 
11327
  if test -z "$places"; then
10927
11328
    places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
10928
11329
  fi
10929
11330
 
11320
11721
    apu_db_version=5
11321
11722
  fi
11322
11723
 
11323
 
  if test "$apu_db_version" != "5"; then
 
11724
    if test "$apu_db_version" != "5"; then
11324
11725
 
11325
11726
  places="$all_places"
11326
11727
  if test -z "$places"; then
11720
12121
    apu_db_version=4
11721
12122
  fi
11722
12123
 
11723
 
    if test "$apu_db_version" != "4"; then
 
12124
      if test "$apu_db_version" != "4"; then
11724
12125
 
11725
12126
  places="$all_places"
11726
12127
  if test -z "$places"; then
12120
12521
    apu_db_version=4
12121
12522
  fi
12122
12523
 
12123
 
      if test "$apu_db_version" != "4"; then
 
12524
        if test "$apu_db_version" != "4"; then
12124
12525
 
12125
12526
  places="$all_places"
12126
12527
  if test -z "$places"; then
12520
12921
    apu_db_version=4
12521
12922
  fi
12522
12923
 
12523
 
        if test "$apu_db_version" != "4"; then
 
12924
          if test "$apu_db_version" != "4"; then
12524
12925
 
12525
12926
  places="$all_places"
12526
12927
  if test -z "$places"; then
12920
13321
    apu_db_version=4
12921
13322
  fi
12922
13323
 
12923
 
          if test "$apu_db_version" != "4"; then
 
13324
            if test "$apu_db_version" != "4"; then
12924
13325
 
12925
13326
  places="$all_places"
12926
13327
  if test -z "$places"; then
13320
13721
    apu_db_version=4
13321
13722
  fi
13322
13723
 
13323
 
            if test "$apu_db_version" != "4"; then
 
13724
              if test "$apu_db_version" != "4"; then
13324
13725
 
13325
13726
  places="$all_places"
13326
13727
  if test -z "$places"; then
13720
14121
    apu_db_version=4
13721
14122
  fi
13722
14123
 
13723
 
              if test "$apu_db_version" != "4"; then
 
14124
                if test "$apu_db_version" != "4"; then
13724
14125
 
13725
14126
  places="$all_places"
13726
14127
  if test -z "$places"; then
14120
14521
    apu_db_version=4
14121
14522
  fi
14122
14523
 
14123
 
                if test "$apu_db_version" != "4"; then
 
14524
                  if test "$apu_db_version" != "4"; then
14124
14525
 
14125
14526
  places="$all_places"
14126
14527
  if test -z "$places"; then
14520
14921
    apu_db_version=4
14521
14922
  fi
14522
14923
 
14523
 
                  if test "$apu_db_version" != "4"; then
 
14924
                    if test "$apu_db_version" != "4"; then
14524
14925
 
14525
14926
  places="$all_places"
14526
14927
  if test -z "$places"; then
14920
15321
    apu_db_version=4
14921
15322
  fi
14922
15323
 
14923
 
                    if test "$apu_db_version" != "4"; then
 
15324
                      if test "$apu_db_version" != "4"; then
14924
15325
 
14925
15326
  places="$all_places"
14926
15327
  if test -z "$places"; then
15320
15721
    apu_db_version=3
15321
15722
  fi
15322
15723
 
15323
 
                      if test "$apu_db_version" != "3"; then
 
15724
                        if test "$apu_db_version" != "3"; then
15324
15725
 
15325
15726
  places="$all_places"
15326
15727
  if test -z "$places"; then
15720
16121
    apu_db_version=2
15721
16122
  fi
15722
16123
 
15723
 
                        if test "$apu_db_version" != "2"; then
 
16124
                          if test "$apu_db_version" != "2"; then
15724
16125
 
15725
16126
  places="$all_places"
15726
16127
  if test -z "$places"; then
16120
16521
    apu_db_version=1
16121
16522
  fi
16122
16523
 
16123
 
                          if test "$apu_db_version" != "1"; then
 
16524
                            if test "$apu_db_version" != "1"; then
16124
16525
 
16125
16526
  places="$all_places"
16126
16527
  if test -z "$places"; then
16520
16921
    apu_db_version=185
16521
16922
  fi
16522
16923
 
 
16924
                            fi
16523
16925
                          fi
16524
16926
                        fi
16525
16927
                      fi
22204
22606
      as_fn_error "Berkeley db5 not found" "$LINENO" 5
22205
22607
    fi
22206
22608
    ;;
 
22609
  db51)
 
22610
 
 
22611
  places="$check_places"
 
22612
  if test -z "$places"; then
 
22613
    places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
 
22614
  fi
 
22615
 
 
22616
  bdb_version="5"
 
22617
  if test ""1"" != "-1"; then
 
22618
    bdb_version="$bdb_version."1""
 
22619
    if test ""-1"" != "-1"; then
 
22620
      bdb_version="$bdb_version."-1""
 
22621
    fi
 
22622
  fi
 
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"
 
22626
 
 
22627
 
 
22628
  apu_have_db=0
 
22629
 
 
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"
 
22634
 
 
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.
 
22637
  found=not
 
22638
  for bdb_place in $bdb_places; do
 
22639
 
 
22640
    LDFLAGS="$apu_check_lib_save_ldflags"
 
22641
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
22642
    case "$bdb_place" in
 
22643
      "std" )
 
22644
        description="the standard places"
 
22645
      ;;
 
22646
      *":"* )
 
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"
 
22652
      ;;
 
22653
      * )
 
22654
        if test -d $bdb_place; then
 
22655
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
22656
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
22657
        else
 
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; }
 
22662
          continue
 
22663
        fi
 
22664
        description="$bdb_place"
 
22665
      ;;
 
22666
    esac
 
22667
 
 
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
 
22673
$as_echo "" >&6; }
 
22674
 
 
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
 
22678
 
 
22679
        cache_id="`echo ac_cv_header_${bdb_header} \
 
22680
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
22681
 
 
22682
        unset $cache_id
 
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 :
 
22687
 
 
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
 
22692
            # switches.
 
22693
 
 
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'`"
 
22696
 
 
22697
 
 
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
 
22702
else
 
22703
 
 
22704
 
 
22705
    apu_try_berkeley_db_save_libs="$LIBS"
 
22706
 
 
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
 
22712
 
 
22713
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
22714
    if test "$cross_compiling" = yes; then :
 
22715
  apu_try_berkeley_db=yes
 
22716
 
 
22717
else
 
22718
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22719
/* end confdefs.h.  */
 
22720
 
 
22721
#include <stdlib.h>
 
22722
#include <stdio.h>
 
22723
#include <$apu_try_berkeley_db_header>
 
22724
main ()
 
22725
{
 
22726
  int major, minor, patch;
 
22727
 
 
22728
  db_version(&major, &minor, &patch);
 
22729
 
 
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)
 
22734
    exit (1);
 
22735
 
 
22736
  /* Run-time check:  ensure the library claims to be the correct version. */
 
22737
 
 
22738
  if ($apu_check_berkeley_db_major != -1) {
 
22739
    if (major < $apu_check_berkeley_db_major)
 
22740
      exit (1);
 
22741
    if (major > $apu_check_berkeley_db_major)
 
22742
      exit (0);
 
22743
  }
 
22744
 
 
22745
  if ($apu_check_berkeley_db_minor != -1) {
 
22746
    if (minor < $apu_check_berkeley_db_minor)
 
22747
      exit (1);
 
22748
    if (minor > $apu_check_berkeley_db_minor)
 
22749
      exit (0);
 
22750
  }
 
22751
 
 
22752
  if ($apu_check_berkeley_db_patch == -1
 
22753
      || patch >= $apu_check_berkeley_db_patch)
 
22754
    exit (0);
 
22755
  else
 
22756
    exit (1);
 
22757
}
 
22758
 
 
22759
_ACEOF
 
22760
if ac_fn_c_try_run "$LINENO"; then :
 
22761
  apu_try_berkeley_db=yes
 
22762
else
 
22763
  apu_try_berkeley_db=no
 
22764
fi
 
22765
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
22766
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
22767
fi
 
22768
 
 
22769
 
 
22770
    LIBS="$apu_try_berkeley_db_save_libs"
 
22771
 
 
22772
 
 
22773
                eval "$cache_id=$apu_try_berkeley_db"
 
22774
 
 
22775
fi
 
22776
 
 
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
 
22786
else
 
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.  */
 
22791
 
 
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.  */
 
22795
#ifdef __cplusplus
 
22796
extern "C"
 
22797
#endif
 
22798
char dbopen ();
 
22799
int
 
22800
main ()
 
22801
{
 
22802
return dbopen ();
 
22803
  ;
 
22804
  return 0;
 
22805
}
 
22806
_ACEOF
 
22807
if ac_fn_c_try_link "$LINENO"; then :
 
22808
  eval "$as_ac_Lib=yes"
 
22809
else
 
22810
  eval "$as_ac_Lib=no"
 
22811
fi
 
22812
rm -f core conftest.err conftest.$ac_objext \
 
22813
    conftest$ac_exeext conftest.$ac_ext
 
22814
LIBS=$ac_check_lib_save_LIBS
 
22815
fi
 
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 :
 
22821
  result=yes
 
22822
else
 
22823
  result=no
 
22824
 
 
22825
fi
 
22826
 
 
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
 
22833
else
 
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.  */
 
22838
 
 
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.  */
 
22842
#ifdef __cplusplus
 
22843
extern "C"
 
22844
#endif
 
22845
char db_open ();
 
22846
int
 
22847
main ()
 
22848
{
 
22849
return db_open ();
 
22850
  ;
 
22851
  return 0;
 
22852
}
 
22853
_ACEOF
 
22854
if ac_fn_c_try_link "$LINENO"; then :
 
22855
  eval "$as_ac_Lib=yes"
 
22856
else
 
22857
  eval "$as_ac_Lib=no"
 
22858
fi
 
22859
rm -f core conftest.err conftest.$ac_objext \
 
22860
    conftest$ac_exeext conftest.$ac_ext
 
22861
LIBS=$ac_check_lib_save_LIBS
 
22862
fi
 
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 :
 
22868
  result=yes
 
22869
else
 
22870
  result=no
 
22871
 
 
22872
fi
 
22873
 
 
22874
          fi
 
22875
 
 
22876
else
 
22877
  result="no"
 
22878
fi
 
22879
 
 
22880
 
 
22881
 
 
22882
        # If we found it, no need to search any more.
 
22883
        if test "$result" = "yes"; then
 
22884
          found="$bdb_place"
 
22885
          break
 
22886
        fi
 
22887
      done
 
22888
      test "$found" != "not" && break
 
22889
    done
 
22890
    test "$found" != "not" && break
 
22891
  done
 
22892
 
 
22893
  # Restore the original values of the flags we tweak.
 
22894
  LDFLAGS="$apu_check_lib_save_ldflags"
 
22895
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
22896
 
 
22897
  case "$found" in
 
22898
  "not")
 
22899
    apu_have_db=0
 
22900
    ;;
 
22901
  "std")
 
22902
    apu_db_header=$bdb_header
 
22903
    apu_db_lib=$bdb_libname
 
22904
    apu_have_db=1
 
22905
    ;;
 
22906
  *":"*)
 
22907
    header="`echo $found | sed -e 's/:.*$//'`"
 
22908
    lib="`echo $found | sed -e 's/^.*://'`"
 
22909
 
 
22910
 
 
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"
 
22914
  else
 
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"
 
22921
          break
 
22922
        fi
 
22923
      done
 
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"
 
22927
      fi
 
22928
    done
 
22929
  fi
 
22930
 
 
22931
 
 
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"
 
22935
  else
 
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"
 
22942
          break
 
22943
        fi
 
22944
      done
 
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"
 
22948
      fi
 
22949
    done
 
22950
  fi
 
22951
 
 
22952
    apu_db_header=$bdb_header
 
22953
    apu_db_lib=$bdb_libname
 
22954
    apu_have_db=1
 
22955
    ;;
 
22956
  *)
 
22957
 
 
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"
 
22961
  else
 
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"
 
22968
          break
 
22969
        fi
 
22970
      done
 
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"
 
22974
      fi
 
22975
    done
 
22976
  fi
 
22977
 
 
22978
 
 
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"
 
22982
  else
 
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"
 
22989
          break
 
22990
        fi
 
22991
      done
 
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"
 
22995
      fi
 
22996
    done
 
22997
  fi
 
22998
 
 
22999
    apu_db_header=$bdb_header
 
23000
    apu_db_lib=$bdb_libname
 
23001
    apu_have_db=1
 
23002
    ;;
 
23003
  esac
 
23004
 
 
23005
  if test "$apu_have_db" = "1"; then
 
23006
    apu_db_version=5
 
23007
  fi
 
23008
 
 
23009
    if test "$apu_db_version" != "5"; then
 
23010
      as_fn_error "Berkeley db5 not found" "$LINENO" 5
 
23011
    fi
 
23012
    ;;
22207
23013
  default)
22208
23014
 
22209
23015
  all_places="$check_places"
22211
23017
 
22212
23018
  places="$all_places"
22213
23019
  if test -z "$places"; then
 
23020
    places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
 
23021
  fi
 
23022
 
 
23023
  bdb_version="5"
 
23024
  if test ""1"" != "-1"; then
 
23025
    bdb_version="$bdb_version."1""
 
23026
    if test ""-1"" != "-1"; then
 
23027
      bdb_version="$bdb_version."-1""
 
23028
    fi
 
23029
  fi
 
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"
 
23033
 
 
23034
 
 
23035
  apu_have_db=0
 
23036
 
 
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"
 
23041
 
 
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.
 
23044
  found=not
 
23045
  for bdb_place in $bdb_places; do
 
23046
 
 
23047
    LDFLAGS="$apu_check_lib_save_ldflags"
 
23048
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
23049
    case "$bdb_place" in
 
23050
      "std" )
 
23051
        description="the standard places"
 
23052
      ;;
 
23053
      *":"* )
 
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"
 
23059
      ;;
 
23060
      * )
 
23061
        if test -d $bdb_place; then
 
23062
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
23063
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
23064
        else
 
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; }
 
23069
          continue
 
23070
        fi
 
23071
        description="$bdb_place"
 
23072
      ;;
 
23073
    esac
 
23074
 
 
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
 
23080
$as_echo "" >&6; }
 
23081
 
 
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
 
23085
 
 
23086
        cache_id="`echo ac_cv_header_${bdb_header} \
 
23087
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
23088
 
 
23089
        unset $cache_id
 
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 :
 
23094
 
 
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
 
23099
            # switches.
 
23100
 
 
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'`"
 
23103
 
 
23104
 
 
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
 
23109
else
 
23110
 
 
23111
 
 
23112
    apu_try_berkeley_db_save_libs="$LIBS"
 
23113
 
 
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
 
23119
 
 
23120
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
23121
    if test "$cross_compiling" = yes; then :
 
23122
  apu_try_berkeley_db=yes
 
23123
 
 
23124
else
 
23125
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
23126
/* end confdefs.h.  */
 
23127
 
 
23128
#include <stdlib.h>
 
23129
#include <stdio.h>
 
23130
#include <$apu_try_berkeley_db_header>
 
23131
main ()
 
23132
{
 
23133
  int major, minor, patch;
 
23134
 
 
23135
  db_version(&major, &minor, &patch);
 
23136
 
 
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)
 
23141
    exit (1);
 
23142
 
 
23143
  /* Run-time check:  ensure the library claims to be the correct version. */
 
23144
 
 
23145
  if ($apu_check_berkeley_db_major != -1) {
 
23146
    if (major < $apu_check_berkeley_db_major)
 
23147
      exit (1);
 
23148
    if (major > $apu_check_berkeley_db_major)
 
23149
      exit (0);
 
23150
  }
 
23151
 
 
23152
  if ($apu_check_berkeley_db_minor != -1) {
 
23153
    if (minor < $apu_check_berkeley_db_minor)
 
23154
      exit (1);
 
23155
    if (minor > $apu_check_berkeley_db_minor)
 
23156
      exit (0);
 
23157
  }
 
23158
 
 
23159
  if ($apu_check_berkeley_db_patch == -1
 
23160
      || patch >= $apu_check_berkeley_db_patch)
 
23161
    exit (0);
 
23162
  else
 
23163
    exit (1);
 
23164
}
 
23165
 
 
23166
_ACEOF
 
23167
if ac_fn_c_try_run "$LINENO"; then :
 
23168
  apu_try_berkeley_db=yes
 
23169
else
 
23170
  apu_try_berkeley_db=no
 
23171
fi
 
23172
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
23173
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
23174
fi
 
23175
 
 
23176
 
 
23177
    LIBS="$apu_try_berkeley_db_save_libs"
 
23178
 
 
23179
 
 
23180
                eval "$cache_id=$apu_try_berkeley_db"
 
23181
 
 
23182
fi
 
23183
 
 
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
 
23193
else
 
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.  */
 
23198
 
 
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.  */
 
23202
#ifdef __cplusplus
 
23203
extern "C"
 
23204
#endif
 
23205
char dbopen ();
 
23206
int
 
23207
main ()
 
23208
{
 
23209
return dbopen ();
 
23210
  ;
 
23211
  return 0;
 
23212
}
 
23213
_ACEOF
 
23214
if ac_fn_c_try_link "$LINENO"; then :
 
23215
  eval "$as_ac_Lib=yes"
 
23216
else
 
23217
  eval "$as_ac_Lib=no"
 
23218
fi
 
23219
rm -f core conftest.err conftest.$ac_objext \
 
23220
    conftest$ac_exeext conftest.$ac_ext
 
23221
LIBS=$ac_check_lib_save_LIBS
 
23222
fi
 
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 :
 
23228
  result=yes
 
23229
else
 
23230
  result=no
 
23231
 
 
23232
fi
 
23233
 
 
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
 
23240
else
 
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.  */
 
23245
 
 
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.  */
 
23249
#ifdef __cplusplus
 
23250
extern "C"
 
23251
#endif
 
23252
char db_open ();
 
23253
int
 
23254
main ()
 
23255
{
 
23256
return db_open ();
 
23257
  ;
 
23258
  return 0;
 
23259
}
 
23260
_ACEOF
 
23261
if ac_fn_c_try_link "$LINENO"; then :
 
23262
  eval "$as_ac_Lib=yes"
 
23263
else
 
23264
  eval "$as_ac_Lib=no"
 
23265
fi
 
23266
rm -f core conftest.err conftest.$ac_objext \
 
23267
    conftest$ac_exeext conftest.$ac_ext
 
23268
LIBS=$ac_check_lib_save_LIBS
 
23269
fi
 
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 :
 
23275
  result=yes
 
23276
else
 
23277
  result=no
 
23278
 
 
23279
fi
 
23280
 
 
23281
          fi
 
23282
 
 
23283
else
 
23284
  result="no"
 
23285
fi
 
23286
 
 
23287
 
 
23288
 
 
23289
        # If we found it, no need to search any more.
 
23290
        if test "$result" = "yes"; then
 
23291
          found="$bdb_place"
 
23292
          break
 
23293
        fi
 
23294
      done
 
23295
      test "$found" != "not" && break
 
23296
    done
 
23297
    test "$found" != "not" && break
 
23298
  done
 
23299
 
 
23300
  # Restore the original values of the flags we tweak.
 
23301
  LDFLAGS="$apu_check_lib_save_ldflags"
 
23302
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
23303
 
 
23304
  case "$found" in
 
23305
  "not")
 
23306
    apu_have_db=0
 
23307
    ;;
 
23308
  "std")
 
23309
    apu_db_header=$bdb_header
 
23310
    apu_db_lib=$bdb_libname
 
23311
    apu_have_db=1
 
23312
    ;;
 
23313
  *":"*)
 
23314
    header="`echo $found | sed -e 's/:.*$//'`"
 
23315
    lib="`echo $found | sed -e 's/^.*://'`"
 
23316
 
 
23317
 
 
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"
 
23321
  else
 
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"
 
23328
          break
 
23329
        fi
 
23330
      done
 
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"
 
23334
      fi
 
23335
    done
 
23336
  fi
 
23337
 
 
23338
 
 
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"
 
23342
  else
 
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"
 
23349
          break
 
23350
        fi
 
23351
      done
 
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"
 
23355
      fi
 
23356
    done
 
23357
  fi
 
23358
 
 
23359
    apu_db_header=$bdb_header
 
23360
    apu_db_lib=$bdb_libname
 
23361
    apu_have_db=1
 
23362
    ;;
 
23363
  *)
 
23364
 
 
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"
 
23368
  else
 
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"
 
23375
          break
 
23376
        fi
 
23377
      done
 
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"
 
23381
      fi
 
23382
    done
 
23383
  fi
 
23384
 
 
23385
 
 
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"
 
23389
  else
 
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"
 
23396
          break
 
23397
        fi
 
23398
      done
 
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"
 
23402
      fi
 
23403
    done
 
23404
  fi
 
23405
 
 
23406
    apu_db_header=$bdb_header
 
23407
    apu_db_lib=$bdb_libname
 
23408
    apu_have_db=1
 
23409
    ;;
 
23410
  esac
 
23411
 
 
23412
  if test "$apu_have_db" = "1"; then
 
23413
    apu_db_version=5
 
23414
  fi
 
23415
 
 
23416
  if test "$apu_db_version" != "5"; then
 
23417
 
 
23418
  places="$all_places"
 
23419
  if test -z "$places"; then
22214
23420
    places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
22215
23421
  fi
22216
23422
 
22607
23813
    apu_db_version=5
22608
23814
  fi
22609
23815
 
22610
 
  if test "$apu_db_version" != "5"; then
 
23816
    if test "$apu_db_version" != "5"; then
22611
23817
 
22612
23818
  places="$all_places"
22613
23819
  if test -z "$places"; then
23007
24213
    apu_db_version=4
23008
24214
  fi
23009
24215
 
23010
 
    if test "$apu_db_version" != "4"; then
 
24216
      if test "$apu_db_version" != "4"; then
23011
24217
 
23012
24218
  places="$all_places"
23013
24219
  if test -z "$places"; then
23407
24613
    apu_db_version=4
23408
24614
  fi
23409
24615
 
23410
 
      if test "$apu_db_version" != "4"; then
 
24616
        if test "$apu_db_version" != "4"; then
23411
24617
 
23412
24618
  places="$all_places"
23413
24619
  if test -z "$places"; then
23807
25013
    apu_db_version=4
23808
25014
  fi
23809
25015
 
23810
 
        if test "$apu_db_version" != "4"; then
 
25016
          if test "$apu_db_version" != "4"; then
23811
25017
 
23812
25018
  places="$all_places"
23813
25019
  if test -z "$places"; then
24207
25413
    apu_db_version=4
24208
25414
  fi
24209
25415
 
24210
 
          if test "$apu_db_version" != "4"; then
 
25416
            if test "$apu_db_version" != "4"; then
24211
25417
 
24212
25418
  places="$all_places"
24213
25419
  if test -z "$places"; then
24607
25813
    apu_db_version=4
24608
25814
  fi
24609
25815
 
24610
 
            if test "$apu_db_version" != "4"; then
 
25816
              if test "$apu_db_version" != "4"; then
24611
25817
 
24612
25818
  places="$all_places"
24613
25819
  if test -z "$places"; then
25007
26213
    apu_db_version=4
25008
26214
  fi
25009
26215
 
25010
 
              if test "$apu_db_version" != "4"; then
 
26216
                if test "$apu_db_version" != "4"; then
25011
26217
 
25012
26218
  places="$all_places"
25013
26219
  if test -z "$places"; then
25407
26613
    apu_db_version=4
25408
26614
  fi
25409
26615
 
25410
 
                if test "$apu_db_version" != "4"; then
 
26616
                  if test "$apu_db_version" != "4"; then
25411
26617
 
25412
26618
  places="$all_places"
25413
26619
  if test -z "$places"; then
25807
27013
    apu_db_version=4
25808
27014
  fi
25809
27015
 
25810
 
                  if test "$apu_db_version" != "4"; then
 
27016
                    if test "$apu_db_version" != "4"; then
25811
27017
 
25812
27018
  places="$all_places"
25813
27019
  if test -z "$places"; then
26207
27413
    apu_db_version=4
26208
27414
  fi
26209
27415
 
26210
 
                    if test "$apu_db_version" != "4"; then
 
27416
                      if test "$apu_db_version" != "4"; then
26211
27417
 
26212
27418
  places="$all_places"
26213
27419
  if test -z "$places"; then
26607
27813
    apu_db_version=3
26608
27814
  fi
26609
27815
 
26610
 
                      if test "$apu_db_version" != "3"; then
 
27816
                        if test "$apu_db_version" != "3"; then
26611
27817
 
26612
27818
  places="$all_places"
26613
27819
  if test -z "$places"; then
27007
28213
    apu_db_version=2
27008
28214
  fi
27009
28215
 
27010
 
                        if test "$apu_db_version" != "2"; then
 
28216
                          if test "$apu_db_version" != "2"; then
27011
28217
 
27012
28218
  places="$all_places"
27013
28219
  if test -z "$places"; then
27407
28613
    apu_db_version=1
27408
28614
  fi
27409
28615
 
27410
 
                          if test "$apu_db_version" != "1"; then
 
28616
                            if test "$apu_db_version" != "1"; then
27411
28617
 
27412
28618
  places="$all_places"
27413
28619
  if test -z "$places"; then
27807
29013
    apu_db_version=185
27808
29014
  fi
27809
29015
 
 
29016
                            fi
27810
29017
                          fi
27811
29018
                        fi
27812
29019
                      fi
27918
29125
      apu_use_db=1
27919
29126
      apu_default_dbm=db5
27920
29127
      ;;
 
29128
    db51)
 
29129
      apu_use_db=1
 
29130
      apu_default_dbm=db5
 
29131
      ;;
27921
29132
    default)
27922
29133
            apu_default_dbm="sdbm (default)"
27923
29134
      apu_use_sdbm=1
27924
29135
      ;;
27925
29136
    *)
27926
29137
      as_fn_error "--with-dbm=$look_for is an unknown DBM type.
27927
 
        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50" "$LINENO" 5
 
29138
        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50, db51" "$LINENO" 5
27928
29139
      ;;
27929
29140
  esac
27930
29141
 
31416
32627
        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
31417
32628
        odbc_LIBS="`$ODBC_CONFIG --libs`"
31418
32629
      else
31419
 
        odbc_CPPFLAGS="-I$withval/include"
31420
 
        odbc_LDFLAGS="-L$withval/lib "
 
32630
        if test -f "$withval" && test -x "$withval"; then
 
32631
          odbc_CPPFLAGS="-I`$withval --include-prefix`"
 
32632
          odbc_LDFLAGS="-L`$withval --lib-prefix`"
 
32633
          odbc_LIBS="`$withval --libs`"
 
32634
        else
 
32635
          odbc_CPPFLAGS="-I$withval/include"
 
32636
          odbc_LDFLAGS="-L$withval/lib "
 
32637
        fi
31421
32638
      fi
31422
32639
 
31423
32640
 
32502
33719
 
32503
33720
 
32504
33721
  if test "x$APRUTIL_INCLUDES" = "x"; then
32505
 
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$top_builddir/$bundled_subdir/lib\""
32506
 
    APRUTIL_INCLUDES="-I$top_builddir/$bundled_subdir/lib"
 
33722
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$abs_srcdir/$bundled_subdir/lib\""
 
33723
    APRUTIL_INCLUDES="-I$abs_srcdir/$bundled_subdir/lib"
32507
33724
  else
32508
 
    apr_addto_bugger="-I$top_builddir/$bundled_subdir/lib"
 
33725
    apr_addto_bugger="-I$abs_srcdir/$bundled_subdir/lib"
32509
33726
    for i in $apr_addto_bugger; do
32510
33727
      apr_addto_duplicate="0"
32511
33728
      for j in $APRUTIL_INCLUDES; do