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)
[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
[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"
])
[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"
])
# 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"
+AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS"
+AC_SUBST(AM_CPPFLAGS)
lttngincludedir="${includedir}/lttng"