ref: 1e14d7143291402fb8645ac28c69dddefe06853a
parent: e7ce79de64e982fcf25162de16609e5d380a60b7
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Aug 2 14:20:54 EDT 2017
Print a useful error when pkg-config is missing (copied from opusfile) Without this check, the PKG_CHECK_MODULES() macro remains unexpanded, which gives a syntax error when the shell reaches that point in the configure script, even for checks which are disabled (e.g., the OpenSSL check when using --disable-http). Instead, explicitly check for pkg-config and give the user useful advice on how to solve the problem if it's not found. Thanks to eXpl0it3r for reporting a problem for which installing pkg-config turned out to be the solution.
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,11 @@
AC_DEFINE([OP_ENABLE_ASSERTIONS], [1], [Enable assertions in code])
])
+m4_ifndef([PKG_PROG_PKG_CONFIG],
+ [m4_fatal([Could not locate the pkg-config autoconf macros.
+Please make sure pkg-config is installed and, if necessary, set the environment
+variable ACLOCAL="aclocal -I/path/to/pkg.m4".])])
+
PKG_CHECK_MODULES([DEPS], [opus >= 1.1])
AC_ARG_ENABLE([fixed-point],