my $libs = Configure::Data->get('libs');

# get rid of old pthread-stuff, if any
$libs =~ s/(-lpthreads|-lc_r)\b\s*//g;

# The following test is from FreeBSD's /usr/ports/Mk/bsd.port.mk,
# which must be assumed to do the right thing.

my $osversion;
if (-e "/sbin/sysctl") {
    $osversion = `/sbin/sysctl -n kern.osreldate`;
}
else {
    $osversion = `/usr/sbin/sysctl -n kern.osreldate`;
}
chomp $osversion;

if ($osversion < 500016) { 
    $libs .= ' -pthread';
}
else {
    $libs =~ s/-lc\b\s*//;
    $libs .= ' -lc_r';
}

Configure::Data->set(
    libs => $libs,
);

my $libs = Configure::Data->get('libs');

# get rid of old pthread-stuff, if any
$libs =~ s/(-lpthreads|-lc_r)\b\s*//g;

# The following test is from FreeBSD's /usr/ports/Mk/bsd.port.mk,
# which must be assumed to do the right thing.

my $osversion;
if (-e "/sbin/sysctl") {
    $osversion = `/sbin/sysctl -n kern.osreldate`;
}
else {
    $osversion = `/usr/sbin/sysctl -n kern.osreldate`;
}
chomp $osversion;

if ($osversion < 500016) { 
    $libs .= ' -pthread';
}
else {
    $libs =~ s/-lc\b\s*//;
    $libs .= ' -lc_r';
}

Configure::Data->set(
    libs => $libs,
    link => 'g++',
);

Use g++ as the linker on FreeBSD
Use g++ as the linker on FreeBSD


git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@6364 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
