summaryrefslogtreecommitdiff
path: root/scripts/mysql_config.sh
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-02-20 12:02:34 +0100
committerunknown <serg@serg.mylan>2004-02-20 12:02:34 +0100
commit2bd261a1538ca8be6898fb47d8696acb10aa4684 (patch)
tree25ba6a3cdb5f621fffd28dbf2cf5e07965a3c500 /scripts/mysql_config.sh
parentefca692ae70d9b47c37a9c9e8c7f85150a11ec23 (diff)
downloadmariadb-git-2bd261a1538ca8be6898fb47d8696acb10aa4684.tar.gz
\| is sed is on-portable
Diffstat (limited to 'scripts/mysql_config.sh')
-rw-r--r--scripts/mysql_config.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 051f3fa9c14..aa7af1cb2c6 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -84,20 +84,25 @@ port='@MYSQL_TCP_PORT@'
ldflags='@LDFLAGS@'
client_libs='@CLIENT_LIBS@'
-# Create options, without end space
+# Create options
libs="$ldflags -L$pkglibdir -lmysqlclient $client_libs"
libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @LIBS@ @openssl_libs@"
libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`
-cflags="-I$pkgincludedir @CFLAGS@"
+cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
include="-I$pkgincludedir"
embedded_libs="$ldflags -L$pkglibdir -lmysqld @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
-
-cflags=`echo "$cflags " | sed -e 's;\(-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]*\) *;;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]*'
+do
+ cflags=`echo "$cflags"|sed -e "s/-$remove *//g"`
+done
+cflags=`echo "$cflags"|sed -e 's/ *\$//'`
usage () {
cat <<EOF