diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2024-02-23 18:09:05 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2024-02-24 18:50:43 -0300 |
commit | 93d623fdf9bee70bfae50168ac163825361f38e0 (patch) | |
tree | 4d944eee9eebdfc7c639577a685769c470a93a01 /configure.ac | |
parent | profiles: drop paths already in wusc (#6218) (diff) | |
download | firejail-93d623fdf9bee70bfae50168ac163825361f38e0.tar.gz firejail-93d623fdf9bee70bfae50168ac163825361f38e0.tar.zst firejail-93d623fdf9bee70bfae50168ac163825361f38e0.zip |
build: allow overriding certain tools
Allow overriding the following tools at configure-time and build-time:
* codespell
* cppcheck
* gawk
* scan-build
For example, instead of hardcoding `gawk`, enable overriding it at
configure-time with:
./configure GAWK=/path/to/gawk
To override it for a single `make` invocation:
make GAWK=/path/to/gawk
Also, add default values for the programs that are not found (rather
than leaving the variables empty), to make error messages clearer when
trying to run them:
$ make CPPCHECK= cppcheck-old
[...]
force --error-exitcode=1 --enable=warning,performance .
make: force: No such file or directory
$ make CPPCHECK=cppcheck cppcheck-old
[...]
cppcheck --force --error-exitcode=1 --enable=warning,performance .
make: cppcheck: No such file or directory
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 7a2c379fe..2762c2ef0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -19,6 +19,10 @@ AC_CONFIG_SRCDIR([src/firejail/main.c]) | |||
19 | AC_CONFIG_MACRO_DIR([m4]) | 19 | AC_CONFIG_MACRO_DIR([m4]) |
20 | 20 | ||
21 | AC_PROG_CC | 21 | AC_PROG_CC |
22 | AC_CHECK_PROGS([CODESPELL], [codespell]) | ||
23 | AC_CHECK_PROGS([CPPCHECK], [cppcheck]) | ||
24 | AC_CHECK_PROGS([GAWK], [gawk]) | ||
25 | AC_CHECK_PROGS([SCAN_BUILD], [scan-build]) | ||
22 | 26 | ||
23 | DEPS_CFLAGS="" | 27 | DEPS_CFLAGS="" |
24 | AC_SUBST([DEPS_CFLAGS]) | 28 | AC_SUBST([DEPS_CFLAGS]) |
@@ -139,8 +143,7 @@ AC_ARG_ENABLE([man], | |||
139 | [AS_HELP_STRING([--disable-man], [disable man pages])]) | 143 | [AS_HELP_STRING([--disable-man], [disable man pages])]) |
140 | AS_IF([test "x$enable_man" != "xno"], [ | 144 | AS_IF([test "x$enable_man" != "xno"], [ |
141 | HAVE_MAN="-DHAVE_MAN" | 145 | HAVE_MAN="-DHAVE_MAN" |
142 | AC_CHECK_PROG([HAVE_GAWK], [gawk], [yes], [no]) | 146 | AS_IF([test "x$GAWK" = "x"], [AC_MSG_ERROR([*** gawk not found ***])]) |
143 | AS_IF([test "x$HAVE_GAWK" != "xyes"], [AC_MSG_ERROR([*** gawk not found ***])]) | ||
144 | ]) | 147 | ]) |
145 | 148 | ||
146 | HAVE_PRIVATE_HOME="" | 149 | HAVE_PRIVATE_HOME="" |