diff options
| author | Paul Eggert | 2014-05-11 12:14:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-11 12:14:12 -0700 |
| commit | 3c95f44ce5cefd13f9159e3fdbbf83a02963bf0f (patch) | |
| tree | 4fc27cf39a719a59c4b0457b63c16fc2b3d063aa | |
| parent | fbd5cc6ca433332307608c6dd03e28e2391c64bb (diff) | |
| download | emacs-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-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.ac | 24 |
2 files changed, 26 insertions, 5 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-05-07 Glenn Morris <rgm@gnu.org> | 8 | 2014-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) | |||
| 1354 | dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4) | 1354 | dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4) |
| 1355 | dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, | 1355 | dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, |
| 1356 | dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page -- | 1356 | dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page -- |
| 1357 | dnl except that it postprocesses CFLAGS as needed for --enable-gcc-warnings. | 1357 | dnl except that it works around older pkg-config bugs and |
| 1358 | dnl it postprocesses CFLAGS as needed for --enable-gcc-warnings. | ||
| 1358 | dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that | 1359 | dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that |
| 1359 | dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no | 1360 | dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no |
| 1360 | dnl actions. | 1361 | dnl actions. |
| 1361 | AC_DEFUN([EMACS_CHECK_MODULES], | 1362 | AC_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 | ||
| 1367 | HAVE_SOUND=no | 1381 | HAVE_SOUND=no |
| 1368 | if test "${with_sound}" != "no"; then | 1382 | if test "${with_sound}" != "no"; then |