From 2d82d71708da826bffec3e1c5dd044f70f81cb46 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 25 May 2008 19:40:59 +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 bd1a7cc..56a85e2 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 ? "]" : "") . " [