Home | History | Annotate | Line # | Download | only in m4
ax_gcc_version.m4 revision 1.1.1.1.4.2
      1  1.1.1.1.4.2  yamt # ===========================================================================
      2  1.1.1.1.4.2  yamt #      http://www.gnu.org/software/autoconf-archive/ax_gcc_version.html
      3  1.1.1.1.4.2  yamt # ===========================================================================
      4  1.1.1.1.4.2  yamt #
      5  1.1.1.1.4.2  yamt # SYNOPSIS
      6  1.1.1.1.4.2  yamt #
      7  1.1.1.1.4.2  yamt #   AX_GCC_VERSION
      8  1.1.1.1.4.2  yamt #
      9  1.1.1.1.4.2  yamt # DESCRIPTION
     10  1.1.1.1.4.2  yamt #
     11  1.1.1.1.4.2  yamt #   This macro retrieves the gcc version and returns it in the GCC_VERSION
     12  1.1.1.1.4.2  yamt #   variable if available, an empty string otherwise.
     13  1.1.1.1.4.2  yamt #
     14  1.1.1.1.4.2  yamt # LICENSE
     15  1.1.1.1.4.2  yamt #
     16  1.1.1.1.4.2  yamt #   Copyright (c) 2009 Francesco Salvestrini <salvestrini (a] users.sourceforge.net>
     17  1.1.1.1.4.2  yamt #
     18  1.1.1.1.4.2  yamt #   This program is free software; you can redistribute it and/or modify it
     19  1.1.1.1.4.2  yamt #   under the terms of the GNU General Public License as published by the
     20  1.1.1.1.4.2  yamt #   Free Software Foundation; either version 2 of the License, or (at your
     21  1.1.1.1.4.2  yamt #   option) any later version.
     22  1.1.1.1.4.2  yamt #
     23  1.1.1.1.4.2  yamt #   This program is distributed in the hope that it will be useful, but
     24  1.1.1.1.4.2  yamt #   WITHOUT ANY WARRANTY; without even the implied warranty of
     25  1.1.1.1.4.2  yamt #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
     26  1.1.1.1.4.2  yamt #   Public License for more details.
     27  1.1.1.1.4.2  yamt #
     28  1.1.1.1.4.2  yamt #   You should have received a copy of the GNU General Public License along
     29  1.1.1.1.4.2  yamt #   with this program. If not, see <http://www.gnu.org/licenses/>.
     30  1.1.1.1.4.2  yamt #
     31  1.1.1.1.4.2  yamt #   As a special exception, the respective Autoconf Macro's copyright owner
     32  1.1.1.1.4.2  yamt #   gives unlimited permission to copy, distribute and modify the configure
     33  1.1.1.1.4.2  yamt #   scripts that are the output of Autoconf when processing the Macro. You
     34  1.1.1.1.4.2  yamt #   need not follow the terms of the GNU General Public License when using
     35  1.1.1.1.4.2  yamt #   or distributing such scripts, even though portions of the text of the
     36  1.1.1.1.4.2  yamt #   Macro appear in them. The GNU General Public License (GPL) does govern
     37  1.1.1.1.4.2  yamt #   all other use of the material that constitutes the Autoconf Macro.
     38  1.1.1.1.4.2  yamt #
     39  1.1.1.1.4.2  yamt #   This special exception to the GPL applies to versions of the Autoconf
     40  1.1.1.1.4.2  yamt #   Macro released by the Autoconf Archive. When you make and distribute a
     41  1.1.1.1.4.2  yamt #   modified version of the Autoconf Macro, you may extend this special
     42  1.1.1.1.4.2  yamt #   exception to the GPL to apply to your modified version as well.
     43  1.1.1.1.4.2  yamt 
     44  1.1.1.1.4.2  yamt #serial 7
     45  1.1.1.1.4.2  yamt 
     46  1.1.1.1.4.2  yamt AC_DEFUN([AX_GCC_VERSION], [
     47  1.1.1.1.4.2  yamt   GCC_VERSION=""
     48  1.1.1.1.4.2  yamt   AX_GCC_OPTION([-dumpversion],[],[],[
     49  1.1.1.1.4.2  yamt     ax_gcc_version_option=yes
     50  1.1.1.1.4.2  yamt   ],[
     51  1.1.1.1.4.2  yamt     ax_gcc_version_option=no
     52  1.1.1.1.4.2  yamt   ])
     53  1.1.1.1.4.2  yamt   AS_IF([test "x$GCC" = "xyes"],[
     54  1.1.1.1.4.2  yamt     AS_IF([test "x$ax_gcc_version_option" != "xno"],[
     55  1.1.1.1.4.2  yamt       AC_CACHE_CHECK([gcc version],[ax_cv_gcc_version],[
     56  1.1.1.1.4.2  yamt         ax_cv_gcc_version="`$CC -dumpversion`"
     57  1.1.1.1.4.2  yamt         AS_IF([test "x$ax_cv_gcc_version" = "x"],[
     58  1.1.1.1.4.2  yamt           ax_cv_gcc_version=""
     59  1.1.1.1.4.2  yamt         ])
     60  1.1.1.1.4.2  yamt       ])
     61  1.1.1.1.4.2  yamt       GCC_VERSION=$ax_cv_gcc_version
     62  1.1.1.1.4.2  yamt     ])
     63  1.1.1.1.4.2  yamt   ])
     64  1.1.1.1.4.2  yamt   AC_SUBST([GCC_VERSION])
     65  1.1.1.1.4.2  yamt ])
     66