diff --git a/install/configure b/install/configure index 7f9a73c18..5702f8912 100755 --- a/install/configure +++ b/install/configure @@ -675,6 +675,7 @@ ac_ct_F77 SET_MAKE FLIBS ranlib +wget cc cflags dflags @@ -10247,6 +10248,85 @@ fi echo setting RANLIB... $ranlib +# check if wget or curl work +# Extract the first word of "wget", so it can be a program name with args. +set dummy wget; 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_wget+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$wget"; then + ac_cv_prog_wget="$wget" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_wget="wget -O" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +wget=$ac_cv_prog_wget +if test -n "$wget"; then + { echo "$as_me:$LINENO: result: $wget" >&5 +echo "${ECHO_T}$wget" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$wget" = ""; then + # Extract the first word of "curl", so it can be a program name with args. +set dummy curl; 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_wget+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$wget"; then + ac_cv_prog_wget="$wget" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_wget="curl -o" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +wget=$ac_cv_prog_wget +if test -n "$wget"; then + { echo "$as_me:$LINENO: result: $wget" >&5 +echo "${ECHO_T}$wget" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +echo setting WGET... $wget + # configure output messages blas_line="BLAS_LIBS=$blas_libs" if test "$have_scalapack" -eq 1; then @@ -10323,6 +10403,7 @@ fi + ac_config_headers="$ac_config_headers include/c_defs.h:include/c_defs.h.in" @@ -11024,6 +11105,7 @@ ac_ct_F77!$ac_ct_F77$ac_delim SET_MAKE!$SET_MAKE$ac_delim FLIBS!$FLIBS$ac_delim ranlib!$ranlib$ac_delim +wget!$wget$ac_delim cc!$cc$ac_delim cflags!$cflags$ac_delim dflags!$dflags$ac_delim @@ -11057,7 +11139,6 @@ f90rule!$f90rule$ac_delim blas_line!$blas_line$ac_delim lapack_line!$lapack_line$ac_delim scalapack_line!$scalapack_line$ac_delim -fft_line!$fft_line$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -11099,6 +11180,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +fft_line!$fft_line$ac_delim mpi_line!$mpi_line$ac_delim mass_line!$mass_line$ac_delim parallel_report!$parallel_report$ac_delim @@ -11108,7 +11190,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/install/configure.ac b/install/configure.ac index b463d43d2..bb8ad2e64 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -1871,6 +1871,13 @@ fi echo setting RANLIB... $ranlib +# check if wget or curl work +AC_CHECK_PROG(wget, wget, wget -O) +if test "$wget" = ""; then + AC_CHECK_PROG(wget, curl, curl -o) +fi +echo setting WGET... $wget + # configure output messages blas_line="BLAS_LIBS=$blas_libs" if test "$have_scalapack" -eq 1; then @@ -1946,6 +1953,7 @@ AC_SUBST(fft_line) AC_SUBST(mpi_line) AC_SUBST(mass_line) AC_SUBST(parallel_report) +AC_SUBST(wget) AC_SUBST(topdir) AC_SUBST(extlib_flags) diff --git a/install/make.sys.in b/install/make.sys.in index 05ad8064f..a06313761 100644 --- a/install/make.sys.in +++ b/install/make.sys.in @@ -141,5 +141,8 @@ FLIB_TARGETS = all LIBOBJS = ../flib/ptools.a ../flib/flib.a ../clib/clib.a ../iotk/src/libiotk.a LIBS = $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FFT_LIBS) $(BLAS_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(LD_LIBS) +# wget or curl - useful to download from network +WGET = @wget@ + # topdir for linking espresso libs with plugins TOPDIR = @topdir@