summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac618
1 files changed, 470 insertions, 148 deletions
diff --git a/configure.ac b/configure.ac
index e48028b7b..6e36aa22b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.250 2005/03/07 09:21:37 tim Exp $ 1# $Id: configure.ac,v 1.292 2005/08/31 16:59:49 tim Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -14,7 +14,7 @@
14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_CONFIG_SRCDIR([ssh.c]) 18AC_CONFIG_SRCDIR([ssh.c])
19 19
20AC_CONFIG_HEADER(config.h) 20AC_CONFIG_HEADER(config.h)
@@ -75,16 +75,102 @@ if test -z "$LD" ; then
75 LD=$CC 75 LD=$CC
76fi 76fi
77AC_SUBST(LD) 77AC_SUBST(LD)
78 78
79AC_C_INLINE 79AC_C_INLINE
80
81AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>])
82
80if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 83if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
81 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" 84 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
85 GCC_VER=`$CC --version`
86 case $GCC_VER in
87 1.*) ;;
88 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;;
89 2.*) ;;
90 *) CFLAGS="$CFLAGS -Wsign-compare" ;;
91 esac
92
93 if test -z "$have_llong_max"; then
94 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
95 unset ac_cv_have_decl_LLONG_MAX
96 saved_CFLAGS="$CFLAGS"
97 CFLAGS="$CFLAGS -std=gnu99"
98 AC_CHECK_DECL(LLONG_MAX,
99 [have_llong_max=1],
100 [CFLAGS="$saved_CFLAGS"],
101 [#include <limits.h>]
102 )
103 fi
104fi
105
106if test -z "$have_llong_max"; then
107 AC_MSG_CHECKING([for max value of long long])
108 AC_RUN_IFELSE(
109 [AC_LANG_SOURCE([[
110#include <stdio.h>
111/* Why is this so damn hard? */
112#ifdef __GNUC__
113# undef __GNUC__
114#endif
115#define __USE_ISOC99
116#include <limits.h>
117#define DATA "conftest.llminmax"
118int main(void) {
119 FILE *f;
120 long long i, llmin, llmax = 0;
121
122 if((f = fopen(DATA,"w")) == NULL)
123 exit(1);
124
125#if defined(LLONG_MIN) && defined(LLONG_MAX)
126 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
127 llmin = LLONG_MIN;
128 llmax = LLONG_MAX;
129#else
130 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
131 /* This will work on one's complement and two's complement */
132 for (i = 1; i > llmax; i <<= 1, i++)
133 llmax = i;
134 llmin = llmax + 1LL; /* wrap */
135#endif
136
137 /* Sanity check */
138 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
139 || llmax - 1 > llmax) {
140 fprintf(f, "unknown unknown\n");
141 exit(2);
142 }
143
144 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0)
145 exit(3);
146
147 exit(0);
148}
149 ]])],
150 [
151 llong_min=`$AWK '{print $1}' conftest.llminmax`
152 llong_max=`$AWK '{print $2}' conftest.llminmax`
153 AC_MSG_RESULT($llong_max)
154 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
155 [max value of long long calculated by configure])
156 AC_MSG_CHECKING([for min value of long long])
157 AC_MSG_RESULT($llong_min)
158 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL],
159 [min value of long long calculated by configure])
160 ],
161 [
162 AC_MSG_RESULT(not found)
163 ],
164 [
165 AC_MSG_WARN([cross compiling: not checking])
166 ]
167 )
82fi 168fi
83 169
84AC_ARG_WITH(rpath, 170AC_ARG_WITH(rpath,
85 [ --without-rpath Disable auto-added -R linker paths], 171 [ --without-rpath Disable auto-added -R linker paths],
86 [ 172 [
87 if test "x$withval" = "xno" ; then 173 if test "x$withval" = "xno" ; then
88 need_dash_r="" 174 need_dash_r=""
89 fi 175 fi
90 if test "x$withval" = "xyes" ; then 176 if test "x$withval" = "xyes" ; then
@@ -123,7 +209,7 @@ case "$host" in
123 ]) 209 ])
124 dnl Check for various auth function declarations in headers. 210 dnl Check for various auth function declarations in headers.
125 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess, 211 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess,
126 passwdexpired], , , [#include <usersec.h>]) 212 passwdexpired, setauthdb], , , [#include <usersec.h>])
127 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) 213 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
128 AC_CHECK_DECLS(loginfailed, 214 AC_CHECK_DECLS(loginfailed,
129 [AC_MSG_CHECKING(if loginfailed takes 4 arguments) 215 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
@@ -180,52 +266,66 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
180 AC_DEFINE(BROKEN_SETREUID) 266 AC_DEFINE(BROKEN_SETREUID)
181 AC_DEFINE(BROKEN_SETREGID) 267 AC_DEFINE(BROKEN_SETREGID)
182 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1) 268 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1)
269 AC_MSG_CHECKING(if we have the Security Authorization Session API)
270 AC_TRY_COMPILE([#include <Security/AuthSession.h>],
271 [SessionCreate(0, 0);],
272 [ac_cv_use_security_session_api="yes"
273 AC_DEFINE(USE_SECURITY_SESSION_API)
274 LIBS="$LIBS -framework Security"
275 AC_MSG_RESULT(yes)],
276 [ac_cv_use_security_session_api="no"
277 AC_MSG_RESULT(no)])
278 AC_MSG_CHECKING(if we have an in-memory credentials cache)
279 AC_TRY_COMPILE(
280 [#include <Kerberos/Kerberos.h>],
281 [cc_context_t c;
282 (void) cc_initialize (&c, 0, NULL, NULL);],
283 [AC_DEFINE(USE_CCAPI)
284 LIBS="$LIBS -framework Security"
285 AC_MSG_RESULT(yes)
286 if test "x$ac_cv_use_security_session_api" = "xno"; then
287 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***)
288 fi],
289 [AC_MSG_RESULT(no)]
290 )
183 ;; 291 ;;
184*-*-hpux10.26) 292*-*-hpux*)
185 if test -z "$GCC"; then 293 # first we define all of the options common to all HP-UX releases
186 CFLAGS="$CFLAGS -Ae"
187 fi
188 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
189 IPADDR_IN_DISPLAY=yes
190 AC_DEFINE(HAVE_SECUREWARE)
191 AC_DEFINE(USE_PIPES)
192 AC_DEFINE(LOGIN_NO_ENDOPT)
193 AC_DEFINE(LOGIN_NEEDS_UTMPX)
194 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
195 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
196 LIBS="$LIBS -lsec -lsecpw"
197 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
198 disable_ptmx_check=yes
199 ;;
200*-*-hpux10*)
201 if test -z "$GCC"; then
202 CFLAGS="$CFLAGS -Ae"
203 fi
204 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
205 IPADDR_IN_DISPLAY=yes
206 AC_DEFINE(USE_PIPES)
207 AC_DEFINE(LOGIN_NO_ENDOPT)
208 AC_DEFINE(LOGIN_NEEDS_UTMPX)
209 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
210 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
211 LIBS="$LIBS -lsec"
212 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
213 ;;
214*-*-hpux11*)
215 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 294 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
216 IPADDR_IN_DISPLAY=yes 295 IPADDR_IN_DISPLAY=yes
217 AC_DEFINE(PAM_SUN_CODEBASE)
218 AC_DEFINE(USE_PIPES) 296 AC_DEFINE(USE_PIPES)
219 AC_DEFINE(LOGIN_NO_ENDOPT) 297 AC_DEFINE(LOGIN_NO_ENDOPT)
220 AC_DEFINE(LOGIN_NEEDS_UTMPX) 298 AC_DEFINE(LOGIN_NEEDS_UTMPX)
221 AC_DEFINE(DISABLE_UTMP)
222 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 299 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
223 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 300 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
224 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
225 check_for_hpux_broken_getaddrinfo=1
226 check_for_conflicting_getspnam=1
227 LIBS="$LIBS -lsec" 301 LIBS="$LIBS -lsec"
228 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 302 AC_CHECK_LIB(xnet, t_error, ,
303 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
304
305 # next, we define all of the options specific to major releases
306 case "$host" in
307 *-*-hpux10*)
308 if test -z "$GCC"; then
309 CFLAGS="$CFLAGS -Ae"
310 fi
311 ;;
312 *-*-hpux11*)
313 AC_DEFINE(PAM_SUN_CODEBASE)
314 AC_DEFINE(DISABLE_UTMP)
315 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
316 check_for_hpux_broken_getaddrinfo=1
317 check_for_conflicting_getspnam=1
318 ;;
319 esac
320
321 # lastly, we define options specific to minor releases
322 case "$host" in
323 *-*-hpux10.26)
324 AC_DEFINE(HAVE_SECUREWARE)
325 disable_ptmx_check=yes
326 LIBS="$LIBS -lsecpw"
327 ;;
328 esac
229 ;; 329 ;;
230*-*-irix5*) 330*-*-irix5*)
231 PATH="$PATH:/usr/etc" 331 PATH="$PATH:/usr/etc"
@@ -269,12 +369,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
269 esac 369 esac
270 ;; 370 ;;
271mips-sony-bsd|mips-sony-newsos4) 371mips-sony-bsd|mips-sony-newsos4)
272 AC_DEFINE(HAVE_NEWS4) 372 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty])
273 SONY=1 373 SONY=1
274 ;; 374 ;;
275*-*-netbsd*) 375*-*-netbsd*)
276 check_for_libcrypt_before=1 376 check_for_libcrypt_before=1
277 if test "x$withval" != "xno" ; then 377 if test "x$withval" != "xno" ; then
278 need_dash_r=1 378 need_dash_r=1
279 fi 379 fi
280 ;; 380 ;;
@@ -296,8 +396,11 @@ mips-sony-bsd|mips-sony-newsos4)
296 AC_DEFINE(USE_PIPES) 396 AC_DEFINE(USE_PIPES)
297 AC_DEFINE(BROKEN_SAVED_UIDS) 397 AC_DEFINE(BROKEN_SAVED_UIDS)
298 ;; 398 ;;
399*-*-openbsd*)
400 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
401 ;;
299*-*-solaris*) 402*-*-solaris*)
300 if test "x$withval" != "xno" ; then 403 if test "x$withval" != "xno" ; then
301 need_dash_r=1 404 need_dash_r=1
302 fi 405 fi
303 AC_DEFINE(PAM_SUN_CODEBASE) 406 AC_DEFINE(PAM_SUN_CODEBASE)
@@ -361,13 +464,23 @@ mips-sony-bsd|mips-sony-newsos4)
361 AC_DEFINE(SETEUID_BREAKS_SETUID) 464 AC_DEFINE(SETEUID_BREAKS_SETUID)
362 AC_DEFINE(BROKEN_SETREUID) 465 AC_DEFINE(BROKEN_SETREUID)
363 AC_DEFINE(BROKEN_SETREGID) 466 AC_DEFINE(BROKEN_SETREGID)
467 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
364 ;; 468 ;;
365# UnixWare 7.x, OpenUNIX 8 469# UnixWare 7.x, OpenUNIX 8
366*-*-sysv5*) 470*-*-sysv5*)
471 check_for_libcrypt_later=1
472 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars])
367 AC_DEFINE(USE_PIPES) 473 AC_DEFINE(USE_PIPES)
368 AC_DEFINE(SETEUID_BREAKS_SETUID) 474 AC_DEFINE(SETEUID_BREAKS_SETUID)
369 AC_DEFINE(BROKEN_SETREUID) 475 AC_DEFINE(BROKEN_SETREUID)
370 AC_DEFINE(BROKEN_SETREGID) 476 AC_DEFINE(BROKEN_SETREGID)
477 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
478 case "$host" in
479 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
480 TEST_SHELL=/u95/bin/sh
481 AC_DEFINE(BROKEN_LIBIAF, 1, [ia_uinfo routines not supported by OS yet])
482 ;;
483 esac
371 ;; 484 ;;
372*-*-sysv*) 485*-*-sysv*)
373 ;; 486 ;;
@@ -466,21 +579,36 @@ mips-sony-bsd|mips-sony-newsos4)
466 AC_DEFINE(MISSING_HOWMANY) 579 AC_DEFINE(MISSING_HOWMANY)
467 AC_DEFINE(MISSING_FD_MASK) 580 AC_DEFINE(MISSING_FD_MASK)
468 ;; 581 ;;
582
583*-*-ultrix*)
584 AC_DEFINE(BROKEN_GETGROUPS, [], [getgroups(0,NULL) will return -1])
585 AC_DEFINE(BROKEN_MMAP, [], [Ultrix mmap can't map files])
586 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty])
587 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix])
588 ;;
589
590*-*-lynxos)
591 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
592 AC_DEFINE(MISSING_HOWMANY)
593 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation])
594 ;;
469esac 595esac
470 596
471# Allow user to specify flags 597# Allow user to specify flags
472AC_ARG_WITH(cflags, 598AC_ARG_WITH(cflags,
473 [ --with-cflags Specify additional flags to pass to compiler], 599 [ --with-cflags Specify additional flags to pass to compiler],
474 [ 600 [
475 if test "x$withval" != "xno" ; then 601 if test -n "$withval" && test "x$withval" != "xno" && \
602 test "x${withval}" != "xyes"; then
476 CFLAGS="$CFLAGS $withval" 603 CFLAGS="$CFLAGS $withval"
477 fi 604 fi
478 ] 605 ]
479) 606)
480AC_ARG_WITH(cppflags, 607AC_ARG_WITH(cppflags,
481 [ --with-cppflags Specify additional flags to pass to preprocessor] , 608 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
482 [ 609 [
483 if test "x$withval" != "xno"; then 610 if test -n "$withval" && test "x$withval" != "xno" && \
611 test "x${withval}" != "xyes"; then
484 CPPFLAGS="$CPPFLAGS $withval" 612 CPPFLAGS="$CPPFLAGS $withval"
485 fi 613 fi
486 ] 614 ]
@@ -488,18 +616,31 @@ AC_ARG_WITH(cppflags,
488AC_ARG_WITH(ldflags, 616AC_ARG_WITH(ldflags,
489 [ --with-ldflags Specify additional flags to pass to linker], 617 [ --with-ldflags Specify additional flags to pass to linker],
490 [ 618 [
491 if test "x$withval" != "xno" ; then 619 if test -n "$withval" && test "x$withval" != "xno" && \
620 test "x${withval}" != "xyes"; then
492 LDFLAGS="$LDFLAGS $withval" 621 LDFLAGS="$LDFLAGS $withval"
493 fi 622 fi
494 ] 623 ]
495) 624)
496AC_ARG_WITH(libs, 625AC_ARG_WITH(libs,
497 [ --with-libs Specify additional libraries to link with], 626 [ --with-libs Specify additional libraries to link with],
498 [ 627 [
499 if test "x$withval" != "xno" ; then 628 if test -n "$withval" && test "x$withval" != "xno" && \
629 test "x${withval}" != "xyes"; then
500 LIBS="$LIBS $withval" 630 LIBS="$LIBS $withval"
501 fi 631 fi
502 ] 632 ]
633)
634AC_ARG_WITH(Werror,
635 [ --with-Werror Build main code with -Werror],
636 [
637 if test -n "$withval" && test "x$withval" != "xno"; then
638 werror_flags="-Werror"
639 if "x${withval}" != "xyes"; then
640 werror_flags="$withval"
641 fi
642 fi
643 ]
503) 644)
504 645
505AC_MSG_CHECKING(compiler and flags for sanity) 646AC_MSG_CHECKING(compiler and flags for sanity)
@@ -516,17 +657,67 @@ int main(){exit(0);}
516 [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ] 657 [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ]
517) 658)
518 659
519# Checks for header files. 660dnl Checks for header files.
520AC_CHECK_HEADERS(bstring.h crypt.h dirent.h endian.h features.h \ 661AC_CHECK_HEADERS( \
521 floatingpoint.h getopt.h glob.h ia.h lastlog.h limits.h login.h \ 662 bstring.h \
522 login_cap.h maillock.h ndir.h netdb.h netgroup.h \ 663 crypt.h \
523 netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \ 664 dirent.h \
524 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ 665 endian.h \
525 strings.h sys/dir.h sys/strtio.h sys/audit.h sys/bitypes.h \ 666 features.h \
526 sys/bsdtty.h sys/cdefs.h sys/mman.h sys/ndir.h sys/prctl.h \ 667 floatingpoint.h \
527 sys/pstat.h sys/select.h sys/stat.h sys/stream.h \ 668 getopt.h \
528 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h sys/un.h \ 669 glob.h \
529 time.h tmpdir.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) 670 ia.h \
671 iaf.h \
672 lastlog.h \
673 limits.h \
674 login.h \
675 login_cap.h \
676 maillock.h \
677 ndir.h \
678 netdb.h \
679 netgroup.h \
680 netinet/in_systm.h \
681 pam/pam_appl.h \
682 paths.h \
683 pty.h \
684 readpassphrase.h \
685 rpc/types.h \
686 security/pam_appl.h \
687 shadow.h \
688 stddef.h \
689 stdint.h \
690 string.h \
691 strings.h \
692 sys/audit.h \
693 sys/bitypes.h \
694 sys/bsdtty.h \
695 sys/cdefs.h \
696 sys/dir.h \
697 sys/mman.h \
698 sys/ndir.h \
699 sys/prctl.h \
700 sys/pstat.h \
701 sys/select.h \
702 sys/stat.h \
703 sys/stream.h \
704 sys/stropts.h \
705 sys/strtio.h \
706 sys/sysmacros.h \
707 sys/time.h \
708 sys/timers.h \
709 sys/un.h \
710 time.h \
711 tmpdir.h \
712 ttyent.h \
713 unistd.h \
714 usersec.h \
715 util.h \
716 utime.h \
717 utmp.h \
718 utmpx.h \
719 vis.h \
720)
530 721
531# sys/ptms.h requires sys/stream.h to be included first on Solaris 722# sys/ptms.h requires sys/stream.h to be included first on Solaris
532AC_CHECK_HEADERS(sys/ptms.h, [], [], [ 723AC_CHECK_HEADERS(sys/ptms.h, [], [], [
@@ -583,10 +774,9 @@ AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
583dnl zlib is required 774dnl zlib is required
584AC_ARG_WITH(zlib, 775AC_ARG_WITH(zlib,
585 [ --with-zlib=PATH Use zlib in PATH], 776 [ --with-zlib=PATH Use zlib in PATH],
586 [ 777 [ if test "x$withval" = "xno" ; then
587 if test "x$withval" = "xno" ; then 778 AC_MSG_ERROR([*** zlib is required ***])
588 AC_MSG_ERROR([*** zlib is required ***]) 779 elif test "x$withval" != "xyes"; then
589 fi
590 if test -d "$withval/lib"; then 780 if test -d "$withval/lib"; then
591 if test -n "${need_dash_r}"; then 781 if test -n "${need_dash_r}"; then
592 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" 782 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -605,7 +795,7 @@ AC_ARG_WITH(zlib,
605 else 795 else
606 CPPFLAGS="-I${withval} ${CPPFLAGS}" 796 CPPFLAGS="-I${withval} ${CPPFLAGS}"
607 fi 797 fi
608 ] 798 fi ]
609) 799)
610 800
611AC_CHECK_LIB(z, deflate, , 801AC_CHECK_LIB(z, deflate, ,
@@ -638,29 +828,40 @@ AC_ARG_WITH(zlib-version-check,
638 ] 828 ]
639) 829)
640 830
641AC_MSG_CHECKING(for zlib 1.1.4 or greater) 831AC_MSG_CHECKING(for possibly buggy zlib)
642AC_RUN_IFELSE([AC_LANG_SOURCE([[ 832AC_RUN_IFELSE([AC_LANG_SOURCE([[
833#include <stdio.h>
643#include <zlib.h> 834#include <zlib.h>
644int main() 835int main()
645{ 836{
646 int a, b, c, v; 837 int a=0, b=0, c=0, d=0, n, v;
647 if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3) 838 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
839 if (n != 3 && n != 4)
648 exit(1); 840 exit(1);
649 v = a*1000000 + b*1000 + c; 841 v = a*1000000 + b*10000 + c*100 + d;
650 if (v >= 1001004) 842 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
843
844 /* 1.1.4 is OK */
845 if (a == 1 && b == 1 && c >= 4)
846 exit(0);
847
848 /* 1.2.3 and up are OK */
849 if (v >= 1020300)
651 exit(0); 850 exit(0);
851
652 exit(2); 852 exit(2);
653} 853}
654 ]])], 854 ]])],
655 AC_MSG_RESULT(yes), 855 AC_MSG_RESULT(no),
656 [ AC_MSG_RESULT(no) 856 [ AC_MSG_RESULT(yes)
657 if test -z "$zlib_check_nonfatal" ; then 857 if test -z "$zlib_check_nonfatal" ; then
658 AC_MSG_ERROR([*** zlib too old - check config.log *** 858 AC_MSG_ERROR([*** zlib too old - check config.log ***
659Your reported zlib version has known security problems. It's possible your 859Your reported zlib version has known security problems. It's possible your
660vendor has fixed these problems without changing the version number. If you 860vendor has fixed these problems without changing the version number. If you
661are sure this is the case, you can disable the check by running 861are sure this is the case, you can disable the check by running
662"./configure --without-zlib-version-check". 862"./configure --without-zlib-version-check".
663If you are in doubt, upgrade zlib to version 1.1.4 or greater.]) 863If you are in doubt, upgrade zlib to version 1.2.3 or greater.
864See http://www.gzip.org/zlib/ for details.])
664 else 865 else
665 AC_MSG_WARN([zlib version may have security problems]) 866 AC_MSG_WARN([zlib version may have security problems])
666 fi 867 fi
@@ -730,7 +931,7 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
730 AC_MSG_RESULT(no) 931 AC_MSG_RESULT(no)
731 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 932 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
732 ], 933 ],
733 [ 934 [
734 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 935 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
735 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 936 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
736 ] 937 ]
@@ -759,7 +960,7 @@ AC_ARG_WITH(skey,
759 AC_DEFINE(SKEY) 960 AC_DEFINE(SKEY)
760 LIBS="-lskey $LIBS" 961 LIBS="-lskey $LIBS"
761 SKEY_MSG="yes" 962 SKEY_MSG="yes"
762 963
763 AC_MSG_CHECKING([for s/key support]) 964 AC_MSG_CHECKING([for s/key support])
764 AC_TRY_RUN( 965 AC_TRY_RUN(
765 [ 966 [
@@ -794,7 +995,8 @@ AC_ARG_WITH(tcp-wrappers,
794 saved_LIBS="$LIBS" 995 saved_LIBS="$LIBS"
795 saved_LDFLAGS="$LDFLAGS" 996 saved_LDFLAGS="$LDFLAGS"
796 saved_CPPFLAGS="$CPPFLAGS" 997 saved_CPPFLAGS="$CPPFLAGS"
797 if test -n "${withval}" -a "${withval}" != "yes"; then 998 if test -n "${withval}" && \
999 test "x${withval}" != "xyes"; then
798 if test -d "${withval}/lib"; then 1000 if test -d "${withval}/lib"; then
799 if test -n "${need_dash_r}"; then 1001 if test -n "${need_dash_r}"; then
800 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" 1002 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -846,13 +1048,33 @@ LIBEDIT_MSG="no"
846AC_ARG_WITH(libedit, 1048AC_ARG_WITH(libedit,
847 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1049 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
848 [ if test "x$withval" != "xno" ; then 1050 [ if test "x$withval" != "xno" ; then
1051 if test "x$withval" != "xyes"; then
1052 CPPFLAGS="$CPPFLAGS -I$withval/include"
1053 LDFLAGS="$LDFLAGS -L$withval/lib"
1054 fi
849 AC_CHECK_LIB(edit, el_init, 1055 AC_CHECK_LIB(edit, el_init,
850 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp]) 1056 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp])
851 LIBEDIT="-ledit -lcurses" 1057 LIBEDIT="-ledit -lcurses"
852 LIBEDIT_MSG="yes" 1058 LIBEDIT_MSG="yes"
853 AC_SUBST(LIBEDIT) 1059 AC_SUBST(LIBEDIT)
854 ], 1060 ],
855 [], [-lcurses] 1061 [ AC_MSG_ERROR(libedit not found) ],
1062 [ -lcurses ]
1063 )
1064 AC_MSG_CHECKING(if libedit version is compatible)
1065 AC_COMPILE_IFELSE(
1066 [AC_LANG_SOURCE([[
1067#include <histedit.h>
1068int main(void)
1069{
1070 int i = H_SETSIZE;
1071 el_init("", NULL, NULL, NULL);
1072 exit(0);
1073}
1074 ]])],
1075 [ AC_MSG_RESULT(yes) ],
1076 [ AC_MSG_RESULT(no)
1077 AC_MSG_ERROR(libedit version is not compatible) ]
856 ) 1078 )
857 fi ] 1079 fi ]
858) 1080)
@@ -882,6 +1104,9 @@ AC_ARG_WITH(audit,
882 AC_MSG_RESULT(debug) 1104 AC_MSG_RESULT(debug)
883 AC_DEFINE(SSH_AUDIT_EVENTS, [], Use audit debugging module) 1105 AC_DEFINE(SSH_AUDIT_EVENTS, [], Use audit debugging module)
884 ;; 1106 ;;
1107 no)
1108 AC_MSG_RESULT(no)
1109 ;;
885 *) 1110 *)
886 AC_MSG_ERROR([Unknown audit module $withval]) 1111 AC_MSG_ERROR([Unknown audit module $withval])
887 ;; 1112 ;;
@@ -889,19 +1114,87 @@ AC_ARG_WITH(audit,
889) 1114)
890 1115
891dnl Checks for library functions. Please keep in alphabetical order 1116dnl Checks for library functions. Please keep in alphabetical order
892AC_CHECK_FUNCS(\ 1117AC_CHECK_FUNCS( \
893 arc4random __b64_ntop b64_ntop __b64_pton b64_pton bcopy \ 1118 arc4random \
894 bindresvport_sa clock closefrom dirfd fchdir fchmod fchown \ 1119 b64_ntop \
895 freeaddrinfo futimes getaddrinfo getcwd getgrouplist getnameinfo \ 1120 __b64_ntop \
896 getopt getpeereid _getpty getrlimit getttyent glob inet_aton \ 1121 b64_pton \
897 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ 1122 __b64_pton \
898 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ 1123 bcopy \
899 pstat prctl readpassphrase realpath recvmsg rresvport_af sendmsg \ 1124 bindresvport_sa \
900 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ 1125 clock \
901 setproctitle setregid setreuid setrlimit \ 1126 closefrom \
902 setsid setvbuf sigaction sigvec snprintf socketpair strerror \ 1127 dirfd \
903 strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ 1128 fchmod \
904 truncate unsetenv updwtmpx utimes vhangup vsnprintf waitpid \ 1129 fchown \
1130 freeaddrinfo \
1131 futimes \
1132 getaddrinfo \
1133 getcwd \
1134 getgrouplist \
1135 getnameinfo \
1136 getopt \
1137 getpeereid \
1138 _getpty \
1139 getrlimit \
1140 getttyent \
1141 glob \
1142 inet_aton \
1143 inet_ntoa \
1144 inet_ntop \
1145 innetgr \
1146 login_getcapbool \
1147 md5_crypt \
1148 memmove \
1149 mkdtemp \
1150 mmap \
1151 ngetaddrinfo \
1152 nsleep \
1153 ogetaddrinfo \
1154 openlog_r \
1155 openpty \
1156 prctl \
1157 pstat \
1158 readpassphrase \
1159 realpath \
1160 recvmsg \
1161 rresvport_af \
1162 sendmsg \
1163 setdtablesize \
1164 setegid \
1165 setenv \
1166 seteuid \
1167 setgroups \
1168 setlogin \
1169 setpcred \
1170 setproctitle \
1171 setregid \
1172 setreuid \
1173 setrlimit \
1174 setsid \
1175 setvbuf \
1176 sigaction \
1177 sigvec \
1178 snprintf \
1179 socketpair \
1180 strdup \
1181 strerror \
1182 strlcat \
1183 strlcpy \
1184 strmode \
1185 strnvis \
1186 strtonum \
1187 strtoll \
1188 strtoul \
1189 sysconf \
1190 tcgetpgrp \
1191 truncate \
1192 unsetenv \
1193 updwtmpx \
1194 utimes \
1195 vhangup \
1196 vsnprintf \
1197 waitpid \
905) 1198)
906 1199
907# IRIX has a const char return value for gai_strerror() 1200# IRIX has a const char return value for gai_strerror()
@@ -922,8 +1215,15 @@ str = gai_strerror(0);],[
922AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) 1215AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
923 1216
924dnl Make sure prototypes are defined for these before using them. 1217dnl Make sure prototypes are defined for these before using them.
925AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
926AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) 1218AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
1219AC_CHECK_DECL(strsep,
1220 [AC_CHECK_FUNCS(strsep)],
1221 [],
1222 [
1223#ifdef HAVE_STRING_H
1224# include <string.h>
1225#endif
1226 ])
927 1227
928dnl tcsendbreak might be a macro 1228dnl tcsendbreak might be a macro
929AC_CHECK_DECL(tcsendbreak, 1229AC_CHECK_DECL(tcsendbreak,
@@ -1011,7 +1311,9 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
1011 [#include <sys/types.h> 1311 [#include <sys/types.h>
1012 #include <sys/socket.h>], 1312 #include <sys/socket.h>],
1013 [int i = SO_PEERCRED;], 1313 [int i = SO_PEERCRED;],
1014 [AC_MSG_RESULT(yes)], 1314 [ AC_MSG_RESULT(yes)
1315 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option])
1316 ],
1015 [AC_MSG_RESULT(no) 1317 [AC_MSG_RESULT(no)
1016 NO_PEERCHECK=1] 1318 NO_PEERCHECK=1]
1017 ) 1319 )
@@ -1090,7 +1392,8 @@ main()
1090 ) 1392 )
1091fi 1393fi
1092 1394
1093if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1395if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1396 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1094 AC_MSG_CHECKING(if getaddrinfo seems to work) 1397 AC_MSG_CHECKING(if getaddrinfo seems to work)
1095 AC_TRY_RUN( 1398 AC_TRY_RUN(
1096 [ 1399 [
@@ -1158,7 +1461,8 @@ main(void)
1158 ) 1461 )
1159fi 1462fi
1160 1463
1161if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1464if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1465 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1162 AC_MSG_CHECKING(if getaddrinfo seems to work) 1466 AC_MSG_CHECKING(if getaddrinfo seems to work)
1163 AC_TRY_RUN( 1467 AC_TRY_RUN(
1164 [ 1468 [
@@ -1443,6 +1747,7 @@ if test "x$check_for_libcrypt_later" = "x1"; then
1443 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") 1747 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
1444fi 1748fi
1445 1749
1750AC_CHECK_LIB(iaf, ia_openinfo)
1446 1751
1447### Configure cryptographic random number support 1752### Configure cryptographic random number support
1448 1753
@@ -1467,7 +1772,7 @@ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
1467 [ 1772 [
1468 AC_MSG_WARN([cross compiling: assuming yes]) 1773 AC_MSG_WARN([cross compiling: assuming yes])
1469 # This is safe, since all recent OpenSSL versions will 1774 # This is safe, since all recent OpenSSL versions will
1470 # complain at runtime if not seeded correctly. 1775 # complain at runtime if not seeded correctly.
1471 OPENSSL_SEEDS_ITSELF=yes 1776 OPENSSL_SEEDS_ITSELF=yes
1472 ] 1777 ]
1473) 1778)
@@ -1489,10 +1794,10 @@ AC_ARG_WITH(rand-helper,
1489 USE_RAND_HELPER=yes 1794 USE_RAND_HELPER=yes
1490 fi 1795 fi
1491 ], 1796 ],
1492) 1797)
1493 1798
1494# Which randomness source do we use? 1799# Which randomness source do we use?
1495if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then 1800if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
1496 # OpenSSL only 1801 # OpenSSL only
1497 AC_DEFINE(OPENSSL_PRNG_ONLY) 1802 AC_DEFINE(OPENSSL_PRNG_ONLY)
1498 RAND_MSG="OpenSSL internal ONLY" 1803 RAND_MSG="OpenSSL internal ONLY"
@@ -1582,10 +1887,11 @@ entropy_timeout=200
1582AC_ARG_WITH(entropy-timeout, 1887AC_ARG_WITH(entropy-timeout,
1583 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], 1888 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1584 [ 1889 [
1585 if test "x$withval" != "xno" ; then 1890 if test -n "$withval" && test "x$withval" != "xno" && \
1891 test "x${withval}" != "xyes"; then
1586 entropy_timeout=$withval 1892 entropy_timeout=$withval
1587 fi 1893 fi
1588 ] 1894 ]
1589) 1895)
1590AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) 1896AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1591 1897
@@ -1593,10 +1899,11 @@ SSH_PRIVSEP_USER=sshd
1593AC_ARG_WITH(privsep-user, 1899AC_ARG_WITH(privsep-user,
1594 [ --with-privsep-user=user Specify non-privileged user for privilege separation], 1900 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
1595 [ 1901 [
1596 if test -n "$withval"; then 1902 if test -n "$withval" && test "x$withval" != "xno" && \
1903 test "x${withval}" != "xyes"; then
1597 SSH_PRIVSEP_USER=$withval 1904 SSH_PRIVSEP_USER=$withval
1598 fi 1905 fi
1599 ] 1906 ]
1600) 1907)
1601AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") 1908AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
1602AC_SUBST(SSH_PRIVSEP_USER) 1909AC_SUBST(SSH_PRIVSEP_USER)
@@ -2030,9 +2337,9 @@ fi
2030AC_CHECK_TYPES(struct timespec) 2337AC_CHECK_TYPES(struct timespec)
2031 2338
2032# We need int64_t or else certian parts of the compile will fail. 2339# We need int64_t or else certian parts of the compile will fail.
2033if test "x$ac_cv_have_int64_t" = "xno" -a \ 2340if test "x$ac_cv_have_int64_t" = "xno" && \
2034 "x$ac_cv_sizeof_long_int" != "x8" -a \ 2341 test "x$ac_cv_sizeof_long_int" != "x8" && \
2035 "x$ac_cv_sizeof_long_long_int" = "x0" ; then 2342 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
2036 echo "OpenSSH requires int64_t support. Contact your vendor or install" 2343 echo "OpenSSH requires int64_t support. Contact your vendor or install"
2037 echo "an alternative compiler (I.E., GCC) before continuing." 2344 echo "an alternative compiler (I.E., GCC) before continuing."
2038 echo "" 2345 echo ""
@@ -2324,23 +2631,28 @@ AC_ARG_WITH(sectok,
2324) 2631)
2325 2632
2326# Check whether user wants OpenSC support 2633# Check whether user wants OpenSC support
2634OPENSC_CONFIG="no"
2327AC_ARG_WITH(opensc, 2635AC_ARG_WITH(opensc,
2328 AC_HELP_STRING([--with-opensc=PFX], 2636 [--with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
2329 [Enable smartcard support using OpenSC]), 2637 [
2330 opensc_config_prefix="$withval", opensc_config_prefix="") 2638 if test "x$withval" != "xno" ; then
2331if test x$opensc_config_prefix != x ; then 2639 if test "x$withval" != "xyes" ; then
2332 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config 2640 OPENSC_CONFIG=$withval/bin/opensc-config
2333 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no) 2641 else
2334 if test "$OPENSC_CONFIG" != "no"; then 2642 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
2335 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` 2643 fi
2336 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` 2644 if test "$OPENSC_CONFIG" != "no"; then
2337 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 2645 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
2338 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 2646 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
2339 AC_DEFINE(SMARTCARD) 2647 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2340 AC_DEFINE(USE_OPENSC) 2648 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2341 SCARD_MSG="yes, using OpenSC" 2649 AC_DEFINE(SMARTCARD)
2342 fi 2650 AC_DEFINE(USE_OPENSC)
2343fi 2651 SCARD_MSG="yes, using OpenSC"
2652 fi
2653 fi
2654 ]
2655)
2344 2656
2345# Check libraries needed by DNS fingerprint support 2657# Check libraries needed by DNS fingerprint support
2346AC_SEARCH_LIBS(getrrsetbyname, resolv, 2658AC_SEARCH_LIBS(getrrsetbyname, resolv,
@@ -2369,6 +2681,9 @@ int main()
2369 AC_MSG_RESULT(no)]) 2681 AC_MSG_RESULT(no)])
2370 ]) 2682 ])
2371 AC_CHECK_FUNCS(_getshort _getlong) 2683 AC_CHECK_FUNCS(_getshort _getlong)
2684 AC_CHECK_DECLS([_getshort, _getlong], , ,
2685 [#include <sys/types.h>
2686 #include <arpa/nameser.h>])
2372 AC_CHECK_MEMBER(HEADER.ad, 2687 AC_CHECK_MEMBER(HEADER.ad,
2373 [AC_DEFINE(HAVE_HEADER_AD)],, 2688 [AC_DEFINE(HAVE_HEADER_AD)],,
2374 [#include <arpa/nameser.h>]) 2689 [#include <arpa/nameser.h>])
@@ -2423,7 +2738,7 @@ AC_ARG_WITH(kerberos5,
2423 AC_DEFINE(HEIMDAL) 2738 AC_DEFINE(HEIMDAL)
2424 K5LIBS="-lkrb5 -ldes" 2739 K5LIBS="-lkrb5 -ldes"
2425 K5LIBS="$K5LIBS -lcom_err -lasn1" 2740 K5LIBS="$K5LIBS -lcom_err -lasn1"
2426 AC_CHECK_LIB(roken, net_write, 2741 AC_CHECK_LIB(roken, net_write,
2427 [K5LIBS="$K5LIBS -lroken"]) 2742 [K5LIBS="$K5LIBS -lroken"])
2428 ], 2743 ],
2429 [ AC_MSG_RESULT(no) 2744 [ AC_MSG_RESULT(no)
@@ -2442,7 +2757,7 @@ AC_ARG_WITH(kerberos5,
2442 $K5LIBS) 2757 $K5LIBS)
2443 ], 2758 ],
2444 $K5LIBS) 2759 $K5LIBS)
2445 2760
2446 AC_CHECK_HEADER(gssapi.h, , 2761 AC_CHECK_HEADER(gssapi.h, ,
2447 [ unset ac_cv_header_gssapi_h 2762 [ unset ac_cv_header_gssapi_h
2448 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 2763 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
@@ -2472,7 +2787,6 @@ AC_ARG_WITH(kerberos5,
2472 2787
2473 LIBS="$LIBS $K5LIBS" 2788 LIBS="$LIBS $K5LIBS"
2474 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) 2789 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS))
2475 AC_SEARCH_LIBS(krb5_init_ets, $K5LIBS, AC_DEFINE(KRB5_INIT_ETS))
2476 ] 2790 ]
2477) 2791)
2478 2792
@@ -2482,7 +2796,8 @@ PRIVSEP_PATH=/var/empty
2482AC_ARG_WITH(privsep-path, 2796AC_ARG_WITH(privsep-path,
2483 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)], 2797 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
2484 [ 2798 [
2485 if test "x$withval" != "$no" ; then 2799 if test -n "$withval" && test "x$withval" != "xno" && \
2800 test "x${withval}" != "xyes"; then
2486 PRIVSEP_PATH=$withval 2801 PRIVSEP_PATH=$withval
2487 fi 2802 fi
2488 ] 2803 ]
@@ -2492,7 +2807,8 @@ AC_SUBST(PRIVSEP_PATH)
2492AC_ARG_WITH(xauth, 2807AC_ARG_WITH(xauth,
2493 [ --with-xauth=PATH Specify path to xauth program ], 2808 [ --with-xauth=PATH Specify path to xauth program ],
2494 [ 2809 [
2495 if test "x$withval" != "xno" ; then 2810 if test -n "$withval" && test "x$withval" != "xno" && \
2811 test "x${withval}" != "xyes"; then
2496 xauth_path=$withval 2812 xauth_path=$withval
2497 fi 2813 fi
2498 ], 2814 ],
@@ -2610,7 +2926,7 @@ AC_ARG_WITH(md5-passwords,
2610AC_ARG_WITH(shadow, 2926AC_ARG_WITH(shadow,
2611 [ --without-shadow Disable shadow password support], 2927 [ --without-shadow Disable shadow password support],
2612 [ 2928 [
2613 if test "x$withval" = "xno" ; then 2929 if test "x$withval" = "xno" ; then
2614 AC_DEFINE(DISABLE_SHADOW) 2930 AC_DEFINE(DISABLE_SHADOW)
2615 disable_shadow=yes 2931 disable_shadow=yes
2616 fi 2932 fi
@@ -2645,7 +2961,7 @@ else
2645 AC_ARG_WITH(ipaddr-display, 2961 AC_ARG_WITH(ipaddr-display,
2646 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], 2962 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2647 [ 2963 [
2648 if test "x$withval" != "xno" ; then 2964 if test "x$withval" != "xno" ; then
2649 AC_DEFINE(IPADDR_IN_DISPLAY) 2965 AC_DEFINE(IPADDR_IN_DISPLAY)
2650 DISPLAY_HACK_MSG="yes" 2966 DISPLAY_HACK_MSG="yes"
2651 fi 2967 fi
@@ -2677,8 +2993,8 @@ if test "x$etc_default_login" != "xno"; then
2677fi 2993fi
2678 2994
2679dnl BSD systems use /etc/login.conf so --with-default-path= has no effect 2995dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2680if test $ac_cv_func_login_getcapbool = "yes" -a \ 2996if test $ac_cv_func_login_getcapbool = "yes" && \
2681 $ac_cv_header_login_cap_h = "yes" ; then 2997 test $ac_cv_header_login_cap_h = "yes" ; then
2682 external_path_file=/etc/login.conf 2998 external_path_file=/etc/login.conf
2683fi 2999fi
2684 3000
@@ -2691,7 +3007,7 @@ AC_ARG_WITH(default-path,
2691 AC_MSG_WARN([ 3007 AC_MSG_WARN([
2692--with-default-path=PATH has no effect on this system. 3008--with-default-path=PATH has no effect on this system.
2693Edit /etc/login.conf instead.]) 3009Edit /etc/login.conf instead.])
2694 elif test "x$withval" != "xno" ; then 3010 elif test "x$withval" != "xno" ; then
2695 if test ! -z "$external_path_file" ; then 3011 if test ! -z "$external_path_file" ; then
2696 AC_MSG_WARN([ 3012 AC_MSG_WARN([
2697--with-default-path=PATH will only be used if PATH is not defined in 3013--with-default-path=PATH will only be used if PATH is not defined in
@@ -2732,11 +3048,11 @@ main()
2732{ 3048{
2733 FILE *fd; 3049 FILE *fd;
2734 int rc; 3050 int rc;
2735 3051
2736 fd = fopen(DATA,"w"); 3052 fd = fopen(DATA,"w");
2737 if(fd == NULL) 3053 if(fd == NULL)
2738 exit(1); 3054 exit(1);
2739 3055
2740 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) 3056 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2741 exit(1); 3057 exit(1);
2742 3058
@@ -2773,7 +3089,8 @@ fi
2773AC_ARG_WITH(superuser-path, 3089AC_ARG_WITH(superuser-path,
2774 [ --with-superuser-path= Specify different path for super-user], 3090 [ --with-superuser-path= Specify different path for super-user],
2775 [ 3091 [
2776 if test "x$withval" != "xno" ; then 3092 if test -n "$withval" && test "x$withval" != "xno" && \
3093 test "x${withval}" != "xyes"; then
2777 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") 3094 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2778 superuser_path=$withval 3095 superuser_path=$withval
2779 fi 3096 fi
@@ -2809,7 +3126,7 @@ BSD_AUTH_MSG=no
2809AC_ARG_WITH(bsd-auth, 3126AC_ARG_WITH(bsd-auth,
2810 [ --with-bsd-auth Enable BSD auth support], 3127 [ --with-bsd-auth Enable BSD auth support],
2811 [ 3128 [
2812 if test "x$withval" != "xno" ; then 3129 if test "x$withval" != "xno" ; then
2813 AC_DEFINE(BSD_AUTH) 3130 AC_DEFINE(BSD_AUTH)
2814 BSD_AUTH_MSG=yes 3131 BSD_AUTH_MSG=yes
2815 fi 3132 fi
@@ -2819,7 +3136,7 @@ AC_ARG_WITH(bsd-auth,
2819# Where to place sshd.pid 3136# Where to place sshd.pid
2820piddir=/var/run 3137piddir=/var/run
2821# make sure the directory exists 3138# make sure the directory exists
2822if test ! -d $piddir ; then 3139if test ! -d $piddir ; then
2823 piddir=`eval echo ${sysconfdir}` 3140 piddir=`eval echo ${sysconfdir}`
2824 case $piddir in 3141 case $piddir in
2825 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; 3142 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
@@ -2829,9 +3146,10 @@ fi
2829AC_ARG_WITH(pid-dir, 3146AC_ARG_WITH(pid-dir,
2830 [ --with-pid-dir=PATH Specify location of ssh.pid file], 3147 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2831 [ 3148 [
2832 if test "x$withval" != "xno" ; then 3149 if test -n "$withval" && test "x$withval" != "xno" && \
3150 test "x${withval}" != "xyes"; then
2833 piddir=$withval 3151 piddir=$withval
2834 if test ! -d $piddir ; then 3152 if test ! -d $piddir ; then
2835 AC_MSG_WARN([** no $piddir directory on this system **]) 3153 AC_MSG_WARN([** no $piddir directory on this system **])
2836 fi 3154 fi
2837 fi 3155 fi
@@ -2909,9 +3227,9 @@ AC_ARG_ENABLE(pututxline,
2909AC_ARG_WITH(lastlog, 3227AC_ARG_WITH(lastlog,
2910 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], 3228 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2911 [ 3229 [
2912 if test "x$withval" = "xno" ; then 3230 if test "x$withval" = "xno" ; then
2913 AC_DEFINE(DISABLE_LASTLOG) 3231 AC_DEFINE(DISABLE_LASTLOG)
2914 else 3232 elif test -n "$withval" && test "x${withval}" != "xyes"; then
2915 conf_lastlog_location=$withval 3233 conf_lastlog_location=$withval
2916 fi 3234 fi
2917 ] 3235 ]
@@ -2978,7 +3296,7 @@ fi
2978 3296
2979if test -n "$conf_lastlog_location"; then 3297if test -n "$conf_lastlog_location"; then
2980 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") 3298 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2981fi 3299fi
2982 3300
2983dnl utmp detection 3301dnl utmp detection
2984AC_MSG_CHECKING([if your system defines UTMP_FILE]) 3302AC_MSG_CHECKING([if your system defines UTMP_FILE])
@@ -3008,7 +3326,7 @@ if test -z "$conf_utmp_location"; then
3008fi 3326fi
3009if test -n "$conf_utmp_location"; then 3327if test -n "$conf_utmp_location"; then
3010 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") 3328 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
3011fi 3329fi
3012 3330
3013dnl wtmp detection 3331dnl wtmp detection
3014AC_MSG_CHECKING([if your system defines WTMP_FILE]) 3332AC_MSG_CHECKING([if your system defines WTMP_FILE])
@@ -3038,7 +3356,7 @@ if test -z "$conf_wtmp_location"; then
3038fi 3356fi
3039if test -n "$conf_wtmp_location"; then 3357if test -n "$conf_wtmp_location"; then
3040 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") 3358 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
3041fi 3359fi
3042 3360
3043 3361
3044dnl utmpx detection - I don't know any system so perverse as to require 3362dnl utmpx detection - I don't know any system so perverse as to require
@@ -3066,7 +3384,7 @@ if test -z "$conf_utmpx_location"; then
3066 fi 3384 fi
3067else 3385else
3068 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") 3386 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
3069fi 3387fi
3070 3388
3071dnl wtmpx detection 3389dnl wtmpx detection
3072AC_MSG_CHECKING([if your system defines WTMPX_FILE]) 3390AC_MSG_CHECKING([if your system defines WTMPX_FILE])
@@ -3091,7 +3409,7 @@ if test -z "$conf_wtmpx_location"; then
3091 fi 3409 fi
3092else 3410else
3093 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") 3411 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
3094fi 3412fi
3095 3413
3096 3414
3097if test ! -z "$blibpath" ; then 3415if test ! -z "$blibpath" ; then
@@ -3107,6 +3425,10 @@ if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
3107 LIBS=`echo $LIBS | sed 's/-ldl //'` 3425 LIBS=`echo $LIBS | sed 's/-ldl //'`
3108fi 3426fi
3109 3427
3428dnl Adding -Werror to CFLAGS early prevents configure tests from running.
3429dnl Add now.
3430CFLAGS="$CFLAGS $werror_flags"
3431
3110AC_EXEEXT 3432AC_EXEEXT
3111AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile \ 3433AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile \
3112 scard/Makefile ssh_prng_cmds survey.sh]) 3434 scard/Makefile ssh_prng_cmds survey.sh])