|
|
@ -2818,6 +2818,58 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ |
|
|
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|
|
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if it's Intel's compiler, which (usually) pretends to be gcc, |
|
|
|
|
|
|
|
# but has idiosyncrasies of its own. We assume icc will define |
|
|
|
|
|
|
|
# __INTEL_COMPILER regardless of CFLAGS. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
|
|
|
|
/* confdefs.h. */ |
|
|
|
|
|
|
|
_ACEOF |
|
|
|
|
|
|
|
cat confdefs.h >>conftest.$ac_ext |
|
|
|
|
|
|
|
cat >>conftest.$ac_ext <<_ACEOF |
|
|
|
|
|
|
|
/* end confdefs.h. */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int |
|
|
|
|
|
|
|
main () |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#ifndef __INTEL_COMPILER |
|
|
|
|
|
|
|
choke me |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
_ACEOF |
|
|
|
|
|
|
|
rm -f conftest.$ac_objext |
|
|
|
|
|
|
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
|
|
|
|
|
|
|
(eval $ac_compile) 2>conftest.er1 |
|
|
|
|
|
|
|
ac_status=$? |
|
|
|
|
|
|
|
grep -v '^ *+' conftest.er1 >conftest.err |
|
|
|
|
|
|
|
rm -f conftest.er1 |
|
|
|
|
|
|
|
cat conftest.err >&5 |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
|
|
|
|
|
(exit $ac_status); } && |
|
|
|
|
|
|
|
{ ac_try='test -z "$ac_c_werror_flag" |
|
|
|
|
|
|
|
|| test ! -s conftest.err' |
|
|
|
|
|
|
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
|
|
|
|
|
(eval $ac_try) 2>&5 |
|
|
|
|
|
|
|
ac_status=$? |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
|
|
|
|
|
(exit $ac_status); }; } && |
|
|
|
|
|
|
|
{ ac_try='test -s conftest.$ac_objext' |
|
|
|
|
|
|
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
|
|
|
|
|
(eval $ac_try) 2>&5 |
|
|
|
|
|
|
|
ac_status=$? |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
|
|
|
|
|
(exit $ac_status); }; }; then |
|
|
|
|
|
|
|
ICC=yes |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo "$as_me: failed program was:" >&5 |
|
|
|
|
|
|
|
sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICC=no |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
|
|
|
|
unset CFLAGS |
|
|
|
unset CFLAGS |
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
# |
|
|
@ -2846,12 +2898,15 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
# Some versions of GCC support some additional useful warning flags. |
|
|
|
# Some versions of GCC support some additional useful warning flags. |
|
|
|
# Check whether they are supported, and add them to CFLAGS if so. |
|
|
|
# Check whether they are supported, and add them to CFLAGS if so. |
|
|
|
|
|
|
|
|
|
|
|
if test "$GCC" = yes; then |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ICC pretends to be GCC but it's lying; it doesn't support these options. |
|
|
|
# ICC pretends to be GCC but it's lying; it doesn't support these options. |
|
|
|
# So we have to check if "GCC" is really ICC. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test "$GCC" = yes -a "$ICC" = no; then |
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline" |
|
|
|
|
|
|
|
# These work in some but not all gcc versions |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5 |
|
|
|
|
|
|
|
echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6 |
|
|
|
|
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
|
|
|
|
CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement" |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
/* confdefs.h. */ |
|
|
|
/* confdefs.h. */ |
|
|
|
_ACEOF |
|
|
|
_ACEOF |
|
|
@ -2862,9 +2917,7 @@ cat >>conftest.$ac_ext <<_ACEOF |
|
|
|
int |
|
|
|
int |
|
|
|
main () |
|
|
|
main () |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifndef __INTEL_COMPILER |
|
|
|
|
|
|
|
choke me |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
; |
|
|
|
; |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -2891,22 +2944,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
|
|
|
ac_status=$? |
|
|
|
ac_status=$? |
|
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
|
(exit $ac_status); }; }; then |
|
|
|
(exit $ac_status); }; }; then |
|
|
|
ICC=yes |
|
|
|
echo "$as_me:$LINENO: result: yes" >&5 |
|
|
|
|
|
|
|
echo "${ECHO_T}yes" >&6 |
|
|
|
else |
|
|
|
else |
|
|
|
echo "$as_me: failed program was:" >&5 |
|
|
|
echo "$as_me: failed program was:" >&5 |
|
|
|
sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
|
sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
|
|
|
|
|
|
|
|
|
ICC=no |
|
|
|
CFLAGS="$pgac_save_CFLAGS" |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: result: no" >&5 |
|
|
|
|
|
|
|
echo "${ECHO_T}no" >&6 |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
|
|
|
|
if test "$ICC" = no; then |
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5 |
|
|
|
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline" |
|
|
|
echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6 |
|
|
|
|
|
|
|
|
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5 |
|
|
|
|
|
|
|
echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6 |
|
|
|
|
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement" |
|
|
|
CFLAGS="$pgac_save_CFLAGS -Wendif-labels" |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
/* confdefs.h. */ |
|
|
|
/* confdefs.h. */ |
|
|
|
_ACEOF |
|
|
|
_ACEOF |
|
|
@ -2956,10 +3009,11 @@ echo "${ECHO_T}no" >&6 |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
|
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5 |
|
|
|
# Disable strict-aliasing rules; needed for gcc 3.3+ |
|
|
|
echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6 |
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 |
|
|
|
|
|
|
|
echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6 |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
CFLAGS="$pgac_save_CFLAGS -Wendif-labels" |
|
|
|
CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing" |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
cat >conftest.$ac_ext <<_ACEOF |
|
|
|
/* confdefs.h. */ |
|
|
|
/* confdefs.h. */ |
|
|
|
_ACEOF |
|
|
|
_ACEOF |
|
|
@ -3009,10 +3063,9 @@ echo "${ECHO_T}no" >&6 |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
elif test "$ICC" = yes; then |
|
|
|
# Intel compiler has a bug/misoptimization in checking for |
|
|
|
# Intel's compiler has a bug/misoptimization in checking for |
|
|
|
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the |
|
|
|
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS. |
|
|
|
# CFLAGS. |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5 |
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5 |
|
|
|
echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6 |
|
|
|
echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6 |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
@ -3066,9 +3119,7 @@ echo "${ECHO_T}no" >&6 |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
# Not clear if this is needed, but seems like a good idea |
|
|
|
|
|
|
|
|
|
|
|
# Disable strict-aliasing rules; needed for gcc 3.3+ |
|
|
|
|
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 |
|
|
|
echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 |
|
|
|
echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6 |
|
|
|
echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6 |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|
pgac_save_CFLAGS=$CFLAGS |
|
|
|