TODO: build: fix issue with standard libpaths introduced by cups-config and friends
Problem:
Some tools like cups-config and python-config list system standard library
paths with -L in the ldflags.
Since these flags are in treated as flags required by libraries
and not as standard flags, this can lead to situations where
configure correctly detects a version of a library (e.g. talloc)
as installed into a special location, but the link process fails
because the unsupported old version of the library is found first
in the library path reported by foo-config.
See e.g.:
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10515
Solution:
The solution of this patch is to filter out the standard
library paths. The difficulty here is that the list of standard
paths varies between the systems. This patch calls "${CC} -print-search-dirs"
to get this list, which is supported at least by gcc and clang.
TODOS:
- is_standard_libpath() : correct place in ccroot.py ??
- can/should we do it in wafsamba only?