Mercurial > hg > sv-dependency-builds
annotate src/libsndfile-1.0.27/M4/gcc_version.m4 @ 40:1df64224f5ac
Current libsndfile source
| author | Chris Cannam |
|---|---|
| date | Tue, 18 Oct 2016 13:22:47 +0100 |
| parents | |
| children |
| rev | line source |
|---|---|
| Chris@40 | 1 dnl @synopsis MN_GCC_VERSION |
| Chris@40 | 2 dnl |
| Chris@40 | 3 dnl Find the version of gcc. |
| Chris@40 | 4 dnl @version 1.0 Nov 05 2007 |
| Chris@40 | 5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com> |
| Chris@40 | 6 dnl |
| Chris@40 | 7 dnl Permission to use, copy, modify, distribute, and sell this file for any |
| Chris@40 | 8 dnl purpose is hereby granted without fee, provided that the above copyright |
| Chris@40 | 9 dnl and this permission notice appear in all copies. No representations are |
| Chris@40 | 10 dnl made about the suitability of this software for any purpose. It is |
| Chris@40 | 11 dnl provided "as is" without express or implied warranty. |
| Chris@40 | 12 dnl |
| Chris@40 | 13 |
| Chris@40 | 14 AC_DEFUN([MN_GCC_VERSION], |
| Chris@40 | 15 [ |
| Chris@40 | 16 if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then |
| Chris@40 | 17 |
| Chris@40 | 18 AC_MSG_CHECKING([for version of $CC]) |
| Chris@40 | 19 GCC_VERSION=`$CC -dumpversion` |
| Chris@40 | 20 AC_MSG_RESULT($GCC_VERSION) |
| Chris@40 | 21 |
| Chris@40 | 22 changequote(,)dnl |
| Chris@40 | 23 GCC_MAJOR_VERSION=`echo $GCC_VERSION | sed "s/\..*//"` |
| Chris@40 | 24 GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/$GCC_MAJOR_VERSION\.//" | sed "s/\..*//"` |
| Chris@40 | 25 changequote([,])dnl |
| Chris@40 | 26 fi |
| Chris@40 | 27 |
| Chris@40 | 28 AC_SUBST(GCC_VERSION) |
| Chris@40 | 29 AC_SUBST(GCC_MAJOR_VERSION) |
| Chris@40 | 30 AC_SUBST(GCC_MINOR_VERSION) |
| Chris@40 | 31 |
| Chris@40 | 32 ])# MN_GCC_VERSION |
| Chris@40 | 33 |
