[PATCH] Add XORG_M4_WITH_INCLUDE_PATH macro.
Arnaud Fontaine
arnau at debian.org
Fri Aug 13 09:32:06 PDT 2010
This macro attempts to locate an m4 macro processor which supports
-I option and is only useful for modules relying on M4 in order to
expand macros in source code files.
---
xorg-macros.m4.in | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 0e84d5b..0980ebb 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1111,3 +1111,24 @@ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
AC_SUBST([INSTALL_CMD])
]) # XORG_INSTALL
+
+# XORG_M4_WITH_INCLUDE_PATH
+# -------------------------
+# Minimum version: 1.11.0
+#
+# This macro attempts to locate an m4 macro processor which supports
+# -I option and is only useful for modules relying on M4 in order to
+# expand macros in source code files.
+#
+# M4: variable holding the path to an usable m4 program.
+#
+AC_DEFUN([XORG_M4_WITH_INCLUDE_PATH], [
+AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
+ [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
+ [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
+ ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
+ [AC_MSG_ERROR([could not find m4 that supports -I option])],
+ [$PATH:/usr/gnu/bin])])
+
+AC_SUBST([M4], [$ac_cv_path_M4])
+]) # XORG_M4_WITH_INCLUDE_PATH
--
1.7.1
--=-=-=--
More information about the Xcb
mailing list