tags 756476 + patch thanks On Wed, Jul 30, 2014 at 10:37:12AM +0200, Emilio Pozuelo Monfort wrote: > On 30/07/14 10:10, YunQiang Su wrote: > > I think this problem is caused by libgtk-3-dev. > > File /usr/share/aclocal/gtk-3.0.m4, it doesn't work, > > /usr/share/aclocal/gtk-3.0.m4 uses pkg-config to determine the > necessary CFLAGS, e.g. -I/usr/include/gtk-3.0. > > Can you explain how gtk-3.0.m4 is not working?
The problem is due to changed behavior of pkg-config, most probably occurred in version 0.28. "pkg-config --atleast-version N libA libB" now checks if both libraries are >= N (which will always return false for gtk+-3.0 if the last macro argument is used because the gthread-2.0 version is 2.40.x). Then the test in the AC_TRY_RUN macro is doomed to fail because the no_gtk variable is set to "yes" and as a consequence GTK_CFLAGS/GTK_LIBS/gtk_config_*_version are undefined. Trivial patch attached. I can't reproduce this with pkg-config/0.26-1 on wheezy which makes me think that this is new behavior as of 0.28. I am not sure it was intended though, seems unnatural/incorrect to me.
--- gtk+3.0.orig/m4macros/gtk-3.0.m4 +++ gtk+3.0/m4macros/gtk-3.0.m4 @@ -48,7 +48,7 @@ enable_gtktest=no fi - if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + if $PKG_CONFIG --atleast-version $min_gtk_version gtk+-3.0; then : else no_gtk=yes