📄 configure
字号:
# Directory for building the library in (in src if not specified)if test -z "$libbuild_dir" ; then libbuild_dir=`pwd`/src if test ! -d $libbuild_dir ; then mkdir $libbuild_dir ; fififor ac_prog in cc xlC xlc pgcc icc gcc do# 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:880: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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_CC="$ac_prog" break fi done IFS="$ac_save_ifs"fifiCC="$ac_cv_prog_CC"if test -n "$CC"; then echo "$ac_t""$CC" 1>&6else echo "$ac_t""no" 1>&6fitest -n "$CC" && breakdonetest -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6echo "configure:911: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5ac_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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crosscat > conftest.$ac_ext << EOF#line 922 "configure"#include "confdefs.h"main(){return(0);}EOFif { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fielse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=nofirm -fr conftest*ac_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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crossecho "$ac_t""$ac_cv_prog_cc_works" 1>&6if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }fiecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6cross_compiling=$ac_cv_prog_cc_crossecho $ac_n "checking whether the C compiler sets its return status correctly""... $ac_c" 1>&6echo "configure:958: checking whether the C compiler sets its return status correctly" >&5ac_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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crosscat > conftest.$ac_ext <<EOF#line 968 "configure"#include "confdefs.h"int main() {int a = bzzzt;; return 0; }EOFif { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* notbroken=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* notbroken=yesfirm -f conftest*echo "$ac_t""$notbroken" 1>&6if test "$notbroken" = "no" ; then { echo "configure: error: installation or configuration problem: C compiler does notcorrectly set error code when a fatal error occurs" 1>&2; exit 1; }fiecho $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6echo "configure:992: checking whether we are using GNU C" >&5if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.c <<EOF#ifdef __GNUC__ yes;#endifEOFif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yeselse ac_cv_prog_gcc=nofifiecho "$ac_t""$ac_cv_prog_gcc" 1>&6if test "$ac_cv_prog_gcc" = yes; then GCC=yeselse GCC=fiecho $ac_n "checking for working const""... $ac_c" 1>&6echo "configure:1016: 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 1021 "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:1070: \"$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 EOFfi# Check on support for long double and long long types.echo $ac_n "checking whether long double is supported""... $ac_c" 1>&6echo "configure:1092: checking whether long double is supported" >&5if eval "test \"`echo '$''{'pac_cv_have_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1098 "configure"#include "confdefs.h"int main() {long double a;; return 0; }EOFif { (eval echo configure:1105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pac_cv_have_long_double=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* pac_cv_have_long_double=nofirm -f conftest*fiecho "$ac_t""$pac_cv_have_long_double" 1>&6if test "$pac_cv_have_long_double" = "yes" ; then cat >> confdefs.h <<\EOF#define HAVE_LONG_DOUBLE EOFfiecho $ac_n "checking whether long long is supported""... $ac_c" 1>&6echo "configure:1125: checking whether long long is supported" >&5if eval "test \"`echo '$''{'pac_cv_have_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1131 "configure"#include "confdefs.h"int main() {long double a;; return 0; }EOFif { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pac_cv_have_long_long=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* pac_cv_have_long_long=nofirm -f conftest*fiecho "$ac_t""$pac_cv_have_long_long" 1>&6if test "$pac_cv_have_long_long" = "yes" ; then cat >> confdefs.h <<\EOF#define HAVE_LONG_LONG_INT EOFfisave_FFLAGS="$FFLAGS"if test -z "$F77"; then for ac_prog in g77 f77 f2cdo# 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:1164: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else if test -n "$F77"; then ac_cv_prog_F77="$F77" # 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_F77="$ac_prog" break fi done IFS="$ac_save_ifs"fifiF77="$ac_cv_prog_F77"if test -n "$F77"; then echo "$ac_t""$F77" 1>&6else echo "$ac_t""no" 1>&6fitest -n "$F77" && breakdone test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; }fiecho $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6echo "configure:1197: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5ac_ext=fac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5'ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_f77_crosscat > conftest.$ac_ext << EOF program conftest endEOFif { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_f77_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_f77_cross=no else ac_cv_prog_f77_cross=yes fielse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_f77_works=nofirm -fr conftest*ac_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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'cross_compiling=$ac_cv_prog_cc_crossecho "$ac_t""$ac_cv_prog_f77_works" 1>&6if test $ac_cv_prog_f77_works = no; then { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; }fiecho $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6echo "configure:1236: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6cross_compiling=$ac_cv_prog_f77_crossecho $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6echo "configure:1241: checking whether we are using GNU Fortran 77" >&5if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.fpp <<EOF#ifdef __GNUC__ yes#endifEOFif { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yeselse ac_cv_prog_g77=nofifiecho "$ac_t""$ac_cv_prog_g77" 1>&6if test $ac_cv_prog_g77 = yes; then G77=yes ac_test_FFLAGS="${FFLAGS+set}" ac_save_FFLAGS="$FFLAGS" FFLAGS= echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6echo "configure:1265: checking whether $F77 accepts -g" >&5if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.f << EOF program conftest endEOFif test -z "`$F77 -g -c conftest.f 2>&1`"; then ac_cv_prog_f77_g=yeselse ac_cv_prog_f77_g=nofirm -f conftest*fiecho "$ac_t""$ac_cv_prog_f77_g" 1>&6 if test "$ac_test_FFLAGS" = set; then FFLAGS="$ac_save_FFLAGS" elif test $ac_cv_prog_f77_g = yes; then FFLAGS="-g -O2" else FFLAGS="-O2" fielse G77= test "${FFLAGS+set}" = set || FFLAGS="-g"fiFFLAGS="$save_FFLAGS"# Bug in autoconf. Restore cross settingsif test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_f77_cross" = "no" ; then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -