1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 # Author: Nikos Mavrogiannopoulos, Simon Josefsson
6 # This file is part of GnuTLS.
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.
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.
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
24 AC_INIT([GnuTLS], [3.4.0], [bugs@gnutls.org])
25 AC_CONFIG_AUX_DIR([build-aux])
26 AC_CONFIG_MACRO_DIR([m4])
29 AM_INIT_AUTOMAKE([1.12.2 subdir-objects no-dist-gzip dist-xz dist-lzip -Wall -Wno-override])
30 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
31 AC_CONFIG_HEADERS([config.h])
34 *** Checking for compilation programs...
37 dnl Checks for programs.
47 AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [/bin/true])
49 if test x"$AUTOGEN" = "x/bin/true"; then
52 *** autogen not found. Will not link against libopts.
54 enable_local_libopts=yes
57 # For includes/gnutls/gnutls.h.in.
58 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
59 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
60 AC_SUBST(PATCH_VERSION, [[`echo $PACKAGE_VERSION | sed 's/.*\..*\.\([0-9]*\).*/\1/g'`]])
61 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
63 touch suppressions.valgrind
64 dnl C and C++ capabilities
70 AS_HELP_STRING([--disable-cxx], [unconditionally disable the C++ library]),
71 use_cxx=$enableval, use_cxx=yes)
72 if test "$use_cxx" != "no"; then
74 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
77 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
78 AM_CONDITIONAL(WANT_TEST_SUITE, [test -f tests/suite/mini-eagain2.c])
80 dnl Detect windows build
82 *mingw32* | *mingw64*)
93 AM_CONDITIONAL(WINDOWS, test "$have_win" = yes)
94 AM_CONDITIONAL(MACOSX, test "$have_macosx" = yes)
95 AM_CONDITIONAL(ELF, test "$have_elf" = yes)
97 dnl Hardware Acceleration
98 AC_ARG_ENABLE(hardware-acceleration,
99 AS_HELP_STRING([--disable-hardware-acceleration], [unconditionally disable hardware acceleration]),
100 use_accel=$enableval, use_accel=yes)
104 if test "$use_accel" != "no"; then
106 i?86 | x86_64 | amd64)
107 AC_CHECK_HEADERS(cpuid.h)
108 if test "$host_cpu" = "x86_64" || test "$host_cpu" = "amd64"; then
120 AM_CONDITIONAL(ASM_X86_64, test x"$hw_accel" = x"x86-64")
121 AM_CONDITIONAL(ASM_X86_32, test x"$hw_accel" = x"x86")
122 AM_CONDITIONAL(ASM_X86, test x"$hw_accel" = x"x86" || test x"$hw_accel" = x"x86-64")
123 AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
124 AM_CONDITIONAL(HAVE_GCC, test "$GCC" = "yes")
129 LIBGNUTLS_EXTRA_HOOKS
132 AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
133 enable_doc=$enableval, enable_doc=yes)
134 AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
137 AS_HELP_STRING([--disable-tests], [don't compile or run any tests]),
138 enable_tests=$enableval, enable_tests=yes)
139 AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
142 AM_GNU_GETTEXT([external])
143 AM_GNU_GETTEXT_VERSION([0.18])
147 dnl No fork on MinGW, disable some self-tests until we fix them.
148 dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
149 AC_CHECK_FUNCS([fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,)
150 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
152 AC_CHECK_FUNCS([pthread_atfork __register_atfork],,)
154 AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>
156 ], [timer_create (0,0,0);])
158 if test "$have_win" != "yes";then
159 AC_CHECK_FUNCS([pthread_mutex_lock],,)
160 if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
161 AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
165 if test "$ac_cv_func_nanosleep" != "yes";then
166 AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [nanosleep (0, 0);])
167 gnutls_needs_librt=yes
170 if test "$ac_cv_func_clock_gettime" != "yes";then
171 AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [clock_gettime (0, 0);])
172 gnutls_needs_librt=yes
176 if test "$ac_cv_func_iconv" != "yes";then
177 AC_LIB_HAVE_LINKFLAGS(iconv,, [#include <iconv.h>], [iconv (0, 0, 0, 0, 0);])
178 if test "$HAVE_LIBICONV" = "yes";then
185 if test "$ac_have_unicode" != "yes";then
186 if test "$have_win" = "yes";then
191 dnl Note that g*l_INIT are run after we check for library capabilities,
192 dnl to prevent issues from caching lib dependencies. See discussion
193 dnl in https://bugs.gentoo.org/show_bug.cgi?id=494940 and
194 dnl http://gnu-autoconf.7623.n7.nabble.com/Correct-way-to-check-for-clock-gettime-td12276.html
198 dnl GCC warnings to enable
200 AC_ARG_ENABLE([gcc-warnings],
201 [AS_HELP_STRING([--enable-gcc-warnings],
202 [turn on lots of GCC warnings (for developers)])],
205 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
207 gl_gcc_warnings=$enableval],
211 if test "$gl_gcc_warnings" = yes; then
212 gl_WARN_ADD([-Wframe-larger-than=1024], [WSTACK_CFLAGS])
214 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
215 nw="$nw -Wc++-compat" # We don't care about C++ compilers
216 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
217 nw="$nw -Wtraditional" # Warns on #elif which we use often
218 nw="$nw -Wlogical-op" # Too many false positives
219 nw="$nw -Wold-style-definition" #
220 nw="$nw -Wpadded" # Our structs are not padded
221 nw="$nw -Wunreachable-code" # Too many false positives
222 nw="$nw -Wtraditional-conversion" # Too many warnings for now
223 nw="$nw -Wcast-qual" # Too many warnings for now
224 nw="$nw -Waggregate-return" # Too many warnings for now
225 nw="$nw -Wshadow" # Too many warnings for now
226 nw="$nw -Wswitch-default" # Too many warnings for now
227 nw="$nw -Wswitch-enum" # Too many warnings for now
228 nw="$nw -Wconversion" # Too many warnings for now
229 nw="$nw -Wsign-conversion" # Too many warnings for now
230 nw="$nw -Wformat-y2k" # Too many warnings for now
231 nw="$nw -Woverlength-strings" # We use some in tests/
232 nw="$nw -Wvla" # There is no point to avoid C99 variable length arrays
233 nw="$nw -Wformat-nonliteral" # Incompatible with gettext _()
234 nw="$nw -Wunsafe-loop-optimizations"
235 nw="$nw -Wstrict-overflow"
236 nw="$nw -Wmissing-noreturn"
237 nw="$nw -Winline" # Too compiler dependent
238 nw="$nw -Wsuggest-attribute=pure" # Is it worth using attributes?
239 nw="$nw -Wsuggest-attribute=const" # Is it worth using attributes?
240 nw="$nw -Wsuggest-attribute=noreturn" # Is it worth using attributes?
241 nw="$nw -Wstack-protector" # Some functions cannot be protected
242 nw="$nw -Wredundant-decls" # Some files cannot be compiled with that (gl_fd_to_handle)
244 gl_MANYWARN_ALL_GCC([ws])
245 gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw])
250 gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
251 gl_WARN_ADD([-Wno-format-y2k]) # Too many warnings for now
252 gl_WARN_ADD([-Wno-unused-value]) # warnings for things we don't want to get
253 gl_WARN_ADD([-Wno-unused-result]) # warnings for things we don't want to get
254 gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
255 gl_WARN_ADD([-Wno-stack-protector]) # Some functions cannot be protected
256 gl_WARN_ADD([-Wno-int-to-pointer-cast]) # Some files cannot be compiled with that (gl_fd_to_handle)
257 gl_WARN_ADD([-fdiagnostics-show-option])
260 AC_SUBST([WERROR_CFLAGS])
261 AC_SUBST([WSTACK_CFLAGS])
262 AC_SUBST([WARN_CFLAGS])
264 dnl Programs for compilation or development
266 LT_INIT([disable-static,win32-dll,shared])
270 AC_ARG_ENABLE(self-checks,
271 AS_HELP_STRING([--enable-self-checks], [enable self checking functionality]),
272 enable_self_checks=$enableval, enable_self_checks=no)
274 AC_ARG_ENABLE(fips140-mode,
275 AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode (implies self checks)]),
276 enable_fips=$enableval, enable_fips=no)
277 AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
278 if [ test "$enable_fips" = "yes" ];then
279 AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
280 if test "x$HAVE_LIBDL" = "xyes";then
281 enable_self_checks=yes
283 AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
285 AC_SUBST([FIPS140_LIBS], $LIBDL)
290 *** This system is not supported in FIPS140 mode.
291 *** libdl and dladdr() are required.
296 PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [with_libidn=yes], [with_libidn=no])
297 if test "$with_libidn" != "no";then
298 AC_DEFINE([HAVE_LIBIDN], 1, [Build IDNA support])
299 if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
300 GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn"
302 GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn"
308 *** libidn was not found. IDNA support will be disabled.
312 AM_CONDITIONAL(HAVE_LIBIDN, test "$with_libidn" != "no")
314 AC_ARG_ENABLE(non-suiteb-curves,
315 AS_HELP_STRING([--disable-non-suiteb-curves], [disable curves not in SuiteB]),
316 enable_non_suiteb=$enableval, enable_non_suiteb=yes)
317 if [ test "$enable_non_suiteb" = "yes" ];then
318 AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves])
321 AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes")
322 if [ test "$enable_self_checks" = "yes" ];then
323 AC_DEFINE([ENABLE_SELF_CHECKS], 1, [Self checks are included in the library])
326 AC_MSG_CHECKING([whether to build libdane])
327 AC_ARG_ENABLE(libdane,
328 AS_HELP_STRING([--disable-libdane],
329 [disable the built of libdane]),
330 enable_dane=$enableval, enable_dane=yes)
331 AC_MSG_RESULT($enable_dane)
333 if test "$enable_dane" != "no"; then
334 LIBS="$oldlibs -lunbound"
335 AC_MSG_CHECKING([for unbound library])
336 AC_LINK_IFELSE([AC_LANG_PROGRAM([
337 #include <unbound.h>],[
339 ctx = ub_ctx_create();])],
341 AC_SUBST([UNBOUND_LIBS], [-lunbound])
342 AC_SUBST([UNBOUND_CFLAGS], [])
343 AC_DEFINE([HAVE_DANE], 1, [Enable the DANE library])
348 *** libunbound was not found. Libdane will not be built.
354 AM_CONDITIONAL(ENABLE_DANE, test "$enable_dane" = "yes")
356 AC_ARG_WITH(unbound-root-key-file, AS_HELP_STRING([--with-unbound-root-key-file],
357 [specify the unbound root key file]),
358 unbound_root_key_file="$withval",
359 if test "$have_win" = yes; then
360 unbound_root_key_file="C:\\Program Files\\Unbound\\root.key"
362 if test -f /var/lib/unbound/root.key;then
363 unbound_root_key_file="/var/lib/unbound/root.key"
365 unbound_root_key_file="/etc/unbound/root.key"
370 AC_DEFINE_UNQUOTED([UNBOUND_ROOT_KEY_FILE],
371 ["$unbound_root_key_file"], [The DNSSEC root key file])
373 AC_ARG_WITH(system-priority-file, AS_HELP_STRING([--with-system-priority-file],
374 [specify the system priority file]),
375 system_priority_file="$withval",
376 system_priority_file="/etc/gnutls/default-priorities"
379 AC_DEFINE_UNQUOTED([SYSTEM_PRIORITY_FILE],
380 ["$system_priority_file"], [The system priority file])
382 dnl Check for p11-kit
383 P11_KIT_MINIMUM=0.20.0
385 AS_HELP_STRING([--without-p11-kit],
386 [Build without p11-kit and PKCS#11 support]))
387 if test "$with_p11_kit" != "no"; then
388 PKG_CHECK_MODULES(P11_KIT, [p11-kit-1 >= $P11_KIT_MINIMUM], [with_p11_kit=yes], [with_p11_kit=no])
389 if test "$with_p11_kit" != "no";then
390 AC_DEFINE([ENABLE_PKCS11], 1, [Build PKCS#11 support])
391 if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
392 GNUTLS_REQUIRES_PRIVATE="Requires.private: p11-kit-1"
394 GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1"
400 *** p11-kit >= $P11_KIT_MINIMUM was not found. PKCS #11 support will be disabled.
401 *** You may get it from http://p11-glue.freedesktop.org/p11-kit.html
406 AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
409 AS_HELP_STRING([--without-tpm],
410 [Disable TPM (trousers) support.]),
411 [with_tpm=$withval], [with_tpm=yes])
412 if test "$with_tpm" != "no"; then
413 LIBS="$oldlibs -ltspi"
414 AC_MSG_CHECKING([for tss library])
415 AC_LINK_IFELSE([AC_LANG_PROGRAM([
416 #include <trousers/tss.h>
417 #include <trousers/trousers.h>],[
418 int err = Tspi_Context_Create((void *)0);
419 Trspi_Error_String(err);])],
421 AC_SUBST([TSS_LIBS], [-ltspi])
422 AC_SUBST([TSS_CFLAGS], [])
423 AC_DEFINE([HAVE_TROUSERS], 1, [Enable TPM])
428 *** trousers was not found. TPM support will be disabled.
434 AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
436 LIBOPTS_CHECK([src/libopts])
437 if test "$NEED_LIBOPTS_DIR" = "true";then
438 dnl replace libopts-generated files with distributed backups, if present
440 for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
441 nam=`echo $i|sed 's/.bak//g'`
448 if test -z "$missing_baks"; then
449 AC_SUBST([AUTOGEN], [/bin/true])
451 enable_local_libopts=yes
453 enable_local_libopts=no
455 AM_CONDITIONAL(NEED_LIBOPTS, test "$enable_local_libopts" = "yes")
457 AC_CHECK_TYPE(ssize_t,
459 DEFINE_SSIZE_T="#include <sys/types.h>"
460 AC_SUBST(DEFINE_SSIZE_T)
462 AC_DEFINE([NO_SSIZE_T], 1, [no ssize_t type was found])
463 DEFINE_SSIZE_T="typedef int ssize_t;"
464 AC_SUBST(DEFINE_SSIZE_T)
466 #include <sys/types.h>
470 AC_CHECK_SIZEOF(unsigned long int, 4)
471 AC_CHECK_SIZEOF(unsigned int, 4)
473 AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
474 [disable zlib compression support]),
475 ac_zlib=$withval, ac_zlib=yes)
476 AC_MSG_CHECKING([whether to include zlib compression support])
477 if test x$ac_zlib != xno; then
479 AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
480 if test x$ac_cv_libz != xyes; then
483 *** ZLIB was not found. You will not be able to use ZLIB compression.)
489 PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
491 if test x$ac_zlib != xno; then
492 if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
493 if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
494 GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
496 GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
500 AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
504 AC_ARG_WITH([default-trust-store-pkcs11],
505 [AS_HELP_STRING([--with-default-trust-store-pkcs11=URI],
506 [use the given pkcs11 uri as default trust store])])
508 if test "x$with_default_trust_store_pkcs11" != x; then
509 if test "x$with_p11_kit" = xno; then
510 AC_MSG_ERROR([cannot use pkcs11 store without p11-kit])
512 AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_PKCS11],
513 ["$with_default_trust_store_pkcs11"], [use the given pkcs11 uri as default trust store])
516 AC_ARG_WITH([default-trust-store-dir],
517 [AS_HELP_STRING([--with-default-trust-store-dir=DIR],
518 [use the given directory as default trust store])])
520 if test "x$with_default_trust_store_dir" != x; then
521 AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_DIR],
522 ["$with_default_trust_store_dir"], [use the given directory as default trust store])
525 dnl auto detect http://lists.gnu.org/archive/html/help-gnutls/2012-05/msg00004.html
526 AC_ARG_WITH([default-trust-store-file],
527 [AS_HELP_STRING([--with-default-trust-store-file=FILE],
528 [use the given file default trust store])], with_default_trust_store_file="$withval",
529 [if test "$build" = "$host" && test x$with_default_trust_store_pkcs11 = x && test x$with_default_trust_store_dir = x;then
531 /etc/ssl/ca-bundle.pem \
532 /etc/ssl/certs/ca-certificates.crt \
533 /etc/pki/tls/cert.pem \
534 /usr/local/share/certs/ca-root-nss.crt \
537 if test -e "$i"; then
538 with_default_trust_store_file="$i"
545 if test "$with_default_trust_store_file" = "no";then
546 with_default_trust_store_file=""
549 AC_ARG_WITH([default-crl-file],
550 [AS_HELP_STRING([--with-default-crl-file=FILE],
551 [use the given CRL file as default])])
553 AC_ARG_WITH([default-blacklist-file],
554 [AS_HELP_STRING([--with-default-blacklist-file=FILE],
555 [use the given certificate blacklist file as default])])
557 if test "x$with_default_trust_store_file" != x; then
558 AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_FILE],
559 ["$with_default_trust_store_file"], [use the given file default trust store])
562 if test "x$with_default_crl_file" != x; then
563 AC_DEFINE_UNQUOTED([DEFAULT_CRL_FILE],
564 ["$with_default_crl_file"], [use the given CRL file])
567 if test "x$with_default_blacklist_file" != x; then
568 AC_DEFINE_UNQUOTED([DEFAULT_BLACKLIST_FILE],
569 ["$with_default_blacklist_file"], [use the given certificate blacklist file])
573 opt_guile_bindings=yes
574 AC_MSG_CHECKING([whether building Guile bindings])
576 AS_HELP_STRING([--enable-guile], [build GNU Guile bindings]),
577 opt_guile_bindings=$enableval)
578 AC_MSG_RESULT($opt_guile_bindings)
580 AC_ARG_WITH([guile-site-dir],
581 [AS_HELP_STRING([--with-guile-site-dir],
582 [use the given directory as the Guile site (use with care)])])
584 if test "$opt_guile_bindings" = "yes"; then
586 *** Detecting GNU Guile...
589 AC_PATH_PROG([guile_snarf], [guile-snarf])
590 if test "x$guile_snarf" = "x"; then
591 AC_MSG_WARN([`guile-snarf' from Guile 1.8 not found. Guile bindings not built.])
592 opt_guile_bindings=no
597 save_CFLAGS="$CFLAGS"
599 CFLAGS="$CFLAGS $GUILE_CFLAGS"
600 LIBS="$LIBS $GUILE_LDFLAGS"
601 AC_MSG_CHECKING([whether GNU Guile is recent enough])
602 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [scm_from_locale_string ("")])],
603 [], [opt_guile_bindings=no])
604 CFLAGS="$save_CFLAGS"
607 if test "$opt_guile_bindings" = "yes"; then
609 case "x$with_guile_site_dir" in
611 # Use the default $(GUILE_SITE).
615 # Automatically derive $(GUILE_SITE) from $(pkgdatadir). This
616 # hack is used to allow `distcheck' to work (see
617 # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am').
618 GUILE_SITE="\$(datadir)/guile/site"
622 # Use the user-specified directory as $(GUILE_SITE).
623 GUILE_SITE="$with_guile_site_dir"
627 AC_MSG_CHECKING([whether gcc supports -fgnu89-inline])
628 _gcc_cflags_save="$CFLAGS"
629 CFLAGS="${CFLAGS} -fgnu89-inline"
630 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
631 gnu89_inline=yes, gnu89_inline=no)
632 AC_MSG_RESULT($gnu89_inline)
633 CFLAGS="$_gcc_cflags_save"
635 # Optional Guile functions.
636 save_CFLAGS="$CFLAGS"
638 CFLAGS="$CFLAGS $GUILE_CFLAGS"
639 LIBS="$LIBS $GUILE_LDFLAGS"
640 AC_CHECK_FUNCS([scm_gc_malloc_pointerless])
641 CFLAGS="$save_CFLAGS"
644 # The place where guile-gnutls.la will go.
645 AC_MSG_CHECKING([the Guile effective version])
646 guile_effective_version="`$GUILE -c '(display (effective-version))'`"
647 AC_MSG_RESULT([$guile_effective_version])
648 guileextensiondir="$libdir/guile/$guile_effective_version"
649 AC_SUBST([guileextensiondir])
652 AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile bindings not built.])
653 opt_guile_bindings=no
657 AM_CONDITIONAL(HAVE_GUILE, test "$opt_guile_bindings" = "yes")
659 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
660 LIBGNUTLS_CFLAGS="-I${includedir}"
661 AC_SUBST(LIBGNUTLS_LIBS)
662 AC_SUBST(LIBGNUTLS_CFLAGS)
664 AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes")
666 AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.])
667 AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.])
669 AC_DEFINE([fread_file], [_gnutls_fread_file], [static lib rename])
670 AC_DEFINE([read_file], [_gnutls_read_file], [static lib rename])
671 AC_DEFINE([read_binary_file], [_gnutls_read_binary_file], [static lib rename])
673 dnl Crywrap dependencies
675 *** Checking dependencies for crywrap...
680 if test "$have_win" != "yes"; then
682 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h sys/select.h sys/types.h sys/wait.h])
684 dnl **********************
686 dnl **********************
687 AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
688 [AC_LANG_PROGRAM([#include <sys/types.h>
691 [return *(signal (0, 0)) (0) == 1;])],
692 [ac_cv_type_signal=int],
693 [ac_cv_type_signal=void])])
694 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
697 AC_FUNC_SELECT_ARGTYPES
698 AC_CHECK_FUNCS([alarm atexit dup2 epoll_create kqueue memchr memset munmap \
699 putenv regcomp scandir select socket strcasecmp strchr \
700 strdup strerror strncasecmp strrchr strstr strtoul uname])
702 AC_ARG_ENABLE(crywrap,
703 AS_HELP_STRING([--disable-crywrap], [unconditionally disable the crywrap TLS proxy service]))
706 if test "x$enable_crywrap" != "xno" ; then
707 AC_CHECK_FUNCS([argp_usage],[ac_argp=yes],[ac_argp=no])
710 if test "$ac_cv_func_daemon" != "no" && test "$ac_argp" != "no";then
716 AM_CONDITIONAL(ENABLE_CRYWRAP, test "x$crywrap" != "xno")
718 dnl end of crywrap requirements
720 dnl Some variables needed in makefiles
722 AC_SUBST([YEAR], $YEAR)
724 AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])
728 doc/credentials/Makefile
729 doc/credentials/openpgp/Makefile
730 doc/credentials/srp/Makefile
731 doc/credentials/x509/Makefile
734 doc/examples/Makefile
736 doc/manpages/Makefile
737 doc/reference/Makefile
738 doc/reference/version.xml
741 extra/includes/Makefile
743 libdane/includes/Makefile
744 libdane/gnutls-dane.pc
748 guile/modules/Makefile
752 lib/accelerated/Makefile
753 lib/accelerated/x86/Makefile
754 lib/algorithms/Makefile
759 lib/includes/Makefile
760 lib/includes/gnutls/gnutls.h
761 lib/minitasn1/Makefile
771 tests/cert-tests/Makefile
776 tests/key-tests/Makefile
777 tests/openpgp-certs/Makefile
778 tests/pkcs1-padding/Makefile
779 tests/pkcs12-decode/Makefile
780 tests/pkcs8-decode/Makefile
781 tests/rsa-md5-collision/Makefile
782 tests/safe-renegotiation/Makefile
783 tests/scripts/Makefile
787 tests/userid/Makefile
792 dnl Warning flags: errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS}
793 dnl Valgrind: $opt_valgrind_tests ${VALGRIND}
794 AC_MSG_NOTICE([summary of build options:
796 version: ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
797 Host/Target system: ${host}
798 Build system: ${build}
799 Install prefix: ${prefix}
802 Library types: Shared=${enable_shared}, Static=${enable_static}
803 Local libopts: ${enable_local_libopts}
804 Local libtasn1: ${included_libtasn1}
805 Use nettle-mini: ${mini_nettle}
808 AC_MSG_NOTICE([External hardware support:
810 /dev/crypto: $enable_cryptodev
811 Hardware accel: $hw_accel
812 PKCS#11 support: $with_p11_kit
813 TPM support: $with_tpm
816 AC_MSG_NOTICE([Optional features:
817 (note that included applications might not compile properly
818 if features are disabled)
820 DTLS-SRTP support: $ac_enable_srtp
821 ALPN support: $ac_enable_alpn
822 OCSP support: $ac_enable_ocsp
823 Ses. ticket support: $ac_enable_session_tickets
824 OpenPGP support: $ac_enable_openpgp
825 SRP support: $ac_enable_srp
826 PSK support: $ac_enable_psk
827 DHE support: $ac_enable_dhe
828 ECDHE support: $ac_enable_ecdhe
829 RSA-EXPORT support: $ac_enable_rsa_export
830 Anon auth support: $ac_enable_anon
831 Heartbeat support: $ac_enable_heartbeat
832 IDNA support: $libidn
833 Unicode support: $ac_have_unicode
834 Self checks: $enable_self_checks
835 Non-SuiteB curves: $enable_non_suiteb
836 FIPS140 mode: $enable_fips
839 AC_MSG_NOTICE([Optional applications:
841 crywrap app: $crywrap
844 AC_MSG_NOTICE([Optional libraries:
846 Guile wrappers: $opt_guile_bindings
847 C++ library: $use_cxx
848 DANE library: $enable_dane
849 OpenSSL compat: $enable_openssl
852 AC_MSG_NOTICE([System files:
854 Trust store pkcs11: $with_default_trust_store_pkcs11
855 Trust store dir: $with_default_trust_store_dir
856 Trust store file: $with_default_trust_store_file
857 Blacklist file: $with_default_blacklist_file
858 CRL file: $with_default_crl_file
859 Priority file: $system_priority_file
860 DNSSEC root key file: $unbound_root_key_file
863 if test ! -f "$unbound_root_key_file"; then
866 *** The DNSSEC root key file in $unbound_root_key_file was not found.
867 *** This file is needed for the verification of DNSSEC responses.
868 *** Use the command: unbound-anchor -a "$unbound_root_key_file"
869 *** to generate or update it.