home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
gcc-2.3.3-src.lha
/
GNU
/
src
/
amiga
/
gcc-2.3.3
/
configure
< prev
next >
Wrap
Text File
|
1994-02-06
|
31KB
|
1,369 lines
#!/bin/sh
# Configuration script for GNU CC
# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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, or (at your option)
#any later version.
#GNU CC 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 GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Shell script to create proper links to machine-dependent files in
# preparation for compiling gcc.
#
# Options: --srcdir=DIR specifies directory where sources are.
# --host=HOST specifies host configuration.
# --target=TARGET specifies target configuration.
# --build=TARGET specifies configuration of machine you are
# using to compile GCC.
# --prefix=DIR specifies directory to install in.
# --local-prefix=DIR specifies directory to put local ./include in.
# --exec-prefix=DIR specifies directory to install executables in.
# --with-gnu-ld arrange to work with GNU ld.
# --with-gnu-as arrange to work with GAS.
# --with-stabs arrange to use stabs instead of host debug format.
# --nfp assume system has no FPU.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo,
# config.status is removed.
#
progname=$0
# Default --srcdir to the directory where the script is found,
# if a directory was specified.
# The second sed call is to convert `.//configure' to `./configure'.
srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
if [ x$srcdir = x$0 ]
then
srcdir=
fi
host=
# Note: For AmigaDOS we want this to default to /gnu unless we specify
# otherwise to configure. Changing it in Makefile.in or config/m68k/x-amigados
# is ineffective since configure will always change them back in the final
# generated Makefile, so we have to go to the root of the problem, which is
# here. -fnf
# Default prefix to /gnu.
prefix=/gnu
# local_prefix specifies where to find the directory /usr/local/include
# We don't use $(prefix) for this
# because we always want GCC to search /usr/local/include
# even if GCC is installed somewhere other than /usr/local.
# Think THREE TIMES before specifying any other value for this!
# DO NOT make this use $prefix!
# Note: See AmigaDOS note above for this AmigaDOS specific change. -fnf
local_prefix=/local
# Default is to let the Makefile set exec_prefix from $(prefix)
exec_prefix='$(prefix)'
remove=rm
hard_link=cp
symbolic_link=cp
copy=cp
# Record all the arguments, to write them in config.status.
arguments=$*
#for Test
#remove="echo rm"
#hard_link="echo ln"
#symbolic_link="echo ln -s"
target=
host=
build=
for arg in $*;
do
case $next_arg in
--srcdir)
srcdir=$arg
next_arg=
;;
--host)
host=$arg
next_arg=
;;
--target)
target=$arg
next_arg=
;;
--build)
build=$arg
next_arg=
;;
--prefix)
prefix=$arg
next_arg=
;;
--local-prefix)
local_prefix=$arg
next_arg=
;;
--exec-prefix)
exec_prefix=$arg
next_arg=
;;
*)
case $arg in
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
next_arg=--srcdir
;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
;;
-host | --host | --hos | --ho | --h)
next_arg=--host
;;
-host=* | --host=* | --hos=* | --ho=* | --h=*)
host=`echo $arg | sed 's/-*h[a-z]*=//'`
;;
-target | --target | --targe | --targ | --tar | --ta | --t)
next_arg=--target
;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target=`echo $arg | sed 's/-*t[a-z]*=//'`
;;
-build | --build | --buil | --bui | --bu | --b)
next_arg=--build
;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
build=`echo $arg | sed 's/-*b[a-z]*=//'`
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
next_arg=--prefix
;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
;;
-local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
| --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
next_arg=--local-prefix
;;
-local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
| --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
| --loc=* | --lo=* | --l=*)
local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
;;
-exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
| --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
next_arg=--exec-prefix
;;
-exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
| --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
| --exe=* | --ex=* | --e=*)
exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
;;
-with-gnu-ld | --with-gnu-ld | --with-gnu-l)
gnu_ld=yes
;;
-gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
gas=yes
;;
-nfp | --nfp | --nf | --n)
nfp=yes
;;
-with-stabs | -with-stab | -with-sta | -with-st | -with-s \
| --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
| -stabs | -stab | -sta | -st \
| --stabs | --stab | --sta | --st)
stabs=yes
;;
-with-* | --with-*) ;; #ignored
-x | --x) ;; # ignored
-*)
echo "Invalid option \`$arg'" 1>&2
exit 1
;;
*)
# Allow configure HOST TARGET
if [ x$host = x ]
then
host=$target
fi
target=$arg
;;
esac
esac
done
# Find the source files, if location was not specified.
if [ x$srcdir = x ]
then
srcdirdefaulted=1
srcdir=.
if [ ! -r tree.c ]
then
srcdir=..
fi
fi
srcdir=../gcc-2.3.3-amiga #Hack
if [ ! -r ${srcdir}/tree.c ]
then
if [ x$srcdirdefaulted = x ]
then
echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
else
echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
fi
exit 1
fi
if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
then
echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
exit 1
fi
# Complain if an arg is missing
if [ x$target = x ]
then
echo "No target specified." 1>&2
echo "\
Usage: `basename $progname` [--host=HOST] [--build=BUILD]
[--prefix=DIR] [--local-pref=DIR] [--exec-pref=DIR]
[--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--nfp] TARGET" 1>&2
echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
if [ -r config.status ]
then
tail +2 config.status 1>&2
fi
exit 1
fi
# Default other arg
if [ x$host = x ]
then
host=$target
fi
# If $build was not specified, use $host.
if [ x$build = x ]
then
build=$host
fi
build_xm_file=
host_xm_file=
host_xmake_file=
host_broken_install=
# Validate the specs, and canonicalize them.
canon_build=`$srcdir/config.sub $build` || exit 1
canon_host=`$srcdir/config.sub $host` || exit 1
canon_target=`$srcdir/config.sub $target` || exit 1
# Decode the host machine, then the target machine.
# For the host machine, we save the xm_file variable as host_xm_file;
# then we decode the target machine and forget everything else
# that came from the host machine.
for machine in $canon_build $canon_host $canon_target; do
cpu_type=
xm_file=
tm_file=
out_file=
xmake_file=
tmake_file=
header_files=
# Set this to force installation and use of collect2.
use_collect2=
# Set this to override the default target model.
target_cpu_default=
# Set this to force use of install.sh.
broken_install=
# Set this to control which fixincludes program to use.
fixincludes=fixincludes
case $machine in
# Support site-specific machine types.
*local*)
cpu_type=$machine
xm_file=xm-$machine.h
tm_file=$machine.h
if [ -f $srcdir/config/x-$machine ] ; \