diff options
-rw-r--r-- | configure.ac | 22 |
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 | |||
80 | fi | 80 | fi |
81 | 81 | ||
82 | # Use LOGIN_PROGRAM from environment if possible | 82 | # Use LOGIN_PROGRAM from environment if possible |
83 | if test ! -z "$LOGIN_PROGRAM" ; then | 83 | login_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, | 85 | AC_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. | ||
95 | if 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]) | ||
87 | else | 98 | else |
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 |
93 | fi | 105 | fi |
94 | 106 | ||