]> AND Private Git Repository - Cipher_code.git/blob - IDA_new/gf-complete/configure.ac
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
add
[Cipher_code.git] / IDA_new / gf-complete / configure.ac
1 # gf-complete autoconf template
2
3 # FIXME - add project url as the last argument
4 AC_INIT(gf-complete, 1.0)
5
6 # Override default CFLAGS
7 : ${CFLAGS="-Wall -Wpointer-arith -O3 -g"}
8
9 AC_PREREQ([2.61])
10
11 AM_INIT_AUTOMAKE([no-dependencies foreign parallel-tests])
12 LT_INIT # libtool
13
14 AC_CONFIG_HEADER(include/config.h)
15
16 dnl Needed when reconfiguring with 'autoreconf -i -s'
17 AC_CONFIG_MACRO_DIR([m4])
18
19 # This prevents './configure; make' from trying to run autotools.
20 AM_MAINTAINER_MODE([disable])
21
22 dnl Compiling with per-target flags requires AM_PROG_CC_C_O.
23 AC_PROG_CC
24
25 # Check for functions to provide aligned memory
26 #
27 AC_CHECK_FUNCS([posix_memalign],
28  [found_memalign=yes; break])
29
30 AS_IF([test "x$found_memalign" != "xyes"], [AC_MSG_WARN([No function for aligned memory allocation found])])
31
32 AC_ARG_ENABLE([debug-functions],
33               AS_HELP_STRING([--enable-debug-func], [Enable debugging of functions selected]))
34 AS_IF([test "x$enable_debug_func" = "xyes"], [CPPFLAGS="$CPPFLAGS -DDEBUG_FUNCTIONS"])
35
36 AC_ARG_ENABLE([debug-cpu],
37               AS_HELP_STRING([--enable-debug-cpu], [Enable debugging of SIMD detection]))
38 AS_IF([test "x$enable_debug_cpu" = "xyes"], [CPPFLAGS="$CPPFLAGS -DDEBUG_CPU_DETECTION"])
39
40 AX_EXT()
41
42 AC_ARG_ENABLE([neon],
43               AS_HELP_STRING([--disable-neon], [Build without NEON optimizations]))
44
45 AS_IF([test "x$enable_neon" != "xno"],
46       [noneon_CPPFLAGS=$CPPFLAGS
47        CPPFLAGS="$CPPFLAGS $SIMD_FLAGS"
48        AC_CHECK_HEADER([arm_neon.h],
49                        [have_neon=yes],
50                        [have_neon=no
51                         CPPFLAGS=$noneon_CPPFLAGS])],
52       [have_neon=no
53        AS_IF([test "x$ax_cv_have_neon_ext" = "xyes"],
54              [SIMD_FLAGS=""])
55       ])
56
57 AS_IF([test "x$have_neon" = "xno"],
58       [AS_IF([test "x$enable_neon" = "xyes"],
59              [AC_MSG_ERROR([neon requested but arm_neon.h not found])])
60       ])
61 AM_CONDITIONAL([HAVE_NEON], [test "x$have_neon" = "xyes"])
62
63 AC_ARG_ENABLE([sse],
64               AS_HELP_STRING([--disable-sse], [Build without SSE optimizations]),
65               [if   test "x$enableval" = "xno" ; then
66                 SIMD_FLAGS=""
67                 echo "DISABLED SSE!!!"
68               fi]
69 )
70
71 AC_ARG_ENABLE([valgrind],
72             [AS_HELP_STRING([--enable-valgrind], [run tests with valgrind])],
73             [],
74             [enable_valgrind=no])
75 AM_CONDITIONAL(ENABLE_VALGRIND, test "x$enable_valgrind" != xno)
76
77 AC_ARG_ENABLE([avx], AS_HELP_STRING([--enable-avx], [Build with AVX optimizations]))
78 AX_CHECK_COMPILE_FLAG(-mavx, [ax_cv_support_avx=yes], [])
79
80 AS_IF([test "x$enable_avx" = "xyes"],
81       [AS_IF([test "x$ax_cv_support_avx" = "xno"],
82              [AC_MSG_ERROR([AVX requested but compiler does not support -mavx])],
83              [SIMD_FLAGS="$SIMD_FLAGS -mavx"])
84       ])
85
86 AC_CONFIG_FILES([Makefile src/Makefile tools/Makefile test/Makefile examples/Makefile])
87 AC_OUTPUT