From a651827012330560684e0eef89c0af7da795e072 Mon Sep 17 00:00:00 2001 From: Carsten Hartenfels Date: Sun, 23 Jun 2019 14:48:50 +0200 Subject: [PATCH] Make things work for ancient pkg-config versions Travis CI uses a really, really old pkg-config apparently, which doesn't have the PKG_INSTALLDIR macro. In that case, we have to emulate it manually. --- configure.ac | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 004d5bc..071ac47 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,17 @@ AC_CONFIG_HEADERS([config.h]) # Dependencies for pkg-config. PKG_PROG_PKG_CONFIG -PKG_INSTALLDIR +# Ancient versions of pkg-config (such as the one used in Travis CI) +# don't have this macro, so we need to do it manually. +m4_ifdef([PKG_INSTALLDIR], [ + PKG_INSTALLDIR +], [ + AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], + [pkg-config installation directory ['${libdir}/pkgconfig']])],, + [with_pkgconfigdir=]'${libdir}/pkgconfig') + AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +]) # Checks for programs. AC_PROG_CC