Issue #105 is now partially fixed:
However, the same for d in $*dirs pattern that caused #105 remains in configure.ac for every other optional library. When a library is found in the default search path, the loop picks the first directory from the hard-coded list and appends it to LDFLAGS unnecessarily — or worse, picks the wrong one (e.g. a 32-bit /usr/lib on a 64-bit system).
The affected loops, by line number in the current configure.ac:
| Line |
Variable |
Library |
| 281 |
$strldirs |
strl |
| 721 |
$gcdirs |
gc |
| 871 |
$ssldirs |
OpenSSL |
| 1061/1124 |
$milterdirs / lib lib64 lib/libmilter |
libmilter (no-explicit-path case) |
| 1208 |
$librrddirs |
librrd |
| 1281 |
$libmcddirs |
libmcd |
| 1365 |
$unbounddirs |
libunbound |
| 1427 |
$libeventdirs |
libevent |
| 1532 |
$tredirs |
libtre |
| 1772 |
$odbxdirs |
odbx |
| 1859 |
$ldapdirs |
LDAP |
| 1948 |
$sasldirs |
SASL |
| 2009 |
$mdbdirs |
libmdb |
| 2093 |
$curldirs |
libcurl |
| 2225 |
$janssondirs |
jansson |
| 2348/2377 |
$bdbdirs |
BerkeleyDB |
The fix for each is the same: try the empty path (no -L) first before iterating the hard-coded list, so that libraries available in the default search path are found without adding a spurious -L. For libraries where a .pc file is reliably available, PKG_CHECK_MODULES is the cleaner solution and eliminates the loop entirely.
OpenSSL and libmilter are the most impactful since they are required dependencies.
Issue #105 is now partially fixed:
--with-milterexplicit path trusted without re-running the link test (configure.ac: trust explicit --with-milter path without link test #336)However, the same
for d in $*dirspattern that caused #105 remains inconfigure.acfor every other optional library. When a library is found in the default search path, the loop picks the first directory from the hard-coded list and appends it toLDFLAGSunnecessarily — or worse, picks the wrong one (e.g. a 32-bit/usr/libon a 64-bit system).The affected loops, by line number in the current
configure.ac:$strldirs$gcdirs$ssldirs$milterdirs/lib lib64 lib/libmilter$librrddirs$libmcddirs$unbounddirs$libeventdirs$tredirs$odbxdirs$ldapdirs$sasldirs$mdbdirs$curldirs$janssondirs$bdbdirsThe fix for each is the same: try the empty path (no
-L) first before iterating the hard-coded list, so that libraries available in the default search path are found without adding a spurious-L. For libraries where a.pcfile is reliably available,PKG_CHECK_MODULESis the cleaner solution and eliminates the loop entirely.OpenSSL and libmilter are the most impactful since they are required dependencies.