From eacd5715f52cf3294194ccaa0a072a5d196a46a7 Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 12 Nov 2003 17:18:49 +0000 Subject: [PATCH] [project @ 2003-11-12 17:18:48 by sof] FP_EMPTY_STRUCTS: empty struct feature test --- aclocal.m4 | 18 ++++++++++++++++++ configure.ac | 2 ++ 2 files changed, 20 insertions(+) diff --git a/aclocal.m4 b/aclocal.m4 index 3d93292..7472ce3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1109,4 +1109,22 @@ dnl and we don't want to be global namespace polluters. AC_LANG_RESTORE ]) + +dnl @synopsis FP_EMPTY_STRUCTS +dnl +dnl Check whether empty structs is accepted by CC. +dnl +AC_DEFUN(FP_EMPTY_STRUCTS, +[AC_CACHE_CHECK(empty struct support, fptools_cv_empty_structs, +[AC_TRY_COMPILE([ +typedef struct { /*empty*/ } StgFoo; +], +[int i;], +fptools_cv_empty_structs=yes, +fptools_cv_empty_structs=no)]) +if test "$fptools_cv_empty_structs" = yes; then +AC_DEFINE([SUPPORTS_EMPTY_STRUCTS], [1], [Define to 1 if C compiler supports declaration of empty structure types.]) +fi +]) + # LocalWords: fi diff --git a/configure.ac b/configure.ac index baa2f7d..b5bdbb2 100644 --- a/configure.ac +++ b/configure.ac @@ -1403,6 +1403,8 @@ esac AC_SUBST(LdCmd) FPTOOLS_LD_X +FP_EMPTY_STRUCTS + AC_MSG_CHECKING([for SIGPOLL]) AC_EGREP_CPP(we_have_sigpoll, [#include -- 1.7.10.4