Skip to content

Commit 89b5836

Browse files
committed
feat(build): Enable --with[out]-EXECUTABLE=PATH configure flags for tooling dependencies
Swaping out custom m4 work with an existing autoconf-archive macro nets us another way to enable or disable specific tools, but more importantly both the new and existing ways are become properly documented in the output of `./configure --help`. This shouldn't change the current way `./configure EXECUTABLE=PATH` can be used to configure tools, just adds another route to get there using `--with[out]-EXECUTABLE=PATH.
1 parent a726e0a commit 89b5836

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

build-aux/que_progvar.m4

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
AC_DEFUN([QUE_PROGVAR], [
2-
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
3-
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
2+
pushdef([VARIABLE],m4_toupper($1))
3+
pushdef([EXECUTABLE],m4_default($2,$1))
4+
AX_WITH_PROG(VARIABLE,EXECUTABLE)
5+
AS_IF([test "x$with_$1" != xno && test -z "$VARIABLE"], [
6+
AC_MSG_ERROR([EXECUTABLE is required])
7+
])
8+
popdef([EXECUTABLE])
9+
popdef([VARIABLE])
410
])
511

0 commit comments

Comments
 (0)