From 5d0678797acf009a2497bdec195217d25214c224 Mon Sep 17 00:00:00 2001 From: giannozz Date: Wed, 20 Sep 2006 12:26:19 +0000 Subject: [PATCH] Several unused variables removed from configure and make.sys configure should automatically recognize if "memstat" will work git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3404 c92efa57-630b-4861-b058-cf58834340f0 --- TODO | 6 + configure | 1094 +++++++++++------------------------------- configure.ac | 89 +--- install/configure | 1094 +++++++++++------------------------------- install/configure.ac | 89 +--- install/make.sys.in | 15 +- make.sys.in | 15 +- 7 files changed, 594 insertions(+), 1808 deletions(-) diff --git a/TODO b/TODO index 0d0bd4971..22181a89d 100644 --- a/TODO +++ b/TODO @@ -6,15 +6,21 @@ BUGS TO EXAMINE - strange empty states with C blyp ? - O pseudopotentials? - Wannier with nonorthogonal axis? +- Zval is wrong for pseudopotentials generated on a ionic + configuration, when semicore states are in the valence INSTALLATION/PORTING - workaround for /usr/bin/oslevel problem in AIX +- cleanup of configure stuff and of preprocessing options + COMMON - uniform and clear values for constants in Modules/constants.f90 +- check license + - pseudopotentials: support new format (XML) if/when ready - adding/removing/modifying input variables is too complex diff --git a/configure b/configure index 3010b9dcd..9a7d9ee6c 100755 --- a/configure +++ b/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os F77 FFLAGS LDFLAGS ac_ct_F77 EXEEXT OBJEXT CC CFLAGS CPPFLAGS ac_ct_CC CPP SET_MAKE EGREP ranlib cc mpicc cflags dflags fdflags cpp cppflags f90 mpif90 f90flags f90flags_noopt f77 mpif77 fflags fflags_noopt pre_fdflags imod iflags ld ldflags blas_libs lapack_libs fft_libs mpi_libs mass_libs mylib ar arflags arflags_dynamic f90rule blas_line lapack_line fft_line mpi_line mass_line parallel_report LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os F77 FFLAGS LDFLAGS ac_ct_F77 EXEEXT OBJEXT CC CFLAGS CPPFLAGS ac_ct_CC CPP SET_MAKE EGREP ranlib cc cflags dflags fdflags cpp cppflags f90 mpif90 f90flags f77 fflags fflags_noopt pre_fdflags imod iflags ld ldflags blas_libs lapack_libs fft_libs mpi_libs mass_libs mylib ar arflags arflags_dynamic f90rule blas_line lapack_line fft_line mpi_line mass_line parallel_report LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1323,7 +1323,6 @@ use_shared=1 topdir=$TOPDIR arch=$ARCH env_cc=$CC -mpicc=$MPICC cpp=$CPP cflags=$CFLAGS cppflags=$CPPFLAGS @@ -1331,7 +1330,6 @@ dflags=$DFLAGS iflags=$IFLAGS f77=$F77 f90=$F90 -mpif77=$MPIF77 mpif90=$MPIF90 fflags=$FFLAGS f90flags=$F90FLAGS @@ -1614,7 +1612,7 @@ fi # Provide some information about the compiler. -echo "$as_me:1617:" \ +echo "$as_me:1615:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -1982,28 +1980,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac - case "$arch:$mpif90" in - *:mpif90 ) - try_mpicc="mpicc" - try_mpif77="mpif77" - ;; - *:mpf90 ) - try_mpicc="mpcc" - try_mpif77="mpf77" - ;; - aix:mpxlf*_r ) - try_mpicc="mpcc_r" - try_mpif77="mpxlf_r" - ;; - aix:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf" - ;; - macppc:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf mpf77" - ;; - esac fi # clear cached values @@ -2103,7 +2079,7 @@ fi # Provide some information about the compiler. -echo "$as_me:2106:" \ +echo "$as_me:2082:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -2289,6 +2265,7 @@ alpha:* ) try_f77="f77 $f90" ;; alinux:* ) + try_cc="ccc $try_cc" try_f77="fort g77 f77 $f90" ;; sparc:* ) @@ -2302,771 +2279,6 @@ macppc:xlf90 ) ;; esac -if test "$use_parallel" -ne 0 -then - # clear cached values - unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g - - # check parallel C compiler - if test "$mpicc" = "" ; then mpicc="$try_mpicc $try_cc" ; fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $mpicc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in $mpicc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - mpicc=$CC - - # clear cached values - unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g - - # check parallel Fortran 77 compiler - if test "$mpif77" = "" ; then mpif77="$try_mpif77 $try_f77" ; fi - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $mpif77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in $mpif77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_F77" && break -done - - F77=$ac_ct_F77 -fi - - -# Provide some information about the compiler. -echo "$as_me:2923:" \ - "checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_f77_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - mpif77=$F77 -fi - # clear cached values unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g @@ -3585,10 +2797,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu cc=$CC -if test "$use_parallel" -eq 0 ; then mpicc=$cc ; fi echo setting CC... $cc -echo setting MPICC... $mpicc # clear cached values unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g @@ -3687,7 +2897,7 @@ fi # Provide some information about the compiler. -echo "$as_me:3690:" \ +echo "$as_me:2900:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -3832,10 +3042,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu f77=$F77 -if test "$use_parallel" -eq 0 ; then mpif77=$f77 ; fi echo setting F77... $f77 -echo setting MPIF77... $mpif77 # check Fortran compiler flags have_cpp=1 @@ -3846,7 +3054,6 @@ ia64:ifort* | amd64:ifort* ) try_fflags="-O2 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3856,7 +3063,6 @@ ia64:ifc* ) try_fflags="-Vaxlib -O2" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3866,7 +3072,6 @@ ia64:pgf* | amd64:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -3876,7 +3081,6 @@ ia64:path* | amd64:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -3886,7 +3090,6 @@ ia32:ifort* ) try_fflags="-O2 -tpp6 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3896,7 +3099,6 @@ ia32:ifc* ) try_fflags="-Vaxlib -O2 -tpp6" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3906,7 +3108,6 @@ ia32:ifc* ) then # old versions of ifc require this stuff try_f90flags="\$(FFLAGS) -cl,./intel.pcl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -cl,./intel.pcl" if test -x $topdir/ifcmods.sh then ./ifcmods.sh @@ -3917,7 +3118,6 @@ ia32:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -3927,7 +3127,6 @@ ia32:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -3937,7 +3136,6 @@ ia32:path* ) try_fflags="-O3 -cpp" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -cpp" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" #try_ldflags_static="-static" try_dflags="$try_dflags -D__G95" @@ -3946,7 +3144,6 @@ ia32:path* ) try_fflags="-O3" try_f90flags="\$(FFLAGS) -x f95-cpp-input" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -x f95-cpp-input" try_ldflags="" #try_ldflags_static="-static" ;; @@ -3955,7 +3152,6 @@ aix:*xlf* ) -qarch=auto -qtune=auto -qdpc -Q -qalias=nointptr" try_f90flags="\$(FFLAGS) -qsuffix=cpp=f90 -qfree=f90" try_fflags_noopt="-q64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qsuffix=cpp=f90 -qfree=f90" try_ldflags="-q64" # try_ldflags_static="-bstatic" pre_fdflags="-WF," @@ -3965,7 +3161,6 @@ mips:f90 ) try_fflags="-mips4 -64 -O2 -r10000 -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-mips4 -64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-mips4 -64" pre_fdflags="-ftpp -macro_expand " ;; @@ -3975,7 +3170,6 @@ alinux:fort ) try_fflags="-O -r8 -align dcommons -align records" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -r8 -align dcommons -align records" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" try_ldflags_static="-non_shared" have_cpp=0 ;; @@ -3984,14 +3178,12 @@ alpha:f90 ) try_fflags="-O -real_size 64 -align dcommons -align records -assume buffered_io -fpe1" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -real_size 64 -align dcommons -align records -assume buffered_io" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" ;; sparc:mpf90 | sparc:f90 ) try_fflags="-fast -O1 -nodepend -xvector=no -xchip=ultra3 \ -xarch=v8plusb -xlic_lib=sunperf" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -xlic_lib=sunperf" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" imod="-M" have_cpp=0 @@ -4001,7 +3193,6 @@ crayx1:ftn ) -O scalar3,stream3,vector3,nointerchange -Z -O inline5" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-s default64 -dp -rma -e0 -O0 -Z" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-s default64 -f nan64" try_dflags="$try_dflags -D__X1_COA" pre_fdflags="-e Z -F" @@ -4011,7 +3202,6 @@ macppc:* ) -qdpc -qalias=nointptr" try_f90flags="\$(FFLAGS) -qfree=f90" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qfree=f90" try_ldflags="" pre_fdflags="-WF," xlf_flags=1 @@ -4021,7 +3211,6 @@ macppc:* ) try_fflags="-O" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="$\(FFLAGS_NOOPT)" try_ldflags="" have_cpp=0 ;; @@ -4032,11 +3221,9 @@ try_ldflags="$try_ldflags $try_ldflags_static" ; fi if test "$fflags" = "" ; then fflags=$try_fflags ; fi if test "$f90flags" = "" ; then f90flags=$try_f90flags ; fi if test "$fflags_noopt" = "" ; then fflags_noopt=$try_fflags_noopt ; fi -if test "$f90flags_noopt" = "" ; then f90flags_noopt=$try_f90flags_noopt ; fi echo setting FFLAGS... $fflags echo setting F90FLAGS... $f90flags echo setting FFLAGS_NOOPT... $fflags_noopt -echo setting F90FLAGS_NOOPT... $f90flags_noopt if test "$imod" = "" ; then imod="-I" ; fi # tentative C and loader flags, good for many cases @@ -8446,6 +7633,270 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# check if the structure mallinfo is present in malloc.h +if test "${ac_cv_header_malloc_h+set}" = set; then + echo "$as_me:$LINENO: checking for malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking malloc.h usability" >&5 +echo $ECHO_N "checking malloc.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking malloc.h presence" >&5 +echo $ECHO_N "checking malloc.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to the ESPRESSO lists. ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_malloc_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 + +fi +if test $ac_cv_header_malloc_h = yes; then + have_malloc_h=1 +else + have_malloc_h=0 +fi + + +if test "$have_malloc_h" -ne 0 +then +echo "$as_me:$LINENO: checking for struct mallinfo.arena" >&5 +echo $ECHO_N "checking for struct mallinfo.arena... $ECHO_C" >&6 +if test "${ac_cv_member_struct_mallinfo_arena+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct mallinfo ac_aggr; +if (ac_aggr.arena) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_mallinfo_arena=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct mallinfo ac_aggr; +if (sizeof ac_aggr.arena) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_mallinfo_arena=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_mallinfo_arena=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_mallinfo_arena" >&5 +echo "${ECHO_T}$ac_cv_member_struct_mallinfo_arena" >&6 +if test $ac_cv_member_struct_mallinfo_arena = yes; then + have_mallinfo=1 +else + have_mallinfo=0 +fi + + +if test "$have_mallinfo" -eq 1 +then +try_dflags="-D__HAVE_MALLINFO $try_dflags" +fi + +fi + if test "$dflags" = "" ; then dflags="$try_dflags" ; fi echo setting DFLAGS... $dflags @@ -8500,6 +7951,7 @@ fi echo setting RANLIB... $ranlib echo setting MYLIB... $mylib + # generate dependencies if test -x $topdir/makedeps.sh then @@ -8569,9 +8021,6 @@ fi - - - @@ -9235,7 +8684,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t s,@EGREP@,$EGREP,;t t s,@ranlib@,$ranlib,;t t s,@cc@,$cc,;t t -s,@mpicc@,$mpicc,;t t s,@cflags@,$cflags,;t t s,@dflags@,$dflags,;t t s,@fdflags@,$fdflags,;t t @@ -9244,9 +8692,7 @@ s,@cppflags@,$cppflags,;t t s,@f90@,$f90,;t t s,@mpif90@,$mpif90,;t t s,@f90flags@,$f90flags,;t t -s,@f90flags_noopt@,$f90flags_noopt,;t t s,@f77@,$f77,;t t -s,@mpif77@,$mpif77,;t t s,@fflags@,$fflags,;t t s,@fflags_noopt@,$fflags_noopt,;t t s,@pre_fdflags@,$pre_fdflags,;t t diff --git a/configure.ac b/configure.ac index c32452aa6..71f8697f0 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,6 @@ use_shared=1 topdir=$TOPDIR arch=$ARCH env_cc=$CC -mpicc=$MPICC cpp=$CPP cflags=$CFLAGS cppflags=$CPPFLAGS @@ -22,7 +21,6 @@ dflags=$DFLAGS iflags=$IFLAGS f77=$F77 f90=$F90 -mpif77=$MPIF77 mpif90=$MPIF90 fflags=$FFLAGS f90flags=$F90FLAGS @@ -200,28 +198,6 @@ then ;; esac - case "$arch:$mpif90" in - *:mpif90 ) - try_mpicc="mpicc" - try_mpif77="mpif77" - ;; - *:mpf90 ) - try_mpicc="mpcc" - try_mpif77="mpf77" - ;; - aix:mpxlf*_r ) - try_mpicc="mpcc_r" - try_mpif77="mpxlf_r" - ;; - aix:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf" - ;; - macppc:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf mpf77" - ;; - esac fi # clear cached values @@ -272,6 +248,7 @@ alpha:* ) try_f77="f77 $f90" ;; alinux:* ) + try_cc="ccc $try_cc" try_f77="fort g77 f77 $f90" ;; sparc:* ) @@ -285,25 +262,6 @@ macppc:xlf90 ) ;; esac -if test "$use_parallel" -ne 0 -then - # clear cached values - unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g - - # check parallel C compiler - if test "$mpicc" = "" ; then mpicc="$try_mpicc $try_cc" ; fi - AC_PROG_CC($mpicc) - mpicc=$CC - - # clear cached values - unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g - - # check parallel Fortran 77 compiler - if test "$mpif77" = "" ; then mpif77="$try_mpif77 $try_f77" ; fi - AC_PROG_F77($mpif77) - mpif77=$F77 -fi - # clear cached values unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g @@ -311,10 +269,8 @@ unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g if test "$env_cc" = "" ; then cc="$try_cc" ; else cc="$env_cc"; fi AC_PROG_CC($cc) cc=$CC -if test "$use_parallel" -eq 0 ; then mpicc=$cc ; fi echo setting CC... $cc -echo setting MPICC... $mpicc # clear cached values unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g @@ -323,10 +279,8 @@ unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g if test "$f77" = "" ; then f77="$try_f77" ; fi AC_PROG_F77($f77) f77=$F77 -if test "$use_parallel" -eq 0 ; then mpif77=$f77 ; fi echo setting F77... $f77 -echo setting MPIF77... $mpif77 # check Fortran compiler flags have_cpp=1 @@ -337,7 +291,6 @@ ia64:ifort* | amd64:ifort* ) try_fflags="-O2 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -347,7 +300,6 @@ ia64:ifc* ) try_fflags="-Vaxlib -O2" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -357,7 +309,6 @@ ia64:pgf* | amd64:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -367,7 +318,6 @@ ia64:path* | amd64:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -377,7 +327,6 @@ ia32:ifort* ) try_fflags="-O2 -tpp6 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -387,7 +336,6 @@ ia32:ifc* ) try_fflags="-Vaxlib -O2 -tpp6" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -397,7 +345,6 @@ ia32:ifc* ) then # old versions of ifc require this stuff try_f90flags="\$(FFLAGS) -cl,./intel.pcl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -cl,./intel.pcl" if test -x $topdir/ifcmods.sh then ./ifcmods.sh @@ -408,7 +355,6 @@ ia32:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -418,7 +364,6 @@ ia32:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -428,7 +373,6 @@ ia32:path* ) try_fflags="-O3 -cpp" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -cpp" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" #try_ldflags_static="-static" try_dflags="$try_dflags -D__G95" @@ -437,7 +381,6 @@ ia32:path* ) try_fflags="-O3" try_f90flags="\$(FFLAGS) -x f95-cpp-input" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -x f95-cpp-input" try_ldflags="" #try_ldflags_static="-static" ;; @@ -446,7 +389,6 @@ aix:*xlf* ) -qarch=auto -qtune=auto -qdpc -Q -qalias=nointptr" try_f90flags="\$(FFLAGS) -qsuffix=cpp=f90 -qfree=f90" try_fflags_noopt="-q64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qsuffix=cpp=f90 -qfree=f90" try_ldflags="-q64" # try_ldflags_static="-bstatic" pre_fdflags="-WF," @@ -456,7 +398,6 @@ mips:f90 ) try_fflags="-mips4 -64 -O2 -r10000 -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-mips4 -64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-mips4 -64" pre_fdflags="-ftpp -macro_expand " ;; @@ -466,7 +407,6 @@ alinux:fort ) try_fflags="-O -r8 -align dcommons -align records" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -r8 -align dcommons -align records" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" try_ldflags_static="-non_shared" have_cpp=0 ;; @@ -475,14 +415,12 @@ alpha:f90 ) try_fflags="-O -real_size 64 -align dcommons -align records -assume buffered_io -fpe1" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -real_size 64 -align dcommons -align records -assume buffered_io" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" ;; sparc:mpf90 | sparc:f90 ) try_fflags="-fast -O1 -nodepend -xvector=no -xchip=ultra3 \ -xarch=v8plusb -xlic_lib=sunperf" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -xlic_lib=sunperf" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" imod="-M" have_cpp=0 @@ -492,7 +430,6 @@ crayx1:ftn ) -O scalar3,stream3,vector3,nointerchange -Z -O inline5" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-s default64 -dp -rma -e0 -O0 -Z" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-s default64 -f nan64" try_dflags="$try_dflags -D__X1_COA" pre_fdflags="-e Z -F" @@ -502,7 +439,6 @@ macppc:* ) -qdpc -qalias=nointptr" try_f90flags="\$(FFLAGS) -qfree=f90" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qfree=f90" try_ldflags="" pre_fdflags="-WF," xlf_flags=1 @@ -512,7 +448,6 @@ macppc:* ) try_fflags="-O" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="$\(FFLAGS_NOOPT)" try_ldflags="" have_cpp=0 ;; @@ -523,11 +458,9 @@ try_ldflags="$try_ldflags $try_ldflags_static" ; fi if test "$fflags" = "" ; then fflags=$try_fflags ; fi if test "$f90flags" = "" ; then f90flags=$try_f90flags ; fi if test "$fflags_noopt" = "" ; then fflags_noopt=$try_fflags_noopt ; fi -if test "$f90flags_noopt" = "" ; then f90flags_noopt=$try_f90flags_noopt ; fi echo setting FFLAGS... $fflags echo setting F90FLAGS... $f90flags echo setting FFLAGS_NOOPT... $fflags_noopt -echo setting F90FLAGS_NOOPT... $f90flags_noopt if test "$imod" = "" ; then imod="-I" ; fi # tentative C and loader flags, good for many cases @@ -1282,6 +1215,22 @@ fi AC_LANG_POP(Fortran 77) +# check if the structure mallinfo is present in malloc.h +AC_CHECK_HEADER(malloc.h,have_malloc_h=1,have_malloc_h=0, ) +if test "$have_malloc_h" -ne 0 +then +AC_CHECK_MEMBER([struct mallinfo.arena], + [have_mallinfo=1], + [have_mallinfo=0], + [#include ]) + +if test "$have_mallinfo" -eq 1 +then +try_dflags="-D__HAVE_MALLINFO $try_dflags" +fi + +fi + if test "$dflags" = "" ; then dflags="$try_dflags" ; fi echo setting DFLAGS... $dflags @@ -1301,6 +1250,7 @@ AC_CHECK_PROG(ranlib,ranlib,ranlib,echo) echo setting RANLIB... $ranlib echo setting MYLIB... $mylib + # generate dependencies if test -x $topdir/makedeps.sh then @@ -1340,7 +1290,6 @@ fi # export settings to generated files AC_SUBST(cc) -AC_SUBST(mpicc) AC_SUBST(cflags) AC_SUBST(dflags) AC_SUBST(fdflags) @@ -1349,9 +1298,7 @@ AC_SUBST(cppflags) AC_SUBST(f90) AC_SUBST(mpif90) AC_SUBST(f90flags) -AC_SUBST(f90flags_noopt) AC_SUBST(f77) -AC_SUBST(mpif77) AC_SUBST(fflags) AC_SUBST(fflags_noopt) AC_SUBST(pre_fdflags) diff --git a/install/configure b/install/configure index 3010b9dcd..9a7d9ee6c 100755 --- a/install/configure +++ b/install/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os F77 FFLAGS LDFLAGS ac_ct_F77 EXEEXT OBJEXT CC CFLAGS CPPFLAGS ac_ct_CC CPP SET_MAKE EGREP ranlib cc mpicc cflags dflags fdflags cpp cppflags f90 mpif90 f90flags f90flags_noopt f77 mpif77 fflags fflags_noopt pre_fdflags imod iflags ld ldflags blas_libs lapack_libs fft_libs mpi_libs mass_libs mylib ar arflags arflags_dynamic f90rule blas_line lapack_line fft_line mpi_line mass_line parallel_report LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os F77 FFLAGS LDFLAGS ac_ct_F77 EXEEXT OBJEXT CC CFLAGS CPPFLAGS ac_ct_CC CPP SET_MAKE EGREP ranlib cc cflags dflags fdflags cpp cppflags f90 mpif90 f90flags f77 fflags fflags_noopt pre_fdflags imod iflags ld ldflags blas_libs lapack_libs fft_libs mpi_libs mass_libs mylib ar arflags arflags_dynamic f90rule blas_line lapack_line fft_line mpi_line mass_line parallel_report LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1323,7 +1323,6 @@ use_shared=1 topdir=$TOPDIR arch=$ARCH env_cc=$CC -mpicc=$MPICC cpp=$CPP cflags=$CFLAGS cppflags=$CPPFLAGS @@ -1331,7 +1330,6 @@ dflags=$DFLAGS iflags=$IFLAGS f77=$F77 f90=$F90 -mpif77=$MPIF77 mpif90=$MPIF90 fflags=$FFLAGS f90flags=$F90FLAGS @@ -1614,7 +1612,7 @@ fi # Provide some information about the compiler. -echo "$as_me:1617:" \ +echo "$as_me:1615:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -1982,28 +1980,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac - case "$arch:$mpif90" in - *:mpif90 ) - try_mpicc="mpicc" - try_mpif77="mpif77" - ;; - *:mpf90 ) - try_mpicc="mpcc" - try_mpif77="mpf77" - ;; - aix:mpxlf*_r ) - try_mpicc="mpcc_r" - try_mpif77="mpxlf_r" - ;; - aix:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf" - ;; - macppc:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf mpf77" - ;; - esac fi # clear cached values @@ -2103,7 +2079,7 @@ fi # Provide some information about the compiler. -echo "$as_me:2106:" \ +echo "$as_me:2082:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -2289,6 +2265,7 @@ alpha:* ) try_f77="f77 $f90" ;; alinux:* ) + try_cc="ccc $try_cc" try_f77="fort g77 f77 $f90" ;; sparc:* ) @@ -2302,771 +2279,6 @@ macppc:xlf90 ) ;; esac -if test "$use_parallel" -ne 0 -then - # clear cached values - unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g - - # check parallel C compiler - if test "$mpicc" = "" ; then mpicc="$try_mpicc $try_cc" ; fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $mpicc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in $mpicc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - mpicc=$CC - - # clear cached values - unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g - - # check parallel Fortran 77 compiler - if test "$mpif77" = "" ; then mpif77="$try_mpif77 $try_f77" ; fi - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $mpif77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in $mpif77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_F77" && break -done - - F77=$ac_ct_F77 -fi - - -# Provide some information about the compiler. -echo "$as_me:2923:" \ - "checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_f77_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - mpif77=$F77 -fi - # clear cached values unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g @@ -3585,10 +2797,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu cc=$CC -if test "$use_parallel" -eq 0 ; then mpicc=$cc ; fi echo setting CC... $cc -echo setting MPICC... $mpicc # clear cached values unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g @@ -3687,7 +2897,7 @@ fi # Provide some information about the compiler. -echo "$as_me:3690:" \ +echo "$as_me:2900:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -3832,10 +3042,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu f77=$F77 -if test "$use_parallel" -eq 0 ; then mpif77=$f77 ; fi echo setting F77... $f77 -echo setting MPIF77... $mpif77 # check Fortran compiler flags have_cpp=1 @@ -3846,7 +3054,6 @@ ia64:ifort* | amd64:ifort* ) try_fflags="-O2 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3856,7 +3063,6 @@ ia64:ifc* ) try_fflags="-Vaxlib -O2" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3866,7 +3072,6 @@ ia64:pgf* | amd64:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -3876,7 +3081,6 @@ ia64:path* | amd64:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -3886,7 +3090,6 @@ ia32:ifort* ) try_fflags="-O2 -tpp6 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3896,7 +3099,6 @@ ia32:ifc* ) try_fflags="-Vaxlib -O2 -tpp6" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -3906,7 +3108,6 @@ ia32:ifc* ) then # old versions of ifc require this stuff try_f90flags="\$(FFLAGS) -cl,./intel.pcl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -cl,./intel.pcl" if test -x $topdir/ifcmods.sh then ./ifcmods.sh @@ -3917,7 +3118,6 @@ ia32:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -3927,7 +3127,6 @@ ia32:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -3937,7 +3136,6 @@ ia32:path* ) try_fflags="-O3 -cpp" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -cpp" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" #try_ldflags_static="-static" try_dflags="$try_dflags -D__G95" @@ -3946,7 +3144,6 @@ ia32:path* ) try_fflags="-O3" try_f90flags="\$(FFLAGS) -x f95-cpp-input" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -x f95-cpp-input" try_ldflags="" #try_ldflags_static="-static" ;; @@ -3955,7 +3152,6 @@ aix:*xlf* ) -qarch=auto -qtune=auto -qdpc -Q -qalias=nointptr" try_f90flags="\$(FFLAGS) -qsuffix=cpp=f90 -qfree=f90" try_fflags_noopt="-q64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qsuffix=cpp=f90 -qfree=f90" try_ldflags="-q64" # try_ldflags_static="-bstatic" pre_fdflags="-WF," @@ -3965,7 +3161,6 @@ mips:f90 ) try_fflags="-mips4 -64 -O2 -r10000 -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-mips4 -64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-mips4 -64" pre_fdflags="-ftpp -macro_expand " ;; @@ -3975,7 +3170,6 @@ alinux:fort ) try_fflags="-O -r8 -align dcommons -align records" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -r8 -align dcommons -align records" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" try_ldflags_static="-non_shared" have_cpp=0 ;; @@ -3984,14 +3178,12 @@ alpha:f90 ) try_fflags="-O -real_size 64 -align dcommons -align records -assume buffered_io -fpe1" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -real_size 64 -align dcommons -align records -assume buffered_io" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" ;; sparc:mpf90 | sparc:f90 ) try_fflags="-fast -O1 -nodepend -xvector=no -xchip=ultra3 \ -xarch=v8plusb -xlic_lib=sunperf" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -xlic_lib=sunperf" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" imod="-M" have_cpp=0 @@ -4001,7 +3193,6 @@ crayx1:ftn ) -O scalar3,stream3,vector3,nointerchange -Z -O inline5" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-s default64 -dp -rma -e0 -O0 -Z" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-s default64 -f nan64" try_dflags="$try_dflags -D__X1_COA" pre_fdflags="-e Z -F" @@ -4011,7 +3202,6 @@ macppc:* ) -qdpc -qalias=nointptr" try_f90flags="\$(FFLAGS) -qfree=f90" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qfree=f90" try_ldflags="" pre_fdflags="-WF," xlf_flags=1 @@ -4021,7 +3211,6 @@ macppc:* ) try_fflags="-O" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="$\(FFLAGS_NOOPT)" try_ldflags="" have_cpp=0 ;; @@ -4032,11 +3221,9 @@ try_ldflags="$try_ldflags $try_ldflags_static" ; fi if test "$fflags" = "" ; then fflags=$try_fflags ; fi if test "$f90flags" = "" ; then f90flags=$try_f90flags ; fi if test "$fflags_noopt" = "" ; then fflags_noopt=$try_fflags_noopt ; fi -if test "$f90flags_noopt" = "" ; then f90flags_noopt=$try_f90flags_noopt ; fi echo setting FFLAGS... $fflags echo setting F90FLAGS... $f90flags echo setting FFLAGS_NOOPT... $fflags_noopt -echo setting F90FLAGS_NOOPT... $f90flags_noopt if test "$imod" = "" ; then imod="-I" ; fi # tentative C and loader flags, good for many cases @@ -8446,6 +7633,270 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# check if the structure mallinfo is present in malloc.h +if test "${ac_cv_header_malloc_h+set}" = set; then + echo "$as_me:$LINENO: checking for malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking malloc.h usability" >&5 +echo $ECHO_N "checking malloc.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking malloc.h presence" >&5 +echo $ECHO_N "checking malloc.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to the ESPRESSO lists. ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_malloc_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 + +fi +if test $ac_cv_header_malloc_h = yes; then + have_malloc_h=1 +else + have_malloc_h=0 +fi + + +if test "$have_malloc_h" -ne 0 +then +echo "$as_me:$LINENO: checking for struct mallinfo.arena" >&5 +echo $ECHO_N "checking for struct mallinfo.arena... $ECHO_C" >&6 +if test "${ac_cv_member_struct_mallinfo_arena+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct mallinfo ac_aggr; +if (ac_aggr.arena) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_mallinfo_arena=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct mallinfo ac_aggr; +if (sizeof ac_aggr.arena) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_mallinfo_arena=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_mallinfo_arena=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_mallinfo_arena" >&5 +echo "${ECHO_T}$ac_cv_member_struct_mallinfo_arena" >&6 +if test $ac_cv_member_struct_mallinfo_arena = yes; then + have_mallinfo=1 +else + have_mallinfo=0 +fi + + +if test "$have_mallinfo" -eq 1 +then +try_dflags="-D__HAVE_MALLINFO $try_dflags" +fi + +fi + if test "$dflags" = "" ; then dflags="$try_dflags" ; fi echo setting DFLAGS... $dflags @@ -8500,6 +7951,7 @@ fi echo setting RANLIB... $ranlib echo setting MYLIB... $mylib + # generate dependencies if test -x $topdir/makedeps.sh then @@ -8569,9 +8021,6 @@ fi - - - @@ -9235,7 +8684,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t s,@EGREP@,$EGREP,;t t s,@ranlib@,$ranlib,;t t s,@cc@,$cc,;t t -s,@mpicc@,$mpicc,;t t s,@cflags@,$cflags,;t t s,@dflags@,$dflags,;t t s,@fdflags@,$fdflags,;t t @@ -9244,9 +8692,7 @@ s,@cppflags@,$cppflags,;t t s,@f90@,$f90,;t t s,@mpif90@,$mpif90,;t t s,@f90flags@,$f90flags,;t t -s,@f90flags_noopt@,$f90flags_noopt,;t t s,@f77@,$f77,;t t -s,@mpif77@,$mpif77,;t t s,@fflags@,$fflags,;t t s,@fflags_noopt@,$fflags_noopt,;t t s,@pre_fdflags@,$pre_fdflags,;t t diff --git a/install/configure.ac b/install/configure.ac index c32452aa6..71f8697f0 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -14,7 +14,6 @@ use_shared=1 topdir=$TOPDIR arch=$ARCH env_cc=$CC -mpicc=$MPICC cpp=$CPP cflags=$CFLAGS cppflags=$CPPFLAGS @@ -22,7 +21,6 @@ dflags=$DFLAGS iflags=$IFLAGS f77=$F77 f90=$F90 -mpif77=$MPIF77 mpif90=$MPIF90 fflags=$FFLAGS f90flags=$F90FLAGS @@ -200,28 +198,6 @@ then ;; esac - case "$arch:$mpif90" in - *:mpif90 ) - try_mpicc="mpicc" - try_mpif77="mpif77" - ;; - *:mpf90 ) - try_mpicc="mpcc" - try_mpif77="mpf77" - ;; - aix:mpxlf*_r ) - try_mpicc="mpcc_r" - try_mpif77="mpxlf_r" - ;; - aix:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf" - ;; - macppc:mpxlf* ) - try_mpicc="mpcc" - try_mpif77="mpxlf mpf77" - ;; - esac fi # clear cached values @@ -272,6 +248,7 @@ alpha:* ) try_f77="f77 $f90" ;; alinux:* ) + try_cc="ccc $try_cc" try_f77="fort g77 f77 $f90" ;; sparc:* ) @@ -285,25 +262,6 @@ macppc:xlf90 ) ;; esac -if test "$use_parallel" -ne 0 -then - # clear cached values - unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g - - # check parallel C compiler - if test "$mpicc" = "" ; then mpicc="$try_mpicc $try_cc" ; fi - AC_PROG_CC($mpicc) - mpicc=$CC - - # clear cached values - unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g - - # check parallel Fortran 77 compiler - if test "$mpif77" = "" ; then mpif77="$try_mpif77 $try_f77" ; fi - AC_PROG_F77($mpif77) - mpif77=$F77 -fi - # clear cached values unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g @@ -311,10 +269,8 @@ unset CC ac_cv_prog_ac_ct_CC ac_cv_c_compiler_gnu ac_cv_prog_cc_g if test "$env_cc" = "" ; then cc="$try_cc" ; else cc="$env_cc"; fi AC_PROG_CC($cc) cc=$CC -if test "$use_parallel" -eq 0 ; then mpicc=$cc ; fi echo setting CC... $cc -echo setting MPICC... $mpicc # clear cached values unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g @@ -323,10 +279,8 @@ unset F77 ac_cv_prog_ac_ct_F77 ac_cv_f77_compiler_gnu ac_cv_prog_f77_g if test "$f77" = "" ; then f77="$try_f77" ; fi AC_PROG_F77($f77) f77=$F77 -if test "$use_parallel" -eq 0 ; then mpif77=$f77 ; fi echo setting F77... $f77 -echo setting MPIF77... $mpif77 # check Fortran compiler flags have_cpp=1 @@ -337,7 +291,6 @@ ia64:ifort* | amd64:ifort* ) try_fflags="-O2 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -347,7 +300,6 @@ ia64:ifc* ) try_fflags="-Vaxlib -O2" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -357,7 +309,6 @@ ia64:pgf* | amd64:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -367,7 +318,6 @@ ia64:path* | amd64:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -377,7 +327,6 @@ ia32:ifort* ) try_fflags="-O2 -tpp6 -assume byterecl" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0 -assume byterecl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -387,7 +336,6 @@ ia32:ifc* ) try_fflags="-Vaxlib -O2 -tpp6" try_f90flags="\$(FFLAGS) -nomodule" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -nomodule" try_ldflags="-Vaxlib" try_ldflags_static="-static" try_dflags="$try_dflags -D__INTEL" @@ -397,7 +345,6 @@ ia32:ifc* ) then # old versions of ifc require this stuff try_f90flags="\$(FFLAGS) -cl,./intel.pcl" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -cl,./intel.pcl" if test -x $topdir/ifcmods.sh then ./ifcmods.sh @@ -408,7 +355,6 @@ ia32:pgf* ) try_fflags="-fast -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-Bstatic" try_dflags="$try_dflags -D__PGI" @@ -418,7 +364,6 @@ ia32:path* ) try_fflags="-march=auto -O2" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" try_ldflags_static="-static" try_dflags="$try_dflags -D__EKO" @@ -428,7 +373,6 @@ ia32:path* ) try_fflags="-O3 -cpp" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -cpp" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" #try_ldflags_static="-static" try_dflags="$try_dflags -D__G95" @@ -437,7 +381,6 @@ ia32:path* ) try_fflags="-O3" try_f90flags="\$(FFLAGS) -x f95-cpp-input" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -x f95-cpp-input" try_ldflags="" #try_ldflags_static="-static" ;; @@ -446,7 +389,6 @@ aix:*xlf* ) -qarch=auto -qtune=auto -qdpc -Q -qalias=nointptr" try_f90flags="\$(FFLAGS) -qsuffix=cpp=f90 -qfree=f90" try_fflags_noopt="-q64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qsuffix=cpp=f90 -qfree=f90" try_ldflags="-q64" # try_ldflags_static="-bstatic" pre_fdflags="-WF," @@ -456,7 +398,6 @@ mips:f90 ) try_fflags="-mips4 -64 -O2 -r10000 -r8" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-mips4 -64 -O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-mips4 -64" pre_fdflags="-ftpp -macro_expand " ;; @@ -466,7 +407,6 @@ alinux:fort ) try_fflags="-O -r8 -align dcommons -align records" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -r8 -align dcommons -align records" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" try_ldflags_static="-non_shared" have_cpp=0 ;; @@ -475,14 +415,12 @@ alpha:f90 ) try_fflags="-O -real_size 64 -align dcommons -align records -assume buffered_io -fpe1" try_f90flags="\$(FFLAGS) -free" try_fflags_noopt="-O0 -real_size 64 -align dcommons -align records -assume buffered_io" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -free" ;; sparc:mpf90 | sparc:f90 ) try_fflags="-fast -O1 -nodepend -xvector=no -xchip=ultra3 \ -xarch=v8plusb -xlic_lib=sunperf" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0 -xlic_lib=sunperf" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="" imod="-M" have_cpp=0 @@ -492,7 +430,6 @@ crayx1:ftn ) -O scalar3,stream3,vector3,nointerchange -Z -O inline5" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-s default64 -dp -rma -e0 -O0 -Z" - try_f90flags_noopt="\$(FFLAGS_NOOPT)" try_ldflags="-s default64 -f nan64" try_dflags="$try_dflags -D__X1_COA" pre_fdflags="-e Z -F" @@ -502,7 +439,6 @@ macppc:* ) -qdpc -qalias=nointptr" try_f90flags="\$(FFLAGS) -qfree=f90" try_fflags_noopt="-O0" - try_f90flags_noopt="\$(FFLAGS_NOOPT) -qfree=f90" try_ldflags="" pre_fdflags="-WF," xlf_flags=1 @@ -512,7 +448,6 @@ macppc:* ) try_fflags="-O" try_f90flags="\$(FFLAGS)" try_fflags_noopt="-O0" - try_f90flags_noopt="$\(FFLAGS_NOOPT)" try_ldflags="" have_cpp=0 ;; @@ -523,11 +458,9 @@ try_ldflags="$try_ldflags $try_ldflags_static" ; fi if test "$fflags" = "" ; then fflags=$try_fflags ; fi if test "$f90flags" = "" ; then f90flags=$try_f90flags ; fi if test "$fflags_noopt" = "" ; then fflags_noopt=$try_fflags_noopt ; fi -if test "$f90flags_noopt" = "" ; then f90flags_noopt=$try_f90flags_noopt ; fi echo setting FFLAGS... $fflags echo setting F90FLAGS... $f90flags echo setting FFLAGS_NOOPT... $fflags_noopt -echo setting F90FLAGS_NOOPT... $f90flags_noopt if test "$imod" = "" ; then imod="-I" ; fi # tentative C and loader flags, good for many cases @@ -1282,6 +1215,22 @@ fi AC_LANG_POP(Fortran 77) +# check if the structure mallinfo is present in malloc.h +AC_CHECK_HEADER(malloc.h,have_malloc_h=1,have_malloc_h=0, ) +if test "$have_malloc_h" -ne 0 +then +AC_CHECK_MEMBER([struct mallinfo.arena], + [have_mallinfo=1], + [have_mallinfo=0], + [#include ]) + +if test "$have_mallinfo" -eq 1 +then +try_dflags="-D__HAVE_MALLINFO $try_dflags" +fi + +fi + if test "$dflags" = "" ; then dflags="$try_dflags" ; fi echo setting DFLAGS... $dflags @@ -1301,6 +1250,7 @@ AC_CHECK_PROG(ranlib,ranlib,ranlib,echo) echo setting RANLIB... $ranlib echo setting MYLIB... $mylib + # generate dependencies if test -x $topdir/makedeps.sh then @@ -1340,7 +1290,6 @@ fi # export settings to generated files AC_SUBST(cc) -AC_SUBST(mpicc) AC_SUBST(cflags) AC_SUBST(dflags) AC_SUBST(fdflags) @@ -1349,9 +1298,7 @@ AC_SUBST(cppflags) AC_SUBST(f90) AC_SUBST(mpif90) AC_SUBST(f90flags) -AC_SUBST(f90flags_noopt) AC_SUBST(f77) -AC_SUBST(mpif77) AC_SUBST(fflags) AC_SUBST(fflags_noopt) AC_SUBST(pre_fdflags) diff --git a/install/make.sys.in b/install/make.sys.in index 19c88997d..b9aae515b 100644 --- a/install/make.sys.in +++ b/install/make.sys.in @@ -47,18 +47,16 @@ IFLAGS = @iflags@ MODFLAGS = @imod@./ @imod@../Modules @imod@../iotk/src \ @imod@../PW @imod@../PH @imod@../CPV -# Compilers: C, F90, F77, serial and parallel versions -# If you are compiling for serial execution, use MPIF90 = $(F90) and so on -# If you do not have anything suitable for MPIF90, use F90 and specify the -# directory containing "mpif.h" in IFLAGS, MPI libraries in MPI_LIBS -# MPICC and MPIF77 are not actually used +# Compilers: fortran-90 (serial and parallel versions), fortran-77, C +# If you are compiling for serial execution, use MPIF90 = $(F90) +# If you do not have anything suitable for MPIF90, use MPIF90 = $(F90), +# specify the directory containing "mpif.h" in IFLAGS, +# specify the location of MPI libraries in MPI_LIBS CC = @cc@ -MPICC = @mpicc@ F90 = @f90@ MPIF90 = @mpif90@ F77 = @f77@ -MPIF77 = @mpif77@ # C preprocessor and preprocessing flags - for explicit preprocessing, # if needed (see the compilation rules above) @@ -75,10 +73,9 @@ CFLAGS = @cflags@ $(DFLAGS) $(IFLAGS) F90FLAGS = @f90flags@ @pre_fdflags@$(FDFLAGS) $(IFLAGS) $(MODFLAGS) FFLAGS = @fflags@ -# compiler flags without optimization for F90 (not actually used) and F77 +# compiler flags without optimization for fortran-77 # the latter is NEEDED to properly compile dlamch.f, used by lapack -F90FLAGS_NOOPT = @f90flags_noopt@ @pre_fdflags@$(FDFLAGS) $(IFLAGS) $(MODFLAGS) FFLAGS_NOOPT = @fflags_noopt@ # Linker and linker-specific flags (if any) diff --git a/make.sys.in b/make.sys.in index 19c88997d..b9aae515b 100644 --- a/make.sys.in +++ b/make.sys.in @@ -47,18 +47,16 @@ IFLAGS = @iflags@ MODFLAGS = @imod@./ @imod@../Modules @imod@../iotk/src \ @imod@../PW @imod@../PH @imod@../CPV -# Compilers: C, F90, F77, serial and parallel versions -# If you are compiling for serial execution, use MPIF90 = $(F90) and so on -# If you do not have anything suitable for MPIF90, use F90 and specify the -# directory containing "mpif.h" in IFLAGS, MPI libraries in MPI_LIBS -# MPICC and MPIF77 are not actually used +# Compilers: fortran-90 (serial and parallel versions), fortran-77, C +# If you are compiling for serial execution, use MPIF90 = $(F90) +# If you do not have anything suitable for MPIF90, use MPIF90 = $(F90), +# specify the directory containing "mpif.h" in IFLAGS, +# specify the location of MPI libraries in MPI_LIBS CC = @cc@ -MPICC = @mpicc@ F90 = @f90@ MPIF90 = @mpif90@ F77 = @f77@ -MPIF77 = @mpif77@ # C preprocessor and preprocessing flags - for explicit preprocessing, # if needed (see the compilation rules above) @@ -75,10 +73,9 @@ CFLAGS = @cflags@ $(DFLAGS) $(IFLAGS) F90FLAGS = @f90flags@ @pre_fdflags@$(FDFLAGS) $(IFLAGS) $(MODFLAGS) FFLAGS = @fflags@ -# compiler flags without optimization for F90 (not actually used) and F77 +# compiler flags without optimization for fortran-77 # the latter is NEEDED to properly compile dlamch.f, used by lapack -F90FLAGS_NOOPT = @f90flags_noopt@ @pre_fdflags@$(FDFLAGS) $(IFLAGS) $(MODFLAGS) FFLAGS_NOOPT = @fflags_noopt@ # Linker and linker-specific flags (if any)