Add check for precompiled headers
authorJelmer Vernooij <jelmer@samba.org>
Sun, 9 Nov 2003 13:16:52 +0000 (13:16 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 9 Nov 2003 13:16:52 +0000 (13:16 +0000)
source/Makefile.in
source/configure.in

index 2027e1040b232eca64e3fbe5b0611f746bd1fd04..bf97e9f6b478bbe3365fbcea672e92e62a4e8142 100644 (file)
@@ -1272,6 +1272,7 @@ headers:
        $(MAKE) utils/net_proto.h; \
        $(MAKE) include/tdbsam2_parse_info.h; \
 @STFS_ENABLED@ $(MAKE) ntvfs/tank/vfs_tank_proto.h
        $(MAKE) utils/net_proto.h; \
        $(MAKE) include/tdbsam2_parse_info.h; \
 @STFS_ENABLED@ $(MAKE) ntvfs/tank/vfs_tank_proto.h
+@PCH_AVAILABLE@        $(MAKE) pch
 
 proto: headers 
 
 
 proto: headers 
 
index 2f93788683a20327eb7cfa00127be43f331fb40c..dd8f650a5749c5f38824330a8ec5a924a916fec8 100644 (file)
@@ -306,6 +306,21 @@ else
 fi
 AC_SUBST(BROKEN_CC)
 
 fi
 AC_SUBST(BROKEN_CC)
 
+AC_CACHE_CHECK([that the C compiler can precompile header files],samba_cv_precompiled_headers, [
+       dnl Check whether the compiler can generate precompiled headers
+       touch conftest.h
+       if ${CC-cc} conftest.h && test -f conftest.h.gch; then
+               samba_cv_precompiled_headers=yes
+       else
+               samba_cv_precompiled_headers=no
+       fi])
+PCH_AVAILABLE="#"
+if test x"$samba_cv_precompiled_headers" = x"yes"; then
+       PCH_AVAILABLE=""
+fi
+AC_SUBST(PCH_AVAILABLE)
+
+
 dnl Check if the C compiler understands volatile (it should, being ANSI).
 AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
     AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
 dnl Check if the C compiler understands volatile (it should, being ANSI).
 AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
     AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],