Commit bce35b9f authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

add flag to enable C99 mode with Solaris compilers

Autoconf maintains a comprehenive list of ways to enforce C99 mode
with various compilers.

http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/c.m4



Since we regularly test with Sun/Solaris Studio, cherry pick the correct
method to use with --enable-strict.
Signed-off-by: Rob Latham's avatarRob Latham <robl@mcs.anl.gov>
parent 33d82829
......@@ -629,6 +629,10 @@ if test "$enable_strict_done" != "yes" ; then
# enabled. If C99 is enabled, we automatically disable C89.
if test "${enable_c99}" = "yes" ; then
PAC_APPEND_FLAG([-std=c99],[pac_cc_strict_flags])
# Use -D_STDC_C99= for Solaris compilers. See
# http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html
# for discussion on why not to use -xc99
PAC_APPEND_FLAG([-D_STDC_C99=],[pac_cc_strict_flags])
elif test "${enable_c89}" = "yes" ; then
PAC_APPEND_FLAG([-std=c89],[pac_cc_strict_flags])
PAC_APPEND_FLAG([-Wdeclaration-after-statement],[pac_cc_strict_flags])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment