diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-09 03:45:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:18:02 -0500 |
commit | 05f98cdbfc64b549f4530a5e6aba0dcf3f536a87 (patch) | |
tree | 456d966af1df96c277dfbf50473370934ca0675e /source4 | |
parent | 27126bae7e7d04d24e5ce6dc1c0767c70511fef4 (diff) | |
download | samba-05f98cdbfc64b549f4530a5e6aba0dcf3f536a87.tar.gz samba-05f98cdbfc64b549f4530a5e6aba0dcf3f536a87.tar.bz2 samba-05f98cdbfc64b549f4530a5e6aba0dcf3f536a87.zip |
r18287: add support for the -qlanglvl=extc99 and -qlanglvl=stdc99 flags,
needed on AIX 5.2 for C99 structures
(This used to be commit 2dc9239a3621f48fbb410a60fee61d70f85ada91)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/replace/libreplace_macros.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_macros.m4 b/source4/lib/replace/libreplace_macros.m4 index a50104cd1c..03ef97d157 100644 --- a/source4/lib/replace/libreplace_macros.m4 +++ b/source4/lib/replace/libreplace_macros.m4 @@ -29,6 +29,24 @@ if test x"$c99_init" = x"no"; then [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) fi if test x"$c99_init" = x"no"; then + AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=extc99) + CFLAGS="$saved_CFLAGS -qlanglvl=extc99"; + AC_TRY_COMPILE([#include <stdio.h>], + [ struct foo {int x;char y;}; + struct foo bar = { .y = 'X', .x = 1 }; + ], + [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) +fi +if test x"$c99_init" = x"no"; then + AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=stdc99) + CFLAGS="$saved_CFLAGS -qlanglvl=stdc99"; + AC_TRY_COMPILE([#include <stdio.h>], + [ struct foo {int x;char y;}; + struct foo bar = { .y = 'X', .x = 1 }; + ], + [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)]) +fi +if test x"$c99_init" = x"no"; then AC_MSG_CHECKING(for C99 designated initializers with -c99) CFLAGS="$saved_CFLAGS -c99" AC_TRY_COMPILE([#include <stdio.h>], |