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.25 by cebix, 2000-10-08T18:41:34Z vs.
Revision 1.32 by gbeauche, 2001-01-28T14:04:32Z

# Line 9 | Line 9 | dnl Options.
9   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
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=yes]], [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])
12 > AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=no]], [WANT_VOSF=$enableval], [WANT_VOSF=no])
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 71 | Line 72 | if [[ "x$WANT_MON" = "xyes" ]]; then
72    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
73      AC_MSG_RESULT(yes)
74      AC_DEFINE(ENABLE_MON)
75 <    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"
75 >    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"
76      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
77      AC_CHECK_LIB(readline, readline)
78      AC_CHECK_LIB(termcap, tputs)
# Line 112 | Line 113 | AC_CHECK_FUNCS(pthread_cancel)
113   dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
114   SEMSRC=
115   AC_CHECK_FUNCS(sem_init, , [
116 <  if [ "x$HAVE_PTHREADS" = "xyes" ]; then
116 >  if test "x$HAVE_PTHREADS" = "xyes"; then
117      SEMSRC=posix_sem.cpp
118    fi
119   ])
# Line 204 | Line 205 | ETHERSRC=../dummy/ether_dummy.cpp
205   SCSISRC=../dummy/scsi_dummy.cpp
206   AUDIOSRC=../dummy/audio_dummy.cpp
207   EXTRASYSSRCS=
208 < SUPPORTS_NATIVE_M68K=no
208 > CAN_NATIVE_M68K=no
209   case "$target_os" in
210   linux*)
211    ETHERSRC=Linux/ether_linux.cpp
# Line 252 | Line 253 | freebsd*)
253    fi
254    ;;
255   netbsd*)
256 <  SUPPORTS_NATIVE_M68K=yes
256 >  CAN_NATIVE_M68K=yes
257    ;;
258   solaris*)
259    AUDIOSRC=Solaris/audio_solaris.cpp
260    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
261    ;;
262   irix*)
263 +  AUDIOSRC=Irix/audio_irix.cpp
264    EXTRASYSSRCS=Irix/unaligned.c
265 <  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
266 <  LIBS="$LIBS -lm"
265 >  dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
266 >  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
267 >  LIBS="$LIBS -laudio"
268    ;;
269   esac
270  
271 + dnl Use 68k CPU natively?
272 + WANT_NATIVE_M68K=no
273 + if [[ "x$HAVE_M68K" = "xyes" -a "x$CAN_NATIVE_M68K" = "xyes" ]]; then
274 +  AC_DEFINE(ENABLE_NATIVE_M68K)
275 +  WANT_NATIVE_M68K=yes
276 + fi
277 +
278   if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
279    dnl Serial, ethernet and audio support needs pthreads
280    AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.])
# Line 386 | Line 396 | if [[ "x$ac_cv_have_extended_signals" =
396          ])
397          AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
398        fi
399 +      ;;
400 +    netbsd*)
401 +      if [[ "x$HAVE_M68K" = "xyes" ]]; then
402 +        AC_CACHE_CHECK("whether we then have a subterfuge for your system",
403 +                  ac_cv_have_sigcontext_hack, [
404 +          AC_LANG_SAVE
405 +          AC_LANG_CPLUSPLUS
406 +          AC_TRY_RUN([
407 +            #include <unistd.h>
408 +            #include <signal.h>
409 +            #include <fcntl.h>
410 +            #include <sys/mman.h>
411 +
412 +            static volatile caddr_t mem = 0;
413 +            static int zero_fd = -1;
414 +
415 +            static RETSIGTYPE segfault_handler(int, int code)
416 +            { if ((caddr_t)code != mem) exit(1);
417 +              munmap(mem, getpagesize()); close(zero_fd); exit(0); }
418 +
419 +            int main()
420 +            { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
421 +              if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
422 +              struct sigaction sa; sa.sa_flags = 0;
423 +              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
424 +              sigaction(SIGSEGV, &sa, 0);
425 +              mem[0] = 0;
426 +              exit(1); // should not be reached
427 +            }
428 +          ],
429 +          [ac_cv_have_sigcontext_hack=yes],
430 +          [ac_cv_have_sigcontext_hack=no]
431 +          )
432 +          AC_LANG_RESTORE
433 +        ])
434 +        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
435 +      fi
436      ;;
437    esac
438   fi
# Line 397 | Line 444 | if [[ "$ac_cv_have_extended_signals" = "
444   fi
445  
446   dnl Determine the addressing mode to use
447 < ADDRESSING_MODE=""
448 < AC_MSG_CHECKING([for the addressing mode to use])
449 < for am in $ADDRESSING_TEST_ORDER; do
450 <  case $am in
451 <  real)
452 <    dnl Requires ability to mmap Low Memory globals.
453 <    if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
454 <      continue
455 <    fi
456 <    if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then
457 <      dnl Requires only VOSF if 16-bit vidmode enable
411 <      if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then
412 <        if [[ "x$CAN_VOSF" = "xno" ]]; then
413 <          continue
414 <        fi
415 <      else
416 <        DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE"
447 > if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
448 >  ADDRESSING_MODE="real"
449 > else
450 >  ADDRESSING_MODE=""
451 >  AC_MSG_CHECKING([for the addressing mode to use])
452 >  for am in $ADDRESSING_TEST_ORDER; do
453 >    case $am in
454 >    real)
455 >      dnl Requires ability to mmap() Low Memory globals
456 >      if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
457 >        continue
458        fi
459 <    else
419 <      dnl Requires VOSF
459 >          dnl Requires VOSF screen updates
460        if [[ "x$CAN_VOSF" = "xno" ]]; then
461          continue
462        fi
463 <    fi
464 <    dnl Real addressing will probably work
425 <    ADDRESSING_MODE="real"
426 <    WANT_VOSF=yes dnl we can use VOSF and we need it actually
427 <    DEFINES="$DEFINES -DREAL_ADDRESSING"
428 <    break
429 <    ;;
430 <  direct)
431 <    dnl Requires VOSF
432 <    if [[ "x$CAN_VOSF" = "xyes" ]]; then
433 <      ADDRESSING_MODE="direct"
463 >      dnl Real addressing will probably work.
464 >      ADDRESSING_MODE="real"
465        WANT_VOSF=yes dnl we can use VOSF and we need it actually
466 <      DEFINES="$DEFINES -DDIRECT_ADDRESSING"
466 >      DEFINES="$DEFINES -DREAL_ADDRESSING"
467        break
468 <    fi
469 <    ;;
470 <  banks)
471 <    dnl Default addressing mode
468 >      ;;
469 >    direct)
470 >      dnl Requires VOSF screen updates
471 >      if [[ "x$CAN_VOSF" = "xyes" ]]; then
472 >        ADDRESSING_MODE="direct"
473 >        WANT_VOSF=yes dnl we can use VOSF and we need it actually
474 >        DEFINES="$DEFINES -DDIRECT_ADDRESSING"
475 >        break
476 >      fi
477 >      ;;
478 >    banks)
479 >      dnl Default addressing mode
480 >      ADDRESSING_MODE="memory banks"
481 >      break
482 >      ;;
483 >    *)
484 >      AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
485 >    esac
486 >  done
487 >  AC_MSG_RESULT($ADDRESSING_MODE)
488 >  if [[ "x$ADDRESSING_MODE" = "x" ]]; then
489 >    AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
490      ADDRESSING_MODE="memory banks"
491 <    break
443 <    ;;
444 <  *)
445 <    AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
446 <  esac
447 < done
448 < AC_MSG_RESULT($ADDRESSING_MODE)
449 < if [[ "x$ADDRESSING_MODE" = "x" ]]; then
450 <  AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
451 <  ADDRESSING_MODE="memory banks"
491 >  fi
492   fi
493  
494 < dnl Since real and direct addressing modes automatically activate VOSF,
495 < dnl I put this test here.
456 < if [[ "x$WANT_VOSF" = "xyes" ]]; then
457 <  if [[ "x$CAN_VOSF" = "xno" ]]; then
458 <    AC_MSG_WARN([Sorry, your system does not support Video on SEGV signals])
459 <    WANT_VOSF=no
460 <  else
494 > dnl Enable VOSF screen updates with this feature is requested and feasible
495 > if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
496      AC_DEFINE(ENABLE_VOSF)
497 <  fi
497 > else
498 >    WANT_VOSF=no
499   fi
500  
501   dnl Check for GAS.
# Line 489 | Line 525 | fi
525  
526   dnl Select appropriate CPU source and REGPARAM define.
527   ASM_OPTIMIZATIONS=none
492 WANT_NATIVE_M68K=no
528   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
529   FPUSRCS="../uae_cpu/fpp.cpp"
530   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
# Line 497 | Line 532 | if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE
532    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
533    if [[ "x$HAVE_GAS" = "xyes" ]]; then
534      ASM_OPTIMIZATIONS=i386
535 <    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTFLAGS"
535 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
536      CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
537      FPUSRCS="../uae_cpu/fpu_x86.cpp"
538    fi
# Line 510 | Line 545 | elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HA
545      AC_MSG_RESULT($SPARC_TYPE)
546      case "$SPARC_TYPE" in
547      SPARC_V8)
548 <          ASM_OPTIMIZATIONS="SPARC V8 architecture"
549 <      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTFLAGS"
548 >      ASM_OPTIMIZATIONS="SPARC V8 architecture"
549 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
550        CFLAGS="$CFLAGS -Wa,-Av8"
551        CXXFLAGS="$CXXFLAGS -Wa,-Av8"
552        ;;
553      SPARC_V9)
554 <          ASM_OPTIMIZATIONS="SPARC V9 architecture"
555 <      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTFLAGS"
554 >      ASM_OPTIMIZATIONS="SPARC V9 architecture"
555 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
556        CFLAGS="$CFLAGS -Wa,-Av9"
557        CXXFLAGS="$CXXFLAGS -Wa,-Av9"
558        ;;
559      esac
560      ;;
561    esac
562 < elif [[ "x$HAVE_M68K" = "xyes" -a "x$SUPPORTS_NATIVE_M68K" = "xyes" ]]; then
562 > elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
563    dnl Native m68k, no emulation
564 <  CPUSRCS=""
565 <  AC_DEFINE(ENABLE_NATIVE_M68K)
531 <  WANT_NATIVE_M68K=yes
564 >  CPUINCLUDES="-I../native_cpu"
565 >  CPUSRCS="asm_support.s"
566   fi
567  
568   dnl UAE CPU sources for all non-m68k-native architectures.
569   if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
570    CPUINCLUDES="-I../uae_cpu"
571    CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS"
538 else
539  CPUINCLUDES="-I../native_cpu"
540  CPUSRCS="asm_support.s"
572   fi
573  
574   dnl Remove the "-g" option if set for GCC.
575   if [[ "x$HAVE_GCC27" = "xyes" ]]; then
576 <        dnl gb-- Probably not the cleanest way to take
577 <        CFLAGS=`echo $CFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
578 <        CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
576 >  dnl gb-- Probably not the cleanest way to take
577 >  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
578 >  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
579   fi
580  
581   dnl Generate Makefile.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines