added option --disable-error-checking, which defines CMK_ERROR_CHECKING as 0.
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Apr 2010 02:24:47 +0000 (21:24 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Apr 2010 02:24:47 +0000 (21:24 -0500)
build
src/scripts/configure
src/scripts/configure.in
src/scripts/conv-autoconfig.h.in

diff --git a/build b/build
index dc39a749348fc5b4a44e55bedfff93dea0f7dbd3..70e85b7c7caddfe75f34febc24baaf0d2c318391 100755 (executable)
--- a/build
+++ b/build
@@ -551,7 +551,7 @@ then
     echo '#define CMK_OPTIMIZE 1' >> $ConvHeader
     # Prepend optimize so that an explicit -no-optimize still works
     OPTS="-optimize $OPTS"
-    CONFIG_OPTS="--disable-tracing --disable-charmdebug --disable-replay $CONFIG_OPTS"
+    CONFIG_OPTS="--disable-tracing --disable-charmdebug --disable-replay --disable-error-checking $CONFIG_OPTS"
 fi
 
 # build with Tau
index a9320c9b37d63c8fda29e0169e41b27bd2b0585b..7c42a0f829418af2d0395e432c75e3de145be154 100755 (executable)
@@ -1190,6 +1190,7 @@ if test -n "$ac_init_help"; then
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-error-checking enable error checking
   --enable-tracing        enable tracing modules
   --enable-charmdebug     enable charmDebug
   --enable-replay         enable record/replay
@@ -1637,6 +1638,31 @@ Echo() {
        echo $* >> $charmout
 }
 
+# enable/disable error checking
+# Check whether --enable-error-checking was given.
+if test "${enable_error_checking+set}" = set; then
+  enableval=$enable_error_checking; enable_errorchecking=$enableval
+else
+  enable_errorchecking=yes
+fi
+
+
+if test "$enable_errorchecking" = "no"
+then
+  Echo "Error checking is disabled"
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_ERROR_CHECKING 0
+_ACEOF
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_ERROR_CHECKING 1
+_ACEOF
+
+fi
+
 # check enable/disable
 # Check whether --enable-tracing was given.
 if test "${enable_tracing+set}" = set; then
index 0c1757264e84abbdcbe2108fa1606604635ba7da..0874a572160d50b43f7a345a0976f512467e169f 100644 (file)
@@ -19,6 +19,21 @@ Echo() {
        echo $* >> $charmout
 }
 
+# enable/disable error checking
+AC_ARG_ENABLE([error-checking],
+            [AS_HELP_STRING([--enable-error-checking],
+              [enable error checking])],
+            [enable_errorchecking=$enableval],
+            [enable_errorchecking=yes])
+
+if test "$enable_errorchecking" = "no"
+then
+  Echo "Error checking is disabled" 
+  AC_DEFINE_UNQUOTED(CMK_ERROR_CHECKING, 0, [disable error checking])
+else
+  AC_DEFINE_UNQUOTED(CMK_ERROR_CHECKING, 1, [enable error checking])
+fi
+
 # check enable/disable
 AC_ARG_ENABLE([tracing],
             [AS_HELP_STRING([--enable-tracing],
index 189f74a473bf8a3615b48a360b112717d1bc5145..06c4cb85c36e4a6035700074f958a47e6a18cda5 100644 (file)
@@ -42,6 +42,9 @@
 /* whether getProcAddress works */
 #undef CMK_DLL_USE_WIN32
 
+/* enable error checking */
+#undef CMK_ERROR_CHECKING
+
 /* whether C++ class explicit keyword works */
 #undef CMK_EXPLICIT