summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-08-16 14:47:34 +1000
committerDamien Miller <djm@mindrot.org>2016-08-16 14:47:34 +1000
commita1cc637e7e11778eb727559634a6ef1c19c619f6 (patch)
tree671dff9d5026c58a01956c53032a1375a044ee55 /configure.ac
parent8bd81e1596ab1bab355146cb65e82fb96ade3b23 (diff)
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 17 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 1f1941a15..959826fe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,15 +80,27 @@ if test -z "$AR" ; then
80fi 80fi
81 81
82# Use LOGIN_PROGRAM from environment if possible 82# Use LOGIN_PROGRAM from environment if possible
83if test ! -z "$LOGIN_PROGRAM" ; then 83login_program=$LOGIN_PROGRAM
84 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"], 84# Allow override on command-line
85 [If your header files don't define LOGIN_PROGRAM, 85AC_ARG_WITH([login-program],
86 then use this (detected) from environment and PATH]) 86 [ --with-login-program=path Specify login program name ],
87 [
88 if test "x$withval" != "xno" && \
89 test "x$withval" != "xyes" ; then
90 login_program=$withval
91 fi
92 ]
93)
94# If no login_program specified then find one using the path.
95if test ! -z "$login_program" ; then
96 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$login_program"],
97 [login program to use if system headers lack LOGIN_PROGRAM])
87else 98else
88 # Search for login 99 # Search for login
89 AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login]) 100 AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
90 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then 101 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
91 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"]) 102 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK],
103 ["$LOGIN_PROGRAM_FALLBACK"])
92 fi 104 fi
93fi 105fi
94 106