Installation instruction:
- Download, compile and install liburcu and libkcompat.
-- In this package's tree, run ./configure, specifying the location of
- liburcu and libkcompat with the --with-urcu and --with-kcompat options.
+- In this package's tree, run ./configure.
- Run make.
- See the manual in the doc/ directory for usage instructions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol])
-AC_ARG_WITH(urcu, [ --with-urcu path Path to userspace RCU source], [
- AC_CHECK_FILE(["$withval/urcu.h"], [
- URCU_CFLAGS="-I$withval"
- URCU_LIBS="-L$withval -lurcu-bp" ],
- AC_MSG_ERROR([Cannot find urcu.h in urcu directory]))
-], [
- PKG_CHECK_MODULES(URCU, [liburcu], , [
- AC_MSG_ERROR([Must specify urcu path.])])
-])
-AC_SUBST(URCU_CFLAGS)
-AC_SUBST(URCU_LIBS)
+# URCU
+
+# urcu - check if we just find the headers it out of the box.
+AC_CHECK_HEADERS([urcu-bp.h], [], [AC_MSG_ERROR([Cannot find [URCU] headers (urcu-bp.h). Use [CFLAGS]=-Idir to specify their location.])])
+
+# urcu - check that URCU lib is available to compilation
+AC_CHECK_LIB([urcu-bp], [synchronize_rcu], [], [AC_MSG_ERROR([Cannot find liburcu-bp lib. Use [LDFLAGS]=-Ldir to specify its location.])])
+
+# kcompat
+
+AC_CHECK_HEADERS([kcompat.h], [], [AC_MSG_ERROR([Cannot find kcompat headers (kcompat.h). Use [CFLAGS]=-Idir to specify their location.])])
-AC_ARG_WITH(kcompat, [ --with-kcompat path Path to userspace kcompat source
-], [
- AC_CHECK_FILE("$withval/kcompat.h", [
- KCOMPAT_CFLAGS="-I$withval $URCU_CFLAGS"
- KCOMPAT_LIBS=
- ], AC_MSG_ERROR([Cannot find kcompat.h in kcompat directory]))
-], [
- PKG_CHECK_MODULES(KCOMPAT, [libkcompat], , [
- AC_MSG_ERROR([Must specify kcompat path.])])
-])
-AC_SUBST(KCOMPAT_CFLAGS)
-AC_SUBST(KCOMPAT_LIBS)
AC_CONFIG_FILES([
Makefile
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
lib_LTLIBRARIES = libustjava.la
libustjava_la_SOURCES = UST.c UST.h
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
lib_LTLIBRARIES = libmallocwrap.la
libmallocwrap_la_SOURCES = mallocwrap.c
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libustcomm \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libustcomm
lib_LTLIBRARIES = libust.la
libust_la_SOURCES = marker.c marker.h tracepoint.c tracepoint.h immediate.h channels.c channels.h marker-control.c marker-control.h relay.c relay.h tracer.c tracer.h tracercore.c tracercore.h serialize.c tracectl.c $(top_builddir)/libustcomm/ustcomm.c $(top_builddir)/share/usterr.h
libust_la_LDFLAGS = -no-undefined -version-info 0:0:0
-libust_la_LIBADD = $(URCU_LIBS) -lpthread
+libust_la_LIBADD = -lpthread
libust_la_CFLAGS = -DUST_COMPONENT="libust"
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
noinst_PROGRAMS = basic
basic_SOURCES = basic.c
-basic_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+basic_LDADD = $(top_builddir)/libust/libust.la
noinst_SCRIPTS = run
EXTRA_DIST = run
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
noinst_PROGRAMS = basic_long
basic_long_SOURCES = basic_long.c
-basic_long_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+basic_long_LDADD = $(top_builddir)/libust/libust.la
noinst_SCRIPTS = run
EXTRA_DIST = run
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
noinst_PROGRAMS = fork fork2
fork_SOURCES = fork.c
-fork_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+fork_LDADD = $(top_builddir)/libust/libust.la
fork2_SOURCES = fork2.c
-fork2_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+fork2_LDADD = $(top_builddir)/libust/libust.la
noinst_SCRIPTS = run
EXTRA_DIST = run
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
noinst_PROGRAMS = hello
hello_SOURCES = hello.c tp.c tp.h
-hello_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+hello_LDADD = $(top_builddir)/libust/libust.la
noinst_SCRIPTS = run
EXTRA_DIST = run
-INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust
noinst_PROGRAMS = hello2
hello2_SOURCES = hello2.c
-hello2_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS)
+hello2_LDADD = $(top_builddir)/libust/libust.la
noinst_SCRIPTS = run
EXTRA_DIST = run
INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \
- -I$(top_builddir)/libustcomm $(KCOMPAT_CFLAGS)
+ -I$(top_builddir)/libustcomm
bin_PROGRAMS = ustd
ustd_SOURCES = lowlevel.c ustd.c ustd.h $(top_builddir)/libustcomm/ustcomm.c $(top_builddir)/libustcomm/ustcomm.h $(top_builddir)/share/usterr.h