--with-production disables tracing
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 17:32:29 +0000 (12:32 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 17:32:29 +0000 (12:32 -0500)
configure --disable-tracing disables tracing.

build
src/scripts/Makefile
src/scripts/configure
src/scripts/configure.in
src/scripts/conv-autoconfig.h.in

diff --git a/build b/build
index fd448a90fc94f17e0d86047d681304963dd78e9a..052f5d3d3e1bcdf192c31c2e12b3415a24b05365 100755 (executable)
--- a/build
+++ b/build
@@ -532,6 +532,7 @@ then
     echo '#define CMK_REPLAYSYSTEM  0' >> $ConvHeader
     # Prepend optimize so that an explicit -no-optimize still works
     OPTS="-optimize $OPTS"
+    CONFIG_OPTS="$CONFIG_OPTS --disable-tracing"
 fi
 
 # build with Tau
@@ -586,9 +587,9 @@ printError()
 
 echo 'BUILDOPTS="'$OPTS'"'  >> $ConvSh
 
-Echo "Performing '$MAKE $MAKEOPTS basics OPTS="$OPTS" QUIET="$QUIET"' in $DESTINATION/tmp"
+Echo "Performing '$MAKE $MAKEOPTS basics OPTS="$OPTS" QUIET="$QUIET" CONFIG_OPTS="$CONFIG_OPTS"' in $DESTINATION/tmp"
 cd $DESTINATION/tmp 
-$MAKE $MAKEOPTS basics OPTS="$OPTS $BUILD_SHARED" QUIET="$QUIET"
+$MAKE $MAKEOPTS basics OPTS="$OPTS $BUILD_SHARED" QUIET="$QUIET" CONFIG_OPTS="$CONFIG_OPTS"
 MAKEEXIT=$?
 [ $MAKEEXIT -ne 0 ] && printError
 
index 3e4ee9bd85030f72921b8f94fc40fff7031cda19..1d931f105e5ef255510489231c2dc806626761a4 100644 (file)
@@ -257,7 +257,7 @@ headers: dirs+sources
        $(MAKE) headerlinks
 
 conv-autoconfig.h: configure
-       ./configure $(QUIET)
+       ./configure $(QUIET) $(CONFIG_OPTS)
 
 headerlinks: dirs+sources Makefile $(ALLHEADERS)
        @[ "x$QUIET" = "x--quiet" ] || echo "Soft-linking headers..."
index adc7cbeddc9746e8c074a123b1896b7f4899fcd2..7f860801fdc8e5e527396c68bbe1126bff3f0fe8 100755 (executable)
@@ -1187,6 +1187,11 @@ if test -n "$ac_init_help"; then
 
   cat <<\_ACEOF
 
+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
+
 _ACEOF
 ac_status=$?
 fi
@@ -1622,6 +1627,23 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# Check whether --enable-tracing was given.
+if test "${enable_tracing+set}" = set; then
+  enableval=$enable_tracing; enable_tracing=$enableval
+else
+  enable_tracing=yes
+fi
+
+
+if test "$enable_tracing" = "no"
+then
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_TRACE_DISABLED 1
+_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 541da097bea7dd7f8a33673cea3ef1254aef738c..c709111fe2c8a28972efeac93418a671dfa0301a 100644 (file)
@@ -11,6 +11,17 @@ VERSION=60301
 echo $VERSION > ../include/VERSION
 AC_DEFINE_UNQUOTED([CHARM_VERSION], $VERSION, [Charm++ version number])
 
+AC_ARG_ENABLE([tracing],
+            [AS_HELP_STRING([--enable-tracing],
+              [enable tracing modules])],
+            [enable_tracing=$enableval],
+            [enable_tracing=yes])
+
+if test "$enable_tracing" = "no"
+then
+  AC_DEFINE_UNQUOTED(CMK_TRACE_DISABLED, 1, [disable tracing])
+fi
+
 AC_MSG_CHECKING(machine name)
 version=`pwd | awk -F/ '{print $(NF-1)}'`
 base_version=`cat .vdir`
index b9ecef258c4798f1a9edd91bc47ed19e4b987222..e1fad422b1e2402fd529b40fde8675b1d4a8bfac 100644 (file)
 /* Allows __thread. */
 #undef CMK_TLS_THREAD
 
+/* disable tracing */
+#undef CMK_TRACE_DISABLED
+
 /* whether glibc backtrace works */
 #undef CMK_USE_BACKTRACE