]> git.saurik.com Git - wxWidgets.git/commitdiff
Use the same paranoia we already apply to lib lists we get from configure
authorRon Lee <ron@debian.org>
Sun, 3 Oct 2004 12:13:02 +0000 (12:13 +0000)
committerRon Lee <ron@debian.org>
Sun, 3 Oct 2004 12:13:02 +0000 (12:13 +0000)
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

wx-config.in

index e56926cdb521db92f224882e2ed29d9854b46e4b..97bbf2076069efeac480f0115c213dab1181d120 100755 (executable)
@@ -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