Configure updates for intsize and ssizetype
[p5sagit/p5-mst-13.2.git] / configure
CommitLineData
16d20bd9 1#! /bin/sh
8e07c86e 2#
3# $Id: configure,v 3.0.1.1 1995/07/25 14:16:21 ram Exp $
4#
16d20bd9 5# GNU configure-like front end to metaconfig's Configure.
6#
8e07c86e 7# Written by Andy Dougherty <doughera@lafcol.lafayette.edu>
8# and Matthew Green <mrg@mame.mu.oz.au>.
9#
10# Reformatted and modified for inclusion in the dist-3.0 package by
11# Raphael Manfredi <ram@hptnos02.grenoble.hp.com>.
12#
13# This script belongs to the public domain and may be freely redistributed.
14#
15# The remaining of this leading shell comment may be removed if you
16# include this script in your own package.
17#
18# $Log: configure,v $
19# Revision 3.0.1.1 1995/07/25 14:16:21 ram
20# patch56: created
16d20bd9 21#
16d20bd9 22
8e07c86e 23(exit $?0) || exec sh $0 $argv:q
55497cff 24
25case "$0" in
26*configure)
27 if cmp $0 `echo $0 | sed -e s/configure/Configure/` >/dev/null; then
28 echo "Your configure and Configure scripts seem to be identical."
1b1e7522 29 echo "This can happen on filesystems that aren't fully case sensitive."
30 echo "You'll have to explicitely extract Configure and run that."
31 exit 1
55497cff 32 fi
33 ;;
34esac
35
16d20bd9 36opts=''
8e07c86e 37verbose=''
38create='-e'
39while test $# -gt 0; do
40 case $1 in
16d20bd9 41 --help)
8e07c86e 42 cat <<EOM
43Usage: configure [options]
44This is GNU configure-like front end for a metaconfig-generated Configure.
45It emulates the following GNU configure options (must be fully spelled out):
46 --help
47 --no-create
48 --prefix=PREFIX
bab46255 49 --cache-file (ignored)
8e07c86e 50 --quiet
51 --silent
52 --verbose
53 --version
54
55And it honours these environment variables: CC, CFLAGS and DEFS.
56EOM
57 exit 0
58 ;;
59 --no-create)
60 create='-E'
61 shift
62 ;;
63 --prefix=*)
64 arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
65 opts="$opts $arg"
66 shift
67 ;;
bab46255 68 --cache-file=*)
69 shift # Just ignore it.
70 ;;
8e07c86e 71 --quiet|--silent)
72 exec >/dev/null 2>&1
73 shift
74 ;;
75 --verbose)
76 verbose=true
77 shift
78 ;;
79 --version)
80 copt="$copt -V"
81 shift
82 ;;
83 --*)
84 opt=`echo $1 | sed 's/=.*//'`
85 echo "This GNU configure front end does not understand $opt"
86 exit 1
87 ;;
88 *)
89 opts="$opts $1"
90 shift
91 ;;
92 esac
16d20bd9 93done
94
95case "$CC" in
8e07c86e 96'') ;;
97*) opts="$opts -Dcc='$CC'";;
16d20bd9 98esac
99
8e07c86e 100# Join DEFS and CFLAGS together.
16d20bd9 101ccflags=''
8e07c86e 102case "$DEFS" in
103'') ;;
104*) ccflags=$DEFS;;
105esac
106case "$CFLAGS" in
107'') ;;
108*) ccflags="$ccflags $CFLAGS";;
109esac
110case "$ccflags" in
111'') ;;
112*) opts="$opts -Dccflags='$ccflags'";;
113esac
16d20bd9 114
8e07c86e 115# Don't use -s if they want verbose mode
116case "$verbose" in
117'') copt="$copt -ds";;
118*) copt="$copt -d";;
119esac
16d20bd9 120
f87d5507 121set X sh Configure $copt $create $opts
8e07c86e 122shift
123echo "$@"
124exec "$@"