From 2155f9926a749486f7e0a64bc6687886efa8171e Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 20 Nov 2017 20:56:34 +0000 Subject: 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 --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'configure.ac') 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 -- cgit