Skip to content

Commit

Permalink
Workaround Solaris autoconf interaction to look for C99.
Browse files Browse the repository at this point in the history
The ICC check seems to abort prematurely, so doing the test from
within the function doesn't work.  Instead, get the vars set, and do
the check based on the var values.
  • Loading branch information
dustin committed Feb 13, 2009
1 parent 74e80c7 commit 725c26f
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions configure.ac
Expand Up @@ -20,23 +20,20 @@ AC_DEFUN([DETECT_ICC],
if test "$GCC" = "yes"; then
dnl check if this is icc acting as gcc in disguise
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
dnl action if the text is found, this it has not been replaced by the
dnl cpp
ICC="no"
[$2],
dnl the text was not found, it was replaced by the cpp
ICC="yes"
AC_MSG_RESULT([no])
[$2]
ICC="no",
AC_MSG_RESULT([yes])
[$1]
)
fi
if test "$ICC" = "no"; then
# this is not ICC
AC_MSG_RESULT([no])
ICC="yes")
fi
])

DETECT_ICC([], [AC_PROG_CC_C99])
DETECT_ICC([], [])

if test "$ICC" == "no"; then
AC_PROG_CC_C99
fi

AM_PROG_CC_C_O
AC_PROG_INSTALL
Expand Down

0 comments on commit 725c26f

Please sign in to comment.