]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
configure: add check_libtirpc()
authorAndrea Claudi <aclaudi@redhat.com>
Wed, 16 Mar 2022 18:52:13 +0000 (19:52 +0100)
committerDavid Ahern <dsahern@kernel.org>
Thu, 24 Mar 2022 03:24:18 +0000 (21:24 -0600)
This patch adds a configure function to check if libtirpc is installed
on the build system. If this is the case, it makes iproute2 to compile
with libtirpc support.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
configure

index 8ddff43c6a7dad405ad0cd6318c05408bd625c09..440facb7f22774a587706c2ff7903e5565a76267 100755 (executable)
--- a/configure
+++ b/configure
@@ -395,6 +395,19 @@ check_selinux()
        fi
 }
 
+check_tirpc()
+{
+       if ${PKG_CONFIG} libtirpc --exists; then
+               echo "HAVE_RPC:=y" >>$CONFIG
+               echo "yes"
+
+               echo 'LDLIBS +=' `${PKG_CONFIG} --libs libtirpc` >>$CONFIG
+               echo 'CFLAGS += -DHAVE_RPC' `${PKG_CONFIG} --cflags libtirpc` >>$CONFIG
+       else
+               echo "no"
+       fi
+}
+
 check_mnl()
 {
        if ${PKG_CONFIG} libmnl --exists; then
@@ -600,6 +613,9 @@ check_name_to_handle_at
 echo -n "SELinux support: "
 check_selinux
 
+echo -n "libtirpc support: "
+check_tirpc
+
 echo -n "libbpf support: "
 check_libbpf