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.23 by gbeauche, 2003-10-12T22:39:57Z

# 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])
# Line 104 | Line 112 | if [[ "x$WANT_MON" = "xyes" ]]; then
112              AC_CHECK_LIB(Hcurses, tgetent, ,
113                AC_CHECK_LIB(curses, tgetent))))))
114      AC_CHECK_LIB(readline, readline)
107    AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
115    else
116      AC_MSG_RESULT(no)
117      AC_MSG_WARN([Could not find mon, ignoring --with-mon.])
# Line 220 | Line 227 | AC_SYS_LARGEFILE
227  
228   dnl Checks for header files.
229   AC_HEADER_STDC
230 < AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h)
230 > AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h mach/mach.h)
231 > AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
232  
233   dnl Checks for typedefs, structures, and compiler characteristics.
234   AC_C_BIGENDIAN
# Line 550 | Line 558 | AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_
558  
559   fi dnl HAVE_MMAP_VM
560  
561 + dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
562 + AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x2000],
563 +  ac_cv_pagezero_hack, [
564 +  ac_cv_pagezero_hack=no
565 +  if AC_TRY_COMMAND([Darwin/testlmem.sh 0x2000]); then
566 +    ac_cv_pagezero_hack=yes
567 +    dnl might as well skip the test for mmap-able low memory
568 +    ac_cv_can_map_lm=no
569 +  fi
570 + ])
571 + AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
572 +  [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
573 +
574   dnl Check if we can mmap 0x2000 bytes from 0x0000
575   AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
576    ac_cv_can_map_lm, [
# Line 634 | Line 655 | AC_CACHE_CHECK([whether sigaction handle
655   AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
656    [Define if your system requires sigactions to be reinstalled.])
657  
658 < dnl Check if extended signals are supported.
659 < AC_CACHE_CHECK([whether your system supports extended signal handlers],
660 <  ac_cv_have_extended_signals, [
658 > dnl Check if Mach exceptions supported.
659 > AC_CACHE_CHECK([whether your system supports Mach exceptions],
660 >  ac_cv_have_mach_exceptions, [
661    AC_LANG_SAVE
662    AC_LANG_CPLUSPLUS
663    AC_TRY_RUN([
664 <    #define HAVE_SIGINFO_T 1
664 >    #define HAVE_MACH_EXCEPTIONS 1
665      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
666      #include "vm_alloc.cpp"
667      #include "sigsegv.cpp"
668 <  ], ac_cv_have_extended_signals=yes, ac_cv_have_extended_signals=no,
668 >  ], [
669 >  sigsegv_recovery=mach
670 >  ac_cv_have_mach_exceptions=yes
671 >  ],
672 >  ac_cv_have_mach_exceptions=no,
673    dnl When cross-compiling, do not assume anything.
674 <  ac_cv_have_extended_signals=no
674 >  ac_cv_have_mach_exceptions=no
675    )
676    AC_LANG_RESTORE
677    ]
678   )
679 < AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
680 <  [Define if your system support extended signals.])
679 > AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
680 >  [Define if your system supports Mach exceptions.])
681 >
682 > dnl Otherwise, check if extended signals are supported.
683 > if [[ -z "$sigsegv_recovery" ]]; then
684 >  AC_CACHE_CHECK([whether your system supports extended signal handlers],
685 >    ac_cv_have_extended_signals, [
686 >    AC_LANG_SAVE
687 >    AC_LANG_CPLUSPLUS
688 >    AC_TRY_RUN([
689 >      #define HAVE_SIGINFO_T 1
690 >      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
691 >      #include "vm_alloc.cpp"
692 >      #include "sigsegv.cpp"
693 >    ], [
694 >    sigsegv_recovery=siginfo
695 >    ac_cv_have_extended_signals=yes
696 >    ],
697 >    ac_cv_have_extended_signals=no,
698 >    dnl When cross-compiling, do not assume anything.
699 >    ac_cv_have_extended_signals=no
700 >    )
701 >    AC_LANG_RESTORE
702 >    ]
703 >  )
704 >  AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
705 >    [Define if your system support extended signals.])
706 > fi
707  
708   dnl Otherwise, check for subterfuges.
709 < if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
709 > if [[ -z "$sigsegv_recovery" ]]; then
710    AC_CACHE_CHECK([whether we then have a subterfuge for your system],
711    ac_cv_have_sigcontext_hack, [
712      AC_LANG_SAVE
# Line 665 | Line 716 | if [[ "x$ac_cv_have_extended_signals" =
716        #define CONFIGURE_TEST_SIGSEGV_RECOVERY
717        #include "vm_alloc.cpp"
718        #include "sigsegv.cpp"
719 <    ], ac_cv_have_sigcontext_hack=yes, ac_cv_have_sigcontext_hack=no,
719 >    ], [
720 >    sigsegv_recovery=sigcontext
721 >    ac_cv_have_sigcontext_hack=yes
722 >    ],
723 >    ac_cv_have_sigcontext_hack=no,
724      dnl When cross-compiling, do not assume anything.
725      ac_cv_have_sigcontext_hack=no
726      )
# Line 697 | Line 752 | AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_IN
752  
753   dnl Can we do Video on SEGV Signals ?
754   CAN_VOSF=no
755 < if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
755 > if [[ -n "$sigsegv_recovery" ]]; then
756    CAN_VOSF=yes
757   fi
758  
759 + dnl A dummy program that returns always true
760 + BLESS=/bin/true
761 +
762   dnl Determine the addressing mode to use
763   if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
764    ADDRESSING_MODE="real"
# Line 711 | Line 769 | else
769      case $am in
770      real)
771        dnl Requires ability to mmap() Low Memory globals
772 <      if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
772 >      if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
773          continue
774        fi
775 <          dnl Requires VOSF screen updates
775 >      dnl Requires VOSF screen updates
776        if [[ "x$CAN_VOSF" = "xno" ]]; then
777          continue
778        fi
# Line 722 | Line 780 | else
780        ADDRESSING_MODE="real"
781        WANT_VOSF=yes dnl we can use VOSF and we need it actually
782        DEFINES="$DEFINES -DREAL_ADDRESSING"
783 +      if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
784 +        BLESS=Darwin/lowmem
785 +        LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
786 +      fi
787        break
788        ;;
789      direct)
# Line 1110 | Line 1172 | AC_SUBST(DEFINES)
1172   AC_SUBST(SYSSRCS)
1173   AC_SUBST(CPUINCLUDES)
1174   AC_SUBST(CPUSRCS)
1175 + AC_SUBST(BLESS)
1176   AC_CONFIG_FILES([Makefile])
1177   AC_OUTPUT
1178  
# Line 1130 | Line 1193 | echo JIT debug mode ....................
1193   echo Floating-Point emulation core .......... : $FPE_CORE
1194   echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
1195   echo Addressing mode ........................ : $ADDRESSING_MODE
1196 + echo Bad memory access recovery type ........ : $sigsegv_recovery
1197   echo
1198   echo "Configuration done. Now type \"make\" (or \"gmake\")."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines