Skip to content

Commit e92113c

Browse files
authored
Merge pull request xbmc#27534 from fuzzard/fix_bootstrap
[tools/depends] bootstrap check minimum version of m4 pre-depends
2 parents c924a2e + ab4a166 commit e92113c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/depends/bootstrap

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
# order to bootstrap.
55
DEPENDS=`dirname $0`
66
export PATH="$DEPENDS/pre-build-deps/bin:$PATH"
7-
which m4 >/dev/null 2>/dev/null || make -C $DEPENDS/pre-depends/m4-pre-depends
7+
8+
# Source - https://apple.stackexchange.com/a/123408
9+
# Posted by TJ Luoma, modified by community. See post 'Timeline' for change history
10+
# Retrieved 2025-11-29, License - CC BY-SA 4.0
11+
version() { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
12+
13+
M4_VERSION=$($(which m4) --version 2>/dev/null | awk 'NR==1{for(i=1;i<=NF;i++){ if($i ~ "[0-9].[0-9].[0-9]"){print $i} } }')
14+
if [ $(version $M4_VERSION) -lt $(version "1.4.8") ]; then
15+
make -C $DEPENDS/pre-depends/m4-pre-depends
16+
fi
817
which autoconf >/dev/null 2>/dev/null || make -C $DEPENDS/pre-depends/autoconf-pre-depends
918
which autoconf >/dev/null 2>/dev/null || \
1019
(echo "autoconf was not found and could not be built. Aborting." && exit 1)

0 commit comments

Comments
 (0)