📄 configure
字号:
eval $ac_linkif 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 1EOFfiif test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF#define HAVE_ASSERT_H 1EOF cat >> confdefs.h <<\EOF#define HAVE_LIMITS_H 1EOF cat >> confdefs.h <<\EOF#define HAVE_STDLIB_H 1EOF cat >> confdefs.h <<\EOF#define HAVE_STRING_H 1EOFelse # If non-ANSI, check for other brokenness.for ac_hdr in assert.h limits.h stdlib.h string.hdoac_safe=`echo "$ac_hdr" | tr './\055' '___'`echo $ac_n "checking for $ac_hdr""... $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 948 "configure"#include "confdefs.h"#include <$ac_hdr>EOFeval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"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 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidone# Do we want to include memory.h?if test $ac_cv_header_string_h = no; thenfor ac_hdr in strings.hdoac_safe=`echo "$ac_hdr" | tr './\055' '___'`echo $ac_n "checking for $ac_hdr""... $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 987 "configure"#include "confdefs.h"#include <$ac_hdr>EOFeval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"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 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidoneac_found=noelseecho $ac_n "checking whether string.h declares mem functions""... $ac_c" 1>&6cat > conftest.$ac_ext <<EOF#line 1019 "configure"#include "confdefs.h"#include <string.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memset" >/dev/null 2>&1; then rm -rf conftest* ac_found=yeselse rm -rf conftest* ac_found=nofirm -f conftest*echo "$ac_t""$ac_found" 1>&6fi# ac_found is now "yes" if string.h exists and declares the mem*# functions. If not, see if memory.h exists and include that# as well.if test $ac_found = no; thenac_safe=`echo "memory" | tr './\055' '___'`echo $ac_n "checking for memory""... $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 1045 "configure"#include "confdefs.h"#include <memory>EOFeval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"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 h. cat >> confdefs.h <<\EOF#define NEED_MEMORY_H 1EOFelse echo "$ac_t""no" 1>&6fifiecho $ac_n "checking whether <stdio.h> provides prototypes""... $ac_c" 1>&6if eval "test \"`echo '$''{'bn_cv_header_stdio_protos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1078 "configure"#include "confdefs.h"#include <stdio.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "printf" >/dev/null 2>&1; then rm -rf conftest* bn_cv_header_stdio_protos=yeselse rm -rf conftest* bn_cv_header_stdio_protos=nofirm -f conftest*fiecho "$ac_t""$bn_cv_header_stdio_protos" 1>&6if test $bn_cv_header_stdio_protos = no; then cat >> confdefs.h <<\EOF#define NO_STDIO_PROTOS 1EOFfifi# ^^ End of non-ANSI header brokenness tests (first part)echo $ac_n "checking whether <string.h> declares mem* wrong.""... $ac_c" 1>&6if eval "test \"`echo '$''{'bn_cv_header_mem_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1111 "configure"#include "confdefs.h"#include <string.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memcpy.*char" >/dev/null 2>&1; then rm -rf conftest* bn_cv_header_mem_broken=yeselse rm -rf conftest* bn_cv_header_mem_broken=nofirm -f conftest*fiecho "$ac_t""$bn_cv_header_mem_broken" 1>&6if test $bn_cv_header_mem_broken = yes; then cat >> confdefs.h <<\EOF#define MEM_PROTOS_BROKEN 1EOFfi# SunOS 4.1.x acc's <assert.h> is brokenecho $ac_n "checking whether <assert.h> is broken and needs <stdio.h>""... $ac_c" 1>&6if eval "test \"`echo '$''{'bn_cv_header_assert_needs_stdio'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1142 "configure"#include "confdefs.h"#include <assert.h>assert(foo)EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "stderr" >/dev/null 2>&1; then rm -rf conftest* bn_cv_header_assert_needs_stdio=yeselse rm -rf conftest* bn_cv_header_assert_needs_stdio=nofirm -f conftest*fiecho "$ac_t""$bn_cv_header_assert_needs_stdio" 1>&6if test $bn_cv_header_assert_needs_stdio = yes; then cat >> confdefs.h <<\EOF#define ASSERT_NEEDS_STDIO 1EOFfiecho $ac_n "checking whether <assert.h> is broken and needs <stdlib.h>""... $ac_c" 1>&6if eval "test \"`echo '$''{'bn_cv_header_assert_needs_stdlib'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1174 "configure"#include "confdefs.h"#include <assert.h>assert(foo)EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "exit" >/dev/null 2>&1; then rm -rf conftest* bn_cv_header_assert_needs_stdlib=yeselse rm -rf conftest* bn_cv_header_assert_needs_stdlib=nofirm -f conftest*fiecho "$ac_t""$bn_cv_header_assert_needs_stdlib" 1>&6if test $bn_cv_header_assert_needs_stdlib = yes; then cat >> confdefs.h <<\EOF#define ASSERT_NEEDS_STDLIB 1EOFfi# Check that we have <sys/time.h> explicitly.for ac_hdr in sys/time.hdoac_safe=`echo "$ac_hdr" | tr './\055' '___'`echo $ac_n "checking for $ac_hdr""... $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 1210 "configure"#include "confdefs.h"#include <$ac_hdr>EOFeval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"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 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidoneecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1243 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/time.h>#include <time.h>int main() { return 0; }int t() {struct tm *tp;; return 0; }EOFif eval $ac_compile; then rm -rf conftest* ac_cv_header_time=yeselse rm -rf conftest* ac_cv_header_time=nofirm -f conftest*fiecho "$ac_t""$ac_cv_header_time" 1>&6if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF#define TIME_WITH_SYS_TIME 1EOFfi# Verify that the compiler supports const, and that it works.# A number of compilers sort of support const, but they have bugs# that will prevent valid programs from compiling.echo $ac_n "checking for working const""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1281 "configure"#include "confdefs.h"int main() { return 0; }int t() {/* Ultrix mips cc rejects this. */typedef int charset[2]; const charset x;/* SunOS 4.1.1 cc rejects this. */char const *const *ccp;char **p;/* NEC SVR4.0.2 mips cc rejects this. */struct point {int x, y;};static struct point const zero = {0,0};/* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */const char *g = "string";ccp = &g + (g ? g-g : 0);/* HPUX 7.0 cc rejects these. */++ccp;p = (char**) ccp;ccp = (char const *const *) p;{ /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0;}{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo;}{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p;}{ /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5;}{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10;}; return 0; }EOFif eval $ac_compile; then rm -rf conftest* ac_cv_c_const=yeselse rm -rf conftest* ac_cv_c_const=nofirm -f conftest*fiecho "$ac_t""$ac_cv_c_const" 1>&6if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF#define const EOFfi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -