]> granicus.if.org Git - check/commitdiff
autotools: include flag for AIX only if on AIX
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sun, 15 Jun 2014 23:15:10 +0000 (23:15 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sun, 15 Jun 2014 23:15:10 +0000 (23:15 +0000)
Also, correcting comment about this being for Solaris.
It is for AIX instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1143 64e312b2-a51f-0410-8e61-82d0ca0eb02a

configure.ac

index 3a1be6cbf82782cea40cfc9a1a6e40521aafdacf..6582759c6a614f97afe6c541d8ac5c422a4f4d90 100644 (file)
@@ -161,9 +161,17 @@ AX_CFLAGS_ADD([-Winit-self])
 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)