clean up CMK_REPLAYSYSTEM with --enable-replay/--disable-replay
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 20:45:33 +0000 (15:45 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 20:45:33 +0000 (15:45 -0500)
build
src/conv-core/conv-config.h
src/scripts/configure
src/scripts/configure.in
src/scripts/conv-autoconfig.h.in

diff --git a/build b/build
index 083a97a90018d0a2dd267f9b31966ce56ace56ef..b7564cb0b2388a2ec20f1412dcc541ef36544284 100755 (executable)
--- a/build
+++ b/build
@@ -545,10 +545,9 @@ fi
 if test -n "$WITH_PRODUCTION"
 then
     echo '#define CMK_OPTIMIZE 1' >> $ConvHeader
-    echo '#define CMK_REPLAYSYSTEM  0' >> $ConvHeader
     # Prepend optimize so that an explicit -no-optimize still works
     OPTS="-optimize $OPTS"
-    CONFIG_OPTS="--disable-tracing $CONFIG_OPTS"
+    CONFIG_OPTS="--disable-tracing --disable-replay $CONFIG_OPTS"
 fi
 
 # build with Tau
index 79157164f50787a04c66fa2f394b24b112b9ea0a..cc6f497452e42caabb69b0ab6f151d5b662eeb45 100644 (file)
 #endif
 
 /* set up what production/non-production means */
-#ifndef CMK_OPTIMIZE
+#ifdef CMK_OPTIMIZE
+#undef CMK_REPLAYSYSTEM
+#define CMK_REPLAYSYSTEM            0
+#endif    /* CMK_OPTIMIZE */
 
 #ifndef CMK_REPLAYSYSTEM
-#if !defined(_WIN32)
 #define CMK_REPLAYSYSTEM            1
 #endif
-#endif
 
-#endif    /* CMK_OPTIMIZE */
+#ifdef _WIN32
+#undef CMK_REPLAYSYSTEM
+#define CMK_REPLAYSYSTEM            0
+#endif
 
 #ifndef CMK_TRACE_DISABLED
 #define CMK_TRACE_DISABLED          0
index 7f860801fdc8e5e527396c68bbe1126bff3f0fe8..d707e6a2d82fd1b0e04d1a029c836996e632eb90 100755 (executable)
@@ -1191,6 +1191,7 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-tracing        enable tracing modules
+  --enable-replay         enable record/replay
 
 _ACEOF
 ac_status=$?
@@ -1627,6 +1628,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# check enable/disable
 # Check whether --enable-tracing was given.
 if test "${enable_tracing+set}" = set; then
   enableval=$enable_tracing; enable_tracing=$enableval
@@ -1644,6 +1646,24 @@ _ACEOF
 
 fi
 
+# Check whether --enable-replay was given.
+if test "${enable_replay+set}" = set; then
+  enableval=$enable_replay; enable_replay=$enableval
+else
+  enable_replay=yes
+fi
+
+
+if test "$enable_replay" = "no"
+then
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_REPLAYSYSTEM 0
+_ACEOF
+
+fi
+
+#
 { echo "$as_me:$LINENO: checking machine name" >&5
 echo $ECHO_N "checking machine name... $ECHO_C" >&6; }
 version=`pwd | awk -F/ '{print $(NF-1)}'`
index c709111fe2c8a28972efeac93418a671dfa0301a..d69ac81d107461385412326dee06079d912073c1 100644 (file)
@@ -11,6 +11,7 @@ VERSION=60301
 echo $VERSION > ../include/VERSION
 AC_DEFINE_UNQUOTED([CHARM_VERSION], $VERSION, [Charm++ version number])
 
+# check enable/disable
 AC_ARG_ENABLE([tracing],
             [AS_HELP_STRING([--enable-tracing],
               [enable tracing modules])],
@@ -22,6 +23,18 @@ then
   AC_DEFINE_UNQUOTED(CMK_TRACE_DISABLED, 1, [disable tracing])
 fi
 
+AC_ARG_ENABLE([replay],
+            [AS_HELP_STRING([--enable-replay],
+              [enable record/replay])],
+            [enable_replay=$enableval],
+            [enable_replay=yes])
+
+if test "$enable_replay" = "no"
+then
+  AC_DEFINE_UNQUOTED(CMK_REPLAYSYSTEM, 0, [disable replay])
+fi
+
+#
 AC_MSG_CHECKING(machine name)
 version=`pwd | awk -F/ '{print $(NF-1)}'`
 base_version=`cat .vdir`
index e1fad422b1e2402fd529b40fde8675b1d4a8bfac..9e281b9eb98ba1d8ffb4a4fec0256e8654cf6c1e 100644 (file)
 /* Python version */
 #undef CMK_PYTHON_VERSION
 
+/* disable replay */
+#undef CMK_REPLAYSYSTEM
+
 /* whether C++ signed char and char differ */
 #undef CMK_SIGNEDCHAR_DIFF_CHAR