📄 configure
字号:
ac_save_CFLAGS="$CFLAGS"CFLAGS=echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6echo "configure:879: checking whether ${CC-cc} accepts -g" >&5if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else echo 'void f(){}' > conftest.cif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yeselse ac_cv_prog_cc_g=nofirm -f conftest*fiecho "$ac_t""$ac_cv_prog_cc_g" 1>&6if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS"elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fielse if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fifiecho $ac_n "checking for working const""... $ac_c" 1>&6echo "configure:911: checking for working const" >&5if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 916 "configure"#include "confdefs.h"int main() {/* 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 echo configure:965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 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 EOFfiecho $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6echo "configure:986: checking whether ${MAKE-make} sets \${MAKE}" >&5set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftestmake <<\EOFall: @echo 'ac_maketemp="${MAKE}"'EOF# GNU make sometimes prints "make[1]: Entering...", which would confuse us.eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yeselse eval ac_cv_prog_make_${ac_make}_set=nofirm -f conftestmakefiif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE=else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}"fi# Find a good install program. We prefer a C program (faster),# so one script is as good as another. But avoid the broken or# incompatible versions:# SysV /etc/install, /usr/sbin/install# SunOS /usr/etc/install# IRIX /sbin/install# AIX /bin/install# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag# AFS /usr/afsws/bin/install, which mishandles nonexistent args# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"# ./install, which can be erroneously created by make from ./install.sh.echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6echo "configure:1024: checking for a BSD compatible install" >&5if test -z "$INSTALL"; thenif eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS"fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fifiecho "$ac_t""$INSTALL" 1>&6# Use test -z because SunOS4 sh mishandles braces in ${var-val}.# It thinks the first close brace ends the variable substitution.test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6echo "configure:1079: checking for ${CC-cc} option to accept ANSI C" >&5if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cf_cv_ansi_cc=nocf_save_CFLAGS="$CFLAGS"cf_save_CPPFLAGS="$CPPFLAGS"# Don't try gcc -ansi; that turns off useful extensions and# breaks some systems' header files.# AIX -qlanglvl=ansi# Ultrix and OSF/1 -std1# HP-UX -Aa -D_HPUX_SOURCE# SVR4 -Xc# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)for cf_arg in "-DCC_HAS_PROTOS" \ "" \ -qlanglvl=ansi \ -std1 \ -Ae \ "-Aa -D_HPUX_SOURCE" \ -Xcdo cf_new_cflags=cf_new_cppflags=for cf_add_cflags in $cf_argdo case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in *$cf_add_cflags) #(vi ;; *) #(vi cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esacdoneif test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags"fiif test -n "$cf_new_cppflags" ; then CPPFLAGS="$cf_new_cppflags $CPPFLAGS"fi cat > conftest.$ac_ext <<EOF#line 1135 "configure"#include "confdefs.h"#ifndef CC_HAS_PROTOS#if !defined(__STDC__) || (__STDC__ != 1)choke me#endif#endifint main() { int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);};; return 0; }EOFif { (eval echo configure:1151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; breakelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -f conftest*doneCFLAGS="$cf_save_CFLAGS"CPPFLAGS="$cf_save_CPPFLAGS"fiecho "$ac_t""$cf_cv_ansi_cc" 1>&6if test "$cf_cv_ansi_cc" != "no"; thenif test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then cf_new_cflags=cf_new_cppflags=for cf_add_cflags in $cf_cv_ansi_ccdo case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in *$cf_add_cflags) #(vi ;; *) #(vi cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esacdoneif test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags"fiif test -n "$cf_new_cppflags" ; then CPPFLAGS="$cf_new_cppflags $CPPFLAGS"fielse cat >> confdefs.h <<\EOF#define CC_HAS_PROTOS 1EOFfifiif test "$cf_cv_ansi_cc" = "no"; then { echo "configure: error: Your compiler does not appear to recognize prototypes.You have the following choices: a. adjust your compiler options b. get an up-to-date compiler c. use a wrapper such as unproto" 1>&2; exit 1; }fiGCC_VERSION=noneif test "$GCC" = yes ; then echo $ac_n "checking version of $CC""... $ac_c" 1>&6echo "configure:1224: checking version of $CC" >&5 GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown echo "$ac_t""$GCC_VERSION" 1>&6fiif ( test "$GCC" = yes || test "$GXX" = yes )thenecho $ac_n "checking if you want to check for gcc warnings""... $ac_c" 1>&6echo "configure:1234: checking if you want to check for gcc warnings" >&5# Check whether --with-warnings or --without-warnings was given.if test "${with_warnings+set}" = set; then withval="$with_warnings" cf_opt_with_warnings=$withvalelse cf_opt_with_warnings=nofiecho "$ac_t""$cf_opt_with_warnings" 1>&6if test "$cf_opt_with_warnings" != no ; then if test "$GCC" = yesthencat > conftest.i <<EOF#ifndef GCC_PRINTF#define GCC_PRINTF 0#endif#ifndef GCC_SCANF#define GCC_SCANF 0#endif#ifndef GCC_NORETURN#define GCC_NORETURN /* nothing */#endif#ifndef GCC_UNUSED#define GCC_UNUSED /* nothing */#endifEOFif test "$GCC" = yesthen echo "checking for $CC __attribute__ directives" 1>&6echo "configure:1266: checking for $CC __attribute__ directives" >&5cat > conftest.$ac_ext <<EOF#line 1268 "configure"#include "confdefs.h"#include "conftest.h"#include "conftest.i"#if GCC_PRINTF#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))#else#define GCC_PRINTFLIKE(fmt,var) /*nothing*/#endif#if GCC_SCANF#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))#else#define GCC_SCANFLIKE(fmt,var) /*nothing*/#endifextern void wow(char *,...) GCC_SCANFLIKE(1,2);extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;extern void foo(void) GCC_NORETURN;int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }EOF for cf_attribute in scanf printf unused noreturn do CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cf_directive="__attribute__(($cf_attribute))" echo "checking for $CC $cf_directive" 1>&5 case $cf_attribute in scanf|printf) cat >conftest.h <<EOF#define GCC_$CF_ATTRIBUTE 1EOF ;; *) cat >conftest.h <<EOF#define GCC_$CF_ATTRIBUTE $cf_directiveEOF ;; esac if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 cat conftest.h >>confdefs.h fi doneelse fgrep define conftest.i >>confdefs.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -