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 # GNUTLS is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # GNUTLS 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 GNUTLS; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 AC_INIT([GnuTLS], [2.1.8], [bug-gnutls@gnu.org])
25 AC_CONFIG_AUX_DIR([build-aux])
29 AM_INIT_AUTOMAKE([1.10 dist-bzip2])
30 AM_CONFIG_HEADER(config.h)
34 # Library code modified: REVISION++
35 # Interfaces changed/added/removed: CURRENT++ REVISION=0
36 # Interfaces added: AGE++
37 # Interfaces removed: AGE=0
38 AC_SUBST(LT_CURRENT, 27)
39 AC_SUBST(LT_REVISION, 0)
43 # Used when creating the Windows libgnutls-XX.def files.
44 SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
47 dnl for opencdk needs also change in the test
48 GNUTLS_OPENCDK_VERSION=0.6.5
49 GNUTLS_GCRYPT_VERSION=1:1.2.4
50 GNUTLS_LIBTASN1_VERSION=0.3.4
51 AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION", [version of gcrypt])
52 AC_DEFINE_UNQUOTED(GNUTLS_LIBTASN1_VERSION, "$GNUTLS_LIBTASN1_VERSION", [version of libtasn1])
54 # Compute numeric versions, used in includes/gnutls/gnutls.h.in.
55 AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
56 AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
57 AC_SUBST(PATCH_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\..*\.\(.*\)/\1/g'`)
58 AC_SUBST(NUMBER_VERSION, `printf "0x%02x%02x%02x" $MAJOR_VERSION $MINOR_VERSION $PATCH_VERSION`)
61 AC_MSG_CHECKING([whether in dmalloc mode])
62 AC_ARG_ENABLE(dmalloc-mode,
63 AS_HELP_STRING([--enable-dmalloc-mode], [enable dmalloc mode]),
64 opt_dmalloc_mode=$enableval)
65 AC_MSG_RESULT($opt_dmalloc_mode)
68 AC_MSG_CHECKING([whether in electric fence mode])
69 AC_ARG_ENABLE(efence-mode,
70 AS_HELP_STRING([--enable-efence-mode], [enable electric fence mode]),
71 opt_efence_mode=$enableval)
72 AC_MSG_RESULT($opt_efence_mode)
75 AC_MSG_CHECKING([whether in developer mode])
76 AC_ARG_ENABLE(developer-mode,
77 AS_HELP_STRING([--enable-developer-mode], [enable developer mode]),
78 opt_developer_mode=$enableval)
79 AC_MSG_RESULT($opt_developer_mode)
82 AC_MSG_CHECKING([whether in profile mode])
83 AC_ARG_ENABLE(profile-mode,
84 AS_HELP_STRING([--enable-profile-mode], [enable profiler]),
85 opt_profiler_mode=$enableval)
86 AC_MSG_RESULT($opt_profiler_mode)
89 *** Checking for compilation programs...
92 dnl Checks for programs.
93 AM_GNU_GETTEXT([external])
94 AM_GNU_GETTEXT_VERSION([0.16])
99 AC_PATH_PROG([GAA], [gaa])
100 if test "x$GAA" = "x"; then
102 *** GAA was not found. It is only needed if you wish to modify
103 *** the source code or command-line description files. In this case,
104 *** you may want to get it from http://gaa.sourceforge.net/
107 AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes")
111 *** Detecting compiler options...
119 dnl In order to use the reentrant libc functions.
120 dnl I hope it is portable enough.
121 CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
122 AM_CFLAGS="${CFLAGS}"
125 AS_HELP_STRING([--disable-cxx],
126 [unconditionally disable the C++ library]),
127 use_cxx=$enableval, use_cxx=yes)
128 if test "$use_cxx" != "no"; then
130 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], use_cxx=yes, use_cxx=no)
133 AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
134 AC_MSG_CHECKING([whether to build C++ library])
135 AC_MSG_RESULT($use_cxx)
137 AC_MSG_CHECKING([whether C99 macros are supported])
139 #define test_mac(...)
145 AC_DEFINE(C99_MACROS, 1, [C99 macros are supported])
149 AC_MSG_WARN([C99 macros not supported. This may affect compiling.]))
151 if test $ac_cv_c_compiler_gnu != no; then
152 if test x$opt_developer_mode = xyes; then
153 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"
154 # 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"
157 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
158 _gcc_cflags_save=$CFLAGS
159 CFLAGS="${CFLAGS} -Wno-pointer-sign"
160 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
161 AC_MSG_RESULT($_gcc_psign)
162 if test x"$_gcc_psign" != xyes ; then
163 CFLAGS=$_gcc_cflags_save;
166 AC_MSG_CHECKING([if gcc/ld supports -Wl,--output-def])
167 _gcc_ldflags_save=$LDFLAGS
168 LDFLAGS="-Wl,--output-def,foo.def"
169 AC_LINK_IFELSE(AC_LANG_PROGRAM([]),output_def=yes,output_def=no)
170 AC_MSG_RESULT($output_def)
171 LDFLAGS="$_gcc_ldflags_save"
173 if test x$opt_dmalloc_mode = xyes; then
174 AC_CHECK_LIB(dmalloc, main)
175 AC_DEFINE(USE_DMALLOC, 1, [enable the use of dmalloc])
177 if test x$opt_efence_mode = xyes; then
178 AC_CHECK_LIB(efence, main)
179 AC_DEFINE(USE_EFENCE, 1, [use electric fence])
183 AC_MSG_CHECKING([whether we have GNU assembler])
184 GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
186 AM_CFLAGS="${AM_CFLAGS} -pipe"
193 # Needs to be called outside of 'if' clause.
194 AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$output_def" = "yes")
197 *** Detecting C library capabilities...
201 AC_CHECK_HEADERS(strings.h alloca.h)
202 AC_CHECK_HEADERS(errno.h)
203 AC_CHECK_HEADERS(math.h limits.h float.h stdarg.h ctype.h)
205 AC_CHECK_HEADERS(netdb.h)
206 AC_CHECK_FUNCS(umask vasprintf isascii fork,,)
209 # No fork on MinGW, disable some self-tests until we fix them.
210 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
213 *** Detecting system's parameters...
216 # Run self-tests under valgrind?
217 if test "$cross_compiling" = no; then
218 AC_CHECK_PROGS(VALGRIND, valgrind)
220 if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
221 opt_valgrind_tests=yes
223 opt_valgrind_tests=no
226 AC_MSG_CHECKING([whether self tests are run under valgrind])
227 AC_ARG_ENABLE(valgrind-tests,
228 AS_HELP_STRING([--enable-valgrind-tests],
229 [run self tests under valgrind]),
230 opt_valgrind_tests=$enableval)
231 AC_MSG_RESULT($opt_valgrind_tests)
234 AC_CHECK_SIZEOF(unsigned long, 4)
235 AC_CHECK_SIZEOF(unsigned int, 4)
237 # For storing integers in pointers without warnings
238 # http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
239 AC_CHECK_SIZEOF(void *)
240 AC_CHECK_SIZEOF(long)
242 case $ac_cv_sizeof_void_p in
244 AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [(long)],
245 [Additional cast to bring void* to a type castable to int.])
248 AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [])
252 # For some systems we know that we have ld_version scripts.
253 # Use it then as default.
254 have_ld_version_script=no
257 have_ld_version_script=yes
260 have_ld_version_script=yes
263 AC_ARG_ENABLE([ld-version-script],
264 AC_HELP_STRING([--enable-ld-version-script],
265 [enable/disable use of linker version script.
266 (default is system dependent)]),
267 [have_ld_version_script=$enableval],
269 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
271 AC_CHECK_TYPES(uint,,, [
272 # include <sys/types.h>
275 # Check for and replace ssize_t.
276 AC_CHECK_TYPE(ssize_t,
277 [DEFINE_SSIZE_T="#include <sys/types.h>"
278 AC_SUBST(DEFINE_SSIZE_T)],
279 [AC_DEFINE(NO_SSIZE_T, 1, [no ssize_t type was found])
280 DEFINE_SSIZE_T="typedef int ssize_t;"
281 AC_SUBST(DEFINE_SSIZE_T)],
282 [#include <sys/types.h>])
287 *** Checking for external libraries...
290 # For Guile bindings.
292 opt_guile_bindings=yes
293 AC_MSG_CHECKING([whether building Guile bindings])
295 AS_HELP_STRING([--enable-guile], [build GNU Guile bindings]),
296 opt_guile_bindings=$enableval)
297 AC_MSG_RESULT($opt_guile_bindings)
299 AC_ARG_WITH([--with-guile-site-dir],
300 [AS_HELP_STRING([--with-guile-site-dir],
301 [use the given directory as the Guile site (use with care)])])
303 if test "x$opt_guile_bindings" = "xyes"; then
305 *** Detecting GNU Guile...
308 AC_PATH_PROG([guile_snarf], [guile-snarf])
309 if test "x$guile_snarf" = "x"; then
310 AC_MSG_WARN([`guile-snarf' from Guile 1.8 not found. Guile bindings not built.])
311 opt_guile_bindings=no
316 save_CFLAGS="$CFLAGS"
318 CFLAGS="$CFLAGS $GUILE_CFLAGS"
319 LIBS="$LIBS $GUILE_LDFLAGS"
320 AC_MSG_CHECKING([whether GNU Guile is recent enough])
321 AC_LINK_IFELSE(AC_LANG_CALL([], [scm_from_locale_string]),
322 [], [opt_guile_bindings=no])
323 CFLAGS="$save_CFLAGS"
326 if test "x$opt_guile_bindings" = "xyes"; then
328 case "x$with_guile_site_dir" in
330 # Use the default $(GUILE_SITE).
334 # Automatically derive $(GUILE_SITE) from $(pkgdatadir). This
335 # hack is used to allow `distcheck' to work (see
336 # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am').
337 GUILE_SITE="\$(datadir)/guile/site"
341 # Use the user-specified directory as $(GUILE_SITE).
342 GUILE_SITE="$with_guile_site_dir"
348 AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile bindings not built.])
349 opt_guile_bindings=no
353 AM_CONDITIONAL(HAVE_GUILE, test "x$opt_guile_bindings" = "xyes")
355 AM_PATH_LIBGCRYPT($GNUTLS_GCRYPT_VERSION,,
356 dnl Can't disable - gnutls depends on gcrypt
359 *** libgcrypt was not found. You may want to get it from
360 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
365 # Hard-wire the gl/m4/gc.m4 test.
366 AC_ARG_WITH(builtin-crypto,
367 AS_HELP_STRING([--with-builtin-crypto],
368 [use internal crypto instead of libgcrypt (EXPERIMENTAL)]),
371 LTLIBGCRYPT=$LIBGCRYPT_LIBS
373 AC_MSG_CHECKING([whether to enable Opaque PRF input support])
374 AC_ARG_ENABLE(opaque-prf-input,
375 AS_HELP_STRING([--enable-opaque-prf-input=DD],
376 [enable Opaque PRF input using DD as extension type]),
377 ac_opaque_prf_input=$enableval, ac_opaque_prf_input=no)
378 if test "$ac_opaque_prf_input" != "no"; then
379 if ! echo $ac_opaque_prf_input | egrep -q '^[[0-9]]+$'; then
380 ac_opaque_prf_input=no
382 *** Could not parse Opaque PRF Input extension type.
383 *** Use --enable-opaque-prf-input=XX where XX is decimal, for example
384 *** to use extension value 42 use --enable-opqaue-prf-input=42]])
387 if test "$ac_opaque_prf_input" != "no"; then
388 AC_MSG_RESULT([yes (extension value $ac_opaque_prf_input)])
389 AC_DEFINE_UNQUOTED(ENABLE_OPRFI, $ac_opaque_prf_input,
390 [enable Opaque PRF Input])
394 AM_CONDITIONAL(ENABLE_OPRFI, test "$ac_opaque_prf_input" != "no")
396 AC_MSG_CHECKING([whether to disable SRP authentication support])
397 AC_ARG_ENABLE(srp-authentication,
398 AS_HELP_STRING([--disable-srp-authentication],
399 [disable the SRP authentication support]),
401 if test x$ac_enable_srp != xno; then
403 AC_DEFINE(ENABLE_SRP, 1, [enable SRP authentication])
408 AM_CONDITIONAL(ENABLE_SRP, test "$ac_enable_srp" != "no")
410 AC_MSG_CHECKING([whether to disable PSK authentication support])
411 AC_ARG_ENABLE(psk-authentication,
412 AS_HELP_STRING([--disable-psk-authentication],
413 [disable the PSK authentication support]),
415 if test x$ac_enable_psk != xno; then
417 AC_DEFINE(ENABLE_PSK, 1, [enable PSK authentication])
423 AC_MSG_CHECKING([whether to disable anonymous authentication support])
424 AC_ARG_ENABLE(anon-authentication,
425 AS_HELP_STRING([--disable-anon-authentication],
426 [disable the anonymous authentication support]),
428 if test x$ac_enable_anon != xno; then
430 AC_DEFINE(ENABLE_ANON, 1, [enable anonymous authentication])
435 AM_CONDITIONAL(ENABLE_ANON, test "$ac_enable_anon" != "no")
437 dnl Check for Camellia support
439 AC_ARG_ENABLE(camellia,
440 AS_HELP_STRING([--disable-camellia], [disable Camellia cipher]),
441 ac_enable_camellia=no)
442 if test "$ac_enable_camellia" != "no"; then
443 AC_MSG_CHECKING([for Camellia support in libgcrypt])
444 if test -n "`$LIBGCRYPT_CONFIG --algorithms | grep -i camellia`"; then
446 ac_enable_camellia=yes
449 ac_enable_camellia=no
452 AC_MSG_CHECKING([whether to disable Camellia cipher])
453 if test "$ac_enable_camellia" = "yes"; then
455 AC_DEFINE(ENABLE_CAMELLIA, 1, [enable camellia block cipher])
460 AC_MSG_CHECKING([whether to disable extra PKI stuff])
461 AC_ARG_ENABLE(extra-pki,
462 AS_HELP_STRING([--disable-extra-pki],
463 [only enable the basic PKI stuff]),
464 disable_pki=$enableval, disable_pki=no)
465 if test "$disable_pki" != "no"; then
470 AC_DEFINE(ENABLE_PKI, 1, [whether to include all the PKCS/PKI stuff])
472 AM_CONDITIONAL(ENABLE_PKI, test "$disable_pki" = "no")
474 dnl Check whether to disable OpenPGP authentication completely
475 dnl from libgnutls-extra.
477 ac_enable_openpgp=yes
478 AC_MSG_CHECKING([whether to disable OpenPGP Certificate authentication support])
479 AC_ARG_ENABLE(openpgp-authentication,
480 AS_HELP_STRING([--disable-openpgp-authentication],
481 [disable the OpenPGP authentication support]),
482 ac_enable_openpgp=no)
483 if test x$ac_enable_openpgp = xno; then
487 AC_DEFINE(ENABLE_OPENPGP, 1, [use openpgp authentication])
490 AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
492 dnl Test whether to use the included opencdk library
494 if test x$ac_enable_openpgp = xyes; then
495 AC_ARG_WITH(included-opencdk,
496 AS_HELP_STRING([--with-included-opencdk], [use the included opencdk]),
497 ac_enable_included_opencdk=$withval,
498 ac_enable_included_opencdk=no)
499 if test x$ac_enable_included_opencdk = xno;then
500 AC_LIB_HAVE_LINKFLAGS(opencdk,, [
501 #include <opencdk.h>], [
502 #if OPENCDK_VERSION_MINOR < 6 || OPENCDK_VERSION_PATCH < 5
503 # error "OpenCDK 0.6.5 is required"
505 cdk_check_version( NULL);
508 if test "$ac_cv_libopencdk" != yes; then
509 ac_enable_included_opencdk=yes
512 *** libopencdk was not found. You may want to get it from
513 *** ftp://ftp.gnutls.org/pub/gnutls/opencdk/
515 *** Will use the included opencdk.
519 AC_MSG_CHECKING([whether to use the included opencdk])
520 AC_MSG_RESULT($ac_enable_included_opencdk)
524 AM_CONDITIONAL(ENABLE_INCLUDED_OPENCDK, test "$ac_enable_included_opencdk" = "yes")
526 AC_MSG_CHECKING([whether to disable OpenSSL compatibility layer])
527 AC_ARG_ENABLE(openssl-compatibility,
528 AS_HELP_STRING([--disable-openssl-compatibility],
529 [disable the OpenSSL compatibility support]),
530 ac_enable_openssl=$withval,
531 ac_enable_openssl=yes)
532 if test x$ac_enable_openssl != xno; then
538 AM_CONDITIONAL(ENABLE_OPENSSL, test "$ac_enable_openssl" = "yes")
541 AC_ARG_WITH(included-libtasn1,
542 AS_HELP_STRING([--with-included-libtasn1],
543 [use the included libtasn1]),
544 minitasn1_enabled=$withval,
545 minitasn1_enabled=no)
547 if test x$minitasn1_enabled = xno; then
548 AM_PATH_LIBTASN1($GNUTLS_LIBTASN1_VERSION,,
549 minitasn1_enabled=yes
552 *** LibtASN1 ${GNUTLS_LIBTASN1_VERSION} was not found. Will use the included one.
556 AC_MSG_CHECKING([whether to use the included minitasn1])
557 AC_MSG_RESULT($minitasn1_enabled)
559 AM_CONDITIONAL(ENABLE_MINITASN1, test "$minitasn1_enabled" = "yes")
561 dnl Check for libcfg+
564 AC_ARG_WITH(included-libcfg,
565 AS_HELP_STRING([--with-included-libcfg],
566 [use the included libcfg+ (certtool only)]),
567 libcfg_enabled=$withval,
569 dnl We search for libcfg+ which is used by certtool
571 AC_CHECK_LIB(cfg+, cfg_get_context,:,
575 *** Libcfg+ was not found. Will use the included one.]])))
577 AM_CONDITIONAL(HAVE_LIBCFG, test "$libcfg_enabled" = "no")
580 AC_MSG_CHECKING([whether to use the included libcfg])
581 AC_MSG_RESULT($libcfg_enabled)
584 dnl CHECK FOR ZLIB SUPPORT
587 AC_MSG_CHECKING([whether to include zlib compression support])
590 AS_HELP_STRING([--without-zlib], [disable zlib compression support]),
594 if test x$ac_zlib != xno; then
596 AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
597 if test "$ac_cv_libz" != yes; then
600 *** ZLIB was not found. You will not be able to use ZLIB compression.)
608 dnl CHECK FOR LZO SUPPORT (whether to use the included one)
614 AS_HELP_STRING([--without-lzo], [do not use lzo compression]),
618 AC_MSG_CHECKING([whether to include lzo compression support])
619 AC_MSG_RESULT($use_lzo)
621 if test x$use_lzo = xyes; then
622 AC_DEFINE(USE_LZO, 1, [whether to use the lzo compression])
624 AC_ARG_WITH(included-lzo,
625 AS_HELP_STRING([--with-included-lzo],
626 [include minilzo in libgnutls-extra]),
627 minilzo_enabled=$withval,
630 AC_MSG_CHECKING([whether to use the included lzo compression library])
631 AC_MSG_RESULT($minilzo_enabled)
634 if test "$minilzo_enabled" != "yes"; then
635 AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2)
636 if test "$LZO_LIBS" = ""; then
637 AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo, [
641 *** Could not find liblzo or liblzo2. Will use the included minilzo.
648 if test "$LZO_LIBS" = "-llzo"; then
649 AC_CHECK_HEADERS(lzo1x.h)
650 elif test "$LZO_LIBS" = "-llzo2"; then
651 AC_CHECK_HEADERS(lzo/lzo1x.h)
654 if test "$minilzo_enabled" = "yes"; then
655 AC_DEFINE(USE_MINILZO, 1, [whether to use the included minilzo])
659 AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes")
660 AM_CONDITIONAL(ENABLE_INCLUDED_LZO, test "$minilzo_enabled" = "yes")
662 if test "$minilzo_enabled" = "yes"; then
663 # See libextra/minilzo/README.LZO
664 AC_CHECK_TYPE(ptrdiff_t,long)
666 AC_CHECK_SIZEOF(short)
668 AC_CHECK_SIZEOF(long)
669 AC_CHECK_SIZEOF(long long)
670 AC_CHECK_SIZEOF(__int64)
671 AC_CHECK_SIZEOF(void *)
672 AC_CHECK_SIZEOF(size_t)
673 AC_CHECK_SIZEOF(ptrdiff_t)
675 AC_CHECK_FUNCS(memcmp memcpy memmove memset)
679 *** Setting up gnulib compatibility files...
684 AC_TRY_LINK([#include <winsock2.h>], [
685 WORD wVersionRequested = MAKEWORD(2, 2);
687 int err = WSAStartup(wVersionRequested, &wsaData);
688 WSACleanup ();], wsastartup=yes, wsastartup=no)
689 if test x$wsastartup = xyes; then
690 AC_DEFINE(HAVE_WINSOCK, 1, [Call WSAStartup in gnutls_global_init])
692 AC_MSG_CHECKING([if we have Windows sockets and WSAStartup/WSACleanup])
693 AC_MSG_RESULT($wsastartup)
696 *** Detecting options for shared libraries...
701 LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS"
702 LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
703 AC_SUBST(LIBGNUTLS_LIBS)
704 AC_SUBST(LIBGNUTLS_CFLAGS)
706 LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
707 LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK -I${includedir}"
708 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
709 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
712 AM_CFLAGS="${AM_CFLAGS} ${LIBGCRYPT_CFLAGS}"
714 if test $ac_cv_c_compiler_gnu != no; then
715 if test x$opt_profiler_mode = xyes; then
716 AC_CHECK_PROG(FC_OK, fc-config, yes, no)
717 if test x$FC_OK = xyes; then
718 AM_CFLAGS="${AM_CFLAGS} `fc-config --cflags`"
719 LIBS="$LIBS `fc-config --libs`"
722 *** You must install libfc in order to enable profiling. http://www710.univ-lyon1.fr/~yperret/fnccheck/profiler.html
728 if test $ac_full -eq 0; then
729 AC_SUBST(POSSIBLY_WARN_ABOUT_MISSING_FEATURES, [[
731 #warning This is not the official GnuTLS library. Several features were disabled at compilation.
732 #endif /* __GNUC__ */]])
737 AC_CONFIG_COMMANDS([chmod-config],[[
738 chmod +x lib/libgnutls-config
739 chmod +x libextra/libgnutls-extra-config
742 AC_CONFIG_FILES([Makefile po/Makefile.in \
743 doc/Makefile doc/examples/Makefile doc/scripts/Makefile \
744 doc/manpages/Makefile doc/reference/Makefile \
745 doc/credentials/Makefile doc/credentials/x509/Makefile \
746 doc/credentials/srp/Makefile doc/credentials/openpgp/Makefile \
747 gl/Makefile lgl/Makefile \
748 tests/Makefile tests/rsa-md5-collision/Makefile tests/userid/Makefile \
749 tests/pkcs1-padding/Makefile tests/pkcs8-decode/Makefile \
750 tests/pkcs12-decode/Makefile tests/pathlen/Makefile \
751 tests/key-id/Makefile tests/sha2/Makefile \
752 tests/hostname-check/Makefile \
753 includes/Makefile includes/gnutls/gnutls.h \
754 lib/Makefile lib/minitasn1/Makefile lib/x509/Makefile \
755 libextra/Makefile libextra/openpgp/Makefile libextra/opencdk/Makefile \
756 libextra/minilzo/Makefile tests/openpgp/Makefile \
758 src/cfg/Makefile src/cfg/platon/Makefile src/cfg/platon/str/Makefile \
759 lib/libgnutls-config libextra/libgnutls-extra-config \
760 lib/gnutls.pc libextra/gnutls-extra.pc
761 guile/Makefile guile/modules/Makefile
762 guile/src/Makefile guile/tests/Makefile])
764 AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])