diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-15 14:36:53 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-15 14:36:53 +1100 |
commit | cedfecc99e73f9661d4dc3cea8c88e57c6e0b487 (patch) | |
tree | 3a960f8bfd9baddf7df1952f347129b095cc6fb9 | |
parent | d05a247953572b5aa9c28f48410cb3608dfc118f (diff) |
Further cleanup of askpass autoconf support, enable GNOME askpass option
only if askpass has first been enabled.
-rw-r--r-- | configure.in | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/configure.in b/configure.in index ace3aaaa3..d1dad1e48 100644 --- a/configure.in +++ b/configure.in | |||
@@ -57,10 +57,6 @@ AC_CHECK_LIB(pam, pam_authenticate, , ) | |||
57 | dnl Checks for header files. | 57 | dnl Checks for header files. |
58 | AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h) | 58 | AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h) |
59 | 59 | ||
60 | dnl Checks for library functions. | ||
61 | AC_PROG_GCC_TRADITIONAL | ||
62 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin) | ||
63 | |||
64 | dnl Check for ut_host field in utmp | 60 | dnl Check for ut_host field in utmp |
65 | AC_MSG_CHECKING([whether utmp.h has ut_host field]) | 61 | AC_MSG_CHECKING([whether utmp.h has ut_host field]) |
66 | AC_EGREP_HEADER(ut_host, utmp.h, | 62 | AC_EGREP_HEADER(ut_host, utmp.h, |
@@ -68,15 +64,54 @@ AC_EGREP_HEADER(ut_host, utmp.h, | |||
68 | [AC_MSG_RESULT(no)] | 64 | [AC_MSG_RESULT(no)] |
69 | ) | 65 | ) |
70 | 66 | ||
71 | dnl Check whether user wants GNOME ssh-askpass | 67 | dnl Checks for library functions. |
72 | AC_ARG_WITH(gnome-askpass, | 68 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin) |
73 | [ --with-gnome-askpass Build and use the GNOME passphrase requester], | 69 | |
74 | [GNOME_ASKPASS="gnome-ssh-askpass"]) | 70 | dnl Check whether use wants to disable the external ssh-askpass |
75 | AC_SUBST(GNOME_ASKPASS) | 71 | INSTALL_ASKPASS="yes" |
72 | AC_MSG_CHECKING([whether to enable external ssh-askpass support]) | ||
73 | AC_ARG_WITH(askpass, | ||
74 | [ --with-askpass=yes/no Enable external ssh-askpass support (default=no)], | ||
75 | [ | ||
76 | if test x$withval = xno ; then | ||
77 | INSTALL_ASKPASS="no" | ||
78 | else | ||
79 | INSTALL_ASKPASS="yes" | ||
80 | fi | ||
81 | ] | ||
82 | ) | ||
83 | if test "x$INSTALL_ASKPASS" = "xyes" ; then | ||
84 | AC_DEFINE(USE_EXTERNAL_ASKPASS) | ||
85 | AC_SUBST(INSTALL_ASKPASS) | ||
86 | AC_MSG_RESULT(yes) | ||
87 | else | ||
88 | AC_MSG_RESULT(no) | ||
89 | fi | ||
90 | |||
91 | if test "x$INSTALL_ASKPASS" = "xyes" ; then | ||
92 | AC_MSG_CHECKING([whether to build GNOME ssh-askpass]) | ||
93 | dnl Check whether user wants GNOME ssh-askpass | ||
94 | AC_ARG_WITH(gnome-askpass, | ||
95 | [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)], | ||
96 | [ | ||
97 | if test x$withval = xno ; then | ||
98 | GNOME_ASKPASS=""; | ||
99 | else | ||
100 | GNOME_ASKPASS="gnome-ssh-askpass"; | ||
101 | fi | ||
102 | ]) | ||
103 | AC_SUBST(GNOME_ASKPASS) | ||
104 | |||
105 | if test -z "$GNOME_ASKPASS" ; then | ||
106 | AC_MSG_RESULT(no) | ||
107 | else | ||
108 | AC_MSG_RESULT(yes) | ||
109 | fi | ||
110 | fi | ||
76 | 111 | ||
77 | dnl Check for user-specified random device | 112 | dnl Check for user-specified random device |
78 | AC_ARG_WITH(random, | 113 | AC_ARG_WITH(random, |
79 | [ --with-random=FILE read randomness from FILE (default /dev/urandom)], | 114 | [ --with-random=FILE read randomness from FILE (default=/dev/urandom)], |
80 | [ | 115 | [ |
81 | RANDOM_POOL="$withval"; | 116 | RANDOM_POOL="$withval"; |
82 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") | 117 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
@@ -95,7 +130,7 @@ AC_ARG_WITH(random, | |||
95 | 130 | ||
96 | dnl Check for EGD pool file | 131 | dnl Check for EGD pool file |
97 | AC_ARG_WITH(egd-pool, | 132 | AC_ARG_WITH(egd-pool, |
98 | [ --with-egd-pool=FILE read randomness from EGD pool FILE], | 133 | [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)], |
99 | [ | 134 | [ |
100 | RANDOM_POOL="$withval"; | 135 | RANDOM_POOL="$withval"; |
101 | AC_DEFINE(HAVE_EGD) | 136 | AC_DEFINE(HAVE_EGD) |
@@ -104,31 +139,9 @@ AC_ARG_WITH(egd-pool, | |||
104 | ] | 139 | ] |
105 | ) | 140 | ) |
106 | 141 | ||
142 | dnl Make sure we have random number support | ||
107 | if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then | 143 | if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then |
108 | AC_MSG_ERROR([No random device found, and no EGD random pool specified]) | 144 | AC_MSG_ERROR([No random device found, and no EGD random pool specified]) |
109 | fi | 145 | fi |
110 | 146 | ||
111 | dnl Check whether use wants to disable the external ssh-askpass | ||
112 | INSTALL_ASKPASS="yes" | ||
113 | AC_MSG_CHECKING([whether to enable external ssh-askpass support]) | ||
114 | AC_ARG_WITH(askpass, | ||
115 | [ --with-askpass=yes/no Enable external ssh-askpass support (default=yes)], | ||
116 | [ | ||
117 | if test x$withval = xno ; then | ||
118 | INSTALL_ASKPASS="no" | ||
119 | else | ||
120 | INSTALL_ASKPASS="yes" | ||
121 | fi | ||
122 | |||
123 | ] | ||
124 | ) | ||
125 | |||
126 | if test "x$INSTALL_ASKPASS" = "xyes" ; then | ||
127 | AC_DEFINE(USE_EXTERNAL_ASKPASS) | ||
128 | AC_SUBST(INSTALL_ASKPASS) | ||
129 | AC_MSG_RESULT(yes) | ||
130 | else | ||
131 | AC_MSG_RESULT(no) | ||
132 | fi | ||
133 | |||
134 | AC_OUTPUT(Makefile) | 147 | AC_OUTPUT(Makefile) |