diff --git a/src/modules/Yp/configure.in b/src/modules/Yp/configure.in
index 26b427bb7a5248c258b5cdb36d786a50da1bc935..e5214cf5b2bd6d0939c3139c092f248da5613f26 100644
--- a/src/modules/Yp/configure.in
+++ b/src/modules/Yp/configure.in
@@ -5,6 +5,9 @@ AC_MODULE_INIT()
 
 AC_CHECK_LIB(nsl, gethostbyname)
 
+# Glibc 2.26 and later don't include the Sun RPC implementation anymore.
+PIKE_PKG_CONFIG(libtirpc)
+
 AC_HAVE_HEADERS(sys/types.h rpc/types.h rpc/rpc.h rpc/clnt.h \
 		rpcsvc/ypclnt.h rpcsvc/yp_prot.h,,,[
 #ifdef HAVE_RPC_TYPES_H