r18266: we should bail out in configure if C99 structs are not support
authorStefan Metzmacher <metze@samba.org>
Fri, 8 Sep 2006 13:47:45 +0000 (13:47 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:58 +0000 (14:17 -0500)
tridge: I think we should create macros in libreplace_macros.m4
        and call them in check_cc.m4 instead of running the tests
in libreplace.m4. Maybe the macros should remember if they're called
and then they're skipped in libreplace.m4 inside samba4

metze

source/build/m4/check_cc.m4

index 2b222f9f4b3bfb4d146b1ac4d63d22f876eb68c5..4f714402cfcb9e9155511257ca2bcce36a6972d5 100644 (file)
@@ -29,6 +29,18 @@ if test x$ac_cv_prog_cc_g = xyes -a x$debug = xyes; then
        CFLAGS="${CFLAGS} -g"
 fi
 
+dnl needed before AC_TRY_COMPILE
+AC_ISC_POSIX
+
+############################################
+# check if the compiler handles c99 struct initialization
+LIBREPLACE_C99_STRUCT_INIT(samba_cv_c99_struct_initialization=yes,
+                   samba_cv_c99_struct_initialization=no)
+
+if test x"$samba_cv_c99_struct_initialization" != x"yes"; then
+       AC_MSG_WARN([C compiler does not support c99 struct initialization!])
+       AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
+fi
 
 ############################################
 # check if the compiler can handle negative enum values