summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-09 13:59:14 +0000
committermidipix <writeonce@midipix.org>2020-01-24 21:14:10 +0000
commiteeb0912315aeb1e2ec756504a8b48e1c353617f2 (patch)
tree86f64f97efaa31691856e0b293ac6291d7afa415
parent905d312e90abece267632d3c8551785c012783e2 (diff)
downloadbautomake-eeb0912315aeb1e2ec756504a8b48e1c353617f2.tar.bz2
bautomake-eeb0912315aeb1e2ec756504a8b48e1c353617f2.tar.xz
project: cfgdefs.sh: added --with-host-perl, --with-host-sh support.
-rw-r--r--project/config/cfgdefs.in4
-rw-r--r--project/config/cfgdefs.sh13
2 files changed, 17 insertions, 0 deletions
diff --git a/project/config/cfgdefs.in b/project/config/cfgdefs.in
index 789a8a7..07ab405 100644
--- a/project/config/cfgdefs.in
+++ b/project/config/cfgdefs.in
@@ -4,3 +4,7 @@ AUTOMAKE_YEAR = @automake_year@
AUTOMAKE_MAJOR = @automake_major@
AUTOMAKE_MINOR = @automake_minor@
AUTOMAKE_MICRO = @automake_micro@
+
+# interpreters for aclocal & automake
+HOST_PERL = @host_perl@
+HOST_SH = @host_sh@
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index ed1d3a0..4f07150 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -15,6 +15,14 @@
for arg ; do
case "$arg" in
+ --with-host-perl=*)
+ mb_host_perl=${arg#*=}
+ ;;
+
+ --with-host-sh=*)
+ mb_host_sh=${arg#*=}
+ ;;
+
*)
error_msg ${arg#}: "unsupported config argument."
exit 2
@@ -43,12 +51,17 @@ cfgdefs_detect_automake_version()
cfgdefs_output_custom_defs()
{
+ mb_host_perl=${mb_host_perl:-/usr/bin/perl}
+ mb_host_sh=${mb_host_sh:-/usr/bin/sh}
+
sed \
-e 's/@automake_ver@/'"$automake_ver"'/g' \
-e 's/@automake_year@/'"$automake_year"'/g' \
-e 's/@automake_major@/'"$automake_major"'/g' \
-e 's/@automake_minor@/'"$automake_minor"'/g' \
-e 's/@automake_micro@/'"$automake_micro"'/g' \
+ -e 's!@host_perl@!'"$mb_host_perl"'!g' \
+ -e 's!@host_sh@!'"$mb_host_sh"'!g' \
"$mb_project_dir/project/config/cfgdefs.in" \
| sed -e 's/[ \t]*$//g' \
>> "$mb_pwd/cfgdefs.mk"