This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.001 patch.1h: [re-organisations and patch description]
[perl5.git] / configure
1 #! /bin/sh
2 #
3 # $Id: configure,v 3.0.1.1 1995/07/25 14:16:21 ram Exp $
4 #
5 # GNU configure-like front end to metaconfig's Configure.
6 #
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
21 #
22
23 (exit $?0) || exec sh $0 $argv:q
24 opts=''
25 verbose=''
26 create='-e'
27 while test $# -gt 0; do
28         case $1 in
29     --help)
30                 cat <<EOM
31 Usage: configure [options]
32 This is GNU configure-like front end for a metaconfig-generated Configure.
33 It emulates the following GNU configure options (must be fully spelled out):
34         --help
35         --no-create
36         --prefix=PREFIX
37         --quiet
38         --silent
39         --verbose
40         --version
41
42 And it honours these environment variables: CC, CFLAGS and DEFS.
43 EOM
44                 exit 0
45                 ;;
46         --no-create)
47                 create='-E'
48                 shift
49                 ;;
50         --prefix=*)
51                 arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
52                 opts="$opts $arg"
53                 shift
54                 ;;
55         --quiet|--silent)
56                 exec >/dev/null 2>&1
57                 shift
58                 ;;
59         --verbose)
60                 verbose=true
61                 shift
62                 ;;
63         --version)
64                 copt="$copt -V"
65                 shift
66                 ;;
67         --*)
68                 opt=`echo $1 | sed 's/=.*//'`
69                 echo "This GNU configure front end does not understand $opt"
70                 exit 1
71                 ;;
72         *)
73                 opts="$opts $1"
74                 shift
75                 ;;
76         esac
77 done
78
79 case "$CC" in
80 '') ;;
81 *) opts="$opts -Dcc='$CC'";;
82 esac
83
84 # Join DEFS and CFLAGS together.
85 ccflags=''
86 case "$DEFS" in
87 '') ;;
88 *) ccflags=$DEFS;;
89 esac
90 case "$CFLAGS" in
91 '') ;;
92 *) ccflags="$ccflags $CFLAGS";;
93 esac
94 case "$ccflags" in
95 '') ;;
96 *) opts="$opts -Dccflags='$ccflags'";;
97 esac
98
99 # Don't use -s if they want verbose mode
100 case "$verbose" in
101 '') copt="$copt -ds";;
102 *) copt="$copt -d";;
103 esac
104
105 set X ./Configure $copt $create $opts
106 shift
107 echo "$@"
108 exec "$@"