Blob Blame History Raw
--- PDL-2.4.3/Lib/GSL/Makefile.PL.gsl	2004-01-12 13:00:06.000000000 -0700
+++ PDL-2.4.3/Lib/GSL/Makefile.PL	2008-03-04 10:05:54.000000000 -0700
@@ -29,11 +29,16 @@
   return ($inc,$lib);
 }
 
+sub decimate { # version string -> number
+  $_[0] =~ /(\d+)\.(\d+)/;
+  return int($1*100 + $2);
+}
+
 # these will be used in the subdirs
 ($GSL_includes, $GSL_libs)  = get_gsl_libs();
 
 # Version check
-my $MINVERSION = "1.3";
+my $MINVERSION = decimate("1.3");
 my $version = `gsl-config --version`;
 chomp $version;
 
@@ -41,7 +46,7 @@
   warn "\tno GSL version info found (gsl-config not installed?)\n\n";
   $version = 'UNKNOWN VERSION';
 }
-if ($version =~ /UNKNOWN VERSION/ || $version lt "$MINVERSION") {
+if ($version =~ /UNKNOWN VERSION/ || decimate($version) lt "$MINVERSION") {
   warn "\n   Not building GSL modules: GSL version $version found, need at least $MINVERSION\n\n";
   write_dummy_make("Not building GSL modules: GSL version $version found, but need at least $MINVERSION");
 } else {