From 3a1fdc9e7fc65e29320b988f9a69c8acab168ff9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 15 Nov 2012 19:20:10 +0100 Subject: MDEV-3826 compilation of client programs fail: m_string.h tries to include mysql_config: - add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path, for #include 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 to work - but don't do it, if $pkgincludedir/.. is /usr/include --- scripts/mysql_config.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts/mysql_config.sh') 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 -- cgit v1.2.1