From: Ron Lee Date: Sun, 3 Oct 2004 12:13:02 +0000 (+0000) Subject: Use the same paranoia we already apply to lib lists we get from configure X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a9046db1eae508282169e7e14053562088a1378 Use the same paranoia we already apply to lib lists we get from configure to those we get from the user on the command line. Bubble all duplicates to occur at their last mention so static linking order is satified. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wx-config.in b/wx-config.in index e56926cdb5..97bbf20760 100755 --- a/wx-config.in +++ b/wx-config.in @@ -957,22 +957,18 @@ if is_monolithic; then else # MONOLITHIC = 0 - # Import everything by default, and base if it was omitted. + # Import everything by default, expand std if specified, or add base if omitted. if [ -z "$wx_libs" ]; then wx_libs="@CORE_GUI_LIBS@ @CORE_BASE_LIBS@" - elif ! match_field base $wx_libs ; then - wx_libs="$wx_libs base" - fi - - # Expand the magic library 'std' to the default set. - # Only add those not already specified to future-proof - # against changes to std which would otherwise break - # people's builds. - if match_field std $wx_libs; then + elif match_field std $wx_libs; then + # Bubble any libs that were already specified to the end + # of the list and ensure static linking order is retained. wx_libs=$(remove_field std $wx_libs) for i in @CORE_GUI_LIBS@ @CORE_BASE_LIBS@; do - match_field "$i" $wx_libs || wx_libs="$wx_libs $i" + wx_libs="$(remove_field $i $wx_libs) $i" done + elif ! match_field base $wx_libs ; then + wx_libs="$wx_libs base" fi using_gui=no