Blame m4/hooks.m4

Packit Service 4684c1
# Copyright (C) 2000-2012 Free Software Foundation, Inc.
Packit Service 4684c1
#
Packit Service 4684c1
# Author: Nikos Mavrogiannopoulos, Simon Josefsson
Packit Service 4684c1
#
Packit Service 4684c1
# This file is part of GnuTLS.
Packit Service 4684c1
#
Packit Service 4684c1
# The GnuTLS is free software; you can redistribute it and/or
Packit Service 4684c1
# modify it under the terms of the GNU Lesser General Public License
Packit Service 4684c1
# as published by the Free Software Foundation; either version 2.1 of
Packit Service 4684c1
# the License, or (at your option) any later version.
Packit Service 4684c1
#
Packit Service 4684c1
# The GnuTLS is distributed in the hope that it will be
Packit Service 4684c1
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
Packit Service 4684c1
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 4684c1
# Lesser General Public License for more details.
Packit Service 4684c1
#
Packit Service 4684c1
# You should have received a copy of the GNU Lesser General Public License
Packit Service 4684c1
# along with this program.  If not, see <https://www.gnu.org/licenses/>
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([LIBGNUTLS_EXTRA_HOOKS],
Packit Service 4684c1
[
Packit Service 4684c1
  AC_MSG_CHECKING([whether to build OpenSSL compatibility layer])
Packit Service 4684c1
  AC_ARG_ENABLE(openssl-compatibility,
Packit Service 4684c1
    AS_HELP_STRING([--enable-openssl-compatibility],
Packit Service 4684c1
                   [enable the OpenSSL compatibility library]),
Packit Service 4684c1
    enable_openssl=$enableval, enable_openssl=no)
Packit Service 4684c1
  AC_MSG_RESULT($enable_openssl)
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_OPENSSL, test "$enable_openssl" = "yes")
Packit Service 4684c1
Packit Service 4684c1
  # We link to ../lib's gnulib, which needs -lws2_32 via LIBSOCKET in Makefile.am.
Packit Service 4684c1
  gl_SOCKETS
Packit Service 4684c1
])
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([LIBGNUTLS_HOOKS],
Packit Service 4684c1
[
Packit Service 4684c1
  # Library code modified:                              REVISION++
Packit Service 4684c1
  # Interfaces changed/added/removed:   CURRENT++       REVISION=0
Packit Service 4684c1
  # Interfaces added:                             AGE++
Packit Service 4684c1
  #   + add new version symbol in libgnutls.map, see Symbol and library versioning
Packit Service 4684c1
  #     in CONTRIBUTION.md for more info.
Packit Service 4684c1
  #
Packit Service 4684c1
  # Interfaces removed:                           AGE=0 (+bump all symbol versions in .map)
Packit Service 4684c1
  AC_SUBST(LT_CURRENT, 58)
Packit Service 4684c1
  AC_SUBST(LT_REVISION, 0)
Packit Service 4684c1
  AC_SUBST(LT_AGE, 28)
Packit Service 4684c1
Packit Service 4684c1
  AC_SUBST(LT_SSL_CURRENT, 27)
Packit Service 4684c1
  AC_SUBST(LT_SSL_REVISION, 2)
Packit Service 4684c1
  AC_SUBST(LT_SSL_AGE, 0)
Packit Service 4684c1
Packit Service 4684c1
  AC_SUBST(LT_DANE_CURRENT, 4)
Packit Service 4684c1
  AC_SUBST(LT_DANE_REVISION, 1)
Packit Service 4684c1
  AC_SUBST(LT_DANE_AGE, 4)
Packit Service 4684c1
Packit Service 4684c1
  AC_SUBST(LT_XSSL_CURRENT, 0)
Packit Service 4684c1
  AC_SUBST(LT_XSSL_REVISION, 0)
Packit Service 4684c1
  AC_SUBST(LT_XSSL_AGE, 0)
Packit Service 4684c1
Packit Service 4684c1
  AC_SUBST(CXX_LT_CURRENT, 29)
Packit Service 4684c1
  AC_SUBST(CXX_LT_REVISION, 0)
Packit Service 4684c1
  AC_SUBST(CXX_LT_AGE, 1)
Packit Service 4684c1
Packit Service 4684c1
  AC_SUBST(CRYWRAP_PATCHLEVEL, 3)
Packit Service 4684c1
Packit Service 4684c1
  # Used when creating the Windows libgnutls-XX.def files.
Packit Service 4684c1
  DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
Packit Service 4684c1
  AC_SUBST(DLL_VERSION)
Packit Service 4684c1
  DLL_SSL_VERSION=`expr ${LT_SSL_CURRENT} - ${LT_SSL_AGE}`
Packit Service 4684c1
  AC_SUBST(DLL_SSL_VERSION)
Packit Service 4684c1
Packit Service 4684c1
NETTLE_MINIMUM=3.4.1
Packit Service 4684c1
  PKG_CHECK_MODULES(NETTLE, [nettle >= $NETTLE_MINIMUM], [cryptolib="nettle"], [
Packit Service 4684c1
AC_MSG_ERROR([[
Packit Service 4684c1
  ***
Packit Service 4684c1
  *** Libnettle $NETTLE_MINIMUM was not found.
Packit Service 4684c1
]])
Packit Service 4684c1
  ])
Packit Service 4684c1
  PKG_CHECK_MODULES(HOGWEED, [hogweed >= $NETTLE_MINIMUM ], [], [
Packit Service 4684c1
AC_MSG_ERROR([[
Packit Service 4684c1
  ***
Packit Service 4684c1
  *** Libhogweed (nettle's companion library) $NETTLE_MINIMUM was not found. Note that you must compile nettle with gmp support.
Packit Service 4684c1
]])
Packit Service 4684c1
  ])
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_NETTLE, test "$cryptolib" = "nettle")
Packit Service 4684c1
  AC_DEFINE([HAVE_LIBNETTLE], 1, [nettle is enabled])
Packit Service 4684c1
Packit Service 4684c1
  GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed"
Packit Service 4684c1
Packit Service 4684c1
  AC_ARG_WITH(nettle-mini,
Packit Service 4684c1
    AS_HELP_STRING([--with-nettle-mini], [Link against a mini-nettle (that includes mini-gmp)]),
Packit Service 4684c1
      mini_nettle=$withval,
Packit Service 4684c1
      mini_nettle=no)
Packit Service 4684c1
Packit Service 4684c1
  AC_ARG_VAR(GMP_CFLAGS, [C compiler flags for gmp])
Packit Service 4684c1
  AC_ARG_VAR(GMP_LIBS, [linker flags for gmp])
Packit Service 4684c1
  if test "$mini_nettle" != no;then
Packit Service 4684c1
    GMP_CFLAGS=""
Packit Service 4684c1
    GMP_LIBS=""
Packit Service 4684c1
  else
Packit Service 4684c1
    if test x$GMP_LIBS = x; then
Packit Service 4684c1
	AC_CHECK_LIB(gmp, __gmpz_cmp, [GMP_LIBS="-lgmp"], [AC_MSG_ERROR([[
Packit Service 4684c1
***
Packit Service 4684c1
*** gmp was not found.
Packit Service 4684c1
]])])
Packit Service 4684c1
    fi
Packit Service 4684c1
  fi
Packit Service 4684c1
  AC_SUBST(GMP_CFLAGS)
Packit Service 4684c1
  AC_SUBST(GMP_LIBS)
Packit Service 4684c1
Packit Service 4684c1
LIBTASN1_MINIMUM=4.9
Packit Service 4684c1
  AC_ARG_WITH(included-libtasn1,
Packit Service 4684c1
    AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]),
Packit Service 4684c1
      included_libtasn1=$withval,
Packit Service 4684c1
      included_libtasn1=no)
Packit Service 4684c1
  if test "$included_libtasn1" = "no"; then
Packit Service 4684c1
    PKG_CHECK_MODULES(LIBTASN1, [libtasn1 >= $LIBTASN1_MINIMUM], [], [included_libtasn1=yes])
Packit Service 4684c1
    if test "$included_libtasn1" = yes; then
Packit Service 4684c1
      AC_MSG_ERROR([[
Packit Service 4684c1
  ***
Packit Service 4684c1
  *** Libtasn1 $LIBTASN1_MINIMUM was not found. To use the included one, use --with-included-libtasn1
Packit Service 4684c1
  ]])
Packit Service 4684c1
    fi
Packit Service 4684c1
  fi
Packit Service 4684c1
  AC_MSG_CHECKING([whether to use the included minitasn1])
Packit Service 4684c1
  AC_MSG_RESULT($included_libtasn1)
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_MINITASN1, test "$included_libtasn1" = "yes")
Packit Service 4684c1
Packit Service 4684c1
  if test "$included_libtasn1" = "no"; then
Packit Service 4684c1
    GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libtasn1"
Packit Service 4684c1
  fi
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether C99 macros are supported])
Packit Service 4684c1
  AC_TRY_COMPILE(,
Packit Service 4684c1
  [
Packit Service 4684c1
    #define test_mac(...)
Packit Service 4684c1
    int z,y,x;
Packit Service 4684c1
    test_mac(x,y,z);
Packit Service 4684c1
    return 0;
Packit Service 4684c1
  ], [
Packit Service 4684c1
    AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])
Packit Service 4684c1
    AC_MSG_RESULT(yes)
Packit Service 4684c1
  ], [
Packit Service 4684c1
    AC_MSG_RESULT(no)
Packit Service 4684c1
    AC_MSG_WARN([C99 macros not supported. This may affect compiling.])
Packit Service 4684c1
  ])
Packit Service 4684c1
Packit Service 4684c1
  ac_strict_der_time=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable strict DER time encodings for backwards compatibility])
Packit Service 4684c1
  AC_ARG_ENABLE(strict-der-time,
Packit Service 4684c1
    AS_HELP_STRING([--disable-strict-der-time],
Packit Service 4684c1
                   [allow non compliant DER time values]),
Packit Service 4684c1
    ac_strict_der_time=$enableval)
Packit Service 4684c1
  if test x$ac_strict_der_time != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([STRICT_DER_TIME], 1, [force strict DER time constraints])
Packit Service 4684c1
  else
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(STRICT_DER_TIME, test "$ac_strict_der_time" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_allow_sha1=no
Packit Service 4684c1
  AC_MSG_CHECKING([whether to allow SHA1 as an acceptable hash for cert digital signatures])
Packit Service 4684c1
  AC_ARG_ENABLE(sha1-support,
Packit Service 4684c1
    AS_HELP_STRING([--enable-sha1-support],
Packit Service 4684c1
                   [allow SHA1 as an acceptable hash for cert digital signatures]),
Packit Service 4684c1
    ac_allow_sha1=$enableval)
Packit Service 4684c1
  if test x$ac_allow_sha1 != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ALLOW_SHA1], 1, [allow SHA1 as an acceptable hash for digital signatures])
Packit Service 4684c1
  else
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ALLOW_SHA1, test "$ac_allow_sha1" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_ssl3=no
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable the SSL 3.0 protocol])
Packit Service 4684c1
  AC_ARG_ENABLE(ssl3-support,
Packit Service 4684c1
    AS_HELP_STRING([--enable-ssl3-support],
Packit Service 4684c1
                   [enable support for the SSL 3.0 protocol]),
Packit Service 4684c1
    ac_enable_ssl3=$enableval)
Packit Service 4684c1
  if test x$ac_enable_ssl3 != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_SSL3], 1, [enable SSL3.0 support])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_SSL3, test "$ac_enable_ssl3" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_ssl2=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable the SSL 2.0 client hello])
Packit Service 4684c1
  AC_ARG_ENABLE(ssl2-support,
Packit Service 4684c1
    AS_HELP_STRING([--disable-ssl2-support],
Packit Service 4684c1
                   [disable support for the SSL 2.0 client hello]),
Packit Service 4684c1
    ac_enable_ssl2=$enableval)
Packit Service 4684c1
  if test x$ac_enable_ssl2 != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_SSL2], 1, [enable SSL2.0 support for client hello])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_SSL2, test "$ac_enable_ssl2" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_srtp=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable DTLS-SRTP extension])
Packit Service 4684c1
  AC_ARG_ENABLE(dtls-srtp-support,
Packit Service 4684c1
    AS_HELP_STRING([--disable-dtls-srtp-support],
Packit Service 4684c1
                   [disable support for the DTLS-SRTP extension]),
Packit Service 4684c1
    ac_enable_srtp=$enableval)
Packit Service 4684c1
  if test x$ac_enable_srtp != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_DTLS_SRTP], 1, [enable DTLS-SRTP support])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_DTLS_SRTP, test "$ac_enable_srtp" != "no")
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable ALPN extension])
Packit Service 4684c1
  AC_ARG_ENABLE(alpn-support,
Packit Service 4684c1
    AS_HELP_STRING([--disable-alpn-support],
Packit Service 4684c1
                   [disable support for the Application Layer Protocol Negotiation (ALPN) extension]),
Packit Service 4684c1
    ac_enable_alpn=$enableval,ac_enable_alpn=yes)
Packit Service 4684c1
  if test x$ac_enable_alpn != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_ALPN], 1, [enable ALPN support])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_ALPN, test "$ac_enable_alpn" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_heartbeat=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to enable TLS heartbeat support])
Packit Service 4684c1
  AC_ARG_ENABLE(heartbeat-support,
Packit Service 4684c1
    AS_HELP_STRING([--disable-heartbeat-support],
Packit Service 4684c1
                   [disable support for the heartbeat extension]),
Packit Service 4684c1
    ac_enable_heartbeat=$enableval)
Packit Service 4684c1
  if test x$ac_enable_heartbeat != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
   AC_DEFINE([ENABLE_HEARTBEAT], 1, [enable heartbeat support])
Packit Service 4684c1
  else
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_HEARTBEAT, test "$ac_enable_heartbeat" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_srp=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable SRP authentication support])
Packit Service 4684c1
  AC_ARG_ENABLE(srp-authentication,
Packit Service 4684c1
    AS_HELP_STRING([--disable-srp-authentication],
Packit Service 4684c1
                   [disable the SRP authentication support]),
Packit Service 4684c1
    ac_enable_srp=$enableval)
Packit Service 4684c1
  if test x$ac_enable_srp != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_SRP], 1, [enable SRP authentication])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_SRP, test "$ac_enable_srp" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_psk=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable PSK authentication support])
Packit Service 4684c1
  AC_ARG_ENABLE(psk-authentication,
Packit Service 4684c1
    AS_HELP_STRING([--disable-psk-authentication],
Packit Service 4684c1
                   [disable the PSK authentication support]),
Packit Service 4684c1
    ac_enable_psk=$enableval)
Packit Service 4684c1
  if test x$ac_enable_psk != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_PSK], 1, [enable PSK authentication])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_PSK, test "$ac_enable_psk" != "no")
Packit Service 4684c1
Packit Service 4684c1
  ac_enable_anon=yes
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable anonymous authentication support])
Packit Service 4684c1
  AC_ARG_ENABLE(anon-authentication,
Packit Service 4684c1
    AS_HELP_STRING([--disable-anon-authentication],
Packit Service 4684c1
                   [disable the anonymous authentication support]),
Packit Service 4684c1
    ac_enable_anon=$enableval)
Packit Service 4684c1
  if test x$ac_enable_anon != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_ANON], 1, [enable anonymous authentication])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_ANON, test "$ac_enable_anon" != "no")
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable DHE support])
Packit Service 4684c1
  AC_ARG_ENABLE(dhe,
Packit Service 4684c1
    AS_HELP_STRING([--disable-dhe],
Packit Service 4684c1
                   [disable the DHE support]),
Packit Service 4684c1
    ac_enable_dhe=$enableval, ac_enable_dhe=yes)
Packit Service 4684c1
  if test x$ac_enable_dhe != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_DHE], 1, [enable DHE])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_DHE, test "$ac_enable_dhe" != "no")
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable ECDHE support])
Packit Service 4684c1
  AC_ARG_ENABLE(ecdhe,
Packit Service 4684c1
    AS_HELP_STRING([--disable-ecdhe],
Packit Service 4684c1
                   [disable the ECDHE support]),
Packit Service 4684c1
    ac_enable_ecdhe=$enableval, ac_enable_ecdhe=yes)
Packit Service 4684c1
  if test x$ac_enable_ecdhe != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_ECDHE], 1, [enable DHE])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_ECDHE, test "$ac_enable_ecdhe" != "no")
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable GOST support])
Packit Service 4684c1
  AC_ARG_ENABLE(gost,
Packit Service 4684c1
    AS_HELP_STRING([--disable-gost],
Packit Service 4684c1
                   [disable the GOST support]),
Packit Service 4684c1
    ac_enable_gost=$enableval, ac_enable_gost=yes)
Packit Service 4684c1
  if test x$ac_enable_gost != xno; then
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_GOST], 1, [enable GOST])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_GOST, test "$ac_enable_gost" != "no")
Packit Service 4684c1
Packit Service 4684c1
  # For cryptodev
Packit Service 4684c1
  AC_MSG_CHECKING([whether to add cryptodev support])
Packit Service 4684c1
  AC_ARG_ENABLE(cryptodev,
Packit Service 4684c1
    AS_HELP_STRING([--enable-cryptodev], [enable cryptodev support]),
Packit Service 4684c1
  enable_cryptodev=$enableval,enable_cryptodev=no)
Packit Service 4684c1
  AC_MSG_RESULT($enable_cryptodev)
Packit Service 4684c1
Packit Service 4684c1
  if test "$enable_cryptodev" = "yes"; then
Packit Service 4684c1
    AC_DEFINE([ENABLE_CRYPTODEV], 1, [Enable cryptodev support])
Packit Service 4684c1
  fi
Packit Service 4684c1
Packit Service 4684c1
  AC_MSG_CHECKING([whether to disable OCSP support])
Packit Service 4684c1
  AC_ARG_ENABLE(ocsp,
Packit Service 4684c1
    AS_HELP_STRING([--disable-ocsp],
Packit Service 4684c1
                   [disable OCSP support]),
Packit Service 4684c1
    ac_enable_ocsp=$enableval,ac_enable_ocsp=yes)
Packit Service 4684c1
  if test x$ac_enable_ocsp != xno; then
Packit Service 4684c1
   ac_enable_ocsp=yes
Packit Service 4684c1
   AC_MSG_RESULT(no)
Packit Service 4684c1
   AC_DEFINE([ENABLE_OCSP], 1, [enable OCSP support])
Packit Service 4684c1
  else
Packit Service 4684c1
   ac_full=0
Packit Service 4684c1
   AC_MSG_RESULT(yes)
Packit Service 4684c1
  fi
Packit Service 4684c1
  AM_CONDITIONAL(ENABLE_OCSP, test "$ac_enable_ocsp" != "no")
Packit Service 4684c1
Packit Service 4684c1
  # For storing integers in pointers without warnings
Packit Service 4684c1
  # https://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
Packit Service 4684c1
  AC_CHECK_SIZEOF(void *)
Packit Service 4684c1
  AC_CHECK_SIZEOF(long long)
Packit Service 4684c1
  AC_CHECK_SIZEOF(long)
Packit Service 4684c1
  AC_CHECK_SIZEOF(int)
Packit Service 4684c1
  if test x$ac_cv_sizeof_void_p = x$ac_cv_sizeof_long;then
Packit Service 4684c1
      AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long)],
Packit Service 4684c1
                [Additional cast to bring void* to a type castable to int.])
Packit Service 4684c1
  elif test x$ac_cv_sizeof_void_p = x$ac_cv_sizeof_long_long;then
Packit Service 4684c1
      AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long long)],
Packit Service 4684c1
                [Additional cast to bring void* to a type castable to int.])
Packit Service 4684c1
   else
Packit Service 4684c1
      AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [])
Packit Service 4684c1
   fi
Packit Service 4684c1
Packit Service 4684c1
dnl this is called from somewhere else
Packit Service 4684c1
dnl #AM_ICONV
Packit Service 4684c1
dnl m4_ifdef([gl_ICONV_MODULE_INDICATOR],
Packit Service 4684c1
dnl  [gl_ICONV_MODULE_INDICATOR([iconv])])
Packit Service 4684c1
])