From 74256434cc7919bb20311b3c07b53d8a5ee0dac8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 26 Jan 2014 13:52:00 +0000 Subject: [PATCH] Fix `wx-config --libs` in monolithic build. Don't include non-existent libraries (which are built as part of the main monolithic one) in this case. Closes #15567. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + wx-config.in | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 759bc255ab..d7c93adada 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -581,6 +581,7 @@ All: - Fix wxSocket::WaitForAccept() in non-main thread (Hajo Kirchhoff). - Fix memory overallocation in wxVector::reserve() (Nigel Paton). +- Fix `wx-config --libs` in monolithic build. - Fix the build under HP-UX (tested under 11.31). - Add Aragonese translation. diff --git a/wx-config.in b/wx-config.in index d405729fa1..ede85833a0 100755 --- a/wx-config.in +++ b/wx-config.in @@ -1203,12 +1203,14 @@ if is_monolithic; then # Only add additional info if --libs was specified and not just --optional-libs if [ -n "$output_option_libs" ]; then - # Core libs are already built into the blob. - for i in std @STD_GUI_LIBS@ @STD_BASE_LIBS@; do - wx_libs=`remove_field $i $wx_libs` - done + # The only library we need to add when using monolithic build is the gl + # one as all the others are already included into the main one. + if match_field gl $wx_libs; then + wx_libs=gl + else + wx_libs= + fi - wx_libs=`order_libs $wx_libs` wx_libs="@WXCONFIG_LDFLAGS_GUI@ `lib_flags_for $wx_libs`" # We still need the core lib deps for a static build though