📄 configure
字号:
esac ;; esac case "$redo" in '') case "$type" in File) if test -f "$value"; then type='' elif test -r "$value" || (test -h "$value") >/dev/null 2>&1 then echo "($value is not a plain file, but that's ok.)" type='' fi ;; Directory) if test -d "$value"; then type='' fi ;; Locate) if test -d "$value"; then echo "(Looking for $fn in directory $value.)" value="$value/$fn" fi if test -f "$value"; then type='' fi ;; esac case "$skip" in true) type=''; esac case "$type" in '') ;; *) if test "$fastread" = yes; then dflt=y else dflt=n fi rp="$what $value doesn't exist. Use that name anyway?" . ./myread dflt='' case "$ans" in y*) type='';; *) echo " ";; esac ;; esac ;; esac ;; esacdoneans="$value"rp="$orig_rp"dflt="$orig_dflt"EOSC: figure out news librarycase "$d_nntp" indefine) newslib=/tmp newslibexp=/tmp ;;*) case "$newslib" in '') dflt=/usr/lib/news;; *) dflt=$newslib;; esac $echo " " fn=d~ rp='Where is the news library directory?' . ./getfile newslib="$ans" newslibexp=`./filexp $newslib` if $test -f $newslibexp/inews; then $echo "Aha! Inews is really in $newslibexp!" >&4 case "$inews" in inews) : null;; *) $echo "(Make sure $inews isn't an old version.)";; esac inews=$newslibexp/inews fiesaccase "$inewsloc" in'') dflt="$inews";;*) dflt="$inewsloc";;esac$echo " "fn=l:inewsrp='Which inews should be used for posting articles?'. ./getfileinewsloc="$ans": locate active file and active.times file$echo " "case "$d_nntp" indefine) active=none myactive=.falseactive : check for active.times case "$acttimes" in ''|none) dflt="n";; *) dflt="y";; esac cat <<'EOM'If your server maintains an accurate "active.times" file, trn can make useof the NEWGROUPS call in NNTP to find new groups instead of using the oldmethod of adding all groups not listed in your .newsrc. If you aren't sure,guess and see if you get notified of the new groups as they are created.EOM rp="Does your server support a reliable NEWGROUPS call?" . ./myread case "$ans" in y*) acttimes="nntp" d_acttimes="$define";; *) acttimes='none' d_acttimes="$undef";; esac ;;*) case "$active" in '') dflt=$newslib/active ;; *) dflt="$active";; esac fn=l~:active rp='Where is the active file?' . ./getfile active="$ans" myactive=`./filexp $active` : check for active.times case "$acttimes" in ''|nntp) dflt="${active}.times";; *) dflt="$acttimes";; esac $cat <<'EOM'If your news system maintains an "active.times" file, trn can use it for afast new-group check. If it's not around, answer "none" and the activefile will be scanned for new groups when it changes size.EOM fn=ln~:active.times rp='The full pathname of active.times or "none"?' . ./getfile acttimes="$ans" case "$acttimes" in '') acttimes=none d_acttimes="$undef";; *) d_acttimes="$define";; esacesac: determine where manual pages are on this systemecho " "case "$sysman" in'') sysman=`loc . /usr/man/man1 /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/share/man/man1 /usr/catman/u_man/man1 /usr/man/l_man/man1 /usr/local/man/u_man/man1 /usr/local/man/l_man/man1 /usr/man/man.L` ;;esacif $test -d "$sysman"; then echo "System manual is in $sysman." >&4else echo "Could not find manual pages in source form." >&4fi: make some quick guesses about what we are up againstecho " "$echo $n "Hmm... $c"$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/nullif test `echo abc | tr a-z A-Z` = Abc ; then xxx=`./loc addbib blurfl $pth` if $test -f $xxx; then echo "Looks kind of like a USG system with BSD features, but we'll see..." echo exit 0 >bsd echo exit 0 >usg echo exit 1 >v7 else if $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like an extended USG system, but we'll see..." else echo "Looks kind of like a USG system, but we'll see..." fi echo exit 1 >bsd echo exit 0 >usg echo exit 1 >v7 fi d_bsd="$undef"elif $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." d_bsd="$define" echo exit 0 >bsd echo exit 1 >usg echo exit 1 >v7else echo "Looks kind of like a Version 7 system, but we'll see..." d_bsd="$undef" echo exit 1 >bsd echo exit 1 >usg echo exit 0 >v7ficase "$eunicefix" in*unixtovms*) $cat <<'EOI'There is, however, a strange, musty smell in the air that reminds me ofsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.EOI echo "exit 0" >eunice d_eunice="$define": it so happens the Eunice I know will not run shell scripts in Unix format ;;*) echo " " echo "Congratulations. You aren't running Eunice." d_eunice="$undef" echo "exit 1" >eunice ;;esacif test -f /xenix; then echo "Actually, this looks more like a XENIX system..." echo "exit 0" >xenix d_xenix="$define"else echo " " echo "It's not Xenix..." echo "exit 1" >xenix d_xenix="$undef"fichmod +x xenix$eunicefix xenixif test -f /venix; then echo "Actually, this looks more like a VENIX system..." echo "exit 0" >venixelse echo " " if xenix; then : null else echo "Nor is it Venix..." fi echo "exit 1" >venixfichmod +x bsd usg v7 eunice venix$eunicefix bsd usg v7 eunice venix$rm -f foo: see if we need a special compilerecho " "if usg; then case "$cc" in '') case "$Mcc" in /*) dflt='Mcc';; *) case "$large" in -M*) dflt='cc';; *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then dflt='cc' else dflt='cc -M' fi else dflt='cc' fi;; esac;; esac;; *) dflt="$cc";; esac $cat <<'EOM'On some systems the default C compiler will not resolve multiple globalreferences that happen to have the same name. On some such systems the "Mcc"command may be used to force these to be resolved. On other systems a "cc -M"command is required. (Note that the -M flag on other systems indicates amemory model to use!) If you have the Gnu C compiler, you might wish to usethat instead.EOM rp="What command will force resolution on this system?" . ./myread cc="$ans"else case "$cc" in '') dflt=cc;; *) dflt="$cc";; esac rp="Use which C compiler?" . ./myread cc="$ans"ficase "$cc" ingcc*) cpp=`loc gcc-cpp $cpp $pth`;;esac: What should the include directory be ?echo " "$echo $n "Hmm... $c"case "$usrinc" in'') dflt='/usr/include';;*) dflt=$usrinc;;esacincpath=''mips_type=''if $test -f /bin/mips && /bin/mips; then echo "Looks like a MIPS system..." $cat >usr.c <<'EOCP'#ifdef SYSTYPE_BSD43/bsd43#endifEOCP if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then dflt='/bsd43/usr/include' incpath='/bsd43' mips_type='BSD 4.3' else mips_type='System V' fi $rm -f usr.c usr.out echo "and you're compiling with the $mips_type compiler and libraries."else echo "Doesn't look like a MIPS system." echo "exit 1" >mips chmod +x mips $eunicefix mipsfiecho " "fn=d/rp='Where are the include files you want to use?'. ./getfileusrinc="$ans": Set private lib pathcase "$plibpth" in'') if mips; then plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" else plibpth="/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib" fi;;esaclibpth="$plibpth $libpth": Looking for optional librariesecho " "echo "Checking for optional libraries..." >&4case "$libs" in' '|'') dflt='';;*) dflt="$libs";;esaccase "$libswanted" in'') libswanted='c_s';;esacfor thislib in $libswanted; do case "$thislib" in dbm) thatlib=ndbm;; *_s) thatlib=NONE;; *) thatlib="${thislib}_s";; *) thatlib=NONE;; esac yyy="$incpath/usr/ccs/lib $incpath/usr/lib $incpath/usr/ucblib" yyy="$yyy $incpath/usr/local/lib $incpath/lib" xxx=`loc lib$thislib.a X $yyy` if $test -f $xxx; then echo "Found -l$thislib." case "$dflt" in *-l$thislib*|*-l$thatlib*);; *) dflt="$dflt -l$thislib";; esac else xxx=`loc lib$thislib.a X $libpth` if $test -f $xxx; then echo "Found $xxx." case "$dflt" in *$xxx*);; *) dflt="$dflt $xxx";; esac else xxx=`loc Slib$thislib.a X $xlibpth` if $test -f $xxx; then echo "Found -l$thislib." case "$dflt" in *-l$thislib*|*-l$thatlib*);; *) dflt="$dflt -l$thislib";; esac else echo "No -l$thislib." fi fi fidoneset X $dfltshiftdflt="$*"case "$libs" in'') dflt="$dflt";;*) dflt="$libs";;esaccase "$dflt" in' '|'') dflt='none';;esac$cat <<EOM Some versions of Unix support shared libraries, which make executables smallerbut make load time slightly longer.On some systems, mostly newer Unix System V's, the shared library is includedby putting the option "-lc_s" as the last thing on the cc command line whenlinking. Other systems use shared libraries by default. There may be otherlibraries needed to compile $package on your machine as well. If your systemneeds the "-lc_s" option, include it here. Include any other special librarieshere as well. Say "none" for none.EOMecho " "rp="Any additional libraries?". ./myreadcase "$ans" innone) ans=' ';esaclibs="$ans"usenm=truerunnm=$usenmcase "$reuseval" intrue) runnm=false;;esac: nm options which may be necessarycase "$nm_opt" in'') if $test -f /mach_boot; then nm_opt='' elif $test -d /usr/ccs/lib; then nm_opt='-p' elif $test -f /dgux; then nm_opt='-p' else nm_opt='' fi;;esaccase "$runnm" intrue): get list of predefined functions in a handy placeecho " "case "$libc" in'') libc=unknown case "$libs" in *-lc_s*) libc=`loc libc_s.a $libc $libpth` esac ;;esaclibpth="$plibpth $libpth"libnames='';case "$libs" in'') ;;*) for thislib in $libs; do case "$thislib" in -l*) thislib=`expr X$thislib : 'X-l\(.*\)'` try=`loc lib$thislib.a blurfl/dyick $libpth` if test ! -f $try; then try=`loc lib$thislib blurfl/dyick $libpth` if test ! -f $try; then try=`loc $thislib blurfl/dyick $libpth` if test ! -f $try; then try=`loc Slib$thislib.a blurfl/dyick $xlibpth` if test ! -f $try; then try='' fi fi fi fi libnames="$libnames $try" ;; *) libnames="$libnames $thislib" ;; esac done ;;esaccase "$libc" inunknown) set /usr/ccs/lib/libc.so $test -r $1 || set /usr/lib/libc.so $test -r $1 || set /usr/lib/libc.so.[0-9]* $test -r $1 || set /lib/libsys_s.a eval set \$$# ;;*) set blurfl ;;esacapollo='false'if $test -r "$1"; then echo "Your (shared) C library seems to be in $1." libc="$1"elif $test -r /lib/libc && $test -r /lib/clib; then echo "Your C library seems to be in both /lib/clib and /lib/libc." libc='/lib/clib /lib/libc' if $test -r /lib/syslib; then echo "(Your math library is in /lib/syslib.)" libc="$libc /lib/syslib" fi apollo='true'elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then echo "Your C library seems to be in $libc, as you said before."elif $test -r $incpath/usr/lib/libc.a; then libc=$incpath/usr/lib/libc.a; echo "Your C library seems to be in $libc. That's fine."elif $test -r /lib/libc.a; then libc=/lib/libc.a; echo "Your C library seems to be in $libc. You're normal."else if ans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$ans"; then : elif ans=`./loc libc blurfl/dyick $libpth`; $test -r "$ans"; then libnames="$libnames "`./loc clib blurfl/dyick $libpth` elif ans=`./loc clib blurfl/dyick $libpth`; $test -r "$ans"; then : elif ans=`./loc Slibc.a blurfl/dyick $xlibpth`; $test -r "$ans"; then : elif ans=`./loc Mlibc.a blurfl/dyick $xlibpth`; $test -r "$ans"; then : else ans=`./loc Llibc.a blurfl/dyick $xlibpth` fi if $test -r "$ans"; then echo "Your C library seems to be in $ans, of all places." libc=$ans else libc='blurfl' fifiif $test "$apollo" = 'false'; then if $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then dflt="$libc" cat <<EOMIf the guess above is wrong (which it might be if you're using a strangecompiler, or your machine supports multiple models), you can override it here.EOM else dflt='' echo $libpth | tr ' ' '\012' | sort | uniq > libpath cat >&4 <<EOMI can't seem to find your C library. I've looked in the following places:EOM $sed 's/^/ /' libpath cat <<EOMNone of these seems to contain your C library. I need to get its name...EOM fi fn=f rp='Where is your C library?' . ./getfile libc="$ans"fiecho " "echo $libc $libnames | tr ' ' '\012' | sort | uniq > libnamesset X `cat libnames`shiftxxx=filescase $# in 1) xxx=file; esacecho "Extracting names from the following $xxx for later perusal:" >&4echo " "$sed 's/^/ /' libnames >&4echo " "$echo $n "This may take a while...$c" >&4nm $nm_opt $* 2>/dev/null >libc.tmp$echo $n ".$c"$grep fprintf libc.tmp > libc.ptfxscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'if com="$sed -n -e 's/^.* [ADTS] *_[_.]*//p' -e 's/^.* [ADTS] //p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \ -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrunelif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -