[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libredwg] avoiding pkg-config

From: Thien-Thi Nguyen
Subject: [libredwg] avoiding pkg-config
Date: Sun, 19 Oct 2014 16:22:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Good news: Hydra now is able to build the tarball, and to
successfully "make" for various platforms:

The failures now come from "make check", which invokes
pkg-config(1) to compute the flags to build program
testsuite/xmlsuite/testsuite (from the corresponding .c) file.

There are two reasonable solutions, i think: (a) make Hydra
aware of pkg-config; (b) avoid pkg-config altogether.  IMHO (b)
is cleaner, since we can get the same information from program
xml2-config(1), which is normally part of package libxml2-dev
(on Debian, that is, YMMV), along w/ the library's headers.
In sum, pkg-config is overkill; we don't need it.

So, please find attached here:                   | 4 ++++
 testsuite/xmlsuite/ | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ b/
index 22e7e7e..6ca2063 100644
--- a/
+++ b/
@@ -25,6 +25,10 @@ AC_SUBST(ISODATE)

 dnl Checks for programs.
+AS_IF([test x"$XML2CFG" = x:],
+[AC_MSG_ERROR([Install libxml2-dev first (or whatever it takes
+to provide the command 'xml2-config')])])
diff --git a/testsuite/xmlsuite/ b/testsuite/xmlsuite/
index 6c82cbf..4f3f56d 100644
--- a/testsuite/xmlsuite/
+++ b/testsuite/xmlsuite/
@@ -1,6 +1,6 @@

-LIBXML = `pkg-config libxml-2.0 --cflags`
-AM_CFLAGS = $(LIBXML) -g -lredwg -lm -lxml2
+AM_CPPFLAGS = `$(XML2CFG) --cflags`
+AM_CFLAGS = -g -lredwg -lm -lxml2

 check_PROGRAMS = testsuite
a patch to make the configure script require xml2-config(1)
and the testsuite/xmlsuite/ makefiles use it.  I took the
opportunity to use the "correct" var (AM_CPPFLAGS),
as well.

Any objections to installing it?  (I don't want to seem pushy,
and would be delighted to hear from the more active hackers.)

Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]