summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-19 12:56:39 +1100
committerDamien Miller <djm@mindrot.org>2001-02-19 12:56:39 +1100
commitccdefb600f9d279cd17cdca79b241a036b380b21 (patch)
tree4a31dd7b6600ca97b1122b29e10d5cb72e2170eb
parentd95c09cc83ec07b42feb07c4ff71d23720b37e8e (diff)
- (djm) Rework search for OpenSSL location. Skip directories which don'tV_2_5_0_P1
exist, don't add -L$ssldir/lib if it doesn't exist. Should help SCO with its limit of 6 -L options.
-rw-r--r--ChangeLog5
-rw-r--r--configure.in63
2 files changed, 50 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index be687ffc..5b3d94b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
20010219
- (bal) Markus' blessing to rename login.[ch] -> sshlogin.[ch] and
pty.[ch] -> sshpty.[ch]
+ - (djm) Rework search for OpenSSL location. Skip directories which don't
+ exist, don't add -L$ssldir/lib if it doesn't exist. Should help SCO
+ with its limit of 6 -L options.
20010218
- (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice
@@ -4042,4 +4045,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.801 2001/02/18 19:13:33 mouring Exp $
+$Id: ChangeLog,v 1.802 2001/02/19 01:56:39 djm Exp $
diff --git a/configure.in b/configure.in
index a5870f33..29c48239 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.247 2001/02/18 06:01:00 djm Exp $
+# $Id: configure.in,v 1.248 2001/02/19 01:56:39 djm Exp $
AC_INIT(ssh.c)
@@ -593,20 +593,38 @@ if test "x$prefix" != "xNONE" ; then
tryssldir="$tryssldir $prefix"
fi
AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
-
for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
+ CPPFLAGS="$saved_CPPFLAGS"
+ LDFLAGS="$saved_LDFLAGS"
+ LIBS="$saved_LIBS -lcrypto"
+
+ # Skip directories if they don't exist
+ if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
+ continue;
+ fi
if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
- LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
- CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
- if test ! -z "$need_dash_r" ; then
- LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
+ # Try to use $ssldir/lib if it exists, otherwise
+ # $ssldir
+ if test -d "$ssldir/lib" ; then
+ LDFLAGS="$LDFLAGS -L$ssldir/lib"
+ if test ! -z "$need_dash_r" ; then
+ LDFLAGS="$LDFLAGS -R$ssldir/lib"
+ fi
+ else
+ LDFLAGS="$LDFLAGS -L$ssldir"
+ if test ! -z "$need_dash_r" ; then
+ LDFLAGS="$LDFLAGS -R$ssldir"
+ fi
+ fi
+ # Try to use $ssldir/include if it exists, otherwise
+ # $ssldir
+ if test -d "$ssldir/include" ; then
+ CPPFLAGS="$CPPFLAGS -I$ssldir/include"
+ else
+ CPPFLAGS="$CPPFLAGS -I$ssldir"
fi
- else
- LDFLAGS="$saved_LDFLAGS"
fi
- LIBS="$saved_LIBS -lcrypto"
-
# Basic test to check for compatible version and correct linking
# *does not* test for RSA - that comes later.
AC_TRY_RUN(
@@ -646,15 +664,26 @@ if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ;
AC_DEFINE(HAVE_OPENSSL)
dnl Need to recover ssldir - test above runs in subshell
ssldir=$ac_cv_openssldir
-
if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
- CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
- LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
- if test ! -z "$need_dash_r" ; then
- LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
+ # Try to use $ssldir/lib if it exists, otherwise
+ # $ssldir
+ if test -d "$ssldir/lib" ; then
+ LDFLAGS="$LDFLAGS -L$ssldir/lib"
+ if test ! -z "$need_dash_r" ; then
+ LDFLAGS="$LDFLAGS -R$ssldir/lib"
+ fi
+ else
+ LDFLAGS="$LDFLAGS -L$ssldir"
+ if test ! -z "$need_dash_r" ; then
+ LDFLAGS="$LDFLAGS -R$ssldir"
+ fi
fi
- if test ! -z "$blibpath" ; then
- blibpath="$blibpath:$ssldir:$ssldir/lib"
+ # Try to use $ssldir/include if it exists, otherwise
+ # $ssldir
+ if test -d "$ssldir/include" ; then
+ CPPFLAGS="$CPPFLAGS -I$ssldir/include"
+ else
+ CPPFLAGS="$CPPFLAGS -I$ssldir"
fi
fi
fi