summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-11-09 13:16:52 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-11-09 13:16:52 +0000
commit070f8d2070e178042fd9842b828b681c74a8d930 (patch)
tree735968848c6f9f109cb79423e40ede5f30e893ae
parent3fa8da4d26d9a880a2a4911a32f222fbc5d2eeaa (diff)
downloadsamba-070f8d2070e178042fd9842b828b681c74a8d930.tar.gz
samba-070f8d2070e178042fd9842b828b681c74a8d930.tar.bz2
samba-070f8d2070e178042fd9842b828b681c74a8d930.zip
Add check for precompiled headers
(This used to be commit e92e04b889d4d52fc4d6a7f484188ee2557aa708)
-rw-r--r--source4/Makefile.in1
-rw-r--r--source4/configure.in15
2 files changed, 16 insertions, 0 deletions
diff --git a/source4/Makefile.in b/source4/Makefile.in
index 2027e1040b..bf97e9f6b4 100644
--- a/source4/Makefile.in
+++ b/source4/Makefile.in
@@ -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
+@PCH_AVAILABLE@ $(MAKE) pch
proto: headers
diff --git a/source4/configure.in b/source4/configure.in
index 2f93788683..dd8f650a57 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -306,6 +306,21 @@ else
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],