A new try from Dave Mitchell for [perl #23265].
[p5sagit/p5-mst-13.2.git] / utils / h2xs.PL
index ffc343e..6e1f297 100644 (file)
@@ -594,6 +594,7 @@ my ($opt_A,
    );
 
 Getopt::Long::Configure('bundling');
+Getopt::Long::Configure('pass_through');
 
 my %options = (
                 'omit-autoload|A'    => \$opt_A,
@@ -707,9 +708,10 @@ my @path_h;
 
 while (my $arg = shift) {
     if ($arg =~ /^-l/i) {
-        $extralibs = "$arg @ARGV";
-        last;
+        $extralibs .= "$arg ";
+        next;
     }
+    last if $extralibs;
     push(@path_h, $arg);
 }