summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-21 11:18:08 +1100
committerDamien Miller <djm@mindrot.org>1999-12-21 11:18:08 +1100
commit76112de73437ac3db04b45d4b7a9d1f1b74f83fd (patch)
treecbfb21a6bd6acc7c3a478b5c186ee49e0b0f9fbb /configure.in
parent368cf64d5c7cee6eb85d9240ea04ccf43273b5fc (diff)
- Integration of large HPUX patch from Andre Lucas
<andre.lucas@dial.pipex.com>. Integrating it had a few other benefits: - Ability to disable shadow passwords at configure time - Ability to disable lastlog support at configure time - Support for IP address in $DISPLAY
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in125
1 files changed, 98 insertions, 27 deletions
diff --git a/configure.in b/configure.in
index 86d6a3241..b5ffee79e 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,7 @@
1AC_INIT(ssh.c) 1AC_INIT(ssh.c)
2 2
3AC_CONFIG_HEADER(config.h) 3AC_CONFIG_HEADER(config.h)
4AC_CANONICAL_HOST
4 5
5dnl Checks for programs. 6dnl Checks for programs.
6AC_PROG_CC 7AC_PROG_CC
@@ -9,10 +10,35 @@ AC_PROG_RANLIB
9AC_PROG_INSTALL 10AC_PROG_INSTALL
10AC_CHECK_PROG(AR, ar, ar) 11AC_CHECK_PROG(AR, ar, ar)
11 12
13dnl Check for the path to xauth
14AC_PATH_PROG(xauth_path, xauth)
15AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
16
12dnl Checks for compiler characteristics 17dnl Checks for compiler characteristics
13if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi 18if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
19
14AC_C_INLINE 20AC_C_INLINE
15 21
22dnl Check for some target-specific stuff
23case "$host" in
24*-*-hpux10*)
25 if test -z "$GCC"; then
26 CFLAGS="$CFLAGS -Aa"
27 fi
28 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
29 AC_DEFINE(IPADDR_IN_DISPLAY)
30 AC_MSG_CHECKING(for HPUX trusted system password database)
31 if test -f /tcb/files/auth/system/default; then
32 AC_MSG_RESULT(yes)
33 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
34 LIBS="$LIBS -lsec"
35 else
36 AC_MSG_RESULT(no)
37 AC_DEFINE(DISABLE_SHADOW)
38 fi
39 ;;
40esac
41
16dnl Check for OpenSSL/SSLeay directories. 42dnl Check for OpenSSL/SSLeay directories.
17AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) 43AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
18for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do 44for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
@@ -59,10 +85,10 @@ AC_CHECK_LIB(dl, dlopen, , )
59AC_CHECK_LIB(pam, pam_authenticate, , ) 85AC_CHECK_LIB(pam, pam_authenticate, , )
60 86
61dnl Checks for header files. 87dnl Checks for header files.
62AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h util.h utmp.h utmpx.h sys/poll.h sys/select.h sys/stropts.h sys/time.h) 88AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow_h util.h utmp.h utmpx.h sys/bsdtty.h sys/poll.h sys/select.h sys/stropts.h sys/time.h)
63 89
64dnl Checks for library functions. 90dnl Checks for library functions.
65AC_CHECK_FUNCS(arc4random mkdtemp openpty _getpty setenv setlogin setproctitle snprintf strlcat strlcpy vsnprintf) 91AC_CHECK_FUNCS(arc4random mkdtemp openpty _getpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf)
66 92
67AC_CHECK_FUNC(login, 93AC_CHECK_FUNC(login,
68 [AC_DEFINE(HAVE_LOGIN)], 94 [AC_DEFINE(HAVE_LOGIN)],
@@ -209,27 +235,46 @@ AC_EGREP_HEADER(ut_host, utmpx.h,
209) 235)
210 236
211dnl Look for lastlog location 237dnl Look for lastlog location
212AC_MSG_CHECKING([location of lastlog file]) 238AC_ARG_WITH(lastlog,
213for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do 239 [ --with-lastlog Location of lastlog file],
214 if test -f $lastlog ; then 240 [
215 gotlastlog="file" 241 if test "x$withval" = "xno" ; then
216 break 242 AC_DEFINE(DISABLE_LASTLOG)
217 fi 243 else
218 if test -d $lastlog ; then 244 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$withval")
219 gotlastlog="dir" 245 fi
220 break 246 ],
221 fi 247 [
222done 248 AC_MSG_CHECKING([location of lastlog file])
223if test -z "$gotlastlog" ; then 249 for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do
224 AC_MSG_ERROR([*** Cannot find lastlog ***]) 250 if test -f $lastlog ; then
225else 251 gotlastlog="file"
226 if test "x$gotlastlog" = "xdir" ; then 252 break
227 AC_DEFINE(LASTLOG_IS_DIR) 253 fi
228 AC_MSG_ERROR([*** Directory-based lastlogs are not yet supported ***]) 254 if test -d $lastlog ; then
229 fi 255 gotlastlog="dir"
230 AC_MSG_RESULT($lastlog) 256 break
231 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog") 257 fi
232fi 258 done
259 if test -z "$gotlastlog" ; then
260 AC_MSG_WARN([*** Cannot find lastlog ***])
261 nolastlog=1
262 else
263 if test "x$gotlastlog" = "xdir" ; then
264 AC_DEFINE(LASTLOG_IS_DIR)
265 AC_MSG_WARN([*** Directory-based lastlogs are not yet supported ***])
266 nolastlog=1
267 fi
268 AC_MSG_RESULT($lastlog)
269 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
270 fi
271 ]
272)
273
274if test ! -z "$nolastlog" ; then
275 AC_MSG_WARN([*** Disabling lastlog support *** ])
276 AC_DEFINE(DISABLE_LASTLOG)
277fi
233 278
234AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) 279AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX))
235AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) 280AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC))
@@ -293,11 +338,37 @@ AC_ARG_WITH(md5-passwords,
293dnl Check whether to enable utmpx support 338dnl Check whether to enable utmpx support
294AC_ARG_WITH(utmpx, 339AC_ARG_WITH(utmpx,
295 [ --with-utmpx Enable utmpx support], 340 [ --with-utmpx Enable utmpx support],
296 [AC_DEFINE(USE_UTMPX)] 341 [
342 if test "x$withval" != "xno" ; then
343 AC_DEFINE(USE_UTMPX)
344 fi
345 ]
297) 346)
298 347
299dnl Check for the path to xauth 348dnl Whether to disable shadow password support
300AC_PATH_PROG(xauth_path, xauth) 349AC_ARG_WITH(shadow,
301AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") 350 [ --without-shadow Disable shadow password support],
351 [
352 if test "x$withval" = "xno" ; then
353 AC_DEFINE(DISABLE_SHADOW)
354 fi
355 ]
356)
357
358dnl Use ip address instead of hostname in $DISPLAY
359AC_ARG_WITH(ipaddr-display,
360 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
361 [
362 if test "x$withval" = "xno" ; then
363 AC_DEFINE(IPADDR_IN_DISPLAY)
364 fi
365 ]
366)
367
368dnl Check for mail directory (last resort if we cannot get it from headers)
369if test ! -z "$MAIL" ; then
370 maildir=`dirname $MAIL`
371 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
372fi
302 373
303AC_OUTPUT(Makefile) 374AC_OUTPUT(Makefile)