diff options
author | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-12 20:56:05 +0000 |
---|---|---|
committer | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-12 20:56:05 +0000 |
commit | 667fe30ba9e2bb2c75a5e8692eed2aa788b690e0 (patch) | |
tree | eb5c8990d5b8f0d4202f0985c057133b55b6f03a /gcc/aclocal.m4 | |
parent | cdc17ff2f9a9861e97ca391faac06453ce26608c (diff) | |
download | gcc-667fe30ba9e2bb2c75a5e8692eed2aa788b690e0.tar.gz |
* aclocal.m4: Introduce gcc_GAS_VERSION_GTE_IFELSE,
_gcc_COMPUTE_GAS_VERSION.
* configure.in: Use them.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r-- | gcc/aclocal.m4 | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index 6e5fa4ab6a3..9b19affc4a3 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -1642,3 +1642,53 @@ if test $enable_initfini_array = yes; then AC_DEFINE(HAVE_INITFINI_ARRAY, 1, [Define .init_array/.fini_array sections are available and working.]) fi]) + +dnl # _gcc_COMPUTE_GAS_VERSION +dnl # Used by gcc_GAS_VERSION_GTE_IFELSE +dnl # +dnl # WARNING: +dnl # gcc_cv_as_gas_srcdir must be defined before this. +dnl # This gross requirement will go away eventually. +AC_DEFUN([_gcc_COMPUTE_GAS_VERSION], +[gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd +for f in $gcc_cv_as_bfd_srcdir/configure \ + $gcc_cv_as_gas_srcdir/configure \ + $gcc_cv_as_gas_srcdir/configure.in \ + $gcc_cv_as_gas_srcdir/Makefile.in ; do + gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f` + if test x$gcc_cv_gas_version != x; then + break + fi +done +gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"` +gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"` +gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)"` +]) []dnl # _gcc_COMPUTE_GAS_VERSION + +dnl # gcc_GAS_VERSION_GTE_IFELSE(major, minor, patchlevel, +dnl # [command_if_true = :], [command_if_false = :]) +dnl # Check to see if the version of GAS is greater than or +dnl # equal to the specified version. +dnl # +dnl # The first ifelse() shortens the shell code if the patchlevel +dnl # is unimportant (the usual case). The others handle missing +dnl # commands. Note that the tests are structured so that the most +dnl # common version number cases are tested first. +AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE], +[AC_REQUIRE([_gcc_COMPUTE_GAS_VERSION]) []dnl +ifelse([$3],[0], +[if test $gcc_cv_gas_major_version -eq $1 \ +&& test $gcc_cv_gas_minor_version -ge $2 \ +|| test $gcc_cv_gas_major_version -gt $1 ; then +], +[if test $gcc_cv_gas_major_version -eq $1 \ +&& (test $gcc_cv_gas_minor_version -gt $2 \ + || (test $gcc_cv_gas_minor_version -eq $2 \ + && test $gcc_cv_gas_patch_version -ge $3 )) \ +|| test $gcc_cv_gas_major_version -gt $1 ; then +]) +ifelse([$4],[],[:],[$4]) +ifelse([$5],[],[],[else $5]) +fi +]) []dnl # gcc_GAS_VERSION_GTE_IFELSE + |