Subject: Re: bug#17438: xrandr linking problem on OS X

From: Katsumi Yamaoka <[email-masked]>
Date: Mon, 12 May 2014 14:26:43 +0900

On Sun, 11 May 2014 12:15:40 -0700, Paul Eggert wrote:
> Glenn Morris wrote:
>> assuming we can get a newer pkg-config on hydra, I think it would be
>> fine to require >= 0.26 in autogen.sh, and leave configure.ac alone.

> I'd prefer that too, but in the meantime, as we are already wrapping
> PKG_CHECK_MODULES, our wrapper should be able to work around the
> pkg--config bug.  I gave that a shot in trunk bzr 117087.

> If this sort of problem keeps cropping up, though, I'd rather that we
> copy pkg.m4 into our m4 directory.  We've spent a lot of time lately
> working around pkg-config bugs....

Now the configure script runs this:

{/usr/bin/pkg-config --atleast-pkgconfig-version 0.26 ||
  {/usr/bin/pkg-config --cflags "RSVG" "librsvg-2.0 >= 2.11.0" &&
   /usr/bin/pkg-config --libs "RSVG" "librsvg-2.0 >= 2.11.0";}}

This causes ``configure: error:''.  But should it be the following?

{/usr/bin/pkg-config --atleast-pkgconfig-version 0.26 ||
  {/usr/bin/pkg-config --cflags "librsvg-2.0 >= 2.11.0" &&
   /usr/bin/pkg-config --libs "librsvg-2.0 >= 2.11.0";}}

--8<---------------cut here---------------start------------->8---
--- configure.ac~	2014-05-11 21:58:26.922779000 +0000
+++ configure.ac	2014-05-12 05:05:26.860889700 +0000
@@ -1366,7 +1366,7 @@
    emacs_check_module_ok=false
    AS_IF([test -n "$PKG_CONFIG" &&
 	  { $PKG_CONFIG --atleast-pkgconfig-version 0.26 ||
-	    { $PKG_CONFIG --cflags "$1" "$2" && $PKG_CONFIG --libs "$1" "$2"; }
+	    { $PKG_CONFIG --cflags "$2" && $PKG_CONFIG --libs "$2"; }
 	  } >/dev/null 2>&AS_MESSAGE_LOG_FD],
      [PKG_CHECK_MODULES([$1], [$2],
 	[$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 24.4.50.1 (i686-pc-cygwin, GTK+ Version 3.10.7)
 of 2014-05-12 on localhost
Repository revision: 117087 [email-masked]
Windowing system distributor `The Cygwin/X Project', version 11.0.11501000
Configured using:
 `configure --verbose --with-x-toolkit=gtk3'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GCONF GSETTINGS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB