Source: fvwm
Version: 1:2.6.7-49-gd84d4d4b-1
Tags: upstream patch
User: helm...@debian.org
Usertags: rebootstrap

fvwm fails to cross build from source, because it uses the build
architecture pkg-config and thus fails finding host architecture
libraries. The attached patch removes fvwm's broken macro
AM_CHECK_PKG_CONFIG and replaces it with the upstream macro
PKG_PROG_PKG_CONFIG. Even though this patch does not make fvwm cross
buildable yet, I think it is a reasonable improvement just for removing
broken duplicate code. Please consider applying it.

Helmut
--- fvwm-2.6.7-49-gd84d4d4b.orig/acinclude.m4
+++ fvwm-2.6.7-49-gd84d4d4b/acinclude.m4
@@ -542,37 +542,6 @@
 ])
 
 #-----------------------------------------------------------------------------
-# 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
 # modified by olicha for fontconfig
--- fvwm-2.6.7-49-gd84d4d4b.orig/configure.ac
+++ fvwm-2.6.7-49-gd84d4d4b/configure.ac
@@ -281,7 +281,7 @@
 # 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
 
 
 # Building man pages & HTML documentation (from XML source).
@@ -879,7 +879,7 @@
 )
 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
@@ -1163,7 +1163,7 @@
     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])

Reply via email to