ARSperl
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$ARS_LIBS .= " -lnsl ";
}else{
$ARS_LIBS = " -lar$LARCH -lnsl ";
$ARS_LIBS = " -lar$LARCH -larencrypt$LARCH -lnsl " if $ENCRYPT;
}
if ($GNU_WIN) {
$ARS_LIBS = join(' ', map { "$ARSAPI/lib/" . $_ } @{$ra_arlibs});
} elsif ($WINDOWS) {
$ARS_LIBS = join(' ', map { '-l' . $_ } @{$ra_arlibs});
} else {
$ARS_LIBS .= " -lpthread ";
$ARS_LIBS .= " -licuucbmc$LARCH -licui18nbmc$LARCH -licudatabmc$LARCH " if $ARAPIVERSION >= ARS_VERSION_70;
}
$AUTODEFINES .= " -DARS32 -DARS452 ";
if( ($ARAPIVERSION >= ARS_VERSION_50) && ($^O eq 'linux') && $LARCH !~ /64/ ){
$AUTODEFINES .= " -malign-double ";
}
# e.g for 5.004_03 ..
#
# baserev = 5.0 ( = PERL_REVISION as of 5.6.0)
# PATCHLEVEL = 4
# SUBVERSION = 3 ( = PERL_SUBVERSION as of 5.6.0)
#
# baserev/SUBVERSION still work in 5.6.0, but who knows for how long.
print "Building against perl $]\n";
$AUTODEFINES .= " -DPERL_PATCHLEVEL_IS=$Config{'PATCHLEVEL'} -DPERL_SUBVERSION_IS=$Config{'SUBVERSION'} -DPERL_BASEREV_IS=".($Config{'baserev'}*10)." ";
if($Config{'baserev'} == 5 &&
$Config{'PATCHLEVEL'} == 4 &&
$Config{'SUBVERSION'} == 3) {
print "\n\nWARNING: Perl-5.004_03 contained a buggy 'h2ph' application.\nYou should examine line 100 of perl's 'h2ph' script and be sure that it\n
produces correct syntax (it's missing a close-parenthesis)\n";
print "\nsleeping for 5 seconds. press control-c to abort.\n\n";
sleep 5;
}
if ($LARCH =~ /64/) {
if ($Config{'cc'} =~ /cc/) {
$REDUCE_SYMBOL_SCOPE = 1;
}
else {
print "\n\nWARNING: Because of symbol name collisions (both -- perl and arapi -- use the xdr-functions),\n" .
" it is necessary to reduce the symbol scope to symbols declared within the DSO.\n" .
" ARSPerl wasn't tested on '$Config{'cc'}', if you run into trouble during 'make test'\n" .
" please contact the developer/maintainer!\n\n";
}
}
push(@extras, CAPI => 'TRUE') if ($] >= 5.005 &&
$^O eq 'MSWin32' &&
(($Config{archname} =~ /-object\b/i) ||
($Config{archname} =~ /-multi-thread\b/i))
);
push(@extras, LDDLFLAGS => " -Wl,--exclude-symbols,\177arapi71_NULL_THUNK_DATA ") if $^O eq 'cygwin';
push(@extras, LDDLFLAGS => $Config{'lddlflags'}." -Wl,-Bsymbolic ") if ($REDUCE_SYMBOL_SCOPE);
if( $WINDOWS ){
$ARS_LDPATH = qq{-L"$ARSAPI/lib"};
$INCLUDES = qq{-I"$ARSAPI/include"};
}else{
$ARS_LDPATH = "-L$ARSAPI/lib";
$INCLUDES = "-I$ARSAPI/include";
}
GenerateSupportDotH("support-h.template", $INCLUDES);
print "Generating serverTypeInfoHints.h ..\n";
die "whoops. no file at ".$Config{'perlpath'} unless ( -f $Config{'perlpath'} );
$cmd = qq("$Config{'perlpath'}" infra/exsi.pl < "${ARSAPI}/include/ar.h" > serverTypeInfoHints.h);
$rv = system($cmd);
die "something went wrong when i ran \"$cmd\" (rv = $rv, expected 0)" unless ($rv == 0);
print "Converting C header files to perl modules ..\n";
foreach ("ar", "arerrno") {
my $headerFile = "${ARSAPI}/include/${_}.h";
# # arsystem >= 5.0 doesnt have nt libs/hdrs anymore
# if( ($ARSVERSION >= 5.0) && /^nt/ ) {
# open(FD, "> ARS/${_}-h.pm") || die "open: $!";
# print FD "\# as of ARSystem 5.0, the NT (notifier) routines
## are retired. so this file is just stubbed.
#1;\n";
# close(FD);
# open (FD, "> ARS/artypes.ph") || die "open: $!";
# print FD "\# hackaround for artypes.h. do not remove.\n1;\n";
# close(FD);
# next;
# }
# arsystem <= 6.0.3 doesnt have artypes.h
next if ( ($ARAPIVERSION < ARS_VERSION_63) && /^artypes$/ );
die "couldn't find $headerFile" if (! -e $headerFile);
# # due to the endless confusion over h2ph, i'm including
# # a known-good copy in the arsperl distribution. the
# # -d should make it create _h2ph_pre in the current
# # directory incase you never ran h2ph before (as root)
if ($_ eq "artypes") {
$rv = system("$Config{'perlpath'} infra/h2ph -d ./ARS < $headerFile > ARS/${_}.ph");
} else {
$rv = system("$Config{'perlpath'} infra/h2ph -d ./ARS < $headerFile > ARS/${_}-h.pm");
}
# unlink ('ARS/_h2ph_pre.ph');
# open (FD, "> ARS/_h2ph_pre.ph") || die "open: $!";
# print FD "1;\n";
( run in 0.649 second using v1.01-cache-2.11-cpan-39bf76dae61 )