This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ioctl for VMS
[perl5.git] / configure.gnu
CommitLineData
774d564b 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#
36816da2 7# Written by Andy Dougherty <doughera@lafayette.edu>
774d564b 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
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."
29 echo "This can happen on filesystems that aren't fully case sensitive."
1e422769 30 echo "You'll have to explicitly extract Configure and run that."
774d564b 31 exit 1
32 fi
33 ;;
34esac
35
36opts=''
37verbose=''
38create='-e'
39while test $# -gt 0; do
40 case $1 in
41 --help)
42 cat <<EOM
5518bc02 43Usage: configure.gnu [options]
774d564b 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)
774d564b 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 ;;
2b258320
SR
68 --prefix)
69 shift
70 arg="-Dprefix=$1"
71 opts="$opts $arg"
72 shift
73 ;;
2067d406
SR
74 --prefix)
75 shift
76 arg="-Dprefix=$1"
77 opts="$opts $arg"
78 shift
79 ;;
bab46255
NP
80 --cache-file=*)
81 shift # Just ignore it.
82 ;;
774d564b 83 --quiet|--silent)
84 exec >/dev/null 2>&1
85 shift
86 ;;
87 --verbose)
88 verbose=true
89 shift
90 ;;
91 --version)
92 copt="$copt -V"
93 shift
94 ;;
95 --*)
96 opt=`echo $1 | sed 's/=.*//'`
97 echo "This GNU configure front end does not understand $opt"
98 exit 1
99 ;;
100 *)
9300ef0f 101 opts="$opts '$1'"
774d564b 102 shift
103 ;;
104 esac
105done
106
107case "$CC" in
108'') ;;
109*) opts="$opts -Dcc='$CC'";;
110esac
111
112# Join DEFS and CFLAGS together.
113ccflags=''
114case "$DEFS" in
115'') ;;
116*) ccflags=$DEFS;;
117esac
118case "$CFLAGS" in
119'') ;;
120*) ccflags="$ccflags $CFLAGS";;
121esac
122case "$ccflags" in
123'') ;;
124*) opts="$opts -Dccflags='$ccflags'";;
125esac
8f1f23e8
W
126case "$LDFLAGS" in
127'') ;;
128*) ldflags="$ldflags $LDFLAGS";;
129esac
130case "$ldflags" in
131'') ;;
132*) opts="$opts -Dldflags='$ldflags'";;
133esac
774d564b 134
135# Don't use -s if they want verbose mode
136case "$verbose" in
137'') copt="$copt -ds";;
138*) copt="$copt -d";;
139esac
140
9300ef0f 141eval "set X sh Configure $copt $create $opts"
774d564b 142shift
143echo "$@"
144exec "$@"