summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in77
1 files changed, 45 insertions, 32 deletions
diff --git a/configure.in b/configure.in
index 6fb5d63c6..274111e2c 100644
--- a/configure.in
+++ b/configure.in
@@ -56,6 +56,12 @@ case "$host" in
56*-*-solaris*) 56*-*-solaris*)
57 AC_DEFINE(USE_UTMPX) 57 AC_DEFINE(USE_UTMPX)
58 ;; 58 ;;
59*-*-irix5*)
60 AC_DEFINE(CRYPT_H_BREAKS_BUILD)
61# CFLAGS="$CFLAGS -shared"
62 no_libsocket=1
63 no_libnsl=1
64 ;;
59esac 65esac
60 66
61dnl Check for OpenSSL/SSLeay directories. 67dnl Check for OpenSSL/SSLeay directories.
@@ -81,7 +87,6 @@ if test "$ssldir" != "/usr"; then
81 CFLAGS="$CFLAGS -I$ssldir/include" 87 CFLAGS="$CFLAGS -I$ssldir/include"
82 LDFLAGS="$LDFLAGS -L$ssldir/lib" 88 LDFLAGS="$LDFLAGS -L$ssldir/lib"
83fi 89fi
84LIBS="$LIBS -lssl -lcrypto"
85AC_MSG_RESULT($ssldir) 90AC_MSG_RESULT($ssldir)
86 91
87dnl Check for RSAref library. 92dnl Check for RSAref library.
@@ -96,28 +101,20 @@ dnl Checks for libraries.
96AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***])) 101AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
97AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) 102AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
98AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") 103AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
99AC_CHECK_LIB(nsl, yp_match, , ) 104AC_CHECK_LIB(crypt, crypt, , )
100AC_CHECK_LIB(socket, main, , )
101 105
102dnl Use ip address instead of hostname in $DISPLAY 106if test -z "$no_libsocket" ; then
103AC_ARG_WITH(pam, 107 AC_CHECK_LIB(nsl, yp_match, , )
104 [ --without-pam Disable PAM support ], 108fi
105 [ 109if test -z "$no_libnsl" ; then
106 if test "x$withval" != "xno" ; then 110 AC_CHECK_LIB(socket, main, , )
107 no_pam=1
108 fi
109 ]
110)
111if test -z "$no_pam" ; then
112 AC_CHECK_LIB(dl, dlopen, , )
113 AC_CHECK_LIB(pam, pam_authenticate, , )
114fi 111fi
115 112
116dnl Checks for header files. 113dnl Checks for header files.
117AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h sys/bsdtty.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) 114AC_CHECK_HEADERS(bstring.h crypt.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h)
118 115
119dnl Checks for library functions. 116dnl Checks for library functions.
120AC_CHECK_FUNCS(arc4random getpagesize _getpty innetgr mkdtemp openpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf) 117AC_CHECK_FUNCS(arc4random getpagesize _getpty innetgr md5_crypt mkdtemp openpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf)
121 118
122AC_CHECK_FUNC(login, 119AC_CHECK_FUNC(login,
123 [AC_DEFINE(HAVE_LOGIN)], 120 [AC_DEFINE(HAVE_LOGIN)],
@@ -180,20 +177,34 @@ AC_TRY_COMPILE(
180 [AC_MSG_RESULT(no)] 177 [AC_MSG_RESULT(no)]
181) 178)
182 179
183dnl Check PAM strerror arguments 180AC_ARG_WITH(pam,
184AC_MSG_CHECKING([whether pam_strerror takes only one argument]) 181 [ --without-pam Disable PAM support ],
185AC_TRY_COMPILE(
186 [
187 #include <stdlib.h>
188 #include <security/pam_appl.h>
189 ],
190 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
191 [AC_MSG_RESULT(no)],
192 [ 182 [
193 AC_DEFINE(HAVE_OLD_PAM) 183 if test "x$withval" = "xno" ; then
194 AC_MSG_RESULT(yes) 184 no_pam=1
185 AC_DEFINE(DISABLE_PAM)
186 fi
195 ] 187 ]
196) 188)
189
190if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then
191 AC_CHECK_LIB(dl, dlopen, , )
192 LIBS="$LIBS -lpam"
193 dnl Check PAM strerror arguments
194 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
195 AC_TRY_COMPILE(
196 [
197 #include <stdlib.h>
198 #include <security/pam_appl.h>
199 ],
200 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
201 [AC_MSG_RESULT(no)],
202 [
203 AC_DEFINE(HAVE_OLD_PAM)
204 AC_MSG_RESULT(yes)
205 ]
206 )
207fi
197 208
198AC_MSG_CHECKING([whether to build GNOME ssh-askpass]) 209AC_MSG_CHECKING([whether to build GNOME ssh-askpass])
199dnl Check whether user wants GNOME ssh-askpass 210dnl Check whether user wants GNOME ssh-askpass
@@ -303,16 +314,18 @@ AC_ARG_WITH(lastlog,
303 fi 314 fi
304 done 315 done
305 if test -z "$gotlastlog" ; then 316 if test -z "$gotlastlog" ; then
306 AC_MSG_WARN([*** Cannot find lastlog ***]) 317 AC_MSG_RESULT(not found)
307 nolastlog=1 318 nolastlog=1
308 else 319 else
309 if test "x$gotlastlog" = "xdir" ; then 320 if test "x$gotlastlog" = "xdir" ; then
321 AC_MSG_RESULT(${lastlog}/)
310 AC_DEFINE(LASTLOG_IS_DIR) 322 AC_DEFINE(LASTLOG_IS_DIR)
311 AC_MSG_WARN([*** Directory-based lastlogs are not yet supported ***]) 323 AC_MSG_WARN([*** Directory-based lastlogs are not yet supported ***])
312 nolastlog=1 324 nolastlog=1
325 else
326 AC_MSG_RESULT($lastlog)
327 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
313 fi 328 fi
314 AC_MSG_RESULT($lastlog)
315 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
316 fi 329 fi
317 ] 330 ]
318) 331)