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

Comparing BasiliskII/src/Unix/configure.in (file contents):
Revision 1.28 by cebix, 2000-10-14T16:30:53Z vs.
Revision 1.37 by cebix, 2001-03-28T16:53:38Z

# Line 10 | Line 10 | AC_ARG_ENABLE(xf86-dga,      [  --enable
10   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
11   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])
12   AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=no]], [WANT_VOSF=$enableval], [WANT_VOSF=no])
13 < AC_ARG_ENABLE(16bit-vidmode, [  --enable-16bit-vidmode  enable 16-bit video if possible [default=yes]], [WANT_16BIT_VIDMODE=$enableval], [WANT_16BIT_VIDMODE=yes])
13 >
14 > dnl FPU emulation core.
15 > AC_ARG_ENABLE(fpe,
16 > [  --enable-fpe=which      specify which fpu emulator to use [default=opt]],
17 > [ case "$enableval" in
18 >    default)    FPE_CORE="default";; dnl fpu_x86.cpp if i386 architecture, fpu_uae.cpp otherwise
19 >        uae)            FPE_CORE="uae";;
20 >        *)                      AC_MSG_ERROR([--enable-fpe takes only one of the following values: default, uae]);;
21 >  esac
22 > ],
23 > [ FPE_CORE="default"
24 > ])
25 >
26 > dnl Addressing modes.
27   AC_ARG_ENABLE(addressing,
28 < [  --enable-addressing=mode specify the addressing mode to use [default=fastest]],
28 > [  --enable-addressing=AM  specify the addressing mode to use [default=fastest]],
29   [ case "$enableval" in
30      real)       ADDRESSING_TEST_ORDER="real";;
31      direct)     ADDRESSING_TEST_ORDER="direct";;
32      banks)      ADDRESSING_TEST_ORDER="banks";;
33 < dnl fastest)    ADDRESSING_TEST_ORDER="real direct banks";; gb-- will enable later...
34 <    fastest)    ADDRESSING_TEST_ORDER="direct banks";;
22 <    *)          AC_MSG_ERROR([--enable-mem-addressing takes only one of the following values: fastest, real, direct, banks]);;
33 >    fastest)ADDRESSING_TEST_ORDER="direct banks";;
34 >    *)          AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);;
35    esac
36   ],
25 dnl [ ADDRESSING_TEST_ORDER="real direct banks" gb-- will probably reactivate later
37   [ ADDRESSING_TEST_ORDER="direct banks"
38   ])
39 +
40 + dnl External packages.
41   AC_ARG_WITH(esd,             [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
42   AC_ARG_WITH(gtk,             [  --with-gtk              use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
43   AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
# Line 47 | Line 60 | dnl Target CPU type.
60   HAVE_I386=no
61   HAVE_M68K=no
62   HAVE_SPARC=no
63 + HAVE_POWERPC=no
64   case "$target_cpu" in
65    i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;;
66    m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;;
67    sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;;
68 +  powerpc* ) CPU_TYPE=powerpc HAVE_POWERPC=yes;;
69    *) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/'`;;
70   esac
71   DEFINES="$DEFINES -DCPU_$CPU_TYPE"
# Line 71 | Line 86 | if [[ "x$WANT_MON" = "xyes" ]]; then
86    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
87      AC_MSG_RESULT(yes)
88      AC_DEFINE(ENABLE_MON)
89 <    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_8080.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
89 >    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
90      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
91      AC_CHECK_LIB(readline, readline)
92      AC_CHECK_LIB(termcap, tputs)
# Line 259 | Line 274 | solaris*)
274    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
275    ;;
276   irix*)
277 +  AUDIOSRC=Irix/audio_irix.cpp
278    EXTRASYSSRCS=Irix/unaligned.c
279    dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
280    DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
281 <  LIBS="$LIBS -lm"
281 >  LIBS="$LIBS -laudio"
282 >
283 >  dnl Check if our compiler supports -Ofast (MIPSPro)
284 >  HAVE_OFAST=no
285 >  ocflags="$CFLAGS"
286 >  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'`
287 >  AC_MSG_CHECKING(if "-Ofast" works)
288 >  dnl Do a test compile of an empty function
289 >  AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_OFAST=yes], AC_MSG_RESULT(no))
290 >  CFLAGS="$ocflags"
291 >
292    ;;
293   esac
294  
# Line 393 | Line 419 | if [[ "x$ac_cv_have_extended_signals" =
419            AC_LANG_RESTORE
420          ])
421          AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
422 +      elif [[ "x$HAVE_POWERPC" = "xyes" ]]; then
423 +        AC_CACHE_CHECK("whether we then have a subterfuge for your system",
424 +                  ac_cv_have_sigcontext_hack, [
425 +          AC_LANG_SAVE
426 +          AC_LANG_CPLUSPLUS
427 +          AC_TRY_RUN([
428 +            #include <unistd.h>
429 +            #include <signal.h>
430 +            #include <fcntl.h>
431 +            #include <sys/mman.h>
432 +
433 +            static volatile caddr_t mem = 0;
434 +            static int zero_fd = -1;
435 +
436 +            static RETSIGTYPE segfault_handler(int, struct sigcontext_struct *scs)
437 +            { if ((caddr_t)(scs->regs->dar) != mem) exit(1);
438 +              munmap(mem, getpagesize()); close(zero_fd); exit(0); }
439 +
440 +            int main()
441 +            { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
442 +              if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
443 +              struct sigaction sa; sa.sa_flags = 0;
444 +              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
445 +              sigaction(SIGSEGV, &sa, 0);
446 +              mem[0] = 0;
447 +              exit(1); // should not be reached
448 +            }
449 +          ],
450 +          [ac_cv_have_sigcontext_hack=yes],
451 +          [ac_cv_have_sigcontext_hack=no]
452 +          )
453 +          AC_LANG_RESTORE
454 +        ])
455 +        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
456        fi
457        ;;
458      netbsd*)
# Line 450 | Line 510 | else
510    for am in $ADDRESSING_TEST_ORDER; do
511      case $am in
512      real)
513 <      dnl Requires ability to mmap Low Memory globals.
513 >      dnl Requires ability to mmap() Low Memory globals
514        if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
515          continue
516        fi
517 <      if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then
518 <        dnl Requires only VOSF if 16-bit vidmode enable
519 <        if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then
460 <          if [[ "x$CAN_VOSF" = "xno" ]]; then
461 <            continue
462 <          fi
463 <        else
464 <          DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE"
465 <        fi
466 <      else
467 <        dnl Requires VOSF
468 <        if [[ "x$CAN_VOSF" = "xno" ]]; then
469 <          continue
470 <        fi
517 >          dnl Requires VOSF screen updates
518 >      if [[ "x$CAN_VOSF" = "xno" ]]; then
519 >        continue
520        fi
521 <      dnl Real addressing will probably work
521 >      dnl Real addressing will probably work.
522        ADDRESSING_MODE="real"
523        WANT_VOSF=yes dnl we can use VOSF and we need it actually
524        DEFINES="$DEFINES -DREAL_ADDRESSING"
525        break
526        ;;
527      direct)
528 <      dnl Requires VOSF
528 >      dnl Requires VOSF screen updates
529        if [[ "x$CAN_VOSF" = "xyes" ]]; then
530          ADDRESSING_MODE="direct"
531          WANT_VOSF=yes dnl we can use VOSF and we need it actually
# Line 500 | Line 549 | else
549    fi
550   fi
551  
552 < dnl Since real and direct addressing modes automatically activate VOSF,
553 < dnl I put this test here.
505 < if [[ "x$WANT_VOSF" = "xyes" ]]; then
506 <  if [[ "x$CAN_VOSF" = "xno" ]]; then
507 <    AC_MSG_WARN([Sorry, your system does not support Video on SEGV signals])
508 <    WANT_VOSF=no
509 <  else
552 > dnl Enable VOSF screen updates with this feature is requested and feasible
553 > if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
554      AC_DEFINE(ENABLE_VOSF)
555 <  fi
555 > else
556 >    WANT_VOSF=no
557   fi
558  
559   dnl Check for GAS.
# Line 545 | Line 590 | if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE
590    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
591    if [[ "x$HAVE_GAS" = "xyes" ]]; then
592      ASM_OPTIMIZATIONS=i386
593 <    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTFLAGS"
594 <    CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
593 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
594 >    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
595      FPUSRCS="../uae_cpu/fpu_x86.cpp"
596    fi
597   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
# Line 559 | Line 604 | elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HA
604      case "$SPARC_TYPE" in
605      SPARC_V8)
606        ASM_OPTIMIZATIONS="SPARC V8 architecture"
607 <      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTFLAGS"
607 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
608        CFLAGS="$CFLAGS -Wa,-Av8"
609        CXXFLAGS="$CXXFLAGS -Wa,-Av8"
610        ;;
611      SPARC_V9)
612        ASM_OPTIMIZATIONS="SPARC V9 architecture"
613 <      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTFLAGS"
613 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
614        CFLAGS="$CFLAGS -Wa,-Av9"
615        CXXFLAGS="$CXXFLAGS -Wa,-Av9"
616        ;;
# Line 578 | Line 623 | elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]
623    CPUSRCS="asm_support.s"
624   fi
625  
626 + dnl Select appropriate FPU source.
627 + dnl 1. Optimized X86 assembly core if target is i386 architecture
628 + SAVED_DEFINES=$DEFINES
629 + if [[ "x$FPE_CORE" = "xdefault" ]]; then
630 +  if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
631 +    DEFINES="$DEFINES -DFPU_X86"
632 +    FPE_CORE_STR="i386 optimized core"
633 +    FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp"
634 +  else
635 +    FPE_CORE="uae"
636 +  fi
637 + fi
638 +
639 + dnl 2. JIT-FPU only supports IEEE-based implementation.
640 + if [[ "x$WANT_JIT_FPU" = "xyes" -a "x$FPE_CORE" != "xieee" ]]; then
641 +  AC_MSG_WARN([Sorry, JIT-FPU supports only the "ieee" FPE implementation])
642 +  FPE_CORE="ieee"
643 +  dnl Restore previous variables. FPE_CORE_STR and FPUSRCS are overwritten
644 +  DEFINES=$SAVED_DEFINES
645 + fi
646 +
647 + dnl 3. Choose either IEEE-based implementation or the old UAE core
648 + if [[ "x$FPE_CORE" = "xieee" ]]; then
649 +  AC_CHECK_HEADERS(fenv.h)
650 +  AC_CHECK_FUNCS(feclearexcept fegetexceptflag feraiseexcept fesetexceptflag fetestexcept)
651 +  AC_CHECK_FUNCS(fegetround fesetround)
652 +  DEFINES="$DEFINES -DFPU_IEEE"
653 +  FPE_CORE_STR="ieee-based fpu core"
654 +  FPUSRCS="../uae_cpu/fpu/fpu_ieee.cpp"
655 + elif [[ "x$FPE_CORE" = "xuae" ]]; then
656 +  DEFINES="$DEFINES -DFPU_UAE"
657 +  FPE_CORE_STR="original uae core"
658 +  FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp"
659 + fi
660 +
661 + dnl Check for certain math functions
662 + AC_CHECK_FUNCS(atanh)
663 + AC_CHECK_FUNCS(isnan isinf)             dnl C99
664 + AC_CHECK_FUNCS(isnanl isinfl)   dnl IEEE ?
665 +
666   dnl UAE CPU sources for all non-m68k-native architectures.
667   if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
668    CPUINCLUDES="-I../uae_cpu"
# Line 591 | Line 676 | if [[ "x$HAVE_GCC27" = "xyes" ]]; then
676    CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
677   fi
678  
679 + dnl Or if we have -Ofast
680 + if [[ "x$HAVE_OFAST" = "xyes" ]]; then
681 +  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'`
682 +  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast/;s/ -g$/ -Ofast/;s/^-g$/-Ofast/'`
683 +  CXXFLAGS="-LANG:std $CXXFLAGS"
684 +  LDFLAGS="$LDFLAGS -Ofast"
685 + fi
686 +
687   dnl Generate Makefile.
688   AC_SUBST(DEFINES)
689   AC_SUBST(SYSSRCS)
# Line 610 | Line 703 | echo ESD sound support ................
703   echo GTK user interface ............... : $WANT_GTK
704   echo mon debugger support ............. : $WANT_MON
705   echo Running m68k code natively ....... : $WANT_NATIVE_M68K
706 + echo Floating-Point emulation core .... : $FPE_CORE_STR
707   echo Assembly optimizations ........... : $ASM_OPTIMIZATIONS
708   echo Addressing mode .................. : $ADDRESSING_MODE
709   echo

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines