require automake 1.12.2 for guile.
[gnutls:gnutls.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2000-2012 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.61)
24 AC_INIT([GnuTLS], [3.2.1], [bug-gnutls@gnu.org])
25 AC_CONFIG_AUX_DIR([build-aux])
26 AC_CONFIG_MACRO_DIR([m4])
27 AC_CANONICAL_HOST
28
29 AM_INIT_AUTOMAKE([1.12.2 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])
32
33 AC_MSG_RESULT([***
34 *** Checking for compilation programs...
35 ])
36
37 dnl Checks for programs.
38 AC_PROG_CC
39 gl_EARLY
40 AM_PROG_AS
41 AM_PROG_AR
42 AC_PROG_CXX
43
44 # For includes/gnutls/gnutls.h.in.
45 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
46 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
47 AC_SUBST(PATCH_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\..*\.\(.*\)/\1/g'`)
48 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
49
50 touch suppressions.valgrind
51 dnl C and C++ capabilities
52 AC_C_INLINE
53 AC_HEADER_STDC
54
55 # For the C++ code
56 AC_ARG_ENABLE(cxx,
57   AS_HELP_STRING([--disable-cxx], [unconditionally disable the C++ library]),
58     use_cxx=$enableval, use_cxx=yes)
59 if test "$use_cxx" != "no"; then
60   AC_LANG_PUSH(C++)
61   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
62   AC_LANG_POP(C++)
63 fi
64 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
65 AM_CONDITIONAL(WANT_TEST_SUITE, [test -f tests/suite/mini-eagain2.c])
66
67 dnl Detect windows build
68 case "$host" in
69   *mingw32* | *mingw64*)
70     have_win=yes
71   ;;
72   *darwin*)
73     have_macosx=yes
74   ;;
75   *)
76     have_elf=yes
77   ;;
78 esac
79
80 AM_CONDITIONAL(WINDOWS, test "$have_win" = yes)
81 AM_CONDITIONAL(MACOSX, test "$have_macosx" = yes)
82 AM_CONDITIONAL(ELF, test "$have_elf" = yes)
83
84 dnl Hardware Acceleration
85 AC_ARG_ENABLE(hardware-acceleration,
86   AS_HELP_STRING([--disable-hardware-acceleration], [unconditionally disable hardware acceleration]),
87     use_accel=$enableval, use_accel=yes)
88 hw_accel=none
89
90
91 if test "$use_accel" != "no"; then
92 case $host_cpu in
93   i?86 | x86_64 | amd64)
94       AC_CHECK_HEADERS(cpuid.h)
95       if test "$host_cpu" = "x86_64" || test "$host_cpu" = "amd64"; then
96         hw_accel="x86-64"
97       else
98         hw_accel="x86"
99       fi
100   ;;
101   *)
102   ;;
103 esac
104
105 fi
106
107 AM_CONDITIONAL(ASM_X86_64, test x"$hw_accel" = x"x86-64")
108 AM_CONDITIONAL(ASM_X86_32, test x"$hw_accel" = x"x86")
109 AM_CONDITIONAL(ASM_X86, test x"$hw_accel" = x"x86" || test x"$hw_accel" = x"x86-64")
110 AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
111 AM_CONDITIONAL(HAVE_GCC, test "$GCC" = "yes")
112
113 dnl Try the hooks.m4
114 LIBGNUTLS_HOOKS
115 LIBGNUTLS_EXTRA_HOOKS
116
117 AC_ARG_ENABLE(doc,
118   AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
119     enable_doc=$enableval, enable_doc=yes)
120 AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
121
122 AC_ARG_ENABLE(tests,
123   AS_HELP_STRING([--disable-tests], [don't compile or run any tests]),
124     enable_tests=$enableval, enable_tests=yes)
125 AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
126
127 GTK_DOC_CHECK(1.1)
128 AM_GNU_GETTEXT([external])
129 AM_GNU_GETTEXT_VERSION([0.18])
130
131 AC_C_BIGENDIAN
132
133 gl_INIT
134
135 dnl GCC warnings to enable
136
137 AC_ARG_ENABLE([gcc-warnings],
138   [AS_HELP_STRING([--enable-gcc-warnings],
139                   [turn on lots of GCC warnings (for developers)])],
140   [case $enableval in
141      yes|no) ;;
142      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
143    esac
144    gl_gcc_warnings=$enableval],
145   [gl_gcc_warnings=no]
146 )
147
148 if test "$gl_gcc_warnings" = yes; then
149   gl_WARN_ADD([-Wframe-larger-than=5120], [WSTACK_CFLAGS])
150
151   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
152   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
153   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
154   nw="$nw -Wtraditional"            # Warns on #elif which we use often
155   nw="$nw -Wlogical-op"             # Too many false positives
156   nw="$nw -Wold-style-definition"   # 
157   nw="$nw -Wpadded"                 # Our structs are not padded
158   nw="$nw -Wunreachable-code"       # Too many false positives
159   nw="$nw -Wtraditional-conversion" # Too many warnings for now
160   nw="$nw -Wcast-qual"              # Too many warnings for now
161   nw="$nw -Waggregate-return"       # Too many warnings for now
162   nw="$nw -Wshadow"                 # Too many warnings for now
163   nw="$nw -Wswitch-default"         # Too many warnings for now
164   nw="$nw -Wswitch-enum"            # Too many warnings for now
165   nw="$nw -Wconversion"             # Too many warnings for now
166   nw="$nw -Wsign-conversion"        # Too many warnings for now
167   nw="$nw -Wformat-y2k"             # Too many warnings for now
168   nw="$nw -Woverlength-strings"     # We use some in tests/
169   nw="$nw -Wvla"                    # There is no point to avoid C99 variable length arrays
170   nw="$nw -Wformat-nonliteral"      # Incompatible with gettext _()
171   nw="$nw -Wunsafe-loop-optimizations"
172   nw="$nw -Wstrict-overflow"
173   nw="$nw -Wmissing-noreturn"
174   nw="$nw -Winline"                 # Too compiler dependent
175   nw="$nw -Wsuggest-attribute=pure" # Is it worth using attributes?
176   nw="$nw -Wsuggest-attribute=const" # Is it worth using attributes?
177   nw="$nw -Wsuggest-attribute=noreturn" # Is it worth using attributes?
178   nw="$nw -Wstack-protector"        # Some functions cannot be protected
179   nw="$nw -Wredundant-decls"        # Some files cannot be compiled with that (gl_fd_to_handle)
180
181   gl_MANYWARN_ALL_GCC([ws])
182   gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw])
183   for w in $ws; do
184     gl_WARN_ADD([$w])
185   done
186
187   gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
188   gl_WARN_ADD([-Wno-format-y2k])     # Too many warnings for now
189   gl_WARN_ADD([-Wno-unused-value]) # warnings for things we don't want to get
190   gl_WARN_ADD([-Wno-unused-result]) # warnings for things we don't want to get
191   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
192   gl_WARN_ADD([-Wno-stack-protector])  # Some functions cannot be protected
193   gl_WARN_ADD([-Wno-int-to-pointer-cast])  # Some files cannot be compiled with that (gl_fd_to_handle)
194   gl_WARN_ADD([-fdiagnostics-show-option])
195 fi
196
197 AC_SUBST([WERROR_CFLAGS])
198 AC_SUBST([WSTACK_CFLAGS])
199 AC_SUBST([WARN_CFLAGS])
200
201 dnl Programs for compilation or development
202 AC_PROG_LN_S
203 AC_LIBTOOL_WIN32_DLL
204 AC_PROG_LIBTOOL
205
206
207 dnl No fork on MinGW, disable some self-tests until we fix them.
208 dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
209 AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon getpid clock_gettime pthread_mutex_lock],,)
210 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
211
212 if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
213   AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
214 fi
215
216 AC_MSG_CHECKING([whether to build libdane])
217 AC_ARG_ENABLE(libdane,
218     AS_HELP_STRING([--disable-libdane],
219                    [disable the built of libdane]),
220     enable_dane=$enableval, enable_dane=yes)
221 AC_MSG_RESULT($enable_dane)
222
223 if test "$enable_dane" != "no"; then
224     LIBS="$oldlibs -lunbound"
225     AC_MSG_CHECKING([for unbound library])
226     AC_LINK_IFELSE([AC_LANG_PROGRAM([
227                    #include <unbound.h>],[
228                    struct ub_ctx* ctx;
229                    ctx = ub_ctx_create();])],
230                   [AC_MSG_RESULT(yes)
231                    AC_SUBST([UNBOUND_LIBS], [-lunbound])
232                    AC_SUBST([UNBOUND_CFLAGS], [])
233                    AC_DEFINE([HAVE_DANE], 1, [Enable the DANE library])
234                    enable_dane=yes],
235                   [AC_MSG_RESULT(no)
236                    AC_MSG_WARN([[
237 *** 
238 *** libunbound was not found. Libdane will not be built.
239 *** ]])
240                   enable_dane=no])
241     LIBS="$oldlibs"
242 fi
243
244 AM_CONDITIONAL(ENABLE_DANE, test "$enable_dane" = "yes")
245
246 AC_ARG_WITH(unbound-root-key-file, AS_HELP_STRING([--with-unbound-root-key-file],
247                                  [specify the unbound root key file]),
248             unbound_root_key_file="$withval", 
249 if test "$have_win" = yes; then
250     unbound_root_key_file="C:\\Program Files\\Unbound\\root.key"
251 else
252     unbound_root_key_file="/etc/unbound/root.key"
253 fi
254 )
255
256 AC_DEFINE_UNQUOTED([UNBOUND_ROOT_KEY_FILE],
257   ["$unbound_root_key_file"], [The DNSSEC root key file])
258
259 dnl Check for p11-kit
260 AC_ARG_WITH(p11-kit,
261         AS_HELP_STRING([--without-p11-kit],
262                 [Build without p11-kit and PKCS#11 support]))
263 if test "$with_p11_kit" != "no"; then
264         PKG_CHECK_MODULES(P11_KIT, [p11-kit-1 >= 0.11], [with_p11_kit=yes], [with_p11_kit=no])
265         if test "$with_p11_kit" != "no";then
266                 AC_DEFINE([ENABLE_PKCS11], 1, [Build PKCS#11 support])
267                 if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
268                         GNUTLS_REQUIRES_PRIVATE="Requires.private: p11-kit-1"
269                 else
270                         GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1"
271                 fi
272         else
273                 with_p11_kit=no
274                 AC_MSG_WARN([[
275 *** 
276 *** p11-kit was not found. PKCS #11 support will be disabled.
277 *** You may get it from http://p11-glue.freedesktop.org/p11-kit.html
278 *** ]])
279         fi
280 fi
281
282 AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
283
284 AC_ARG_WITH(tpm,
285         AS_HELP_STRING([--with-tpm],
286                 [Build with TPM (trousers) support. Note that trousers is under the Common Public License and incompatible with GPL programs.]),
287                 [with_tpm=$withval], [with_tpm=no])
288 if test "$with_tpm" != "no"; then
289     LIBS="$oldlibs -ltspi"
290     AC_MSG_CHECKING([for tss library])
291     AC_LINK_IFELSE([AC_LANG_PROGRAM([
292                    #include <trousers/tss.h>
293                    #include <trousers/trousers.h>],[
294                    int err = Tspi_Context_Create((void *)0);
295                    Trspi_Error_String(err);])],
296                   [AC_MSG_RESULT(yes)
297                    AC_SUBST([TSS_LIBS], [-ltspi])
298                    AC_SUBST([TSS_CFLAGS], [])
299                    AC_DEFINE([HAVE_TROUSERS], 1, [Enable TPM])
300                    with_tpm=yes],
301                   [AC_MSG_RESULT(no)
302                    AC_MSG_WARN([[
303 *** 
304 *** trousers was not found. TPM support will be disabled.
305 *** ]])
306                   with_tpm=no])
307     LIBS="$oldlibs"
308 fi
309
310 AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
311
312 enable_local_libopts=yes
313 dnl PKG_CHECK_MODULES([autoopts], autoopts >= 36.2.11,, [enable_local_libopts=yes])
314
315 NEED_LIBOPTS_DIR=true
316 LIBOPTS_CHECK([src/libopts])
317
318 AC_CHECK_TYPE(ssize_t,
319   [
320     DEFINE_SSIZE_T="#include <sys/types.h>"
321     AC_SUBST(DEFINE_SSIZE_T)
322   ], [
323     AC_DEFINE([NO_SSIZE_T], 1, [no ssize_t type was found])
324     DEFINE_SSIZE_T="typedef int ssize_t;"
325     AC_SUBST(DEFINE_SSIZE_T)
326   ], [
327     #include <sys/types.h>
328   ])
329
330 # For minitasn1.
331 AC_CHECK_SIZEOF(unsigned long int, 4)
332 AC_CHECK_SIZEOF(unsigned int, 4)
333
334 AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
335                                  [disable zlib compression support]),
336             ac_zlib=$withval, ac_zlib=yes)
337 AC_MSG_CHECKING([whether to include zlib compression support])
338 if test x$ac_zlib != xno; then
339  AC_MSG_RESULT(yes)
340  AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
341  if test x$ac_cv_libz != xyes; then
342    AC_MSG_WARN(
343 *** 
344 *** ZLIB was not found. You will not be able to use ZLIB compression.)
345  fi
346 else
347  AC_MSG_RESULT(no)
348 fi
349
350 PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
351
352 if test x$ac_zlib != xno; then
353   if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
354     if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
355       GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
356     else
357       GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
358     fi
359   fi
360 fi
361 AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
362
363
364
365 AC_ARG_WITH([default-trust-store-pkcs11],
366   [AS_HELP_STRING([--with-default-trust-store-pkcs11=URI],
367     [use the given pkcs11 uri as default trust store])])
368
369 if test "x$with_default_trust_store_pkcs11" != x; then
370   if test "x$with_p11_kit" = xno; then
371     AC_MSG_ERROR([cannot use pkcs11 store without p11-kit])
372   fi
373   AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_PKCS11],
374     ["$with_default_trust_store_pkcs11"], [use the given pkcs11 uri as default trust store])
375 fi
376
377 dnl auto detect http://lists.gnu.org/archive/html/help-gnutls/2012-05/msg00004.html
378 AC_ARG_WITH([default-trust-store-file],
379   [AS_HELP_STRING([--with-default-trust-store-file=FILE],
380     [use the given file default trust store])], with_default_trust_store_file="$withval",
381   [if test "$build" = "$host";then
382   for i in \
383     /etc/ssl/ca-bundle.pem \
384     /etc/ssl/certs/ca-certificates.crt \
385     /etc/pki/tls/cert.pem \
386     /usr/local/share/certs/ca-root-nss.crt \
387     /etc/ssl/cert.pem
388     do
389     if test -e $i; then
390       with_default_trust_store_file="$i"
391       break
392     fi
393   done
394   fi]
395 )
396
397 if test "$with_default_trust_store_file" = "no";then
398   with_default_trust_store_file=""
399 fi
400
401 AC_ARG_WITH([default-crl-file],
402   [AS_HELP_STRING([--with-default-crl-file=FILE],
403     [use the given CRL file as default])])
404
405 if test "x$with_default_trust_store_file" != x; then
406   AC_DEFINE_UNQUOTED([DEFAULT_TRUST_STORE_FILE],
407     ["$with_default_trust_store_file"], [use the given file default trust store])
408 fi
409
410 if test "x$with_default_crl_file" != x; then
411   AC_DEFINE_UNQUOTED([DEFAULT_CRL_FILE],
412     ["$with_default_crl_file"], [use the given CRL file])
413 fi
414
415 dnl Guile bindings.
416 opt_guile_bindings=yes
417 AC_MSG_CHECKING([whether building Guile bindings])
418 AC_ARG_ENABLE(guile,
419         AS_HELP_STRING([--enable-guile], [build GNU Guile bindings]),
420 opt_guile_bindings=$enableval)
421 AC_MSG_RESULT($opt_guile_bindings)
422
423 AC_ARG_WITH([--with-guile-site-dir],
424   [AS_HELP_STRING([--with-guile-site-dir],
425      [use the given directory as the Guile site (use with care)])])
426
427 if test "$opt_guile_bindings" = "yes"; then
428    AC_MSG_RESULT([***
429 *** Detecting GNU Guile...
430 ])
431
432    AC_PATH_PROG([guile_snarf], [guile-snarf])
433    if test "x$guile_snarf" = "x"; then
434       AC_MSG_WARN([`guile-snarf' from Guile 1.8 not found.  Guile bindings not built.])
435       opt_guile_bindings=no
436    else
437       GUILE_PROGS
438       GUILE_FLAGS
439
440       save_CFLAGS="$CFLAGS"
441       save_LIBS="$LIBS"
442       CFLAGS="$CFLAGS $GUILE_CFLAGS"
443       LIBS="$LIBS $GUILE_LDFLAGS"
444       AC_MSG_CHECKING([whether GNU Guile is recent enough])
445       AC_LINK_IFELSE([AC_LANG_PROGRAM([], [scm_from_locale_string ("")])],
446         [], [opt_guile_bindings=no])
447       CFLAGS="$save_CFLAGS"
448       LIBS="$save_LIBS"
449
450       if test "$opt_guile_bindings" = "yes"; then
451         AC_MSG_RESULT([yes])
452         case "x$with_guile_site_dir" in 
453              xno)
454                 # Use the default $(GUILE_SITE).
455                 GUILE_SITE_DIR
456                 ;;
457              x|xyes)
458                 # Automatically derive $(GUILE_SITE) from $(pkgdatadir).  This
459                 # hack is used to allow `distcheck' to work (see
460                 # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am').
461                 GUILE_SITE="\$(datadir)/guile/site"
462                 AC_SUBST(GUILE_SITE)
463                 ;;
464              *)
465                 # Use the user-specified directory as $(GUILE_SITE).
466                 GUILE_SITE="$with_guile_site_dir"
467                 AC_SUBST(GUILE_SITE)
468                 ;;
469         esac
470         AC_MSG_CHECKING([whether gcc supports -fgnu89-inline])
471         _gcc_cflags_save="$CFLAGS"
472         CFLAGS="${CFLAGS} -fgnu89-inline"
473         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
474                           gnu89_inline=yes, gnu89_inline=no)
475         AC_MSG_RESULT($gnu89_inline)
476         CFLAGS="$_gcc_cflags_save"
477
478         # Optional Guile functions.
479         save_CFLAGS="$CFLAGS"
480         save_LIBS="$LIBS"
481         CFLAGS="$CFLAGS $GUILE_CFLAGS"
482         LIBS="$LIBS $GUILE_LDFLAGS"
483         AC_CHECK_FUNCS([scm_gc_malloc_pointerless])
484         CFLAGS="$save_CFLAGS"
485         LIBS="$save_LIBS"
486
487         # The place where guile-gnutls.la will go.
488         AC_MSG_CHECKING([the Guile effective version])
489         guile_effective_version="`$GUILE -c '(display (effective-version))'`"
490         AC_MSG_RESULT([$guile_effective_version])
491         guileextensiondir="$libdir/guile/$guile_effective_version"
492         AC_SUBST([guileextensiondir])
493       else
494         AC_MSG_RESULT([no])
495         AC_MSG_WARN([A sufficiently recent GNU Guile not found.  Guile bindings not built.])
496         opt_guile_bindings=no
497       fi
498    fi
499 fi
500 AM_CONDITIONAL(HAVE_GUILE, test "$opt_guile_bindings" = "yes")
501
502 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
503 LIBGNUTLS_CFLAGS="-I${includedir}"
504 AC_SUBST(LIBGNUTLS_LIBS)
505 AC_SUBST(LIBGNUTLS_CFLAGS)
506
507
508 AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.])
509 AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.])
510
511 AC_DEFINE([fread_file], [_gnutls_fread_file], [static lib rename])
512 AC_DEFINE([read_file], [_gnutls_read_file], [static lib rename])
513 AC_DEFINE([read_binary_file], [_gnutls_read_binary_file], [static lib rename])
514
515 dnl Crywrap dependencies
516    AC_MSG_RESULT([***
517 *** Checking dependencies for crywrap...
518 ])
519
520 crywrap=no
521
522 if test "$have_win" != "yes"; then
523
524 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h sys/select.h sys/types.h sys/wait.h])
525
526 dnl **********************
527 dnl * Typedefs & co
528 dnl **********************
529 AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
530 [AC_LANG_PROGRAM([#include <sys/types.h>
531 #include <signal.h>
532 ],
533                  [return *(signal (0, 0)) (0) == 1;])],
534                    [ac_cv_type_signal=int],
535                    [ac_cv_type_signal=void])])
536 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
537                     (`int' or `void').])
538
539 AC_FUNC_SELECT_ARGTYPES
540 AC_CHECK_FUNCS([alarm atexit dup2 epoll_create kqueue memchr memset munmap \
541                 putenv regcomp scandir select socket strcasecmp strchr \
542                 strdup strerror strncasecmp strrchr strstr strtoul uname])
543
544 AC_ARG_ENABLE(crywrap,
545         AS_HELP_STRING([--disable-crywrap], [unconditionally disable the crywrap TLS proxy service]))
546
547  libidn=no
548
549  if test "x$enable_crywrap" != "xno" ; then
550         PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no])
551  fi
552
553  if test "x$libidn" != "xno" && test "$ac_cv_func_daemon" != "no";then
554   crywrap=yes
555  fi
556
557 fi
558
559 AM_CONDITIONAL(ENABLE_CRYWRAP, test "x$crywrap" != "xno")
560 rm -f suppressions.valgrind
561 dnl end of crywrap requirements
562
563 AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])
564 AC_CONFIG_FILES([
565   Makefile
566   doc/Makefile
567   doc/credentials/Makefile
568   doc/credentials/openpgp/Makefile
569   doc/credentials/srp/Makefile
570   doc/credentials/x509/Makefile
571   doc/cyclo/Makefile
572   doc/doxygen/Doxyfile
573   doc/examples/Makefile
574   doc/latex/Makefile
575   doc/manpages/Makefile
576   doc/reference/Makefile
577   doc/reference/version.xml
578   doc/scripts/Makefile
579   extra/Makefile
580   extra/includes/Makefile
581   libdane/Makefile
582   libdane/includes/Makefile
583   libdane/gnutls-dane.pc
584   gl/Makefile
585   gl/tests/Makefile
586   guile/Makefile
587   guile/modules/Makefile
588   guile/src/Makefile
589   guile/tests/Makefile
590   lib/Makefile
591   lib/accelerated/Makefile
592   lib/accelerated/x86/Makefile
593   lib/algorithms/Makefile
594   lib/auth/Makefile
595   lib/ext/Makefile
596   lib/extras/Makefile
597   lib/gnutls.pc
598   lib/includes/Makefile
599   lib/includes/gnutls/gnutls.h
600   lib/minitasn1/Makefile
601   lib/nettle/Makefile
602   lib/opencdk/Makefile
603   lib/openpgp/Makefile
604   lib/x509/Makefile
605   po/Makefile.in
606   src/Makefile
607   src/crywrap/Makefile
608   tests/Makefile
609   tests/cert-tests/Makefile
610   tests/dsa/Makefile
611   tests/dtls/Makefile
612   tests/srp/Makefile
613   tests/ecdsa/Makefile
614   tests/key-id/Makefile
615   tests/openpgp-certs/Makefile
616   tests/pkcs1-padding/Makefile
617   tests/pkcs12-decode/Makefile
618   tests/pkcs8-decode/Makefile
619   tests/rsa-md5-collision/Makefile
620   tests/safe-renegotiation/Makefile
621   tests/scripts/Makefile
622   tests/sha2/Makefile
623   tests/slow/Makefile
624   tests/suite/Makefile
625   tests/userid/Makefile
626 ])
627
628 AC_OUTPUT
629
630 dnl  Warning flags:        errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS}
631 dnl  Valgrind:             $opt_valgrind_tests ${VALGRIND}
632 AC_MSG_NOTICE([summary of build options:
633
634   version:              ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
635   Host/Target system:   ${host}
636   Build system:         ${build}
637   Install prefix:       ${prefix}
638   Compiler:             ${CC}
639   CFlags:               ${CFLAGS}
640   Library types:        Shared=${enable_shared}, Static=${enable_static}
641 ])
642
643 AC_MSG_NOTICE([External hardware support:
644
645   /dev/crypto:          $enable_cryptodev
646   Hardware accel:       $hw_accel
647   PKCS#11 support:      $with_p11_kit
648   TPM support:          $with_tpm
649 ])
650
651 AC_MSG_NOTICE([Optional features:
652 (note that included applications might not compile properly
653 if features are disabled)
654
655   DTLS-SRTP support:    $ac_enable_srtp
656   ALPN support:         $ac_enable_alpn
657   OCSP support:         $ac_enable_ocsp
658   OpenPGP support:      $ac_enable_openpgp
659   SRP support:          $ac_enable_srp
660   PSK support:          $ac_enable_psk
661   DHE support:          $ac_enable_dhe
662   ECDHE support:        $ac_enable_ecdhe
663   Anon auth support:    $ac_enable_anon
664   Heartbeat support:    $ac_enable_heartbeat
665   RSA-EXPORT compat:    $ac_enable_rsa_export
666 ])
667
668 AC_MSG_NOTICE([Optional applications:
669
670   crywrap app:          $libidn
671   local libopts:        $enable_local_libopts
672 ])
673
674 AC_MSG_NOTICE([Optional libraries:
675
676   Guile wrappers:       $opt_guile_bindings
677   C++ library:          $use_cxx
678   DANE library:         $enable_dane
679   OpenSSL compat:       $enable_openssl
680 ])
681
682 AC_MSG_NOTICE([System files:
683
684   Trust store pkcs:     $with_default_trust_store_pkcs11
685   Trust store file:     $with_default_trust_store_file
686   CRL file:             $with_default_crl_file
687   DNSSEC root key file: $unbound_root_key_file
688 ])
689
690 if test ! -f "$unbound_root_key_file"; then
691 AC_MSG_WARN([[
692 *** 
693 *** The DNSSEC root key file in $unbound_root_key_file was not found. 
694 *** This file is needed for the verification of DNSSEC responses.
695 *** Use the command: unbound-anchor -a "$unbound_root_key_file"
696 *** to generate or update it.
697 *** ]])
698 fi