Bug 26041 - pkg-config not being found due to configure.ac badness
Summary: pkg-config not being found due to configure.ac badness
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-14 06:34 UTC by Richard Purdie
Modified: 2010-01-14 08:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Proposed fix for bug (820 bytes, patch)
2010-01-14 06:58 UTC, Richard Purdie
no flags Details | Splinter Review

Description Richard Purdie 2010-01-14 06:34:21 UTC
After http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=87529c039050ce3336ff9ce00f1b5a21d15690da trying to run configure with xcb enabled results in:

| checking for nl_langinfo... yes
| checking for X11... configure: error: 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.
| 
| Alternatively, you may set the environment variables X11_CFLAGS
| and X11_LIBS to avoid the need to call pkg-config.
| See the pkg-config man page for more details.
| 
| To get pkg-config, see <http://pkg-config.freedesktop.org/>.
| See `config.log' for more details.
| FATAL: oe_runconf failed

which is due to a bug in the configure.ac file introduced by the above commit. PKG_CHECK_MODULES() must have its first call outside any case statement otherwise things break as above (PKG_CONFIG never gets set).
Comment 1 Richard Purdie 2010-01-14 06:58:32 UTC
Created attachment 32636 [details] [review]
Proposed fix for bug

Proposed fix for bug
Comment 2 Alan Coopersmith 2010-01-14 08:19:52 UTC
Damn, I should have known better, having had to fix that in other modules.
Thanks for catching & fixing this.   Patch applied to git master.
(Please use git format-patch for making patches in the future so they're
 easier to apply.)

commit 94b45db93058cffa25598fe27dd3e385ace9d305
Author: Richard Purdie <rpurdie@linux.intel.com>
Date:   Thu Jan 14 08:04:28 2010 -0800

    Fix configure.ac PKG_ macro calls

    If the first call to PKG_CHECK_MODULES() may not be called during execution
    which is the case here since its inside a case statement, call
    PKG_PROG_PKG_CONFIG() to ensure things worked correctly.

    Fixes a configure failure introduced by commit
    87529c039050ce3336ff9ce00f1b5a21d15690da when xcb is enabled.

    http://bugs.freedesktop.org/show_bug.cgi?id=26041

    Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>


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.