fixes for gnutls detection and objc library detection

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34030 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-10-19 16:53:39 +00:00
parent a8ce28dd9f
commit 2934175c27
5 changed files with 52 additions and 49 deletions

View file

@ -1,3 +1,8 @@
2011-10-19 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: fixes for gnutls detection and to use the objc
libraries provided by gnustep-config.
2011-10-19 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/GNUstepBase/GSFileHandle.h: remove

View file

@ -699,9 +699,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION

View file

@ -693,6 +693,7 @@ static gnutls_anon_client_credentials_t anoncred;
/* Set transport layer to use our low level stream code.
*/
gnutls_transport_set_lowat (session, 0);
gnutls_transport_set_pull_function (session, GSTLSPull);
gnutls_transport_set_push_function (session, GSTLSPush);
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)self);

63
configure vendored
View file

@ -5457,20 +5457,18 @@ $as_echo_n "checking the Objective-C runtime... " >&6; }
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
{ $as_echo "$as_me:$LINENO: result: NeXT" >&5
$as_echo "NeXT" >&6; }
LIBOBJC='-lobjc'
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
$as_echo "GNU" >&6; }
LIBOBJC='-lobjc_gc -ldl -lgc'
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
OBJC_WITH_GC=yes
else
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
$as_echo "GNU" >&6; }
LIBOBJC='-lobjc'
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
fi
LIBOBJC=`gnustep-config --objc-libs`
#--------------------------------------------------------------------
# Miscellaneous flags
@ -23419,11 +23417,6 @@ fi
if test $enable_tls = yes; 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"
HAVE_GNUTLS=0
if test $PKGCONFIG = yes; then
if pkg-config --exists gnutls; then
@ -23439,7 +23432,11 @@ $as_echo_n "checking gnutls support... " >&6; }
fi
if test $HAVE_GNUTLS = 0; then
# AM_PATH_TLS(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
# 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)
# Check whether --with-tls-prefix was given.
@ -23719,11 +23716,6 @@ $as_echo "no" >&6; }
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
LIBS="$TLS_LIBS $LIBS"
HAVE_GNUTLS=1
cat >>confdefs.h <<\_ACEOF
#define HAVE_GNUTLS 1
_ACEOF
{ $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
@ -23802,6 +23794,26 @@ $as_echo "$as_me: WARNING: Missing support for thread-safe operation in GNUTLS.
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 = 0; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:$LINENO: WARNING: Missing support for TLS functionality." >&5
$as_echo "$as_me: WARNING: Missing support for TLS functionality." >&2;}
echo
echo "You may not want to build base without libgnutls."
echo "Doing so will disable SSL support in the NSStream class."
echo "If you really want to build -base without TLS support,"
echo "add --disable-tls to the configure arguments."
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
for ac_func in gnutls_transport_set_errno
do
@ -23903,32 +23915,21 @@ _ACEOF
fi
done
if test "$ac_cv_func_gnutls_transport_set_errno" = "no"; then
{ $as_echo "$as_me:$LINENO: WARNING: 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)." >&5
if test "$ac_cv_func_gnutls_transport_set_errno" = "no"; then
{ $as_echo "$as_me:$LINENO: WARNING: 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)." >&5
$as_echo "$as_me: WARNING: 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)." >&2;}
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 = 0; then
{ $as_echo "$as_me:$LINENO: WARNING: Missing support for TLS functionality." >&5
$as_echo "$as_me: WARNING: Missing support for TLS functionality." >&2;}
echo
echo "You may not want to build base without libgnutls."
echo "Doing so will disable SSL support in the NSStream class."
echo "If you really want to build -base without TLS support,"
echo "add --disable-tls to the configure arguments."
fi
else
{ $as_echo "$as_me:$LINENO: WARNING: Disabled support for TLS funtionality." >&5
$as_echo "$as_me: WARNING: Disabled support for TLS funtionality." >&2;}
HAVE_GNUTLS=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS $HAVE_GNUTLS
_ACEOF
#--------------------------------------------------------------------

View file

@ -1116,18 +1116,16 @@ OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'`
AC_MSG_CHECKING(the Objective-C runtime)
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
AC_MSG_RESULT(NeXT)
LIBOBJC='-lobjc'
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
AC_MSG_RESULT(GNU)
LIBOBJC='-lobjc_gc -ldl -lgc'
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
OBJC_WITH_GC=yes
else
AC_MSG_RESULT(GNU)
LIBOBJC='-lobjc'
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
fi
LIBOBJC=`gnustep-config --objc-libs`
#--------------------------------------------------------------------
# Miscellaneous flags
@ -2753,11 +2751,6 @@ AC_ARG_ENABLE(tls,
enable_tls=yes)
if test $enable_tls = yes; 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"
HAVE_GNUTLS=0
if test $PKGCONFIG = yes; then
if pkg-config --exists gnutls; then
@ -2772,14 +2765,17 @@ if test $enable_tls = yes; then
fi
if test $HAVE_GNUTLS = 0; then
# AM_PATH_TLS(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
# 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_DEFINE(HAVE_GNUTLS,1,[Define if libgnutls available])
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).])
@ -2787,10 +2783,6 @@ if test $enable_tls = yes; then
else
LIBS="$TLS_LIBS -lgcrypt $LIBS"
fi
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).])
fi
else
HAVE_GNUTLS=0
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
@ -2799,18 +2791,25 @@ if test $enable_tls = yes; then
fi
fi
if test $HAVE_GNUTLS = 0; then
AC_MSG_RESULT(no)
AC_MSG_WARN([Missing support for TLS functionality.])
echo
echo "You may not want to build base without libgnutls."
echo "Doing so will disable SSL support in the NSStream class."
echo "If you really want to build -base without TLS support,"
echo "add --disable-tls to the configure arguments."
else
AC_MSG_RESULT(yes)
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).])
fi
fi
else
AC_MSG_WARN([Disabled support for TLS funtionality.])
HAVE_GNUTLS=0
fi
AC_DEFINE_UNQUOTED(HAVE_GNUTLS,$HAVE_GNUTLS,[Define if libgnutls available])
AC_SUBST(HAVE_GNUTLS)
#--------------------------------------------------------------------