X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=7472ce38eed83be90b766dd0221d8cde7c94f7c4;hb=b9267a7e597428ad9c8ce3a06e452dcfe7226300;hp=3d93292f481a43256e01615fc6e652bd159b1e02;hpb=6c20d552d0d9d307ddaa9c032fd031c743a85a79;p=ghc-hetmet.git 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