ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/configure.ac
(Generate patch)

Comparing SheepShaver/src/Unix/configure.ac (file contents):
Revision 1.50 by gbeauche, 2006-05-01T22:33:34Z vs.
Revision 1.63 by asvitkine, 2009-02-11T19:22:16Z

# Line 106 | Line 106 | if [[ "x$WANT_MON" = "xyes" ]]; then
106    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
107      AC_MSG_RESULT(yes)
108      AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".])
109 <    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_lowmem.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"
109 >    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_lowmem.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 $mon_srcdir/disass/mips-dis.c $mon_srcdir/disass/mips-opc.c $mon_srcdir/disass/mips16-opc.c"
110      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
111      AC_CHECK_LIB(ncurses, tgetent, ,
112        AC_CHECK_LIB(termcap, tgetent, ,
# Line 245 | Line 245 | dnl We use GTK+ if possible.
245   UISRCS=../dummy/prefs_editor_dummy.cpp
246   case "x$WANT_GTK" in
247   xgtk2*)
248 +  WANT_GTK=no
249    AM_PATH_GTK_2_0(1.3.15, [
249    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
250      GUI_CFLAGS="$GTK_CFLAGS"
251      GUI_LIBS="$GTK_LIBS"
252    UISRCS=prefs_editor_gtk.cpp
252      WANT_GTK=gtk2
253    ], [
254      case "x${WANT_GTK}x" in
# Line 260 | Line 259 | xgtk2*)
259      *)
260        AC_MSG_WARN([Could not find GTK+, disabling user interface.])
261        WANT_GTK=no
262 <      ;;
262 >     ;;
263      esac
264    ])
265    ;;
266   esac
267   if [[ "x$WANT_GTK" = "xgtk" ]]; then
268 +  WANT_GTK=no
269    AM_PATH_GTK(1.2.0, [
270    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
270      GUI_CFLAGS="$GTK_CFLAGS"
271      GUI_LIBS="$GTK_LIBS"
272 <    UISRCS=prefs_editor_gtk.cpp
272 >    WANT_GTK=gtk
273    ], [
274      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
276    WANT_GTK=no
275    ])
276   fi
277 + if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then
278 +  AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
279 +  UISRCS=prefs_editor_gtk.cpp
280 + fi
281   AC_SUBST(GUI_CFLAGS)
282   AC_SUBST(GUI_LIBS)
283  
# Line 290 | Line 292 | AC_SUBST(STANDALONE_GUI, [$WANT_STANDALO
292  
293   dnl We use ESD if possible.
294   if [[ "x$WANT_ESD" = "xyes" ]]; then
295 +  WANT_ESD=no
296    AM_PATH_ESD(0.2.8, [
297      AC_DEFINE(ENABLE_ESD, 1, [Define is using ESD.])
298      CFLAGS="$CFLAGS $ESD_CFLAGS"
299      CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
300      LIBS="$LIBS $ESD_LIBS"
301 +    WANT_ESD=yes
302    ], [
303      AC_MSG_WARN([Could not find ESD, disabling ESD support.])
300    WANT_ESD=no
304    ])
305   fi
306  
# Line 422 | Line 425 | mips-sony-bsd|mips-sony-newsos4)
425   *-*-cygwin*)
426          no_dev_ptmx=1
427          ;;
428 + *-*-darwin*)
429 +        no_dev_ptmx=1
430 +        ;;
431   esac
432  
433   if test -z "$no_dev_ptmx" ; then
# Line 518 | Line 524 | dnl Check for some MacOS X frameworks
524   AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
525   AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
526   AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
527 + AC_CHECK_FRAMEWORK(CoreAudio, [#include <CoreAudio/CoreAudio.h>])
528 + AC_CHECK_FRAMEWORK(AudioUnit, [#include <AudioUnit/AudioUnit.h>])
529 + AC_CHECK_FRAMEWORK(AudioToolbox, [#include <AudioToolbox/AudioToolbox.h>])
530 + AC_CHECK_FRAMEWORK(AppKit, [])
531  
532   dnl Select system-dependant sources.
533   SERIALSRC=serial_unix.cpp
534   ETHERSRC=../dummy/ether_dummy.cpp
535   SCSISRC=../dummy/scsi_dummy.cpp
536   AUDIOSRC=../dummy/audio_dummy.cpp
537 + PREFSSRC=../dummy/prefs_dummy.cpp
538   EXTFSSRC=extfs_unix.cpp
539   EXTRASYSSRCS=
540   case "$target_os" in
# Line 553 | Line 564 | darwin*)
564      EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/sys_darwin.cpp"
565    fi
566    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
567 <    EXTFSSRC=../MacOSX/extfs_macosx.mm
567 >    EXTFSSRC=../MacOSX/extfs_macosx.cpp
568 >    if [[ "x$ac_cv_framework_AppKit" = "xyes" ]]; then
569 >      PREFSSRC="../MacOSX/prefs_macosx.mm ../MacOSX/PrefsEditor/PrefsEditor.mm"
570 >      CPPFLAGS="$CPPFLAGS -I../MacOSX/PrefsEditor"
571 >    fi
572 >  fi
573 >  if [[ "x$ac_cv_framework_CoreAudio" = "xyes" -a "x$WANT_SDL_AUDIO" = "xno" ]]; then
574 >    AUDIOSRC="../MacOSX/audio_macosx.cpp ../MacOSX/AudioBackEnd.cpp ../MacOSX/AudioDevice.cpp ../MacOSX/MacOSX_sound_if.cpp"
575    fi
576    ;;
577   irix*)
# Line 616 | Line 634 | if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; th
634    AUDIOSRC="../SDL/audio_sdl.cpp"
635   fi
636  
637 < SYSSRCS="$VIDEOSRCS $EXTFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $EXTRASYSSRCS"
637 > SYSSRCS="$VIDEOSRCS $EXTFSSRC $PREFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $EXTRASYSSRCS"
638  
639   dnl Define a macro that translates a yesno-variable into a C macro definition
640   dnl to be put into the config.h file
# Line 1347 | Line 1365 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1365      ../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \
1366      ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \
1367      ../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \
1368 <    ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp"
1368 >    ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp \
1369 >    ../kpx_cpu/src/utils/utils-cpuinfo.cpp"
1370    CPPFLAGS="$CPPFLAGS -I../kpx_cpu/include -I../kpx_cpu/src"
1371  
1372    dnl Enable JIT compiler, if possible
# Line 1414 | Line 1433 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1433        x*) have_dyngen_gcc3=yes ;;
1434        esac
1435        if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then
1436 <        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0"
1436 >        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-align-functions"
1437        else
1438          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0"
1439        fi
# Line 1440 | Line 1459 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1459        CPUSRCS="\
1460          ../kpx_cpu/src/cpu/jit/jit-cache.cpp \
1461          ../kpx_cpu/src/cpu/jit/basic-dyngen.cpp \
1462 <        ../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp $CPUSRCS"
1462 >        ../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp \
1463 >        ../kpx_cpu/src/cpu/ppc/ppc-jit.cpp $CPUSRCS"
1464      fi
1465    fi
1466    CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
1467   else
1468    WANT_JIT=no
1469   fi
1450 if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
1451  AC_CACHE_CHECK([whether static data regions are executable],
1452    ac_cv_have_static_data_exec, [
1453    AC_TRY_RUN([int main(void) {
1454 #if defined(__powerpc__) || defined(__ppc__)
1455      static unsigned int p[8] = {0x4e800020,};
1456      asm volatile("dcbst 0,%0" : : "r" (p) : "memory");
1457      asm volatile("sync" : : : "memory");
1458      asm volatile("icbi 0,%0" : : "r" (p) : "memory");
1459      asm volatile("sync" : : : "memory");
1460      asm volatile("isync" : : : "memory");
1461      ((void (*)(void))p)();
1462      return 0;
1463 #endif
1464      return 1;
1465    }], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no,
1466    dnl When cross-compiling, do not assume anything.
1467    ac_cv_have_static_data_exec=no
1468    )
1469  ])
1470 else
1471  ac_cv_use_dyngen=no
1472 fi
1473 AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec",
1474  [Define if your system marks static data pages as executable.])
1475
1470   if [[ "x$WANT_JIT" = "xyes" ]]; then
1471    CPPFLAGS="$CPPFLAGS -DUSE_JIT"
1472   fi
# Line 1485 | Line 1479 | if [[ "x$HAVE_IPA" = "xyes" ]]; then
1479    LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1480   fi
1481  
1482 + dnl Check for linker script support
1483 + case $target_os:$target_cpu in
1484 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1485 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1486 + linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";;
1487 + netbsd*:i?86)   LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1488 + freebsd*:i?86)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";;
1489 + darwin*:*)      LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1490 + esac
1491 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1492 +  AC_CACHE_CHECK([whether linker script is usable],
1493 +    ac_cv_linker_script_works, [
1494 +    AC_LANG_SAVE
1495 +    AC_LANG_CPLUSPLUS
1496 +    saved_LDFLAGS="$LDFLAGS"
1497 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1498 +    AC_TRY_RUN(
1499 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1500 +      [ac_cv_linker_script_works=yes],
1501 +      [ac_cv_linker_script_works=no],
1502 +      dnl When cross-compiling, assume it works
1503 +      [ac_cv_linker_script_works="guessing yes"]
1504 +    )
1505 +    AC_LANG_RESTORE
1506 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1507 +      LDFLAGS="$saved_LDFLAGS"
1508 +      LINKER_SCRIPT_FLAGS=""
1509 +    fi
1510 +  ])
1511 + fi
1512 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1513 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1514 +
1515   dnl Generate Makefile.
1516   AC_SUBST(PERL)
1517   AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines