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.8 by gbeauche, 2002-09-18T13:06:49Z 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  
# Line 69 | 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
79 DEFINES="$DEFINES -DCPU_$CPU_TYPE"
81  
82   dnl Checks for programs.
83   AC_PROG_CC
# Line 186 | 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 360 | 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 553 | 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 769 | 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 820 | Line 825 | dnl Other platforms should define their
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" -a "x$OS_TYPE" != "xfreebsd" ]]; then
828 > if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
829    dnl i386 CPU
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 -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE"
834 <    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
835 <    JITSRCS="cpufast1_nf.s cpufast2_nf.s cpufast3_nf.s cpufast4_nf.s cpufast5_nf.s cpufast6_nf.s cpufast7_nf.s cpufast8_nf.s $JITSRCS"
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
832  CAN_JIT=yes
844   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
845    dnl SPARC CPU
846    case "$target_os" in
# Line 1086 | 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 1099 | 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines