ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/configure.in
(Generate patch)

Comparing SheepShaver/src/Unix/configure.in (file contents):
Revision 1.5 by gbeauche, 2003-05-22T22:12:04Z vs.
Revision 1.20 by gbeauche, 2004-02-20T17:33:27Z

# Line 5 | Line 5 | AC_INIT(main_unix.cpp)
5   AC_PREREQ(2.12)
6   AC_CONFIG_HEADER(config.h)
7  
8 + dnl Canonical system information.
9 + AC_CANONICAL_HOST
10 + AC_CANONICAL_TARGET
11 +
12   dnl Options.
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])
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])
20   AC_ARG_WITH(mon,            [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
21 + AC_ARG_WITH(dgcc,           [  --with-dgcc=COMPILER    use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval])
22  
23   dnl Checks for programs.
24   AC_PROG_CC
# Line 28 | Line 35 | AC_EGREP_CPP(yes,
35   #ifdef __powerpc__
36    yes
37   #endif
38 + #ifdef __ppc__
39 +  yes
40 + #endif
41   ], [AC_MSG_RESULT(yes); HAVE_PPC=yes], AC_MSG_RESULT(no))
42  
43 + dnl We use native CPU if possible.
44 + EMULATED_PPC=yes
45 + case $WANT_EMULATED_PPC in
46 +  auto) [[ "x$HAVE_PPC" = "xyes" ]] && EMULATED_PPC=no;;
47 +  no)   EMULATED_PPC=no;;
48 + esac
49 + if [[ "x$EMULATED_PPC" = "xyes" ]]; then
50 +  AC_DEFINE(EMULATED_PPC)
51 + fi
52 +
53   dnl We use mon if possible.
54   MONSRCS=
55 + case "x$WANT_MON" in
56 + x/* | x.*)
57 +  mon_srcdir=$WANT_MON
58 +  WANT_MON=yes
59 +  ;;
60 + xyes)
61 +  mon_srcdir=../../../mon/src
62 +  ;;
63 + esac
64   if [[ "x$WANT_MON" = "xyes" ]]; then
65    AC_MSG_CHECKING(for mon)
37  mon_srcdir=../../../mon/src
66    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
67      AC_MSG_RESULT(yes)
68      AC_DEFINE(ENABLE_MON)
# Line 69 | Line 97 | LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -l
97  
98   dnl We need pthreads on non-PowerPC systems. Try libpthread first, then libc_r (FreeBSD), then PTL.
99   HAVE_PTHREADS=yes
100 < if [[ "x$HAVE_PPC" = "xno" ]]; then
100 > case $EMULATED_PPC:$target_os in
101 > no:linux*)
102 >  dnl We do have our own pthread_cancel() implementation
103 >  AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Define if you have the pthread_cancel function.])
104 >  ;;
105 > *:*)
106    AC_CHECK_LIB(pthread, pthread_create, , [
107      AC_CHECK_LIB(c_r, pthread_create, , [
108        AC_CHECK_LIB(PTL, pthread_create, , [
# Line 78 | Line 111 | if [[ "x$HAVE_PPC" = "xno" ]]; then
111      ])
112    ])
113    AC_CHECK_FUNCS(pthread_cancel)
114 < fi
115 <
116 < dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
117 < SEMSRC=
118 < AC_CHECK_FUNCS(sem_init, , [
114 >  AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
115 >  AC_CHECK_FUNCS(pthread_mutexattr_settype)
116 >  AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
117 >  if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then
118 >    AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.])
119 >  fi
120 >  dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
121 >  SEMSRC=
122 >  AC_CHECK_FUNCS(sem_init, , [
123    if test "x$HAVE_PTHREADS" = "xyes"; then
124      SEMSRC=posix_sem.cpp
125    fi
126 < ])
126 >  ])
127 >  ;;
128 > esac
129  
130   dnl We use XFree86 DGA if possible.
131   if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
# Line 111 | Line 150 | if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]];
150   fi
151  
152   dnl We use GTK+ if possible.
153 < UISRCS=
153 > UISRCS=../dummy/prefs_editor_dummy.cpp
154   if [[ "x$WANT_GTK" = "xyes" ]]; then
155    AM_PATH_GTK(1.2.0, [
156      AC_DEFINE(ENABLE_GTK)
# Line 141 | Line 180 | fi
180   dnl Checks for header files.
181   AC_HEADER_STDC
182   AC_HEADER_SYS_WAIT
183 < AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h)
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(mmintrin.h, [have_mmintrin_h=yes])
187 > AC_CHECK_HEADERS(xmmintrin.h, [have_xmmintrin_h=yes])
188 > AC_CHECK_HEADERS(emmintrin.h, [have_emmintrin_h=yes])
189  
190   dnl Checks for typedefs, structures, and compiler characteristics.
191   AC_C_BIGENDIAN
# Line 161 | Line 205 | AC_TYPE_SIGNAL
205   AC_HEADER_TIME
206   AC_STRUCT_TM
207  
208 + dnl Check whether struct sigaction has sa_restorer member.
209 + AC_CACHE_CHECK([whether struct sigaction has sa_restorer],
210 +  ac_cv_signal_sa_restorer, [
211 +  AC_TRY_COMPILE([
212 +    #include <signal.h>
213 +  ], [struct sigaction sa; sa.sa_restorer = 0;],
214 +  ac_cv_signal_sa_restorer=yes, ac_cv_signal_sa_restorer=no,
215 +  dnl When cross-compiling, do not assume anything.
216 +  ac_cv_signal_sa_restorer=no
217 +  )
218 + ])
219 + if [[ "x$ac_cv_signal_sa_restorer" = "xyes" ]]; then
220 +  AC_DEFINE(HAVE_SIGNAL_SA_RESTORER)
221 + fi
222 +
223   dnl Checks for library functions.
224   AC_CHECK_FUNCS(strdup cfmakeraw)
225 < AC_CHECK_FUNCS(nanosleep clock_gettime timer_create)
225 > AC_CHECK_FUNCS(nanosleep)
226   AC_CHECK_FUNCS(sigaction signal)
227   AC_CHECK_FUNCS(mmap mprotect munmap)
228   AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
229  
230 + dnl Darwin seems to define mach_task_self() instead of task_self().
231 + AC_CHECK_FUNCS(mach_task_self task_self)
232 +
233 + dnl We need clock_gettime() for better performance but it may drag
234 + dnl libpthread in, which we don't want for native ppc mode
235 + case $EMULATED_PPC:$target_os in
236 + no:linux*)
237 +  ;;
238 + *:*)
239 +  AC_SEARCH_LIBS(clock_gettime, [rt posix4])
240 +  AC_CHECK_FUNCS(clock_gettime)
241 +  ;;
242 + esac
243 +
244   dnl Select system-dependant sources.
245 < if [[ "x$HAVE_PPC" = "xyes" ]]; then
246 <  SYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c Linux/asm_linux.S"
247 < else
248 <  SYSSRCS="../emul_ppc/emul_ppc.cpp"
249 < fi
250 < SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS $MONSRCS"
245 > SERIALSRC=serial_unix.cpp
246 > ETHERSRC=../dummy/ether_dummy.cpp
247 > SCSISRC=../dummy/scsi_dummy.cpp
248 > AUDIOSRC=../dummy/audio_dummy.cpp
249 > EXTRASYSSRCS=
250 > case "$target_os" in
251 > linux*)
252 >  ETHERSRC=Linux/ether_linux.cpp
253 >  AUDIOSRC=audio_oss_esd.cpp
254 >  SCSISRC=Linux/scsi_linux.cpp
255 >  if [[ "x$EMULATED_PPC" = "xno" ]]; then
256 >    EXTRASYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c Linux/asm_linux.S"
257 >  fi
258 >  ;;
259 > darwin*)
260 >  if [[ "x$EMULATED_PPC" = "xno" ]]; then
261 >    EXTRASYSSRCS="Darwin/paranoia.cpp Linux/asm_linux.S"
262 >  fi
263 >  ;;
264 > esac
265 > SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
266  
267   dnl Define a macro that translates a yesno-variable into a C macro definition
268   dnl to be put into the config.h file
# Line 333 | Line 421 | AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_
421  
422   fi dnl HAVE_MMAP_VM
423  
424 < dnl Check if we can mmap 0x2000 bytes from 0x0000
425 < AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
424 > dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
425 > AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x3000],
426 >  ac_cv_pagezero_hack, [
427 >  ac_cv_pagezero_hack=no
428 >  if AC_TRY_COMMAND([Darwin/testlmem.sh 0x3000]); then
429 >    ac_cv_pagezero_hack=yes
430 >    dnl might as well skip the test for mmap-able low memory
431 >    ac_cv_can_map_lm=no
432 >  fi
433 > ])
434 > AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
435 >  [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
436 >
437 > dnl Check if we can mmap 0x3000 bytes from 0x0000
438 > AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x3000],
439    ac_cv_can_map_lm, [
440    AC_LANG_SAVE
441    AC_LANG_CPLUSPLUS
# Line 417 | Line 518 | AC_CACHE_CHECK([whether sigaction handle
518   AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
519    [Define if your system requires sigactions to be reinstalled.])
520  
521 < dnl Check if extended signals are supported.
522 < AC_CACHE_CHECK([whether your system supports extended signal handlers],
523 <  ac_cv_have_extended_signals, [
521 > dnl Check if Mach exceptions supported.
522 > AC_CACHE_CHECK([whether your system supports Mach exceptions],
523 >  ac_cv_have_mach_exceptions, [
524    AC_LANG_SAVE
525    AC_LANG_CPLUSPLUS
526    AC_TRY_RUN([
527 <    #define HAVE_SIGINFO_T 1
527 >    #define HAVE_MACH_EXCEPTIONS 1
528      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
529      #include "vm_alloc.cpp"
530      #include "sigsegv.cpp"
531 <  ], ac_cv_have_extended_signals=yes, ac_cv_have_extended_signals=no,
531 >  ], [
532 >  sigsegv_recovery=mach
533 >  ac_cv_have_mach_exceptions=yes
534 >  ],
535 >  ac_cv_have_mach_exceptions=no,
536    dnl When cross-compiling, do not assume anything.
537 <  ac_cv_have_extended_signals=no
537 >  ac_cv_have_mach_exceptions=no
538    )
539    AC_LANG_RESTORE
540    ]
541   )
542 < AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
543 <  [Define if your system support extended signals.])
542 > AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
543 >  [Define if your system supports Mach exceptions.])
544 >
545 > dnl Otherwise, check if extended signals are supported.
546 > if [[ -z "$sigsegv_recovery" ]]; then
547 >  AC_CACHE_CHECK([whether your system supports extended signal handlers],
548 >    ac_cv_have_extended_signals, [
549 >    AC_LANG_SAVE
550 >    AC_LANG_CPLUSPLUS
551 >    AC_TRY_RUN([
552 >      #define HAVE_SIGINFO_T 1
553 >      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
554 >      #include "vm_alloc.cpp"
555 >      #include "sigsegv.cpp"
556 >    ], [
557 >    sigsegv_recovery=siginfo
558 >    ac_cv_have_extended_signals=yes
559 >    ],
560 >    ac_cv_have_extended_signals=no,
561 >    dnl When cross-compiling, do not assume anything.
562 >    ac_cv_have_extended_signals=no
563 >    )
564 >    AC_LANG_RESTORE
565 >    ]
566 >  )
567 >  AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
568 >    [Define if your system support extended signals.])
569 > fi
570  
571   dnl Otherwise, check for subterfuges.
572 < if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
572 > if [[ -z "$sigsegv_recovery" ]]; then
573    AC_CACHE_CHECK([whether we then have a subterfuge for your system],
574    ac_cv_have_sigcontext_hack, [
575      AC_LANG_SAVE
# Line 448 | Line 579 | if [[ "x$ac_cv_have_extended_signals" =
579        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
580        #include "vm_alloc.cpp"
581        #include "sigsegv.cpp"
582 <    ], ac_cv_have_sigcontext_hack=yes, ac_cv_have_sigcontext_hack=no,
582 >    ], [
583 >    sigsegv_recovery=sigcontext
584 >    ac_cv_have_sigcontext_hack=yes
585 >    ],
586 >    ac_cv_have_sigcontext_hack=no,
587      dnl When cross-compiling, do not assume anything.
588      ac_cv_have_sigcontext_hack=no
589      )
# Line 480 | Line 615 | AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_IN
615  
616   dnl Can we do Video on SEGV Signals ?
617   CAN_VOSF=no
618 < if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
618 > if [[ -n "$sigsegv_recovery" ]]; then
619    CAN_VOSF=yes
620   fi
621  
# Line 491 | Line 626 | else
626      WANT_VOSF=no
627   fi
628  
629 + dnl Platform specific binary postprocessor
630 + BLESS=/bin/true
631 + if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
632 +  BLESS=Darwin/lowmem
633 +  LDFLAGS="$LDFLAGS -pagezero_size 0x3000"
634 + fi
635 +
636 + dnl Check for GCC 2.7 or higher.
637 + HAVE_GCC27=no
638 + AC_MSG_CHECKING(for GCC 2.7 or higher)
639 + AC_EGREP_CPP(xyes,
640 + [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
641 +  xyes
642 + #endif
643 + ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
644 +
645 + dnl Check for GCC 3.0 or higher.
646 + HAVE_GCC30=no
647 + AC_MSG_CHECKING(for GCC 3.0 or higher)
648 + AC_EGREP_CPP(xyes,
649 + [#if __GNUC__ >= 3
650 +  xyes
651 + #endif
652 + ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
653 +
654 + dnl Check for ICC.
655 + AC_MSG_CHECKING(for ICC)
656 + HAVE_ICC=no
657 + if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then
658 +  HAVE_ICC=yes
659 + fi
660 + AC_MSG_RESULT($HAVE_ICC)
661 +
662 + # Test if the compiler can generate ELF objects
663 + AC_CACHE_CHECK([whether the compiler can generate ELF objects],
664 +  ac_cv_elf_objects, [
665 +  echo 'int i;' > conftest.$ac_ext
666 +  ac_cv_elf_objects=no
667 +  if AC_TRY_EVAL(ac_compile); then
668 +    case `/usr/bin/file conftest.$ac_objext` in
669 +    *"ELF"*)
670 +      ac_cv_elf_objects=yes
671 +      ;;
672 +    esac
673 +  fi
674 +  rm -rf conftest*
675 + ])
676 + ELF_OBJECTS=$ac_cv_elf_objects
677 +
678 + dnl CPU emulator sources
679 + if [[ "x$EMULATED_PPC" = "xyes" ]]; then
680 +  CPUSRCS="\
681 +    ../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \
682 +    ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \
683 +    ../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \
684 +    ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp"
685 +  CPPFLAGS="$CPPFLAGS -I../kpx_cpu/include -I../kpx_cpu/src"
686 +
687 +  dnl Enable JIT compiler, if possible
688 +  if [[ "x$WANT_JIT" = "xyes" ]]; then
689 +    AC_CACHE_CHECK([whether dyngen can be used],
690 +      ac_cv_use_dyngen, [
691 +      case $host_cpu:$ELF_OBJECTS in
692 +      powerpc:yes)
693 +        ac_cv_use_dyngen=yes
694 +        ;;
695 +      x86_64:yes)
696 +        ac_cv_use_dyngen=yes
697 +        ;;
698 +      i?86:yes)
699 +        ac_cv_use_dyngen=yes
700 +        ;;
701 +      *:*)
702 +        ac_cv_use_dyngen=no
703 +        ;;
704 +      esac
705 +      dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2)
706 +      if [[ -z "$DYNGEN_CC" ]]; then
707 +        if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
708 +          DYNGEN_CC=$CXX
709 +        else
710 +          for p in /usr/bin /usr/local/bin; do
711 +            gxx="$p/g++"
712 +            if [[ -x "$gxx" ]]; then
713 +              DYNGEN_CC="$gxx"
714 +            fi
715 +          done
716 +        fi
717 +      fi
718 +      if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then
719 +        ac_cv_use_dyngen=no
720 +      fi
721 +    ])
722 +    if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
723 +      case $host_cpu in
724 +      i?86)
725 +        DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2"
726 +        if [[ "x$HAVE_GCC30" = "xyes" ]]; then
727 +          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0"
728 +        else
729 +          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0"
730 +        fi
731 +        if [[ "x$have_mmintrin_h" = "xyes" ]]; then
732 +          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -mmmx"
733 +        fi
734 +        if [[ "x$have_xmmintrin_h" = "xyes" ]]; then
735 +          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse"
736 +        fi
737 +        if [[ "x$have_emmintrin_h" = "xyes" ]]; then
738 +          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse2"
739 +        fi
740 +        ;;
741 +      esac
742 +      DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=10000"
743 +      if [[ "x$HAVE_GCC30" = "xyes" ]]; then
744 +        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls"
745 +      fi
746 +    else
747 +      WANT_JIT=no
748 +    fi
749 +    AC_TRANSLATE_DEFINE(ENABLE_DYNGEN, $ac_cv_use_dyngen, [Define to enable dyngen engine])
750 +    if [[ "x$WANT_JIT" = "xyes" ]]; then
751 +      DYNGENSRCS="\
752 +        ../kpx_cpu/src/cpu/jit/dyngen.c \
753 +        ../kpx_cpu/src/cpu/jit/cxxdemangle.cpp"
754 +      CPUSRCS="\
755 +        ../kpx_cpu/src/cpu/jit/jit-cache.cpp \
756 +        ../kpx_cpu/src/cpu/jit/basic-dyngen.cpp \
757 +        ../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp $CPUSRCS"
758 +    fi
759 +  fi
760 +  CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
761 + else
762 +  WANT_JIT=no
763 + fi
764 + if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
765 +  AC_CACHE_CHECK([whether static data regions are executable],
766 +    ac_cv_have_static_data_exec, [
767 +    AC_TRY_RUN([int main(void) {
768 + #if defined(__powerpc__)
769 +      static unsigned int p[8] = {0x4e800020,};
770 +      asm volatile("dcbst 0,%0" : : "r" (p) : "memory");
771 +      asm volatile("sync" : : : "memory");
772 +      asm volatile("icbi 0,%0" : : "r" (p) : "memory");
773 +      asm volatile("sync" : : : "memory");
774 +      asm volatile("isync" : : : "memory");
775 +      ((void (*)(void))p)();
776 +      return 0;
777 + #endif
778 +      return 1;
779 +    }], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no,
780 +    dnl When cross-compiling, do not assume anything.
781 +    ac_cv_have_static_data_exec=no
782 +    )
783 +  ])
784 + fi
785 + AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec",
786 +  [Define if your system marks static data pages as executable.])
787 +
788 + if [[ "x$WANT_JIT" = "xyes" ]]; then
789 +  CPPFLAGS="$CPPFLAGS -DUSE_JIT"
790 + fi
791 +
792   dnl Generate Makefile.
793 + AC_SUBST(DYNGENSRCS)
794 + AC_SUBST(DYNGEN_CC)
795 + AC_SUBST(DYNGEN_OP_FLAGS)
796   AC_SUBST(SYSSRCS)
797 + AC_SUBST(CPUSRCS)
798 + AC_SUBST(BLESS)
799   AC_OUTPUT(Makefile)
800  
801   dnl Print summary.
# Line 501 | Line 804 | echo SheepShaver configuration summary:
804   echo
805   echo XFree86 DGA support .............. : $WANT_XF86_DGA
806   echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE
807 + echo Using PowerPC emulator ........... : $EMULATED_PPC
808 + echo Enable JIT compiler .............. : $WANT_JIT
809   echo Enable video on SEGV signals ..... : $WANT_VOSF
810   echo ESD sound support ................ : $WANT_ESD
811   echo GTK user interface ............... : $WANT_GTK
812   echo mon debugger support ............. : $WANT_MON
813 + echo Bad memory access recovery type .. : $sigsegv_recovery
814   echo
815   echo "Configuration done. Now type \"make\"."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines