AX_CFLAGS_ADD([-Wmissing-include-dirs])
AX_CFLAGS_ADD([-Wswitch-default])
AX_CFLAGS_ADD([-Wunknown-pragmas])
-# The following flag is to enable C99 support on Solaris, which is
+# The following flag is to enable C99 support on AIX, which is
# necessary for variable macros in check.h
-AX_CFLAGS_ADD([-qlanglvl=stdc99])
+case "${host_os}" in
+ *aix*)
+ if ! test "$GCC" = "yes"; then
+ AX_CFLAGS_ADD([-qlanglvl=stdc99])
+ fi
+ ;;
+ *)
+ ;;
+esac
AC_CHECK_PROGS(GCOV, gcov, false)
AC_CHECK_PROGS(LCOV, lcov, false)