@@ -97,49 +97,55 @@ openssldir="$withval" ], [ openssldir='' ] ) + AC_MSG_CHECKING([for OpenSSL directory]) + AC_MSG_RESULT($openssldir) dnl Set SSL include files path AC_ARG_WITH([openssl-includedir], AS_HELP_STRING([--with-openssl-includedir=], [path to include directory of OpenSSL or LibreSSL installation] ), [ opensslincludedir="$withval" ], [ - if test -n "$openssldir"; then - opensslincludedir="$openssldir/include/openssl" + if test ! -z "$openssldir"; then + if test -d "${openssldir}/include/openssl"; then + opensslincludedir="${openssldir}/include/openssl" + else + opensslincludedir="${openssldir}/include" + fi else opensslincludedir='' fi ] ) AC_MSG_CHECKING([for OpenSSL include directory]) AC_MSG_RESULT($opensslincludedir) dnl Set SSL include vars - if test -n "$opensslincludedir"; then + if test ! -z "$opensslincludedir"; then if test -f "$opensslincludedir/ssl.h"; then TCLTLS_SSL_CFLAGS="-I$opensslincludedir" TCLTLS_SSL_INCLUDES="-I$opensslincludedir" else AC_MSG_ERROR([Unable to locate ssl.h]) fi else - TCLTLS_SSL_CFLAGS="-I$(includedir)/openssl" - TCLTLS_SSL_INCLUDES="-I$(includedir)/openssl" + TCLTLS_SSL_CFLAGS="-I${includedir}/openssl" + TCLTLS_SSL_INCLUDES="-I${includedir}/openssl" fi dnl Set SSL lib files path AC_ARG_WITH([openssl-libdir], AS_HELP_STRING([--with-openssl-libdir=], [path to lib directory of OpenSSL or LibreSSL installation] ), [ openssllibdir="$withval" ], [ - if test -n "$openssldir"; then + if test ! -z "$openssldir"; then if test "$do64bit" == 'yes'; then openssllibdir="$openssldir/lib64" else openssllibdir="$openssldir/lib" fi @@ -150,11 +156,11 @@ ) AC_MSG_CHECKING([for OpenSSL lib directory]) AC_MSG_RESULT($openssllibdir) dnl Set SSL lib vars - if test -n "$openssllibdir"; then + if test ! -z "$openssllibdir"; then if test -f "$openssllibdir/libssl${SHLIB_SUFFIX}"; then if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then TCLTLS_SSL_LIBS="-L$openssllibdir -lcrypto -lssl" else # Linux and Solaris