home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / zsh / Source / src / config / bz.makecc < prev    next >
Encoding:
Text File  |  1994-04-07  |  893 b   |  48 lines

  1. # --- bz.makecc
  2.  
  3. # --- find out the C compiler
  4.  
  5. if test -z "$CC"
  6. then
  7.   if test -n "$C_CC"
  8.   then
  9.     CC="$C_CC"
  10.   else
  11.     set c89 c89 "/usr/bin /bin"
  12.     . bz.walk
  13.     if test -n "$c89"
  14.     then CC=c89; C89=yep
  15.     elif test -n "$MIPS"
  16.     then CC='cc -systype bsd43'
  17.     elif test -n "$TITAN"
  18.     then CC='cc -43'
  19.     else CC=$DEFAULT_CC    # the default CC
  20.     fi
  21.   fi
  22. fi
  23.  
  24. test -z "$CC" && CC="$DEFAULT_C_CC"
  25.  
  26. set CC "$CC" "C compiler"
  27. . bz.define
  28.  
  29. test -n "$C89" && echo "    (at least judging by name $CC does ANSI...)"
  30.  
  31. # --- GNU cc?
  32.  
  33. if test -n "$C89" -o -n "$B_gcc" -o -n "$B_strictgcc" -o -n "$B_mediumgcc"
  34. then
  35.   maybegcc="`$CC -v 2>&1|egrep '^gcc version '`"
  36.   if test -n "$maybegcc"
  37.   then
  38.     echo "    ($CC seems to be GNU...)"
  39.     case "$CC" in
  40.     *gcc*) echo "    (surprised?)" ;;
  41.     esac
  42.   fi
  43. else
  44.   test -n "$CC_MIPS_STYLE" && echo "    ($CC might be MIPS style...)"
  45. fi
  46.  
  47. makecc_done=yep
  48.