From cb57304e9a603b9f7212e0c8c49ad7f85bca1e49 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 25 Jun 2003 21:08:36 -0500 Subject: [svn-r7108] Purpose: Code cleanup Description: Make the default for the function stack work like the default for the API tracing: when debug is enabled, the function stack defaults to on and when debug is disabled, the function stack defaults to off. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest --- configure | 68 +++++++++++++++++++++++++++++++++--------------------------- configure.in | 52 ++++++++++++++++++++++++++-------------------- 2 files changed, 68 insertions(+), 52 deletions(-) diff --git a/configure b/configure index e8321ea..b5fd153 100755 --- a/configure +++ b/configure @@ -1025,7 +1025,6 @@ Optional Features: --enable-linux-lfs Enable support for large (64-bit) files on Linux. [default=check] --enable-threadsafe Enable thread safe capability - --enable-funcstack Enable the function stack tracing [default=yes] --enable-hdf5v1_4 Compile the HDF5 v1.4 compatibility interface [default=no] --enable-stream-vfd Build the Stream Virtual File Driver [default=no] @@ -1035,6 +1034,8 @@ Optional Features: specify a comma-separated list of package names without the leading H5 or the word no. The default is most packages. + --enable-funcstack Enable the function stack tracing. Default=no if + debug is disabled. --enable-trace Enable API tracing capability. Default=no if debug is disabled. --enable-parallel Search for MPI-IO and MPI support files @@ -4400,7 +4401,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4403 "configure"' > conftest.$ac_ext + echo '#line 4404 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4938,7 +4939,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6763,7 +6764,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking whether function stack tracking is enabled... $ECHO_C" >&6 -# Check whether --enable-funcstack or --disable-funcstack was given. -if test "${enable_funcstack+set}" = set; then - enableval="$enable_funcstack" - FUNCSTACK=$enableval -fi; - -case "X-$FUNCSTACK" in - X-|X-yes) - FUNCSTACK="yes" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FUNCSTACK 1 -_ACEOF - - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; -esac - echo "$as_me:$LINENO: checking whether HDF5 v1.4 compatibility functions enabled" >&5 echo $ECHO_N "checking whether HDF5 v1.4 compatibility functions enabled... $ECHO_C" >&6 # Check whether --enable-hdf5v1_4 or --disable-hdf5v1_4 was given. @@ -31159,6 +31135,38 @@ if test -n "$DEBUG_PKG"; then done fi +echo "$as_me:$LINENO: checking whether function stack tracking is enabled" >&5 +echo $ECHO_N "checking whether function stack tracking is enabled... $ECHO_C" >&6 +# Check whether --enable-funcstack or --disable-funcstack was given. +if test "${enable_funcstack+set}" = set; then + enableval="$enable_funcstack" + FUNCSTACK=$enableval +fi; + +if test "X-$FUNCSTACK" = X- ; then + if test -z "$DEBUG_PKG" ; then + FUNCSTACK=no + else + FUNCSTACK=yes + fi +fi +case "X-$FUNCSTACK" in + X-|X-yes) + FUNCSTACK="yes" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FUNCSTACK 1 +_ACEOF + + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +esac + echo "$as_me:$LINENO: checking for API tracing" >&5 echo $ECHO_N "checking for API tracing... $ECHO_C" >&6; # Check whether --enable-trace or --disable-trace was given. diff --git a/configure.in b/configure.in index 83d4762..ac43690 100644 --- a/configure.in +++ b/configure.in @@ -1318,28 +1318,6 @@ if test "X$THREADSAFE" = "Xyes"; then fi dnl ---------------------------------------------------------------------- -dnl Check if they would like the function stack support compiled in -dnl -AC_MSG_CHECKING([whether function stack tracking is enabled]) -AC_ARG_ENABLE([funcstack], - [AC_HELP_STRING([--enable-funcstack], - [Enable the function stack - tracing [default=yes]])], - [FUNCSTACK=$enableval]) - -case "X-$FUNCSTACK" in - X-|X-yes) - FUNCSTACK="yes" - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FUNCSTACK], [1], - [Define if the function stack tracing code is to be compiled in]) - ;; - *) - AC_MSG_RESULT([no]) - ;; -esac - -dnl ---------------------------------------------------------------------- dnl Check if they would like the HDF5 v1.4 compatibility functions dnl compiled in dnl @@ -1679,6 +1657,36 @@ if test -n "$DEBUG_PKG"; then fi dnl ---------------------------------------------------------------------- +dnl Check if they would like the function stack support compiled in +dnl +AC_MSG_CHECKING([whether function stack tracking is enabled]) +AC_ARG_ENABLE([funcstack], + [AC_HELP_STRING([--enable-funcstack], + [Enable the function stack tracing. + Default=no if debug is disabled.])], + [FUNCSTACK=$enableval]) + +dnl Default to no if debug is disabled +if test "X-$FUNCSTACK" = X- ; then + if test -z "$DEBUG_PKG" ; then + FUNCSTACK=no + else + FUNCSTACK=yes + fi +fi +case "X-$FUNCSTACK" in + X-|X-yes) + FUNCSTACK="yes" + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_FUNCSTACK], [1], + [Define if the function stack tracing code is to be compiled in]) + ;; + *) + AC_MSG_RESULT([no]) + ;; +esac + +dnl ---------------------------------------------------------------------- dnl Enable tracing of the API dnl This must come after the enable-debug since it depends on debug. dnl -- cgit v0.12