]> git.saurik.com Git - wxWidgets.git/blobdiff - wx-config.in
Applied patch 1037938 by Zbigniew Zagorski to fix Unicode build problems
[wxWidgets.git] / wx-config.in
index fc4c904912ea98dbfc7b30d8751f9345d6e43b0e..f0c204ac5a686f6c675936332dd37d8448783a64 100755 (executable)
@@ -44,13 +44,12 @@ usage()
    on your system.  It may be used to retrieve the information you require
    to build applications using these libraries.
 
-    If alternative builds of wxWidgets exist on the system, you can  use the
-  options: --prefix, --host, --toolkit,  --unicode, --debug, --universal and
-  --version, to select from them.  Use the --list option  to show all builds
-  which  match any  specified criteria.   The unicode, universal,  and debug
-  options take an optional yes or no argument, while host and version accept
-  posix extended regex.  eg. wx-config --unicode=n --debug --host=?.* --list
-  will show all ansi-debug libraries installed, including cross libraries.
+    If alternative builds of wxWidgets exist on the system, you can use the
+  options:  --prefix,  --host,  --toolkit,  --unicode,  --debug,  --static,
+  --version and --universal, to select from them.  Use the --list option to
+  show alternatives available which match specified criteria.   The unicode,
+  debug, and universal options  take an  optional yes or no  argument, while
+  host and version accept posix extended regex.
 
     Optional LIB arguments (comma or space separated) may be used to specify
   the wxWidgets libraries that  you wish  to use.  The magic "std" label may
@@ -154,11 +153,15 @@ remove_field()
     _remf_value="$1"
     _remf_list=''
     shift
-    for _remf_item; do
-        [ "x$_remf_item" = "x$_remf_value" ] ||                        \
-            _remf_list="${_remf_list:+$_remf_list }$_remf_item"
-    done
-    echo "$_remf_list"
+    if [ -n "$_remf_value" ]; then
+        for _remf_item; do
+            [ "x$_remf_item" = "x$_remf_value" ] ||                 \
+                _remf_list="${_remf_list:+$_remf_list }$_remf_item"
+        done
+        echo "$_remf_list"
+    else
+        echo $*
+    fi
 }
 
 # validate_arg _domain _set _name _value
@@ -599,7 +602,7 @@ if [ -n "$output_option_list" ]; then
         echo " to choose between alternate matches."
     fi
 
-    [ -z "$_best_delegate" ] || _delegates=$(remove_field $_best_delegate $_delegates)
+    _delegates=$(remove_field "$_best_delegate" $_delegates)
 
     if [ -n "$_delegates" ]; then
         echo
@@ -659,10 +662,13 @@ if ! user_mask_fits "$this_config" ; then
     if [ $_numdelegates -eq 0 ]; then
         cat 1>&2 <<-EOF
 
-         No config found to match: $config_spec
-         in $wxconfdir
-         Please install the desired library build, or use --list
-         without any feature specifiers to see all available configs.
+         Warning: No config found to match: $config_spec
+                  in $wxconfdir
+         If you require this configuration, please install the desired
+         library build.  If this is part of an automated configuration
+         test and no other errors occur, you may safely ignore it.
+         You may use wx-config --list to see all configs available in
+         the default prefix.
 
        EOF
 
@@ -693,7 +699,8 @@ if ! user_mask_fits "$this_config" ; then
         fi
 
         decho
-        decho " Specification was ambiguous."
+        decho " *** Error: Specification is ambiguous"
+        decho "            as $config_spec"
         decho " Use additional feature options to choose between:"
         for i in $(find_eligible_delegates "$configmask"); do
             decho "  $i"
@@ -715,8 +722,6 @@ fi
 
 
 
-
-
 # If we are still here, then from now on we are responsible for
 # all the user's needs.  Time to rustle up some output for them.
 # --------------------------------------------------------------