diff options
author | Kaushal M <kaushal@redhat.com> | 2016-02-02 19:28:49 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-02-08 11:14:08 -0800 |
commit | b28a1d8e54d70deca14efa49da1781e29ce8eb51 (patch) | |
tree | 43e5c4bf49123df6e3261f17d1fbae135d7262f8 | |
parent | 95597b87e32b8615ca63f8b0b3bb8d488272d95d (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>
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rcu.h | 2 |
2 files changed, 10 insertions, 4 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], diff --git a/xlators/mgmt/glusterd/src/glusterd-rcu.h b/xlators/mgmt/glusterd/src/glusterd-rcu.h index d4e78753e69..15beac5a745 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rcu.h +++ b/xlators/mgmt/glusterd/src/glusterd-rcu.h @@ -17,7 +17,7 @@ #include <urcu/uatomic.h> #include <urcu-call-rcu.h> -#ifdef URCU_0_7 +#ifdef URCU_OLD #include "rculist-extra.h" #endif |