X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=2f8c2c36faa49070730fa0fb90f365ad579124d8;hb=a3fe36d01ef4ec7c70c0fda7911ff6710116cee6;hp=ee3481c4457aa2f572107b1cf2dbf0b0c06829d0;hpb=b1eb94bbef0312005f879b7525b11b8c7049aca1;p=libsigrok.git diff --git a/configure.ac b/configure.ac index ee3481c4..2f8c2c36 100644 --- a/configure.ac +++ b/configure.ac @@ -188,13 +188,25 @@ AS_CASE([$host_os], [mingw*], [SR_PREPEND([SR_EXTRA_LIBS], [-lws2_32])]) SR_SEARCH_LIBS([SR_EXTRA_LIBS], [pow], [m]) # RPC is only needed for VXI support. -AC_CACHE_CHECK([for RPC support], [sr_cv_have_rpc], +AC_CACHE_CHECK([for SunRPC support], [sr_cv_have_sunrpc], [AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include ]m4_newline[CLIENT *rpc_test(void);]], [[(void) clnt_create("", 0, 0, "");]])], - [sr_cv_have_rpc=yes], [sr_cv_have_rpc=no])]) + [RPC_CFLAGS=""; RPC_LIBS=""; sr_cv_have_sunrpc=yes], + [sr_cv_have_sunrpc=no])]) +PKG_CHECK_MODULES([TIRPC], + [libtirpc], + [RPC_CFLAGS=$TIRPC_CFLAGS; SR_PREPEND([SR_EXTRA_LIBS], [$TIRPC_LIBS]); sr_cv_have_tirpc=yes], + [sr_cv_have_tirpc=no]) +AS_IF([test "x$sr_cv_have_sunrpc" = xyes -o "x$sr_cv_have_tirpc" = xyes], + [sr_cv_have_rpc=yes], [sr_cv_have_rpc=no]) + +AC_SUBST(RPC_CFLAGS) +AC_SUBST(RPC_LIBS) + AS_IF([test "x$sr_cv_have_rpc" = xyes], - [AC_DEFINE([HAVE_RPC], [1], [Specifies whether we have RPC support.])]) + [AC_DEFINE([HAVE_RPC], [1], [Specifies whether we have RPC support (either by SunRPC or libtirpc).])]) + # VXI support is only compiled if RPC support was found. AM_CONDITIONAL([NEED_RPC], [test "x$sr_cv_have_rpc" = xyes]) @@ -643,6 +655,8 @@ Enabled serial communication transports: Enabled SCPI backends: - TCP............................. yes + - SunRPC ......................... $sr_cv_have_sunrpc + - TI-RPC ......................... $sr_cv_have_tirpc - RPC............................. $sr_cv_have_rpc - serial.......................... $sr_have_serial_comm - VISA............................ $sr_have_librevisa