summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-11-21 11:38:09 +0100
committerHarald Welte <laforge@gnumonks.org>2015-11-21 12:49:36 +0100
commitd086f2119509af2e26a0d7a587b9e176df814998 (patch)
tree5e666ca92f3cfc69e4ce986dee04485462486f15
parenta10ef29b47123a60755b59befca9b2d45f3e29fa (diff)
configure.ac: Use AS_IF() instead of shell-if for PKG_CONFIG
https://autotools.io/pkgconfig/pkg_check_modules.html > If you have the first call to PKG_CHECK_MODULES inside a bash > conditional block, the expansion of PKG_PROG_PKG_CONFIG will also be > conditional > You can solve this problem in two ways; you can either explicitly call > PKG_PROG_PKG_CONFIG outside of any conditional, forcing checking for > pkg-config as soon as possible; or you can rewrite your conditionals > to use the proper syntax
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 126e9a56..74c266e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,9 +89,9 @@ AC_ARG_ENABLE([pcsc], [AS_HELP_STRING([--disable-pcsc], [Build without PC/SC sup
[
enable_pcsc="yes"
])
-if test "x$enable_pcsc" = "xyes" ; then
+AS_IF([test "x$enable_pcsc" = "xyes"], [
PKG_CHECK_MODULES(PCSC, libpcsclite)
-fi
+])
AM_CONDITIONAL(ENABLE_PCSC, test "x$enable_pcsc" = "xyes")
AC_ARG_ENABLE(talloc,
@@ -109,12 +109,12 @@ AC_ARG_ENABLE(system-talloc,
)],
[enable_system_talloc=$enableval], [enable_system_talloc="no"])
AM_CONDITIONAL(ENABLE_SYSTEM_TALLOC, [test x"$enable_system_talloc" = x"yes"])
-if test x"$enable_system_talloc" = x"yes"; then
+AS_IF([test x"$enable_system_talloc" = x"yes"], [
PKG_CHECK_MODULES(TALLOC, talloc)
if test x"$enable_talloc" = x"yes"; then
AC_MSG_ERROR([You cannot enable both internal and system talloc])
fi
-fi
+])
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING(