<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS=-I m4
 AUTOMAKE_OPTIONS = subdir-objects
 
-AM_CFLAGS = -g -Wall -Werror
+AM_CFLAGS = -g
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libstrophe.pc</diff>
      <filename>Makefile.am</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,63 @@ AC_PROG_LIBTOOL
 
 AC_PROG_CC
 
+dnl **********************************************************************
+dnl DETECT_ICC ([ACTION-IF-YES], [ACTION-IF-NO])
+dnl
+dnl check if this is the Intel ICC compiler, and if so run the ACTION-IF-YES
+dnl sets the $ICC variable to &quot;yes&quot; or &quot;no&quot;
+dnl **********************************************************************
+AC_DEFUN([DETECT_ICC],
+[
+    ICC=&quot;no&quot;
+    AC_MSG_CHECKING([for icc in use])
+    if test &quot;$GCC&quot; = &quot;yes&quot;; then
+       dnl check if this is icc acting as gcc in disguise
+       AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
+         AC_MSG_RESULT([no])
+         [$2],
+         AC_MSG_RESULT([yes])
+         [$1]
+         ICC=&quot;yes&quot;)
+    else
+       AC_MSG_RESULT([no])
+       [$2]
+    fi
+])
+
+DETECT_ICC([], [])
+
+dnl **********************************************************************
+dnl DETECT_SUNCC ([ACTION-IF-YES], [ACTION-IF-NO])
+dnl
+dnl check if this is the Sun Studio compiler, and if so run the ACTION-IF-YES
+dnl sets the $SUNCC variable to &quot;yes&quot; or &quot;no&quot;
+dnl **********************************************************************
+AC_DEFUN([DETECT_SUNCC],
+[
+    SUNCC=&quot;no&quot;
+    AC_MSG_CHECKING([for Sun cc in use])
+    AC_RUN_IFELSE(
+      [AC_LANG_PROGRAM([], [dnl
+#ifdef __SUNPRO_C
+   return 0;
+#else
+   return 1;
+#endif
+      ])
+    ],[
+       AC_MSG_RESULT([yes])
+       [$1]
+       SUNCC=&quot;yes&quot;
+    ], [
+       AC_MSG_RESULT([no])
+       [$2]
+    ])
+])
+
+DETECT_SUNCC([CFLAGS=&quot;-mt $CFLAGS&quot;], [])
+
+
 AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([couldn't find openssl headers, openssl required])])
 
 # check for 'check' unit-testing framework
@@ -55,5 +112,31 @@ AC_DEFINE_UNQUOTED([BYTEORDER], [$byteorder])
 AC_SUBST(PARSER_NAME)
 AC_SUBST(PARSER_CFLAGS)
 AC_SUBST(PARSER_LIBS)
+
+dnl Let the compiler be a bit more picky. Please note that you cannot
+dnl specify these flags to the compiler before AC_CHECK_FUNCS, because
+dnl the test program will generate a compilation warning and hence fail
+dnl to detect the function ;-)if test &quot;$ICC&quot; = &quot;yes&quot;
+dnl Lines borrowed from memcached 1.4.2
+if test &quot;$ICC&quot; = &quot;yes&quot;
+then
+   dnl ICC trying to be gcc.
+   CFLAGS=&quot;$CFLAGS -diag-disable 187 -Wall -Werror&quot;
+   AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
+elif test &quot;$GCC&quot; = &quot;yes&quot;
+then
+  GCC_VERSION=`$CC -dumpversion`
+  CFLAGS=&quot;$CFLAGS -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls&quot;
+  case $GCC_VERSION in
+    4.4.*)
+    CFLAGS=&quot;$CFLAGS -fno-strict-aliasing&quot;
+    ;;
+  esac
+  AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
+elif test &quot;$SUNCC&quot; = &quot;yes&quot;
+then
+  CFLAGS=&quot;$CFLAGS -errfmt=error -errtags -errwarn=%all,no%E_ATTRIBUTE_UNKNOWN,no%E_EMPTY_TRANSLATION_UNIT -errshort=tags&quot;
+fi
+
 AC_CONFIG_FILES([Makefile libstrophe.pc])
 AC_OUTPUT</diff>
      <filename>configure.ac</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b07153a7e4f22bb526cff932aeea285f35affdaf</id>
    </parent>
  </parents>
  <author>
    <name>Matt Ingenthron</name>
    <email>ingenthr@cep.net</email>
  </author>
  <url>http://github.com/dustin/libstrophe/commit/15b1ffca879a76573417ee952100f4a66563faec</url>
  <id>15b1ffca879a76573417ee952100f4a66563faec</id>
  <committed-date>2009-10-09T21:09:20-07:00</committed-date>
  <authored-date>2009-10-08T14:01:32-07:00</authored-date>
  <message>Added checks for compiler type, and then set warnings appropriately.</message>
  <tree>0838373c95088323c2a47d3ff5d4251eacf0e285</tree>
  <committer>
    <name>CaptTofu</name>
    <email>patg@patg.net</email>
  </committer>
</commit>
