chiark
/
gitweb
/
~mdw
/
cfd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1fcfdb
)
m4/mdw-libtool-version-info.m4: Don't try to parse `UNKNOWN' token.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 10 Mar 2025 13:44:45 +0000
(13:44 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 10 Mar 2025 13:44:45 +0000
(13:44 +0000)
m4/mdw-libtool-version-info.m4
patch
|
blob
|
blame
|
history
diff --git
a/m4/mdw-libtool-version-info.m4
b/m4/mdw-libtool-version-info.m4
index a4932b2351ebc00181b8ff5853c81c90e2f9c63c..109603f148d264ca3fbc12bc197064c65acda5ee 100644
(file)
--- a/
m4/mdw-libtool-version-info.m4
+++ b/
m4/mdw-libtool-version-info.m4
@@
-42,7
+42,14
@@
dnl -*-autoconf-*-
# serial 1
AC_DEFUN([mdw_LIBTOOL_VERSION_INFO],
-[set -- $(echo $PACKAGE_VERSION |
- sed 's:[^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$]:\1 \2 \3:')
+[case $PACKAGE_VERSION in
+ UNKNOWN)
+ set -- 0 0 0
+ ;;
+ *)
+ num="\(@<:@0-9@:>@@<:@0-9@:>@*\)"
+ set -- $(echo $PACKAGE_VERSION | sed "s:^$num\.$num\.$num.*\$:\1 \2 \3:")
+ ;;
+esac
LIBTOOL_VERSION_INFO="$(expr $[]1 + $[]2):$[]3:$[]2"
AC_SUBST([LIBTOOL_VERSION_INFO])])