diff --git a/configure b/configure index 28d82728..f6ea6167 100755 --- a/configure +++ b/configure @@ -812,6 +812,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug enable debuging --disable-modules disable modules + --disable-openssl disable openssl Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1955,13 +1956,19 @@ if test "${enable_modules+set}" = set; then else MODULES="yes" fi; +# Check whether --enable-openssl or --disable-openssl was given. +if test "${enable_openssl+set}" = set; then + enableval="$enable_openssl" + NOSSL=1 +fi; -if test -n "$OPENSSL"; then - appendLib -L${OPENSSL}/lib - appendInc -I${OPENSSL}/include -fi +if test -z "$NOSSL"; then + if test -n "$OPENSSL"; then + appendLib -L${OPENSSL}/lib + appendInc -I${OPENSSL}/include + fi -ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -2844,8 +2851,9 @@ else fi -if test -z "$NOSSL"; then - appendCXX -DHAVE_LIBSSL + if test -z "$NOSSL"; then + appendCXX -DHAVE_LIBSSL + fi fi if test -z "$prefix" || test $prefix = "NONE"; then diff --git a/configure.in b/configure.in index 87703cc1..cdbfde61 100644 --- a/configure.in +++ b/configure.in @@ -38,17 +38,20 @@ fi AC_ARG_WITH( openssl, [ --with-openssl=/path/to/openssl], OPENSSL=$withval,) AC_ARG_ENABLE( debug, [ --enable-debug enable debuging], appendCXX -Wall -ggdb -D_DEBUG, appendCXX -Wall -s -O2 -fomit-frame-pointer ) AC_ARG_ENABLE( modules, [ --disable-modules disable modules], MODULES="no", MODULES="yes") - -if test -n "$OPENSSL"; then - appendLib -L${OPENSSL}/lib - appendInc -I${OPENSSL}/include -fi - -AC_CHECK_LIB( crypto, BIO_new,,NOSSL=1, ) -AC_CHECK_LIB( ssl, SSL_shutdown,,NOSSL=1, ) +AC_ARG_ENABLE( openssl, [ --disable-openssl disable openssl], NOSSL=1,) if test -z "$NOSSL"; then - appendCXX -DHAVE_LIBSSL + if test -n "$OPENSSL"; then + appendLib -L${OPENSSL}/lib + appendInc -I${OPENSSL}/include + fi + + AC_CHECK_LIB( crypto, BIO_new,,NOSSL=1, ) + AC_CHECK_LIB( ssl, SSL_shutdown,,NOSSL=1, ) + + if test -z "$NOSSL"; then + appendCXX -DHAVE_LIBSSL + fi fi if test -z "$prefix" || test $prefix = "NONE"; then