📄 configure
字号:
echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF#define _S_LIBGXX 1EOFelse echo "$ac_t""no" 1>&6fiac_ext=c# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.ac_cpp='$CPP $CPPFLAGS'ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1107 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/wait.h>#ifndef WEXITSTATUS#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)#endif#ifndef WIFEXITED#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)#endifint main() { return 0; }int t() {int s;wait (&s);s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;; return 0; }EOFif { (eval echo configure:1124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yeselse rm -rf conftest* ac_cv_header_sys_wait_h=nofirm -f conftest*fiecho "$ac_t""$ac_cv_header_sys_wait_h" 1>&6if test $ac_cv_header_sys_wait_h = yes; then cat >> confdefs.h <<\EOF#define HAVE_SYS_WAIT_H 1EOFfi# If we cannot run a trivial program, we must be cross compiling.echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test "$cross_compiling" = yes; then ac_cv_c_cross=yeselsecat > conftest.$ac_ext <<EOF#line 1153 "configure"#include "confdefs.h"main(){return(0);}EOF{ (eval echo configure:1157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_cross=noelse ac_cv_c_cross=yesfifirm -fr conftest*fiecho "$ac_t""$ac_cv_c_cross" 1>&6cross_compiling=$ac_cv_c_crossecho $ac_n "checking for ANSI C header files""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1175 "configure"#include "confdefs.h"#include <stdlib.h>#include <stdarg.h>#include <string.h>#include <float.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out`if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yeselse echo "$ac_err" >&5 rm -rf conftest* ac_cv_header_stdc=nofirm -f conftest*if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI.cat > conftest.$ac_ext <<EOF#line 1198 "configure"#include "confdefs.h"#include <string.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then :else rm -rf conftest* ac_cv_header_stdc=nofirm -f conftest*fiif test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.cat > conftest.$ac_ext <<EOF#line 1216 "configure"#include "confdefs.h"#include <stdlib.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then :else rm -rf conftest* ac_cv_header_stdc=nofirm -f conftest*fiif test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.if test "$cross_compiling" = yes; then :elsecat > conftest.$ac_ext <<EOF#line 1237 "configure"#include "confdefs.h"#include <ctype.h>#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))int main () { int i; for (i = 0; i < 256; i++)if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);exit (0); }EOF{ (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }if test -s conftest && (./conftest; exit) 2>/dev/null; then :else ac_cv_header_stdc=nofifirm -fr conftest*fifiecho "$ac_t""$ac_cv_header_stdc" 1>&6if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF#define STDC_HEADERS 1EOFfiecho $ac_n "checking for pid_t""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1272 "configure"#include "confdefs.h"#include <sys/types.h>#if STDC_HEADERS#include <stdlib.h>#endifEOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "pid_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yeselse rm -rf conftest* ac_cv_type_pid_t=nofirm -f conftest*fiecho "$ac_t""$ac_cv_type_pid_t" 1>&6if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF#define pid_t intEOFfiecho $ac_n "checking return type of signal handlers""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1310 "configure"#include "confdefs.h"#include <sys/types.h>#include <signal.h>#ifdef signal#undef signal#endif#ifdef __cplusplusextern "C" void (*signal (int, void (*)(int)))(int);#elsevoid (*signal ()) ();#endifint main() { return 0; }int t() {int i;; return 0; }EOFif { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=voidelse rm -rf conftest* ac_cv_type_signal=intfirm -f conftest*fiecho "$ac_t""$ac_cv_type_signal" 1>&6cat >> confdefs.h <<EOF#define RETSIGTYPE $ac_cv_type_signalEOFac_safe=`echo "vfork.h" | tr './\055' '___'`echo $ac_n "checking for vfork.h""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1351 "configure"#include "confdefs.h"#include <vfork.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF#define HAVE_VFORK_H 1EOFelse echo "$ac_t""no" 1>&6fiecho $ac_n "checking for working vfork""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1388 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. */char vfork();int main() { return 0; }int t() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_vfork) || defined (__stub___vfork)choke me#elsevfork();#endif; return 0; }EOFif { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_vfork=yes"else rm -rf conftest* eval "ac_cv_func_vfork=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 :else echo "$ac_t""no" 1>&6fielsecat > conftest.$ac_ext <<EOF#line 1429 "configure"#include "confdefs.h"/* Thanks to Paul Eggert for this test. */#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#ifdef HAVE_VFORK_H#include <vfork.h>#endif/* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include <vfork.h>, but some compilers (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */static#ifdef __cplusplussparc_address_test (int arg)#elsesparc_address_test (arg) int arg;#endif{ static pid_t child; if (!child) { child = vfork (); if (child < 0) perror ("vfork"); if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } }}main() { pid_t parent = getpid (); pid_t child; sparc_address_test (); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); }}EOF{ (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_vfork=yeselse ac_cv_func_vfork=nofifirm -fr conftest*fiecho "$ac_t""$ac_cv_func_vfork" 1>&6if test $ac_cv_func_vfork = no; then cat >> confdefs.h <<\EOF#define vfork forkEOFfifor ac_func in selectdoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1547 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. */char $ac_func();int main() { return 0; }int t() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_$ac_func) || defined (__stub___$ac_func)choke me#else$ac_func();#endif; return 0; }EOFif { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes"else rm -rf conftest* eval "ac_cv_func_$ac_func=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <<EOF#define $ac_tr_func 1EOF else echo "$ac_t""no" 1>&6fidoneecho $ac_n "checking for sys_siglist""... $ac_c" 1>&6if eval "test \"`echo '$''{'socketxx_cv_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1598 "configure"#include "confdefs.h"# include <unistd.h># include <sys/signal.h>int main() { return 0; }int t() {#ifndef _sys_siglist extern char* _sys_siglist[];#endif puts(*_sys_siglist);; return 0; }EOFif { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* socketxx_cv_siglist=_sys_siglistelse rm -rf conftest*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -