mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-06 06:30:46 +00:00
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:
parent
37f430d9d9
commit
704a39c91b
5 changed files with 52 additions and 49 deletions
|
@ -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>
|
2011-10-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Headers/GNUstepBase/GSFileHandle.h: remove
|
* Headers/GNUstepBase/GSFileHandle.h: remove
|
||||||
|
|
|
@ -699,9 +699,6 @@
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#undef PACKAGE_TARNAME
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
/* Define to the home page for this package. */
|
|
||||||
#undef PACKAGE_URL
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
|
|
@ -693,6 +693,7 @@ static gnutls_anon_client_credentials_t anoncred;
|
||||||
|
|
||||||
/* Set transport layer to use our low level stream code.
|
/* 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_pull_function (session, GSTLSPull);
|
||||||
gnutls_transport_set_push_function (session, GSTLSPush);
|
gnutls_transport_set_push_function (session, GSTLSPush);
|
||||||
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)self);
|
gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)self);
|
||||||
|
|
57
configure
vendored
57
configure
vendored
|
@ -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
|
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
|
||||||
{ $as_echo "$as_me:$LINENO: result: NeXT" >&5
|
{ $as_echo "$as_me:$LINENO: result: NeXT" >&5
|
||||||
$as_echo "NeXT" >&6; }
|
$as_echo "NeXT" >&6; }
|
||||||
LIBOBJC='-lobjc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
||||||
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
||||||
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
|
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
|
||||||
$as_echo "GNU" >&6; }
|
$as_echo "GNU" >&6; }
|
||||||
LIBOBJC='-lobjc_gc -ldl -lgc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
||||||
OBJC_WITH_GC=yes
|
OBJC_WITH_GC=yes
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
|
{ $as_echo "$as_me:$LINENO: result: GNU" >&5
|
||||||
$as_echo "GNU" >&6; }
|
$as_echo "GNU" >&6; }
|
||||||
LIBOBJC='-lobjc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
||||||
fi
|
fi
|
||||||
|
LIBOBJC=`gnustep-config --objc-libs`
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Miscellaneous flags
|
# Miscellaneous flags
|
||||||
|
@ -23419,11 +23417,6 @@ fi
|
||||||
|
|
||||||
|
|
||||||
if test $enable_tls = yes; then
|
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
|
HAVE_GNUTLS=0
|
||||||
if test $PKGCONFIG = yes; then
|
if test $PKGCONFIG = yes; then
|
||||||
if pkg-config --exists gnutls; then
|
if pkg-config --exists gnutls; then
|
||||||
|
@ -23439,6 +23432,10 @@ $as_echo_n "checking gnutls support... " >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $HAVE_GNUTLS = 0; then
|
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(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
|
||||||
|
|
||||||
|
|
||||||
|
@ -23719,11 +23716,6 @@ $as_echo "no" >&6; }
|
||||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||||
LIBS="$TLS_LIBS $LIBS"
|
LIBS="$TLS_LIBS $LIBS"
|
||||||
HAVE_GNUTLS=1
|
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 "$as_me:$LINENO: checking for gcry_control in -lgcrypt" >&5
|
||||||
$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
|
$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
|
||||||
if test "${ac_cv_lib_gcrypt_gcry_control+set}" = set; then
|
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
|
else
|
||||||
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
||||||
fi
|
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
|
for ac_func in gnutls_transport_set_errno
|
||||||
do
|
do
|
||||||
|
@ -23907,21 +23919,6 @@ done
|
||||||
{ $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:$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;}
|
$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
|
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
|
fi
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:$LINENO: WARNING: Disabled support for TLS funtionality." >&5
|
{ $as_echo "$as_me:$LINENO: WARNING: Disabled support for TLS funtionality." >&5
|
||||||
|
@ -23929,6 +23926,10 @@ $as_echo "$as_me: WARNING: Disabled support for TLS funtionality." >&2;}
|
||||||
HAVE_GNUTLS=0
|
HAVE_GNUTLS=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_GNUTLS $HAVE_GNUTLS
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
27
configure.ac
27
configure.ac
|
@ -1116,18 +1116,16 @@ OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'`
|
||||||
AC_MSG_CHECKING(the Objective-C runtime)
|
AC_MSG_CHECKING(the Objective-C runtime)
|
||||||
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
|
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
|
||||||
AC_MSG_RESULT(NeXT)
|
AC_MSG_RESULT(NeXT)
|
||||||
LIBOBJC='-lobjc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
||||||
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
||||||
AC_MSG_RESULT(GNU)
|
AC_MSG_RESULT(GNU)
|
||||||
LIBOBJC='-lobjc_gc -ldl -lgc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
||||||
OBJC_WITH_GC=yes
|
OBJC_WITH_GC=yes
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(GNU)
|
AC_MSG_RESULT(GNU)
|
||||||
LIBOBJC='-lobjc'
|
|
||||||
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
|
||||||
fi
|
fi
|
||||||
|
LIBOBJC=`gnustep-config --objc-libs`
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Miscellaneous flags
|
# Miscellaneous flags
|
||||||
|
@ -2753,11 +2751,6 @@ AC_ARG_ENABLE(tls,
|
||||||
enable_tls=yes)
|
enable_tls=yes)
|
||||||
|
|
||||||
if test $enable_tls = yes; then
|
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
|
HAVE_GNUTLS=0
|
||||||
if test $PKGCONFIG = yes; then
|
if test $PKGCONFIG = yes; then
|
||||||
if pkg-config --exists gnutls; then
|
if pkg-config --exists gnutls; then
|
||||||
|
@ -2772,6 +2765,10 @@ if test $enable_tls = yes; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $HAVE_GNUTLS = 0; then
|
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(2.0.1, enable_libgnutls=yes, enable_libgnutls=no)
|
||||||
AM_PATH_TLS(1.4.0, enable_libgnutls=yes, enable_libgnutls=no)
|
AM_PATH_TLS(1.4.0, enable_libgnutls=yes, enable_libgnutls=no)
|
||||||
if test $enable_libgnutls = yes; then
|
if test $enable_libgnutls = yes; then
|
||||||
|
@ -2779,7 +2776,6 @@ if test $enable_tls = yes; then
|
||||||
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
INCLUDE_FLAGS="$INCLUDE_FLAGS $TLS_CFLAGS"
|
||||||
LIBS="$TLS_LIBS $LIBS"
|
LIBS="$TLS_LIBS $LIBS"
|
||||||
HAVE_GNUTLS=1
|
HAVE_GNUTLS=1
|
||||||
AC_DEFINE(HAVE_GNUTLS,1,[Define if libgnutls available])
|
|
||||||
AC_CHECK_LIB(gcrypt, gcry_control, have_gcrypt=yes, have_gcrypt=no)
|
AC_CHECK_LIB(gcrypt, gcry_control, have_gcrypt=yes, have_gcrypt=no)
|
||||||
if test "$have_gcrypt" = "no"; then
|
if test "$have_gcrypt" = "no"; then
|
||||||
AC_MSG_WARN([Missing support for thread-safe operation in GNUTLS. Disabling TLS support).])
|
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
|
else
|
||||||
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
LIBS="$TLS_LIBS -lgcrypt $LIBS"
|
||||||
fi
|
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
|
else
|
||||||
HAVE_GNUTLS=0
|
HAVE_GNUTLS=0
|
||||||
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
|
||||||
|
@ -2799,18 +2791,25 @@ if test $enable_tls = yes; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test $HAVE_GNUTLS = 0; then
|
if test $HAVE_GNUTLS = 0; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_WARN([Missing support for TLS functionality.])
|
AC_MSG_WARN([Missing support for TLS functionality.])
|
||||||
echo
|
echo
|
||||||
echo "You may not want to build base without libgnutls."
|
echo "You may not want to build base without libgnutls."
|
||||||
echo "Doing so will disable SSL support in the NSStream class."
|
echo "Doing so will disable SSL support in the NSStream class."
|
||||||
echo "If you really want to build -base without TLS support,"
|
echo "If you really want to build -base without TLS support,"
|
||||||
echo "add --disable-tls to the configure arguments."
|
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
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([Disabled support for TLS funtionality.])
|
AC_MSG_WARN([Disabled support for TLS funtionality.])
|
||||||
HAVE_GNUTLS=0
|
HAVE_GNUTLS=0
|
||||||
fi
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_GNUTLS,$HAVE_GNUTLS,[Define if libgnutls available])
|
||||||
AC_SUBST(HAVE_GNUTLS)
|
AC_SUBST(HAVE_GNUTLS)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue