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.21 by gbeauche, 2004-02-24T10:21:21Z vs.
Revision 1.26 by gbeauche, 2004-06-24T15:37:25Z

# 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])
# Line 86 | 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
# Line 183 | 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 223 | Line 250 | 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)
# Line 259 | Line 287 | darwin*)
287    fi
288    ;;
289   esac
290 < SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
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 >
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 272 | 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 525 | Line 588 | AC_CACHE_CHECK([whether your system supp
588      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
589      #include "vm_alloc.cpp"
590      #include "sigsegv.cpp"
528  ], [
529  sigsegv_recovery=mach
530  ac_cv_have_mach_exceptions=yes
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_mach_exceptions=no
# Line 536 | Line 597 | AC_CACHE_CHECK([whether your system supp
597    AC_LANG_RESTORE
598    ]
599   )
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  
# Line 550 | Line 614 | if [[ -z "$sigsegv_recovery" ]]; then
614        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
615        #include "vm_alloc.cpp"
616        #include "sigsegv.cpp"
553    ], [
554    sigsegv_recovery=siginfo
555    ac_cv_have_extended_signals=yes
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
# Line 561 | Line 623 | if [[ -z "$sigsegv_recovery" ]]; then
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
# Line 576 | Line 641 | if [[ -z "$sigsegv_recovery" ]]; then
641        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
642        #include "vm_alloc.cpp"
643        #include "sigsegv.cpp"
579    ], [
580    sigsegv_recovery=sigcontext
581    ac_cv_have_sigcontext_hack=yes
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 614 | Line 680 | dnl Can we do Video on SEGV Signals ?
680   CAN_VOSF=no
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 801 | Line 875 | 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines