From 7acde944f40dad08fa8c43bc2548205e343afcd1 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine Date: Sat, 8 Feb 2014 10:31:39 -0500 Subject: Add XORG_WITH_M4 macro Originally from XCB, this macro checks for the presence of m4 or gm4 which supports -I dir. The AC_PATH_PROGS_FEATURE_CHECK autoconf macro requires autoconf 2.62. Signed-off-by: Gaetan Nadon --- xorg-macros.m4.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 200a36b..1680f32 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -882,6 +882,29 @@ fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP +# XORG_WITH_M4([MIN-VERSION]) +# --------------------------- +# Minimum version: 1.19.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. +# +# Interface to module: +# M4: returns the path of the m4 program found +# returns the path set by the user in the environment +# +AC_DEFUN([XORG_WITH_M4], [ +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_WITH_M4 + # XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 -- cgit v1.2.3