>From 20caf8f5ef6cb408eff4efa48f911b18560d81d5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 28 Jul 2018 20:09:16 +0100 Subject: [PATCH] build: Default bashcompdir when PKG_CHECK_VAR. On RHEL 7-era autoconf: configure.ac:190: error: possibly undefined macro: PKG_CHECK_VAR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 Thanks: Nir Soffer --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f61ca1d..b87efb9 100644 --- a/configure.ac +++ b/configure.ac @@ -187,8 +187,12 @@ dnl Bash completion. PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], [ bash_completion=yes AC_MSG_CHECKING([for bash-completions directory]) - PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , - bashcompdir="${sysconfdir}/bash_completion.d") + m4_ifdef([PKG_CHECK_VAR],[ + PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir]) + ]) + AS_IF([test -z "$bashcompdir"], [ + bashcompdir="${sysconfdir}/bash_completion.d" + ]) AC_MSG_RESULT([$bashcompdir]) AC_SUBST([bashcompdir]) ],[ -- 1.8.3.1