[svn:mod_parrot] r651 - mod_parrot/branches/configure-jeff

[email protected] Wed, 24 Jun 2009 12:55:31 -0700 (PDT)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Wed Jun 24 12:55:28 2009
New Revision: 651

Modified:
   mod_parrot/branches/configure-jeff/Configure.pl

Log:
support original, but now deprecated options


Modified: mod_parrot/branches/configure-jeff/Configure.pl
==============================================================================
--- mod_parrot/branches/configure-jeff/Configure.pl	(original)
+++ mod_parrot/branches/configure-jeff/Configure.pl	Wed Jun 24 12:55:28 2009
@@ -34,13 +34,26 @@
 my $apxs = 'apxs';
 
 my $res = GetOptions(
+    # supported options
     'with-parrot-config=s' => \$parrot_config,
-    'with-apxs=s' => \$apxs
+    'with-apxs=s' => \$apxs,
+
+    # deprecated options
+    'parrot-build-dir=s' => \$parrot_build_dir,
+    'apxs=s' => \$apxs
+
 );
 
 $res || die "error while parsing options";
 
-$parrot_config ||= catfile('parrot_config');
+if ($parrot_build_dir) {
+    # adjust parrot_config for deprecated options
+    $parrot_config = catfile($parrot_build_dir, 'parrot_config');
+}
+else {
+    # use default parrot_config if we have nothing else
+    $parrot_config ||= 'parrot_config';
+}
 
 $| = 1;