summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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