From 6ff8aeb77dd057dc826a9988113af345a81a5126 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 6 Dec 2009 21:39:13 +0100 Subject: [PATCH] Misc m4 cleanups Whitespace cleanups Use m4_default instead of some ifelses. Thanks to Stepan Kasal for the patch this is based on Bug #13892 --- pkg.m4 | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkg.m4 b/pkg.m4 index fb3ae58..9bb3e06 100644 --- a/pkg.m4 +++ b/pkg.m4 @@ -43,7 +43,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -61,12 +60,11 @@ AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], @@ -129,7 +127,7 @@ if test $pkg_failed = yes; then # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -137,24 +135,23 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [$4]) +_PKG_TEXT])dnl + ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) - ifelse([$4], , [AC_MSG_FAILURE(dnl + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES -- 2.39.5