home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gawk-2.15.6-base.tgz / gawk-2.15.6-base.tar / fsf / gawk / configure < prev    next >
Text File  |  1993-05-18  |  766b  |  37 lines

  1. #! /bin/sh
  2. #
  3. # configure -- produce a config.h from a known configuration
  4.  
  5. case "$#" in
  6. 1)    ;;
  7. *)    echo "Usage:  $0 system_type" >&2
  8.     echo "Known systems:  `cd config; echo ;ls -C`" >&2
  9.     exit 2
  10.     ;;
  11. esac
  12.  
  13. if [ -f config/$1 ]; then
  14.     sh ./mungeconf config/$1 config.in >config.h
  15.  
  16.     # echo #echo lines to stdout
  17.     sed -n '/^#echo /s///p' config/$1
  18.  
  19.     case "$1" in
  20.     bsd44)    ln -s Makefile.bsd44 Makefile ; exit 0 ;;
  21.     esac
  22.  
  23.     sed -n '/^MAKE_.*/s//s,^##&## ,,/p' config/$1 >sedscr
  24.     if [ -s sedscr ]
  25.     then
  26.         sed -f sedscr Makefile.in >Makefile
  27.     else
  28.         cp Makefile.in Makefile
  29.     fi
  30.     rm -f sedscr
  31. else
  32.     echo "\`$1' is not a known configuration."
  33.     echo "Either construct one based on the examples in the config directory,"
  34.     echo "or copy config.in to config.h and edit it."
  35.     exit 1
  36. fi
  37.