瀏覽代碼

get FxT from pkg-config too

Samuel Thibault 14 年之前
父節點
當前提交
76881f9b53
共有 4 個文件被更改,包括 17 次插入15 次删除
  1. 2 5
      configure.ac
  2. 8 6
      doc/starpu.texi
  3. 2 2
      src/Makefile.am
  4. 5 2
      tools/Makefile.am

+ 2 - 5
configure.ac

@@ -803,18 +803,15 @@ if test x$use_fxt = xyes; then
 	AC_DEFINE(STARPU_USE_FXT, [1], [enable FxT traces])
 	AC_DEFINE(CONFIG_FUT, [1], [enable FUT traces])
 
-	AC_SUBST(USE_FXTDIR_FROM_USER,$use_fxt_from_system)
 	if test x$use_fxt_from_system = xno; then
 		CPPFLAGS="${CPPFLAGS} -I$fxtdir/include/ "
 		LDFLAGS="${LDFLAGS} -L$fxtdir/lib/ "
 	fi
 
+	PKG_CHECK_MODULES([FXT],  [fxt])
+
 	# if we use monotonic clocks, FxT uses -lrt
 	AC_CHECK_LIB(rt, clock_gettime,,AC_MSG_ERROR([cannot find clock_gettime]))
-
-	AC_CHECK_LIB(fxt, fut_setup,,AC_MSG_ERROR([cannot find fxt lib]))
-	AC_CHECK_HEADER([fxt/fxt.h],,AC_MSG_ERROR([cannot find headers for fxt]))
-	AC_CHECK_HEADER([fxt/fut.h],,AC_MSG_ERROR([cannot find headers for fxt]))
 fi
 
 AC_MSG_CHECKING(whether performance debugging should be enabled)

+ 8 - 6
doc/starpu.texi

@@ -1823,16 +1823,15 @@ StarPU can use the FxT library (see
 @indicateurl{https://savannah.nongnu.org/projects/fkt/}) to generate traces
 with a limited runtime overhead.
 
-You can either get the FxT library from CVS (autotools are required):
+You can either get a tarball:
 @example
-% cvs -d :pserver:anonymous@@cvs.sv.gnu.org:/sources/fkt co FxT
-% ./bootstrap
+% wget http://download.savannah.gnu.org/releases/fkt/fxt-0.2.2.tar.gz
 @end example
 
-If autotools are not available on your machine, or if you prefer to do so,
-FxT's code is also available as a tarball:
+or use the FxT library from CVS (autotools are required):
 @example
-% wget http://download.savannah.gnu.org/releases/fkt/fxt-0.2.2.tar.gz
+% cvs -d :pserver:anonymous@@cvs.sv.gnu.org:/sources/fkt co FxT
+% ./bootstrap
 @end example
 
 Compiling and installing the FxT library in the @code{$FXTDIR} path is
@@ -1849,6 +1848,9 @@ the @code{--with-fxt} option:
 $ ./configure --with-fxt=$FXTDIR
 @end example
 
+Or you can simply point the @code{PKG_CONFIG_PATH} to
+@code{$FXTDIR/lib/pkgconfig} and pass @code{--with-fxt} to @code{./configure}
+
 When FxT is enabled, a trace is generated when StarPU is terminated by calling
 @code{starpu_shutdown()}). The trace is a binary file whose name has the form
 @code{prof_file_XXX_YYY} where @code{XXX} is the user name, and

+ 2 - 2
src/Makefile.am

@@ -48,8 +48,8 @@ lib_LTLIBRARIES = libstarpu.la
 
 libstarpu_la_CPPFLAGS = -I$(top_srcdir)/include/
 
-libstarpu_la_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
-libstarpu_la_LIBADD = -lm $(HWLOC_LIBS) $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
+libstarpu_la_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS)
+libstarpu_la_LIBADD = -lm $(HWLOC_LIBS) $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS) $(FXT_LIBS)
 libstarpu_la_LDFLAGS = $(ldflags) -version-number 0:0:0 -no-undefined
 
 noinst_HEADERS = 						\

+ 5 - 2
tools/Makefile.am

@@ -1,6 +1,6 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2009, 2010  Université de Bordeaux 1
+# Copyright (C) 2009-2011  Université de Bordeaux 1
 # Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
 #
 # StarPU is free software; you can redistribute it and/or modify
@@ -36,9 +36,12 @@ if STARPU_USE_FXT
 bin_PROGRAMS += starpu_fxt_tool starpu_fxt_stats
 
 starpu_fxt_tool_SOURCES = starpu_fxt_tool.c
-starpu_fxt_tool_LDADD =
+starpu_fxt_tool_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(FXT_CFLAGS)
+starpu_fxt_tool_LDADD = $(FXT_LIBS)
 
 starpu_fxt_stats_SOURCES = starpu_fxt_stats.c
+starpu_fxt_stats_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(FXT_CFLAGS)
+starpu_fxt_stats_LDADD = $(FXT_LIBS)
 endif
 
 bin_PROGRAMS +=	starpu_perfmodel_display