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

📄 configure

📁 早期freebsd实现
💻
📖 第 1 页 / 共 5 页
字号:
#! /bin/sh## If these # comments don't work, trim them.  Don't worry about any other# shell scripts, Configure will trim # comments from them for you.## (If you are trying to port this package to a machine without sh,# I would suggest you have a look at the prototypical config.h.SH file# and edit it to reflect your system. Some packages may include samples# of config.h for certain machines, so you might look for one of those.)## Yes, you may rip this off to use in other distribution packages. This# script belongs to the public domain and cannot be copyrighted.## (Note: this Configure script was generated automatically. Rather than# working with this copy of Configure, you may wish to get metaconfig.# Write to either:##     harlan@mumps.pfcs.com (Harlan Stenn)#     ram@acri.fi (Raphael Manfredi)## and we will send you -or point you to- the latest revision of the dist# package, which includes metaconfig.)## $Id: Head.U,v 2.8 91/07/08 13:30:13 ram Exp Locker: ram $## Generated on Tue Mar  2 22:44:27 PST 1993 [metaconfig 2.9dev PL11]cat >/tmp/c1$$ <<EOFARGGGHHHH!!!!!SCO csh still thinks true is false.  Write to SCO today and tell them that nextyear Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)(Actually, Configure ought to just patch csh in place.  Hmm.  Hmmmmm.  Allwe'd have to do is go in and swap the && and || tokens, wherever they are.)[End of diatribe. We now return you to your regularly scheduled programming...]EOFcat >/tmp/c2$$ <<EOFOOPS!  You naughty creature!  You didn't run Configure with sh!I will attempt to remedy the situation by running sh for you...EOFtrue || cat /tmp/c1$$ /tmp/c2$$true || exec sh $0 $argv:q(exit $?0) || cat /tmp/c2$$(exit $?0) || exec sh $0 $argv:qrm -f /tmp/c1$$ /tmp/c2$$: Sanity checksPATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin"PATH=$PATH:'/usr/5bin:/etc:/usr/gnu/bin:/usr/new:/usr/new/bin:/usr/nbin'PATH=$PATH:'/sys5.3/bin:/sys5.3/usr/bin:/bsd4.3/bin:/bsd4.3/usr/ucb'PATH=$PATH:'/bsd4.3/usr/bin:/usr/bsd:/bsd43/bin:/usr/ccs/bin'PATH=$PATH:'/etc:/usr/lib:/usr/ucblib:/lib:/usr/ccs/lib'export PATHif test ! -t 0; then	echo "Say 'sh Configure', not 'sh <Configure'"	exit 1fi: Warn them if they use ksh(alias) >/dev/null 2>&1 && \	cat <<'EOM'(I see you are using the Korn shell.  Some ksh's blow up on Configure,especially on exotic machines.  If yours does, try the Bourne shell instead.)EOM: Configure runs within the UU subdirectorytest -d UU || mkdir UUcd UU && rm -f *cf_by=''cf_time=''d_bsd=''d_eunice=''d_xenix=''eunicefix=''Mcc=''awk=''bash=''bison=''cat=''chgrp=''chmod=''chown=''compress=''cp=''cpp=''csh=''date=''echo=''egrep=''emacs=''expr=''flex=''gcc=''grep=''inews=''ispell=''ispell_path=''ispell_options=''ksh=''less=''line=''lint=''ln=''lp=''lpr=''ls=''mail=''mailx=''make=''mkdir=''more=''mv=''nroff=''perl=''pg=''pmake=''pr=''rm=''rmail=''sed=''sendmail=''shar=''sleep=''smail=''sort=''submit=''tail=''tar=''tbl=''test=''touch=''tr=''troff=''uname=''uniq=''uuname=''vi=''zcat=''hint=''myuname=''Author=''Date=''Header=''Id=''Locker=''Log=''RCSfile=''Revision=''Source=''State=''active=''acttimes=''d_acttimes=''myactive=''bin=''installbin=''cc=''ccflags=''cppflags=''ldflags=''lkflags=''optimize=''contains=''cppminus=''cppstdin=''d_bcmp=''d_bcopy=''d_bzero=''d_ftime=''aphostcmd=''d_gethname=''d_phostcmd=''d_uname=''d_getpwent=''d_getcwd=''d_getwd=''d_havetlib=''termlib=''d_ignoreorg=''d_internet=''d_newsadm=''newsadmin=''d_nntp=''d_xdata=''servername=''d_nolnbuf=''d_normsig=''jobslib=''d_hvfork=''d_novfork=''d_novoid=''void=''d_portable=''d_rdchk=''d_rename=''d_sigblock=''d_sighold=''d_sizet=''d_strchr=''d_strftime=''d_libndir=''d_usendir=''libndir=''ndirc=''ndiro=''d_voidsig=''signal_t=''defeditor=''filexp=''h_fcntl=''h_sysfile=''d_dirnamlen=''i_dirent=''i_fcntl=''i_ptem=''i_sysdir=''d_voidtty=''i_bsdioctl=''i_sysioctl=''i_syssockio=''i_sysndir=''i_sgtty=''i_termio=''i_termios=''i_vfork=''libc=''plibpth=''xlibpath=''libs=''citydist=''cntrydist=''contdist=''locdist=''orgdist=''statedist=''mailer=''mailfile=''manext=''mansrc=''mboxchar=''c=''n=''d_berknames=''d_passnames=''d_usgnames=''nametype=''passcat=''inewsloc=''newslib=''newslibexp=''newsspool=''orgname=''package=''pager=''phost=''phostcmd=''prefshell=''installprivlib=''privlib=''rootid=''sharpbang=''shsharp=''spitshell=''startsh=''sysman=''d_usemt=''d_useov=''overviewdir=''threaddir=''trn_init=''trn_select=''nm_opt=''runnm=''usenm=''incpath=''mips=''mips_type=''usrinc=''d_whoami=''i_sysfile=''i_sysselct=''large=''CONFIG='': script used to extract .SH files with variable substitutionscat >extract <<'EOS'CONFIG=trueecho "Doing variable substitutions on .SH files..."if test -f MANIFEST; then	set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`else	echo "(Looking for .SH files under the current directory.)"	set x `find . -name "*.SH" -print`fishiftcase $# in0) set x *.SH; shift;;esacif test ! -f $1; then	shiftfifor file in $*; do	case "$file" in	*/*)		dir=`$expr X$file : 'X\(.*\)/'`		file=`$expr X$file : 'X.*/\(.*\)'`		(cd $dir && . ./$file)		;;	*)		. ./$file		;;	esacdoneEOS: process the command line optionsset X `for arg in "$@"; do echo $arg; done | awk 'BEGIN {	optstr = "deEf:hrsSV";	# getopt-style specification	len = length(optstr);	for (i = 1; i <= len; i++) {		c = substr(optstr, i, 1);		if (i < len) a = substr(optstr, i + 1, 1); else a = "";		if (a == ":") {			arg[c] = 1;			i++;		}		opt[c] = 1;	}}{	expect = 0;	str = $0;	if (substr(str, 1, 1) != "-") {		printf("'"'%s'"'\n", str);		next;	}	len = length($0);	for (i = 2; i <= len; i++) {		c = substr(str, i, 1);		if (!opt[c]) {			printf("-%s\n", substr(str, i));			next;		}		printf("-%s\n", c);		if (arg[c]) {			if (i < len)				printf("'"'%s'"'\n", substr(str, i + 1));			else				expect = 1;			next;		}	}}END {	if (expect)		print "?";}'`eval "set $*"shift		: set up default valuesfastread=''reuseval=falseconfig_sh=''alldone=''error=''silent=''extractsh='': option parsingwhile test $# -gt 0; do	case "$1" in	-d) shift; fastread=yes;;	-e) shift; alldone=cont;;	-f)		shift		cd ..		if test -r "$1"; then			config_sh="$1"		else			echo "Configure: cannot read config file $1." >&2			error=true		fi		cd UU		shift;;	-h) shift; error=true;;	-r) shift; reuseval=true;;	-s) shift; silent=true;;	-E) shift; alldone=exit;;	-S) shift; extractsh=true;;	-V) echo "Configure generated by metaconfig 2.9dev PL11." >&2		exit 0;;	--) break;;	-*) echo "Configure: unknown option $1" >&2; shift; error=true;;	*) break;;	esacdonecase "$error" intrue)	cat >&2 <<EOMUsage: Configure [-dehrESV] [-f config.sh]  -d : use defaults for all answers.  -e : go on without questioning past the production of config.sh.  -f : specify an alternate default configuration file.  -h : print this help message and exit (with an error status).  -r : reuse C symbols value if possible (skips costly nm extraction).  -s : silent mode, only echoes questions and essential information.  -E : stop at the end of questions, after having produced config.sh.  -S : perform variable substitutions on all .SH files (can mix with -f)  -V : print version number and exit (with a zero status).EOM	exit 1	;;esacexec 4>&1case "$silent" intrue) exec 1>/dev/null;;esaccase "$extractsh" intrue)	case "$config_sh" in	'') config_sh='config.sh'; config='./config.sh';;	/*) config="$config_sh";;	*) config="./$config_sh";;	esac	echo " "	echo "Fetching answers from $config_sh..."	cd ..	. ./$config	echo " "	. ./UU/extract	rm -rf UU	echo "Done."	exit 0	;;esac: set package namepackage=trn: Eunice requires " " instead of "", can you believe itecho " ": Here we go...echo "Beginning of configuration questions for $package."define='define'undef='undef'smallmach='pdp11 i8086 z8000 i80286 iAPX286'rmlist=''trap 'echo " "; rm -rf $rmlist; exit 1' 1 2 3 15: We must find out about Eunice earlyeunicefix=':'if test -f /etc/unixtovms; then	eunicefix=/etc/unixtovmsfiif test -f /etc/unixtovms.exe; then	eunicefix=/etc/unixtovms.exefi: list of known cpp symbolsattrlist="DGUX M_I186 M_I286 M_I386 M_I8086 M_XENIX UTS __DGUX__"attrlist="$attrlist _AIX __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"attrlist="$attrlist hp9000s300 hp9000s400 hp9000s500 hp9000s700"attrlist="$attrlist hp9000s800 hpux"attrlist="$attrlist i186 i386 i486 i8086 iAPX286 ibm interdata"attrlist="$attrlist m88k mc300 mc500 mc68000 mc68k mc700 mert"attrlist="$attrlist mips NeXT ns16000 ns32000 nsc32000 os pdp11 posix"attrlist="$attrlist pyr sinix sony sparc sun tower tower32 tower32_600"attrlist="$attrlist tower32_800 tss u3b2 u3b20 u3b200 u3b5 ultrix unix"attrlist="$attrlist vax venix xenix z8000": change the next line if compiling for Xenix/286 on Xenix/386xlibpath='/usr/lib/386 /lib/386': general looking path for locating librarieslibpth='/usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small': no include file wanted by defaultinclwanted='/usr/include/NET-5000'libswanted='malloc bsd socket bsdipc sun net hdb bbn str inet nls nsl c_s intl x': Now test for existence of everything in MANIFESTecho " "if test -f ../MANIFEST; then	echo "First let's make sure your kit is complete.  Checking..." >&4	awk '$1 !~ /PACK[A-Z]+/ {print $1}' ../MANIFEST | split -50	rm -f missing	for filelist in x??; do		(cd ..; ls `cat UU/$filelist` >/dev/null 2>>UU/missing)	done	if test -s missing; then		cat missing		cat >&4 <<'EOM'THIS PACKAGE SEEMS TO BE INCOMPLETE.You have the option of continuing the configuration process, despite thedistinct possibility that your kit is damaged, by typing 'y'es.  If youdo, don't blame me if something goes wrong.  I advise you to type 'n'oand contact the author (davison@borland.com).EOM		echo "[Type 'yes' to continue]" >&4		read ans		case "$ans" in		y*)			echo "Continuing..." >&4			rm -f missing			;;		*)			echo "ABORTING..." >&4			kill $$			;;		esac	else		echo "Looks good..." >&4	fielse	echo "There is no MANIFEST file.  I hope your kit is complete !"firm -f missing x??: Some greps do not return status, grrr.echo "grimblepritz" >grimbleif grep blurfldyick grimble >/dev/null 2>&1 ; then	contains=containselif grep grimblepritz grimble >/dev/null 2>&1 ; then	contains=grepelse	contains=containsfirm -f grimble: the following should work in any shellcase "$contains" incontains*)	echo " "	echo "AGH!  Grep doesn't return a status.  Attempting remedial action."	cat >contains <<'EOSS'grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmpEOSSchmod +x containsesac: first determine how to suppress newline on echo commandecho " "echo "Checking echo to see how to suppress newlines..."(echo "hi there\c" ; echo " ") >.echotmpif $contains c .echotmp >/dev/null 2>&1 ; then	echo "...using -n."	n='-n'	c=''else	cat <<'EOM'...using \cEOM	n=''	c='\c'fiecho $n "The star should be here-->$c"echo '*'rm -f .echotmp: compute the number of columns on the terminal for proper question formattingcase "$COLUMNS" in'') COLUMNS='80';;esac: set up the echo used in my readmyecho="case \"\$xxxm\" in'') echo $n \"\$rp $c\" >&4;;*) case \"\$rp\" in	'') echo $n \"[\$xxxm] $c\";;	*)		if test \`echo \"\$rp [\$xxxm]  \" | wc -c\` -ge $COLUMNS; then			echo \"\$rp\" >&4			echo $n \"[\$xxxm] $c\" >&4		else			echo $n \"\$rp [\$xxxm] $c\" >&4		fi		;;	esac;;esac": now set up to do reads with possible shell escape and default assignmentcat <<EOSC >myreadxxxm=\$dflt$myechoans='!'case "\$fastread" inyes) case "\$dflt" in	'') ;;

⌨️ 快捷键说明

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