diff --git a/configure.in b/configure.in index 7e92c3a..78ee479 100644 --- a/configure.in +++ b/configure.in @@ -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