home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / se / part03 / where < prev   
Encoding:
Text File  |  1987-01-25  |  1.2 KB  |  60 lines

  1. #! /bin/sh
  2. # $Header: where,v 1.2 86/07/11 15:14:10 osadr Exp $
  3. # $Log:    where,v $
  4. # Revision 1.2  86/07/11  15:14:10  osadr
  5. # Removed Georgia Tech specific items.
  6. # Revision 1.1  86/05/06  13:34:27  osadr
  7. # Initial revision
  8.  
  9. # where --- shell file to determine what kind of environment we are in
  10.  
  11. if test -r /bin/universe    # on a pyramid
  12. then
  13.     OPATH=$PATH
  14.     PATH=/bin
  15.     case `universe` in    # universe is dumb, looking only at argv[0]
  16.     att)    echo "-DUSG -UBSD -UBSD4_2"
  17.         if grep LOBLK /usr/include/sys/termio.h > /dev/null
  18.         then
  19.             echo -DS5R2
  20.         else
  21.             echo -US5R2
  22.         fi
  23.         ;;
  24.  
  25.     ucb)    echo "-UUSG -DBSD -DBSD4_2 -US5R2"
  26.         ;;
  27.  
  28.     *)    echo unknown operating system! 1>&2
  29.         echo "-UUSG -UBSD -UBSD4_2"    # undefine them all
  30.         echo "-US5R2"
  31.         ;;
  32.     esac
  33.     PATH=$OPATH
  34. else        # on something that is not a pyramid
  35.     if grep SIGTSTP /usr/include/signal.h > /dev/null
  36.     then        # berkeley unix
  37.         if test -r /usr/include/whoami.h    # 4.1
  38.         then
  39.             echo "-UUSG -DBSD -UBSD4_2"
  40.         else                    # 4.2
  41.             echo "-UUSG -DBSD -DBSD4_2"
  42.         fi
  43.         echo -US5R2
  44.     else            # ATT unix
  45.         echo "-DUSG -UBSD -UBSD4_2"
  46.         if grep LOBLK /usr/include/sys/termio.h > /dev/null
  47.         then
  48.             echo -DS5R2
  49.         else
  50.             echo -US5R2
  51.         fi
  52.     fi
  53. fi
  54.