1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-11 22:50:45 +01:00

Adding a test for libfftw3

This commit is contained in:
paboyle 2016-08-22 16:21:01 +01:00
parent e423a09974
commit 29c4ef41de

View File

@ -43,6 +43,7 @@ AC_ARG_WITH([mpfr],
AC_ARG_ENABLE([lapack], AC_ARG_ENABLE([lapack],
[AC_HELP_STRING([--enable-lapack=yes|no|prefix], [enable LAPACK])], [AC_HELP_STRING([--enable-lapack=yes|no|prefix], [enable LAPACK])],
[ac_LAPACK=${enable_lapack}],[ac_LAPACK=no]) [ac_LAPACK=${enable_lapack}],[ac_LAPACK=no])
case ${ac_LAPACK} in case ${ac_LAPACK} in
no) no)
;; ;;
@ -54,6 +55,17 @@ case ${ac_LAPACK} in
AC_DEFINE([USE_LAPACK],[1],[use LAPACK]) AC_DEFINE([USE_LAPACK],[1],[use LAPACK])
esac esac
AC_CHECK_LIB([fftw3],[fft_init_threads],
[AC_DEFINE([HAVE_FFTW],[1],[Define to 1 if you have the `FFTW' library (-lfftw3).])] [ac_fftw=yes],
[ac_fftw=no])
case ${ac_fftw} in
no)
;;
yes)
AM_LDFLAGS="-lfftw3 $AM_LDFLAGS"
esac
################ Get compiler informations ################ Get compiler informations
AC_LANG([C++]) AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
@ -77,7 +89,7 @@ AC_CHECK_LIB([gmp],[__gmpf_init],
[have_mpfr=true] [have_mpfr=true]
[LIBS="$LIBS -lmpfr"], [LIBS="$LIBS -lmpfr"],
[AC_MSG_ERROR([MPFR library not found])])] [AC_MSG_ERROR([MPFR library not found])])]
[AC_DEFINE([HAVE_LIBGMP], [1], [Define to 1 if you have the `GMP' library (-lgmp).])] [AC_DEFINE([HAVE_LIBGMP], [1], [Define to 1 if you have the `GMP' library (-lgmp).])]
[have_gmp=true] [have_gmp=true]
[LIBS="$LIBS -lgmp"], [LIBS="$LIBS -lgmp"],
[AC_MSG_WARN([**** GMP library not found, Grid can still compile but RHMC will not work ****])]) [AC_MSG_WARN([**** GMP library not found, Grid can still compile but RHMC will not work ****])])