summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2016-02-02 19:28:49 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-02-08 11:14:08 -0800
commitb28a1d8e54d70deca14efa49da1781e29ce8eb51 (patch)
tree43e5c4bf49123df6e3261f17d1fbae135d7262f8 /configure.ac
parent95597b87e32b8615ca63f8b0b3bb8d488272d95d (diff)
Allow builds with older version of URCU
Debian Wheezy, which has urcu-0.6 doesn't ship the pkg-config files for urcu. So when I was checking support, I didn't bother testing Wheezy or urcu-0.6 as I didn't want to spend time trying to build without pkg-config support. But it turns out that urcu-0.6 supports the APIs being used by GlusterD. This patch improves the configure script to manually search and set URCU build flags if pkg-config search fails. Change-Id: I8c2ae748b58e94d89aef61da6fb3c660710a5f3b BUG: 1304348 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/13345 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index bc59ef45ee5..5edff258e0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1225,11 +1225,17 @@ fi
# end glupy section
dnl Check for userspace-rcu
-PKG_CHECK_MODULES([URCU], [liburcu-bp])
+PKG_CHECK_MODULES([URCU], [liburcu-bp], [],
+ [AC_CHECK_HEADERS([urcu-bp.h],
+ [URCU_LIBS='-lurcu-bp'],
+ AC_MSG_ERROR([liburcu-bp not found]))])
PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.8], [],
[PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.7],
- [AC_DEFINE(URCU_0_7, 1, [Define if liburcu 0.7 is found])],
- [AC_MSG_ERROR([liburcu >= 0.7 required])])])
+ [AC_DEFINE(URCU_OLD, 1, [Define if liburcu 0.6 or 0.7 is found])],
+ [AC_CHECK_HEADERS([urcu/cds.h],
+ [AC_DEFINE(URCU_OLD, 1, [Define if liburcu 0.6 or 0.7 is found])
+ URCU_CDS_LIBS='-lurcu-cds'],
+ [AC_MSG_ERROR([liburcu-cds not found])])])])
BUILD_UNITTEST="no"
AC_ARG_ENABLE([cmocka],