[openssh-commits] [openssh] 01/01: add a --with-login-program configure argument

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Aug 16 14:48:22 AEST 2016


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

djm pushed a commit to branch master
in repository openssh.

commit a1cc637e7e11778eb727559634a6ef1c19c619f6
Author: Damien Miller <djm at mindrot.org>
Date:   Tue Aug 16 14:47:34 2016 +1000

    add a --with-login-program configure argument
    
    Saves messing around with LOGIN_PROGRAM env var, which come
    packaging environments make hard to do during configure phase.
---
 configure.ac | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1f1941a..959826f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,15 +80,27 @@ if test -z "$AR" ; then
 fi
 
 # Use LOGIN_PROGRAM from environment if possible
-if test ! -z "$LOGIN_PROGRAM" ; then
-	AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"],
-		[If your header files don't define LOGIN_PROGRAM,
-		then use this (detected) from environment and PATH])
+login_program=$LOGIN_PROGRAM
+# Allow override on command-line
+AC_ARG_WITH([login-program],
+	[  --with-login-program=path Specify login program name ],
+	[
+		if test "x$withval" != "xno" && \
+		   test "x$withval" != "xyes" ; then
+			login_program=$withval
+		fi
+	]
+)
+# If no login_program specified then find one using the path.
+if test ! -z "$login_program" ; then
+	AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$login_program"],
+		[login program to use if system headers lack LOGIN_PROGRAM])
 else
 	# Search for login
 	AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
 	if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
-		AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"])
+		AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK],
+				   ["$LOGIN_PROGRAM_FALLBACK"])
 	fi
 fi
 

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


More information about the openssh-commits mailing list