1 # XCB_UTIL_M4_WITH_INCLUDE_PATH
2 # ------------------------------
4 # This macro attempts to locate an m4 macro processor which supports
5 # -I option and is only useful for modules relying on M4 in order to
6 # expand macros in source code files.
8 # M4: variable holding the path to an usable m4 program.
10 # This macro requires Autoconf 2.62 or later as it is relying upon
11 # AC_PATH_PROGS_FEATURE_CHECK macro. NOTE: As soon as the minimum
12 # required version of Autoconf for Xorg is bumped to 2.62, this macro
13 # is supposed to be shipped with xorg/util/macros.
15 AC_DEFUN([XCB_UTIL_M4_WITH_INCLUDE_PATH], [
16 AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
17 [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
18 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
19 ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
20 [AC_MSG_ERROR([could not find m4 that supports -I option])],
21 [$PATH:/usr/gnu/bin])])
23 AC_SUBST([M4], [$ac_cv_path_M4])
24 ]) # XCB_UTIL_M4_WITH_INCLUDE_PATH