diff options
author | tim@threads.polyesthetic.msg <> | 2001-03-07 16:35:44 -0500 |
---|---|---|
committer | tim@threads.polyesthetic.msg <> | 2001-03-07 16:35:44 -0500 |
commit | f74ffcca0c642db87fecef404bdbffbd83a38c9a (patch) | |
tree | 06eda97108be5ba8a25a7cac5ae2327647f8f343 /acinclude.m4 | |
parent | 6d78974d4ff57743a1c8983af097f7a290b1a102 (diff) | |
parent | 496542f2914477de6d71439bab5f2dedd0e38309 (diff) | |
download | mariadb-git-f74ffcca0c642db87fecef404bdbffbd83a38c9a.tar.gz |
Merge work.mysql.com:/home/bk/mysql
into threads.polyesthetic.msg:/usr/local/src/my/work
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 1c01126385d..633b2345a72 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -608,8 +608,8 @@ AC_MSG_RESULT($ac_cv_conv_longlong_to_float) dnl --------------------------------------------------------------------------- dnl Macro: MYSQL_CHECK_BDB dnl Sets HAVE_BERKELEY_DB if inst library is found -dnl Makes sure db version is >= 3.2.3 -dnl Looks in $srcdir for Berkeley distribution not told otherwise +dnl Makes sure db version is correct. +dnl Looks in $srcdir for Berkeley distribution if not told otherwise dnl --------------------------------------------------------------------------- AC_DEFUN([MYSQL_CHECK_BDB], [ @@ -618,7 +618,7 @@ AC_DEFUN([MYSQL_CHECK_BDB], [ --with-berkeley-db[=DIR] Use BerkeleyDB located in DIR], [bdb="$withval"], - [bdb=default]) + [bdb=no]) AC_ARG_WITH([berkeley-db-includes], [\ @@ -719,8 +719,6 @@ dnl echo "DBG3: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'" ;; compile ) have_berkeley_db="$bdb" -dnl Is added to @sql_server_dirs@ in configure.in - MYSQL_TOP_BUILDDIR([have_berkeley_db]) AC_MSG_RESULT([Compiling Berekeley DB in '$have_berkeley_db']) ;; * ) @@ -791,9 +789,18 @@ AC_DEFUN([MYSQL_SEARCH_FOR_BDB], [ dnl echo ["MYSQL_SEARCH_FOR_BDB"] bdb_dir_ok="no BerkeleyDB found" - for test_dir in bdb db-*.*.* ../db-*.*.* /usr/local/BerkeleyDB*; do + for test_dir in $srcdir/bdb $srcdir/db-*.*.* /usr/local/BerkeleyDB*; do +dnl echo "-----------> Looking at ($test_dir; `cd $test_dir && pwd`)" MYSQL_CHECK_BDB_DIR([$test_dir]) if test X"$bdb_dir_ok" = Xsource || test X"$bdb_dir_ok" = Xinstalled; then +dnl echo "-----------> Found it ($bdb), ($srcdir)" +dnl This is needed so that 'make distcheck' works properly (VPATH build). +dnl VPATH build won't work if bdb is not under the source tree; but in +dnl that case, hopefully people will just make and install inside the +dnl tree, or install BDB first, and then use the installed version. + case "$bdb" in + "$srcdir/"* ) bdb=`echo "$bdb" | sed -e "s,^$srcdir/,,"` ;; + esac break fi done @@ -834,9 +841,18 @@ AC_DEFUN([MYSQL_CHECK_BDB_VERSION], [ ]) AC_DEFUN([MYSQL_TOP_BUILDDIR], [ - case $[$1] in - /* ) ;; # already an absolute path - * ) [$1]="'\$(top_builddir)/'$[$1]" ;; + case "$[$1]" in + /* ) ;; # don't do anything with an absolute path + "$srcdir"/* ) + # If BDB is under the source directory, we need to look under the + # build directory for bdb/build_unix. + # NOTE: I'm being lazy, and assuming the user did not specify + # something like --with-berkeley-db=bdb (it would be missing "./"). + [$1]="\$(top_builddir)/"`echo "$[$1]" | sed -e "s,^$srcdir/,,"` + ;; + * ) + AC_MSG_ERROR([The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$[$1]')]) + ;; esac if test X"$[$1]" != "/" then |