Bug 12372 - Provide means to disable AC_ARG_VAR in PKG_CHECK_MODULES
Summary: Provide means to disable AC_ARG_VAR in PKG_CHECK_MODULES
Status: RESOLVED INVALID
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-09 11:25 UTC by David Neèas
Modified: 2009-12-06 13:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description David Neèas 2007-09-09 11:25:24 UTC
PKG_CHECK_MODULES in pkg.m4 unconditionally declares precious variables

AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl

which means several more pages of text printed by ./configure --help that include every argument to PKG_CHECK_MODULES.  For instance for my app it now prints internal dummy flags that are used in an auxiliary check and never included actual in CFLAGS or LDFLAGS:

  FFTW3_DUMMY_CFLAGS
              C compiler flags for FFTW3_DUMMY, overriding pkg-config
  FFTW3_DUMMY_LIBS
              linker flags for FFTW3_DUMMY, overriding pkg-config

This is confusing.  The user should never see this.  configure.ac author should have a possibility to limit the output to meaningful variables.
Comment 1 Tollef Fog Heen 2009-12-06 13:05:58 UTC
You should use PKG_CHECK_EXISTS if you don't want to set variables; that macro does not have side effects apart from what you specify yourself in the second and third argument.


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.