Select Git revision
configure.ac
configure.ac 7.57 KiB
AC_INIT(m4ri,20200125)
AC_CANONICAL_HOST
AC_CONFIG_SRCDIR(m4ri/brilliantrussian.c)
AM_INIT_AUTOMAKE
dnl Include maintainer mode targets.
AM_MAINTAINER_MODE
dnl Needed when reconfiguring with 'autoreconf -i -s'
AC_CONFIG_MACRO_DIR([m4])
dnl Compiling with per-target flags (test_elimination.c) requires AM_PROG_CC_C_O.
AM_PROG_CC_C_O
LT_INIT
AC_PROG_INSTALL
AC_CONFIG_HEADERS(m4ri/config.h)
AC_PROG_CC_C99()
if test "$ac_cv_prog_cc_c99" = "no"; then
AC_MSG_ERROR([C99 support is required but not found.])
fi
# Find and set LIBM on the platform.
LT_LIB_M
AC_SUBST(LIBM)
# SSE2 support
AC_ARG_ENABLE([sse2],
AS_HELP_STRING([--disable-sse2], [don't use SSE2 instruction set.]),
, [if test "$m4ri_wrapword" = "yes"; then enable_sse2="no"; else enable_sse2="yes"; fi])
AS_IF([test "x$enable_sse2" != "xno"], [
if test "$m4ri_wrapword" = "yes"; then
AC_MSG_ERROR([SSE2 cannot be supported when wrapping word in a C++ class.])
fi
case $host_cpu in i[[3456]]86*|x86_64*)
AX_EXT()
esac
])
if test x"$ax_cv_have_sse2_ext" = x"yes"; then
M4RI_HAVE_SSE2=1
else
M4RI_HAVE_SSE2=0
fi
AC_SUBST(M4RI_HAVE_SSE2)
AC_ARG_WITH(papi,
AS_HELP_STRING([--with-papi@<:@=PATH@:>@], [The PAPI install prefix, if configure can't find it.]),
[m4ri_config_papi=$withval])
AC_ARG_WITH(cachesize,
AS_HELP_STRING([--with-cachesize@<:@=VALUE@:>@], [L1,L2 and L3 cache sizes in bytes, separated by a colon. Overrides cache tuning.]),[m4ri_config_cachesize=$withval])
AC_CHECK_HEADER([mm_malloc.h],AC_DEFINE(HAVE_MM_MALLOC,,[Support aligned allocations]),)
if test "$ac_cv_header_mm_malloc_h" = "yes"; then
M4RI_HAVE_MM_MALLOC=1
else
M4RI_HAVE_MM_MALLOC=0
fi
AC_SUBST(M4RI_HAVE_MM_MALLOC)
# Correctly working posix_memalign
AX_FUNC_POSIX_MEMALIGN