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.43 by gbeauche, 2005-12-11T18:15:05Z 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
# Line 512 | Line 565 | irix*)
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 554 | 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 1196 | 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 1206 | 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 1311 | 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 1326 | 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"
# Line 1337 | 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines