Skip to content

Commit

Permalink
Make autogen.sh work for vendorized versions like libtoolize Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
dajobe committed Feb 8, 2025
1 parent ece2c79 commit 70cffcf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ for my \$varg (qw(--version -version)) {
while(<PIPE>) {
chomp;
next if @vnums; # drain pipe if we got a vnums
# Add optional leading g
next unless /^g?\$mname/i;
my(\$v)=/(\S+)\$/i; \$v =~ s/-.*\$//;
@vnums=grep { defined \$_ && !/^\s*\$/} map { s/\D//g; \$_; } split(/\./, \$v);
# Allow optional leading g and expect "PROGRAM-NAME (DESCRIPTION) VERSION-STRING"
if(/^g?\$mname \(.*?\)\s+(\S+)/i) {
my \$v = \$1; \$v =~ s/-.*\$//;
@vnums=grep { defined \$_ && !/^\s*\$/} map { s/\D//g; \$_; } split(/\./, \$v);
}
}
close(PIPE);
last if @vnums;
Expand Down

0 comments on commit 70cffcf

Please sign in to comment.