summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2017-11-20 20:56:34 +0000
committerAmar Tumballi <amarts@redhat.com>2017-11-29 00:44:11 +0000
commit2155f9926a749486f7e0a64bc6687886efa8171e (patch)
tree25c7b4f039deaf65b70766df9e67dcf1f83c7619 /configure.ac
parent718e2f2c6cf1f5e8fe8b299f686153495e7e784c (diff)
build: Use pkg-config to get libtirpc flags
This benefits cross-compiling and other exotic setups. Change-Id: Id9f168728d96264ccab23d2e618fa2b4003455a3 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index dd75029e4e0..81c56d4e68f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1098,10 +1098,10 @@ GF_LDFLAGS="-rdynamic"
dnl include tirpc for IPv6 builds
if test "x$with_libtirpc" = "xyes" || test "x$IPV6_DEFAULT" = "xyes" ; then
- AC_CHECK_LIB([tirpc], [xdr_string], , AC_MSG_ERROR([libtirpc is required to build glusterfs with IPv6 default]))
- TIRPC_CFLAGS="-I/usr/include/tirpc"
- GF_LDFLAGS="-ltirpc $GF_LDFLAGS"
- GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"
+ PKG_CHECK_MODULES([TIRPC], [libtirpc],
+ [GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
+ [AC_MSG_ERROR([libtirpc requested or needed for IPv6 default but library not found])]
+ )
fi
if test "x$IPV6_DEFAULT" = "xyes" ; then