Commit b8731b948c for perl
commit b8731b948cbbb558c6f52a4e3510fc7781a13d29
Author: Yves Orton <demerphq@gmail.com>
Date: Sat Nov 14 14:46:32 2026 +0100
POSIX: silence warnings about missing optional libraries
MakeMaker warns about missing posix and cposix libraries even though
Configure has already checked for them. Only ask for these libraries if
Configure selected them.
diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
index 17dd00d411..a9ffbf37b9 100644
--- a/ext/POSIX/Makefile.PL
+++ b/ext/POSIX/Makefile.PL
@@ -12,7 +12,9 @@ if ($Config{sig_name} =~ /\bRTMIN\b/ && $Config{sig_name} =~ /\bRTMAX\b/) {
my @libs;
if ($^O ne 'MSWin32' && $^O ne 'freemint') {
- push @libs, qw(m posix cposix);
+ push @libs, 'm';
+ push @libs, grep { $Config{libs} =~ /(?:^|\s)-l\Q$_\E(?:\s|$)/ }
+ qw(posix cposix);
}
if ($^O eq 'solaris') {
push @libs, qw(sunmath);