Allow spaces in --enable-optimize args. Bug #68246 r=leaf a=brendan
authorcls%seawood.org
Fri, 09 Feb 2001 21:29:46 +0000
changeset 1721 c7aa97ffdab0e12cbc1d644c62b183a6cbb7c6fb
parent 1720 16ed28c9fbaa7f5d0b499b3bdfacd5758ef96e5a
child 1729 01b850433c117e41d88bb610885628d841338ebd
push idunknown
push userunknown
push dateunknown
reviewersleaf, brendan
bugs68246
Allow spaces in --enable-optimize args. Bug #68246 r=leaf a=brendan
configure
configure.in
--- a/configure
+++ b/configure
@@ -10,17 +10,17 @@
 # Defaults:
 ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_default_prefix=\${MOD_DEPTH}/dist
 ac_help="$ac_help
   --with-mozilla          Compile NSPR with Mozilla support"
 ac_help="$ac_help
-  --enable-optimize(=val) Enable code optimizations level (val)"
+  --enable-optimize(=flag) Enable code optimizations (flag, ie. -O2) "
 ac_help="$ac_help
   --disable-debug         Do not compile in debugging symbols"
 ac_help="$ac_help
   --disable-shared        Do not compile into shared libraries"
 ac_help="$ac_help
   --enable-win32-target=\$t
                                Specify win32 flavor. (WIN95 or WINNT)"
 ac_help="$ac_help
@@ -750,18 +750,18 @@ fi
 
 
 # Check whether --enable-optimize or --disable-optimize was given.
 if test "${enable_optimize+set}" = set; then
   enableval="$enable_optimize"
    if test "$enableval" != "no"; then
         MOZ_OPTIMIZE=1
         if test -n "$enableval" && test "$enableval" != "yes"; then
-            _OPTIMIZE_FLAGS="$enableval"
-            _SAVE_OPTIMIZE_FLAGS="$enableval"
+    	    _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+            _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
         fi
     fi 
 fi
 
 
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
--- a/configure.in
+++ b/configure.in
@@ -129,22 +129,22 @@ AC_ARG_WITH(mozilla,
 	    else
 	        MOZILLA_CLIENT=
 	    fi],
     [	if test -n "$MOZILLA_CLIENT"; then
 	        AC_DEFINE(MOZILLA_CLIENT)
 	    fi])
 
 AC_ARG_ENABLE(optimize,
-    [  --enable-optimize(=val) Enable code optimizations level (val)],
+    [  --enable-optimize(=flag) Enable code optimizations (flag, ie. -O2) ],
     [ if test "$enableval" != "no"; then
         MOZ_OPTIMIZE=1
         if test -n "$enableval" && test "$enableval" != "yes"; then
-            _OPTIMIZE_FLAGS="$enableval"
-            _SAVE_OPTIMIZE_FLAGS="$enableval"
+    	    _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+            _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
         fi
     fi ])
 
 AC_ARG_ENABLE(debug,
     [  --disable-debug         Do not compile in debugging symbols],
     [	if test "$enableval" = "no"; then
     	    MOZ_DEBUG=
 	    fi])