From 85fe52b1ef225112e9021958f56182a6d50325b8 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sat, 15 Aug 2020 15:17:10 +0100 Subject: [PATCH] build: simplify pkg-config setup Require pkg-config on the system running autoconf and use the macros it provides. --- Makefile.am | 3 --- configure.ac | 26 +++----------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/Makefile.am b/Makefile.am index b711f730..5f3bc998 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,10 +15,7 @@ EXTRA_DIST = sox.txt soxi.txt soxformat.txt libsox.txt \ cygbuild README.win32 README.osx scripts/batch-example.bat \ README.sh FEATURES.in -if HAVE_PKGCONFIG -pkgconfigdir = @PKGCONFIGDIR@ pkgconfig_DATA = sox.pc -endif play.1 rec.1: sox.1 $(RM) $@ && $(LN_S) $< $@ diff --git a/configure.ac b/configure.ac index 81f2db1a..f3a5a0c9 100644 --- a/configure.ac +++ b/configure.ac @@ -53,22 +53,8 @@ AC_SUBST(LIBTOOL_DEPS) AC_ARG_WITH(dyn-default,AS_HELP_STRING([--with-dyn-default],[Default to loading optional formats dynamically]),opt_default=dyn,opt_default=yes) -AC_ARG_WITH(pkgconfigdir, - AS_HELP_STRING([--with-pkgconfigdir], - [location to install .pc files or "no" to disable (default=$(libdir)/pkgconfig)])) - -m4_ifndef([PKG_PROG_PKG_CONFIG], with_pkgconfigdir="no") - -using_pkgconfig=no -if test "$with_pkgconfigdir" != "no"; then - if test "$with_pkgconfigdir" = ""; then - with_pkgconfigdir="\$(libdir)/pkgconfig" - fi - using_pkgconfig="yes" - PKG_PROG_PKG_CONFIG -fi -AM_CONDITIONAL(HAVE_PKGCONFIG, test x$using_pkgconfig = xyes) -AC_SUBST(PKGCONFIGDIR, $with_pkgconfigdir) +PKG_PROG_PKG_CONFIG +PKG_INSTALLDIR using_win32_glob="no" case $target in @@ -609,19 +595,13 @@ if test "$using_lpc10" != "no"; then fi fi -if test "$using_pkgconfig" = "no"; then - pkgconfig_option="disabled" -else - pkgconfig_option="$with_pkgconfigdir" -fi - # Report configuration. echo echo "BUILD OPTIONS" echo "Debugging build............$enable_debug" echo "Distro name ...............$DISTRO" echo "Dynamic loading support....$using_libltdl" -echo "Pkg-config location........$pkgconfig_option" +echo "Pkg-config location........$pkgconfigdir" echo "Symlinks enabled...........${SYMLINKS:-no}" echo echo "OPTIONAL DEVICE DRIVERS" -- 2.11.4.GIT