summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorian@zim.(none) <>2006-03-27 19:48:44 -0800
committerian@zim.(none) <>2006-03-27 19:48:44 -0800
commit9caff206c2eeec2cfbcc4aebca60c4c1fe69b8f9 (patch)
treebfe4957858d6f08b9e8ccca1d102b7fa07b06d7c /scripts
parent1ec1587cd3749f6ab41c57a1c766287851ce0480 (diff)
parent34b54fa83c65ee0bb7000548f41c6359d58b82d1 (diff)
downloadmariadb-git-9caff206c2eeec2cfbcc4aebca60c4c1fe69b8f9.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
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]