summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac121
1 files changed, 87 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 5fe50e56b..48a98d319 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.89 2002/09/26 00:38:47 tim Exp $ 1# $Id: configure.ac,v 1.111.2.2 2003/03/21 01:15:18 mouring Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -14,6 +14,7 @@ AC_PROG_RANLIB
14AC_PROG_INSTALL 14AC_PROG_INSTALL
15AC_PATH_PROG(AR, ar) 15AC_PATH_PROG(AR, ar)
16AC_PATH_PROGS(PERL, perl5 perl) 16AC_PATH_PROGS(PERL, perl5 perl)
17AC_PATH_PROG(SED, sed)
17AC_SUBST(PERL) 18AC_SUBST(PERL)
18AC_PATH_PROG(ENT, ent) 19AC_PATH_PROG(ENT, ent)
19AC_SUBST(ENT) 20AC_SUBST(ENT)
@@ -81,8 +82,11 @@ case "$host" in
81 dnl AIX handles lastlog as part of its login message 82 dnl AIX handles lastlog as part of its login message
82 AC_DEFINE(DISABLE_LASTLOG) 83 AC_DEFINE(DISABLE_LASTLOG)
83 AC_DEFINE(LOGIN_NEEDS_UTMPX) 84 AC_DEFINE(LOGIN_NEEDS_UTMPX)
85 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
86 AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
84 ;; 87 ;;
85*-*-cygwin*) 88*-*-cygwin*)
89 check_for_libcrypt_later=1
86 LIBS="$LIBS /usr/lib/textmode.o" 90 LIBS="$LIBS /usr/lib/textmode.o"
87 AC_DEFINE(HAVE_CYGWIN) 91 AC_DEFINE(HAVE_CYGWIN)
88 AC_DEFINE(USE_PIPES) 92 AC_DEFINE(USE_PIPES)
@@ -121,7 +125,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
121 AC_DEFINE(LOGIN_NEEDS_UTMPX) 125 AC_DEFINE(LOGIN_NEEDS_UTMPX)
122 AC_DEFINE(DISABLE_SHADOW) 126 AC_DEFINE(DISABLE_SHADOW)
123 AC_DEFINE(DISABLE_UTMP) 127 AC_DEFINE(DISABLE_UTMP)
124 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 128 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
125 LIBS="$LIBS -lsec -lsecpw" 129 LIBS="$LIBS -lsec -lsecpw"
126 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 130 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
127 disable_ptmx_check=yes 131 disable_ptmx_check=yes
@@ -137,7 +141,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
137 AC_DEFINE(LOGIN_NEEDS_UTMPX) 141 AC_DEFINE(LOGIN_NEEDS_UTMPX)
138 AC_DEFINE(DISABLE_SHADOW) 142 AC_DEFINE(DISABLE_SHADOW)
139 AC_DEFINE(DISABLE_UTMP) 143 AC_DEFINE(DISABLE_UTMP)
140 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 144 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
141 LIBS="$LIBS -lsec" 145 LIBS="$LIBS -lsec"
142 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 146 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
143 ;; 147 ;;
@@ -150,7 +154,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
150 AC_DEFINE(LOGIN_NEEDS_UTMPX) 154 AC_DEFINE(LOGIN_NEEDS_UTMPX)
151 AC_DEFINE(DISABLE_SHADOW) 155 AC_DEFINE(DISABLE_SHADOW)
152 AC_DEFINE(DISABLE_UTMP) 156 AC_DEFINE(DISABLE_UTMP)
153 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 157 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
154 LIBS="$LIBS -lsec" 158 LIBS="$LIBS -lsec"
155 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 159 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
156 ;; 160 ;;
@@ -177,6 +181,8 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
177 check_for_libcrypt_later=1 181 check_for_libcrypt_later=1
178 AC_DEFINE(DONT_TRY_OTHER_AF) 182 AC_DEFINE(DONT_TRY_OTHER_AF)
179 AC_DEFINE(PAM_TTY_KLUDGE) 183 AC_DEFINE(PAM_TTY_KLUDGE)
184 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
185 AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
180 inet6_default_4in6=yes 186 inet6_default_4in6=yes
181 ;; 187 ;;
182mips-sony-bsd|mips-sony-newsos4) 188mips-sony-bsd|mips-sony-newsos4)
@@ -210,6 +216,7 @@ mips-sony-bsd|mips-sony-newsos4)
210 AC_DEFINE(LOGIN_NEEDS_UTMPX) 216 AC_DEFINE(LOGIN_NEEDS_UTMPX)
211 AC_DEFINE(LOGIN_NEEDS_TERM) 217 AC_DEFINE(LOGIN_NEEDS_TERM)
212 AC_DEFINE(PAM_TTY_KLUDGE) 218 AC_DEFINE(PAM_TTY_KLUDGE)
219 AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY)
213 # hardwire lastlog location (can't detect it on some versions) 220 # hardwire lastlog location (can't detect it on some versions)
214 conf_lastlog_location="/var/adm/lastlog" 221 conf_lastlog_location="/var/adm/lastlog"
215 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 222 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
@@ -278,6 +285,9 @@ mips-sony-bsd|mips-sony-newsos4)
278 do_sco3_extra_lib_check=yes 285 do_sco3_extra_lib_check=yes
279 ;; 286 ;;
280*-*-sco3.2v5*) 287*-*-sco3.2v5*)
288 if test -z "$GCC"; then
289 CFLAGS="$CFLAGS -belf"
290 fi
281 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 291 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
282 LDFLAGS="$LDFLAGS -L/usr/local/lib" 292 LDFLAGS="$LDFLAGS -L/usr/local/lib"
283 LIBS="$LIBS -lprot -lx -ltinfo -lm" 293 LIBS="$LIBS -lprot -lx -ltinfo -lm"
@@ -290,8 +300,6 @@ mips-sony-bsd|mips-sony-newsos4)
290 MANTYPE=man 300 MANTYPE=man
291 ;; 301 ;;
292*-*-unicosmk*) 302*-*-unicosmk*)
293 no_libsocket=1
294 no_libnsl=1
295 AC_DEFINE(USE_PIPES) 303 AC_DEFINE(USE_PIPES)
296 AC_DEFINE(DISABLE_FD_PASSING) 304 AC_DEFINE(DISABLE_FD_PASSING)
297 LDFLAGS="$LDFLAGS" 305 LDFLAGS="$LDFLAGS"
@@ -299,8 +307,6 @@ mips-sony-bsd|mips-sony-newsos4)
299 MANTYPE=cat 307 MANTYPE=cat
300 ;; 308 ;;
301*-*-unicos*) 309*-*-unicos*)
302 no_libsocket=1
303 no_libnsl=1
304 AC_DEFINE(USE_PIPES) 310 AC_DEFINE(USE_PIPES)
305 AC_DEFINE(DISABLE_FD_PASSING) 311 AC_DEFINE(DISABLE_FD_PASSING)
306 AC_DEFINE(NO_SSH_LASTLOG) 312 AC_DEFINE(NO_SSH_LASTLOG)
@@ -325,11 +331,13 @@ mips-sony-bsd|mips-sony-newsos4)
325 AC_MSG_RESULT(yes) 331 AC_MSG_RESULT(yes)
326 AC_DEFINE(HAVE_OSF_SIA) 332 AC_DEFINE(HAVE_OSF_SIA)
327 AC_DEFINE(DISABLE_LOGIN) 333 AC_DEFINE(DISABLE_LOGIN)
334 AC_DEFINE(DISABLE_FD_PASSING)
328 LIBS="$LIBS -lsecurity -ldb -lm -laud" 335 LIBS="$LIBS -lsecurity -ldb -lm -laud"
329 else 336 else
330 AC_MSG_RESULT(no) 337 AC_MSG_RESULT(no)
331 fi 338 fi
332 fi 339 fi
340 AC_DEFINE(DISABLE_FD_PASSING)
333 ;; 341 ;;
334 342
335*-*-nto-qnx) 343*-*-nto-qnx)
@@ -377,13 +385,13 @@ AC_ARG_WITH(libs,
377 385
378# Checks for header files. 386# Checks for header files.
379AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \ 387AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
380 getopt.h glob.h ia.h lastlog.h limits.h login.h \ 388 getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
381 login_cap.h maillock.h netdb.h netgroup.h \ 389 login_cap.h maillock.h netdb.h netgroup.h \
382 netinet/in_systm.h paths.h pty.h readpassphrase.h \ 390 netinet/in_systm.h paths.h pty.h readpassphrase.h \
383 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ 391 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
384 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \ 392 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
385 sys/mman.h sys/select.h sys/stat.h \ 393 sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
386 sys/stropts.h sys/sysmacros.h sys/time.h \ 394 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
387 sys/un.h time.h tmpdir.h ttyent.h usersec.h \ 395 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
388 util.h utime.h utmp.h utmpx.h) 396 util.h utime.h utmp.h utmpx.h)
389 397
@@ -594,18 +602,25 @@ AC_ARG_WITH(tcp-wrappers,
594 ] 602 ]
595) 603)
596 604
597dnl Checks for library functions. 605dnl Checks for library functions. Please keep in alphabetical order
598AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \ 606AC_CHECK_FUNCS(\
599 clock fchmod fchown freeaddrinfo futimes gai_strerror \ 607 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
600 getaddrinfo getcwd getgrouplist getnameinfo getopt getpeereid\ 608 bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
601 getrlimit getrusage getttyent glob inet_aton inet_ntoa \ 609 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
602 inet_ntop innetgr login_getcapbool md5_crypt memmove \ 610 getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
603 mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \ 611 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
604 realpath recvmsg rresvport_af sendmsg setdtablesize setegid \ 612 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \
605 setenv seteuid setgroups setlogin setproctitle setresgid setreuid \ 613 readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \
606 setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \ 614 setegid setenv seteuid setgroups setlogin setpcred setproctitle \
607 socketpair strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp \ 615 setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \
608 truncate utimes vhangup vsnprintf waitpid __b64_ntop _getpty) 616 snprintf socketpair strerror strlcat strlcpy strmode strnvis \
617 sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
618)
619
620AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
621
622dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
623AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
609 624
610dnl IRIX and Solaris 2.5.1 have dirname() in libgen 625dnl IRIX and Solaris 2.5.1 have dirname() in libgen
611AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ 626AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
@@ -680,6 +695,32 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
680 ) 695 )
681fi 696fi
682 697
698dnl see whether mkstemp() requires XXXXXX
699if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
700AC_MSG_CHECKING([for (overly) strict mkstemp])
701AC_TRY_RUN(
702 [
703#include <stdlib.h>
704main() { char template[]="conftest.mkstemp-test";
705if (mkstemp(template) == -1)
706 exit(1);
707unlink(template); exit(0);
708}
709 ],
710 [
711 AC_MSG_RESULT(no)
712 ],
713 [
714 AC_MSG_RESULT(yes)
715 AC_DEFINE(HAVE_STRICT_MKSTEMP)
716 ],
717 [
718 AC_MSG_RESULT(yes)
719 AC_DEFINE(HAVE_STRICT_MKSTEMP)
720 ]
721)
722fi
723
683AC_FUNC_GETPGRP 724AC_FUNC_GETPGRP
684 725
685# Check for PAM libs 726# Check for PAM libs
@@ -1443,12 +1484,16 @@ if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1443 have_struct_timeval=1 1484 have_struct_timeval=1
1444fi 1485fi
1445 1486
1446# If we don't have int64_t then we can't compile sftp-server. So don't 1487AC_CHECK_TYPES(struct timespec)
1447# even attempt to do it. 1488
1489# We need int64_t or else certian parts of the compile will fail.
1448if test "x$ac_cv_have_int64_t" = "xno" -a \ 1490if test "x$ac_cv_have_int64_t" = "xno" -a \
1449 "x$ac_cv_sizeof_long_int" != "x8" -a \ 1491 "x$ac_cv_sizeof_long_int" != "x8" -a \
1450 "x$ac_cv_sizeof_long_long_int" = "x0" ; then 1492 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1451 NO_SFTP='#' 1493 echo "OpenSSH requires int64_t support. Contact your vendor or install"
1494 echo "an alternative compiler (I.E., GCC) before continuing."
1495 echo ""
1496 exit 1;
1452else 1497else
1453dnl test snprintf (broken on SCO w/gcc) 1498dnl test snprintf (broken on SCO w/gcc)
1454 AC_TRY_RUN( 1499 AC_TRY_RUN(
@@ -1478,7 +1523,6 @@ main() { exit(0); }
1478 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ] 1523 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1479 ) 1524 )
1480fi 1525fi
1481AC_SUBST(NO_SFTP)
1482 1526
1483dnl Checks for structure members 1527dnl Checks for structure members
1484OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) 1528OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
@@ -1906,6 +1950,17 @@ AC_ARG_WITH(xauth,
1906 ] 1950 ]
1907) 1951)
1908 1952
1953STRIP_OPT=-s
1954AC_ARG_ENABLE(strip,
1955 [ --disable-strip Disable calling strip(1) on install],
1956 [
1957 if test "x$enableval" = "xno" ; then
1958 STRIP_OPT=
1959 fi
1960 ]
1961)
1962AC_SUBST(STRIP_OPT)
1963
1909if test -z "$xauth_path" ; then 1964if test -z "$xauth_path" ; then
1910 XAUTH_PATH="undefined" 1965 XAUTH_PATH="undefined"
1911 AC_SUBST(XAUTH_PATH) 1966 AC_SUBST(XAUTH_PATH)
@@ -2060,7 +2115,11 @@ Edit /etc/login.conf instead.])
2060# include <paths.h> 2115# include <paths.h>
2061#endif 2116#endif
2062#ifndef _PATH_STDPATH 2117#ifndef _PATH_STDPATH
2063# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" 2118# ifdef _PATH_USERPATH /* Irix */
2119# define _PATH_STDPATH _PATH_USERPATH
2120# else
2121# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2122# endif
2064#endif 2123#endif
2065#include <sys/types.h> 2124#include <sys/types.h>
2066#include <sys/stat.h> 2125#include <sys/stat.h>
@@ -2498,12 +2557,6 @@ if test "x$PAM_MSG" = "xyes" ; then
2498 echo "" 2557 echo ""
2499fi 2558fi
2500 2559
2501if test ! -z "$NO_SFTP"; then
2502 echo "sftp-server will be disabled. Your compiler does not "
2503 echo "support 64bit integers."
2504 echo ""
2505fi
2506
2507if test ! -z "$RAND_HELPER_CMDHASH" ; then 2560if test ! -z "$RAND_HELPER_CMDHASH" ; then
2508 echo "WARNING: you are using the builtin random number collection " 2561 echo "WARNING: you are using the builtin random number collection "
2509 echo "service. Please read WARNING.RNG and request that your OS " 2562 echo "service. Please read WARNING.RNG and request that your OS "