aboutsummaryrefslogtreecommitdiff
path: root/config/acx.m4
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2007-01-31 16:29:19 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2007-01-31 16:29:19 -0500
commit758a2c96339dc9a0134a9b717b2bb74b5b3fd91c (patch)
treeb4e6288cdbc6f46b798c63a9ba2a46d428fc6550 /config/acx.m4
parentd36114b201170944f503f59c2ae50b8d09989267 (diff)
downloadgcc-758a2c96339dc9a0134a9b717b2bb74b5b3fd91c.zip
gcc-758a2c96339dc9a0134a9b717b2bb74b5b3fd91c.tar.gz
gcc-758a2c96339dc9a0134a9b717b2bb74b5b3fd91c.tar.bz2
re PR libgomp/30546 (build fail in libgomp when building from SVN because makeinfo is missing)
2007-01-31 Daniel Franke <franke.daniel@gmail.com> PR libgomp/30546 * acx.m4 (ACX_PROG_CHECK_VER): Locate a program and check that its version is acceptable. From-SVN: r121439
Diffstat (limited to 'config/acx.m4')
-rw-r--r--config/acx.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4
index c2cf0e8..ac3cd18 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -491,3 +491,31 @@ else
fi
fi
AC_SUBST($2)])
+
+
+dnl Locate a program and check that its version is acceptable.
+dnl ACX_PROG_CHECK_VER(var, name, version-switch,
+dnl version-extract-regexp, version-glob)
+AC_DEFUN([ACX_CHECK_PROG_VER],[
+ AC_CHECK_PROG([$1], [$2], [$2])
+ if test -n "[$]$1"; then
+ # Found it, now check the version.
+ AC_CACHE_CHECK([for modern $2],
+ [gcc_cv_prog_$2_modern],
+ [ac_prog_version=`eval [$]$1 $3 2>&1 |
+ sed -n 's/^.*patsubst([[$4]],/,\/).*$/\1/p'`
+
+ [case $ac_prog_version in
+ '') gcc_cv_prog_$2_modern=no;;
+ $5) gcc_cv_prog_$2_modern=yes;;
+ *) gcc_cv_prog_$2_modern=no;;
+ esac]
+
+ if test $gcc_cv_prog_$2_modern = no; then
+ $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2"
+ fi
+ ])
+ else
+ gcc_cv_prog_$2_modern=no
+ fi
+])