home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
src
/
amiga
/
configure
< prev
next >
Wrap
Text File
|
1994-06-19
|
32KB
|
974 lines
#!/bin/sh
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
# Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# configure@cygnus.com
# This file was written by K. Richard Pixley.
#
# Shell script to create proper links to machine-dependent files in
# preparation for compilation.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo,
# config.status is removed.
#
export PATH || (/bin/echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$)
remove=rm
hard_link=ln
symbolic_link='ln -s'
#for Test
#remove="/bin/echo rm"
#hard_link="/bin/echo ln"
#symbolic_link="/bin/echo ln -s"
# clear some things potentially inherited from environment.
Makefile=Makefile
Makefile_in=Makefile.in
arguments=$*
build_alias=
configdirs=
exec_prefix=
exec_prefixoption=
fatal=
floating_point=default
gas=default
host_alias=NOHOST
host_makefile_frag=
moveifchange=
norecursion=
other_options=
package_makefile_frag=
prefix=/gnu
progname=
program_prefix=
program_prefixoption=
program_suffix=
program_suffixoption=
program_transform_name=
program_transform_nameoption=
redirect=">/dev/null"
removing=
site=
site_makefile_frag=
site_option=
srcdir=
srctrigger=
subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
version="$Revision: 1.183 $"
x11=default
### we might need to use some other shell than /bin/sh for running subshells
#
config_shell=${CONFIG_SHELL-/bin/sh}
NO_EDIT="This file was generated automatically by configure. Do not edit."
## this is a little touchy and won't always work, but...
##
## if the argv[0] starts with a slash then it is an absolute name that can (and
## must) be used as is.
##
## otherwise, if argv[0] has no slash in it, we can assume that it is on the
## path. Since PATH might include "." we also add `pwd` to the end of PATH.
##
progname=$0
# if PWD already has a value, it is probably wrong.
#AmigaDOS change - pdksh treats PWD as readonly - fnf
#if [ -n "$PWD" ]; then PWD=`pwd`; fi
case "${progname}" in
/*) ;;
*/*) ;;
*)
PATH=$PATH:${PWD=`pwd`} ; export PATH
;;
esac
# Loop over all args
while :
do
# Break out if there are no more args
case $# in
0)
break
;;
esac
# Get the first arg, and shuffle
option=$1
shift
# Make all options have two hyphens
orig_option=$option # Save original for error messages
case $option in
--*) ;;
-*) option=-$option ;;
esac
# Split out the argument for options that take them
case $option in
--*=*)
optarg=`/bin/echo $option | sed -e 's/^[^=]*=//'`
;;
# These options have mandatory values. Since we didn't find an = sign,
# the value must be in the next argument
--b* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-*)
optarg=$1
shift
;;
esac
# Now, process the options
case $option in
--build* | --b*)
case "$build_alias" in
"") build_alias=$optarg ;;
*) /bin/echo '***' Can only configure for one build machine at a time. 1>&2
fatal=yes
;;
esac
;;
--disable-*)
enableopt=`/bin/echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
eval $enableopt=no
disableoptions="$disableoptions $option"
;;
--enable-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
enableopt=`/bin/echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
eval $enableopt="$optarg"
enableoptions="$enableoptions $option"
;;
--exec-prefix* | --ex*)
exec_prefix=$optarg
exec_prefixoption="--exec-prefix=$optarg"
;;
--gas | --g*)
gas=yes
;;
--help | --he*)
fatal=yes
;;
--host* | --ho*)
case $host_alias in
NOHOST) host_alias=$optarg ;;
*) /bin/echo '***' Can only configure for one host at a time. 1>&2
fatal=yes
;;
esac
;;
--nfp | --nf*)
floating_point=no
;;
--norecursion | --no*)
norecursion=yes
;;
--prefix* | --pre*)
prefix=$optarg
prefixoption="--prefix=$optarg"
;;
--program-prefix* | --program-p*)
program_prefix=$optarg
program_prefixoption="--program-prefix=$optarg"
;;
--program-suffix* | --program-s*)
program_suffix=$optarg
program_suffixoption="--program-suffix=$optarg"
;;
--program-transform-name* | --program-t*)
# Double any backslashes or dollar signs in the argument
program_transform_name="${program_transform_name} -e `/bin/echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
program_transform_nameoption="--program-transform-nameoption='$optarg'"
;;
--rm)
removing=--rm
;;
--silent | --sil* | --quiet | --q*)
redirect=">/dev/null"
verbose=--silent
;;
--site* | --sit*)
site=$optarg
site_option="--site=$optarg"
;;
--srcdir*/ | --sr*/)
# Remove trailing slashes. Otherwise, when the file name gets
# bolted into an object file as debug info, it has two slashes
# in it. Ordinarily this is ok, but emacs takes double slash
# to mean "forget the first part".
srcdir=`/bin/echo $optarg | sed -e 's:/$::'`
;;
--srcdir* | --sr*)
srcdir=$optarg
;;
--target* | --ta*)
case $target_alias in
NOTARGET) target_alias=$optarg ;;
*) /bin/echo '***' Can only configure for one target at a time. 1>&2
fatal=yes
;;
esac
;;
--tmpdir* | --tm*)
TMPDIR=$optarg
tmpdiroption="--tmpdir=$optarg"
;;
--verbose | --v | --verb*)
redirect=
verbose=--verbose
;;
--version | --V | --vers*)
/bin/echo "This is Cygnus Configure version" `/bin/echo ${version} | sed 's/[ $:]//g'`
exit 0
;;
--with-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
withopt=`/bin/echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
eval $withopt="$optarg"
withoptions="$withoptions $option"
;;
--without-*)
withopt=`/bin/echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
eval $withopt=no
withoutoptions="$withoutoptions $option"
;;
--x) with_x=yes
withoptions="$withoptions --with-x"
;;
--x-i* | --x-l*) other_options="$other_options $orig_option"
;;
--*)
/bin/echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
exit 1
;;
*)
case $undefs in
NOUNDEFS) undefs=$option ;;
*) /bin/echo '***' Can only configure for one host and one target at a time. 1>&2
fatal=yes
;;
esac
;;
esac
done
# process host and target
# Do some error checking and defaulting for the host and target type.
# The inputs are:
# configure --host=HOST --target=TARGET UNDEFS
#
# The rules are:
# 1. You aren't allowed to specify --host, --target, and undefs at the
# same time.
# 2. Host defaults to undefs.
# 3. If undefs is not specified, then host defaults to the current host,
# as determined by config.guess.
# 4. Target defaults to undefs.
# 5. If undefs is not specified, then target defaults to host.
case "${fatal}" in
"")
# Make sure that host, target & undefs aren't all specified at the
# same time.
case $host_alias---$target_alias---$undefs in
NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
;;
*) /bin/echo '***' Can only configure for one host and one target at a time. 1>&2
fatal=yes
break 2
;;
esac
# Now, do defaulting for host.
case $host_alias in
NOHOST)
case $undefs in
NOUNDEFS)
# Neither --host option nor undefs were present.
# Call config.guess.
guesssys=`/bin/echo ${progname} | sed 's/c