[Pdbg] [PATCH 01/18] configure: Add configure test for m4 command
Amitay Isaacs
amitay at ozlabs.org
Wed May 16 16:17:19 AEST 2018
From: Amitay Isaacs <amitay at gmail.com>
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
---
Makefile.am | 4 ++--
configure.ac | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c6668d8..c2173e2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,10 +63,10 @@ DTC_V_ = $(DTC_V_$(AM_DEFAULT_VERBOSITY))
DTC_V_0 = @echo " DTC " $@;
%.dts: %.dts.m4
- $(M4_V)m4 -I$(dir $<) $< > $@
+ $(M4_V)$(M4) -I$(dir $<) $< > $@
%.dtsi: %.dtsi.m4
- $(M4_V)m4 -I$(dir $<) $< > $@
+ $(M4_V)$(M4) -I$(dir $<) $< > $@
p9w-fsi.dtb: p9w-fsi.dts p9-fsi.dtsi
p9r-fsi.dtb: p9r-fsi.dts p9-fsi.dtsi
diff --git a/configure.ac b/configure.ac
index b73bf27..740d926 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,13 @@ AM_SILENT_RULES([yes])
AC_PROG_CC
AC_PROG_LIBTOOL
+
+AC_PATH_PROG([M4], [m4])
+if test x"$ac_cv_path_M4" = "x" ; then
+ AC_MSG_ERROR([Command 'm4' not found.])
+fi
+AC_SUBST([M4])
+
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
--
2.17.0
More information about the Pdbg
mailing list