432 |
|
) |
433 |
|
dnl (end of code from openssh-3.2.2p1 configure.ac) |
434 |
|
|
435 |
+ |
dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK) |
436 |
+ |
dnl doesn't work or is unimplemented. On these systems (mostly older |
437 |
+ |
dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4] |
438 |
+ |
AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O], |
439 |
+ |
ac_cv_nonblocking_io, [ |
440 |
+ |
case "$host" in |
441 |
+ |
*-*-osf*) |
442 |
+ |
ac_cv_nonblocking_io=FIONBIO |
443 |
+ |
;; |
444 |
+ |
*-*-sunos4*) |
445 |
+ |
ac_cv_nonblocking_io=FIONBIO |
446 |
+ |
;; |
447 |
+ |
*-*-ultrix*) |
448 |
+ |
ac_cv_nonblocking_io=FIONBIO |
449 |
+ |
;; |
450 |
+ |
*) |
451 |
+ |
ac_cv_nonblocking_io=O_NONBLOCK |
452 |
+ |
;; |
453 |
+ |
esac |
454 |
+ |
]) |
455 |
+ |
if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then |
456 |
+ |
AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used]) |
457 |
+ |
fi |
458 |
+ |
|
459 |
+ |
dnl Check whether compiler supports byte bit-fields |
460 |
+ |
AC_CACHE_CHECK([whether compiler supports byte bit-fields], |
461 |
+ |
ac_cv_have_byte_bitfields, [ |
462 |
+ |
AC_LANG_SAVE |
463 |
+ |
AC_LANG_CPLUSPLUS |
464 |
+ |
AC_TRY_RUN([ |
465 |
+ |
struct A { |
466 |
+ |
unsigned char b1:4; |
467 |
+ |
unsigned char b2:4; |
468 |
+ |
unsigned char c; |
469 |
+ |
unsigned short s; |
470 |
+ |
unsigned char a[4]; |
471 |
+ |
}; |
472 |
+ |
|
473 |
+ |
int main(void) { |
474 |
+ |
A a; |
475 |
+ |
return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1)); |
476 |
+ |
}], |
477 |
+ |
[ac_cv_have_byte_bitfields=yes], |
478 |
+ |
[ac_cv_have_byte_bitfields=no], |
479 |
+ |
dnl When cross-compiling, assume only GCC supports this |
480 |
+ |
[if [[ "$GCC" = "yes" ]]; then |
481 |
+ |
ac_cv_have_byte_bitfields="guessing yes" |
482 |
+ |
else |
483 |
+ |
ac_cv_have_byte_bitfields="guessing no" |
484 |
+ |
fi] |
485 |
+ |
) |
486 |
+ |
AC_LANG_RESTORE |
487 |
+ |
]) |
488 |
+ |
|
489 |
|
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) |
490 |
< |
AC_DEFUN(AC_CHECK_FRAMEWORK, [ |
490 |
> |
AC_DEFUN([AC_CHECK_FRAMEWORK], [ |
491 |
|
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl |
492 |
|
AC_CACHE_CHECK([whether compiler supports framework $1], |
493 |
|
ac_Framework, [ |
547 |
|
fi |
548 |
|
;; |
549 |
|
irix*) |
496 |
– |
ETHERSRC=ether_unix.cpp |
550 |
|
AUDIOSRC=Irix/audio_irix.cpp |
551 |
|
LIBS="$LIBS -laudio" |
552 |
|
WANT_ESD=no |
565 |
|
esac |
566 |
|
|
567 |
|
dnl Is the slirp library supported? |
568 |
< |
if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then |
568 |
> |
case "$ac_cv_have_byte_bitfields" in |
569 |
> |
yes|"guessing yes") |
570 |
> |
CAN_SLIRP=yes |
571 |
> |
ETHERSRC=ether_unix.cpp |
572 |
> |
;; |
573 |
> |
esac |
574 |
> |
if [[ -n "$CAN_SLIRP" ]]; then |
575 |
|
AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported]) |
576 |
|
SLIRP_SRCS="\ |
577 |
|
../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \ |
613 |
|
dnl $1 -- the macro to define |
614 |
|
dnl $2 -- the value to translate |
615 |
|
dnl $3 -- template name |
616 |
< |
AC_DEFUN(AC_TRANSLATE_DEFINE, [ |
616 |
> |
AC_DEFUN([AC_TRANSLATE_DEFINE], [ |
617 |
|
if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then |
618 |
|
AC_DEFINE($1, 1, $3) |
619 |
|
fi |