summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-15 14:36:53 +1100
committerDamien Miller <djm@mindrot.org>1999-11-15 14:36:53 +1100
commitcedfecc99e73f9661d4dc3cea8c88e57c6e0b487 (patch)
tree3a960f8bfd9baddf7df1952f347129b095cc6fb9
parentd05a247953572b5aa9c28f48410cb3608dfc118f (diff)
Further cleanup of askpass autoconf support, enable GNOME askpass option
only if askpass has first been enabled.
-rw-r--r--configure.in81
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, , )
57dnl Checks for header files. 57dnl Checks for header files.
58AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h) 58AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h)
59 59
60dnl Checks for library functions.
61AC_PROG_GCC_TRADITIONAL
62AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
63
64dnl Check for ut_host field in utmp 60dnl Check for ut_host field in utmp
65AC_MSG_CHECKING([whether utmp.h has ut_host field]) 61AC_MSG_CHECKING([whether utmp.h has ut_host field])
66AC_EGREP_HEADER(ut_host, utmp.h, 62AC_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
71dnl Check whether user wants GNOME ssh-askpass 67dnl Checks for library functions.
72AC_ARG_WITH(gnome-askpass, 68AC_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"]) 70dnl Check whether use wants to disable the external ssh-askpass
75AC_SUBST(GNOME_ASKPASS) 71INSTALL_ASKPASS="yes"
72AC_MSG_CHECKING([whether to enable external ssh-askpass support])
73AC_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)
83if test "x$INSTALL_ASKPASS" = "xyes" ; then
84 AC_DEFINE(USE_EXTERNAL_ASKPASS)
85 AC_SUBST(INSTALL_ASKPASS)
86 AC_MSG_RESULT(yes)
87else
88 AC_MSG_RESULT(no)
89fi
90
91if 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
110fi
76 111
77dnl Check for user-specified random device 112dnl Check for user-specified random device
78AC_ARG_WITH(random, 113AC_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
96dnl Check for EGD pool file 131dnl Check for EGD pool file
97AC_ARG_WITH(egd-pool, 132AC_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
142dnl Make sure we have random number support
107if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then 143if 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])
109fi 145fi
110 146
111dnl Check whether use wants to disable the external ssh-askpass
112INSTALL_ASKPASS="yes"
113AC_MSG_CHECKING([whether to enable external ssh-askpass support])
114AC_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
126if test "x$INSTALL_ASKPASS" = "xyes" ; then
127 AC_DEFINE(USE_EXTERNAL_ASKPASS)
128 AC_SUBST(INSTALL_ASKPASS)
129 AC_MSG_RESULT(yes)
130else
131 AC_MSG_RESULT(no)
132fi
133
134AC_OUTPUT(Makefile) 147AC_OUTPUT(Makefile)