diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-07-09 21:22:08 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-07-09 21:22:08 (GMT) |
commit | bb1d4e704fbb692c2487f0c2e77a16b94de59eb6 (patch) | |
tree | 7bf073a7328d97dab4cff1d1a3b4fc307e99155f | |
parent | fc13ddb7b3ec6c968f8319897b93f4b3a7818383 (diff) | |
download | hdf5-bb1d4e704fbb692c2487f0c2e77a16b94de59eb6.zip hdf5-bb1d4e704fbb692c2487f0c2e77a16b94de59eb6.tar.gz hdf5-bb1d4e704fbb692c2487f0c2e77a16b94de59eb6.tar.bz2 |
[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}<directory> 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
-rw-r--r-- | fortran/acsite.m4 | 1 | ||||
-rwxr-xr-x | fortran/configure | 83 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 2 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 3 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 2 | ||||
-rw-r--r-- | 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 -#line 1994 "configure" +#line 1995 "configure" #include "confdefs.h" #include <$ac_hdr> 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 <<EOF -#line 2034 "configure" +#line 2035 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2041,7 +2042,7 @@ int main() { compress() ; return 0; } EOF -if { (eval echo configure:2045: \"$ac_link\") 1>&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 -#line 2092 "configure" +#line 2093 "configure" #include "confdefs.h" #include <$ac_hdr> 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 -#line 2134 "configure" +#line 2135 "configure" #include "confdefs.h" #include <$ac_hdr> 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 <<EOF -#line 2181 "configure" +#line 2182 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2188,7 +2189,7 @@ int main() { compress() ; return 0; } EOF -if { (eval echo configure:2192: \"$ac_link\") 1>&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 <<EOF -#line 2230 "configure" +#line 2231 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2237,7 +2238,7 @@ int main() { compress() ; return 0; } EOF -if { (eval echo configure:2241: \"$ac_link\") 1>&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 <<EOF -#line 2381 "configure" +#line 2382 "configure" #include "confdefs.h" int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2388: \"$ac_link\") 1>&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 <<EOF -#line 2403 "configure" +#line 2404 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2410,7 +2411,7 @@ int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2414: \"$ac_link\") 1>&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 <<EOF -#line 2447 "configure" +#line 2448 "configure" #include "confdefs.h" int main() { MPI_File_open() ; return 0; } EOF -if { (eval echo configure:2454: \"$ac_link\") 1>&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 <<EOF -#line 2469 "configure" +#line 2470 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2476,7 +2477,7 @@ int main() { MPI_File_open() ; return 0; } EOF -if { (eval echo configure:2480: \"$ac_link\") 1>&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 <<EOF -#line 2531 "configure" +#line 2532 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2538,7 +2539,7 @@ int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2542: \"$ac_link\") 1>&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 <<EOF -#line 2599 "configure" +#line 2600 "configure" #include "confdefs.h" int main() { MPI_Init();MPI_File_open(); ; return 0; } EOF -if { (eval echo configure:2606: \"$ac_link\") 1>&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 <<EOF foo: diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 0ff5ae1..54609f1 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -14,8 +14,6 @@ hdf5_builddir=$(top_builddir)/src ## Add include directory to the C preprocessor flags and the h5test and hdf5 ## libraries to the library list. LT_LINK_LIB=$(LT) --mode=link $(F9X) -static -rpath $(libdir) -MFLAG=@F9XMODFLAG@ -FFLAGS=$(MFLAG). $(MFLAG)../src @FFLAGS@ FLIB=../src/libhdf5_fortran.la HDF5LIB=$(hdf5_builddir)/libhdf5.la diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 4686d7a..57f2c12 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -17,9 +17,6 @@ TRACE=perl $(top_srcdir)/bin/trace ## Add `-I.' to the C preprocessor flags. CPPFLAGS=-I. -I$(hdf5_builddir) -I$(hdf5_srcdir) @CPPFLAGS@ -MFLAG=@F9XMODFLAG@ -FFLAGS=$(MFLAG). @FFLAGS@ - ## This is our main target LIB=libhdf5_fortran.la DISTCLEAN=H5fortran_types.f90 diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index a389684..cb3af45 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -14,8 +14,6 @@ hdf5_builddir=$(top_builddir)/src ## Add include directory to the C preprocessor flags and the h5test and hdf5 ## libraries to the library list. LT_LINK_LIB=$(LT) --mode=link $(F9X) -static -rpath $(libdir) -MFLAG=@F9XMODFLAG@ -FFLAGS=$(MFLAG). $(MFLAG)../src @FFLAGS@ FLIB=../src/libhdf5_fortran.la HDF5LIB=$(hdf5_builddir)/libhdf5.la diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 0848c94..caefea7 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -14,8 +14,6 @@ hdf5_builddir=$(top_builddir)/src ## Add the include directory to the C preprocessor flags the the hdf5 library ## to the library list. LT_LINK_LIB=$(LT) --mode=link $(F9X) -static -rpath $(libdir) -MFLAG=@F9XMODFLAG@ -FFLAGS=$(MFLAG). $(MFLAG)../src @FFLAGS@ LIBFORTRAN=../src/libhdf5_fortran.la LIBHDF5=$(hdf5_builddir)/libhdf5.la @@ -41,6 +39,10 @@ $(TEST_PROGS): $(LIBHDF5) $(LIBH5TEST) $(TEST_OBJ): $(TEST_HDR) +## Put in dependencies to the THDF5 module so that things will be built +## in the correct order. +thyperslab_wr.lo: thdf5.lo + ptesthdf5_fortran: thdf5.lo thyperslab_wr.lo tcheck.lo ptesthdf5_fortran.lo @$(LT_LINK_FEXE) $(FFLAGS) -o $@ ptesthdf5_fortran.lo thdf5.lo thyperslab_wr.lo tcheck.lo $(LIBFORTRAN) $(LIBHDF5) $(LIBS) |