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.42 by gbeauche, 2005-12-04T16:26:57Z vs.
Revision 1.49 by gbeauche, 2006-04-06T22:36:43Z

# Line 432 | Line 432 | AC_CHECK_FILE([/dev/ptc],
432   )
433   dnl (end of code from openssh-3.2.2p1 configure.ac)
434  
435 + dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK)
436 + dnl doesn't work or is unimplemented. On these systems (mostly older
437 + dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4]
438 + AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O],
439 +  ac_cv_nonblocking_io, [
440 +  case "$host" in
441 +  *-*-osf*)
442 +    ac_cv_nonblocking_io=FIONBIO
443 +    ;;
444 +  *-*-sunos4*)
445 +    ac_cv_nonblocking_io=FIONBIO
446 +    ;;
447 +  *-*-ultrix*)
448 +    ac_cv_nonblocking_io=FIONBIO
449 +    ;;
450 +  *)
451 +    ac_cv_nonblocking_io=O_NONBLOCK
452 +    ;;
453 +  esac
454 + ])
455 + if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then
456 +  AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used])
457 + fi
458 +
459 + dnl Check whether compiler supports byte bit-fields
460 + AC_CACHE_CHECK([whether compiler supports byte bit-fields],
461 +  ac_cv_have_byte_bitfields, [
462 +  AC_LANG_SAVE
463 +  AC_LANG_CPLUSPLUS
464 +  AC_TRY_RUN([
465 +    struct A {
466 +      unsigned char b1:4;
467 +      unsigned char b2:4;
468 +      unsigned char c;
469 +      unsigned short s;
470 +      unsigned char a[4];
471 +    };
472 +
473 +    int main(void) {
474 +      A a;
475 +      return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1));
476 +    }],
477 +    [ac_cv_have_byte_bitfields=yes],
478 +    [ac_cv_have_byte_bitfields=no],
479 +    dnl When cross-compiling, assume only GCC supports this
480 +    [if [[ "$GCC" = "yes" ]]; then
481 +      ac_cv_have_byte_bitfields="guessing yes"
482 +    else
483 +      ac_cv_have_byte_bitfields="guessing no"
484 +    fi]
485 +    )
486 +  AC_LANG_RESTORE
487 + ])
488 +
489   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
490 < AC_DEFUN(AC_CHECK_FRAMEWORK, [
490 > AC_DEFUN([AC_CHECK_FRAMEWORK], [
491    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
492    AC_CACHE_CHECK([whether compiler supports framework $1],
493      ac_Framework, [
494      saved_LIBS="$LIBS"
495      LIBS="$LIBS -framework $1"
496      AC_TRY_LINK(
497 <      [$2], [int main(void) { return 0; }],
497 >      [$2], [],
498        [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
499      )
500    ])
# Line 493 | Line 547 | darwin*)
547    fi
548    ;;
549   irix*)
496  ETHERSRC=ether_unix.cpp
550    AUDIOSRC=Irix/audio_irix.cpp
551    LIBS="$LIBS -laudio"
552    WANT_ESD=no
553 +
554 +  dnl Check if our compiler supports -IPA (MIPSPro)
555 +  HAVE_IPA=no
556 +  ocflags="$CFLAGS"
557 +  CFLAGS=`echo " $CFLAGS -IPA" | sed -e "s/ -g //g"`
558 +  AC_MSG_CHECKING(if "-IPA" works)
559 +  dnl Do a test compile of an empty function
560 +  AC_TRY_COMPILE([#if defined __GNUC__
561 +                  # error GCC does not support IPA yet
562 +                  #endif],, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
563 +  CFLAGS="$ocflags"
564    ;;
565   esac
566  
567   dnl Is the slirp library supported?
568 < if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
568 > case "$ac_cv_have_byte_bitfields" in
569 > yes|"guessing yes")
570 >  CAN_SLIRP=yes
571 >  ETHERSRC=ether_unix.cpp
572 >  ;;
573 > esac
574 > if [[ -n "$CAN_SLIRP" ]]; then
575    AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
576    SLIRP_SRCS="\
577      ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
# Line 543 | Line 613 | dnl to be put into the config.h file
613   dnl $1 -- the macro to define
614   dnl $2 -- the value to translate
615   dnl $3 -- template name
616 < AC_DEFUN(AC_TRANSLATE_DEFINE, [
616 > AC_DEFUN([AC_TRANSLATE_DEFINE], [
617      if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then
618          AC_DEFINE($1, 1, $3)
619      fi
# Line 1185 | Line 1255 | HAVE_GCC27=no
1255   AC_MSG_CHECKING(for GCC 2.7 or higher)
1256   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5)
1257                                       # error gcc < 2.7
1258 +                                     typedef syntax error;
1259                                       #endif
1260                                     ]])],
1261                    [AC_MSG_RESULT(yes); HAVE_GCC27=yes],
# Line 1195 | Line 1266 | HAVE_GCC30=no
1266   AC_MSG_CHECKING(for GCC 3.0 or higher)
1267   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3)
1268                                       # error gcc < 3
1269 +                                     typedef syntax error;
1270                                       #endif
1271                                     ]])],
1272                    [AC_MSG_RESULT(yes); HAVE_GCC30=yes],
# Line 1282 | Line 1354 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1354        i?86:elf)
1355          ac_cv_use_dyngen=yes
1356          ;;
1357 +      mips:elf)
1358 +        ac_cv_use_dyngen=yes
1359 +        ;;
1360        powerpc:mach)
1361          ac_cv_use_dyngen=yes
1362          ;;
# Line 1297 | Line 1372 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1372          if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1373            DYNGEN_CC=$CXX
1374          else
1375 <          for p in /usr/bin /usr/local/bin; do
1375 >          for p in /usr/bin /usr/local/bin /usr/freeware/bin; do
1376              gxx="$p/g++"
1377              if [[ -x "$gxx" ]]; then
1378                DYNGEN_CC="$gxx"
# Line 1312 | Line 1387 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1387      if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then
1388        case $host_cpu in
1389        i?86)
1390 <        DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2"
1390 >        DYNGEN_OP_FLAGS="-fomit-frame-pointer"
1391 >        ;;
1392 >      mips)
1393 >        DYNGEN_OP_FLAGS="-fno-delayed-branch -mno-abicalls"
1394          ;;
1395        powerpc)
1396          if [[ "x$ac_cv_object_format" = "xmach" ]]; then
# Line 1320 | Line 1398 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1398          fi
1399          ;;
1400        esac
1401 <      if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1401 >      have_dyngen_gcc3=no
1402 >      case "x`$DYNGEN_CC -dumpversion`" in
1403 >      x[12].*) ;;
1404 >      x*) have_dyngen_gcc3=yes ;;
1405 >      esac
1406 >      if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then
1407          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0"
1408        else
1409          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0"
1410        fi
1411        DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-functions -finline-limit=10000 -fno-exceptions -g0"
1412 <      if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1412 >      if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then
1413          DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls"
1414        fi
1415 +      if [[ "x$DYNGEN_CC" != "x$CXX" ]]; then
1416 +        DYNGEN_CFLAGS="-O2 $CFLAGS"
1417 +        DYNGEN_CXXFLAGS="-O2 $CXXFLAGS"
1418 +      else
1419 +        DYNGEN_CFLAGS="\$(CFLAGS)"
1420 +        DYNGEN_CXXFLAGS="\$(CXXFLAGS)"
1421 +      fi
1422      else
1423        WANT_JIT=no
1424      fi
# Line 1377 | Line 1467 | if [[ "x$WANT_JIT" = "xyes" ]]; then
1467    CPPFLAGS="$CPPFLAGS -DUSE_JIT"
1468   fi
1469  
1470 + dnl Higher level optimizations with MIPSPro compilers are possible
1471 + if [[ "x$HAVE_IPA" = "xyes" ]]; then
1472 +  CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1473 +  CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1474 +  CXXFLAGS="-LANG:std $CXXFLAGS"
1475 +  LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1476 + fi
1477 +
1478   dnl Generate Makefile.
1479   AC_SUBST(PERL)
1480   AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen])
1481   AC_SUBST(DYNGENSRCS)
1482   AC_SUBST(DYNGEN_CC)
1483 + AC_SUBST(DYNGEN_CFLAGS)
1484 + AC_SUBST(DYNGEN_CXXFLAGS)
1485   AC_SUBST(DYNGEN_OP_FLAGS)
1486   AC_SUBST(SYSSRCS)
1487   AC_SUBST(CPUSRCS)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines