1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-18 19:33:16 +03:00
Files
samba-mirror/source/build/m4/smb_cc_features.m4
James Peach 82fab8b747 r10071: Configure checks for IRIX build environment. Test whether we can
use the MIPSPro 7.4 -c99 option to get C99 support. Try to find
a common perl that is more modern than /usr/bin/perl.
2007-10-10 13:36:34 -05:00

30 lines
747 B
Plaintext

dnl SMB Compiler Capability Checks
dnl -------------------------------------------------------
dnl Copyright (C) Stefan (metze) Metzmacher 2004,2005
dnl Released under the GNU GPL
dnl -------------------------------------------------------
dnl
############################################
# Check if the compiler handles c99 struct initialization.
# Usage: SMB_CC_SUPPORTS_C99_STRUCT_INIT(success-action,failure-action)
AC_DEFUN([SMB_CC_SUPPORTS_C99_STRUCT_INIT],
[
AC_MSG_CHECKING(for C99 designated initializers)
AC_TRY_COMPILE([
#include <stdio.h>],
[
struct foo {
int x;
char y;
} ;
struct foo bar = {
.y = 'X',
.x = 1
};
],
[AC_MSG_RESULT(yes); $1],[AC_MSG_RESULT(no); $2])
])