From: Paul Eggert <eggert@cs.ucla.edu>
To: "Jordi Gutiérrez Hermoso" <jordigh@octave.org>
Cc: 10626@debbugs.gnu.org
Subject: bug#10626: Should configure fail if pkg-config fails?
Date: Sat, 28 Jan 2012 01:07:50 -0800 [thread overview]
Message-ID: <4F23BAE6.5080906@cs.ucla.edu> (raw)
In-Reply-To: <CAPHS2gxmqGJXxwK3O=6GJMoLNbdOZ7HegSCGZwUoXE7cvDfmuw@mail.gmail.com>
On 01/24/2012 06:15 PM, Jordi Gutiérrez Hermoso wrote:
> it shouldn't assume that GTK+ is working correctly if
> pkg-config returns nonzero exit status.
True enough. Here's a proposed patch, which I'd like to
install into the trunk. I'm CC'ing this to bug-gnu-emacs
instead of to emacs-devel, so that it has a proper bug number.
=== modified file 'ChangeLog'
--- ChangeLog 2012-01-19 07:21:25 +0000
+++ ChangeLog 2012-01-28 09:04:13 +0000
@@ -1,3 +1,11 @@
+2012-01-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ Check pkg-config exit status when configuring.
+ * configure.in (PKG_CHECK_MODULES): Do not assume that pkg-config
+ works; check its exit status. Problem reported by Jordi Gutiérrez
+ Hermoso in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00787.html>.
+
2012-01-16 Juanma Barranquero <lekktu@gmail.com>
* .bzrignore: Ignore etc/__pycache__.
=== modified file 'configure.in'
--- configure.in 2012-01-19 07:21:25 +0000
+++ configure.in 2012-01-28 09:04:13 +0000
@@ -1124,17 +1124,14 @@
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
- if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD; then
- AC_MSG_RESULT(yes)
+ if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
+ $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
+ $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
+
+ $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e 's,///*,/,g'`
+ $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'`
+ AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS'])
succeeded=yes
-
- AC_MSG_CHECKING($1_CFLAGS)
- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"|sed -e 's,///*,/,g'`
- AC_MSG_RESULT($$1_CFLAGS)
-
- AC_MSG_CHECKING($1_LIBS)
- $1_LIBS=`$PKG_CONFIG --libs "$2"|sed -e 's,///*,/,g'`
- AC_MSG_RESULT($$1_LIBS)
else
AC_MSG_RESULT(no)
$1_CFLAGS=""
next parent reply other threads:[~2012-01-28 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPHS2gy0KLfp-vG2GR0FF36s-K3-Nuc8Mwd7jivM0Bq3hCv3BQ@mail.gmail.com>
[not found] ` <4F1F3019.8060808@cs.ucla.edu>
[not found] ` <CAPHS2gzigh-0Zg2Wm7k2uEr19x3Om0_cYQjOo69LcCgXJfng5A@mail.gmail.com>
[not found] ` <4F1F356F.9040501@cs.ucla.edu>
[not found] ` <CAPHS2gxmqGJXxwK3O=6GJMoLNbdOZ7HegSCGZwUoXE7cvDfmuw@mail.gmail.com>
2012-01-28 9:07 ` Paul Eggert [this message]
2012-03-21 19:54 ` bug#10626: Should configure fail if pkg-config fails? Jordi Gutiérrez Hermoso
2012-04-07 20:48 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F23BAE6.5080906@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=10626@debbugs.gnu.org \
--cc=jordigh@octave.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).