From f90f8bc80311a1871b50382f4bae62614d332e51 Mon Sep 17 00:00:00 2001 From: nils Date: Thu, 5 Aug 2004 22:27:11 +0000 Subject: [PATCH] fix openssl detection, patch supplied by Victor Tarasov git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1883 c6295689-39f2-0310-b995-f0e70906c6a9 --- configure.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index abeeba65..8c19570a 100644 --- a/configure.in +++ b/configure.in @@ -240,7 +240,11 @@ saved_CPPFLAGS="$CPPFLAGS" AC_SUBST(LIBCRYPTO) AC_SUBST(ENGINE_LINK) AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [ - for ssldir in $tryssldir $trycommondir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do + if test "x$tryssldir" = "x" ; then + tryssldir="$trycommandir /usr/ /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl" + fi + + for ssldir in $tryssldir ; do # Skip empty variables if test -z "$ssldir"; then continue; @@ -324,7 +328,7 @@ int main(void) if test "x$GOOD_OPENSSL" == "xyes" then # engine has to be there and working - LIBS="$saved_LIBS $LIBCRYPTO" + LIBS="$saved_LIBS $LIBCRYPTO $LIBDL" AC_TRY_RUN( [ #include @@ -402,6 +406,11 @@ LIBS="$saved_LIBS" if test "x$SSL_MSG" = "xyes" ; then AC_DEFINE(HAVE_OPENSSL, 1, [Have OpenSSL libraries]) + LDFLAGS="-L$ac_cv_openssldir/lib $LDFLAGS" + if test ! -z "$need_dash_r" ; then + LDFLAGS="-R$ac_cv_openssldir/lib $LDFLAGS" + fi + CPPFLAGS="-I$ac_cv_openssldir/include $saved_CPPFLAGS" else LIBCRYPTO="" LIBCRYPTOA=""