| Summary: | AC_CHECK_LIB() modifies LIBS if if-found action is [] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Petr Pisar <ppisar> |
| Component: | autoconf | Assignee: | Pavel Raiskup <praiskup> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | phracek, praiskup |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-01-09 18:54:00 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
If I understand this right, you think that '[]' makes it a explicitly defined value, but it does not. M4 compares against empty string and thus having 'macro(a,,c)' is equivalent to 'macro(a,[],c)'. You can avoid changing the LIBS variable by: old_LIBS=$LIBS AC_CHECK_LIB([ldap], [ldap_initialize], , [ ... LIBS=$old_LIBS .. or more likely, properly specify the ACTION-IF-FOUND. Having 'true' there does not look much like work-around to me. But for really qualified answer this should be discussed upstream. Thank you for the explanation. I will alert quota upstream to rework the configure.ac. |
When upgrading quota to 4.03, I discovered all executables are linked to a library whose presence is checked by: AC_CHECK_LIB([ldap], [ldap_initialize], [], [ build_ldap=no AS_IF([test "x$enable_ldapmail" = "xyes"], [ AC_MSG_ERROR([LDAP support required but library not found.]); ]) ]) Because third argument (if-found action) is defined to empty literal, it should not fall back to default implementation (adding -lldap to LIBS etc.). Documentation reads: [..] If ACTION-IF-FOUND is not specified, the default action prepends `-lLIBRARY' to `LIBS' and defines `HAVE_LIBLIBRARY' (in all capitals). But autoconf-2.69-21.fc23.noarch seems breaking this rule and modifies LIBS. I had to work around the bug with this change in quota's configure.ac: - AC_CHECK_LIB([ldap], [ldap_initialize], [], [ + AC_CHECK_LIB([ldap], [ldap_initialize], [:;], [ I believe this is a bug in Autoconf.