Description: fix pkg-config checking to be cross-compilation-safe fix pkg-config check to use the PKG_PROG_PKG_CONFIG macro from pkg-config itself instead of searching for pkg-config directly; this fixes the search to be compatible with cross-building. Author: Steve Langasek --- xfce4-dev-tools-4.8.0.orig/m4macros/xdt-depends.m4 +++ xfce4-dev-tools-4.8.0/m4macros/xdt-depends.m4 @@ -44,38 +44,18 @@ AC_DEFUN([XDT_PROG_PKG_CONFIG], xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0 # lookup pkg-config utility + PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION]) if test x"$PKG_CONFIG" = x""; then - AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) - - if test x"$PKG_CONFIG" = x"no"; then - echo "*** The pkg-config utility could not be found on your system." - echo "*** Make sure it is in your path, or set the PKG_CONFIG" - echo "*** environment variable to the full path to pkg-config." - echo "*** You can download pkg-config from the freedesktop.org" - echo "*** software repository at" - echo "***" - echo "*** http://www.freedesktop.org/software/pkgconfig" - echo "***" - exit 1 - fi - - # check pkg-config version - AC_MSG_CHECKING([for pkg-config >= $xdt_cv_PKG_CONFIG_MIN_VERSION]) - if $PKG_CONFIG --atleast-pkgconfig-version $xdt_cv_PKG_CONFIG_MIN_VERSION; then - xdt_cv_PKG_CONFIG_VERSION=`$PKG_CONFIG --version` - AC_MSG_RESULT([$xdt_cv_PKG_CONFIG_VERSION]) - else - xdt_cv_PKG_CONFIG_VERSION=`$PKG_CONFIG --version` - AC_MSG_RESULT([$xdt_cv_PKG_CONFIG_VERSION]) - echo "*** Your version of pkg-config is too old. You need atleast" - echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config " - echo "*** from the freedesktop.org software repository at" - echo "***" - echo "*** http://www.freedesktop.org/software/pkgconfig" - echo "***" - exit 1 - fi + echo "*** The pkg-config utility could not be found on your system." + echo "*** Make sure it is in your path, or set the PKG_CONFIG" + echo "*** environment variable to the full path to pkg-config." + echo "*** You can download pkg-config from the freedesktop.org" + echo "*** software repository at" + echo "***" + echo "*** http://www.freedesktop.org/software/pkgconfig" + echo "***" + exit 1 fi ])