diff options
Diffstat (limited to 'fortran')
-rwxr-xr-x | fortran/configure | 225 | ||||
-rw-r--r-- | fortran/configure.in | 71 |
2 files changed, 116 insertions, 180 deletions
diff --git a/fortran/configure b/fortran/configure index b2bd3fa..be35952 100755 --- a/fortran/configure +++ b/fortran/configure @@ -144,7 +144,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-static-exec Build only statically linked executables [default=no]" ac_help="$ac_help - --with-zlib=INC,LIB Use the GNU zlib compression" + --with-zlib[=DIR] Use the GNU zlib compression" ac_help="$ac_help --enable-parallel=TYPE Search for MPI-IO and MPI support files" @@ -2021,23 +2021,24 @@ else withval=yes fi + case "$withval" in - yes) - for ac_hdr in zlib.h + yes) + for ac_hdr in zlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2031: checking for $ac_hdr" >&5 +echo "configure:2032: 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 2036 "configure" +#line 2037 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2042: \"$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* @@ -2063,8 +2064,8 @@ else fi done - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2068: checking for compress in -lz" >&5 + echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 +echo "configure:2069: 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 @@ -2072,7 +2073,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 2076 "configure" +#line 2077 "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 @@ -2083,7 +2084,7 @@ int main() { compress() ; return 0; } EOF -if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2088: \"$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 @@ -2110,32 +2111,48 @@ else echo "$ac_t""no" 1>&6 fi - ;; - no) - echo $ac_n "checking for GNU zlib""... $ac_c" 1>&6 -echo "configure:2117: checking for GNU zlib" >&5 - echo "$ac_t""suppressed" 1>&6 - ;; - *) - zlib_inc="`echo $withval |cut -f1 -d,`" - if test -n "$zlib_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$zlib_inc" - for ac_hdr in zlib.h + ;; + no) + echo $ac_n "checking for GNU zlib""... $ac_c" 1>&6 +echo "configure:2118: checking for GNU zlib" >&5 + echo "$ac_t""suppressed" 1>&6 + ;; + *) + case "$withval" in + *,*) + zlib_inc="`echo $withval |cut -f1 -d,`" + zlib_lib="`echo $withval |cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + zlib_inc="$withval/include" + zlib_lib="$withval/lib" + fi + ;; + esac + + saved_CPPFLAGS="$CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + + if test -n "$zlib_inc"; then + CPPFLAGS="$CPPFLAGS -I$zlib_inc" + fi + + for ac_hdr in zlib.h 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:2146: 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 2151 "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:2156: \"$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* @@ -2162,75 +2179,32 @@ CPPFLAGS="$saved_CPPFLAGS" fi done - else - for ac_hdr in zlib.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2171: 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 2176 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2181: \"$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* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - fi + if test -n "$zlib_lib"; then + LDFLAGS="$LDFLAGS -L$zlib_lib" + fi - zlib_lib="`echo $withval |cut -f2 -d, -s`" - if test -n "$zlib_lib"; then - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$zlib_lib" - ZLIB_DIR=$zlib_lib - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2215: checking for compress in -lz" >&5 -ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` + echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6 +echo "configure:2189: checking for compress2 in -lz" >&5 +ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 2223 "configure" +#line 2197 "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 builtin and then its argument prototype would still apply. */ -char compress(); +char compress2(); int main() { -compress() +compress2() ; return 0; } EOF -if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2208: \"$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 @@ -2258,56 +2232,7 @@ else LDFLAGS="$saved_LDFLAGS" fi - else - echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2264: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lz $LIBS" -cat > conftest.$ac_ext <<EOF -#line 2272 "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 - builtin and then its argument prototype would still apply. */ -char compress(); - -int main() { -compress() -; return 0; } -EOF -if { (eval echo configure:2283: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lz $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - - fi - ;; + ;; esac @@ -2368,7 +2293,7 @@ case "$CC_BASENAME" in mpicc) PARALLEL=mpicc echo $ac_n "checking for mpirun""... $ac_c" 1>&6 -echo "configure:2372: checking for mpirun" >&5 +echo "configure:2297: checking for mpirun" >&5 cmd=`echo $CC |cut -f1 -d' '` if (echo $cmd |grep / >/dev/null); then @@ -2408,7 +2333,7 @@ fi echo $ac_n "checking for parallel support files""... $ac_c" 1>&6 -echo "configure:2412: checking for parallel support files" >&5 +echo "configure:2337: checking for parallel support files" >&5 case "X-$enable_parallel" in X-|X-no|X-none) echo "$ac_t""skipped" 1>&6 @@ -2419,21 +2344,21 @@ case "X-$enable_parallel" in PARALLEL=yes cat > conftest.$ac_ext <<EOF -#line 2423 "configure" +#line 2348 "configure" #include "confdefs.h" int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2355: \"$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:2437: checking for MPI_Init in -lmpi" >&5 +echo "configure:2362: 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 @@ -2441,7 +2366,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <<EOF -#line 2445 "configure" +#line 2370 "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 @@ -2452,7 +2377,7 @@ int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2381: \"$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 @@ -2485,21 +2410,21 @@ rm -f conftest* if test "X$PARALLEL" = "Xyes"; then cat > conftest.$ac_ext <<EOF -#line 2489 "configure" +#line 2414 "configure" #include "confdefs.h" int main() { MPI_File_open() ; return 0; } EOF -if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2421: \"$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:2503: checking for MPI_File_open in -lmpio" >&5 +echo "configure:2428: 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 @@ -2507,7 +2432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <<EOF -#line 2511 "configure" +#line 2436 "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 @@ -2518,7 +2443,7 @@ int main() { MPI_File_open() ; return 0; } EOF -if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2447: \"$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 @@ -2561,7 +2486,7 @@ rm -f conftest* PARALLEL=mpich echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 -echo "configure:2565: checking for MPI_Init in -lmpich" >&5 +echo "configure:2490: 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 @@ -2569,7 +2494,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpich $LIBS" cat > conftest.$ac_ext <<EOF -#line 2573 "configure" +#line 2498 "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 @@ -2580,7 +2505,7 @@ int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2509: \"$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 @@ -2628,23 +2553,23 @@ EOF echo $ac_n "checking prefix for running on one processor""... $ac_c" 1>&6 -echo "configure:2632: checking prefix for running on one processor" >&5 +echo "configure:2557: 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:2635: checking prefix for running in parallel" >&5 +echo "configure:2560: 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:2639: checking whether a simple MPI-IO program can be linked" >&5 +echo "configure:2564: checking whether a simple MPI-IO program can be linked" >&5 cat > conftest.$ac_ext <<EOF -#line 2641 "configure" +#line 2566 "configure" #include "confdefs.h" int main() { MPI_Init();MPI_File_open(); ; return 0; } EOF -if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2573: \"$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 @@ -2672,7 +2597,7 @@ fi echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:2676: checking make" >&5 +echo "configure:2601: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -2689,7 +2614,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2693: checking how to include a makefile" >&5 +echo "configure:2618: checking how to include a makefile" >&5 cat >makeinc <<EOF foo: diff --git a/fortran/configure.in b/fortran/configure.in index 1b6bf45..5bc529e 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -268,37 +268,48 @@ dnl Some systems where you need to specify exactly where the zlib is need dnl this. ac_cv_lib_z_compress="" -AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression], - ,withval=yes) -case "$withval" in - yes) - AC_CHECK_HEADERS(zlib.h) - AC_CHECK_LIB(z, compress) - ;; - no) - AC_MSG_CHECKING(for GNU zlib) - AC_MSG_RESULT(suppressed) - ;; - *) - zlib_inc="`echo $withval |cut -f1 -d,`" - if test -n "$zlib_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$zlib_inc" - AC_CHECK_HEADERS(zlib.h,,CPPFLAGS="$saved_CPPFLAGS") - else - AC_CHECK_HEADERS(zlib.h) - fi +AC_ARG_WITH(zlib, + [ --with-zlib[=DIR] Use the GNU zlib compression],, + withval=yes) - zlib_lib="`echo $withval |cut -f2 -d, -s`" - if test -n "$zlib_lib"; then - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$zlib_lib" - ZLIB_DIR=$zlib_lib - AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS") - else - AC_CHECK_LIB(z, compress) - fi - ;; +case "$withval" in + yes) + AC_CHECK_HEADERS(zlib.h) + AC_CHECK_LIB(z, compress) + ;; + no) + AC_MSG_CHECKING(for GNU zlib) + AC_MSG_RESULT(suppressed) + ;; + *) + case "$withval" in + *,*) + zlib_inc="`echo $withval |cut -f1 -d,`" + zlib_lib="`echo $withval |cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + zlib_inc="$withval/include" + zlib_lib="$withval/lib" + fi + ;; + esac + + saved_CPPFLAGS="$CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + + if test -n "$zlib_inc"; then + CPPFLAGS="$CPPFLAGS -I$zlib_inc" + fi + + AC_CHECK_HEADERS(zlib.h,, CPPFLAGS="$saved_CPPFLAGS") + + if test -n "$zlib_lib"; then + LDFLAGS="$LDFLAGS -L$zlib_lib" + fi + + AC_CHECK_LIB(z, compress2,, LDFLAGS="$saved_LDFLAGS") + ;; esac dnl ---------------------------------------------------------------------- |