From: Peter O'Gorman Date: Thu, 27 Jan 2011 23:13:10 +0000 (-0600) Subject: Don't loop through wrapper script arguments unnecessarily. X-Git-Tag: v2.4.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=286e87b1030c353d9cfc89dbb72d59e0391cb693;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 6da9d7e8a..8ff779b45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-27 Peter O'Gorman + + 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 (tiny change) Remove support for FreeBSD 1.x. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 7baa6aab5..766777fe2 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -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+\"\$@\"} }