summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/companion_tools.in5
-rw-r--r--scripts/build/companion_tools/100-m4.sh27
2 files changed, 32 insertions, 0 deletions
diff --git a/config/companion_tools.in b/config/companion_tools.in
index 06c18f3..10b135f 100644
--- a/config/companion_tools.in
+++ b/config/companion_tools.in
@@ -10,6 +10,7 @@ config COMP_TOOLS
prompt "Build some companion tools"
help
Crosstool-NG relies on some external tools to be recent enough, namely:
+ m4 >= 1.4.12
autoconf >= 2.63
If your system has older versions, we can build them for you,
@@ -17,6 +18,10 @@ config COMP_TOOLS
if COMP_TOOLS
+config COMP_TOOLS_m4
+ bool
+ prompt "m4"
+
config COMP_TOOLS_autoconf
bool
prompt "autoconf"
diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh
new file mode 100644
index 0000000..bc40dbf
--- /dev/null
+++ b/scripts/build/companion_tools/100-m4.sh
@@ -0,0 +1,27 @@
+# Build script for m4
+
+CT_M4_VERSION=1.4.13
+
+do_companion_tools_m4_get() {
+ CT_GetFile "m4-${CT_M4_VERSION}" \
+ {ftp,http}://ftp.gnu.org/gnu/m4
+}
+
+do_companion_tools_m4_extract() {
+ CT_Extract "m4-${CT_M4_VERSION}"
+ CT_Patch "m4-${CT_M4_VERSION}"
+}
+
+do_companion_tools_m4_build() {
+ CT_DoStep EXTRA "Installing m4"
+ mkdir -p "${CT_BUILD_DIR}/build-m4"
+ CT_Pushd "${CT_BUILD_DIR}/build-m4"
+
+ CT_DoExecLog ALL \
+ "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \
+ --prefix="${CT_TOOLS_OVERIDE_DIR}"
+ CT_DoExecLog ALL make
+ CT_DoExecLog ALL make install
+ CT_Popd
+ CT_EndStep
+}