cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 1 | # =========================================================================== |
| 2 | # http://www.gnu.org/software/autoconf-archive/ax_lang_compiler_ms.html |
| 3 | # =========================================================================== |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 4 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 5 | # SYNOPSIS |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 6 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 7 | # AX_LANG_COMPILER_MS |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 8 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 9 | # DESCRIPTION |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 10 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 11 | # Check whether the compiler for the current language is Microsoft. |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 12 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 13 | # This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU Autoconf |
| 14 | # implementation. |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 15 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 16 | # LICENSE |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 17 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 18 | # Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 19 | # |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 20 | # Copying and distribution of this file, with or without modification, are |
| 21 | # permitted in any medium without royalty provided the copyright notice |
| 22 | # and this notice are preserved. This file is offered as-is, without any |
| 23 | # warranty. |
| 24 | |
| 25 | #serial 8 |
| 26 | |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 27 | AC_DEFUN([AX_LANG_COMPILER_MS], |
| 28 | [AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler], |
| 29 | [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms], |
| 30 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER |
| 31 | choke me |
| 32 | #endif |
| 33 | ]])], |
| 34 | [ax_compiler_ms=yes], |
| 35 | [ax_compiler_ms=no]) |
| 36 | ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms |
| 37 | ])]) |