--- a/configure
+++ b/configure
@@ -355,7 +355,7 @@ check_selinux()
 
 check_tirpc()
 {
-	if ${PKG_CONFIG} libtirpc --exists; then
+	if [ "${HAVE_TIRPC}" = "y" ] && ${PKG_CONFIG} libtirpc --exists; then
 		echo "HAVE_RPC:=y" >>$CONFIG
 		echo "yes"
 
