13 |
|
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes]) |
14 |
|
AC_ARG_ENABLE(ppc-emulator, [ --enable-ppc-emulator use the selected PowerPC emulator [default=auto]], [WANT_EMULATED_PPC=$enableval], [WANT_EMULATED_PPC=auto]) |
15 |
|
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
16 |
< |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
16 |
> |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=no]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=no]) |
17 |
|
AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes]) |
18 |
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
19 |
|
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
183 |
|
AC_CHECK_HEADERS(mach/vm_map.h mach/mach_init.h sys/mman.h) |
184 |
|
AC_CHECK_HEADERS(sys/time.h sys/times.h) |
185 |
|
AC_CHECK_HEADERS(unistd.h fcntl.h byteswap.h) |
186 |
+ |
AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h) |
187 |
|
|
188 |
|
dnl Checks for typedefs, structures, and compiler characteristics. |
189 |
|
AC_C_BIGENDIAN |
274 |
|
fi |
275 |
|
]) |
276 |
|
|
277 |
+ |
dnl Check that the host supports TUN/TAP devices |
278 |
+ |
AC_CACHE_CHECK([whether TUN/TAP is supported], |
279 |
+ |
ac_cv_tun_tap_support, [ |
280 |
+ |
AC_TRY_COMPILE([ |
281 |
+ |
#if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H) |
282 |
+ |
#include <linux/if.h> |
283 |
+ |
#include <linux/if_tun.h> |
284 |
+ |
#endif |
285 |
+ |
#if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H) |
286 |
+ |
#include <net/if.h> |
287 |
+ |
#include <net/if_tun.h> |
288 |
+ |
#endif |
289 |
+ |
], [ |
290 |
+ |
struct ifreq ifr; |
291 |
+ |
memset(&ifr, 0, sizeof(ifr)); |
292 |
+ |
ifr.ifr_flags = IFF_TAP | IFF_NO_PI; |
293 |
+ |
], |
294 |
+ |
ac_cv_tun_tap_support=yes, ac_cv_tun_tap_support=no |
295 |
+ |
) |
296 |
+ |
]) |
297 |
+ |
AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support", |
298 |
+ |
[Define if your system supports TUN/TAP devices.]) |
299 |
+ |
|
300 |
|
dnl Various checks if the system supports vm_allocate() and the like functions. |
301 |
|
have_mach_vm=no |
302 |
|
if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \ |
550 |
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
551 |
|
#include "vm_alloc.cpp" |
552 |
|
#include "sigsegv.cpp" |
529 |
– |
], [ |
530 |
– |
sigsegv_recovery=mach |
531 |
– |
ac_cv_have_mach_exceptions=yes |
553 |
|
], |
554 |
+ |
ac_cv_have_mach_exceptions=yes, |
555 |
|
ac_cv_have_mach_exceptions=no, |
556 |
|
dnl When cross-compiling, do not assume anything. |
557 |
|
ac_cv_have_mach_exceptions=no |
559 |
|
AC_LANG_RESTORE |
560 |
|
] |
561 |
|
) |
562 |
+ |
if [[ "$ac_cv_have_mach_exceptions" = "yes" ]]; then |
563 |
+ |
sigsegv_recovery=mach |
564 |
+ |
fi |
565 |
|
AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions", |
566 |
|
[Define if your system supports Mach exceptions.]) |
567 |
|
|
576 |
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
577 |
|
#include "vm_alloc.cpp" |
578 |
|
#include "sigsegv.cpp" |
554 |
– |
], [ |
555 |
– |
sigsegv_recovery=siginfo |
556 |
– |
ac_cv_have_extended_signals=yes |
579 |
|
], |
580 |
+ |
ac_cv_have_extended_signals=yes, |
581 |
|
ac_cv_have_extended_signals=no, |
582 |
|
dnl When cross-compiling, do not assume anything. |
583 |
|
ac_cv_have_extended_signals=no |
585 |
|
AC_LANG_RESTORE |
586 |
|
] |
587 |
|
) |
588 |
+ |
if [[ "$ac_cv_have_extended_signals" = "yes" ]]; then |
589 |
+ |
sigsegv_recovery=siginfo |
590 |
+ |
fi |
591 |
|
AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals", |
592 |
|
[Define if your system support extended signals.]) |
593 |
|
fi |
603 |
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
604 |
|
#include "vm_alloc.cpp" |
605 |
|
#include "sigsegv.cpp" |
580 |
– |
], [ |
581 |
– |
sigsegv_recovery=sigcontext |
582 |
– |
ac_cv_have_sigcontext_hack=yes |
606 |
|
], |
607 |
+ |
ac_cv_have_sigcontext_hack=yes, |
608 |
|
ac_cv_have_sigcontext_hack=no, |
609 |
|
dnl When cross-compiling, do not assume anything. |
610 |
|
ac_cv_have_sigcontext_hack=no |
611 |
|
) |
612 |
|
AC_LANG_RESTORE |
613 |
|
]) |
614 |
+ |
if [[ "$ac_cv_have_sigcontext_hack" = "yes" ]]; then |
615 |
+ |
sigsegv_recovery=sigcontext |
616 |
+ |
fi |
617 |
|
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack", |
618 |
|
[Define if we know a hack to replace siginfo_t->si_addr member.]) |
619 |
|
fi |