]> mj.ucw.cz Git - libucw.git/blobdiff - lib/perl/Configure.pm
Added a debugging hack.
[libucw.git] / lib / perl / Configure.pm
index f251ce62c463c55204131b911ce278f6d9bec07f..bd1a7cc53f94ad5297beb1b9cd39c07441866d29 100644 (file)
@@ -119,12 +119,12 @@ sub Init($$) {
                if ($x =~ /^(\w+)=(.*)/) {
                        Override($1 => $2);
                } elsif ($x =~ /^-(\w+)$/) {
-                       Override($1 => 1);
+                       Override($1 => 0);
                        delete $vars{$1};
                } elsif ($x =~ /^(\w+)$/) {
                        Override($1 => 1);
                } else {
-                       print STDERR "Invalid option $_\n";
+                       print STDERR "Invalid option $x\n";
                        exit 1;
                }
        }
@@ -162,7 +162,7 @@ sub Finish() {
        Log "done\n";
 
        Log "Generating autoconf.h ... ";
-       open X, ">obj/lib/autoconf.h" or Fail $!;
+       open X, ">obj/autoconf.h" or Fail $!;
        print X "/* Generated automatically by $0, please don't touch manually. */\n";
        foreach my $x (sort keys %vars) {
                # Don't export variables which contain no underscores
@@ -181,6 +181,8 @@ sub Finish() {
        foreach my $x (sort keys %vars) {
                print X "$x=$vars{$x}\n";
        }
+       print X "s=\${SRCDIR}\n";
+       print X "o=obj\n";
        close X;
        Log "done\n";
 }