2015-05-18 09:15:14 +01:00
|
|
|
# -*- Autoconf -*-
|
2015-03-04 04:13:07 +00:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
2015-05-18 09:15:14 +01:00
|
|
|
#
|
|
|
|
# Project Grid package
|
|
|
|
#
|
2015-05-27 10:30:11 +01:00
|
|
|
# Time-stamp: <2015-05-27 18:29:04 neo>
|
2015-05-18 09:15:14 +01:00
|
|
|
|
2015-05-22 09:33:15 +01:00
|
|
|
AC_PREREQ([2.63])
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_INIT([Grid], [1.0], [paboyle@ph.ed.ac.uk])
|
2015-05-18 09:15:14 +01:00
|
|
|
AC_CANONICAL_SYSTEM
|
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])
|
|
|
|
AC_CONFIG_HEADERS([lib/Grid_config.h])
|
2015-05-18 09:15:14 +01:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
Configuring $PACKAGE v$VERSION for $host
|
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
])
|
2015-03-04 04:13:07 +00:00
|
|
|
|
|
|
|
# Checks for programs.
|
2015-05-13 00:31:00 +01:00
|
|
|
AC_LANG(C++)
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_OPENMP
|
2015-03-04 04:53:40 +00:00
|
|
|
AC_PROG_RANLIB
|
2015-05-26 04:02:54 +01:00
|
|
|
AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
|
2015-05-27 10:30:11 +01:00
|
|
|
AX_EXT
|
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)
|
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-05-18 07:47:05 +01:00
|
|
|
AC_CHECK_HEADERS(gmp.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
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
2015-05-19 05:54:55 +01:00
|
|
|
echo
|
|
|
|
echo Checking libraries
|
|
|
|
echo :::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
|
|
|
|
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_CHECK_FUNCS([gettimeofday])
|
|
|
|
|
2015-05-19 05:54:55 +01:00
|
|
|
AC_CHECK_LIB([gmp],[__gmpf_init],,
|
|
|
|
[AC_MSG_ERROR(GNU Multiple Precision GMP library was not found in your system.
|
|
|
|
Please install or provide the correct path to your installation
|
|
|
|
Info at: http://www.gmplib.org)])
|
|
|
|
|
|
|
|
AC_CHECK_LIB([mpfr],[mpfr_init],,
|
|
|
|
[AC_MSG_ERROR(GNU Multiple Precision MPFR library was not found in your system.
|
|
|
|
Please install or provide the correct path to your installation
|
|
|
|
Info at: http://www.mpfr.org/)])
|
2015-05-18 09:15:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-27 10:30:11 +01:00
|
|
|
AC_ARG_ENABLE([simd],[AC_HELP_STRING([--enable-simd=SSE4|AVX|AVX2|AVX512|MIC],\
|
2015-04-23 08:02:51 +01:00
|
|
|
[Select instructions to be SSE4.0, AVX 1.0, AVX 2.0+FMA, AVX 512, MIC])],\
|
|
|
|
[ac_SIMD=${enable_simd}],[ac_SIMD=AVX2])
|
2015-03-04 04:13:07 +00:00
|
|
|
|
2015-05-27 10:30:11 +01:00
|
|
|
supported=no
|
|
|
|
|
2015-03-04 04:13:07 +00:00
|
|
|
case ${ac_SIMD} in
|
2015-04-16 14:48:21 +01:00
|
|
|
SSE4)
|
|
|
|
echo Configuring for SSE4
|
2015-05-27 10:30:11 +01:00
|
|
|
if test x"$ax_cv_support_ssse3_ext" = x"yes"; then dnl minimal support for SSE4
|
2015-04-16 14:48:21 +01:00
|
|
|
AC_DEFINE([SSE4],[1],[SSE4] )
|
2015-05-27 10:30:11 +01:00
|
|
|
supported=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([Your processor does not support SSE4 instructions])
|
|
|
|
fi
|
2015-03-04 04:13:07 +00:00
|
|
|
;;
|
|
|
|
AVX)
|
|
|
|
echo Configuring for AVX
|
2015-05-27 10:30:11 +01:00
|
|
|
if test x"$ax_cv_support_avx_ext" = x"yes"; then dnl minimal support for AVX
|
2015-03-04 04:53:40 +00:00
|
|
|
AC_DEFINE([AVX1],[1],[AVX] )
|
2015-05-27 10:30:11 +01:00
|
|
|
supported=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([Your processor does not support AVX instructions])
|
|
|
|
fi
|
2015-03-04 04:13:07 +00:00
|
|
|
;;
|
|
|
|
AVX2)
|
|
|
|
echo Configuring for AVX2
|
2015-05-27 10:30:11 +01:00
|
|
|
if test x"$ax_cv_support_avx2_ext" = x"yes"; then dnl minimal support for AVX2
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_DEFINE([AVX2],[1],[AVX2] )
|
2015-05-27 10:30:11 +01:00
|
|
|
supported=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([Your processor does not support AVX2 instructions])
|
|
|
|
fi
|
2015-03-04 04:13:07 +00:00
|
|
|
;;
|
2015-04-23 08:02:51 +01:00
|
|
|
AVX512|MIC)
|
|
|
|
echo Configuring for AVX512 and MIC
|
2015-03-04 04:13:07 +00:00
|
|
|
AC_DEFINE([AVX512],[1],[AVX512] )
|
2015-05-27 10:30:11 +01:00
|
|
|
supported=yes
|
2015-03-04 04:13:07 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([${ac_SIMD} unsupported --enable-simd option]);
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-03-29 21:44:22 +01:00
|
|
|
|
2015-04-06 11:26:24 +01:00
|
|
|
AC_ARG_ENABLE([comms],[AC_HELP_STRING([--enable-comms=none|mpi],[Select communications])],[ac_COMMS=${enable_comms}],[ac_COMMS=none])
|
2015-03-29 21:44:22 +01:00
|
|
|
|
|
|
|
case ${ac_COMMS} in
|
|
|
|
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
|
|
|
|
|
2015-04-03 04:52:53 +01:00
|
|
|
AM_CONDITIONAL(BUILD_COMMS_MPI,[ test "X${ac_COMMS}X" == "XmpiX" ])
|
|
|
|
AM_CONDITIONAL(BUILD_COMMS_NONE,[ test "X${ac_COMMS}X" == "XnoneX" ])
|
|
|
|
|
2015-03-29 21:44:22 +01:00
|
|
|
|
2015-05-27 02:34:56 +01:00
|
|
|
###################################################################
|
|
|
|
# Checks for doxygen support
|
|
|
|
# if present enables the "make doxyfile" command
|
|
|
|
echo
|
|
|
|
echo Checking doxygen support
|
|
|
|
echo :::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
AC_PROG_DOXYGEN
|
|
|
|
|
|
|
|
if test -n "$DOXYGEN"
|
|
|
|
then
|
|
|
|
AC_CONFIG_FILES([docs/doxy.cfg])
|
|
|
|
fi
|
|
|
|
|
2015-05-27 10:30:11 +01:00
|
|
|
echo
|
|
|
|
echo Creating configuration files
|
|
|
|
echo :::::::::::::::::::::::::::::::::::::::::::
|
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)
|
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
|
|
|
|
|
|
|
|
|
|
|
echo "
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Summary of configuration for $PACKAGE v$VERSION
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
The following features are enabled:
|
|
|
|
|
|
|
|
- architecture (build) : $build_cpu
|
|
|
|
- os (build) : $build_os
|
|
|
|
- architecture (target) : $target_cpu
|
|
|
|
- os (target) : $target_os
|
2015-05-27 02:34:56 +01:00
|
|
|
- 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`
|
2015-05-27 10:30:11 +01:00
|
|
|
- Supported SIMD flags : $SIMD_FLAGS
|
2015-05-18 09:15:14 +01:00
|
|
|
----------------------------------------------------------
|
2015-05-27 10:30:11 +01:00
|
|
|
- enabled simd support : ${ac_SIMD} (supported: $supported )
|
2015-05-18 09:15:14 +01:00
|
|
|
- communications type : ${ac_COMMS}
|
|
|
|
|
|
|
|
|
|
|
|
"
|