3 # $Id: configure,v 3.0.1.2 1997/02/28 16:28:49 ram Exp $
5 # GNU configure-like front end to metaconfig's Configure.
7 # Written by Andy Dougherty <doughera@lafcol.lafayette.edu>
8 # Matthew Green <mrg@mame.mu.oz.au> and Tom Tromey <tromey@cygnus.com>.
10 # Reformatted and modified for inclusion in the dist-3.0 package by
11 # Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>.
13 # This script belongs to the public domain and may be freely redistributed.
15 # The remaining of this leading shell comment may be removed if you
16 # include this script in your own package.
19 # Revision 3.0.1.2 1997/02/28 16:28:49 ram
20 # patch61: added the srcdir support now that we have src.U
21 # patch61: random cleanup for nicer help message
23 # Revision 3.0.1.1 1995/07/25 14:16:21 ram
27 (exit $?0) || exec sh $0 $argv:q
32 while test $# -gt 0; do
36 Usage: configure [options]
37 This is GNU configure-like front end for a metaconfig-generated Configure.
38 It emulates the following GNU configure options (must be fully spelled out):
40 --help --srcdir=DIRECTORY
42 --prefix=PREFIX --verbose
45 And it honours these environment variables: CC, CFLAGS and DEFS.
47 Furthermore, it ignores the following arguments, when supplied:
49 --cache-file=FILE --target=TARGET
60 arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
66 opts="$opts -Dprefix=$1"
70 arg=`echo $1 | sed 's/--srcdir=//'`
91 --host=*|--target=*|--cache-file=*|--enable-*|--with-*)
95 opt=`echo $1 | sed 's/=.*//'`
96 echo "This GNU configure front end does not understand $opt"
108 *) opts="$opts -Dcc='$CC'";;
111 # Join DEFS and CFLAGS together.
119 *) ccflags="$ccflags $CFLAGS";;
123 *) opts="$opts -Dccflags='$ccflags'";;
126 # Don't use -s if they want verbose mode
128 '') copt="$copt -ds";;
132 # Figure out srcdir if not set already
134 '') srcdir=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
138 *) opts="$opts -Dsrc=$srcdir";;
141 set X sh $srcdir/Configure $copt $create $opts