3
# Determine any flags necessary to suppress informational messages from the
4
# compiler. Useful when setting the ac_[]_AC_LANG_ABBREV[]_werror_flag=yes
5
# because any extra output (stdout and stderr) will trigger an error.
6
# The xlf compiler is the only case thus far.
7
AC_DEFUN([GA_SUPPRESS_MESSAGE],
8
[AC_CACHE_CHECK([for _AC_LANG flag to suppress info messages],
9
[ga_cv_[]_AC_LANG_ABBREV[]_suppress],
10
[ga_save_[]_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS"
11
ga_save_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag
12
ac_[]_AC_LANG_ABBREV[]_werror_flag=yes
13
for flag in none -qsuppress=cmpmsg ; do
14
_AC_LANG_PREFIX[]FLAGS=$ga_save_[]_AC_LANG_PREFIX[]FLAGS
15
AS_IF([test "x$flag" != xnone],
16
[_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS $flag"])
17
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
18
[ga_cv_[]_AC_LANG_ABBREV[]_suppress="$flag"; break])
20
_AC_LANG_PREFIX[]FLAGS=$ga_save_[]_AC_LANG_PREFIX[]FLAGS
21
ac_[]_AC_LANG_ABBREV[]_werror_flag=$ga_save_werror_flag
23
]) # GA_SUPPRESS_MESSAGE