use -std=gnu99 in CPPFLAGS if compiler supports it

SVN revision: 26996
This commit is contained in:
Mike Frysinger 2006-11-07 04:37:34 +00:00
parent bdc0b127e5
commit 0d6bdee31a
1 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,15 @@ m4_defun([AC_PROG_F77],[])
AM_PROG_LIBTOOL
dnl See if the compiler supports -std=gnu99 since some math
dnl functions need it (aka round())
AC_MSG_CHECKING(whether $CC accepts -std=gnu99)
cc_supports_gnu99="yes"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -std=gnu99"
AC_TRY_COMPILE(,,,[cc_supports_gnu99="no";CPPFLAGS="$save_CPPFLAGS"])
AC_MSG_RESULT($cc_supports_gnu99)
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then