This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
New file.
[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
16d20bd9 24opts=''
8e07c86e
AD
25verbose=''
26create='-e'
27while test $# -gt 0; do
28 case $1 in
16d20bd9 29 --help)
8e07c86e
AD
30 cat <<EOM
31Usage: configure [options]
32This is GNU configure-like front end for a metaconfig-generated Configure.
33It 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
42And it honours these environment variables: CC, CFLAGS and DEFS.
43EOM
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
16d20bd9
AD
77done
78
79case "$CC" in
8e07c86e
AD
80'') ;;
81*) opts="$opts -Dcc='$CC'";;
16d20bd9
AD
82esac
83
8e07c86e 84# Join DEFS and CFLAGS together.
16d20bd9 85ccflags=''
8e07c86e
AD
86case "$DEFS" in
87'') ;;
88*) ccflags=$DEFS;;
89esac
90case "$CFLAGS" in
91'') ;;
92*) ccflags="$ccflags $CFLAGS";;
93esac
94case "$ccflags" in
95'') ;;
96*) opts="$opts -Dccflags='$ccflags'";;
97esac
16d20bd9 98
8e07c86e
AD
99# Don't use -s if they want verbose mode
100case "$verbose" in
101'') copt="$copt -ds";;
102*) copt="$copt -d";;
103esac
16d20bd9 104
f87d5507 105set X sh Configure $copt $create $opts
8e07c86e
AD
106shift
107echo "$@"
108exec "$@"