summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2010-10-16 01:05:15 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-10-16 01:05:15 +0200
commitb95f11aa0a7887f5eb8eb8e2e0f09532bc3604ba (patch)
tree0f11b2afe7c2eaa453b8831aba41c31d2944ee9a /acinclude.m4
parent48b0a901b8056957e36ba52ae4416d656971bb47 (diff)
Don't set pedantic to yes if using ICC
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..be5d149
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,17 @@
+dnl ##############################################################################
+dnl # AC_CHECK_LANG_ICC #
+dnl # Check if the current language is compiled using ICC #
+dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 #
+dnl ##############################################################################
+AC_DEFUN([AC_CHECK_LANG_ICC],
+ [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler],
+ [ac_cv_[]_AC_LANG_ABBREV[]_intel_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#ifndef __INTEL_COMPILER
+ error if not ICC
+#endif
+]])],
+ [is_icc=yes],
+ [is_icc=no])
+ac_cv_[]_AC_LANG_ABBREV[]_intel_compiler=$is_icc
+])])