build: Build on Cygwin with gnu99 instead of c99.

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>
This commit is contained in:
Vinson Lee 2012-10-11 18:19:49 -07:00
parent 0199ff7fe3
commit 53e36d333c

View 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