From 94b682c99884b6f32f35a4a397cf3a6fbd435eb0 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 2 Mar 2019 09:59:30 -0700 Subject: rpcgen test accomodate distros using tirpc Fedora since 28 has removed SunRPC support from glibc and switched to using tirpc. Adjust a test to accomodate the new usage - adds an include path and if configure check passes, add libtirpc to link. This is a test-only change. Signed-off-by: Mats Wichmann --- test/Rpcgen/live.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Rpcgen/live.py b/test/Rpcgen/live.py index 6f238ff..1e31694 100644 --- a/test/Rpcgen/live.py +++ b/test/Rpcgen/live.py @@ -49,6 +49,14 @@ if env['PLATFORM'] == 'darwin': # #include to get the declarations right. Suppress the # warnings so the test passes. env.Append(CCFLAGS=['-w']) + +# on some Linux systems, RPC support has moved to libtirpc. Check for that. +conf = Configure(env) +env.Append(CPPPATH=['/usr/include/tirpc']) +if conf.CheckLibWithHeader('tirpc', 'rpc/rpc.h', 'c'): + env.Append(LIBS=['tirpc']) +env = conf.Finish() + env.Program('rpcclnt', ['rpcclnt.c', 'do_rpcgen/rpcif_clnt.c']) env.RPCGenHeader('do_rpcgen/rpcif') env.RPCGenClient('do_rpcgen/rpcif') -- cgit v0.12