tdeioslave nfs: Add support for libtirpc

as a replacement for deprecated SunRPC from glibc >= 2.26
This resolves bug 2962

Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
pull/2/head
Fabio Rossi 6 years ago committed by Slávek Banko
parent d33bda0b56
commit f6a5cd3e8d
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -24,3 +24,21 @@ if( WITH_SASL )
tde_message_fatal( "sasl2 are requested, but not found on your system" )
endif( )
endif( )
# rpc/rpc.h, originally was shipped with glibc ...
check_include_file( rpc/rpc.h HAVE_RPC_H )
# ... but later might be not present (deprecated from 2.26)
if( NOT HAVE_RPC_H )
pkg_search_module( TIRPC libtirpc )
if( NOT TIRPC_FOUND )
tde_message_fatal( "rpc/rpc.h is required, please check your glibc or libtirpc package" )
endif( )
endif( )
message( STATUS "Looking for rpcgen" )
find_program( RPCGEN_BINARY rpcgen )
if( RPCGEN_BINARY )
message( STATUS "Looking for rpcgen - ${RPCGEN_BINARY}" )
else( RPCGEN_BINARY )
tde_message_fatal( "rpcgen is required, but not found on your system" )
endif( RPCGEN_BINARY )

@ -15,6 +15,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TIRPC_INCLUDE_DIRS}
)
link_directories(
@ -32,15 +33,15 @@ install( FILES nfs.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
set( target tdeio_nfs )
add_custom_command( OUTPUT mount_xdr.c
COMMAND rpcgen -c -o mount_xdr.c ${CMAKE_CURRENT_SOURCE_DIR}/mount.x
COMMAND ${RPCGEN_BINARY} -c -o mount_xdr.c ${CMAKE_CURRENT_SOURCE_DIR}/mount.x
DEPENDS mount.x )
add_custom_command( OUTPUT nfs_prot_xdr.c
COMMAND rpcgen -c -o nfs_prot_xdr.c ${CMAKE_CURRENT_SOURCE_DIR}/nfs_prot.x
COMMAND ${RPCGEN_BINARY} -c -o nfs_prot_xdr.c ${CMAKE_CURRENT_SOURCE_DIR}/nfs_prot.x
DEPENDS nfs_prot.x )
tde_add_kpart( ${target} AUTOMOC
SOURCES tdeio_nfs.cpp mount_xdr.c nfs_prot_xdr.c
LINK tdeio-shared
LINK tdeio-shared ${TIRPC_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)

Loading…
Cancel
Save