mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
anoth go at tls
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34031 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
704a39c91b
commit
b9fdefed8e
2 changed files with 41 additions and 41 deletions
42
configure
vendored
42
configure
vendored
|
@ -23418,6 +23418,11 @@ fi
|
|||
|
||||
if test $enable_tls = yes; then
|
||||
HAVE_GNUTLS=0
|
||||
# Save CFLAGS and LIBS as AM_PATH_TLS clobbers these variables regardless
|
||||
# of the success of the macro.
|
||||
saved_LIBS="$LIBS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
|
||||
if test $PKGCONFIG = yes; then
|
||||
if pkg-config --exists gnutls; then
|
||||
{ $as_echo "$as_me:$LINENO: checking gnutls support" >&5
|
||||
|
@ -23425,17 +23430,10 @@ $as_echo_n "checking gnutls support... " >&6; }
|
|||
HAVE_GNUTLS=1
|
||||
TLS_CFLAGS=`pkg-config --cflags gnutls`
|
||||
TLS_LIBS=`pkg-config --libs gnutls`
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_GNUTLS = 0; then
|
||||
# Save CFLAGS and LIBS as AM_PATH_TLS clobbers these variables regardless
|
||||
# of the success of the macro.
|
||||
saved_LIBS="$LIBS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
# AM_PATH_TLS(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
|
||||
|
||||
|
||||
|
@ -23712,11 +23710,13 @@ $as_echo "no" >&6; }
|
|||
rm -f conf.tlstest
|
||||
|
||||
if test $enable_libgnutls = yes; then
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
HAVE_GNUTLS=1
|
||||
{ $as_echo "$as_me:$LINENO: checking for gcry_control in -lgcrypt" >&5
|
||||
else
|
||||
HAVE_GNUTLS=0
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_GNUTLS = 1; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for gcry_control in -lgcrypt" >&5
|
||||
$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
|
||||
if test "${ac_cv_lib_gcrypt_gcry_control+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
|
@ -23787,21 +23787,18 @@ else
|
|||
have_gcrypt=no
|
||||
fi
|
||||
|
||||
if test "$have_gcrypt" = "no"; then
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: Missing support for thread-safe operation in GNUTLS. Disabling TLS support)." >&5
|
||||
if test "$have_gcrypt" = "no"; then
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: Missing support for thread-safe operation in GNUTLS. Disabling TLS support)." >&5
|
||||
$as_echo "$as_me: WARNING: Missing support for thread-safe operation in GNUTLS. Disabling TLS support)." >&2;}
|
||||
HAVE_GNUTLS=0
|
||||
else
|
||||
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
||||
fi
|
||||
else
|
||||
HAVE_GNUTLS=0
|
||||
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
else
|
||||
TLS_LIBS="$TLS_LIBS -lgcrypt"
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_GNUTLS = 0; then
|
||||
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: Missing support for TLS functionality." >&5
|
||||
|
@ -23814,6 +23811,9 @@ $as_echo "$as_me: WARNING: Missing support for TLS functionality." >&2;}
|
|||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
|
||||
for ac_func in gnutls_transport_set_errno
|
||||
do
|
||||
|
|
40
configure.ac
40
configure.ac
|
@ -2752,45 +2752,42 @@ AC_ARG_ENABLE(tls,
|
|||
|
||||
if test $enable_tls = yes; then
|
||||
HAVE_GNUTLS=0
|
||||
# Save CFLAGS and LIBS as AM_PATH_TLS clobbers these variables regardless
|
||||
# of the success of the macro.
|
||||
saved_LIBS="$LIBS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
|
||||
if test $PKGCONFIG = yes; then
|
||||
if pkg-config --exists gnutls; then
|
||||
AC_MSG_CHECKING(gnutls support)
|
||||
HAVE_GNUTLS=1
|
||||
TLS_CFLAGS=`pkg-config --cflags gnutls`
|
||||
TLS_LIBS=`pkg-config --libs gnutls`
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_GNUTLS = 0; then
|
||||
# Save CFLAGS and LIBS as AM_PATH_TLS clobbers these variables regardless
|
||||
# of the success of the macro.
|
||||
saved_LIBS="$LIBS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
# AM_PATH_TLS(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
|
||||
AM_PATH_TLS(1.4.0, enable_libgnutls=yes, enable_libgnutls=no)
|
||||
if test $enable_libgnutls = yes; then
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
HAVE_GNUTLS=1
|
||||
AC_CHECK_LIB(gcrypt, gcry_control, have_gcrypt=yes, have_gcrypt=no)
|
||||
if test "$have_gcrypt" = "no"; then
|
||||
AC_MSG_WARN([Missing support for thread-safe operation in GNUTLS. Disabling TLS support).])
|
||||
HAVE_GNUTLS=0
|
||||
else
|
||||
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
||||
fi
|
||||
else
|
||||
HAVE_GNUTLS=0
|
||||
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_GNUTLS = 1; then
|
||||
AC_CHECK_LIB(gcrypt, gcry_control, have_gcrypt=yes, have_gcrypt=no)
|
||||
if test "$have_gcrypt" = "no"; then
|
||||
AC_MSG_WARN([Missing support for thread-safe operation in GNUTLS. Disabling TLS support).])
|
||||
HAVE_GNUTLS=0
|
||||
else
|
||||
TLS_LIBS="$TLS_LIBS -lgcrypt"
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_GNUTLS = 0; then
|
||||
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([Missing support for TLS functionality.])
|
||||
echo
|
||||
|
@ -2800,6 +2797,9 @@ if test $enable_tls = yes; then
|
|||
echo "add --disable-tls to the configure arguments."
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
CPPFLAGS="$CPPFLAGS $TLS_CFLAGS"
|
||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||
LIBS="$TLS_LIBS $LIBS"
|
||||
AC_CHECK_FUNCS(gnutls_transport_set_errno)
|
||||
if test "$ac_cv_func_gnutls_transport_set_errno" = "no"; then
|
||||
AC_MSG_WARN([Missing support for thread-safe error handling in GNUTLS. Please check that you have the most recent version installed (2.0 or later chould be fine).])
|
||||
|
|
Loading…
Reference in a new issue