Bug 13892 - use m4_default and more pkg.m4 cosmetics
use m4_default and more pkg.m4 cosmetics
Product: pkg-config
Classification: Unclassified
Component: src
All All
: low normal
Assigned To: Tollef Fog Heen
Depends on: 9704
  Show dependency treegraph
Reported: 2008-01-02 04:42 UTC by Stepan Kasal
Modified: 2009-12-06 12:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

pkg.m4 cleanup (1.65 KB, patch)
2008-01-02 04:55 UTC, Stepan Kasal
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Kasal 2008-01-02 04:42:17 UTC
The following patch makes some cosmetic changes to m4 macros in pkg.m4.

1) ifelse([$7], [], [this], [$7]) is the same as m4_default([$7], [this])

2) Whitespace before each m4 parameter is ignored, so the`dnl' in the folowing is redundant:

3) Shell syntax does not allow empty command the `then' or `else' branch; that's why you can see things like:
  if test $foo = yes; then
     ifelse([$3], , :, [$3])
But if the possible empty $3 is not alone there, no magic is needed:
  if test $foo = yes; then
     echo Oh, yes!
Comment 1 Stepan Kasal 2008-01-02 04:55:21 UTC
Created attachment 13456 [details] [review]
pkg.m4 cleanup

This patch has to be applied after patch https://bugs.freedesktop.org/attachment.cgi?id=8443 from bug #9704
Comment 2 Tollef Fog Heen 2009-12-06 12:40:17 UTC
Thanks, I've taken most of your changes in 6ff8aeb.