mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-27 12:22:09 +00:00
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.
This commit is contained in:
parent
8bd81e1596
commit
a1cc637e7e
22
configure.ac
22
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user