1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-15 13:35:53 +01:00

Configure: Place the argument checks at the beginning of execution

The autotool provides a simple mechanism which allows us to move ("divert")
the checks we do on the user arguments to the beginning of the script, yet
without needing to scatter the code.

This is good because we can raise errors very fast, user do not have to
wait until many other checks have passed before knowing he has to correct
his argument list; yet on our side we can keep related things together.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-09-04 19:05:23 +02:00
committed by Carlos R. Mafra
parent ca4ae5068b
commit 1d1c904126
3 changed files with 69 additions and 3 deletions

View File

@@ -30,7 +30,9 @@ m4_pattern_allow([^WM_OSDEP(_[A-Z]*)?$])
# execute ACTION-IF-GIVEN which is supposed to call AC_MSG_ERROR to
# stop any further processing and tell the user its arguments are bad
AC_DEFUN([WM_DENY_ARG_WITH],
[AS_IF([test "${[with_]m4_translit([$1], [-+.], [___])+set}" = set], [$2])])
[m4_divert_push([INIT_PREPARE])dnl
AS_IF([test "${[with_]m4_translit([$1], [-+.], [___])+set}" = set], [$2])
m4_divert_pop([INIT_PREPARE])])
# WM_CHECK_XFT_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])