blob: e6aaa603f95d2d096b9091d35f0ddd2165d69301 [file] [log] [blame]
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +11001dnl @synopsis XIPH_GCC_VERSION
2dnl
3dnl Find the version of gcc.
4dnl @version 1.0 Nov 05 2007
Erik de Castro Lopo11efaa32013-03-10 12:30:49 +11005dnl @version 1.1 Mar 10 2013
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +11006dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
7dnl
8dnl Permission to use, copy, modify, distribute, and sell this file for any
9dnl purpose is hereby granted without fee, provided that the above copyright
10dnl and this permission notice appear in all copies. No representations are
11dnl made about the suitability of this software for any purpose. It is
12dnl provided "as is" without express or implied warranty.
13dnl
14
15AC_DEFUN([XIPH_GCC_VERSION],
16[
17if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
18
19 AC_MSG_CHECKING([for version of $CC])
20 GCC_VERSION=`$CC -dumpversion`
21 AC_MSG_RESULT($GCC_VERSION)
22
Erik de Castro Lopo11efaa32013-03-10 12:30:49 +110023 GCC_MAJOR_VERSION=`echo $GCC_VERSION | cut -d. -f 1`
24 GCC_MINOR_VERSION=`echo $GCC_VERSION | cut -d. -f 2`
sezerod4a1b342019-10-08 20:25:55 +030025else
26 GCC_MAJOR_VERSION=0
27 GCC_MINOR_VERSION=0
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +110028 fi
29
30AC_SUBST(GCC_VERSION)
31AC_SUBST(GCC_MAJOR_VERSION)
32AC_SUBST(GCC_MINOR_VERSION)
33
34])# XIPH_GCC_VERSION