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
dnl APU_CHECK_DB48: is DB4.8 present?
528
dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
530
AC_DEFUN([APU_CHECK_DB48], [
532
if test -z "$places"; then
533
places="std /usr/local/BerkeleyDB.4.8 /boot/home/config"
535
APU_CHECK_BERKELEY_DB("4", "8", "-1",
537
"db48/db.h db4/db.h db.h",
538
"db-4.8 db4-4.8 db48 db4 db"
540
if test "$apu_have_db" = "1"; then
545
dnl APU_CHECK_DB50: is DB5.0 present?
547
dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
549
AC_DEFUN([APU_CHECK_DB50], [
551
if test -z "$places"; then
552
places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
554
APU_CHECK_BERKELEY_DB("5", "0", "-1",
556
"db50/db.h db5/db.h db.h",
557
"db-5.0 db5-5.0 db50 db5 db"
559
if test "$apu_have_db" = "1"; then
564
dnl APU_CHECK_DB51: is DB5.1 present?
566
dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
568
AC_DEFUN([APU_CHECK_DB51], [
570
if test -z "$places"; then
571
places="std /usr/local/BerkeleyDB.5.1 /boot/home/config"
573
APU_CHECK_BERKELEY_DB("5", "1", "-1",
575
"db51/db.h db5/db.h db.h",
576
"db-5.1 db5-5.1 db51 db5 db"
578
if test "$apu_have_db" = "1"; then
370
dnl APU_CHECK_DBXY: is DBX.Y present?
372
dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
374
AC_DEFUN([APU_CHECK_DBXY], [
378
if test -z "$places"; then
379
places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
381
APU_CHECK_BERKELEY_DB("${db_major}", "${db_minor}", "-1",
383
"db${db_major}${db_minor}/db.h db${db_major}/db.h db.h",
384
"db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
386
if test "$apu_have_db" = "1"; then
387
apu_db_version=${db_major}
583
392
AC_DEFUN([APU_CHECK_DB], [
615
424
AC_MSG_ERROR(Berkeley db3 not found)
619
APU_CHECK_DB4("$check_places")
620
if test "$apu_db_version" != "4"; then
621
AC_MSG_ERROR(Berkeley db4 not found)
625
APU_CHECK_DB41("$check_places")
626
if test "$apu_db_version" != "4"; then
627
AC_MSG_ERROR(Berkeley db4 not found)
631
APU_CHECK_DB42("$check_places")
632
if test "$apu_db_version" != "4"; then
633
AC_MSG_ERROR(Berkeley db4 not found)
637
APU_CHECK_DB43("$check_places")
638
if test "$apu_db_version" != "4"; then
639
AC_MSG_ERROR(Berkeley db4 not found)
643
APU_CHECK_DB44("$check_places")
644
if test "$apu_db_version" != "4"; then
645
AC_MSG_ERROR(Berkeley db4 not found)
649
APU_CHECK_DB45("$check_places")
650
if test "$apu_db_version" != "4"; then
651
AC_MSG_ERROR(Berkeley db4 not found)
655
APU_CHECK_DB46("$check_places")
656
if test "$apu_db_version" != "4"; then
657
AC_MSG_ERROR(Berkeley db4 not found)
661
APU_CHECK_DB47("$check_places")
662
if test "$apu_db_version" != "4"; then
663
AC_MSG_ERROR(Berkeley db4 not found)
667
APU_CHECK_DB48("$check_places")
668
if test "$apu_db_version" != "4"; then
669
AC_MSG_ERROR(Berkeley db4 not found)
673
APU_CHECK_DB50("$check_places")
674
if test "$apu_db_version" != "5"; then
675
AC_MSG_ERROR(Berkeley db5 not found)
679
APU_CHECK_DB51("$check_places")
680
if test "$apu_db_version" != "5"; then
681
AC_MSG_ERROR(Berkeley db5 not found)
428
db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'`
429
db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'`
430
APU_CHECK_DBXY("$check_places", "$db_major", "$db_minor")
431
if test "$apu_db_version" != "$db_major"; then
432
AC_MSG_ERROR(Berkeley db$db_major not found)
436
db_major=`echo "$requested" | sed -e 's/db//'`
437
# Start version search at version x.9
439
while [[ $db_minor -ge 0 ]]
441
APU_CHECK_DBXY("$check_places", "$db_major", "$db_minor")
442
if test "$apu_have_db" = "1"; then
445
db_minor=`expr $db_minor - 1`
447
if test "$apu_db_version" != "$db_major"; then
448
AC_MSG_ERROR(Berkeley db$db_major not found)
691
dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 5.1 to 1.
458
dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 5.X to 1.
693
460
AC_DEFUN([APU_CHECK_DB_ALL], [
696
APU_CHECK_DB51("$all_places")
697
if test "$apu_db_version" != "5"; then
698
APU_CHECK_DB50("$all_places")
699
if test "$apu_db_version" != "5"; then
700
APU_CHECK_DB48("$all_places")
701
if test "$apu_db_version" != "4"; then
702
APU_CHECK_DB47("$all_places")
703
if test "$apu_db_version" != "4"; then
704
APU_CHECK_DB46("$all_places")
705
if test "$apu_db_version" != "4"; then
706
APU_CHECK_DB45("$all_places")
707
if test "$apu_db_version" != "4"; then
708
APU_CHECK_DB44("$all_places")
709
if test "$apu_db_version" != "4"; then
710
APU_CHECK_DB43("$all_places")
711
if test "$apu_db_version" != "4"; then
712
APU_CHECK_DB42("$all_places")
713
if test "$apu_db_version" != "4"; then
714
APU_CHECK_DB41("$all_places")
715
if test "$apu_db_version" != "4"; then
716
APU_CHECK_DB4("$all_places")
717
if test "$apu_db_version" != "4"; then
718
APU_CHECK_DB3("$all_places")
719
if test "$apu_db_version" != "3"; then
720
APU_CHECK_DB2("$all_places")
721
if test "$apu_db_version" != "2"; then
722
APU_CHECK_DB1("$all_places")
723
if test "$apu_db_version" != "1"; then
724
APU_CHECK_DB185("$all_places")
463
# Start version search at version 5.9
465
while [[ $db_version -ge 40 ]]
467
db_major=`echo $db_version | sed -e 's/.$//'`
468
db_minor=`echo $db_version | sed -e 's/.//'`
469
APU_CHECK_DBXY("$all_places", "$db_major", "$db_minor")
470
if test "$apu_have_db" = "1"; then
473
db_version=`expr $db_version - 1`
475
if test "$apu_have_db" = "0"; then
476
APU_CHECK_DB3("$all_places")
478
if test "$apu_have_db" = "0"; then
479
APU_CHECK_DB2("$all_places")
481
if test "$apu_have_db" = "0"; then
482
APU_CHECK_DB1("$all_places")
484
if test "$apu_have_db" = "0"; then
485
APU_CHECK_DB185("$all_places")
739
487
AC_MSG_CHECKING(for Berkeley DB)
740
488
if test "$apu_have_db" = "1"; then
762
510
apu_db_header=db.h # default so apu_select_dbm.h is syntactically correct
513
# Maximum supported version announced in help string.
514
# Although we search for all versions up to 5.9,
515
# we should only include existing versions in our
519
dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
520
db_version="$db_min_version"
521
while [[ $db_version -le $db_max_version ]]
523
dbm_list="$dbm_list, db$db_version"
524
db_version=`expr $db_version + 1`
765
527
AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
766
DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50,db51}])],
528
DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X} for some X=0,...,9])],
768
530
if test "$withval" = "yes"; then
769
531
AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
770
One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50, db51])
772
534
requested="$withval"