Bug 13892

Summary: use m4_default and more pkg.m4 cosmetics
Product: pkg-config Reporter: Stepan Kasal <kasal>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: low    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 9704    
Bug Blocks:    
Attachments: pkg.m4 cleanup

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:
  MACRO(dnl
  parameter)

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])
  fi
But if the possible empty $3 is not alone there, no magic is needed:
  if test $foo = yes; then
     echo Oh, yes!
     $3
  fi
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.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.