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.4 by gbeauche, 2002-09-16T15:40:48Z vs.
Revision 1.18 by gbeauche, 2003-08-17T10:16:23Z

# Line 1 | Line 1
1   dnl Process this file with autoconf to produce a configure script.
2   dnl Written in 2002 by Christian Bauer et al.
3  
4 < AC_INIT(main_unix.cpp)
4 > AC_INIT([Basilisk II], 1.0, [Christian.Bauer@uni-mainz.de], BasiliskII)
5 > AC_CONFIG_SRCDIR(main_unix.cpp)
6   AC_PREREQ(2.52)
7   AC_CONFIG_HEADER(config.h)
8  
9 < dnl Options.
9 > dnl Video options.
10   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
11   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
12   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])
13   AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
14  
15 + dnl JIT compiler options.
16 + AC_ARG_ENABLE(jit-compiler,  [  --enable-jit-compiler   enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no])
17 + AC_ARG_ENABLE(jit-debug,     [  --enable-jit-debug      activate native code disassemblers [default=no]], [WANT_JIT_DEBUG=$enableval], [WANT_JIT_DEBUG=no])
18 +
19   dnl FPU emulation core.
20   AC_ARG_ENABLE(fpe,
21   [  --enable-fpe=FPE        specify which fpu emulator to use [default=auto]],
# Line 65 | Line 70 | HAVE_I386=no
70   HAVE_M68K=no
71   HAVE_SPARC=no
72   HAVE_POWERPC=no
73 + HAVE_X86_64=no
74   case "$target_cpu" in
75 <  i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;;
76 <  m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;;
77 <  sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;;
78 <  powerpc* ) CPU_TYPE=powerpc HAVE_POWERPC=yes;;
79 <  *) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/g'`;;
75 >  i386* | i486* | i586* | i686* | i786* ) HAVE_I386=yes;;
76 >  m68k* ) HAVE_M68K=yes;;
77 >  sparc* ) HAVE_SPARC=yes;;
78 >  powerpc* ) HAVE_POWERPC=yes;;
79 >  x86_64* ) HAVE_X86_64=yes;;
80   esac
75 DEFINES="$DEFINES -DCPU_$CPU_TYPE"
81  
82   dnl Checks for programs.
83   AC_PROG_CC
# Line 182 | Line 187 | if [[ "x$WANT_GTK" = "xyes" ]]; then
187      CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
188      LIBS="$LIBS $GTK_LIBS"
189      UISRCS=prefs_editor_gtk.cpp
190 +    dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if
191 +    dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which
192 +    dnl includes <libintl.h>
193 +    AM_GNU_GETTEXT
194      B2_PATH_GNOMEUI([
195        AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.])
196        CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
# Line 356 | Line 365 | irix*)
365    LIBS="$LIBS -laudio"
366    WANT_ESD=no
367  
368 <  dnl Check if our compiler supports -Ofast (MIPSPro)
369 <  HAVE_OFAST=no
368 >  dnl Check if our compiler supports -IPA (MIPSPro)
369 >  HAVE_IPA=no
370    ocflags="$CFLAGS"
371 <  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'`
372 <  AC_MSG_CHECKING(if "-Ofast" works)
371 >  CFLAGS=`echo "$CFLAGS -IPA" | sed -e "s/-g//g"`
372 >  AC_MSG_CHECKING(if "-IPA" works)
373    dnl Do a test compile of an empty function
374 <  AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_OFAST=yes], AC_MSG_RESULT(no))
374 >  AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
375    CFLAGS="$ocflags"
376  
377    ;;
# Line 549 | Line 558 | AC_CACHE_CHECK([whether we can map Low M
558    AC_TRY_RUN([
559      #include "vm_alloc.cpp"
560      int main(void) { /* returns 0 if we could map the lowmem globals */
561 <      volatile char * lm;
561 >      volatile char * lm = 0;
562        if (vm_init() < 0) exit(1);
563 <      if ((lm = (volatile char *)vm_acquire_fixed(0, 0x2000)) == VM_MAP_FAILED) exit(1);
563 >      if (vm_acquire_fixed(0, 0x2000) < 0) exit(1);
564        lm[0] = 'z';
565        if (vm_release((char *)lm, 0x2000) < 0) exit(1);
566        vm_exit(); exit(0);
# Line 740 | Line 749 | else
749    fi
750   fi
751  
752 + dnl Banked Memory Addressing mode is not supported by the JIT compiler
753 + if [[ "x$WANT_JIT" = "xyes" -a "x$ADDRESSING_MODE" = "xmemory banks" ]]; then
754 +  AC_MSG_ERROR([Sorry, the JIT Compiler requires Direct Addressing, at least])
755 + fi
756 +
757   dnl Enable VOSF screen updates with this feature is requested and feasible
758   if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
759      AC_DEFINE(ENABLE_VOSF, 1, [Define if using video enabled on SEGV signals.])
# Line 760 | Line 774 | AC_MSG_RESULT($HAVE_GAS)
774   dnl Check for GCC 2.7 or higher.
775   HAVE_GCC27=no
776   AC_MSG_CHECKING(for GCC 2.7 or higher)
777 < AC_EGREP_CPP(yes,
777 > AC_EGREP_CPP(xyes,
778   [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
779 <  yes
779 >  xyes
780   #endif
781   ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
782  
783   dnl Check for GCC 3.0 or higher.
784   HAVE_GCC30=no
785   AC_MSG_CHECKING(for GCC 3.0 or higher)
786 < AC_EGREP_CPP(yes,
786 > AC_EGREP_CPP(xyes,
787   [#if __GNUC__ >= 3
788 <  yes
788 >  xyes
789   #endif
790   ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
791  
# Line 805 | Line 819 | fi
819   dnl Select appropriate CPU source and REGPARAM define.
820   ASM_OPTIMIZATIONS=none
821   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
822 < if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$OS_TYPE" != "xfreebsd" ]]; then
822 >
823 > dnl (gb) JITSRCS will be emptied later if the JIT is not available
824 > dnl Other platforms should define their own set of noflags file variants
825 > CAN_JIT=no
826 > JITSRCS="compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp"
827 >
828 > if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
829    dnl i386 CPU
830 <  DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
830 >  DEFINES="$DEFINES -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(3)))\""
831    if [[ "x$HAVE_GAS" = "xyes" ]]; then
832      ASM_OPTIMIZATIONS=i386
833 <    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
834 <    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
833 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE"
834 >    JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
835 >    CAN_JIT=yes
836 >  fi
837 > elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_X86_64" = "xyes" ]]; then
838 >  dnl x86-64 CPU
839 >  DEFINES="$DEFINES -DUNALIGNED_PROFITABLE"
840 >  if [[ "x$HAVE_GAS" = "xyes" ]]; then
841 >    ASM_OPTIMIZATIONS="x86-64"
842 >    DEFINES="$DEFINES -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS"
843    fi
844   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
845    dnl SPARC CPU
# Line 842 | Line 870 | elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]
870    CPUSRCS="asm_support.s"
871   fi
872  
873 + dnl Enable JIT compiler, if possible.
874 + if [[ "x$WANT_JIT" = "xyes" -a "x$CAN_JIT" ]]; then
875 +  JITSRCS="$JITSRCS ../uae_cpu/compiler/compemu_support.cpp ../uae_cpu/compiler/compemu_fpp.cpp compstbl.o cpustbl_nf.o"
876 +  DEFINES="$DEFINES -DUSE_JIT -DUSE_JIT_FPU"
877 +  
878 +  if [[ "x$WANT_JIT_DEBUG" = "xyes" ]]; then
879 +    if [[ "x$WANT_MON" = "xyes" ]]; then
880 +      DEFINES="$DEFINES -DJIT_DEBUG=1"
881 +    else
882 +      AC_MSG_WARN([cxmon not found, ignoring --enable-jit-debug])
883 +      WANT_JIT_DEBUG=no
884 +    fi
885 +  fi
886 +
887 +  dnl IEEE core is the only FPU emulator to use with the JIT compiler
888 +  case $FPE_CORE_TEST_ORDER in
889 +  ieee*) ;;
890 +  *) AC_MSG_WARN([Forcing use of the IEEE FPU core, as the JIT compiler supports only this one.]) ;;
891 +  esac
892 +  FPE_CORE_TEST_ORDER="ieee"
893 + else
894 +  WANT_JIT=no
895 +  WANT_JIT_DEBUG=no
896 +  JITSRCS=""
897 + fi
898 +
899   dnl Utility macro used by next two tests.
900   dnl AC_EXAMINE_OBJECT(C source code,
901   dnl     commands examining object file,
# Line 1034 | Line 1088 | AC_CHECK_FUNCS(isnan isinf finite isnorm
1088   dnl UAE CPU sources for all non-m68k-native architectures.
1089   if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
1090    CPUINCLUDES="-I../uae_cpu"
1091 <  CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS"
1091 >  CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS $JITSRCS"
1092   fi
1093  
1094   dnl Remove the "-g" option if set for GCC.
# Line 1043 | Line 1097 | if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1097    CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g//g'`
1098   fi
1099  
1100 < dnl Or if we have -Ofast
1101 < if [[ "x$HAVE_OFAST" = "xyes" ]]; then
1102 <  CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -Ofast"
1103 <  CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -Ofast"
1100 > dnl Or if we have -IPA (MIPSPro compilers)
1101 > if [[ "x$HAVE_IPA" = "xyes" ]]; then
1102 >  CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1103 >  CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1104    CXXFLAGS="-LANG:std $CXXFLAGS"
1105 <  LDFLAGS="$LDFLAGS -ipa"
1105 >  LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1106   fi
1107  
1108   dnl Generate Makefile.
# Line 1056 | Line 1110 | AC_SUBST(DEFINES)
1110   AC_SUBST(SYSSRCS)
1111   AC_SUBST(CPUINCLUDES)
1112   AC_SUBST(CPUSRCS)
1113 < AC_OUTPUT(Makefile)
1113 > AC_CONFIG_FILES([Makefile])
1114 > AC_OUTPUT
1115  
1116   dnl Print summary.
1117   echo
# Line 1070 | Line 1125 | echo ESD sound support .................
1125   echo GTK user interface ..................... : $WANT_GTK
1126   echo mon debugger support ................... : $WANT_MON
1127   echo Running m68k code natively ............. : $WANT_NATIVE_M68K
1128 + echo Use JIT compiler ....................... : $WANT_JIT
1129 + echo JIT debug mode ......................... : $WANT_JIT_DEBUG
1130   echo Floating-Point emulation core .......... : $FPE_CORE
1131   echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
1132   echo Addressing mode ........................ : $ADDRESSING_MODE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines