<div dir="ltr">Thanks. merged.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 17, 2015 at 2:35 AM, Alan Coopersmith <span dir="ltr"><<a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Passing -Werror in the scandir() checks caused Studio cc to report<br>
"Unrecognized option errors", confusing configure into thinking that<br>
scandir() was not available.   Use Studio equivalent flags instead.<br>
<br>
Leaves -Werror as the default for all other compilers, including<br>
unknown ones, to flag to them that they need to update their flags<br>
as well if -Werror is not correct for them.<br>
<br>
Signed-off-by: Alan Coopersmith <<a href="mailto:alan.coopersmith@oracle.com">alan.coopersmith@oracle.com</a>><br>
---<br>
 <a href="http://configure.ac" target="_blank">configure.ac</a> |   13 ++++++++++++-<br>
 1 file changed, 12 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/<a href="http://configure.ac" target="_blank">configure.ac</a> b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
index 457dc2c..9011f37 100644<br>
--- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
@@ -103,11 +103,22 @@ if test "$os_win32" = "yes"; then<br>
 fi<br>
 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)<br>
<br>
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])<br>
 WARN_CFLAGS=""<br>
+WERROR_CFLAGS="-Werror"<br>
+WARNING_CPP_DIRECTIVE="no"<br>
 if test "x$GCC" = "xyes"; then<br>
        WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \<br>
        -Wmissing-prototypes -Wmissing-declarations \<br>
        -Wnested-externs -fno-strict-aliasing"<br>
+       WARNING_CPP_DIRECTIVE="yes"<br>
+elif test "x$SUNCC" = "xyes"; then<br>
+       WARN_CFLAGS="-v -fd"<br>
+       WERROR_CFLAGS="-errtags \<br>
+       -errwarn=%all,no%E_OLD_STYLE_FUNC_DEF,no%E_STATEMENT_NOT_REACHED"<br>
+       WARNING_CPP_DIRECTIVE="yes"<br>
+fi<br>
+if test "x$WARNING_CPP_DIRECTIVE" = "xyes"; then<br>
        AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,<br>
        [Can use #warning in C files])<br>
 fi<br>
@@ -159,7 +170,7 @@ AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1<br>
 if test "$os_win32" = "no"; then<br>
        AC_MSG_CHECKING([for scandir])<br>
        fc_saved_CFLAGS="$CFLAGS"<br>
-       CFLAGS="$CFLAGS $WARN_CFLAGS -Werror"<br>
+       CFLAGS="$CFLAGS $WARN_CFLAGS $WERROR_CFLAGS"<br>
        AC_TRY_COMPILE([<br>
                #include <dirent.h><br>
                int main(void);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.2<br>
<br>
_______________________________________________<br>
Fontconfig mailing list<br>
<a href="mailto:Fontconfig@lists.freedesktop.org">Fontconfig@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/fontconfig" target="_blank">http://lists.freedesktop.org/mailman/listinfo/fontconfig</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Akira TAGOH</div>
</div>