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.24 by cebix, 2000-09-25T17:54:01Z vs.
Revision 1.31 by gbeauche, 2001-01-11T16:39:25Z

# 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])
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])
14   AC_ARG_ENABLE(addressing,
15   [  --enable-addressing=mode specify the addressing mode to use [default=fastest]],
# Line 39 | Line 39 | case "$target_os" in
39    netbsd*)      OS_TYPE=netbsd;;
40    freebsd*)     OS_TYPE=freebsd;;
41    solaris*)     OS_TYPE=solaris;;
42 <  *)            OS_TYPE=`echo $target_os | sed -e 's/-/_/'`;;
42 >  *)            OS_TYPE=`echo $target_os | sed -e 's/-/_/' | sed -e 's/\./_/'`;;
43   esac
44   DEFINES="$DEFINES -DOS_$OS_TYPE"
45  
# Line 71 | Line 71 | if [[ "x$WANT_MON" = "xyes" ]]; then
71    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
72      AC_MSG_RESULT(yes)
73      AC_DEFINE(ENABLE_MON)
74 <    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"
74 >    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"
75      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
76      AC_CHECK_LIB(readline, readline)
77      AC_CHECK_LIB(termcap, tputs)
# Line 112 | Line 112 | AC_CHECK_FUNCS(pthread_cancel)
112   dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
113   SEMSRC=
114   AC_CHECK_FUNCS(sem_init, , [
115 <  if [ "x$HAVE_PTHREADS" = "xyes" ]; then
115 >  if test "x$HAVE_PTHREADS" = "xyes"; then
116      SEMSRC=posix_sem.cpp
117    fi
118   ])
# Line 204 | Line 204 | ETHERSRC=../dummy/ether_dummy.cpp
204   SCSISRC=../dummy/scsi_dummy.cpp
205   AUDIOSRC=../dummy/audio_dummy.cpp
206   EXTRASYSSRCS=
207 < SUPPORTS_NATIVE_M68K=no
207 > CAN_NATIVE_M68K=no
208   case "$target_os" in
209   linux*)
210    ETHERSRC=Linux/ether_linux.cpp
# Line 252 | Line 252 | freebsd*)
252    fi
253    ;;
254   netbsd*)
255 <  SUPPORTS_NATIVE_M68K=yes
255 >  CAN_NATIVE_M68K=yes
256    ;;
257   solaris*)
258    AUDIOSRC=Solaris/audio_solaris.cpp
259    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
260    ;;
261   irix*)
262 +  AUDIOSRC=Irix/audio_irix.cpp
263    EXTRASYSSRCS=Irix/unaligned.c
264 <  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
265 <  LIBS="$LIBS -lm"
264 >  dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
265 >  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
266 >  LIBS="$LIBS -laudio"
267    ;;
268   esac
269  
270 + dnl Use 68k CPU natively?
271 + WANT_NATIVE_M68K=no
272 + if [[ "x$HAVE_M68K" = "xyes" -a "x$CAN_NATIVE_M68K" = "xyes" ]]; then
273 +  AC_DEFINE(ENABLE_NATIVE_M68K)
274 +  WANT_NATIVE_M68K=yes
275 + fi
276 +
277   if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
278    dnl Serial, ethernet and audio support needs pthreads
279    AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.])
# Line 318 | Line 327 | AC_CACHE_CHECK("whether your system supp
327    AC_LANG_CPLUSPLUS
328    AC_TRY_RUN([
329      #include <unistd.h>
330 +    #include <stdlib.h>
331      #include <signal.h>
332      #include <fcntl.h>
333      #include <sys/mman.h>
# Line 332 | Line 342 | AC_CACHE_CHECK("whether your system supp
342      int main()
343      { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
344        if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
345 <      struct sigaction sa; sa.sa_sigaction = segfault_handler; sa.sa_flags = 0;
345 >      struct sigaction sa; sa.sa_sigaction = segfault_handler; sa.sa_flags = SA_SIGINFO;
346        sigaction(SIGSEGV, &sa, 0);
347        mem[0] = 0;
348        exit(1); // should not be reached
# Line 372 | Line 382 | if [[ "x$ac_cv_have_extended_signals" =
382              { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
383                if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
384                struct sigaction sa; sa.sa_flags = 0;
385 <                          sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
385 >              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
386                sigaction(SIGSEGV, &sa, 0);
387                mem[0] = 0;
388                exit(1); // should not be reached
# Line 383 | Line 393 | if [[ "x$ac_cv_have_extended_signals" =
393            )
394            AC_LANG_RESTORE
395          ])
396 <                AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
396 >        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
397 >      fi
398 >      ;;
399 >    netbsd*)
400 >      if [[ "x$HAVE_M68K" = "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, int code)
415 >            { if ((caddr_t)code != 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    esac
# Line 396 | Line 443 | if [[ "$ac_cv_have_extended_signals" = "
443   fi
444  
445   dnl Determine the addressing mode to use
446 < ADDRESSING_MODE=""
447 < AC_MSG_CHECKING([for the addressing mode to use])
448 < for am in $ADDRESSING_TEST_ORDER; do
449 <  case $am in
450 <  real)
451 <    dnl Requires ability to mmap Low Memory globals.
452 <    if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
453 <      continue
454 <    fi
455 <    if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then
456 <      dnl Requires only VOSF if 16-bit vidmode enable
457 <      if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then
446 > if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
447 >  ADDRESSING_MODE="real"
448 > else
449 >  ADDRESSING_MODE=""
450 >  AC_MSG_CHECKING([for the addressing mode to use])
451 >  for am in $ADDRESSING_TEST_ORDER; do
452 >    case $am in
453 >    real)
454 >      dnl Requires ability to mmap Low Memory globals.
455 >      if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
456 >        continue
457 >      fi
458 >      if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then
459 >        dnl Requires only VOSF if 16-bit vidmode enable
460 >        if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then
461 >          if [[ "x$CAN_VOSF" = "xno" ]]; then
462 >            continue
463 >          fi
464 >        else
465 >          DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE"
466 >        fi
467 >      else
468 >        dnl Requires VOSF
469          if [[ "x$CAN_VOSF" = "xno" ]]; then
470            continue
471          fi
414      else
415        DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE"
472        fi
473 <    else
473 >      dnl Real addressing will probably work
474 >      ADDRESSING_MODE="real"
475 >      WANT_VOSF=yes dnl we can use VOSF and we need it actually
476 >      DEFINES="$DEFINES -DREAL_ADDRESSING"
477 >      break
478 >      ;;
479 >    direct)
480        dnl Requires VOSF
481 <      if [[ "x$CAN_VOSF" = "xno" ]]; then
482 <        continue
481 >      if [[ "x$CAN_VOSF" = "xyes" ]]; then
482 >        ADDRESSING_MODE="direct"
483 >        WANT_VOSF=yes dnl we can use VOSF and we need it actually
484 >        DEFINES="$DEFINES -DDIRECT_ADDRESSING"
485 >        break
486        fi
487 <    fi
488 <    dnl Real addressing will probably work
489 <    ADDRESSING_MODE="real"
490 <    WANT_VOSF=yes dnl we can use VOSF and we need it actually
426 <    DEFINES="$DEFINES -DREAL_ADDRESSING"
427 <    break
428 <    ;;
429 <  direct)
430 <    dnl Requires VOSF
431 <    if [[ "x$CAN_VOSF" = "xyes" ]]; then
432 <      ADDRESSING_MODE="direct"
433 <      WANT_VOSF=yes dnl we can use VOSF and we need it actually
434 <      DEFINES="$DEFINES -DDIRECT_ADDRESSING"
487 >      ;;
488 >    banks)
489 >      dnl Default addressing mode
490 >      ADDRESSING_MODE="memory banks"
491        break
492 <    fi
493 <    ;;
494 <  banks)
495 <    dnl Default addressing mode
492 >      ;;
493 >    *)
494 >      AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
495 >    esac
496 >  done
497 >  AC_MSG_RESULT($ADDRESSING_MODE)
498 >  if [[ "x$ADDRESSING_MODE" = "x" ]]; then
499 >    AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
500      ADDRESSING_MODE="memory banks"
501 <    break
442 <    ;;
443 <  *)
444 <    AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
445 <  esac
446 < done
447 < AC_MSG_RESULT($ADDRESSING_MODE)
448 < if [[ "x$ADDRESSING_MODE" = "x" ]]; then
449 <  AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
450 <  ADDRESSING_MODE="memory banks"
501 >  fi
502   fi
503  
504   dnl Since real and direct addressing modes automatically activate VOSF,
# Line 488 | Line 539 | fi
539  
540   dnl Select appropriate CPU source and REGPARAM define.
541   ASM_OPTIMIZATIONS=none
491 WANT_NATIVE_M68K=no
542   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
543   FPUSRCS="../uae_cpu/fpp.cpp"
544   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
# Line 496 | Line 546 | if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE
546    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
547    if [[ "x$HAVE_GAS" = "xyes" ]]; then
548      ASM_OPTIMIZATIONS=i386
549 <    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTFLAGS"
549 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
550      CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
551      FPUSRCS="../uae_cpu/fpu_x86.cpp"
552    fi
# Line 509 | Line 559 | elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HA
559      AC_MSG_RESULT($SPARC_TYPE)
560      case "$SPARC_TYPE" in
561      SPARC_V8)
562 <          ASM_OPTIMIZATIONS="SPARC V8 architecture"
563 <      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTFLAGS"
562 >      ASM_OPTIMIZATIONS="SPARC V8 architecture"
563 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
564        CFLAGS="$CFLAGS -Wa,-Av8"
565        CXXFLAGS="$CXXFLAGS -Wa,-Av8"
566        ;;
567      SPARC_V9)
568 <          ASM_OPTIMIZATIONS="SPARC V9 architecture"
569 <      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTFLAGS"
568 >      ASM_OPTIMIZATIONS="SPARC V9 architecture"
569 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
570        CFLAGS="$CFLAGS -Wa,-Av9"
571        CXXFLAGS="$CXXFLAGS -Wa,-Av9"
572        ;;
573      esac
574      ;;
575    esac
576 < elif [[ "x$HAVE_M68K" = "xyes" -a "x$SUPPORTS_NATIVE_M68K" = "xyes" ]]; then
576 > elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
577    dnl Native m68k, no emulation
578 <  CPUSRCS=""
579 <  AC_DEFINE(ENABLE_NATIVE_M68K)
530 <  WANT_NATIVE_M68K=yes
578 >  CPUINCLUDES="-I../native_cpu"
579 >  CPUSRCS="asm_support.s"
580   fi
581  
582   dnl UAE CPU sources for all non-m68k-native architectures.
583   if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
584    CPUINCLUDES="-I../uae_cpu"
585    CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS"
537 else
538  CPUINCLUDES="-I../native_cpu"
539  CPUSRCS="asm_support.s"
586   fi
587  
588   dnl Remove the "-g" option if set for GCC.
589   if [[ "x$HAVE_GCC27" = "xyes" ]]; then
590 <        dnl gb-- Probably not the cleanest way to take
591 <        CFLAGS=`echo $CFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
592 <        CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
590 >  dnl gb-- Probably not the cleanest way to take
591 >  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
592 >  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
593   fi
594  
595   dnl Generate Makefile.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines