1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00
Grid/configure.ac

81 lines
2.1 KiB
Plaintext
Raw Normal View History

2015-03-04 04:13:07 +00:00
# Process this file with autoconf to produce a configure script.
AC_INIT([Grid], [1.0], [paboyle@ph.ed.ac.uk])
2015-03-04 04:53:40 +00:00
AM_INIT_AUTOMAKE
2015-03-04 04:13:07 +00:00
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([Grid.h])
AC_CONFIG_HEADERS([Grid_config.h])
# Checks for programs.
AC_PROG_CXX
AC_OPENMP
2015-03-04 04:53:40 +00:00
AC_PROG_RANLIB
2015-03-04 04:13:07 +00:00
# Checks for libraries.
2015-03-04 13:25:23 +00:00
#AX_GCC_VAR_ATTRIBUTE(aligned)
2015-03-04 04:13:07 +00:00
# Checks for header files.
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(malloc/malloc.h)
AC_CHECK_HEADERS(malloc.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday])
2015-03-04 04:53:40 +00:00
AC_ARG_ENABLE([simd],[AC_HELP_STRING([--enable-simd=SSE|AVX|AVX2|AVX512],[Select instructions])],[ac_SIMD=${enable_simd}],[ac_SIMD=AVX2])
2015-03-04 04:13:07 +00:00
case ${ac_SIMD} in
SSE2)
echo Configuring for SSE2
AC_DEFINE([SSE2],[1],[SSE2] )
;;
AVX)
echo Configuring for AVX
2015-03-04 04:53:40 +00:00
AC_DEFINE([AVX1],[1],[AVX] )
2015-03-04 04:13:07 +00:00
;;
AVX2)
echo Configuring for AVX2
AC_DEFINE([AVX2],[1],[AVX2] )
;;
AVX512)
echo Configuring for AVX512
AC_DEFINE([AVX512],[1],[AVX512] )
;;
*)
AC_MSG_ERROR([${ac_SIMD} unsupported --enable-simd option]);
;;
esac
2015-03-29 21:44:22 +01:00
AC_ARG_ENABLE([comms],[AC_HELP_STRING([--enable-comms=none|fake|mpi],[Select communications])],[ac_COMMS=${enable_comms}],[ac_COMMS=none])
case ${ac_COMMS} in
fake)
echo Configuring for FAKE communications
AC_DEFINE([GRID_COMMS_FAKE],[1],[GRID_COMMS_FAKE] )
;;
none)
echo Configuring for NO communications
AC_DEFINE([GRID_COMMS_NONE],[1],[GRID_COMMS_NONE] )
;;
mpi)
echo Configuring for MPI communications
AC_DEFINE([GRID_COMMS_MPI],[1],[GRID_COMMS_MPI] )
;;
*)
AC_MSG_ERROR([${ac_COMMS} unsupported --enable-comms option]);
;;
esac
AM_CONDITIONAL(BUILD_COMMS_MPI,[ test "X${ac_COMMS}X" == "XmpiX" ])
AM_CONDITIONAL(BUILD_COMMS_FAKE,[ test "X${ac_COMMS}X" == "XfakeX" ])
AM_CONDITIONAL(BUILD_COMMS_NONE,[ test "X${ac_COMMS}X" == "XnoneX" ])
2015-03-29 21:44:22 +01:00
2015-03-04 04:53:40 +00:00
AC_CONFIG_FILES(Makefile)
2015-03-04 03:12:19 +00:00
AC_OUTPUT