[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix STEPMAKE_GET_VERSION for OpenBSD
From: |
Matthias Kilian |
Subject: |
Fix STEPMAKE_GET_VERSION for OpenBSD |
Date: |
Sun, 13 Dec 2009 20:14:45 +0100 |
User-agent: |
Mutt/1.4.2.3i |
Hi,
I have this as a patch in the lilypond port of OpenBSD for years
(since 2006, IIRC), and it looks like I still need it for the
development branch. Without this, configure isn't able to detect
the versions of at least texi2html, makeinfo and bison. (I really
don't remember the reason, too much time has passed since I made
this patch)
Please be sure that it doesn't blow up configure on other systems.
Ciao,
Kili
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index 83c07c3..59a2267 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -32,9 +32,14 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [
## for compatibility reasons.
## grab the first version number in --version output.
- eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '\(^\|
\)[0-9][0-9]*\.[0-9]' \
- | head -n 1 \
- | tr ' ' '\n' | sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' | grep
'\(^\| \)[0-9][0-9]*\.[0-9]' | head -n 1\`\"
+ eval '_ver=\`'"$1"' --version 2>&1\` || _ver=\`'"$1"' -V 2>&1\` &&
+ _ver=\`echo $_ver |
+ grep '\''[0-9]\.[0-9]'\'' |
+ head -n 1 |
+ tr '\'' '\'' '\''\n'\'' |
+ grep '\''[0-9]\.[0-9]'\'' |
+ head -n 1 |
+ sed '\''s/\([0-9.]*\).*/\1/g'\''\`'
if test -z "$_ver"; then
## If empty, try date [fontforge]