.gitlab-ci.yml: export guile related envvars for doc-dist.Fedora
[gd/gnutls] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2000-2012, 2016 Free Software Foundation, Inc.
3 #
4 # Author: Nikos Mavrogiannopoulos, Simon Josefsson
5 #
6 # This file is part of GnuTLS.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
21 # USA
22
23 AC_PREREQ(2.63)
24
25 dnl when updating version also update LT_REVISION in m4/hooks.m4
26 AC_INIT([GnuTLS], [3.6.9], [bugs@gnutls.org])
27 AC_CONFIG_AUX_DIR([build-aux])
28 AC_CONFIG_MACRO_DIRS([m4 src/gl/m4 src/libopts/m4 lib/unistring/m4])
29 AC_CANONICAL_HOST
30
31 AM_INIT_AUTOMAKE([1.12.2 foreign subdir-objects no-dist-gzip dist-xz -Wall -Wno-override])
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
33 AC_CONFIG_HEADERS([config.h])
34
35 AC_MSG_RESULT([***
36 *** Checking for compilation programs...
37 ])
38
39 dnl Checks for programs.
40 PKG_PROG_PKG_CONFIG
41 AC_PROG_CC
42 gl_EARLY
43 ggl_EARLY
44 unistring_EARLY
45 AM_PROG_AS
46 AM_PROG_AR
47 AC_PROG_CXX
48 AM_PROG_CC_C_O
49 AC_PROG_YACC
50 AC_PROG_SED
51
52 AC_USE_SYSTEM_EXTENSIONS
53
54 #
55 # Require C99 support
56 #    
57 AC_PROG_CC_C99
58 if test "$ac_cv_prog_cc_c99" = "no"; then
59   AC_MSG_WARN([[Compiler does not support C99. It may not be able to compile the project.]])
60 fi
61
62 AX_CODE_COVERAGE
63
64 AM_MAINTAINER_MODE([enable])
65
66 AC_ARG_ENABLE(bash-tests,
67   AS_HELP_STRING([--disable-bash-tests], [skip some tests that badly need bash]),
68     enable_bash_tests=$enableval, enable_bash_tests=yes)
69 AM_CONDITIONAL(DISABLE_BASH_TESTS, test "$enable_bash_tests" != "yes")
70
71 AC_ARG_ENABLE(doc,
72   AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
73     enable_doc=$enableval, enable_doc=yes)
74 AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
75
76 AC_ARG_ENABLE(manpages,
77   AS_HELP_STRING([--enable-manpages], [install manpages even if disable-doc is given]),
78     enable_manpages=$enableval,enable_manpages=auto)
79
80 if test "${enable_manpages}" = "auto";then
81   enable_manpages="${enable_doc}"
82 fi
83
84 AM_CONDITIONAL(ENABLE_MANPAGES, test "$enable_manpages" != "no")
85
86 AC_ARG_ENABLE(tools,
87   AS_HELP_STRING([--disable-tools], [don't compile any tools]),
88     enable_tools=$enableval, enable_tools=yes)
89 AM_CONDITIONAL(ENABLE_TOOLS, test "$enable_tools" != "no")
90
91 # For includes/gnutls/gnutls.h.in.
92 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
93 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
94 AC_SUBST(PATCH_VERSION, [[`echo $PACKAGE_VERSION | sed 's/.*\..*\.\([0-9]*\).*/\1/g'`]])
95 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
96
97 dnl C and C++ capabilities
98 AC_C_INLINE
99 AC_HEADER_STDC
100
101 # For the C++ code
102 AC_ARG_ENABLE(cxx,
103   AS_HELP_STRING([--disable-cxx], [unconditionally disable the C++ library]),
104     use_cxx=$enableval, use_cxx=yes)
105 if test "$use_cxx" != "no"; then
106   AC_LANG_PUSH(C++)
107   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
108   AC_LANG_POP(C++)
109 fi
110 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
111
112 dnl Detect windows build
113 use_accel=yes
114 case "$host" in
115   *android*)
116     have_android=yes
117     have_elf=yes
118   ;;
119   *mingw32* | *mingw64*)
120     have_win=yes
121     AC_DEFINE([_UNICODE], [1], [Defined to 1 for Unicode (wide chars) APIs])
122   ;;
123   *darwin*)
124     have_macosx=yes
125     save_LDFLAGS="$LDFLAGS"
126     dnl Try to use -no_weak_imports if available. This makes sure we
127     dnl error out when linking to a function that doesn't exist in the
128     dnl intended minimum runtime version.
129     LDFLAGS="$LDFLAGS -Wl,-no_weak_imports"
130     AC_MSG_CHECKING([whether the linker supports -Wl,-no_weak_imports])
131     AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
132       [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); LDFLAGS="$save_LDFLAGS"])
133   ;;
134   *solaris*)
135     have_elf=yes
136     use_accel=no
137     AC_MSG_WARN([[
138 ***
139 *** In solaris hardware acceleration is disabled by default due to issues
140 *** with the assembler. Use --enable-hardware-acceleration to enable it.
141 *** ]])
142   ;;
143   *)
144     have_elf=yes
145   ;;
146 esac
147
148 AM_CONDITIONAL(ANDROID, test "$have_android" = yes)
149 AM_CONDITIONAL(WINDOWS, test "$have_win" = yes)
150 AM_CONDITIONAL(MACOSX, test "$have_macosx" = yes)
151 AM_CONDITIONAL(ELF, test "$have_elf" = yes)
152
153 dnl Hardware Acceleration
154 AC_ARG_ENABLE(hardware-acceleration,
155   AS_HELP_STRING([--disable-hardware-acceleration], [unconditionally disable hardware acceleration]),
156     use_accel=$enableval)
157 hw_accel=none
158
159
160 use_padlock=no
161 if test "$use_accel" != "no"; then
162 case $host_cpu in
163   armv8 | aarch64)
164       hw_accel="aarch64"
165       case $host_os in
166         *_ilp32)
167           dnl ILP32 not supported in assembler yet
168           hw_accel="none"
169         ;;
170       esac
171   ;;
172   i?86 | x86_64 | amd64)
173       AC_CHECK_HEADERS(cpuid.h)
174       if test "$host_cpu" = "x86_64" || test "$host_cpu" = "amd64"; then
175         hw_accel="x86-64"
176       else
177         hw_accel="x86"
178       fi
179       use_padlock=yes
180   ;;
181   *)
182   ;;
183 esac
184
185 # check for gcc's __get_cpuid_count functionality
186 AC_MSG_CHECKING([for __get_cpuid_count])
187 AC_LINK_IFELSE(
188    [AC_LANG_SOURCE([
189     #include <cpuid.h>
190     int main(void) { unsigned t1; return __get_cpuid_count(7, 0, &t1, &t1, &t1, &t1); }
191    ])],
192    [AC_DEFINE([HAVE_GET_CPUID_COUNT], [1], [use __get_cpuid_count]) AC_MSG_RESULT([yes])],
193    [AC_MSG_RESULT([no])]
194 )
195
196 fi
197
198 AC_ARG_ENABLE(tls13-interop,
199   AS_HELP_STRING([--disable-tls13-interop], [disable TLS1.3 interoperability testing with openssl]),
200     enable_tls13_interop=$enableval, enable_tls13_interop=yes)
201
202 AM_CONDITIONAL(ENABLE_TLS13_INTEROP, test "$enable_tls13_interop" != "no")
203
204 dnl Check for iovec type
205 AC_CHECK_MEMBERS([struct iovec.iov_base],
206       [
207         AC_SUBST([DEFINE_IOVEC_T], ["#include <sys/uio.h>
208 typedef struct iovec giovec_t;"])
209       ],
210       [
211         AC_SUBST([DEFINE_IOVEC_T], ["typedef struct {
212     void *iov_base;
213     size_t iov_len;
214 } giovec_t;"])
215       ],
216       [#include <sys/uio.h>
217       ])
218 AM_SUBST_NOTMAKE([DEFINE_IOVEC_T])
219
220 dnl Need netinet/tcp.h for TCP_FASTOPEN
221 AC_CHECK_HEADERS([netinet/tcp.h])
222 AC_CHECK_HEADERS([stdatomic.h])
223
224 dnl This ensures that we link with the right library for atomic operations on Linux SPARC
225 save_LIBS=$LIBS
226 AC_SEARCH_LIBS([__atomic_load_4], [atomic], [], [AC_MSG_NOTICE([Could not detect libatomic])])
227 LIBS=$save_LIBS
228
229 AS_IF([test "$ac_cv_search___atomic_load_4" = "none required" || test "$ac_cv_search___atomic_load_4" = "no"],
230       [AC_SUBST([LIBATOMIC_LIBS], [])],
231       [AC_SUBST([LIBATOMIC_LIBS], [$ac_cv_search___atomic_load_4])])
232
233 dnl We use its presence to detect C11 threads
234 AC_CHECK_HEADERS([threads.h])
235
236 AC_ARG_ENABLE(padlock,
237   AS_HELP_STRING([--disable-padlock], [unconditionally disable padlock acceleration]),
238     use_padlock=$enableval)
239
240 if test "$use_padlock" != "no"; then
241     AC_DEFINE([ENABLE_PADLOCK], 1, [Enable padlock acceleration])
242     AC_SUBST([ENABLE_PADLOCK])
243 fi
244 AM_CONDITIONAL(ENABLE_PADLOCK, test "$use_padlock" = "yes")
245 AM_CONDITIONAL(ASM_AARCH64, test x"$hw_accel" = x"aarch64")
246 AM_CONDITIONAL(ASM_X86_64, test x"$hw_accel" = x"x86-64")
247 AM_CONDITIONAL(ASM_X86_32, test x"$hw_accel" = x"x86")
248 AM_CONDITIONAL(ASM_X86, test x"$hw_accel" = x"x86" || test x"$hw_accel" = x"x86-64")
249 AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
250 AM_CONDITIONAL(HAVE_GCC, test "$GCC" = "yes")
251
252 dnl check for getrandom()
253 rnd_variant="auto-detect"
254 AC_MSG_CHECKING([for getrandom])
255 AC_LINK_IFELSE([AC_LANG_PROGRAM([
256            #include <sys/random.h>],[
257                    getrandom(0, 0, 0);
258                   ])],
259                   [AC_MSG_RESULT(yes)
260                    AC_DEFINE([HAVE_GETRANDOM], 1, [Enable the Linux getrandom function])
261                    rnd_variant=getrandom],
262                   [AC_MSG_RESULT(no)])
263
264 AC_MSG_CHECKING([for getentropy])
265 AC_LINK_IFELSE([AC_LANG_PROGRAM([
266            #include <unistd.h>
267            #ifdef __APPLE__
268            #include <sys/random.h>
269            #endif
270            #ifdef __linux__
271            #error 1
272            #endif
273            ],[
274                    getentropy(0, 0);
275                   ])],
276                   [AC_MSG_RESULT(yes)
277                    AC_DEFINE([HAVE_GETENTROPY], 1, [Enable the OpenBSD getentropy function])
278                    rnd_variant=getentropy],
279                   [AC_MSG_RESULT(no)])
280
281 AM_CONDITIONAL(HAVE_GETENTROPY, test "$rnd_variant" = "getentropy")
282
283 dnl Try the hooks.m4
284 LIBGNUTLS_HOOKS
285 LIBGNUTLS_EXTRA_HOOKS
286
287 AC_ARG_ENABLE(tests,
288   AS_HELP_STRING([--disable-tests], [don't compile or run any tests]),
289     enable_tests=$enableval, enable_tests=$enable_tools)
290 AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
291
292 AC_ARG_ENABLE(fuzzer-target,
293   AS_HELP_STRING([--enable-fuzzer-target], [make a library intended for testing - not production]),
294     enable_fuzzer_target=$enableval, enable_fuzzer_target=no)
295 if test "$enable_fuzzer_target" != "no";then
296         AC_DEFINE([FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], 1, [Enable fuzzer target -not for production])
297 fi
298
299 dnl
300 dnl check for gtk-doc
301 dnl
302 m4_ifdef([GTK_DOC_CHECK], [
303 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
304 ],[
305 AM_CONDITIONAL([ENABLE_GTK_DOC], false)
306 ])
307 # needed for some older versions of gtk-doc
308 m4_ifdef([GTK_DOC_USE_LIBTOOL], [], [
309 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], false)
310 ])
311
312 AM_GNU_GETTEXT([external])
313 AM_GNU_GETTEXT_VERSION([0.19])
314
315 AC_C_BIGENDIAN
316
317 dnl No fork on MinGW, disable some self-tests until we fix them.
318 dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
319 AC_CHECK_FUNCS([fork setitimer getrusage getpwuid_r nanosleep daemon getpid localtime mmap explicit_bzero],,)
320 dnl Manually check some functions by including headers first. On macOS, you
321 dnl normally only have the latest SDK available, containing all existing
322 dnl functions, but having them restricted according to target version in
323 dnl headers. If we bypass the headers and just try linking (as AC_CHECK_FUNCS
324 dnl does), we will accidentally detect functions which we shouldn't use. Set
325 dnl ac_cv_func_* as well, to avoid later AC_CHECK_FUNCS from other included
326 dnl scripts from overriding it.
327 AC_MSG_CHECKING([for clock_gettime])
328 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [clock_gettime(0, 0);])],
329   [AC_MSG_RESULT(yes); ac_cv_func_clock_gettime=yes
330   AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Define to 1 if you have the `clock_gettime' function.])],
331   [AC_MSG_RESULT(no); ac_cv_func_clock_gettime=no])
332 AC_MSG_CHECKING([for fmemopen])
333 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [fmemopen(0, 0, 0);])],
334   [AC_MSG_RESULT(yes); ac_cv_func_fmemopen=yes
335   AC_DEFINE([HAVE_FMEMOPEN], 1, [Define to 1 if you have the `fmemopen' function.])],
336   [AC_MSG_RESULT(no); ac_cv_func_fmemopen=no])
337
338 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
339
340 AC_CHECK_FUNCS([__register_atfork secure_getenv getauxval],,)
341
342 AC_ARG_ENABLE(seccomp-tests,
343   AS_HELP_STRING([--enable-seccomp-tests], [unconditionally enable tests with seccomp]),
344     seccomp_tests=$enableval, seccomp_tests=no)
345
346 AM_CONDITIONAL(HAVE_SECCOMP_TESTS, test "$seccomp_tests" = "yes")
347
348 # check for libseccomp - used in test programs
349 AC_LIB_HAVE_LINKFLAGS(seccomp,, [#include <seccomp.h>  
350 ], [seccomp_init(0);])
351
352 # check for libcrypto - used in test programs
353 AC_LIB_HAVE_LINKFLAGS(crypto,, [#include <openssl/evp.h>  
354 ], [EVP_CIPHER_CTX_init(NULL);])
355
356 AM_CONDITIONAL(HAVE_LIBCRYPTO, test "$HAVE_LIBCRYPTO" = "yes")
357
358 AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>
359 #include <signal.h>
360 ], [timer_create (0,0,0);])
361
362 if test "$have_win" != "yes";then
363   AC_CHECK_FUNCS([pthread_mutex_lock],,)
364   if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
365     AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
366   fi
367 fi
368
369 if test "$ac_cv_func_nanosleep" != "yes";then
370   AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [nanosleep (0, 0);])
371   gnutls_needs_librt=yes
372 fi
373
374 if test "$ac_cv_func_clock_gettime" != "yes";then
375   AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [clock_gettime (0, 0);])
376   gnutls_needs_librt=yes
377 fi
378
379 AC_ARG_WITH(included-unistring, AS_HELP_STRING([--with-included-unistring],
380                                  [disable linking with system libunistring]),
381             included_unistring="$withval", 
382             included_unistring=no)
383
384 if test "$included_unistring" = yes;then
385   ac_have_unistring=no
386 else
387   save_LIBS=$LIBS
388   AC_SEARCH_LIBS(u8_normalize, unistring, [
389     included_unistring=no
390     ac_have_unistring=yes
391     AC_SUBST([LIBUNISTRING], [$ac_cv_search_u8_normalize])
392   ], [
393     ac_cv_libunistring=no
394     AC_MSG_ERROR([[
395   ***
396   *** Libunistring was not found. To use the included one, use --with-included-unistring
397     ]])
398   ])
399   LIBS=$save_LIBS
400 fi
401
402 AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$ac_have_unistring" = "yes")
403
404 dnl Note that g*l_INIT are run after we check for library capabilities,
405 dnl to prevent issues from caching lib dependencies. See discussion
406 dnl in https://bugs.gentoo.org/show_bug.cgi?id=494940 and
407 dnl https://gnu-autoconf.7623.n7.nabble.com/Correct-way-to-check-for-clock-gettime-td12276.html
408 gl_INIT
409 ggl_INIT
410 unistring_INIT
411
412 # disable the extended test suite at tests/suite if asked, or if we are not running in git master
413 AC_ARG_ENABLE(full-test-suite,
414   AS_HELP_STRING([--disable-full-test-suite], [disable running very slow components of test suite]),
415     full_test_suite=$enableval, full_test_suite=yes)
416
417 # test if we are in git master or in release build. In release
418 # builds we do not use valgrind.
419 SUITE_FILE="${srcdir}/tests/suite/mini-eagain2.c"
420 if test "$full_test_suite" = yes && test ! -f "$SUITE_FILE";then
421         full_test_suite=no
422 fi
423
424 AM_CONDITIONAL(WANT_TEST_SUITE, test "$full_test_suite" = "yes")
425
426 dnl GCC warnings to enable
427
428 AC_ARG_ENABLE([gcc-warnings],
429   [AS_HELP_STRING([--disable-gcc-warnings],
430                   [turn off lots of GCC warnings (for developers)])],
431   [case $enableval in
432      yes|no) ;;
433      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
434    esac
435    gl_gcc_warnings=$enableval],
436   [gl_gcc_warnings=yes]
437 )
438
439 if test "$gl_gcc_warnings" = yes; then
440   gl_WARN_ADD([-Wtype-limits], [WSTACK_CFLAGS])
441
442   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
443   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
444   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
445   nw="$nw -Wtraditional"            # Warns on #elif which we use often
446   nw="$nw -Wpadded"                 # Our structs are not padded
447   nw="$nw -Wtraditional-conversion" # Too many warnings for now
448   nw="$nw -Wswitch-default"         # Too many warnings for now
449   nw="$nw -Wformat-y2k"             # Too many warnings for now
450   nw="$nw -Woverlength-strings"     # We use some in tests/
451   nw="$nw -Wvla"                    # There is no point to avoid C99 variable length arrays
452   nw="$nw -Wformat-nonliteral"      # Incompatible with gettext _()
453   nw="$nw -Wformat-signedness"      # Too many to handle
454   nw="$nw -Wstrict-overflow"
455   nw="$nw -Wmissing-noreturn"
456   nw="$nw -Winline"                 # Too compiler dependent
457   nw="$nw -Wsuggest-attribute=pure" # Is it worth using attributes?
458   nw="$nw -Wsuggest-attribute=const" # Is it worth using attributes?
459   nw="$nw -Wsuggest-attribute=noreturn" # Is it worth using attributes?
460   nw="$nw -Wstack-protector"        # Some functions cannot be protected
461   nw="$nw -Wunsafe-loop-optimizations" # Warnings with no point
462   nw="$nw -Wredundant-decls"        # Some files cannot be compiled with that (gl_fd_to_handle)
463
464   gl_MANYWARN_ALL_GCC([ws])
465   gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw])
466   for w in $ws; do
467     gl_WARN_ADD([$w])
468   done
469   gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
470   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
471   gl_WARN_ADD([-Wno-format-truncation]) # Many warnings with no point
472   gl_WARN_ADD([-Wimplicit-fallthrough=2])
473   gl_WARN_ADD([-Wabi=11])
474   gl_WARN_ADD([-fdiagnostics-show-option])
475 fi
476
477 AC_SUBST([WERROR_CFLAGS])
478 AC_SUBST([WSTACK_CFLAGS])
479 AC_SUBST([WARN_CFLAGS])
480
481 dnl Programs for compilation or development
482 AC_PROG_LN_S
483 LT_INIT([disable-static,win32-dll,shared])
484
485
486
487 AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
488
489 AC_ARG_ENABLE(fips140-mode,
490   AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode]),
491     enable_fips=$enableval, enable_fips=no)
492 AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
493 if [ test "$enable_fips" = "yes" ];then
494   if test "x$HAVE_LIBDL" = "xyes";then
495     AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
496     AC_SUBST([FIPS140_LIBS], $LIBDL)
497     AC_ARG_WITH(fips140-key, AS_HELP_STRING([--with-fips140-key],
498                                  [specify the FIPS140 HMAC key for integrity]),
499             fips_key="$withval", 
500             fips_key="orboDeJITITejsirpADONivirpUkvarP")
501
502     AC_DEFINE_UNQUOTED([FIPS_KEY], ["$fips_key"], [The FIPS140-2 integrity key])
503   else
504     enable_fips=no
505     AC_MSG_WARN([[
506 *** 
507 *** This system is not supported in FIPS140 mode.
508 *** libdl and dladdr() are required.
509 *** ]])
510   fi
511 fi
512
513 PKG_CHECK_MODULES(CMOCKA, [cmocka >= 1.0.1], [with_cmocka=yes], [with_cmocka=no])
514 AM_CONDITIONAL(HAVE_CMOCKA, test "$with_cmocka" != "no")
515
516 AC_ARG_WITH(idn, AS_HELP_STRING([--without-idn],
517                                 [disable support for IDNA]),
518             try_libidn2="$withval", 
519             try_libidn2=yes)
520
521 idna_support=no
522 with_libidn2=no
523
524 if test "$try_libidn2" = yes;then
525     save_LIBS=$LIBS
526     AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [
527       with_libidn2=yes;
528       idna_support="IDNA 2008 (libidn2)"
529       AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.])
530       AC_SUBST([LIBIDN2_CFLAGS], [])
531       AC_SUBST([LIBIDN2_LIBS], [-lidn2]) dnl used in gnutls.pc.in
532 dnl enable once libidn2.pc is widespread; and remove LIBIDN2_LIBS from gnutls.pc.in (Libs.private)
533 dnl      if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
534 dnl        GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2"
535 dnl      else
536 dnl        GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2"
537 dnl      fi
538     ],[
539       with_libidn2=no;
540       AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support)
541     ])
542     LIBS=$save_LIBS
543 else
544   with_libidn2=no
545 fi
546
547 AM_CONDITIONAL(HAVE_LIBIDN2, test "$with_libidn2" != "no")
548
549 AC_ARG_ENABLE(non-suiteb-curves,
550   AS_HELP_STRING([--disable-non-suiteb-curves], [disable curves not in SuiteB]),
551     enable_non_suiteb=$enableval, enable_non_suiteb=yes)
552
553 if test "$enable_non_suiteb" = "yes";then
554         dnl nettle_secp_192r1 is not really a function
555         AC_CHECK_LIB(hogweed, nettle_secp_192r1, enable_non_suiteb=yes, enable_non_suiteb=no, [$HOGWEED_LIBS $NETTLE_LIBS])
556
557         if test "$enable_non_suiteb" = "yes";then
558                 AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves])
559         fi
560 fi
561 AM_CONDITIONAL(ENABLE_NON_SUITEB_CURVES, test "$enable_non_suiteb" = "yes")
562
563 # We MUST require a Nettle version that has rsa_sec_decrypt now.
564 save_LIBS=$LIBS
565 LIBS="$LIBS $HOGWEED_LIBS $NETTLE_LIBS"
566 AC_CHECK_FUNCS(nettle_rsa_sec_decrypt,
567     [],
568     [AC_MSG_ERROR([Nettle lacks the required rsa_sec_decrypt function])]
569 )
570 LIBS=$save_LIBS
571
572 # Check if nettle has CFB8 support
573 save_LIBS=$LIBS
574 LIBS="$LIBS $NETTLE_LIBS"
575 AC_CHECK_FUNCS(nettle_cfb8_encrypt)
576 LIBS=$save_LIBS
577
578 # Check if nettle has CMAC support
579 save_LIBS=$LIBS
580 LIBS="$LIBS $NETTLE_LIBS"
581 AC_CHECK_FUNCS(nettle_cmac128_update)
582 LIBS=$save_LIBS
583
584 # Check if nettle has XTS support
585 save_LIBS=$LIBS
586 LIBS="$LIBS $NETTLE_LIBS"
587 AC_CHECK_FUNCS(nettle_xts_encrypt_message)
588 LIBS=$save_LIBS
589
590 # Check for Gosthash94 with CryptoPro S-box support
591 save_LIBS=$LIBS
592 LIBS="$LIBS $NETTLE_LIBS"
593 AC_CHECK_FUNCS(nettle_gosthash94cp_update)
594 LIBS=$save_LIBS
595
596 # Check for GOST28147
597 save_LIBS=$LIBS
598 LIBS="$LIBS $NETTLE_LIBS"
599 AC_CHECK_FUNCS(nettle_gost28147_set_key)
600 LIBS=$save_LIBS
601
602 # Check for Streebog support
603 save_LIBS=$LIBS
604 LIBS="$LIBS $NETTLE_LIBS"
605 AC_CHECK_FUNCS(nettle_streebog512_update)
606 LIBS=$save_LIBS
607
608 AC_MSG_CHECKING([whether to build libdane])
609 AC_ARG_ENABLE(libdane,
610     AS_HELP_STRING([--disable-libdane],
611                    [disable the built of libdane]),
612     enable_dane=$enableval, enable_dane=yes)
613 AC_MSG_RESULT($enable_dane)
614
615 if test "$enable_dane" != "no"; then
616     LIBS="$oldlibs -lunbound"
617     AC_MSG_CHECKING([for unbound library])
618     AC_LINK_IFELSE([AC_LANG_PROGRAM([
619                    #include <unbound.h>],[
620                    struct ub_ctx* ctx;
621                    ctx = ub_ctx_create();])],
622                   [AC_MSG_RESULT(yes)
623                    AC_SUBST([UNBOUND_LIBS], [-lunbound])
624                    AC_SUBST([UNBOUND_CFLAGS], [])
625                    AC_DEFINE([HAVE_DANE], 1, [Enable the DANE library])
626                    enable_dane=yes],
627                   [AC_MSG_RESULT(no)
628                    AC_MSG_WARN([[
629 *** 
630 *** libunbound was not found. Libdane will not be built.
631 *** ]])
632                   enable_dane=no])
633     LIBS="$oldlibs"
634 fi
635
636 AM_CONDITIONAL(ENABLE_DANE, test "$enable_dane" = "yes")
637
638 AC_ARG_WITH(unbound-root-key-file, AS_HELP_STRING([--with-unbound-root-key-file],
639                                  [specify the unbound root key file]),
640             unbound_root_key_file="$withval", 
641 if test "$have_win" = yes; then
642     unbound_root_key_file="C:\\Program Files\\Unbound\\root.key"
643 else
644     if test -f /var/lib/unbound/root.key;then
645         unbound_root_key_file="/var/lib/unbound/root.key"
646     else
647         if test -f /usr/share/dns/root.key;then
648             unbound_root_key_file="/usr/share/dns/root.key"
649         else
650             unbound_root_key_file="/etc/unbound/root.key"
651         fi
652     fi
653 fi
654 )
655
656 AC_DEFINE_UNQUOTED([UNBOUND_ROOT_KEY_FILE],
657   ["$unbound_root_key_file"], [The DNSSEC root key file])
658
659 system_config_file="/etc/gnutls/config"
660 AC_ARG_WITH(system-priority-file, AS_HELP_STRING([--with-system-priority-file],
661                                  [specify the system-wide config file (set empty to disable)]),
662             system_config_file="$withval"
663 )
664
665 AM_CONDITIONAL(DISABLE_SYSTEM_CONFIG, test -z "${system_config_file}")
666
667 if test -z "${system_config_file}";then
668         AC_DEFINE([DISABLE_SYSTEM_CONFIG], 1, [Whether to disable system configuration])
669 fi
670
671 AC_DEFINE_UNQUOTED([SYSTEM_PRIORITY_FILE],
672   ["$system_config_file"], [The system-wide gnutls configuration file])
673
674 AC_ARG_WITH(default-priority-string, AS_HELP_STRING([--with-default-priority-string],
675                                  [specify the default priority string used by gnutls_set_default_priority (default is NORMAL)]),
676             prio_string="$withval", 
677             prio_string="NORMAL")
678
679 AC_DEFINE_UNQUOTED([DEFAULT_PRIORITY_STRING], ["$prio_string"], [The default priority string])
680
681 dnl Check for p11-kit
682 P11_KIT_MINIMUM=0.23.1
683 AC_ARG_WITH(p11-kit,
684         AS_HELP_STRING([--without-p11-kit],
685                 [Build without p11-kit and PKCS#11 support]))
686 if test "$with_p11_kit" != "no"; then
687         PKG_CHECK_MODULES(P11_KIT, [p11-kit-1 >= $P11_KIT_MINIMUM], [with_p11_kit=yes], [with_p11_kit=no])
688         if test "$with_p11_kit" != "no";then
689                 AC_DEFINE([ENABLE_PKCS11], 1, [Build PKCS#11 support])
690                 if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
691                         GNUTLS_REQUIRES_PRIVATE="Requires.private: p11-kit-1"
692                 else
693                         GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1"
694                 fi
695         else
696                 with_p11_kit=no
697                 AC_MSG_ERROR([[
698 *** 
699 *** p11-kit >= $P11_KIT_MINIMUM was not found. To disable PKCS #11 support 
700 *** use --without-p11-kit, otherwise you may get p11-kit from
701 *** https://p11-glue.freedesktop.org/p11-kit.html
702 *** ]])
703         fi
704 fi
705
706 AM_CONDITIONAL(P11KIT_0_23_11_API, $PKG_CONFIG --atleast-version=0.23.11 p11-kit-1)
707
708 AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
709
710 AC_ARG_WITH(tpm,
711         AS_HELP_STRING([--without-tpm],
712                 [Disable TPM (trousers) support.]),
713                 [with_tpm=$withval], [with_tpm=yes])
714 if test "$with_tpm" != "no"; then
715     LIBS="$oldlibs -ltspi"
716     AC_MSG_CHECKING([for tss library])
717     AC_LINK_IFELSE([AC_LANG_PROGRAM([
718                    #include <trousers/tss.h>
719                    #include <trousers/trousers.h>],[
720                    int err = Tspi_Context_Create((void *)0);
721                    Trspi_Error_String(err);])],
722                   [AC_MSG_RESULT(yes)
723                    AC_SUBST([TSS_LIBS], [-ltspi])
724                    AC_SUBST([TSS_CFLAGS], [])
725                    AC_DEFINE([HAVE_TROUSERS], 1, [Enable TPM])
726                    with_tpm=yes],
727                   [AC_MSG_RESULT(no)
728                    AC_MSG_WARN([[
729 *** 
730 *** trousers was not found. TPM support will be disabled.
731 *** ]])
732                   with_tpm=no])
733     LIBS="$oldlibs"
734 fi
735
736 AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
737
738 for l in /usr/lib64 /usr/lib /lib64 /lib /usr/lib/x86_64-linux-gnu/; do
739     if test -f "${l}/libtspi.so.1";then
740         default_trousers_lib="${l}/libtspi.so.1"
741         break
742     fi
743 done
744
745 AC_ARG_WITH(trousers-lib, AS_HELP_STRING([--with-trousers-lib=LIB],
746                                  [set the location of the trousers library]),
747             ac_trousers_lib=$withval, ac_trousers_lib=$default_trousers_lib)
748
749 if test "$with_tpm" != "no" && test -z "$ac_trousers_lib"; then
750     AC_MSG_ERROR([[
751   ***
752   *** unable to find trousers library, please specify with --with-trousers-lib=<lib file>
753   ***
754   ]])
755 fi
756
757 AC_DEFINE_UNQUOTED([TROUSERS_LIB], ["$ac_trousers_lib"], [the location of the trousers library])
758 AC_SUBST(TROUSERS_LIB)
759
760 AM_MISSING_PROG([AUTOGEN], [autogen])
761
762 included_libopts=no
763 if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
764         AC_CHECK_PROGS([autogen], [autogen])
765
766         if test -z "$autogen"; then
767                 AC_MSG_WARN([[
768 ***
769 *** autogen not found. Will not link against system libopts.
770 *** ]])
771                 dnl simulate specifying option on the command line
772                 included_libopts=yes
773         fi
774         LIBOPTS_CHECK([src/libopts])
775         if test "$NEED_LIBOPTS_DIR" = "true";then
776                 dnl replace libopts-generated files with distributed backups, if present
777                 included_libopts=yes
778         fi
779 else
780         # Need to ensure the relevant conditionals get set
781         gl_STDNORETURN_H
782         AM_CONDITIONAL([INSTALL_LIBOPTS],[false])
783 fi
784
785 AM_CONDITIONAL(NEED_LIBOPTS, test "$included_libopts" = "yes")
786
787 # For minitasn1.
788 AC_CHECK_SIZEOF(unsigned long int, 4)
789 AC_CHECK_SIZEOF(unsigned int, 4)
790 AC_CHECK_SIZEOF(time_t, 4)
791
792 # export for use in scripts
793 AC_SUBST(ac_cv_sizeof_time_t)
794
795 AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
796
797
798 AC_ARG_WITH([default-trust-store-pkcs11],
799   [AS_HELP_STRING([--with-default-trust-store-pkcs11=URI],
800     [use the given pkcs11 uri as default trust store])])
801
802 if test "x$with_default_trust_store_pkcs11" != x; then
803   if test "x$with_p11_kit" = xno; then
804     AC_MSG_ERROR([cannot use pkcs11 store without p11-kit])
805   fi
806   AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_PKCS11],
807     ["$with_default_trust_store_pkcs11"], [use the given pkcs11 uri as default trust store])
808 fi
809
810 AM_CONDITIONAL([HAVE_PKCS11_TRUST_STORE], [test -n "${with_default_trust_store_pkcs11}"])
811
812 AC_ARG_WITH([default-trust-store-dir],
813   [AS_HELP_STRING([--with-default-trust-store-dir=DIR],
814     [use the given directory as default trust store])])
815
816 if test "x$with_default_trust_store_dir" != x; then
817   AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_DIR],
818     ["$with_default_trust_store_dir"], [use the given directory as default trust store])
819 fi
820
821 dnl auto detect https://lists.gnu.org/archive/html/help-gnutls/2012-05/msg00004.html
822 AC_ARG_WITH([default-trust-store-file],
823   [AS_HELP_STRING([--with-default-trust-store-file=FILE],
824     [use the given file default trust store])], with_default_trust_store_file="$withval",
825   [if test "$build" = "$host" && test x$with_default_trust_store_pkcs11 = x && test x$with_default_trust_store_dir = x && test x$have_macosx = x;then
826   for i in \
827     /etc/ssl/ca-bundle.pem \
828     /etc/ssl/certs/ca-certificates.crt \
829     /etc/pki/tls/cert.pem \
830     /usr/local/share/certs/ca-root-nss.crt \
831     /etc/ssl/cert.pem
832     do
833     if test -e "$i"; then
834       with_default_trust_store_file="$i"
835       break
836     fi
837   done
838   fi]
839 )
840
841 if test "$with_default_trust_store_file" = "no";then
842   with_default_trust_store_file=""
843 fi
844
845 AC_ARG_WITH([default-crl-file],
846   [AS_HELP_STRING([--with-default-crl-file=FILE],
847     [use the given CRL file as default])])
848
849 AC_ARG_WITH([default-blacklist-file],
850   [AS_HELP_STRING([--with-default-blacklist-file=FILE],
851     [use the given certificate blacklist file as default])])
852
853 if test "x$with_default_trust_store_file" != x; then
854   AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_FILE],
855     ["$with_default_trust_store_file"], [use the given file default trust store])
856 fi
857
858 if test "x$with_default_crl_file" != x; then
859   AC_DEFINE_UNQUOTED([DEFAULT_CRL_FILE],
860     ["$with_default_crl_file"], [use the given CRL file])
861 fi
862
863 if test "x$with_default_blacklist_file" != x; then
864   AC_DEFINE_UNQUOTED([DEFAULT_BLACKLIST_FILE],
865     ["$with_default_blacklist_file"], [use the given certificate blacklist file])
866 fi
867
868 dnl Guile bindings.
869 AC_MSG_CHECKING([whether building Guile bindings])
870 AC_ARG_ENABLE(guile,
871         AS_HELP_STRING([--enable-guile], [build GNU Guile bindings]),
872                 [opt_guile_bindings=$enableval], [opt_guile_bindings=yes])
873 AC_MSG_RESULT($opt_guile_bindings)
874
875 AC_ARG_WITH([guile-site-dir], AS_HELP_STRING([--with-guile-site-dir=DIR],
876     [guile site directory for gnutls, default is guile system settings]),
877     [guilesitedir="${withval}"], [guilesitedir='$(GUILE_SITE)'])
878 AC_ARG_WITH([guile-site-ccache-dir], AS_HELP_STRING([--with-guile-site-ccache-dir=DIR],
879     [guile ccache directory for gnutls, default is guile system settings]),
880     [guilesiteccachedir="${withval}"], [guilesiteccachedir='$(GUILE_SITE_CCACHE)'])
881 AC_ARG_WITH([guile-extension-dir], AS_HELP_STRING([--with-guile-extension-dir=DIR],
882     [guile extension directory for gnutls, default is guile system settings]),
883     [guileextensiondir="${withval}"], [guileextensiondir='$(GUILE_EXTENSION)'])
884 AC_SUBST([guilesitedir])
885 AC_SUBST([guilesiteccachedir])
886 AC_SUBST([guileextensiondir])
887
888 if test "$opt_guile_bindings" = "yes"; then
889    AC_MSG_RESULT([***
890 *** Detecting GNU Guile...
891 ])
892
893    AC_PATH_PROG([guile_snarf], [guile-snarf])
894    if test "x$guile_snarf" = "x"; then
895       AC_MSG_WARN([`guile-snarf' from Guile not found.  Guile bindings not built.])
896       opt_guile_bindings=no
897    else
898       dnl Check for 'guild', which can be used to compile Scheme code
899       dnl on Guile 2.x.
900       AC_PATH_PROG([GUILD], [guild])
901       AC_SUBST([GUILD])
902
903       GUILE_PKG
904       GUILE_PROGS
905       GUILE_SITE_DIR
906       GUILE_FLAGS
907
908       # Backward compatibility with <guile-2.2 m4 macro that is used
909       # due to autreconf of several CI machine.
910       # We need to guess the locations of ccache and extension
911       if test -z "${GUILE_SITE_CCACHE}"; then
912           AC_MSG_NOTICE([Found <guile-2.2 m4, macro emulating])
913
914           AC_MSG_CHECKING([for GUILE_SITE_CCACHE via pkg-config])
915           GUILE_SITE_CCACHE=`$PKG_CONFIG --variable=siteccachedir guile-$GUILE_EFFECTIVE_VERSION`
916           AC_MSG_RESULT([${GUILE_SITE_CCACHE}])
917           if test -z "${GUILE_SITE_CCACHE}"; then
918                   AC_MSG_CHECKING([for GUILE_SITE_CCACHE via guile])
919                   GUILE_SITE_CCACHE=`$GUILE -c "(display (if (defined? '%site-ccache-dir) (%site-ccache-dir) \"\"))"`
920                   AC_MSG_RESULT([${GUILE_SITE_CCACHE}])
921           fi
922           AC_SUBST([GUILE_SITE_CCACHE])
923
924           AC_MSG_CHECKING([for GUILE_EXTENSION])
925           GUILE_EXTENSION=`$PKG_CONFIG --print-errors --variable=extensiondir guile-$GUILE_EFFECTIVE_VERSION`
926           AC_MSG_RESULT([${GUILE_EXTENSION}])
927           AC_SUBST([GUILE_EXTENSION])
928       fi
929
930       save_CFLAGS="$CFLAGS"
931       save_LIBS="$LIBS"
932       CFLAGS="$CFLAGS $GUILE_CFLAGS"
933       LIBS="$LIBS $GUILE_LDFLAGS"
934       AC_MSG_CHECKING([whether GNU Guile is recent enough])
935       AC_LINK_IFELSE([AC_LANG_PROGRAM([], [scm_from_locale_string ("")])],
936         [], [opt_guile_bindings=no])
937       CFLAGS="$save_CFLAGS"
938       LIBS="$save_LIBS"
939
940       if test "$opt_guile_bindings" = "yes"; then
941         AC_MSG_RESULT([yes])
942         AC_MSG_CHECKING([whether gcc supports -fgnu89-inline])
943         _gcc_cflags_save="$CFLAGS"
944         CFLAGS="${CFLAGS} -fgnu89-inline"
945         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
946                           gnu89_inline=yes, gnu89_inline=no)
947         AC_MSG_RESULT($gnu89_inline)
948         CFLAGS="$_gcc_cflags_save"
949
950         # Optional Guile functions.
951         save_CFLAGS="$CFLAGS"
952         save_LIBS="$LIBS"
953         CFLAGS="$CFLAGS $GUILE_CFLAGS"
954         LIBS="$LIBS $GUILE_LDFLAGS"
955         AC_CHECK_FUNCS([scm_gc_malloc_pointerless])
956         CFLAGS="$save_CFLAGS"
957         LIBS="$save_LIBS"
958       else
959         AC_MSG_RESULT([no])
960         AC_MSG_WARN([A sufficiently recent GNU Guile not found.  Guile bindings not built.])
961         opt_guile_bindings=no
962       fi
963    fi
964 fi
965
966 AM_CONDITIONAL([HAVE_GUILE], [test "$opt_guile_bindings" = "yes"])
967 AM_CONDITIONAL([HAVE_GUILD], [test "x$GUILD" != "x"])
968
969 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
970 LIBGNUTLS_CFLAGS="-I${includedir}"
971 AC_SUBST(LIBGNUTLS_LIBS)
972 AC_SUBST(LIBGNUTLS_CFLAGS)
973
974 AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes")
975
976 AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.])
977 AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.])
978
979 AC_DEFINE([fread_file], [_gnutls_fread_file], [static lib rename])
980 AC_DEFINE([read_file], [_gnutls_read_file], [static lib rename])
981 AC_DEFINE([read_binary_file], [_gnutls_read_binary_file], [static lib rename])
982
983 dnl Some variables needed in makefiles
984 YEAR=`date +%Y`
985 AC_SUBST([YEAR], $YEAR)
986
987 dnl configuration options for config file parsing (inih)
988 AC_DEFINE([INI_MAX_LINE], 2048, [inih maximum line size])
989 AC_DEFINE([INI_ALLOW_INLINE_COMMENTS], 1, [whether to allowin inline comments])
990 AC_DEFINE([INI_STOP_ON_FIRST_ERROR], 1, [whether to stop on first error])
991 AC_DEFINE_UNQUOTED([INI_INLINE_COMMENT_PREFIXES], [";#"], [The inline comment prefixes])
992 AC_DEFINE_UNQUOTED([INI_START_COMMENT_PREFIXES], [";#"], [The comment prefixes])
993
994 AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])
995 AC_CONFIG_FILES([
996   Makefile
997   doc/Makefile
998   doc/credentials/Makefile
999   doc/credentials/srp/Makefile
1000   doc/credentials/x509/Makefile
1001   doc/doxygen/Doxyfile
1002   doc/examples/Makefile
1003   doc/latex/Makefile
1004   doc/manpages/Makefile
1005   doc/reference/Makefile
1006   doc/reference/version.xml
1007   doc/scripts/Makefile
1008   extra/Makefile
1009   extra/includes/Makefile
1010   libdane/Makefile
1011   libdane/includes/Makefile
1012   libdane/gnutls-dane.pc
1013   gl/Makefile
1014   gl/tests/Makefile
1015   guile/Makefile
1016   guile/src/Makefile
1017   lib/Makefile
1018   lib/accelerated/Makefile
1019   lib/accelerated/x86/Makefile
1020   lib/accelerated/aarch64/Makefile
1021   lib/algorithms/Makefile
1022   lib/auth/Makefile
1023   lib/ext/Makefile
1024   lib/extras/Makefile
1025   lib/gnutls.pc
1026   lib/includes/Makefile
1027   lib/includes/gnutls/gnutls.h
1028   lib/minitasn1/Makefile
1029   lib/nettle/Makefile
1030   lib/x509/Makefile
1031   lib/unistring/Makefile
1032   po/Makefile.in
1033   src/Makefile
1034   src/args-std.def
1035   src/gl/Makefile
1036   tests/Makefile
1037   tests/windows/Makefile
1038   tests/cert-tests/Makefile
1039   tests/slow/Makefile
1040   tests/suite/Makefile
1041   fuzz/Makefile
1042 ])
1043
1044 AC_OUTPUT
1045
1046 dnl  Warning flags:        errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS}
1047 AC_MSG_NOTICE([summary of build options:
1048
1049   version:              ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
1050   Host/Target system:   ${host}
1051   Build system:         ${build}
1052   Install prefix:       ${prefix}
1053   Compiler:             ${CC}
1054   Valgrind:             $opt_valgrind_tests ${VALGRIND}
1055   CFlags:               ${CFLAGS}
1056   Library types:        Shared=${enable_shared}, Static=${enable_static}
1057   Local libopts:        ${included_libopts}
1058   Local libtasn1:       ${included_libtasn1}
1059   Local unistring:      ${included_unistring}
1060   Use nettle-mini:      ${mini_nettle}
1061   Documentation:        ${enable_doc} (manpages: ${enable_manpages})
1062 ])
1063
1064 AC_MSG_NOTICE([External hardware support:
1065
1066   /dev/crypto:          $enable_cryptodev
1067   Hardware accel:       $hw_accel
1068   Padlock accel:        $use_padlock
1069   Random gen. variant:  $rnd_variant
1070   PKCS#11 support:      $with_p11_kit
1071   TPM support:          $with_tpm
1072 ])
1073 if test -n "$ac_trousers_lib";then
1074 AC_MSG_NOTICE([
1075   TPM library:          $ac_trousers_lib
1076 ])
1077 fi
1078
1079 AC_MSG_NOTICE([Optional features:
1080 (note that included applications might not compile properly
1081 if features are disabled)
1082
1083   SSL3.0 support:       $ac_enable_ssl3
1084   SSL2.0 client hello:  $ac_enable_ssl2
1085   Allow SHA1 sign:      $ac_allow_sha1
1086   DTLS-SRTP support:    $ac_enable_srtp
1087   ALPN support:         $ac_enable_alpn
1088   OCSP support:         $ac_enable_ocsp
1089   SRP support:          $ac_enable_srp
1090   PSK support:          $ac_enable_psk
1091   DHE support:          $ac_enable_dhe
1092   ECDHE support:        $ac_enable_ecdhe
1093   GOST support:         $ac_enable_gost
1094   Anon auth support:    $ac_enable_anon
1095   Heartbeat support:    $ac_enable_heartbeat
1096   IDNA support:         $idna_support
1097   Non-SuiteB curves:    $enable_non_suiteb
1098   FIPS140 mode:         $enable_fips
1099 ])
1100
1101 AC_MSG_NOTICE([Optional libraries:
1102
1103   Guile wrappers:       $opt_guile_bindings
1104   C++ library:          $use_cxx
1105   DANE library:         $enable_dane
1106   OpenSSL compat:       $enable_openssl
1107 ])
1108
1109 AC_MSG_NOTICE([System files:
1110
1111   Trust store pkcs11:   $with_default_trust_store_pkcs11
1112   Trust store dir:      $with_default_trust_store_dir
1113   Trust store file:     $with_default_trust_store_file
1114   Blacklist file:       $with_default_blacklist_file
1115   CRL file:             $with_default_crl_file
1116   Configuration file:   $system_config_file
1117   DNSSEC root key file: $unbound_root_key_file
1118 ])
1119
1120 if test ! -f "$unbound_root_key_file"; then
1121 AC_MSG_WARN([[
1122 *** 
1123 *** The DNSSEC root key file in $unbound_root_key_file was not found. 
1124 *** This file is needed for the verification of DNSSEC responses.
1125 *** Use the command: unbound-anchor -a "$unbound_root_key_file"
1126 *** to generate or update it.
1127 *** ]])
1128 fi
1129
1130 if test "${enable_static}" != no;then
1131 AC_MSG_WARN([[
1132 *** GnuTLS will be build as a static library. That means that library
1133 *** constructors for gnutls_global_init will not be made available to
1134 *** linking applications. If you are building that library for arbitrary
1135 *** applications to link, do not enable static linking.
1136 ]])
1137 fi
1138
1139 if test "$enable_fuzzer_target" != "no";then
1140 AC_MSG_WARN([[
1141 *** This version of the library is for fuzzying purposes and is intentionally broken!
1142 ]])
1143 fi