summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in63
1 files changed, 46 insertions, 17 deletions
diff --git a/configure.in b/configure.in
index a5870f336..29c482396 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
1# $Id: configure.in,v 1.247 2001/02/18 06:01:00 djm Exp $ 1# $Id: configure.in,v 1.248 2001/02/19 01:56:39 djm Exp $
2 2
3AC_INIT(ssh.c) 3AC_INIT(ssh.c)
4 4
@@ -593,20 +593,38 @@ if test "x$prefix" != "xNONE" ; then
593 tryssldir="$tryssldir $prefix" 593 tryssldir="$tryssldir $prefix"
594fi 594fi
595AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [ 595AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
596
597 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do 596 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
597 CPPFLAGS="$saved_CPPFLAGS"
598 LDFLAGS="$saved_LDFLAGS"
599 LIBS="$saved_LIBS -lcrypto"
600
601 # Skip directories if they don't exist
602 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
603 continue;
604 fi
598 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then 605 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
599 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" 606 # Try to use $ssldir/lib if it exists, otherwise
600 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include" 607 # $ssldir
601 if test ! -z "$need_dash_r" ; then 608 if test -d "$ssldir/lib" ; then
602 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" 609 LDFLAGS="$LDFLAGS -L$ssldir/lib"
610 if test ! -z "$need_dash_r" ; then
611 LDFLAGS="$LDFLAGS -R$ssldir/lib"
612 fi
613 else
614 LDFLAGS="$LDFLAGS -L$ssldir"
615 if test ! -z "$need_dash_r" ; then
616 LDFLAGS="$LDFLAGS -R$ssldir"
617 fi
618 fi
619 # Try to use $ssldir/include if it exists, otherwise
620 # $ssldir
621 if test -d "$ssldir/include" ; then
622 CPPFLAGS="$CPPFLAGS -I$ssldir/include"
623 else
624 CPPFLAGS="$CPPFLAGS -I$ssldir"
603 fi 625 fi
604 else
605 LDFLAGS="$saved_LDFLAGS"
606 fi 626 fi
607 627
608 LIBS="$saved_LIBS -lcrypto"
609
610 # Basic test to check for compatible version and correct linking 628 # Basic test to check for compatible version and correct linking
611 # *does not* test for RSA - that comes later. 629 # *does not* test for RSA - that comes later.
612 AC_TRY_RUN( 630 AC_TRY_RUN(
@@ -646,15 +664,26 @@ if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ;
646 AC_DEFINE(HAVE_OPENSSL) 664 AC_DEFINE(HAVE_OPENSSL)
647 dnl Need to recover ssldir - test above runs in subshell 665 dnl Need to recover ssldir - test above runs in subshell
648 ssldir=$ac_cv_openssldir 666 ssldir=$ac_cv_openssldir
649
650 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then 667 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
651 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include" 668 # Try to use $ssldir/lib if it exists, otherwise
652 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" 669 # $ssldir
653 if test ! -z "$need_dash_r" ; then 670 if test -d "$ssldir/lib" ; then
654 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" 671 LDFLAGS="$LDFLAGS -L$ssldir/lib"
672 if test ! -z "$need_dash_r" ; then
673 LDFLAGS="$LDFLAGS -R$ssldir/lib"
674 fi
675 else
676 LDFLAGS="$LDFLAGS -L$ssldir"
677 if test ! -z "$need_dash_r" ; then
678 LDFLAGS="$LDFLAGS -R$ssldir"
679 fi
655 fi 680 fi
656 if test ! -z "$blibpath" ; then 681 # Try to use $ssldir/include if it exists, otherwise
657 blibpath="$blibpath:$ssldir:$ssldir/lib" 682 # $ssldir
683 if test -d "$ssldir/include" ; then
684 CPPFLAGS="$CPPFLAGS -I$ssldir/include"
685 else
686 CPPFLAGS="$CPPFLAGS -I$ssldir"
658 fi 687 fi
659 fi 688 fi
660fi 689fi