summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-22 19:12:04 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-12-10 14:46:44 +0100
commitd29a5b367c20c979ec9349dda85a4b947742cb2a (patch)
tree6266aa516c057ed3f14b5441fc0bbe6ae908bdff /configure.ac
parentd85029d38034a392079316daeca2ca6a82f65349 (diff)
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 22 insertions, 1 deletions
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