if test "$GCC" = yes -a "$ICC" = no; then
CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
# These work in some but not all gcc versions
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
-$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
-if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
+ pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
else
- pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
+ pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
- CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
+ CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
-$as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
-if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -Wendif-labels"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__Wendif_labels=yes
+ pgac_cv_prog_CC_cflags__Wendif_labels=yes
else
- pgac_cv_prog_cc_cflags__Wendif_labels=no
+ pgac_cv_prog_CC_cflags__Wendif_labels=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
- CFLAGS="$CFLAGS -Wendif-labels"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
+ CFLAGS="${CFLAGS} -Wendif-labels"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
-$as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
-if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -Wmissing-format-attribute"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
+ pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
else
- pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
+ pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
- CFLAGS="$CFLAGS -Wmissing-format-attribute"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
+ CFLAGS="${CFLAGS} -Wmissing-format-attribute"
fi
+
# This was included in -Wall/-Wformat in older GCC versions
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
-$as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
-if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -Wformat-security"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -Wformat-security"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__Wformat_security=yes
+ pgac_cv_prog_CC_cflags__Wformat_security=yes
else
- pgac_cv_prog_cc_cflags__Wformat_security=no
+ pgac_cv_prog_CC_cflags__Wformat_security=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
- CFLAGS="$CFLAGS -Wformat-security"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
+ CFLAGS="${CFLAGS} -Wformat-security"
fi
+
# Disable strict-aliasing rules; needed for gcc 3.3+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
-$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
-if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -fno-strict-aliasing"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
+ pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
else
- pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
+ pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
- CFLAGS="$CFLAGS -fno-strict-aliasing"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
+ CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
+
# Disable optimizations that assume no overflow; needed for gcc 4.3+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
-$as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
-if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fwrapv"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -fwrapv"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__fwrapv=yes
+ pgac_cv_prog_CC_cflags__fwrapv=yes
else
- pgac_cv_prog_cc_cflags__fwrapv=no
+ pgac_cv_prog_CC_cflags__fwrapv=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
- CFLAGS="$CFLAGS -fwrapv"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
+ CFLAGS="${CFLAGS} -fwrapv"
fi
+
# Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
-$as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
-if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -fexcess-precision=standard"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
+ pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
else
- pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
+ pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
- CFLAGS="$CFLAGS -fexcess-precision=standard"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
+ CFLAGS="${CFLAGS} -fexcess-precision=standard"
fi
+
# Optimization flags for specific files that benefit from vectorization
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
-$as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
-if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
+$as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
+if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -funroll-loops"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__funroll_loops=yes
+ pgac_cv_prog_CC_cflags__funroll_loops=yes
else
- pgac_cv_prog_cc_cflags__funroll_loops=no
+ pgac_cv_prog_CC_cflags__funroll_loops=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
-$as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
-if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
+$as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
+if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__ftree_vectorize=yes
+ pgac_cv_prog_CC_cflags__ftree_vectorize=yes
else
- pgac_cv_prog_cc_cflags__ftree_vectorize=no
+ pgac_cv_prog_CC_cflags__ftree_vectorize=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
fi
+
# We want to suppress clang's unhelpful unused-command-line-argument warnings
# but gcc won't complain about unrecognized -Wno-foo switches, so we have to
# test for the positive form and if that works, add the negative form
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
-$as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
-if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
+ pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
else
- pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
+ pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
fi
+
if test -n "$NOT_THE_CFLAGS"; then
CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
fi
elif test "$ICC" = yes; then
# Intel's compiler has a bug/misoptimization in checking for
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
-$as_echo_n "checking whether $CC supports -mp1... " >&6; }
-if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -mp1"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -mp1"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__mp1=yes
+ pgac_cv_prog_CC_cflags__mp1=yes
else
- pgac_cv_prog_cc_cflags__mp1=no
+ pgac_cv_prog_CC_cflags__mp1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
- CFLAGS="$CFLAGS -mp1"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
+ CFLAGS="${CFLAGS} -mp1"
fi
+
# Make sure strict aliasing is off (though this is said to be the default)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
-$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
-if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -fno-strict-aliasing"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
+ pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
else
- pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
+ pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
- CFLAGS="$CFLAGS -fno-strict-aliasing"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
+ CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
+
elif test "$PORTNAME" = "aix"; then
# AIX's xlc has to have strict aliasing turned off too
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
-$as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
-if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -qnoansialias"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -qnoansialias"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__qnoansialias=yes
+ pgac_cv_prog_CC_cflags__qnoansialias=yes
else
- pgac_cv_prog_cc_cflags__qnoansialias=no
+ pgac_cv_prog_CC_cflags__qnoansialias=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
- CFLAGS="$CFLAGS -qnoansialias"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
+ CFLAGS="${CFLAGS} -qnoansialias"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
-$as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
-if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -qlonglong"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} -qlonglong"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags__qlonglong=yes
+ pgac_cv_prog_CC_cflags__qlonglong=yes
else
- pgac_cv_prog_cc_cflags__qlonglong=no
+ pgac_cv_prog_CC_cflags__qlonglong=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
-$as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
-if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
- CFLAGS="$CFLAGS -qlonglong"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
+$as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
+if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
+ CFLAGS="${CFLAGS} -qlonglong"
fi
+
elif test "$PORTNAME" = "hpux"; then
# On some versions of HP-UX, libm functions do not set errno by default.
# Fix that by using +Olibmerrno if the compiler recognizes it.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
-$as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
-if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
+$as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
+if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
$as_echo_n "(cached) " >&6
else
pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
+pgac_save_CC=$CC
+CC=${CC}
+CFLAGS="${CFLAGS} +Olibmerrno"
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- pgac_cv_prog_cc_cflags_pOlibmerrno=yes
+ pgac_cv_prog_CC_cflags_pOlibmerrno=yes
else
- pgac_cv_prog_cc_cflags_pOlibmerrno=no
+ pgac_cv_prog_CC_cflags_pOlibmerrno=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="$pgac_save_CFLAGS"
+CC="$pgac_save_CC"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
-$as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
-if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
- CFLAGS="$CFLAGS +Olibmerrno"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
+$as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
+if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
+ CFLAGS="${CFLAGS} +Olibmerrno"
fi
+
fi
CFLAGS_VECTOR=$CFLAGS_VECTOR