diff options
author | Mats Wichmann <mats@linux.com> | 2019-03-02 16:59:30 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-03-03 19:12:41 (GMT) |
commit | 94b682c99884b6f32f35a4a397cf3a6fbd435eb0 (patch) | |
tree | a4be723fb8dc247f4dbdd0aad0d5d5c5d7d453ac | |
parent | 3a3626cc08b3d27a90e65ccebb874e1082d9deca (diff) | |
download | SCons-94b682c99884b6f32f35a4a397cf3a6fbd435eb0.zip SCons-94b682c99884b6f32f35a4a397cf3a6fbd435eb0.tar.gz SCons-94b682c99884b6f32f35a4a397cf3a6fbd435eb0.tar.bz2 |
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 <mats@linux.com>
-rw-r--r-- | test/Rpcgen/live.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 <stdlib.h> 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') |