From bb1d4e704fbb692c2487f0c2e77a16b94de59eb6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 9 Jul 2001 16:22:08 -0500 Subject: [svn-r4165] Purpose: Bug Fixes Description: If the system doesn't support modules, then the F9XMODFLAG would be empty. This would cause things like '.' and '../src' to be stranded on the compile line by themselves and the compiler would barf. Also, there needs to be a dependence between the thyperslab_wr program and the THDF5 module. Solution: Put the code to generate the -{M,I,p} flags in the acsite.m4 file since it's not possible to check if a macro is empty and do substitution on it in the Makefiles. Put a dependency in the Makefile.in so that THDF5 will be made before the thyperslab_wr program. Platforms tested: Linux --- fortran/acsite.m4 | 1 + fortran/configure | 83 ++++++++++++++++++++++---------------------- fortran/examples/Makefile.in | 2 -- fortran/src/Makefile.in | 3 -- fortran/test/Makefile.in | 2 -- fortran/testpar/Makefile.in | 6 ++-- 6 files changed, 47 insertions(+), 50 deletions(-) diff --git a/fortran/acsite.m4 b/fortran/acsite.m4 index 37db8a0..dd949c0 100644 --- a/fortran/acsite.m4 +++ b/fortran/acsite.m4 @@ -249,6 +249,7 @@ done if test -n "$F9XMODFLAG"; then echo $F9XMODFLAG 1>&6 + FFLAGS="$(F9XMODFLAG). $(F9XMODFLAG)../src $FFLAGS" else echo unknown 1>&6 fi diff --git a/fortran/configure b/fortran/configure index 2836c63..4678b4d 100755 --- a/fortran/configure +++ b/fortran/configure @@ -1952,6 +1952,7 @@ done if test -n "$F9XMODFLAG"; then echo $F9XMODFLAG 1>&6 + FFLAGS="$(F9XMODFLAG). $(F9XMODFLAG)../src $FFLAGS" else echo unknown 1>&6 fi @@ -1985,17 +1986,17 @@ case "$withval" in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1989: checking for $ac_hdr" >&5 +echo "configure:1990: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2022,7 +2023,7 @@ fi done echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2026: checking for compress in -lz" >&5 +echo "configure:2027: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2030,7 +2031,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2046: \"$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 @@ -2071,7 +2072,7 @@ fi ;; no) echo $ac_n "checking for GNU zlib""... $ac_c" 1>&6 -echo "configure:2075: checking for GNU zlib" >&5 +echo "configure:2076: checking for GNU zlib" >&5 echo "$ac_t""suppressed" 1>&6 ;; *) @@ -2083,17 +2084,17 @@ echo "configure:2075: checking for GNU zlib" >&5 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2087: checking for $ac_hdr" >&5 +echo "configure:2088: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2125,17 +2126,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2129: checking for $ac_hdr" >&5 +echo "configure:2130: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2169,7 +2170,7 @@ done LDFLAGS="$LDFLAGS -L$zlib_lib" ZLIB_DIR=$zlib_lib echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2173: checking for compress in -lz" >&5 +echo "configure:2174: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2177,7 +2178,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2193: \"$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 @@ -2218,7 +2219,7 @@ fi else echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2222: checking for compress in -lz" >&5 +echo "configure:2223: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2226,7 +2227,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2242: \"$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 @@ -2326,7 +2327,7 @@ case "$CC_BASENAME" in mpicc) PARALLEL=mpicc echo $ac_n "checking for mpirun""... $ac_c" 1>&6 -echo "configure:2330: checking for mpirun" >&5 +echo "configure:2331: checking for mpirun" >&5 cmd=`echo $CC |cut -f1 -d' '` if (echo $cmd |grep / >/dev/null); then @@ -2366,7 +2367,7 @@ fi echo $ac_n "checking for parallel support files""... $ac_c" 1>&6 -echo "configure:2370: checking for parallel support files" >&5 +echo "configure:2371: checking for parallel support files" >&5 case "X-$enable_parallel" in X-|X-no|X-none) echo "$ac_t""skipped" 1>&6 @@ -2377,21 +2378,21 @@ case "X-$enable_parallel" in PARALLEL=yes cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2389: \"$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:2395: checking for MPI_Init in -lmpi" >&5 +echo "configure:2396: 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 @@ -2399,7 +2400,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:2415: \"$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 @@ -2443,21 +2444,21 @@ rm -f conftest* if test "X$PARALLEL" = "Xyes"; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2455: \"$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:2461: checking for MPI_File_open in -lmpio" >&5 +echo "configure:2462: 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 @@ -2465,7 +2466,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:2481: \"$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 @@ -2519,7 +2520,7 @@ rm -f conftest* PARALLEL=mpich echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 -echo "configure:2523: checking for MPI_Init in -lmpich" >&5 +echo "configure:2524: 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 @@ -2527,7 +2528,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:2543: \"$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 @@ -2586,23 +2587,23 @@ EOF echo $ac_n "checking prefix for running on one processor""... $ac_c" 1>&6 -echo "configure:2590: checking prefix for running on one processor" >&5 +echo "configure:2591: 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:2593: checking prefix for running in parallel" >&5 +echo "configure:2594: checking prefix for running in parallel" >&5 echo "$ac_t""$RUNPARALLEL" 1>&6 echo $ac_n "checking whether a simple MPI-IO program can be linked""... $ac_c" 1>&6 -echo "configure:2597: checking whether a simple MPI-IO program can be linked" >&5 +echo "configure:2598: 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:2607: \"$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 @@ -2630,7 +2631,7 @@ fi echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:2634: checking make" >&5 +echo "configure:2635: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -2647,7 +2648,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2651: checking how to include a makefile" >&5 +echo "configure:2652: checking how to include a makefile" >&5 cat >makeinc <