diff --git a/configure.ac b/configure.ac index bbf317547..f7bba02d1 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,7 @@ AC_ARG_ENABLE(pch, AC_HELP_STRING([--disable-pch], [Disable precompiled header g AC_MSG_RESULT([no]) ], [ build_pch="yes" + CPPDEFINE([PCH]) AC_MSG_RESULT([yes]) ]) diff --git a/include/ircd/stdinc.h b/include/ircd/stdinc.h index 05f75c62b..840bf43ba 100644 --- a/include/ircd/stdinc.h +++ b/include/ircd/stdinc.h @@ -21,7 +21,12 @@ * */ +#if defined(PIC) && defined(PCH) +#include +#else #include +#endif + #include "util.h" #include "defaults.h" #include "fs.h" diff --git a/ircd/Makefile.am b/ircd/Makefile.am index 2f3390a75..3807c4c25 100644 --- a/ircd/Makefile.am +++ b/ircd/Makefile.am @@ -11,10 +11,6 @@ AM_CPPFLAGS = \ @LTDLINCL@ \ @BOOST_CPPFLAGS@ -if BUILD_PCH -AM_CPPFLAGS += -include $(top_srcdir)/include/rb/rb.pic.h -endif - if MINGW PLATFORM_LDFLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*' endif