2010-08-18 17:35:59 -04:00
|
|
|
$OpenBSD: patch-configure_ac,v 1.22 2010/08/18 21:36:00 steven Exp $
|
|
|
|
--- configure.ac.orig Tue Aug 10 03:35:42 2010
|
|
|
|
+++ configure.ac Sun Aug 15 21:45:59 2010
|
|
|
|
@@ -994,7 +994,7 @@ else
|
2007-05-12 11:19:35 -04:00
|
|
|
if test "$ac_silc_libs" != "no"; then
|
|
|
|
SILC_LIBS="-L$ac_silc_libs"
|
|
|
|
fi
|
|
|
|
- SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
|
|
|
|
+ SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -pthread $LIBDL"
|
|
|
|
AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
|
2007-10-01 18:03:29 -04:00
|
|
|
|
|
|
|
if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
|
2010-08-18 17:35:59 -04:00
|
|
|
@@ -1719,6 +1719,11 @@ AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_C
|
2007-05-12 11:19:35 -04:00
|
|
|
|
|
|
|
dnl These two are inverses of each other <-- stolen from evolution!
|
|
|
|
|
|
|
|
+AC_ARG_ENABLE(openssl,
|
2008-06-05 06:24:14 -04:00
|
|
|
+ [ --enable-openssl=[yes,no] attempt to use OpenSSL for SSL support [default=yes]],
|
2007-05-12 11:19:35 -04:00
|
|
|
+ [enable_openssl="$enableval"],
|
|
|
|
+ [enable_openssl="yes"])
|
|
|
|
+
|
|
|
|
AC_ARG_ENABLE(gnutls,
|
2008-06-05 06:24:14 -04:00
|
|
|
[ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support [default=yes]],
|
2007-05-12 11:19:35 -04:00
|
|
|
[enable_gnutls="$enableval"],
|
2010-08-18 17:35:59 -04:00
|
|
|
@@ -1729,10 +1734,98 @@ AC_ARG_ENABLE(nss,
|
2008-06-05 06:24:14 -04:00
|
|
|
[enable_nss="$enableval"],
|
|
|
|
[enable_nss="yes"])
|
2007-05-12 11:19:35 -04:00
|
|
|
|
2009-09-08 02:35:24 -04:00
|
|
|
-msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
|
|
|
|
+msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without OpenSSL, GnuTLS or NSS."
|
2008-06-05 06:24:14 -04:00
|
|
|
+
|
|
|
|
+
|
2007-05-12 11:19:35 -04:00
|
|
|
+dnl # Check for OpenSSL if it's specified.
|
|
|
|
+dnl #
|
2008-06-05 06:24:14 -04:00
|
|
|
+looked_for_openssl="no"
|
2007-05-12 11:19:35 -04:00
|
|
|
+if test "x$enable_openssl" != "xno"; then
|
2008-06-05 06:24:14 -04:00
|
|
|
+ enable_openssl="no"
|
2007-05-12 11:19:35 -04:00
|
|
|
+ prefix=`eval echo $prefix`
|
2008-06-05 06:24:14 -04:00
|
|
|
+ looked_for_openssl="yes"
|
2007-05-12 11:19:35 -04:00
|
|
|
+
|
|
|
|
+ AC_ARG_WITH(openssl-includes,
|
|
|
|
+ [ --with-openssl-includes=PREFIX location of OpenSSL includes.],
|
|
|
|
+ [ with_openssl_includes="$withval" ],
|
|
|
|
+ [ with_openssl_includes="$prefix/include" ])
|
|
|
|
+
|
|
|
|
+ have_openssl_includes="no"
|
|
|
|
+
|
|
|
|
+ if test "x$with_openssl_includes" != "xno"; then
|
|
|
|
+ CPPFLAGS_save="$CPPFLAGS"
|
|
|
|
+
|
|
|
|
+ AC_MSG_CHECKING(for OpenSSL includes)
|
|
|
|
+ AC_MSG_RESULT("")
|
|
|
|
+
|
|
|
|
+ CPPFLAGS="$CPPFLAGS -I$with_openssl_includes"
|
|
|
|
+ AC_CHECK_HEADERS(openssl/ssl.h, [ openssl_includes="yes" ])
|
|
|
|
+ CPPFLAGS="$CPPFLAGS_save"
|
|
|
|
+
|
|
|
|
+ if test "x$openssl_includes" != "xno" -a \
|
|
|
|
+ "x$openssl_includes" != "x"; then
|
|
|
|
+ have_openssl_includes="yes"
|
|
|
|
+
|
|
|
|
+ OPENSSL_CFLAGS="-I$with_openssl_includes"
|
|
|
|
+ else
|
|
|
|
+ OPENSSL_CFLAGS=""
|
|
|
|
+ fi
|
|
|
|
+ else
|
|
|
|
+ AC_MSG_CHECKING(for OpenSSL includes)
|
|
|
|
+ AC_MSG_RESULT(no)
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+ AC_ARG_WITH(openssl-libs,
|
|
|
|
+ [AC_HELP_STRING([--with-openssl-libs=PREFIX], [location of OpenSSL libraries.])],
|
|
|
|
+ [ with_openssl_libs="$withval" ])
|
|
|
|
+
|
|
|
|
+ if test "x$with_openssl_libs" != "xno" -a \
|
|
|
|
+ "x$have_openssl_includes" != "xno"; then
|
|
|
|
+
|
|
|
|
+ LIBS_save="$LIBS"
|
|
|
|
+
|
|
|
|
+ case $with_openssl_libs in
|
|
|
|
+ ""|-L*) ;;
|
|
|
|
+ *) with_openssl_libs="-L$with_openssl_libs" ;;
|
|
|
|
+ esac
|
|
|
|
+
|
|
|
|
+ AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs,
|
|
|
|
+ [
|
|
|
|
+ LIBS="$LIBS $with_openssl_libs -lssl -lcrypto"
|
|
|
|
+ AC_TRY_LINK_FUNC(SSL_library_init, openssl_libs="yes", openssl_libs="no")
|
|
|
|
+ LIBS="$LIBS_save"
|
|
|
|
+ ])
|
|
|
|
+
|
|
|
|
+ if test "x$openssl_libs" != "xno"; then
|
|
|
|
+ AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have OpenSSL])
|
|
|
|
+ AC_DEFINE(HAVE_SSL)
|
|
|
|
+ msg_openssl="OpenSSL"
|
|
|
|
+ OPENSSL_LIBS="$with_openssl_libs -lssl -lcrypto"
|
|
|
|
+
|
|
|
|
+ enable_openssl="yes"
|
|
|
|
+ else
|
|
|
|
+ OPENSSL_CFLAGS=""
|
|
|
|
+ OPENSSL_LIBS=""
|
|
|
|
+ fi
|
|
|
|
+ else
|
|
|
|
+ AC_MSG_CHECKING(for OpenSSL libraries)
|
|
|
|
+ AC_MSG_RESULT(no)
|
|
|
|
+ fi
|
|
|
|
+else
|
|
|
|
+ OPENSSL_CFLAGS=""
|
|
|
|
+ OPENSSL_LIBS=""
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+AC_SUBST(OPENSSL_CFLAGS)
|
|
|
|
+AC_SUBST(OPENSSL_LIBS)
|
|
|
|
+
|
|
|
|
+AM_CONDITIONAL(USE_OPENSSL, test "x$enable_openssl" = "xyes")
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+dnl #
|
2009-06-23 18:47:23 -04:00
|
|
|
looked_for_gnutls="no"
|
2007-05-12 11:19:35 -04:00
|
|
|
dnl #
|
2009-09-08 02:35:24 -04:00
|
|
|
-dnl # Check for GnuTLS if it's specified.
|
|
|
|
+dnl # Check for GnuTLS if it's specified, or if OpenSSL checks failed.
|
|
|
|
dnl #
|
|
|
|
if test "x$enable_gnutls" != "xno"; then
|
|
|
|
enable_gnutls="no"
|
2010-08-18 17:35:59 -04:00
|
|
|
@@ -2130,17 +2223,32 @@ fi
|
2007-05-12 11:19:35 -04:00
|
|
|
|
|
|
|
AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
|
|
|
|
|
|
|
|
-if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
|
|
|
|
+if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x" -a "x$msg_openssl" != "x"; then
|
2008-06-05 06:24:14 -04:00
|
|
|
+ msg_ssl="$msg_nss, $msg_gnutls and $msg_openssl"
|
2007-05-12 11:19:35 -04:00
|
|
|
+elif test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
|
|
|
|
msg_ssl="$msg_nss and $msg_gnutls"
|
|
|
|
+elif test "x$msg_nss" != "x" -a "x$msg_openssl" != "x"; then
|
|
|
|
+ msg_ssl="$msg_nss and $msg_openssl"
|
|
|
|
+elif test "x$msg_gnutls" != "x" -a "x$msg_openssl" != "x"; then
|
|
|
|
+ msg_ssl="$msg_gnutls and $msg_openssl"
|
|
|
|
elif test "x$msg_nss" != "x"; then
|
|
|
|
msg_ssl=$msg_nss
|
|
|
|
elif test "x$msg_gnutls" != "x"; then
|
|
|
|
msg_ssl=$msg_gnutls
|
2008-08-21 01:59:01 -04:00
|
|
|
-elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
|
2008-06-05 06:24:14 -04:00
|
|
|
+elif test "x$msg_openssl" != "x"; then
|
2007-05-12 11:19:35 -04:00
|
|
|
+ msg_ssl=$msg_openssl
|
2008-08-21 01:59:01 -04:00
|
|
|
+elif test "x$looked_for_openssl" = "xyes" -a "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
|
2008-06-05 06:24:14 -04:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
-Neither GnuTLS or NSS SSL development headers found.
|
|
|
|
-Use --disable-nss --disable-gnutls if you do not need SSL support.
|
2009-09-08 02:35:24 -04:00
|
|
|
-MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
|
|
|
|
+OpenSSL, GnuTLS or NSS SSL development headers found.
|
2008-06-05 06:24:14 -04:00
|
|
|
+Use --disable-openssl --disable-nss --disable-gnutls if you do not need SSL support.
|
2009-09-08 02:35:24 -04:00
|
|
|
+MSN, Yahoo!, Novell Groupwise and Google Talk will not work without OpenSSL, GnuTLS or NSS.
|
2008-06-05 06:24:14 -04:00
|
|
|
+])
|
2009-09-08 02:35:24 -04:00
|
|
|
+
|
2008-08-21 01:59:01 -04:00
|
|
|
+elif test "x$looked_for_openssl" = "xyes" -a "$force_deps" = "xyes" ; then
|
2008-06-05 06:24:14 -04:00
|
|
|
+ AC_MSG_ERROR([
|
|
|
|
+OpenSSL SSL development headers not found.
|
|
|
|
+Use --disable-openssl if you do not need SSL support.
|
2009-09-08 02:35:24 -04:00
|
|
|
+MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
|
2008-06-05 06:24:14 -04:00
|
|
|
])
|
2008-08-21 01:59:01 -04:00
|
|
|
elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
|
2008-06-05 06:24:14 -04:00
|
|
|
AC_MSG_ERROR([
|