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

📄 configure

📁 早期freebsd实现
💻
📖 第 1 页 / 共 5 页
字号:
: see if gethostent existsset gethostent d_gethenteval $inlibc: see if getpgrp existsset getpgrp d_getpgrpeval $inlibc: see if getpgrp2 existsset getpgrp2 d_getpgrp2eval $inlibc: see if getpriority existsset getpriority d_getprioreval $inlibc: see if htonl existsset htonl d_htonleval $inlibc: index or strcpyecho " "case "$d_index" inundef) dflt=y;;define) dflt=n;;*)  if $test -f /unix; then	dflt=n    else	dflt=y    fi    ;;esacif $contains '^index$' libc.list >/dev/null 2>&1 ; then    if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then	echo "Your system has both index() and strchr().  Shall I use"	rp="index() rather than strchr()? [$dflt]"	$echo $n "$rp $c"	. myread	case "$ans" in	    n*) d_index="$define" ;;	    *)  d_index="$undef" ;;	esac    else	d_index="$undef"	echo "index() found."    fielse    if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then	d_index="$define"	echo "strchr() found."    else	echo "No index() or strchr() found!"	d_index="$undef"    fifi: see if isascii existsset isascii d_isasciieval $inlibc: see if killpg existsset killpg d_killpgeval $inlibc: see if lstat existsset lstat d_lstateval $inlibc: see if memcmp existsset memcmp d_memcmpeval $inlibc: see if memcpy existsset memcpy d_memcpyeval $inlibccase "$d_safemcpy" in'')    : assume the worst    d_safemcpy=undef    case "$d_memcpy" in    define)	echo "Checking to see if your memcpy() can do overlapping copies..."	$cat >safemcpy.c <<'EOCP'main(){    char buf[128];    register char *b;    register int len;    register int off;    register int align;    for (align = 7; align >= 0; align--) {	for (len = 36; len; len--) {	    b = buf+align;	    memcpy(b,"abcdefghijklmnopqrstuvwxyz0123456789", len);	    for (off = 1; off <= len; off++) {		memcpy(b+off, b, len);		memcpy(b, b+off, len);		if (memcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len))		    exit(1);	    }	}    }    exit(0);}EOCP	if $cc safemcpy.c -o safemcpy $ccflags $libs >/dev/null 2>&1 ; then	    if ./safemcpy; then		echo "It can."		d_safemcpy=define	    else		echo "It can't."	    fi	else	    echo "(I can't compile the test program, so we'll assume not...)"	fi	;;    esac    ;;esac: see if memmove existsset memmove d_memmoveeval $inlibc: see if memset existsset memset d_memseteval $inlibc: see if mkdir existsset mkdir d_mkdireval $inlibc: see if msgctl existsset msgctl d_msgctleval $inlibc: see if msgget existsset msgget d_msggeteval $inlibc: see if msgsnd existsset msgsnd d_msgsndeval $inlibc: see if msgrcv existsset msgrcv d_msgrcveval $inlibc: see how much of the 'msg*(2)' library is present.h_msg=trueecho " "case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in*undef*) h_msg=false;;esac: we could also check for sys/ipc.h ...if $h_msg && $test -r $usrinclude/sys/msg.h; then    echo "You have the full msg*(2) library."    val="$define"else    echo "You don't have the full msg*(2) library."    val="$undef"fiset d_msgeval $setvar: determine which malloc to compile inecho " "case "$d_mymalloc" in'')    case "$usemymalloc" in    '')	if bsd || v7; then	    dflt='y'	else	    dflt='n'	fi	;;    n*) dflt=n;;    *)  dflt=y;;    esac    ;;define)  dflt="y"    ;;*)  dflt="n"    ;;esacrp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"$echo $n "$rp $c". myreadcase "$ans" in'') ans=$dflt;;esaccase "$ans" iny*) mallocsrc='malloc.c'; mallocobj='malloc.o'    libs=`echo $libs | sed 's/-lmalloc//'`    val="$define"    case "$mallocptrtype" in    '')	cat >usemymalloc.c <<'END'#ifdef __STDC__#include <stdlib.h>#else#include <malloc.h>#endifvoid *malloc();END	if $cc $ccflags -c usemymalloc.c >/dev/null 2>&1; then	    mallocptrtype=void	else	    mallocptrtype=char	fi	;;    esac    echo " "    echo "Your system wants malloc to return $mallocptrtype*, it would seem."    ;;*)  mallocsrc='';    mallocobj='';    mallocptrtype=void    val="$undef"    ;;esacset d_mymalloceval $setvar: see if ndbm is availableecho " "xxx=`./loc ndbm.h x $usrinclude /usr/local/include $inclwanted`if test -f $xxx; then    val="$define"    echo "ndbm.h found."else    val="$undef"    echo "ndbm.h NOT found."fiset d_ndbmeval $setvar: see if we have the old dbmecho " "xxx=`./loc dbm.h x $usrinclude /usr/local/include $inclwanted`if test -f $xxx; then    val="$define"    echo "dbm.h found."else    val="$undef"    echo "dbm.h NOT found."fiset d_odbmeval $setvar: see whether socket existsecho " "socketlib=''if $contains socket libc.list >/dev/null 2>&1; then    echo "Looks like you have Berkeley networking support."    val="$define"    : now check for advanced features    if $contains setsockopt libc.list >/dev/null 2>&1; then	val2="$undef"    else	echo "...but it uses the old 4.1c interface, rather than 4.2"	val2="$define"    fielse    : hpux, for one, puts all the socket stuff in socklib.o    if $contains socklib libc.list >/dev/null 2>&1; then	echo "Looks like you have Berkeley networking support."	val="$define"	: we will have to assume that it supports the 4.2 BSD interface	val2="$undef"    else	echo "Hmmm...you don't have Berkeley networking in libc.a..."	: look for an optional networking library	if test -f /usr/lib/libnet.a; then	    (ar t /usr/lib/libnet.a ||		nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list	    if $contains socket libc.list >/dev/null 2>&1; then		echo "but the Wollongong group seems to have hacked it in."		socketlib="-lnet -lnsl_s"		val="$define"		: now check for advanced features		if $contains setsockopt libc.list >/dev/null 2>&1; then		    val2="$undef"		else		    echo "...using the old 4.1c interface, rather than 4.2"		    val2="$define"		fi	    else		echo "or even in libnet.a, which is peculiar."		val="$undef"		val2="$undef"	    fi	else	    echo "or anywhere else I see."	    val="$undef"	    val2="$undef"	fi    fifiset d_socketeval $setvarif $contains socketpair libc.list >/dev/null 2>&1; then    val="$define"else    val="$undef"fiset d_sockpaireval $setvarval=$val2set d_oldsockeval $setvar: Locate the flags for 'open()'echo " "$cat >open3.c <<'EOCP'#include <sys/types.h>#ifdef I_FCNTL#include <fcntl.h>#endif#ifdef I_SYS_FILE#include <sys/file.h>#endifmain() {	if(O_RDONLY);#ifdef O_TRUNC	exit(0);#else	exit(1);#endif}EOCP: check sys/file.h first to get FREAD on Sunif $test -r $usrinclude/sys/file.h && \   $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then    h_sys_file=true;    echo "sys/file.h defines the O_* constants..."    if ./open3; then	echo "and you have the 3 argument form of open()."	val="$define"    else	echo "but not the 3 argument form of open().  Oh, well."	val="$undef"    fielif $test -r $usrinclude/fcntl.h && \   $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then    h_fcntl=true;    echo "fcntl.h defines the O_* constants..."    if ./open3; then	echo "and you have the 3 argument form of open()."	val="$define"    else	echo "but not the 3 argument form of open().  Oh, well."	val="$undef"    fielse    val="$undef"    echo "I can't find the O_* constant definitions!  You got problems."fiset d_open3eval $setvar: see if how pwd stuff is definedecho " "if $test -r $usrinclude/pwd.h ; then    i_pwd="$define"    echo "pwd.h found."    $cppstdin $cppflags $cppminus <$usrinclude/pwd.h | \	sed -n '/struct[ 	][ 	]*passwd/,/^};/p' >pwd.txt    if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then	d_pwquota="$define"    else	d_pwquota="$undef"    fi    if $contains 'pw_age' pwd.txt >/dev/null 2>&1; then	d_pwage="$define"    else	d_pwage="$undef"    fi    if $contains 'pw_change' pwd.txt >/dev/null 2>&1; then	d_pwchange="$define"    else	d_pwchange="$undef"    fi    if $contains 'pw_class' pwd.txt >/dev/null 2>&1; then	d_pwclass="$define"    else	d_pwclass="$undef"    fi    if $contains 'pw_expire' pwd.txt >/dev/null 2>&1; then	d_pwexpire="$define"    else	d_pwexpire="$undef"    fi    if $contains 'pw_comment' pwd.txt >/dev/null 2>&1; then	d_pwcomment="$define"    else	d_pwcomment="$undef"    fielse    i_pwd="$undef"    d_pwquota="$undef"    d_pwage="$undef"    d_pwchange="$undef"    d_pwclass="$undef"    d_pwexpire="$undef"    d_pwcomment="$undef"    echo "No pwd.h found."fi: see if rename existsset rename d_renameeval $inlibc: see if rewindir existsset rewinddir d_rewindireval $inlibc: see if rmdir existsset rmdir d_rmdireval $inlibc: see if seekdir existsset seekdir d_seekdireval $inlibc: see if select existsset select d_selecteval $inlibc: see if semctl existsset semctl d_semctleval $inlibc: see if semget existsset semget d_semgeteval $inlibc: see if semop existsset semop d_semopeval $inlibc: see how much of the 'sem*(2)' library is present.h_sem=trueecho " "case "$d_semctl$d_semget$d_semop" in*undef*) h_sem=false;;esac: we could also check for sys/ipc.h ...if $h_sem && $test -r $usrinclude/sys/sem.h; then    echo "You have the full sem*(2) library."    val="$define"else    echo "You don't have the full sem*(2) library."    val="$undef"fiset d_semeval $setvar: see if setegid existsset setegid d_setegideval $inlibc: see if seteuid existsset seteuid d_seteuideval $inlibc: see if setpgrp existsset setpgrp d_setpgrpeval $inlibc: see if setpgrp2 existsset setpgrp2 d_setpgrp2eval $inlibc: see if setpriority existsset setpriority d_setprioreval $inlibc: see if setregid existsset setregid d_setregideval $inlibcset setresgid d_setresgideval $inlibc: see if setreuid existsset setreuid d_setreuideval $inlibcset setresuid d_setresuideval $inlibc: see if setrgid existsset setrgid d_setrgideval $inlibc: see if setruid existsset setruid d_setruideval $inlibc: see if shmctl existsset shmctl d_shmctleval $inlibc: see if shmget existsset shmget d_shmgeteval $inlibc: see if shmat existsset shmat d_shmateval $inlibcd_voidshmat="$undef"case "$d_shmat" indefine)    $cppstdin $cppflags $cppminus < $usrinclude/sys/shm.h >voidshmat.txt 2>/dev/null    if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then	echo "and shmat returns (void*)"	d_voidshmat="$define"    else	echo "and shmat returns (char*)"    fi    ;;esac: see if shmdt existsset shmdt d_shmdteval $inlibc: see how much of the 'shm*(2)' library is present.h_shm=trueecho " "case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in*undef*) h_shm=false;;esac: we could also check for sys/ipc.h ...if $h_shm && $test -r $usrinclude/sys/shm.h; then    echo "You have the full shm*(2) library."    val="$define"else    echo "You don't have the full shm*(2) library."    val="$undef"fiset d_shmeval $setvar: see if stat knows about block sizesecho " "if $contains 'st_blocks;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then    if $contains 'st_blksize;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then	echo "Your stat knows about block sizes."	val="$define"    else	echo "Your stat doesn't know about block sizes."	val="$undef"    fielse    echo "Your stat doesn't know about block sizes."    val="$undef"fiset d_statblkseval $setvar: see if stdio is really stdecho " "if $contains 'char.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then    if $contains '_cnt;' $usrinclude/stdio.h >/dev/null 2>&1 ; then	echo "Your stdio is pretty std."	val="$define"    else	echo "Your stdio isn't very std."	val="$undef"    fielse    echo "Your stdio isn't very std."    val="$undef"fiset d_stdstdioeval $setvar: check for structure copyingecho " "echo "Checking to see if your C compiler can copy structs..."$cat >st

⌨️ 快捷键说明

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