root/juggler/tags/1.1_dr_2/configure.pl

Revision 10081, 22.7 kB (checked in by patrickh, 6 years ago)

boggle perl -w doesn't work with /usr/bin/env for some reason.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/bin/env perl
2
3 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
4 #
5 # VR Juggler is (C) Copyright 1998-2002 by Iowa State University
6 #
7 # Original Authors:
8 #   Allen Bierbaum, Christopher Just,
9 #   Patrick Hartling, Kevin Meinert,
10 #   Carolina Cruz-Neira, Albert Baker
11 #
12 # This library is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU Library General Public
14 # License as published by the Free Software Foundation; either
15 # version 2 of the License, or (at your option) any later version.
16 #
17 # This library is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 # Library General Public License for more details.
21 #
22 # You should have received a copy of the GNU Library General Public
23 # License along with this library; if not, write to the
24 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 # Boston, MA 02111-1307, USA.
26 #
27 # -----------------------------------------------------------------
28 # File:          $RCSfile$
29 # Date modified: $Date$
30 # Version:       $Revision$
31 # -----------------------------------------------------------------
32 #
33 # *************** <auto-copyright.pl END do not edit this line> ***************
34
35 use 5.005;
36
37 use strict 'vars';
38 use vars qw($base_dir $module $CONFIG_ARGS $PATH_ARGS $HOST_ARGS $FEATURE_ARGS
39             $CUSTOM_ARGS $LAST_ARG_GROUP $OS $Win32 $CFG_LOAD_FUNC);
40 use vars qw(%MODULES);
41
42 use Cwd qw(chdir getcwd);
43 use File::Basename;
44 use File::Path;
45 use Getopt::Long;
46 use Pod::Usage;
47
48 BEGIN
49 {
50    $base_dir = (fileparse("$0"))[1];
51 }
52
53 use lib("$base_dir");
54 use JugglerConfigure;
55
56 # Subroutine prototypes.
57 sub mergeArgArrays($$);
58 sub loadDefaultArgs($);
59 sub configureModule($);
60 sub regenModuleInfo($);
61 sub generateMakefile(;$);
62 sub generateReconfig($@);
63 sub listModules();
64 sub printHelp();
65 sub getConfigureHelp($$);
66 sub parseOutput($$);
67 sub getPlatform();
68
69 %MODULES = ();
70
71 my $all_help      = 0;
72 my $cfg           = "juggler.cfg";
73 my $user_cfg      = '';
74 $module           = '';
75 my $script_help   = 0;
76 my $manual        = 0;
77 my $regen         = 0;
78 my $mod_list      = 0;
79 my $args_file     = 'acdefaults.cfg';
80 my $args_mod_file = 'acdefaults.pl';
81 my $user_args     = '';
82 my $user_args_mod = '';
83 my $no_user_args  = 0;
84
85 $CONFIG_ARGS    = 0;
86 $PATH_ARGS      = 1;
87 $HOST_ARGS      = 2;
88 $FEATURE_ARGS   = 3;
89 $CUSTOM_ARGS    = 4;
90 $LAST_ARG_GROUP = 5;
91
92 $CFG_LOAD_FUNC = undef;
93 $OS            = '';
94
95 my @save_argv = @ARGV;
96
97 Getopt::Long::Configure('pass_through');
98 GetOptions('help|?' => \$script_help, 'cfg=s' => \$user_cfg,
99            'module=s' => \$module, 'all-help' => \$all_help,
100            'manual' => \$manual, 'regen' => \$regen, 'modlist' => \$mod_list,
101            'args=s' => \$user_args, 'argsmod=s' => \$user_args_mod,
102            'noargs' => \$no_user_args, 'os=s' => \$OS)
103    or pod2usage(2);
104
105 # Print the help output and exit if --help was on the command line.
106 pod2usage(1) if $script_help;
107 pod2usage(-exitstatus => 0, -verbose => 2) if $manual;
108
109 die "ERROR: No configuration given\n" unless $cfg || $user_cfg;
110
111 $Win32 = 1 if $ENV{'OS'} && $ENV{'OS'} =~ /Windows/;
112
113 my $cfg_load = ("$user_cfg" eq "") ? "$base_dir/$cfg" : "$user_cfg";
114 %MODULES = JugglerConfigure::parseConfigFile("$cfg_load");
115
116 listModules() && exit(0) if $mod_list;
117 printHelp() && exit(0) if $all_help;
118
119 if ( $regen )
120 {
121    if ( $module )
122    {
123       die "ERROR: No such module $module in $cfg!\n"
124          unless defined($MODULES{"$module"});
125
126       regenModuleInfo("$module");
127       generateMakefile("$module");
128    }
129    elsif ( $JugglerConfigure::DEFAULT_MODULE &&
130            defined($MODULES{"$JugglerConfigure::DEFAULT_MODULE"}) )
131    {
132       regenModuleInfo("$JugglerConfigure::DEFAULT_MODULE");
133       generateMakefile("$JugglerConfigure::DEFAULT_MODULE");
134    }
135    else
136    {
137       foreach ( keys(%MODULES) )
138       {
139          regenModuleInfo("$_");
140       }
141
142       generateMakefile();
143    }
144 }
145 else
146 {
147    my $cache_file_set = 0;
148
149    foreach ( @ARGV )
150    {
151       if ( /-cache-f/ )
152       {
153          $cache_file_set = 1;
154          last;
155       }
156    }
157
158    # Unless the user passed --noargs, try to find default argument values.
159    unless ( $no_user_args )
160    {
161       my $args_mod = ("$user_args_mod" eq "") ? "$base_dir/$args_mod_file"
162                                               : "$user_args_mod";
163
164       # Figure out what argument file to load, if any.  If the user specified
165       # a file name on the command line, it will be in $user_args.  Otherwise,
166       # we fall back on $base_dir/$args_file.
167       my $args_load = ("$user_args" eq "") ? "$base_dir/$args_file"
168                                            : "$user_args";
169
170       if ( -r "$args_mod" )
171       {
172          require "$args_mod";
173
174          if ( $CFG_LOAD_FUNC )
175          {
176             my @default_args = &$CFG_LOAD_FUNC();
177             mergeArgArrays(\@ARGV, \@default_args);
178          }
179       }
180       elsif ( -r "$args_load" )
181       {
182          loadDefaultArgs("$args_load");
183       }
184    }
185
186    if ( ! $cache_file_set )
187    {
188       my $cwd = getcwd();
189       push(@ARGV, "--cache-file=$cwd/config.cache");
190    }
191
192    # Configure the module named on the command line.
193    if ( $module )
194    {
195       die "ERROR: No such module $module in $cfg!\n"
196          unless defined($MODULES{"$module"});
197
198       generateReconfig("$module", @save_argv);
199       configureModule("$module");
200       generateMakefile("$module");
201    }
202    # If no module was named on the command line but we do have a default
203    # module, configure it.
204    elsif ( $JugglerConfigure::DEFAULT_MODULE &&
205            defined($MODULES{"$JugglerConfigure::DEFAULT_MODULE"}) )
206    {
207       generateReconfig("$JugglerConfigure::DEFAULT_MODULE", @save_argv);
208       configureModule("$JugglerConfigure::DEFAULT_MODULE");
209       generateMakefile("$JugglerConfigure::DEFAULT_MODULE");
210    }
211    # If neither of the above will do, just configure every module we know
212    # about from the input file.
213    else
214    {
215       generateReconfig('', @save_argv);
216
217       foreach ( keys(%MODULES) )
218       {
219          configureModule("$_");
220       }
221
222       generateMakefile();
223    }
224 }
225
226 exit(0);
227
228 # =============================================================================
229 # Subroutines follow.
230 # =============================================================================
231
232 sub mergeArgArrays ($$)
233 {
234    my $dest_list   = shift;
235    my $source_list = shift;
236
237    foreach ( @$source_list )
238    {
239       # Strip leading and trailing whitespace.
240       s/^\s+//;
241       s/\s+$//;
242       next if /^$/;   # Just to be safe...
243       
244       # Only add the argument if it is not already on the command line.
245       m/^(--[^=]+)/;
246       push(@$dest_list, "$_") unless grep(/$1/, @$dest_list);
247    }
248 }
249
250 sub loadDefaultArgs ($)
251 {
252    my $args_load = shift;
253
254    if ( open(ARGS_FILE, "$args_load") )
255    {
256       print "Loading default arguments from $args_load ...\n";
257       my $args_contents = '';
258
259       while ( <ARGS_FILE> )
260       {
261          s/#.*$//;           # Strip comments
262          next if /^\s*$/;    # Skip blank lines
263          $args_contents .= "$_";
264       }
265
266       close(ARGS_FILE) or warn "WARNING: Could not close $args_load: $!\n";
267
268       my $platform = getPlatform();
269
270       while ( "$args_contents" ne '' )
271       {
272          my @args_list = ();
273
274          # Read in the arguments for all platforms.
275          if ( $args_contents =~ /^\s*all\s*{(.+?)}\s*/si )
276          {
277             @args_list     = split(m|$/|, "$1");
278             $args_contents = $';
279          }
280          # Read in the arguments for the current platform.
281          elsif ( $args_contents =~ /^\s*$platform\s*{(.+?)}\s*/sio )
282          {
283             @args_list     = split(m|$/|, "$1");
284             $args_contents = $';
285          }
286          # Skip a platform that does not match $platform.
287          elsif ( $args_contents =~ /^\s*(\S+)\b\s*{(.+?)}\s*/s )
288          {
289             print "Skipping $1\n";
290             $args_contents = $';
291          }
292
293          mergeArgArrays(\@ARGV, \@args_list);
294       }
295    }
296    else
297    {
298       warn "WARNING: Coult not read from $args_load: $!\n";
299    }
300 }
301
302 sub configureModule ($)
303 {
304    my $module_name = shift;
305
306    my $cwd = getcwd();
307    my $safe_cwd;
308
309    if ( $Win32 )
310    {
311       $safe_cwd = `cygpath -w $cwd`;
312       chomp($safe_cwd);
313       $safe_cwd =~ s/\\/\//g;
314    }
315    else
316    {
317       $safe_cwd = "$cwd";
318    }
319
320    die "ERROR: No module $module_name defined\n"
321       unless defined($MODULES{"$module_name"});
322
323    # Use ksh to run configure if we are on Solaris.  Otherwise, use sh
324    my $shell = ((getPlatform() =~ /solaris/i) ? 'ksh' : '/bin/sh');
325
326    my $depencency;
327    foreach $depencency ( $MODULES{"$module_name"}->getDependencies() )
328    {
329       my $mod_path = $depencency->getPath();
330
331       mkpath("$mod_path", 1, 0755) unless -d "$mod_path";
332
333       # Do not try to proceed with $dependency unless we can chdir to
334       # $mod_path.
335       unless ( chdir("$mod_path") )
336       {
337          warn "WARNING: Could not chdir to $mod_path: $!\n";
338          next;
339       }
340
341       my $src_root;
342
343       # Dependeing on the value of $base_dir, assign $src_root such that it
344       # is an absolute path.
345       # XXX: This creates a problem on Win32 with $(srcdir) in generated
346       # makefiles!  Win32 utilities will not understand the Cygwin path, but
347       # they would understand a relative path...
348       if ( $base_dir =~ /^\// )
349       {
350          $src_root = "$base_dir";
351       }
352       else
353       {
354          $src_root = "$cwd/$base_dir";
355       }
356
357       print "Running $shell $src_root/$mod_path/configure @ARGV\n";
358       system("$shell $src_root/$mod_path/configure @ARGV 2>&1") == 0
359          or die "Configuration of $module_name in $ENV{'PWD'} failed\n" .
360                 "Check $ENV{'PWD'}/config.log for details\n";
361
362       my %mod_env = $depencency->getEnvironment();
363       foreach ( keys(%mod_env) )
364       {
365          my $env_val = $depencency->getEnvironmentValue($_);
366
367          if ( /_CONFIG$/ )
368          {
369             $ENV{"$_"}    = "$cwd/$mod_path/$env_val";
370             $ENV{'PATH'} .= ":$cwd/$mod_path";
371          }
372          elsif ( /_BASE_DIR$/ )
373          {
374             if ( "$env_val" eq "instlinks" )
375             {
376                $ENV{"$_"} = "$safe_cwd/instlinks";
377             }
378             else
379             {
380                $ENV{"$_"} = "$env_val";
381             }
382          }
383          else
384          {
385             $ENV{"$_"} = "$env_val";
386          }
387       }
388
389       $ENV{'USE_BASE_DIR'} = 'yes';
390
391       chdir("$cwd");
392    }
393 }
394
395 sub regenModuleInfo ($)
396 {
397    my $module_name = shift;
398
399    my $cwd = getcwd();
400
401    die "ERROR: No module $module_name defined\n"
402       unless defined($MODULES{"$module_name"});
403
404    my $depencency;
405    foreach $depencency ( $MODULES{"$module_name"}->getDependencies() )
406    {
407       my $mod_path = $depencency->getPath();
408
409       chdir("$mod_path")
410          or die "WARNING: Could not chdir to $mod_path\n";
411       system("./config.status 2>&1") == 0
412          or die "Regeneration for $module_name in $ENV{'PWD'} failed\n";
413       chdir("$cwd");
414    }
415 }
416
417 sub generateMakefile (;$)
418 {
419    my $gen_module = shift || '';
420
421    open(INPUT, "$base_dir/Makefile.in")
422       or die "ERROR: Could not read from $base_dir/Makefile.in: $!\n";
423
424    my $input_file;
425    while ( <INPUT> )
426    {
427       $input_file .= "$_";
428    }
429
430    close(INPUT);
431
432    my $modules;
433    my @module_array;
434
435    if ( $gen_module )
436    {
437       foreach ( $MODULES{"$gen_module"}->getDependencies() )
438       {
439          $modules .= $_->getPath() . " ";
440       }
441    }
442    else
443    {
444       my $mod_name;
445       foreach $mod_name ( keys(%MODULES) )
446       {
447          my $temp_mod;
448          foreach $temp_mod ( $MODULES{"$mod_name"}->getDependencies() )
449          {
450             $modules .= $temp_mod->getPath() . " ";
451          }
452       }
453    }
454
455    warn "WARNING: No modules defined!\n" unless $modules;
456
457    my $cwd = getcwd();
458    chdir("$base_dir");
459    $input_file =~ s/\@JUGGLER_PROJECTS\@/$modules/g;
460
461    if ( $Win32 )
462    {
463       # Get the Win32-friendly versions of these paths.  Then change the \'s
464       # to /'s just to be safe.
465       my $win_pwd = `cygpath -w $ENV{'PWD'}`;
466       my $win_cwd = `cygpath -w $cwd`;
467       chomp($win_pwd);
468       chomp($win_cwd);
469
470       $win_pwd =~ s/\\/\//g;
471       $win_cwd =~ s/\\/\//g;
472
473       $input_file =~ s/\@JUGGLERROOT_ABS\@/$win_pwd/g;
474       $input_file =~ s/\@topdir\@/$win_cwd/g;
475    }
476    else
477    {
478       $input_file =~ s/\@JUGGLERROOT_ABS\@/$ENV{'PWD'}/g;
479       $input_file =~ s/\@topdir\@/$cwd/g;
480    }
481
482    chdir("$cwd");
483
484    print "Generating Makefile\n";
485    open(OUTPUT, "> Makefile") or die "ERROR: Could not create Makefile: $!\n";
486    print OUTPUT "$input_file";
487    close(OUTPUT) or warn "WARNING: Failed to save Makefile: $!\n";
488 }
489
490 sub generateReconfig ($@)
491 {
492    my $gen_module = shift;
493    my @save_argv  = @_;
494
495    my $modules;
496
497    open(RECONFIG, "> reconfig");
498
499    if ( $gen_module )
500    {
501       foreach ( $MODULES{"$gen_module"}->getDependencies() )
502       {
503          print RECONFIG "(cd " . $_->getPath() . " && rm -f config.status " .
504                         "config.cache config.log)\n"
505       }
506    }
507    else
508    {
509       my $mod_name;
510       foreach $mod_name ( keys(%MODULES) )
511       {
512          foreach ( $MODULES{"$mod_name"}->getDependencies() )
513          {
514             print RECONFIG "(cd " . $_->getPath() . " && rm -f config.status " .
515                            "config.cache config.log)\n"
516          }
517       }
518    }
519
520    print RECONFIG "rm -f config.cache\n";
521    print RECONFIG "$0 ", "@save_argv\n";
522    close(RECONFIG);
523    chmod(0755, "reconfig");
524 }
525
526 sub listModules ()
527 {
528    my $mod_name;
529    foreach $mod_name ( keys(%MODULES) )
530    {
531       print "$mod_name";
532
533 #      if ( $#{$MODULES{"$mod_name"}} != -1 )
534 #      {
535 #         print " (Requires:";
536 #
537 #         my $dep_ref;
538 #         foreach $dep_ref ( @{$MODULES{"$mod_name"}} )
539 #         {
540 #            print " ${$dep_ref}{'path'}";
541 #         }
542 #
543 #         print ")";
544 #      }
545
546       print "\n";
547    }
548
549    return 1;
550 }
551
552 sub printHelp ()
553 {
554    my @help_output = ();
555
556    # Initialize the references that are contained within @help_output.
557    my $i;
558    for ( $i = 0; $i < $LAST_ARG_GROUP; $i++ )
559    {
560       $help_output[$i] = {};
561    }
562
563    if ( $module )
564    {
565       getConfigureHelp("$module", \@help_output);
566    }
567    elsif ( $JugglerConfigure::DEFAULT_MODULE &&
568            defined($MODULES{"$JugglerConfigure::DEFAULT_MODULE"}) )
569    {
570       getConfigureHelp("$JugglerConfigure::DEFAULT_MODULE", \@help_output);
571    }
572    else
573    {
574       foreach ( keys(%MODULES) )
575       {
576          getConfigureHelp("$_", \@help_output);
577       }
578    }
579
580    for ( $i = 0; $i < $LAST_ARG_GROUP; $i++ )
581    {
582       SWITCH:
583       {
584          if ( $i == $CONFIG_ARGS )
585          {
586             print "Configuration:\n";
587             last SWITCH;
588          }
589
590          if ( $i == $PATH_ARGS )
591          {
592             print "Directory and file names:\n";
593             last SWITCH;
594          }
595
596          if ( $i == $HOST_ARGS )
597          {
598             print "Host type:\n";
599             last SWITCH;
600          }
601
602          if ( $i == $FEATURE_ARGS )
603          {
604             print "Features and packages:\n";
605             last SWITCH;
606          }
607
608          if ( $i == $CUSTOM_ARGS )
609          {
610             print "--enable and --with options recognized:\n";
611             last SWITCH;
612          }
613       }
614
615       foreach ( sort(keys(%{$help_output[$i]})) )
616       {
617          print "  ${$help_output[$i]}{$_}\n";
618       }
619    }
620
621    print "\n";
622
623    print "Modules that may be built:\n";
624    foreach ( keys(%MODULES) )
625    {
626       print "\t$_\n";
627    }
628
629    print "\nDefault module is $JugglerConfigure::DEFAULT_MODULE\n"
630       if $JugglerConfigure::DEFAULT_MODULE;
631
632    return 1;
633 }
634
635 sub getConfigureHelp ($$)
636 {
637    my $mod_name    = shift;
638    my $arg_arr_ref = shift;
639
640    foreach ( $MODULES{"$mod_name"}->getDependencies() )
641    {
642       next unless -x "$base_dir/$$_{'path'}/configure";
643
644       open(CFG_OUTPUT, "$base_dir/$$_{'path'}/configure --help |");
645
646       my $cfg_output;
647       while ( <CFG_OUTPUT> )
648       {
649          $cfg_output .= "$_";
650       }
651
652       close(CFG_OUTPUT);
653
654       parseOutput("$cfg_output", $arg_arr_ref);
655    }
656 }
657
658 sub parseOutput ($$)
659 {
660    my $string      = shift;
661    my $arg_arr_ref = shift;
662
663    my $arg_group;
664
665    while ( $string !~ /^\s*$/s )
666    {
667       if ( $string =~ /^Configuration:\s*/s )
668       {
669          $arg_group = $CONFIG_ARGS;
670          $string = $';
671       }
672       elsif ( $string =~ /^Directory.*?:\s*/s )
673       {
674          $arg_group = $PATH_ARGS;
675          $string = $';
676       }
677       elsif ( $string =~ /^Host.*?:\s*/s )
678       {
679          $arg_group = $HOST_ARGS;
680          $string = $';
681       }
682       elsif ( $string =~ /^Features.*?:\s*/s )
683       {
684          $arg_group = $FEATURE_ARGS;
685          $string = $';
686       }
687       elsif ( $string =~ /^--enable and --with.*?:\s*/s )
688       {
689          $arg_group = $CUSTOM_ARGS;
690          $string = $';
691       }
692       elsif ( $string =~ /^\s*(--\w+,\s+--\w+)/s ||
693               $string =~ /^\s*(--[\w-]+)\W/s )
694       {
695          my $param = "$1";
696          ${$$arg_arr_ref[$arg_group]}{"$param"} = '';
697
698          my $temp_string = "$string";
699
700          if ( $temp_string =~ /($param.+?)\s+(--)/s ||
701               $temp_string =~ /($param.+?)\s*$/s )
702          {
703             my $desc = "$1";
704             my $remainder = "$2$'";
705
706             if ( $desc =~ /^(\w.+?:)$/m )
707             {
708                $desc = $`;
709                $remainder = "$1\n$remainder";
710             }
711
712             ${$$arg_arr_ref[$arg_group]}{"$param"} = "$desc";
713             $string = "$remainder";
714          }
715       }
716       elsif ( $string =~ /^(Usage|Options).*$/m )
717       {
718          $string = $';
719       }
720
721       $string =~ s/^\s*//s;
722    }
723 }
724
725 sub getPlatform ()
726 {
727    my $platform = "unknown";
728
729    # Prefer the user-defined platform type over any auto-detected value.
730    if ( "$OS" ne '' )
731    {
732       $platform = "$OS";
733    }
734    elsif ( defined($ENV{'OS'}) )
735    {
736       $platform = "$ENV{'OS'}";
737    }
738    elsif ( defined($ENV{'OSTYPE'}) )
739    {
740       $platform = "$ENV{'OSTYPE'}";
741    }
742    elsif ( defined($ENV{'OS_TYPE'}) )
743    {
744       $platform = "$ENV{'OS_TYPE'}";
745    }
746    elsif ( defined($ENV{'HOSTTYPE'}) )
747    {
748       $platform = "$ENV{'HOSTTYPE'}";
749    }
750    # As a last resort, fall back on the use of uname(1).
751    else
752    {
753       chomp($platform = `uname -s`);
754    }
755
756    # XXX: This is a hack to deal with weird OS strings such as "linux-gnu".
757    # We just make the platform be "linux" unless the user set the platform
758    # type on the command line.
759    $platform = 'linux' if ! $OS && $platform =~ /linux/i;
760
761    return $platform;
762 }
763
764 sub getHostname ()
765 {
766    my $hostname = '';
767
768    if ( defined($ENV{'HOSTNAME'}) )
769    {
770       $hostname = "$ENV{'HOSTNAME'}";
771    }
772    else
773    {
774       chomp($hostname = `hostname`);
775    }
776
777    return $hostname;
778 }
779
780 __END__
781
782 =head1 NAME
783
784 configure.pl
785
786 =head1 SYNOPSIS
787
788 This script acts as the "glue" for a collection of Autoconf-based configure
789 scripts.  Based on a configuration file, it is capable of building a
790 dependency tree and running the configure scripts in the correct order such
791 that the dependencies are satisfied correctly.  Note that all modules must
792 be capable of having dependencies satisfied based entirely on the results
793 of running a dependent module's configure script.
794
795 =head1 DESCRIPTION
796
797 (Still need to write this...)
798
799 =head1 OPTIONS
800
801 =over 8
802
803 =item B<--help>
804
805 Print usage information of this script alone and exit.
806
807 =item B<--all-help>
808
809 Print usage information for all the known configure scripts.  The
810 knowledge of configure scripts comes from the configuration file.  The
811 output may be limited using the B<--module> argument, described below.
812
813 =item B<--manual>
814
815 Print usage information of this script alone in UNIX manpage format and exit.
816
817 =item B<--modlist>
818
819 Print a list of the available modules.
820
821 =item B<--cfg>=file
822
823 Name the configuration file to be used by this script.  If not specified,
824 it defaults to F<juggler.cfg>.  This file is discovered based on the
825 run-time path to this script, and thus the script and the default
826 configuration file must be in the same directory.  For example, if this
827 script is run as:
828
829 =over 4
830
831 ../configure.pl
832
833 =back
834
835 then F<juggler.cfg> will be searched for as F<../juggler.cfg>.
836
837 =item B<--module>=name
838
839 Limit the work done by this script to what is required by the named
840 module.  The given name must correspond to one listed in the aforementioned
841 configuration file.  This can be specified in conjunction with B<--all-help>
842 to limit the output to only what is appropriate for the named module.
843
844 =item B<--regen>
845
846 Just regenerate the files previously generated without running the
847 configure script(s) again.
848
849 =item B<--args>=file
850
851 Name the file containing arguments to pass to the Autoconf-generated
852