bug 1014976 - Allow --enable-debug --disable-debug-rtl builds. r=ted NSPR_4_10_6_BETA2
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 28 May 2014 14:05:50 -0400
changeset 4567 8175a7a0f1864fd27a089992ffbc1d3fcd4e0a12
parent 4566 e6e504e6844cdba64e9c27bfbf436a27ec03ac60
child 4568 1a419f3f0925aa343dbf7bdad629d8d8f7ce3c8f
push id112
push usertmielczarek@mozilla.com
push dateWed, 28 May 2014 18:06:01 +0000
reviewersted
bugs1014976
bug 1014976 - Allow --enable-debug --disable-debug-rtl builds. r=ted
configure
configure.in
--- a/configure
+++ b/configure
@@ -2898,16 +2898,18 @@ if test "${enable_symbian_target+set}" =
   enableval=$enable_symbian_target; OS_TARGET=`echo $enableval | tr a-z A-Z`
 fi
 
 
 # Check whether --enable-debug-rtl was given.
 if test "${enable_debug_rtl+set}" = set; then :
   enableval=$enable_debug_rtl;  if test "$enableval" = "yes"; then
 	    USE_DEBUG_RTL=1
+      else
+	    USE_DEBUG_RTL=0
       fi
 fi
 
 
 # Check whether --enable-n32 was given.
 if test "${enable_n32+set}" = set; then :
   enableval=$enable_n32;  if test "$enableval" = "yes"; then
 	USE_N32=1
@@ -5737,17 +5739,17 @@ CYGWIN_NT*|MINGW*_NT*|MSYS_NT*)
     if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
         CPU_ARCH=x86
     fi
     ;;
 esac
 
 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
     OS_TARGET=WIN95
-    if test -n "$MOZ_DEBUG"; then
+    if test -n "$MOZ_DEBUG" -a -z "$USE_DEBUG_RTL"; then
         USE_DEBUG_RTL=1
     fi
 fi
 if test -z "$OS_TARGET"; then
     OS_TARGET=$OS_ARCH
 fi
 if test "$OS_TARGET" = "WIN95"; then
     OS_RELEASE="4.0"
@@ -7178,17 +7180,17 @@ tools are selected during the Xcode/Deve
                                     PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
             PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
         fi
 
         if test -z "$MOZ_OPTIMIZE"; then
             CFLAGS="$CFLAGS -Od"
         fi
 
-        if test -n "$USE_DEBUG_RTL"; then
+        if test "$USE_DEBUG_RTL" = 1; then
             CFLAGS="$CFLAGS -MDd"
         else
             CFLAGS="$CFLAGS -MD"
         fi
 
         if test -n "$MOZ_DEBUG"; then
             $as_echo "#define _DEBUG 1" >>confdefs.h
 
@@ -7239,17 +7241,17 @@ tools are selected during the Xcode/Deve
     fi
 
     if test "$CPU_ARCH" = "x86"; then
         CPU_ARCH_TAG=
     else
         CPU_ARCH_TAG=$CPU_ARCH
     fi
 
-    if test -n "$USE_DEBUG_RTL"; then
+    if test "$USE_DEBUG_RTL" = 1; then
         OBJDIR_SUFFIX=OBJD
     fi
 
     case "$OS_TARGET" in
     WINNT)
 	    MDCPUCFG_H=_winnt.cfg
 	    ;;
     WIN95)
--- a/configure.in
+++ b/configure.in
@@ -379,16 +379,18 @@ AC_ARG_ENABLE(symbian-target,
     [  --enable-symbian-target=\$t
                           Specify symbian flavor. (WINSCW or GCCE)],
     OS_TARGET=`echo $enableval | tr a-z A-Z`)
 
 AC_ARG_ENABLE(debug-rtl,
     [  --enable-debug-rtl      Use the MSVC debug runtime library],
     [ if test "$enableval" = "yes"; then
 	    USE_DEBUG_RTL=1
+      else
+	    USE_DEBUG_RTL=0
       fi ])
 
 AC_ARG_ENABLE(n32,
     [  --enable-n32            Enable n32 ABI support (IRIX only)],
     [ if test "$enableval" = "yes"; then
 	USE_N32=1
       else if test "$enableval" = "no"; then
 	USE_N32=
@@ -976,17 +978,17 @@ CYGWIN_NT*|MINGW*_NT*|MSYS_NT*)
     if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
         CPU_ARCH=x86
     fi
     ;;
 esac
 
 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
     OS_TARGET=WIN95
-    if test -n "$MOZ_DEBUG"; then
+    if test -n "$MOZ_DEBUG" -a -z "$USE_DEBUG_RTL"; then
         USE_DEBUG_RTL=1
     fi
 fi
 if test -z "$OS_TARGET"; then
     OS_TARGET=$OS_ARCH
 fi
 if test "$OS_TARGET" = "WIN95"; then
     OS_RELEASE="4.0"
@@ -1996,17 +1998,17 @@ tools are selected during the Xcode/Deve
             PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
             PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
         fi
 
         if test -z "$MOZ_OPTIMIZE"; then
             CFLAGS="$CFLAGS -Od"
         fi
 
-        if test -n "$USE_DEBUG_RTL"; then
+        if test "$USE_DEBUG_RTL" = 1; then
             CFLAGS="$CFLAGS -MDd"
         else
             CFLAGS="$CFLAGS -MD"
         fi
 
         if test -n "$MOZ_DEBUG"; then
             AC_DEFINE(_DEBUG)
         else
@@ -2052,17 +2054,17 @@ tools are selected during the Xcode/Deve
     fi
 
     if test "$CPU_ARCH" = "x86"; then
         CPU_ARCH_TAG=
     else
         CPU_ARCH_TAG=$CPU_ARCH
     fi
 
-    if test -n "$USE_DEBUG_RTL"; then
+    if test "$USE_DEBUG_RTL" = 1; then
         OBJDIR_SUFFIX=OBJD
     fi
 
     case "$OS_TARGET" in
     WINNT)
 	    MDCPUCFG_H=_winnt.cfg
 	    ;;
     WIN95)