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