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

📄 configure

📁 早期freebsd实现
💻
📖 第 1 页 / 共 5 页
字号:
	eval $xscan;\	$contains '^fprintf$' libc.list >/dev/null 2>&1; then		eval $xrunelse	nm -p $* 2>/dev/null >libc.tmp	com="$sed -n -e 's/^.* [ADTS]  *_[_.]*//p' -e 's/^.* [ADTS] //p'";\	eval "<libc.tmp $com >libc.list"	if $contains '^fprintf$' libc.list >/dev/null 2>&1; then		nm_opt='-p'		echo "done" >&4	else		echo " "		echo "nm didn't seem to work right. Trying ar instead..." >&4		com=''		if ar t $libc > libc.tmp; then			for thisname in $libnames; do				ar t $thisname >>libc.tmp			done			$sed -e 's/\.o$//' < libc.tmp > libc.list			echo "Ok." >&4		else			echo "ar didn't seem to work right." >&4			echo "Maybe this is a Cray...trying bld instead..." >&4			if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then				for thisname in $libnames; do					bld t $libnames | \					$sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list					ar t $thisname >>libc.tmp				done				echo "Ok." >&4			else				echo "That didn't work either.  Giving up." >&4				exit 1			fi		fi	fifinm_extract="$com"if $test -f /lib/syscalls.exp; then	echo " "	echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4	$sed -n 's/^\([^ 	]*\)[ 	]*syscall$/\1/p' /lib/syscalls.exp >>libc.listfi;;esac$rm -f libnames libpath: determine optimize, if desired, or use for debug flag alsocase "$optimize" in' ') dflt="none";;'') dflt="-O";;*) dflt="$optimize";;esac$cat <<EOHSome C compilers have problems with their optimizers, by default, $packagecompiles with the -O flag to use the optimizer.  Alternately, you might wantto use the symbolic debugger, which uses the -g flag (on traditional Unixsystems).  Either flag can be specified here. To use neither flag, specifythe word "none".EOHrp="What optimizer/debugger flag should be used?". ./myreadoptimize="$ans"case "$optimize" in'none') optimize=" ";;esaccase "$ccflags" in'')	case "$cc" in	*gcc*) dflt='-fpcc-struct-return';;	*) dflt='';;	esac	case "$optimize" in	*-g*) dflt="$dflt -DDEBUG";;	esac	;;*) dflt="$ccflags" ;;esaccase "$mips_type" in*BSD*) ;;'') ;;*) inclwanted="$inclwanted $usrinc/bsd";;esacfor thisincl in $inclwanted; do	if $test -d $thisincl; then		if $test x$thisincl != x$usrinc; then			case "$dflt" in			*$thisincl*);;			*) dflt="$dflt -I$thisincl";;			esac		fi	fidoneinctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then	xxx=true;elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then	xxx=true;else	xxx=false;fi;if $xxx; then	case "$dflt" in	*$2*);;	*) dflt="$dflt -D$2";;	esac;fi'set signal.h LANGUAGE_C; eval $inctestset signal.h NO_PROTOTYPE; eval $inctestset signal.h _NO_PROTO; eval $inctestcase "$dflt" in'') dflt=none;;esac$cat <<EOHYour C compiler may want other flags.  For this question you should include-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,but you should NOT include libraries or ld flags like -lwhatever.  To use noflags, specify the word "none".EOHset X $dfltshiftdflt=${1+"$@"}rp="Any additional cc flags?". ./myreadcase "$ans" innone) ans='';esacccflags="$ans": the following weeds options from ccflags that are of no interest to cppcppflags="$ccflags"case "$cc" in*gcc*) cppflags="$cppflags -D__GNUC__";;esaccase "$mips_type" in'');;*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;esaccase "$cppflags" in'');;*)  set X $cppflags	cppflags=''	for flag	do		case $flag in		-D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;		esac	done	;;esac: flags used in final linking phasecase "$ldflags" in'') if venix; then		dflt='-i -z'	else		dflt='none'	fi	;;*) dflt="$ldflags";;esacecho " "rp="Any additional ld flags (NOT including libraries)?". ./myreadcase "$ans" innone) ans='';esacldflags="$ans"rmlist="$rmlist pdp11": is a C symbol defined?csym='tlook=$1;case "$3" in-v) tf=libc.tmp; tc=""; tdc="";;-a) tf=libc.tmp; tc="[0]"; tdc=[];;*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;esac;tx=yes;case "$reuseval-$4" intrue-) ;;true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;esac;case "$tx" inyes)	case "$runnm" in	true)		if $contains $tlook $tf >/dev/null 2>&1;		then tval=true;		else tval=false;		fi;;	*)		echo "main() { extern int $1$tdc; printf(\"%d\", $1$tc); }" > t.c;		if $cc $ccflags -o t t.c $libs >/dev/null 2>&1;		then tval=true;		else tval=false;		fi;		$rm -f t t.c;;	esac;;*)	case "$tval" in	$define) tval=true;;	*) tval=false;;	esac;;esac;eval "$2=$tval"': set up the script used to warn in case of inconsistencycat <<'EOSC' >whoadflt=yecho " "echo "*** WHOA THERE!!! ***" >&4echo "    The $hint value for \$$var on this machine was \"$was\"!" >&4rp="    Keep the $hint value?". ./myreadcase "$ans" iny) td=$was; tu=$was;;esacEOSC: define an is-in-libc? functioninlibc='echo " "; td=$define; tu=$undef;sym=$1; var=$2; eval "was=\$$2";tx=yes;case "$reuseval$was" intrue) ;;true*) tx=no;;esac;case "$tx" inyes)	set $sym tres -f;	eval $csym;	case "$tres" in	true)		echo "$sym() found." >&4;		case "$was" in $undef) . whoa; esac; eval "$var=\$td";;	*)		echo "$sym() NOT found." >&4;		case "$was" in $define) . whoa; esac; eval "$var=\$tu";;	esac;;*)	case "$was" in	$define) echo "$sym() found." >&4;;	*) echo "$sym() NOT found." >&4;;	esac;;esac': see if bcmp existscase "$d_bcmp" in$define) d_bcmp="$undef";;$undef) d_bcmp="$define";;esacset bcmp d_bcmpeval $inlibccase "$d_bcmp" in$define) d_bcmp="$undef";;*) d_bcmp="$define";;esac: see if bcopy existscase "$d_bcopy" in$define) d_bcopy="$undef";;$undef) d_bcopy="$define";;esacset bcopy d_bcopyeval $inlibccase "$d_bcopy" in$define) d_bcopy="$undef";;*) d_bcopy="$define";;esac: find out how to find out full namecase "$d_berknames" in"$define")	dflt=y;;"$undef")	dflt=n;;*)	if bsd; then		dflt=y	elif xenix; then		dflt=y	else		dflt=n	fi	;;esac$cat <<'EOM'Does your /etc/passwd file keep full names in Berkeley/V7 format (name firstthing after ':' in GCOS field)?  In that case, a typical entry in the passwordfile looks like this:    guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh                              ^^^^^^^^^^^^^^^^^EOMrp="Berkeley/V7 format for full name in /etc/password?". ./myreadcase "$ans" iny*) d_passnames="$define"	d_berknames="$define"	d_usgnames="$undef"	nametype=bsd	;;*)	case "$d_usgnames" in	"$define") dflt=y;;	"$undef") dflt=n;;	*)		if usg; then			dflt=y		else			dflt=n		fi		;;	esac$cat <<'EOM'Does your passwd file keep full names in USG format (name sandwiched between a'-' and a '(')?  In that case, a typical entry in the password file looks likethis:    guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh                                  ^^^^^^^^^^^^^^^^^EOM	rp="USG format for full name in /etc/passwd?"	. ./myread	case "$ans" in	n*) echo "Full name will be taken from ~/.fullname"		d_passnames="$undef"		d_berknames="$undef"		d_usgnames="$undef"		nametype=other		;;	*)		d_passnames="$define"		d_berknames="$undef"		d_usgnames="$define"		nametype=usg		;;	esac;;esac: see if we have to deal with yellow pagesif $test -d /usr/etc/yp || $test -d /etc/yp; then	echo " "	if $test -f /usr/etc/nibindd; then		echo "I'm fairly confident you're on a NeXT."		echo " "		rp='Do you get the passwd file via NetInfo?'		dflt=y		case "$passcat" in		nidump*) ;;		'') ;;		*) dflt=n;;		esac		. ./myread		case "$ans" in		y*) passcat='nidump passwd .';;		*) echo "You told me, so don't blame me."; echo " "; passcat='';;		esac	fi	case "$passcat" in	nidump*) ;;	*)		case "$passcat" in		*ypcat*) dflt=y;;		*) if $contains '^\+:' /etc/passwd >/dev/null 2>&1; then				dflt=y			else				dflt=n			fi;;		esac		rp='Are you getting the passwd file via yellow pages?'		. ./myread		case "$ans" in		y*) passcat='ypcat passwd';;		*) passcat='cat /etc/passwd';;		esac		;;	esacelse	passcat='cat /etc/passwd'fi: see if bzero existscase "$d_bzero" in$define) d_bzero="$undef";;$undef) d_bzero="$define";;esacset bzero d_bzeroeval $inlibccase "$d_bzero" in$define) d_bzero="$undef";;*) d_bzero="$define";;esac: function used to set $1 to $valsetvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;case "$val$was" in$define$undef) . whoa; eval "$var=\$td";;$undef$define) . whoa; eval "$var=\$tu";;*) eval "$var=$val";;esac': see if ftime existsset ftime d_ftime eval $inlibc: see if getwd or getcwd existsset getwd d_getwd; eval $inlibccase "$d_getwd" in$define) val=$undef; set d_getcwd; eval $setvar ;;*) set getcwd d_getcwd; eval $inlibc ;;esac: now get the host name that appears in news articles$echo " "$echo "Figuring out local host name..."cont=true$echo 'Maybe "hostname" will work...'if ans=`sh -c hostname 2>&1` ; then	thishost=$ans	phostcmd=hostname	cont=''fiif $test "$cont"; then	if xenix; then		$echo 'Oh, dear.  Maybe "/etc/systemid" is the key...'		if ans=`cat /etc/systemid 2>&1` ; then			thishost=$ans			phostcmd='cat /etc/systemid'			$echo "Whadyaknow.  Xenix always was a bit strange..."			cont=''		fi	elif $test -r /etc/systemid; then		$echo "(What is a non-Xenix system doing with /etc/systemid?)"	fifiif $test "$cont"; then	$echo 'No, maybe "uuname -l" will work...'	if ans=`sh -c 'uuname -l' 2>&1` ; then		thishost=$ans		phostcmd='uuname -l'	else		$echo 'Strange.  Maybe "uname -n" will work...'		if ans=`sh -c 'uname -n' 2>&1` ; then			thishost=$ans			phostcmd='uname -n'		else			$echo 'Oh well, maybe I can mine it out of whoami.h...'			if ans=`sh -c $contains' sysname $usrinclude/whoami.h' 2>&1` ; then				thishost=`$echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`				phostcmd="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinclude/whoami.h"			else				phostcmd=''				case "$phost" in				'') $echo "Does this machine have an identity crisis or something?" ;;				*)  $echo "Well, you said $phost before..."				    thishost=$phost				    ;;				esac			fi		fi	fifi: you do not want to know about thisset $thishostthishost=$1: translate upper to lower if necessarycase "$thishost" in*[A-Z]*) thishost=`$echo $thishost | tr '[A-Z]' '[a-z]'`	 ;;esaccase "$phost" in'')	dflt="$thishost"	case "$dflt" in	*.*) ;;	*) dflt="$dflt.UUCP";;	esac	;;*) dflt="$phost";;esaccase "$thishost" in*.*)	thishost=`$expr "X$thishost" : "X\([^.]*\)\."`;;esac$cat <<EOMTrn wants to know what hostname your news software (usually inews) putsinto the "From" line of news articles posted from this machine.  If youget this wrong the ownership checks done for Cancel, Supersede andauto-post-selection (the -p option) will fail to recognize articles asbelonging to the poster.(NOTE: trn does NOT create "From" lines when posting news or sending mailas this is the job of your news/mail software, not trn.)If you enter a filename here (by starting the name with '/' or '~') trnwill read the hostname from a file, otherwise specify as much of thehostname as you want to be matched in the aforementioned comparisons.If your response contains the current machine's name ($thishost) trnwill determine that portion at run-time.EOMrp="What hostname appears in the From line of this machine's postings?". ./myreadans=`./filexp "$ans"`case $ans in/*)    $echo "Trn will read the host name from $ans."    if $test ! -f $ans ; then	$echo "(You'll need to create $ans before trn will work.)"    fi    phost="$ans"    phostcmd=''    ;;$thishost.*)    phost="$ans"    $echo "Using a dynamic host name."    ;;*)    phost="$ans"    phostcmd=''    $echo "Using a static host name."    ;;esac: see how we will look up host nameecho " "if $test "X$phostcmd" = "X"; then	: host name is static or a file	d_gethname=''	d_uname=''elif set gethostname val -f d_gethname; eval $csym; $val; then	echo 'gethostname() found.' >&4	d_gethname="$define"	ans=gethostnameelif set uname val -f d_uname; eval $csym; $val; then	if xenix; then		$cat <<'EOM'uname() was found, but you're running xenix, and older versions of xenixhave a broken uname(). If you don't really know whether your xenix is oldenough to have a broken system call, use the default answer.EOM		dflt=y		case "$d_uname" in		"$define") dflt=n;;		esac		rp='Is your uname() broken?'		. ./myread		case "$ans" in		n*) d_uname="$define"; ans=uname;;		esac	else		echo 'uname() found.' >&4		d_uname="$define"		ans=uname	fificase "$d_gethname" in'') d_gethname="$undef";;esaccase "$d_uname" in'') d_uname="$undef";;esaccase "$phostcmd" in'') aphostcmd='';;*) case "$aphostcmd" in	/*) ;;	*) set X $phostcmd		shift		file=$1		shift		file=`loc $file $file $pth`		aphostcmd=`echo $file $*`		;;	esac	;;esaccase "$d_uname$d_gethname" in*define*) ;;*)	case "$phostcmd" in	'') ;;	*)		$cat <<EOTThere is no gethostname() or uname() on this system.  You have twopossibilities at this point:1)  You can have the hostname in postings ($phost) compiled into trn, which    lets trn start up faster, but makes your binaries non-portable, or2)  you can have trn use a		popen("$aphostcmd","r")    which will start slower but be more portable.If you want option 2 but with a different command, you can edit config.sh atthe end of this shell script.

⌨️ 快捷键说明

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