diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-05 23:56:56 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-05 23:56:56 +0200 |
commit | 6f8f45e9592aa7f2ca48168d51e1624cce158797 (patch) | |
tree | 5a0aaea63377fc914c0392cf7adeadcac0391b3a /scripts/mysql_config.sh | |
parent | 2a74eb824fab0a96781eb7362bc1c7b5816a8e02 (diff) | |
download | mariadb-git-6f8f45e9592aa7f2ca48168d51e1624cce158797.tar.gz |
Small changes to mysql_config.sh
Docs/manual.texi:
Changelog
scripts/mysql_config.sh:
Fix script to search in different directories for include and lib
Diffstat (limited to 'scripts/mysql_config.sh')
-rw-r--r-- | scripts/mysql_config.sh | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 05cc8632363..af11957576b 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -37,20 +37,32 @@ which () IFS="$save_ifs" } +# +# If we can find the given directory relatively to where mysql_config is +# we should use this instead of the incompiled one. +# This is to ensure that this script also works with the binary MySQL +# version + fix_path () { - eval path=\$"$1" - if [ ! -f "$path" ] ; - then - eval "$1"=$basedir/$2 - fi + var=$1 + shift + for filename + do + path=$basedir/$filename + if [ -d "$path" ] ; + then + eval "$var"=$path + return + fi + done } abs_path=`expr \( substr $0 1 1 \) = '/'` if [ "x$abs_path" = "x1" ] ; then me=$0 else - me=`which mysql_config` + me=`which $0` fi basedir=`echo $me | sed -e 's;/bin/mysql_config;;'` @@ -59,9 +71,9 @@ ldata='@localstatedir@' execdir='@libexecdir@' bindir='@bindir@' pkglibdir='@pkglibdir@' -fix_path pkglibdir lib/mysql +fix_path pkglibdir lib/mysql lib pkgincludedir='@pkgincludedir@' -fix_path pkgincludedir include/mysql +fix_path pkgincludedir include/mysql include version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' port='@MYSQL_TCP_PORT@' |