Prepare for using gnu tls.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25858 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-01-04 13:06:14 +00:00
parent f49b3c3dff
commit 8179b54ddb
7 changed files with 542 additions and 8 deletions

View file

@ -1,3 +1,13 @@
2007-01-04 Richard Frith-Macdonald <rfm@gnu.org>
* config/pathtls.m4: New checks for gnu tls
* configure.ac: Add checks for gnu tls.
* config.mak.in: Take note of tls availability
* Headers/Additions/GNUstepBase/config.h.in: ditto
* base.make.in: ditto
* configure: regenerate
Preparatory checks for using gnu tls.
2007-01-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSSocketStream.h: derived from GSStream.h

View file

@ -250,6 +250,9 @@
/* Define to 1 if you have the <gmp.h> header file. */
#undef HAVE_GMP_H
/* Define if libgnutls available */
#undef HAVE_GNUTLS
/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H
@ -594,7 +597,7 @@
/* Define as the link to exe of process in /proc filesystem. */
#undef PROCFS_EXE_LINK
/* Define if objc runtime creates jointable threads */
/* Define if objc runtime creates joinable threads */
#undef PTHREAD_JOINABLE
/* Define to 1 if the `setpgrp' function takes no argument. */

View file

@ -49,6 +49,7 @@ ifeq ($(FOUNDATION_LIB),gnu)
endif
endif
GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@
GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@
GNUSTEP_BASE_HAVE_MDNS=@HAVE_MDNS@

View file

@ -12,6 +12,7 @@ WHOAMI=@WHOAMI@
DYNAMIC_LINKER=@DYNAMIC_LINKER@
HAVE_LIBXML=@HAVE_LIBXML@
HAVE_GNUTLS=@HAVE_GNUTLS@
WITH_FFI=@WITH_FFI@
@ -27,6 +28,7 @@ ifeq ($(shared),yes)
endif
GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@
GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@
# Default to building only -baseadd
# on non *-gnu-* library combos

146
config/pathtls.m4 Normal file
View file

@ -0,0 +1,146 @@
dnl Code shamelessly stolen from glib-config by Sebastian Rittau
dnl Copyright (C) 2005 Free Software Foundation
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl AM_PATH_TLS([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
AC_DEFUN(AM_PATH_TLS,[
AC_ARG_WITH(tls-prefix,
[ --with-tls-prefix=PFX Prefix where libgnutls is installed (optional)],
tls_config_prefix="$withval", tls_config_prefix="")
AC_ARG_ENABLE(tlstest,
[ --disable-tlstest Do not try to compile and run a test TLS program],,
enable_tlstest=yes)
if test x$tls_config_prefix != x ; then
tls_config_args="$tls_config_args --prefix=$tls_config_prefix"
if test x${TLS_CONFIG+set} != xset ; then
TLS_CONFIG=$tls_config_prefix/bin/libgnutls-config
fi
fi
AC_PATH_PROG(TLS_CONFIG, libgnutls-config, no)
min_tls_version=ifelse([$1], ,2.0.0, [$1])
AC_MSG_CHECKING(for libgnutls - version >= $min_tls_version)
no_tls=""
if test "$TLS_CONFIG" = "no" ; then
TLS_CFLAGS=""
TLS_LIBS="-lgnutls"
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$TLS_LIBS $LIBS"
dnl
dnl Now check if the installed libgnutls is sufficiently new.
dnl
rm -f conf.tlstest
AC_TRY_RUN([
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
int
main()
{
system("touch conf.tlstest");
if (gnutls_check_version("$min_tls_version") == 0)
{
printf("\n*** An old version of libgnutls (%s) was found.\n",
gnutls_check_version(0));
printf("*** You need a version of libtgnuls newer than $min_tls_version.\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
printf("*** being found. Yoiu can fix this is by removing the old version\n");
printf("*** of libgnutlsthe\n");
return 1;
}
return 0;
}
],, no_tls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
else
TLS_CFLAGS=`$TLS_CONFIG $tls_config_args --cflags`
TLS_LIBS=`$TLS_CONFIG $tls_config_args --libs`
tls_config_major_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
tls_config_minor_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
tls_config_micro_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
# Strip '-I/usr/include' off since this is always expected.
TLS_CFLAGS=`echo $TLS_CFLAGS | sed -e 's|-I/usr/include||'`
# Strip '-L/usr/lib' off since this is always in the link path.
TLS_LIBS=`echo $TLS_LIBS | sed -e 's|-L/usr/lib||'`
if test "x$enable_tlstest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$TLS_LIBS $LIBS"
dnl
dnl Now check if the installed libtgnuls is sufficiently new.
dnl
rm -f conf.tlstest
AC_TRY_RUN([
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
int
main()
{
system("touch conf.tlstest");
if (gnutls_check_version("$min_tls_version") == 0)
{
printf("\n*** An old version of libgnutls (%s) was found.\n",
gnutls_check_version(0));
printf("*** You need a version of libtgnuls newer than $min_tls_version.\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
printf("*** being found. Yoiu can fix this is by removing the old version\n");
printf("*** of libgnutlsthe\n");
return 1;
}
return 0;
}
],, no_tls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_tls" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$TLS_CONFIG" = "no" ; then
echo "*** The libgnutls-config script installed by libgnutls could not be found"
echo "*** If libtgnuls was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path."
else
if test -f conf.tlstest ; then
:
else
echo "*** Could not run libtgnuls test program, checking why..."
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$LIBS $TLS_LIBS"
dnl FIXME: AC_TRY_LINK
fi
fi
TLS_CFLAGS=""
TLS_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(TLS_CFLAGS)
AC_SUBST(TLS_LIBS)
rm -f conf.tlstest
])

339
configure vendored
View file

@ -728,6 +728,10 @@ XML_CFLAGS
XML_LIBS
HAVE_LIBXSLT
HAVE_LIBXML
TLS_CONFIG
TLS_CFLAGS
TLS_LIBS
HAVE_GNUTLS
HAVE_MDNS
USE_GMP
INCLUDE_FLAGS
@ -1353,6 +1357,8 @@ Optional Features:
--disable-xml Compile even if XML-dependencies are not met
--disable-xmltest Do not try to compile and run a test XML program
--disable-xslt Compile even if XSLT-dependency is not met
--disable-tls Disable use of GNUTLS
--disable-tlstest Do not try to compile and run a test TLS program
--disable-openssl Disable support for openssl in URL classes
Optional Packages:
@ -1393,6 +1399,7 @@ Optional Packages:
--with-ffi-library=PATH Library path for ffi (ffcall/libffi) libs
--with-libiconv-library=PATH Library path for libiconv libraries
--with-xml-prefix=PFX Prefix where libxml is installed (optional)
--with-tls-prefix=PFX Prefix where libgnutls is installed (optional)
--with-gmp-include=PATH include path for gmp headers
--with-gmp-library=PATH library path for gmp libraries
--with-openssl-include=PATH include path for openssl headers
@ -17555,7 +17562,8 @@ _ACEOF
LIBS="-lxslt $LIBS"
else
echo
echo "You most likely do not want to build base without XSLT support."
echo "You may not want to build base without XSLT support."
echo "Doing so will disable the XSLT extensions."
echo "If you really want to build -base without XSLT support,"
echo "add --disable-xslt to the configure arguments."
{ echo "$as_me:$LINENO: WARNING: Missing support for XSLT functionality." >&5
@ -17573,8 +17581,8 @@ echo "$as_me: WARNING: Disabled support for XSLT funtionality." >&2;}
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
echo
echo "You most likely do not want to build base without XML support."
echo "For instance, MacOS-X compatible property lists require XML."
echo "You may not want to build base without libxml2."
echo "Doing so will disable the XML, XPATH, and XMLRPC extensions."
echo "If you really want to build -base without XML support,"
echo "add --disable-xml to the configure arguments."
{ { echo "$as_me:$LINENO: error: Missing support for XML functionality." >&5
@ -17588,6 +17596,325 @@ echo "$as_me: WARNING: Disabled support for XML funtionality." >&2;}
fi
#--------------------------------------------------------------------
# Check recent libgnutls for SSL streams.
#--------------------------------------------------------------------
# Check whether --enable-tls was given.
if test "${enable_tls+set}" = set; then
enableval=$enable_tls;
else
enable_tls=no
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"
# Check whether --with-tls-prefix was given.
if test "${with_tls_prefix+set}" = set; then
withval=$with_tls_prefix; tls_config_prefix="$withval"
else
tls_config_prefix=""
fi
# Check whether --enable-tlstest was given.
if test "${enable_tlstest+set}" = set; then
enableval=$enable_tlstest;
else
enable_tlstest=yes
fi
if test x$tls_config_prefix != x ; then
tls_config_args="$tls_config_args --prefix=$tls_config_prefix"
if test x${TLS_CONFIG+set} != xset ; then
TLS_CONFIG=$tls_config_prefix/bin/libgnutls-config
fi
fi
# Extract the first word of "libgnutls-config", so it can be a program name with args.
set dummy libgnutls-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_TLS_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $TLS_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_TLS_CONFIG="$TLS_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_TLS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_TLS_CONFIG" && ac_cv_path_TLS_CONFIG="no"
;;
esac
fi
TLS_CONFIG=$ac_cv_path_TLS_CONFIG
if test -n "$TLS_CONFIG"; then
{ echo "$as_me:$LINENO: result: $TLS_CONFIG" >&5
echo "${ECHO_T}$TLS_CONFIG" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
min_tls_version=2.0.1
{ echo "$as_me:$LINENO: checking for libgnutls - version >= $min_tls_version" >&5
echo $ECHO_N "checking for libgnutls - version >= $min_tls_version... $ECHO_C" >&6; }
no_tls=""
if test "$TLS_CONFIG" = "no" ; then
TLS_CFLAGS=""
TLS_LIBS="-lgnutls"
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$TLS_LIBS $LIBS"
rm -f conf.tlstest
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
int
main()
{
system("touch conf.tlstest");
if (gnutls_check_version("$min_tls_version") == 0)
{
printf("\n*** An old version of libgnutls (%s) was found.\n",
gnutls_check_version(0));
printf("*** You need a version of libtgnuls newer than $min_tls_version.\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
printf("*** being found. Yoiu can fix this is by removing the old version\n");
printf("*** of libgnutlsthe\n");
return 1;
}
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
no_tls=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
else
TLS_CFLAGS=`$TLS_CONFIG $tls_config_args --cflags`
TLS_LIBS=`$TLS_CONFIG $tls_config_args --libs`
tls_config_major_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
tls_config_minor_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
tls_config_micro_version=`$TLS_CONFIG $tls_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
# Strip '-I/usr/include' off since this is always expected.
TLS_CFLAGS=`echo $TLS_CFLAGS | sed -e 's|-I/usr/include||'`
# Strip '-L/usr/lib' off since this is always in the link path.
TLS_LIBS=`echo $TLS_LIBS | sed -e 's|-L/usr/lib||'`
if test "x$enable_tlstest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$TLS_LIBS $LIBS"
rm -f conf.tlstest
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
#include <stdio.h>
#include <gnutls/gnutls.h>
int
main()
{
system("touch conf.tlstest");
if (gnutls_check_version("$min_tls_version") == 0)
{
printf("\n*** An old version of libgnutls (%s) was found.\n",
gnutls_check_version(0));
printf("*** You need a version of libtgnuls newer than $min_tls_version.\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
printf("*** being found. Yoiu can fix this is by removing the old version\n");
printf("*** of libgnutlsthe\n");
return 1;
}
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
no_tls=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_tls" = x ; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
enable_libgnutls=yes
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
if test "$TLS_CONFIG" = "no" ; then
echo "*** The libgnutls-config script installed by libgnutls could not be found"
echo "*** If libtgnuls was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path."
else
if test -f conf.tlstest ; then
:
else
echo "*** Could not run libtgnuls test program, checking why..."
CFLAGS="$CFLAGS $TLS_CFLAGS"
LIBS="$LIBS $TLS_LIBS"
fi
fi
TLS_CFLAGS=""
TLS_LIBS=""
enable_libgnutls=no
fi
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
cat >>confdefs.h <<\_ACEOF
#define HAVE_GNUTLS 1
_ACEOF
else
HAVE_GNUTLS=0
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
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."
{ { echo "$as_me:$LINENO: error: Missing support for TLS functionality." >&5
echo "$as_me: error: Missing support for TLS functionality." >&2;}
{ (exit 1); exit 1; }; }
fi
else
{ echo "$as_me:$LINENO: WARNING: Disabled support for TLS funtionality." >&5
echo "$as_me: WARNING: Disabled support for TLS funtionality." >&2;}
HAVE_GNUTLS=0
fi
#--------------------------------------------------------------------
# Check for NSNetServices
#--------------------------------------------------------------------
@ -19030,6 +19357,10 @@ XML_CFLAGS!$XML_CFLAGS$ac_delim
XML_LIBS!$XML_LIBS$ac_delim
HAVE_LIBXSLT!$HAVE_LIBXSLT$ac_delim
HAVE_LIBXML!$HAVE_LIBXML$ac_delim
TLS_CONFIG!$TLS_CONFIG$ac_delim
TLS_CFLAGS!$TLS_CFLAGS$ac_delim
TLS_LIBS!$TLS_LIBS$ac_delim
HAVE_GNUTLS!$HAVE_GNUTLS$ac_delim
HAVE_MDNS!$HAVE_MDNS$ac_delim
USE_GMP!$USE_GMP$ac_delim
INCLUDE_FLAGS!$INCLUDE_FLAGS$ac_delim
@ -19044,7 +19375,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 34; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View file

@ -27,6 +27,7 @@ builtin(include, config/objc-sys-dynamic.m4)dnl
builtin(include, config/procfs-exe-link.m4)dnl
builtin(include, config/procfs.m4)dnl
builtin(include, config/pathxml.m4)dnl
builtin(include, config/pathtls.m4)dnl
builtin(include, config/codeset.m4)dnl
builtin(include, config/addlibrarypath.m4)dnl
@ -2084,7 +2085,8 @@ if test $enable_xml = yes; then
LIBS="-lxslt $LIBS"
else
echo
echo "You most likely do not want to build base without XSLT support."
echo "You may not want to build base without XSLT support."
echo "Doing so will disable the XSLT extensions."
echo "If you really want to build -base without XSLT support,"
echo "add --disable-xslt to the configure arguments."
AC_MSG_WARN([Missing support for XSLT functionality.])
@ -2100,8 +2102,8 @@ if test $enable_xml = yes; then
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
echo
echo "You most likely do not want to build base without XML support."
echo "For instance, MacOS-X compatible property lists require XML."
echo "You may not want to build base without libxml2."
echo "Doing so will disable the XML, XPATH, and XMLRPC extensions."
echo "If you really want to build -base without XML support,"
echo "add --disable-xml to the configure arguments."
AC_MSG_ERROR([Missing support for XML functionality.])
@ -2112,6 +2114,45 @@ else
fi
AC_SUBST(HAVE_LIBXML)
#--------------------------------------------------------------------
# Check recent libgnutls for SSL streams.
#--------------------------------------------------------------------
AC_ARG_ENABLE(tls,
[ --disable-tls Disable use of GNUTLS],,
enable_tls=no)
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"
AM_PATH_TLS(2.0.1, 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])
else
HAVE_GNUTLS=0
# Restore the CFLAGS and LIBS because AM_PATH_TLS messes them
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
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."
AC_MSG_ERROR([Missing support for TLS functionality.])
fi
else
AC_MSG_WARN([Disabled support for TLS funtionality.])
HAVE_GNUTLS=0
fi
AC_SUBST(HAVE_GNUTLS)
#--------------------------------------------------------------------
# Check for NSNetServices
#--------------------------------------------------------------------