File: Makefile.PL

package info (click to toggle)
libapache2-mod-perl2 2.0.13-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,016 kB
  • sloc: perl: 97,771; ansic: 14,493; makefile: 51; sh: 18
file content (37 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use lib qw(../lib);
use ModPerl::BuildMM ();

use Config;
use Apache2::Build;
use Apache::TestTrace;
my $build = Apache2::Build->build_config();

my $ccopts = $build->ccopts;

# when uselargefiles is on, -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
# are needed to get the right 'Off_t', without which perlio compiled
# with Off_t as 'long long int', doesn't quite work with apr_perlio.c
# compiled with Off_t as 'long int'
#
# On the other handl if apr is built without large files support, we
# have binary compatibility problems, if we try to build mod_perl with
# -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
#
# XXX: it seems that enabling these flags only for apr_perlio/PerlIO
# seems to do the trick
if ($build->has_large_files_conflict) {
    $ccopts .= $Config{uselargefiles}
        ? ' ' . $Config{ccflags_uselargefiles}
        : '';
}

# avoid referencing &perl_module outside of mod_perl
$ccopts .= ' -DMP_IN_XS';

ModPerl::BuildMM::WriteMakefile(
    NAME         => 'APR::PerlIO',
    VERSION_FROM => 'PerlIO.pm',
    CCFLAGS      => $ccopts,
    OBJECT       => 'PerlIO.o modperl_apr_perlio.o'
);