⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 gcc库的原代码,对编程有很大帮助.
💻
📖 第 1 页 / 共 5 页
字号:
#!/bin/sh# Configuration script for GNU CC#   Copyright (C) 1988, 90, 91, 92, 93, 94, 1995 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, 59 Temple Place - Suite 330,#Boston, MA 02111-1307, 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.#	   --gxx-include-dir=DIR specifies directory to put g++ header files 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.#	   --with-elf		arrange to use elf instead of host debug format.#	   --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)#	   --disable-FOO	do not include feature FOO#	   --nfp		assume system has no FPU.#	   --program-prefix=PREFIX specifies prefix for executable names.#	   --program-suffix=SUFFIX specifies suffix for executable names.#	   --program-transform-name=SED-EXPR specifies `sed' expression to#				apply to executable names.## 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 ]thensrcdir=fihost=# Default prefix to /usr/local.prefix=/usr/local# On systems where GCC is the native compiler, $prefix should be# /usr. But the user can change it with configure --prefix=/foo/barnative_prefix=/usr # 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!local_prefix=/usr/local# Default is to let the Makefile set exec_prefix from $(prefix)exec_prefix='$(prefix)'## The default g++ include directory is $(libdir)/g++-include.gxx_include_dir='$(libdir)/g++-include'# Default --program-transform-name to nothing.program_transform_name=program_transform_set=remove=rmhard_link=lnsymbolic_link='ln -s'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=name1=name2=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    native_prefix=$prefix    next_arg=    ;;  --local-prefix)    local_prefix=$arg    next_arg=    ;;  --gxx-include-dir)    gxx_include_dir=$arg    next_arg=    ;;  --exec-prefix)    exec_prefix=$arg    next_arg=    ;;  --program-transform-name)    # Double any backslashes or dollar signs in the argument.    if [ -n "${arg}" ] ; then      program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"    fi    program_transform_set=yes    next_arg=    ;;      --program-prefix)    if [ -n "${arg}" ]; then      program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"    fi    program_transform_set=yes    next_arg=    ;;  --program-suffix)    if [ -n "${arg}" ]; then      program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"    fi    program_transform_set=yes    next_arg=    ;;  --x-*)    next_arg=    ;;  *)    case $arg in      -*)	if [ x$name1 != x ]	then		echo "Positional arguments must be last." 1>&2		exit 1	fi	;;    esac    case $arg in     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)	next_arg=--srcdir	;;     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)	srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`	;;     -host | --host | --hos | --ho)	next_arg=--host	;;     -host=* | --host=* | --hos=* | --ho=*)	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]*=//'`	native_prefix=$prefix	;;     -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]*=//'`	;;     -gxx-include-dir | --gxx-include-dir | --gxx-include \	| --gxx-incl | --gxx-inc | --gxx-in | --gxx-i | --gxx- \	| --gxx | --gxx | --gx | --g)	next_arg=--gxx-include-dir	;;     -gxx-include-dir=* | --gxx-include-dir=* | --gxx-include=* \	| --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \	| --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)	gxx_include_dir=`echo $arg | sed 's/-*g[-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]*=//'`	;;     -program-transform-name | --program-transform-name \	| --program-transform-nam | --program-transform-na \	| --program-transform-n | --program-transform- | --program-transform \	| --program-transfor | --program-transfo | --program-transf \	| --program-trans | --program-tran | --program-tra \	| --program-tr | --program-t)	next_arg=--program-transform-name	;;     -program-transform-name=* | --program-transform-name=* \	| --program-transform-nam=* | --program-transform-na=* \	| --program-transform-n=* | --program-transform-=* \	| --program-transform=* | --program-transfor=* | --program-transfo=* \	| --program-transf=* | --program-trans=* | --program-tran=* \	| --program-tra=* | --program-tr=* | --program-t=*)	arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`	# Double any \ or $ in the argument.	if [ -n "${arg}" ] ; then	  program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"	fi	program_transform_set=yes	;;     -program-prefix | --program-prefix | --program-prefi \	| --program-pref | --program-pre | --program-pr \	| --program-p)	next_arg=--program-prefix	;;     -program-prefix=* | --program-prefix=* | --program-prefi=* \	| --program-pref=* | --program-pre=* | --program-pr=* \	| --program-p=*)	arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`	if [ -n "${arg}" ]; then	  program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"	fi	program_transform_set=yes	;;     -program-suffix | --program-suffix | --program-suffi \	| --program-suff | --program-suf | --program-su \	| --program-s)	next_arg=--program-suffix	;;     -program-suffix=* | --program-suffix=* | --program-suffi=* \	| --program-suff=* | --program-suf=* | --program-su=* \	| --program-s=*)	arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`	if [ -n "${arg}" ]; then	  program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"	fi	program_transform_set=yes	;;     -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-elf | -with-el | -with-se \	| --with-elf | --with-el | --with-e \	| -elf | -el | -e \	|--elf | --el | --e)	elf=yes	;;     -with-* | --with-*) ;; #ignored     -without-* | --without-*) ;; #ignored     -disable-* | --disable-*)	enableopt=`echo ${arg} | sed 's:^-*disable-:enable_:;s:-:_:g'`	eval $enableopt=no	;;     -enable-* | --enable-*)	case "$arg" in	*=*)	optarg=`echo $arg | sed 's:^[^=]*=::;s:-:_:g'` ;;	*)	optarg=yes ;;	esac	enableopt=`echo ${arg} | sed 's:^-*::;s:=.*$::;s:-:_:g'`	eval $enableopt="$optarg"	;;     -x | --x) ;; # ignored     -x-*=* | --x-*=*) ;; # ignored     -x-* | --x-*)	next_arg=--x-ignored # ignored	;;     --he*) ;; # ignored for now (--help)     --vers*) ;; # ignored for now (--version)     -v | -verb* | --verb*) ;; # ignored for now (--verbose)     --program-*) ;; #ignored (--program-prefix, --program-suffix)     --c*) ;; #ignored (--cache-file)     --q*) ;; #ignored (--quiet)     --si*) ;; #ignored (--silent)     -*)	echo "Invalid option \`$arg'" 1>&2	exit 1	;;     *)# Allow configure HOST TARGET.  If just one name is given, it is used# as both unless a host was previously given, in which case it is# just the target.	if [ x$name1 != x ]	then		if [ x$name2 != x ]		then			echo "More than two configuration names." 1>&2			exit 1		fi		name2=$arg	elif [ x$host != x ]	then		name1=$host		name2=$arg		host=	else		name1=$arg	fi	;;    esac  esacdoneif [ x$name1 != x ]then	if [ x$name2 = x ]	then		name2=$name1	fi	if [ x$host != x ]	then		echo "Duplicate specification of host." 1>&2		exit 1	fi	if [ x$target != x ]	then		echo "Duplicate specification of target." 1>&2		exit 1	fi	host=$name1	build=$name1	target=$name2fi# Find the source files, if location was not specified.if [ x$srcdir = x ]then	srcdirdefaulted=1	srcdir=.	if [ ! -r tree.c ]	then		srcdir=..	fifiif [ ! -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 1fiif [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]then	echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2	exit 1fi# Complain if an arg is missingif [ x$build = x ]then	# If host was specified, always use it for build also to avoid	# confusion.  If someone wants a cross compiler where build != host,	# then they must specify build explicitly.  Since this case is	# extremely rare, it does not matter that it is slightly inconvenient.	if [ x$host != x ]	then		build=$host		# This way of testing the result of a command substitution is	# defined by Posix.2 (section 3.9.1) as well as traditional shells.	elif build=`${srcdir}/config.guess`	then		echo "This appears to be a ${build} system." 1>&2	elif [ x$target != x ]	then		echo 'Config.guess failed to determine the host type.  Defaulting to target.'		build=$target	else		echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2		echo "\Usage: `basename $progname` [--host=HOST] [--build=BUILD]       [--prefix=DIR] [--gxx-include-dir=DIR] [--local-pref=DIR] [--exec-pref=DIR]       [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--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	fifi# If $host was not specified, use $build.if [ x$host = x ]then	host=$buildfi# If $target was not specified, use $host.if [ x$target = x ]then	target=$hostfibuild_xm_file=host_xm_file=host_xmake_file=host_broken_install=host_install_headers_dir=install-headers-tarhost_truncate_target=# Validate the specs, and canonicalize them.canon_build=`/bin/sh $srcdir/config.sub $build` || exit 1canon_host=`/bin/sh $srcdir/config.sub $host` || exit 1canon_target=`/bin/sh $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=	extra_headers=	extra_passes=	extra_parts=	extra_programs=	extra_objs=	extra_gcc_objs=	# 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	# Set this to control how the header file directory is installed.	install_headers_dir=install-headers-tar	# Set this to a non-empty list of args to pass to cpp if the target	# wants its .md file passed through cpp.	md_cppflags=	# Set this if directory names should be truncated to 14 characters.	truncate_target=	# Set this if gdb needs a dir command with `dirname $out_file`	gdb_needs_out_file_path=	case $machine in	# Support site-specific machine types.	*local*)		cpu_type=`echo $machine | sed -e 's/-.*//'`		rest=`echo $machine | sed -e "s/$cpu_type-//"`		xm_file=${cpu_type}/xm-$rest.h		tm_file=${cpu_type}/$rest.h		if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \		then xmake_file=${cpu_type}/x-$rest; \		else true; \		fi		if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \		then tmake_file=${cpu_type}/t-$rest; \		else true; \		fi		;;	1750a-*-*)		;;	a29k-*-bsd* | a29k-*-sym1*)		tm_file=a29k/unix.h		xm_file=a29k/xm-unix.h		xmake_file=a29k/x-unix		tmake_file=a29k/t-a29k		use_collect2=yes		;;	a29k-*-udi | a29k-*-coff)		tmake_file=a29k/t-a29kbare		tm_file=a29k/a29k-udi.h		;;	a29k-*-vxworks*)		tmake_file=a29k/t-vx29k		tm_file=a29k/vx29k.h		extra_parts="crtbegin.o crtend.o"		;;	a29k-*-*)			# Default a29k environment.		use_collect2=yes		;;	alpha-dec-osf[23456789]*)		tm_file=alpha/osf2.h		if [ x$stabs = xyes ]		then			tm_file=alpha/gdb-osf2.h		fi		if [ x$gas != xyes ]		then			extra_passes="mips-tfile mips-tdump"		fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -