Do not try to use gcc options with Intel compiler
This commit is contained in:
parent
9bdc129f60
commit
66781540ac
@ -49,29 +49,42 @@ AC_HELP_STRING([--enable-all-warnings],[enable lot of compiler warnings (default
|
|||||||
_moo_all_warnings="$withval"
|
_moo_all_warnings="$withval"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# icc pretends to be gcc or configure thinks it's gcc, but icc doesn't
|
||||||
|
# error on unknown options, so just don't try gcc options with icc
|
||||||
|
_MOO_ICC=false
|
||||||
|
_MOO_GCC=false
|
||||||
|
if test "$CC" = "icc"; then
|
||||||
|
_MOO_ICC=true
|
||||||
|
elif test "x$GCC" = "xyes"; then
|
||||||
|
_MOO_GCC=true
|
||||||
|
fi
|
||||||
|
|
||||||
MOO_DEBUG_CFLAGS=
|
MOO_DEBUG_CFLAGS=
|
||||||
if test "x$_moo_all_warnings" = "xyes"; then
|
if test "x$_moo_all_warnings" = "xyes"; then
|
||||||
if test "x$GCC" = "xyes"; then
|
if $_MOO_ICC; then
|
||||||
|
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS, [-Wall -Wcheck -w2 -wd981 -wd188 -wd869 -wd556 -wd810])
|
||||||
|
elif $_MOO_GCC; then
|
||||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS,
|
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS,
|
||||||
[-W -Wall -Wpointer-arith -Wcast-align -Wsign-compare -Winline -Wreturn-type dnl
|
[-W -Wall -Wpointer-arith -Wcast-align -Wsign-compare -Winline -Wreturn-type dnl
|
||||||
-Wwrite-strings -Wmissing-prototypes -Wmissing-declarations dnl
|
-Wwrite-strings -Wmissing-prototypes -Wmissing-declarations dnl
|
||||||
-Wmissing-noreturn -Wmissing-format-attribute -Wnested-externs dnl
|
-Wmissing-noreturn -Wmissing-format-attribute -Wnested-externs dnl
|
||||||
-Wdisabled-optimization])
|
-Wdisabled-optimization])
|
||||||
elif test "x$CC" = "icc"; then
|
|
||||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS, [-Wall -Wcheck -w2 -wd981 -wd188])
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if test x$GCC = "xyes"; then
|
if $_MOO_GCC; then
|
||||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS, [-Wall -W])
|
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS, [-Wall -W])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$GCC = "xyes"; then
|
m4_foreach([wname],[missing-field-initializers, unused, sign-compare],[dnl
|
||||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_W_NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
|
m4_define([_moo_WNAME],[MOO_W_NO_[]m4_bpatsubst(m4_toupper(wname),-,_)])
|
||||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_W_NO_UNUSED, [-Wno-unused])
|
_moo_WNAME=
|
||||||
AC_SUBST(MOO_W_NO_MISSING_FIELD_INITIALIZERS)
|
if $_MOO_GCC; then
|
||||||
AC_SUBST(MOO_W_NO_UNUSED)
|
_MOO_AC_CHECK_COMPILER_OPTIONS(_moo_WNAME,[-Wno-wname])
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(_moo_WNAME)
|
||||||
|
m4_undefine([_moo_WNAME])
|
||||||
|
])
|
||||||
|
|
||||||
if test "x$MOO_DEBUG" = "xyes"; then
|
if test "x$MOO_DEBUG" = "xyes"; then
|
||||||
_moo_debug_flags="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED dnl
|
_moo_debug_flags="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED dnl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user