2929RECOMMENDED_PANDOC_VERSION=2.19.2
3030
3131# ##############################################################################
32- # Setup the most fundamental tools that relies on not much else to set up,
33- # but is used by much of the early bootstrap code .
32+ # Setup the most fundamental tools, used for setting up build platform and
33+ # path handling .
3434AC_DEFUN_ONCE ( [ BASIC_SETUP_FUNDAMENTAL_TOOLS] ,
3535[
3636 # Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
@@ -42,15 +42,35 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
4242 UTIL_CHECK_NONEMPTY(FILE)
4343 AC_PATH_PROGS ( LDD , ldd )
4444
45- # First are all the fundamental required tools.
45+ # Required tools
46+ UTIL_REQUIRE_PROGS(ECHO, echo)
47+ UTIL_REQUIRE_PROGS(TR, tr)
48+ UTIL_REQUIRE_PROGS(UNAME, uname)
49+ UTIL_REQUIRE_PROGS(WC, wc)
50+
51+ # Required tools with some special treatment
52+ UTIL_REQUIRE_SPECIAL(GREP, [ AC_PROG_GREP ] )
53+ UTIL_REQUIRE_SPECIAL(EGREP, [ AC_PROG_EGREP ] )
54+ UTIL_REQUIRE_SPECIAL(SED, [ AC_PROG_SED ] )
55+
56+ # Tools only needed on some platforms
57+ UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
58+ UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
59+ ] )
60+
61+ # ##############################################################################
62+ # Setup further tools that should be resolved early but after setting up
63+ # build platform and path handling.
64+ AC_DEFUN_ONCE ( [ BASIC_SETUP_TOOLS] ,
65+ [
66+ # Required tools
4667 UTIL_REQUIRE_PROGS(BASH, bash)
4768 UTIL_REQUIRE_PROGS(CAT, cat)
4869 UTIL_REQUIRE_PROGS(CHMOD, chmod)
4970 UTIL_REQUIRE_PROGS(CP, cp)
5071 UTIL_REQUIRE_PROGS(CUT, cut)
5172 UTIL_REQUIRE_PROGS(DATE, date)
5273 UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
53- UTIL_REQUIRE_PROGS(ECHO, echo)
5474 UTIL_REQUIRE_PROGS(EXPR, expr)
5575 UTIL_REQUIRE_PROGS(FIND, find)
5676 UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
@@ -72,27 +92,19 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
7292 UTIL_REQUIRE_PROGS(TAR, gtar tar)
7393 UTIL_REQUIRE_PROGS(TEE, tee)
7494 UTIL_REQUIRE_PROGS(TOUCH, touch)
75- UTIL_REQUIRE_PROGS(TR, tr)
76- UTIL_REQUIRE_PROGS(UNAME, uname)
77- UTIL_REQUIRE_PROGS(WC, wc)
7895 UTIL_REQUIRE_PROGS(XARGS, xargs)
7996
80- # Then required tools that require some special treatment.
81- UTIL_REQUIRE_SPECIAL(GREP, [ AC_PROG_GREP ] )
82- UTIL_REQUIRE_SPECIAL(EGREP, [ AC_PROG_EGREP ] )
97+ # Required tools with some special treatment
8398 UTIL_REQUIRE_SPECIAL(FGREP, [ AC_PROG_FGREP ] )
84- UTIL_REQUIRE_SPECIAL(SED, [ AC_PROG_SED ] )
8599
86100 # Optional tools, we can do without them
87101 UTIL_LOOKUP_PROGS(DF, df)
88102 UTIL_LOOKUP_PROGS(GIT, git)
89103 UTIL_LOOKUP_PROGS(NICE, nice)
90104 UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
91105
92- # These are only needed on some platforms
93- UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
106+ # Tools only needed on some platforms
94107 UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
95- UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
96108
97109 # For compare.sh only
98110 UTIL_LOOKUP_PROGS(CMP, cmp)
0 commit comments