1 | dnl |
---|
2 | dnl Check whether the compiler for the current language is Microsoft. |
---|
3 | dnl |
---|
4 | dnl This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU Autoconf |
---|
5 | dnl implementation. |
---|
6 | dnl |
---|
7 | dnl version: 1.0 |
---|
8 | dnl author: Braden McDaniel <braden@endoframe.com> |
---|
9 | dnl |
---|
10 | dnl This program is free software; you can redistribute it and/or modify |
---|
11 | dnl it under the terms of the GNU General Public License as published by |
---|
12 | dnl the Free Software Foundation; either version 2, or (at your option) |
---|
13 | dnl any later version. |
---|
14 | dnl |
---|
15 | dnl This program is distributed in the hope that it will be useful, |
---|
16 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
18 | dnl GNU General Public License for more details. |
---|
19 | dnl |
---|
20 | dnl You should have received a copy of the GNU General Public License |
---|
21 | dnl along with this program; if not, write to the Free Software |
---|
22 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
---|
23 | dnl 02110-1301, USA. |
---|
24 | dnl |
---|
25 | dnl As a special exception, the you may copy, distribute and modify the |
---|
26 | dnl configure scripts that are the output of Autoconf when processing |
---|
27 | dnl the Macro. You need not follow the terms of the GNU General Public |
---|
28 | dnl License when using or distributing such scripts. |
---|
29 | dnl |
---|
30 | AC_DEFUN([AX_LANG_COMPILER_MS], |
---|
31 | [AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler], |
---|
32 | [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms], |
---|
33 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER |
---|
34 | choke me |
---|
35 | #endif |
---|
36 | ]])], |
---|
37 | [ax_compiler_ms=yes], |
---|
38 | [ax_compiler_ms=no]) |
---|
39 | ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms |
---|
40 | ])]) |
---|