Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Thu, 15 Jun 2006 19:14:12 +0000 (19:14 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Thu, 15 Jun 2006 19:14:12 +0000 (19:14 +0000)
Purpose of commit: bugfix

Commit summary:
---------------

The Intel C Compiler (icc) claims to be gcc compatible, but
trys to interprets unknown options without error with fatal results...

2006-06-15  Thorsten Kukuk  <kukuk@thkukuk.de>

        * configure.in: Add special exceptions for icc: different
        compiler warnings, no PIE support.

ChangeLog
configure.in

index 0923a816b316fd5901a5bf8e1a48aac9a1967727..24f437c5db55faff93f6da8563f90e4f21f2f100 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-15  Thorsten Kukuk  <kukuk@thkukuk.de>
+
+       * configure.in: Add special exceptions for icc: different
+       compiler warnings, no PIE support.
+
 2006-06-14  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * libpam/pam_misc.c (_pam_strdup): Use strlen and strcpy.
index 23faeab631a997dfb2f44db8448e22fc3b8551a7..f265b835dc4195cace9e5df6c4987fda25737ef4 100644 (file)
@@ -71,7 +71,7 @@ AC_PROG_LIBTOOL
 # Largefile support
 AC_SYS_LARGEFILE
 
-if eval "test x$GCC = xyes"; then
+if eval "test x$GCC = xyes -a $CC != icc"; then
   for flag in \
       -W \
       -Wall \
@@ -90,6 +90,23 @@ if eval "test x$GCC = xyes"; then
     JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
   done
 fi
+if eval "test x$CC = xicc"; then
+  for flag in \
+      -Wall \
+      -Wmissing-prototypes \
+      -Wpointer-arith \
+      -Wreturn-type \
+      -Wstrict-prototypes \
+      -Wwrite-strings \
+      -Wshadow \
+      -Wp64 \
+      -Wdeprecated \
+      -Wuninitialized \
+      -Wmain
+  do
+    JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
+  done
+fi
 
 AC_C___ATTRIBUTE__
 
@@ -158,7 +175,7 @@ AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
 int foo;
 main () { return 0;}
 EOF
-  if test "$USE_PIE" = "yes" &&
+  if test "$USE_PIE" = "yes" -a "$CC" != "icc" &&
         AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fpie
                               -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
   then