Merge lp:~heirecka/inkscape/use-pkg_prog_pkg_config into lp:~inkscape.dev/inkscape/trunk

Proposed by Heiko Becker
Status: Needs review
Proposed branch: lp:~heirecka/inkscape/use-pkg_prog_pkg_config
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 33 lines (+3/-6)
1 file modified
configure.ac (+3/-6)
To merge this branch: bzr merge lp:~heirecka/inkscape/use-pkg_prog_pkg_config
Reviewer Review Type Date Requested Status
jazzynico (community) Needs Fixing
Krzysztof Kosinski Approve
Review via email: mp+255157@code.launchpad.net

Description of the change

It has the advantage that it respects the PKG_CONF environment variable which comes in handy when you're using a prefixed pkg-config (e.g arch-prefix) executable.

Successfully built inkscape with a x86_64-pc-linux-gnu-pkg-config exectuable.

To post a comment you must log in.
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Looks okay, but I would welcome some information about the required version of Autoconf / pkg-config and how old they are.

review: Approve
Revision history for this message
Heiko Becker (heirecka) wrote :

> Looks okay, but I would welcome some information about the required version of
> Autoconf / pkg-config and how old they are.

It was first introduced in 2005 (http://cgit.freedesktop.org/pkg-config/commit/pkg.m4?id=b1584b5aaf9ce396e61599caff2b5e15f01daf91). So the autoconf version shouldn't really matter, but I could not find anything specific. The macro itself checks for a pkg-config version of 0.9.0. which seems to be released in 2003.

Revision history for this message
jazzynico (jazzynico) wrote :

Tested successfully with gtkspell-2 on Xubuntu 15.10, Inkscape trunk rev. 14674.

Unfortunately, it doesn't work with gtkspell-3 (--enable-gtk3-experimental configure option) due to an incorrect package name (gtkspell-3.0 doesn't exist). To fix it, I had to use the following code:

if pkg-config --exists gtkspell3-3.0; then
 ink_spell_pkg=gtkspell3-3.0

I have just checked with other Gnu/Linux distros, and it seems the gtkspell3-3.0 package name is consistent.

review: Needs Fixing

Unmerged revisions

14042. By Heiko Becker

configure: Use PKG_PROG_PKG_CONFIG macro

It has the advantage that it respects the PKG_CONF environment
variable which comes in handy when you're using a prefixed pkg-config
(e.g arch-prefix) executable.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2015-02-12 12:09:59 +0000
3+++ configure.ac 2015-04-02 23:42:42 +0000
4@@ -220,10 +220,7 @@
5 AC_SUBST(GETTEXT_PACKAGE)
6 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
7
8-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
9-if test "x$PKG_CONFIG" = "xno"; then
10- AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
11-fi
12+PKG_PROG_PKG_CONFIG
13
14 dnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
15 AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
16@@ -723,7 +720,7 @@
17 if test "x$enable_gtk3" = "xyes"; then
18
19 ink_spell_pkg=
20- if pkg-config --exists gtkspell-3.0; then
21+ if $PKG_CONFIG --exists gtkspell-3.0; then
22 ink_spell_pkg=gtkspell-3.0
23 AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
24 fi
25@@ -800,7 +797,7 @@
26 else
27
28 ink_spell_pkg=
29- if pkg-config --exists gtkspell-2.0; then
30+ if $PKG_CONFIG --exists gtkspell-2.0; then
31 ink_spell_pkg=gtkspell-2.0
32 AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
33 fi