m4: with_pkg: fix PKG_HAVE_WITH_MODULES macro

The macro was checking for $with_foo to be set but only $enabled_foo was
set correctly by the PKG_WITH_MODULES macro. In addition, this patch
adds an intermediate macro for the name to be readable.
This commit is contained in:
Alexandre Janniaux 2021-02-25 12:51:18 +01:00
parent 004dde589e
commit d0dd974576
1 changed files with 3 additions and 1 deletions

View File

@ -71,8 +71,10 @@ AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
m4_pushdef([with_arg], m4_tolower([$1]))
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
[test "$AS_TR_SH([enable_]with_arg)" = "yes"])
m4_popdef([with_arg])
])
dnl PKG_ENABLE_MODULES_VLC(VARIABLE-PREFIX,