Summary: | Add a m4 function to pkg.m4 and calls both AC_ARG_ENABLE AND PKG_CHECK_MODULES | ||
---|---|---|---|
Product: | pkg-config | Reporter: | Petteri Räty <bugzillas> |
Component: | src | Assignee: | Dan Nicholson <dbn.lists> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | dmacks, flameeyes, lu_zero |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | m4 macro |
Description
Petteri Räty
2008-01-01 13:12:04 UTC
I agree this is a common task. However, it's pretty common that the PKG_CHECK_MODULES check is not a simple module name (i.e., a certain feature requires several distinct modules). It would be more flexible if $2 for this new PKG_ARG_ENABLE were the actual $2 used for PKG_CHECK_MODULES, not a simple appendage for $1. Functional suggestion: don't even bother doing the PKG_CHECK_MODULES if $enable is no. It's a bit confusing when a ./cnofigure script includes messages about not findind some support library if that library isn't needed at all and won't be used (or some associated feature enabled) even if it does exist. Actually we have a similar macro already... (In reply to comment #3) > Actually we have a similar macro already... > "We"? For pkg-config-0.23, $ grep AC_DEFUN pkg.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], AC_DEFUN([PKG_CHECK_EXISTS], AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], AC_DEFUN([PKG_CHECK_MODULES], and none of those appear to do anything similar to AC_ARG_WITH or AC_ARG_ENABLE functionality. Sorry, we was intended as me and Luca who I CCed here. Created attachment 19384 [details]
m4 macro
Here what we are using for lscube and other projects. I hope it could be useful.
Luca posted his macros on the list, and I think they're pretty close to being ready. http://lists.freedesktop.org/archives/pkg-config/2012-May/000837.html I just mostly want to make sure the interface is clean and friendly before committing. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/2. |
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.