[PATCH util/macros] XORG_PROG_RAWCPP: Add TRADITIONALCPPFLAGS
Hans de Goede
hdegoede at redhat.com
Thu Mar 27 04:56:15 PDT 2014
In some cases we may want to have -traditional for proper whitespace preserving
without -undef, as we actually want the system definitions to be in place
so we can #ifdef on them. IE in xinit various .cpp files contain things like
#ifdef __APPLE__ and #ifdef __linux__
So this patch adds a TRADITIONALCPPFLAGS variable which contains just
-traditional where applicable without the other RAWCPPFLAGS for unsetting
the system definitions.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
xorg-macros.m4.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 1680f32..f160a40 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -87,6 +87,7 @@ if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
AC_MSG_RESULT([no])
else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
+ TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes])
else
@@ -95,6 +96,7 @@ else
fi
rm -f conftest.$ac_ext
AC_SUBST(RAWCPPFLAGS)
+AC_SUBST(TRADITIONALCPPFLAGS)
]) # XORG_PROG_RAWCPP
# XORG_MANPAGE_SECTIONS()
--
1.9.0
More information about the xorg-devel
mailing list