summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-21 17:57:55 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-21 17:57:55 +0100
commit5fcfed17051513b1557cff385d0e938ed9e2e92f (patch)
tree49a13d9cc3cad26c90a32a76480a21fc65f09084
parenta2418d26189ed8d22a78b78859c1e97ffb058cbf (diff)
Only add -fno-strict-aliasing for GLib version before 2.19.8
GLib since 2.19.8 has again warning clean headers so we don't add -fno-strict-aliasing to the ERROR_CFLAGS as it might hide some bugs (because we build releases with -fstrict-aliasing).
-rw-r--r--m4/gst-error.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/gst-error.m4 b/m4/gst-error.m4
index c5ce242..50a964d 100644
--- a/m4/gst-error.m4
+++ b/m4/gst-error.m4
@@ -70,8 +70,13 @@ AC_DEFUN([AG_GST_SET_ERROR_CFLAGS],
done
])
else
- AS_COMPILER_FLAG(-fno-strict-aliasing,
- ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing")
+ dnl Add -fno-strict-aliasing for GLib versions before 2.19.8
+ dnl as before G_LOCK and friends caused strict aliasing compiler
+ dnl warnings.
+ PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [
+ AS_COMPILER_FLAG(-fno-strict-aliasing,
+ ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing")
+ ])
fi
fi