summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 35 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 3d5389cce..ab630115b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.153 2003/09/13 01:15:15 tim Exp $ 1# $Id: configure.ac,v 1.154 2003/09/16 01:52:19 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -250,6 +250,7 @@ mips-sony-bsd|mips-sony-newsos4)
250 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 250 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
251 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 251 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
252 AC_DEFINE(SSHD_ACQUIRES_CTTY) 252 AC_DEFINE(SSHD_ACQUIRES_CTTY)
253 external_path_file=/etc/default/login
253 # hardwire lastlog location (can't detect it on some versions) 254 # hardwire lastlog location (can't detect it on some versions)
254 conf_lastlog_location="/var/adm/lastlog" 255 conf_lastlog_location="/var/adm/lastlog"
255 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 256 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
@@ -286,6 +287,7 @@ mips-sony-bsd|mips-sony-newsos4)
286 AC_DEFINE(USE_PIPES) 287 AC_DEFINE(USE_PIPES)
287 AC_DEFINE(IP_TOS_IS_BROKEN) 288 AC_DEFINE(IP_TOS_IS_BROKEN)
288 AC_DEFINE(SSHD_ACQUIRES_CTTY) 289 AC_DEFINE(SSHD_ACQUIRES_CTTY)
290 external_path_file=/etc/default/login
289 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX 291 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
290 # Attention: always take care to bind libsocket and libnsl before libc, 292 # Attention: always take care to bind libsocket and libnsl before libc,
291 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog 293 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
@@ -2180,30 +2182,48 @@ else
2180 ) 2182 )
2181fi 2183fi
2182 2184
2185# check for /etc/default/login and use it if present.
2186AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
2187
2188if test "x$external_path_file" = "x/etc/default/login"; then
2189 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2190fi
2191
2183dnl BSD systems use /etc/login.conf so --with-default-path= has no effect 2192dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2184if test $ac_cv_func_login_getcapbool = "yes" -a \ 2193if test $ac_cv_func_login_getcapbool = "yes" -a \
2185 $ac_cv_header_login_cap_h = "yes" ; then 2194 $ac_cv_header_login_cap_h = "yes" ; then
2186 USES_LOGIN_CONF=yes 2195 external_path_file=/etc/login.conf
2187fi 2196fi
2197
2188# Whether to mess with the default path 2198# Whether to mess with the default path
2189SERVER_PATH_MSG="(default)" 2199SERVER_PATH_MSG="(default)"
2190AC_ARG_WITH(default-path, 2200AC_ARG_WITH(default-path,
2191 [ --with-default-path= Specify default \$PATH environment for server], 2201 [ --with-default-path= Specify default \$PATH environment for server],
2192 [ 2202 [
2193 if test "$USES_LOGIN_CONF" = "yes" ; then 2203 if test "x$external_path_file" = "x/etc/login.conf" ; then
2194 AC_MSG_WARN([ 2204 AC_MSG_WARN([
2195--with-default-path=PATH has no effect on this system. 2205--with-default-path=PATH has no effect on this system.
2196Edit /etc/login.conf instead.]) 2206Edit /etc/login.conf instead.])
2197 elif test "x$withval" != "xno" ; then 2207 elif test "x$withval" != "xno" ; then
2208 if ! test -z "$external_path_file" ; then
2209 AC_MSG_WARN([
2210--with-default-path=PATH will only be used if PATH is not defined in
2211$external_path_file .])
2212 fi
2198 user_path="$withval" 2213 user_path="$withval"
2199 SERVER_PATH_MSG="$withval" 2214 SERVER_PATH_MSG="$withval"
2200 fi 2215 fi
2201 ], 2216 ],
2202 [ if test "$USES_LOGIN_CONF" = "yes" ; then 2217 [ if test "x$external_path_file" = "x/etc/login.conf" ; then
2203 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) 2218 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2204 else 2219 else
2205 AC_TRY_RUN( 2220 if ! test -z "$external_path_file" ; then
2206 [ 2221 AC_MSG_WARN([
2222If PATH is defined in $external_path_file, ensure the path to scp is included,
2223otherwise scp will not work.])
2224 fi
2225 AC_TRY_RUN(
2226 [
2207/* find out what STDPATH is */ 2227/* find out what STDPATH is */
2208#include <stdio.h> 2228#include <stdio.h>
2209#ifdef HAVE_PATHS_H 2229#ifdef HAVE_PATHS_H
@@ -2257,7 +2277,7 @@ main()
2257 fi 2277 fi
2258 fi ] 2278 fi ]
2259) 2279)
2260if test "$USES_LOGIN_CONF" != "yes" ; then 2280if test "x$external_path_file" != "x/etc/login.conf" ; then
2261 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") 2281 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2262 AC_SUBST(user_path) 2282 AC_SUBST(user_path)
2263fi 2283fi
@@ -2627,10 +2647,15 @@ echo " Askpass program: $E"
2627echo " Manual pages: $F" 2647echo " Manual pages: $F"
2628echo " PID file: $G" 2648echo " PID file: $G"
2629echo " Privilege separation chroot path: $H" 2649echo " Privilege separation chroot path: $H"
2630if test "$USES_LOGIN_CONF" = "yes" ; then 2650if test "x$external_path_file" = "x/etc/login.conf" ; then
2631echo " At runtime, sshd will use the path defined in /etc/login.conf" 2651echo " At runtime, sshd will use the path defined in $external_path_file"
2652echo " Make sure the path to scp is present, otherwise scp will not work"
2632else 2653else
2633echo " sshd default user PATH: $I" 2654echo " sshd default user PATH: $I"
2655 if ! test -z "$external_path_file"; then
2656echo " (If PATH is set in $external_path_file it will be used instead. If"
2657echo " used, ensure the path to scp is present, otherwise scp will not work.)"
2658 fi
2634fi 2659fi
2635if test ! -z "$superuser_path" ; then 2660if test ! -z "$superuser_path" ; then
2636echo " sshd superuser user PATH: $J" 2661echo " sshd superuser user PATH: $J"