configure.in

来自「GCC编译器源代码」· IN 代码 · 共 2,829 行 · 第 1/5 页

IN
2,829
字号
# configure.in for GNU CC# Process this file with autoconf to generate a configuration script.# Copyright (C) 1997 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.# Initialization and defaultsAC_INIT(tree.c)AC_CONFIG_HEADER(auto-config.h:config.in)native_prefix=/usrremove=rmhard_link=lnsymbolic_link='ln -s'copy=cp# Check for additional parameters# With GNU ldAC_ARG_WITH(gnu-ld,[  --with-gnu-ld           arrange to work with GNU ld.],gnu_ld=yes,gnu_ld=no)# With GNU asAC_ARG_WITH(gnu-as,[  --with-gnu-as           arrange to work with GNU as.],gas=yes,gas=no)# With stabsAC_ARG_WITH(stabs,[  --with-stabs            arrange to use stabs instead of host debug format.],stabs=yes,stabs=no)# With ELFAC_ARG_WITH(elf,[  --with-elf              arrange to use ELF instead of host debug format.],elf=yes,elf=no)# Specify the local prefixAC_ARG_WITH(local-prefix,[  --with-local-prefix=DIR specifies directory to put local include.],local_prefix=$with_local_prefix,local_prefix=/usr/local)# Default local prefix if it is emptyif [[ x$local_prefix = x ]]; then	local_prefix=/usr/localfi# Specify the g++ header file directoryAC_ARG_WITH(gxx-include-dir,[  --with-gxx-include-dir=DIR                          specifies directory to put g++ header files.],gxx_include_dir=$with_gxx_include_dir,gxx_include_dir='${prefix}/include/g++')# Default g++ header file directory if it is emptyif [[ x$gxx_include_dir = x ]]; then	gxx_include_dir='${prefix}/include/g++'fi# Enable use of cpplib for C.AC_ARG_ENABLE(c-cpplib,[  --enable-c-cpplib       Use cpplib for C.],if [[[ x$enable_c_cpplib != xno ]]]; then  extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"  extra_c_flags=-DUSE_CPPLIB=1fi)# Enable threads# Pass with no value to take the default# Pass with a value to specify a thread packageAC_ARG_ENABLE(threads,[  --enable-threads        enable thread usage for target GCC.  --enable-threads=LIB    use LIB thread package for target GCC.],if [[[ x$enable_threads = xno ]]]; then	enable_threads=''fi,enable_threads='')# Check if a valid thread packagecase x${enable_threads} in	x | xno)		# No threads		thread_file='single'		;;	xyes)		# default		thread_file=''		;;	xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \	xsolaris | xwin32)		thread_file=$enable_threads		;;	*)		echo "$enable_threads is an unknown thread package" 1>&2		exit 1		;;esac# Determine the host, build, and target systemsAC_CANONICAL_SYSTEM# Find the native compilerAC_PROG_CCAC_PROG_MAKE_SET# Find some useful toolsAC_PROG_AWKAC_PROG_LEXAC_PROG_RANLIBAC_PROG_YACCAC_PROG_INSTALLAC_HEADER_STDCAC_HEADER_TIMEAC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h)# Use <inttypes.h> only if it exists,# doesn't clash with <sys/types.h>, and declares intmax_t.AC_MSG_CHECKING(for inttypes.h)AC_CACHE_VAL(gcc_cv_header_inttypes_h,[AC_TRY_COMPILE(  [#include <sys/types.h>#include <inttypes.h>],  [intmax_t i = -1;],  gcc_cv_header_inttypes_h=yes,  gcc_cv_header_inttypes_h=no)])AC_MSG_RESULT($gcc_cv_header_inttypes_h)if test $gcc_cv_header_inttypes_h = yes; then  AC_DEFINE(HAVE_INTTYPES_H)fiAC_CHECK_FUNCS(strerror)AC_CHECK_FUNCS(putenv)AC_CHECK_FUNCS(popen)AC_CHECK_FUNCS(vprintf)AC_CHECK_FUNCS(bcopy)AC_CHECK_FUNCS(bzero)AC_CHECK_FUNCS(bcmp)AC_CHECK_FUNCS(index)AC_CHECK_FUNCS(rindex)AC_CHECK_FUNCS(kill)AC_CHECK_FUNCS(getrlimit)AC_CHECK_FUNCS(setrlimit)GCC_NEED_DECLARATION(malloc)GCC_NEED_DECLARATION(realloc)GCC_NEED_DECLARATION(calloc)GCC_NEED_DECLARATION(free)GCC_NEED_DECLARATION(index)GCC_NEED_DECLARATION(rindex)GCC_NEED_DECLARATION(getenv)AC_DECL_SYS_SIGLIST# File extensionsmanext='.1'objext='.o'AC_SUBST(manext)AC_SUBST(objext)build_xm_file=build_broken_install=build_install_headers_dir=install-headers-tarbuild_exeext=host_xm_file=host_xmake_file=host_truncate_target=# 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 $build $host $target; do	out_file=	xmake_file=	tmake_file=	extra_headers=	extra_passes=	extra_parts=	extra_programs=	extra_objs=	extra_host_objs=	extra_gcc_objs=	float_format=	# 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=	# Set this if the build machine requires executables to have a	# file name suffix.	exeext=	# Set default cpu_type, tm_file and xm_file so it can be updated in	# each machine entry.	cpu_type=`echo $machine | sed 's/-.*$//'`	case $machine in	alpha*-*-*)		cpu_type=alpha		;;	arm*-*-*)		cpu_type=arm		;;	c*-convex-*)		cpu_type=convex		;;	i[[3456]]86-*-*)		cpu_type=i386		;;	hppa*-*-*)		cpu_type=pa		;;	m68000-*-*)		cpu_type=m68k		;;	mips*-*-*)		cpu_type=mips		;;	powerpc*-*-*)		cpu_type=rs6000		;;	pyramid-*-*)		cpu_type=pyr		;;	sparc*-*-*)		cpu_type=sparc		;;	esac	tm_file=${cpu_type}/${cpu_type}.h	xm_file=${cpu_type}/xm-${cpu_type}.h		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="${tm_file} a29k/unix.h"		xm_file=a29k/xm-unix.h		xmake_file=a29k/x-unix		use_collect2=yes		;;	a29k-*-udi | a29k-*-coff)		tm_file="${tm_file} dbxcoff.h a29k/udi.h"		tmake_file=a29k/t-a29kbare		;;	a29k-*-vxworks*)		tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"		tmake_file=a29k/t-vx29k		extra_parts="crtbegin.o crtend.o"		;;	a29k-*-*)			# Default a29k environment.		use_collect2=yes		;;	alpha*-*-linux-gnuecoff*)		tm_file="${tm_file} alpha/linux.h"		xm_file="${xm_file} alpha/xm-linux.h"		target_cpu_default="MASK_GAS"		gas=no		xmake_file=none		fixincludes=Makefile.in		gas=yes gnu_ld=yes		;;	alpha*-*-linux-gnulibc1*)		tm_file="${tm_file} alpha/linux.h alpha/elf.h"		xm_file="${xm_file} alpha/xm-linux.h"		target_cpu_default="MASK_GAS"		tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"		xmake_file=none		fixincludes=Makefile.in		gas=yes gnu_ld=yes 		if [[ x$enable_threads = xyes ]]; then 			thread_file='posix' 		fi		;;	alpha*-*-linux-gnu*)		tm_file="${tm_file} alpha/linux.h alpha/elf.h"		xm_file="${xm_file} alpha/xm-linux.h"		target_cpu_default="MASK_GAS"		tmake_file="t-linux alpha/t-linux"		xmake_file=none		fixincludes=Makefile.in		gas=yes gnu_ld=yes 		if [[ x$enable_threads = xyes ]]; then 			thread_file='posix' 		fi		;;	alpha*-dec-osf*)		if [[ x$stabs = xyes ]]		then			tm_file="${tm_file} dbx.h"		fi		if [[ x$gas != xyes ]]		then			extra_passes="mips-tfile mips-tdump"		fi		broken_install=yes		use_collect2=yes		case $machine in		  *-*-osf1.2)		    tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"		    ;;		  *-*-osf[[23]]*)		    tm_file="${tm_file} alpha/osf2or3.h"		    ;;		  *-*-osf4*)		    # Some versions of OSF4 (specifically X4.0-9 296.7) have		    # a broken tar, so we use cpio instead.		    install_headers_dir=install-headers-cpio		    ;;		esac		case $machine in		  *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)		    target_cpu_default=MASK_SUPPORT_ARCH		    ;;		esac		;;	alpha*-*-winnt3*)		tm_file="${tm_file} alpha/win-nt.h"		target_cpu_default=MASK_WINDOWS_NT		xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"		tmake_file=t-libc-ok		xmake_file=winnt/x-winnt		extra_host_objs=oldnames.o		extra_gcc_objs="spawnv.o oldnames.o"		fixincludes=fixinc.winnt		if [[ x$gnu_ld != xyes ]]		then			extra_programs=ld.exe		fi 		if [[ x$enable_threads = xyes ]]; then			thread_file='win32'		fi		;;	alpha*-dec-vms*)		tm_file=alpha/vms.h		xm_file="${xm_file} alpha/xm-vms.h"		tmake_file=alpha/t-vms		fixincludes=Makefile.in		;;	arc-*-elf*)		extra_parts="crtinit.o crtfini.o"		;;	arm-*-coff* | armel-*-coff*)		tm_file=arm/coff.h		tmake_file=arm/t-bare		;;	arm-*-riscix1.[[01]]*)		# Acorn RISC machine (early versions)		tm_file=arm/riscix1-1.h		use_collect2=yes		;;	arm-*-riscix*)			# Acorn RISC machine		if [[ x$gas = xyes ]]		then		    tm_file=arm/rix-gas.h		else		    tm_file=arm/riscix.h		fi		xmake_file=arm/x-riscix		tmake_file=arm/t-riscix		use_collect2=yes		;;	arm-semi-aout | armel-semi-aout)		tm_file=arm/semi.h		tmake_file=arm/t-semi		fixincludes=Makefile.in # There is nothing to fix		;;	arm-semi-aof | armel-semi-aof)		tm_file=arm/semiaof.h		tmake_file=arm/t-semiaof		fixincludes=Makefile.in # There is nothing to fix		;;	arm-*-netbsd*)		tm_file=arm/netbsd.h		xm_file=arm/xm-netbsd.h		tmake_file="t-netbsd arm/t-netbsd"		# On NetBSD, the headers are already okay, except for math.h.		fixincludes=fixinc.math		;;	arm-*-linux-gnuaout*)		# ARM GNU/Linux		cpu_type=arm		xm_file=arm/xm-linux.h		xmake_file=x-linux		tm_file=arm/linux-gas.h		tmake_file=arm/t-linux		fixincludes=Makefile.in		broken_install=yes		gnu_ld=yes		;;	arm-*-aout)		tm_file=arm/aout.h		tmake_file=arm/t-bare		;;	c1-convex-*)			# Convex C1		target_cpu_default=1		use_collect2=yes		fixincludes=Makefile.in		;;	c2-convex-*)			# Convex C2		target_cpu_default=2		use_collect2=yes		fixincludes=Makefile.in		;;	c32-convex-*)		target_cpu_default=4		use_collect2=yes		fixincludes=Makefile.in		;;	c34-convex-*)		target_cpu_default=8		use_collect2=yes		fixincludes=Makefile.in		;;	c38-convex-*)		target_cpu_default=16				use_collect2=yes		fixincludes=Makefile.in		;;	clipper-intergraph-clix*)		tm_file="${tm_file} svr3.h clipper/clix.h"		xm_file=clipper/xm-clix.h		xmake_file=clipper/x-clix		extra_headers=va-clipper.h		extra_parts="crtbegin.o crtend.o"		install_headers_dir=install-headers-cpio		broken_install=yes		;;	dsp16xx-*)		;;	elxsi-elxsi-*)		use_collect2=yes		;;# This hasn't been upgraded to GCC 2.#	fx80-alliant-*)			# Alliant FX/80#		;;	h8300-*-*)		float_format=i32		;;	hppa1.1-*-pro*)		tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"		xm_file=pa/xm-papro.h		tmake_file=pa/t-pro		;;	hppa1.1-*-osf*)		target_cpu_default=1		tm_file="${tm_file} pa/pa-osf.h"		use_collect2=yes		fixincludes=Makefile.in		;;	hppa1.1-*-rtems*)		tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"		xm_file=pa/xm-papro.h		tmake_file=pa/t-pro		;;	hppa1.0-*-osf*)		tm_file="${tm_file} pa/pa-osf.h"		use_collect2=yes		fixincludes=Makefile.in		;;	hppa1.1-*-bsd*)		target_cpu_default=1		use_collect2=yes		fixincludes=Makefile.in		;;	hppa1.0-*-bsd*)		use_collect2=yes		fixincludes=Makefile.in		;;	hppa1.0-*-hpux7*)		tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"		xm_file=pa/xm-pahpux.h		xmake_file=pa/x-pa-hpux		if [[ x$gas = xyes ]]		then			tm_file="${tm_file} pa/gas.h"		fi		broken_install=yes		install_headers_dir=install-headers-cpio		use_collect2=yes		;;	hppa1.0-*-hpux8.0[[0-2]]*)		tm_file="${tm_file} pa/pa-hpux.h"		xm_file=pa/xm-pahpux.h		xmake_file=pa/x-pa-hpux		if [[ x$gas = xyes ]]		then			tm_file="${tm_file} pa/pa-gas.h"		else			tm_file="pa/pa-oldas.h ${tm_file}"		fi		broken_install=yes		install_headers_dir=install-headers-cpio		use_collect2=yes		;;	hppa1.1-*-hpux8.0[[0-2]]*)		target_cpu_default=1		tm_file="${tm_file} pa/pa-hpux.h"		xm_file=pa/xm-pahpux.h		xmake_file=pa/x-pa-hpux		if [[ x$gas = xyes ]]		then			tm_file="${tm_file} pa/pa-gas.h"		else			tm_file="pa/pa-oldas.h ${tm_file}"		fi		broken_install=yes		install_headers_dir=install-headers-cpio		use_collect2=yes		;;	hppa1.1-*-hpux8*)		target_cpu_default=1		tm_file="${tm_file} pa/pa-hpux.h"		xm_file=pa/xm-pahpux.h		xmake_file=pa/x-pa-hpux		if [[ x$gas = xyes ]]		then			tm_file="${tm_file} pa/pa-gas.h"

⌨️ 快捷键说明

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