diff options
author | dfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 21:29:19 +0000 |
---|---|---|
committer | dfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 21:29:19 +0000 |
commit | 6d05ab309230bfed8c11ecbfd3bdf1ffa9c97046 (patch) | |
tree | b4e6288cdbc6f46b798c63a9ba2a46d428fc6550 /config | |
parent | 703e81666a4c1e2f64fc23c1fcaefd816fcbb87c (diff) | |
download | gcc-6d05ab309230bfed8c11ecbfd3bdf1ffa9c97046.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 6 | ||||
-rw-r--r-- | config/acx.m4 | 28 |
2 files changed, 34 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index f79f84a5a29..0b1dadae2fe 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,9 @@ +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. + 2007-01-27 Paolo Bonzini <bonzini@gnu.org> * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make diff --git a/config/acx.m4 b/config/acx.m4 index c2cf0e874dd..ac3cd183a2e 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 +]) |