Skip to content

Commit

Permalink
Initial DEC/Compaq C compiler detection and flags
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Jul 16, 2008
1 parent 2cfb8a2 commit 3a70569
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ares/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,22 @@ else
AC_MSG_RESULT([no])
fi

AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler])
CURL_CHECK_DEF([__DECC], [], [silent])
CURL_CHECK_DEF([__DECC_VER], [], [silent])
if test "$curl_cv_have_def___DECC" = "yes" ||
test "$curl_cv_have_def___DECC_VER" = "yes"; then
AC_MSG_RESULT([yes])
dnl Select strict ANSI C compiler mode
CFLAGS="$CFLAGS -std1"
dnl Generate verbose messages for errors and warnings
CFLAGS="$CFLAGS -verbose"
dnl Generate warnings for missing function prototypes
CFLAGS="$CFLAGS -warnprotos"
else
AC_MSG_RESULT([no])
fi

CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE

Expand Down
16 changes: 16 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,22 @@ else
AC_MSG_RESULT([no])
fi

AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler])
CURL_CHECK_DEF([__DECC], [], [silent])
CURL_CHECK_DEF([__DECC_VER], [], [silent])
if test "$curl_cv_have_def___DECC" = "yes" ||
test "$curl_cv_have_def___DECC_VER" = "yes"; then
AC_MSG_RESULT([yes])
dnl Select strict ANSI C compiler mode
CFLAGS="$CFLAGS -std1"
dnl Generate verbose messages for errors and warnings
CFLAGS="$CFLAGS -verbose"
dnl Generate warnings for missing function prototypes
CFLAGS="$CFLAGS -warnprotos"
else
AC_MSG_RESULT([no])
fi

CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE

Expand Down

0 comments on commit 3a70569

Please sign in to comment.