Bug #554: Support for --with-openssl[=DIR]

Here is fix for bug 554.
Added configure options 
--with-openssl-includes[=DIR] and --with-openssl-libs[=DIR]
parent 52706fd3
......@@ -709,6 +709,10 @@ AC_DEFUN(MYSQL_CHECK_VIO, [
])
AC_DEFUN(MYSQL_FIND_OPENSSL, [
incs="$1"
libs="$2"
case "$incs---$libs" in
default---default )
for d in /usr/ssl/include /usr/local/ssl/include /usr/include \
/usr/include/ssl /opt/ssl/include /opt/openssl/include \
/usr/local/ssl/include /usr/local/include ; do
......@@ -723,6 +727,19 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [
OPENSSL_LIB=$d
fi
done
;;
default---* | *---default | yes---* | *---yes )
AC_MSG_ERROR([if either 'includes' or 'libs' is specified, both must be specified])
;;
* )
if test -f $incs/openssl/ssl.h ; then
OPENSSL_INCLUDE=-I$incs
fi
if test -f $libs/libssl.a ; then
OPENSSL_LIB=$libs
fi
;;
esac
# On RedHat 9 we need kerberos to compile openssl
for d in /usr/kerberos/include
......@@ -752,11 +769,23 @@ AC_MSG_CHECKING(for OpenSSL)
[openssl="$withval"],
[openssl=no])
openssl_libs=""
openssl_includes=""
AC_ARG_WITH([openssl-includes],
[
--with-openssl-includes=DIR
Find OpenSSL headers in DIR],
[openssl_includes="$withval"],
[openssl_includes=default])
AC_ARG_WITH([openssl-libs],
[
--with-openssl-libs=DIR
Find OpenSSL libraries in DIR],
[openssl_libs="$withval"],
[openssl_libs=default])
if test "$openssl" = "yes"
then
MYSQL_FIND_OPENSSL
MYSQL_FIND_OPENSSL([$openssl_includes], [$openssl_libs])
#force VIO use
vio_dir="vio"
vio_libs="../vio/libvio.la"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment