summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in92
1 files changed, 90 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index e2160369..0a369a44 100644
--- a/configure.in
+++ b/configure.in
@@ -111,7 +111,7 @@ if test "x$prefix" != "xNONE"; then
perl_prefix_note=yes
fi
-AC_ARG_WITH(tests,
+AC_ARG_WITH(glib2,
[ --with-glib2 Use GLIB 2.0 instead of 1.2],
if test x$withval = xyes; then
want_glib2=yes
@@ -124,6 +124,19 @@ AC_ARG_WITH(tests,
fi,
want_glib2=yes)
+AC_ARG_WITH(gc,
+[ --with-gc Use garbage collector, requires GLIB2],
+ if test x$withval = xyes; then
+ want_gc=yes
+ else
+ if test "x$withval" = xno; then
+ want_gc=no
+ else
+ want_gc=yes
+ fi
+ fi,
+ want_gc=no)
+
AC_ARG_WITH(perl-staticlib,
[ --with-perl-staticlib Specify that we want to link perl libraries
statically in irssi, default is no],
@@ -220,6 +233,63 @@ AC_ARG_WITH(openssl-libs,
[openssl_prefix=/usr/lib])
dnl **
+dnl ** SSL Library checks (OpenSSL)
+dnl **
+
+AC_ARG_ENABLE(ssl,
+ [ --enable-ssl Turn on Secure Sockets Layer support [default=yes]],,
+ enable_ssl=yes)
+
+AC_ARG_WITH(openssl-includes,
+ [ --with-openssl-includes Specify location of OpenSSL header files],
+ [openssl_inc_prefix=-I$withval])
+
+AC_ARG_WITH(openssl-libs,
+ [ --with-openssl-libs Specify location of OpenSSL libs],
+ [openssl_prefix=$withval],
+ [openssl_prefix=/usr/lib])
+
+if test "x$enable_ssl" = xyes; then
+ ###
+ ### Check for OpenSSL
+ ###
+ save_CFLAGS=$CFLAGS;
+ CFLAGS="-lcrypto";
+
+ enable_openssl="no";
+ OPENSSL_LDFLAGS="";
+ AC_CHECK_LIB(ssl, SSL_read,
+ AC_CHECK_LIB(crypto, X509_new,
+ AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h,
+ [
+ enable_openssl="yes";
+ OPENSSL_LDFLAGS="-lssl -lcrypto"
+ ],
+ AC_ERROR([Cannot find OpenSSL includes !])),
+ AC_ERROR([Cannot find libCrypto !])),
+ AC_ERROR([Cannot find libSSL !]))
+ CFLAGS=$save_CFLAGS
+
+ if test "x$enable_openssl" = xyes; then
+ AC_DEFINE(HAVE_OPENSSL)
+ OPENSSL_LIBS="-L$openssl_prefix $OPENSSL_LDFLAGS"
+ OPENSSL_CFLAGS="$openssl_inc_prefix"
+ enable_openssl="yes, in $openssl_prefix"
+ else
+ OPENSSL_LIBS=
+ OPENSSL_CFLAGS=
+ fi
+
+ AC_SUBST(OPENSSL_CFLAGS)
+ AC_SUBST(OPENSSL_LIBS)
+ LIBS="$LIBS $OPENSSL_LIBS"
+ CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+else
+ enable_openssl="no"
+fi
+
+
+dnl **
dnl ** just some generic stuff...
dnl **
@@ -462,7 +532,6 @@ fi
LIBS="$LIBS $GLIB_LIBS"
-dnl * make sure glib2 + ssl isn't tried to be used, it won't work
if test "x$enable_ssl" = xyes; then
###
### Check for OpenSSL
@@ -493,6 +562,22 @@ else
fi
dnl **
+dnl ** Garbage Collector
+dnl **
+if test "x$want_gc" = xyes; then
+ if test "$glib_config_major_version" = "2"; then
+ AC_CHECK_LIB(gc, GC_malloc, [
+ AC_DEFINE(HAVE_GC)
+ LIBS="$LIBS -lgc"
+ ], [
+ want_gc=no
+ ])
+ else
+ want_gc=no
+ fi
+fi
+
+dnl **
dnl ** check if we can link dynamic libraries to modules
dnl ** also checks if libraries are built to .libs dir
dnl **
@@ -875,6 +960,8 @@ if test "x$want_ipv6" = "xyes"; then
AC_MSG_RESULT($irssi_cv_type_in6_addr)
fi
+echo "OpenSSL support .............: ${enable_openssl}"
+
dnl **
dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
dnl **
@@ -1002,6 +1089,7 @@ echo
echo "Building with IPv6 support ....... : $want_ipv6"
echo "Building with SSL support ........ : ${enable_openssl}"
echo "Building with 64bit DCC support .. : $offt_64bit"
+echo "Building with garbage collector .. : $want_gc"
if test "x$enable_openssl" = "xno" -a "x$ssl_error" != "x"; then
echo " - $ssl_error"
fi