diff hints/linux.pl hints/linux.pl --- hints/linux.pl +++ hints/linux.pl @@ -1 +1,12 @@ symlink "os/Linux.c", "OS.c" || die "Could not link os/Linux.c to os/OS.c\n"; + + + # We might have a non-threading perl, which doesn't add this + # necessary link option. +use Config; +my $thread_lib = "-lpthread"; + +if( $Config{libs} !~ /$thread_lib/ ) { + $self->{LIBS} ||= []; + push @{ $self->{LIBS} }, $thread_lib; +}