~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to lib/Apache2/Build.pm

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2006-03-24 02:48:44 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060324024844-73oxqkcj2jmlmh2t
Tags: 2.0.2-2build1
Fake sync to bring in new upstream bugfixes, UVF exception by mdz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
use ExtUtils::Embed ();
27
27
use File::Copy ();
28
28
 
29
 
use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl2.pm" } qw(. ..);
 
29
use constant IS_MOD_PERL_BUILD => grep 
 
30
    { -e "$_/Makefile.PL" && -e "$_/lib/mod_perl2.pm" } qw(. ..);
30
31
 
31
32
use constant AIX     => $^O eq 'aix';
32
33
use constant DARWIN  => $^O eq 'darwin';
154
155
    return $path unless $self->{MP_AP_DESTDIR};
155
156
 
156
157
    if (WIN32) {
157
 
        my($dest_vol, $dest_dir) = splitpath $self->{MP_AP_DESTDIR}, 1;
 
158
        my ($dest_vol, $dest_dir) = splitpath $self->{MP_AP_DESTDIR}, 1;
158
159
        my $real_dir = (splitpath $path)[1];
159
160
 
160
161
        $path = catpath $dest_vol, catdir($dest_dir, $real_dir), '';
308
309
    $self->{'httpd'} ||= $httpd;
309
310
    push @Apache::TestMM::Argv, ('httpd' => $self->{'httpd'});
310
311
 
311
 
    my $mplib = "$self->{MP_LIBNAME}$Config{lib_ext}";
312
 
    my $mplibpath = catfile($self->{cwd}, qw(src modules perl), $mplib);
 
312
    my $mplibpath = '';
 
313
    my $ldopts = $self->ldopts;
 
314
 
 
315
    if (CYGWIN) {
 
316
        # Cygwin's httpd port links its modules into httpd2core.dll,
 
317
        # instead of httpd.exe. In this case, we have a problem,
 
318
        # because libtool doesn't want to include static libs (.a)
 
319
        # into a dynamic lib (.dll). Workaround this by setting
 
320
        # mod_perl.a as a linker argument (including all other flags
 
321
        # and libs).
 
322
        my $mplib  = "$self->{MP_LIBNAME}$Config{lib_ext}";
 
323
 
 
324
        $ldopts = join ' ',
 
325
            '--export-all-symbols',
 
326
            '--enable-auto-image-base',
 
327
            "$self->{cwd}/src/modules/perl/$mplib",
 
328
            $ldopts;
 
329
 
 
330
        $ldopts =~ s/(\S+)/-Wl,$1/g;
 
331
 
 
332
    } else {
 
333
        my $mplib  = "$self->{MP_LIBNAME}$Config{lib_ext}";
 
334
        $mplibpath = catfile($self->{cwd}, qw(src modules perl), $mplib);
 
335
    }
313
336
 
314
337
    local $ENV{BUILTIN_LIBS} = $mplibpath;
315
 
    local $ENV{AP_LIBS} = $self->ldopts;
 
338
    local $ENV{AP_LIBS} = $ldopts;
316
339
    local $ENV{MODLIST} = 'perl';
317
340
 
318
 
    #XXX: -Wall and/or -Werror at httpd configure time breaks things
 
341
    # XXX: -Wall and/or -Werror at httpd configure time breaks things
319
342
    local $ENV{CFLAGS} = join ' ', grep { ! /\-Wall|\-Werror/ } 
320
343
        split /\s+/, $ENV{CFLAGS} || '';
321
344
 
322
345
    my $cd = qq(cd $self->{MP_AP_PREFIX});
323
346
 
324
 
    #We need to clean the httpd tree before configuring it
 
347
    # We need to clean the httpd tree before configuring it
325
348
    if (-f File::Spec->catfile($self->{MP_AP_PREFIX}, 'Makefile')) {
326
349
        my $cmd = qq(make clean);
327
350
        debug "Running $cmd";
415
438
    my $self = shift;
416
439
    my $xlibs = "";
417
440
 
418
 
    my($path) = $self->find_dlfile('Xau', @Xlib);
 
441
    my ($path) = $self->find_dlfile('Xau', @Xlib);
419
442
    if ($path) {
420
443
        $xlibs = "-L$path -lXau";
421
444
    }
436
459
}
437
460
 
438
461
sub ldopts {
439
 
    my($self) = @_;
 
462
    my ($self) = @_;
440
463
 
441
464
    my $config = tied %Config;
442
465
    my $ldflags = $config->{ldflags};
469
492
        $ldopts .= $self->gtop_ldopts;
470
493
    }
471
494
 
472
 
    if (CYGWIN && $self->is_dynamic) {
473
 
        $ldopts .= join ' ', '', $self->apru_link_flags;
474
 
    }
475
 
 
476
495
    $config->{ldflags} = $ldflags; #reset
477
496
 
478
497
    # on Irix mod_perl.so needs to see the libperl.so symbols, which
493
512
$Wall .= " -Werror" if $] >= 5.006002;
494
513
 
495
514
sub ap_ccopts {
496
 
    my($self) = @_;
 
515
    my ($self) = @_;
497
516
    my $ccopts = "-DMOD_PERL";
498
517
 
499
518
    if ($self->{MP_USE_GTOP}) {
508
527
            $ccopts .= " $Wall -DAP_DEBUG";
509
528
            $ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER";
510
529
        }
 
530
 
 
531
        if ($self->has_gcc_version('3.3.2') && 
 
532
            $ccopts !~ /declaration-after-statement/) {
 
533
            debug "Adding -Wdeclaration-after-statement to ccopts";
 
534
            $ccopts .= " -Wdeclaration-after-statement";
 
535
        }
511
536
    }
512
537
 
513
538
    if ($self->{MP_COMPAT_1X}) {
540
565
    $ccopts;
541
566
}
542
567
 
 
568
sub has_gcc_version {
 
569
    my $self = shift;
 
570
    my $requested_version = shift;
 
571
 
 
572
    my $has_version = $self->perl_config('gccversion');
 
573
 
 
574
    return 0 unless $has_version;
 
575
 
 
576
    #Only interested in leading version digits
 
577
    $has_version =~ s/^([0-9.]+).*/$1/;
 
578
 
 
579
    my @tuples = split /\./, $has_version, 3;
 
580
    my @r_tuples = split /\./, $requested_version, 3;
 
581
    
 
582
    return cmp_tuples(\@tuples, \@r_tuples) == 1;
 
583
}
 
584
 
 
585
sub cmp_tuples {
 
586
    my ($num_a, $num_b) = @_;
 
587
 
 
588
    while (@$num_a && @$num_b) {
 
589
        my $cmp = shift @$num_a <=> shift @$num_b;
 
590
        return $cmp if $cmp;
 
591
    }
 
592
 
 
593
    return @$num_a <=> @$num_b;
 
594
}
 
595
    
543
596
sub perl_ccopts {
544
597
    my $self = shift;
545
598
 
576
629
# XXX: there could be more, but this is just for cosmetics
577
630
my %cflags_dups = map { $_ => 1 } qw(-D_GNU_SOURCE -D_REENTRANT);
578
631
sub ccopts {
579
 
    my($self) = @_;
 
632
    my ($self) = @_;
580
633
 
581
634
    my $cflags = $self->perl_ccopts . ExtUtils::Embed::perl_inc() .
582
635
                 $self->ap_ccopts;
602
655
}
603
656
 
604
657
sub perl_config_optimize {
605
 
    my($self, $val) = @_;
 
658
    my ($self, $val) = @_;
606
659
 
607
660
    $val ||= $Config{optimize};
608
661
 
614
667
}
615
668
 
616
669
sub perl_config_ld {
617
 
    my($self, $val) = @_;
 
670
    my ($self, $val) = @_;
618
671
 
619
672
    $val ||= $Config{ld};
620
673
 
622
675
}
623
676
 
624
677
sub perl_config_lddlflags {
625
 
    my($self, $val) = @_;
 
678
    my ($self, $val) = @_;
626
679
 
627
680
    if ($self->{MP_DEBUG}) {
628
681
        if (MSVC) {
663
716
}
664
717
 
665
718
sub perl_config {
666
 
    my($self, $key) = @_;
 
719
    my ($self, $key) = @_;
667
720
 
668
721
    my $val = $Config{$key} || '';
669
722
 
692
745
}
693
746
 
694
747
sub find_dlfile {
695
 
    my($self, $name) = (shift, shift);
 
748
    my ($self, $name) = (shift, shift);
696
749
 
697
750
    require DynaLoader;
698
751
    require AutoLoader; #eek
699
752
 
700
753
    my $found = 0;
701
754
    my $loc = "";
702
 
    my(@path) = ($self->libpth, @_);
 
755
    my (@path) = ($self->libpth, @_);
703
756
 
704
757
    for (@path) {
705
758
        if ($found = DynaLoader::dl_findfile($_, "-l$name")) {
712
765
}
713
766
 
714
767
sub find_dlfile_maybe {
715
 
    my($self, $name) = @_;
 
768
    my ($self, $name) = @_;
716
769
 
717
770
    my $path = $self->libpth;
718
771
 
727
780
}
728
781
 
729
782
sub lib_check {
730
 
    my($self, $name) = @_;
 
783
    my ($self, $name) = @_;
731
784
    return unless $self->perl_config('libs') =~ /$name/;
732
785
 
733
786
    return if $self->find_dlfile($name);
746
799
#--- user interaction ---
747
800
 
748
801
sub prompt {
749
 
    my($self, $q, $default) = @_;
 
802
    my ($self, $q, $default) = @_;
750
803
    return $default if $self->{MP_PROMPT_DEFAULT};
751
804
    require ExtUtils::MakeMaker;
752
805
    ExtUtils::MakeMaker::prompt($q, $default);
753
806
}
754
807
 
755
808
sub prompt_y {
756
 
    my($self, $q) = @_;
 
809
    my ($self, $q) = @_;
757
810
    $self->prompt($q, 'y') =~ /^y/i;
758
811
}
759
812
 
760
813
sub prompt_n {
761
 
    my($self, $q) = @_;
 
814
    my ($self, $q) = @_;
762
815
    $self->prompt($q, 'n') =~ /^n/i;
763
816
}
764
817
 
765
818
sub phat_warn {
766
 
    my($self, $msg, $abort) = @_;
 
819
    my ($self, $msg, $abort) = @_;
767
820
    my $level = $abort ? 'ERROR' : 'WARNING';
768
821
    warn <<EOF;
769
822
************* $level *************
802
855
    }
803
856
 
804
857
    return bless {}, (ref($self) || $self) if $@;
805
 
    return Apache2::BuildConfig::->new;
 
858
    return Apache2::BuildConfig->new;
806
859
}
807
860
 
808
861
sub new {
835
888
}
836
889
 
837
890
sub default_file {
838
 
    my($self, $name, $override) = @_;
 
891
    my ($self, $name, $override) = @_;
839
892
    my $key = join '_', 'file', $name;
840
893
    $self->{$key} ||= ($override || $default_files{$name});
841
894
}
856
909
}
857
910
 
858
911
sub save_ldopts {
859
 
    my($self, $file) = @_;
 
912
    my ($self, $file) = @_;
860
913
 
861
914
    $file ||= $self->default_file('ldopts', $file);
862
915
    my $ldopts = $self->ldopts;
872
925
}
873
926
 
874
927
sub save {
875
 
    my($self, $file) = @_;
 
928
    my ($self, $file) = @_;
876
929
 
877
930
    delete $INC{$bpm};
878
931
 
926
979
}
927
980
 
928
981
sub dir {
929
 
    my($self, $dir) = @_;
 
982
    my ($self, $dir) = @_;
930
983
 
931
984
    if ($dir) {
932
985
        for (qw(ap_includedir)) {
988
1041
}
989
1042
 
990
1043
sub ap_includedir  {
991
 
    my($self, $d) = @_;
 
1044
    my ($self, $d) = @_;
992
1045
 
993
1046
    return $self->{ap_includedir}
994
1047
      if $self->{ap_includedir} and -d $self->{ap_includedir};
1048
1101
}
1049
1102
 
1050
1103
sub apr_generation {
1051
 
    my($self) = @_;
1052
 
    return $self->httpd_version_as_int =~ m/21\d+/ ? 1 : 0;
 
1104
    my ($self) = @_;
 
1105
    return $self->httpd_version_as_int =~ m/2[1-9]\d+/ ? 1 : 0;
1053
1106
}
1054
1107
 
1055
1108
# returns an array of apr/apu linking flags (--link-ld --libs) if found
1056
1109
# an empty array otherwise
1057
1110
my @apru_link_flags = ();
1058
1111
sub apru_link_flags {
1059
 
    my($self) = @_;
 
1112
    my ($self) = @_;
1060
1113
 
1061
1114
    return @apru_link_flags if @apru_link_flags;
1062
1115
 
1122
1175
            if ($self->{MP_AP_CONFIGURE} &&
1123
1176
                $self->{MP_AP_CONFIGURE} =~ /--with-${what_long}=(\S+)/) {
1124
1177
                my $dir = $1;
1125
 
                $dir =~ s/$config$// unless -d $dir;
 
1178
                $dir = dirname $dir if -f $dir;
1126
1179
                push @tries, grep -d $_, $dir, catdir $dir, 'bin';
1127
1180
            }
1128
1181
        }
1206
1259
#--- parsing apache *.h files ---
1207
1260
 
1208
1261
sub mmn_eq {
1209
 
    my($class, $dir) = @_;
 
1262
    my ($class, $dir) = @_;
1210
1263
 
1211
1264
    return 1 if WIN32; #just assume, till Apache2::Build works under win32
1212
1265
 
1272
1325
}
1273
1326
 
1274
1327
sub httpd_version_as_int {
1275
 
    my($self, $dir) = @_;
 
1328
    my ($self, $dir) = @_;
1276
1329
    my $v = $self->httpd_version($dir);
1277
1330
    fold_dots($v);
1278
1331
}
1279
1332
 
1280
1333
sub httpd_version_cache {
1281
 
    my($self, $dir, $v) = @_;
 
1334
    my ($self, $dir, $v) = @_;
1282
1335
    return '' unless $dir;
1283
1336
    $self->{httpd_version}->{$dir} = $v if $v;
1284
1337
    $self->{httpd_version}->{$dir};
1285
1338
}
1286
1339
 
1287
1340
sub httpd_version {
1288
 
    my($self, $dir) = @_;
 
1341
    my ($self, $dir) = @_;
1289
1342
 
1290
1343
    return unless $dir = $self->ap_includedir($dir);
1291
1344
 
1357
1410
    while (<$fh>) {
1358
1411
        next unless s/^\#define\s+APR_((HAVE|HAS|USE)_\w+)/$1/;
1359
1412
        chomp;
1360
 
        my($name, $val) = split /\s+/, $_, 2;
 
1413
        my ($name, $val) = split /\s+/, $_, 2;
1361
1414
        next unless $wanted_apr_config{$name};
1362
1415
        $val =~ s/\s+$//;
1363
1416
        next unless $val =~ /^\d+$/;
1370
1423
#--- generate Makefile ---
1371
1424
 
1372
1425
sub canon_make_attr {
1373
 
    my($self, $name) = (shift, shift);
 
1426
    my ($self, $name) = (shift, shift);
1374
1427
 
1375
1428
    my $attr = join '_', 'MODPERL', uc $name;
1376
1429
    $self->{$attr} = "@_";
1393
1446
}
1394
1447
 
1395
1448
sub make_xs {
1396
 
    my($self, $fh) = @_;
 
1449
    my ($self, $fh) = @_;
1397
1450
 
1398
1451
    print $fh $self->canon_make_attr(xsubpp => $self->xsubpp);
1399
1452
 
1402
1455
    my @files;
1403
1456
    my @xs_targ;
1404
1457
 
1405
 
    while (my($name, $xs) = each %{ $self->{XS} }) {
 
1458
    while (my ($name, $xs) = each %{ $self->{XS} }) {
1406
1459
        #Foo/Bar.xs => Foo_Bar.c
1407
1460
        (my $c = $xs) =~ s:.*?WrapXS/::;
1408
1461
        $c =~ s:/:_:g;
1458
1511
my @mm_init_vars = (BASEEXT => '');
1459
1512
 
1460
1513
sub make_tools {
1461
 
    my($self, $fh) = @_;
 
1514
    my ($self, $fh) = @_;
1462
1515
 
1463
1516
    for (@perl_config_pm) {
1464
1517
        print $fh $self->canon_make_attr($_, $self->perl_config($_));
1537
1590
        "\t" . '$(MODPERL_RANLIB) $@';
1538
1591
}
1539
1592
 
 
1593
sub dynamic_link_cygwin {
 
1594
    my $self = shift;
 
1595
    return <<'EOF';
 
1596
$(MODPERL_LIBNAME).$(MODPERL_DLEXT): $(MODPERL_PIC_OBJS)
 
1597
        $(MODPERL_RM_F) $@
 
1598
        $(MODPERL_CC) -shared -o $@ \
 
1599
        -Wl,--out-implib=$(MODPERL_LIBNAME).dll.a \
 
1600
        -Wl,--export-all-symbols -Wl,--enable-auto-import \
 
1601
        -Wl,--enable-auto-image-base -Wl,--stack,8388608 \
 
1602
        $(MODPERL_PIC_OBJS) \
 
1603
        $(MODPERL_LDDLFLAGS) $(MODPERL_LDOPTS) \
 
1604
        $(MODPERL_AP_LIBS)
 
1605
        $(MODPERL_RANLIB) $@
 
1606
EOF
 
1607
}
 
1608
 
1540
1609
sub dynamic_link {
1541
1610
    my $self = shift;
1542
1611
    my $link = \&{"dynamic_link_$^O"};
1544
1613
    $link->($self);
1545
1614
}
1546
1615
 
 
1616
# Returns the link flags for the apache shared core library
 
1617
my $apache_corelib_cygwin;
 
1618
sub apache_corelib_cygwin {
 
1619
    return $apache_corelib_cygwin if $apache_corelib_cygwin;
 
1620
 
 
1621
    my $self = shift;
 
1622
    my $mp_src = "$self->{cwd}/src/modules/perl";
 
1623
    my $core = 'httpd2core';
 
1624
 
 
1625
    # There's a problem with user-installed perl on cygwin.
 
1626
    # MakeMaker doesn't know about the .dll.a libs and warns
 
1627
    # about missing -lhttpd2core. "Fix" it by copying
 
1628
    # the lib and adding .a suffix.
 
1629
    # For the static build create a soft link, because libhttpd2core.dll.a
 
1630
    # doesn't exist at this time.
 
1631
    if ($self->is_dynamic) {
 
1632
        my $libpath = $self->apxs(-q => 'exp_libdir');
 
1633
        File::Copy::copy("$libpath/lib$core.dll.a", "$mp_src/lib$core.a");
 
1634
    } else {
 
1635
        my $libpath = catdir($self->{MP_AP_PREFIX}, '.libs');
 
1636
        mkdir $libpath unless -d $libpath;
 
1637
        qx{touch $libpath/lib$core.dll.a && \
 
1638
        ln -fs $libpath/lib$core.dll.a $mp_src/lib$core.a};
 
1639
    }
 
1640
 
 
1641
    $apache_corelib_cygwin = "-L$mp_src -l$core";
 
1642
}
 
1643
 
1547
1644
sub apache_libs_MSWin32 {
1548
1645
    my $self = shift;
1549
1646
    my $prefix = $self->apxs(-q => 'PREFIX') || $self->dir;
1551
1648
    "@libs";
1552
1649
}
1553
1650
 
 
1651
sub apache_libs_cygwin {
 
1652
    my $self = shift;
 
1653
    join ' ', $self->apache_corelib_cygwin, $self->apru_link_flags;
 
1654
}
 
1655
 
1554
1656
sub apache_libs {
1555
1657
    my $self = shift;
1556
1658
    my $libs = \&{"apache_libs_$^O"};
1560
1662
 
1561
1663
sub modperl_libs_MSWin32 {
1562
1664
    my $self = shift;
1563
 
    # mod_perl.lib will be installed into MP_AP_PREFIX/lib
1564
 
    # for use by 3rd party xs modules
1565
1665
    "$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.lib";
1566
1666
}
1567
1667
 
1568
1668
sub modperl_libs_cygwin {
1569
1669
     my $self = shift;
1570
 
     return $self->is_dynamic
1571
 
         ? "-L$self->{cwd}/src/modules/perl -l$self->{MP_LIBNAME}"
1572
 
         : $self->modperl_static_libs_cygwin;
 
1670
     return '' unless $self->is_dynamic;
 
1671
     return "-L$self->{cwd}/src/modules/perl -l$self->{MP_LIBNAME}";
1573
1672
}
1574
1673
 
1575
1674
sub modperl_libs {
1579
1678
    $libs->($self);
1580
1679
}
1581
1680
 
1582
 
my $modperl_static_libs_cygwin = '';
1583
 
sub modperl_static_libs_cygwin {
1584
 
    my $self = shift;
1585
 
 
1586
 
    return $modperl_static_libs_cygwin if $modperl_static_libs_cygwin;
1587
 
 
1588
 
    my $dyna_filepath = catdir $self->perl_config('archlibexp'),
1589
 
        'auto/DynaLoader/DynaLoader.a';
1590
 
    my $modperl_path  = "$self->{cwd}/src/modules/perl";
1591
 
    # Create symlink to mod_perl.a, but copy DynaLoader.a, because
1592
 
    # when running make clean the real DynaLoader.a may get deleted.
1593
 
    my $src = catfile $modperl_path, "$self->{MP_LIBNAME}.a";
1594
 
    my $dst = catfile $modperl_path, "lib$self->{MP_LIBNAME}.a";
1595
 
    # perl's link() on Cygwin seems to copy mod_perl.a to
1596
 
    # libmod_perl.a, but at this stage mod_perl.a is still a dummy lib
1597
 
    # and at the end we get nothing. whereas `ln -s` seems to create
1598
 
    # something like the shortcut on windows and it works.
1599
 
    qx{ln -s $src $dst} unless -e $dst;
1600
 
    File::Copy::copy($dyna_filepath, "$modperl_path/libDynaLoader.a");
1601
 
 
1602
 
    $modperl_static_libs_cygwin = join ' ',
1603
 
        "-L$modperl_path",
1604
 
        "-l$self->{MP_LIBNAME}",
1605
 
        '-lDynaLoader',
1606
 
        $self->apru_link_flags,
1607
 
        '-L' . catdir($self->perl_config('archlibexp'), 'CORE'),
1608
 
        '-lperl';
1609
 
 
1610
 
    $modperl_static_libs_cygwin;
 
1681
sub modperl_libpath_MSWin32 {
 
1682
    my $self = shift;
 
1683
    # mod_perl.lib will be installed into MP_AP_PREFIX/lib
 
1684
    # for use by 3rd party xs modules
 
1685
    "$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.lib";
 
1686
}
 
1687
 
 
1688
sub modperl_libpath_cygwin {
 
1689
    my $self = shift;
 
1690
    "$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.dll.a";
 
1691
}
 
1692
 
 
1693
sub modperl_libpath {
 
1694
    my $self = shift;
 
1695
    my $libpath = \&{"modperl_libpath_$^O"};
 
1696
    return "" unless defined &$libpath;
 
1697
    $libpath->($self);
1611
1698
}
1612
1699
 
1613
1700
# returns the directory and name of the aprext lib built under blib/ 
1639
1726
 
1640
1727
    # This is ugly, but is the only way to prevent the "undefined
1641
1728
    # symbols" error
1642
 
    $libs .= join ' ', '', $self->apru_link_flags,
 
1729
    $libs .= join ' ', '',
1643
1730
        '-L' . catdir($self->perl_config('archlibexp'), 'CORE'), '-lperl';
1644
1731
 
1645
1732
    $libs;
1682
1769
        $(MODPERL_CP) $(MODPERL_LIB_DSO) $(DESTDIR)$(MODPERL_AP_LIBEXECDIR)
1683
1770
EOI
1684
1771
    }
1685
 
    
 
1772
 
1686
1773
    $install .= <<'EOI';
1687
1774
# install mod_perl .h files
1688
1775
        @$(MKPATH) $(DESTDIR)$(MODPERL_AP_INCLUDEDIR)
1717
1804
    #XXX short-term compat for Apache::TestConfigPerl
1718
1805
    $libs{shared} = $libs{dso};
1719
1806
 
1720
 
    while (my($type, $lib) = each %libs) {
 
1807
    while (my ($type, $lib) = each %libs) {
1721
1808
        print $fh $self->canon_make_attr("lib_$type", $libs{$type});
1722
1809
    }
1723
1810
 
1731
1818
EOI
1732
1819
    }
1733
1820
 
1734
 
    if (my $libs = $self->modperl_libs) {
 
1821
    if ($self->is_dynamic && (my $libs = $self->modperl_libpath)) {
1735
1822
        print $fh $self->canon_make_attr('lib_location', $libs);
1736
1823
 
1737
1824
        print $fh $self->canon_make_attr('ap_libdir',
1880
1967
    $flags;
1881
1968
}
1882
1969
 
1883
 
sub otherldflags_cygwin {
1884
 
    my $self = shift;
1885
 
    my $flags = $self->otherldflags_default;
1886
 
 
1887
 
    unless ($self->{MP_STATIC_EXTS}) {
1888
 
        $flags .= join ' ', '', $self->apru_link_flags;
1889
 
    }
1890
 
 
1891
 
    $flags;
1892
 
}
1893
 
 
1894
1970
sub typemaps {
1895
1971
    my $self = shift;
1896
1972
    my @typemaps = ();
2049
2125
# will have to make sure to prevent any operations that may rely on
2050
2126
# effects created by uselargefiles, e.g. Off_t=8 instead of Off_t=4)
2051
2127
sub strip_lfs {
2052
 
    my($self, $cflags) = @_;
 
2128
    my ($self, $cflags) = @_;
2053
2129
    return $cflags unless $self->has_large_files_conflict();
2054
2130
 
2055
2131
    my $lf = $Config{ccflags_uselargefiles}