~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to configure

  • Committer: Arnold D. Robbins
  • Date: 2010-07-16 08:58:26 UTC
  • Revision ID: git-v1:765c7494b3dac62207e6cd57fb839997e237f292
Moving to 2.13.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.h-dist >config.h
 
15
 
 
16
        # echo #echo lines to stdout
 
17
        sed -n '/^#echo /s///p' config/$1
 
18
 
 
19
        sed -n '/^MAKE_.*/s//s,^##&## ,,/p' config/$1 >sedscr
 
20
        if [ -s sedscr ]
 
21
        then
 
22
                sed -f sedscr Makefile-dist >Makefile
 
23
        else
 
24
                cp Makefile-dist Makefile
 
25
        fi
 
26
        rm -f sedscr
 
27
else
 
28
        echo "\`$1' is not a known configuration."
 
29
        echo "Either construct one based on the examples in the config directory,"
 
30
        echo "or copy config.h-dist to config.h and edit it."
 
31
        exit 1
 
32
fi