aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-11-26 08:23:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-11-26 08:23:31 +0200
commit0b4816f6a89562477ecb28e16c74ed60d5db5ca4 (patch)
tree6f8a10c1616f28652d57ecce6a254230b53b2391
parent30b223eb9680d53476578b81976d4c794c6ebd7d (diff)
Try to extract library search paths from C++ compiler
This is needed, for example, to support Debian multi-arch.
-rw-r--r--xsd/build/cxx/generic/configuration-dynamic.make11
1 files changed, 11 insertions, 0 deletions
diff --git a/xsd/build/cxx/generic/configuration-dynamic.make b/xsd/build/cxx/generic/configuration-dynamic.make
index c43865a..f35ea66 100644
--- a/xsd/build/cxx/generic/configuration-dynamic.make
+++ b/xsd/build/cxx/generic/configuration-dynamic.make
@@ -3,3 +3,14 @@ cxx_generic := $(CXX)
else
cxx_generic := g++
endif
+
+r := $(shell $(cxx_generic) $(cxx_extra_options) $(cxx_ld_extra_options) \
+-print-search-dirs 2>&1 | sed -e 's/libraries: =//p' -e d)
+
+ifneq ($r,)
+ ifeq ($(cxx_extra_lib_paths),)
+ cxx_extra_lib_paths := $r
+ else
+ cxx_extra_lib_paths := $(cxx_extra_lib_paths):$r
+ endif
+endif