]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Don't loop through wrapper script arguments unnecessarily.
authorPeter O'Gorman <peter@pogma.com>
Thu, 27 Jan 2011 23:13:10 +0000 (17:13 -0600)
committerPeter O'Gorman <peter@pogma.com>
Thu, 27 Jan 2011 23:13:10 +0000 (17:13 -0600)
* libltdl/m4/ltmain.m4sh: Check that argv contains " --lt-"
before looping to remove wrapper script targetted arguments.
Performance regression reported by Dan McGee.

ChangeLog
libltdl/config/ltmain.m4sh

index 6da9d7e8af2141e0645033490d9449fedee74b9d..8ff779b455d6da8d3e4c426a1b8de788d4898552 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-27  Peter O'Gorman  <peter@pogma.com>
+
+       Don't loop through wrapper script arguments unnecessarily.
+       * libltdl/m4/ltmain.m4sh: Check that argv contains " --lt-"
+       before looping to remove wrapper script targetted arguments.
+       Performance regression reported by Dan McGee.
+
 2011-01-20  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)
 
        Remove support for FreeBSD 1.x.
index 7baa6aab574ea5688971c78e151851831c86a226..766777fe26960adbbbcf843ab2e13b3adea3559e 100644 (file)
@@ -3195,14 +3195,17 @@ func_exec_program_core ()
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
-  for lt_wr_arg
-  do
-    case \$lt_wr_arg in
-    --lt-*) ;;
-    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-    esac
-    shift
-  done
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
   func_exec_program_core \${1+\"\$@\"}
 }