@@ -2713,12 +2713,65 @@ else
27132713 fi
27142714fi
27152715
2716+ # The Intel compiler on Linux supports most gcc options, but not
2717+ # all of them, so only add these options if we are really using
2718+ # gcc
2719+
27162720if test "$GCC" = yes; then
2717- CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
27182721
2719- # Some versions of GCC support some additional useful warning flags.
2720- # Check whether they are supported, and add them to CFLAGS if so.
2721- echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2722+ cat >conftest.$ac_ext <<_ACEOF
2723+ /* confdefs.h. */
2724+ _ACEOF
2725+ cat confdefs.h >>conftest.$ac_ext
2726+ cat >>conftest.$ac_ext <<_ACEOF
2727+ /* end confdefs.h. */
2728+
2729+ int
2730+ main ()
2731+ {
2732+ #ifndef __INTEL_COMPILER
2733+ choke me
2734+ #endif
2735+ ;
2736+ return 0;
2737+ }
2738+ _ACEOF
2739+ rm -f conftest.$ac_objext
2740+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2741+ (eval $ac_compile) 2>conftest.er1
2742+ ac_status=$?
2743+ grep -v '^ *+' conftest.er1 >conftest.err
2744+ rm -f conftest.er1
2745+ cat conftest.err >&5
2746+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747+ (exit $ac_status); } &&
2748+ { ac_try='test -z "$ac_c_werror_flag"
2749+ || test ! -s conftest.err'
2750+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2751+ (eval $ac_try) 2>&5
2752+ ac_status=$?
2753+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754+ (exit $ac_status); }; } &&
2755+ { ac_try='test -s conftest.$ac_objext'
2756+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2757+ (eval $ac_try) 2>&5
2758+ ac_status=$?
2759+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2760+ (exit $ac_status); }; }; then
2761+ ICC=yes
2762+ else
2763+ echo "$as_me: failed program was:" >&5
2764+ sed 's/^/| /' conftest.$ac_ext >&5
2765+
2766+ ICC=no
2767+ fi
2768+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2769+ if test "$ICC" = no; then
2770+ CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2771+
2772+ # Some versions of GCC support some additional useful warning flags.
2773+ # Check whether they are supported, and add them to CFLAGS if so.
2774+ echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
27222775echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
27232776pgac_save_CFLAGS=$CFLAGS
27242777CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
@@ -2771,7 +2824,7 @@ echo "${ECHO_T}no" >&6
27712824fi
27722825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27732826
2774- echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2827+ echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
27752828echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
27762829pgac_save_CFLAGS=$CFLAGS
27772830CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
@@ -2824,6 +2877,7 @@ echo "${ECHO_T}no" >&6
28242877fi
28252878rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
28262879
2880+ fi
28272881
28282882 # Disable strict-aliasing rules; needed for gcc 3.3+
28292883 echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
28972951# Check if the compiler still works with the template settings
28982952echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
28992953echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2900-
29012954cat >conftest.$ac_ext <<_ACEOF
29022955/* confdefs.h. */
29032956_ACEOF
0 commit comments