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

📄 iffe

📁 su 的源代码库
💻
📖 第 1 页 / 共 5 页
字号:
	if available). The supported names are \bksh\b, \bbsh\b, \bbash\b, and	\bosh\b. \bosh\b forces the \bread -r\b compatibility read command to	be compiled and used instead of \bread -r\b. The default is determined	by probing the shell at startup.]:[name][S:static?Sets the C compiler flags that force static linking. If not set	then \biffe\b probes the compiler to determine the flags. \biffe\b	must use static linking (no dlls) because on some systems missing	library symbols are only detected when referenced at runtime from	dynamically linked executables.]:[flags][u:undef?\b#undef\b failed test macros. By default only successful test macros	are defined \b1\b.][v:verbose?Produce a message line on the standard error for each test as	it is performed.][x:cross?Some tests compile an executable (\ba.out\b) and then run it.	If the C compiler is a cross compiler and the executable format is	incompatible with the execution environment then the generated	executables must be run in a different environment, possibly on	another host. \acrosstype\a is the HOSTTYPE for generated executables	(the \bpackage\b(1) command generates a consistent HOSTTYPE namespace).	Generated executables are run via \bcrossexec\b(1) with \acrosstype\a	as the first argument. \bcrossexec\b supports remote execution for	cross-compiled executables. See \bcrossexec\b(1) for	details.]:[crosstype][X:exclude?Removes \b-I\b\adir\a and \b-I\b*/\adir\a C compiler flags.]:[dir][ - ] [ file.iffe | statement [ : statement ... ] ][+SYNTAX?\biffe\b input consists of a sequence of statement lines. Statements	that span more than one line contain \abegin\a\b{\b as the last	operand (where \abegin\a is command specific) and zero	or more data lines terminated by a line containing	\b}end\b as the first operand. The statement syntax is:	[\aname\a \b=\b]] [\b!\b]] \atest\a[,\atest\a...]] [\b-\b]]	[\aarg\a[,\aarg\a...]]]] [\aprereq\a ...]]	[\abegin\a{ ... |\bend\b ...]] [= [\adefault\a]]]].	\atest\as and \aarg\as may be combined, separated by commas, to perform	a set of tests on a set of arguments. \aname\a \b=\b before \atest\a	overrides the default test variable and macro name, and \b-\b after	\atest\a performs the test but does not define the test variable and	macro values. \b!\b before \atest\a inverts the test sense for \bif\b,	\belif\b, and \byes{\b and \bno{\b blocks.][+?\aprereq\as are used when applying the features tests and may be	combinations of:]{		[+compiler options?\b-D\b*, \b-L\b*, etc.]		[+library references?\b-l\b*, *\b.a\b, etc. \b_LIB_\b\aname\a			is defined to be 1 if \b-l\b\aname\a is a library.]		[+header references?*\b.h\b. \a_dir_name\a is defined to be 1			if \adir/name\a\b.h\b is a header, or if \adir\a is			omitted, \b_hdr_\b\aname\a is defined to be 1 if			\aname\a\b.h\b is a header.]		[+-?Prereq grouping mark; prereqs before the first \b-\b are			passed to all feature tests. Subsequent groups			are attempted in left-to-right order until the first			successful group is found.]	}[+?\abegin\a\b{\b ... \b}end\b delimit multiline code blocks that override	or augment the default code provided by \biffe\b. User supplied code	blocks should be compatible with the K&R, ANSI, and C++ C language	dialects for maximal portability. In addition to all macro definitions	generated by previous tests, all generated code contains the	following at the top to hide dialect differences:]{		[+#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)?]		[+#define _STD_ 1?]		[+#define _ARG_(x) x?]		[+#define _VOID_ void?]		[+#else?]		[+#define _STD_ 0?]		[+#define _ARG_(x) ()?]		[+#define _VOID_ char?]		[+#endif?]		[+#if defined(__cplusplus)?]		[+#define _BEGIN_EXTERNS_ extern "C" {?]		[+#define _END_EXTERNS_ }?]		[+#else?]		[+#define _BEGIN_EXTERNS_?]		[+#define _END_EXTERNS_?]		[+#endif?]		[+#define _NIL_(x) ((x)0)?]	}[+?= \adefault\a may be specified for the \bkey\b, \blib\b, \bmac\b, \bmth\b	and \btyp\b tests. If the test fails for \aarg\a then	\b#define\b \aarg\a \adefault\a is emitted. \bkey\b accepts multiple	\b= \b\adefault\a values; the first valid one is used.][+?Each test statement generates a portion of a C language header that contains	macro defintions, comments, and other text corresponding to the feature	tests. \b#ifndef _def_\b\aname\a\b_\b\adirectory\a ...	\b#endif\b guards the generated header from multiple \b#include\bs,	where \aname\a is determined by either the \brun\b statement input file	name if any, or the first \atest\a in the first statement, and \adirectory\a	is the basename component of either the \brun\b statement file, if any,	or the current working directory. The output file name is determined	in this order:]{		[+-?If the first command line operand is \b-\b then the output			is written to the standard output.]		[+--output=\afile\a?Output is \afile\a.]		[+set out \afile\a?Output is \afile\a.]		[+[run]] [\adirectory\a/]]\abase\a[\a.suffix\a]]?Output is			\bFEATURE/\b\abase\a.]	}[+?Generated \biffe\b headers are often referenced in C source as:	\b#include "FEATURE/\b\afile\a". The \bnmake\b(1) base rules contain	metarules for generating \bFEATURE/\b\afile\a from	\bfeatures/\b\afile\a[\asuffix\a]], where \asuffix\a may be omitted,	\b.c\b, or \b.sh\b (see the \brun\b test below). Because	\b#include\b prerequisites are automatically detected, \bnmake\b(1)	ensures that all prerequisite \biffe\b headers are generated before	compilation. Note that the directories are deliberately named	\bFEATURE\b and \bfeatures\b to keep case-ignorant file systems	happy.][+?The feature tests are:]{	[+# \acomment\a?Comment line - ignored.]	[+cmd \aname\a?Defines \b_cmd_\b\aname\a if \aname\a is an executable		in one of the standard system directories (\b/bin, /etc,		/usr/bin, /usr/etc, /usr/ucb\b).		\b_\b\adirectory\a\b_\b\aname\a is defined for \adirectory\a		in which \aname\a is found (with \b/\b translated to \b_\b).]	[+dat \aname\a?Defines \b_dat_\b\aname\a if \aname\a is a data symbol		in the default libraries.]	[+def \aname\a?Equivalent to \bcmd,dat,hdr,key,lib,mth,sys,typ\b		\aname\a.]	[+dfn \aname\a?If \aname\a is a macro in the candidate headers then		a \b#define\b \aname\a \avalue\a statment is output for the		\avalue\a defined in the headers. The definition is \b#ifndef\b		guarded.]	[+exp \aname\a \aexpression\a?If \aexpression\a is a \"...\" string		then \aname\a is defined to be the string, else if the		\bexpr\b(1) evaluation of \aexpression\a is not 0 then \aname\a		is defined to be 1, otherwise \aname\a is defined to be 0.		Identifiers in \aexpression\a may be previously defined names		from other \biffe\b tests; undefined names evaluate to 0.		If \aname\a was defined in a previous successful test then		the current and subsequent \bexp\b test on \aname\a are		skipped. If \aname\a is \b-\b then the \aexpression\a is		simply evaluated.]	[+hdr \aname\a?Defines \b_hdr_\b\aname\a if the header		\b<\b\aname\a\b.h>\b exists. The \b--config\b macro name is		\bHAVE_\b\aNAME\a\b_H\b.]	[+if \astatement\a ... | \belif\b \astatement\a ... | \belse\b		| \bendif\b?Nested if-else test control.]	[+iff \aname\a?The generated header \b#ifndef-#endif\b macro guard is		\b_\b\aname\a\b_H\b.]	[+include \afile\a [ re ]]?Read #define macro names from \afile\a		and arrange for those names to evaluate to 1 in \bexp\b		expressions. If \are\a is specified then macros not matching		\are\a are ignored.]	[+key \aname\a?Defines \b_key_\b\aname\a if \aname\a is a reserved		word (keyword).]	[+lcl \aname\a?Generates a \b#include\b statement for the native version		of the header \b<\b\aname\a\b.h>\b if it exists. Defines		\b_lcl_\b\aname\a on success. The \b--config\b macro name is		\bHAVE_\b\aNAME\a\b_H\b. The default \are\a is \b^HAVE_\b		for \b--config\b and \b^_\b otherwise.]	[+lib \aname\a?Defines \b_lib_\b\aname\a if \aname\a is an external		symbol in the default libraries.]	[+mac \aname\a?Defines \b_mac_\b\aname\a if \aname\a is a macro.]	[+mem \astruct.member\a?Defines \b_mem_\b\amember\a\b_\b\astruct\a		if \amember\a is a member of the structure \astruct\a.]	[+mth \aname\a?Defines \b_mth_\b\aname\a if \aname\a is an external		symbol in the math library.]	[+nop \aname\a?If this is the first test then \aname\a may be used		to name the output file and/or the output header guard macro.		Otherwise this test is ignored.]	[+npt \aname\a?Defines \b_npt_\b\aname\a if the \aname\a symbol		requires a prototype. The \b--config\b macro name is		\bHAVE_\aNAME\a\b_DECL\b with the opposite sense.]	[+num \aname\a?Defines \b_num_\b\aname\a if \aname\a is a numeric		constant \aenum\a or \amacro\a.]	[+nxt \aname\a?Defines a string macro \b_nxt_\b\aname\a suitable for		a \b#include\b statement to include the next (on the include		path) or native version of the header \b<\b\aname\a\b.h>\b		if it exists. Also defines the \"...\" form		\b_nxt_\b\aname\a\b_str\b. The \b--config\b macro name is		\bHAVE_\b\aNAME\a\b_NEXT\b.]	[+one \aheader\a ...?Generates a \b#include\b statement for the first		header found in the \aheader\a list.]	[+pth \afile\a [ \adir\a ... | { \ag1\a - ... - \agn\a } | < \apkg\a [\aver\a ...]] > ]]?Defines		\b_pth_\b\afile\a, with embedded \b/\b chars translated to		\b_\b, to the path of the first instance of \afile\a in the		\adir\a directories. \b{\b ... \b}\b forms a directory list		from the cross-product of \b-\b separated directory groups		\ag1\a ... \agn\a. < ... > forms a directory list for the		package \apkg\a with optional versions. The \b--config\b macro		name is \aNAME\a\b_PATH\b.]	[+run \afile\a?Runs the tests in \afile\a based on the \afile\a		suffix:]{		[+.c?\afile\a is compiled and executed and the output is copied			to the \biffe\b output file.]		[+.sh?\afile\a is executed as a shell script and the output is			copied to the \biffe\b output file.]		[+.iffe \bor no suffix?\afile\a contains \biffe\b			statements.]	}	[+set \aoption value\a?Sets option values. The options are described		above.]	[+siz \aname\a?Defines \b_siz_\b\aname\a to be \bsizeof\b(\aname\a) if		\aname\a is a type in any of \b<sys/types.h>, <times.h>,		<stddef.h>, <stdlib.h>\b. Any \b.\b characters in \aname\a are		translated to space before testing and are translated to \b_\b		in the output macro name.]	[+sym \aname\a?Defines \b_ary_\b\aname\a if \aname\a is an array,		\b_fun_\b\aname\a if \aname\a is a function pointer,		\b_ptr_\b\aname\a if \aname\a is a pointer, or		\b_reg_\b\aname\a if \aname\a is a scalar. In most cases		\aname\a is part of a macro expansion.]	[+sys \aname\a?Defines \b_sys_\b\aname\a if the header		\b<sys/\b\aname\a\b.h>\b exists. The \b--config\b macro name is		\bHAVE_SYS_\b\aNAME\a\b_H\b.]	[+tst \aname\a?A user defined test on name. A source block must be		supplied. Defines \b_\b\aname\a on success.]	[+typ \aname\a?Defines \b_typ_\b\aname\a if \aname\a is a type in any		of \b<sys/types.h>, <times.h>, <stddef.h>, <stdlib.h>\b. Any		\b.\b characters in \aname\a are translated to space before		testing and are translated to \b_\b in the output macro name.]	[+val \aname\a?The output of \becho\b \aname\a is written to the		output file.]	[+var \aname\a?A user defined test on name. A source block must be		supplied. Sets the \bexp\b variable \b_\b\aname\a on success		but does not define a macro.]	[+(\aexpression\a)?Equivalent to \bexp -\b \aexpression\a.]}[+?Code block names may be prefixed by \bno\b to invert the test sense. The	block names are:]{	[+cat?The block is copied to the output file.]	[+compile?The block is compiled (\bcc -c\b).]	[+cross?The block is executed as a shell script using \bcrossexec\b(1)		if \b--cross\b is on, or on the local host otherwise, and the		output is copied to the output file. Test macros are not		exported to the script.]	[+execute?The block is compiled, linked, and executed. \b0\b exit		status means success.]	[+fail?If the test fails then the block text is evaluated by		\bsh\b(1).]	[+link?The block is compiled and linked (\bcc -o\b).]	[+macro?The block is preprocessed (\bcc -E\b) and lines containing		text bracketed by \b<<"\b ... \b">>\b (\aless-than less-than		double-quote ... double-quote greater-than greater-than\a)		are copied to the output file with the brackets omitted.]	[+no?If the test fails then the block text is copied to the		output file. Deprecated: use { \bif\b \belif\b \belse\b		\bendif\b } with unnamed \b{\b ... \b}\b blocks.]	[+note?If the test succeeds then the block is copied to the output		as a \b/*\b ... \b*/\b comment.]	[+output?The block is compiled, linked, and executed, and the output		is copied to the output file.]	[+pass?If the test succeeds then the block text is evaluated by		\bsh\b(1).]	[+preprocess?The block is preprocessed (\bcc -E\b).]	[+run?The block is executed as a shell script and the output is		copied to the output file. Succesful test macros are also		defined as shell variables with value \b1\b and are available		within the block. Likewise, failed test macros are defined		as shell variables with value \b0\b.]	[+yes?If the test succeeds then the block text is copied to the output		file. \byes{\b ... \b}end\b is equivalent to the unnamed block		\b{\b ... \b}\b.  Deprecated: use { \bif\b \belif\b \belse\b		\bendif\b } with unnamed \b{\b ... \b}\b blocks.]}[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bcrossexec\b(1), \bnmake\b(1),	\bpackage\b(1), \bproto\b(1), \bsh\b(1)]'	while	getopts -a "$command" "$USAGE" OPT	do	case $OPT in		a)	set="$set set all :" ;;		c)	set="$set set cc $OPTARG :" ;;		C)	set="$set set config :" ;;		d)	set="$set set debug $OPTARG :" ;;		D)	set="$set set define :" ;;		E)	set="$set set explicit :" ;;		i)	set="$set set input $OPTARG :" ;;		I)	set="$set set include $OPTARG :" ;;		L)	set="$set set library $OPTARG :" ;;		o)	set="$set set output $OPTARG :" ;;		e)	set="$set set package $OPTARG :" ;;		p)	set="$set set prototyped :" ;;		P)	set="$set set pragma $OPTARG :" ;;		r)	set="$set set regress :" ;;		s)	set="$set set shell $OPTARG :" ;;		S)	set="$set set static $OPTARG :" ;;		u)	set="$set set undef :" ;;		v)	set="$set set verbose :" ;;		x)	set="$set set cross $OPTARG :" ;;		X)	set="$set set exclude $OPTARG :" ;;		esac	done	shift `expr $OPTIND - 1`	;;*)	while	:	do	case $# in		0)	break ;;		esac		case $1 in		-)	break			;;		--)	shift			break			;;		--a|--al|--all)			REM=a			;;		--cc=*)	REM=c`echo $1 | sed -e 's,[^=]*=,,'`			;;		--co|--con|--conf|--confi|--config)			REM=C			;;		--cr=*|--cro=*|--cros=*|--cross=*)			REM=x`echo $1 | sed -e 's,[^=]*=,,'`			;;		--d=*|--de=*|--deb=*|--debu=*|--debug=*)			REM=d`echo $1 | sed -e 's,[^=]*=,,'`			;;		--def|--defi|--defin|--define)			REM=D			;;		--e=*|--ex=*|--exc=*|--excl=*|--exclu=*|--exclud=*|--exclude=*)			REM=X`echo $1 | sed -e 's,[^=]*=,,'`			;;		--e|--ex|--exp|--expl|--expli|--explic|--explici|--explicit)			REM=E			;;		--inp=*|--inpu=*|--input=*)			REM=i`echo $1 | sed -e 's,[^=]*=,,'`			;;		--inc=*|--incl=*|--inclu=*|--includ=*|--include=*)			REM=I`echo $1 | sed -e 's,[^=]*=,,'`			;;		--l=*|--li=*|--lib=*|--libr=*|--libra=*|--librar=*|--library=*)			REM=L`echo $1 | sed -e 's,[^=]*=,,'`			;;		--o=*|--ou=*|--out=*|--outp=*|--outpu=*|--output=*)			REM=o`echo $1 | sed -e 's,[^=]*=,,'`			;;		--pa=*|--pac=*|--pack=*|--packa=*|--packag=*|--package=*)			REM=e`echo $1 | sed -e 's,[^=]*=,,'`			;;		--pro|--prot|--proto|--protot|--prototy|--prototyp|--prototype|--prototyped)			REM=p			;;		--pra=*|--prag=*|--pragma=*)			REM=P`echo $1 | sed -e 's,[^=]*=,,'`			;;		--r|--re|--reg|--regre|--regres|--regress)			REM=r			;;		--sh=*|--she=*|--shel=*|--shell=*)			REM=s`echo $1 | sed -e 's,[^=]*=,,'`			;;		--st=*|--sta=*|--stat=*|--stati=*|--static=*)			REM=S`echo $1 | sed -e 's,[^=]*=,,'`			;;		--u|--un|--und|--unde|--undef)			REM=u			;;		--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)			REM=v			;;		--*)	echo $command: $1: unknown option >&2			exit 2			;;		-*)	REM=`echo $1 | sed -e 's,-,,'`			;;		*)	break			;;		esac		shift		while	:		do	case $REM in			'')	break ;;			esac			eval `echo $REM | sed -e "s,\(.\)\(.*\),OPT='\1' REM='\2',"`			case $OPT in			[cdiILoePsSxX])				case $REM in				'')	case $# in					0)	echo $command: -$OPT: option argument expected >&2						exit 1						;;					esac					OPTARG=$1					shift					;;				*)	OPTARG=$REM					REM=''					;;				esac			esac			case $OPT in			a)	set="$set set all :" ;;			c)	set="$set set cc $OPTARG :" ;;			C)	set="$set set config :" ;;			d)	set="$set set debug $OPTARG :" ;;			D)	set="$set set define :" ;;			E)	set="$set set explicit :" ;;			i)	set="$set set input $OPTARG :" ;;			I)	set="$set set include $OPTARG :" ;;			L)	set="$set set library $OPTARG :" ;;			o)	set="$set set output $OPTARG :" ;;			e)	set="$set set package $OPTARG :" ;;			p)	set="$set set prototyped :" ;;			P)	set="$set set pragma $OPTARG :" ;;			r)	set="$set set regress :" ;;			s)	set="$set set shell $OPTARG :" ;;			S)	set="$set set static $OPTARG :" ;;			u)	set="$set set undef :" ;;			v)	set="$set set verbose :" ;;			x)	set="$set set cross $OPTARG :" ;;			X)	set="$set set exclude $OPTARG :" ;;			*)	echo "Usage: $command [-aCDEpruv] [-c C-compiler-name [C-compiler-flags ...]] [-d level]	    [-i file] [-o file] [-e name] [-P text] [-s shell-path] [-S[flags]]	    [-x cross-exec-prefix] [-I dir] [-L dir] [-X dir] [ - ]	    [ file.iffe | statement [ : statement ... ] ]" >&2				exit 2				;;			esac		done	done	;;esaccase $1 in-)	out=-; shift ;;esaccase $# in0)	in=- ;;esacset -- $set "$@"case " $* " in*' set config '*|*' run config.'*|*' run '*' config.'*|*' run '*'/config.'*)	config=1	;;esac# standard error to /dev/null unless debugging# standard output to the current output file##	stdout	original standard output#	stderr	original standard error#	nullin	/dev/null input#	nullout	/dev/null outputstdout=5 stderr=6 nullin=7 nullout=8eval "exec $nullin</dev/null $nullout>/dev/null $stdout>&1 $stderr>&2"case " $* " in*" set debug "[3456789]*)	;;*)	eval "exec 2>&$nullout"	;;esac# prompt complicationscase `print -n aha </dev/null 2>/dev/null` inaha)	show='print -n' SHOW='' ;;*)	case `echo -n aha 2>/dev/null` in	-n*)	show=echo SHOW='\c' ;;	*)	show='echo -n' SHOW='' ;;	esac	;;esac# tmp files cleaned up on exit# status: 0:success 1:failure 2:interruptstatus=1case $debug in2)	core=	;;*)	if	(ulimit -c 0) >/dev/null 2>&1	then	ulimit -c 0		core=	else	core="core core.??*"	fi	;;esactrap "	rm -f $core $tmp*.*	exit \$status" 0 1 2if	(:>$tmp.c) 2>/dev/nullthen	rm -f $tmp.celse	echo "$command: cannot create tmp files in current dir" >&2	exit 1fistatus=2# standard header for c sourcestd='#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)#define _STD_		1#define _ARG_(x)	x#define _VOID_		void#else#define _STD_		0#define _ARG_(x)	()#define _VOID_		char#endif#if defined(__cplusplus)#define _BEGIN_EXTERNS_	extern "C" {#define _END_EXTERNS_	}#else#define _BEGIN_EXTERNS_#define _END_EXTERNS_#endif#define _NIL_(x)	((x)0)'ext='#if !defined(stdin) && !defined(feof) && !defined(L_tmpnam)_BEGIN_EXTERNS_#if _STD_extern int	printf(const char*, ...);#elseextern int	printf();#endif_END_EXTERNS_#endif'# loop on op [ arg [ ... ] ] [ : op [ arg [ ... ] ] ]argx=0cur=.can=cansep=cctest=file=hdrtest=ifelse=NONEifstack=line=0while	:do	case $in in	"")	case $argx:$* in		1:$argv);;		1:*)	argx=0			set x $argv			shift			;;		esac		;;	*)	if	read lin		then	case $shell in			ksh)	let line=line+1 ;;			*)	line=`expr $line + 1` ;;			esac			set x $lin			case $# in			1)	continue ;;			esac		else	set x		fi		shift		;;	esac	case $# in	0)	case $ifstack in		?*)	echo "$command: $file$line: missing endif" >&$stderr			exit 1			;;		esac		set set out +		;;	esac	# if nesting	while	:	do	case $1 in		"if")	ifstack="$ifelse:$ifstack"			case $ifelse in			KEEP|NONE)				ifelse=TEST				;;			TEST)	;;			*)	ifelse=DONE				;;			esac			shift			case $explicit in			1)	set '' - "$@"; shift ;;			esac			;;		"elif")	case $ifelse in			SKIP)	ifelse=TEST				;;			TEST)	;;			*)	ifelse=DONE				;;			NONE)	echo "$command: $file$line: $1: no matching if" >&$stderr				exit 1				;;			esac			shift			case $explicit in			1)	set '' - "$@"; shift ;;			esac			;;

⌨️ 快捷键说明

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