This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.003_06: pod/perlvar.pod
[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
1b1e7522
SV
24if test $0 -ef `echo $0 | sed -e s/configure/Configure/`; then
25 echo "You're configure and Configure scripts seem to be identical."
26 echo "This can happen on filesystems that aren't fully case sensitive."
27 echo "You'll have to explicitely extract Configure and run that."
28 exit 1
29fi
16d20bd9 30opts=''
8e07c86e
AD
31verbose=''
32create='-e'
33while test $# -gt 0; do
34 case $1 in
16d20bd9 35 --help)
8e07c86e
AD
36 cat <<EOM
37Usage: configure [options]
38This is GNU configure-like front end for a metaconfig-generated Configure.
39It emulates the following GNU configure options (must be fully spelled out):
40 --help
41 --no-create
42 --prefix=PREFIX
43 --quiet
44 --silent
45 --verbose
46 --version
47
48And it honours these environment variables: CC, CFLAGS and DEFS.
49EOM
50 exit 0
51 ;;
52 --no-create)
53 create='-E'
54 shift
55 ;;
56 --prefix=*)
57 arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
58 opts="$opts $arg"
59 shift
60 ;;
61 --quiet|--silent)
62 exec >/dev/null 2>&1
63 shift
64 ;;
65 --verbose)
66 verbose=true
67 shift
68 ;;
69 --version)
70 copt="$copt -V"
71 shift
72 ;;
73 --*)
74 opt=`echo $1 | sed 's/=.*//'`
75 echo "This GNU configure front end does not understand $opt"
76 exit 1
77 ;;
78 *)
79 opts="$opts $1"
80 shift
81 ;;
82 esac
16d20bd9
AD
83done
84
85case "$CC" in
8e07c86e
AD
86'') ;;
87*) opts="$opts -Dcc='$CC'";;
16d20bd9
AD
88esac
89
8e07c86e 90# Join DEFS and CFLAGS together.
16d20bd9 91ccflags=''
8e07c86e
AD
92case "$DEFS" in
93'') ;;
94*) ccflags=$DEFS;;
95esac
96case "$CFLAGS" in
97'') ;;
98*) ccflags="$ccflags $CFLAGS";;
99esac
100case "$ccflags" in
101'') ;;
102*) opts="$opts -Dccflags='$ccflags'";;
103esac
16d20bd9 104
8e07c86e
AD
105# Don't use -s if they want verbose mode
106case "$verbose" in
107'') copt="$copt -ds";;
108*) copt="$copt -d";;
109esac
16d20bd9 110
f87d5507 111set X sh Configure $copt $create $opts
8e07c86e
AD
112shift
113echo "$@"
114exec "$@"