build: Build on Cygwin with gnu99 instead of c99.
authorVinson Lee <vlee@freedesktop.org>
Fri, 12 Oct 2012 01:19:49 +0000 (18:19 -0700)
committerVinson Lee <vlee@freedesktop.org>
Wed, 17 Oct 2012 06:28:22 +0000 (23:28 -0700)
The GCC c99 standard on Cygwin sets __STRICT_ANSI__ and symbols such as
strdup are not available.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
configure.ac

index aa72523c0a53002b865d3f21ab78f9156b09c2c3..6f851e25c1cf11f3bd51b08431344b90595bf46c 100644 (file)
@@ -172,7 +172,14 @@ esac
 
 dnl Add flags for gcc and g++
 if test "x$GCC" = xyes; then
-    CFLAGS="$CFLAGS -Wall -std=c99"
+    case "$host_os" in
+    cygwin*)
+        CFLAGS="$CFLAGS -Wall -std=gnu99"
+        ;;
+    *)
+        CFLAGS="$CFLAGS -Wall -std=c99"
+        ;;
+    esac
 
     # Enable -Werror=implicit-function-declaration and
     # -Werror=missing-prototypes, if available, or otherwise, just