diff --git a/.gitattributes b/.gitattributes index 9f1694c9..37632873 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,7 +21,9 @@ NeoStats.xcode/project.pbxproj -text /aclocal.m4 -text autotools/acinclude.m4 -text autotools/aclocal.m4 -text +autotools/ax_compare_version.m4 -text autotools/ax_maintainer_mode_auto_silent.m4 -text +autotools/ax_path_bdb.m4 -text autotools/ax_path_lib_curl.m4 -text autotools/ax_path_lib_pcre.m4 -text autotools/ccdv.c -text @@ -347,6 +349,7 @@ modules/dbm/bdb/Makefile.am -text modules/dbm/bdb/Makefile.in -text modules/dbm/bdb/bdb.c -text modules/dbm/bdb/bdb.vcproj -text +modules/dbm/convertdb.c -text modules/dbm/gdbm/Makefile.am -text modules/dbm/gdbm/Makefile.in -text modules/dbm/gdbm/bucket.c -text diff --git a/Makefile.am b/Makefile.am index c19c58a1..3ac44b3a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ AM_MAKEFLAGS = -s dist_bin_SCRIPTS = makeconf dist_data_DATA = neostats.motd -docdir = @prefix@/doc +#docdir = @prefix@/doc dist_doc_DATA = doc/FAQ doc/USERMAN DISTCLEANFILES = autotools/ccdv diff --git a/Makefile.in b/Makefile.in index f1432ea3..689680c8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,7 +47,9 @@ DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -104,6 +106,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -123,6 +128,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -230,13 +237,15 @@ ACLOCAL_AMFLAGS = -I autotools AM_MAKEFLAGS = -s dist_bin_SCRIPTS = makeconf dist_data_DATA = neostats.motd -docdir = @prefix@/doc + +#docdir = @prefix@/doc dist_doc_DATA = doc/FAQ doc/USERMAN DISTCLEANFILES = autotools/ccdv EXTRA_DIST = autotools/ccdv.c CREDITS INSTNOTES RELNOTES autotools/shtool LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-recursive .SUFFIXES: diff --git a/aclocal.m4 b/aclocal.m4 index 44773a39..39a86de5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -7090,7 +7090,9 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([autotools/acinclude.m4]) +m4_include([autotools/ax_compare_version.m4]) m4_include([autotools/ax_maintainer_mode_auto_silent.m4]) +m4_include([autotools/ax_path_bdb.m4]) m4_include([autotools/ax_path_lib_curl.m4]) m4_include([autotools/ax_path_lib_pcre.m4]) m4_include([autotools/ccdv.m4]) diff --git a/autotools/ax_compare_version.m4 b/autotools/ax_compare_version.m4 new file mode 100644 index 00000000..bd6c51b2 --- /dev/null +++ b/autotools/ax_compare_version.m4 @@ -0,0 +1,162 @@ +dnl @synopsis AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +dnl +dnl This macro compares two version strings. It is used heavily in the +dnl macro _AX_PATH_BDB for library checking. Due to the various number +dnl of minor-version numbers that can exist, and the fact that string +dnl comparisons are not compatible with numeric comparisons, this is +dnl not necessarily trivial to do in a autoconf script. This macro +dnl makes doing these comparisons easy. +dnl +dnl The six basic comparisons are available, as well as checking +dnl equality limited to a certain number of minor-version levels. +dnl +dnl The operator OP determines what type of comparison to do, and can +dnl be one of: +dnl +dnl eq - equal (test A == B) +dnl ne - not equal (test A != B) +dnl le - less than or equal (test A <= B) +dnl ge - greater than or equal (test A >= B) +dnl lt - less than (test A < B) +dnl gt - greater than (test A > B) +dnl +dnl Additionally, the eq and ne operator can have a number after it to +dnl limit the test to that number of minor versions. +dnl +dnl eq0 - equal up to the length of the shorter version +dnl ne0 - not equal up to the length of the shorter version +dnl eqN - equal up to N sub-version levels +dnl neN - not equal up to N sub-version levels +dnl +dnl When the condition is true, shell commands ACTION-IF-TRUE are run, +dnl otherwise shell commands ACTION-IF-FALSE are run. The environment +dnl variable 'ax_compare_version' is always set to either 'true' or +dnl 'false' as well. +dnl +dnl Examples: +dnl +dnl AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) +dnl AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) +dnl +dnl would both be true. +dnl +dnl AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) +dnl AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) +dnl +dnl would both be false. +dnl +dnl AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) +dnl +dnl would be true because it is only comparing two minor versions. +dnl +dnl AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) +dnl +dnl would be true because it is only comparing the lesser number of +dnl minor versions of the two values. +dnl +dnl Note: The characters that separate the version numbers do not +dnl matter. An empty string is the same as version 0. OP is evaluated +dnl by autoconf, not configure, so must be a string, not a variable. +dnl +dnl The author would like to acknowledge Guido Draheim whose advice +dnl about the m4_case and m4_ifvaln functions make this macro only +dnl include the portions necessary to perform the specific comparison +dnl specified by the OP argument in the final configure script. +dnl +dnl @category Misc +dnl @author Tim Toolan +dnl @version 2004-03-01 +dnl @license GPLWithACException + +dnl ######################################################################### +AC_DEFUN([AX_COMPARE_VERSION], [ + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + AS_VAR_PUSHDEF([A],[ax_compare_version_A]) + A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/[[^0-9]]//g'` + + AS_VAR_PUSHDEF([B],[ax_compare_version_B]) + B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/[[^0-9]]//g'` + + dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary + dnl # then the first line is used to determine if the condition is true. + dnl # The sed right after the echo is to remove any indented white space. + m4_case(m4_tolower($2), + [lt],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` + ], + [gt],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` + ], + [le],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` + ], + [ge],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` + ],[ + dnl Split the operator from the subversion count if present. + m4_bmatch(m4_substr($2,2), + [0],[ + # A count of zero means use the length of the shorter version. + # Determine the number of characters in A and B. + ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'` + ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'` + + # Set A to no more than B's length and B to no more than A's length. + A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` + B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` + ], + [[0-9]+],[ + # A count greater than zero means use only that many subversions + A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` + B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` + ], + [.+],[ + AC_WARNING( + [illegal OP numeric parameter: $2]) + ],[]) + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" + B="$B`echo $A | sed 's/./0/g'`" + A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + m4_case(m4_tolower(m4_substr($2,0,2)), + [eq],[ + test "x$A" = "x$B" && ax_compare_version=true + ], + [ne],[ + test "x$A" != "x$B" && ax_compare_version=true + ],[ + AC_WARNING([illegal OP parameter: $2]) + ]) + ]) + + AS_VAR_POPDEF([A])dnl + AS_VAR_POPDEF([B])dnl + + dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. + if test "$ax_compare_version" = "true" ; then + m4_ifvaln([$4],[$4],[:])dnl + m4_ifvaln([$5],[else $5])dnl + fi +]) dnl AX_COMPARE_VERSION diff --git a/autotools/ax_path_bdb.m4 b/autotools/ax_path_bdb.m4 new file mode 100644 index 00000000..e3f42d31 --- /dev/null +++ b/autotools/ax_path_bdb.m4 @@ -0,0 +1,579 @@ +dnl @synopsis AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl +dnl This macro finds the latest version of Berkeley DB on the system, +dnl and ensures that the header file and library versions match. If +dnl MINIMUM-VERSION is specified, it will ensure that the library found +dnl is at least that version. +dnl +dnl It determines the name of the library as well as the path to the +dnl header file and library. It will check both the default environment +dnl as well as the default Berkeley DB install location. When found, it +dnl sets BDB_LIBS, BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary +dnl values to add to LIBS, CPPFLAGS, and LDFLAGS, as well as setting +dnl BDB_VERSION to the version found. HAVE_DB_H is defined also. +dnl +dnl The option --with-bdb-dir=DIR can be used to specify a specific +dnl Berkeley DB installation to use. +dnl +dnl An example of it's use is: +dnl +dnl AX_PATH_BDB([3],[ +dnl LIBS="$BDB_LIBS $LIBS" +dnl LDFLAGS="$BDB_LDFLAGS $LDFLAGS" +dnl CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" +dnl ]) +dnl +dnl which will locate the latest version of Berkeley DB on the system, +dnl and ensure that it is version 3.0 or higher. +dnl +dnl Details: This macro does not use either AC_CHECK_HEADERS or +dnl AC_CHECK_LIB because, first, the functions inside the library are +dnl sometimes renamed to contain a version code that is only available +dnl from the db.h on the system, and second, because it is common to +dnl have multiple db.h and libdb files on a system it is important to +dnl make sure the ones being used correspond to the same version. +dnl Additionally, there are many different possible names for libdb +dnl when installed by an OS distribution, and these need to be checked +dnl if db.h does not correspond to libdb. +dnl +dnl When cross compiling, only header versions are verified since it +dnl would be difficult to check the library version. Additionally the +dnl default Berkeley DB installation locations /usr/local/BerkeleyDB* +dnl are not searched for higher versions of the library. +dnl +dnl The format for the list of library names to search came from the +dnl Cyrus IMAP distribution, although they are generated dynamically +dnl here, and only for the version found in db.h. +dnl +dnl The macro AX_COMPARE_VERSION is required to use this macro, and +dnl should be available from the Autoconf Macro Archive. +dnl +dnl The author would like to acknowledge the generous and valuable +dnl feedback from Guido Draheim, without which this macro would be far +dnl less robust, and have poor and inconsistent cross compilation +dnl support. +dnl +dnl Changes: +dnl +dnl 1/5/05 applied patch from Rafa Rzepecki to eliminate compiler +dnl warning about unused variable, argv +dnl +dnl @category InstalledPackages +dnl @author Tim Toolan +dnl @version 2005-01-17 +dnl @license GPLWithACException + +dnl ######################################################################### +AC_DEFUN([AX_PATH_BDB], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_ok=no + + # Add --with-bdb-dir option to configure. + AC_ARG_WITH([bdb-dir], + [AC_HELP_STRING([--with-bdb-dir=DIR], + [Berkeley DB installation directory])]) + + # Check if --with-bdb-dir was specified. + if test "x$with_bdb_dir" = "x" ; then + # No option specified, so just search the system. + AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [ + ax_path_bdb_ok=yes + ]) + else + # Set --with-bdb-dir option. + ax_path_bdb_INC="$with_bdb_dir/include" + ax_path_bdb_LIB="$with_bdb_dir/lib" + + dnl # Save previous environment, and modify with new stuff. + ax_path_bdb_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS" + + ax_path_bdb_save_LDFLAGS=$LDFLAGS + LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS" + + # Check for specific header file db.h + AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC]) + if test -f "$ax_path_bdb_INC/db.h" ; then + AC_MSG_RESULT([yes]) + # Check for library + AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [ + ax_path_bdb_ok=yes + BDB_CPPFLAGS="-I$ax_path_bdb_INC" + BDB_LDFLAGS="-L$ax_path_bdb_LIB" + ]) + else + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([no usable Berkeley DB not found]) + fi + + dnl # Restore the environment. + CPPFLAGS="$ax_path_bdb_save_CPPFLAGS" + LDFLAGS="$ax_path_bdb_save_LDFLAGS" + + fi + + dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. + if test "$ax_path_bdb_ok" = "yes" ; then + m4_ifvaln([$2],[$2],[:])dnl + m4_ifvaln([$3],[else $3])dnl + fi + +]) dnl AX_PATH_BDB + +dnl ######################################################################### +dnl Check for berkeley DB of at least MINIMUM-VERSION on system. +dnl +dnl The OPTION argument determines how the checks occur, and can be one of: +dnl +dnl HIGHEST - Check both the environment and the default installation +dnl directories for Berkeley DB and choose the version that +dnl is highest. (default) +dnl ENVFIRST - Check the environment first, and if no satisfactory +dnl library is found there check the default installation +dnl directories for Berkeley DB which is /usr/local/BerkeleyDB* +dnl ENVONLY - Check the current environment only. +dnl +dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST, +dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and +dnl AX_COMPARE_VERSION macros. +dnl +dnl Result: sets ax_path_bdb_no_options_ok to yes or no +dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION +dnl +dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_no_options_ok=no + + # Values to add to environment to use Berkeley DB. + BDB_VERSION='' + BDB_LIBS='' + BDB_CPPFLAGS='' + BDB_LDFLAGS='' + + # Check cross compilation here. + if test "x$cross_compiling" = "xyes" ; then + # If cross compiling, can't use AC_RUN_IFELSE so do these tests. + # The AC_PREPROC_IFELSE confirms that db.h is preprocessable, + # and extracts the version number from it. + AC_MSG_CHECKING([for db.h]) + + AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl + HEADER_VERSION='' + AC_PREPROC_IFELSE([ + AC_LANG_SOURCE([[ +#include +AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH + ]]) + ],[ + # Extract version from preprocessor output. + HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \ + | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'` + ],[]) + + if test "x$HEADER_VERSION" = "x" ; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([$HEADER_VERSION]) + + # Check that version is high enough. + AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[ + # get major and minor version numbers + AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl + MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'` + AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl + MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'` + + dnl # Save LIBS. + ax_path_bdb_no_options_save_LIBS="$LIBS" + + # Check that we can link with the library. + AC_SEARCH_LIBS([db_version], + [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[ + # Sucessfully found library. + ax_path_bdb_no_options_ok=yes + BDB_VERSION=$HEADER_VERSION + + # Extract library from LIBS + ax_path_bdb_no_options_LEN=` \ + echo "x$ax_path_bdb_no_options_save_LIBS" \ + | awk '{print(length)}'` + BDB_LIBS=`echo "x$LIBS " \ + | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"` + ],[]) + + dnl # Restore LIBS + LIBS="$ax_path_bdb_no_options_save_LIBS" + + AS_VAR_POPDEF([MAJ])dnl + AS_VAR_POPDEF([MIN])dnl + ]) + fi + + AS_VAR_POPDEF([HEADER_VERSION])dnl + else + # Not cross compiling. + # Check version of Berkeley DB in the current environment. + AX_PATH_BDB_ENV_GET_VERSION([ + AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[ + # Found acceptable version in current environment. + ax_path_bdb_no_options_ok=yes + BDB_VERSION="$ax_path_bdb_env_get_version_VERSION" + BDB_LIBS="$ax_path_bdb_env_get_version_LIBS" + ]) + ]) + + # Determine if we need to search /usr/local/BerkeleyDB* + ax_path_bdb_no_options_DONE=no + if test "x$2" = "xENVONLY" ; then + ax_path_bdb_no_options_DONE=yes + elif test "x$2" = "xENVFIRST" ; then + ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok + fi + + if test "$ax_path_bdb_no_options_DONE" = "no" ; then + # Check for highest in /usr/local/BerkeleyDB* + AX_PATH_BDB_PATH_FIND_HIGHEST([ + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + # If we already have an acceptable version use this if higher. + AX_COMPARE_VERSION( + [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION]) + else + # Since we didn't have an acceptable version check if this one is. + AX_COMPARE_VERSION( + [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1]) + fi + ]) + + dnl # If result from _AX_COMPARE_VERSION is true we want this version. + if test "$ax_compare_version" = "true" ; then + ax_path_bdb_no_options_ok=yes + BDB_LIBS="-ldb" + if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then + BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include" + BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib" + fi + BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION" + fi + fi + fi + + dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION]) + AC_DEFINE([HAVE_DB_H],[1], + [Define to 1 if you have the header file.]) + m4_ifvaln([$3],[$3])dnl + else + AC_MSG_NOTICE([no Berkeley DB version $1 or higher found]) + m4_ifvaln([$4],[$4])dnl + fi +]) dnl AX_PATH_BDB_NO_OPTIONS + +dnl ######################################################################### +dnl Check the default installation directory for Berkeley DB which is +dnl of the form /usr/local/BerkeleyDB* for the highest version. +dnl +dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no, +dnl sets ax_path_bdb_path_find_highest_VERSION to version, +dnl sets ax_path_bdb_path_find_highest_DIR to directory. +dnl +dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_path_find_highest_ok=no + + AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl + VERSION='' + + ax_path_bdb_path_find_highest_DIR='' + + # find highest verison in default install directory for Berkeley DB + AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl + AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl + + for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null` + do + AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[ + AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[ + ax_path_bdb_path_find_highest_ok=yes + ax_path_bdb_path_find_highest_DIR="$CURDIR" + VERSION="$CUR_VERSION" + ]) + ]) + done + + AS_VAR_POPDEF([VERSION])dnl + AS_VAR_POPDEF([CUR_VERSION])dnl + AS_VAR_POPDEF([CURDIR])dnl + + dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. + if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then + m4_ifvaln([$1],[$1],[:])dnl + m4_ifvaln([$2],[else $2])dnl + fi + +]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST + +dnl ######################################################################### +dnl Checks for Berkeley DB in specified directory's lib and include +dnl subdirectories. +dnl +dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no, +dnl sets ax_path_bdb_path_get_version_VERSION to version. +dnl +dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_path_get_version_ok=no + + # Indicate status of checking for Berkeley DB header. + AC_MSG_CHECKING([in $1/include for db.h]) + ax_path_bdb_path_get_version_got_header=no + test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes + AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header]) + + # Indicate status of checking for Berkeley DB library. + AC_MSG_CHECKING([in $1/lib for library -ldb]) + + ax_path_bdb_path_get_version_VERSION='' + + if test -d "$1/include" && test -d "$1/lib" && + test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then + dnl # save and modify environment + ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$1/include $CPPFLAGS" + + ax_path_bdb_path_get_version_save_LIBS="$LIBS" + LIBS="$LIBS -ldb" + + ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS" + LDFLAGS="-L$1/lib $LDFLAGS" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + ]]) + ],[ + # Program compiled and ran, so get version by adding argument. + ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x` + ax_path_bdb_path_get_version_ok=yes + ],[],[]) + + dnl # restore environment + CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS" + LIBS="$ax_path_bdb_path_get_version_save_LIBS" + LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS" + fi + + dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. + if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then + AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION]) + m4_ifvaln([$2],[$2])dnl + else + AC_MSG_RESULT([no]) + m4_ifvaln([$3],[$3])dnl + fi +]) dnl AX_PATH_BDB_PATH_GET_VERSION + +############################################################################# +dnl Checks if version of library and header match specified version. +dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro. +dnl +dnl Requires AX_COMPARE_VERSION macro. +dnl +dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no. +dnl +dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME]) +AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_env_confirm_lib_ok=no + + dnl # save and modify environment to link with library LIBNAME + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $2" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + ]]) + ],[ + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[ + ax_path_bdb_env_confirm_lib_ok=yes + ]) + ],[],[]) + + dnl # restore environment + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + +]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB + +############################################################################# +dnl Finds the version and library name for Berkeley DB in the +dnl current environment. Tries many different names for library. +dnl +dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro. +dnl +dnl Result: set ax_path_bdb_env_get_version_ok to yes or no, +dnl set ax_path_bdb_env_get_version_VERSION to the version found, +dnl and ax_path_bdb_env_get_version_LIBNAME to the library name. +dnl +dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [ + dnl # Used to indicate success or failure of this function. + ax_path_bdb_env_get_version_ok=no + + ax_path_bdb_env_get_version_VERSION='' + ax_path_bdb_env_get_version_LIBS='' + + AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl + AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl + + # Indicate status of checking for Berkeley DB library. + AC_MSG_CHECKING([for db.h]) + + # Compile and run a program that determines the Berkeley DB version + # in the header file db.h. + HEADER_VERSION='' + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ +#include +#include +int main(int argc,char **argv) +{ + (void) argv; + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + return 0; +} + ]]) + ],[ + # Program compiled and ran, so get version by adding an argument. + HEADER_VERSION=`./conftest$ac_exeext x` + AC_MSG_RESULT([$HEADER_VERSION]) + ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])]) + + # Have header version, so try to find corresponding library. + # Looks for library names in the order: + # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX + # and stops when it finds the first one that matches the version + # of the header file. + if test "x$HEADER_VERSION" != "x" ; then + AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION]) + + AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl + AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl + + # get major and minor version numbers + MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'` + MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'` + + # see if it is already specified in LIBS + TEST_LIBNAME='' + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db" + TEST_LIBNAME='-ldb' + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X.Y" + TEST_LIBNAME="-ldb-${MAJOR}.$MINOR" + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX.Y" + TEST_LIBNAME="-ldb${MAJOR}.$MINOR" + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbXY" + TEST_LIBNAME="-ldb$MAJOR$MINOR" + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X" + TEST_LIBNAME="-ldb-$MAJOR" + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX" + TEST_LIBNAME="-ldb$MAJOR" + AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME]) + fi + + dnl # Found a valid library. + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + if test "x$TEST_LIBNAME" = "x" ; then + AC_MSG_RESULT([none required]) + else + AC_MSG_RESULT([$TEST_LIBNAME]) + fi + ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION" + ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME" + ax_path_bdb_env_get_version_ok=yes + else + AC_MSG_RESULT([no]) + fi + + AS_VAR_POPDEF([MAJOR])dnl + AS_VAR_POPDEF([MINOR])dnl + fi + + AS_VAR_POPDEF([HEADER_VERSION])dnl + AS_VAR_POPDEF([TEST_LIBNAME])dnl + + dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND. + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + m4_ifvaln([$1],[$1],[:])dnl + m4_ifvaln([$2],[else $2])dnl + fi + +]) dnl BDB_ENV_GET_VERSION + +############################################################################# diff --git a/configure b/configure index 45c13bad..090758d8 100755 --- a/configure +++ b/configure @@ -464,7 +464,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SED unamepath LIBOBJS POW_LIB PCRE_LIBS PCRE_CFLAGS BUILD_PCRE_TRUE BUILD_PCRE_FALSE CURL_LIBS CURL_CFLAGS BUILD_CURL_TRUE BUILD_CURL_FALSE sedpath perlpath PERL_CFLAGS PERL_LDFLAGS DO_PERL_TRUE DO_PERL_FALSE wi_PWD USECCDV PROTOCOL LIBTOOL_DEPS MODULES LIBDB CCDV EVNTLIBOBJS RDYNAMIC_FLAG LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT SED unamepath LIBOBJS POW_LIB PCRE_LIBS PCRE_CFLAGS BUILD_PCRE_TRUE BUILD_PCRE_FALSE CURL_LIBS CURL_CFLAGS BUILD_CURL_TRUE BUILD_CURL_FALSE sedpath perlpath PERL_CFLAGS PERL_LDFLAGS DO_PERL_TRUE DO_PERL_FALSE wi_PWD USECCDV BDB_CPPFLAGS BDB_LDFLAGS BDB_LIBS DO_BDB_TRUE DO_BDB_FALSE PROTOCOL LIBTOOL_DEPS MODULES LIBDB CCDV EVNTLIBOBJS RDYNAMIC_FLAG LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1051,6 +1051,7 @@ Optional Packages: --with-tags[=TAGS] include additional configurations [automatic] --with-rtsig compile with support for real time signals (experimental) + --with-bdb-dir=DIR Berkeley DB installation directory --with-modules - Additional Modules to compile Some influential environment variables: @@ -3737,7 +3738,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3740 "configure"' > conftest.$ac_ext + echo '#line 3741 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5316,7 +5317,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5319:" \ +echo "$as_me:5320:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6385,11 +6386,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6388: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6389: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6392: \$? = $ac_status" >&5 + echo "$as_me:6393: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6640,11 +6641,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6643: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6644: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6647: \$? = $ac_status" >&5 + echo "$as_me:6648: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6700,11 +6701,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6703: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6704: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6707: \$? = $ac_status" >&5 + echo "$as_me:6708: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8900,7 +8901,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11222: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11225: \$? = $ac_status" >&5 + echo "$as_me:11226: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11278,11 +11279,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11281: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11282: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11285: \$? = $ac_status" >&5 + echo "$as_me:11286: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12641,7 +12642,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13598: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13601: \$? = $ac_status" >&5 + echo "$as_me:13602: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13654,11 +13655,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13657: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13658: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13661: \$? = $ac_status" >&5 + echo "$as_me:13662: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15710,11 +15711,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15713: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15714: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15717: \$? = $ac_status" >&5 + echo "$as_me:15718: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15965,11 +15966,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15968: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15969: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15972: \$? = $ac_status" >&5 + echo "$as_me:15973: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16025,11 +16026,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16028: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16029: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16032: \$? = $ac_status" >&5 + echo "$as_me:16033: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18225,7 +18226,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking for db.h... $ECHO_C" >&6 -if test "${ac_cv_header_db_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 -echo "${ECHO_T}$ac_cv_header_db_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking db.h usability" >&5 -echo $ECHO_N "checking db.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking db.h presence" >&5 -echo $ECHO_N "checking db.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for db.h" >&5 -echo $ECHO_N "checking for db.h... $ECHO_C" >&6 -if test "${ac_cv_header_db_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_db_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 -echo "${ECHO_T}$ac_cv_header_db_h" >&6 - -fi -if test $ac_cv_header_db_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DB_H 1 -_ACEOF - - echo "$as_me:$LINENO: checking for db_create in -ldb" >&5 -echo $ECHO_N "checking for db_create in -ldb... $ECHO_C" >&6 -if test "${ac_cv_lib_db_db_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldb $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char db_create (); -int -main () -{ -db_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_db_db_create=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_db_db_create=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create" >&5 -echo "${ECHO_T}$ac_cv_lib_db_db_create" >&6 -if test $ac_cv_lib_db_db_create = yes; then - LIBDB="-ldb" -fi - -fi - - - - echo "$as_me:$LINENO: checking for va_copy" >&5 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 if test "${ns_va_copy+set}" = set; then @@ -28440,6 +28225,3120 @@ fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "" +autotools/shtool echo -e "%BChecking for Berkeley Database%b" +echo "" + + + ax_path_bdb_ok=no + + # Add --with-bdb-dir option to configure. + +# Check whether --with-bdb-dir or --without-bdb-dir was given. +if test "${with_bdb_dir+set}" = set; then + withval="$with_bdb_dir" + +fi; + + # Check if --with-bdb-dir was specified. + if test "x$with_bdb_dir" = "x" ; then + # No option specified, so just search the system. + + ax_path_bdb_no_options_ok=no + + # Values to add to environment to use Berkeley DB. + BDB_VERSION='' + BDB_LIBS='' + BDB_CPPFLAGS='' + BDB_LDFLAGS='' + + # Check cross compilation here. + if test "x$cross_compiling" = "xyes" ; then + # If cross compiling, can't use AC_RUN_IFELSE so do these tests. + # The AC_PREPROC_IFELSE confirms that db.h is preprocessable, + # and extracts the version number from it. + echo "$as_me:$LINENO: checking for db.h" >&5 +echo $ECHO_N "checking for db.h... $ECHO_C" >&6 + + ax_path_bdb_no_options_HEADER_VERSION='' + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH + + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + + # Extract version from preprocessor output. + ax_path_bdb_no_options_HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \ + | grep AX_PATH_BDB_STUFF | sed 's/[^0-9,]//g;s/,/./g;1q'` + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi +rm -f conftest.err conftest.$ac_ext + + if test "x$ax_path_bdb_no_options_HEADER_VERSION" = "x" ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: $ax_path_bdb_no_options_HEADER_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_no_options_HEADER_VERSION" >&6 + + # Check that version is high enough. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_no_options_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + # get major and minor version numbers + ax_path_bdb_no_options_MAJOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,\..*,,'` + ax_path_bdb_no_options_MINOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'` + + ax_path_bdb_no_options_save_LIBS="$LIBS" + + # Check that we can link with the library. + echo "$as_me:$LINENO: checking for library containing db_version" >&5 +echo $ECHO_N "checking for library containing db_version... $ECHO_C" >&6 +if test "${ac_cv_search_db_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_db_version=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char db_version (); +int +main () +{ +db_version (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_db_version="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_db_version" = no; then + for ac_lib in db db-$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR$ax_path_bdb_no_options_MINOR db-$ax_path_bdb_no_options_MAJOR db$ax_path_bdb_no_options_MAJOR; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char db_version (); +int +main () +{ +db_version (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_db_version="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_db_version" >&5 +echo "${ECHO_T}$ac_cv_search_db_version" >&6 +if test "$ac_cv_search_db_version" != no; then + test "$ac_cv_search_db_version" = "none required" || LIBS="$ac_cv_search_db_version $LIBS" + + # Sucessfully found library. + ax_path_bdb_no_options_ok=yes + BDB_VERSION=$ax_path_bdb_no_options_HEADER_VERSION + + # Extract library from LIBS + ax_path_bdb_no_options_LEN=` \ + echo "x$ax_path_bdb_no_options_save_LIBS" \ + | awk '{print(length)}'` + BDB_LIBS=`echo "x$LIBS " \ + | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"` + +fi + + + LIBS="$ax_path_bdb_no_options_save_LIBS" + + + fi + + fi + + else + # Not cross compiling. + # Check version of Berkeley DB in the current environment. + + ax_path_bdb_env_get_version_ok=no + + ax_path_bdb_env_get_version_VERSION='' + ax_path_bdb_env_get_version_LIBS='' + + + # Indicate status of checking for Berkeley DB library. + echo "$as_me:$LINENO: checking for db.h" >&5 +echo $ECHO_N "checking for db.h... $ECHO_C" >&6 + + # Compile and run a program that determines the Berkeley DB version + # in the header file db.h. + ax_path_bdb_env_get_version_HEADER_VERSION='' + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + (void) argv; + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + return 0; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by adding an argument. + ax_path_bdb_env_get_version_HEADER_VERSION=`./conftest$ac_exeext x` + echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_HEADER_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_env_get_version_HEADER_VERSION" >&6 + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + # Have header version, so try to find corresponding library. + # Looks for library names in the order: + # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX + # and stops when it finds the first one that matches the version + # of the header file. + if test "x$ax_path_bdb_env_get_version_HEADER_VERSION" != "x" ; then + echo "$as_me:$LINENO: checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION" >&5 +echo $ECHO_N "checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION... $ECHO_C" >&6 + + + # get major and minor version numbers + ax_path_bdb_env_get_version_MAJOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,\..*,,'` + ax_path_bdb_env_get_version_MINOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'` + + # see if it is already specified in LIBS + ax_path_bdb_env_get_version_TEST_LIBNAME='' + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db" + ax_path_bdb_env_get_version_TEST_LIBNAME='-ldb' + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X.Y" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX.Y" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbXY" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-$ax_path_bdb_env_get_version_MAJOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + if test "x$ax_path_bdb_env_get_version_TEST_LIBNAME" = "x" ; then + echo "$as_me:$LINENO: result: none required" >&5 +echo "${ECHO_T}none required" >&6 + else + echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_TEST_LIBNAME" >&5 +echo "${ECHO_T}$ax_path_bdb_env_get_version_TEST_LIBNAME" >&6 + fi + ax_path_bdb_env_get_version_VERSION="$ax_path_bdb_env_get_version_HEADER_VERSION" + ax_path_bdb_env_get_version_LIBS="$ax_path_bdb_env_get_version_TEST_LIBNAME" + ax_path_bdb_env_get_version_ok=yes + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + fi + + + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + # Found acceptable version in current environment. + ax_path_bdb_no_options_ok=yes + BDB_VERSION="$ax_path_bdb_env_get_version_VERSION" + BDB_LIBS="$ax_path_bdb_env_get_version_LIBS" + + fi + + + fi + + + + # Determine if we need to search /usr/local/BerkeleyDB* + ax_path_bdb_no_options_DONE=no + if test "xHIGHEST" = "xENVONLY" ; then + ax_path_bdb_no_options_DONE=yes + elif test "xHIGHEST" = "xENVFIRST" ; then + ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok + fi + + if test "$ax_path_bdb_no_options_DONE" = "no" ; then + # Check for highest in /usr/local/BerkeleyDB* + + ax_path_bdb_path_find_highest_ok=no + + ax_path_bdb_path_find_highest_VERSION='' + + ax_path_bdb_path_find_highest_DIR='' + + # find highest verison in default install directory for Berkeley DB + + for ax_path_bdb_path_find_highest_CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null` + do + + ax_path_bdb_path_get_version_ok=no + + # Indicate status of checking for Berkeley DB header. + echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h" >&5 +echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h... $ECHO_C" >&6 + ax_path_bdb_path_get_version_got_header=no + test -f "$ax_path_bdb_path_find_highest_CURDIR/include/db.h" && ax_path_bdb_path_get_version_got_header=yes + echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_got_header" >&5 +echo "${ECHO_T}$ax_path_bdb_path_get_version_got_header" >&6 + + # Indicate status of checking for Berkeley DB library. + echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb" >&5 +echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb... $ECHO_C" >&6 + + ax_path_bdb_path_get_version_VERSION='' + + if test -d "$ax_path_bdb_path_find_highest_CURDIR/include" && test -d "$ax_path_bdb_path_find_highest_CURDIR/lib" && + test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then + ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$ax_path_bdb_path_find_highest_CURDIR/include $CPPFLAGS" + + ax_path_bdb_path_get_version_save_LIBS="$LIBS" + LIBS="$LIBS -ldb" + + ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS" + LDFLAGS="-L$ax_path_bdb_path_find_highest_CURDIR/lib $LDFLAGS" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by adding argument. + ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x` + ax_path_bdb_path_get_version_ok=yes + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS" + LIBS="$ax_path_bdb_path_get_version_save_LIBS" + LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS" + fi + + if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then + echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_path_get_version_VERSION" >&6 + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_path_find_highest_ok=yes + ax_path_bdb_path_find_highest_DIR="$ax_path_bdb_path_find_highest_CURDIR" + ax_path_bdb_path_find_highest_VERSION="$ax_path_bdb_path_get_version_VERSION" + + fi + + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + done + + + if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then + + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + # If we already have an acceptable version use this if higher. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$BDB_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + : + fi + + else + # Since we didn't have an acceptable version check if this one is. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + : + fi + + fi + + fi + + + + if test "$ax_compare_version" = "true" ; then + ax_path_bdb_no_options_ok=yes + BDB_LIBS="-ldb" + if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then + BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include" + BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib" + fi + BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION" + fi + fi + fi + + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + { echo "$as_me:$LINENO: using Berkeley DB version $BDB_VERSION" >&5 +echo "$as_me: using Berkeley DB version $BDB_VERSION" >&6;} + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_H 1 +_ACEOF + + + ax_path_bdb_ok=yes + + else + { echo "$as_me:$LINENO: no Berkeley DB version 4.1 or higher found" >&5 +echo "$as_me: no Berkeley DB version 4.1 or higher found" >&6;} + fi + + else + # Set --with-bdb-dir option. + ax_path_bdb_INC="$with_bdb_dir/include" + ax_path_bdb_LIB="$with_bdb_dir/lib" + + ax_path_bdb_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS" + + ax_path_bdb_save_LDFLAGS=$LDFLAGS + LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS" + + # Check for specific header file db.h + echo "$as_me:$LINENO: checking db.h presence in $ax_path_bdb_INC" >&5 +echo $ECHO_N "checking db.h presence in $ax_path_bdb_INC... $ECHO_C" >&6 + if test -f "$ax_path_bdb_INC/db.h" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + # Check for library + + ax_path_bdb_no_options_ok=no + + # Values to add to environment to use Berkeley DB. + BDB_VERSION='' + BDB_LIBS='' + BDB_CPPFLAGS='' + BDB_LDFLAGS='' + + # Check cross compilation here. + if test "x$cross_compiling" = "xyes" ; then + # If cross compiling, can't use AC_RUN_IFELSE so do these tests. + # The AC_PREPROC_IFELSE confirms that db.h is preprocessable, + # and extracts the version number from it. + echo "$as_me:$LINENO: checking for db.h" >&5 +echo $ECHO_N "checking for db.h... $ECHO_C" >&6 + + ax_path_bdb_no_options_HEADER_VERSION='' + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH + + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + + # Extract version from preprocessor output. + ax_path_bdb_no_options_HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \ + | grep AX_PATH_BDB_STUFF | sed 's/[^0-9,]//g;s/,/./g;1q'` + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi +rm -f conftest.err conftest.$ac_ext + + if test "x$ax_path_bdb_no_options_HEADER_VERSION" = "x" ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: $ax_path_bdb_no_options_HEADER_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_no_options_HEADER_VERSION" >&6 + + # Check that version is high enough. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_no_options_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + # get major and minor version numbers + ax_path_bdb_no_options_MAJOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,\..*,,'` + ax_path_bdb_no_options_MINOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'` + + ax_path_bdb_no_options_save_LIBS="$LIBS" + + # Check that we can link with the library. + echo "$as_me:$LINENO: checking for library containing db_version" >&5 +echo $ECHO_N "checking for library containing db_version... $ECHO_C" >&6 +if test "${ac_cv_search_db_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_db_version=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char db_version (); +int +main () +{ +db_version (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_db_version="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_db_version" = no; then + for ac_lib in db db-$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR$ax_path_bdb_no_options_MINOR db-$ax_path_bdb_no_options_MAJOR db$ax_path_bdb_no_options_MAJOR; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char db_version (); +int +main () +{ +db_version (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_db_version="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_db_version" >&5 +echo "${ECHO_T}$ac_cv_search_db_version" >&6 +if test "$ac_cv_search_db_version" != no; then + test "$ac_cv_search_db_version" = "none required" || LIBS="$ac_cv_search_db_version $LIBS" + + # Sucessfully found library. + ax_path_bdb_no_options_ok=yes + BDB_VERSION=$ax_path_bdb_no_options_HEADER_VERSION + + # Extract library from LIBS + ax_path_bdb_no_options_LEN=` \ + echo "x$ax_path_bdb_no_options_save_LIBS" \ + | awk '{print(length)}'` + BDB_LIBS=`echo "x$LIBS " \ + | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"` + +fi + + + LIBS="$ax_path_bdb_no_options_save_LIBS" + + + fi + + fi + + else + # Not cross compiling. + # Check version of Berkeley DB in the current environment. + + ax_path_bdb_env_get_version_ok=no + + ax_path_bdb_env_get_version_VERSION='' + ax_path_bdb_env_get_version_LIBS='' + + + # Indicate status of checking for Berkeley DB library. + echo "$as_me:$LINENO: checking for db.h" >&5 +echo $ECHO_N "checking for db.h... $ECHO_C" >&6 + + # Compile and run a program that determines the Berkeley DB version + # in the header file db.h. + ax_path_bdb_env_get_version_HEADER_VERSION='' + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + (void) argv; + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + return 0; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by adding an argument. + ax_path_bdb_env_get_version_HEADER_VERSION=`./conftest$ac_exeext x` + echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_HEADER_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_env_get_version_HEADER_VERSION" >&6 + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + # Have header version, so try to find corresponding library. + # Looks for library names in the order: + # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX + # and stops when it finds the first one that matches the version + # of the header file. + if test "x$ax_path_bdb_env_get_version_HEADER_VERSION" != "x" ; then + echo "$as_me:$LINENO: checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION" >&5 +echo $ECHO_N "checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION... $ECHO_C" >&6 + + + # get major and minor version numbers + ax_path_bdb_env_get_version_MAJOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,\..*,,'` + ax_path_bdb_env_get_version_MINOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'` + + # see if it is already specified in LIBS + ax_path_bdb_env_get_version_TEST_LIBNAME='' + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db" + ax_path_bdb_env_get_version_TEST_LIBNAME='-ldb' + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X.Y" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX.Y" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbXY" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR$ax_path_bdb_env_get_version_MINOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "db-X" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-$ax_path_bdb_env_get_version_MAJOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then + # try format "dbX" + ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR" + + ax_path_bdb_env_confirm_lib_ok=no + + ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS" + LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by giving an argument, + # which will tell the program to print the output. + ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x` + + # If the versions all match up, indicate success. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" + ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" + ax_compare_version_A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + + test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true + + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_env_confirm_lib_ok=yes + + fi + + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS" + + + fi + + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + if test "x$ax_path_bdb_env_get_version_TEST_LIBNAME" = "x" ; then + echo "$as_me:$LINENO: result: none required" >&5 +echo "${ECHO_T}none required" >&6 + else + echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_TEST_LIBNAME" >&5 +echo "${ECHO_T}$ax_path_bdb_env_get_version_TEST_LIBNAME" >&6 + fi + ax_path_bdb_env_get_version_VERSION="$ax_path_bdb_env_get_version_HEADER_VERSION" + ax_path_bdb_env_get_version_LIBS="$ax_path_bdb_env_get_version_TEST_LIBNAME" + ax_path_bdb_env_get_version_ok=yes + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + fi + + + if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_env_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + # Found acceptable version in current environment. + ax_path_bdb_no_options_ok=yes + BDB_VERSION="$ax_path_bdb_env_get_version_VERSION" + BDB_LIBS="$ax_path_bdb_env_get_version_LIBS" + + fi + + + fi + + + + # Determine if we need to search /usr/local/BerkeleyDB* + ax_path_bdb_no_options_DONE=no + if test "xENVONLY" = "xENVONLY" ; then + ax_path_bdb_no_options_DONE=yes + elif test "xENVONLY" = "xENVFIRST" ; then + ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok + fi + + if test "$ax_path_bdb_no_options_DONE" = "no" ; then + # Check for highest in /usr/local/BerkeleyDB* + + ax_path_bdb_path_find_highest_ok=no + + ax_path_bdb_path_find_highest_VERSION='' + + ax_path_bdb_path_find_highest_DIR='' + + # find highest verison in default install directory for Berkeley DB + + for ax_path_bdb_path_find_highest_CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null` + do + + ax_path_bdb_path_get_version_ok=no + + # Indicate status of checking for Berkeley DB header. + echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h" >&5 +echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h... $ECHO_C" >&6 + ax_path_bdb_path_get_version_got_header=no + test -f "$ax_path_bdb_path_find_highest_CURDIR/include/db.h" && ax_path_bdb_path_get_version_got_header=yes + echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_got_header" >&5 +echo "${ECHO_T}$ax_path_bdb_path_get_version_got_header" >&6 + + # Indicate status of checking for Berkeley DB library. + echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb" >&5 +echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb... $ECHO_C" >&6 + + ax_path_bdb_path_get_version_VERSION='' + + if test -d "$ax_path_bdb_path_find_highest_CURDIR/include" && test -d "$ax_path_bdb_path_find_highest_CURDIR/lib" && + test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then + ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$ax_path_bdb_path_find_highest_CURDIR/include $CPPFLAGS" + + ax_path_bdb_path_get_version_save_LIBS="$LIBS" + LIBS="$LIBS -ldb" + + ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS" + LDFLAGS="-L$ax_path_bdb_path_find_highest_CURDIR/lib $LDFLAGS" + + # Compile and run a program that compares the version defined in + # the header file with a version defined in the library function + # db_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main(int argc,char **argv) +{ + int major,minor,patch; + (void) argv; + db_version(&major,&minor,&patch); + if (argc > 1) + printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH); + if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor && + DB_VERSION_PATCH == patch) + return 0; + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by adding argument. + ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x` + ax_path_bdb_path_get_version_ok=yes + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS" + LIBS="$ax_path_bdb_path_get_version_save_LIBS" + LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS" + fi + + if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then + echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_VERSION" >&5 +echo "${ECHO_T}$ax_path_bdb_path_get_version_VERSION" >&6 + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + ax_path_bdb_path_find_highest_ok=yes + ax_path_bdb_path_find_highest_DIR="$ax_path_bdb_path_find_highest_CURDIR" + ax_path_bdb_path_find_highest_VERSION="$ax_path_bdb_path_get_version_VERSION" + + fi + + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + done + + + if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then + + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + # If we already have an acceptable version use this if higher. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$BDB_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + : + fi + + else + # Since we didn't have an acceptable version check if this one is. + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "4.1" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + : + fi + + fi + + fi + + + + if test "$ax_compare_version" = "true" ; then + ax_path_bdb_no_options_ok=yes + BDB_LIBS="-ldb" + if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then + BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include" + BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib" + fi + BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION" + fi + fi + fi + + if test "$ax_path_bdb_no_options_ok" = "yes" ; then + { echo "$as_me:$LINENO: using Berkeley DB version $BDB_VERSION" >&5 +echo "$as_me: using Berkeley DB version $BDB_VERSION" >&6;} + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_H 1 +_ACEOF + + + ax_path_bdb_ok=yes + BDB_CPPFLAGS="-I$ax_path_bdb_INC" + BDB_LDFLAGS="-L$ax_path_bdb_LIB" + + else + { echo "$as_me:$LINENO: no Berkeley DB version 4.1 or higher found" >&5 +echo "$as_me: no Berkeley DB version 4.1 or higher found" >&6;} + fi + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: no usable Berkeley DB not found" >&5 +echo "$as_me: no usable Berkeley DB not found" >&6;} + fi + + CPPFLAGS="$ax_path_bdb_save_CPPFLAGS" + LDFLAGS="$ax_path_bdb_save_LDFLAGS" + + fi + + if test "$ax_path_bdb_ok" = "yes" ; then + + + + + +if true; then + DO_BDB_TRUE= + DO_BDB_FALSE='#' +else + DO_BDB_TRUE='#' + DO_BDB_FALSE= +fi + + else + +if false; then + DO_BDB_TRUE= + DO_BDB_FALSE='#' +else + DO_BDB_TRUE='#' + DO_BDB_FALSE= +fi + + + fi + + + + echo "" autotools/shtool echo -e "%BNeoStats Configuration Summary:%b" @@ -28777,6 +31676,20 @@ echo "$as_me: error: conditional \"DO_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${DO_BDB_TRUE}" && test -z "${DO_BDB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DO_BDB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DO_BDB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${DO_BDB_TRUE}" && test -z "${DO_BDB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"DO_BDB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"DO_BDB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -29426,6 +32339,11 @@ s,@DO_PERL_TRUE@,$DO_PERL_TRUE,;t t s,@DO_PERL_FALSE@,$DO_PERL_FALSE,;t t s,@wi_PWD@,$wi_PWD,;t t s,@USECCDV@,$USECCDV,;t t +s,@BDB_CPPFLAGS@,$BDB_CPPFLAGS,;t t +s,@BDB_LDFLAGS@,$BDB_LDFLAGS,;t t +s,@BDB_LIBS@,$BDB_LIBS,;t t +s,@DO_BDB_TRUE@,$DO_BDB_TRUE,;t t +s,@DO_BDB_FALSE@,$DO_BDB_FALSE,;t t s,@PROTOCOL@,$PROTOCOL,;t t s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t s,@MODULES@,$MODULES,;t t diff --git a/configure.in b/configure.in index cfbf64f4..6f69ad8e 100644 --- a/configure.in +++ b/configure.in @@ -1,3 +1,4 @@ + # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) @@ -261,26 +262,21 @@ then AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1, "Our Platfrom requires Underscores") fi -dnl check for berkeley db support -AC_CHECK_HEADER(db.h, AC_DEFINE(HAVE_DB_H, 1, [Define to 1 if you have the header file.]) - AC_CHECK_LIB(db, db_create, LIBDB="-ldb")) +dnl How to copy one va_list to another? +AC_CACHE_CHECK([for va_copy], ns_va_copy, [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);])], + [ns_va_copy="yes"], + [ns_va_copy="no"] +)]) +if test "$ns_va_copy" = "yes" ; then + AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) fi - -dnl How to copy one va_list to another? -AC_CACHE_CHECK([for va_copy], ns_va_copy, [AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);])], - [ns_va_copy="yes"], - [ns_va_copy="no"] -)]) -if test "$ns_va_copy" = "yes" ; then - AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) fi - -AC_CACHE_CHECK([for __va_copy], ns___va_copy, [AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; __va_copy(ap1, ap2);])], - [ns___va_copy="yes"], - [ns___va_copy="no"] -)]) -if test "$ns___va_copy" = "yes" ; then +AC_CACHE_CHECK([for __va_copy], ns___va_copy, [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; __va_copy(ap1, ap2);])], + [ns___va_copy="yes"], + [ns___va_copy="no"] +)]) +if test "$ns___va_copy" = "yes" ; then AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy]) fi @@ -379,6 +375,15 @@ wi_ARG_DISABLE_CCDV wi_PROG_CCDV AC_MSG_HEADER([Configuring LibEvent Now]) CHK_LIBEVNT +AC_MSG_HEADER([Checking for Berkeley Database]) +AX_PATH_BDB([4.1], +[AC_SUBST(BDB_CPPFLAGS) +AC_SUBST(BDB_LDFLAGS) +AC_SUBST(BDB_LIBS) +AM_CONDITIONAL(DO_BDB, true)], +[AM_CONDITIONAL(DO_BDB, false)] +) + AC_MSG_HEADER([NeoStats Configuration Summary:]) diff --git a/include/Makefile.in b/include/Makefile.in index 515371bc..32f90d35 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -41,7 +41,9 @@ DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -75,6 +77,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -94,6 +99,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -212,9 +219,11 @@ noinst_HEADERS = commands.h dns.h servers.h users.h conf.h \ nsdba.h main.h numerics.h settings.h botinfo.h confuse.h \ adnsdlist.h adnsinternal.h adnstvarith.h +extra_DIST = version.h LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -457,7 +466,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-info-am version.h: stamp-h1 - @(if test -f version.sh ; then $(SHELL) version.sh; else echo > version.h; fi) + @(if test -f version.sh ; then $(SHELL) version.sh; fi) .c.o: @USECCDV@ @echo "Building $@" diff --git a/include/config.h.in b/include/config.h.in index d62412b5..4033dc9e 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -260,6 +260,9 @@ /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP +/* Define to 1 if you have the `strcasestr' function. */ +#undef HAVE_STRCASESTR + /* Define to 1 if you have the `strcmpi' function. */ #undef HAVE_STRCMPI @@ -293,11 +296,11 @@ /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN /* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRCASESTR +#undef HAVE_STRSTR /* Define to 1 if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R diff --git a/lib/Makefile.in b/lib/Makefile.in index 3187f08d..d581bed9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -39,7 +39,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -71,6 +73,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -90,6 +95,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -195,6 +202,7 @@ SUBDIRS = pcre curl event LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-recursive .SUFFIXES: diff --git a/lib/curl/Makefile.in b/lib/curl/Makefile.in index 332da46d..3d48798e 100644 --- a/lib/curl/Makefile.in +++ b/lib/curl/Makefile.in @@ -48,7 +48,9 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ subdir = lib/curl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -103,6 +105,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -122,6 +127,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -291,6 +298,7 @@ BUILT_SOURCES = $(srcdir)/getdate.c $(srcdir)/ca-bundle.h LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/lib/event/Makefile.in b/lib/event/Makefile.in index a13a2028..30842176 100644 --- a/lib/event/Makefile.in +++ b/lib/event/Makefile.in @@ -43,7 +43,9 @@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ subdir = lib/event ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -96,6 +98,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -115,6 +120,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -232,6 +239,7 @@ EXTRA_DIST = err.c event.h event-internal.h evsignal.h \ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/lib/pcre/Makefile.in b/lib/pcre/Makefile.in index 3d488125..a35d60b2 100644 --- a/lib/pcre/Makefile.in +++ b/lib/pcre/Makefile.in @@ -46,7 +46,9 @@ DIST_COMMON = README $(include_HEADERS) $(noinst_HEADERS) \ subdir = lib/pcre ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -98,6 +100,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -117,6 +122,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -228,6 +235,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/Makefile.in b/modules/Makefile.in index 546c2fcb..df0cdfb8 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -39,7 +39,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -71,6 +73,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -90,6 +95,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -196,6 +203,7 @@ EXTRA_DIST = modules.txt LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-recursive .SUFFIXES: diff --git a/modules/connectserv/Makefile.in b/modules/connectserv/Makefile.in index 419dac73..3e08930a 100644 --- a/modules/connectserv/Makefile.in +++ b/modules/connectserv/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/connectserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/dbm/Makefile.am b/modules/dbm/Makefile.am index db25aad4..d9d2cd6b 100644 --- a/modules/dbm/Makefile.am +++ b/modules/dbm/Makefile.am @@ -1,4 +1,9 @@ SUBDIRS = bdb gdbm +bin_PROGRAMS = convertdb + +convertdb_SOURCES = convertdb.c + + include $(top_srcdir)/autotools/rules.mk diff --git a/modules/dbm/Makefile.in b/modules/dbm/Makefile.in index b063cb39..828fc028 100644 --- a/modules/dbm/Makefile.in +++ b/modules/dbm/Makefile.in @@ -13,6 +13,9 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +SOURCES = $(convertdb_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -34,12 +37,15 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +bin_PROGRAMS = convertdb$(EXEEXT) DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/autotools/rules.mk subdir = modules/dbm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -49,8 +55,23 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_convertdb_OBJECTS = convertdb.$(OBJEXT) +convertdb_OBJECTS = $(am_convertdb_OBJECTS) +convertdb_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +SOURCES = $(convertdb_SOURCES) +DIST_SOURCES = $(convertdb_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ @@ -71,6 +92,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -90,6 +114,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -192,9 +218,11 @@ target_alias = @target_alias@ unamepath = @unamepath@ wi_PWD = @wi_PWD@ SUBDIRS = bdb gdbm +convertdb_SOURCES = convertdb.c LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-recursive .SUFFIXES: @@ -229,6 +257,32 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +convertdb$(EXEEXT): $(convertdb_OBJECTS) $(convertdb_DEPENDENCIES) + @rm -f convertdb$(EXEEXT) + $(LINK) $(convertdb_LDFLAGS) $(convertdb_OBJECTS) $(convertdb_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convertdb.Po@am__quote@ + mostlyclean-libtool: -rm -f *.lo @@ -404,9 +458,12 @@ distdir: $(DISTFILES) done check-am: all-am check: check-recursive -all-am: Makefile +all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -433,12 +490,13 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive + -rm -rf ./$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-recursive @@ -452,7 +510,7 @@ info-am: install-data-am: -install-exec-am: +install-exec-am: install-binPROGRAMS install-info: install-info-recursive @@ -461,12 +519,14 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-recursive @@ -476,22 +536,24 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ + clean clean-binPROGRAMS clean-generic clean-libtool \ + clean-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-info-am .c.o: diff --git a/modules/dbm/bdb/Makefile.am b/modules/dbm/bdb/Makefile.am index dc148938..edcae139 100644 --- a/modules/dbm/bdb/Makefile.am +++ b/modules/dbm/bdb/Makefile.am @@ -1,6 +1,7 @@ pkglib_LTLIBRARIES = bdb.la -bdb_la_SOURCES = bdb.c +bdb_la_SOURCES = bdb.c +bdb_la_LIBADD = @BDB_LIBS@ -AM_LDFLAGS = -module -avoid-version -no-undefined -AM_CFLAGS = -I$(top_srcdir)/lib/adns/ @PCRE_CFLAGS@ @CURL_CFLAGS@ -include $(top_srcdir)/autotools/rules.mk \ No newline at end of file +AM_LDFLAGS = -module -avoid-version -no-undefined @BDB_LDFLAGS@ +AM_CFLAGS = @BDB_CPPFLAGS@ @PCRE_CFLAGS@ @CURL_CFLAGS@ +include $(top_srcdir)/autotools/rules.mk diff --git a/modules/dbm/bdb/Makefile.in b/modules/dbm/bdb/Makefile.in index 5e952104..cc02e7e3 100644 --- a/modules/dbm/bdb/Makefile.in +++ b/modules/dbm/bdb/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/dbm/bdb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -61,7 +63,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkglibdir)" pkglibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(pkglib_LTLIBRARIES) -bdb_la_LIBADD = +bdb_la_DEPENDENCIES = am_bdb_la_OBJECTS = bdb.lo bdb_la_OBJECTS = $(am_bdb_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -210,11 +217,13 @@ unamepath = @unamepath@ wi_PWD = @wi_PWD@ pkglib_LTLIBRARIES = bdb.la bdb_la_SOURCES = bdb.c -AM_LDFLAGS = -module -avoid-version -no-undefined -AM_CFLAGS = -I$(top_srcdir)/lib/adns/ @PCRE_CFLAGS@ @CURL_CFLAGS@ +bdb_la_LIBADD = @BDB_LIBS@ +AM_LDFLAGS = -module -avoid-version -no-undefined @BDB_LDFLAGS@ +AM_CFLAGS = @BDB_CPPFLAGS@ @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/dbm/convertdb.c b/modules/dbm/convertdb.c new file mode 100644 index 00000000..cd75ad02 --- /dev/null +++ b/modules/dbm/convertdb.c @@ -0,0 +1,103 @@ +/* NeoStats - IRC Statistical Services +** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington +** http://www.neostats.net/ +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +** USA +** +** NeoStats CVS Identification +** $Id: main.c 2974 2005-12-06 21:39:11Z Mark $ +*/ + +#include "neostats.h" + +/** @brief print_copyright + * + * print copyright notice + * NeoStats core use only. + * Not used on Win32 + * + * @param none + * + * @return none + */ + +static void print_copyright( void ) +{ + printf( "-----------------------------------------------\n" ); + printf( "Copyright: NeoStats Group. 2000-2006\n" ); + printf( "Justin Hammond (fish@neostats.net)\n" ); + printf( "-----------------------------------------------\n\n" ); +} + +/** @brief get_options + * + * Processes command line options + * NeoStats core use only. + * Not used in Win32. + * + * @param argc count of command line parameters + * @param argv array of command line parameters + * + * @return NS_SUCCESS if succeeds, NS_FAILURE if not + */ + +static int get_options( int argc, char **argv ) +{ + int c; + int level; + + while( ( c = getopt( argc, argv, "hv" ) ) != -1 ) { + switch( c ) { + case 'h': + printf( "%s: Usage: \"%s [options]\"\n", basename(argv[0]), basename(argv[0])); + printf( " -h (Show this screen)\n" ); + printf( " -v (Show version number)\n" ); + return NS_FAILURE; + case 'v': + printf( "NeoStats: http://www.neostats.net\n" ); + printf( "Version: 1\n"); + print_copyright(); + return NS_FAILURE; + break; + default: + printf( "Unknown command line switch %c\n", optopt ); + } + } + return NS_SUCCESS; +} + + +/** @brief main + * + * Program entry point + * NeoStats core use only. + * Under Win32 this is used purely as a startup function and not + * the main entry point + * + * @param argc count of command line parameters + * @param argv array of command line parameters + * + * @return EXIT_SUCCESS if succeeds, EXIT_FAILURE if not + */ + +int main( int argc, char *argv[] ) +{ + /* get our commandline options */ + if( get_options( argc, argv ) != NS_SUCCESS ) + return EXIT_FAILURE; + return 1; +} + diff --git a/modules/dbm/gdbm/Makefile.in b/modules/dbm/gdbm/Makefile.in index 22bba2cf..d50b009f 100644 --- a/modules/dbm/gdbm/Makefile.in +++ b/modules/dbm/gdbm/Makefile.in @@ -43,7 +43,9 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ subdir = modules/dbm/gdbm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -94,6 +96,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -113,6 +118,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -229,6 +236,7 @@ AM_CFLAGS = -I$(top_srcdir)/lib/adns/ @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/dccpartyline/Makefile.in b/modules/dccpartyline/Makefile.in index ec0832a5..bb204b93 100644 --- a/modules/dccpartyline/Makefile.in +++ b/modules/dccpartyline/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/dccpartyline ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/extauth/Makefile.in b/modules/extauth/Makefile.in index f2d931bb..ff3e9115 100644 --- a/modules/extauth/Makefile.in +++ b/modules/extauth/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/extauth ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/hostserv/Makefile.in b/modules/hostserv/Makefile.in index f068da9f..680f1dfa 100644 --- a/modules/hostserv/Makefile.in +++ b/modules/hostserv/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/hostserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/ircdauth/Makefile.in b/modules/ircdauth/Makefile.in index d49dc95a..460bd818 100644 --- a/modules/ircdauth/Makefile.in +++ b/modules/ircdauth/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/ircdauth ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/limitserv/Makefile.in b/modules/limitserv/Makefile.in index 468ab264..d4066d42 100644 --- a/modules/limitserv/Makefile.in +++ b/modules/limitserv/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/limitserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/operlog/Makefile.in b/modules/operlog/Makefile.in index 784a72a1..02a77498 100644 --- a/modules/operlog/Makefile.in +++ b/modules/operlog/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/operlog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/perltest/Makefile.in b/modules/perltest/Makefile.in index b0a300a8..f14f1657 100644 --- a/modules/perltest/Makefile.in +++ b/modules/perltest/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/perltest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -216,6 +223,7 @@ extra_DIST = extension.ple test.pl LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/protocol/Makefile.in b/modules/protocol/Makefile.in index 5d8c45e3..9cf1908e 100755 --- a/modules/protocol/Makefile.in +++ b/modules/protocol/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/protocol ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -136,6 +138,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -155,6 +160,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -283,6 +290,7 @@ AM_CFLAGS = -I$(top_srcdir)/lib/adns/ -I$(top_srcdir)/lib/keeper @PCRE_CFLAGS@ @ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/quoteserv/Makefile.in b/modules/quoteserv/Makefile.in index 625068f7..d4069016 100644 --- a/modules/quoteserv/Makefile.in +++ b/modules/quoteserv/Makefile.in @@ -43,7 +43,9 @@ DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ subdir = modules/quoteserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -91,6 +93,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -110,6 +115,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -219,6 +226,7 @@ dist_data_DATA = data/* LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/statserv/Makefile.in b/modules/statserv/Makefile.in index d5d1ba15..97d84c6a 100644 --- a/modules/statserv/Makefile.in +++ b/modules/statserv/Makefile.in @@ -43,7 +43,9 @@ DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ subdir = modules/statserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -93,6 +95,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -112,6 +117,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -232,6 +239,7 @@ dist_data_DATA = GeoIP.dat html/index.tpl LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/template/Makefile.in b/modules/template/Makefile.in index 9a3970bd..90fe2755 100644 --- a/modules/template/Makefile.in +++ b/modules/template/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/template ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/templateauth/Makefile.in b/modules/templateauth/Makefile.in index 61812ac8..019c607f 100644 --- a/modules/templateauth/Makefile.in +++ b/modules/templateauth/Makefile.in @@ -42,7 +42,9 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = modules/templateauth ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -88,6 +90,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -107,6 +112,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -215,6 +222,7 @@ AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/modules/textserv/Makefile.in b/modules/textserv/Makefile.in index 5152fe6c..803cc572 100644 --- a/modules/textserv/Makefile.in +++ b/modules/textserv/Makefile.in @@ -43,7 +43,9 @@ DIST_COMMON = $(dist_tsdb_DATA) $(srcdir)/Makefile.am \ subdir = modules/textserv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -91,6 +93,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -110,6 +115,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -220,6 +227,7 @@ dist_tsdb_DATA = data/* LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: diff --git a/src/Makefile.in b/src/Makefile.in index f2fe547f..84c7b00c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -46,7 +46,9 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \ + $(top_srcdir)/autotools/ax_compare_version.m4 \ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/autotools/ax_path_bdb.m4 \ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \ $(top_srcdir)/autotools/ccdv.m4 \ @@ -118,6 +120,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BDB_CPPFLAGS = @BDB_CPPFLAGS@ +BDB_LDFLAGS = @BDB_LDFLAGS@ +BDB_LIBS = @BDB_LIBS@ BUILD_CURL_FALSE = @BUILD_CURL_FALSE@ BUILD_CURL_TRUE = @BUILD_CURL_TRUE@ BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@ @@ -137,6 +142,8 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DO_BDB_FALSE = @DO_BDB_FALSE@ +DO_BDB_TRUE = @DO_BDB_TRUE@ DO_PERL_FALSE = @DO_PERL_FALSE@ DO_PERL_TRUE = @DO_PERL_TRUE@ ECHO = @ECHO@ @@ -260,6 +267,7 @@ noinst_HEADERS = confuselexer.l NeoStats.pm LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +docdir = $(prefix)/doc all: all-am .SUFFIXES: