diff -up asymptote-2.45/configure.ac.libtirpc asymptote-2.45/configure.ac
--- asymptote-2.45/configure.ac.libtirpc	2018-07-24 13:10:39.495098939 -0400
+++ asymptote-2.45/configure.ac	2018-07-24 13:13:03.640110265 -0400
@@ -282,6 +282,16 @@ AC_CHECK_HEADERS([fenv.h stddef.h libint
 AC_CHECK_HEADERS(fpu_control.h)
 AC_CHECK_FUNCS([feenableexcept])
 
+PKG_PROG_PKG_CONFIG([0.9.0])
+AS_IF(
+  [test "$enable_tirpc" != "no"],
+  [PKG_CHECK_MODULES([TIRPC], [libtirpc >= 0.2.4],
+                    [LIBS="${LIBS} ${TIRPC_LIBS} "
+                     CPPFLAGS="${CPPFLAGS} ${TIRPC_CFLAGS}"
+                     AC_DEFINE([HAVE_LIBTIRPC], [1],
+                               [Define to 1 if you have and wish to use libtirpc.])],
+                    [AS_IF([test "$enable_tirpc" != "no"], [AC_MSG_ERROR([libtirpc not found.])],
+                           [LIBTIRPC=""])])])
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "xstream.h"])],
                    [AC_SEARCH_LIBS([xdrstdio_create],[nsl tirpc])
