+
+
+sub check_version {
+ my($got, $want) = @_;
+
+ my($gmajor, $gminor, $gtrivial) = ($got =~ /(\d+)\.(\d+)\.(\d+)/);
+ my($wmajor, $wminor, $wtrivial) = ($want =~ /(\d+)\.(\d+)\.(\d+)/);
+ if (($gmajor < $wmajor) ||
+ ($gmajor == $wmajor && $gminor < $wminor) ||
+ ($gmajor == $wmajor && $gminor == $wminor && $gtrivial < $wtrivial)) {
+ print <<__EOT__;
+*** ERROR!
+ZOOM-Perl requires at least version $want of YAZ,
+but is currently you only have version $got.
+__EOT__
+ exit 1;
+ }
+}