s4:samldb LDB module - make the "userAccountControl" and "groupType" modify handlers...
[kai/samba.git] / source4 / build / m4 / check_cc.m4
index 55802850b096ae3035a0e261f17b5e806b36edd4..8149a8ff55ee0e9729a2e349776808bb65916cfd 100644 (file)
@@ -16,6 +16,24 @@ if test x$ac_cv_prog_cc_g = xyes -a x$debug = xyes; then
        CFLAGS="${CFLAGS} -g"
 fi
 
+dnl ###########################################################################
+dnl _AC_LANG_COMPILER_SUNCC
+dnl Check whether the compiler for the current language is really Sun compiler.
+dnl ###########################################################################
+m4_define([AC_LANG_COMPILER_SUNCC],
+[AC_CACHE_CHECK([whether we are really using the Sun _AC_LANG compiler],
+                [ac_cv_[]_AC_LANG_ABBREV[]_compiler_suncc],
+[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __SUNPRO_C
+       choke me
+#endif
+]])],
+                   [ac_compiler_suncc=yes],
+                   [ac_compiler_suncc=no])
+ac_cv_[]_AC_LANG_ABBREV[]_compiler_suncc=$ac_compiler_suncc
+])])
+
+AC_LANG_COMPILER_SUNCC
+
 ############################################
 # check if the compiler handles c99 struct initialization
 LIBREPLACE_C99_STRUCT_INIT(samba_cv_c99_struct_initialization=yes,
@@ -45,7 +63,9 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_C
                return 0;
        }
 ],
-       samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)])
+       samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,
+       samba_cv_CC_NEGATIVE_ENUM_VALUES=no,
+       samba_cv_CC_NEGATIVE_ENUM_VALUES=yes)])
 if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
        AC_DEFINE(USE_UINT_ENUMS, 1, [Whether the compiler has uint enum support])
 fi
@@ -129,7 +149,7 @@ if test x$developer = xyes; then
            AC_SUBST(CFLAG_NO_CAST_QUAL)
            AX_CFLAGS_GCC_OPTION(-Wno-unused-macros, CFLAG_NO_UNUSED_MACROS)
            AC_SUBST(CFLAG_NO_UNUSED_MACROS)
-       else
+       elif test x"$ac_cv_c_compiler_suncc" != x"yes"; then
            AX_CFLAGS_IRIX_OPTION(-fullwarn, DEVELOPER_CFLAGS)
        fi