X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/6372d4c990f39ba6ad84a91af0a3a61a63bd50a3..47fa38f5d0451322c70a913bbb0707bc1dbcb773:/test/configure diff --git a/test/configure b/test/configure index f01a14d74..bfe636324 100755 --- a/test/configure +++ b/test/configure @@ -619,12 +619,15 @@ ac_includes_default="\ # include #endif" +ac_func_list= ac_subst_vars='LTLIBOBJS LIBOBJS LOADED_OPT LOADED +B64_GNUTLS +CLIENT_ANYTLS CLIENT_GNUTLS -CLIENT_SSL +CLIENT_OPENSSL BIND_8_COMPAT EGREP GREP @@ -1660,6 +1663,73 @@ fi as_fn_set_status $ac_retval } # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -1944,6 +2014,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_func_list " getaddrinfo" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3225,7 +3296,8 @@ if test "x$ac_cv_header_openssl_crypto_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_CRYPTO_H 1 _ACEOF - CLIENT_SSL=bin/client-ssl + CLIENT_OPENSSL=bin/client-ssl + CLIENT_ANYTLS=bin/client-anytls fi done @@ -3238,10 +3310,22 @@ if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : #define HAVE_GNUTLS_GNUTLS_H 1 _ACEOF CLIENT_GNUTLS=bin/client-gnutls + CLIENT_ANYTLS=bin/client-anytls fi done +for ac_header in gnutls/gnutls.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" +if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GNUTLS_GNUTLS_H 1 +_ACEOF + B64_GNUTLS=bin/ed25519_privkey_pem_to_pubkey_raw_b64 +fi + +done @@ -3249,7 +3333,7 @@ done host_os=`uname -s` case $CC-$host_os in - gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD) + gcc-*linux* | gcc-*Linux* | gcc-*LINUX* | gcc-FreeBSD | gcc-*SunOS* | cc-*SunOS* ) LOADED=bin/loaded LOADED_OPT="-shared -fPIC" echo "Using gcc on $host_os: will compile dynamically loaded module" @@ -3496,6 +3580,25 @@ fi + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + +