From 8c5759d7b2556de04e088ed6dfc0d2a5b0ed2769 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 1 Jul 2007 15:29:53 +0000 Subject: Add --with-bdb-headers and --with-bdb-lib flags to configure to fix Berkeley DB detection issues on FreeBSD. The original --with-bdb-dir flag is still present for systems that install BDB in a "standard" location. (merges [1714] from trunk by James O'Gorman, refs #3) --- infrastructure/m4/ax_path_bdb.m4 | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'infrastructure') diff --git a/infrastructure/m4/ax_path_bdb.m4 b/infrastructure/m4/ax_path_bdb.m4 index 08d71053..bec4a5d4 100644 --- a/infrastructure/m4/ax_path_bdb.m4 +++ b/infrastructure/m4/ax_path_bdb.m4 @@ -13,7 +13,9 @@ 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 Berkeley DB installation to use, or --with-bdb-headers=DIR and +dnl --with-bdb-lib=DIR can be used to specify individual include and +dnl library locations. dnl dnl An example of it's use is: dnl @@ -57,6 +59,8 @@ dnl Changes: dnl dnl 1/5/05 applied patch from Rafa Rzepecki to eliminate compiler dnl warning about unused variable, argv +dnl 1/7/07 Add --with-bdb-headers and --with-bdb-lib options +dnl (James O'Gorman, james@netinertia.co.uk) dnl dnl @category InstalledPackages dnl @author Tim Toolan @@ -73,16 +77,35 @@ AC_DEFUN([AX_PATH_BDB], [ [AC_HELP_STRING([--with-bdb-dir=DIR], [Berkeley DB installation directory])]) + # Add --with-bdb-headers and --with-bdb-lib options + AC_ARG_WITH([bdb-headers], + [AC_HELP_STRING([--with-bdb-headers=DIR], + [Berkeley DB include files location])]) + + AC_ARG_WITH([bdb-lib], + [AC_HELP_STRING([--with-bdb-lib=DIR], + [Berkeley DB library location])]) + # Check if --with-bdb-dir was specified. - if test "x$with_bdb_dir" = "x" ; then + if test "x$with_bdb_dir" = "x" -a \ + "x$with_bdb_headers" = "x" -a "x$with_bdb_lib" = "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" + # Check if the --with-bdb-headers and --with-bdb-lib flags were defined + # Use them if so, otherwise use --with-bdb-dir + if test "x$with_bdb_headers" = "x"; then + ax_path_bdb_INC="$with_bdb_dir/include" + else + ax_path_bdb_INC="$with_bdb_headers" + fi + if test "x$with_bdb_lib" = "x"; then + ax_path_bdb_LIB="$with_bdb_dir/lib" + else + ax_path_bdb_LIB="$with_bdb_lib" + fi dnl # Save previous environment, and modify with new stuff. ax_path_bdb_save_CPPFLAGS="$CPPFLAGS" -- cgit v1.2.3