include/share/private.h : Add FLAC_API to private functions.
[platform/upstream/flac.git] / m4 / gcc_version.m4
1 dnl @synopsis XIPH_GCC_VERSION
2 dnl
3 dnl Find the version of gcc.
4 dnl @version 1.0        Nov 05 2007
5 dnl @version 1.1        Mar 10 2013
6 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
7 dnl
8 dnl Permission to use, copy, modify, distribute, and sell this file for any
9 dnl purpose is hereby granted without fee, provided that the above copyright
10 dnl and this permission notice appear in all copies.  No representations are
11 dnl made about the suitability of this software for any purpose.  It is
12 dnl provided "as is" without express or implied warranty.
13 dnl
14
15 AC_DEFUN([XIPH_GCC_VERSION],
16 [
17 if 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
23         GCC_MAJOR_VERSION=`echo $GCC_VERSION | cut -d. -f 1`
24         GCC_MINOR_VERSION=`echo $GCC_VERSION | cut -d. -f 2`
25         fi
26
27 AC_SUBST(GCC_VERSION)
28 AC_SUBST(GCC_MAJOR_VERSION)
29 AC_SUBST(GCC_MINOR_VERSION)
30
31 ])# XIPH_GCC_VERSION