diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | Makefile.in | 5 | ||||
-rw-r--r-- | acconfig.h | 3 | ||||
-rw-r--r-- | aclocal.m4 | 43 | ||||
-rw-r--r-- | configure.in | 224 | ||||
-rw-r--r-- | defines.h | 7 | ||||
-rw-r--r-- | scp.c | 6 |
7 files changed, 238 insertions, 67 deletions
@@ -1,3 +1,18 @@ | |||
1 | 20011021 | ||
2 | - (tim) [configure.in] Clean up library testing. Add optional PATH to | ||
3 | --with-pcre, --with-zlib, and --with-tcp-wrappers. Based on | ||
4 | patch by albert chin (china@thewrittenword.com) | ||
5 | Re-arange AC_CHECK_HEADERS and AC_CHECK_FUNCS for eaiser reading | ||
6 | of patches to configure.in. Replace obsolete AC_STRUCT_ST_BLKSIZE | ||
7 | with AC_CHECK_MEMBERS. Add test for broken dirname() on | ||
8 | Solaris 2.5.1 by Dan Astoorian <djast@cs.toronto.edu> | ||
9 | [acconfig.h aclocal.m4 defines.h configure.in] Better socklen_t test. | ||
10 | patch by albert chin (china@thewrittenword.com) | ||
11 | [scp.c] Replace obsolete HAVE_ST_BLKSIZE with | ||
12 | HAVE_STRUCT_STAT_ST_BLKSIZE. | ||
13 | [Makefile.in] When running make in top level, always do make | ||
14 | in openbsd-compat. patch by Dave Dykstra <dwd@bell-labs.com> | ||
15 | |||
1 | 20011019 | 16 | 20011019 |
2 | - (bal) Fixed up init.d symlink issue and piddir stuff. Patches by | 17 | - (bal) Fixed up init.d symlink issue and piddir stuff. Patches by |
3 | Zoran Milojevic <Zoran.Milojevic@SS8.com> and j.petersen@msh.de | 18 | Zoran Milojevic <Zoran.Milojevic@SS8.com> and j.petersen@msh.de |
@@ -6725,4 +6740,4 @@ | |||
6725 | - Wrote replacements for strlcpy and mkdtemp | 6740 | - Wrote replacements for strlcpy and mkdtemp |
6726 | - Released 1.0pre1 | 6741 | - Released 1.0pre1 |
6727 | 6742 | ||
6728 | $Id: ChangeLog,v 1.1609 2001/10/19 20:36:23 mouring Exp $ | 6743 | $Id: ChangeLog,v 1.1610 2001/10/22 00:53:58 tim Exp $ |
diff --git a/Makefile.in b/Makefile.in index 640fe5abd..9bf8a425c 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: Makefile.in,v 1.188 2001/10/12 09:15:28 djm Exp $ | 1 | # $Id: Makefile.in,v 1.189 2001/10/22 00:53:59 tim Exp $ |
2 | 2 | ||
3 | prefix=@prefix@ | 3 | prefix=@prefix@ |
4 | exec_prefix=@exec_prefix@ | 4 | exec_prefix=@exec_prefix@ |
@@ -86,8 +86,9 @@ $(SSHDOBJS): config.h | |||
86 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< | 86 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< |
87 | 87 | ||
88 | LIBCOMPAT=openbsd-compat/libopenbsd-compat.a | 88 | LIBCOMPAT=openbsd-compat/libopenbsd-compat.a |
89 | $(LIBCOMPAT): config.h | 89 | $(LIBCOMPAT): always |
90 | (cd openbsd-compat; $(MAKE)) | 90 | (cd openbsd-compat; $(MAKE)) |
91 | always: | ||
91 | 92 | ||
92 | libssh.a: $(LIBSSH_OBJS) | 93 | libssh.a: $(LIBSSH_OBJS) |
93 | $(AR) rv $@ $(LIBSSH_OBJS) | 94 | $(AR) rv $@ $(LIBSSH_OBJS) |
diff --git a/acconfig.h b/acconfig.h index 0c1417885..afebfa5db 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: acconfig.h,v 1.117 2001/09/20 19:43:41 stevesk Exp $ */ | 1 | /* $Id: acconfig.h,v 1.118 2001/10/22 00:53:59 tim Exp $ */ |
2 | 2 | ||
3 | #ifndef _CONFIG_H | 3 | #ifndef _CONFIG_H |
4 | #define _CONFIG_H | 4 | #define _CONFIG_H |
@@ -251,7 +251,6 @@ | |||
251 | #undef HAVE_INT64_T | 251 | #undef HAVE_INT64_T |
252 | #undef HAVE_U_INT64_T | 252 | #undef HAVE_U_INT64_T |
253 | #undef HAVE_U_CHAR | 253 | #undef HAVE_U_CHAR |
254 | #undef HAVE_SOCKLEN_T | ||
255 | #undef HAVE_SIZE_T | 254 | #undef HAVE_SIZE_T |
256 | #undef HAVE_SSIZE_T | 255 | #undef HAVE_SSIZE_T |
257 | #undef HAVE_CLOCK_T | 256 | #undef HAVE_CLOCK_T |
diff --git a/aclocal.m4 b/aclocal.m4 index d196b7585..2705a9b23 100644 --- a/aclocal.m4 +++ b/aclocal.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | dnl $Id: aclocal.m4,v 1.4 2000/06/26 00:20:19 djm Exp $ | 1 | dnl $Id: aclocal.m4,v 1.5 2001/10/22 00:53:59 tim Exp $ |
2 | dnl | 2 | dnl |
3 | dnl OpenSSH-specific autoconf macros | 3 | dnl OpenSSH-specific autoconf macros |
4 | dnl | 4 | dnl |
@@ -43,3 +43,44 @@ AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [ | |||
43 | AC_SUBST($1) | 43 | AC_SUBST($1) |
44 | ]) | 44 | ]) |
45 | 45 | ||
46 | dnl Check for socklen_t: historically on BSD it is an int, and in | ||
47 | dnl POSIX 1g it is a type of its own, but some platforms use different | ||
48 | dnl types for the argument to getsockopt, getpeername, etc. So we | ||
49 | dnl have to test to find something that will work. | ||
50 | AC_DEFUN([TYPE_SOCKLEN_T], | ||
51 | [ | ||
52 | AC_CHECK_TYPE([socklen_t], ,[ | ||
53 | AC_MSG_CHECKING([for socklen_t equivalent]) | ||
54 | AC_CACHE_VAL([curl_cv_socklen_t_equiv], | ||
55 | [ | ||
56 | # Systems have either "struct sockaddr *" or | ||
57 | # "void *" as the second argument to getpeername | ||
58 | curl_cv_socklen_t_equiv= | ||
59 | for arg2 in "struct sockaddr" void; do | ||
60 | for t in int size_t unsigned long "unsigned long"; do | ||
61 | AC_TRY_COMPILE([ | ||
62 | #include <sys/types.h> | ||
63 | #include <sys/socket.h> | ||
64 | |||
65 | int getpeername (int, $arg2 *, $t *); | ||
66 | ],[ | ||
67 | $t len; | ||
68 | getpeername(0,0,&len); | ||
69 | ],[ | ||
70 | curl_cv_socklen_t_equiv="$t" | ||
71 | break | ||
72 | ]) | ||
73 | done | ||
74 | done | ||
75 | |||
76 | if test "x$curl_cv_socklen_t_equiv" = x; then | ||
77 | AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) | ||
78 | fi | ||
79 | ]) | ||
80 | AC_MSG_RESULT($curl_cv_socklen_t_equiv) | ||
81 | AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, | ||
82 | [type to use in place of socklen_t if not defined])], | ||
83 | [#include <sys/types.h> | ||
84 | #include <sys/socket.h>]) | ||
85 | ]) | ||
86 | |||
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 | ||
3 | AC_INIT(ssh.c) | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | ||
4 | 5 | ||
5 | AC_CONFIG_HEADER(config.h) | 6 | AC_CONFIG_HEADER(config.h) |
6 | AC_PROG_CC | 7 | AC_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 | ||
321 | AC_ARG_WITH(pcre, | 316 | AC_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. |
337 | if test -z "$no_libnsl" ; then | 357 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) |
338 | AC_CHECK_LIB(nsl, yp_match, , ) | 358 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
339 | fi | ||
340 | if test -z "$no_libsocket" ; then | ||
341 | AC_CHECK_LIB(socket, main, , ) | ||
342 | fi | ||
343 | 359 | ||
344 | dnl SCO OS3 needs this for libwrap | 360 | dnl SCO OS3 needs this for libwrap |
345 | AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc) | 361 | if 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 | ||
365 | fi | ||
366 | |||
367 | AC_CHECK_FUNC(getspnam, , | ||
368 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) | ||
369 | AC_CHECK_FUNC(login, , | ||
370 | AC_CHECK_LIB(util, login, | ||
371 | AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")) | ||
372 | |||
373 | dnl zlib is required | ||
374 | AC_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 | |||
398 | AC_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 | ||
347 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen") | ||
348 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])) | ||
349 | AC_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. |
352 | if test -z "$no_comp_check" ; then | 405 | if test -z "$no_comp_check" ; then |
@@ -376,7 +429,16 @@ AC_CHECK_FUNC(utimes, | |||
376 | AC_FUNC_STRFTIME | 429 | AC_FUNC_STRFTIME |
377 | 430 | ||
378 | # Checks for header files. | 431 | # Checks for header files. |
379 | AC_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) | 432 | AC_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 |
382 | AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) | 444 | AC_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 |
430 | SKEY_MSG="no" | 492 | SKEY_MSG="no" |
431 | AC_ARG_WITH(skey, | 493 | AC_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 |
455 | TCPW_MSG="no" | 518 | TCPW_MSG="no" |
456 | AC_ARG_WITH(tcp-wrappers, | 519 | AC_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 | ||
482 | dnl Checks for library functions. | 569 | dnl Checks for library functions. |
483 | AC_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) | 570 | AC_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 | |||
582 | dnl IRIX and Solaris 2.5.1 have dirname() in libgen | ||
583 | AC_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 | |||
592 | int 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 | |||
484 | dnl Checks for time functions | 615 | dnl Checks for time functions |
485 | AC_CHECK_FUNCS(gettimeofday time) | 616 | AC_CHECK_FUNCS(gettimeofday time) |
486 | dnl Checks for libutil functions | 617 | dnl 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) |
929 | fi | 1060 | fi |
930 | 1061 | ||
931 | AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [ | 1062 | TYPE_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 | ]) | ||
942 | if test "x$ac_cv_have_socklen_t" = "xyes" ; then | ||
943 | AC_DEFINE(HAVE_SOCKLEN_T) | ||
944 | fi | ||
945 | 1063 | ||
946 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ | 1064 | AC_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) | |||
1168 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) | 1286 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) |
1169 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) | 1287 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) |
1170 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) | 1288 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) |
1171 | AC_STRUCT_ST_BLKSIZE | 1289 | |
1290 | AC_CHECK_MEMBERS([struct stat.st_blksize]) | ||
1172 | 1291 | ||
1173 | AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], | 1292 | AC_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 | ||
2046 | AC_EXEEXT | 2165 | AC_EXEEXT |
2047 | 2166 | ||
2048 | AC_OUTPUT(Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds) | 2167 | AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) |
2168 | AC_OUTPUT | ||
2049 | 2169 | ||
2050 | # Print summary of options | 2170 | # Print summary of options |
2051 | 2171 | ||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _DEFINES_H | 1 | #ifndef _DEFINES_H |
2 | #define _DEFINES_H | 2 | #define _DEFINES_H |
3 | 3 | ||
4 | /* $Id: defines.h,v 1.72 2001/09/20 19:43:41 stevesk Exp $ */ | 4 | /* $Id: defines.h,v 1.73 2001/10/22 00:53:59 tim Exp $ */ |
5 | 5 | ||
6 | /* Necessary headers */ | 6 | /* Necessary headers */ |
7 | 7 | ||
@@ -243,11 +243,6 @@ typedef unsigned char u_char; | |||
243 | # define HAVE_U_CHAR | 243 | # define HAVE_U_CHAR |
244 | #endif /* HAVE_U_CHAR */ | 244 | #endif /* HAVE_U_CHAR */ |
245 | 245 | ||
246 | #ifndef HAVE_SOCKLEN_T | ||
247 | typedef unsigned int socklen_t; | ||
248 | # define HAVE_SOCKLEN_T | ||
249 | #endif /* HAVE_SOCKLEN_T */ | ||
250 | |||
251 | #ifndef HAVE_SIZE_T | 246 | #ifndef HAVE_SIZE_T |
252 | typedef unsigned int size_t; | 247 | typedef unsigned int size_t; |
253 | # define HAVE_SIZE_T | 248 | # define HAVE_SIZE_T |
@@ -1040,7 +1040,7 @@ allocbuf(bp, fd, blksize) | |||
1040 | int fd, blksize; | 1040 | int fd, blksize; |
1041 | { | 1041 | { |
1042 | size_t size; | 1042 | size_t size; |
1043 | #ifdef HAVE_ST_BLKSIZE | 1043 | #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE |
1044 | struct stat stb; | 1044 | struct stat stb; |
1045 | 1045 | ||
1046 | if (fstat(fd, &stb) < 0) { | 1046 | if (fstat(fd, &stb) < 0) { |
@@ -1052,9 +1052,9 @@ allocbuf(bp, fd, blksize) | |||
1052 | else | 1052 | else |
1053 | size = blksize + (stb.st_blksize - blksize % stb.st_blksize) % | 1053 | size = blksize + (stb.st_blksize - blksize % stb.st_blksize) % |
1054 | stb.st_blksize; | 1054 | stb.st_blksize; |
1055 | #else /* HAVE_ST_BLKSIZE */ | 1055 | #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ |
1056 | size = blksize; | 1056 | size = blksize; |
1057 | #endif /* HAVE_ST_BLKSIZE */ | 1057 | #endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ |
1058 | if (bp->cnt >= size) | 1058 | if (bp->cnt >= size) |
1059 | return (bp); | 1059 | return (bp); |
1060 | if (bp->buf == NULL) | 1060 | if (bp->buf == NULL) |