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).
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