@@ -112,7 +112,7 @@ if test "x$prefix" != "xNONE"; then
112112fi
113113
114114AC_ARG_WITH(tests,
115- [ --with-glib2 Use GLIB 2.0 instead of 1.2],
115+ [ --with-glib2 Use GLIB 2.0 instead of 1.2],
116116 if test x$withval = xyes; then
117117 want_glib2=yes
118118 else
@@ -126,7 +126,7 @@ AC_ARG_WITH(tests,
126126
127127AC_ARG_WITH(perl-staticlib,
128128[ --with-perl-staticlib Specify that we want to link perl libraries
129- statically in irssi, default is no],
129+ statically in irssi, default is no],
130130 if test x$withval = xyes; then
131131 want_staticperllib=yes
132132 else
@@ -141,7 +141,7 @@ AC_ARG_WITH(perl-staticlib,
141141
142142AC_ARG_WITH(perl-lib,
143143[ --with-perl-lib=[site|vendor|DIR] Specify where to install the
144- Perl libraries for irssi, default is site],
144+ Perl libraries for irssi, default is site],
145145 if test "x$withval" = xyes; then
146146 want_perl=yes
147147 elif test "x$withval" = xno; then
@@ -170,8 +170,8 @@ AC_ARG_WITH(perl-lib,
170170
171171AC_ARG_WITH(perl,
172172[ --with-perl[=yes|no|module] Build with Perl support - also specifies
173- if it should be built into main irssi binary
174- (static, default) or as module],
173+ if it should be built into main irssi binary
174+ (static, default) or as module],
175175 if test x$withval = xyes; then
176176 want_perl=static
177177 elif test x$withval = xstatic; then
@@ -196,6 +196,62 @@ AC_ARG_ENABLE(ipv6,
196196 fi,
197197 want_ipv6=no)
198198
199+ dnl **
200+ dnl ** SSL Library checks (OpenSSL)
201+ dnl **
202+
203+ AC_ARG_ENABLE(ssl,
204+ [ --disable-ssl Turn on Secure Sockets Layer support [default=yes]],,
205+ enable_ssl=yes)
206+
207+ AC_ARG_WITH(openssl-includes,
208+ [ --with-openssl-includes Specify location of OpenSSL header files],
209+ [openssl_inc_prefix=-I$withval])
210+
211+ AC_ARG_WITH(openssl-libs,
212+ [ --with-openssl-libs Specify location of OpenSSL libs],
213+ [openssl_prefix=$withval],
214+ [openssl_prefix=/usr/lib])
215+
216+ if test "x$enable_ssl" = xyes; then
217+ ###
218+ ### Check for OpenSSL
219+ ###
220+ save_CFLAGS=$CFLAGS;
221+ CFLAGS="-lcrypto";
222+
223+ enable_openssl="no";
224+ OPENSSL_LDFLAGS="";
225+ AC_CHECK_LIB(ssl, SSL_read,
226+ AC_CHECK_LIB(crypto, X509_new,
227+ AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h,
228+ [
229+ enable_openssl="yes";
230+ OPENSSL_LDFLAGS="-lssl -lcrypto"
231+ ],
232+ AC_ERROR([Cannot find OpenSSL includes !])),
233+ AC_ERROR([Cannot find libCrypto !])),
234+ AC_ERROR([Cannot find libSSL !]))
235+ CFLAGS=$save_CFLAGS
236+
237+ if test "x$enable_openssl" = xyes; then
238+ AC_DEFINE(HAVE_OPENSSL)
239+ OPENSSL_LIBS="-L$openssl_prefix $OPENSSL_LDFLAGS"
240+ OPENSSL_CFLAGS="$openssl_inc_prefix"
241+ else
242+ OPENSSL_LIBS=
243+ OPENSSL_CFLAGS=
244+ fi
245+
246+ AC_SUBST(OPENSSL_CFLAGS)
247+ AC_SUBST(OPENSSL_LIBS)
248+ LIBS="$LIBS $OPENSSL_LIBS"
249+ CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
250+ else
251+ enable_openssl="no"
252+ fi
253+
254+
199255dnl **
200256dnl ** just some generic stuff...
201257dnl **
830886echo "Building text frontend ..... : $text"
831887echo "Building irssi bot ......... : $want_irssibot"
832888echo "Building irssi proxy ....... : $want_irssiproxy"
833- echo "Building with IPv6 support . : $want_ipv6"
834889if test "x$have_gmodule" = "xyes"; then
835890 echo "Building with module support : yes"
836891else
@@ -877,8 +932,12 @@ if test "x$want_perl" != "xno"; then
877932 echo " Anyway, installing perl to this directory should work just as well."
878933 fi
879934fi
880-
881935echo "Install prefix ............. : $prefix"
882936
937+ echo
938+
939+ echo "Building with IPv6 support . : $want_ipv6"
940+ echo "Building with SSL support .. : ${enable_openssl}"
941+
883942echo
884943echo "If there was any problems, read the INSTALL file."
0 commit comments