From 69967557a87289cc6ac7fd3698438979d57a05cf Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 30 Mar 2000 16:33:24 -0500 Subject: [svn-r2061] Changed the parsing of --enable-debug option to case statement style instead of it-then-else. It makes it easier to understand and easier to change the defaults of it. --- configure | 57 +++++++++++++++++++++++++++++++-------------------------- configure.in | 15 ++++++++++----- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/configure b/configure index d8a7bb5..a6bceff 100755 --- a/configure +++ b/configure @@ -7935,21 +7935,26 @@ fi all_packages="ac,b,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" -if test X = "X$DEBUG_PKG" -o Xyes = "X$DEBUG_PKG"; then +case X-$DEBUG_PKG in + X-|X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" CPPFLAGS="$CPPFLAGS -UNDEBUG" echo "$ac_t""default ($DEBUG_PKG)" 1>&6 -elif test Xall = "X$DEBUG_PKG"; then + ;; + X-all) DEBUG_PKG=$all_packages CPPFLAGS="$CPPFLAGS -UNDEBUG" echo "$ac_t""all ($DEBUG_PKG)" 1>&6 -elif test Xno = "X$DEBUG_PKG" -o Xnone = "X$DEBUG_PKG"; then + ;; + X-no|X-none) echo "$ac_t""none" 1>&6 DEBUG_PKG= CPPFLAGS="$CPPFLAGS -DNDEBUG" -else + ;; + *) echo "$ac_t""$DEBUG_PKG" 1>&6 -fi + ;; +esac if test "X" != "X$DEBUG_PKG"; then for pkg in `echo $DEBUG_PKG | tr 'a-z,' 'A-Z '`; do @@ -7958,7 +7963,7 @@ if test "X" != "X$DEBUG_PKG"; then fi echo $ac_n "checking for API tracing""... $ac_c" 1>&6 -echo "configure:7962: checking for API tracing" >&5; +echo "configure:7967: checking for API tracing" >&5; # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then enableval="$enable_trace" @@ -7988,7 +7993,7 @@ case "$CC_BASENAME" in # exists. PARALLEL=mpicc echo $ac_n "checking for mpirun""... $ac_c" 1>&6 -echo "configure:7992: checking for mpirun" >&5 +echo "configure:7997: checking for mpirun" >&5 # Find the path where mpicc is located. cmd=`echo $CC |cut -f1 -d' '` @@ -8033,7 +8038,7 @@ fi echo $ac_n "checking for parallel support files""... $ac_c" 1>&6 -echo "configure:8037: checking for parallel support files" >&5 +echo "configure:8042: checking for parallel support files" >&5 case "X-$enable_parallel" in X-|X-no|X-none) # Either we are not compiling for parallel or the header and library @@ -8050,21 +8055,21 @@ case "X-$enable_parallel" in # Try link a simple MPI program. If fail, try again with -lmpi. cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6 -echo "configure:8068: checking for MPI_Init in -lmpi" >&5 +echo "configure:8073: checking for MPI_Init in -lmpi" >&5 ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8072,7 +8077,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8118,21 +8123,21 @@ rm -f conftest* # -lmpio. if test "yes" = "$PARALLEL"; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo $ac_n "checking for MPI_File_open in -lmpio""... $ac_c" 1>&6 -echo "configure:8136: checking for MPI_File_open in -lmpio" >&5 +echo "configure:8141: checking for MPI_File_open in -lmpio" >&5 ac_lib_var=`echo mpio'_'MPI_File_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8140,7 +8145,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8204,7 +8209,7 @@ rm -f conftest* # is missing. PARALLEL=mpich echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 -echo "configure:8208: checking for MPI_Init in -lmpich" >&5 +echo "configure:8213: checking for MPI_Init in -lmpich" >&5 ac_lib_var=`echo mpich'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8212,7 +8217,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpich $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8272,24 +8277,24 @@ EOF # Display what we found about running programs echo $ac_n "checking prefix for running on one processor""... $ac_c" 1>&6 -echo "configure:8276: checking prefix for running on one processor" >&5 +echo "configure:8281: checking prefix for running on one processor" >&5 echo "$ac_t""$RUNSERIAL" 1>&6 echo $ac_n "checking prefix for running in parallel""... $ac_c" 1>&6 -echo "configure:8279: checking prefix for running in parallel" >&5 +echo "configure:8284: checking prefix for running in parallel" >&5 echo "$ac_t""$RUNPARALLEL" 1>&6 # Check that we can link a simple MPI and MPI-IO application echo $ac_n "checking whether a simple MPI-IO program can be linked""... $ac_c" 1>&6 -echo "configure:8284: checking whether a simple MPI-IO program can be linked" >&5 +echo "configure:8289: checking whether a simple MPI-IO program can be linked" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else diff --git a/configure.in b/configure.in index 0e39ed6..d598344 100644 --- a/configure.in +++ b/configure.in @@ -835,21 +835,26 @@ AC_ARG_ENABLE(debug, AC_SUBST(DEBUG_PKG) all_packages="ac,b,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" -if test X = "X$DEBUG_PKG" -o Xyes = "X$DEBUG_PKG"; then +case X-$DEBUG_PKG in + X-|X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" CPPFLAGS="$CPPFLAGS -UNDEBUG" AC_MSG_RESULT(default ($DEBUG_PKG)) -elif test Xall = "X$DEBUG_PKG"; then + ;; + X-all) DEBUG_PKG=$all_packages CPPFLAGS="$CPPFLAGS -UNDEBUG" AC_MSG_RESULT(all ($DEBUG_PKG)) -elif test Xno = "X$DEBUG_PKG" -o Xnone = "X$DEBUG_PKG"; then + ;; + X-no|X-none) AC_MSG_RESULT(none) DEBUG_PKG= CPPFLAGS="$CPPFLAGS -DNDEBUG" -else + ;; + *) AC_MSG_RESULT($DEBUG_PKG) -fi + ;; +esac if test "X" != "X$DEBUG_PKG"; then for pkg in `echo $DEBUG_PKG | tr 'a-z,' 'A-Z '`; do -- cgit v0.12