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.27 by cebix, 2000-10-11T17:55:06Z vs.
Revision 1.33 by cebix, 2001-02-10T15:29:01Z

# 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 Addressing modes.
15   AC_ARG_ENABLE(addressing,
16 < [  --enable-addressing=mode specify the addressing mode to use [default=fastest]],
16 > [  --enable-addressing=AM  specify the addressing mode to use [default=fastest]],
17   [ case "$enableval" in
18      real)       ADDRESSING_TEST_ORDER="real";;
19      direct)     ADDRESSING_TEST_ORDER="direct";;
20      banks)      ADDRESSING_TEST_ORDER="banks";;
21 < dnl fastest)    ADDRESSING_TEST_ORDER="real direct banks";; gb-- will enable later...
22 <    fastest)    ADDRESSING_TEST_ORDER="direct banks";;
22 <    *)          AC_MSG_ERROR([--enable-mem-addressing takes only one of the following values: fastest, real, direct, banks]);;
21 >    fastest)ADDRESSING_TEST_ORDER="direct banks";;
22 >    *)          AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);;
23    esac
24   ],
25 dnl [ ADDRESSING_TEST_ORDER="real direct banks" gb-- will probably reactivate later
25   [ ADDRESSING_TEST_ORDER="direct banks"
26   ])
27 +
28 + dnl External packages.
29   AC_ARG_WITH(esd,             [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
30   AC_ARG_WITH(gtk,             [  --with-gtk              use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
31   AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
# Line 39 | Line 40 | case "$target_os" in
40    netbsd*)      OS_TYPE=netbsd;;
41    freebsd*)     OS_TYPE=freebsd;;
42    solaris*)     OS_TYPE=solaris;;
43 <  *)            OS_TYPE=`echo $target_os | sed -e 's/-/_/'`;;
43 >  *)            OS_TYPE=`echo $target_os | sed -e 's/-/_/' | sed -e 's/\./_/'`;;
44   esac
45   DEFINES="$DEFINES -DOS_$OS_TYPE"
46  
# Line 47 | Line 48 | dnl Target CPU type.
48   HAVE_I386=no
49   HAVE_M68K=no
50   HAVE_SPARC=no
51 + HAVE_POWERPC=no
52   case "$target_cpu" in
53    i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;;
54    m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;;
55    sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;;
56 +  powerpc* ) CPU_TYPE=powerpc HAVE_POWERPC=yes;;
57    *) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/'`;;
58   esac
59   DEFINES="$DEFINES -DCPU_$CPU_TYPE"
# Line 71 | Line 74 | if [[ "x$WANT_MON" = "xyes" ]]; then
74    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
75      AC_MSG_RESULT(yes)
76      AC_DEFINE(ENABLE_MON)
77 <    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"
77 >    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"
78      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
79      AC_CHECK_LIB(readline, readline)
80      AC_CHECK_LIB(termcap, tputs)
# Line 259 | Line 262 | solaris*)
262    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
263    ;;
264   irix*)
265 +  AUDIOSRC=Irix/audio_irix.cpp
266    EXTRASYSSRCS=Irix/unaligned.c
267 <  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
268 <  LIBS="$LIBS -lm"
267 >  dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
268 >  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
269 >  LIBS="$LIBS -laudio"
270    ;;
271   esac
272  
# Line 392 | Line 397 | if [[ "x$ac_cv_have_extended_signals" =
397            AC_LANG_RESTORE
398          ])
399          AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
400 +      elif [[ "x$HAVE_POWERPC" = "xyes" ]]; then
401 +        AC_CACHE_CHECK("whether we then have a subterfuge for your system",
402 +                  ac_cv_have_sigcontext_hack, [
403 +          AC_LANG_SAVE
404 +          AC_LANG_CPLUSPLUS
405 +          AC_TRY_RUN([
406 +            #include <unistd.h>
407 +            #include <signal.h>
408 +            #include <fcntl.h>
409 +            #include <sys/mman.h>
410 +
411 +            static volatile caddr_t mem = 0;
412 +            static int zero_fd = -1;
413 +
414 +            static RETSIGTYPE segfault_handler(int, struct sigcontext_struct *scs)
415 +            { if ((caddr_t)(scs->regs->dar) != mem) exit(1);
416 +              munmap(mem, getpagesize()); close(zero_fd); exit(0); }
417 +
418 +            int main()
419 +            { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
420 +              if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
421 +              struct sigaction sa; sa.sa_flags = 0;
422 +              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
423 +              sigaction(SIGSEGV, &sa, 0);
424 +              mem[0] = 0;
425 +              exit(1); // should not be reached
426 +            }
427 +          ],
428 +          [ac_cv_have_sigcontext_hack=yes],
429 +          [ac_cv_have_sigcontext_hack=no]
430 +          )
431 +          AC_LANG_RESTORE
432 +        ])
433 +        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
434        fi
435        ;;
436      netbsd*)
# Line 449 | Line 488 | else
488    for am in $ADDRESSING_TEST_ORDER; do
489      case $am in
490      real)
491 <      dnl Requires ability to mmap Low Memory globals.
491 >      dnl Requires ability to mmap() Low Memory globals
492        if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
493          continue
494        fi
495 <      if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then
496 <        dnl Requires only VOSF if 16-bit vidmode enable
497 <        if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then
459 <          if [[ "x$CAN_VOSF" = "xno" ]]; then
460 <            continue
461 <          fi
462 <        else
463 <          DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE"
464 <        fi
465 <      else
466 <        dnl Requires VOSF
467 <        if [[ "x$CAN_VOSF" = "xno" ]]; then
468 <          continue
469 <        fi
495 >          dnl Requires VOSF screen updates
496 >      if [[ "x$CAN_VOSF" = "xno" ]]; then
497 >        continue
498        fi
499 <      dnl Real addressing will probably work
499 >      dnl Real addressing will probably work.
500        ADDRESSING_MODE="real"
501        WANT_VOSF=yes dnl we can use VOSF and we need it actually
502        DEFINES="$DEFINES -DREAL_ADDRESSING"
503        break
504        ;;
505      direct)
506 <      dnl Requires VOSF
506 >      dnl Requires VOSF screen updates
507        if [[ "x$CAN_VOSF" = "xyes" ]]; then
508          ADDRESSING_MODE="direct"
509          WANT_VOSF=yes dnl we can use VOSF and we need it actually
# Line 499 | Line 527 | else
527    fi
528   fi
529  
530 < dnl Since real and direct addressing modes automatically activate VOSF,
531 < dnl I put this test here.
504 < if [[ "x$WANT_VOSF" = "xyes" ]]; then
505 <  if [[ "x$CAN_VOSF" = "xno" ]]; then
506 <    AC_MSG_WARN([Sorry, your system does not support Video on SEGV signals])
507 <    WANT_VOSF=no
508 <  else
530 > dnl Enable VOSF screen updates with this feature is requested and feasible
531 > if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
532      AC_DEFINE(ENABLE_VOSF)
533 <  fi
533 > else
534 >    WANT_VOSF=no
535   fi
536  
537   dnl Check for GAS.
# Line 544 | Line 568 | if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE
568    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
569    if [[ "x$HAVE_GAS" = "xyes" ]]; then
570      ASM_OPTIMIZATIONS=i386
571 <    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTFLAGS"
571 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
572      CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
573      FPUSRCS="../uae_cpu/fpu_x86.cpp"
574    fi
# Line 558 | Line 582 | elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HA
582      case "$SPARC_TYPE" in
583      SPARC_V8)
584        ASM_OPTIMIZATIONS="SPARC V8 architecture"
585 <      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTFLAGS"
585 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
586        CFLAGS="$CFLAGS -Wa,-Av8"
587        CXXFLAGS="$CXXFLAGS -Wa,-Av8"
588        ;;
589      SPARC_V9)
590        ASM_OPTIMIZATIONS="SPARC V9 architecture"
591 <      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTFLAGS"
591 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
592        CFLAGS="$CFLAGS -Wa,-Av9"
593        CXXFLAGS="$CXXFLAGS -Wa,-Av9"
594        ;;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines