diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-06 01:16:28 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-06 01:16:28 +0200 |
commit | b5cfb7ac01dd00715060470805859a51d6f2caf5 (patch) | |
tree | 72b6ce45de206772ff694d62b41d9fc5a16edbe8 /scripts/mysql_config.sh | |
parent | ff8c7348648b2a2e1ce14d8332c065a38a43ca0c (diff) | |
parent | 6f8f45e9592aa7f2ca48168d51e1624cce158797 (diff) | |
download | mariadb-git-b5cfb7ac01dd00715060470805859a51d6f2caf5.tar.gz |
merge with 3.23.47
Docs/manual.texi:
Auto merged
Build-tools/Do-compile:
Auto merged
innobase/include/buf0buf.ic:
Auto merged
myisam/mi_locking.c:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
mysys/my_init.c:
Auto merged
scripts/mysql_config.sh:
Auto merged
mysql-test/t/myisam.test:
Auto merged
sql/ha_innobase.h:
Auto merged
sql/handler.h:
Auto merged
configure.in:
merge
mysql-test/r/innodb.result:
merge
mysql-test/r/join_outer.result:
merge
mysql-test/r/myisam.result:
merge
mysql-test/t/innodb.test:
merge
mysys/mf_iocache2.c:
Skip changes in 3.23
sql/sql_select.cc:
merge
Diffstat (limited to 'scripts/mysql_config.sh')
-rw-r--r-- | scripts/mysql_config.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index b2a09173760..31e3ed42e0a 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -18,11 +18,62 @@ # This script reports various configuration settings that may be needed # when using the MySQL client library. +which () +{ + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + for file + do + for dir in $PATH + do + if test -f $dir/$file + then + echo "$dir/$file" + continue 2 + fi + done + echo "which: no $file in ($PATH)" + exit 1 + done + 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 () +{ + 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 $0` +fi + +basedir=`echo $me | sed -e 's;/bin/mysql_config;;'` + ldata='@localstatedir@' execdir='@libexecdir@' bindir='@bindir@' pkglibdir='@pkglibdir@' +fix_path pkglibdir lib/mysql lib pkgincludedir='@pkgincludedir@' +fix_path pkgincludedir include/mysql include version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' port='@MYSQL_TCP_PORT@' |