summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in224
1 files changed, 172 insertions, 52 deletions
diff --git a/configure.in b/configure.in
index c07aaf2c6..95372640f 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,7 @@
1# $Id: configure.in,v 1.314 2001/09/25 06:39:35 djm Exp $ 1# $Id: configure.in,v 1.315 2001/10/22 00:53:59 tim Exp $
2 2
3AC_INIT(ssh.c) 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c])
4 5
5AC_CONFIG_HEADER(config.h) 6AC_CONFIG_HEADER(config.h)
6AC_PROG_CC 7AC_PROG_CC
@@ -71,8 +72,6 @@ case "$host" in
71 AC_DEFINE(IPV4_DEFAULT) 72 AC_DEFINE(IPV4_DEFAULT)
72 AC_DEFINE(IP_TOS_IS_BROKEN) 73 AC_DEFINE(IP_TOS_IS_BROKEN)
73 AC_DEFINE(NO_X11_UNIX_SOCKETS) 74 AC_DEFINE(NO_X11_UNIX_SOCKETS)
74 no_libsocket=1
75 no_libnsl=1
76 ;; 75 ;;
77*-*-dgux*) 76*-*-dgux*)
78 AC_DEFINE(IP_TOS_IS_BROKEN) 77 AC_DEFINE(IP_TOS_IS_BROKEN)
@@ -106,8 +105,6 @@ case "$host" in
106 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 105 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
107 LDFLAGS="$LDFLAGS" 106 LDFLAGS="$LDFLAGS"
108 PATH="$PATH:/usr/etc" 107 PATH="$PATH:/usr/etc"
109 no_libsocket=1
110 no_libnsl=1
111 AC_DEFINE(BROKEN_INET_NTOA) 108 AC_DEFINE(BROKEN_INET_NTOA)
112 ;; 109 ;;
113*-*-irix6*) 110*-*-irix6*)
@@ -118,8 +115,6 @@ case "$host" in
118 AC_DEFINE(WITH_IRIX_PROJECT) 115 AC_DEFINE(WITH_IRIX_PROJECT)
119 AC_DEFINE(WITH_IRIX_AUDIT) 116 AC_DEFINE(WITH_IRIX_AUDIT)
120 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) 117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
121 no_libsocket=1
122 no_libnsl=1
123 AC_DEFINE(BROKEN_INET_NTOA) 118 AC_DEFINE(BROKEN_INET_NTOA)
124 ;; 119 ;;
125*-*-linux*) 120*-*-linux*)
@@ -186,7 +181,7 @@ mips-sony-bsd|mips-sony-newsos4)
186*-ncr-sysv*) 181*-ncr-sysv*)
187 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 182 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
188 LDFLAGS="$LDFLAGS -L/usr/local/lib" 183 LDFLAGS="$LDFLAGS -L/usr/local/lib"
189 LIBS="$LIBS -lc89 -lnsl -lgen -lsocket" 184 LIBS="$LIBS -lc89"
190 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H) 185 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
191 ;; 186 ;;
192*-sni-sysv*) 187*-sni-sysv*)
@@ -213,12 +208,11 @@ mips-sony-bsd|mips-sony-newsos4)
213*-*-sysv*) 208*-*-sysv*)
214 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 209 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
215 LDFLAGS="$LDFLAGS -L/usr/local/lib" 210 LDFLAGS="$LDFLAGS -L/usr/local/lib"
216 LIBS="$LIBS -lgen -lsocket"
217 ;; 211 ;;
218*-*-sco3.2v4*) 212*-*-sco3.2v4*)
219 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include" 213 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
220 LDFLAGS="$LDFLAGS -L/usr/local/lib" 214 LDFLAGS="$LDFLAGS -L/usr/local/lib"
221 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm" 215 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
222 rsh_path="/usr/bin/rcmd" 216 rsh_path="/usr/bin/rcmd"
223 RANLIB=true 217 RANLIB=true
224 no_dev_ptmx=1 218 no_dev_ptmx=1
@@ -230,6 +224,7 @@ mips-sony-bsd|mips-sony-newsos4)
230 AC_DEFINE(BROKEN_SAVED_UIDS) 224 AC_DEFINE(BROKEN_SAVED_UIDS)
231 AC_CHECK_FUNCS(getluid setluid) 225 AC_CHECK_FUNCS(getluid setluid)
232 MANTYPE=man 226 MANTYPE=man
227 do_sco3_extra_lib_check=yes
233 ;; 228 ;;
234*-*-sco3.2v5*) 229*-*-sco3.2v5*)
235 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 230 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -319,34 +314,92 @@ AC_ARG_WITH(libs,
319) 314)
320 315
321AC_ARG_WITH(pcre, 316AC_ARG_WITH(pcre,
322 [ --with-pcre Override built in regex library with pcre], 317 [ --with-pcre[[=PATH]] Override built in regex library with pcre
318 (optionally in PATH)],
323 [ 319 [
320 case "$withval" in
321 no) ;;
322 *)
323 if test "x$withval" != "xyes"; then
324 if test -d "$withval/lib"; then
325 if test -n "${need_dash_r}"; then
326 LDFLAGS="${LDFLAGS} -L$withval/lib -R$withval/lib"
327 else
328 LDFLAGS="${LDFLAGS} -L$withval/lib"
329 fi
330 else
331 if test -n "${need_dash_r}"; then
332 LDFLAGS="${LDFLAGS} -L$withval -R$withval"
333 else
334 LDFLAGS="${LDFLAGS} -L$withval"
335 fi
336 fi
337 if test -d "$withval/include"; then
338 CPPFLAGS="${CPPFLAGS} -I$withval/include"
339 else
340 CPPFLAGS="${CPPFLAGS} -I$withval"
341 fi
342 fi
324 343
325 AC_CHECK_LIB(pcre, pcre_info, 344 AC_CHECK_HEADER(pcreposix.h,
326 [ 345 AC_CHECK_LIB(pcre, pcre_info,[
327 AC_DEFINE(HAVE_LIBPCRE) 346 AC_DEFINE(HAVE_LIBPCRE)
328 LIBS="$LIBS -lpcreposix -lpcre" 347 LIBS="$LIBS -lpcreposix -lpcre"
329 no_comp_check="yes" 348 no_comp_check=yes],
330 ], 349 AC_MSG_ERROR([*** unable to locate pcre library ***])),
331 [ AC_MSG_ERROR([*** Can not locate pcre libraries.]) ] 350 AC_MSG_ERROR([*** unable to locate pcreposix.h include file ***]))
332 ) 351 ;;
352 esac
333 ] 353 ]
334) 354)
335 355
336# Checks for libraries. 356# Checks for libraries.
337if test -z "$no_libnsl" ; then 357AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
338 AC_CHECK_LIB(nsl, yp_match, , ) 358AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
339fi
340if test -z "$no_libsocket" ; then
341 AC_CHECK_LIB(socket, main, , )
342fi
343 359
344dnl SCO OS3 needs this for libwrap 360dnl SCO OS3 needs this for libwrap
345AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc) 361if test "x$with_tcp_wrappers" != "xno" ; then
362 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
363 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
364 fi
365fi
366
367AC_CHECK_FUNC(getspnam, ,
368 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
369AC_CHECK_FUNC(login, ,
370 AC_CHECK_LIB(util, login,
371 AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil"))
372
373dnl zlib is required
374AC_ARG_WITH(zlib,
375 [ --with-zlib=PATH Use zlib in PATH],
376 [
377 if test -d "$withval/lib"; then
378 if test -n "${need_dash_r}"; then
379 LDFLAGS="${LDFLAGS} -L$withval/lib -R$withval/lib"
380 else
381 LDFLAGS="${LDFLAGS} -L$withval/lib"
382 fi
383 else
384 if test -n "${need_dash_r}"; then
385 LDFLAGS="${LDFLAGS} -L$withval -R$withval"
386 else
387 LDFLAGS="${LDFLAGS} -L$withval"
388 fi
389 fi
390 if test -d "$withval/include"; then
391 CPPFLAGS="${CPPFLAGS} -I$withval/include"
392 else
393 CPPFLAGS="${CPPFLAGS} -I$withval"
394 fi
395 ]
396)
397
398AC_CHECK_HEADER(zlib.h,
399 AC_CHECK_LIB(z, gzread, ,
400 AC_MSG_ERROR([*** zlib missing. install first or check config.log ***])),
401 AC_MSG_ERROR([*** zlib missing. install first or check config.log ***]))
346 402
347AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
348AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
349AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
350 403
351# We don't want to check if we did an pcre override. 404# We don't want to check if we did an pcre override.
352if test -z "$no_comp_check" ; then 405if test -z "$no_comp_check" ; then
@@ -376,7 +429,16 @@ AC_CHECK_FUNC(utimes,
376AC_FUNC_STRFTIME 429AC_FUNC_STRFTIME
377 430
378# Checks for header files. 431# Checks for header files.
379AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h) 432AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
433 getopt.h glob.h lastlog.h libgen.h limits.h login.h \
434 login_cap.h maillock.h netdb.h netgroup.h \
435 netinet/in_systm.h paths.h poll.h pty.h regex.h \
436 security/pam_appl.h shadow.h stddef.h stdint.h \
437 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
438 sys/poll.h sys/queue.h sys/select.h sys/stat.h \
439 sys/stropts.h sys/sysmacros.h sys/time.h \
440 sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \
441 util.h utime.h utmp.h utmpx.h)
380 442
381# Check for ALTDIRFUNC glob() extension 443# Check for ALTDIRFUNC glob() extension
382AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) 444AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
@@ -429,7 +491,8 @@ int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
429# Check whether user wants S/Key support 491# Check whether user wants S/Key support
430SKEY_MSG="no" 492SKEY_MSG="no"
431AC_ARG_WITH(skey, 493AC_ARG_WITH(skey,
432 [ --with-skey=PATH Enable S/Key support], 494 [ --with-skey[[=PATH]] Enable S/Key support
495 (optionally in PATH)],
433 [ 496 [
434 if test "x$withval" != "xno" ; then 497 if test "x$withval" != "xno" ; then
435 498
@@ -452,12 +515,36 @@ AC_ARG_WITH(skey,
452) 515)
453 516
454# Check whether user wants TCP wrappers support 517# Check whether user wants TCP wrappers support
455TCPW_MSG="no" 518TCPW_MSG="no"
456AC_ARG_WITH(tcp-wrappers, 519AC_ARG_WITH(tcp-wrappers,
457 [ --with-tcp-wrappers Enable tcpwrappers support], 520 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
521 (optionally in PATH)],
458 [ 522 [
459 if test "x$withval" != "xno" ; then 523 if test "x$withval" != "xno" ; then
460 saved_LIBS="$LIBS" 524 saved_LIBS="$LIBS"
525 saved_LDFLAGS="$LDFLAGS"
526 saved_CPPFLAGS="$CPPFLAGS"
527 if test -n "${withval}" -a "${withval}" != "yes"; then
528 if test -d "${withval}/lib"; then
529 if test -n "${need_dash_r}"; then
530 LDFLAGS="$LDFLAGS -L${withval}/lib -R${withval}/lib"
531 else
532 LDFLAGS="$LDFLAGS -L${withval}/lib"
533 fi
534 else
535 if test -n "${need_dash_r}"; then
536 LDFLAGS="$LDFLAGS -L${withval} -R${withval}"
537 else
538 LDFLAGS="$LDFLAGS -L${withval}"
539 fi
540 fi
541 if test -d "${withval}/include"; then
542 CPPFLAGS="$CPPFLAGS -I${withval}/include"
543 else
544 CPPFLAGS="$CPPFLAGS -I${withval}"
545 fi
546 TCPW_MSG="yes"
547 fi
461 LIBS="-lwrap $LIBS" 548 LIBS="-lwrap $LIBS"
462 AC_MSG_CHECKING(for libwrap) 549 AC_MSG_CHECKING(for libwrap)
463 AC_TRY_LINK( 550 AC_TRY_LINK(
@@ -469,7 +556,7 @@ AC_ARG_WITH(tcp-wrappers,
469 [ 556 [
470 AC_MSG_RESULT(yes) 557 AC_MSG_RESULT(yes)
471 AC_DEFINE(LIBWRAP) 558 AC_DEFINE(LIBWRAP)
472 TCPW_MSG="yes" 559 TCPW_MSG="yes"
473 ], 560 ],
474 [ 561 [
475 AC_MSG_ERROR([*** libwrap missing]) 562 AC_MSG_ERROR([*** libwrap missing])
@@ -480,7 +567,51 @@ AC_ARG_WITH(tcp-wrappers,
480) 567)
481 568
482dnl Checks for library functions. 569dnl Checks for library functions.
483AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop) 570AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa \
571 clock fchmod fchown freeaddrinfo futimes gai_strerror \
572 getaddrinfo getcwd getgrouplist getnameinfo getopt \
573 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
574 inet_ntop innetgr login_getcapbool md5_crypt memmove \
575 mkdtemp on_exit openpty readpassphrase realpath \
576 rresvport_af setdtablesize setegid setenv seteuid \
577 setlogin setproctitle setresgid setreuid setrlimit \
578 setsid setvbuf sigaction sigvec snprintf strerror \
579 strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \
580 vhangup vsnprintf waitpid __b64_ntop _getpty)
581
582dnl IRIX and Solaris 2.5.1 have dirname() in libgen
583AC_CHECK_FUNCS(dirname, ,[
584 AC_CHECK_LIB(gen, dirname,[
585 AC_CACHE_CHECK([for broken dirname],
586 ac_cv_have_broken_dirname, [
587 AC_TRY_RUN(
588 [
589#include <libgen.h>
590#include <string.h>
591
592int main(int argc, char **argv) {
593 char *s, buf[32];
594
595 strncpy(buf,"/etc", 32);
596 s = dirname(buf);
597 if (s && s[0] == '\0') {
598 exit(1);
599 } else {
600 exit(0);
601 }
602}
603 ],
604 [ ac_cv_have_broken_dirname="no" ],
605 [ ac_cv_have_broken_dirname="yes" ]
606 )
607 ])
608 if test "x$ac_cv_have_getopt_optreset" = "xno" ; then
609 LIBS="$LIBS -lgen"
610 AC_DEFINE(HAVE_DIRNAME)
611 fi
612 ])
613])
614
484dnl Checks for time functions 615dnl Checks for time functions
485AC_CHECK_FUNCS(gettimeofday time) 616AC_CHECK_FUNCS(gettimeofday time)
486dnl Checks for libutil functions 617dnl Checks for libutil functions
@@ -928,20 +1059,7 @@ if test "x$ac_cv_have_u_char" = "xyes" ; then
928 AC_DEFINE(HAVE_U_CHAR) 1059 AC_DEFINE(HAVE_U_CHAR)
929fi 1060fi
930 1061
931AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [ 1062TYPE_SOCKLEN_T
932 AC_TRY_COMPILE(
933 [
934#include <sys/types.h>
935#include <sys/socket.h>
936 ],
937 [socklen_t foo; foo = 1235;],
938 [ ac_cv_have_socklen_t="yes" ],
939 [ ac_cv_have_socklen_t="no" ]
940 )
941])
942if test "x$ac_cv_have_socklen_t" = "xyes" ; then
943 AC_DEFINE(HAVE_SOCKLEN_T)
944fi
945 1063
946AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ 1064AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
947 AC_TRY_COMPILE( 1065 AC_TRY_COMPILE(
@@ -1168,7 +1286,8 @@ OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1168OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) 1286OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1169OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) 1287OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1170OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) 1288OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
1171AC_STRUCT_ST_BLKSIZE 1289
1290AC_CHECK_MEMBERS([struct stat.st_blksize])
1172 1291
1173AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], 1292AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1174 ac_cv_have_ss_family_in_struct_ss, [ 1293 ac_cv_have_ss_family_in_struct_ss, [
@@ -2045,7 +2164,8 @@ fi
2045 2164
2046AC_EXEEXT 2165AC_EXEEXT
2047 2166
2048AC_OUTPUT(Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds) 2167AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2168AC_OUTPUT
2049 2169
2050# Print summary of options 2170# Print summary of options
2051 2171