From e4931c922ea6e4b531cec373d3adabc60a358143 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 12 May 2014 15:21:23 +0200 Subject: Backport from trunk: Bug #18382225 MYSQL_CONFIG CAN'T HANDLE RELOCABLE PACKAGES THAT USES "LIB64" OR "-64" SUFFIX 'lib' is hardcoded into mysql_config, so 'cmake -DINSTALL_LIBDIR=lib64' will not work. Use INSTALL_LIBDIR when generating mysql_config. mysql_config may be renamed to e.g. mysql_config-32, fix the basedir pattern matching. --- scripts/mysql_config.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/mysql_config.sh') diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 327b03504cd..b7c00cc4125 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -76,7 +76,8 @@ get_full_path () me=`get_full_path $0` -basedir=`echo $me | sed -e 's;/bin/mysql_config;;'` +# Script might have been renamed but assume mysql_config +basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'` ldata='@localstatedir@' execdir='@libexecdir@' @@ -85,11 +86,11 @@ bindir='@bindir@' # If installed, search for the compiled in directory first (might be "lib64") pkglibdir='@pkglibdir@' pkglibdir_rel=`echo $pkglibdir | sed -e "s;^$basedir/;;"` -fix_path pkglibdir $pkglibdir_rel lib/mysql lib +fix_path pkglibdir $pkglibdir_rel @libsubdir@/mysql @libsubdir@ plugindir='@pkgplugindir@' plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` -fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin +fix_path plugindir $plugindir_rel @libsubdir@/mysql/plugin @libsubdir@/plugin pkgincludedir='@pkgincludedir@' if [ -f "$basedir/include/mysql/mysql.h" ]; then -- cgit v1.2.1 From 0661c7329d5b1fb7630f7ba37c722c06882ea811 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 3 Aug 2014 18:39:36 +0200 Subject: MDEV-6352 [PATCH] mysql_config prints usage to stdout and exit with 0 if run with unknow option --- scripts/mysql_config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/mysql_config.sh') diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index beff6e5eb5f..4bf95cccbe6 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -176,10 +176,10 @@ Options: pkglibdir [$pkglibdir] plugindir [$plugindir] EOF - exit 0 + exit $1 } -if test $# -le 0; then usage; fi +if test $# -le 0; then usage 0 ; fi while test $# -gt 0; do case $1 in @@ -198,10 +198,10 @@ while test $# -gt 0; do pkgincludedir) echo "$pkgincludedir" ;; pkglibdir) echo "$pkglibdir" ;; plugindir) echo "$plugindir" ;; - *) usage ;; + *) usage 1 >&2 ;; esac ;; - *) usage ;; + *) usage 1 >&2 ;; esac shift -- cgit v1.2.1