diff -r -b -u -2 -N parrot.cvs/Configure.pl parrot/Configure.pl
--- parrot.cvs/Configure.pl	Fri Sep 14 18:00:34 2001
+++ parrot/Configure.pl	Fri Sep 14 17:30:16 2001
@@ -6,4 +6,33 @@
 use strict;
 use Config;
+use Getopt::Long;
+
+my( $opt_debugging, $opt_defaults, $opt_version, $opt_help ) =
+  ( 0, 0, 0, 0 );
+my( %opt_defines );
+my $result = GetOptions( 'debugging!' => \$opt_debugging,
+			 'defaults!'  => \$opt_defaults,
+			 'version'    => \$opt_version,
+			 'help'       => \$opt_help,
+			 'define=s'   => \%opt_defines,
+                       );
+
+if( $opt_version ) {
+	print '$Id:$' . "\n";
+	exit;
+}
+
+if( $opt_help ) {
+	print <<"EOT";
+$0 - Parrot Configure
+Options:
+   --debugging          Enable debugging
+   --defaults           Accept all default values
+   --define name=value  Defines value name as value
+   --help               This text
+   --version            Show assembler version
+EOT
+	exit;
+}
 
 my($DDOK)=undef;
@@ -33,10 +62,32 @@
 	nv =>		($Config{nvtype}||'long double'),
 	cc =>		$Config{cc},
+	cc_debug =>	'-g',
 	ccflags =>	$Config{ccflags},
-	libs =>		$Config{libs}
+	libs =>		$Config{libs},
+	o =>		'.o',		# objec files extension
+        exe =>		$Config{_exe},
+	ld =>		$Config{ld},
+	ld_out =>	'-o ',		# ld output file
+	ld_debug =>     '',		# include debug info in executable
+	debugging =>	$opt_debugging,
 );
 
+foreach my $i ( keys %opt_defines ) {
+	$c{$i} = $opt_defines{$i};
+}
+
+# set up default values
+my $hints = "hints/" . lc( $^O ) . ".pl";
+if( -f $hints ) {
+	local( $/, *HINT );
+	open HINT, "< $hints" or die "Unable to open hints file '$hints'";
+	my $hint = <HINT>;
+	close HINT;
+	eval $hint or die "Error in hints file: '$@/$!'";
+}
+
 #ask questions
 prompt("What C compiler do you want to use?", 'cc');
+prompt("What is the name of the linker?", 'ld');
 prompt("What flags would you like passed to your C compiler?", 'ccflags');
 prompt("Which libraries would you like your C compiler to include?", 'libs');
@@ -44,4 +95,8 @@
 prompt("How about your floats?", 'nv');
 
+unless( $c{debugging} ) {
+	$c{ld_debug} = ' ';
+	$c{cc_denug} = ' ';
+}
 
 print <<"END";
@@ -95,4 +150,6 @@
 #prompt for something from the user
 sub prompt {
+	return if $opt_defaults;
+
 	my($message, $field)=(@_);
 	my($input);
diff -r -b -u -2 -N parrot.cvs/Makefile.in parrot/Makefile.in
--- parrot.cvs/Makefile.in	Fri Sep 14 16:08:00 2001
+++ parrot/Makefile.in	Fri Sep 14 18:08:45 2001
@@ -1,3 +1,3 @@
-O = .o
+O = ${o}
 
 H_FILES = config.h exceptions.h io.h op.h register.h string.h events.h interpreter.h memory.h parrot.h stacks.h bytecode.h global_setup.h
@@ -5,5 +5,5 @@
 O_FILES = global_setup$(O) interpreter$(O) parrot$(O) register$(O) basic_opcodes$(O) memory$(O) bytecode$(O) string$(O) strnative$(O)
 
-C_FLAGS = ${ccflags} -I..
+C_FLAGS = ${ccflags} -I.. ${cc_debug}
 
 C_LIBS = ${libs}
@@ -11,9 +11,12 @@
 
 CC = ${cc} $(C_FLAGS)
+LD = ${ld}
 
-all : $(O_FILES)
+TEST_PROG=test_prog${exe}
 
-test_prog: test_main$(O) $(O_FILES)
-	$(CC) $(C_LIBS) -o test_prog $(O_FILES) test_main$(O)
+all : $(TEST_PROG)
+
+$(TEST_PROG): test_main$(O) $(O_FILES)
+	$(LD) $(C_LIBS) ${ld_debug} ${ld_out}$(TEST_PROG) $(O_FILES) test_main$(O)
 
 test_main$(O): $(H_FILES)
@@ -50,3 +53,4 @@
 
 clean:
-	rm -f *$(O) *.s basic_opcodes.c interp_guts.h op.h test_prog
+	-rm -f *$(O) *.s basic_opcodes.c interp_guts.h op.h $(TEST_PROG)
+	-rm -f *.opt *.ilk *.pdb
diff -r -b -u -2 -N parrot.cvs/hints/mswin32.pl parrot/hints/mswin32.pl
--- parrot.cvs/hints/mswin32.pl	Thu Jan  1 01:00:00 1970
+++ parrot/hints/mswin32.pl	Fri Sep 14 17:33:49 2001
@@ -0,0 +1,19 @@
+{
+	my $is_msvc = grep { $c{cc} eq $_ } ( qw(cl cl.exe) );
+	my $is_mingw = grep { $c{cc} eq $_ } ( qw(gcc gcc.exe) );
+
+	if( $is_msvc ) {
+		$c{o} = '.obj';
+		$c{ld_out} = '-out:';
+		$c{cc_debug} = '-Zi';
+		$c{ld_debug} = '-debug';
+	}
+	elsif( $is_mingw ) {
+		$c{ld} = 'gcc';
+		# if your perl is ActivePerl, then libs are .lib files,
+		# not necessary, and gcc does not like them
+		$c{libs} = ' ' if $c{libs} =~ m/\.lib\s/i;
+		$c{ccflags} =~ s{[-/]nologo}{}i;
+	}
+}
+
diff -r -b -u -2 -N parrot.cvs/parrot.h parrot/parrot.h
--- parrot.cvs/parrot.h	Fri Sep 14 18:00:36 2001
+++ parrot/parrot.h	Fri Sep 14 17:49:42 2001
@@ -20,6 +20,10 @@
 /*#include <types.h> */
 #include <time.h>
-#include <unistd.h>
-#include <sys/mman.h>
+#if defined(WIN32)
+#  include <io.h>
+#else
+#  include <unistd.h>
+#  include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
diff -r -b -u -2 -N parrot.cvs/test_main.c parrot/test_main.c
--- parrot.cvs/test_main.c	Fri Sep 14 18:00:36 2001
+++ parrot/test_main.c	Fri Sep 14 17:49:42 2001
@@ -67,5 +67,9 @@
     }
 
+#if defined(WIN32)
+    program_code = malloc( file_stat.st_size );
+#else
     program_code = mmap(0, file_stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
+#endif
     if (!program_code) {
       printf("Can't mmap, code %i\n", errno);
@@ -73,4 +77,7 @@
     }
 
+#if defined(WIN32)
+    _read( fd, program_code, file_stat.st_size );
+#endif
     program_code = init_bytecode(program_code);
 
