📄 configure
字号:
break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"fifiLEX="$ac_cv_prog_LEX"if test -n "$LEX"; then echo "$ac_t""$LEX" 1>&6else echo "$ac_t""no" 1>&6fiif test -z "$LEXLIB"then case "$LEX" in flex*) ac_lib=fl ;; *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6echo "configure:1304: checking for yywrap in -l$ac_lib" >&5ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-l$ac_lib $LIBS"cat > conftest.$ac_ext <<EOF#line 1312 "configure"#include "confdefs.h"/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char yywrap();int main() {yywrap(); return 0; }EOFif { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LEXLIB="-l$ac_lib"else echo "$ac_t""no" 1>&6fifiecho $ac_n "checking lex output file root""... $ac_c" 1>&6echo "configure:1346: checking lex output file root" >&5if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else # The minimal lex program is just a single line: %%. But some broken lexes# (Solaris, I think it was) want two %% lines, so accommodate them.echo '%%%%' | $LEXif test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yyelif test -f lexyy.c; then ac_cv_prog_lex_root=lexyyelse { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }fifiecho "$ac_t""$ac_cv_prog_lex_root" 1>&6LEX_OUTPUT_ROOT=$ac_cv_prog_lex_rootecho $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6echo "configure:1367: checking whether yytext is a pointer" >&5if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else # POSIX says lex can declare yytext either as a pointer or an array; the# default is implementation-dependent. Figure out which it is, since# not all implementations provide the %pointer and %array declarations.ac_cv_prog_lex_yytext_pointer=noecho 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.cac_save_LIBS="$LIBS"LIBS="$LIBS $LEXLIB"cat > conftest.$ac_ext <<EOF#line 1379 "configure"#include "confdefs.h"`cat $LEX_OUTPUT_ROOT.c`int main() {; return 0; }EOFif { (eval echo configure:1386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -f conftest*LIBS="$ac_save_LIBS"rm -f "${LEX_OUTPUT_ROOT}.c"fiecho "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >> confdefs.h <<\EOF#define YYTEXT_POINTER 1EOFfifor ac_prog in 'bison -y' byaccdo# Extract the first word of "$ac_prog", so it can be a program name with args.set dummy $ac_prog; ac_word=$2echo $ac_n "checking for $ac_word""... $ac_c" 1>&6echo "configure:1412: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test.else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" break fi done IFS="$ac_save_ifs"fifiYACC="$ac_cv_prog_YACC"if test -n "$YACC"; then echo "$ac_t""$YACC" 1>&6else echo "$ac_t""no" 1>&6fitest -n "$YACC" && breakdonetest -n "$YACC" || YACC="yacc"YACC="$YACC -d"echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6echo "configure:1447: checking for ANSI C header files" >&5if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1452 "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:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yeselse echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&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 1477 "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 1495 "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 :else cat > conftest.$ac_ext <<EOF#line 1516 "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); }EOFif { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen :else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=nofirm -fr conftest*fififiecho "$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 whether byte ordering is bigendian""... $ac_c" 1>&6echo "configure:1552: checking whether byte ordering is bigendian" >&5if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_cv_c_bigendian=unknown# See if sys/param.h defines the BYTE_ORDER macro.cat > conftest.$ac_ext <<EOF#line 1559 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/param.h>int main() {#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros#endif; return 0; }EOFif { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not.cat > conftest.$ac_ext <<EOF#line 1574 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/param.h>int main() {#if BYTE_ORDER != BIG_ENDIAN not big endian#endif; return 0; }EOFif { (eval echo configure:1585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_bigendian=nofirm -f conftest*else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -f conftest*if test $ac_cv_c_bigendian = unknown; thenif test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }else cat > conftest.$ac_ext <<EOF#line 1605 "configure"#include "confdefs.h"main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1);}EOFif { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen ac_cv_c_bigendian=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_c_bigendian=yesfirm -fr conftest*fififiecho "$ac_t""$ac_cv_c_bigendian" 1>&6if test $ac_cv_c_bigendian = yes; then cat >> confdefs.h <<\EOF#define WORDS_BIGENDIAN 1EOFfiecho $ac_n "checking size of int""... $ac_c" 1>&6echo "configure:1642: checking size of int" >&5if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }else cat > conftest.$ac_ext <<EOF#line 1650 "configure"#include "confdefs.h"#include <stdio.h>main(){ FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); exit(0);}EOFif { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen ac_cv_sizeof_int=`cat conftestval`else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_int=0firm -fr conftest*fifiecho "$ac_t""$ac_cv_sizeof_int" 1>&6cat >> confdefs.h <<EOF#define SIZEOF_INT $ac_cv_sizeof_intEOFecho $ac_n "checking size of unsigned long""... $ac_c" 1>&6echo "configure:1681: checking size of unsigned long" >&5if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }else cat > conftest.$ac_ext <<EOF#line 1689 "configure"#include "confdefs.h"#include <stdio.h>main(){ FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(unsigned long)); exit(0);}EOFif { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen ac_cv_sizeof_unsigned_long=`cat conftestval`else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_long=0firm -fr conftest*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -