Change configure.in to enable SSL by default, if libssl is present. Can
still be disabled with --without-ssl. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@201 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2c01]
|
[Changes 1.2c01]
|
||||||
|
|
||||||
|
* Enable SSL support by default, if OpenSSL is present at build time. (caf)
|
||||||
|
|
||||||
* Fix leak and potential crash in lame_resolv() using IPv6. (caf, snadge)
|
* Fix leak and potential crash in lame_resolv() using IPv6. (caf, snadge)
|
||||||
|
|
||||||
* Apply patch from snadge defining BIND_4_COMPAT on OpenBSD, to allow
|
* Apply patch from snadge defining BIND_4_COMPAT on OpenBSD, to allow
|
||||||
|
|||||||
45
configure.in
45
configure.in
@@ -537,27 +537,44 @@ AC_MSG_RESULT(no)
|
|||||||
dnl Check for SSL support.
|
dnl Check for SSL support.
|
||||||
AC_MSG_CHECKING(whether to enable SSL support)
|
AC_MSG_CHECKING(whether to enable SSL support)
|
||||||
AC_ARG_WITH(ssl,
|
AC_ARG_WITH(ssl,
|
||||||
[ --with-ssl=PFX Enable SSL support (Prefix is optional)],
|
[[ --with-ssl[=PATH] Enable SSL support (enabled by default if OpenSSL found)]],
|
||||||
[ case "$withval" in
|
[], [with_ssl=check])
|
||||||
|
|
||||||
|
case "$with_ssl" in
|
||||||
yes)
|
yes)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SSL, 1, Define this is the system has SSL support.)
|
;;
|
||||||
LIBS="$LIBS -lssl -lcrypto"
|
check)
|
||||||
AC_CHECK_LIB(ssl, SSL_accept,,AC_MSG_ERROR(Could not find OpenSSL.))
|
AC_MSG_RESULT(if available)
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SSL, 1, Define this is the system has SSL support.)
|
CFLAGS="$CFLAGS -I${with_ssl}/include"
|
||||||
LIBS="$LIBS -L${withval}/lib -lssl -lcrypto"
|
LDFLAGS="$LDFLAGS -L${with_ssl}/lib"
|
||||||
CFLAGS="$CFLAGS -I${withval}/include"
|
with_ssl=yes
|
||||||
AC_CHECK_LIB(ssl, SSL_accept,,AC_MSG_ERROR(Could not find OpenSSL.))
|
|
||||||
;;
|
;;
|
||||||
esac ],
|
esac
|
||||||
AC_MSG_RESULT(no)
|
case "$with_ssl" in
|
||||||
)
|
yes|check)
|
||||||
|
AC_CHECK_LIB([crypto], [SSLeay], [], [], [])
|
||||||
|
if test x"$ac_cv_lib_crypto_SSLeay" = x"yes"; then
|
||||||
|
AC_CHECK_LIB([ssl], [SSL_accept], [], [], [])
|
||||||
|
fi
|
||||||
|
if test x"$ac_cv_lib_ssl_SSL_accept" = x"yes"; then
|
||||||
|
dnl This would be unnecessary if we used HAVE_LIBSSL in the code
|
||||||
|
AC_DEFINE(HAVE_SSL, 1, Define this if the system has SSL support.)
|
||||||
|
else
|
||||||
|
if test x"$with_ssl" = x"yes"; then
|
||||||
|
AC_MSG_FAILURE([--with-ssl given, but could not find OpenSSL.])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([OpenSSL not found, will not have SSL support.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl Now that we've checked for PM and GTK support, make sure
|
dnl Now that we've checked for PM and GTK support, make sure
|
||||||
dnl that we "#define GUI" and and that we don't build wserv or
|
dnl that we "#define GUI" and and that we don't build wserv or
|
||||||
@@ -920,9 +937,9 @@ AC_MSG_RESULT(no)
|
|||||||
dnl Check for plugin support and which plugins to build.
|
dnl Check for plugin support and which plugins to build.
|
||||||
AC_MSG_CHECKING(whether to enable plugin support)
|
AC_MSG_CHECKING(whether to enable plugin support)
|
||||||
AC_ARG_WITH(plugins,
|
AC_ARG_WITH(plugins,
|
||||||
[ --with-plugins[=LIST] Enable plugin support
|
[[ --with-plugins[=LIST] Enable plugin support
|
||||||
LIST is a comma separated list of plugins to build
|
LIST is a comma separated list of plugins to build
|
||||||
If none are specified, all available plugins are built],
|
If none are specified, all available plugins are built]],
|
||||||
[ case "$withval" in
|
[ case "$withval" in
|
||||||
yes | all)
|
yes | all)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|||||||
@@ -129,6 +129,9 @@
|
|||||||
/* Define to 1 if you have the `killpg' function. */
|
/* Define to 1 if you have the `killpg' function. */
|
||||||
#undef HAVE_KILLPG
|
#undef HAVE_KILLPG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||||
|
#undef HAVE_LIBCRYPTO
|
||||||
|
|
||||||
/* Define to 1 if you have the Windows iphlpapi library */
|
/* Define to 1 if you have the Windows iphlpapi library */
|
||||||
#undef HAVE_LIBIPHLPAPI
|
#undef HAVE_LIBIPHLPAPI
|
||||||
|
|
||||||
@@ -204,7 +207,7 @@
|
|||||||
/* Define to 1 if you have the `socket' function. */
|
/* Define to 1 if you have the `socket' function. */
|
||||||
#undef HAVE_SOCKET
|
#undef HAVE_SOCKET
|
||||||
|
|
||||||
/* Define this is the system has SSL support. */
|
/* Define this if the system has SSL support. */
|
||||||
#undef HAVE_SSL
|
#undef HAVE_SSL
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
|||||||
Reference in New Issue
Block a user