mirror of
https://github.com/zeromq/libzmq.git
synced 2025-05-29 15:34:09 +02:00
Don't set pedantic to yes if using ICC
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
This commit is contained in:
parent
48b0a901b8
commit
b95f11aa0a
17
acinclude.m4
Normal file
17
acinclude.m4
Normal file
@ -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
|
||||||
|
])])
|
13
configure.in
13
configure.in
@ -53,8 +53,13 @@ LIBZMQ_EXTRA_CXXFLAGS=""
|
|||||||
# Extra LDFLAGS are appended at the end of LDFLAGS for libzmq.
|
# Extra LDFLAGS are appended at the end of LDFLAGS for libzmq.
|
||||||
LIBZMQ_EXTRA_LDFLAGS=""
|
LIBZMQ_EXTRA_LDFLAGS=""
|
||||||
|
|
||||||
# By default compiling with -pedantic except QNX and OSX.
|
# Enable -pedantic if not using icc, this may be overridden later
|
||||||
pedantic="yes"
|
AC_CHECK_LANG_ICC
|
||||||
|
if test "xyes" = "x$ac_cv_c_intel_compiler" -o "xyes" = "x$ac_cv_cpp_intel_compiler"; then
|
||||||
|
pedantic="no"
|
||||||
|
else
|
||||||
|
pedantic="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
#By default compiling with -Werror except OSX.
|
#By default compiling with -Werror except OSX.
|
||||||
werror="yes"
|
werror="yes"
|
||||||
@ -325,11 +330,11 @@ if test "x$gnu_compilers" = "xyes" -a "x$pgm_ext" = "xno"; then
|
|||||||
CPPFLAGS="-Wall $CPPFLAGS"
|
CPPFLAGS="-Wall $CPPFLAGS"
|
||||||
|
|
||||||
if test "x$pedantic" = "xyes"; then
|
if test "x$pedantic" = "xyes"; then
|
||||||
CPPFLAGS="-pedantic $CPPFLAGS"
|
CPPFLAGS="-pedantic $CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$werror" = "xyes"; then
|
if test "x$werror" = "xyes"; then
|
||||||
CPPFLAGS="-Werror $CPPFLAGS"
|
CPPFLAGS="-Werror $CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user