Source

M4RI / configure.in

Full commit
################################# 
# Check this is SUN compiler # 
################################# 

AC_DEFUN([AX_CHECK_SUN_COMPILER], 
[ 
       $CC -V 2>test.txt 
       SUN_STR=`head -1 test.txt |cut -f2 -d" "` 
       rm -rf test.txt 
       if test "$SUN_STR" = "Sun"; then 
               ax_sun_cc_compiler=yes 
       fi 

       $CXX -V 2>test.txt 
       SUN_STR=`head -1 test.txt |cut -f2 -d" "` 
       rm -rf test.txt 
       if test "$SUN_STR" = "Sun"; then 
               ax_sun_cc_compiler=yes 
       fi 

]) 

# ===========================================================================
#                                    Main
# ===========================================================================

AC_INIT(libm4ri,1.0.1)

AC_CANONICAL_HOST

AC_CONFIG_SRCDIR(src/brilliantrussian.c)

AM_INIT_AUTOMAKE

AC_PROG_LIBTOOL

AC_PROG_INSTALL

AC_CONFIG_HEADERS(src/config.h)

m4_include([m4/ax_gcc_x86_cpuid.m4])
m4_include([m4/ax_ext.m4])dnl
m4_include([m4/ax_cpu_vendor.m4])dnl
m4_include([m4/ax_count_cpus.m4])dnl
m4_include([m4/ax_cache_size.m4])dnl
m4_include([m4/ax_check_compiler_flags.m4])dnl
m4_include([m4/ax_openmp.m4])dnl

# C99 for suncc
AX_CHECK_SUN_COMPILER()
C99_FLAG="-std=c99"
if test "x$ax_sun_cc_compiler" = "xyes"; then
   C99_FLAG="-xc99=all,lib"
fi
AC_SUBST(C99_FLAG)

# SSE2 support
case $host_cpu in
     i[[3456]]86*|x86_64*)o
        AX_CPU_VENDOR()
        if test "x$ax_cpu_vendor" = "xIntel"; then
            AX_EXT() # SSE2 is slower on the Opteron
        fi
esac

AC_CHECK_HEADER([mm_malloc.h],AC_DEFINE(HAVE_MM_MALLOC,,[Support aligned allocations]),)

# OpenMP support
AC_ARG_WITH(openmp, [  --with-openmp           add support for OpenMP Parallelism])
if test "x$enable_openmp" == "xyes"; then
   AX_OPENMP()
fi
AC_SUBST(OPENMP_CFLAGS)

# Debugging support
AC_ARG_ENABLE(debug, [  --enable-debug          Enable assert() statements for debugging.])
if test "x$enable_debug" == x"yes"; then
   DEBUG_FLAGS="-g"
   AC_SUBST(DEBUG_FLAGS)
else
   AC_DEFINE(NDEBUG,1,[Define whether debugging is enabled])
fi

# L1 and L2 Cache Size
AX_CACHE_SIZE()

AC_PROG_MAKE_SET

AC_CONFIG_FILES([Makefile])
AC_OUTPUT