diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a88957ea3df..6c567f00765 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -788,7 +788,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ AC_DEFUN(MYSQL_CHECK_OPENSSL, [ AC_MSG_CHECKING(for OpenSSL) AC_ARG_WITH([openssl], - [ --with-openssl Include the OpenSSL support], + [ --with-openssl[=DIR] Include the OpenSSL support], [openssl="$withval"], [openssl=no]) @@ -806,8 +806,19 @@ AC_MSG_CHECKING(for OpenSSL) [openssl_libs="$withval"], [openssl_libs=""]) - if test "$openssl" = "yes" + if test "$openssl" != "no" then + if test "$openssl" != "yes" + then + if test -z "$openssl_includes" + then + openssl_includes="$openssl/include" + fi + if test -z "$openssl_libs" + then + openssl_libs="$openssl/lib" + fi + fi MYSQL_FIND_OPENSSL([$openssl_includes], [$openssl_libs]) #force VIO use vio_dir="vio" @@ -843,6 +854,14 @@ AC_MSG_CHECKING(for OpenSSL) NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs" else AC_MSG_RESULT(no) + if test ! -z "$openssl_includes" + then + AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl); + fi + if test ! -z "$openssl_libs" + then + AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl); + fi fi AC_SUBST(openssl_libs) AC_SUBST(openssl_includes) |