summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-08 20:49:37 +1000
committerDamien Miller <djm@mindrot.org>2000-05-08 20:49:37 +1000
commit61e50f10c276009bf9472fdd797bf6be60fc2a83 (patch)
tree1ae3e2eacd6fba48e06e38cdf0570d97cb8a04bf
parent6d48871fafed89fe878f44744a1abc0f5a47afb4 (diff)
- Configure caching and cleanup patch from Andre Lucas'
<andre.lucas@dial.pipex.com>
-rw-r--r--ChangeLog3
-rw-r--r--aclocal.m440
-rw-r--r--configure.in461
3 files changed, 266 insertions, 238 deletions
diff --git a/ChangeLog b/ChangeLog
index a525273d2..e3f5c71d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
9 - interop w/ SecureFX 9 - interop w/ SecureFX
10 - Release 2.0.0beta2 10 - Release 2.0.0beta2
11 11
12 - Configure caching and cleanup patch from Andre Lucas'
13 <andre.lucas@dial.pipex.com>
14
1220000507 1520000507
13 - Remove references to SSLeay. 16 - Remove references to SSLeay.
14 - Big OpenBSD CVS update 17 - Big OpenBSD CVS update
diff --git a/aclocal.m4 b/aclocal.m4
index 65783346b..16345e122 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,15 +1,45 @@
1dnl $Id: aclocal.m4,v 1.1 2000/05/01 23:57:51 damien Exp $ 1dnl $Id: aclocal.m4,v 1.2 2000/05/08 10:49:37 damien Exp $
2dnl 2dnl
3dnl OpenSSH-specific autoconf macros 3dnl OpenSSH-specific autoconf macros
4dnl 4dnl
5 5
6dnl AC_PATH_ENTROPY_PROG(variablename, command): 6
7dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
8dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
9dnl If found, set 'symbol' to be defined. Cache the result.
10dnl TODO: This is not foolproof, better to compile and read from there
11AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
12# look for field '$1' in header '$2'
13 dnl This strips characters illegal to m4 from the header filename
14 ossh_safe=`echo "$2" | sed 'y%./+-%__p_%'`
15 dnl
16 ossh_varname="ossh_cv_$ossh_safe""_has_"$1
17 AC_MSG_CHECKING(for $1 field in $2)
18 AC_CACHE_VAL($ossh_varname, [
19 AC_EGREP_HEADER($1, $2, [ dnl
20 eval "$ossh_varname=yes" dnl
21 ], [ dnl
22 eval "$ossh_varname=no" dnl
23 ]) dnl
24 ])
25 ossh_result=`eval "echo "$"$ossh_varname"`
26 if test -n "`echo $ossh_varname`"; then
27 AC_MSG_RESULT($ossh_result)
28 if test "x$ossh_result" = "xyes"; then
29 AC_DEFINE($3)
30 fi
31 else
32 AC_MSG_RESULT(no)
33 fi
34])
35
36dnl OSSH_PATH_ENTROPY_PROG(variablename, command):
7dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST 37dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST
8AC_DEFUN(AC_PATH_ENTROPY_PROG, [ 38AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [
9 AC_PATH_PROG([$1], [$2]) 39 AC_PATH_PROG($1, $2)
10 if test -z "[$]$1" ; then 40 if test -z "[$]$1" ; then
11 $1="undef" 41 $1="undef"
12 fi 42 fi
13 AC_SUBST([$1]) 43 AC_SUBST($1)
14]) 44])
15 45
diff --git a/configure.in b/configure.in
index 1b099c6b8..ef8495200 100644
--- a/configure.in
+++ b/configure.in
@@ -196,28 +196,29 @@ saved_CFLAGS="$CFLAGS"
196if test "x$prefix" != "xNONE" ; then 196if test "x$prefix" != "xNONE" ; then
197 tryssldir="$tryssldir $prefix" 197 tryssldir="$tryssldir $prefix"
198fi 198fi
199AC_MSG_CHECKING([for OpenSSL directory]) 199AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
200for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do 200
201 if test ! -z "$ssldir" ; then 201 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
202 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" 202 if test ! -z "$ssldir" ; then
203 CFLAGS="$saved_CFLAGS -I$ssldir/include" 203 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
204 if test ! -z "$need_dash_r" ; then 204 CFLAGS="$saved_CFLAGS -I$ssldir/include"
205 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" 205 if test ! -z "$need_dash_r" ; then
206 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
207 fi
208 else
209 LDFLAGS="$saved_LDFLAGS"
206 fi 210 fi
207 else
208 LDFLAGS="$saved_LDFLAGS"
209 fi
210 211
211 for WANTS_RSAREF in "" 1 ; do 212 for WANTS_RSAREF in "" 1 ; do
212 213
213 if test -z "$WANTS_RSAREF" ; then 214 if test -z "$WANTS_RSAREF" ; then
214 LIBS="$saved_LIBS -lcrypto" 215 LIBS="$saved_LIBS -lcrypto"
215 else 216 else
216 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref" 217 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
217 fi 218 fi
218 219
219 AC_TRY_RUN( 220 AC_TRY_RUN(
220 [ 221 [
221#include <string.h> 222#include <string.h>
222#include <openssl/rand.h> 223#include <openssl/rand.h>
223#include <openssl/rsa.h> 224#include <openssl/rsa.h>
@@ -232,26 +233,33 @@ int main(void)
232 if (key==NULL) return(1); 233 if (key==NULL) return(1);
233 return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING)); 234 return(-1==RSA_private_decrypt(RSA_size(key),a,b,key,RSA_NO_PADDING));
234} 235}
235 ], 236 ],
236 [ 237 [
237 AC_DEFINE(HAVE_OPENSSL) 238 found_crypto=1
238 found_crypto=1 239 break;
239 break; 240 ], []
240 ], [] 241 )
241 ) 242 done
243
244 if test ! -z "$found_crypto" ; then
245 break;
246 fi
242 done 247 done
243 248
244 if test ! -z "$found_crypto" ; then 249 if test -z "$found_crypto" ; then
245 break; 250 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
251 fi
252 if test -z "$ssldir" ; then
253 ssldir="(system)"
246 fi 254 fi
247done
248 255
249if test -z "$found_crypto" ; then 256 ac_cv_openssldir=$ssldir
250 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install]) 257])
251fi 258
252if test -z "$ssldir" ; then 259if test ! -z "$ac_cv_openssldir" -a ! "x$ac_cv_openssldir" = "x(system)" ; then
253 ssldir="(system)" 260 AC_DEFINE(HAVE_OPENSSL)
254else 261 dnl Need to recover ssldir - test above runs in subshell
262 ssldir=$ac_cv_openssldir
255 CFLAGS="$saved_CFLAGS -I$ssldir/include" 263 CFLAGS="$saved_CFLAGS -I$ssldir/include"
256 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" 264 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
257 if test ! -z "$need_dash_r" ; then 265 if test ! -z "$need_dash_r" ; then
@@ -266,7 +274,7 @@ if test -z "$WANTS_RSAREF" ; then
266else 274else
267 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref" 275 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
268fi 276fi
269AC_MSG_RESULT($ssldir) 277
270 278
271# Checks for data types 279# Checks for data types
272AC_CHECK_SIZEOF(char, 1) 280AC_CHECK_SIZEOF(char, 1)
@@ -276,36 +284,41 @@ AC_CHECK_SIZEOF(long int, 4)
276AC_CHECK_SIZEOF(long long int, 8) 284AC_CHECK_SIZEOF(long long int, 8)
277 285
278# More checks for data types 286# More checks for data types
279AC_MSG_CHECKING([for intXX_t types]) 287AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
280AC_TRY_COMPILE( 288 AC_TRY_COMPILE(
281 [#include <sys/types.h>], 289 [ #include <sys/types.h> ],
282 [int8_t a; int16_t b; int32_t c; a = b = c = 1;], 290 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
283 [ 291 [ ac_cv_have_intxx_t="yes" ],
284 AC_DEFINE(HAVE_INTXX_T) 292 [ ac_cv_have_intxx_t="no" ]
285 AC_MSG_RESULT(yes) 293 )
286 have_intxx_t=1 294])
287 ], 295if test "x$ac_cv_have_intxx_t" = "xyes" ; then
288 [AC_MSG_RESULT(no)] 296 AC_DEFINE(HAVE_INTXX_T)
289) 297 have_intxx_t=1
298fi
299
300AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
301 AC_TRY_COMPILE(
302 [ #include <sys/types.h> ],
303 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
304 [ ac_cv_have_u_intxx_t="yes" ],
305 [ ac_cv_have_u_intxx_t="no" ]
306 )
307])
308if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
309 AC_DEFINE(HAVE_U_INTXX_T)
310 have_u_intxx_t=1
311fi
290 312
291AC_MSG_CHECKING([for u_intXX_t types])
292AC_TRY_COMPILE(
293 [#include <sys/types.h>],
294 [u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
295 [
296 AC_DEFINE(HAVE_U_INTXX_T)
297 AC_MSG_RESULT(yes)
298 have_u_intxx_t=1
299 ],
300 [AC_MSG_RESULT(no)]
301)
302 313
303if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \ 314if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \
304 "x$ac_cv_header_sys_bitypes_h" = "xyes" 315 "x$ac_cv_header_sys_bitypes_h" = "xyes"
305then 316then
306 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) 317 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
307 AC_TRY_COMPILE( 318 AC_TRY_COMPILE(
308 [#include <sys/bitypes.h>], 319 [
320#include <sys/bitypes.h>
321 ],
309 [ 322 [
310 int8_t a; int16_t b; int32_t c; 323 int8_t a; int16_t b; int32_t c;
311 u_int8_t e; u_int16_t f; u_int32_t g; 324 u_int8_t e; u_int16_t f; u_int32_t g;
@@ -321,189 +334,171 @@ then
321fi 334fi
322 335
323if test -z "$have_u_intxx_t" ; then 336if test -z "$have_u_intxx_t" ; then
324 AC_MSG_CHECKING([for uintXX_t types]) 337 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
338 AC_TRY_COMPILE(
339 [
340#include <sys/types.h>
341 ],
342 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
343 [ ac_cv_have_uintxx_t="yes" ],
344 [ ac_cv_have_uintxx_t="no" ]
345 )
346 ])
347 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
348 AC_DEFINE(HAVE_UINTXX_T)
349 fi
350fi
351
352AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
325 AC_TRY_COMPILE( 353 AC_TRY_COMPILE(
326 [#include <sys/types.h>],
327 [uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
328 [ 354 [
329 AC_DEFINE(HAVE_UINTXX_T) 355#include <sys/types.h>
330 AC_MSG_RESULT(yes) 356#include <sys/socket.h>
331 ], 357 ],
332 [AC_MSG_RESULT(no)] 358 [socklen_t foo; foo = 1235;],
333 ) 359 [ ac_cv_have_socklen_t="yes" ],
360 [ ac_cv_have_socklen_t="no" ]
361 )
362])
363if test "x$ac_cv_have_socklen_t" = "xyes" ; then
364 AC_DEFINE(HAVE_SOCKLEN_T)
334fi 365fi
335 366
336AC_MSG_CHECKING([for socklen_t]) 367AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
337AC_TRY_COMPILE( 368 AC_TRY_COMPILE(
338 [ 369 [
339#include <sys/types.h> 370#include <sys/types.h>
340#include <sys/socket.h> 371 ],
341 ], 372 [ size_t foo; foo = 1235; ],
342 [socklen_t foo; foo = 1235;], 373 [ ac_cv_have_size_t="yes" ],
343 [ 374 [ ac_cv_have_size_t="no" ]
344 AC_DEFINE(HAVE_SOCKLEN_T) 375 )
345 AC_MSG_RESULT(yes) 376])
346 ], 377if test "x$ac_cv_have_size_t" = "xyes" ; then
347 [AC_MSG_RESULT(no)] 378 AC_DEFINE(HAVE_SIZE_T)
348) 379fi
349 380
350AC_MSG_CHECKING([for size_t])
351AC_TRY_COMPILE(
352 [#include <sys/types.h>],
353 [size_t foo; foo = 1235;],
354 [
355 AC_DEFINE(HAVE_SIZE_T)
356 AC_MSG_RESULT(yes)
357 ],
358 [AC_MSG_RESULT(no)]
359)
360 381
361AC_MSG_CHECKING([for struct sockaddr_storage]) 382AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
362AC_TRY_COMPILE( 383 AC_TRY_COMPILE(
363 [ 384 [
364#include <sys/types.h> 385#include <sys/types.h>
365#include <sys/socket.h> 386#include <sys/socket.h>
366 ], 387 ],
367 [struct sockaddr_storage s;], 388 [ struct sockaddr_storage s; ],
368 [ 389 [ ac_cv_have_struct_sockaddr_storage="yes" ],
369 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) 390 [ ac_cv_have_struct_sockaddr_storage="no" ]
370 AC_MSG_RESULT(yes) 391 )
371 ], 392])
372 [AC_MSG_RESULT(no)] 393if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
373) 394 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
395fi
374 396
375AC_MSG_CHECKING([for struct sockaddr_in6]) 397AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
376AC_TRY_COMPILE( 398 AC_TRY_COMPILE(
377 [#include <netinet/in.h>], 399 [
378 [struct sockaddr_in6 s; s.sin6_family = 0;], 400#include <netinet/in.h>
379 [ 401 ],
380 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) 402 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
381 AC_MSG_RESULT(yes) 403 [ ac_cv_have_struct_sockaddr_in6="yes" ],
382 ], 404 [ ac_cv_have_struct_sockaddr_in6="no" ]
383 [AC_MSG_RESULT(no)] 405 )
384) 406])
407if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
408 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
409fi
385 410
386AC_MSG_CHECKING([for struct in6_addr]) 411AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
387AC_TRY_COMPILE( 412 AC_TRY_COMPILE(
388 [#include <netinet/in.h>], 413 [
389 [struct in6_addr s; s.s6_addr[0] = 0;], 414#include <netinet/in.h>
390 [ 415 ],
391 AC_DEFINE(HAVE_STRUCT_IN6_ADDR) 416 [ struct in6_addr s; s.s6_addr[0] = 0; ],
392 AC_MSG_RESULT(yes) 417 [ ac_cv_have_struct_in6_addr="yes" ],
393 ], 418 [ ac_cv_have_struct_in6_addr="no" ]
394 [AC_MSG_RESULT(no)] 419 )
395) 420])
421if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
422 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
423fi
396 424
397AC_MSG_CHECKING([for struct addrinfo]) 425AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
398AC_TRY_COMPILE( 426 AC_TRY_COMPILE(
399 [ 427 [
400#include <sys/types.h> 428#include <sys/types.h>
401#include <sys/socket.h> 429#include <sys/socket.h>
402#include <netdb.h> 430#include <netdb.h>
403 ], 431 ],
404 [struct addrinfo s; s.ai_flags = AI_PASSIVE;], 432 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
405 [ 433 [ ac_cv_have_struct_addrinfo="yes" ],
406 AC_DEFINE(HAVE_STRUCT_ADDRINFO) 434 [ ac_cv_have_struct_addrinfo="no" ]
407 AC_MSG_RESULT(yes) 435 )
408 ], 436])
409 [AC_MSG_RESULT(no)] 437if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
410) 438 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
439fi
440
411 441
412# Checks for structure members 442# Checks for structure members
413AC_MSG_CHECKING([whether utmp.h has ut_host field])
414AC_EGREP_HEADER(ut_host, utmp.h,
415 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
416 [AC_MSG_RESULT(no)]
417)
418AC_MSG_CHECKING([whether utmpx.h has ut_host field])
419AC_EGREP_HEADER(ut_host, utmpx.h,
420 [AC_DEFINE(HAVE_HOST_IN_UTMPX) AC_MSG_RESULT(yes); ],
421 [AC_MSG_RESULT(no)]
422)
423AC_MSG_CHECKING([whether utmpx.h has syslen field])
424AC_EGREP_HEADER(syslen, utmpx.h,
425 [AC_DEFINE(HAVE_SYSLEN_IN_UTMPX) AC_MSG_RESULT(yes); ],
426 [AC_MSG_RESULT(no)]
427)
428AC_MSG_CHECKING([whether utmp.h has ut_pid field])
429AC_EGREP_HEADER(ut_pid, utmp.h,
430 [AC_DEFINE(HAVE_PID_IN_UTMP) AC_MSG_RESULT(yes); ],
431 [AC_MSG_RESULT(no)]
432)
433AC_MSG_CHECKING([whether utmp.h has ut_type field])
434AC_EGREP_HEADER(ut_type, utmp.h,
435 [AC_DEFINE(HAVE_TYPE_IN_UTMP) AC_MSG_RESULT(yes); ],
436 [AC_MSG_RESULT(no)]
437)
438AC_MSG_CHECKING([whether utmp.h has ut_tv field])
439AC_EGREP_HEADER(ut_tv, utmp.h,
440 [AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ],
441 [AC_MSG_RESULT(no)]
442)
443AC_MSG_CHECKING([whether utmp.h has ut_id field])
444AC_EGREP_HEADER(ut_id, utmp.h,
445 [AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ],
446 [AC_MSG_RESULT(no)]
447)
448AC_MSG_CHECKING([whether utmp.h has ut_addr field])
449AC_EGREP_HEADER(ut_addr, utmp.h,
450 [AC_DEFINE(HAVE_ADDR_IN_UTMP) AC_MSG_RESULT(yes); ],
451 [AC_MSG_RESULT(no)]
452)
453AC_MSG_CHECKING([whether utmpx.h has ut_addr field])
454AC_EGREP_HEADER(ut_addr, utmpx.h,
455 [AC_DEFINE(HAVE_ADDR_IN_UTMPX) AC_MSG_RESULT(yes); ],
456 [AC_MSG_RESULT(no)]
457)
458AC_MSG_CHECKING([whether utmp.h has ut_addr_v6 field])
459AC_EGREP_HEADER(ut_addr_v6, utmp.h,
460 [AC_DEFINE(HAVE_ADDR_V6_IN_UTMP) AC_MSG_RESULT(yes); ],
461 [AC_MSG_RESULT(no)]
462)
463AC_MSG_CHECKING([whether utmpx.h has ut_addr_v6 field])
464AC_EGREP_HEADER(ut_addr_v6, utmpx.h,
465 [AC_DEFINE(HAVE_ADDR_V6_IN_UTMPX) AC_MSG_RESULT(yes); ],
466 [AC_MSG_RESULT(no)]
467)
468 443
469AC_MSG_CHECKING([whether struct sockaddr_storage has ss_family field]) 444OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
470AC_TRY_COMPILE( 445OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
471 [ 446OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
447OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
448OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
449OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
450OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
451OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
452OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
453OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
454OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
455
456
457AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
458 ac_cv_have_ss_family_in_struct_ss, [
459 AC_TRY_COMPILE(
460 [
472#include <sys/types.h> 461#include <sys/types.h>
473#include <sys/socket.h> 462#include <sys/socket.h>
474 ], 463 ],
475 [struct sockaddr_storage s; s.ss_family = 1;], 464 [ struct sockaddr_storage s; s.ss_family = 1; ],
476 [ 465 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
477 AC_DEFINE(HAVE_SS_FAMILY_IN_SS) 466 [ ac_cv_have_ss_family_in_struct_ss="no" ],
478 AC_MSG_RESULT(yes) 467 )
479 ], 468])
480 [AC_MSG_RESULT(no)] 469if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
481) 470 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
482AC_MSG_CHECKING([whether struct sockaddr_storage has __ss_family field]) 471fi
483AC_TRY_COMPILE( 472
484 [ 473
474AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
475 ac_cv_have___ss_family_in_struct_ss, [
476 AC_TRY_COMPILE(
477 [
485#include <sys/types.h> 478#include <sys/types.h>
486#include <sys/socket.h> 479#include <sys/socket.h>
487 ], 480 ],
488 [struct sockaddr_storage s; s.__ss_family = 1;], 481 [ struct sockaddr_storage s; s.__ss_family = 1; ],
489 [ 482 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
490 AC_DEFINE(HAVE___SS_FAMILY_IN_SS) 483 [ ac_cv_have___ss_family_in_struct_ss="no" ]
491 AC_MSG_RESULT(yes) 484 )
492 ], 485])
493 [AC_MSG_RESULT(no)] 486if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
494) 487 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
488fi
489
490
491AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
492 AC_TRY_LINK([],
493 [ extern char *__progname; printf("%s", __progname); ],
494 [ ac_cv_libc_defines___progname="yes" ],
495 [ ac_cv_libc_defines___progname="no" ]
496 )
497])
498if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
499 AC_DEFINE(HAVE___PROGNAME)
500fi
495 501
496AC_MSG_CHECKING([whether libc defines __progname])
497AC_TRY_LINK([],
498 [extern char *__progname; printf("%s", __progname);],
499 [
500 AC_DEFINE(HAVE___PROGNAME)
501 AC_MSG_RESULT(yes)
502 ],
503 [
504 AC_MSG_RESULT(no)
505 ]
506)
507 502
508# Looking for programs, paths and files 503# Looking for programs, paths and files
509AC_ARG_WITH(rsh, 504AC_ARG_WITH(rsh,
@@ -642,21 +637,21 @@ INSTALL_SSH_PRNG_CMDS=""
642rm -f prng_commands 637rm -f prng_commands
643if test -z "$RANDOM_POOL" -a -z "$EGD_SOCKET" ; then 638if test -z "$RANDOM_POOL" -a -z "$EGD_SOCKET" ; then
644 # Use these commands to collect entropy 639 # Use these commands to collect entropy
645 AC_PATH_ENTROPY_PROG(PROG_LS, ls) 640 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
646 AC_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) 641 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
647 AC_PATH_ENTROPY_PROG(PROG_ARP, arp) 642 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
648 AC_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig) 643 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
649 AC_PATH_ENTROPY_PROG(PROG_PS, ps) 644 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
650 AC_PATH_ENTROPY_PROG(PROG_W, w) 645 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
651 AC_PATH_ENTROPY_PROG(PROG_WHO, who) 646 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
652 AC_PATH_ENTROPY_PROG(PROG_LAST, last) 647 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
653 AC_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog) 648 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
654 AC_PATH_ENTROPY_PROG(PROG_DF, df) 649 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
655 AC_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat) 650 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
656 AC_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) 651 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
657 AC_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) 652 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
658 AC_PATH_ENTROPY_PROG(PROG_TAIL, tail) 653 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
659 AC_PATH_ENTROPY_PROG(PROG_LS, ls) 654 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
660 655
661 INSTALL_SSH_PRNG_CMDS="yes" 656 INSTALL_SSH_PRNG_CMDS="yes"
662fi 657fi
@@ -844,7 +839,7 @@ AC_ARG_WITH(ipv4-default,
844 ] 839 ]
845) 840)
846 841
847AC_MSG_CHECKING([to convert IPv4 in IPv6-mapped addresses]) 842AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
848AC_ARG_WITH(4in6, 843AC_ARG_WITH(4in6,
849 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses], 844 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
850 [ 845 [