3 AC_CONFIG_HEADER(config.h)
5 dnl Checks for programs.
9 AC_CHECK_PROG(AR, ar, ar)
10 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
12 dnl Check for OpenSSL/SSLeay directories.
13 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
14 for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
15 if test -f "$ssldir/include/openssl/crypto.h"; then
16 AC_DEFINE(HAVE_OPENSSL)
20 if test -f "$ssldir/include/ssl/crypto.h"; then
26 if test -z "$GOT_SSL" ; then
27 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
30 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
31 if test "$ssldir" != "/usr"; then
32 CFLAGS="$CFLAGS -I$ssldir/include"
33 LIBS="$LIBS -L$ssldir/lib"
35 LIBS="$LIBS -lssl -lcrypto"
36 AC_MSG_RESULT($ssldir)
38 dnl Check for RSAref library.
39 AC_MSG_CHECKING([for RSAref library])
41 LIBS="$saved_LIBS -lRSAglue -lrsaref"
43 [AC_MSG_RESULT(yes); ],
44 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
46 dnl Checks for libraries.
47 AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
48 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
49 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
50 AC_CHECK_LIB(nsl, yp_match, , )
51 AC_CHECK_LIB(socket, main, , )
53 dnl libdl is needed by PAM on Redhat systems
54 AC_CHECK_LIB(dl, dlopen, , )
55 AC_CHECK_LIB(pam, pam_authenticate, , )
57 dnl Checks for header files.
58 AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h netgroup.h maillock.h sys/select.h)
60 dnl Checks for library functions.
61 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
64 [AC_DEFINE(HAVE_LOGIN)],
65 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
69 [AC_DEFINE(HAVE_DAEMON)],
70 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
73 dnl Check whether use wants to disable the external ssh-askpass
75 AC_MSG_CHECKING([whether to enable external ssh-askpass support])
77 [ --with-askpass=yes/no Enable external ssh-askpass support (default=yes)],
79 if test x$withval = xno ; then
86 if test "x$INSTALL_ASKPASS" = "xyes" ; then
87 AC_DEFINE(USE_EXTERNAL_ASKPASS)
88 AC_SUBST(INSTALL_ASKPASS)
94 if test "x$INSTALL_ASKPASS" = "xyes" ; then
95 AC_MSG_CHECKING([whether to build GNOME ssh-askpass])
96 dnl Check whether user wants GNOME ssh-askpass
97 AC_ARG_WITH(gnome-askpass,
98 [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)],
100 if test x$withval = xno ; then
103 GNOME_ASKPASS="gnome-ssh-askpass";
106 AC_SUBST(GNOME_ASKPASS)
108 if test -z "$GNOME_ASKPASS" ; then
115 dnl Check for user-specified random device
117 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
119 RANDOM_POOL="$withval";
120 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
123 dnl Check for random device
124 AC_CHECK_FILE("/dev/urandom",
126 RANDOM_POOL="/dev/urandom";
127 AC_SUBST(RANDOM_POOL)
128 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
134 dnl Check for EGD pool file
135 AC_ARG_WITH(egd-pool,
136 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
138 RANDOM_POOL="$withval";
140 AC_SUBST(RANDOM_POOL)
141 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
145 dnl Make sure we have random number support
146 if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
147 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
150 dnl Check for ut_host field in utmp
151 AC_MSG_CHECKING([whether utmp.h has ut_host field])
152 AC_EGREP_HEADER(ut_host, utmp.h,
153 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
157 dnl Look for lastlog location
158 AC_MSG_CHECKING([location of lastlog file])
159 for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do
160 if test -f $lastlog ; then
161 AC_MSG_RESULT($lastlog)
162 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
167 AC_MSG_CHECKING([whether libc defines __progname])
169 [extern char *__progname; printf("%s", __progname);],
171 AC_DEFINE(HAVE___PROGNAME)
179 dnl Check whether user wants Kerberos support
180 AC_ARG_WITH(kerberos4,
181 [ --with-kerberos4 Enable Kerberos 4 support],
185 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
189 dnl Check whether user wants AFS support
190 AC_ARG_WITH(kerberos4,
191 [ --with-afs Enable AFS support],
198 dnl Check whether user wants S/Key support
200 [ --with-skey Enable S/Key support],
207 dnl Check whether user wants TCP wrappers support
209 [ --with-tcp-wrappers Enable tcpwrappers support],
216 dnl Check whether to enable MD5 passwords
217 AC_ARG_WITH(md5passwords,
218 [ --with-md5-passwords Enable use of MD5 passwords],
219 [AC_DEFINE(HAVE_MD5_PASSWORDS)]