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.
This commit is contained in:
Carsten Hartenfels
2019-06-23 14:48:50 +02:00
parent caba5b3c7c
commit a651827012

View File

@@ -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