48 |
|
|
49 |
|
dnl We use mon if possible. |
50 |
|
MONSRCS= |
51 |
+ |
case "x$WANT_MON" in |
52 |
+ |
x/* | x.*) |
53 |
+ |
mon_srcdir=$WANT_MON |
54 |
+ |
WANT_MON=yes |
55 |
+ |
;; |
56 |
+ |
xyes) |
57 |
+ |
mon_srcdir=../../../mon/src |
58 |
+ |
;; |
59 |
+ |
esac |
60 |
|
if [[ "x$WANT_MON" = "xyes" ]]; then |
61 |
|
AC_MSG_CHECKING(for mon) |
53 |
– |
mon_srcdir=../../../mon/src |
62 |
|
if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then |
63 |
|
AC_MSG_RESULT(yes) |
64 |
|
AC_DEFINE(ENABLE_MON) |
105 |
|
if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then |
106 |
|
AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.]) |
107 |
|
fi |
108 |
+ |
else |
109 |
+ |
dnl We do have our own pthread_cancel() implementation |
110 |
+ |
AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Define if you have the pthread_cancel function.]) |
111 |
|
fi |
112 |
|
|
113 |
|
dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes. |
555 |
|
]) |
556 |
|
ELF_OBJECTS=$ac_cv_elf_objects |
557 |
|
|
547 |
– |
dnl FIXME: forcibly disable JIT for now |
548 |
– |
WANT_JIT=no |
549 |
– |
|
558 |
|
dnl CPU emulator sources |
559 |
|
if [[ "x$EMULATED_PPC" = "xyes" ]]; then |
560 |
|
CPUSRCS="\ |
585 |
|
]) |
586 |
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
587 |
|
case $host_cpu in |
588 |
< |
i?86:yes) |
588 |
> |
i?86) |
589 |
|
DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2" |
590 |
|
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
591 |
|
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0" |
594 |
|
fi |
595 |
|
;; |
596 |
|
esac |
597 |
< |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=2000" |
597 |
> |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=10000" |
598 |
|
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
599 |
|
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls" |
600 |
|
fi |
613 |
|
fi |
614 |
|
fi |
615 |
|
CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp" |
616 |
+ |
else |
617 |
+ |
WANT_JIT=no |
618 |
|
fi |
619 |
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
620 |
|
AC_CACHE_CHECK([whether static data regions are executable], |
630 |
|
((void (*)(void))p)(); |
631 |
|
return 0; |
632 |
|
#endif |
623 |
– |
#if defined(__i386__) |
624 |
– |
static unsigned char p[] = {0xc3}; |
625 |
– |
((void (*)(void))p)(); |
626 |
– |
return 0; |
627 |
– |
#endif |
633 |
|
return 1; |
634 |
|
}], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no, |
635 |
|
dnl When cross-compiling, do not assume anything. |
640 |
|
AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec", |
641 |
|
[Define if your system marks static data pages as executable.]) |
642 |
|
|
643 |
+ |
if [[ "x$WANT_JIT" = "xyes" ]]; then |
644 |
+ |
CPPFLAGS="$CPPFLAGS -DUSE_JIT" |
645 |
+ |
fi |
646 |
+ |
|
647 |
|
dnl Generate Makefile. |
648 |
|
AC_SUBST(DYNGENSRCS) |
649 |
|
AC_SUBST(DYNGEN_OP_FLAGS) |