Skip to content
Snippets Groups Projects
Commit 6d90caf2 authored by Gareth Tribello's avatar Gareth Tribello
Browse files

Ran autoconf to add fftw stuff to configure script

parent 15a54194
No related branches found
No related tags found
No related merge requests found
......@@ -719,6 +719,7 @@ enable_almost
enable_gsl
enable_xdrfile
enable_boost_graph
enable_fftw
enable_openmp
'
ac_precious_vars='build_alias
......@@ -1385,6 +1386,7 @@ Optional Features:
--enable-gsl enable search for gsl, default: no
--enable-xdrfile enable search for xdrfile, default: yes
--enable-boost_graph enable search for boost graph, default: no
--enable-fftw enable search for fftw, default: no
--disable-openmp do not use OpenMP
Some influential environment variables:
......@@ -2868,6 +2870,24 @@ fi
fftw=
# Check whether --enable-fftw was given.
if test "${enable_fftw+set}" = set; 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 "no" in
(yes) fftw=true ;;
(no) fftw=false ;;
esac
fi
......@@ -6541,6 +6561,72 @@ fi
$as_echo "$as_me: WARNING: cannot enable __PLUMED_HAS_BOOST_GRAPH" >&2;}
fi
fi
if test $fftw == true ; then
found=ko
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_func "$LINENO" "exit" "ac_cv_func_exit"
if test "x$ac_cv_func_exit" = xyes; then :
found=ok
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -lfftw" >&5
$as_echo_n "checking for exit in -lfftw... " >&6; }
if ${ac_cv_lib_fftw_exit+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw $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 exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_fftw_exit=yes
else
ac_cv_lib_fftw_exit=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw_exit" >&5
$as_echo "$ac_cv_lib_fftw_exit" >&6; }
if test "x$ac_cv_lib_fftw_exit" = xyes; then :
LIBS="-lfftw $LIBS" && found=ok
fi
fi
fi
if test $found == ok ; then
$as_echo "#define __PLUMED_HAS_FFTW 1" >>confdefs.h
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;}
fi
fi
# in non-debug mode, add -DNDEBUG
......
......@@ -465,4 +465,12 @@ you can use the exit funciton here, which should work even if you are using temp
directive that appears around your library calling code and that we discussed earlier. The last argument meanwhile is the name of the library -
the part that appears after the -l. In the example above the code would thus try and link -llibrary_name.
Once you have made these edits issue the command:
\verbatim
autoconf
\endverbatim
and the necessary changes will be made to the configure script. <b>You should never edit the configure script directly</b>
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment