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, [ |
491 |
|
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl |
547 |
|
fi |
548 |
|
;; |
549 |
|
irix*) |
520 |
– |
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 \ |