mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
diff --git a/rapid/plugin/group_replication/configure.cmake b/rapid/plugin/group_replication/configure.cmake
|
|
index 59a074bd..35c99dbf 100644
|
|
--- a/rapid/plugin/group_replication/configure.cmake
|
|
+++ b/rapid/plugin/group_replication/configure.cmake
|
|
@@ -50,8 +50,16 @@ IF (WIN32)
|
|
ENDIF()
|
|
|
|
IF (NOT WIN32)
|
|
+ # First look for tirpc, then the old Sun RPC
|
|
+ FIND_PATH(RPC_INCLUDE_DIR
|
|
+ NAMES rpc/rpc.h
|
|
+ HINTS /usr/include/tirpc
|
|
+ NO_DEFAULT_PATH
|
|
+ )
|
|
+ FIND_PATH(RPC_INCLUDE_DIR NAMES rpc/rpc.h)
|
|
SET (CMAKE_REQUIRED_FLAGS_BACKUP ${CMAKE_REQUIRED_FLAGS})
|
|
SET (CMAKE_REQUIRED_FLAGS "-Wno-error")
|
|
+ SET (CMAKE_REQUIRED_INCLUDES ${RPC_INCLUDE_DIR})
|
|
ENDIF()
|
|
|
|
#
|
|
diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake
|
|
index b9c5895c..7856e046 100644
|
|
--- a/rapid/plugin/group_replication/rpcgen.cmake
|
|
+++ b/rapid/plugin/group_replication/rpcgen.cmake
|
|
@@ -87,6 +87,23 @@ FOREACH(X xcom_vp)
|
|
${XCOM_BASEDIR}/xcom_proto_enum.h
|
|
${XCOM_BASEDIR}/xcom_limits.h)
|
|
ELSE()
|
|
+ FIND_PROGRAM(RPCGEN_EXECUTABLE rpcgen DOC "path to the rpcgen executable")
|
|
+ MARK_AS_ADVANCED(RPCGEN_EXECUTABLE)
|
|
+ IF(NOT RPCGEN_EXECUTABLE)
|
|
+ MESSAGE(FATAL_ERROR "Could not find rpcgen")
|
|
+ ENDIF()
|
|
+
|
|
+ IF(NOT RPC_INCLUDE_DIR)
|
|
+ MESSAGE(FATAL_ERROR
|
|
+ "Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc")
|
|
+ ENDIF()
|
|
+ MESSAGE(STATUS "RPC_INCLUDE_DIR ${RPC_INCLUDE_DIR}")
|
|
+ IF(RPC_INCLUDE_DIR STREQUAL "/usr/include/tirpc")
|
|
+ INCLUDE_DIRECTORIES(SYSTEM /usr/include/tirpc)
|
|
+ ADD_DEFINITIONS(-DHAVE_TIRPC)
|
|
+ SET(TIRPC_LIBRARY tirpc)
|
|
+ ENDIF()
|
|
+
|
|
# on unix systems try to generate them if needed
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h}
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
@@ -103,10 +120,10 @@ FOREACH(X xcom_vp)
|
|
|
|
# generate the sources
|
|
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_h}
|
|
- COMMAND rpcgen -C -h -o
|
|
+ COMMAND ${RPCGEN_EXECUTABLE} -C -h -o
|
|
${x_gen_h} ${x_tmp_x_canonical_name}
|
|
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_c}
|
|
- COMMAND rpcgen -C -c -o
|
|
+ COMMAND ${RPCGEN_EXECUTABLE} -C -c -o
|
|
${x_gen_c} ${x_tmp_x_canonical_name}
|
|
WORKING_DIRECTORY ${gen_xdr_dir}
|
|
DEPENDS
|