summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-25 22:51:59 +0000
committerrubidium <rubidium@openttd.org>2009-01-25 22:51:59 +0000
commit692aec71b19c16884e86725a0e3ad752f7a3823c (patch)
tree8b41877895ee11ade1af2ca4bf09d5060aad47b0 /config.lib
parent7bc60a19d0a1ce914b7791abde84ebe22a89e7eb (diff)
downloadopenttd-692aec71b19c16884e86725a0e3ad752f7a3823c.tar.xz
(svn r15275) -Fix: SDL adds _GNU_SOURCE to the defined macros even when the compiler doesn't provide the functions promised when that define exists...
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index 565fd46b8..943f5a6f1 100644
--- a/config.lib
+++ b/config.lib
@@ -1205,7 +1205,8 @@ make_cflags_and_ldflags() {
if [ -n "$sdl_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL"
- CFLAGS="$CFLAGS `$sdl_config --cflags`"
+ # SDL must not add _GNU_SOURCE as it breaks many platforms
+ CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's~-D_GNU_SOURCE[^ ]*~~'`"
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$sdl_config --static-libs`"