1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 # Free Software Foundation, Inc.
5 # Author: Nikos Mavrogiannopoulos
7 # This file is part of GNUTLS.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
25 AC_INIT([GnuTLS], [2.3.0], [bug-gnutls@gnu.org])
26 AC_CONFIG_AUX_DIR([build-aux])
30 AM_INIT_AUTOMAKE([1.10 dist-bzip2])
31 AM_CONFIG_HEADER(config.h)
35 # Library code modified: REVISION++
36 # Interfaces changed/added/removed: CURRENT++ REVISION=0
37 # Interfaces added: AGE++
38 # Interfaces removed: AGE=0
39 AC_SUBST(LT_CURRENT, 27)
40 AC_SUBST(LT_REVISION, 0)
44 # Used when creating the Windows libgnutls-XX.def files.
45 SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
48 dnl for opencdk needs also change in the test
49 GNUTLS_OPENCDK_VERSION=0.6.5
50 GNUTLS_GCRYPT_VERSION=1:1.2.4
51 GNUTLS_LIBTASN1_VERSION=0.3.4
52 AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION", [version of gcrypt])
53 AC_DEFINE_UNQUOTED(GNUTLS_LIBTASN1_VERSION, "$GNUTLS_LIBTASN1_VERSION", [version of libtasn1])
55 # Compute numeric versions, used in includes/gnutls/gnutls.h.in.
56 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
57 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
58 AC_SUBST(PATCH_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\..*\.\(.*\)/\1/g'`)
59 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
62 AC_MSG_CHECKING([whether in dmalloc mode])
63 AC_ARG_ENABLE(dmalloc-mode,
64 AS_HELP_STRING([--enable-dmalloc-mode], [enable dmalloc mode]),
65 opt_dmalloc_mode=$enableval)
66 AC_MSG_RESULT($opt_dmalloc_mode)
69 AC_MSG_CHECKING([whether in electric fence mode])
70 AC_ARG_ENABLE(efence-mode,
71 AS_HELP_STRING([--enable-efence-mode], [enable electric fence mode]),
72 opt_efence_mode=$enableval)
73 AC_MSG_RESULT($opt_efence_mode)
76 AC_MSG_CHECKING([whether in developer mode])
77 AC_ARG_ENABLE(developer-mode,
78 AS_HELP_STRING([--enable-developer-mode], [enable developer mode]),
79 opt_developer_mode=$enableval)
80 AC_MSG_RESULT($opt_developer_mode)
83 AC_MSG_CHECKING([whether in profile mode])
84 AC_ARG_ENABLE(profile-mode,
85 AS_HELP_STRING([--enable-profile-mode], [enable profiler]),
86 opt_profiler_mode=$enableval)
87 AC_MSG_RESULT($opt_profiler_mode)
90 *** Checking for compilation programs...
93 dnl Checks for programs.
98 AC_PATH_PROG([GAA], [gaa])
99 if test "x$GAA" = "x"; then
101 *** GAA was not found. It is only needed if you wish to modify
102 *** the source code or command-line description files. In this case,
103 *** you may want to get it from http://gaa.sourceforge.net/
106 AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes")
110 *** Detecting compiler options...
118 AM_GNU_GETTEXT([external])
119 AM_GNU_GETTEXT_VERSION([0.17])
121 dnl In order to use the reentrant libc functions.
122 dnl I hope it is portable enough.
123 CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
124 AM_CFLAGS="${CFLAGS}"
127 AS_HELP_STRING([--disable-cxx],
128 [unconditionally disable the C++ library]),
129 use_cxx=$enableval, use_cxx=yes)
130 if test "$use_cxx" != "no"; then
132 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
135 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
136 AC_MSG_CHECKING([whether to build C++ library])
137 AC_MSG_RESULT($use_cxx)
139 AC_MSG_CHECKING([whether C99 macros are supported])
141 #define test_mac(...)
147 AC_DEFINE(C99_MACROS, 1, [C99 macros are supported])
151 AC_MSG_WARN([C99 macros not supported. This may affect compiling.]))
153 if test $ac_cv_c_compiler_gnu != no; then
154 if test x$opt_developer_mode = xyes; then
155 AM_CFLAGS="${AM_CFLAGS} -g -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter"
156 # AM_CFLAGS="${AM_CFLAGS} -g -W -Wall -Wcast-align -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wshadow -Wno-unused-parameter -Wimplicit -fno-common -Wno-sign-compare -Wbad-function-cast -Wendif-labels -Wmissing-declarations -Wno-missing-format-attribute -Wmissing-prototypes -Wnested-externs -Wpointer-arith -pedantic -Wlong-long -Wcast-qual -Wcast-align -Winline -Wredundant-decls -Wstrict-prototypes -Wwrite-strings -Wparentheses -Wsequence-point -Wpacked -Waggregate-return -Wfloat-equal -Wmultichar -Wunknown-pragmas -Wtrigraphs -Wswitch -Wreturn-type -Wmain -Wchar-subscripts -Wcomment -Wno-missing-noreturn"
159 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
160 _gcc_cflags_save=$CFLAGS
161 CFLAGS="${CFLAGS} -Wno-pointer-sign"
162 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
163 AC_MSG_RESULT($_gcc_psign)
164 if test x"$_gcc_psign" != xyes ; then
165 CFLAGS=$_gcc_cflags_save;
168 AC_MSG_CHECKING([if gcc/ld supports -Wl,--output-def])
169 _gcc_ldflags_save=$LDFLAGS
170 LDFLAGS="-Wl,--output-def,foo.def"
171 AC_LINK_IFELSE(AC_LANG_PROGRAM([]),output_def=yes,output_def=no)
172 AC_MSG_RESULT($output_def)
173 LDFLAGS="$_gcc_ldflags_save"
175 if test x$opt_dmalloc_mode = xyes; then
176 AC_CHECK_LIB(dmalloc, main)
177 AC_DEFINE(USE_DMALLOC, 1, [enable the use of dmalloc])
179 if test x$opt_efence_mode = xyes; then
180 AC_CHECK_LIB(efence, main)
181 AC_DEFINE(USE_EFENCE, 1, [use electric fence])
185 AC_MSG_CHECKING([whether we have GNU assembler])
186 GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
188 AM_CFLAGS="${AM_CFLAGS} -pipe"
195 # Needs to be called outside of 'if' clause.
196 AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$output_def" = "yes")
199 *** Detecting C library capabilities...
203 AC_CHECK_HEADERS(strings.h alloca.h)
204 AC_CHECK_HEADERS(errno.h)
205 AC_CHECK_HEADERS(math.h limits.h float.h stdarg.h ctype.h)
207 AC_CHECK_HEADERS(netdb.h)
208 AC_CHECK_FUNCS(umask vasprintf isascii fork,,)
211 # No fork on MinGW, disable some self-tests until we fix them.
212 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
215 *** Detecting system's parameters...
218 # Run self-tests under valgrind?
219 if test "$cross_compiling" = no; then
220 AC_CHECK_PROGS(VALGRIND, valgrind)
222 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
223 opt_valgrind_tests=yes
225 opt_valgrind_tests=no
228 AC_MSG_CHECKING([whether self tests are run under valgrind])
229 AC_ARG_ENABLE(valgrind-tests,
230 AS_HELP_STRING([--enable-valgrind-tests],
231 [run self tests under valgrind]),
232 opt_valgrind_tests=$enableval)
233 AC_MSG_RESULT($opt_valgrind_tests)
236 AC_CHECK_SIZEOF(unsigned long, 4)
237 AC_CHECK_SIZEOF(unsigned int, 4)
239 # For storing integers in pointers without warnings
240 # http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
241 AC_CHECK_SIZEOF(void *)
242 AC_CHECK_SIZEOF(long)
244 case $ac_cv_sizeof_void_p in
246 AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [(long)],
247 [Additional cast to bring void* to a type castable to int.])
250 AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [])
254 # For some systems we know that we have ld_version scripts.
255 # Use it then as default.
256 have_ld_version_script=no
259 have_ld_version_script=yes
262 have_ld_version_script=yes
265 AC_ARG_ENABLE([ld-version-script],
266 AC_HELP_STRING([--enable-ld-version-script],
267 [enable/disable use of linker version script.
268 (default is system dependent)]),
269 [have_ld_version_script=$enableval],
271 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
273 AC_CHECK_TYPES(uint,,, [
274 # include <sys/types.h>
277 # Check for and replace ssize_t.
278 AC_CHECK_TYPE(ssize_t,
279 [DEFINE_SSIZE_T="#include <sys/types.h>"
280 AC_SUBST(DEFINE_SSIZE_T)],
281 [AC_DEFINE(NO_SSIZE_T, 1, [no ssize_t type was found])
282 DEFINE_SSIZE_T="typedef int ssize_t;"
283 AC_SUBST(DEFINE_SSIZE_T)],
284 [#include <sys/types.h>])
289 *** Checking for external libraries...
292 # For Guile bindings.
294 opt_guile_bindings=yes
295 AC_MSG_CHECKING([whether building Guile bindings])
297 AS_HELP_STRING([--enable-guile], [build GNU Guile bindings]),
298 opt_guile_bindings=$enableval)
299 AC_MSG_RESULT($opt_guile_bindings)
301 AC_ARG_WITH([--with-guile-site-dir],
302 [AS_HELP_STRING([--with-guile-site-dir],
303 [use the given directory as the Guile site (use with care)])])
305 if test "x$opt_guile_bindings" = "xyes"; then
307 *** Detecting GNU Guile...
310 AC_PATH_PROG([guile_snarf], [guile-snarf])
311 if test "x$guile_snarf" = "x"; then
312 AC_MSG_WARN([`guile-snarf' from Guile 1.8 not found. Guile bindings not built.])
313 opt_guile_bindings=no
318 save_CFLAGS="$CFLAGS"
320 CFLAGS="$CFLAGS $GUILE_CFLAGS"
321 LIBS="$LIBS $GUILE_LDFLAGS"
322 AC_MSG_CHECKING([whether GNU Guile is recent enough])
323 AC_LINK_IFELSE(AC_LANG_CALL([], [scm_from_locale_string]),
324 [], [opt_guile_bindings=no])
325 CFLAGS="$save_CFLAGS"
328 if test "x$opt_guile_bindings" = "xyes"; then
330 case "x$with_guile_site_dir" in
332 # Use the default $(GUILE_SITE).
336 # Automatically derive $(GUILE_SITE) from $(pkgdatadir). This
337 # hack is used to allow `distcheck' to work (see
338 # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am').
339 GUILE_SITE="\$(datadir)/guile/site"
343 # Use the user-specified directory as $(GUILE_SITE).
344 GUILE_SITE="$with_guile_site_dir"
350 AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile bindings not built.])
351 opt_guile_bindings=no
355 AM_CONDITIONAL(HAVE_GUILE, test "x$opt_guile_bindings" = "xyes")
357 AM_PATH_LIBGCRYPT($GNUTLS_GCRYPT_VERSION,,
358 dnl Can't disable - gnutls depends on gcrypt
361 *** libgcrypt was not found. You may want to get it from
362 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
367 # Hard-wire the gl/m4/gc.m4 test.
368 AC_ARG_WITH(builtin-crypto,
369 AS_HELP_STRING([--with-builtin-crypto],
370 [use internal crypto instead of libgcrypt (EXPERIMENTAL)]),
373 LTLIBGCRYPT=$LIBGCRYPT_LIBS
375 AC_MSG_CHECKING([whether to enable Opaque PRF input support])
376 AC_ARG_ENABLE(opaque-prf-input,
377 AS_HELP_STRING([--enable-opaque-prf-input=DD],
378 [enable Opaque PRF input using DD as extension type]),
379 ac_opaque_prf_input=$enableval, ac_opaque_prf_input=no)
380 if test "$ac_opaque_prf_input" != "no"; then
381 if ! echo $ac_opaque_prf_input | egrep -q '^[[0-9]]+$'; then
382 ac_opaque_prf_input=no
384 *** Could not parse Opaque PRF Input extension type.
385 *** Use --enable-opaque-prf-input=XX where XX is decimal, for example
386 *** to use extension value 42 use --enable-opqaue-prf-input=42]])
389 if test "$ac_opaque_prf_input" != "no"; then
390 AC_MSG_RESULT([yes (extension value $ac_opaque_prf_input)])
391 AC_DEFINE_UNQUOTED(ENABLE_OPRFI, $ac_opaque_prf_input,
392 [enable Opaque PRF Input])
396 AM_CONDITIONAL(ENABLE_OPRFI, test "$ac_opaque_prf_input" != "no")
398 AC_MSG_CHECKING([whether to disable SRP authentication support])
399 AC_ARG_ENABLE(srp-authentication,
400 AS_HELP_STRING([--disable-srp-authentication],
401 [disable the SRP authentication support]),
403 if test x$ac_enable_srp != xno; then
405 AC_DEFINE(ENABLE_SRP, 1, [enable SRP authentication])
410 AM_CONDITIONAL(ENABLE_SRP, test "$ac_enable_srp" != "no")
412 AC_MSG_CHECKING([whether to disable PSK authentication support])
413 AC_ARG_ENABLE(psk-authentication,
414 AS_HELP_STRING([--disable-psk-authentication],
415 [disable the PSK authentication support]),
417 if test x$ac_enable_psk != xno; then
419 AC_DEFINE(ENABLE_PSK, 1, [enable PSK authentication])
425 AC_MSG_CHECKING([whether to disable anonymous authentication support])
426 AC_ARG_ENABLE(anon-authentication,
427 AS_HELP_STRING([--disable-anon-authentication],
428 [disable the anonymous authentication support]),
430 if test x$ac_enable_anon != xno; then
432 AC_DEFINE(ENABLE_ANON, 1, [enable anonymous authentication])
437 AM_CONDITIONAL(ENABLE_ANON, test "$ac_enable_anon" != "no")
439 dnl Check for Camellia support
441 AC_ARG_ENABLE(camellia,
442 AS_HELP_STRING([--disable-camellia], [disable Camellia cipher]),
443 ac_enable_camellia=no)
444 if test "$ac_enable_camellia" != "no"; then
445 AC_MSG_CHECKING([for Camellia support in libgcrypt])
446 if test -n "`$LIBGCRYPT_CONFIG --algorithms | grep -i camellia`"; then
448 ac_enable_camellia=yes
451 ac_enable_camellia=no
454 AC_MSG_CHECKING([whether to disable Camellia cipher])
455 if test "$ac_enable_camellia" = "yes"; then
457 AC_DEFINE(ENABLE_CAMELLIA, 1, [enable camellia block cipher])
462 AC_MSG_CHECKING([whether to disable extra PKI stuff])
463 AC_ARG_ENABLE(extra-pki,
464 AS_HELP_STRING([--disable-extra-pki],
465 [only enable the basic PKI stuff]),
466 disable_pki=$enableval, disable_pki=no)
467 if test "$disable_pki" != "no"; then
472 AC_DEFINE(ENABLE_PKI, 1, [whether to include all the PKCS/PKI stuff])
474 AM_CONDITIONAL(ENABLE_PKI, test "$disable_pki" = "no")
476 dnl Check whether to disable OpenPGP authentication completely
477 dnl from libgnutls-extra.
479 ac_enable_openpgp=yes
480 AC_MSG_CHECKING([whether to disable OpenPGP Certificate authentication support])
481 AC_ARG_ENABLE(openpgp-authentication,
482 AS_HELP_STRING([--disable-openpgp-authentication],
483 [disable the OpenPGP authentication support]),
484 ac_enable_openpgp=no)
485 if test x$ac_enable_openpgp = xno; then
489 AC_DEFINE(ENABLE_OPENPGP, 1, [use openpgp authentication])
492 AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
494 dnl Test whether to use the included opencdk library
496 if test x$ac_enable_openpgp = xyes; then
497 AC_ARG_WITH(included-opencdk,
498 AS_HELP_STRING([--with-included-opencdk], [use the included opencdk]),
499 ac_enable_included_opencdk=$withval,
500 ac_enable_included_opencdk=no)
501 if test x$ac_enable_included_opencdk = xno;then
502 AC_LIB_HAVE_LINKFLAGS(opencdk,, [
503 #include <opencdk.h>], [
504 #if OPENCDK_VERSION_MINOR < 6 || OPENCDK_VERSION_PATCH < 5
505 # error "OpenCDK 0.6.5 is required"
507 cdk_check_version( NULL);
510 if test "$ac_cv_libopencdk" != yes; then
511 ac_enable_included_opencdk=yes
514 *** libopencdk was not found. You may want to get it from
515 *** ftp://ftp.gnutls.org/pub/gnutls/opencdk/
517 *** Will use the included opencdk.
521 AC_MSG_CHECKING([whether to use the included opencdk])
522 AC_MSG_RESULT($ac_enable_included_opencdk)
526 AM_CONDITIONAL(ENABLE_INCLUDED_OPENCDK, test "$ac_enable_included_opencdk" = "yes")
528 AC_MSG_CHECKING([whether to disable OpenSSL compatibility layer])
529 AC_ARG_ENABLE(openssl-compatibility,
530 AS_HELP_STRING([--disable-openssl-compatibility],
531 [disable the OpenSSL compatibility support]),
532 ac_enable_openssl=$withval,
533 ac_enable_openssl=yes)
534 if test x$ac_enable_openssl != xno; then
540 AM_CONDITIONAL(ENABLE_OPENSSL, test "$ac_enable_openssl" = "yes")
543 AC_ARG_WITH(included-libtasn1,
544 AS_HELP_STRING([--with-included-libtasn1],
545 [use the included libtasn1]),
546 minitasn1_enabled=$withval,
547 minitasn1_enabled=no)
549 if test x$minitasn1_enabled = xno; then
550 AM_PATH_LIBTASN1($GNUTLS_LIBTASN1_VERSION,,
551 minitasn1_enabled=yes
554 *** LibtASN1 ${GNUTLS_LIBTASN1_VERSION} was not found. Will use the included one.
558 AC_MSG_CHECKING([whether to use the included minitasn1])
559 AC_MSG_RESULT($minitasn1_enabled)
561 AM_CONDITIONAL(ENABLE_MINITASN1, test "$minitasn1_enabled" = "yes")
563 dnl Check for libcfg+
566 AC_ARG_WITH(included-libcfg,
567 AS_HELP_STRING([--with-included-libcfg],
568 [use the included libcfg+ (certtool only)]),
569 libcfg_enabled=$withval,
571 dnl We search for libcfg+ which is used by certtool
573 AC_CHECK_LIB(cfg+, cfg_get_context,:,
577 *** Libcfg+ was not found. Will use the included one.]])))
579 AM_CONDITIONAL(HAVE_LIBCFG, test "$libcfg_enabled" = "no")
582 AC_MSG_CHECKING([whether to use the included libcfg])
583 AC_MSG_RESULT($libcfg_enabled)
586 dnl CHECK FOR ZLIB SUPPORT
589 AC_MSG_CHECKING([whether to include zlib compression support])
592 AS_HELP_STRING([--without-zlib], [disable zlib compression support]),
596 if test x$ac_zlib != xno; then
598 AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
599 if test "$ac_cv_libz" != yes; then
602 *** ZLIB was not found. You will not be able to use ZLIB compression.)
610 dnl CHECK FOR LZO SUPPORT (whether to use the included one)
616 AS_HELP_STRING([--without-lzo], [do not use lzo compression]),
620 AC_MSG_CHECKING([whether to include lzo compression support])
621 AC_MSG_RESULT($use_lzo)
623 if test x$use_lzo = xyes; then
624 AC_DEFINE(USE_LZO, 1, [whether to use the lzo compression])
626 AC_ARG_WITH(included-lzo,
627 AS_HELP_STRING([--with-included-lzo],
628 [include minilzo in libgnutls-extra]),
629 minilzo_enabled=$withval,
632 AC_MSG_CHECKING([whether to use the included lzo compression library])
633 AC_MSG_RESULT($minilzo_enabled)
636 if test "$minilzo_enabled" != "yes"; then
637 AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2)
638 if test "$LZO_LIBS" = ""; then
639 AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo, [
643 *** Could not find liblzo or liblzo2. Will use the included minilzo.
650 if test "$LZO_LIBS" = "-llzo"; then
651 AC_CHECK_HEADERS(lzo1x.h)
652 elif test "$LZO_LIBS" = "-llzo2"; then
653 AC_CHECK_HEADERS(lzo/lzo1x.h)
656 if test "$minilzo_enabled" = "yes"; then
657 AC_DEFINE(USE_MINILZO, 1, [whether to use the included minilzo])
661 AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes")
662 AM_CONDITIONAL(ENABLE_INCLUDED_LZO, test "$minilzo_enabled" = "yes")
664 if test "$minilzo_enabled" = "yes"; then
665 # See libextra/minilzo/README.LZO
666 AC_CHECK_TYPE(ptrdiff_t,long)
668 AC_CHECK_SIZEOF(short)
670 AC_CHECK_SIZEOF(long)
671 AC_CHECK_SIZEOF(long long)
672 AC_CHECK_SIZEOF(__int64)
673 AC_CHECK_SIZEOF(void *)
674 AC_CHECK_SIZEOF(size_t)
675 AC_CHECK_SIZEOF(ptrdiff_t)
677 AC_CHECK_FUNCS(memcmp memcpy memmove memset)
681 *** Setting up gnulib compatibility files...
686 AC_TRY_LINK([#include <winsock2.h>], [
687 WORD wVersionRequested = MAKEWORD(2, 2);
689 int err = WSAStartup(wVersionRequested, &wsaData);
690 WSACleanup ();], wsastartup=yes, wsastartup=no)
691 if test x$wsastartup = xyes; then
692 AC_DEFINE(HAVE_WINSOCK, 1, [Call WSAStartup in gnutls_global_init])
694 AC_MSG_CHECKING([if we have Windows sockets and WSAStartup/WSACleanup])
695 AC_MSG_RESULT($wsastartup)
698 *** Detecting options for shared libraries...
703 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS"
704 LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
705 AC_SUBST(LIBGNUTLS_LIBS)
706 AC_SUBST(LIBGNUTLS_CFLAGS)
708 LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
709 LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK -I${includedir}"
710 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
711 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
714 AM_CFLAGS="${AM_CFLAGS} ${LIBGCRYPT_CFLAGS}"
716 if test $ac_cv_c_compiler_gnu != no; then
717 if test x$opt_profiler_mode = xyes; then
718 AC_CHECK_PROG(FC_OK, fc-config, yes, no)
719 if test x$FC_OK = xyes; then
720 AM_CFLAGS="${AM_CFLAGS} `fc-config --cflags`"
721 LIBS="$LIBS `fc-config --libs`"
724 *** You must install libfc in order to enable profiling. http://www710.univ-lyon1.fr/~yperret/fnccheck/profiler.html
730 if test $ac_full -eq 0; then
731 AC_SUBST(POSSIBLY_WARN_ABOUT_MISSING_FEATURES, [[
733 #warning This is not the official GnuTLS library. Several features were disabled at compilation.
734 #endif /* __GNUC__ */]])
739 AC_CONFIG_COMMANDS([chmod-config],[[
740 chmod +x lib/libgnutls-config
741 chmod +x libextra/libgnutls-extra-config
744 AC_CONFIG_FILES([Makefile po/Makefile.in \
745 doc/Makefile doc/examples/Makefile doc/scripts/Makefile \
746 doc/manpages/Makefile doc/reference/Makefile \
747 doc/credentials/Makefile doc/credentials/x509/Makefile \
748 doc/credentials/srp/Makefile doc/credentials/openpgp/Makefile \
749 gl/Makefile lgl/Makefile \
750 tests/Makefile tests/rsa-md5-collision/Makefile tests/userid/Makefile \
751 tests/pkcs1-padding/Makefile tests/pkcs8-decode/Makefile \
752 tests/pkcs12-decode/Makefile tests/pathlen/Makefile \
753 tests/key-id/Makefile tests/sha2/Makefile \
754 tests/hostname-check/Makefile \
755 includes/Makefile includes/gnutls/gnutls.h \
756 lib/Makefile lib/minitasn1/Makefile lib/x509/Makefile \
757 libextra/Makefile libextra/openpgp/Makefile libextra/opencdk/Makefile \
758 libextra/minilzo/Makefile tests/openpgp/Makefile \
760 src/cfg/Makefile src/cfg/platon/Makefile src/cfg/platon/str/Makefile \
761 lib/libgnutls-config libextra/libgnutls-extra-config \
762 lib/gnutls.pc libextra/gnutls-extra.pc
763 guile/Makefile guile/modules/Makefile
764 guile/src/Makefile guile/tests/Makefile])
766 AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])