X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=configure.ac;h=3da818b9101d8f4a354ba085a9ff78cf53754736;hb=07bc1945762e33fd4f57cd8cfd1f6855204657fb;hp=6455e574cd8cca23cebd2fe9fc73ca92473f4578;hpb=629d89b9a2f74b4c5deeb9aa7f16d12e3372b386;p=lttng-tools.git diff --git a/configure.ac b/configure.ac index 6455e574c..3da818b91 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_TARGET AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax nostdinc]) AM_MAINTAINER_MODE([enable]) # Enable silent rules if available (Introduced in AM 1.11) @@ -59,9 +59,6 @@ AS_IF([test "x$ax_cv___attribute__" = "xyes"], [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])]) AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])]) -LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -CC="$PTHREAD_CC" AX_LIB_SOCKET_NSL @@ -436,7 +433,7 @@ AC_ARG_WITH(kmod-prefix, [Specify the installation prefix of the kmod library. Headers must be in PATH/include; libraries in PATH/lib.]), [ - CPPFLAGS="$CPPFLAGS -I${withval}/include" + AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib" ]) @@ -461,7 +458,7 @@ AC_ARG_WITH(lttng-ust-prefix, [Specify the installation prefix of the lttng-ust library. Headers must be in PATH/include; libraries in PATH/lib.]), [ - CPPFLAGS="$CPPFLAGS -I${withval}/include" + AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib" ]) @@ -958,9 +955,17 @@ modify their sources. # export flex condition AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"]) -CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing" +AM_CFLAGS="-Wall -fno-strict-aliasing $PTHREAD_CFLAGS" +AC_SUBST(AM_CFLAGS) -DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include -include config.h" +# 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" @@ -995,6 +1000,7 @@ AC_CONFIG_FILES([ src/common/index/Makefile src/common/health/Makefile src/common/config/Makefile + src/common/fd-tracker/Makefile src/lib/Makefile src/lib/lttng-ctl/Makefile src/lib/lttng-ctl/filter/Makefile