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.10 by gbeauche, 2003-11-27T00:26:33Z vs.
Revision 1.27 by gbeauche, 2004-06-24T16:13:53Z

# Line 13 | Line 13 | 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])
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_ENABLE(sdl-video,    [  --enable-sdl-video      use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no])
19   AC_ARG_WITH(esd,            [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
20   AC_ARG_WITH(gtk,            [  --with-gtk              use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
21   AC_ARG_WITH(mon,            [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
22 + AC_ARG_WITH(dgcc,           [  --with-dgcc=COMPILER    use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval])
23  
24   dnl Checks for programs.
25   AC_PROG_CC
# Line 34 | Line 36 | AC_EGREP_CPP(yes,
36   #ifdef __powerpc__
37    yes
38   #endif
39 + #ifdef __ppc__
40 +  yes
41 + #endif
42   ], [AC_MSG_RESULT(yes); HAVE_PPC=yes], AC_MSG_RESULT(no))
43  
44   dnl We use native CPU if possible.
# Line 48 | Line 53 | fi
53  
54   dnl We use mon if possible.
55   MONSRCS=
56 + case "x$WANT_MON" in
57 + x/* | x.*)
58 +  mon_srcdir=$WANT_MON
59 +  WANT_MON=yes
60 +  ;;
61 + xyes)
62 +  mon_srcdir=../../../mon/src
63 +  ;;
64 + esac
65   if [[ "x$WANT_MON" = "xyes" ]]; then
66    AC_MSG_CHECKING(for mon)
53  mon_srcdir=../../../mon/src
67    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
68      AC_MSG_RESULT(yes)
69      AC_DEFINE(ENABLE_MON)
# Line 74 | Line 87 | fi
87   dnl Checks for libraries.
88   AC_CHECK_LIB(posix4, sem_init)
89  
90 < dnl We need X11.
91 < AC_PATH_XTRA
92 < if [[ "x$no_x" = "xyes" ]]; then
93 <  AC_MSG_ERROR([You need X11 to run SheepShaver.])
94 < fi
95 < CFLAGS="$CFLAGS $X_CFLAGS"
96 < CXXFLAGS="$CXXFLAGS $X_CFLAGS"
97 < LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
90 > dnl Do we need SDL?
91 > WANT_SDL=no
92 > SDL_SUPPORT="none"
93 > if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
94 >  WANT_SDL=yes
95 >  WANT_XF86_DGA=no
96 >  WANT_XF86_VIDMODE=no
97 >  WANT_FBDEV_DGA=no
98 >  SDL_SUPPORT="video"
99 > fi
100 > if [[ "x$WANT_SDL" = "xyes" ]]; then
101 >  AC_PATH_PROG(sdl_config, "sdl-config")
102 >  if [[ -n "$sdl_config" ]]; then
103 >    sdl_cflags=`$sdl_config --cflags`
104 >    sdl_libs=`$sdl_config --libs`
105 >    CFLAGS="$CFLAGS $sdl_cflags"
106 >    CXXFLAGS="$CXXFLAGS $sdl_cflags"
107 >    LIBS="$LIBS $sdl_libs"
108 >  else
109 >    WANT_SDL=no
110 >  fi
111 > fi
112 >
113 > dnl We need X11, if not using SDL.
114 > if [[ "x$WANT_SDL" = "xno" ]]; then
115 >  AC_PATH_XTRA
116 >  if [[ "x$no_x" = "xyes" ]]; then
117 >    AC_MSG_ERROR([You need X11 to run SheepShaver.])
118 >  fi
119 >  CFLAGS="$CFLAGS $X_CFLAGS"
120 >  CXXFLAGS="$CXXFLAGS $X_CFLAGS"
121 >  LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
122 > fi
123  
124   dnl We need pthreads on non-PowerPC systems. Try libpthread first, then libc_r (FreeBSD), then PTL.
125   HAVE_PTHREADS=yes
126 < if [[ "x$EMULATED_PPC" = "xyes" ]]; then
126 > case $EMULATED_PPC:$target_os in
127 > no:linux*)
128 >  dnl We do have our own pthread_cancel() implementation
129 >  AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Define if you have the pthread_cancel function.])
130 >  ;;
131 > *:*)
132    AC_CHECK_LIB(pthread, pthread_create, , [
133      AC_CHECK_LIB(c_r, pthread_create, , [
134        AC_CHECK_LIB(PTL, pthread_create, , [
# Line 94 | Line 137 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
137      ])
138    ])
139    AC_CHECK_FUNCS(pthread_cancel)
140 +  AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
141 +  AC_CHECK_FUNCS(pthread_mutexattr_settype)
142 +  AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
143    if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then
144      AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.])
145    fi
146 < fi
147 <
148 < dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
103 < SEMSRC=
104 < AC_CHECK_FUNCS(sem_init, , [
146 >  dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
147 >  SEMSRC=
148 >  AC_CHECK_FUNCS(sem_init, , [
149    if test "x$HAVE_PTHREADS" = "xyes"; then
150      SEMSRC=posix_sem.cpp
151    fi
152 < ])
152 >  ])
153 >  ;;
154 > esac
155  
156   dnl We use XFree86 DGA if possible.
157   if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
# Line 130 | Line 176 | if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]];
176   fi
177  
178   dnl We use GTK+ if possible.
179 < UISRCS=
179 > UISRCS=../dummy/prefs_editor_dummy.cpp
180   if [[ "x$WANT_GTK" = "xyes" ]]; then
181    AM_PATH_GTK(1.2.0, [
182      AC_DEFINE(ENABLE_GTK)
# Line 163 | Line 209 | AC_HEADER_SYS_WAIT
209   AC_CHECK_HEADERS(mach/vm_map.h mach/mach_init.h sys/mman.h)
210   AC_CHECK_HEADERS(sys/time.h sys/times.h)
211   AC_CHECK_HEADERS(unistd.h fcntl.h byteswap.h)
212 + AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h)
213  
214   dnl Checks for typedefs, structures, and compiler characteristics.
215   AC_C_BIGENDIAN
# Line 182 | Line 229 | AC_TYPE_SIGNAL
229   AC_HEADER_TIME
230   AC_STRUCT_TM
231  
232 + dnl Check whether struct sigaction has sa_restorer member.
233 + AC_CACHE_CHECK([whether struct sigaction has sa_restorer],
234 +  ac_cv_signal_sa_restorer, [
235 +  AC_TRY_COMPILE([
236 +    #include <signal.h>
237 +  ], [struct sigaction sa; sa.sa_restorer = 0;],
238 +  ac_cv_signal_sa_restorer=yes, ac_cv_signal_sa_restorer=no,
239 +  dnl When cross-compiling, do not assume anything.
240 +  ac_cv_signal_sa_restorer=no
241 +  )
242 + ])
243 + if [[ "x$ac_cv_signal_sa_restorer" = "xyes" ]]; then
244 +  AC_DEFINE(HAVE_SIGNAL_SA_RESTORER)
245 + fi
246 +
247   dnl Checks for library functions.
248 < AC_CHECK_FUNCS(strdup cfmakeraw)
249 < AC_CHECK_FUNCS(nanosleep clock_gettime timer_create)
248 > AC_CHECK_FUNCS(strdup strlcpy cfmakeraw)
249 > AC_CHECK_FUNCS(nanosleep)
250   AC_CHECK_FUNCS(sigaction signal)
251   AC_CHECK_FUNCS(mmap mprotect munmap)
252   AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
253 + AC_CHECK_FUNCS(posix_memalign memalign valloc)
254 +
255 + dnl Darwin seems to define mach_task_self() instead of task_self().
256 + AC_CHECK_FUNCS(mach_task_self task_self)
257 +
258 + dnl We need clock_gettime() for better performance but it may drag
259 + dnl libpthread in, which we don't want for native ppc mode
260 + case $EMULATED_PPC:$target_os in
261 + no:linux*)
262 +  ;;
263 + *:*)
264 +  AC_SEARCH_LIBS(clock_gettime, [rt posix4])
265 +  AC_CHECK_FUNCS(clock_gettime)
266 +  ;;
267 + esac
268  
269   dnl Select system-dependant sources.
270 < if [[ "x$EMULATED_PPC" = "xno" ]]; then
271 <  SYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c Linux/asm_linux.S"
270 > SERIALSRC=serial_unix.cpp
271 > ETHERSRC=../dummy/ether_dummy.cpp
272 > SCSISRC=../dummy/scsi_dummy.cpp
273 > AUDIOSRC=../dummy/audio_dummy.cpp
274 > EXTRASYSSRCS=
275 > case "$target_os" in
276 > linux*)
277 >  ETHERSRC=Linux/ether_linux.cpp
278 >  AUDIOSRC=audio_oss_esd.cpp
279 >  SCSISRC=Linux/scsi_linux.cpp
280 >  if [[ "x$EMULATED_PPC" = "xno" ]]; then
281 >    EXTRASYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c Linux/asm_linux.S"
282 >  fi
283 >  ;;
284 > darwin*)
285 >  if [[ "x$EMULATED_PPC" = "xno" ]]; then
286 >    EXTRASYSSRCS="Darwin/paranoia.cpp Linux/asm_linux.S"
287 >  fi
288 >  ;;
289 > esac
290 >
291 > dnl SDL overrides
292 > if [[ "x$WANT_SDL" = "xyes" ]]; then
293 >  AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
294 > fi
295 > if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
296 >  VIDEOSRCS="../SDL/video_sdl.cpp ../dummy/clip_dummy.cpp"
297 >  AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
298 > else
299 >  VIDEOSRCS="video_x.cpp clip_unix.cpp"
300   fi
301 < SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS $MONSRCS"
301 >
302 > SYSSRCS="$VIDEOSRCS $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
303  
304   dnl Define a macro that translates a yesno-variable into a C macro definition
305   dnl to be put into the config.h file
# Line 206 | Line 312 | AC_DEFUN(AC_TRANSLATE_DEFINE, [
312      fi
313   ])
314  
315 + dnl Check that the host supports TUN/TAP devices
316 + AC_CACHE_CHECK([whether TUN/TAP is supported],
317 +  ac_cv_tun_tap_support, [
318 +  AC_TRY_COMPILE([
319 +    #if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H)
320 +    #include <linux/if.h>
321 +    #include <linux/if_tun.h>
322 +    #endif
323 +    #if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H)
324 +    #include <net/if.h>
325 +    #include <net/if_tun.h>
326 +    #endif
327 +  ], [
328 +    struct ifreq ifr;
329 +    memset(&ifr, 0, sizeof(ifr));
330 +    ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
331 +  ],
332 +  ac_cv_tun_tap_support=yes, ac_cv_tun_tap_support=no
333 +  )
334 + ])
335 + AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support",
336 +  [Define if your system supports TUN/TAP devices.])
337 +
338   dnl Various checks if the system supports vm_allocate() and the like functions.
339   have_mach_vm=no
340   if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \
# Line 352 | Line 481 | AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_
481  
482   fi dnl HAVE_MMAP_VM
483  
484 < dnl Check if we can mmap 0x2000 bytes from 0x0000
485 < AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
484 > dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
485 > AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x3000],
486 >  ac_cv_pagezero_hack, [
487 >  ac_cv_pagezero_hack=no
488 >  if AC_TRY_COMMAND([Darwin/testlmem.sh 0x3000]); then
489 >    ac_cv_pagezero_hack=yes
490 >    dnl might as well skip the test for mmap-able low memory
491 >    ac_cv_can_map_lm=no
492 >  fi
493 > ])
494 > AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
495 >  [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
496 >
497 > dnl Check if we can mmap 0x3000 bytes from 0x0000
498 > AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x3000],
499    ac_cv_can_map_lm, [
500    AC_LANG_SAVE
501    AC_LANG_CPLUSPLUS
# Line 436 | Line 578 | AC_CACHE_CHECK([whether sigaction handle
578   AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
579    [Define if your system requires sigactions to be reinstalled.])
580  
581 < dnl Check if extended signals are supported.
582 < AC_CACHE_CHECK([whether your system supports extended signal handlers],
583 <  ac_cv_have_extended_signals, [
581 > dnl Check if Mach exceptions supported.
582 > AC_CACHE_CHECK([whether your system supports Mach exceptions],
583 >  ac_cv_have_mach_exceptions, [
584    AC_LANG_SAVE
585    AC_LANG_CPLUSPLUS
586    AC_TRY_RUN([
587 <    #define HAVE_SIGINFO_T 1
587 >    #define HAVE_MACH_EXCEPTIONS 1
588      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
589      #include "vm_alloc.cpp"
590      #include "sigsegv.cpp"
591 <  ], ac_cv_have_extended_signals=yes, ac_cv_have_extended_signals=no,
591 >  ],
592 >  ac_cv_have_mach_exceptions=yes,
593 >  ac_cv_have_mach_exceptions=no,
594    dnl When cross-compiling, do not assume anything.
595 <  ac_cv_have_extended_signals=no
595 >  ac_cv_have_mach_exceptions=no
596    )
597    AC_LANG_RESTORE
598    ]
599   )
600 < AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
601 <  [Define if your system support extended signals.])
600 > if [[ "$ac_cv_have_mach_exceptions" = "yes" ]]; then
601 >  sigsegv_recovery=mach
602 > fi
603 > AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
604 >  [Define if your system supports Mach exceptions.])
605 >
606 > dnl Otherwise, check if extended signals are supported.
607 > if [[ -z "$sigsegv_recovery" ]]; then
608 >  AC_CACHE_CHECK([whether your system supports extended signal handlers],
609 >    ac_cv_have_extended_signals, [
610 >    AC_LANG_SAVE
611 >    AC_LANG_CPLUSPLUS
612 >    AC_TRY_RUN([
613 >      #define HAVE_SIGINFO_T 1
614 >      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
615 >      #include "vm_alloc.cpp"
616 >      #include "sigsegv.cpp"
617 >    ],
618 >    ac_cv_have_extended_signals=yes,
619 >    ac_cv_have_extended_signals=no,
620 >    dnl When cross-compiling, do not assume anything.
621 >    ac_cv_have_extended_signals=no
622 >    )
623 >    AC_LANG_RESTORE
624 >    ]
625 >  )
626 >  if [[ "$ac_cv_have_extended_signals" = "yes" ]]; then
627 >    sigsegv_recovery=siginfo
628 >  fi
629 >  AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
630 >    [Define if your system support extended signals.])
631 > fi
632  
633   dnl Otherwise, check for subterfuges.
634 < if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
634 > if [[ -z "$sigsegv_recovery" ]]; then
635    AC_CACHE_CHECK([whether we then have a subterfuge for your system],
636    ac_cv_have_sigcontext_hack, [
637      AC_LANG_SAVE
# Line 467 | Line 641 | if [[ "x$ac_cv_have_extended_signals" =
641        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
642        #include "vm_alloc.cpp"
643        #include "sigsegv.cpp"
644 <    ], ac_cv_have_sigcontext_hack=yes, ac_cv_have_sigcontext_hack=no,
644 >    ],
645 >    ac_cv_have_sigcontext_hack=yes,
646 >    ac_cv_have_sigcontext_hack=no,
647      dnl When cross-compiling, do not assume anything.
648      ac_cv_have_sigcontext_hack=no
649      )
650      AC_LANG_RESTORE
651    ])
652 +  if [[ "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
653 +    sigsegv_recovery=sigcontext
654 +  fi
655    AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack",
656      [Define if we know a hack to replace siginfo_t->si_addr member.])
657   fi
# Line 499 | Line 678 | AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_IN
678  
679   dnl Can we do Video on SEGV Signals ?
680   CAN_VOSF=no
681 < if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
681 > if [[ -n "$sigsegv_recovery" ]]; then
682    CAN_VOSF=yes
683 +  case $target_os in
684 +  darwin*)
685 +    dnl Signal handlers in darwin are way too slow since the whole
686 +    dnl machine state (GPRs, FPRs, VRs) is forcibly saved.
687 +    dnl In other words, VOSF is slower than static window refreshes.
688 +    CAN_VOSF=no
689 +    ;;
690 +  esac
691   fi
692  
693   dnl Enable VOSF screen updates with this feature is requested and feasible
# Line 510 | Line 697 | else
697      WANT_VOSF=no
698   fi
699  
700 + dnl Platform specific binary postprocessor
701 + AC_PATH_PROG(BLESS, "true")
702 + if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
703 +  BLESS=Darwin/lowmem
704 +  LDFLAGS="$LDFLAGS -pagezero_size 0x3000"
705 + fi
706 +
707   dnl Check for GCC 2.7 or higher.
708   HAVE_GCC27=no
709   AC_MSG_CHECKING(for GCC 2.7 or higher)
# Line 528 | Line 722 | AC_EGREP_CPP(xyes,
722   #endif
723   ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
724  
725 + dnl Check for ICC.
726 + AC_MSG_CHECKING(for ICC)
727 + HAVE_ICC=no
728 + if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then
729 +  HAVE_ICC=yes
730 + fi
731 + AC_MSG_RESULT($HAVE_ICC)
732 +
733   # Test if the compiler can generate ELF objects
734   AC_CACHE_CHECK([whether the compiler can generate ELF objects],
735    ac_cv_elf_objects, [
# Line 544 | Line 746 | AC_CACHE_CHECK([whether the compiler can
746   ])
747   ELF_OBJECTS=$ac_cv_elf_objects
748  
547 dnl FIXME: forcibly disable JIT for now
548 WANT_JIT=no
549
749   dnl CPU emulator sources
750   if [[ "x$EMULATED_PPC" = "xyes" ]]; then
751    CPUSRCS="\
# Line 574 | Line 773 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
773          ac_cv_use_dyngen=no
774          ;;
775        esac
776 +      dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2)
777 +      if [[ -z "$DYNGEN_CC" ]]; then
778 +        if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
779 +          DYNGEN_CC=$CXX
780 +        else
781 +          for p in /usr/bin /usr/local/bin; do
782 +            gxx="$p/g++"
783 +            if [[ -x "$gxx" ]]; then
784 +              DYNGEN_CC="$gxx"
785 +            fi
786 +          done
787 +        fi
788 +      fi
789 +      if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then
790 +        ac_cv_use_dyngen=no
791 +      fi
792      ])
793      if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
794        case $host_cpu in
795 <      i?86:yes)
795 >      i?86)
796          DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2"
797          if [[ "x$HAVE_GCC30" = "xyes" ]]; then
798            DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0"
799          else
800            DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0"
801          fi
802 +        saved_CPPFLAGS=$CPPFLAGS
803 +        CPPFLAGS="$CPPFLAGS -mmmx"
804 +        AC_CHECK_HEADERS(mmintrin.h,  [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -mmmx"])
805 +        CPPFLAGS="$CPPFLAGS -msse"
806 +        AC_CHECK_HEADERS(xmmintrin.h, [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse"])
807 +        CPPFLAGS="$CPPFLAGS -msse2"
808 +        AC_CHECK_HEADERS(emmintrin.h, [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse2"])
809 +        CPPFLAGS=$saved_CPPFLAGS
810 +        ;;
811 +      x86_64)
812 +        AC_CHECK_HEADERS(mmintrin.h xmmintrin.h emmintrin.h)
813          ;;
814        esac
815 <      DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=2000"
815 >      DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=10000"
816        if [[ "x$HAVE_GCC30" = "xyes" ]]; then
817          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls"
818        fi
# Line 605 | Line 831 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
831      fi
832    fi
833    CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
834 + else
835 +  WANT_JIT=no
836   fi
837   if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
838    AC_CACHE_CHECK([whether static data regions are executable],
# Line 620 | Line 848 | if [[ "x$ac_cv_use_dyngen" = "xyes" ]];
848        ((void (*)(void))p)();
849        return 0;
850   #endif
623 #if defined(__i386__)
624      static unsigned char p[] = {0xc3};
625      ((void (*)(void))p)();
626      return 0;
627 #endif
851        return 1;
852      }], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no,
853      dnl When cross-compiling, do not assume anything.
# Line 635 | Line 858 | fi
858   AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec",
859    [Define if your system marks static data pages as executable.])
860  
861 + if [[ "x$WANT_JIT" = "xyes" ]]; then
862 +  CPPFLAGS="$CPPFLAGS -DUSE_JIT"
863 + fi
864 +
865   dnl Generate Makefile.
866   AC_SUBST(DYNGENSRCS)
867 + AC_SUBST(DYNGEN_CC)
868   AC_SUBST(DYNGEN_OP_FLAGS)
869   AC_SUBST(SYSSRCS)
870   AC_SUBST(CPUSRCS)
871 + AC_SUBST(BLESS)
872   AC_OUTPUT(Makefile)
873  
874   dnl Print summary.
875   echo
876   echo SheepShaver configuration summary:
877   echo
878 + echo SDL support ...................... : $SDL_SUPPORT
879   echo XFree86 DGA support .............. : $WANT_XF86_DGA
880   echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE
881   echo Using PowerPC emulator ........... : $EMULATED_PPC
# Line 654 | Line 884 | echo Enable video on SEGV signals .....
884   echo ESD sound support ................ : $WANT_ESD
885   echo GTK user interface ............... : $WANT_GTK
886   echo mon debugger support ............. : $WANT_MON
887 + echo Bad memory access recovery type .. : $sigsegv_recovery
888   echo
889   echo "Configuration done. Now type \"make\"."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines