xref: /freebsd/sys/contrib/libsodium/configure.ac (revision 0ac341f145426f1f0d00b64d35f19fada2be635c)
1*0ac341f1SConrad MeyerAC_PREREQ([2.65])
2*0ac341f1SConrad MeyerAC_INIT([libsodium],[1.0.16],
3*0ac341f1SConrad Meyer  [https://github.com/jedisct1/libsodium/issues],
4*0ac341f1SConrad Meyer  [libsodium],
5*0ac341f1SConrad Meyer  [https://github.com/jedisct1/libsodium])
6*0ac341f1SConrad MeyerAC_CONFIG_AUX_DIR([build-aux])
7*0ac341f1SConrad MeyerAC_CONFIG_MACRO_DIR([m4])
8*0ac341f1SConrad MeyerAC_CONFIG_SRCDIR([src/libsodium/sodium/version.c])
9*0ac341f1SConrad MeyerAC_CANONICAL_HOST
10*0ac341f1SConrad MeyerAM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar foreign subdir-objects])
11*0ac341f1SConrad Meyerm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12*0ac341f1SConrad MeyerAM_MAINTAINER_MODE
13*0ac341f1SConrad MeyerAM_DEP_TRACK
14*0ac341f1SConrad Meyer
15*0ac341f1SConrad MeyerAC_SUBST(VERSION)
16*0ac341f1SConrad MeyerISODATE=`date +%Y-%m-%d`
17*0ac341f1SConrad MeyerAC_SUBST(ISODATE)
18*0ac341f1SConrad Meyer
19*0ac341f1SConrad MeyerSODIUM_LIBRARY_VERSION_MAJOR=10
20*0ac341f1SConrad MeyerSODIUM_LIBRARY_VERSION_MINOR=1
21*0ac341f1SConrad MeyerDLL_VERSION=8
22*0ac341f1SConrad MeyerSODIUM_LIBRARY_VERSION=24:0:1
23*0ac341f1SConrad Meyer#                       | | |
24*0ac341f1SConrad Meyer#                +------+ | +---+
25*0ac341f1SConrad Meyer#                |        |     |
26*0ac341f1SConrad Meyer#             current:revision:age
27*0ac341f1SConrad Meyer#                |        |     |
28*0ac341f1SConrad Meyer#                |        |     +- increment if interfaces have been added
29*0ac341f1SConrad Meyer#                |        |        set to zero if interfaces have been removed
30*0ac341f1SConrad Meyer#                |        |        or changed
31*0ac341f1SConrad Meyer#                |        +- increment if source code has changed
32*0ac341f1SConrad Meyer#                |           set to zero if current is incremented
33*0ac341f1SConrad Meyer#                +- increment if interfaces have been added, removed or changed
34*0ac341f1SConrad MeyerAC_SUBST(SODIUM_LIBRARY_VERSION_MAJOR)
35*0ac341f1SConrad MeyerAC_SUBST(SODIUM_LIBRARY_VERSION_MINOR)
36*0ac341f1SConrad MeyerAC_SUBST(SODIUM_LIBRARY_VERSION)
37*0ac341f1SConrad MeyerAC_SUBST(DLL_VERSION)
38*0ac341f1SConrad Meyer
39*0ac341f1SConrad MeyerAC_LANG_ASSERT(C)
40*0ac341f1SConrad MeyerLX_CFLAGS=${CFLAGS-NONE}
41*0ac341f1SConrad Meyer
42*0ac341f1SConrad Meyerdnl Path check
43*0ac341f1SConrad Meyer
44*0ac341f1SConrad MeyerAS_IF([pwd | fgrep ' ' > /dev/null 2>&1],
45*0ac341f1SConrad Meyer  [AC_MSG_ERROR([The build directory contains whitespaces - This can cause tests/installation to fail due to limitations of some libtool versions])]
46*0ac341f1SConrad Meyer)
47*0ac341f1SConrad Meyer
48*0ac341f1SConrad Meyerdnl Switches
49*0ac341f1SConrad Meyer
50*0ac341f1SConrad MeyerAC_ARG_ENABLE(ssp,
51*0ac341f1SConrad Meyer[AS_HELP_STRING(--disable-ssp,Do not compile with -fstack-protector)],
52*0ac341f1SConrad Meyer[
53*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xno"], [
54*0ac341f1SConrad Meyer    enable_ssp="no"
55*0ac341f1SConrad Meyer  ], [
56*0ac341f1SConrad Meyer    enable_ssp="yes"
57*0ac341f1SConrad Meyer  ])
58*0ac341f1SConrad Meyer],
59*0ac341f1SConrad Meyer[
60*0ac341f1SConrad Meyer  enable_ssp="yes"
61*0ac341f1SConrad Meyer])
62*0ac341f1SConrad Meyer
63*0ac341f1SConrad MeyerAC_ARG_ENABLE(asm,
64*0ac341f1SConrad Meyer[AS_HELP_STRING(--disable-asm,[Do not compile assembly code -- As a side effect, this disables CPU-specific implementations on non-Windows platforms. Only for use with targets such as WebAssembly and NativeClient.])],
65*0ac341f1SConrad Meyer[
66*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xno"], [
67*0ac341f1SConrad Meyer    enable_asm="no"
68*0ac341f1SConrad Meyer  ], [
69*0ac341f1SConrad Meyer    enable_asm="yes"
70*0ac341f1SConrad Meyer  ])
71*0ac341f1SConrad Meyer],
72*0ac341f1SConrad Meyer[
73*0ac341f1SConrad Meyer  enable_asm="yes"
74*0ac341f1SConrad Meyer])
75*0ac341f1SConrad Meyer
76*0ac341f1SConrad MeyerAS_IF([test "x$EMSCRIPTEN" != "x"], [
77*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-s ASSERTIONS=0], [
78*0ac341f1SConrad Meyer    enable_asm="no"
79*0ac341f1SConrad Meyer    AC_MSG_WARN([compiling to JavaScript - asm implementations disabled])
80*0ac341f1SConrad Meyer  ], [
81*0ac341f1SConrad Meyer    AC_MSG_WARN([EMSCRIPTEN environment variable defined, but emcc doesn't appear to be used - Assuming compilation to native code])
82*0ac341f1SConrad Meyer    CFLAGS="$CFLAGS -U__EMSCRIPTEN__"
83*0ac341f1SConrad Meyer    unset EMSCRIPTEN
84*0ac341f1SConrad Meyer  ])
85*0ac341f1SConrad Meyer])
86*0ac341f1SConrad MeyerAS_IF([test "$host_os" = "nacl" -o "$host_os" = "pnacl"], [
87*0ac341f1SConrad Meyer  enable_asm="no"
88*0ac341f1SConrad Meyer  AC_MSG_WARN([compiling to Native Client - asm implementations disabled])
89*0ac341f1SConrad Meyer])
90*0ac341f1SConrad Meyer
91*0ac341f1SConrad MeyerAC_ARG_ENABLE(pie,
92*0ac341f1SConrad Meyer[AS_HELP_STRING(--disable-pie,Do not produce position independent executables)],
93*0ac341f1SConrad Meyer enable_pie=$enableval, enable_pie="maybe")
94*0ac341f1SConrad Meyer
95*0ac341f1SConrad MeyerAS_CASE([$host_os], [mingw*|cygwin*|msys], [enable_pie="no"])
96*0ac341f1SConrad Meyer
97*0ac341f1SConrad MeyerAC_ARG_ENABLE(blocking-random,
98*0ac341f1SConrad Meyer[AS_HELP_STRING(--enable-blocking-random,Enable this switch only if /dev/urandom is totally broken on the target platform)],
99*0ac341f1SConrad Meyer[
100*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xyes"], [
101*0ac341f1SConrad Meyer    AC_DEFINE([USE_BLOCKING_RANDOM], [1], [/dev/urandom is insecure on the target platform])
102*0ac341f1SConrad Meyer  ])
103*0ac341f1SConrad Meyer])
104*0ac341f1SConrad Meyer
105*0ac341f1SConrad MeyerAC_ARG_ENABLE(minimal,
106*0ac341f1SConrad Meyer[AS_HELP_STRING(--enable-minimal,
107*0ac341f1SConrad Meyer  [Only compile the minimum set of functions required for the high-level API])],
108*0ac341f1SConrad Meyer[
109*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xyes"], [
110*0ac341f1SConrad Meyer    enable_minimal="yes"
111*0ac341f1SConrad Meyer    SODIUM_LIBRARY_MINIMAL_DEF="#define SODIUM_LIBRARY_MINIMAL 1"
112*0ac341f1SConrad Meyer    AC_DEFINE([MINIMAL], [1], [Define for a minimal build, without deprecated functions and functions that high-level APIs depend on])
113*0ac341f1SConrad Meyer  ], [
114*0ac341f1SConrad Meyer    enable_minimal="no"
115*0ac341f1SConrad Meyer  ])
116*0ac341f1SConrad Meyer],
117*0ac341f1SConrad Meyer[
118*0ac341f1SConrad Meyer  enable_minimal="no"
119*0ac341f1SConrad Meyer])
120*0ac341f1SConrad MeyerAM_CONDITIONAL([MINIMAL], [test x$enable_minimal = xyes])
121*0ac341f1SConrad MeyerAC_SUBST(SODIUM_LIBRARY_MINIMAL_DEF)
122*0ac341f1SConrad Meyer
123*0ac341f1SConrad MeyerAC_ARG_WITH(pthreads, AC_HELP_STRING([--with-pthreads],
124*0ac341f1SConrad Meyer [use pthreads library, or --without-pthreads to disable threading support.]),
125*0ac341f1SConrad Meyer [ ], [withval="yes"])
126*0ac341f1SConrad Meyer
127*0ac341f1SConrad MeyerAS_IF([test "x$withval" = "xyes"], [
128*0ac341f1SConrad Meyer  AX_PTHREAD([
129*0ac341f1SConrad Meyer    AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files])
130*0ac341f1SConrad Meyer    with_threads="yes"
131*0ac341f1SConrad Meyer    LIBS="$PTHREAD_LIBS $LIBS"
132*0ac341f1SConrad Meyer    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
133*0ac341f1SConrad Meyer    CC="$PTHREAD_CC"])
134*0ac341f1SConrad Meyer], [with_threads="no"])
135*0ac341f1SConrad Meyer
136*0ac341f1SConrad MeyerAC_ARG_WITH(safecode,
137*0ac341f1SConrad Meyer[AS_HELP_STRING(--with-safecode,For maintainers only - please do not use)],
138*0ac341f1SConrad Meyer[AS_IF([test "x$withval" = "xyes"], [
139*0ac341f1SConrad Meyer    AC_ARG_VAR([SAFECODE_HOME], [set to the safecode base directory])
140*0ac341f1SConrad Meyer    : ${SAFECODE_HOME:=/opt/safecode}
141*0ac341f1SConrad Meyer    LDFLAGS="$LDFLAGS -L${SAFECODE_HOME}/lib"
142*0ac341f1SConrad Meyer    LIBS="$LIBS -lsc_dbg_rt -lpoolalloc_bitmap -lstdc++"
143*0ac341f1SConrad Meyer    CFLAGS="$CFLAGS -fmemsafety"
144*0ac341f1SConrad Meyer  ])
145*0ac341f1SConrad Meyer])
146*0ac341f1SConrad Meyer
147*0ac341f1SConrad MeyerAC_ARG_WITH(ctgrind,
148*0ac341f1SConrad Meyer[AS_HELP_STRING(--with-ctgrind,For maintainers only - please do not use)],
149*0ac341f1SConrad Meyer[AS_IF([test "x$withval" = "xyes"], [
150*0ac341f1SConrad Meyer    AC_CHECK_LIB(ctgrind, ct_poison)
151*0ac341f1SConrad Meyer  ])
152*0ac341f1SConrad Meyer])
153*0ac341f1SConrad Meyer
154*0ac341f1SConrad MeyerENABLE_CWFLAGS=no
155*0ac341f1SConrad MeyerAC_ARG_ENABLE(debug,
156*0ac341f1SConrad Meyer[AS_HELP_STRING(--enable-debug,For maintainers only - please do not use)],
157*0ac341f1SConrad Meyer[
158*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xyes"], [
159*0ac341f1SConrad Meyer    AS_IF([test "x$LX_CFLAGS" = "xNONE"], [
160*0ac341f1SConrad Meyer      nxflags=""
161*0ac341f1SConrad Meyer      for flag in `echo $CFLAGS`; do
162*0ac341f1SConrad Meyer        AS_CASE([$flag],
163*0ac341f1SConrad Meyer          [-O*], [ ],
164*0ac341f1SConrad Meyer          [-g*], [ ],
165*0ac341f1SConrad Meyer          [*], [AS_VAR_APPEND([nxflags], [" $flag"])])
166*0ac341f1SConrad Meyer      done
167*0ac341f1SConrad Meyer      CFLAGS="$nxflags -O -g3"
168*0ac341f1SConrad Meyer    ])
169*0ac341f1SConrad Meyer    ENABLE_CWFLAGS=yes
170*0ac341f1SConrad Meyer    CPPFLAGS="$CPPFLAGS -DDEBUG=1 -U_FORTIFY_SOURCE"
171*0ac341f1SConrad Meyer  ])
172*0ac341f1SConrad Meyer])
173*0ac341f1SConrad Meyer
174*0ac341f1SConrad MeyerAC_ARG_ENABLE(opt,
175*0ac341f1SConrad Meyer[AS_HELP_STRING(--enable-opt,Optimize for the native CPU - The resulting library will be faster but not portable)],
176*0ac341f1SConrad Meyer[
177*0ac341f1SConrad Meyer  AS_IF([test "x$enableval" = "xyes"], [
178*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-Ofast], [CFLAGS="$CFLAGS -Ofast"])
179*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-fomit-frame-pointer], [CFLAGS="$CFLAGS -fomit-frame-pointer"])
180*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-march=native], [CFLAGS="$CFLAGS -march=native"])
181*0ac341f1SConrad Meyer  ])
182*0ac341f1SConrad Meyer])
183*0ac341f1SConrad Meyer
184*0ac341f1SConrad MeyerAC_SUBST([MAINT])
185*0ac341f1SConrad Meyer
186*0ac341f1SConrad MeyerAX_VALGRIND_CHECK
187*0ac341f1SConrad Meyer
188*0ac341f1SConrad Meyerdnl Checks
189*0ac341f1SConrad Meyer
190*0ac341f1SConrad MeyerAC_PROG_CC_C99
191*0ac341f1SConrad MeyerAM_PROG_AS
192*0ac341f1SConrad MeyerAC_USE_SYSTEM_EXTENSIONS
193*0ac341f1SConrad MeyerAC_C_VARARRAYS
194*0ac341f1SConrad Meyer
195*0ac341f1SConrad MeyerAC_CHECK_DEFINE([__native_client__], [NATIVECLIENT="yes"], [])
196*0ac341f1SConrad Meyer
197*0ac341f1SConrad MeyerAC_CHECK_DEFINE([_FORTIFY_SOURCE], [], [
198*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=2],
199*0ac341f1SConrad Meyer    [CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"])
200*0ac341f1SConrad Meyer])
201*0ac341f1SConrad Meyer
202*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([-mindirect-branch=thunk],
203*0ac341f1SConrad Meyer  [CFLAGS="$CFLAGS -mindirect-branch=thunk"],
204*0ac341f1SConrad Meyer  [
205*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-mretpoline], [CFLAGS="$CFLAGS -mretpoline"])
206*0ac341f1SConrad Meyer  ])
207*0ac341f1SConrad Meyer
208*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
209*0ac341f1SConrad Meyer  [CFLAGS="$CFLAGS -fvisibility=hidden"])
210*0ac341f1SConrad Meyer
211*0ac341f1SConrad MeyerAS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [
212*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"])
213*0ac341f1SConrad Meyer])
214*0ac341f1SConrad Meyer
215*0ac341f1SConrad MeyerAS_IF([test "$enable_pie" != "no"],[
216*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-fPIE], [
217*0ac341f1SConrad Meyer    AX_CHECK_LINK_FLAG([-pie], [
218*0ac341f1SConrad Meyer      [CFLAGS="$CFLAGS -fPIE"
219*0ac341f1SConrad Meyer       LDFLAGS="$LDFLAGS -pie"]
220*0ac341f1SConrad Meyer    ])
221*0ac341f1SConrad Meyer  ])
222*0ac341f1SConrad Meyer])
223*0ac341f1SConrad Meyer
224*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"])
225*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"], [
226*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"])
227*0ac341f1SConrad Meyer])
228*0ac341f1SConrad Meyer
229*0ac341f1SConrad MeyerAS_IF([test "$GCC" = "yes" ], [
230*0ac341f1SConrad Meyer  AS_CASE([$host_cpu],
231*0ac341f1SConrad Meyer    [i?86|amd64|x86_64], [
232*0ac341f1SConrad Meyer      AC_COMPILE_IFELSE(
233*0ac341f1SConrad Meyer        [AC_LANG_SOURCE([
234*0ac341f1SConrad Meyer#if !defined(__clang__) && defined(__GNUC__) && ((__GNUC__ << 8) | __GNUC_MINOR__) < 0x403
235*0ac341f1SConrad Meyer# error old gcc
236*0ac341f1SConrad Meyer#endif
237*0ac341f1SConrad Meyerint main(void) { return 0; }
238*0ac341f1SConrad Meyer         ])],,[
239*0ac341f1SConrad Meyer          AX_CHECK_COMPILE_FLAG([-flax-vector-conversions], [CFLAGS="$CFLAGS -flax-vector-conversions"])
240*0ac341f1SConrad Meyer        ])
241*0ac341f1SConrad Meyer      ]
242*0ac341f1SConrad Meyer    )
243*0ac341f1SConrad Meyer  ])
244*0ac341f1SConrad Meyer
245*0ac341f1SConrad MeyerLIBTOOL_OLD_FLAGS="$LIBTOOL_EXTRA_FLAGS"
246*0ac341f1SConrad MeyerLIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
247*0ac341f1SConrad MeyerAC_ARG_ENABLE(soname-versions,
248*0ac341f1SConrad Meyer  [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for Android) (default: enabled)])],
249*0ac341f1SConrad Meyer    [
250*0ac341f1SConrad Meyer        AS_IF([test "x$enableval" = "xno"], [
251*0ac341f1SConrad Meyer          LIBTOOL_EXTRA_FLAGS="$LIBTOOL_OLD_FLAGS -avoid-version"
252*0ac341f1SConrad Meyer        ])
253*0ac341f1SConrad Meyer    ]
254*0ac341f1SConrad Meyer)
255*0ac341f1SConrad Meyer
256*0ac341f1SConrad MeyerAS_CASE([$host_os],
257*0ac341f1SConrad Meyer  [cygwin*|mingw*|msys|pw32*|cegcc*], [
258*0ac341f1SConrad Meyer    AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])
259*0ac341f1SConrad Meyer    AX_CHECK_LINK_FLAG([-Wl,--high-entropy-va], [LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"])
260*0ac341f1SConrad Meyer    AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"])
261*0ac341f1SConrad Meyer  ])
262*0ac341f1SConrad Meyer
263*0ac341f1SConrad MeyerAS_CASE([$host_os],
264*0ac341f1SConrad Meyer  [cygwin*|mingw*|msys|pw32*|cegcc*], [
265*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-fno-asynchronous-unwind-tables], [
266*0ac341f1SConrad Meyer      [CFLAGS="$CFLAGS -fno-asynchronous-unwind-tables"]
267*0ac341f1SConrad Meyer    ])
268*0ac341f1SConrad Meyer])
269*0ac341f1SConrad Meyer
270*0ac341f1SConrad MeyerAS_IF([test "x$enable_ssp" != "xno"],[
271*0ac341f1SConrad Meyer
272*0ac341f1SConrad MeyerAS_CASE([$host_os],
273*0ac341f1SConrad Meyer  [cygwin*|mingw*|msys|pw32*|cegcc*|haiku], [ ],
274*0ac341f1SConrad Meyer  [*], [
275*0ac341f1SConrad Meyer    AX_CHECK_COMPILE_FLAG([-fstack-protector], [
276*0ac341f1SConrad Meyer      AX_CHECK_LINK_FLAG([-fstack-protector],
277*0ac341f1SConrad Meyer        [CFLAGS="$CFLAGS -fstack-protector"]
278*0ac341f1SConrad Meyer      )
279*0ac341f1SConrad Meyer    ])
280*0ac341f1SConrad Meyer  ])
281*0ac341f1SConrad Meyer])
282*0ac341f1SConrad Meyer
283*0ac341f1SConrad MeyerAC_ARG_VAR([CWFLAGS], [define to compilation flags for generating extra warnings])
284*0ac341f1SConrad Meyer
285*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CFLAGS -Wall], [CWFLAGS="$CFLAGS -Wall"])
286*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CFLAGS -Wextra], [CWFLAGS="$CFLAGS -Wextra"])
287*0ac341f1SConrad Meyer
288*0ac341f1SConrad MeyerAC_MSG_CHECKING(for clang)
289*0ac341f1SConrad MeyerAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
290*0ac341f1SConrad Meyer#ifndef __clang__
291*0ac341f1SConrad Meyer#error Not clang
292*0ac341f1SConrad Meyer#endif
293*0ac341f1SConrad Meyer]])],
294*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
295*0ac341f1SConrad Meyer   AX_CHECK_COMPILE_FLAG([$CWFLAGS -Wno-unknown-warning-option],
296*0ac341f1SConrad Meyer     [CWFLAGS="$CWFLAGS -Wno-unknown-warning-option"])
297*0ac341f1SConrad Meyer  ],
298*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)
299*0ac341f1SConrad Meyer])
300*0ac341f1SConrad Meyer
301*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wbad-function-cast], [CWFLAGS="$CWFLAGS -Wbad-function-cast"])
302*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wcast-qual], [CWFLAGS="$CWFLAGS -Wcast-qual"])
303*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wdiv-by-zero], [CWFLAGS="$CWFLAGS -Wdiv-by-zero"])
304*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wduplicated-branches], [CWFLAGS="$CWFLAGS -Wduplicated-branches"])
305*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wduplicated-cond], [CWFLAGS="$CWFLAGS -Wduplicated-cond"])
306*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wfloat-equal], [CWFLAGS="$CWFLAGS -Wfloat-equal"])
307*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wformat=2], [CWFLAGS="$CWFLAGS -Wformat=2"])
308*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wlogical-op], [CWFLAGS="$CWFLAGS -Wlogical-op"])
309*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wmaybe-uninitialized], [CWFLAGS="$CWFLAGS -Wmaybe-uninitialized"])
310*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wmisleading-indentation], [CWFLAGS="$CWFLAGS -Wmisleading-indentation"])
311*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wmissing-declarations], [CWFLAGS="$CWFLAGS -Wmissing-declarations"])
312*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wmissing-prototypes], [CWFLAGS="$CWFLAGS -Wmissing-prototypes"])
313*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wnested-externs], [CWFLAGS="$CWFLAGS -Wnested-externs"])
314*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wno-type-limits], [CWFLAGS="$CWFLAGS -Wno-type-limits"])
315*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wno-unknown-pragmas], [CWFLAGS="$CWFLAGS -Wno-unknown-pragmas"])
316*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wnormalized=id], [CWFLAGS="$CWFLAGS -Wnormalized=id"])
317*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wnull-dereference], [CWFLAGS="$CWFLAGS -Wnull-dereference"])
318*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wold-style-declaration], [CWFLAGS="$CWFLAGS -Wold-style-declaration"])
319*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wpointer-arith], [CWFLAGS="$CWFLAGS -Wpointer-arith"])
320*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wredundant-decls], [CWFLAGS="$CWFLAGS -Wredundant-decls"])
321*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wrestrict], [CWFLAGS="$CWFLAGS -Wrestrict"])
322*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wshorten-64-to-32], [CWFLAGS="$CWFLAGS -Wshorten-64-to-32"])
323*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wsometimes-uninitialized], [CWFLAGS="$CWFLAGS -Wsometimes-uninitialized"])
324*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wstrict-prototypes], [CWFLAGS="$CWFLAGS -Wstrict-prototypes"])
325*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wswitch-enum], [CWFLAGS="$CWFLAGS -Wswitch-enum"])
326*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wvariable-decl], [CWFLAGS="$CWFLAGS -Wvariable-decl"])
327*0ac341f1SConrad MeyerAX_CHECK_COMPILE_FLAG([$CWFLAGS -Wwrite-strings], [CWFLAGS="$CWFLAGS -Wwrite-strings"])
328*0ac341f1SConrad Meyer
329*0ac341f1SConrad MeyerAX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"])
330*0ac341f1SConrad MeyerAX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"])
331*0ac341f1SConrad MeyerAX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"])
332*0ac341f1SConrad Meyer
333*0ac341f1SConrad MeyerAC_MSG_CHECKING(for a broken clang + AVX512 combination)
334*0ac341f1SConrad MeyerAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
335*0ac341f1SConrad Meyer#if !(defined(__AVX512F__) && defined(__clang__) && __clang_major__ < 4)
336*0ac341f1SConrad Meyer#error Not a broken clang + AVX512 combination
337*0ac341f1SConrad Meyer#endif
338*0ac341f1SConrad Meyer]])],
339*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes - disabling AVX512 optimizations)
340*0ac341f1SConrad Meyer   AX_CHECK_COMPILE_FLAG([$CFLAGS -mno-avx512f],
341*0ac341f1SConrad Meyer     [CFLAGS="$CFLAGS -mno-avx512f"])
342*0ac341f1SConrad Meyer  ],
343*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)
344*0ac341f1SConrad Meyer])
345*0ac341f1SConrad Meyer
346*0ac341f1SConrad MeyerAX_CHECK_CATCHABLE_SEGV
347*0ac341f1SConrad MeyerAX_CHECK_CATCHABLE_ABRT
348*0ac341f1SConrad Meyer
349*0ac341f1SConrad MeyerAS_IF([test "x$with_threads" = "xyes"], [
350*0ac341f1SConrad Meyer  AX_TLS([AC_MSG_RESULT(thread local storage is supported)],
351*0ac341f1SConrad Meyer         [AC_MSG_RESULT(thread local storage is not supported)]) ])
352*0ac341f1SConrad Meyer
353*0ac341f1SConrad MeyerLT_INIT
354*0ac341f1SConrad MeyerAC_SUBST(LIBTOOL_DEPS)
355*0ac341f1SConrad Meyer
356*0ac341f1SConrad MeyerAC_ARG_VAR([AR], [path to the ar utility])
357*0ac341f1SConrad MeyerAC_CHECK_TOOL([AR], [ar], [ar])
358*0ac341f1SConrad Meyer
359*0ac341f1SConrad Meyerdnl Checks for headers
360*0ac341f1SConrad Meyer
361*0ac341f1SConrad MeyerAS_IF([test "x$EMSCRIPTEN" = "x" -a "$host_os" != "pnacl"], [
362*0ac341f1SConrad Meyer
363*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
364*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mmmx], [CFLAGS="$CFLAGS -mmmx"])
365*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for MMX instructions set)
366*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
367*0ac341f1SConrad Meyer#pragma GCC target("mmx")
368*0ac341f1SConrad Meyer#include <mmintrin.h>
369*0ac341f1SConrad Meyer]], [[ __m64 x = _mm_setzero_si64(); ]])],
370*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
371*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_MMINTRIN_H], [1], [mmx is available])
372*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mmmx], [CFLAGS_MMX="-mmmx"])],
373*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
374*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
375*0ac341f1SConrad Meyer
376*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
377*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-msse2], [CFLAGS="$CFLAGS -msse2"])
378*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for SSE2 instructions set)
379*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
380*0ac341f1SConrad Meyer#pragma GCC target("sse2")
381*0ac341f1SConrad Meyer#ifndef __SSE2__
382*0ac341f1SConrad Meyer# define __SSE2__
383*0ac341f1SConrad Meyer#endif
384*0ac341f1SConrad Meyer#include <emmintrin.h>
385*0ac341f1SConrad Meyer]], [[ __m128d x = _mm_setzero_pd();
386*0ac341f1SConrad Meyer       __m128i z = _mm_srli_epi64(_mm_setzero_si128(), 26); ]])],
387*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
388*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_EMMINTRIN_H], [1], [sse2 is available])
389*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-msse2], [CFLAGS_SSE2="-msse2"])],
390*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
391*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
392*0ac341f1SConrad Meyer
393*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
394*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-msse3], [CFLAGS="$CFLAGS -msse3"])
395*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for SSE3 instructions set)
396*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
397*0ac341f1SConrad Meyer#pragma GCC target("sse3")
398*0ac341f1SConrad Meyer#include <pmmintrin.h>
399*0ac341f1SConrad Meyer]], [[ __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()),
400*0ac341f1SConrad Meyer                                _mm_cvtpd_ps(_mm_setzero_pd())); ]])],
401*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
402*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_PMMINTRIN_H], [1], [sse3 is available])
403*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-msse3], [CFLAGS_SSE3="-msse3"])],
404*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
405*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
406*0ac341f1SConrad Meyer
407*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
408*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mssse3], [CFLAGS="$CFLAGS -mssse3"])
409*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for SSSE3 instructions set)
410*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
411*0ac341f1SConrad Meyer#pragma GCC target("ssse3")
412*0ac341f1SConrad Meyer#include <tmmintrin.h>
413*0ac341f1SConrad Meyer]], [[ __m64 x = _mm_abs_pi32(_m_from_int(0)); ]])],
414*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
415*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_TMMINTRIN_H], [1], [ssse3 is available])
416*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mssse3], [CFLAGS_SSSE3="-mssse3"])],
417*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
418*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
419*0ac341f1SConrad Meyer
420*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
421*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS="$CFLAGS -msse4.1"])
422*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for SSE4.1 instructions set)
423*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
424*0ac341f1SConrad Meyer#pragma GCC target("sse4.1")
425*0ac341f1SConrad Meyer#include <smmintrin.h>
426*0ac341f1SConrad Meyer]], [[ __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); ]])],
427*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
428*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_SMMINTRIN_H], [1], [sse4.1 is available])
429*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS_SSE41="-msse4.1"])],
430*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
431*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
432*0ac341f1SConrad Meyer
433*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
434*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS="$CFLAGS -mavx"])
435*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for AVX instructions set)
436*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
437*0ac341f1SConrad Meyer#ifdef __native_client__
438*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding AVX opcodes
439*0ac341f1SConrad Meyer#endif
440*0ac341f1SConrad Meyer#pragma GCC target("avx")
441*0ac341f1SConrad Meyer#include <immintrin.h>
442*0ac341f1SConrad Meyer]], [[ _mm256_zeroall(); ]])],
443*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
444*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_AVXINTRIN_H], [1], [AVX is available])
445*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS_AVX="-mavx"])],
446*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
447*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
448*0ac341f1SConrad Meyer
449*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
450*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS="$CFLAGS -mavx2"])
451*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for AVX2 instructions set)
452*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
453*0ac341f1SConrad Meyer#ifdef __native_client__
454*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding AVX2 opcodes
455*0ac341f1SConrad Meyer#endif
456*0ac341f1SConrad Meyer#pragma GCC target("avx2")
457*0ac341f1SConrad Meyer#include <immintrin.h>
458*0ac341f1SConrad Meyer]], [[
459*0ac341f1SConrad Meyer__m256 x = _mm256_set1_ps(3.14);
460*0ac341f1SConrad Meyer__m256 y = _mm256_permutevar8x32_ps(x, _mm256_set1_epi32(42));
461*0ac341f1SConrad Meyerreturn _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ));
462*0ac341f1SConrad Meyer]])],
463*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
464*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_AVX2INTRIN_H], [1], [AVX2 is available])
465*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS_AVX2="-mavx2"])
466*0ac341f1SConrad Meyer     AC_MSG_CHECKING(if _mm256_broadcastsi128_si256 is correctly defined)
467*0ac341f1SConrad Meyer     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
468*0ac341f1SConrad Meyer#ifdef __native_client__
469*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding AVX2 opcodes
470*0ac341f1SConrad Meyer#endif
471*0ac341f1SConrad Meyer#pragma GCC target("avx2")
472*0ac341f1SConrad Meyer#include <immintrin.h>
473*0ac341f1SConrad Meyer     ]], [[ __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); ]])],
474*0ac341f1SConrad Meyer       [AC_MSG_RESULT(yes)],
475*0ac341f1SConrad Meyer       [AC_MSG_RESULT(no)
476*0ac341f1SConrad Meyer        AC_DEFINE([_mm256_broadcastsi128_si256], [_mm_broadcastsi128_si256],
477*0ac341f1SConrad Meyer                  [Define to the local name of _mm256_broadcastsi128_si256])])
478*0ac341f1SConrad Meyer     ],
479*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
480*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
481*0ac341f1SConrad Meyer
482*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
483*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mavx512f], [CFLAGS="$CFLAGS -mavx512f"])
484*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for AVX512F instructions set)
485*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
486*0ac341f1SConrad Meyer#ifdef __native_client__
487*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding AVX512F opcodes
488*0ac341f1SConrad Meyer#endif
489*0ac341f1SConrad Meyer#pragma GCC target("avx512f")
490*0ac341f1SConrad Meyer#include <immintrin.h>
491*0ac341f1SConrad Meyer]], [[
492*0ac341f1SConrad Meyer__m512i x = _mm512_setzero_epi32();
493*0ac341f1SConrad Meyer__m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), x);
494*0ac341f1SConrad Meyer]])],
495*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
496*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_AVX512FINTRIN_H], [1], [AVX512F is available])
497*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mavx512f], [CFLAGS_AVX512F="-mavx512f"])],
498*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
499*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
500*0ac341f1SConrad Meyer
501*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
502*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS="$CFLAGS -maes"])
503*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS="$CFLAGS -mpclmul"])
504*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for AESNI instructions set and PCLMULQDQ)
505*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
506*0ac341f1SConrad Meyer#ifdef __native_client__
507*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding AESNI opcodes
508*0ac341f1SConrad Meyer#endif
509*0ac341f1SConrad Meyer#pragma GCC target("aes")
510*0ac341f1SConrad Meyer#pragma GCC target("pclmul")
511*0ac341f1SConrad Meyer#include <wmmintrin.h>
512*0ac341f1SConrad Meyer]], [[ __m128i x = _mm_aesimc_si128(_mm_setzero_si128());
513*0ac341f1SConrad Meyer       __m128i y = _mm_clmulepi64_si128(_mm_setzero_si128(), _mm_setzero_si128(), 0);]])],
514*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
515*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_WMMINTRIN_H], [1], [aesni is available])
516*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS_AESNI="-maes"])
517*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS_PCLMUL="-mpclmul"])
518*0ac341f1SConrad Meyer     ],
519*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
520*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
521*0ac341f1SConrad Meyer
522*0ac341f1SConrad Meyer  oldcflags="$CFLAGS"
523*0ac341f1SConrad Meyer  AX_CHECK_COMPILE_FLAG([-mrdrnd], [CFLAGS="$CFLAGS -mrdrnd"])
524*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for RDRAND)
525*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
526*0ac341f1SConrad Meyer#ifdef __native_client__
527*0ac341f1SConrad Meyer# error NativeClient detected - Avoiding RDRAND opcodes
528*0ac341f1SConrad Meyer#endif
529*0ac341f1SConrad Meyer#pragma GCC target("rdrnd")
530*0ac341f1SConrad Meyer#include <immintrin.h>
531*0ac341f1SConrad Meyer]], [[ unsigned long long x; _rdrand64_step(&x); ]])],
532*0ac341f1SConrad Meyer    [AC_MSG_RESULT(yes)
533*0ac341f1SConrad Meyer     AC_DEFINE([HAVE_RDRAND], [1], [rdrand is available])
534*0ac341f1SConrad Meyer     AX_CHECK_COMPILE_FLAG([-mrdrnd], [CFLAGS_RDRAND="-mrdrnd"])
535*0ac341f1SConrad Meyer     ],
536*0ac341f1SConrad Meyer    [AC_MSG_RESULT(no)])
537*0ac341f1SConrad Meyer  CFLAGS="$oldcflags"
538*0ac341f1SConrad Meyer
539*0ac341f1SConrad Meyer])
540*0ac341f1SConrad Meyer
541*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_MMX)
542*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_SSE2)
543*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_SSE3)
544*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_SSSE3)
545*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_SSE41)
546*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_AVX)
547*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_AVX2)
548*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_AVX512F)
549*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_AESNI)
550*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_PCLMUL)
551*0ac341f1SConrad MeyerAC_SUBST(CFLAGS_RDRAND)
552*0ac341f1SConrad Meyer
553*0ac341f1SConrad MeyerAC_CHECK_HEADERS([sys/mman.h intrin.h])
554*0ac341f1SConrad Meyer
555*0ac341f1SConrad MeyerAC_MSG_CHECKING([if _xgetbv() is available])
556*0ac341f1SConrad MeyerAC_LINK_IFELSE(
557*0ac341f1SConrad Meyer  [AC_LANG_PROGRAM([[ #include <intrin.h> ]], [[ (void) _xgetbv(0) ]])],
558*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
559*0ac341f1SConrad Meyer   AC_DEFINE([HAVE__XGETBV], [1], [_xgetbv() is available])],
560*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
561*0ac341f1SConrad Meyer
562*0ac341f1SConrad Meyerdnl Checks for typedefs, structures, and compiler characteristics.
563*0ac341f1SConrad Meyer
564*0ac341f1SConrad MeyerAC_C_INLINE
565*0ac341f1SConrad MeyerAS_CASE([$host_cpu],
566*0ac341f1SConrad Meyer  [i?86|amd64|x86_64],
567*0ac341f1SConrad Meyer    [ac_cv_c_bigendian=no]
568*0ac341f1SConrad Meyer)
569*0ac341f1SConrad MeyerAC_C_BIGENDIAN(
570*0ac341f1SConrad Meyer  AC_DEFINE(NATIVE_BIG_ENDIAN, 1, [machine is bigendian]),
571*0ac341f1SConrad Meyer  AC_DEFINE(NATIVE_LITTLE_ENDIAN, 1, [machine is littleendian]),
572*0ac341f1SConrad Meyer  AC_MSG_ERROR([unknown endianness]),
573*0ac341f1SConrad Meyer  AC_MSG_ERROR([universal endianness is not supported - compile separately and use lipo(1)])
574*0ac341f1SConrad Meyer)
575*0ac341f1SConrad Meyer
576*0ac341f1SConrad MeyerAC_MSG_CHECKING(whether __STDC_LIMIT_MACROS is required)
577*0ac341f1SConrad MeyerAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
578*0ac341f1SConrad Meyer#include <limits.h>
579*0ac341f1SConrad Meyer#include <stdint.h>
580*0ac341f1SConrad Meyer]], [[
581*0ac341f1SConrad Meyer(void) SIZE_MAX;
582*0ac341f1SConrad Meyer(void) UINT64_MAX;
583*0ac341f1SConrad Meyer]])],
584*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)],
585*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
586*0ac341f1SConrad Meyer   CPPFLAGS="$CPPFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
587*0ac341f1SConrad Meyer])
588*0ac341f1SConrad Meyer
589*0ac341f1SConrad MeyerAC_MSG_CHECKING(whether we can use inline asm code)
590*0ac341f1SConrad MeyerAC_LINK_IFELSE([AC_LANG_PROGRAM([[
591*0ac341f1SConrad Meyer]], [[
592*0ac341f1SConrad Meyerint a = 42;
593*0ac341f1SConrad Meyerint *pnt = &a;
594*0ac341f1SConrad Meyer__asm__ __volatile__ ("" : : "r"(pnt) : "memory");
595*0ac341f1SConrad Meyer]])],
596*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
597*0ac341f1SConrad Meyer   AC_DEFINE([HAVE_INLINE_ASM], [1], [inline asm code can be used])]
598*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)]
599*0ac341f1SConrad Meyer)
600*0ac341f1SConrad Meyer
601*0ac341f1SConrad MeyerHAVE_AMD64_ASM_V=0
602*0ac341f1SConrad MeyerAS_IF([test "$enable_asm" != "no"],[
603*0ac341f1SConrad Meyer  AC_MSG_CHECKING(whether we can use x86_64 asm code)
604*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
605*0ac341f1SConrad Meyer  ]], [[
606*0ac341f1SConrad Meyer#if defined(__amd64) || defined(__amd64__) || defined(__x86_64__)
607*0ac341f1SConrad Meyer# if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64)
608*0ac341f1SConrad Meyer#  error Windows x86_64 calling conventions are not supported yet
609*0ac341f1SConrad Meyer# endif
610*0ac341f1SConrad Meyer/* neat */
611*0ac341f1SConrad Meyer#else
612*0ac341f1SConrad Meyer# error !x86_64
613*0ac341f1SConrad Meyer#endif
614*0ac341f1SConrad Meyerunsigned char i = 0, o = 0, t;
615*0ac341f1SConrad Meyer__asm__ __volatile__ ("pxor %%xmm12, %%xmm6 \n"
616*0ac341f1SConrad Meyer                      "movb (%[i]), %[t] \n"
617*0ac341f1SConrad Meyer                      "addb %[t], (%[o]) \n"
618*0ac341f1SConrad Meyer                      : [t] "=&r"(t)
619*0ac341f1SConrad Meyer                      : [o] "D"(&o), [i] "S"(&i)
620*0ac341f1SConrad Meyer                      : "memory", "flags", "cc");
621*0ac341f1SConrad Meyer]])],
622*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
623*0ac341f1SConrad Meyer   AC_DEFINE([HAVE_AMD64_ASM], [1], [x86_64 asm code can be used])
624*0ac341f1SConrad Meyer   HAVE_AMD64_ASM_V=1],
625*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
626*0ac341f1SConrad Meyer])
627*0ac341f1SConrad MeyerAM_CONDITIONAL([HAVE_AMD64_ASM], [test $HAVE_AMD64_ASM_V = 1])
628*0ac341f1SConrad MeyerAC_SUBST(HAVE_AMD64_ASM_V)
629*0ac341f1SConrad Meyer
630*0ac341f1SConrad MeyerHAVE_AVX_ASM_V=0
631*0ac341f1SConrad MeyerAS_IF([test "$enable_asm" != "no"],[
632*0ac341f1SConrad Meyer  AC_MSG_CHECKING(whether we can assemble AVX opcodes)
633*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
634*0ac341f1SConrad Meyer  ]], [[
635*0ac341f1SConrad Meyer#if defined(__amd64) || defined(__amd64__) || defined(__x86_64__)
636*0ac341f1SConrad Meyer# if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64)
637*0ac341f1SConrad Meyer#  error Windows x86_64 calling conventions are not supported yet
638*0ac341f1SConrad Meyer# endif
639*0ac341f1SConrad Meyer/* neat */
640*0ac341f1SConrad Meyer#else
641*0ac341f1SConrad Meyer# error !x86_64
642*0ac341f1SConrad Meyer#endif
643*0ac341f1SConrad Meyer__asm__ __volatile__ ("vpunpcklqdq %xmm0,%xmm13,%xmm0");
644*0ac341f1SConrad Meyer]])],
645*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
646*0ac341f1SConrad Meyer   AC_DEFINE([HAVE_AVX_ASM], [1], [AVX opcodes are supported])
647*0ac341f1SConrad Meyer   HAVE_AVX_ASM_V=1],
648*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
649*0ac341f1SConrad Meyer])
650*0ac341f1SConrad MeyerAM_CONDITIONAL([HAVE_AVX_ASM], [test $HAVE_AVX_ASM_V = 1])
651*0ac341f1SConrad MeyerAC_SUBST(HAVE_AVX_ASM_V)
652*0ac341f1SConrad Meyer
653*0ac341f1SConrad MeyerAC_MSG_CHECKING(for 128-bit arithmetic)
654*0ac341f1SConrad MeyerHAVE_TI_MODE_V=0
655*0ac341f1SConrad MeyerAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
656*0ac341f1SConrad Meyer#if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__)
657*0ac341f1SConrad Meyer# error mode(TI) is a gcc extension, and __int128 is not available
658*0ac341f1SConrad Meyer#endif
659*0ac341f1SConrad Meyer#if defined(__clang__) && !defined(__x86_64__) && !defined(__aarch64__)
660*0ac341f1SConrad Meyer# error clang does not properly handle the 128-bit type on 32-bit systems
661*0ac341f1SConrad Meyer#endif
662*0ac341f1SConrad Meyer#ifndef NATIVE_LITTLE_ENDIAN
663*0ac341f1SConrad Meyer# error libsodium currently expects a little endian CPU for the 128-bit type
664*0ac341f1SConrad Meyer#endif
665*0ac341f1SConrad Meyer#ifdef __EMSCRIPTEN__
666*0ac341f1SConrad Meyer# error emscripten currently doesn't support some operations on integers larger than 64 bits
667*0ac341f1SConrad Meyer#endif
668*0ac341f1SConrad Meyer#include <stddef.h>
669*0ac341f1SConrad Meyer#include <stdint.h>
670*0ac341f1SConrad Meyer#if defined(__SIZEOF_INT128__)
671*0ac341f1SConrad Meyertypedef unsigned __int128 uint128_t;
672*0ac341f1SConrad Meyer#else
673*0ac341f1SConrad Meyertypedef unsigned uint128_t __attribute__((mode(TI)));
674*0ac341f1SConrad Meyer#endif
675*0ac341f1SConrad Meyervoid fcontract(uint128_t *t) {
676*0ac341f1SConrad Meyer  *t += 0x8000000000000 - 1;
677*0ac341f1SConrad Meyer  *t *= *t;
678*0ac341f1SConrad Meyer  *t >>= 84;
679*0ac341f1SConrad Meyer}
680*0ac341f1SConrad Meyer]], [[
681*0ac341f1SConrad Meyer(void) fcontract;
682*0ac341f1SConrad Meyer]])],
683*0ac341f1SConrad Meyer[AC_MSG_RESULT(yes)
684*0ac341f1SConrad Meyer AC_DEFINE([HAVE_TI_MODE], [1], [gcc TI mode is available])
685*0ac341f1SConrad Meyer HAVE_TI_MODE_V=1],
686*0ac341f1SConrad Meyer[AC_MSG_RESULT(no)])
687*0ac341f1SConrad MeyerAM_CONDITIONAL([HAVE_TI_MODE], [test $HAVE_TI_MODE_V = 1])
688*0ac341f1SConrad MeyerAC_SUBST(HAVE_TI_MODE_V)
689*0ac341f1SConrad Meyer
690*0ac341f1SConrad MeyerHAVE_CPUID_V=0
691*0ac341f1SConrad MeyerAS_IF([test "$enable_asm" != "no" -o "$host_alias" = "x86_64-nacl"],[
692*0ac341f1SConrad Meyer  AC_MSG_CHECKING(for cpuid instruction)
693*0ac341f1SConrad Meyer  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
694*0ac341f1SConrad Meyerunsigned int cpu_info[4];
695*0ac341f1SConrad Meyer__asm__ __volatile__ ("xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1" :
696*0ac341f1SConrad Meyer                      "=a" (cpu_info[0]), "=&r" (cpu_info[1]),
697*0ac341f1SConrad Meyer                      "=c" (cpu_info[2]), "=d" (cpu_info[3]) :
698*0ac341f1SConrad Meyer                      "0" (0U), "2" (0U));
699*0ac341f1SConrad Meyer  ]])],
700*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
701*0ac341f1SConrad Meyer   AC_DEFINE([HAVE_CPUID], [1], [cpuid instruction is available])
702*0ac341f1SConrad Meyer   HAVE_CPUID_V=1],
703*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
704*0ac341f1SConrad Meyer  ])
705*0ac341f1SConrad MeyerAC_SUBST(HAVE_CPUID_V)
706*0ac341f1SConrad Meyer
707*0ac341f1SConrad Meyerasm_hide_symbol="unsupported"
708*0ac341f1SConrad MeyerAS_IF([test "$enable_asm" != "no" -o "$host_os" = "nacl"],[
709*0ac341f1SConrad Meyer  AC_MSG_CHECKING(if the .private_extern asm directive is supported)
710*0ac341f1SConrad Meyer  AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
711*0ac341f1SConrad Meyer__asm__ __volatile__ (".private_extern dummy_symbol \n"
712*0ac341f1SConrad Meyer                      ".private_extern _dummy_symbol \n"
713*0ac341f1SConrad Meyer                      ".globl dummy_symbol \n"
714*0ac341f1SConrad Meyer                      ".globl _dummy_symbol \n"
715*0ac341f1SConrad Meyer                      "dummy_symbol: \n"
716*0ac341f1SConrad Meyer                      "_dummy_symbol: \n"
717*0ac341f1SConrad Meyer                      "    nop \n"
718*0ac341f1SConrad Meyer);
719*0ac341f1SConrad Meyer  ]])],
720*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
721*0ac341f1SConrad Meyer   asm_hide_symbol=".private_extern"],
722*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
723*0ac341f1SConrad Meyer
724*0ac341f1SConrad Meyer  AC_MSG_CHECKING(if the .hidden asm directive is supported)
725*0ac341f1SConrad Meyer  AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
726*0ac341f1SConrad Meyer__asm__ __volatile__ (".hidden dummy_symbol \n"
727*0ac341f1SConrad Meyer                      ".hidden _dummy_symbol \n"
728*0ac341f1SConrad Meyer                      ".globl dummy_symbol \n"
729*0ac341f1SConrad Meyer                      ".globl _dummy_symbol \n"
730*0ac341f1SConrad Meyer                      "dummy_symbol: \n"
731*0ac341f1SConrad Meyer                      "_dummy_symbol: \n"
732*0ac341f1SConrad Meyer                      "    nop \n"
733*0ac341f1SConrad Meyer);
734*0ac341f1SConrad Meyer  ]])],
735*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)
736*0ac341f1SConrad Meyer   AS_IF([test "$asm_hide_symbol" = "unsupported"],
737*0ac341f1SConrad Meyer          [asm_hide_symbol=".hidden"],
738*0ac341f1SConrad Meyer          [AC_MSG_NOTICE([unable to reliably tag symbols as private])
739*0ac341f1SConrad Meyer           asm_hide_symbol="unsupported"])
740*0ac341f1SConrad Meyer  ],
741*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)])
742*0ac341f1SConrad Meyer
743*0ac341f1SConrad Meyer  AS_IF([test "$asm_hide_symbol" != "unsupported"],[
744*0ac341f1SConrad Meyer    AC_DEFINE_UNQUOTED([ASM_HIDE_SYMBOL], [$asm_hide_symbol], [directive to hide symbols])
745*0ac341f1SConrad Meyer  ])
746*0ac341f1SConrad Meyer])
747*0ac341f1SConrad Meyer
748*0ac341f1SConrad MeyerAC_MSG_CHECKING(if weak symbols are supported)
749*0ac341f1SConrad MeyerAC_LINK_IFELSE([AC_LANG_PROGRAM([[
750*0ac341f1SConrad Meyer#if !defined(__ELF__) && !defined(__APPLE_CC__)
751*0ac341f1SConrad Meyer# error Support for weak symbols may not be available
752*0ac341f1SConrad Meyer#endif
753*0ac341f1SConrad Meyer__attribute__((weak)) void __dummy(void *x) { }
754*0ac341f1SConrad Meyervoid f(void *x) { __dummy(x); }
755*0ac341f1SConrad Meyer]], [[ ]]
756*0ac341f1SConrad Meyer)],
757*0ac341f1SConrad Meyer[AC_MSG_RESULT(yes)
758*0ac341f1SConrad Meyer AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])],
759*0ac341f1SConrad Meyer[AC_MSG_RESULT(no)])
760*0ac341f1SConrad Meyer
761*0ac341f1SConrad MeyerAC_MSG_CHECKING(if data alignment is required)
762*0ac341f1SConrad Meyeraligned_access_required=yes
763*0ac341f1SConrad MeyerAS_CASE([$host_cpu],
764*0ac341f1SConrad Meyer  [i?86|amd64|x86_64|powerpc*|s390*],
765*0ac341f1SConrad Meyer    [aligned_access_required=no],
766*0ac341f1SConrad Meyer  [arm*],
767*0ac341f1SConrad Meyer    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
768*0ac341f1SConrad Meyer#ifndef __ARM_FEATURE_UNALIGNED
769*0ac341f1SConrad Meyer# error data alignment is required
770*0ac341f1SConrad Meyer#endif
771*0ac341f1SConrad Meyer      ]], [[]])], [aligned_access_required=no], [])]
772*0ac341f1SConrad Meyer)
773*0ac341f1SConrad MeyerAS_IF([test "x$aligned_access_required" = "xyes"],
774*0ac341f1SConrad Meyer  [AC_MSG_RESULT(yes)],
775*0ac341f1SConrad Meyer  [AC_MSG_RESULT(no)
776*0ac341f1SConrad Meyer   AC_DEFINE([CPU_UNALIGNED_ACCESS], [1], [unaligned memory access is supported])])
777*0ac341f1SConrad Meyer
778*0ac341f1SConrad MeyerAC_MSG_CHECKING(if atomic operations are supported)
779*0ac341f1SConrad MeyerAC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
780*0ac341f1SConrad Meyerstatic volatile int _sodium_lock;
781*0ac341f1SConrad Meyer__sync_lock_test_and_set(&_sodium_lock, 1);
782*0ac341f1SConrad Meyer__sync_lock_release(&_sodium_lock);
783*0ac341f1SConrad Meyer]]
784*0ac341f1SConrad Meyer)],
785*0ac341f1SConrad Meyer[AC_MSG_RESULT(yes)
786*0ac341f1SConrad Meyer AC_DEFINE([HAVE_ATOMIC_OPS], [1], [atomic operations are supported])],
787*0ac341f1SConrad Meyer[AC_MSG_RESULT(no)])
788*0ac341f1SConrad Meyer
789*0ac341f1SConrad Meyerdnl Checks for functions and headers
790*0ac341f1SConrad Meyer
791*0ac341f1SConrad MeyerAC_FUNC_ALLOCA
792*0ac341f1SConrad MeyerAS_IF([test "x$EMSCRIPTEN" = "x"],[
793*0ac341f1SConrad Meyer  AC_CHECK_FUNCS([arc4random arc4random_buf])
794*0ac341f1SConrad Meyer  AC_CHECK_FUNCS([mmap mlock madvise mprotect memset_s explicit_bzero nanosleep])
795*0ac341f1SConrad Meyer])
796*0ac341f1SConrad MeyerAC_CHECK_FUNCS([posix_memalign getpid])
797*0ac341f1SConrad Meyer
798*0ac341f1SConrad MeyerAC_SUBST([LIBTOOL_EXTRA_FLAGS])
799*0ac341f1SConrad Meyer
800*0ac341f1SConrad MeyerTEST_LDFLAGS=''
801*0ac341f1SConrad MeyerAS_IF([test "x$EMSCRIPTEN" != "x"],[
802*0ac341f1SConrad Meyer  EXEEXT=.js
803*0ac341f1SConrad Meyer  TEST_LDFLAGS='--memory-init-file 0 --pre-js pre.js.inc -s RESERVED_FUNCTION_POINTERS=8'
804*0ac341f1SConrad Meyer])
805*0ac341f1SConrad MeyerAC_SUBST(TEST_LDFLAGS)
806*0ac341f1SConrad MeyerAM_CONDITIONAL([EMSCRIPTEN], [test "x$EMSCRIPTEN" != "x"])
807*0ac341f1SConrad Meyer
808*0ac341f1SConrad MeyerAM_CONDITIONAL([NATIVECLIENT], [test "x$NATIVECLIENT" != "x"])
809*0ac341f1SConrad Meyer
810*0ac341f1SConrad MeyerAC_DEFINE([CONFIGURED], [1], [the build system was properly configured])
811*0ac341f1SConrad Meyer
812*0ac341f1SConrad Meyerdnl Libtool.
813*0ac341f1SConrad Meyer
814*0ac341f1SConrad MeyerLT_INIT([dlopen])
815*0ac341f1SConrad MeyerAC_LIBTOOL_WIN32_DLL
816*0ac341f1SConrad Meyergl_LD_OUTPUT_DEF
817*0ac341f1SConrad Meyer
818*0ac341f1SConrad Meyerdnl Output.
819*0ac341f1SConrad Meyer
820*0ac341f1SConrad MeyerAH_VERBATIM([NDEBUG], [/* Always evaluate assert() calls */
821*0ac341f1SConrad Meyer#ifdef NDEBUG
822*0ac341f1SConrad Meyer#/**/undef/**/ NDEBUG
823*0ac341f1SConrad Meyer#endif])
824*0ac341f1SConrad Meyer
825*0ac341f1SConrad MeyerAS_IF([test "x$ENABLE_CWFLAGS" = "xyes"], [
826*0ac341f1SConrad Meyer  CFLAGS="$CFLAGS $CWFLAGS"
827*0ac341f1SConrad Meyer])
828*0ac341f1SConrad Meyer
829*0ac341f1SConrad MeyerAC_CONFIG_FILES([Makefile
830*0ac341f1SConrad Meyer                 builds/Makefile
831*0ac341f1SConrad Meyer                 contrib/Makefile
832*0ac341f1SConrad Meyer                 dist-build/Makefile
833*0ac341f1SConrad Meyer                 libsodium.pc
834*0ac341f1SConrad Meyer                 libsodium-uninstalled.pc
835*0ac341f1SConrad Meyer                 msvc-scripts/Makefile
836*0ac341f1SConrad Meyer                 src/Makefile
837*0ac341f1SConrad Meyer                 src/libsodium/Makefile
838*0ac341f1SConrad Meyer                 src/libsodium/include/Makefile
839*0ac341f1SConrad Meyer                 src/libsodium/include/sodium/version.h
840*0ac341f1SConrad Meyer                 test/default/Makefile
841*0ac341f1SConrad Meyer                 test/Makefile
842*0ac341f1SConrad Meyer                 ])
843*0ac341f1SConrad MeyerAC_OUTPUT
844