From a12875465effea5741d379a07f6f0f69dc92d756 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 25 May 2008 19:41:56 +0200 Subject: [PATCH] Allow `configure OPTIONS' without specifying configuration name. This involves a little bit of dwimmery -- we assume that the options are all uppercase and the configuration files do not, but that's hopefully a fair game. --- lib/perl/Configure.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/perl/Configure.pm b/lib/perl/Configure.pm index bd1a7cc5..56a85e2f 100644 --- a/lib/perl/Configure.pm +++ b/lib/perl/Configure.pm @@ -103,15 +103,19 @@ sub FindFile($) { sub Init($$) { my ($srcdir,$defconfig) = @_; - if ((!defined $defconfig && !@ARGV) || @ARGV && $ARGV[0] eq "--help") { - print STDERR "Usage: [/]configure " . (defined $defconfig ? "[" : "") . "" . (defined $defconfig ? "]" : "") . + sub usage($) { + my ($dc) = @_; + print STDERR "Usage: [/]configure " . (defined $dc ? "[" : "") . "" . (defined $dc ? "]" : "") . " [