Skip to content

Commit

Permalink
configure: use PKG_PROG_PKG_CONFIG
Browse files Browse the repository at this point in the history
Replace AM_CHECK_PKG_CONFIG with PKG_PROG_PKG_CONFIG.  This should
improve cross building.

Originally from Debian (http://bugs.debian.org/900074)
  • Loading branch information
Helmut Grohne authored and ThomasAdam committed Aug 8, 2021
1 parent 084602a commit 4290959
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
31 changes: 0 additions & 31 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -541,37 +541,6 @@ c = locale_charset ();
LIBS="$ac_save_LIBS"
])

#-----------------------------------------------------------------------------
# pkg-config

dnl
dnl
AC_DEFUN([AM_CHECK_PKG_CONFIG],
[dnl
dnl Get the cflags and libraries from the freetype-config script
dnl
AC_ARG_WITH(pkgconfig-prefix,
AS_HELP_STRING([--with-pkgconfig-prefix=PFX],[prefix where pkg-config is installed]),
pkgconfig_config_prefix="$withval", pkgconfig_config_prefix="")
AC_ARG_WITH(pkgconfig-exec-prefix,
AS_HELP_STRING([--with-pkgconfig-exec-prefix=PFX],[exec prefix where pkg-config is installed]),
pkgconfig_config_exec_prefix="$withval",pkgconfig_config_exec_prefix="")
if test x$pkgconfig_config_exec_prefix != x ; then
pkgconfig_config_args="$pkgconfig_config_args --exec-prefix=$pkgconfig_config_exec_prefix"
if test x${PKG_CONFIG+set} != xset ; then
PKG_CONFIG=$pkgconfig_config_exec_prefix/bin/pkg-config
fi
fi
if test x$pkgconfig_config_prefix != x ; then
pkgconfig_config_args="$pkgconfig_config_args --prefix=$pkgconfig_config_prefix"
if test x${PKG_CONFIG+set} != xset ; then
PKG_CONFIG=$pkgconfig_config_prefix/bin/pkg-config
fi
fi
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
])

#-----------------------------------------------------------------------------
# Configure paths for fontconfig
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
Expand Down
10 changes: 3 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ freebsd*)
;;
esac

# *** pkg-config
# unfortunately, we need pkg-config for the detection of certain libs:
# - version of fontconfig without fontconfig-config
# - version of fribidi without fribidi-config
AM_CHECK_PKG_CONFIG
PKG_PROG_PKG_CONFIG

PKG_CHECK_MODULES([xt],[xt],
[],
Expand Down Expand Up @@ -772,7 +768,7 @@ AC_ARG_ENABLE(rsvg,
)
if test ! x"$with_rsvg" = xno; then
with_rsvg=no
if test ! x"$PKG_CONFIG" = xno ; then
if test ! x"$PKG_CONFIG" = x ; then
AC_MSG_CHECKING(for librsvg - version >= $rsvg_min_version)
if $PKG_CONFIG --exists librsvg-2.0 ; then
if $PKG_CONFIG --exists "librsvg-2.0 >= $rsvg_min_version" ; then
Expand Down Expand Up @@ -1021,7 +1017,7 @@ if test ! x"$with_bidi" = xno; then
AS_HELP_STRING([--with-fribidi-bindir=DIR],
[directory of fribidi-config if not in PATH]),
FRIBIDI_BINDIR="$withval", FRIBIDI_BINDIR=".")
if test ! x"$PKG_CONFIG" = xno && $PKG_CONFIG --exists "fribidi >= $fribidi_min_version"; then
if test ! x"$PKG_CONFIG" = x && $PKG_CONFIG --exists "fribidi >= $fribidi_min_version"; then
FRIBIDI_CONFIG="$PKG_CONFIG fribidi"
else
AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config,, [$FRIBIDI_BINDIR:$PATH])
Expand Down

0 comments on commit 4290959

Please sign in to comment.