diff --git a/configure b/configure index 575fb1d704..576c9cd9b1 100755 --- a/configure +++ b/configure @@ -1,9 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for PLUMED 2. +# Generated by GNU Autoconf 2.72 for PLUMED 2. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -14,63 +15,65 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -79,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -94,43 +90,27 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -151,26 +131,28 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +# out after a failed 'exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -185,42 +167,54 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -228,14 +222,22 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi ;; +esac +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -252,25 +254,27 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +# out after a failed 'exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -291,6 +295,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -322,7 +327,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -331,7 +336,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -370,16 +375,18 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -387,16 +394,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -410,9 +419,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -439,7 +448,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -472,6 +481,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -483,7 +494,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -497,6 +508,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -510,6 +525,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -521,9 +542,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -548,10 +569,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -909,9 +925,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1064,6 +1080,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1113,9 +1138,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1129,9 +1154,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1159,8 +1184,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1168,16 +1193,16 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1193,7 +1218,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1201,7 +1226,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1218,7 +1243,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1257,7 +1282,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1286,7 +1311,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1314,7 +1339,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures PLUMED 2 to adapt to many kinds of systems. +'configure' configures PLUMED 2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1328,11 +1353,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1340,10 +1365,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1354,6 +1379,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1454,6 +1480,7 @@ Optional Features: --enable-af_cuda enable search for arrayfire_cuda, default: no --enable-af_cpu enable search for arrayfire_cpu, default: no --enable-libtorch enable search for libtorch, default: no + --enable-metatensor enable search for metatensor, default: no --disable-openmp do not use OpenMP Some influential environment variables: @@ -1481,9 +1508,8 @@ Some influential environment variables: CFLAGS C compiler flags FC Fortran compiler command FCFLAGS Fortran compiler flags - CXXCPP C++ preprocessor -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. @@ -1502,9 +1528,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1532,7 +1558,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1540,7 +1567,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1550,9 +1577,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF PLUMED configure 2 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.72 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1569,14 +1596,14 @@ fi ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1584,17 +1611,19 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1607,14 +1636,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1622,17 +1651,19 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1645,14 +1676,14 @@ fi ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1660,17 +1691,19 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1683,14 +1716,14 @@ fi ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1698,20 +1731,22 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1729,14 +1764,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1744,20 +1779,22 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1771,8 +1808,8 @@ fi # ac_fn_cxx_try_run LINENO # ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1782,28 +1819,30 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -1811,130 +1850,6 @@ fi } # ac_fn_cxx_try_run -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_header_mongrel - # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1942,37 +1857,61 @@ fi ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : eval "$3=yes" -else - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by PLUMED $as_me 2, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2005,8 +1944,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2041,7 +1984,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2076,11 +2019,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2091,8 +2036,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2116,7 +2061,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2124,14 +2069,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2139,15 +2084,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2155,8 +2100,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2170,65 +2115,50 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2236,121 +2166,672 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## +# Test code for whether the C++ compiler supports C++98 (global declarations) +ac_cxx_conftest_cxx98_globals=' +// Does the compiler advertise C++98 conformance? +#if !defined __cplusplus || __cplusplus < 199711L +# error "Compiler does not advertise C++98 conformance" +#endif -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 +// These inclusions are to reject old compilers that +// lack the unsuffixed header files. +#include +#include +// and are *not* freestanding headers in C++98. +extern void assert (int); +namespace std { + extern int strcmp (const char *, const char *); +} +// Namespaces, exceptions, and templates were all added after "C++ 2.0". +using std::exception; +using std::strcmp; -################################################################## -# In order to add m4 macros, put then in a m4 directory and include them here. -# E.g.: -# m4_include([./m4/m4_ax_openmp.m4]) +namespace { -################################################################## -# Here we define a few useful macros +void test_exception_syntax() +{ + try { + throw "test"; + } catch (const char *s) { + // Extra parentheses suppress a warning when building autoconf itself, + // due to lint rules shared with more typical C programs. + assert (!(strcmp) (s, "test")); + } +} -# PLUMED_CONFIG_ENABLE(variablename,optionname,doc,default) -# notice that variablename and optionname are likely identical, -# they just need to be different with optionname contains a "-" -# (not allowed in shell variable names) +template struct test_template +{ + T const val; + explicit test_template(T t) : val(t) {} + template T add(U u) { return static_cast(u) + val; } +}; +} // anonymous namespace +' -# PLUMED_CHECK_CXXFLAG(flag) -# use it to check if a flag is available on this compiler +# Test code for whether the C++ compiler supports C++98 (body of main) +ac_cxx_conftest_cxx98_main=' + assert (argc); + assert (! argv[0]); +{ + test_exception_syntax (); + test_template tt (2.0); + assert (tt.add (4) == 6.0); + assert (true && !false); +} +' +# Test code for whether the C++ compiler supports C++11 (global declarations) +ac_cxx_conftest_cxx11_globals=' +// Does the compiler advertise C++ 2011 conformance? +#if !defined __cplusplus || __cplusplus < 201103L +# error "Compiler does not advertise C++11 conformance" +#endif -# PLUMED_CHECK_CFLAG(flag) -# use it to check if a flag is available on this compiler +namespace cxx11test +{ + constexpr int get_val() { return 20; } + struct testinit + { + int i; + double d; + }; -# PLUMED_CHECK_LDFLAGS(flag) -# use it to check if a flag is available on this compiler + class delegate + { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + virtual int getval() { return this->n; }; + protected: + int n; + }; -# PLUMED_SEARCH_LIBS(function,search-libs[,action-if-found][,action-if-not-found][,other-libraries]) -# same as AC_SEARCH_LIBS, but does not try any library unless $libsearch=true -# Should be used instead of AC_SEARCH_LIBS in order to make --disable-libsearch work correctly + class overridden : public delegate + { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + class nocopy + { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; + + // for testing lambda expressions + template Ret eval(Fn f, Ret v) + { + return f(v); + } -# PLUMED_CHECK_PACKAGE(header,function,define[,library]) -# first we check if the header is present. if so, we check if the given function can be found. + // for testing variadic templates and trailing return types + template auto sum(V first) -> V + { + return first; + } + template auto sum(V first, Args... rest) -> V + { + return first + sum(rest...); + } +} +' + +# Test code for whether the C++ compiler supports C++11 (body of main) +ac_cxx_conftest_cxx11_main=' +{ + // Test auto and decltype + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + int total = 0; + for (auto i = a3; *i; ++i) { total += *i; } + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initializer lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for + int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, + 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (auto &x : array) { x += 23; } +} +{ + // Test lambda expressions + using cxx11test::eval; + assert (eval ([](int x) { return x*2; }, 21) == 42); + double d = 2.0; + assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); + assert (d == 5.0); + assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); + assert (d == 5.0); +} +{ + // Test use of variadic templates + using cxx11test::sum; + auto a = sum(1); + auto b = sum(1, 2); + auto c = sum(1.0, 2.0, 3.0); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + test_template<::test_template> v(test_template(12)); +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +' + +# Test code for whether the C compiler supports C++11 (complete). +ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} +${ac_cxx_conftest_cxx11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + ${ac_cxx_conftest_cxx11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C++98 (complete). +ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (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; +} + +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + +/* 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 do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +/* Does the compiler advertise C99 conformance? */ +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +// See if C++-style comments work. + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); +extern void free (void *); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +/* Does the compiler advertise C11 conformance? */ +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +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 + + + +################################################################## +# In order to add m4 macros, put then in a m4 directory and include them here. +# E.g.: +# m4_include([./m4/m4_ax_openmp.m4]) + +################################################################## +# Here we define a few useful macros + +# PLUMED_CONFIG_ENABLE(variablename,optionname,doc,default) +# notice that variablename and optionname are likely identical, +# they just need to be different with optionname contains a "-" +# (not allowed in shell variable names) + + +# PLUMED_CHECK_CXXFLAG(flag) +# use it to check if a flag is available on this compiler + + +# PLUMED_CHECK_CFLAG(flag) +# use it to check if a flag is available on this compiler + + +# PLUMED_CHECK_LDFLAGS(flag) +# use it to check if a flag is available on this compiler + + +# PLUMED_SEARCH_LIBS(function,search-libs[,action-if-found][,action-if-not-found][,other-libraries]) +# same as AC_SEARCH_LIBS, but does not try any library unless $libsearch=true +# Should be used instead of AC_SEARCH_LIBS in order to make --disable-libsearch work correctly + + +# PLUMED_CHECK_PACKAGE(header,function,define[,library]) +# first we check if the header is present. if so, we check if the given function can be found. # if it cannot be found and the fourth argument (library) has been supplied, we look for it # in the library. finally, we set the define flag @@ -2365,12 +2846,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ################################################################## -{ $as_echo "$as_me:${as_lineno-$LINENO}: Optional modules are disabled by default" >&5 -$as_echo "$as_me: Optional modules are disabled by default" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional modules are disabled by default" >&5 +printf "%s\n" "$as_me: Optional modules are disabled by default" >&6;} rm -f src/*.on src/*.off # Check whether --enable-modules was given. -if test "${enable_modules+set}" = set; then : +if test ${enable_modules+y} +then : enableval=$enable_modules; rm -f src/*.on src/*.off if test "${enableval}" = yes ; then @@ -2383,18 +2865,18 @@ if test "${enable_modules+set}" = set; then : do case "$modules_mod" in (none) - { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling all optional modules" >&5 -$as_echo "$as_me: Disabling all optional modules" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling all optional modules" >&5 +printf "%s\n" "$as_me: Disabling all optional modules" >&6;} rm -f src/*.off src/*.on touch $(grep default-on src/*/module.type | sed "s|/module.type:.*|.off|") ;; (all) - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling all optional modules" >&5 -$as_echo "$as_me: Enabling all optional modules" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling all optional modules" >&5 +printf "%s\n" "$as_me: Enabling all optional modules" >&6;} rm -f src/*.off src/*.off touch $(grep default-off src/*/module.type | sed "s|/module.type:.*|.on|") ;; (reset) - { $as_echo "$as_me:${as_lineno-$LINENO}: Resetting modules to default" >&5 -$as_echo "$as_me: Resetting modules to default" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Resetting modules to default" >&5 +printf "%s\n" "$as_me: Resetting modules to default" >&6;} rm -f src/*.on src/*.off ;; (-*) modules_mod=`echo "${modules_mod}" | sed "s|-||"` @@ -2404,8 +2886,8 @@ $as_echo "$as_me: Resetting modules to default" >&6;} if grep -q always src/$modules_mod/module.type ; then as_fn_error $? "trying to remove module $modules_mod which is always enabled" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling module ${modules_mod}" >&5 -$as_echo "$as_me: Disabling module ${modules_mod}" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling module ${modules_mod}" >&5 +printf "%s\n" "$as_me: Disabling module ${modules_mod}" >&6;} rm -f src/$modules_mod.on touch src/$modules_mod.off ;; (+*) @@ -2413,16 +2895,16 @@ $as_echo "$as_me: Disabling module ${modules_mod}" >&6;} if test ! -f src/$modules_mod/module.type ; then as_fn_error $? "trying to add module $modules_mod which does not exist" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling module ${modules_mod}" >&5 -$as_echo "$as_me: Enabling module ${modules_mod}" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling module ${modules_mod}" >&5 +printf "%s\n" "$as_me: Enabling module ${modules_mod}" >&6;} rm -f src/$modules_mod.off touch src/$modules_mod.on ;; (*) if test ! -f src/$modules_mod/module.type ; then as_fn_error $? "trying to add module $modules_mod which does not exist" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling module ${modules_mod}" >&5 -$as_echo "$as_me: Enabling module ${modules_mod}" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling module ${modules_mod}" >&5 +printf "%s\n" "$as_me: Enabling module ${modules_mod}" >&6;} rm -f src/$modules_mod.off touch src/$modules_mod.on ;; esac @@ -2441,18 +2923,20 @@ fi libsearch= # Check whether --enable-libsearch was given. -if test "${enable_libsearch+set}" = set; then : +if test ${enable_libsearch+y} +then : enableval=$enable_libsearch; case "${enableval}" in (yes) libsearch=true ;; (no) libsearch=false ;; (*) as_fn_error $? "wrong argument to --enable-libsearch" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) libsearch=true ;; (no) libsearch=false ;; esac - + ;; +esac fi @@ -2463,18 +2947,20 @@ fi static_patch= # Check whether --enable-static-patch was given. -if test "${enable_static_patch+set}" = set; then : +if test ${enable_static_patch+y} +then : enableval=$enable_static_patch; case "${enableval}" in (yes) static_patch=true ;; (no) static_patch=false ;; (*) as_fn_error $? "wrong argument to --enable-static-patch" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) static_patch=true ;; (no) static_patch=false ;; esac - + ;; +esac fi @@ -2482,77 +2968,86 @@ fi doc= # Check whether --enable-doc was given. -if test "${enable_doc+set}" = set; then : +if test ${enable_doc+y} +then : enableval=$enable_doc; case "${enableval}" in (yes) doc=true ;; (no) doc=false ;; (*) as_fn_error $? "wrong argument to --enable-doc" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) doc=true ;; (no) doc=false ;; esac - + ;; +esac fi pdfdoc= # Check whether --enable-pdfdoc was given. -if test "${enable_pdfdoc+set}" = set; then : +if test ${enable_pdfdoc+y} +then : enableval=$enable_pdfdoc; case "${enableval}" in (yes) pdfdoc=true ;; (no) pdfdoc=false ;; (*) as_fn_error $? "wrong argument to --enable-pdfdoc" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) pdfdoc=true ;; (no) pdfdoc=false ;; esac - + ;; +esac fi debug= # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : +if test ${enable_debug+y} +then : enableval=$enable_debug; case "${enableval}" in (yes) debug=true ;; (no) debug=false ;; (*) as_fn_error $? "wrong argument to --enable-debug" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) debug=true ;; (no) debug=false ;; esac - + ;; +esac fi gcov= # Check whether --enable-gcov was given. -if test "${enable_gcov+set}" = set; then : +if test ${enable_gcov+y} +then : enableval=$enable_gcov; case "${enableval}" in (yes) gcov=true ;; (no) gcov=false ;; (*) as_fn_error $? "wrong argument to --enable-gcov" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) gcov=true ;; (no) gcov=false ;; esac - + ;; +esac fi # Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : +if test ${enable_cxx+y} +then : enableval=$enable_cxx; case "${enableval}" in (11) cxx_level=17 ;; @@ -2563,683 +3058,778 @@ if test "${enable_cxx+set}" = set; then : (none) cxx_level="" ;; (*) as_fn_error $? "cxx level not supported" "$LINENO" 5 esac - { $as_echo "$as_me:${as_lineno-$LINENO}: Selected C++ level: $cxx_level" >&5 -$as_echo "$as_me: Selected C++ level: $cxx_level" >&6;} - -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Selected C++ level: $cxx_level" >&5 +printf "%s\n" "$as_me: Selected C++ level: $cxx_level" >&6;} +else case e in #( + e) cxx_level="17" - + ;; +esac fi basic_warnings= # Check whether --enable-basic-warnings was given. -if test "${enable_basic_warnings+set}" = set; then : +if test ${enable_basic_warnings+y} +then : enableval=$enable_basic_warnings; case "${enableval}" in (yes) basic_warnings=true ;; (no) basic_warnings=false ;; (*) as_fn_error $? "wrong argument to --enable-basic-warnings" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) basic_warnings=true ;; (no) basic_warnings=false ;; esac - + ;; +esac fi fussy= # Check whether --enable-fussy was given. -if test "${enable_fussy+set}" = set; then : +if test ${enable_fussy+y} +then : enableval=$enable_fussy; case "${enableval}" in (yes) fussy=true ;; (no) fussy=false ;; (*) as_fn_error $? "wrong argument to --enable-fussy" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) fussy=true ;; (no) fussy=false ;; esac - + ;; +esac fi debug_glibcxx= # Check whether --enable-debug-glibcxx was given. -if test "${enable_debug_glibcxx+set}" = set; then : +if test ${enable_debug_glibcxx+y} +then : enableval=$enable_debug_glibcxx; case "${enableval}" in (yes) debug_glibcxx=true ;; (no) debug_glibcxx=false ;; (*) as_fn_error $? "wrong argument to --enable-debug-glibcxx" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) debug_glibcxx=true ;; (no) debug_glibcxx=false ;; esac - + ;; +esac fi shared= # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; case "${enableval}" in (yes) shared=true ;; (no) shared=false ;; (*) as_fn_error $? "wrong argument to --enable-shared" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) shared=true ;; (no) shared=false ;; esac - + ;; +esac fi dependency_tracking= # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test ${enable_dependency_tracking+y} +then : enableval=$enable_dependency_tracking; case "${enableval}" in (yes) dependency_tracking=true ;; (no) dependency_tracking=false ;; (*) as_fn_error $? "wrong argument to --enable-dependency-tracking" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) dependency_tracking=true ;; (no) dependency_tracking=false ;; esac - + ;; +esac fi no_gnu_unique= # Check whether --enable-no-gnu-unique was given. -if test "${enable_no_gnu_unique+set}" = set; then : +if test ${enable_no_gnu_unique+y} +then : enableval=$enable_no_gnu_unique; case "${enableval}" in (yes) no_gnu_unique=true ;; (no) no_gnu_unique=false ;; (*) as_fn_error $? "wrong argument to --enable-no-gnu-unique" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) no_gnu_unique=true ;; (no) no_gnu_unique=false ;; esac - + ;; +esac fi rpath= # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : +if test ${enable_rpath+y} +then : enableval=$enable_rpath; case "${enableval}" in (yes) rpath=true ;; (no) rpath=false ;; (*) as_fn_error $? "wrong argument to --enable-rpath" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) rpath=true ;; (no) rpath=false ;; esac - + ;; +esac fi absolute_soname= # Check whether --enable-absolute-soname was given. -if test "${enable_absolute_soname+set}" = set; then : +if test ${enable_absolute_soname+y} +then : enableval=$enable_absolute_soname; case "${enableval}" in (yes) absolute_soname=true ;; (no) absolute_soname=false ;; (*) as_fn_error $? "wrong argument to --enable-absolute-soname" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) absolute_soname=true ;; (no) absolute_soname=false ;; esac - + ;; +esac fi absolute_install_name= # Check whether --enable-absolute-install-name was given. -if test "${enable_absolute_install_name+set}" = set; then : +if test ${enable_absolute_install_name+y} +then : enableval=$enable_absolute_install_name; case "${enableval}" in (yes) absolute_install_name=true ;; (no) absolute_install_name=false ;; (*) as_fn_error $? "wrong argument to --enable-absolute-install-name" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) absolute_install_name=true ;; (no) absolute_install_name=false ;; esac - + ;; +esac fi loader_path= # Check whether --enable-loader-path was given. -if test "${enable_loader_path+set}" = set; then : +if test ${enable_loader_path+y} +then : enableval=$enable_loader_path; case "${enableval}" in (yes) loader_path=true ;; (no) loader_path=false ;; (*) as_fn_error $? "wrong argument to --enable-loader-path" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) loader_path=true ;; (no) loader_path=false ;; esac - + ;; +esac fi bsymbolic= # Check whether --enable-bsymbolic was given. -if test "${enable_bsymbolic+set}" = set; then : +if test ${enable_bsymbolic+y} +then : enableval=$enable_bsymbolic; case "${enableval}" in (yes) bsymbolic=true ;; (no) bsymbolic=false ;; (*) as_fn_error $? "wrong argument to --enable-bsymbolic" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) bsymbolic=true ;; (no) bsymbolic=false ;; esac - + ;; +esac fi ld_r= # Check whether --enable-ld-r was given. -if test "${enable_ld_r+set}" = set; then : +if test ${enable_ld_r+y} +then : enableval=$enable_ld_r; case "${enableval}" in (yes) ld_r=true ;; (no) ld_r=false ;; (*) as_fn_error $? "wrong argument to --enable-ld-r" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) ld_r=true ;; (no) ld_r=false ;; esac - + ;; +esac fi ar_cr= # Check whether --enable-ar-cr was given. -if test "${enable_ar_cr+set}" = set; then : +if test ${enable_ar_cr+y} +then : enableval=$enable_ar_cr; case "${enableval}" in (yes) ar_cr=true ;; (no) ar_cr=false ;; (*) as_fn_error $? "wrong argument to --enable-ar-cr" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) ar_cr=true ;; (no) ar_cr=false ;; esac - + ;; +esac fi static_archive= # Check whether --enable-static-archive was given. -if test "${enable_static_archive+set}" = set; then : +if test ${enable_static_archive+y} +then : enableval=$enable_static_archive; case "${enableval}" in (yes) static_archive=true ;; (no) static_archive=false ;; (*) as_fn_error $? "wrong argument to --enable-static-archive" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) static_archive=true ;; (no) static_archive=false ;; esac - + ;; +esac fi asmjit= # Check whether --enable-asmjit was given. -if test "${enable_asmjit+set}" = set; then : +if test ${enable_asmjit+y} +then : enableval=$enable_asmjit; case "${enableval}" in (yes) asmjit=true ;; (no) asmjit=false ;; (*) as_fn_error $? "wrong argument to --enable-asmjit" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) asmjit=true ;; (no) asmjit=false ;; esac - + ;; +esac fi mpi= # Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : +if test ${enable_mpi+y} +then : enableval=$enable_mpi; case "${enableval}" in (yes) mpi=true ;; (no) mpi=false ;; (*) as_fn_error $? "wrong argument to --enable-mpi" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) mpi=true ;; (no) mpi=false ;; esac - + ;; +esac fi external_lapack= # Check whether --enable-external-lapack was given. -if test "${enable_external_lapack+set}" = set; then : +if test ${enable_external_lapack+y} +then : enableval=$enable_external_lapack; case "${enableval}" in (yes) external_lapack=true ;; (no) external_lapack=false ;; (*) as_fn_error $? "wrong argument to --enable-external-lapack" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) external_lapack=true ;; (no) external_lapack=false ;; esac - + ;; +esac fi external_blas= # Check whether --enable-external-blas was given. -if test "${enable_external_blas+set}" = set; then : +if test ${enable_external_blas+y} +then : enableval=$enable_external_blas; case "${enableval}" in (yes) external_blas=true ;; (no) external_blas=false ;; (*) as_fn_error $? "wrong argument to --enable-external-blas" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) external_blas=true ;; (no) external_blas=false ;; esac - + ;; +esac fi molfile_plugins= # Check whether --enable-molfile-plugins was given. -if test "${enable_molfile_plugins+set}" = set; then : +if test ${enable_molfile_plugins+y} +then : enableval=$enable_molfile_plugins; case "${enableval}" in (yes) molfile_plugins=true ;; (no) molfile_plugins=false ;; (*) as_fn_error $? "wrong argument to --enable-molfile-plugins" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) molfile_plugins=true ;; (no) molfile_plugins=false ;; esac - + ;; +esac fi external_molfile_plugins= # Check whether --enable-external-molfile-plugins was given. -if test "${enable_external_molfile_plugins+set}" = set; then : +if test ${enable_external_molfile_plugins+y} +then : enableval=$enable_external_molfile_plugins; case "${enableval}" in (yes) external_molfile_plugins=true ;; (no) external_molfile_plugins=false ;; (*) as_fn_error $? "wrong argument to --enable-external-molfile-plugins" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) external_molfile_plugins=true ;; (no) external_molfile_plugins=false ;; esac - + ;; +esac fi zlib= # Check whether --enable-zlib was given. -if test "${enable_zlib+set}" = set; then : +if test ${enable_zlib+y} +then : enableval=$enable_zlib; case "${enableval}" in (yes) zlib=true ;; (no) zlib=false ;; (*) as_fn_error $? "wrong argument to --enable-zlib" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) zlib=true ;; (no) zlib=false ;; esac - + ;; +esac fi dlopen= # Check whether --enable-dlopen was given. -if test "${enable_dlopen+set}" = set; then : +if test ${enable_dlopen+y} +then : enableval=$enable_dlopen; case "${enableval}" in (yes) dlopen=true ;; (no) dlopen=false ;; (*) as_fn_error $? "wrong argument to --enable-dlopen" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) dlopen=true ;; (no) dlopen=false ;; esac - + ;; +esac fi dladdr= # Check whether --enable-dladdr was given. -if test "${enable_dladdr+set}" = set; then : +if test ${enable_dladdr+y} +then : enableval=$enable_dladdr; case "${enableval}" in (yes) dladdr=true ;; (no) dladdr=false ;; (*) as_fn_error $? "wrong argument to --enable-dladdr" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) dladdr=true ;; (no) dladdr=false ;; esac - + ;; +esac fi rtld_default= # Check whether --enable-rtld_default was given. -if test "${enable_rtld_default+set}" = set; then : +if test ${enable_rtld_default+y} +then : enableval=$enable_rtld_default; case "${enableval}" in (yes) rtld_default=true ;; (no) rtld_default=false ;; (*) as_fn_error $? "wrong argument to --enable-rtld_default" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) rtld_default=true ;; (no) rtld_default=false ;; esac - + ;; +esac fi subprocess= # Check whether --enable-subprocess was given. -if test "${enable_subprocess+set}" = set; then : +if test ${enable_subprocess+y} +then : enableval=$enable_subprocess; case "${enableval}" in (yes) subprocess=true ;; (no) subprocess=false ;; (*) as_fn_error $? "wrong argument to --enable-subprocess" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) subprocess=true ;; (no) subprocess=false ;; esac - + ;; +esac fi popen= # Check whether --enable-popen was given. -if test "${enable_popen+set}" = set; then : +if test ${enable_popen+y} +then : enableval=$enable_popen; case "${enableval}" in (yes) popen=true ;; (no) popen=false ;; (*) as_fn_error $? "wrong argument to --enable-popen" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) popen=true ;; (no) popen=false ;; esac - + ;; +esac fi execinfo= # Check whether --enable-execinfo was given. -if test "${enable_execinfo+set}" = set; then : +if test ${enable_execinfo+y} +then : enableval=$enable_execinfo; case "${enableval}" in (yes) execinfo=true ;; (no) execinfo=false ;; (*) as_fn_error $? "wrong argument to --enable-execinfo" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) execinfo=true ;; (no) execinfo=false ;; esac - + ;; +esac fi gsl= # Check whether --enable-gsl was given. -if test "${enable_gsl+set}" = set; then : +if test ${enable_gsl+y} +then : enableval=$enable_gsl; case "${enableval}" in (yes) gsl=true ;; (no) gsl=false ;; (*) as_fn_error $? "wrong argument to --enable-gsl" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) gsl=true ;; (no) gsl=false ;; esac - + ;; +esac fi boost_graph= # Check whether --enable-boost_graph was given. -if test "${enable_boost_graph+set}" = set; then : +if test ${enable_boost_graph+y} +then : enableval=$enable_boost_graph; case "${enableval}" in (yes) boost_graph=true ;; (no) boost_graph=false ;; (*) as_fn_error $? "wrong argument to --enable-boost_graph" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) boost_graph=true ;; (no) boost_graph=false ;; esac - + ;; +esac fi boost_serialization= # Check whether --enable-boost_serialization was given. -if test "${enable_boost_serialization+set}" = set; then : +if test ${enable_boost_serialization+y} +then : enableval=$enable_boost_serialization; case "${enableval}" in (yes) boost_serialization=true ;; (no) boost_serialization=false ;; (*) as_fn_error $? "wrong argument to --enable-boost_serialization" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) boost_serialization=true ;; (no) boost_serialization=false ;; esac - + ;; +esac fi fftw= # Check whether --enable-fftw was given. -if test "${enable_fftw+set}" = set; then : +if test ${enable_fftw+y} +then : enableval=$enable_fftw; case "${enableval}" in (yes) fftw=true ;; (no) fftw=false ;; (*) as_fn_error $? "wrong argument to --enable-fftw" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) fftw=true ;; (no) fftw=false ;; esac - + ;; +esac fi python= # Check whether --enable-python was given. -if test "${enable_python+set}" = set; then : +if test ${enable_python+y} +then : enableval=$enable_python; case "${enableval}" in (yes) python=true ;; (no) python=false ;; (*) as_fn_error $? "wrong argument to --enable-python" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) python=true ;; (no) python=false ;; esac - + ;; +esac fi pycv= # Check whether --enable-pycv was given. -if test "${enable_pycv+set}" = set; then : +if test ${enable_pycv+y} +then : enableval=$enable_pycv; case "${enableval}" in (yes) pycv=true ;; (no) pycv=false ;; (*) as_fn_error $? "wrong argument to --enable-pycv" "$LINENO" 5 ;; esac -else - case "yes" in +else case e in #( + e) case "yes" in (yes) pycv=true ;; (no) pycv=false ;; esac - + ;; +esac fi af_ocl= # Check whether --enable-af_ocl was given. -if test "${enable_af_ocl+set}" = set; then : +if test ${enable_af_ocl+y} +then : enableval=$enable_af_ocl; case "${enableval}" in (yes) af_ocl=true ;; (no) af_ocl=false ;; (*) as_fn_error $? "wrong argument to --enable-af_ocl" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) af_ocl=true ;; (no) af_ocl=false ;; esac - + ;; +esac fi af_cuda= # Check whether --enable-af_cuda was given. -if test "${enable_af_cuda+set}" = set; then : +if test ${enable_af_cuda+y} +then : enableval=$enable_af_cuda; case "${enableval}" in (yes) af_cuda=true ;; (no) af_cuda=false ;; (*) as_fn_error $? "wrong argument to --enable-af_cuda" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) af_cuda=true ;; (no) af_cuda=false ;; esac - + ;; +esac fi af_cpu= # Check whether --enable-af_cpu was given. -if test "${enable_af_cpu+set}" = set; then : +if test ${enable_af_cpu+y} +then : enableval=$enable_af_cpu; case "${enableval}" in (yes) af_cpu=true ;; (no) af_cpu=false ;; (*) as_fn_error $? "wrong argument to --enable-af_cpu" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) af_cpu=true ;; (no) af_cpu=false ;; esac - + ;; +esac fi libtorch= # Check whether --enable-libtorch was given. -if test "${enable_libtorch+set}" = set; then : +if test ${enable_libtorch+y} +then : enableval=$enable_libtorch; case "${enableval}" in (yes) libtorch=true ;; (no) libtorch=false ;; (*) as_fn_error $? "wrong argument to --enable-libtorch" "$LINENO" 5 ;; esac -else - case "no" in +else case e in #( + e) case "no" in (yes) libtorch=true ;; (no) libtorch=false ;; esac - + ;; +esac fi #added by luigibonati +metatensor= +# Check whether --enable-metatensor was given. +if test ${enable_metatensor+y} +then : + enableval=$enable_metatensor; case "${enableval}" in + (yes) metatensor=true ;; + (no) metatensor=false ;; + (*) as_fn_error $? "wrong argument to --enable-metatensor" "$LINENO" 5 ;; + esac +else case e in #( + e) case "no" in + (yes) metatensor=true ;; + (no) metatensor=false ;; + esac + ;; +esac +fi + + + @@ -3273,6 +3863,12 @@ compilers="mpic++ mpicxx mpiicpc openmpic++ openmpicxx $compilers" fi # do the actual search + + + + + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3287,38 +3883,44 @@ if test -z "$CXX"; then 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +printf "%s\n" "$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3331,38 +3933,44 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +printf "%s\n" "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3374,8 +3982,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -3385,7 +3993,7 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -3395,7 +4003,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3405,7 +4013,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3413,7 +4021,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3425,9 +4033,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 +printf %s "checking whether the C++ compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3448,13 +4056,14 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -3469,12 +4078,12 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -3485,48 +4094,52 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 +printf %s "checking for C++ compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -3536,15 +4149,16 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3553,9 +4167,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -3565,8 +4181,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3574,10 +4190,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3585,39 +4201,41 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C++ compiled programs. +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3631,11 +4249,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3644,31 +4263,34 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 +printf %s "checking whether the compiler supports GNU C++... " >&6; } +if test ${ac_cv_cxx_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3678,30 +4300,36 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } +if test ${ac_cv_prog_cxx_g+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" @@ -3709,57 +4337,63 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" +else case e in #( + e) CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else case e in #( + e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } +if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -3774,12 +4408,121 @@ else CXXFLAGS= fi fi +ac_prog_cxx_stdcxx=no +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 +printf %s "checking for $CXX option to enable C++11 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx11+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cxx_cxx11=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx11_program +_ACEOF +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx11" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX ;; +esac +fi + +if test "x$ac_cv_prog_cxx_cxx11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx11" ;; +esac +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_prog_cxx_stdcxx=cxx11 ;; +esac +fi +fi +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 +printf %s "checking for $CXX option to enable C++98 features... " >&6; } +if test ${ac_cv_prog_cxx_cxx98+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cxx_cxx98=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx98_program +_ACEOF +for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx98=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx98" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX ;; +esac +fi + +if test "x$ac_cv_prog_cxx_cxx98" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx98" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx98" ;; +esac +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 + ac_prog_cxx_stdcxx=cxx98 ;; +esac +fi +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 + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3790,38 +4533,44 @@ if test -n "$ac_tool_prefix"; then 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3834,38 +4583,44 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3877,8 +4632,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3886,23 +4641,23 @@ esac fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3912,20 +4667,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3935,30 +4691,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -3966,57 +4728,63 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4031,94 +4799,153 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* 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 -std 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 -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC ;; +esac +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 ;; +esac +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC ;; +esac +fi -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; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" ;; +esac +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 ;; +esac +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac +fi +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - +fi fi ac_ext=c @@ -4141,38 +4968,44 @@ if test -n "$ac_tool_prefix"; then 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$FC"; then ac_cv_prog_FC="$FC" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +printf "%s\n" "$FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4185,38 +5018,44 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +printf "%s\n" "$ac_ct_FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4228,8 +5067,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -4238,7 +5077,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -4248,7 +5087,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4258,21 +5097,22 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the +# 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 +printf %s "checking whether the compiler supports GNU Fortran... " >&6; } +if test ${ac_cv_fc_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me @@ -4280,43 +5120,52 @@ else end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} +ac_test_FCFLAGS=${FCFLAGS+y} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +printf %s "checking whether $FC accepts -g... " >&6; } +if test ${ac_cv_prog_fc_g+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no +else case e in #( + e) ac_cv_prog_fc_g=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +printf "%s\n" "$ac_cv_prog_fc_g" >&6; } +if test $ac_test_FCFLAGS; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -4356,26 +5205,26 @@ if test -z "$LDSHARED" ; then LDSHARED="$CXX" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial CXX: $CXX" >&5 -$as_echo "$as_me: Initial CXX: $CXX" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial CXXFLAGS: $CXXFLAGS" >&5 -$as_echo "$as_me: Initial CXXFLAGS: $CXXFLAGS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial CPPFLAGS: $CPPFLAGS" >&5 -$as_echo "$as_me: Initial CPPFLAGS: $CPPFLAGS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial CFLAGS: $CFLAGS" >&5 -$as_echo "$as_me: Initial CFLAGS: $CFLAGS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial LDFLAGS: $LDFLAGS" >&5 -$as_echo "$as_me: Initial LDFLAGS: $LDFLAGS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial LIBS: $LIBS" >&5 -$as_echo "$as_me: Initial LIBS: $LIBS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial STATIC_LIBS: $STATIC_LIBS" >&5 -$as_echo "$as_me: Initial STATIC_LIBS: $STATIC_LIBS" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial LD: $LD" >&5 -$as_echo "$as_me: Initial LD: $LD" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial LDSHARED: $LDSHARED" >&5 -$as_echo "$as_me: Initial LDSHARED: $LDSHARED" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: Initial SOEXT: $SOEXT" >&5 -$as_echo "$as_me: Initial SOEXT: $SOEXT" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial CXX: $CXX" >&5 +printf "%s\n" "$as_me: Initial CXX: $CXX" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial CXXFLAGS: $CXXFLAGS" >&5 +printf "%s\n" "$as_me: Initial CXXFLAGS: $CXXFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial CPPFLAGS: $CPPFLAGS" >&5 +printf "%s\n" "$as_me: Initial CPPFLAGS: $CPPFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial CFLAGS: $CFLAGS" >&5 +printf "%s\n" "$as_me: Initial CFLAGS: $CFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial LDFLAGS: $LDFLAGS" >&5 +printf "%s\n" "$as_me: Initial LDFLAGS: $LDFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial LIBS: $LIBS" >&5 +printf "%s\n" "$as_me: Initial LIBS: $LIBS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial STATIC_LIBS: $STATIC_LIBS" >&5 +printf "%s\n" "$as_me: Initial STATIC_LIBS: $STATIC_LIBS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial LD: $LD" >&5 +printf "%s\n" "$as_me: Initial LD: $LD" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial LDSHARED: $LDSHARED" >&5 +printf "%s\n" "$as_me: Initial LDSHARED: $LDSHARED" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Initial SOEXT: $SOEXT" >&5 +printf "%s\n" "$as_me: Initial SOEXT: $SOEXT" >&6;} # check C++ flags if test $shared = true @@ -4384,48 +5233,52 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fPIC" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fPIC" >&5 -$as_echo_n "checking whether $CXX accepts -fPIC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fPIC" >&5 +printf %s "checking whether $CXX accepts -fPIC... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -4437,48 +5290,52 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fPIC" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fPIC" >&5 -$as_echo_n "checking whether $CC accepts -fPIC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fPIC" >&5 +printf %s "checking whether $CC accepts -fPIC... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CCFLAGS="$save_CCFLAGS" +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CCFLAGS="$save_CCFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CCFLAGS="$save_CCFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CCFLAGS="$save_CCFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4493,94 +5350,102 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wall" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wall" >&5 -$as_echo_n "checking whether $CXX accepts -Wall... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wall" >&5 +printf %s "checking whether $CXX accepts -Wall... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -pedantic" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -pedantic" >&5 -$as_echo_n "checking whether $CXX accepts -pedantic... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -pedantic" >&5 +printf %s "checking whether $CXX accepts -pedantic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -4589,48 +5454,52 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -std=c++$cxx_level" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -std=c++$cxx_level" >&5 -$as_echo_n "checking whether $CXX accepts -std=c++$cxx_level... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -std=c++$cxx_level" >&5 +printf %s "checking whether $CXX accepts -std=c++$cxx_level... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -4639,48 +5508,52 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -g" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -4692,27 +5565,29 @@ then save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS --coverage" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain --coverage" >&5 -$as_echo_n "checking whether LDFLAGS can contain --coverage... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain --coverage" >&5 +printf %s "checking whether LDFLAGS can contain --coverage... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; LDFLAGS="$save_LDFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; LDFLAGS="$save_LDFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext STATIC_LIBS="$STATIC_LIBS --coverage" @@ -4723,467 +5598,507 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wextra" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wextra" >&5 -$as_echo_n "checking whether $CXX accepts -Wextra... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wextra" >&5 +printf %s "checking whether $CXX accepts -Wextra... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wfloat-equal" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wfloat-equal" >&5 -$as_echo_n "checking whether $CXX accepts -Wfloat-equal... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wfloat-equal" >&5 +printf %s "checking whether $CXX accepts -Wfloat-equal... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wwrite-strings" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wwrite-strings" >&5 -$as_echo_n "checking whether $CXX accepts -Wwrite-strings... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wwrite-strings" >&5 +printf %s "checking whether $CXX accepts -Wwrite-strings... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wpointer-arith" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wpointer-arith" >&5 -$as_echo_n "checking whether $CXX accepts -Wpointer-arith... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wpointer-arith" >&5 +printf %s "checking whether $CXX accepts -Wpointer-arith... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wcast-qual" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wcast-qual" >&5 -$as_echo_n "checking whether $CXX accepts -Wcast-qual... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wcast-qual" >&5 +printf %s "checking whether $CXX accepts -Wcast-qual... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wcast-align" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wcast-align" >&5 -$as_echo_n "checking whether $CXX accepts -Wcast-align... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wcast-align" >&5 +printf %s "checking whether $CXX accepts -Wcast-align... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wconversion" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wconversion" >&5 -$as_echo_n "checking whether $CXX accepts -Wconversion... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wconversion" >&5 +printf %s "checking whether $CXX accepts -Wconversion... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wredundant-delcs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wredundant-delcs" >&5 -$as_echo_n "checking whether $CXX accepts -Wredundant-delcs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wredundant-delcs" >&5 +printf %s "checking whether $CXX accepts -Wredundant-delcs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wvariadic-macros" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wvariadic-macros" >&5 -$as_echo_n "checking whether $CXX accepts -Wvariadic-macros... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wvariadic-macros" >&5 +printf %s "checking whether $CXX accepts -Wvariadic-macros... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wold-style-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wold-style-cast" >&5 -$as_echo_n "checking whether $CXX accepts -Wold-style-cast... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wold-style-cast" >&5 +printf %s "checking whether $CXX accepts -Wold-style-cast... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX declares c++17 support" >&5 -$as_echo_n "checking whether $CXX declares c++17 support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX declares c++17 support" >&5 +printf %s "checking whether $CXX declares c++17 support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5192,40 +6107,42 @@ this_compiler_does_not_support_cxx17 #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; support_cxx17=true -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - support_cxx17=false +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + support_cxx17=false ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$support_cxx17" = false then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++17 support is required as of PLUMED 2.10" >&5 -$as_echo "$as_me: WARNING: C++17 support is required as of PLUMED 2.10" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your compiler appears not to support C++17" >&5 -$as_echo "$as_me: WARNING: Your compiler appears not to support C++17" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please change compiler or make sure that everything works correctly" >&5 -$as_echo "$as_me: WARNING: Please change compiler or make sure that everything works correctly" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: C++17 support is required as of PLUMED 2.10" >&5 +printf "%s\n" "$as_me: WARNING: C++17 support is required as of PLUMED 2.10" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your compiler appears not to support C++17" >&5 +printf "%s\n" "$as_me: WARNING: Your compiler appears not to support C++17" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please change compiler or make sure that everything works correctly" >&5 +printf "%s\n" "$as_me: WARNING: Please change compiler or make sure that everything works correctly" >&2;} fi if test "$dependency_tracking" = true then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX can generate dependency file with -MM -MF" >&5 -$as_echo_n "checking whether $CXX can generate dependency file with -MM -MF... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX can generate dependency file with -MM -MF" >&5 +printf %s "checking whether $CXX can generate dependency file with -MM -MF... " >&6; } dependency=ko echo "#include \"conftest1.h\"" > conftest.cpp echo "#include \"conftest2.h\"" > conftest1.h @@ -5233,12 +6150,12 @@ $as_echo_n "checking whether $CXX can generate dependency file with -MM -MF... " $CXX $CXXFLAGS -c -MM -MFconftest.d conftest.cpp 1> /dev/null 2> /dev/null grep conftest2 conftest.d 1> /dev/null 2>/dev/null && dependency=ok if test "$dependency" = ok ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } disable_dependency_tracking=no else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } disable_dependency_tracking=yes fi else @@ -5246,11 +6163,11 @@ else fi if test "$disable_dependency_tracking" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dependencies tracking disabled - always make clean before make" >&5 -$as_echo "$as_me: WARNING: dependencies tracking disabled - always make clean before make" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dependencies tracking disabled - always make clean before make" >&5 +printf "%s\n" "$as_me: WARNING: dependencies tracking disabled - always make clean before make" >&2;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: dependency tracking enabled" >&5 -$as_echo "$as_me: dependency tracking enabled" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: dependency tracking enabled" >&5 +printf "%s\n" "$as_me: dependency tracking enabled" >&6;} fi @@ -5259,55 +6176,59 @@ then save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-gnu-unique" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fno-gnu-unique" >&5 -$as_echo_n "checking whether $CXX accepts -fno-gnu-unique... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fno-gnu-unique" >&5 +printf %s "checking whether $CXX accepts -fno-gnu-unique... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi #### Compulsory libraries #### # some of them might be made optional if we find that are not available in some system -{ $as_echo "$as_me:${as_lineno-$LINENO}: Now we will check compulsory headers and libraries" >&5 -$as_echo "$as_me: Now we will check compulsory headers and libraries" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Now we will check compulsory headers and libraries" >&5 +printf "%s\n" "$as_me: Now we will check compulsory headers and libraries" >&6;} found=ko @@ -5332,8 +6253,8 @@ $as_echo "$as_me: Now we will check compulsory headers and libraries" >&6;} fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking filesystem library without extra libs" >&5 -$as_echo_n "checking filesystem library without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem library without extra libs" >&5 +printf %s "checking filesystem library without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5350,22 +6271,24 @@ int main(){ } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking filesystem library with $all_LIBS" >&5 -$as_echo_n "checking filesystem library with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem library with $all_LIBS" >&5 +printf %s "checking filesystem library with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5383,22 +6306,24 @@ int main(){ } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking filesystem library with -l$testlib" >&5 -$as_echo_n "checking filesystem library with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem library with -l$testlib" >&5 +printf %s "checking filesystem library with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5416,16 +6341,18 @@ int main(){ } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -5436,12 +6363,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_CXX17_FILESYSTEM 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_CXX17_FILESYSTEM 1" >>confdefs.h __PLUMED_CXX17_FILESYSTEM=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_CXX17_FILESYSTEM" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_CXX17_FILESYSTEM" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_CXX17_FILESYSTEM" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_CXX17_FILESYSTEM" >&2;} LIBS="$save_LIBS" fi @@ -5460,452 +6387,474 @@ lapack_found= # external lapack can only work with external blas # thus, if external blas are disabled also external lapack should be disabled if test "$external_blas" = false && test "$external_lapack" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Internal blas can only be used with internal lapack" >&5 -$as_echo "$as_me: Internal blas can only be used with internal lapack" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Will not search for external lapack" >&5 -$as_echo "$as_me: Will not search for external lapack" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Internal blas can only be used with internal lapack" >&5 +printf "%s\n" "$as_me: Internal blas can only be used with internal lapack" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Will not search for external lapack" >&5 +printf "%s\n" "$as_me: Will not search for external lapack" >&6;} external_lapack=false fi # first look for blas if test "$external_blas" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dgemv_ can be linked with no library" >&5 -$as_echo_n "checking whether dgemv_ can be linked with no library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dgemv_ can be linked with no library" >&5 +printf %s "checking whether dgemv_ can be linked with no library... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv_ (); +namespace conftest { + extern "C" int dgemv_ (); +} int -main () +main (void) { -return dgemv_ (); +return conftest::dgemv_ (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } blas_found=underscore -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dgemv_ can be linked with no library" >&5 -$as_echo_n "checking whether dgemv_ can be linked with no library... " >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dgemv_ can be linked with no library" >&5 +printf %s "checking whether dgemv_ can be linked with no library... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv (); +namespace conftest { + extern "C" int dgemv (); +} int -main () +main (void) { -return dgemv (); +return conftest::dgemv (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } blas_found=nounderscore -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv_" >&5 -$as_echo_n "checking for library containing dgemv_... " >&6; } -if ${ac_cv_search_dgemv_+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv_" >&5 +printf %s "checking for library containing dgemv_... " >&6; } +if test ${ac_cv_search_dgemv_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv_ (); +namespace conftest { + extern "C" int dgemv_ (); +} int -main () +main (void) { -return dgemv_ (); +return conftest::dgemv_ (); ; return 0; } _ACEOF -for ac_lib in '' blas; do +for ac_lib in '' blas +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv_=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv_+:} false; then : + if test ${ac_cv_search_dgemv_+y} +then : break fi done -if ${ac_cv_search_dgemv_+:} false; then : +if test ${ac_cv_search_dgemv_+y} +then : -else - ac_cv_search_dgemv_=no +else case e in #( + e) ac_cv_search_dgemv_=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv_" >&5 -$as_echo "$ac_cv_search_dgemv_" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv_" >&5 +printf "%s\n" "$ac_cv_search_dgemv_" >&6; } ac_res=$ac_cv_search_dgemv_ -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=underscore -else - +else case e in #( + e) if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 -$as_echo_n "checking for library containing dgemv... " >&6; } -if ${ac_cv_search_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 +printf %s "checking for library containing dgemv... " >&6; } +if test ${ac_cv_search_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv (); +namespace conftest { + extern "C" int dgemv (); +} int -main () +main (void) { -return dgemv (); +return conftest::dgemv (); ; return 0; } _ACEOF -for ac_lib in '' blas; do +for ac_lib in '' blas +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv+:} false; then : + if test ${ac_cv_search_dgemv+y} +then : break fi done -if ${ac_cv_search_dgemv+:} false; then : +if test ${ac_cv_search_dgemv+y} +then : -else - ac_cv_search_dgemv=no +else case e in #( + e) ac_cv_search_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 -$as_echo "$ac_cv_search_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 +printf "%s\n" "$ac_cv_search_dgemv" >&6; } ac_res=$ac_cv_search_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=nounderscore fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 -$as_echo_n "checking for library containing dgemv... " >&6; } -if ${ac_cv_search_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 +printf %s "checking for library containing dgemv... " >&6; } +if test ${ac_cv_search_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv (); +namespace conftest { + extern "C" int dgemv (); +} int -main () +main (void) { -return dgemv (); +return conftest::dgemv (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv+:} false; then : + if test ${ac_cv_search_dgemv+y} +then : break fi done -if ${ac_cv_search_dgemv+:} false; then : +if test ${ac_cv_search_dgemv+y} +then : -else - ac_cv_search_dgemv=no +else case e in #( + e) ac_cv_search_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 -$as_echo "$ac_cv_search_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 +printf "%s\n" "$ac_cv_search_dgemv" >&6; } ac_res=$ac_cv_search_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=nounderscore fi fi - + ;; +esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv_" >&5 -$as_echo_n "checking for library containing dgemv_... " >&6; } -if ${ac_cv_search_dgemv_+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv_" >&5 +printf %s "checking for library containing dgemv_... " >&6; } +if test ${ac_cv_search_dgemv_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv_ (); +namespace conftest { + extern "C" int dgemv_ (); +} int -main () +main (void) { -return dgemv_ (); +return conftest::dgemv_ (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv_=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv_+:} false; then : + if test ${ac_cv_search_dgemv_+y} +then : break fi done -if ${ac_cv_search_dgemv_+:} false; then : +if test ${ac_cv_search_dgemv_+y} +then : -else - ac_cv_search_dgemv_=no +else case e in #( + e) ac_cv_search_dgemv_=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv_" >&5 -$as_echo "$ac_cv_search_dgemv_" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv_" >&5 +printf "%s\n" "$ac_cv_search_dgemv_" >&6; } ac_res=$ac_cv_search_dgemv_ -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=underscore -else - +else case e in #( + e) if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 -$as_echo_n "checking for library containing dgemv... " >&6; } -if ${ac_cv_search_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 +printf %s "checking for library containing dgemv... " >&6; } +if test ${ac_cv_search_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv (); +namespace conftest { + extern "C" int dgemv (); +} int -main () +main (void) { -return dgemv (); +return conftest::dgemv (); ; return 0; } _ACEOF -for ac_lib in '' blas; do +for ac_lib in '' blas +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv+:} false; then : + if test ${ac_cv_search_dgemv+y} +then : break fi done -if ${ac_cv_search_dgemv+:} false; then : +if test ${ac_cv_search_dgemv+y} +then : -else - ac_cv_search_dgemv=no +else case e in #( + e) ac_cv_search_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 -$as_echo "$ac_cv_search_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 +printf "%s\n" "$ac_cv_search_dgemv" >&6; } ac_res=$ac_cv_search_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=nounderscore fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 -$as_echo_n "checking for library containing dgemv... " >&6; } -if ${ac_cv_search_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dgemv" >&5 +printf %s "checking for library containing dgemv... " >&6; } +if test ${ac_cv_search_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgemv (); +namespace conftest { + extern "C" int dgemv (); +} int -main () +main (void) { -return dgemv (); +return conftest::dgemv (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dgemv+:} false; then : + if test ${ac_cv_search_dgemv+y} +then : break fi done -if ${ac_cv_search_dgemv+:} false; then : +if test ${ac_cv_search_dgemv+y} +then : -else - ac_cv_search_dgemv=no +else case e in #( + e) ac_cv_search_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 -$as_echo "$ac_cv_search_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dgemv" >&5 +printf "%s\n" "$ac_cv_search_dgemv" >&6; } ac_res=$ac_cv_search_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" blas_found=nounderscore fi fi - + ;; +esac fi fi - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # if not found, then use internal lapack and blas if test -z "$blas_found" ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using internal lapack and blas, could be inefficient" >&5 -$as_echo "$as_me: WARNING: using internal lapack and blas, could be inefficient" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using internal lapack and blas, could be inefficient" >&5 +printf "%s\n" "$as_me: WARNING: using internal lapack and blas, could be inefficient" >&2;} fi # if found, also look for external lapack if test -n "$blas_found" ; then -$as_echo "#define __PLUMED_HAS_EXTERNAL_BLAS 1" >>confdefs.h +printf "%s\n" "#define __PLUMED_HAS_EXTERNAL_BLAS 1" >>confdefs.h if test "$external_lapack" = true ; then @@ -5916,119 +6865,127 @@ case "$blas_found" in esac if test "${libsearch}" = true ; then - as_ac_Search=`$as_echo "ac_cv_search_$search_for" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $search_for" >&5 -$as_echo_n "checking for library containing $search_for... " >&6; } -if eval \${$as_ac_Search+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + as_ac_Search=`printf "%s\n" "ac_cv_search_$search_for" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $search_for" >&5 +printf %s "checking for library containing $search_for... " >&6; } +if eval test \${$as_ac_Search+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $search_for (); +namespace conftest { + extern "C" int $search_for (); +} int -main () +main (void) { -return $search_for (); +return conftest::$search_for (); ; return 0; } _ACEOF -for ac_lib in '' lapack; do +for ac_lib in '' lapack +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : eval "$as_ac_Search=\$ac_res" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if eval \${$as_ac_Search+:} false; then : + if eval test \${$as_ac_Search+y} +then : break fi done -if eval \${$as_ac_Search+:} false; then : +if eval test \${$as_ac_Search+y} +then : -else - eval "$as_ac_Search=no" +else case e in #( + e) eval "$as_ac_Search=no" ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Search - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval ac_res=\$$as_ac_Search -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" lapack_found=yes fi else - as_ac_Search=`$as_echo "ac_cv_search_$search_for" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $search_for" >&5 -$as_echo_n "checking for library containing $search_for... " >&6; } -if eval \${$as_ac_Search+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + as_ac_Search=`printf "%s\n" "ac_cv_search_$search_for" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $search_for" >&5 +printf %s "checking for library containing $search_for... " >&6; } +if eval test \${$as_ac_Search+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $search_for (); +namespace conftest { + extern "C" int $search_for (); +} int -main () +main (void) { -return $search_for (); +return conftest::$search_for (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : eval "$as_ac_Search=\$ac_res" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if eval \${$as_ac_Search+:} false; then : + if eval test \${$as_ac_Search+y} +then : break fi done -if eval \${$as_ac_Search+:} false; then : +if eval test \${$as_ac_Search+y} +then : -else - eval "$as_ac_Search=no" +else case e in #( + e) eval "$as_ac_Search=no" ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Search - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval ac_res=\$$as_ac_Search -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" lapack_found=yes fi @@ -6039,10 +6996,10 @@ fi # if not found, then use internal lapack with external blas if test -z "$lapack_found" ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using internal lapack, could be inefficient" >&5 -$as_echo "$as_me: WARNING: using internal lapack, could be inefficient" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using internal lapack, could be inefficient" >&5 +printf "%s\n" "$as_me: WARNING: using internal lapack, could be inefficient" >&2;} else -$as_echo "#define __PLUMED_HAS_EXTERNAL_LAPACK 1" >>confdefs.h +printf "%s\n" "#define __PLUMED_HAS_EXTERNAL_LAPACK 1" >>confdefs.h fi @@ -6053,7 +7010,7 @@ fi # in the latter case, also (internal) lapack names will be underscored consistently if test "$blas_found" = nounderscore then - $as_echo "#define F77_NO_UNDERSCORE 1" >>confdefs.h + printf "%s\n" "#define F77_NO_UNDERSCORE 1" >>confdefs.h fi @@ -6062,14 +7019,15 @@ if test -n "$blas_found" ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sdot returns float" >&5 -$as_echo_n "checking whether sdot returns float... " >&6; } -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not checked (cross compiling)" >&5 -$as_echo "not checked (cross compiling)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sdot returns float" >&5 +printf %s "checking whether sdot returns float... " >&6; } +if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not checked (cross compiling)" >&5 +printf "%s\n" "not checked (cross compiling)" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ! defined(F77_NO_UNDERSCORE) @@ -6095,29 +7053,33 @@ int main(){ } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - sdot_returns_float=yes ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - sdot_returns_float=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_cxx_try_run "$LINENO" +then : + sdot_returns_float=yes ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) sdot_returns_float=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi if test "$sdot_returns_float" = no ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sdot returns double" >&5 -$as_echo_n "checking whether sdot returns double... " >&6; } -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not checked (cross compiling)" >&5 -$as_echo "not checked (cross compiling)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sdot returns double" >&5 +printf %s "checking whether sdot returns double... " >&6; } +if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not checked (cross compiling)" >&5 +printf "%s\n" "not checked (cross compiling)" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ! defined(F77_NO_UNDERSCORE) @@ -6143,35 +7105,38 @@ int main(){ } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - sdot_returns_double=yes ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - sdot_returns_double=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_cxx_try_run "$LINENO" +then : + sdot_returns_double=yes ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) sdot_returns_double=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi if test "$sdot_returns_double" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting workaround for blas float functions returning double" >&5 -$as_echo "$as_me: Setting workaround for blas float functions returning double" >&6;} - $as_echo "#define __PLUMED_BLAS_RETURNS_FLOAT double" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Setting workaround for blas float functions returning double" >&5 +printf "%s\n" "$as_me: Setting workaround for blas float functions returning double" >&6;} + printf "%s\n" "#define __PLUMED_BLAS_RETURNS_FLOAT double" >>confdefs.h if test -n "$lapack_found" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting workaround for lapack float functions returning double" >&5 -$as_echo "$as_me: Setting workaround for lapack float functions returning double" >&6;} - $as_echo "#define __PLUMED_LAPACK_RETURNS_FLOAT double" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Setting workaround for lapack float functions returning double" >&5 +printf "%s\n" "$as_me: Setting workaround for lapack float functions returning double" >&6;} + printf "%s\n" "#define __PLUMED_LAPACK_RETURNS_FLOAT double" >>confdefs.h fi else if test "$sdot_returns_float" = no && test "$sdot_returns_double" = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: There is a problem with your blas implementation" >&5 -$as_echo "$as_me: WARNING: There is a problem with your blas implementation" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: There is a problem with your blas implementation" >&5 +printf "%s\n" "$as_me: WARNING: There is a problem with your blas implementation" >&2;} fi fi @@ -6181,8 +7146,8 @@ fi #### End of compulsory libraries #### #### Optional libraries #### -{ $as_echo "$as_me:${as_lineno-$LINENO}: Now we will check for optional headers and libraries" >&5 -$as_echo "$as_me: Now we will check for optional headers and libraries" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Now we will check for optional headers and libraries" >&5 +printf "%s\n" "$as_me: Now we will check for optional headers and libraries" >&6;} ############################################################# # I add the possibility to completely remove molfile_plugins @@ -6198,520 +7163,165 @@ if test $molfile_plugins = true ; then # Check for molfile_plugins and use internal fallback if not found. TG # We always have molfile, now -$as_echo "#define __PLUMED_HAS_MOLFILE_PLUGINS 1" >>confdefs.h +printf "%s\n" "#define __PLUMED_HAS_MOLFILE_PLUGINS 1" >>confdefs.h if test "$external_molfile_plugins" = true ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + ac_header= ac_cache= +for ac_item in $ac_header_cxx_list do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if test $ac_cache; then + ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +done -else - ac_cv_header_stdc=no -fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h -fi +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi -done - - - found=ko __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS=no - ac_fn_cxx_check_header_mongrel "$LINENO" "libmolfile_plugin.h" "ac_cv_header_libmolfile_plugin_h" "$ac_includes_default" -if test "x$ac_cv_header_libmolfile_plugin_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "libmolfile_plugin.h" "ac_cv_header_libmolfile_plugin_h" "$ac_includes_default" +if test "x$ac_cv_header_libmolfile_plugin_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing molfile_dcdplugin_init" >&5 -$as_echo_n "checking for library containing molfile_dcdplugin_init... " >&6; } -if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing molfile_dcdplugin_init" >&5 +printf %s "checking for library containing molfile_dcdplugin_init... " >&6; } +if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char molfile_dcdplugin_init (); +namespace conftest { + extern "C" int molfile_dcdplugin_init (); +} int -main () +main (void) { -return molfile_dcdplugin_init (); +return conftest::molfile_dcdplugin_init (); ; return 0; } _ACEOF -for ac_lib in '' molfile_plugin; do +for ac_lib in '' molfile_plugin +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_molfile_dcdplugin_init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : + if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : break fi done -if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : +if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : -else - ac_cv_search_molfile_dcdplugin_init=no +else case e in #( + e) ac_cv_search_molfile_dcdplugin_init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_molfile_dcdplugin_init" >&5 -$as_echo "$ac_cv_search_molfile_dcdplugin_init" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_molfile_dcdplugin_init" >&5 +printf "%s\n" "$ac_cv_search_molfile_dcdplugin_init" >&6; } ac_res=$ac_cv_search_molfile_dcdplugin_init -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing molfile_dcdplugin_init" >&5 -$as_echo_n "checking for library containing molfile_dcdplugin_init... " >&6; } -if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing molfile_dcdplugin_init" >&5 +printf %s "checking for library containing molfile_dcdplugin_init... " >&6; } +if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char molfile_dcdplugin_init (); +namespace conftest { + extern "C" int molfile_dcdplugin_init (); +} int -main () +main (void) { -return molfile_dcdplugin_init (); +return conftest::molfile_dcdplugin_init (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_molfile_dcdplugin_init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : + if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : break fi done -if ${ac_cv_search_molfile_dcdplugin_init+:} false; then : +if test ${ac_cv_search_molfile_dcdplugin_init+y} +then : -else - ac_cv_search_molfile_dcdplugin_init=no +else case e in #( + e) ac_cv_search_molfile_dcdplugin_init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_molfile_dcdplugin_init" >&5 -$as_echo "$ac_cv_search_molfile_dcdplugin_init" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_molfile_dcdplugin_init" >&5 +printf "%s\n" "$ac_cv_search_molfile_dcdplugin_init" >&6; } ac_res=$ac_cv_search_molfile_dcdplugin_init -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -6721,21 +7331,20 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS 1" >>confdefs.h __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS" >&2;} fi if test "$__PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS" != yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using internal molfile_plugins, which only support dcd/xtc/trr/trj/crd files" >&5 -$as_echo "$as_me: WARNING: using internal molfile_plugins, which only support dcd/xtc/trr/trj/crd files" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using internal molfile_plugins, which only support dcd/xtc/trr/trj/crd files" >&5 +printf "%s\n" "$as_me: WARNING: using internal molfile_plugins, which only support dcd/xtc/trr/trj/crd files" >&2;} else - $as_echo "#define __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_EXTERNAL_MOLFILE_PLUGINS 1" >>confdefs.h fi fi @@ -6744,43 +7353,44 @@ fi # this is special and is also attached to STATIC_LIBS # this flag should be used also when linking MD engines to allow plumed # to be loaded later -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); +namespace conftest { + extern "C" int dlopen (); +} int -main () +main (void) { -return dlopen (); +return conftest::dlopen (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : STATIC_LIBS="-ldl $STATIC_LIBS" LIBS="-ldl $LIBS" fi @@ -6789,120 +7399,129 @@ fi found=ko __PLUMED_HAS_DLADDR=no - ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 -$as_echo_n "checking for library containing dladdr... " >&6; } -if ${ac_cv_search_dladdr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 +printf %s "checking for library containing dladdr... " >&6; } +if test ${ac_cv_search_dladdr+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dladdr (); +namespace conftest { + extern "C" int dladdr (); +} int -main () +main (void) { -return dladdr (); +return conftest::dladdr (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dladdr=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dladdr+:} false; then : + if test ${ac_cv_search_dladdr+y} +then : break fi done -if ${ac_cv_search_dladdr+:} false; then : +if test ${ac_cv_search_dladdr+y} +then : -else - ac_cv_search_dladdr=no +else case e in #( + e) ac_cv_search_dladdr=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 -$as_echo "$ac_cv_search_dladdr" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 +printf "%s\n" "$ac_cv_search_dladdr" >&6; } ac_res=$ac_cv_search_dladdr -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 -$as_echo_n "checking for library containing dladdr... " >&6; } -if ${ac_cv_search_dladdr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 +printf %s "checking for library containing dladdr... " >&6; } +if test ${ac_cv_search_dladdr+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dladdr (); +namespace conftest { + extern "C" int dladdr (); +} int -main () +main (void) { -return dladdr (); +return conftest::dladdr (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dladdr=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dladdr+:} false; then : + if test ${ac_cv_search_dladdr+y} +then : break fi done -if ${ac_cv_search_dladdr+:} false; then : +if test ${ac_cv_search_dladdr+y} +then : -else - ac_cv_search_dladdr=no +else case e in #( + e) ac_cv_search_dladdr=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 -$as_echo "$ac_cv_search_dladdr" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 +printf "%s\n" "$ac_cv_search_dladdr" >&6; } ac_res=$ac_cv_search_dladdr -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -6912,14 +7531,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_DLADDR 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_DLADDR 1" >>confdefs.h __PLUMED_HAS_DLADDR=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_DLADDR" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_DLADDR" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_DLADDR" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_DLADDR" >&2;} fi @@ -6929,120 +7547,129 @@ if test $mpi = true ; then found=ko __PLUMED_HAS_MPI=no - ac_fn_cxx_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" -if test "x$ac_cv_header_mpi_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" +if test "x$ac_cv_header_mpi_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MPI_Init" >&5 -$as_echo_n "checking for library containing MPI_Init... " >&6; } -if ${ac_cv_search_MPI_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MPI_Init" >&5 +printf %s "checking for library containing MPI_Init... " >&6; } +if test ${ac_cv_search_MPI_Init+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); +namespace conftest { + extern "C" int MPI_Init (); +} int -main () +main (void) { -return MPI_Init (); +return conftest::MPI_Init (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_MPI_Init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_MPI_Init+:} false; then : + if test ${ac_cv_search_MPI_Init+y} +then : break fi done -if ${ac_cv_search_MPI_Init+:} false; then : +if test ${ac_cv_search_MPI_Init+y} +then : -else - ac_cv_search_MPI_Init=no +else case e in #( + e) ac_cv_search_MPI_Init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MPI_Init" >&5 -$as_echo "$ac_cv_search_MPI_Init" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MPI_Init" >&5 +printf "%s\n" "$ac_cv_search_MPI_Init" >&6; } ac_res=$ac_cv_search_MPI_Init -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MPI_Init" >&5 -$as_echo_n "checking for library containing MPI_Init... " >&6; } -if ${ac_cv_search_MPI_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MPI_Init" >&5 +printf %s "checking for library containing MPI_Init... " >&6; } +if test ${ac_cv_search_MPI_Init+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); +namespace conftest { + extern "C" int MPI_Init (); +} int -main () +main (void) { -return MPI_Init (); +return conftest::MPI_Init (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_MPI_Init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_MPI_Init+:} false; then : + if test ${ac_cv_search_MPI_Init+y} +then : break fi done -if ${ac_cv_search_MPI_Init+:} false; then : +if test ${ac_cv_search_MPI_Init+y} +then : -else - ac_cv_search_MPI_Init=no +else case e in #( + e) ac_cv_search_MPI_Init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MPI_Init" >&5 -$as_echo "$ac_cv_search_MPI_Init" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MPI_Init" >&5 +printf "%s\n" "$ac_cv_search_MPI_Init" >&6; } ac_res=$ac_cv_search_MPI_Init -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -7052,14 +7679,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_MPI 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_MPI 1" >>confdefs.h __PLUMED_HAS_MPI=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_MPI" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_MPI" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_MPI" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_MPI" >&2;} fi if test "$__PLUMED_HAS_MPI" = yes; then @@ -7071,76 +7697,89 @@ fi # search for openmp is automatically disabled by autoconf # when configuring with --disable-openmp - - OPENMP_CXXFLAGS= - # Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : +if test -e penmp || test -e mp; then + as_fn_error $? "AC_OPENMP clobbers files named 'mp' and 'penmp'. Aborting configure because one of these files already exists." "$LINENO" 5 +fi +# Check whether --enable-openmp was given. +if test ${enable_openmp+y} +then : enableval=$enable_openmp; fi + OPENMP_CXXFLAGS= if test "$enable_openmp" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to support OpenMP" >&5 -$as_echo_n "checking for $CXX option to support OpenMP... " >&6; } -if ${ac_cv_prog_cxx_openmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to support OpenMP" >&5 +printf %s "checking for $CXX option to support OpenMP... " >&6; } +if test ${ac_cv_prog_cxx_openmp+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_cv_prog_cxx_openmp='not found' + for ac_option in '' -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do + + ac_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $ac_option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _OPENMP - choke me +#error "OpenMP not supported" #endif #include -int main () { return omp_get_num_threads (); } +int main (void) { return omp_get_num_threads (); } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_prog_cxx_openmp='none needed' -else - ac_cv_prog_cxx_openmp='unsupported' - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ - -Popenmp --openmp; do - ac_save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $ac_option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_cxx_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _OPENMP - choke me +#error "OpenMP not supported" #endif #include -int main () { return omp_get_num_threads (); } +int main (void) { return omp_get_num_threads (); } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_prog_cxx_openmp=$ac_option +else case e in #( + e) ac_cv_prog_cxx_openmp='unsupported' ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - CXXFLAGS=$ac_save_CXXFLAGS - if test "$ac_cv_prog_cxx_openmp" != unsupported; then - break - fi - done fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS=$ac_save_CXXFLAGS + + if test "$ac_cv_prog_cxx_openmp" != 'not found'; then + break + fi + done + if test "$ac_cv_prog_cxx_openmp" = 'not found'; then + ac_cv_prog_cxx_openmp='unsupported' + elif test "$ac_cv_prog_cxx_openmp" = ''; then + ac_cv_prog_cxx_openmp='none needed' + fi + rm -f penmp mp ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_openmp" >&5 -$as_echo "$ac_cv_prog_cxx_openmp" >&6; } - case $ac_cv_prog_cxx_openmp in #( - "none needed" | unsupported) - ;; #( - *) - OPENMP_CXXFLAGS=$ac_cv_prog_cxx_openmp ;; - esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_openmp" >&5 +printf "%s\n" "$ac_cv_prog_cxx_openmp" >&6; } + if test "$ac_cv_prog_cxx_openmp" != 'unsupported' && \ + test "$ac_cv_prog_cxx_openmp" != 'none needed'; then + OPENMP_CXXFLAGS="$ac_cv_prog_cxx_openmp" + fi fi if test $asmjit = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether architecture is X86/X64" >&5 -$as_echo_n "checking whether architecture is X86/X64... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether architecture is X86/X64" >&5 +printf %s "checking whether architecture is X86/X64... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7153,28 +7792,30 @@ this_is_not_x86_x64 #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; x86_x64=true -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - x86_x64=false +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + x86_x64=false ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $asmjit = true && test $x86_x64 = false ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: asmjit does not support this architecture, it will be disabled" >&5 -$as_echo "$as_me: WARNING: asmjit does not support this architecture, it will be disabled" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: asmjit does not support this architecture, it will be disabled" >&5 +printf "%s\n" "$as_me: WARNING: asmjit does not support this architecture, it will be disabled" >&2;} asmjit=false fi @@ -7184,115 +7825,123 @@ if test $asmjit = true ; then if test `(uname)` = Linux ; then if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${ac_cv_search_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +printf %s "checking for library containing clock_gettime... " >&6; } +if test ${ac_cv_search_clock_gettime+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); +namespace conftest { + extern "C" int clock_gettime (); +} int -main () +main (void) { -return clock_gettime (); +return conftest::clock_gettime (); ; return 0; } _ACEOF -for ac_lib in '' rt; do +for ac_lib in '' rt +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_clock_gettime=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_clock_gettime+:} false; then : + if test ${ac_cv_search_clock_gettime+y} +then : break fi done -if ${ac_cv_search_clock_gettime+:} false; then : +if test ${ac_cv_search_clock_gettime+y} +then : -else - ac_cv_search_clock_gettime=no +else case e in #( + e) ac_cv_search_clock_gettime=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${ac_cv_search_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +printf %s "checking for library containing clock_gettime... " >&6; } +if test ${ac_cv_search_clock_gettime+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); +namespace conftest { + extern "C" int clock_gettime (); +} int -main () +main (void) { -return clock_gettime (); +return conftest::clock_gettime (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_clock_gettime=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_clock_gettime+:} false; then : + if test ${ac_cv_search_clock_gettime+y} +then : break fi done -if ${ac_cv_search_clock_gettime+:} false; then : +if test ${ac_cv_search_clock_gettime+y} +then : -else - ac_cv_search_clock_gettime=no +else case e in #( + e) ac_cv_search_clock_gettime=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -7303,13 +7952,13 @@ fi found=ok fi if test "$found" = ok ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling embedded asmjit" >&5 -$as_echo "$as_me: Enabling embedded asmjit" >&6;} - $as_echo "#define __PLUMED_HAS_ASMJIT 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling embedded asmjit" >&5 +printf "%s\n" "$as_me: Enabling embedded asmjit" >&6;} + printf "%s\n" "#define __PLUMED_HAS_ASMJIT 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot link clock_gettime on this Linux, asmjit will not be enabled" >&5 -$as_echo "$as_me: WARNING: cannot link clock_gettime on this Linux, asmjit will not be enabled" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot link clock_gettime on this Linux, asmjit will not be enabled" >&5 +printf "%s\n" "$as_me: WARNING: cannot link clock_gettime on this Linux, asmjit will not be enabled" >&2;} fi fi @@ -7317,120 +7966,129 @@ if test $dlopen = true ; then found=ko __PLUMED_HAS_DLOPEN=no - ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if ${ac_cv_search_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${ac_cv_search_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); +namespace conftest { + extern "C" int dlopen (); +} int -main () +main (void) { -return dlopen (); +return conftest::dlopen (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dlopen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dlopen+:} false; then : + if test ${ac_cv_search_dlopen+y} +then : break fi done -if ${ac_cv_search_dlopen+:} false; then : +if test ${ac_cv_search_dlopen+y} +then : -else - ac_cv_search_dlopen=no +else case e in #( + e) ac_cv_search_dlopen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -$as_echo "$ac_cv_search_dlopen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +printf "%s\n" "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if ${ac_cv_search_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${ac_cv_search_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); +namespace conftest { + extern "C" int dlopen (); +} int -main () +main (void) { -return dlopen (); +return conftest::dlopen (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_dlopen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_dlopen+:} false; then : + if test ${ac_cv_search_dlopen+y} +then : break fi done -if ${ac_cv_search_dlopen+:} false; then : +if test ${ac_cv_search_dlopen+y} +then : -else - ac_cv_search_dlopen=no +else case e in #( + e) ac_cv_search_dlopen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -$as_echo "$ac_cv_search_dlopen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +printf "%s\n" "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -7440,14 +8098,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_DLOPEN 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_DLOPEN 1" >>confdefs.h __PLUMED_HAS_DLOPEN=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_DLOPEN" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_DLOPEN" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_DLOPEN" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_DLOPEN" >&2;} fi fi @@ -7476,8 +8133,8 @@ if test $rtld_default = true ; then fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT without extra libs" >&5 -$as_echo_n "checking RTLD_DEFAULT without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT without extra libs" >&5 +printf %s "checking RTLD_DEFAULT without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7490,22 +8147,24 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT with $all_LIBS" >&5 -$as_echo_n "checking RTLD_DEFAULT with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT with $all_LIBS" >&5 +printf %s "checking RTLD_DEFAULT with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7519,22 +8178,24 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT with -l$testlib" >&5 -$as_echo_n "checking RTLD_DEFAULT with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RTLD_DEFAULT with -l$testlib" >&5 +printf %s "checking RTLD_DEFAULT with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7548,16 +8209,18 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -7568,12 +8231,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_RTLD_DEFAULT 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_RTLD_DEFAULT 1" >>confdefs.h __PLUMED_HAS_RTLD_DEFAULT=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_RTLD_DEFAULT" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_RTLD_DEFAULT" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_RTLD_DEFAULT" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_RTLD_DEFAULT" >&2;} LIBS="$save_LIBS" fi @@ -7603,8 +8266,8 @@ if test $subprocess = true ; then fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking subprocess without extra libs" >&5 -$as_echo_n "checking subprocess without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking subprocess without extra libs" >&5 +printf %s "checking subprocess without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7640,22 +8303,24 @@ main () _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking subprocess with $all_LIBS" >&5 -$as_echo_n "checking subprocess with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking subprocess with $all_LIBS" >&5 +printf %s "checking subprocess with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7692,22 +8357,24 @@ main () _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking subprocess with -l$testlib" >&5 -$as_echo_n "checking subprocess with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking subprocess with -l$testlib" >&5 +printf %s "checking subprocess with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7744,16 +8411,18 @@ main () _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -7764,12 +8433,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_SUBPROCESS 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_SUBPROCESS 1" >>confdefs.h __PLUMED_HAS_SUBPROCESS=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_SUBPROCESS" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_SUBPROCESS" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_SUBPROCESS" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_SUBPROCESS" >&2;} LIBS="$save_LIBS" fi @@ -7779,120 +8448,129 @@ if test $popen = true ; then found=ko __PLUMED_HAS_POPEN=no - ac_fn_cxx_check_header_mongrel "$LINENO" "cstdio" "ac_cv_header_cstdio" "$ac_includes_default" -if test "x$ac_cv_header_cstdio" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "cstdio" "ac_cv_header_cstdio" "$ac_includes_default" +if test "x$ac_cv_header_cstdio" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing popen" >&5 -$as_echo_n "checking for library containing popen... " >&6; } -if ${ac_cv_search_popen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing popen" >&5 +printf %s "checking for library containing popen... " >&6; } +if test ${ac_cv_search_popen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char popen (); +namespace conftest { + extern "C" int popen (); +} int -main () +main (void) { -return popen (); +return conftest::popen (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_popen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_popen+:} false; then : + if test ${ac_cv_search_popen+y} +then : break fi done -if ${ac_cv_search_popen+:} false; then : +if test ${ac_cv_search_popen+y} +then : -else - ac_cv_search_popen=no +else case e in #( + e) ac_cv_search_popen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_popen" >&5 -$as_echo "$ac_cv_search_popen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_popen" >&5 +printf "%s\n" "$ac_cv_search_popen" >&6; } ac_res=$ac_cv_search_popen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing popen" >&5 -$as_echo_n "checking for library containing popen... " >&6; } -if ${ac_cv_search_popen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing popen" >&5 +printf %s "checking for library containing popen... " >&6; } +if test ${ac_cv_search_popen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char popen (); +namespace conftest { + extern "C" int popen (); +} int -main () +main (void) { -return popen (); +return conftest::popen (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_popen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_popen+:} false; then : + if test ${ac_cv_search_popen+y} +then : break fi done -if ${ac_cv_search_popen+:} false; then : +if test ${ac_cv_search_popen+y} +then : -else - ac_cv_search_popen=no +else case e in #( + e) ac_cv_search_popen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_popen" >&5 -$as_echo "$ac_cv_search_popen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_popen" >&5 +printf "%s\n" "$ac_cv_search_popen" >&6; } ac_res=$ac_cv_search_popen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -7902,14 +8580,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_POPEN 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_POPEN 1" >>confdefs.h __PLUMED_HAS_POPEN=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_POPEN" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_POPEN" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_POPEN" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_POPEN" >&2;} fi fi @@ -7918,120 +8595,129 @@ if test $execinfo = true ; then found=ko __PLUMED_HAS_EXECINFO=no - ac_fn_cxx_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_execinfo_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 -$as_echo_n "checking for library containing backtrace... " >&6; } -if ${ac_cv_search_backtrace+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +printf %s "checking for library containing backtrace... " >&6; } +if test ${ac_cv_search_backtrace+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char backtrace (); +namespace conftest { + extern "C" int backtrace (); +} int -main () +main (void) { -return backtrace (); +return conftest::backtrace (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_backtrace=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_backtrace+:} false; then : + if test ${ac_cv_search_backtrace+y} +then : break fi done -if ${ac_cv_search_backtrace+:} false; then : +if test ${ac_cv_search_backtrace+y} +then : -else - ac_cv_search_backtrace=no +else case e in #( + e) ac_cv_search_backtrace=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 -$as_echo "$ac_cv_search_backtrace" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +printf "%s\n" "$ac_cv_search_backtrace" >&6; } ac_res=$ac_cv_search_backtrace -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 -$as_echo_n "checking for library containing backtrace... " >&6; } -if ${ac_cv_search_backtrace+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +printf %s "checking for library containing backtrace... " >&6; } +if test ${ac_cv_search_backtrace+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char backtrace (); +namespace conftest { + extern "C" int backtrace (); +} int -main () +main (void) { -return backtrace (); +return conftest::backtrace (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_backtrace=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_backtrace+:} false; then : + if test ${ac_cv_search_backtrace+y} +then : break fi done -if ${ac_cv_search_backtrace+:} false; then : +if test ${ac_cv_search_backtrace+y} +then : -else - ac_cv_search_backtrace=no +else case e in #( + e) ac_cv_search_backtrace=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 -$as_echo "$ac_cv_search_backtrace" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +printf "%s\n" "$ac_cv_search_backtrace" >&6; } ac_res=$ac_cv_search_backtrace -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -8041,14 +8727,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_EXECINFO 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_EXECINFO 1" >>confdefs.h __PLUMED_HAS_EXECINFO=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_EXECINFO" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_EXECINFO" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_EXECINFO" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_EXECINFO" >&2;} fi fi @@ -8056,120 +8741,129 @@ if test $zlib = true ; then found=ko __PLUMED_HAS_ZLIB=no - ac_fn_cxx_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gzopen" >&5 -$as_echo_n "checking for library containing gzopen... " >&6; } -if ${ac_cv_search_gzopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gzopen" >&5 +printf %s "checking for library containing gzopen... " >&6; } +if test ${ac_cv_search_gzopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gzopen (); +namespace conftest { + extern "C" int gzopen (); +} int -main () +main (void) { -return gzopen (); +return conftest::gzopen (); ; return 0; } _ACEOF -for ac_lib in '' z; do +for ac_lib in '' z +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gzopen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gzopen+:} false; then : + if test ${ac_cv_search_gzopen+y} +then : break fi done -if ${ac_cv_search_gzopen+:} false; then : +if test ${ac_cv_search_gzopen+y} +then : -else - ac_cv_search_gzopen=no +else case e in #( + e) ac_cv_search_gzopen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzopen" >&5 -$as_echo "$ac_cv_search_gzopen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzopen" >&5 +printf "%s\n" "$ac_cv_search_gzopen" >&6; } ac_res=$ac_cv_search_gzopen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gzopen" >&5 -$as_echo_n "checking for library containing gzopen... " >&6; } -if ${ac_cv_search_gzopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gzopen" >&5 +printf %s "checking for library containing gzopen... " >&6; } +if test ${ac_cv_search_gzopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gzopen (); +namespace conftest { + extern "C" int gzopen (); +} int -main () +main (void) { -return gzopen (); +return conftest::gzopen (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gzopen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gzopen+:} false; then : + if test ${ac_cv_search_gzopen+y} +then : break fi done -if ${ac_cv_search_gzopen+:} false; then : +if test ${ac_cv_search_gzopen+y} +then : -else - ac_cv_search_gzopen=no +else case e in #( + e) ac_cv_search_gzopen=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzopen" >&5 -$as_echo "$ac_cv_search_gzopen" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzopen" >&5 +printf "%s\n" "$ac_cv_search_gzopen" >&6; } ac_res=$ac_cv_search_gzopen -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -8179,14 +8873,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ZLIB 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ZLIB 1" >>confdefs.h __PLUMED_HAS_ZLIB=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ZLIB" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ZLIB" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ZLIB" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ZLIB" >&2;} fi fi @@ -8195,174 +8888,187 @@ if test $gsl = true ; then found=ko if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cblas_dgemv" >&5 -$as_echo_n "checking for library containing cblas_dgemv... " >&6; } -if ${ac_cv_search_cblas_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cblas_dgemv" >&5 +printf %s "checking for library containing cblas_dgemv... " >&6; } +if test ${ac_cv_search_cblas_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cblas_dgemv (); +namespace conftest { + extern "C" int cblas_dgemv (); +} int -main () +main (void) { -return cblas_dgemv (); +return conftest::cblas_dgemv (); ; return 0; } _ACEOF -for ac_lib in '' gslcblas; do +for ac_lib in '' gslcblas +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_cblas_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_cblas_dgemv+:} false; then : + if test ${ac_cv_search_cblas_dgemv+y} +then : break fi done -if ${ac_cv_search_cblas_dgemv+:} false; then : +if test ${ac_cv_search_cblas_dgemv+y} +then : -else - ac_cv_search_cblas_dgemv=no +else case e in #( + e) ac_cv_search_cblas_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cblas_dgemv" >&5 -$as_echo "$ac_cv_search_cblas_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cblas_dgemv" >&5 +printf "%s\n" "$ac_cv_search_cblas_dgemv" >&6; } ac_res=$ac_cv_search_cblas_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_fn_cxx_check_header_mongrel "$LINENO" "gsl/gsl_vector.h" "ac_cv_header_gsl_gsl_vector_h" "$ac_includes_default" -if test "x$ac_cv_header_gsl_gsl_vector_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "gsl/gsl_vector.h" "ac_cv_header_gsl_gsl_vector_h" "$ac_includes_default" +if test "x$ac_cv_header_gsl_gsl_vector_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 -$as_echo_n "checking for library containing gsl_vector_alloc... " >&6; } -if ${ac_cv_search_gsl_vector_alloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 +printf %s "checking for library containing gsl_vector_alloc... " >&6; } +if test ${ac_cv_search_gsl_vector_alloc+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gsl_vector_alloc (); +namespace conftest { + extern "C" int gsl_vector_alloc (); +} int -main () +main (void) { -return gsl_vector_alloc (); +return conftest::gsl_vector_alloc (); ; return 0; } _ACEOF -for ac_lib in '' gsl; do +for ac_lib in '' gsl +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gsl_vector_alloc=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gsl_vector_alloc+:} false; then : + if test ${ac_cv_search_gsl_vector_alloc+y} +then : break fi done -if ${ac_cv_search_gsl_vector_alloc+:} false; then : +if test ${ac_cv_search_gsl_vector_alloc+y} +then : -else - ac_cv_search_gsl_vector_alloc=no +else case e in #( + e) ac_cv_search_gsl_vector_alloc=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 -$as_echo "$ac_cv_search_gsl_vector_alloc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 +printf "%s\n" "$ac_cv_search_gsl_vector_alloc" >&6; } ac_res=$ac_cv_search_gsl_vector_alloc -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 -$as_echo_n "checking for library containing gsl_vector_alloc... " >&6; } -if ${ac_cv_search_gsl_vector_alloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 +printf %s "checking for library containing gsl_vector_alloc... " >&6; } +if test ${ac_cv_search_gsl_vector_alloc+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gsl_vector_alloc (); +namespace conftest { + extern "C" int gsl_vector_alloc (); +} int -main () +main (void) { -return gsl_vector_alloc (); +return conftest::gsl_vector_alloc (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gsl_vector_alloc=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gsl_vector_alloc+:} false; then : + if test ${ac_cv_search_gsl_vector_alloc+y} +then : break fi done -if ${ac_cv_search_gsl_vector_alloc+:} false; then : +if test ${ac_cv_search_gsl_vector_alloc+y} +then : -else - ac_cv_search_gsl_vector_alloc=no +else case e in #( + e) ac_cv_search_gsl_vector_alloc=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 -$as_echo "$ac_cv_search_gsl_vector_alloc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 +printf "%s\n" "$ac_cv_search_gsl_vector_alloc" >&6; } ac_res=$ac_cv_search_gsl_vector_alloc -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -8373,178 +9079,190 @@ fi fi - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cblas_dgemv" >&5 -$as_echo_n "checking for library containing cblas_dgemv... " >&6; } -if ${ac_cv_search_cblas_dgemv+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cblas_dgemv" >&5 +printf %s "checking for library containing cblas_dgemv... " >&6; } +if test ${ac_cv_search_cblas_dgemv+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cblas_dgemv (); +namespace conftest { + extern "C" int cblas_dgemv (); +} int -main () +main (void) { -return cblas_dgemv (); +return conftest::cblas_dgemv (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_cblas_dgemv=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_cblas_dgemv+:} false; then : + if test ${ac_cv_search_cblas_dgemv+y} +then : break fi done -if ${ac_cv_search_cblas_dgemv+:} false; then : +if test ${ac_cv_search_cblas_dgemv+y} +then : -else - ac_cv_search_cblas_dgemv=no +else case e in #( + e) ac_cv_search_cblas_dgemv=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cblas_dgemv" >&5 -$as_echo "$ac_cv_search_cblas_dgemv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cblas_dgemv" >&5 +printf "%s\n" "$ac_cv_search_cblas_dgemv" >&6; } ac_res=$ac_cv_search_cblas_dgemv -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_fn_cxx_check_header_mongrel "$LINENO" "gsl/gsl_vector.h" "ac_cv_header_gsl_gsl_vector_h" "$ac_includes_default" -if test "x$ac_cv_header_gsl_gsl_vector_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "gsl/gsl_vector.h" "ac_cv_header_gsl_gsl_vector_h" "$ac_includes_default" +if test "x$ac_cv_header_gsl_gsl_vector_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 -$as_echo_n "checking for library containing gsl_vector_alloc... " >&6; } -if ${ac_cv_search_gsl_vector_alloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 +printf %s "checking for library containing gsl_vector_alloc... " >&6; } +if test ${ac_cv_search_gsl_vector_alloc+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gsl_vector_alloc (); +namespace conftest { + extern "C" int gsl_vector_alloc (); +} int -main () +main (void) { -return gsl_vector_alloc (); +return conftest::gsl_vector_alloc (); ; return 0; } _ACEOF -for ac_lib in '' gsl; do +for ac_lib in '' gsl +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gsl_vector_alloc=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gsl_vector_alloc+:} false; then : + if test ${ac_cv_search_gsl_vector_alloc+y} +then : break fi done -if ${ac_cv_search_gsl_vector_alloc+:} false; then : +if test ${ac_cv_search_gsl_vector_alloc+y} +then : -else - ac_cv_search_gsl_vector_alloc=no +else case e in #( + e) ac_cv_search_gsl_vector_alloc=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 -$as_echo "$ac_cv_search_gsl_vector_alloc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 +printf "%s\n" "$ac_cv_search_gsl_vector_alloc" >&6; } ac_res=$ac_cv_search_gsl_vector_alloc -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 -$as_echo_n "checking for library containing gsl_vector_alloc... " >&6; } -if ${ac_cv_search_gsl_vector_alloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gsl_vector_alloc" >&5 +printf %s "checking for library containing gsl_vector_alloc... " >&6; } +if test ${ac_cv_search_gsl_vector_alloc+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gsl_vector_alloc (); +namespace conftest { + extern "C" int gsl_vector_alloc (); +} int -main () +main (void) { -return gsl_vector_alloc (); +return conftest::gsl_vector_alloc (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_gsl_vector_alloc=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gsl_vector_alloc+:} false; then : + if test ${ac_cv_search_gsl_vector_alloc+y} +then : break fi done -if ${ac_cv_search_gsl_vector_alloc+:} false; then : +if test ${ac_cv_search_gsl_vector_alloc+y} +then : -else - ac_cv_search_gsl_vector_alloc=no +else case e in #( + e) ac_cv_search_gsl_vector_alloc=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 -$as_echo "$ac_cv_search_gsl_vector_alloc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsl_vector_alloc" >&5 +printf "%s\n" "$ac_cv_search_gsl_vector_alloc" >&6; } ac_res=$ac_cv_search_gsl_vector_alloc -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -8555,17 +9273,16 @@ fi fi - fi fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_GSL 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_GSL 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_GSL" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_GSL" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_GSL" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_GSL" >&2;} fi fi @@ -8593,8 +9310,8 @@ if test $boost_graph = true ; then fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost graph without extra libs" >&5 -$as_echo_n "checking boost graph without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost graph without extra libs" >&5 +printf %s "checking boost graph without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8609,22 +9326,24 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost graph with $all_LIBS" >&5 -$as_echo_n "checking boost graph with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost graph with $all_LIBS" >&5 +printf %s "checking boost graph with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8640,22 +9359,24 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost graph with -l$testlib" >&5 -$as_echo_n "checking boost graph with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost graph with -l$testlib" >&5 +printf %s "checking boost graph with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8671,16 +9392,18 @@ main () } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -8691,12 +9414,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_BOOST_GRAPH 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_BOOST_GRAPH 1" >>confdefs.h __PLUMED_HAS_BOOST_GRAPH=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_BOOST_GRAPH" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_BOOST_GRAPH" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_BOOST_GRAPH" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_BOOST_GRAPH" >&2;} LIBS="$save_LIBS" fi @@ -8726,8 +9449,8 @@ if test $boost_serialization = true ; then fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost serialization without extra libs" >&5 -$as_echo_n "checking boost serialization without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost serialization without extra libs" >&5 +printf %s "checking boost serialization without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8740,22 +9463,24 @@ int main() { } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost serialization with $all_LIBS" >&5 -$as_echo_n "checking boost serialization with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost serialization with $all_LIBS" >&5 +printf %s "checking boost serialization with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8769,22 +9494,24 @@ int main() { } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking boost serialization with -l$testlib" >&5 -$as_echo_n "checking boost serialization with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking boost serialization with -l$testlib" >&5 +printf %s "checking boost serialization with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8798,16 +9525,18 @@ int main() { } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -8818,12 +9547,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_BOOST_SERIALIZATION 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_BOOST_SERIALIZATION 1" >>confdefs.h __PLUMED_HAS_BOOST_SERIALIZATION=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_BOOST_SERIALIZATION" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_BOOST_SERIALIZATION" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_BOOST_SERIALIZATION" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_BOOST_SERIALIZATION" >&2;} LIBS="$save_LIBS" fi @@ -8834,120 +9563,129 @@ if test $fftw = true ; then found=ko __PLUMED_HAS_FFTW=no - ac_fn_cxx_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default" -if test "x$ac_cv_header_fftw3_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default" +if test "x$ac_cv_header_fftw3_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fftw_execute" >&5 -$as_echo_n "checking for library containing fftw_execute... " >&6; } -if ${ac_cv_search_fftw_execute+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fftw_execute" >&5 +printf %s "checking for library containing fftw_execute... " >&6; } +if test ${ac_cv_search_fftw_execute+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fftw_execute (); +namespace conftest { + extern "C" int fftw_execute (); +} int -main () +main (void) { -return fftw_execute (); +return conftest::fftw_execute (); ; return 0; } _ACEOF -for ac_lib in '' fftw3; do +for ac_lib in '' fftw3 +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_fftw_execute=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_fftw_execute+:} false; then : + if test ${ac_cv_search_fftw_execute+y} +then : break fi done -if ${ac_cv_search_fftw_execute+:} false; then : +if test ${ac_cv_search_fftw_execute+y} +then : -else - ac_cv_search_fftw_execute=no +else case e in #( + e) ac_cv_search_fftw_execute=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fftw_execute" >&5 -$as_echo "$ac_cv_search_fftw_execute" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fftw_execute" >&5 +printf "%s\n" "$ac_cv_search_fftw_execute" >&6; } ac_res=$ac_cv_search_fftw_execute -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fftw_execute" >&5 -$as_echo_n "checking for library containing fftw_execute... " >&6; } -if ${ac_cv_search_fftw_execute+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fftw_execute" >&5 +printf %s "checking for library containing fftw_execute... " >&6; } +if test ${ac_cv_search_fftw_execute+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fftw_execute (); +namespace conftest { + extern "C" int fftw_execute (); +} int -main () +main (void) { -return fftw_execute (); +return conftest::fftw_execute (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_fftw_execute=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_fftw_execute+:} false; then : + if test ${ac_cv_search_fftw_execute+y} +then : break fi done -if ${ac_cv_search_fftw_execute+:} false; then : +if test ${ac_cv_search_fftw_execute+y} +then : -else - ac_cv_search_fftw_execute=no +else case e in #( + e) ac_cv_search_fftw_execute=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fftw_execute" >&5 -$as_echo "$ac_cv_search_fftw_execute" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fftw_execute" >&5 +printf "%s\n" "$ac_cv_search_fftw_execute" >&6; } ac_res=$ac_cv_search_fftw_execute -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -8957,14 +9695,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_FFTW 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_FFTW 1" >>confdefs.h __PLUMED_HAS_FFTW=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_FFTW" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_FFTW" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_FFTW" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_FFTW" >&2;} fi fi @@ -8987,38 +9724,44 @@ if test -z "$PYTHON_BIN" ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON_BIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON_BIN"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PYTHON_BIN+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$PYTHON_BIN"; then ac_cv_prog_PYTHON_BIN="$PYTHON_BIN" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_BIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi PYTHON_BIN=$ac_cv_prog_PYTHON_BIN if test -n "$PYTHON_BIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BIN" >&5 -$as_echo "$PYTHON_BIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BIN" >&5 +printf "%s\n" "$PYTHON_BIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9027,11 +9770,11 @@ done fi if test -n "$PYTHON_BIN" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Python executable is $PYTHON_BIN" >&5 -$as_echo "$as_me: Python executable is $PYTHON_BIN" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Python executable is $PYTHON_BIN" >&5 +printf "%s\n" "$as_me: Python executable is $PYTHON_BIN" >&6;} if test $pycv = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pycv: support for required python modules (python3, pybind11, numpy)" >&5 -$as_echo_n "checking pycv: support for required python modules (python3, pybind11, numpy)... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pycv: support for required python modules (python3, pybind11, numpy)" >&5 +printf %s "checking pycv: support for required python modules (python3, pybind11, numpy)... " >&6; } testimport=" import numpy import pybind11 @@ -9043,35 +9786,35 @@ import pybind11 python_config=python${pyver}-config if ${python_config} --ldflags --embed 1>/dev/null 2>/dev/null ;then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } PYBIND11_CFLAGS="$($PYTHON_BIN -m pybind11 --includes) -fvisibility=hidden" PYTHON_CFLAGS=$(${python_config} --cflags --embed) PYTHON_LDFLAGS=$(${python_config} --ldflags --embed) #TODO: conda_fixup PLUMED_CAN_PYCV=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 -$as_echo "$as_me: WARNING: cannot enable pycv" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"PyCV needs python to be embeddable, please rebuild python\"" >&5 -$as_echo "$as_me: WARNING: \"PyCV needs python to be embeddable, please rebuild python\"" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable pycv" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"PyCV needs python to be embeddable, please rebuild python\"" >&5 +printf "%s\n" "$as_me: WARNING: \"PyCV needs python to be embeddable, please rebuild python\"" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 -$as_echo "$as_me: WARNING: cannot enable pycv" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable pycv" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 -$as_echo "$as_me: WARNING: cannot enable pycv" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable pycv" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable pycv" >&2;} fi if test $python = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python wrapper: support for required python modules (python3, setuptools, cython)" >&5 -$as_echo_n "checking python wrapper: support for required python modules (python3, setuptools, cython)... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking python wrapper: support for required python modules (python3, setuptools, cython)" >&5 +printf %s "checking python wrapper: support for required python modules (python3, setuptools, cython)... " >&6; } testimport=" from setuptools import setup from setuptools import Extension @@ -9081,20 +9824,20 @@ if sys.version_info < (3,): raise ImportError('PLUMED>= 2.6 only supports Python 3') " if echo "$testimport" | "$PYTHON_BIN" 1>/dev/null 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define __PLUMED_HAS_PYTHON 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + printf "%s\n" "#define __PLUMED_HAS_PYTHON 1" >>confdefs.h CYTHON_FOUND=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable python interface" >&5 -$as_echo "$as_me: WARNING: cannot enable python interface" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable python interface" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable python interface" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable python interface" >&5 -$as_echo "$as_me: WARNING: cannot enable python interface" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable python interface" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable python interface" >&2;} fi fi @@ -9107,120 +9850,129 @@ if test "$af_ocl" = true ; then found=ko __PLUMED_HAS_ARRAYFIRE=no - ac_fn_cxx_check_header_mongrel "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" -if test "x$ac_cv_header_arrayfire_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" +if test "x$ac_cv_header_arrayfire_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' afopencl; do +for ac_lib in '' afopencl +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -9230,133 +9982,141 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h __PLUMED_HAS_ARRAYFIRE=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} fi found=ko __PLUMED_HAS_ARRAYFIRE_OCL=no - ac_fn_cxx_check_header_mongrel "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" -if test "x$ac_cv_header_arrayfire_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" +if test "x$ac_cv_header_arrayfire_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' afopencl; do +for ac_lib in '' afopencl +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -9366,14 +10126,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ARRAYFIRE_OCL 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ARRAYFIRE_OCL 1" >>confdefs.h __PLUMED_HAS_ARRAYFIRE_OCL=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_OCL" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_OCL" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_OCL" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_OCL" >&2;} fi fi @@ -9381,120 +10140,129 @@ if test "$af_cuda" = true ; then found=ko __PLUMED_HAS_ARRAYFIRE=no - ac_fn_cxx_check_header_mongrel "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" -if test "x$ac_cv_header_arrayfire_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" +if test "x$ac_cv_header_arrayfire_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' afcuda; do +for ac_lib in '' afcuda +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -9504,133 +10272,141 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h __PLUMED_HAS_ARRAYFIRE=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} fi found=ko __PLUMED_HAS_ARRAYFIRE_CUDA=no - ac_fn_cxx_check_header_mongrel "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" -if test "x$ac_cv_header_arrayfire_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" +if test "x$ac_cv_header_arrayfire_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' afcuda; do +for ac_lib in '' afcuda +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -9640,14 +10416,13 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ARRAYFIRE_CUDA 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ARRAYFIRE_CUDA 1" >>confdefs.h __PLUMED_HAS_ARRAYFIRE_CUDA=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_CUDA" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_CUDA" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_CUDA" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE_CUDA" >&2;} fi fi @@ -9655,120 +10430,129 @@ if test "$af_cpu" = true ; then found=ko __PLUMED_HAS_ARRAYFIRE=no - ac_fn_cxx_check_header_mongrel "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" -if test "x$ac_cv_header_arrayfire_h" = xyes; then : + ac_fn_cxx_check_header_compile "$LINENO" "arrayfire.h" "ac_cv_header_arrayfire_h" "$ac_includes_default" +if test "x$ac_cv_header_arrayfire_h" = xyes +then : if test "${libsearch}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' afcpu; do +for ac_lib in '' afcpu +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 -$as_echo_n "checking for library containing af_is_double... " >&6; } -if ${ac_cv_search_af_is_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing af_is_double" >&5 +printf %s "checking for library containing af_is_double... " >&6; } +if test ${ac_cv_search_af_is_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char af_is_double (); +namespace conftest { + extern "C" int af_is_double (); +} int -main () +main (void) { -return af_is_double (); +return conftest::af_is_double (); ; return 0; } _ACEOF -for ac_lib in '' ; do +for ac_lib in '' +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO"; then : + if ac_fn_cxx_try_link "$LINENO" +then : ac_cv_search_af_is_double=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_af_is_double+:} false; then : + if test ${ac_cv_search_af_is_double+y} +then : break fi done -if ${ac_cv_search_af_is_double+:} false; then : +if test ${ac_cv_search_af_is_double+y} +then : -else - ac_cv_search_af_is_double=no +else case e in #( + e) ac_cv_search_af_is_double=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 -$as_echo "$ac_cv_search_af_is_double" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_af_is_double" >&5 +printf "%s\n" "$ac_cv_search_af_is_double" >&6; } ac_res=$ac_cv_search_af_is_double -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" found=ok fi @@ -9778,66 +10562,74 @@ fi fi - if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_ARRAYFIRE 1" >>confdefs.h __PLUMED_HAS_ARRAYFIRE=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_ARRAYFIRE" >&2;} fi fi +# metatensor requires libtorch +if test $metatensor = true ; then + libtorch=true; +fi + #added by luigibonati if test $libtorch = true ; then # disable as-needed in linking libraries (both static and shared) save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wl,--no-as-needed" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wl,--no-as-needed" >&5 -$as_echo_n "checking whether $CXX accepts -Wl,--no-as-needed... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -Wl,--no-as-needed" >&5 +printf %s "checking whether $CXX accepts -Wl,--no-as-needed... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 -$as_echo "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not linking" >&5 +printf "%s\n" "not linking" >&6; }; CXXFLAGS="$save_CXXFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; CXXFLAGS="$save_CXXFLAGS" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext LDSHARED="$LDSHARED -Wl,--no-as-needed " @@ -9866,12 +10658,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda without extra libs" >&5 -$as_echo_n "checking libtorch_cuda without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda without extra libs" >&5 +printf %s "checking libtorch_cuda without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include #include int main() { @@ -9884,27 +10675,28 @@ $as_echo_n "checking libtorch_cuda without extra libs... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda with $all_LIBS" >&5 -$as_echo_n "checking libtorch_cuda with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda with $all_LIBS" >&5 +printf %s "checking libtorch_cuda with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include #include int main() { @@ -9917,27 +10709,28 @@ $as_echo_n "checking libtorch_cuda with $all_LIBS... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda with -l$testlib" >&5 -$as_echo_n "checking libtorch_cuda with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cuda with -l$testlib" >&5 +printf %s "checking libtorch_cuda with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include #include int main() { @@ -9950,16 +10743,18 @@ $as_echo_n "checking libtorch_cuda with -l$testlib... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -9970,12 +10765,12 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_LIBTORCH 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_LIBTORCH 1" >>confdefs.h __PLUMED_HAS_LIBTORCH=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&2;} LIBS="$save_LIBS" fi @@ -10006,12 +10801,11 @@ $as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&2;} fi # check without libraries - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu without extra libs" >&5 -$as_echo_n "checking libtorch_cpu without extra libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu without extra libs" >&5 +printf %s "checking libtorch_cpu without extra libs... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include int main() { torch::Tensor tensor = torch::rand({2, 3}); @@ -10020,27 +10814,28 @@ $as_echo_n "checking libtorch_cpu without extra libs... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$found" = "ko" ; then if test "$multiple" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu with $all_LIBS" >&5 -$as_echo_n "checking libtorch_cpu with $all_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu with $all_LIBS" >&5 +printf %s "checking libtorch_cpu with $all_LIBS... " >&6; } LIBS="$all_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include int main() { torch::Tensor tensor = torch::rand({2, 3}); @@ -10049,27 +10844,28 @@ $as_echo_n "checking libtorch_cpu with $all_LIBS... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else for testlib in $testlibs do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu with -l$testlib" >&5 -$as_echo_n "checking libtorch_cpu with -l$testlib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libtorch_cpu with -l$testlib" >&5 +printf %s "checking libtorch_cpu with -l$testlib... " >&6; } LIBS="-l$testlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include #include int main() { torch::Tensor tensor = torch::rand({2, 3}); @@ -10078,16 +10874,18 @@ $as_echo_n "checking libtorch_cpu with -l$testlib... " >&6; } } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : found=ok - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $found = ok ; then break @@ -10098,23 +10896,151 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test $found = ok ; then - $as_echo "#define __PLUMED_HAS_LIBTORCH 1" >>confdefs.h + printf "%s\n" "#define __PLUMED_HAS_LIBTORCH 1" >>confdefs.h __PLUMED_HAS_LIBTORCH=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&5 -$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_LIBTORCH" >&2;} LIBS="$save_LIBS" fi fi fi +if test $metatensor = true ; then + # find metatensor and metatensor_torch + + found=ko + __PLUMED_HAS_METATENSOR=no + if test "${libsearch}" = true ; then + testlibs="metatensor metatensor_torch" + else + testlibs="" + fi + save_LIBS="$LIBS" + + # check if multiple libraries are required simultaneously + multiple="no" + if test "true" = "true"; then + multiple="yes" + all_LIBS="" + for testlib in $testlibs; + do + all_LIBS="$all_LIBS -l$testlib" + done + testlibs=" " # to check only without libraries, and later with all together + fi + + # check without libraries + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking metatensor without extra libs" >&5 +printf %s "checking metatensor without extra libs... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main() { + metatensor_torch::version(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + found=ok + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + if test "$found" = "ko" ; then + if test "$multiple" = "yes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking metatensor with $all_LIBS" >&5 +printf %s "checking metatensor with $all_LIBS... " >&6; } + LIBS="$all_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main() { + metatensor_torch::version(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + found=ok + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + else + for testlib in $testlibs + do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking metatensor with -l$testlib" >&5 +printf %s "checking metatensor with -l$testlib... " >&6; } + LIBS="-l$testlib $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main() { + metatensor_torch::version(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + found=ok + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test $found = ok ; then + break + fi + LIBS="$save_LIBS" + done + fi + fi + + if test $found = ok ; then + printf "%s\n" "#define __PLUMED_HAS_METATENSOR 1" >>confdefs.h + + __PLUMED_HAS_METATENSOR=yes + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable __PLUMED_HAS_METATENSOR" >&5 +printf "%s\n" "$as_me: WARNING: cannot enable __PLUMED_HAS_METATENSOR" >&2;} + LIBS="$save_LIBS" + fi + +fi + # in non-debug mode, add -DNDEBUG if test "$debug" = false ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Release mode, adding -DNDEBUG" >&5 -$as_echo "$as_me: Release mode, adding -DNDEBUG" >&6;} - $as_echo "#define NDEBUG 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Release mode, adding -DNDEBUG" >&5 +printf "%s\n" "$as_me: Release mode, adding -DNDEBUG" >&6;} + printf "%s\n" "#define NDEBUG 1" >>confdefs.h fi @@ -10123,16 +11049,16 @@ fi # also take note that we are using this to relax `make nmcheck` use_debug_glibcxx=no if test "$debug_glibcxx" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Check boundaries, adding -D_GLIBCXX_DEBUG" >&5 -$as_echo "$as_me: Check boundaries, adding -D_GLIBCXX_DEBUG" >&6;} - $as_echo "#define _GLIBCXX_DEBUG 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Check boundaries, adding -D_GLIBCXX_DEBUG" >&5 +printf "%s\n" "$as_me: Check boundaries, adding -D_GLIBCXX_DEBUG" >&6;} + printf "%s\n" "#define _GLIBCXX_DEBUG 1" >>confdefs.h use_debug_glibcxx=yes fi # this is necessary in many MPI implementations # I leave it by default, since it seems harmless -$as_echo "#define _REENTRANT 1" >>confdefs.h +printf "%s\n" "#define _REENTRANT 1" >>confdefs.h #### Options for dynamic library to work properly #### @@ -10147,112 +11073,116 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h if test "$shared" = true ; then case `(uname)` in (Darwin) - { $as_echo "$as_me:${as_lineno-$LINENO}: *** Special settings for dynamic libraries on OSX ***" >&5 -$as_echo "$as_me: *** Special settings for dynamic libraries on OSX ***" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic library extension is 'dylib'" >&5 -$as_echo "$as_me: Dynamic library extension is 'dylib'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: LDSHARED needs special flags" >&5 -$as_echo "$as_me: LDSHARED needs special flags" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: *** Special settings for dynamic libraries on OSX ***" >&5 +printf "%s\n" "$as_me: *** Special settings for dynamic libraries on OSX ***" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic library extension is 'dylib'" >&5 +printf "%s\n" "$as_me: Dynamic library extension is 'dylib'" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDSHARED needs special flags" >&5 +printf "%s\n" "$as_me: LDSHARED needs special flags" >&6;} SOEXT=dylib LDSHARED="$LDSHARED -dynamiclib -Wl,-headerpad_max_install_names" if test "$rpath" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Switching off rpath on OSX" >&5 -$as_echo "$as_me: Switching off rpath on OSX" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Switching off rpath on OSX" >&5 +printf "%s\n" "$as_me: Switching off rpath on OSX" >&6;} rpath=false fi ;; (Linux) - { $as_echo "$as_me:${as_lineno-$LINENO}: *** Special settings for dynamic libraries on Linux ***" >&5 -$as_echo "$as_me: *** Special settings for dynamic libraries on Linux ***" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic library extension is 'so'" >&5 -$as_echo "$as_me: Dynamic library extension is 'so'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: LDSHARED and LDFLAGS need special flags" >&5 -$as_echo "$as_me: LDSHARED and LDFLAGS need special flags" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: *** Special settings for dynamic libraries on Linux ***" >&5 +printf "%s\n" "$as_me: *** Special settings for dynamic libraries on Linux ***" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic library extension is 'so'" >&5 +printf "%s\n" "$as_me: Dynamic library extension is 'so'" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDSHARED and LDFLAGS need special flags" >&5 +printf "%s\n" "$as_me: LDSHARED and LDFLAGS need special flags" >&6;} SOEXT=so LDSHARED="$LDSHARED -shared" save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain -rdynamic" >&5 -$as_echo_n "checking whether LDFLAGS can contain -rdynamic... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain -rdynamic" >&5 +printf %s "checking whether LDFLAGS can contain -rdynamic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; LDFLAGS="$save_LDFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; LDFLAGS="$save_LDFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$bsymbolic" = true ; then save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain -Wl,-Bsymbolic" >&5 -$as_echo_n "checking whether LDFLAGS can contain -Wl,-Bsymbolic... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether LDFLAGS can contain -Wl,-Bsymbolic" >&5 +printf %s "checking whether LDFLAGS can contain -Wl,-Bsymbolic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; LDFLAGS="$save_LDFLAGS" +if ac_fn_cxx_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; LDFLAGS="$save_LDFLAGS" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi ;; (*) - { $as_echo "$as_me:${as_lineno-$LINENO}: *** Dynamic library only enabled on OSX and Linux ***" >&5 -$as_echo "$as_me: *** Dynamic library only enabled on OSX and Linux ***" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: *** Dynamic library only enabled on OSX and Linux ***" >&5 +printf "%s\n" "$as_me: *** Dynamic library only enabled on OSX and Linux ***" >&6;} esac fi # check linking of runtime library if test -n "$SOEXT" then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using LDSHARED='$LDSHARED'" >&5 -$as_echo "$as_me: Using LDSHARED='$LDSHARED'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Using LDFLAGS='$LDFLAGS'" >&5 -$as_echo "$as_me: Using LDFLAGS='$LDFLAGS'" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LDSHARED can create dynamic libraries" >&5 -$as_echo_n "checking whether LDSHARED can create dynamic libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using LDSHARED='$LDSHARED'" >&5 +printf "%s\n" "$as_me: Using LDSHARED='$LDSHARED'" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using LDFLAGS='$LDFLAGS'" >&5 +printf "%s\n" "$as_me: Using LDFLAGS='$LDFLAGS'" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether LDSHARED can create dynamic libraries" >&5 +printf %s "checking whether LDSHARED can create dynamic libraries... " >&6; } rm -f conftest.* echo "void f(void){ return;}" > conftest.cpp $CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp 1>/dev/null 2>/dev/null $LDSHARED $LDFLAGS conftest.o -o conftest.$SOEXT 1>/dev/null 2>/dev/null if test -f conftest.$SOEXT then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dynamic library will be disabled" >&5 -$as_echo "$as_me: WARNING: dynamic library will be disabled" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dynamic library will be disabled" >&5 +printf "%s\n" "$as_me: WARNING: dynamic library will be disabled" >&2;} SOEXT= fi if test -n "$SOEXT" && test "$rpath" = true ; then @@ -10260,38 +11190,44 @@ $as_echo "$as_me: WARNING: dynamic library will be disabled" >&2;} readelf="" # Extract the first word of "readelf", so it can be a program name with args. set dummy readelf; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_readelf+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$readelf"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_readelf+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$readelf"; then ac_cv_prog_readelf="$readelf" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_readelf="found" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi readelf=$ac_cv_prog_readelf if test -n "$readelf"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $readelf" >&5 -$as_echo "$readelf" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $readelf" >&5 +printf "%s\n" "$readelf" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10301,20 +11237,20 @@ fi if readelf -d conftest.$SOEXT | grep RPATH | grep -q /some/random/dir ; then LD_MAIN_RUNPATH="-Wl,-R -Wl,\"$libdir:$LIBRARY_PATH\"" LDSHARED="$LDSHARED $LD_MAIN_RUNPATH" - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling RPATH" >&5 -$as_echo "$as_me: Enabling RPATH" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling RPATH" >&5 +printf "%s\n" "$as_me: Enabling RPATH" >&6;} elif readelf -d conftest.$SOEXT | grep RUNPATH | grep -q /some/random/dir ; then LD_MAIN_RUNPATH="-Wl,-R -Wl,\"$libdir:$LIBRARY_PATH\"" LDSHARED="$LDSHARED $LD_MAIN_RUNPATH" - { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling RUNPATH" >&5 -$as_echo "$as_me: Enabling RUNPATH" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling RUNPATH" >&5 +printf "%s\n" "$as_me: Enabling RUNPATH" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: -R option seems not working, disabling rpath" >&5 -$as_echo "$as_me: WARNING: -R option seems not working, disabling rpath" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -R option seems not working, disabling rpath" >&5 +printf "%s\n" "$as_me: WARNING: -R option seems not working, disabling rpath" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: readelf not available, no way to set rpath" >&5 -$as_echo "$as_me: WARNING: readelf not available, no way to set rpath" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: readelf not available, no way to set rpath" >&5 +printf "%s\n" "$as_me: WARNING: readelf not available, no way to set rpath" >&2;} fi fi rm -f conftest.* @@ -10331,38 +11267,44 @@ make_doc=yes ### Look for doxygen # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_doxygen+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$doxygen"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_doxygen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$doxygen"; then ac_cv_prog_doxygen="$doxygen" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_doxygen="found" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi doxygen=$ac_cv_prog_doxygen if test -n "$doxygen"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5 -$as_echo "$doxygen" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5 +printf "%s\n" "$doxygen" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10371,54 +11313,60 @@ then doxygen_version=`doxygen --version | awk 'BEGIN{FS="."}{if($1>1 || ($1==1 && $2>=8)) print "ok"}'` if test "$doxygen_version" = ok then - { $as_echo "$as_me:${as_lineno-$LINENO}: Doxygen version is fine" >&5 -$as_echo "$as_me: Doxygen version is fine" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Doxygen version is fine" >&5 +printf "%s\n" "$as_me: Doxygen version is fine" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Doxygen version is <1.8" >&5 -$as_echo "$as_me: WARNING: Doxygen version is <1.8" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Doxygen version is <1.8" >&5 +printf "%s\n" "$as_me: WARNING: Doxygen version is <1.8" >&2;} make_doc=no fi # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_dot+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$dot"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_dot+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$dot"; then ac_cv_prog_dot="$dot" # 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_dot="found" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi +fi ;; +esac fi dot=$ac_cv_prog_dot if test -n "$dot"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dot" >&5 -$as_echo "$dot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dot" >&5 +printf "%s\n" "$dot" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "$dot" != found then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You will not be able to see diagrams in the manual" >&5 -$as_echo "$as_me: WARNING: You will not be able to see diagrams in the manual" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You will not be able to see diagrams in the manual" >&5 +printf "%s\n" "$as_me: WARNING: You will not be able to see diagrams in the manual" >&2;} fi else make_doc=no @@ -10427,36 +11375,37 @@ fi if test "$make_doc" = yes then - { $as_echo "$as_me:${as_lineno-$LINENO}: Manuals will be generated" >&5 -$as_echo "$as_me: Manuals will be generated" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Manuals will be generated" >&5 +printf "%s\n" "$as_me: Manuals will be generated" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: Manuals will not be generated" >&5 -$as_echo "$as_me: Manuals will not be generated" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Manuals will not be generated" >&5 +printf "%s\n" "$as_me: Manuals will not be generated" >&6;} fi make_pdfdoc="" if test "$pdfdoc" = true && test "$make_doc" = yes then - { $as_echo "$as_me:${as_lineno-$LINENO}: A PDF version of the manual will be generated" >&5 -$as_echo "$as_me: A PDF version of the manual will be generated" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: A PDF version of the manual will be generated" >&5 +printf "%s\n" "$as_me: A PDF version of the manual will be generated" >&6;} make_pdfdoc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: A PDF version of the manual will not be generated" >&5 -$as_echo "$as_me: A PDF version of the manual will not be generated" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: A PDF version of the manual will not be generated" >&5 +printf "%s\n" "$as_me: A PDF version of the manual will not be generated" >&6;} make_pdfdoc=no fi program_can_run="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can be run on this machine" >&5 -$as_echo_n "checking whether a program can be run on this machine... " >&6; } -if test "$cross_compiling" = yes; then : - program_can_run=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross compiling)" >&5 -$as_echo "no (cross compiling)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can be run on this machine" >&5 +printf %s "checking whether a program can be run on this machine... " >&6; } +if test "$cross_compiling" = yes +then : + program_can_run=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (cross compiling)" >&5 +printf "%s\n" "no (cross compiling)" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PLUMED_HAS_MPI @@ -10476,29 +11425,33 @@ int main(int argc,char*argv[]){ } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - program_can_run=yes ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - program_can_run=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_cxx_try_run "$LINENO" +then : + program_can_run=yes ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) program_can_run=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi if test $mpi_found = ok ; then program_can_run_mpi="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program compiled with mpi can be run on this machine" >&5 -$as_echo_n "checking whether a program compiled with mpi can be run on this machine... " >&6; } -if test "$cross_compiling" = yes; then : - program_can_run_mpi=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross compiling)" >&5 -$as_echo "no (cross compiling)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program compiled with mpi can be run on this machine" >&5 +printf %s "checking whether a program compiled with mpi can be run on this machine... " >&6; } +if test "$cross_compiling" = yes +then : + program_can_run_mpi=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (cross compiling)" >&5 +printf "%s\n" "no (cross compiling)" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PLUMED_HAS_MPI @@ -10514,26 +11467,29 @@ int main(int argc,char*argv[]){ } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - program_can_run_mpi=yes ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - program_can_run_mpi=no ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_cxx_try_run "$LINENO" +then : + program_can_run_mpi=yes ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) program_can_run_mpi=no ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi if test $mpi_found = ok ; then if test -n "$MPIEXEC" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Regtest suite will use $MPIEXEC command to run MPI tests" >&5 -$as_echo "$as_me: Regtest suite will use $MPIEXEC command to run MPI tests" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Regtest suite will use $MPIEXEC command to run MPI tests" >&5 +printf "%s\n" "$as_me: Regtest suite will use $MPIEXEC command to run MPI tests" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&5 -$as_echo "$as_me: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&5 +printf "%s\n" "$as_me: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&6;} fi fi @@ -10546,22 +11502,22 @@ fi if test "$absolute_soname" = true ; then if test "$SOEXT" = "dylib" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-absolute-soname has no effect on OSX" >&5 -$as_echo "$as_me: WARNING: --enable-absolute-soname has no effect on OSX" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-absolute-soname has no effect on OSX" >&5 +printf "%s\n" "$as_me: WARNING: --enable-absolute-soname has no effect on OSX" >&2;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: enabling absolute soname. Full path will be hardcoded in plumed library soname" >&5 -$as_echo "$as_me: enabling absolute soname. Full path will be hardcoded in plumed library soname" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: enabling absolute soname. Full path will be hardcoded in plumed library soname" >&5 +printf "%s\n" "$as_me: enabling absolute soname. Full path will be hardcoded in plumed library soname" >&6;} use_absolute_soname=yes fi fi if test "$absolute_install_name" = false ; then if test "$SOEXT" = "so" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --disable-absolute-install-name has no effect on Linux" >&5 -$as_echo "$as_me: WARNING: --disable-absolute-install-name has no effect on Linux" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --disable-absolute-install-name has no effect on Linux" >&5 +printf "%s\n" "$as_me: WARNING: --disable-absolute-install-name has no effect on Linux" >&2;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: enabling relative install_name. You will have to set DYLD_LIBRARY_PATH yor plumed libraries to be found at runtime" >&5 -$as_echo "$as_me: enabling relative install_name. You will have to set DYLD_LIBRARY_PATH yor plumed libraries to be found at runtime" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: enabling relative install_name. You will have to set DYLD_LIBRARY_PATH yor plumed libraries to be found at runtime" >&5 +printf "%s\n" "$as_me: enabling relative install_name. You will have to set DYLD_LIBRARY_PATH yor plumed libraries to be found at runtime" >&6;} use_absolute_soname=no fi fi @@ -10578,17 +11534,17 @@ else fi #### This further tests are required to allow linking with non c++ compiler -{ $as_echo "$as_me:${as_lineno-$LINENO}: PLUMED seems to be configured properly!" >&5 -$as_echo "$as_me: PLUMED seems to be configured properly!" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **************************" >&5 -$as_echo "$as_me: **************************" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PLUMED seems to be configured properly!" >&5 +printf "%s\n" "$as_me: PLUMED seems to be configured properly!" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **************************" >&5 +printf "%s\n" "$as_me: **************************" >&6;} LD_RO= if test "$ld_r" = true ; then for test_LD_RO in "$($CXX --print-prog-name=ld) -r -o" "$CXX -Wl,-r -o" "ld -r -o" do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ objects can be grouped with $test_LD_RO" >&5 -$as_echo_n "checking whether C++ objects can be grouped with $test_LD_RO... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ objects can be grouped with $test_LD_RO" >&5 +printf %s "checking whether C++ objects can be grouped with $test_LD_RO... " >&6; } rm -f conftest* @@ -10614,13 +11570,13 @@ EOF if test -f conftest.exe then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } LD_RO="$test_LD_RO" break else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi done @@ -10631,8 +11587,8 @@ AR_CR= if test "$ar_cr" = true ; then for test_AR_CR in "$($CXX --print-prog-name=ar) cr" "ar cr" do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether static libraries can be created with $test_AR_CR" >&5 -$as_echo_n "checking whether static libraries can be created with $test_AR_CR... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether static libraries can be created with $test_AR_CR" >&5 +printf %s "checking whether static libraries can be created with $test_AR_CR... " >&6; } rm -f conftest* @@ -10658,13 +11614,13 @@ EOF if test -f conftest.exe then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } AR_CR="$test_AR_CR" break else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi done @@ -10675,15 +11631,15 @@ make_static_archive=no if test "${static_archive}" = true ; then if test -z "$LD_RO" || test -z "$AR_CR" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no way to create a static archive if ld -ro or ar cr do not work" >&5 -$as_echo "$as_me: WARNING: no way to create a static archive if ld -ro or ar cr do not work" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no way to create a static archive if ld -ro or ar cr do not work" >&5 +printf "%s\n" "$as_me: WARNING: no way to create a static archive if ld -ro or ar cr do not work" >&2;} static_archive=false fi fi if test "${static_archive}" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether static-object constructors can be linked from a static archive" >&5 -$as_echo_n "checking whether static-object constructors can be linked from a static archive... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether static-object constructors can be linked from a static archive" >&5 +printf %s "checking whether static-object constructors can be linked from a static archive... " >&6; } magic_token=c1bc476d093a3a5c67b4530e6c54c633593fe9aa rm -f conftest-* @@ -10715,21 +11671,21 @@ EOF # $CXX $CXXFLAGS -o conftest.exe conftest-main.o conftest-both.a 1> /dev/null 2> /dev/null if grep -q $magic_token ./conftest.exe ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } make_static_archive=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi if test "${static_patch}" = true ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: I will now check if C++ objects can be linked by C/Fortran compilers" >&5 -$as_echo "$as_me: I will now check if C++ objects can be linked by C/Fortran compilers" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: This is relevant if you want to use plumed patch --static on a non-C++ code" >&5 -$as_echo "$as_me: This is relevant if you want to use plumed patch --static on a non-C++ code" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: I will now check if C++ objects can be linked by C/Fortran compilers" >&5 +printf "%s\n" "$as_me: I will now check if C++ objects can be linked by C/Fortran compilers" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: This is relevant if you want to use plumed patch --static on a non-C++ code" >&5 +printf "%s\n" "$as_me: This is relevant if you want to use plumed patch --static on a non-C++ code" >&6;} for compiler in CC FC do @@ -10773,37 +11729,37 @@ EOF for testlib in "" $testlibs ; do comment= test -n "$testlib" && comment=" with library $testlib" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $name can link a C++ object$comment" >&5 -$as_echo_n "checking whether $name can link a C++ object$comment... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $name can link a C++ object$comment" >&5 +printf %s "checking whether $name can link a C++ object$comment... " >&6; } $compexe conftest.o conftest-main.o $LDFLAGS $testlib $LIBS -o conftest.exe 1>/dev/null 2>/dev/null if test -f conftest.exe then found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } LIBS="$testlib $LIBS" break else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi done if test -z "$found" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You might have problems linking $name programs." >&5 -$as_echo "$as_me: WARNING: You might have problems linking $name programs." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please add c++ library to LIBS" >&5 -$as_echo "$as_me: WARNING: Please add c++ library to LIBS" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You might have problems linking $name programs." >&5 +printf "%s\n" "$as_me: WARNING: You might have problems linking $name programs." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please add c++ library to LIBS" >&5 +printf "%s\n" "$as_me: WARNING: Please add c++ library to LIBS" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: $compiler compiler not configured" >&5 -$as_echo "$as_me: $compiler compiler not configured" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $compiler compiler not configured" >&5 +printf "%s\n" "$as_me: $compiler compiler not configured" >&6;} fi rm -f conftest.* conftest-main.* done else -{ $as_echo "$as_me:${as_lineno-$LINENO}: Static patching is disabled, thus tests required for static patching will be skipped" >&5 -$as_echo "$as_me: Static patching is disabled, thus tests required for static patching will be skipped" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Static patching is disabled, thus tests required for static patching will be skipped" >&5 +printf "%s\n" "$as_me: Static patching is disabled, thus tests required for static patching will be skipped" >&6;} fi if test "$prefix" = NONE @@ -10817,12 +11773,13 @@ for ac_prog in pkg-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_pkgconfig_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $pkgconfig_bin in +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_pkgconfig_bin+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $pkgconfig_bin in [\\/]* | ?:[\\/]*) ac_cv_path_pkgconfig_bin="$pkgconfig_bin" # Let the user override the test with a path. ;; @@ -10831,11 +11788,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_pkgconfig_bin="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_pkgconfig_bin="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10843,15 +11804,16 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi pkgconfig_bin=$ac_cv_path_pkgconfig_bin if test -n "$pkgconfig_bin"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_bin" >&5 -$as_echo "$pkgconfig_bin" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_bin" >&5 +printf "%s\n" "$pkgconfig_bin" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10862,25 +11824,25 @@ done if test -z "$BASH_COMPLETION_DIR" && test -n "$pkgconfig_bin"; then if test "$prefix" = "$(pkg-config --variable=prefix bash-completion 2>/dev/null)" then - { $as_echo "$as_me:${as_lineno-$LINENO}: bash-completion is installed on the same prefix where plumed will be installed" >&5 -$as_echo "$as_me: bash-completion is installed on the same prefix where plumed will be installed" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: bash-completion is installed on the same prefix where plumed will be installed" >&5 +printf "%s\n" "$as_me: bash-completion is installed on the same prefix where plumed will be installed" >&6;} if pkg-config --variable=completionsdir bash-completion 2>/dev/null >/dev/null ; then BASH_COMPLETION_DIR="$(pkg-config --variable=completionsdir bash-completion 2>/dev/null)" fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: bash-completion is not installed or it is installed on a different prefix" >&5 -$as_echo "$as_me: bash-completion is not installed or it is installed on a different prefix" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: bash-completion is not installed or it is installed on a different prefix" >&5 +printf "%s\n" "$as_me: bash-completion is not installed or it is installed on a different prefix" >&6;} pkgconfig_bin="" fi fi if test -n "$BASH_COMPLETION_DIR" then - { $as_echo "$as_me:${as_lineno-$LINENO}: bash completion for plumed will be installed in $BASH_COMPLETION_DIR" >&5 -$as_echo "$as_me: bash completion for plumed will be installed in $BASH_COMPLETION_DIR" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: bash completion for plumed will be installed in $BASH_COMPLETION_DIR" >&5 +printf "%s\n" "$as_me: bash completion for plumed will be installed in $BASH_COMPLETION_DIR" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: bash completion for plumed will not be installed" >&5 -$as_echo "$as_me: bash completion for plumed will not be installed" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: bash completion for plumed will not be installed" >&5 +printf "%s\n" "$as_me: bash completion for plumed will not be installed" >&6;} fi @@ -10891,9 +11853,9 @@ test "$program_prefix" != NONE && test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. -# By default was `s,x,x', remove it if useless. +# By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` @@ -10901,13 +11863,9 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` program_transform_name_sh=$(echo "${program_transform_name}" | sed 's:\$\$:$:g') program_name=$(echo plumed | sed "$program_transform_name_sh") -cat >>confdefs.h <<_ACEOF -#define __PLUMED_PROGRAM_NAME "$program_name" -_ACEOF +printf "%s\n" "#define __PLUMED_PROGRAM_NAME \"$program_name\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define __PLUMED_SOEXT "$SOEXT" -_ACEOF +printf "%s\n" "#define __PLUMED_SOEXT \"$SOEXT\"" >>confdefs.h if test "$(echo "$program_name" | tr 'A-Z' 'a-z')" != "$(echo "$program_name" | tr 'A-Z' 'a-z' | sed 's/wrapper$//')" ; then @@ -10923,79 +11881,79 @@ if test "$(echo "$program_name" | tr 'A-Z' 'a-z')" != "$(echo "$program_name" | as_fn_error $? "$program_name is not a valid program name (should not terminate with -config)" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** PLUMED will be installed using the following paths:" >&5 -$as_echo "$as_me: **** PLUMED will be installed using the following paths:" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** prefix: $prefix" >&5 -$as_echo "$as_me: **** prefix: $prefix" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** PLUMED will be installed using the following paths:" >&5 +printf "%s\n" "$as_me: **** PLUMED will be installed using the following paths:" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** prefix: $prefix" >&5 +printf "%s\n" "$as_me: **** prefix: $prefix" >&6;} if test "$exec_prefix" = NONE ; then exec_prefix_='${prefix}' else exec_prefix_="${exec_prefix}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** exec_prefix: $exec_prefix_" >&5 -$as_echo "$as_me: **** exec_prefix: $exec_prefix_" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** bindir: $bindir" >&5 -$as_echo "$as_me: **** bindir: $bindir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** libdir: $libdir" >&5 -$as_echo "$as_me: **** libdir: $libdir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** includedir: $includedir" >&5 -$as_echo "$as_me: **** includedir: $includedir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** datarootdir: $datarootdir" >&5 -$as_echo "$as_me: **** datarootdir: $datarootdir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** datadir: $datadir" >&5 -$as_echo "$as_me: **** datadir: $datadir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** docdir: ${datarootdir}/doc/$program_name" >&5 -$as_echo "$as_me: **** docdir: ${datarootdir}/doc/$program_name" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** htmldir: $htmldir" >&5 -$as_echo "$as_me: **** htmldir: $htmldir" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** Executable will be named $program_name" >&5 -$as_echo "$as_me: **** Executable will be named $program_name" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** As of PLUMED 2.5, you cannot change paths anymore during \"make install\"" >&5 -$as_echo "$as_me: **** As of PLUMED 2.5, you cannot change paths anymore during \"make install\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: **** Please configure and make clean to change the prefix" >&5 -$as_echo "$as_me: **** Please configure and make clean to change the prefix" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** exec_prefix: $exec_prefix_" >&5 +printf "%s\n" "$as_me: **** exec_prefix: $exec_prefix_" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** bindir: $bindir" >&5 +printf "%s\n" "$as_me: **** bindir: $bindir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** libdir: $libdir" >&5 +printf "%s\n" "$as_me: **** libdir: $libdir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** includedir: $includedir" >&5 +printf "%s\n" "$as_me: **** includedir: $includedir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** datarootdir: $datarootdir" >&5 +printf "%s\n" "$as_me: **** datarootdir: $datarootdir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** datadir: $datadir" >&5 +printf "%s\n" "$as_me: **** datadir: $datadir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** docdir: ${datarootdir}/doc/$program_name" >&5 +printf "%s\n" "$as_me: **** docdir: ${datarootdir}/doc/$program_name" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** htmldir: $htmldir" >&5 +printf "%s\n" "$as_me: **** htmldir: $htmldir" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** Executable will be named $program_name" >&5 +printf "%s\n" "$as_me: **** Executable will be named $program_name" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** As of PLUMED 2.5, you cannot change paths anymore during \"make install\"" >&5 +printf "%s\n" "$as_me: **** As of PLUMED 2.5, you cannot change paths anymore during \"make install\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** Please configure and make clean to change the prefix" >&5 +printf "%s\n" "$as_me: **** Please configure and make clean to change the prefix" >&6;} if test -z "$BASH_COMPLETION_DIR" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **** Bash completion for plumed will not be installed, please add the following two lines to your bashrc" >&5 -$as_echo "$as_me: WARNING: **** Bash completion for plumed will not be installed, please add the following two lines to your bashrc" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **** _$program_name() { eval \"\$($program_name --no-mpi completion 2>/dev/null)\";}" >&5 -$as_echo "$as_me: WARNING: **** _$program_name() { eval \"\$($program_name --no-mpi completion 2>/dev/null)\";}" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **** complete -F _$program_name -o default $program_name" >&5 -$as_echo "$as_me: WARNING: **** complete -F _$program_name -o default $program_name" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: **** Bash completion for plumed will not be installed, please add the following two lines to your bashrc" >&5 +printf "%s\n" "$as_me: WARNING: **** Bash completion for plumed will not be installed, please add the following two lines to your bashrc" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: **** _$program_name() { eval \"\$($program_name --no-mpi completion 2>/dev/null)\";}" >&5 +printf "%s\n" "$as_me: WARNING: **** _$program_name() { eval \"\$($program_name --no-mpi completion 2>/dev/null)\";}" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: **** complete -F _$program_name -o default $program_name" >&5 +printf "%s\n" "$as_me: WARNING: **** complete -F _$program_name -o default $program_name" >&2;} fi if test $mpi = true; then if test $mpi_found = ok; then - { $as_echo "$as_me:${as_lineno-$LINENO}: **** PLUMED will be compiled using MPI" >&5 -$as_echo "$as_me: **** PLUMED will be compiled using MPI" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** PLUMED will be compiled using MPI" >&5 +printf "%s\n" "$as_me: **** PLUMED will be compiled using MPI" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: **** PLUMED will NOT be compiled using MPI because MPI have not been found!" >&5 -$as_echo "$as_me: WARNING: **** PLUMED will NOT be compiled using MPI because MPI have not been found!" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: **** PLUMED will NOT be compiled using MPI because MPI have not been found!" >&5 +printf "%s\n" "$as_me: WARNING: **** PLUMED will NOT be compiled using MPI because MPI have not been found!" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: **** PLUMED will be compiled without MPI" >&5 -$as_echo "$as_me: **** PLUMED will be compiled without MPI" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: **** PLUMED will be compiled without MPI" >&5 +printf "%s\n" "$as_me: **** PLUMED will be compiled without MPI" >&6;} fi if test $program_can_run = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: plumed executable will not run on this machine" >&5 -$as_echo "$as_me: WARNING: plumed executable will not run on this machine" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to patch an MD code use 'plumed-patch'" >&5 -$as_echo "$as_me: WARNING: to patch an MD code use 'plumed-patch'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: plumed executable will not run on this machine" >&5 +printf "%s\n" "$as_me: WARNING: plumed executable will not run on this machine" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: to patch an MD code use 'plumed-patch'" >&5 +printf "%s\n" "$as_me: WARNING: to patch an MD code use 'plumed-patch'" >&2;} elif test $mpi_found = ok ; then if test $program_can_run_mpi = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: plumed executable will not run on this machine" >&5 -$as_echo "$as_me: WARNING: plumed executable will not run on this machine" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unless you invoke it as 'plumed --no-mpi'" >&5 -$as_echo "$as_me: WARNING: unless you invoke it as 'plumed --no-mpi'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: all command line tools are thus available as 'plumed --no-mpi name-of-the-tool'" >&5 -$as_echo "$as_me: WARNING: all command line tools are thus available as 'plumed --no-mpi name-of-the-tool'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: e.g. 'plumed --no-mpi driver'" >&5 -$as_echo "$as_me: WARNING: e.g. 'plumed --no-mpi driver'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to patch an MD code use 'plumed --no-mpi patch'" >&5 -$as_echo "$as_me: WARNING: to patch an MD code use 'plumed --no-mpi patch'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (notice that MPI will be available anyway in the patched code)" >&5 -$as_echo "$as_me: WARNING: (notice that MPI will be available anyway in the patched code)" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: plumed executable will not run on this machine" >&5 +printf "%s\n" "$as_me: WARNING: plumed executable will not run on this machine" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unless you invoke it as 'plumed --no-mpi'" >&5 +printf "%s\n" "$as_me: WARNING: unless you invoke it as 'plumed --no-mpi'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: all command line tools are thus available as 'plumed --no-mpi name-of-the-tool'" >&5 +printf "%s\n" "$as_me: WARNING: all command line tools are thus available as 'plumed --no-mpi name-of-the-tool'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: e.g. 'plumed --no-mpi driver'" >&5 +printf "%s\n" "$as_me: WARNING: e.g. 'plumed --no-mpi driver'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: to patch an MD code use 'plumed --no-mpi patch'" >&5 +printf "%s\n" "$as_me: WARNING: to patch an MD code use 'plumed --no-mpi patch'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: (notice that MPI will be available anyway in the patched code)" >&5 +printf "%s\n" "$as_me: WARNING: (notice that MPI will be available anyway in the patched code)" >&2;} fi fi @@ -11022,8 +11980,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -11039,8 +11997,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -11053,14 +12011,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -11070,15 +12028,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -11092,8 +12050,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -11124,9 +12082,7 @@ s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g +s/[][ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\$/$$/g H :any @@ -11146,7 +12102,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -11162,8 +12118,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -11186,63 +12142,65 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -11251,13 +12209,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -11266,43 +12217,27 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -11315,9 +12250,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11348,22 +12283,25 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -11371,16 +12309,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -11407,7 +12347,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -11429,6 +12369,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -11442,6 +12386,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -11453,9 +12403,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -11483,7 +12433,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -11492,7 +12442,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11536,10 +12486,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -11555,7 +12507,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by PLUMED $as_me 2, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11582,7 +12534,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -11604,14 +12556,16 @@ $config_files Report bugs to the package provider." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ PLUMED config.status 2 -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11648,28 +12602,28 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -11690,7 +12644,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -11704,7 +12658,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -11721,7 +12675,7 @@ do "sourceme.sh") CONFIG_FILES="$CONFIG_FILES sourceme.sh" ;; "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -11731,7 +12685,7 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree @@ -11739,7 +12693,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -11763,7 +12717,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -11929,7 +12883,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11951,33 +12905,33 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -11994,7 +12948,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -12018,9 +12972,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -12073,8 +13027,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -12087,7 +13041,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -12116,9 +13070,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -12170,8 +13124,9 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/configure.ac b/configure.ac index ed5d4e0a5d..ad5bf2d002 100644 --- a/configure.ac +++ b/configure.ac @@ -324,6 +324,7 @@ PLUMED_CONFIG_ENABLE([af_ocl],[search for arrayfire_ocl],[no]) PLUMED_CONFIG_ENABLE([af_cuda],[search for arrayfire_cuda],[no]) PLUMED_CONFIG_ENABLE([af_cpu],[search for arrayfire_cpu],[no]) PLUMED_CONFIG_ENABLE([libtorch],[search for libtorch],[no]) #added by luigibonati +PLUMED_CONFIG_ENABLE([metatensor],[search for metatensor],[no]) AC_ARG_VAR(SOEXT,[extension of dynamic libraries (so/dylib)]) AC_ARG_VAR(STATIC_LIBS,[variables that should be linked statically directly to MD code - configure will add here -ldl if necessary ]) @@ -928,6 +929,11 @@ if test "$af_cpu" = true ; then PLUMED_CHECK_PACKAGE([arrayfire.h],[af_is_double],[__PLUMED_HAS_ARRAYFIRE],[afcpu]) fi +# metatensor requires libtorch +if test $metatensor = true ; then + libtorch=true; +fi + #added by luigibonati if test $libtorch = true ; then # disable as-needed in linking libraries (both static and shared) @@ -965,6 +971,17 @@ if test $libtorch = true ; then fi fi +if test $metatensor = true ; then + # find metatensor and metatensor_torch + PLUMED_CHECK_CXX_PACKAGE([metatensor],[ + #include + int main() { + metatensor_torch::version(); + return 0; + } + ], [__PLUMED_HAS_METATENSOR], [metatensor metatensor_torch], [true]) +fi + # in non-debug mode, add -DNDEBUG if test "$debug" = false ; then AC_MSG_NOTICE([Release mode, adding -DNDEBUG]) diff --git a/src/.gitignore b/src/.gitignore index 6a82ca16c2..2ed78adad1 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -64,6 +64,7 @@ !/s2cm !/pytorch !/membranefusion +!/metatensor # And just ignore these files *.xxd diff --git a/src/metatensor/.gitignore b/src/metatensor/.gitignore new file mode 100644 index 0000000000..10af78cac2 --- /dev/null +++ b/src/metatensor/.gitignore @@ -0,0 +1,12 @@ +/* +# in this directory, only accept source, Makefile and README +!/.gitignore +!/*.c +!/*.cpp +!/*.h +!/*.sh +!/Makefile +!/README +!/README.md +!/module.type +!/COPYRIGHT diff --git a/src/metatensor/Makefile b/src/metatensor/Makefile new file mode 100644 index 0000000000..fce705eebf --- /dev/null +++ b/src/metatensor/Makefile @@ -0,0 +1,4 @@ +USE=core + +#generic makefile +include ../maketools/make.module diff --git a/src/metatensor/README.md b/src/metatensor/README.md new file mode 100644 index 0000000000..4c636371e2 --- /dev/null +++ b/src/metatensor/README.md @@ -0,0 +1,68 @@ +# Metatensor module for PLUMED + + +## Building the code + +1. You'll need to fist install libtorch, either by installing PyTorch itself + with Python, or by downloading the prebuilt C++ library from + https://pytorch.org/get-started/locally/. + +```bash +# point this to the path where you extracted the C++ libtorch +TORCH_PREFIX=../../.. +# if you used Python to install torch, you can do this: +TORCH_CMAKE_PREFIX=$(python -c "import torch; print(torch.utils.cmake_prefix_path)") +TORCH_PREFIX=$(cd "$TORCH_CMAKE_PREFIX/../.." && pwd) + +# patch a bug from torch's MKL detection +cd +./src/metatensor/patch-torch.sh "$TORCH_PREFIX" +``` + +2. a) build and install metatensor-torch from source. You'll need a rust + compiler on your system, the easiest way is by using https://rustup.rs/ + +```bash +cd + +# define a location where metatensor should be installed +METATENSOR_PREFIX=<...> + +METATENSOR_TORCH_PREFIX="$METATENSOR_PREFIX" + +git clone https://github.com/lab-cosmo/metatensor --tag metatensor-torch-v0.3.0 +cd metatensor + +mkdir build && cd build +cmake -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_PREFIX="$METATENSOR_PREFIX" \ + -DCMAKE_PREFIX_PATH="$TORCH_PREFIX" \ + -DBUILD_METATENSOR_TORCH=ON \ + -DMETATENSOR_INSTALL_BOTH_STATIC_SHARED=OFF \ + .. + +cmake --build . --target install --parallel +``` + +2. b) alternatively, use metatensor-torch from Python (`pip install metatensor[torch]`) + +```bash +METATENSOR_CMAKE_PREFIX=$(python -c "import metatensor; print(metatensor.utils.cmake_prefix_path)") +METATENSOR_PREFIX=$(cd "$METATENSOR_CMAKE_PREFIX/../.." && pwd) + +METATENSOR_TORCH_CMAKE_PREFIX=$(python -c "import torch; print(torch.utils.cmake_prefix_path)") +METATENSOR_TORCH_PREFIX=$(cd "$METATENSOR_TORCH_CMAKE_PREFIX/../.." && pwd) +``` + +3. build Plumed itself + +```bash +cd + +# configure with metatensor +./configure --enable-libtorch --enable-metatensor --enable-modules=+metatensor \ + LDFLAGS="-L$TORCH_PREFIX/lib -L$METATENSOR_PREFIX/lib -L$METATENSOR_TORCH_PREFIX/lib" \ + CPPFLAGS="-I$TORCH_PREFIX/include -I$TORCH_PREFIX/include/torch/csrc/api/include -I$METATENSOR_PREFIX/include -I$METATENSOR_TORCH_PREFIX/include" + +make -j && make install +``` diff --git a/src/metatensor/metatensor.cpp b/src/metatensor/metatensor.cpp new file mode 100644 index 0000000000..e27373ee8f --- /dev/null +++ b/src/metatensor/metatensor.cpp @@ -0,0 +1,80 @@ +/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Copyright (c) 2024 Guillaume Fraux + + This module is free software: you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ + +#if !defined(__PLUMED_HAS_LIBTORCH) || !defined(__PLUMED_HAS_METATENSOR) + +// give a nice error message if the user tries to enable +// metatensor without enabling the corresponding libraries +#error "can not compile the metatensor module without the corresponding libraries, either the disable metatensor module or configure with `--enable-metatensor --enable-libtorch` and make sure the libraries can be found" + +#else + +#include "core/ActionAtomistic.h" +#include "core/ActionWithValue.h" +#include "core/ActionRegister.h" +#include "core/PlumedMain.h" + + +#include +#include + + +namespace PLMD { + +class MetatensorPlumedAction: public ActionAtomistic, public ActionWithValue { +public: + static void registerKeywords(Keywords& keys); + explicit MetatensorPlumedAction(const ActionOptions&); + + void calculate() override; + void apply() override; + unsigned getNumberOfDerivatives() override; + +private: + + metatensor_torch::TorchTensorMap output_; +}; + +PLUMED_REGISTER_ACTION(MetatensorPlumedAction, "METATENSOR") + +void MetatensorPlumedAction::registerKeywords(Keywords& keys) { + Action::registerKeywords(keys); + ActionAtomistic::registerKeywords(keys); + ActionWithValue::registerKeywords(keys); + + throw std::runtime_error("unimplemented"); +} + +MetatensorPlumedAction::MetatensorPlumedAction(const ActionOptions& options): + Action(options), + ActionAtomistic(options), + ActionWithValue(options) +{ + throw std::runtime_error("unimplemented"); +} + +unsigned MetatensorPlumedAction::getNumberOfDerivatives() { + // gradients w.r.t. positions (3 x N values) + gradients w.r.t. strain (9 values) + return 3 * this->getNumberOfAtoms() + 9; +} + + +void MetatensorPlumedAction::calculate() { + throw std::runtime_error("unimplemented"); +} + + +void MetatensorPlumedAction::apply() { + throw std::runtime_error("unimplemented"); +} + +} // namespace PLMD + + +#endif diff --git a/src/metatensor/module.type b/src/metatensor/module.type new file mode 100644 index 0000000000..de83273033 --- /dev/null +++ b/src/metatensor/module.type @@ -0,0 +1 @@ +default-off diff --git a/src/metatensor/patch-torch.sh b/src/metatensor/patch-torch.sh new file mode 100755 index 0000000000..8ec7cafac0 --- /dev/null +++ b/src/metatensor/patch-torch.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# This pulls in the fix from https://github.com/pytorch/pytorch/pull/119945 +# until it is properly released + +set -eu + +TORCH_PREFIX=$1 + +if [ -f "$TORCH_PREFIX/share/cmake/Caffe2/public/mkl.cmake" ]; then + MKL_CMAKE="$TORCH_PREFIX/share/cmake/Caffe2/public/mkl.cmake" +elif [ -f "$TORCH_PREFIX/Caffe2/public/mkl.cmake" ]; then + MKL_CMAKE="$TORCH_PREFIX/Caffe2/public/mkl.cmake" +else + echo "Failed to find mkl.cmake in '$TORCH_PREFIX'" + exit 1 +fi + +cat > "$MKL_CMAKE" << EOF + +find_package(MKL QUIET) + +if(TARGET caffe2::mkl) + return() +endif() + +add_library(caffe2::mkl INTERFACE IMPORTED) +target_include_directories(caffe2::mkl INTERFACE \${MKL_INCLUDE_DIR}) +target_link_libraries(caffe2::mkl INTERFACE \${MKL_LIBRARIES}) +foreach(MKL_LIB IN LISTS MKL_LIBRARIES) + if(EXISTS "\${MKL_LIB}") + get_filename_component(MKL_LINK_DIR "\${MKL_LIB}" DIRECTORY) + if(IS_DIRECTORY "\${MKL_LINK_DIR}") + target_link_directories(caffe2::mkl INTERFACE "\${MKL_LINK_DIR}") + endif() + endif() +endforeach() + +# TODO: This is a hack, it will not pick up architecture dependent +# MKL libraries correctly; see https://github.com/pytorch/pytorch/issues/73008 +set_property( + TARGET caffe2::mkl PROPERTY INTERFACE_LINK_DIRECTORIES + \${MKL_ROOT}/lib \${MKL_ROOT}/lib/intel64 \${MKL_ROOT}/lib/intel64_win \${MKL_ROOT}/lib/win-x64) + +EOF