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.46 by gbeauche, 2006-01-22T00:08:32Z vs.
Revision 1.58 by gbeauche, 2007-06-13T12:11:55Z

# Line 28 | Line 28 | AC_ARG_ENABLE(fbdev-dga,    [  --enable-
28   AC_ARG_ENABLE(xf86-dga,     [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
29   AC_ARG_ENABLE(xf86-vidmode, [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
30   AC_ARG_ENABLE(vosf,         [  --enable-vosf           enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
31 + AC_ARG_ENABLE(standalone-gui,[  --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no])
32   AC_ARG_WITH(esd,            [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
33   AC_ARG_WITH(gtk,            [  --with-gtk              use GTK user interface [default=yes]],
34    [case "$withval" in
# Line 105 | 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 244 | 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, [
250 <    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
251 <    CFLAGS="$CFLAGS $GTK_CFLAGS"
250 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
251 <    LIBS="$LIBS $GTK_LIBS"
252 <    UISRCS=prefs_editor_gtk.cpp
250 >    GUI_CFLAGS="$GTK_CFLAGS"
251 >    GUI_LIBS="$GTK_LIBS"
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.])
271 <    CFLAGS="$CFLAGS $GTK_CFLAGS"
272 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
273 <    LIBS="$LIBS $GTK_LIBS"
274 <    UISRCS=prefs_editor_gtk.cpp
270 >    GUI_CFLAGS="$GTK_CFLAGS"
271 >    GUI_LIBS="$GTK_LIBS"
272 >    WANT_GTK=gtk
273    ], [
274      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
277    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 +
284 + dnl Build external GUI if requested.
285 + if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then
286 +  WANT_STANDALONE_GUI=no
287 + fi
288 + if [[ "$WANT_GTK" = "no" ]]; then
289 +  WANT_STANDALONE_GUI=no
290 + fi
291 + AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI])
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.])
290    WANT_ESD=no
304    ])
305   fi
306  
# Line 432 | Line 445 | AC_CHECK_FILE([/dev/ptc],
445   )
446   dnl (end of code from openssh-3.2.2p1 configure.ac)
447  
448 + dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK)
449 + dnl doesn't work or is unimplemented. On these systems (mostly older
450 + dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4]
451 + AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O],
452 +  ac_cv_nonblocking_io, [
453 +  case "$host" in
454 +  *-*-osf*)
455 +    ac_cv_nonblocking_io=FIONBIO
456 +    ;;
457 +  *-*-sunos4*)
458 +    ac_cv_nonblocking_io=FIONBIO
459 +    ;;
460 +  *-*-ultrix*)
461 +    ac_cv_nonblocking_io=FIONBIO
462 +    ;;
463 +  *)
464 +    ac_cv_nonblocking_io=O_NONBLOCK
465 +    ;;
466 +  esac
467 + ])
468 + if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then
469 +  AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used])
470 + fi
471 +
472 + dnl Check whether compiler supports byte bit-fields
473 + AC_CACHE_CHECK([whether compiler supports byte bit-fields],
474 +  ac_cv_have_byte_bitfields, [
475 +  AC_LANG_SAVE
476 +  AC_LANG_CPLUSPLUS
477 +  AC_TRY_RUN([
478 +    struct A {
479 +      unsigned char b1:4;
480 +      unsigned char b2:4;
481 +      unsigned char c;
482 +      unsigned short s;
483 +      unsigned char a[4];
484 +    };
485 +
486 +    int main(void) {
487 +      A a;
488 +      return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1));
489 +    }],
490 +    [ac_cv_have_byte_bitfields=yes],
491 +    [ac_cv_have_byte_bitfields=no],
492 +    dnl When cross-compiling, assume only GCC supports this
493 +    [if [[ "$GCC" = "yes" ]]; then
494 +      ac_cv_have_byte_bitfields="guessing yes"
495 +    else
496 +      ac_cv_have_byte_bitfields="guessing no"
497 +    fi]
498 +    )
499 +  AC_LANG_RESTORE
500 + ])
501 +
502   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
503 < AC_DEFUN(AC_CHECK_FRAMEWORK, [
503 > AC_DEFUN([AC_CHECK_FRAMEWORK], [
504    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
505    AC_CACHE_CHECK([whether compiler supports framework $1],
506      ac_Framework, [
# Line 493 | Line 560 | darwin*)
560    fi
561    ;;
562   irix*)
496  ETHERSRC=ether_unix.cpp
563    AUDIOSRC=Irix/audio_irix.cpp
564    LIBS="$LIBS -laudio"
565    WANT_ESD=no
# Line 512 | Line 578 | irix*)
578   esac
579  
580   dnl Is the slirp library supported?
581 < if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
581 > case "$ac_cv_have_byte_bitfields" in
582 > yes|"guessing yes")
583 >  CAN_SLIRP=yes
584 >  ETHERSRC=ether_unix.cpp
585 >  ;;
586 > esac
587 > if [[ -n "$CAN_SLIRP" ]]; then
588    AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
589    SLIRP_SRCS="\
590      ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
# Line 554 | Line 626 | dnl to be put into the config.h file
626   dnl $1 -- the macro to define
627   dnl $2 -- the value to translate
628   dnl $3 -- template name
629 < AC_DEFUN(AC_TRANSLATE_DEFINE, [
629 > AC_DEFUN([AC_TRANSLATE_DEFINE], [
630      if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then
631          AC_DEFINE($1, 1, $3)
632      fi
# Line 1278 | Line 1350 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1350      ../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \
1351      ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \
1352      ../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \
1353 <    ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp"
1353 >    ../kpx_cpu/src/cpu/ppc/ppc-translate.cpp \
1354 >    ../kpx_cpu/src/utils/utils-cpuinfo.cpp"
1355    CPPFLAGS="$CPPFLAGS -I../kpx_cpu/include -I../kpx_cpu/src"
1356  
1357    dnl Enable JIT compiler, if possible
# Line 1345 | Line 1418 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1418        x*) have_dyngen_gcc3=yes ;;
1419        esac
1420        if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then
1421 <        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0"
1421 >        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-align-functions"
1422        else
1423          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0"
1424        fi
# Line 1371 | Line 1444 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1444        CPUSRCS="\
1445          ../kpx_cpu/src/cpu/jit/jit-cache.cpp \
1446          ../kpx_cpu/src/cpu/jit/basic-dyngen.cpp \
1447 <        ../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp $CPUSRCS"
1447 >        ../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp \
1448 >        ../kpx_cpu/src/cpu/ppc/ppc-jit.cpp $CPUSRCS"
1449      fi
1450    fi
1451    CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
1452   else
1453    WANT_JIT=no
1454   fi
1381 if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
1382  AC_CACHE_CHECK([whether static data regions are executable],
1383    ac_cv_have_static_data_exec, [
1384    AC_TRY_RUN([int main(void) {
1385 #if defined(__powerpc__) || defined(__ppc__)
1386      static unsigned int p[8] = {0x4e800020,};
1387      asm volatile("dcbst 0,%0" : : "r" (p) : "memory");
1388      asm volatile("sync" : : : "memory");
1389      asm volatile("icbi 0,%0" : : "r" (p) : "memory");
1390      asm volatile("sync" : : : "memory");
1391      asm volatile("isync" : : : "memory");
1392      ((void (*)(void))p)();
1393      return 0;
1394 #endif
1395      return 1;
1396    }], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no,
1397    dnl When cross-compiling, do not assume anything.
1398    ac_cv_have_static_data_exec=no
1399    )
1400  ])
1401 else
1402  ac_cv_use_dyngen=no
1403 fi
1404 AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec",
1405  [Define if your system marks static data pages as executable.])
1406
1455   if [[ "x$WANT_JIT" = "xyes" ]]; then
1456    CPPFLAGS="$CPPFLAGS -DUSE_JIT"
1457   fi
# Line 1416 | Line 1464 | if [[ "x$HAVE_IPA" = "xyes" ]]; then
1464    LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1465   fi
1466  
1467 + dnl Check for linker script support
1468 + case $target_os:$target_cpu in
1469 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1470 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1471 + linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";;
1472 + netbsd*:i?86)   LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1473 + freebsd*:i?86)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";;
1474 + darwin*:*)      LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1475 + esac
1476 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1477 +  AC_CACHE_CHECK([whether linker script is usable],
1478 +    ac_cv_linker_script_works, [
1479 +    AC_LANG_SAVE
1480 +    AC_LANG_CPLUSPLUS
1481 +    saved_LDFLAGS="$LDFLAGS"
1482 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1483 +    AC_TRY_RUN(
1484 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1485 +      [ac_cv_linker_script_works=yes],
1486 +      [ac_cv_linker_script_works=no],
1487 +      dnl When cross-compiling, assume it works
1488 +      [ac_cv_linker_script_works="guessing yes"]
1489 +    )
1490 +    AC_LANG_RESTORE
1491 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1492 +      LDFLAGS="$saved_LDFLAGS"
1493 +      LINKER_SCRIPT_FLAGS=""
1494 +    fi
1495 +  ])
1496 + fi
1497 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1498 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1499 +
1500   dnl Generate Makefile.
1501   AC_SUBST(PERL)
1502   AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines