2015-05-22 09:33:15 +01:00
|
|
|
AC_PREREQ([2.63])
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_INIT([Grid], [0.6.0], [https://github.com/paboyle/Grid], [Grid])
|
2016-09-23 11:05:36 +01:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
2015-04-18 21:23:32 +01:00
|
|
|
AM_INIT_AUTOMAKE(subdir-objects)
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2015-04-18 14:56:05 +01:00
|
|
|
AC_CONFIG_SRCDIR([lib/Grid.h])
|
2015-07-27 10:30:19 +01:00
|
|
|
AC_CONFIG_HEADERS([lib/Config.h])
|
2015-05-18 09:15:14 +01:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Checks for programs
|
2016-08-06 01:26:24 +01:00
|
|
|
CXXFLAGS="-O3 $CXXFLAGS"
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_PROG_CXX
|
2016-09-16 15:25:49 +01:00
|
|
|
AC_PROG_RANLIB
|
2016-08-24 15:05:00 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### Get compiler informations
|
|
|
|
AC_LANG([C++])
|
|
|
|
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
|
|
|
|
AX_COMPILER_VENDOR
|
|
|
|
AC_DEFINE_UNQUOTED([CXX_COMP_VENDOR],["$ax_cv_cxx_compiler_vendor"],
|
|
|
|
[vendor of C++ compiler that will compile the code])
|
|
|
|
AX_GXX_VERSION
|
|
|
|
AC_DEFINE_UNQUOTED([GXX_VERSION],["$GXX_VERSION"],
|
|
|
|
[version of g++ that will compile the code])
|
2016-08-24 15:05:00 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### Checks for typedefs, structures, and compiler characteristics
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
2016-08-24 15:05:00 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### OpenMP
|
|
|
|
AC_OPENMP
|
|
|
|
ac_openmp=no
|
2016-08-24 15:05:00 +01:00
|
|
|
if test "${OPENMP_CXXFLAGS}X" != "X"; then
|
2016-10-31 16:31:27 +00:00
|
|
|
ac_openmp=yes
|
|
|
|
AM_CXXFLAGS="$OPENMP_CXXFLAGS $AM_CXXFLAGS"
|
|
|
|
AM_LDFLAGS="$OPENMP_CXXFLAGS $AM_LDFLAGS"
|
2016-08-24 15:05:00 +01:00
|
|
|
fi
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Checks for header files
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_CHECK_HEADERS(stdint.h)
|
2015-05-15 11:52:11 +01:00
|
|
|
AC_CHECK_HEADERS(mm_malloc.h)
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_CHECK_HEADERS(malloc/malloc.h)
|
|
|
|
AC_CHECK_HEADERS(malloc.h)
|
2015-04-23 07:51:15 +01:00
|
|
|
AC_CHECK_HEADERS(endian.h)
|
2015-11-06 10:31:05 +00:00
|
|
|
AC_CHECK_HEADERS(execinfo.h)
|
2015-05-01 10:57:33 +01:00
|
|
|
AC_CHECK_DECLS([ntohll],[], [], [[#include <arpa/inet.h>]])
|
|
|
|
AC_CHECK_DECLS([be64toh],[], [], [[#include <arpa/inet.h>]])
|
2015-03-04 04:13:07 +00:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### GMP and MPFR
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_ARG_WITH([gmp],
|
|
|
|
[AS_HELP_STRING([--with-gmp=prefix],
|
|
|
|
[try this for a non-standard install prefix of the GMP library])],
|
2016-08-03 11:39:20 +01:00
|
|
|
[AM_CXXFLAGS="-I$with_gmp/include $AM_CXXFLAGS"]
|
2016-10-05 14:57:20 +01:00
|
|
|
[AM_LDFLAGS="-L$with_gmp/lib $AM_LDFLAGS"])
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_ARG_WITH([mpfr],
|
|
|
|
[AS_HELP_STRING([--with-mpfr=prefix],
|
|
|
|
[try this for a non-standard install prefix of the MPFR library])],
|
2016-08-03 11:39:20 +01:00
|
|
|
[AM_CXXFLAGS="-I$with_mpfr/include $AM_CXXFLAGS"]
|
|
|
|
[AM_LDFLAGS="-L$with_mpfr/lib $AM_LDFLAGS"])
|
2016-08-24 15:05:00 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### FFTW3
|
|
|
|
AC_ARG_WITH([fftw],
|
|
|
|
[AS_HELP_STRING([--with-fftw=prefix],
|
|
|
|
[try this for a non-standard install prefix of the FFTW3 library])],
|
|
|
|
[AM_CXXFLAGS="-I$with_fftw/include $AM_CXXFLAGS"]
|
|
|
|
[AM_LDFLAGS="-L$with_fftw/lib $AM_LDFLAGS"])
|
|
|
|
|
|
|
|
############### lapack
|
2016-08-02 17:26:54 +01:00
|
|
|
AC_ARG_ENABLE([lapack],
|
|
|
|
[AC_HELP_STRING([--enable-lapack=yes|no|prefix], [enable LAPACK])],
|
2016-10-31 16:31:27 +00:00
|
|
|
[ac_LAPACK=${enable_lapack}], [ac_LAPACK=no])
|
2016-08-22 16:21:01 +01:00
|
|
|
|
2016-08-02 17:26:54 +01:00
|
|
|
case ${ac_LAPACK} in
|
|
|
|
no)
|
|
|
|
;;
|
|
|
|
yes)
|
|
|
|
AC_DEFINE([USE_LAPACK],[1],[use LAPACK]);;
|
|
|
|
*)
|
2016-08-03 11:39:20 +01:00
|
|
|
AM_CXXFLAGS="-I$ac_LAPACK/include $AM_CXXFLAGS"
|
|
|
|
AM_LDFLAGS="-L$ac_LAPACK/lib $AM_LDFLAGS"
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_DEFINE([USE_LAPACK],[1],[use LAPACK]);;
|
2016-08-02 17:26:54 +01:00
|
|
|
esac
|
2016-07-30 17:53:18 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### MKL
|
|
|
|
AC_ARG_ENABLE([mkl],
|
|
|
|
[AC_HELP_STRING([--enable-mkl=yes|no|prefix], [enable Intel MKL for LAPACK & FFTW])],
|
|
|
|
[ac_MKL=${enable_mkl}], [ac_MKL=no])
|
|
|
|
|
|
|
|
case ${ac_MKL} in
|
|
|
|
no)
|
|
|
|
;;
|
|
|
|
yes)
|
|
|
|
AC_DEFINE([USE_MKL], [1], [Define to 1 if you use the Intel MKL]);;
|
|
|
|
*)
|
|
|
|
AM_CXXFLAGS="-I$ac_MKL/include $AM_CXXFLAGS"
|
|
|
|
AM_LDFLAGS="-L$ac_MKL/lib $AM_LDFLAGS"
|
|
|
|
AC_DEFINE([USE_MKL], [1], [Define to 1 if you use the Intel MKL]);;
|
|
|
|
esac
|
|
|
|
|
|
|
|
############### first-touch
|
2016-10-12 11:45:22 +01:00
|
|
|
AC_ARG_ENABLE([numa],
|
|
|
|
[AC_HELP_STRING([--enable-numa=yes|no|prefix], [enable first touch numa opt])],
|
|
|
|
[ac_NUMA=${enable_NUMA}],[ac_NUMA=no])
|
|
|
|
|
|
|
|
case ${ac_NUMA} in
|
|
|
|
no)
|
|
|
|
;;
|
|
|
|
yes)
|
|
|
|
AC_DEFINE([GRID_NUMA],[1],[First touch numa locality]);;
|
|
|
|
*)
|
|
|
|
AC_DEFINE([GRID_NUMA],[1],[First touch numa locality]);;
|
|
|
|
esac
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Checks for library functions
|
2016-08-03 11:39:20 +01:00
|
|
|
CXXFLAGS_CPY=$CXXFLAGS
|
|
|
|
LDFLAGS_CPY=$LDFLAGS
|
|
|
|
CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
|
|
|
|
LDFLAGS="$AM_LDFLAGS $LDFLAGS"
|
2016-10-31 16:31:27 +00:00
|
|
|
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_CHECK_FUNCS([gettimeofday])
|
2016-08-03 15:06:45 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
if test "${ac_MKL}x" != "nox"; then
|
|
|
|
AC_SEARCH_LIBS([mkl_set_interface_layer], [mkl_rt], [],
|
|
|
|
[AC_MSG_ERROR("MKL enabled but library not found")])
|
2016-08-02 17:26:54 +01:00
|
|
|
fi
|
2016-10-31 16:31:27 +00:00
|
|
|
|
|
|
|
AC_SEARCH_LIBS([__gmpf_init], [gmp],
|
|
|
|
[AC_SEARCH_LIBS([mpfr_init], [mpfr],
|
|
|
|
[AC_DEFINE([HAVE_LIBMPFR], [1],
|
|
|
|
[Define to 1 if you have the `MPFR' library])]
|
|
|
|
[have_mpfr=true], [AC_MSG_ERROR([MPFR library not found])])]
|
|
|
|
[AC_DEFINE([HAVE_LIBGMP], [1], [Define to 1 if you have the `GMP' library])]
|
|
|
|
[have_gmp=true])
|
|
|
|
|
|
|
|
if test "${ac_LAPACK}x" != "nox"; then
|
|
|
|
AC_SEARCH_LIBS([LAPACKE_sbdsdc], [lapack], [],
|
|
|
|
[AC_MSG_ERROR("LAPACK enabled but library not found")])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SEARCH_LIBS([fftw_execute], [fftw3],
|
|
|
|
[AC_SEARCH_LIBS([fftwf_execute], [fftw3f], [],
|
|
|
|
[AC_MSG_ERROR("single precision FFTW library not found")])]
|
|
|
|
[AC_DEFINE([HAVE_FFTW], [1], [Define to 1 if you have the `FFTW' library])]
|
|
|
|
[have_fftw=true])
|
|
|
|
|
2016-08-03 11:39:20 +01:00
|
|
|
CXXFLAGS=$CXXFLAGS_CPY
|
|
|
|
LDFLAGS=$LDFLAGS_CPY
|
2015-03-04 04:13:07 +00:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### SIMD instruction selection
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_ARG_ENABLE([simd],[AC_HELP_STRING([--enable-simd=<code>],
|
|
|
|
[select SIMD target (cf. README.md)])], [ac_SIMD=${enable_simd}], [ac_SIMD=GEN])
|
2016-07-30 17:53:18 +01:00
|
|
|
|
|
|
|
case ${ax_cv_cxx_compiler_vendor} in
|
|
|
|
clang|gnu)
|
|
|
|
case ${ac_SIMD} in
|
|
|
|
SSE4)
|
|
|
|
AC_DEFINE([SSE4],[1],[SSE4 intrinsics])
|
|
|
|
SIMD_FLAGS='-msse4.2';;
|
|
|
|
AVX)
|
|
|
|
AC_DEFINE([AVX1],[1],[AVX intrinsics])
|
|
|
|
SIMD_FLAGS='-mavx';;
|
|
|
|
AVXFMA4)
|
|
|
|
AC_DEFINE([AVXFMA4],[1],[AVX intrinsics with FMA4])
|
|
|
|
SIMD_FLAGS='-mavx -mfma4';;
|
2016-10-10 14:43:37 +01:00
|
|
|
AVXFMA)
|
|
|
|
AC_DEFINE([AVXFMA],[1],[AVX intrinsics with FMA3])
|
|
|
|
SIMD_FLAGS='-mavx -mfma';;
|
2016-07-30 17:53:18 +01:00
|
|
|
AVX2)
|
|
|
|
AC_DEFINE([AVX2],[1],[AVX2 intrinsics])
|
2016-08-05 10:36:00 +01:00
|
|
|
SIMD_FLAGS='-mavx2 -mfma';;
|
2016-10-31 16:31:27 +00:00
|
|
|
AVX512)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([AVX512],[1],[AVX512 intrinsics])
|
|
|
|
SIMD_FLAGS='-mavx512f -mavx512pf -mavx512er -mavx512cd';;
|
2016-10-31 16:31:27 +00:00
|
|
|
KNC)
|
2016-08-23 14:41:44 +01:00
|
|
|
AC_DEFINE([IMCI],[1],[IMCI intrinsics for Knights Corner])
|
2016-07-30 17:53:18 +01:00
|
|
|
SIMD_FLAGS='';;
|
2016-10-31 16:31:27 +00:00
|
|
|
KNL)
|
|
|
|
AC_DEFINE([AVX512],[1],[AVX512 intrinsics])
|
|
|
|
SIMD_FLAGS='-march=knl';;
|
2016-07-30 17:53:18 +01:00
|
|
|
GEN)
|
|
|
|
AC_DEFINE([GENERIC_VEC],[1],[generic vector code])
|
|
|
|
SIMD_FLAGS='';;
|
2016-08-23 14:41:44 +01:00
|
|
|
QPX|BGQ)
|
|
|
|
AC_DEFINE([QPX],[1],[QPX intrinsics for BG/Q])
|
|
|
|
SIMD_FLAGS='';;
|
2016-07-30 17:53:18 +01:00
|
|
|
*)
|
2016-08-04 16:19:59 +01:00
|
|
|
AC_MSG_ERROR(["SIMD option ${ac_SIMD} not supported by the GCC/Clang compiler"]);;
|
2016-07-30 17:53:18 +01:00
|
|
|
esac;;
|
|
|
|
intel)
|
|
|
|
case ${ac_SIMD} in
|
|
|
|
SSE4)
|
|
|
|
AC_DEFINE([SSE4],[1],[SSE4 intrinsics])
|
|
|
|
SIMD_FLAGS='-msse4.2 -xsse4.2';;
|
|
|
|
AVX)
|
|
|
|
AC_DEFINE([AVX1],[1],[AVX intrinsics])
|
|
|
|
SIMD_FLAGS='-mavx -xavx';;
|
2016-10-10 14:43:37 +01:00
|
|
|
AVXFMA)
|
|
|
|
AC_DEFINE([AVXFMA],[1],[AVX intrinsics with FMA4])
|
|
|
|
SIMD_FLAGS='-mavx -mfma';;
|
2016-07-30 17:53:18 +01:00
|
|
|
AVX2)
|
|
|
|
AC_DEFINE([AVX2],[1],[AVX2 intrinsics])
|
|
|
|
SIMD_FLAGS='-march=core-avx2 -xcore-avx2';;
|
|
|
|
AVX512)
|
|
|
|
AC_DEFINE([AVX512],[1],[AVX512 intrinsics])
|
|
|
|
SIMD_FLAGS='-xcore-avx512';;
|
2016-10-31 16:31:27 +00:00
|
|
|
KNC)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([IMCI],[1],[IMCI Intrinsics for Knights Corner])
|
|
|
|
SIMD_FLAGS='';;
|
2016-10-31 16:31:27 +00:00
|
|
|
KNL)
|
|
|
|
AC_DEFINE([AVX512],[1],[AVX512 intrinsics for Knights Landing])
|
|
|
|
SIMD_FLAGS='-xmic-avx512';;
|
2016-07-30 17:53:18 +01:00
|
|
|
GEN)
|
|
|
|
AC_DEFINE([GENERIC_VEC],[1],[generic vector code])
|
|
|
|
SIMD_FLAGS='';;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR(["SIMD option ${ac_SIMD} not supported by the Intel compiler"]);;
|
|
|
|
esac;;
|
|
|
|
*)
|
|
|
|
AC_MSG_WARN([Compiler unknown, using generic vector code])
|
|
|
|
AC_DEFINE([GENERIC_VEC],[1],[generic vector code]);;
|
2015-03-04 04:13:07 +00:00
|
|
|
esac
|
2016-07-30 17:53:18 +01:00
|
|
|
AM_CXXFLAGS="$SIMD_FLAGS $AM_CXXFLAGS"
|
|
|
|
AM_CFLAGS="$SIMD_FLAGS $AM_CFLAGS"
|
2015-03-04 04:13:07 +00:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
case ${ac_SIMD} in
|
2016-10-31 16:31:27 +00:00
|
|
|
AVX512|KNL)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([TEST_ZMM],[1],[compile ZMM test]);;
|
|
|
|
*)
|
|
|
|
;;
|
2015-12-15 23:14:12 +00:00
|
|
|
esac
|
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### Precision selection
|
|
|
|
AC_ARG_ENABLE([precision],
|
|
|
|
[AC_HELP_STRING([--enable-precision=single|double],
|
|
|
|
[Select default word size of Real])],
|
|
|
|
[ac_PRECISION=${enable_precision}],[ac_PRECISION=double])
|
|
|
|
|
2015-07-01 22:45:15 +01:00
|
|
|
case ${ac_PRECISION} in
|
|
|
|
single)
|
|
|
|
AC_DEFINE([GRID_DEFAULT_PRECISION_SINGLE],[1],[GRID_DEFAULT_PRECISION is SINGLE] )
|
|
|
|
;;
|
|
|
|
double)
|
|
|
|
AC_DEFINE([GRID_DEFAULT_PRECISION_DOUBLE],[1],[GRID_DEFAULT_PRECISION is DOUBLE] )
|
|
|
|
;;
|
|
|
|
esac
|
2015-03-29 21:44:22 +01:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### communication type selection
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_ARG_ENABLE([comms],[AC_HELP_STRING([--enable-comms=none|mpi|mpi-auto|mpi3|mpi3-auto|shmem],
|
|
|
|
[Select communications])],[ac_COMMS=${enable_comms}],[ac_COMMS=none])
|
2015-03-29 21:44:22 +01:00
|
|
|
|
|
|
|
case ${ac_COMMS} in
|
|
|
|
none)
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_DEFINE([GRID_COMMS_NONE],[1],[GRID_COMMS_NONE] )
|
2016-11-03 13:48:07 +00:00
|
|
|
comms_type='none'
|
2015-03-29 21:44:22 +01:00
|
|
|
;;
|
2016-11-03 13:48:07 +00:00
|
|
|
mpi3l*)
|
|
|
|
AC_DEFINE([GRID_COMMS_MPI3L],[1],[GRID_COMMS_MPI3L] )
|
|
|
|
comms_type='mpi3l'
|
2016-08-04 16:19:59 +01:00
|
|
|
;;
|
2016-11-03 13:48:07 +00:00
|
|
|
mpi3*)
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_DEFINE([GRID_COMMS_MPI3],[1],[GRID_COMMS_MPI3] )
|
2016-11-03 13:48:07 +00:00
|
|
|
comms_type='mpi3'
|
2016-10-20 16:56:40 +01:00
|
|
|
;;
|
2016-11-03 13:48:07 +00:00
|
|
|
mpi*)
|
|
|
|
AC_DEFINE([GRID_COMMS_MPI],[1],[GRID_COMMS_MPI] )
|
|
|
|
comms_type='mpi'
|
2016-11-01 11:35:43 +00:00
|
|
|
;;
|
2016-02-11 00:50:32 +00:00
|
|
|
shmem)
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_DEFINE([GRID_COMMS_SHMEM],[1],[GRID_COMMS_SHMEM] )
|
2016-11-03 13:48:07 +00:00
|
|
|
comms_type='shmem'
|
2016-02-11 00:50:32 +00:00
|
|
|
;;
|
2015-03-29 21:44:22 +01:00
|
|
|
*)
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_MSG_ERROR([${ac_COMMS} unsupported --enable-comms option]);
|
2015-03-29 21:44:22 +01:00
|
|
|
;;
|
|
|
|
esac
|
2016-10-31 16:31:27 +00:00
|
|
|
case ${ac_COMMS} in
|
|
|
|
*-auto)
|
|
|
|
LX_FIND_MPI
|
|
|
|
if test "x$have_CXX_mpi" = 'xno'; then AC_MSG_ERROR(["MPI not found"]); fi
|
|
|
|
AM_CXXFLAGS="$MPI_CXXFLAGS $AM_CXXFLAGS"
|
|
|
|
AM_CFLAGS="$MPI_CFLAGS $AM_CFLAGS"
|
|
|
|
AM_LDFLAGS="`echo $MPI_CXXLDFLAGS | sed -E 's/-l@<:@^ @:>@+//g'` $AM_LDFLAGS"
|
|
|
|
LIBS="`echo $MPI_CXXLDFLAGS | sed -E 's/-L@<:@^ @:>@+//g'` $LIBS";;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-11-03 13:48:07 +00:00
|
|
|
AM_CONDITIONAL(BUILD_COMMS_SHMEM, [ test "${comms_type}X" == "shmemX" ])
|
|
|
|
AM_CONDITIONAL(BUILD_COMMS_MPI, [ test "${comms_type}X" == "mpiX" ])
|
|
|
|
AM_CONDITIONAL(BUILD_COMMS_MPI3, [ test "${comms_type}X" == "mpi3X" ] )
|
|
|
|
AM_CONDITIONAL(BUILD_COMMS_MPI3L, [ test "${comms_type}X" == "mpi3lX" ] )
|
|
|
|
AM_CONDITIONAL(BUILD_COMMS_NONE, [ test "${comms_type}X" == "noneX" ])
|
2015-04-03 04:52:53 +01:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### RNG selection
|
2015-12-19 18:32:25 +00:00
|
|
|
AC_ARG_ENABLE([rng],[AC_HELP_STRING([--enable-rng=ranlux48|mt19937],\
|
2016-10-31 16:31:27 +00:00
|
|
|
[Select Random Number Generator to be used])],\
|
|
|
|
[ac_RNG=${enable_rng}],[ac_RNG=ranlux48])
|
2016-07-30 17:53:18 +01:00
|
|
|
|
2015-12-19 18:32:25 +00:00
|
|
|
case ${ac_RNG} in
|
|
|
|
ranlux48)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([RNG_RANLUX],[1],[RNG_RANLUX] )
|
2015-12-19 18:32:25 +00:00
|
|
|
;;
|
|
|
|
mt19937)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([RNG_MT19937],[1],[RNG_MT19937] )
|
2015-12-19 18:32:25 +00:00
|
|
|
;;
|
|
|
|
*)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_MSG_ERROR([${ac_RNG} unsupported --enable-rng option]);
|
2015-12-19 18:32:25 +00:00
|
|
|
;;
|
|
|
|
esac
|
2016-06-03 11:24:26 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
############### Timer option
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_ARG_ENABLE([timers],[AC_HELP_STRING([--enable-timers],\
|
2016-10-31 16:31:27 +00:00
|
|
|
[Enable system dependent high res timers])],\
|
|
|
|
[ac_TIMERS=${enable_timers}],[ac_TIMERS=yes])
|
|
|
|
|
2016-06-03 11:24:26 +01:00
|
|
|
case ${ac_TIMERS} in
|
|
|
|
yes)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([TIMERS_ON],[1],[TIMERS_ON] )
|
2016-06-03 11:24:26 +01:00
|
|
|
;;
|
|
|
|
no)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_DEFINE([TIMERS_OFF],[1],[TIMERS_OFF] )
|
2016-06-03 11:24:26 +01:00
|
|
|
;;
|
|
|
|
*)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_MSG_ERROR([${ac_TIMERS} unsupported --enable-timers option]);
|
2016-06-03 11:24:26 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Chroma regression test
|
2016-10-31 16:31:27 +00:00
|
|
|
AC_ARG_ENABLE([chroma],[AC_HELP_STRING([--enable-chroma],
|
|
|
|
[Expect chroma compiled under c++11 ])],ac_CHROMA=yes,ac_CHROMA=no)
|
|
|
|
|
2015-12-10 22:55:00 +00:00
|
|
|
case ${ac_CHROMA} in
|
2016-07-30 17:53:18 +01:00
|
|
|
yes|no)
|
2015-12-10 22:55:00 +00:00
|
|
|
;;
|
|
|
|
*)
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_MSG_ERROR([${ac_CHROMA} unsupported --enable-chroma option]);
|
2015-12-10 22:55:00 +00:00
|
|
|
;;
|
|
|
|
esac
|
2016-10-31 16:31:27 +00:00
|
|
|
|
2015-12-10 22:55:00 +00:00
|
|
|
AM_CONDITIONAL(BUILD_CHROMA_REGRESSION,[ test "X${ac_CHROMA}X" == "XyesX" ])
|
2015-03-29 21:44:22 +01:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Doxygen
|
2016-07-07 22:31:07 +01:00
|
|
|
AC_PROG_DOXYGEN
|
2015-07-22 06:41:01 +01:00
|
|
|
|
2016-07-07 22:31:07 +01:00
|
|
|
if test -n "$DOXYGEN"
|
|
|
|
then
|
|
|
|
AC_CONFIG_FILES([docs/doxy.cfg])
|
|
|
|
fi
|
2015-05-27 02:34:56 +01:00
|
|
|
|
2016-07-30 17:53:18 +01:00
|
|
|
############### Ouput
|
|
|
|
cwd=`pwd -P`; cd ${srcdir}; abs_srcdir=`pwd -P`; cd ${cwd}
|
|
|
|
AM_CXXFLAGS="-I${abs_srcdir}/include $AM_CXXFLAGS"
|
|
|
|
AM_CFLAGS="-I${abs_srcdir}/include $AM_CFLAGS"
|
2016-08-03 15:07:42 +01:00
|
|
|
AM_LDFLAGS="-L${cwd}/lib $AM_LDFLAGS"
|
2016-07-30 17:53:18 +01:00
|
|
|
AC_SUBST([AM_CFLAGS])
|
|
|
|
AC_SUBST([AM_CXXFLAGS])
|
|
|
|
AC_SUBST([AM_LDFLAGS])
|
2015-03-04 04:53:40 +00:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
2015-04-18 14:56:05 +01:00
|
|
|
AC_CONFIG_FILES(lib/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/Makefile)
|
2016-07-07 22:31:07 +01:00
|
|
|
AC_CONFIG_FILES(tests/IO/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/core/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/debug/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/forces/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/hmc/Makefile)
|
|
|
|
AC_CONFIG_FILES(tests/solver/Makefile)
|
2015-12-10 22:55:00 +00:00
|
|
|
AC_CONFIG_FILES(tests/qdpxx/Makefile)
|
2015-05-02 17:52:36 +01:00
|
|
|
AC_CONFIG_FILES(benchmarks/Makefile)
|
2015-03-04 03:12:19 +00:00
|
|
|
AC_OUTPUT
|
2015-05-18 09:15:14 +01:00
|
|
|
|
2016-10-31 16:31:27 +00:00
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2015-05-18 09:15:14 +01:00
|
|
|
Summary of configuration for $PACKAGE v$VERSION
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-08-03 11:39:20 +01:00
|
|
|
|
|
|
|
----- PLATFORM ----------------------------------------
|
2016-10-31 16:31:27 +00:00
|
|
|
architecture (build) : $build_cpu
|
|
|
|
os (build) : $build_os
|
|
|
|
architecture (target) : $target_cpu
|
|
|
|
os (target) : $target_os
|
|
|
|
compiler vendor : ${ax_cv_cxx_compiler_vendor}
|
|
|
|
compiler version : ${ax_cv_gxx_version}
|
2016-08-03 11:39:20 +01:00
|
|
|
----- BUILD OPTIONS -----------------------------------
|
2016-10-31 16:31:27 +00:00
|
|
|
SIMD : ${ac_SIMD}
|
|
|
|
Threading : ${ac_openmp}
|
2016-11-03 13:48:07 +00:00
|
|
|
Communications type : ${comms_type}
|
2016-10-31 16:31:27 +00:00
|
|
|
Default precision : ${ac_PRECISION}
|
|
|
|
RNG choice : ${ac_RNG}
|
|
|
|
GMP : `if test "x$have_gmp" = xtrue; then echo yes; else echo no; fi`
|
|
|
|
LAPACK : ${ac_LAPACK}
|
|
|
|
FFTW : `if test "x$have_fftw" = xtrue; then echo yes; else echo no; fi`
|
|
|
|
build DOXYGEN documentation : `if test "x$enable_doc" = xyes; then echo yes; else echo no; fi`
|
|
|
|
graphs and diagrams : `if test "x$enable_dot" = xyes; then echo yes; else echo no; fi`
|
2016-08-03 11:39:20 +01:00
|
|
|
----- BUILD FLAGS -------------------------------------
|
2016-10-31 16:31:27 +00:00
|
|
|
CXXFLAGS:
|
2016-09-27 11:54:37 +01:00
|
|
|
`echo ${AM_CXXFLAGS} ${CXXFLAGS} | tr ' ' '\n' | sed 's/^-/ -/g'`
|
2016-10-31 16:31:27 +00:00
|
|
|
LDFLAGS:
|
2016-09-27 11:54:37 +01:00
|
|
|
`echo ${AM_LDFLAGS} ${LDFLAGS} | tr ' ' '\n' | sed 's/^-/ -/g'`
|
2016-10-31 16:31:27 +00:00
|
|
|
LIBS:
|
2016-09-27 11:54:37 +01:00
|
|
|
`echo ${LIBS} | tr ' ' '\n' | sed 's/^-/ -/g'`
|
2016-10-31 16:31:27 +00:00
|
|
|
-------------------------------------------------------" > config.summary
|
|
|
|
echo ""
|
|
|
|
cat config.summary
|
|
|
|
echo ""
|