Cygwin needs to have libperl.dll around if trying to link
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 25 Nov 2001 20:40:23 +0000 (20:40 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 25 Nov 2001 20:40:23 +0000 (20:40 +0000)
with -lperl.  Note: this change cures the test but whether
it cures CygPerl installation, I don't know: hopefully the
libperl5_7_2.dll, or the version equivalent, gets installed
also as libperl.dll to the proper place(s).

p4raw-id: //depot/perl@13272

lib/ExtUtils/Embed.t

index f082b3a..36d92b5 100644 (file)
@@ -77,6 +77,8 @@ if ($^O eq 'VMS') {
     for (@cmd) {
         s!-bE:(\S+)!-bE:$perl_exp!;
     }
+   } elsif ($^O eq 'cygwin') { # Cygwin needs the libperl copied
+     system("cp ../$Config{'libperl'} libperl.dll");    # for test 1
    }
 }
 my $status;
@@ -90,13 +92,14 @@ if ($^O eq 'VMS' && !$status) {
 }
 print (($status? 'not ': '')."ok 1\n");
 
-my $embed_test = File::Spec->catfile(File::Spec->curdir, "embed_test");
+my $embed_test = File::Spec->catfile(File::Spec->curdir, $exe);
 $embed_test = "run/nodebug $exe" if $^O eq 'VMS';
-
+print "# embed_test = $embed_test\n";
 $status = system($embed_test);
-print (($status? 'not ':'')."ok 9\n");
+print (($status? 'not ':'')."ok 9 # $status\n");
 unlink($exe,"embed_test.c",$obj);
 unlink("embed_test.map","embed_test.lis") if $^O eq 'VMS';
+unlink("libperl.dll") if $^O eq 'cygwin';
 
 # gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccopts -e ldopts`