]> andersk Git - openssh.git/blame - configure.in
- Added shadow password patch from Thomas Neumann <tom@smart.ruhr.de>
[openssh.git] / configure.in
CommitLineData
4cca272e 1AC_INIT(ssh.c)
5881cd60 2
3AC_CONFIG_HEADER(config.h)
4
5dnl Checks for programs.
6AC_PROG_CC
4cca272e 7AC_PROG_CPP
5881cd60 8AC_PROG_RANLIB
d4f11b59 9AC_CHECK_PROG(AR, ar, ar)
10if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
5881cd60 11
d4f11b59 12dnl Check for OpenSSL/SSLeay directories.
13AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
4cca272e 14for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
6614282f 15 if test -f "$ssldir/include/openssl/crypto.h"; then
16 AC_DEFINE(HAVE_OPENSSL)
17 GOT_SSL="yes"
18 break
19 fi
20 if test -f "$ssldir/include/ssl/crypto.h"; then
21 AC_DEFINE(HAVE_SSL)
22 GOT_SSL="yes"
23 break
24 fi
d4f11b59 25done
6614282f 26if test -z "$GOT_SSL" ; then
27 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
28fi
d4f11b59 29AC_SUBST(ssldir)
30AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
31if test "$ssldir" != "/usr"; then
32 CFLAGS="$CFLAGS -I$ssldir/include"
33 LIBS="$LIBS -L$ssldir/lib"
34fi
35LIBS="$LIBS -lssl -lcrypto"
6614282f 36AC_MSG_RESULT($ssldir)
5881cd60 37
d4f11b59 38dnl Check for RSAref library.
39AC_MSG_CHECKING([for RSAref library])
40saved_LIBS="$LIBS"
41LIBS="$saved_LIBS -lRSAglue -lrsaref"
42AC_TRY_LINK([], [],
43[AC_MSG_RESULT(yes); ],
44[AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
5881cd60 45
4cca272e 46dnl Checks for libraries.
47AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
48AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
49AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
50AC_CHECK_LIB(nsl, yp_match, , )
51AC_CHECK_LIB(socket, main, , )
52
53dnl libdl is needed by PAM on Redhat systems
54AC_CHECK_LIB(dl, dlopen, , )
55AC_CHECK_LIB(pam, pam_authenticate, , )
56
5881cd60 57dnl Checks for header files.
b2344d54 58AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h)
5881cd60 59
5881cd60 60dnl Checks for library functions.
61AC_PROG_GCC_TRADITIONAL
e35c1dc2 62AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
5881cd60 63
4cca272e 64dnl Check for ut_host field in utmp
65AC_MSG_CHECKING([whether utmp.h has ut_host field])
66AC_EGREP_HEADER(ut_host, utmp.h,
67 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
68 [AC_MSG_RESULT(no)]
69)
70
6a0aeebc 71dnl Check whether user wants GNOME ssh-askpass
72AC_ARG_WITH(gnome-askpass,
73 [ --with-gnome-askpass Build and use the GNOME passphrase requester],
74 [GNOME_ASKPASS="gnome-ssh-askpass"])
75AC_SUBST(GNOME_ASKPASS)
76
4cca272e 77dnl Check for user-specified random device
78AC_ARG_WITH(random,
79 [ --with-random=FILE read randomness from FILE (default /dev/urandom)],
80 [
81 RANDOM_POOL="$withval";
82 AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL")
83 ],
84 [
85 dnl Check for random device
86 AC_CHECK_FILE("/dev/urandom",
87 [
88 RANDOM_POOL="/dev/urandom";
6614282f 89 AC_SUBST(RANDOM_POOL)
90 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
4cca272e 91 ]
92 )
93 ]
94)
95
96dnl Check for EGD pool file
97AC_ARG_WITH(egd-pool,
98 [ --with-egd-pool=FILE read randomness from EGD pool FILE],
99 [
100 RANDOM_POOL="$withval";
101 AC_DEFINE(HAVE_EGD)
6614282f 102 AC_SUBST(RANDOM_POOL)
103 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
4cca272e 104 ]
105)
106
107if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
108 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
109fi
110
045672f9 111dnl Check whether use wants to disable the external ssh-askpass
112AC_ARG_WITH(askpass,
113 [ --without-askpass Disable external ssh-askpass support],
8c16448c 114 [AC_DEFINE(DISABLE_EXTERNAL_ASKPASS)],
115 [INSTALL_ASKPASS="yes"]
045672f9 116)
8c16448c 117AC_SUBST(INSTALL_ASKPASS)
045672f9 118
5881cd60 119AC_OUTPUT(Makefile)
This page took 0.06933 seconds and 5 git commands to generate.