From: Tollef Fog Heen Date: Sun, 16 Oct 2005 18:13:43 +0000 (+0000) Subject: Get rid of text duplication in pkg.m4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39ef912d6e2d20d3637d238521502bb590942f97;p=pkg-config Get rid of text duplication in pkg.m4 2005-10-16 Tollef Fog Heen * pkg.m4: use m4_define to avoid duplication of text. --- diff --git a/ChangeLog b/ChangeLog index 0a2d773..f290abd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-10-16 Tollef Fog Heen + * pkg.m4: use m4_define to avoid duplication of text. + * pkg.m4: Minor cleanups, use m4_default rather than m4_ifval and echo 1>&FD is silly, just use echo >&FD diff --git a/pkg.m4 b/pkg.m4 index c8ab6c7..cbb46db 100644 --- a/pkg.m4 +++ b/pkg.m4 @@ -112,6 +112,10 @@ AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then @@ -130,9 +134,8 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details.])], +_PKG_TEXT +])], [$4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl @@ -140,9 +143,7 @@ elif test $pkg_failed = untried; then is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +_PKG_TEXT To get pkg-config, see .])], [$4])