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

Comparing BasiliskII/src/Unix/configure.ac (file contents):
Revision 1.18 by gbeauche, 2003-08-17T10:16:23Z vs.
Revision 1.37 by gbeauche, 2004-11-15T00:07:54Z

# Line 6 | Line 6 | AC_CONFIG_SRCDIR(main_unix.cpp)
6   AC_PREREQ(2.52)
7   AC_CONFIG_HEADER(config.h)
8  
9 + dnl Aliases for PACKAGE and VERSION macros.
10 + AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Define this program name.])
11 + AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Define this program version.])
12 +
13 + dnl Some systems do not put corefiles in the currect directory, avoid saving
14 + dnl cores for the configure tests since some are intended to dump core.
15 + ulimit -c 0
16 +
17   dnl Video options.
18   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
19   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
20   AC_ARG_ENABLE(fbdev-dga,     [  --enable-fbdev-dga      use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes])
21   AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
22  
23 + dnl SDL options.
24 + AC_ARG_ENABLE(sdl-video,     [  --enable-sdl-video      use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no])
25 + AC_ARG_ENABLE(sdl-audio,     [  --enable-sdl-audio      use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no])
26 +
27   dnl JIT compiler options.
28   AC_ARG_ENABLE(jit-compiler,  [  --enable-jit-compiler   enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no])
29   AC_ARG_ENABLE(jit-debug,     [  --enable-jit-debug      activate native code disassemblers [default=no]], [WANT_JIT_DEBUG=$enableval], [WANT_JIT_DEBUG=no])
# Line 86 | Line 98 | AC_PROG_CPP
98   AC_PROG_CXX
99   AC_PROG_MAKE_SET
100   AC_PROG_INSTALL
101 + AC_PROG_EGREP
102  
103   dnl We use mon if possible.
104   MONSRCS=
# Line 104 | Line 117 | if [[ "x$WANT_MON" = "xyes" ]]; then
117              AC_CHECK_LIB(Hcurses, tgetent, ,
118                AC_CHECK_LIB(curses, tgetent))))))
119      AC_CHECK_LIB(readline, readline)
107    AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
120    else
121      AC_MSG_RESULT(no)
122      AC_MSG_WARN([Could not find mon, ignoring --with-mon.])
# Line 115 | Line 127 | fi
127   dnl Checks for libraries.
128   AC_CHECK_LIB(posix4, sem_init)
129   AC_CHECK_LIB(rt, timer_create)
130 + AC_CHECK_LIB(rt, shm_open)
131 +
132 + dnl Do we need SDL?
133 + WANT_SDL=no
134 + if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
135 +  WANT_SDL=yes
136 +  WANT_XF86_DGA=no
137 +  WANT_XF86_VIDMODE=no
138 +  WANT_FBDEV_DGA=no
139 +  SDL_SUPPORT="$SDL_SUPPORT video"
140 + fi
141 + if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then
142 +  WANT_SDL=yes
143 +  SDL_SUPPORT="$SDL_SUPPORT audio"
144 + fi
145 + if [[ "x$WANT_SDL" = "xyes" ]]; then
146 +  AC_PATH_PROG(sdl_config, "sdl-config")
147 +  if [[ -n "$sdl_config" ]]; then
148 +    case $target_os in
149 +    # Special treatment for Cygwin so that we can still use the POSIX layer
150 +    *cygwin*)
151 +      sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
152 +      sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
153 +      ;;
154 +    *)
155 +      sdl_cflags=`$sdl_config --cflags`
156 +      sdl_libs=`$sdl_config --libs`
157 +      ;;
158 +    esac
159 +    CFLAGS="$CFLAGS $sdl_cflags"
160 +    CXXFLAGS="$CXXFLAGS $sdl_cflags"
161 +    LIBS="$LIBS $sdl_libs"
162 +  else
163 +    WANT_SDL=no
164 +  fi
165 +  SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"`
166 + else
167 +  SDL_SUPPORT="none"
168 + fi
169  
170 < dnl We need X11.
171 < AC_PATH_XTRA
172 < if [[ "x$no_x" = "xyes" ]]; then
173 <  AC_MSG_ERROR([You need X11 to run Basilisk II.])
174 < fi
175 < CFLAGS="$CFLAGS $X_CFLAGS"
176 < CXXFLAGS="$CXXFLAGS $X_CFLAGS"
177 < LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
170 > dnl We need X11, if not using SDL.
171 > if [[ "x$WANT_SDL" = "xno" ]]; then
172 >  AC_PATH_XTRA
173 >  if [[ "x$no_x" = "xyes" ]]; then
174 >    AC_MSG_ERROR([You need X11 to run Basilisk II.])
175 >  fi
176 >  CFLAGS="$CFLAGS $X_CFLAGS"
177 >  CXXFLAGS="$CXXFLAGS $X_CFLAGS"
178 >  LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
179 > fi
180  
181   dnl We want pthreads. Try libpthread first, then libc_r (FreeBSD), then PTL.
182   HAVE_PTHREADS=yes
# Line 220 | Line 273 | AC_SYS_LARGEFILE
273  
274   dnl Checks for header files.
275   AC_HEADER_STDC
276 < AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h)
276 > AC_CHECK_HEADERS(unistd.h fcntl.h sys/types.h sys/time.h sys/mman.h mach/mach.h)
277 > AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
278 > AC_CHECK_HEADERS(sys/socket.h)
279 > AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [
280 > #ifdef HAVE_SYS_SOCKET_H
281 > #include <sys/socket.h>
282 > #endif
283 > ])
284 > AC_CHECK_HEADERS(AvailabilityMacros.h)
285  
286   dnl Checks for typedefs, structures, and compiler characteristics.
287   AC_C_BIGENDIAN
# Line 235 | Line 296 | AC_CHECK_SIZEOF(double, 8)
296   AC_CHECK_SIZEOF(long double, 12)
297   AC_CHECK_SIZEOF(void *, 4)
298   AC_TYPE_OFF_T
299 < AC_CHECK_TYPE(loff_t, off_t)
300 < AC_CHECK_TYPE(caddr_t, [char *])
299 > AC_CHECK_TYPES(loff_t)
300 > AC_CHECK_TYPES(caddr_t)
301   AC_TYPE_SIZE_T
302   AC_TYPE_SIGNAL
303   AC_HEADER_TIME
# Line 291 | Line 352 | mips-sony-bsd|mips-sony-newsos4)
352   *-*-sco3.2v5*)
353          no_dev_ptmx=1
354          ;;
355 + *-*-cygwin*)
356 +        no_dev_ptmx=1
357 +        ;;
358   esac
359  
360   if test -z "$no_dev_ptmx" ; then
# Line 313 | Line 377 | AC_CHECK_FILE([/dev/ptc],
377   dnl (end of code from openssh-3.2.2p1 configure.ac)
378  
379  
380 + dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
381 + AC_DEFUN(AC_CHECK_FRAMEWORK, [
382 +  AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
383 +  AC_CACHE_CHECK([whether compiler supports framework $1],
384 +    ac_Framework, [
385 +    saved_LIBS="$LIBS"
386 +    LIBS="$LIBS -framework $1"
387 +    AC_TRY_LINK(
388 +      [$2], [int main(void) { return 0; }],
389 +      [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
390 +    )
391 +  ])
392 +  AS_IF([test AS_VAR_GET(ac_Framework) = yes],
393 +    [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
394 +  )
395 +  AS_VAR_POPDEF([ac_Framework])dnl
396 + ])
397 +
398 + dnl Check for some MacOS X frameworks
399 + AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
400 + AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
401 +
402   dnl Select system-dependant source files.
403   SERIALSRC=serial_unix.cpp
404   ETHERSRC=../dummy/ether_dummy.cpp
# Line 373 | Line 459 | irix*)
459    dnl Do a test compile of an empty function
460    AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
461    CFLAGS="$ocflags"
462 <
462 >  ;;
463 > darwin*)
464 >  if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then
465 >    EXTRASYSSRCS="../MacOSX/sys_darwin.cpp"
466 >  fi
467 >  ;;
468 > cygwin*)
469 >  SERIALSRC="../dummy/serial_dummy.cpp"
470 >  EXTRASYSSRCS="../Windows/BasiliskII.rc"
471    ;;
472   esac
473 + dnl SDL overrides
474 + if [[ "x$WANT_SDL" = "xyes" ]]; then
475 +  AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
476 + fi
477 + if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
478 +  AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
479 +  VIDEOSRCS="../SDL/video_sdl.cpp"
480 +  KEYCODES="../SDL/keycodes"
481 +  if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
482 +    EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
483 +  else
484 +    EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
485 +  fi
486 + else
487 +  VIDEOSRCS="video_x.cpp"
488 +  KEYCODES="keycodes"
489 +  EXTRASYSSRCS="$EXTRASYSSRCS clip_unix.cpp"
490 + fi
491 + if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then
492 +  AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support])
493 +  AUDIOSRC="../SDL/audio_sdl.cpp"
494 + fi
495  
496   dnl Use 68k CPU natively?
497   WANT_NATIVE_M68K=no
# Line 391 | Line 507 | if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
507    ETHERSRC=../dummy/ether_dummy.cpp
508    AUDIOSRC=../dummy/audio_dummy.cpp
509   fi
510 < SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
510 > SYSSRCS="$VIDEOSRCS $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
511  
512   dnl Define a macro that translates a yesno-variable into a C macro definition
513   dnl to be put into the config.h file
# Line 404 | Line 520 | AC_DEFUN(AC_TRANSLATE_DEFINE, [
520      fi
521   ])
522  
523 + dnl Check that the host supports TUN/TAP devices
524 + AC_CACHE_CHECK([whether TUN/TAP is supported],
525 +  ac_cv_tun_tap_support, [
526 +  AC_TRY_COMPILE([
527 +    #if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H)
528 +    #include <linux/if.h>
529 +    #include <linux/if_tun.h>
530 +    #endif
531 +    #if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H)
532 +    #include <net/if.h>
533 +    #include <net/if_tun.h>
534 +    #endif
535 +  ], [
536 +    struct ifreq ifr;
537 +    memset(&ifr, 0, sizeof(ifr));
538 +    ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
539 +  ],
540 +  ac_cv_tun_tap_support=yes, ac_cv_tun_tap_support=no
541 +  )
542 + ])
543 + AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support",
544 +  [Define if your system supports TUN/TAP devices.])
545 +
546   dnl Various checks if the system supports vm_allocate() and the like functions.
547   have_mach_vm=no
548   if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \
# Line 550 | Line 689 | AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_
689  
690   fi dnl HAVE_MMAP_VM
691  
692 + dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
693 + AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x2000],
694 +  ac_cv_pagezero_hack, [
695 +  ac_cv_pagezero_hack=no
696 +  if AC_TRY_COMMAND([Darwin/testlmem.sh 0x2000]); then
697 +    ac_cv_pagezero_hack=yes
698 +    dnl might as well skip the test for mmap-able low memory
699 +    ac_cv_can_map_lm=no
700 +  fi
701 + ])
702 + AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
703 +  [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
704 +
705   dnl Check if we can mmap 0x2000 bytes from 0x0000
706   AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
707    ac_cv_can_map_lm, [
# Line 573 | Line 725 | AC_CACHE_CHECK([whether we can map Low M
725    ]
726   )
727  
728 + dnl Check if we have POSIX shared memory support
729 + AC_CACHE_CHECK([whether POSIX shared memory is working],
730 +  ac_cv_have_posix_shm, [
731 +  AC_LANG_SAVE
732 +  AC_LANG_CPLUSPLUS
733 +  AC_TRY_RUN([
734 +    #define HAVE_POSIX_SHM
735 +    #include "vm_alloc.cpp"
736 +    int main(void) { /* returns 0 if we have working POSIX shm */
737 +      if (vm_init() < 0) exit(2);
738 +      char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
739 +      if (m1 == VM_MAP_FAILED) exit(3);
740 +      vm_exit(); exit(0);
741 +    }
742 +  ], ac_cv_have_posix_shm=yes, ac_cv_have_posix_shm=no,
743 +  dnl When cross-compiling, do not assume anything.
744 +  ac_cv_have_posix_shm="guessing no"
745 +  )
746 +  AC_LANG_RESTORE
747 +  ]
748 + )
749 + AC_TRANSLATE_DEFINE(HAVE_POSIX_SHM, "$ac_cv_have_posix_shm",
750 +  [Define if your system supports POSIX shared memory.])
751 +
752 + dnl Check if we have working 33-bit memory addressing
753 + AC_CACHE_CHECK([whether 33-bit memory addressing is working],
754 +  ac_cv_have_33bit_addressing, [
755 +  AC_LANG_SAVE
756 +  AC_LANG_CPLUSPLUS
757 +  AC_TRY_RUN([
758 +    #define USE_33BIT_ADDRESSING 1
759 +    #include "vm_alloc.cpp"
760 +    int main(void) { /* returns 0 if we have working 33-bit addressing */
761 +      if (sizeof(void *) < 8) exit(1);
762 +      if (vm_init() < 0) exit(2);
763 +      char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
764 +      if (m1 == VM_MAP_FAILED) exit(3);
765 +      char *m2 = m1 + (1L << 32);
766 +      m1[0] = 0x12; if (m2[0] != 0x12) exit(4);
767 +      m2[0] = 0x34; if (m1[0] != 0x34) exit(5);
768 +      vm_exit(); exit(0);
769 +    }
770 +  ], ac_cv_have_33bit_addressing=yes, ac_cv_have_33bit_addressing=no,
771 +  dnl When cross-compiling, do not assume anything.
772 +  ac_cv_have_33bit_addressing="guessing no"
773 +  )
774 +  AC_LANG_RESTORE
775 +  ]
776 + )
777 +
778   dnl Check signal handlers need to be reinstalled
779   AC_CACHE_CHECK([whether signal handlers need to be reinstalled],
780    ac_cv_signal_need_reinstall, [
# Line 634 | Line 836 | AC_CACHE_CHECK([whether sigaction handle
836   AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
837    [Define if your system requires sigactions to be reinstalled.])
838  
839 < dnl Check if extended signals are supported.
840 < AC_CACHE_CHECK([whether your system supports extended signal handlers],
841 <  ac_cv_have_extended_signals, [
839 > dnl Check if Mach exceptions supported.
840 > AC_CACHE_CHECK([whether your system supports Mach exceptions],
841 >  ac_cv_have_mach_exceptions, [
842    AC_LANG_SAVE
843    AC_LANG_CPLUSPLUS
844    AC_TRY_RUN([
845 <    #define HAVE_SIGINFO_T 1
845 >    #define HAVE_MACH_EXCEPTIONS 1
846      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
847      #include "vm_alloc.cpp"
848      #include "sigsegv.cpp"
849 <  ], ac_cv_have_extended_signals=yes, ac_cv_have_extended_signals=no,
849 >  ], [
850 >  sigsegv_recovery=mach
851 >  ac_cv_have_mach_exceptions=yes
852 >  ],
853 >  ac_cv_have_mach_exceptions=no,
854    dnl When cross-compiling, do not assume anything.
855 <  ac_cv_have_extended_signals=no
855 >  ac_cv_have_mach_exceptions=no
856    )
857    AC_LANG_RESTORE
858    ]
859   )
860 < AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
861 <  [Define if your system support extended signals.])
860 > AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
861 >  [Define if your system supports Mach exceptions.])
862 >
863 > dnl Check if Windows exceptions are supported.
864 > AC_CACHE_CHECK([whether your system supports Windows exceptions],
865 >  ac_cv_have_win32_exceptions, [
866 >  AC_LANG_SAVE
867 >  AC_LANG_CPLUSPLUS
868 >  AC_TRY_RUN([
869 >    #define HAVE_WIN32_EXCEPTIONS 1
870 >    #define CONFIGURE_TEST_SIGSEGV_RECOVERY
871 >    #include "vm_alloc.cpp"
872 >    #include "sigsegv.cpp"
873 >  ], [
874 >  sigsegv_recovery=win32
875 >  ac_cv_have_win32_exceptions=yes
876 >  ],
877 >  ac_cv_have_win32_exceptions=no,
878 >  dnl When cross-compiling, do not assume anything.
879 >  ac_cv_have_win32_exceptions=no
880 >  )
881 >  AC_LANG_RESTORE
882 >  ]
883 > )
884 > AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions",
885 >  [Define if your system supports Windows exceptions.])
886 >
887 > dnl Otherwise, check if extended signals are supported.
888 > if [[ -z "$sigsegv_recovery" ]]; then
889 >  AC_CACHE_CHECK([whether your system supports extended signal handlers],
890 >    ac_cv_have_extended_signals, [
891 >    AC_LANG_SAVE
892 >    AC_LANG_CPLUSPLUS
893 >    AC_TRY_RUN([
894 >      #define HAVE_SIGINFO_T 1
895 >      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
896 >      #include "vm_alloc.cpp"
897 >      #include "sigsegv.cpp"
898 >    ], [
899 >    sigsegv_recovery=siginfo
900 >    ac_cv_have_extended_signals=yes
901 >    ],
902 >    ac_cv_have_extended_signals=no,
903 >    dnl When cross-compiling, do not assume anything.
904 >    ac_cv_have_extended_signals=no
905 >    )
906 >    AC_LANG_RESTORE
907 >    ]
908 >  )
909 >  AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
910 >    [Define if your system support extended signals.])
911 > fi
912  
913   dnl Otherwise, check for subterfuges.
914 < if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
914 > if [[ -z "$sigsegv_recovery" ]]; then
915    AC_CACHE_CHECK([whether we then have a subterfuge for your system],
916    ac_cv_have_sigcontext_hack, [
917      AC_LANG_SAVE
# Line 665 | Line 921 | if [[ "x$ac_cv_have_extended_signals" =
921        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
922        #include "vm_alloc.cpp"
923        #include "sigsegv.cpp"
924 <    ], ac_cv_have_sigcontext_hack=yes, ac_cv_have_sigcontext_hack=no,
924 >    ], [
925 >    sigsegv_recovery=sigcontext
926 >    ac_cv_have_sigcontext_hack=yes
927 >    ],
928 >    ac_cv_have_sigcontext_hack=no,
929      dnl When cross-compiling, do not assume anything.
930      ac_cv_have_sigcontext_hack=no
931      )
# Line 697 | Line 957 | AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_IN
957  
958   dnl Can we do Video on SEGV Signals ?
959   CAN_VOSF=no
960 < if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
960 > if [[ -n "$sigsegv_recovery" ]]; then
961    CAN_VOSF=yes
962   fi
963  
964 + dnl A dummy program that returns always true
965 + AC_PATH_PROG([BLESS], "true")
966 +
967   dnl Determine the addressing mode to use
968   if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
969    ADDRESSING_MODE="real"
# Line 711 | Line 974 | else
974      case $am in
975      real)
976        dnl Requires ability to mmap() Low Memory globals
977 <      if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
977 >      if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
978          continue
979        fi
980 <          dnl Requires VOSF screen updates
980 >      dnl Requires VOSF screen updates
981        if [[ "x$CAN_VOSF" = "xno" ]]; then
982          continue
983        fi
# Line 722 | Line 985 | else
985        ADDRESSING_MODE="real"
986        WANT_VOSF=yes dnl we can use VOSF and we need it actually
987        DEFINES="$DEFINES -DREAL_ADDRESSING"
988 +      if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
989 +        BLESS=Darwin/lowmem
990 +        LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
991 +      fi
992        break
993        ;;
994      direct)
# Line 816 | Line 1083 | if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1083    fi
1084   fi
1085  
1086 + dnl Store motion was introduced in 3.3-hammer branch and any gcc >= 3.4
1087 + dnl However, there are some corner cases exposed on x86-64
1088 + if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1089 +  SAVED_CXXFLAGS="$CXXFLAGS"
1090 +  CXXFLAGS="$CXXFLAGS -fno-gcse-sm"
1091 +  AC_CACHE_CHECK([whether GCC supports store motion], ac_cv_gcc_store_motion, [
1092 +    AC_LANG_SAVE
1093 +    AC_LANG_CPLUSPLUS
1094 +    AC_TRY_COMPILE([],[],[ac_cv_gcc_store_motion=yes],[ac_cv_gcc_store_motion=no])
1095 +    AC_LANG_RESTORE
1096 +  ])
1097 +  if [[ "x$ac_cv_gcc_store_motion" != "xyes" ]]; then
1098 +    CXXFLAGS="$SAVED_CXXFLAGS"
1099 +  fi
1100 + fi
1101 +
1102   dnl Select appropriate CPU source and REGPARAM define.
1103   ASM_OPTIMIZATIONS=none
1104   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
# Line 840 | Line 1123 | elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HA
1123    if [[ "x$HAVE_GAS" = "xyes" ]]; then
1124      ASM_OPTIMIZATIONS="x86-64"
1125      DEFINES="$DEFINES -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS"
1126 +    JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
1127 +    CAN_JIT=yes
1128 +    WANT_33BIT_ADDRESSING=yes
1129    fi
1130   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
1131    dnl SPARC CPU
# Line 896 | Line 1182 | else
1182    JITSRCS=""
1183   fi
1184  
1185 + dnl Use 33-bit memory addressing?
1186 + if [[ "$ac_cv_have_33bit_addressing:$WANT_33BIT_ADDRESSING" = "yes:yes" ]]; then
1187 +  use_33bit_addressing=yes
1188 + fi
1189 + AC_TRANSLATE_DEFINE(USE_33BIT_ADDRESSING, "$use_33bit_addressing",
1190 +  [Define to use 33-bit memory addressing on 64-bit JIT capable systems.])
1191 +
1192   dnl Utility macro used by next two tests.
1193   dnl AC_EXAMINE_OBJECT(C source code,
1194   dnl     commands examining object file,
# Line 1093 | Line 1386 | fi
1386  
1387   dnl Remove the "-g" option if set for GCC.
1388   if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1389 <  CFLAGS=`echo $CFLAGS | sed -e 's/-g//g'`
1390 <  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g//g'`
1389 >  CFLAGS=`echo $CFLAGS | sed -e 's/-g\b//g'`
1390 >  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g\b//g'`
1391   fi
1392  
1393   dnl Or if we have -IPA (MIPSPro compilers)
# Line 1110 | Line 1403 | AC_SUBST(DEFINES)
1403   AC_SUBST(SYSSRCS)
1404   AC_SUBST(CPUINCLUDES)
1405   AC_SUBST(CPUSRCS)
1406 + AC_SUBST(BLESS)
1407 + AC_SUBST(KEYCODES)
1408   AC_CONFIG_FILES([Makefile])
1409   AC_OUTPUT
1410  
# Line 1117 | Line 1412 | dnl Print summary.
1412   echo
1413   echo Basilisk II configuration summary:
1414   echo
1415 + echo SDL support ............................ : $SDL_SUPPORT
1416   echo XFree86 DGA support .................... : $WANT_XF86_DGA
1417   echo XFree86 VidMode support ................ : $WANT_XF86_VIDMODE
1418   echo fbdev DGA support ...................... : $WANT_FBDEV_DGA
# Line 1130 | Line 1426 | echo JIT debug mode ....................
1426   echo Floating-Point emulation core .......... : $FPE_CORE
1427   echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
1428   echo Addressing mode ........................ : $ADDRESSING_MODE
1429 + echo Bad memory access recovery type ........ : $sigsegv_recovery
1430   echo
1431   echo "Configuration done. Now type \"make\" (or \"gmake\")."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines