This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.003_15 and Interactive Unix
[perl5.git] / configure
CommitLineData
16d20bd9 1#! /bin/sh
8e07c86e
AD
2#
3# $Id: configure,v 3.0.1.1 1995/07/25 14:16:21 ram Exp $
4#
16d20bd9
AD
5# GNU configure-like front end to metaconfig's Configure.
6#
8e07c86e
AD
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
SV
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
AD
37verbose=''
38create='-e'
39while test $# -gt 0; do
40 case $1 in
16d20bd9 41 --help)
8e07c86e
AD
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
49 --quiet
50 --silent
51 --verbose
52 --version
53
54And it honours these environment variables: CC, CFLAGS and DEFS.
55EOM
56 exit 0
57 ;;
58 --no-create)
59 create='-E'
60 shift
61 ;;
62 --prefix=*)
63 arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
64 opts="$opts $arg"
65 shift
66 ;;
67 --quiet|--silent)
68 exec >/dev/null 2>&1
69 shift
70 ;;
71 --verbose)
72 verbose=true
73 shift
74 ;;
75 --version)
76 copt="$copt -V"
77 shift
78 ;;
79 --*)
80 opt=`echo $1 | sed 's/=.*//'`
81 echo "This GNU configure front end does not understand $opt"
82 exit 1
83 ;;
84 *)
85 opts="$opts $1"
86 shift
87 ;;
88 esac
16d20bd9
AD
89done
90
91case "$CC" in
8e07c86e
AD
92'') ;;
93*) opts="$opts -Dcc='$CC'";;
16d20bd9
AD
94esac
95
8e07c86e 96# Join DEFS and CFLAGS together.
16d20bd9 97ccflags=''
8e07c86e
AD
98case "$DEFS" in
99'') ;;
100*) ccflags=$DEFS;;
101esac
102case "$CFLAGS" in
103'') ;;
104*) ccflags="$ccflags $CFLAGS";;
105esac
106case "$ccflags" in
107'') ;;
108*) opts="$opts -Dccflags='$ccflags'";;
109esac
16d20bd9 110
8e07c86e
AD
111# Don't use -s if they want verbose mode
112case "$verbose" in
113'') copt="$copt -ds";;
114*) copt="$copt -d";;
115esac
16d20bd9 116
f87d5507 117set X sh Configure $copt $create $opts
8e07c86e
AD
118shift
119echo "$@"
120exec "$@"