X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=616608659c580407ba12ae6c2310dc72222fdb5f;hp=0a6e5aac20d565ca914442e0ee6d7ea1a8f0c019;hb=9aba4735342323e43b04e267ad6cf1bf2c05bf54;hpb=7f5ed73a87449fc7133a2bf7268a7f59f191e155 diff --git a/configure.ac b/configure.ac index 0a6e5aac2..616608659 100644 --- a/configure.ac +++ b/configure.ac @@ -1054,7 +1054,13 @@ AM_CONDITIONAL([BUILD_LIB_UST_CONSUMER], [test x$build_lib_ust_consumer = xyes]) AM_CFLAGS="-Wall -fno-strict-aliasing $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) -AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS" +# The order in which the include folders are searched is important. +# The top_builddir should always be searched first in the event that a build +# time generated file is included. An example of this is the "version.i" file. +# In a scenario where lttng-tools is built from a distribution tarball and in a +# out-of-tree manner, the generated "version.i" has priority on the one from +# the source (distribution tarball) and must be found first. +AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS" AC_SUBST(AM_CPPFLAGS) lttngincludedir="${includedir}/lttng"