svn commit: samba r8868 - in branches/SAMBA_4_0/source/build/m4: .

metze at samba.org metze at samba.org
Sun Jul 31 22:31:54 GMT 2005


Author: metze
Date: 2005-07-31 22:31:53 +0000 (Sun, 31 Jul 2005)
New Revision: 8868

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8868

Log:
add comfigure check for c99 struct initialization,
which is required for samba4

metze
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4	2005-07-31 21:47:28 UTC (rev 8867)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4	2005-07-31 22:31:53 UTC (rev 8868)
@@ -70,6 +70,27 @@
 fi
 
 ############################################
+# check if the compiler handles c99 struct initialization
+AC_CACHE_CHECK([for c99 struct initialization],samba_cv_c99_struct_initialization, [
+    AC_TRY_COMPILE([
+#include <stdio.h>],
+[
+   struct foo {
+       int x;
+       char y;
+   } ;
+   struct foo bar = {
+   	.y = 'X',
+	.x = 1
+   };	 
+],
+	samba_cv_c99_struct_initialization=yes,samba_cv_c99_struct_initialization=no)])
+if test x"$samba_cv_c99_struct_initialization" != x"yes"; then
+	AC_MSG_WARN([C compiler does not support c99 struct initialization!])
+	AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
+fi
+
+############################################
 # check if the compiler can handle negative enum values
 AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
     AC_TRY_COMPILE([



More information about the samba-cvs mailing list