Add check for precompiled headers
[ira/wip.git] / source / configure.in
index 16b5bb5f772974411a7af7c78fa0e98643c54255..dd8f650a5749c5f38824330a8ec5a924a916fec8 100644 (file)
@@ -1,8 +1,10 @@
 dnl -*- mode: m4-mode -*-
 dnl Process this file with autoconf to produce a configure script.
 
-dnl We must use autotools 2.53 or above
-AC_PREREQ(2.53)
+dnl disabled 2.53 requirement - we do work with 2.52 on suse 7.3 for example
+dnl AC_PREREQ(2.53)
+
+
 AC_INIT(include/includes.h)
 AC_CONFIG_HEADER(include/config.h)
 
@@ -304,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],