Skip to content

Commit

Permalink
wsdl2h.m4: Fix detection of modern wsdl2h versions.
Browse files Browse the repository at this point in the history
Modern executables do not show version in help output,
but have a -V parameter instead.
Also, explicitly match the release version in older
wsdl2h version instead of other version numbers
mentioned in help text.

Signed-off-by: Oliver Freyermuth <[email protected]>
  • Loading branch information
olifre committed Feb 2, 2018
1 parent 335eed8 commit c787dc6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions m4/wsdl2h.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ AC_DEFUN([AC_WSDL2H],
dnl
dnl @<:@ becomes [
dnl @:>@ becomes ]
wsdl2h_version=$($WSDL2H -help 2>&1 | grep -o '@<:@0-9@:>@\.@<:@0-9@:>@\.@<:@0-9@:>@*$')
dnl
dnl Newer versions support -V parameter.
wsdl2h_version=$($WSDL2H -V 2>/dev/null)
if test -z "$wsdl2h_version"; then
wsdl2h_version=$($WSDL2H -help 2>&1 | grep release | grep -o '@<:@0-9@:>@\.@<:@0-9@:>@\.@<:@0-9@:>@*$')
fi
normalized_version=$(printf "%02d%02d%02d" $(echo $wsdl2h_version | tr '.' ' '))
WSDL2H_FLAGS=""
Expand Down

0 comments on commit c787dc6

Please sign in to comment.