diff options
author | Yang Tse <yangsita@gmail.com> | 2008-10-11 16:59:44 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-10-11 16:59:44 +0000 |
commit | a119114ad71a7a847ef15233ef783a00194e6eea (patch) | |
tree | dc791aa5b8a1529b759ec8b1851c03b321f570cd /m4 | |
parent | 430b1a22dbb3f004796d20177b361a501bb4c74a (diff) |
split SGI compiler check. One for MIPS C and another for MIPSpro C
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-compilers.m4 | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 42142f013..1a4e01d46 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -22,7 +22,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 21 +# serial 22 dnl CURL_CHECK_COMPILER @@ -47,7 +47,8 @@ AC_DEFUN([CURL_CHECK_COMPILER], [ CURL_CHECK_COMPILER_INTEL CURL_CHECK_COMPILER_GNU CURL_CHECK_COMPILER_LCC - CURL_CHECK_COMPILER_SGI + CURL_CHECK_COMPILER_SGI_MIPSpro_C + CURL_CHECK_COMPILER_SGI_MIPS _C CURL_CHECK_COMPILER_SUN CURL_CHECK_COMPILER_TINYC # @@ -244,18 +245,45 @@ AC_DEFUN([CURL_CHECK_COMPILER_LCC], [ ]) -dnl CURL_CHECK_COMPILER_SGI +dnl CURL_CHECK_COMPILER_SGI_MIPS_C dnl ------------------------------------------------- dnl Verify if the C compiler being used is SGI's. -AC_DEFUN([CURL_CHECK_COMPILER_SGI], [ - AC_MSG_CHECKING([whether we are using the SGI C compiler]) +AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [ + AC_REQUIRE([CURL_CHECK_COMPILER_SGI_MIPSpro_C])dnl + AC_MSG_CHECKING([if compiler is SGI MIPS C]) CURL_CHECK_DEF([__GNUC__], [], [silent]) CURL_CHECK_DEF([__sgi], [], [silent]) if test "$curl_cv_have_def___GNUC__" = "no" && - test "$curl_cv_have_def___sgi" = "yes"; then + test "$curl_cv_have_def___sgi" = "yes" && + test "$compiler_id" = "unknown"; then AC_MSG_RESULT([yes]) - compiler_id="SGIC" + compiler_id="SGI_MIPS_C" + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_yes="-g" + flags_dbg_off="-g0" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" + flags_opt_yes="-O2" + flags_opt_off="-O0" + else + AC_MSG_RESULT([no]) + fi +]) + + +dnl CURL_CHECK_COMPILER_SGI_MIPSpro_C +dnl ------------------------------------------------- +dnl Verify if the C compiler being used is SGI's. + +AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSpro_C], [ + AC_BEFORE([$0],[CURL_CHECK_COMPILER_SGI_MIPS_C])dnl + AC_MSG_CHECKING([if compiler is SGI MIPSpro C]) + CURL_CHECK_DEF([__GNUC__], [], [silent]) + CURL_CHECK_DEF([_SGI_COMPILER_VERSION], [], [silent]) + if test "$curl_cv_have_def___GNUC__" = "no" && + test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes"; then + AC_MSG_RESULT([yes]) + compiler_id="SGI_MIPSpro_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g" flags_dbg_off="-g0" @@ -520,7 +548,13 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [ tmp_CFLAGS="$tmp_CFLAGS -n" ;; # - SGIC) + SGI_MIPS_C) + # + dnl Placeholder + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + SGI_MIPSpro_C) # dnl Placeholder tmp_CFLAGS="$tmp_CFLAGS" @@ -792,13 +826,21 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ if test "$want_warnings" = "yes"; then dnl Highest warning level is double -A, next is single -A. dnl Due to the big number of warnings this triggers on third - dnl party header files it is impratical for to activate this + dnl party header files it is impratical for us to use this dnl warning level here. If you want them define it in CFLAGS. tmp_CFLAGS="$tmp_CFLAGS -A" fi ;; # - SGIC) + SGI_MIPS_C) + # + if test "$want_warnings" = "yes"; then + dnl Perform stricter semantic and lint-like checks + tmp_CFLAGS="$tmp_CFLAGS -fullwarn" + fi + ;; + # + SGI_MIPSpro_C) # if test "$want_warnings" = "yes"; then dnl Perform stricter semantic and lint-like checks |