aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-05-11 12:14:12 -0700
committerPaul Eggert2014-05-11 12:14:12 -0700
commit3c95f44ce5cefd13f9159e3fdbbf83a02963bf0f (patch)
tree4fc27cf39a719a59c4b0457b63c16fc2b3d063aa
parentfbd5cc6ca433332307608c6dd03e28e2391c64bb (diff)
downloademacs-3c95f44ce5cefd13f9159e3fdbbf83a02963bf0f.tar.gz
emacs-3c95f44ce5cefd13f9159e3fdbbf83a02963bf0f.zip
Work around bug in pkg-config before 0.26.
* configure.ac (EMACS_CHECK_MODULES): Check for failed exit status of pkg-config, on older pkg-config versions that don't do it properly. Fixes: debbugs:17438
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac24
2 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a3de25e250..cfb4841ade1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12014-05-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Work around bug in pkg-config before 0.26 (Bug#17438).
4 * configure.ac (EMACS_CHECK_MODULES): Check for failed exit status
5 of pkg-config, on older pkg-config versions that don't do it
6 properly.
7
12014-05-07 Glenn Morris <rgm@gnu.org> 82014-05-07 Glenn Morris <rgm@gnu.org>
2 9
3 * autogen.sh: Check for failing aclocal. 10 * autogen.sh: Check for failing aclocal.
diff --git a/configure.ac b/configure.ac
index d398e31f89e..286761670b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1354,15 +1354,29 @@ PKG_PROG_PKG_CONFIG(0.9.0)
1354dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4) 1354dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4)
1355dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, 1355dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4,
1356dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page -- 1356dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page --
1357dnl except that it postprocesses CFLAGS as needed for --enable-gcc-warnings. 1357dnl except that it works around older pkg-config bugs and
1358dnl it postprocesses CFLAGS as needed for --enable-gcc-warnings.
1358dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that 1359dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that
1359dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no 1360dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no
1360dnl actions. 1361dnl actions.
1361AC_DEFUN([EMACS_CHECK_MODULES], 1362AC_DEFUN([EMACS_CHECK_MODULES],
1362 [PKG_CHECK_MODULES([$1], [$2], 1363 [dnl pkg-config before 0.26 doesn't check exit status properly; see:
1363 [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` 1364 dnl https://bugs.freedesktop.org/show_bug.cgi?id=29801
1364 m4_default([$3], [HAVE_$1=yes])], 1365 dnl Work around the bug by checking the status ourselves.
1365 [m4_default([$4], [HAVE_$1=no])])]) 1366 emacs_check_module_ok=false
1367 AS_IF([test -n "$PKG_CONFIG" &&
1368 { $PKG_CONFIG --atleast-pkgconfig-version 0.26 ||
1369 { $PKG_CONFIG --cflags "$1" "$2" && $PKG_CONFIG --libs "$1" "$2"; }
1370 } >/dev/null 2>&AS_MESSAGE_LOG_FD],
1371 [PKG_CHECK_MODULES([$1], [$2],
1372 [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
1373 emacs_check_module_ok=:],
1374 [:])])
1375 if $emacs_check_module_ok; then
1376 m4_default([$3], [HAVE_$1=yes])
1377 else
1378 m4_default([$4], [HAVE_$1=no])
1379 fi])
1366 1380
1367HAVE_SOUND=no 1381HAVE_SOUND=no
1368if test "${with_sound}" != "no"; then 1382if test "${with_sound}" != "no"; then