summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-11-15 19:20:10 +0100
committerSergei Golubchik <sergii@pisem.net>2012-11-15 19:20:10 +0100
commit3a1fdc9e7fc65e29320b988f9a69c8acab168ff9 (patch)
treea110de6e7ba27eb888fb15deacf52a64debe0bf8 /scripts
parent53578613e96bb471446e226dbab61c2152232f56 (diff)
downloadmariadb-git-3a1fdc9e7fc65e29320b988f9a69c8acab168ff9.tar.gz
MDEV-3826 compilation of client programs fail: m_string.h tries to include <mysql/plugin.h>
mysql_config: - add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path, for #include <mysql/plugin.h> to work scripts/mysql_config.sh: - don't support headers in */include anymore. only in */include/mysql - remove the incorrect "bug fix" (fixed correctly long time ago) - add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path, for #include <mysql/plugin.h> to work - but don't do it, if $pkgincludedir/.. is /usr/include
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_config.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index fd15d7ac746..38cd2b6b910 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -92,11 +92,7 @@ plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"`
fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin
pkgincludedir='@pkgincludedir@'
-if [ -f "$basedir/include/mysql/mysql.h" ]; then
- pkgincludedir="$basedir/include/mysql"
-elif [ -f "$basedir/include/mysql.h" ]; then
- pkgincludedir="$basedir/include"
-fi
+fix_path pkgincludedir include/mysql
version='@VERSION@'
socket='@MYSQL_UNIX_ADDR@'
@@ -125,8 +121,11 @@ if [ -r "$pkglibdir/libmygcc.a" ]; then
embedded_libs="$embedded_libs -lmygcc "
fi
-cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
include="-I$pkgincludedir"
+if [ "$basedir" != "/usr" ]; then
+ include="$include -I$pkgincludedir/.."
+fi
+cflags="$include @CFLAGS@ " #note: end space!
# Remove some options that a client doesn't have to care about
# FIXME until we have a --cxxflags, we need to remove -Xa