[openssh-commits] [openssh] 01/01: Use autoconf to find openssl binary.

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Jan 7 14:32:48 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 26cab41c05d7b0859d2a1ea5b6ed253d91848a80
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Sat Jan 7 14:30:43 2023 +1100

    Use autoconf to find openssl binary.
    
    It's possible to install an OpenSSL in a path not in the system's
    default library search path.  OpenSSH can still use this (eg if you
    specify an rpath) but the openssl binary there may not work.  If one is
    available on the system path just use that.
---
 configure.ac | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6802500..6e1de3c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2683,6 +2683,7 @@ AC_CHECK_FUNCS([getpgrp],[
 # Search for OpenSSL
 saved_CPPFLAGS="$CPPFLAGS"
 saved_LDFLAGS="$LDFLAGS"
+openssl_bin_PATH="$PATH"
 AC_ARG_WITH([ssl-dir],
 	[  --with-ssl-dir=PATH     Specify path to OpenSSL installation ],
 	[
@@ -2712,14 +2713,11 @@ AC_ARG_WITH([ssl-dir],
 			else
 				CPPFLAGS="-I${withval} ${CPPFLAGS}"
 			fi
-			if test -x "${withval}/bin/openssl"; then
-				openssl_bin="${withval}/bin/openssl"
-			elif test -x "${withval}/apps/openssl"; then
-				openssl_bin="${withval}/apps/openssl"
-			fi
+			openssl_bin_PATH="${PATH}${PATH_SEPARATOR}${withval}/bin${PATH_SEPARATOR}${withval}/apps"
 		fi
 	]
 )
+AC_PATH_PROGS([openssl_bin], openssl, [], [$openssl_bin_PATH])
 AC_SUBST(OPENSSL_BIN, [${openssl_bin}])
 
 AC_ARG_WITH([openssl-header-check],

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list