Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
pkg-config
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 56
    • Issues 56
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 7
    • Merge Requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pkg-config
  • pkg-config
  • Issues
  • #2

Closed
Open
Created Jan 01, 2008 by Bugzilla Migration User@bugzilla-migration

Add a m4 function to pkg.m4 and calls both AC_ARG_ENABLE AND PKG_CHECK_MODULES

Submitted by Petteri Räty

Assigned to Dan Nicholson @dbn

Link to original bug (#13884)

Description

I often up doing something like:

AC_ARG_ENABLE(<pkg>, AC_HELP_STRING([--enable-<pkg>], [enable <pkg> support], [], [enable_<pkg>=auto])) PKG_CHECK_MODULES(<PKG>, [<pkg> >= <version>], [if test x"${enable_<pkg>}" = x"yes" || test x"${enable_<pkg>}" = x"auto"; then AC_DEFINE(HAVE_<PKG>, 1, [defined if <pkg> is available]) fi], [test x"${enable_<pkg>}" = x"yes" && AC_MSG_ERROR(<pkg> support needs <pkg> >= <version> installed)]) AC_SUBST(<PKG>_CFLAGS) AC_SUBST(<PKG_LIBS)

IMHO it would be create if pkg-config provide a PKG_ macro for this so that one could just do PKG_ARG_ENABLE([<pkg>], [" >= <version>"], AC_DEFINE(HAVE_<PKG>, 1, [defined if <pkg> is available])

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None