summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <ian@zim.(none)>2006-03-27 19:48:44 -0800
committerunknown <ian@zim.(none)>2006-03-27 19:48:44 -0800
commiteffd72a9eaeb71f354636099506121dcd84f6b15 (patch)
treebfe4957858d6f08b9e8ccca1d102b7fa07b06d7c /scripts
parent9c9e068488b2d2f72d322272a7a8b24182588ebe (diff)
parent4faee6658a19db81e756a57b6d45f48610074f0a (diff)
downloadmariadb-git-effd72a9eaeb71f354636099506121dcd84f6b15.tar.gz
Merge zim.(none):/home/ian/workspace/mysql-5.0
into zim.(none):/home/ian/workspace/mysql-5.1-new Updated bug message in disabled file -Brian BitKeeper/etc/ignore: auto-union include/mysql.h: Auto merged mysql-test/lib/mtr_timer.pl: Auto merged scripts/make_binary_distribution.sh: Auto merged sql-common/client.c: Auto merged sql/ha_innodb.cc: Auto merged sql/parse_file.cc: Auto merged sql/sql_trigger.cc: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged mysql-test/t/disabled.def: Changing message to add in bug numnber
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_config.sh29
1 files changed, 20 insertions, 9 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 5b35c0190a5..4d732485b1d 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -91,18 +91,15 @@ socket='@MYSQL_UNIX_ADDR@'
port='@MYSQL_TCP_PORT@'
ldflags='@LDFLAGS@'
-# Create options
-
-libs="$ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+# Create options
+# We intentionally add a space to the beginning of lib strings, simplifies replace later
+libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@"
-libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@"
+embedded_libs=" $ldflags -L$pkglibdir -lmysqld @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@"
-libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@"
-libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
include="-I$pkgincludedir"
-embedded_libs="$ldflags -L$pkglibdir -lmysqld @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@"
-embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
# Remove some options that a client doesn't have to care about
# FIXME until we have a --cxxflags, we need to remove -Xa
@@ -110,7 +107,7 @@ embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' |
for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \
DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*' \
- Xa xstrconst
+ Xa xstrconst "xc99=none"
do
# The first option we might strip will always have a space before it because
# we set -I$pkgincludedir as the first option
@@ -118,6 +115,20 @@ do
done
cflags=`echo "$cflags"|sed -e 's/ *\$//'`
+# Same for --libs(_r)
+for remove in lmtmalloc
+do
+ # We know the strings starts with a space
+ libs=`echo "$libs"|sed -e "s/ -$remove */ /g"`
+ libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"`
+ embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"`
+done
+
+# Strip trailing and ending space if any, and '+' (FIXME why?)
+libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
+
usage () {
cat <<EOF
Usage: $0 [OPTIONS]