summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/check_cc.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-06-01 16:23:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:24 -0500
commitde827cb9d9173ef09a37b45d6c7d30af9fe5c96e (patch)
tree058953d401c048c3352fd4ab3ae7fccfc1e80227 /source4/build/smb_build/check_cc.m4
parent60025b1d67466f214590f660c4521a618808aa99 (diff)
downloadsamba-de827cb9d9173ef09a37b45d6c7d30af9fe5c96e.tar.gz
samba-de827cb9d9173ef09a37b45d6c7d30af9fe5c96e.tar.bz2
samba-de827cb9d9173ef09a37b45d6c7d30af9fe5c96e.zip
r970: - remove unused wchar_t check
- move immediate structures check to the compiler checks metze (This used to be commit e2a322aa116de9977f6438f9eb6d2af42799ab83)
Diffstat (limited to 'source4/build/smb_build/check_cc.m4')
-rw-r--r--source4/build/smb_build/check_cc.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/build/smb_build/check_cc.m4 b/source4/build/smb_build/check_cc.m4
index b139dcc1da..91324180f9 100644
--- a/source4/build/smb_build/check_cc.m4
+++ b/source4/build/smb_build/check_cc.m4
@@ -51,3 +51,24 @@ AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
if test x"$samba_cv_volatile" = x"yes"; then
AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
fi
+
+############################################
+# check if the compiler can do immediate structures
+AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
+ AC_TRY_COMPILE([
+#include <stdio.h>],
+[
+ typedef struct {unsigned x;} FOOBAR;
+ #define X_FOOBAR(x) ((FOOBAR) { x })
+ #define FOO_ONE X_FOOBAR(1)
+ FOOBAR f = FOO_ONE;
+ static struct {
+ FOOBAR y;
+ } f2[] = {
+ {FOO_ONE}
+ };
+],
+ samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
+if test x"$samba_cv_immediate_structures" = x"yes"; then
+ AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures])
+fi