After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641638 - Remove AM_PATH_GTK_3_0 macro
Remove AM_PATH_GTK_3_0 macro
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.99.x
Other All
: Normal normal
: 4.0
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-06 02:09 UTC by Javier Jardón (IRC: jjardon)
Modified: 2018-01-16 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove AM_PATH_GTK_3_0 (8.96 KB, patch)
2011-02-06 02:09 UTC, Javier Jardón (IRC: jjardon)
rejected Details | Review
Avoid "pkg-config --atleast-version" (2.12 KB, patch)
2014-08-06 10:28 UTC, Simon McVittie
committed Details | Review
Deprecate AM_PATH_GTK_3_0 in favour of PKG_CHECK_MODULES (934 bytes, patch)
2014-08-06 10:28 UTC, Simon McVittie
committed Details | Review
Deprecate GTK_CHECK_BACKEND in favour of PKG_CHECK_MODULES (991 bytes, patch)
2014-08-06 10:29 UTC, Simon McVittie
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2011-02-06 02:09:03 UTC
It's not really used nowadays as we have the more generic PKG_CHECK_MODULES
Comment 1 Javier Jardón (IRC: jjardon) 2011-02-06 02:09:23 UTC
Created attachment 180200 [details] [review]
Remove AM_PATH_GTK_3_0
Comment 2 Matthias Clasen 2011-02-06 19:38:43 UTC
PKG_CHECK_MODULES checks for the presence of a pc file. This macro does quite a bit more.
Comment 3 Emmanuele Bassi (:ebassi) 2011-02-17 11:28:02 UTC
AM_PATH_GTK_3_0, as does AM_PATH_GLIB_2_0, handle:

  • mis-installations of glib/gtk
  • wrong environment set up (LD_LIBRARY_PATH conflicting with PKG_CONFIG_PATH)

so no: they are not the equivalent of PKG_CHECK_MODULES.

now, the optional 4th argument ("modules") should be removed. and some handling of pkg-config could go away.
Comment 4 André Klapper 2012-05-07 16:36:49 UTC
Comment on attachment 180200 [details] [review]
Remove AM_PATH_GTK_3_0

Setting patch status as per last comments.
Comment 5 Adrian Bunk 2012-08-29 21:51:02 UTC
(In reply to comment #2)
> PKG_CHECK_MODULES checks for the presence of a pc file. This macro does quite a
> bit more.

It does more, but not for anything that needs to be checked for.

Nowadays software using a library (including nearly all GTK+ using software) does only do the PKG_CHECK_MODULES(), and not any additional checks for obscure errors.

It is unfortunate that AM_PATH_GTK_3_0 was not dropped in 3.0, and it would be nice if it could be documented as deprecated now, and finally be dropped without replacement with GTK+ 4.0
Comment 6 Simon McVittie 2014-08-06 10:27:48 UTC
With pkg-config 0.28, a construct like AM_PATH_GTK_3_0([3.4], [], [], [gthread]) is actively broken: it calls "pkg-config --atleast-version 3.4 gtk+-3.0 gthread", which is documented to check that both gtk+-3.0 and gthread are version >= 3.4. Earlier pkg-config versions didn't behave as documented, but 0.28 does.

This is <https://bugs.debian.org/756476>.
Comment 7 Simon McVittie 2014-08-06 10:28:33 UTC
Created attachment 282647 [details] [review]
Avoid "pkg-config --atleast-version"

AM_PATH_GTK_3_0([3.4], [], [], [gthread]) results in calling
"pkg-config --atleast-version 3.4 gtk+-3.0 gthread-2.0".

With pkg-config 0.28, that test fails, because the version of
gthread-2.0 is smaller than 3.4. This appears to be a behaviour
change since 0.26, but matches what the documentation said in 0.26.
Comment 8 Simon McVittie 2014-08-06 10:28:51 UTC
Created attachment 282648 [details] [review]
Deprecate AM_PATH_GTK_3_0 in favour of PKG_CHECK_MODULES

That's what GNOME applications use.
Comment 9 Simon McVittie 2014-08-06 10:29:30 UTC
Created attachment 282649 [details] [review]
Deprecate GTK_CHECK_BACKEND in favour of  PKG_CHECK_MODULES

This is easy to do with pkg-config too.

---

I'm less sure whether this one should be applied. Thoughts?
Comment 10 Simon McVittie 2014-08-06 10:38:07 UTC
According to codesearch.debian.net, neither macro is commonly used:

http://codesearch.debian.net/search?q=AM_PATH_GTK_3_0
http://codesearch.debian.net/search?q=GTK_CHECK_BACKEND
Comment 11 Matthias Clasen 2014-08-09 08:27:54 UTC
Review of attachment 282647 [details] [review]:

ok
Comment 12 Matthias Clasen 2014-08-09 08:31:04 UTC
I think deprecating AM_PATH_GTK_3_0 and GTK_CHECK_BACKEND is fine, personally. Emmanuele, do you feel strongly about this ?
Comment 13 Simon McVittie 2014-08-09 15:09:43 UTC
Comment on attachment 282647 [details] [review]
Avoid "pkg-config --atleast-version"

Applied, thanks. 82cf89de for 3.13.6, 3a2a1937 for 3.12.3
Comment 14 Emmanuele Bassi (:ebassi) 2014-08-12 18:52:44 UTC
(In reply to comment #12)
> I think deprecating AM_PATH_GTK_3_0 and GTK_CHECK_BACKEND is fine, personally.
> Emmanuele, do you feel strongly about this ?

I don't feel strongly about any of these macros. we added them because it was easier than doing the $PKG_CONFIG --blah gtk+-3.0 dance, and because of the overall "let's build stuff without jhbuild setting up the whole environment for us" approach, but deprecation seems fair at this point.
Comment 15 Simon McVittie 2014-08-13 12:49:48 UTC
(In reply to comment #14)
> we added them because it was
> easier than doing the $PKG_CONFIG --blah gtk+-3.0 dance, and because of the
> overall "let's build stuff without jhbuild setting up the whole environment for
> us" approach

For historical context, I assume that was before PKG_CHECK_MODULES was widespread?

If you want to document something for non-jhbuild users, the rune I use is to export something like

PKG_CONFIG_PATH=${my_prefix}/lib/pkgconfig:${my_prefix}/share/pkgconfig

which should cover detection of most compile-time dependencies these days. The variable is already mentioned in "./configure --help".
Comment 16 Matthias Clasen 2014-08-15 02:02:25 UTC
Review of attachment 282648 [details] [review]:

ok
Comment 17 Matthias Clasen 2014-08-15 02:03:01 UTC
Review of attachment 282649 [details] [review]:

ok
Comment 18 Simon McVittie 2014-08-21 09:12:13 UTC
(In reply to comment #13)
> (From update of attachment 282647 [details] [review])
> Applied, thanks. 82cf89de for 3.13.6, 3a2a1937 for 3.12.3

I pushed to 3.12 but not master. Fixed now; so this is actually d329544 for 3.13.8, 3a2a1937 for 3.12.3.
Comment 19 Simon McVittie 2014-08-21 09:12:19 UTC
Comment on attachment 282648 [details] [review]
Deprecate AM_PATH_GTK_3_0 in favour of PKG_CHECK_MODULES

commit 169f064 for 3.13.8
Comment 20 Simon McVittie 2014-08-21 09:12:21 UTC
Comment on attachment 282649 [details] [review]
Deprecate GTK_CHECK_BACKEND in favour of  PKG_CHECK_MODULES

commit d975cd5 for 3.13.8
Comment 21 Simon McVittie 2014-08-22 12:04:23 UTC
Is this really resolved, without deleting those macros entirely (presumably a job for Gtk 4)?
Comment 22 Javier Jardón (IRC: jjardon) 2014-08-26 12:09:58 UTC
Reopening and set target milestore to 4.0
Comment 23 Matthias Clasen 2014-08-26 19:58:02 UTC
We don't generally keep a bug open for every deprecated bit, but sure