openbsd-ports/net/gaim/patches/patch-configure_ac
brad 32ca6c6b08 upgrade to gaim 2.0.0beta4
the audio flavor has been removed for now
as 2.x now requires gstreamer and the gstreamer
version we have in-tree is not new enough.

tested by ckuethe@ alek@ brad@ and a few others.

ok alek@
2006-10-31 19:32:50 +00:00

173 lines
5.3 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.1 2006/10/31 19:32:51 brad Exp $
--- configure.ac.orig Wed Oct 18 19:38:16 2006
+++ configure.ac Sat Oct 28 23:35:23 2006
@@ -415,6 +415,7 @@ if test "x$enable_consoleui" = "xyes"; t
# ncursesw was not found. Look for plain old ncurses
enable_consoleui=yes
AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
+ LIBS="${LIBS} -lncurses"
AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no])
AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
fi
@@ -456,14 +457,16 @@ dnl ####################################
AC_ARG_ENABLE(gstreamer,
[AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
enable_gst="no", enable_gst="yes")
-PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [
- AC_MSG_RESULT(no)
- enable_gst="no"
-])
if test "x$enable_gst" != "xno"; then
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
+ PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10],
+ AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
+ AC_SUBST(GSTREAMER_CFLAGS)
+ AC_SUBST(GSTREAMER_LIBS)
+ enable_gst="yes"
+ ], [
+ AC_MSG_RESULT(no)
+ enable_gst="no"
+ ])
fi
dnl #######################################################################
@@ -570,7 +573,7 @@ else
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)
fi
AC_SUBST(SILC_LIBS)
@@ -1187,8 +1190,13 @@ dnl ####################################
dnl These two are inverses of each other <-- stolen from evolution!
+AC_ARG_ENABLE(openssl,
+ [ --enable-openssl=[yes,no] attempt to use OpenSSL for SSL support (preferred) [default=yes]],
+ [enable_openssl="$enableval"],
+ [enable_openssl="yes"])
+
AC_ARG_ENABLE(gnutls,
- [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support (preferred) [default=yes]],
+ [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support [default=yes]],
[enable_gnutls="$enableval"],
[enable_gnutls="yes"])
@@ -1200,6 +1208,90 @@ AC_ARG_ENABLE(nss,
msg_ssl="None (MSN will not work without SSL!)"
dnl #
+dnl # Check for OpenSSL if it's specified.
+dnl #
+if test "x$enable_openssl" != "xno"; then
+ enale_openssl="no"
+ prefix=`eval echo $prefix`
+
+ 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 #
dnl # Check for GnuTLS if it's specified.
dnl #
if test "x$enable_gnutls" != "xno"; then
@@ -1552,12 +1644,20 @@ fi
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
+ msg_ssl="$msg_nss, $msg_gnutls, and $msg_openssl"
+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
+elif test "x$msg_openssl" != "x"; then
+ msg_ssl=$msg_openssl
fi
dnl #######################################################################