[lttng-dev] [PATCH 1/2] Introduce configure --with-urcu-prefix

Jimmy Durand Wesolowski jimmy.durand.wesolowski at gmail.com
Thu Aug 22 04:27:30 EDT 2013


From: Jimmy Durand Wesolowski <jimmy.durand-wesolowski-ext at oneaccess-net.com>

---
 configure.ac |   42 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 94f8182..164174d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,14 +149,34 @@ CFLAGS="-Wall $CFLAGS"
 
 # URCU
 
+AC_ARG_WITH([urcu-prefix],
+	AS_HELP_STRING([--with-urcu-prefix=PREFIX],
+                       [Specify the installation prefix of the URCU library.
+		        Headers must be in PREFIX/include; libraries in
+			PREFIX/lib.]),
+			[
+			  CPPFLAGS="$CPPFLAGS -I${withval}/include"
+			  LDFLAGS="$LDFLAGS -L${withval}/lib"
+			])
+
 # 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 [CPPFLAGS]=-Idir to specify their location.
-This error can also occur when the liburcu package's configure script has not been run.])])
+AC_CHECK_HEADERS([urcu-bp.h],
+                 [],
+                 [
+			AC_MSG_ERROR([Cannot find [URCU] headers (urcu-bp.h).
+			              Use --with-urcu-prefix=PREFIX to
+				      specify its location.])
+                 ])
 
 # urcu-cds - check that URCU Concurrent Data Structure lib is available to compilation
 # Part of Userspace RCU library 0.7.2 or better.
-AC_CHECK_LIB([urcu-cds], [_cds_lfht_new], [], [AC_MSG_ERROR([Cannot find
-liburcu-cds lib, part of Userspace RCU 0.7 or better. Use [LDFLAGS]=-Ldir to specify its location.])])
+AC_CHECK_LIB([urcu-cds], [_cds_lfht_new], [],
+             [
+		AC_MSG_ERROR([Cannot find liburcu-cds lib, part of Userspace
+		              RCU 0.7 or better.
+		              Use --with-urcu-prefix=PREFIX to
+			      specify its location.])
+             ])
 
 AC_MSG_CHECKING([caa_likely()])
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -175,10 +195,20 @@ void fct(void)
 ])
 
 # urcu - check that URCU lib is available to compilation
-AC_CHECK_LIB([urcu-bp], [synchronize_rcu_bp], [], [AC_MSG_ERROR([Cannot find liburcu-bp lib. Use [LDFLAGS]=-Ldir to specify its location.])])
+AC_CHECK_LIB([urcu-bp], [synchronize_rcu_bp], [],
+             [
+		AC_MSG_ERROR([Cannot find liburcu-bp lib.
+		              Use Use --with-urcu-prefix=PREFIX to
+			      specify its location.])
+             ])
 
 # urcu - check that URCU lib is at least version 0.6
-AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [], [AC_MSG_ERROR([liburcu 0.6 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
+AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [],
+             [
+		AC_MSG_ERROR([liburcu 0.6 or newer is needed, please update
+		              your version or use --with-urcu-prefix=PREFIX to
+			      specify its location.])
+             ])
 
 AC_MSG_CHECKING([host system alignment requirements])
 case $host_cpu in
-- 
1.7.10.4




More information about the lttng-dev mailing list