446 |
|
AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used]) |
447 |
|
fi |
448 |
|
|
449 |
+ |
dnl Check whether compiler supports byte bit-fields |
450 |
+ |
AC_CACHE_CHECK([whether compiler supports byte bit-fields], |
451 |
+ |
ac_cv_have_byte_bitfields, [ |
452 |
+ |
AC_LANG_SAVE |
453 |
+ |
AC_LANG_CPLUSPLUS |
454 |
+ |
AC_TRY_RUN([ |
455 |
+ |
struct A { |
456 |
+ |
unsigned char b1:4; |
457 |
+ |
unsigned char b2:4; |
458 |
+ |
unsigned char c; |
459 |
+ |
unsigned short s; |
460 |
+ |
unsigned char a[4]; |
461 |
+ |
}; |
462 |
+ |
|
463 |
+ |
int main(void) { |
464 |
+ |
A a; |
465 |
+ |
return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1)); |
466 |
+ |
}], |
467 |
+ |
[ac_cv_have_byte_bitfields=yes], |
468 |
+ |
[ac_cv_have_byte_bitfields=no], |
469 |
+ |
dnl When cross-compiling, assume only GCC supports this |
470 |
+ |
[if [[ "$GCC" = "yes" ]]; then |
471 |
+ |
ac_cv_have_byte_bitfields="guessing yes" |
472 |
+ |
else |
473 |
+ |
ac_cv_have_byte_bitfields="guessing no" |
474 |
+ |
fi] |
475 |
+ |
) |
476 |
+ |
AC_LANG_RESTORE |
477 |
+ |
]) |
478 |
|
|
479 |
|
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) |
480 |
|
AC_DEFUN([AC_CHECK_FRAMEWORK], [ |
545 |
|
DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS" |
546 |
|
;; |
547 |
|
irix*) |
519 |
– |
ETHERSRC=ether_unix.cpp |
548 |
|
AUDIOSRC=Irix/audio_irix.cpp |
549 |
|
EXTRASYSSRCS=Irix/unaligned.c |
550 |
|
LIBS="$LIBS -laudio" |
577 |
|
esac |
578 |
|
|
579 |
|
dnl Is the slirp library supported? |
580 |
+ |
case "$ac_cv_have_byte_bitfields" in |
581 |
+ |
yes|"guessing yes") |
582 |
+ |
ETHERSRC=ether_unix.cpp |
583 |
+ |
;; |
584 |
+ |
esac |
585 |
|
if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then |
586 |
|
AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported]) |
587 |
|
SLIRP_SRCS="\ |