Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a command-line option to Configure.pl, to pass in a full path to …

…the parrot_config executable

Patch from #77, courtesy of allisonrandal, with slight modification.



git-svn-id: http://partcl.googlecode.com/svn/trunk@335 6cb8db7d-f34b-0410-8f57-4f83c6281724
  • Loading branch information...
commit be1652fd9ea7691dff0cff73a20086ada595bc48 1 parent 7491402
wcoleda authored
Showing with 19 additions and 6 deletions.
  1. +19 −6 Configure.pl
View
25 Configure.pl
@@ -2,13 +2,20 @@
use strict;
use warnings;
+use Getopt::Long;
-my $perlbin = `parrot_config perl`
- or die "You must have parrot available in your PATH to build partcl.\n";
-my $libdir = `parrot_config libdir`;
-my $versiondir = `parrot_config versiondir`;
-my $slash = `parrot_config slash`;
-my $make = `parrot_config make`;
+my %options;
+GetOptions(\%options, 'parrot-config=s', 'help|?') or usage();
+usage() if $options{'help'};
+
+my $config = $options{'parrot-config'} || "parrot_config";
+
+my $perlbin = `$config perl`
+ or die "Unable to find parrot_config, $config";
+my $libdir = `$config libdir`;
+my $versiondir = `$config versiondir`;
+my $slash = `$config slash`;
+my $make = `$config make`;
chomp($perlbin);
chomp($libdir);
@@ -44,3 +51,9 @@
END
exit;
+
+sub usage {
+ die <<"EOM"
+Usage: $0 [--parrot-config=/path/to/parrot_config]
+EOM
+}
Please sign in to comment.
Something went wrong with that request. Please try again.