diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2014-05-12 15:21:23 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2014-05-12 15:21:23 +0200 |
commit | e4931c922ea6e4b531cec373d3adabc60a358143 (patch) | |
tree | e0ad1df5ffa444e3a12b97f585169f895533885b /scripts | |
parent | aa992742db302c51ba83308f4512168e23e7e4e3 (diff) | |
download | mariadb-git-e4931c922ea6e4b531cec373d3adabc60a358143.tar.gz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CMakeLists.txt | 1 | ||||
-rw-r--r-- | scripts/mysql_config.sh | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 6596396191a..5e03acb654b 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -223,6 +223,7 @@ SET(libexecdir ${prefix}/${INSTALL_SBINDIR}) SET(scriptdir ${prefix}/${INSTALL_BINDIR}) SET(datadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) SET(pkgdatadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) +SET(libsubdir ${INSTALL_LIBDIR}) SET(pkgincludedir ${prefix}/${INSTALL_INCLUDEDIR}) SET(pkglibdir ${prefix}/${INSTALL_LIBDIR}) SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR}) 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_<something>config<something> +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 |