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