AC_SUBST(lttlibdir)
-DEFAULT_INCLUDES="-I\$(top_srcdir)/include"
+top_includedir="\$(top_srcdir)/include"
+AC_SUBST(top_includedir)
+
+DEFAULT_INCLUDES="-I\$(top_includedir)"
AC_SUBST(DEFAULT_INCLUDES)
#CPPFLAGS="${GLIB_CFLAGS}"
}\
} while(0)
+/* (T2 = T1 * FLOAT) */
+/* WARNING : use this multiplicator carefully : on 32 bits, multiplying
+ * by more than 4 could overflow the tv_nsec.
+ */
+#define TimeMul(T2, T1, FLOAT) \
+do \
+{\
+ (T2).tv_sec = (T1).tv_sec * (FLOAT); \
+ (T2).tv_nsec = (T1).tv_nsec * (FLOAT); \
+ if((T2).tv_nsec >= 1000000000)\
+ {\
+ (T2).tv_sec += (T3).tv_nsec / 1000000000;\
+ (T2).tv_nsec = (T3).tv_nsec % 1000000000;\
+ }\
+} while(0)
+
+
#include <ltt/ltt-private.h>
libtraceread_la_SOURCES = event.c facility.c parser.c tracefile.c type.c \
parser.h
-libtraceread_la_DEPENDENCIES = $(DEFAULT_INCLUDES)/ltt/LTTTypes.h
+libtraceread_la_DEPENDENCIES = ${top_includedir}/ltt/LTTTypes.h
EXTRA_DIST = crc32.tab
lttv_SOURCES = main.c module.c option.c hook.c attribute.c \
iattribute.c processTrace.c state.c traceset.c
-#lttv_DEPENDENCIES = $(DEFAULT_INCLUDES)/lttv/lttv.h \
-# $(DEFAULT_INCLUDES)/lttv/module.h \
-# $(DEFAULT_INCLUDES)/lttv/option.h \
-# $(DEFAULT_INCLUDES)/lttv/hook.h \
-# $(DEFAULT_INCLUDES)/lttv/attribute.h \
-# $(DEFAULT_INCLUDES)/lttv/iattribute.h \
-# $(DEFAULT_INCLUDES)/lttv/processTrace.h \
-# $(DEFAULT_INCLUDES)/lttv/state.h \
-# $(DEFAULT_INCLUDES)/lttv/traceset.h
+lttv_DEPENDENCIES = $(top_includedir)/lttv/lttv.h \
+ $(top_includedir)/lttv/module.h \
+ $(top_includedir)/lttv/option.h \
+ $(top_includedir)/lttv/hook.h \
+ $(top_includedir)/lttv/attribute.h \
+ $(top_includedir)/lttv/iattribute.h \
+ $(top_includedir)/lttv/processTrace.h \
+ $(top_includedir)/lttv/state.h \
+ $(top_includedir)/lttv/traceset.h
libdir = ${lttvplugindir}