+
+my $yazver = `yaz-config --version`;
+if (!$yazver) {
+ die qq[
+ERROR: Unable to call script: yaz-config
+If you are using a YAZ installation from the Debian package "yaz", you
+will also need to install "libyaz-dev" in order to build this module.
+];
+}
+
+chomp($yazver);
+# 2.1.51 is the first version with support for polling arbitrarily
+# many file descriptors: earlier YAZ versions had a hardwired
+# 1024-element array so that working with more file descriptors than
+# this would cause a segmentation fault.
+check_version($yazver, "2.1.51");
+