From d29a5b367c20c979ec9349dda85a4b947742cb2a Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 22 Jun 2012 19:12:04 +0200 Subject: bring back precompiled headers support This is mostly a revert of 992757cc5ebfb1df42636b8d3269cdbc10fc4148 and bc78ac68c2492e63a680f68b524c4a51179ea83e, with tweaks to apply. Also only MSVC support for now. Change-Id: Ia926b3c28125b52012156ccfd47932837b09d20a --- configure.ac | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 648da1a55cac..96f517e9c48c 100644 --- a/configure.ac +++ b/configure.ac @@ -677,6 +677,11 @@ AC_ARG_ENABLE(vba, [Disables the vba compatibility feature.]) ) +AC_ARG_ENABLE(pch, + AS_HELP_STRING([--enable-pch], + [Enables precompiled header support for C++.]) +) + AC_ARG_ENABLE(win-mozab-driver, AS_HELP_STRING([--enable-win-mozab-driver], [LibreOffice includes a driver to connect to Mozilla @@ -4474,7 +4479,23 @@ dnl =================================================================== dnl ENABLE_PCH i now a no-op dnl =================================================================== AC_MSG_CHECKING([whether to enable pch feature]) -AC_MSG_RESULT([no, obsolete]) +if test -n "$enable_pch" && test "$enable_pch" != "no"; then + if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then + ENABLE_PCH="TRUE" + AC_MSG_RESULT([yes]) +dnl There is no PCH support in GCC versions prior to this + elif test "$GCC" = "yes"; then + ENABLE_PCH="TRUE" + AC_MSG_RESULT([yes]) + else + ENABLE_PCH="" + AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) + fi +else + ENABLE_PCH="" + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_PCH) dnl =================================================================== dnl Search all the common names for GNU make -- cgit