r18485: include libreplace.m4 in the aclocal.m4 files
[samba.git] / source4 / build / m4 / check_cc.m4
index 311caa342ec5022fbbb6a3ff9214060f9b2df79a..d8dd4078910e39187fed11c4e885bf458abfb89d 100644 (file)
@@ -5,14 +5,7 @@ dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
 
-# don't let the AC_PROG_CC macro auto set the CFLAGS
-OLD_CFLAGS="${CFLAGS}"
-AC_PROG_CC
-CFLAGS="${OLD_CFLAGS}"
-if test x"$CC" = x""; then
-       AC_MSG_WARN([No c compiler was not found!])
-       AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
-fi
+AC_LIBREPLACE_CC_CHECKS
 
 if test x"$GCC" = x"yes" ; then
        AC_MSG_CHECKING([for version of gcc])
@@ -29,9 +22,6 @@ 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,