This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove the couple of references to AutoLoader that remained in
[perl5.git] / ext / SDBM_File / Makefile.PL
CommitLineData
42793c05 1use ExtUtils::MakeMaker;
00b02797 2use Config;
42793c05
TB
3
4# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
5# to automatically include Makefile code for the targets
6# config, all, clean, realclean and sdbm/Makefile
7# which perform the corresponding actions in the subdirectory.
8
4ad10cd1
DD
9# Work around: Darwin ppc64 bug ignores archive contents when building bundles
10
3e3baf6d 11$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
17f28c40 12if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
4ad10cd1
DD
13elsif ($^O eq 'darwin' && $Config{'ldflags'} =~/-arch ppc64/) {
14 $myextlib = '-all_load sdbm/libsdbm$(LIB_EXT)'; }
17f28c40 15else { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; }
137443ea 16
42793c05 17WriteMakefile(
bf99883d
HM
18 NAME => 'SDBM_File',
19 MYEXTLIB => $myextlib,
bf99883d
HM
20 XSPROTOARG => '-noprototypes', # XXX remove later?
21 VERSION_FROM => 'SDBM_File.pm',
22 DEFINE => $define,
ee13e175 23 PERL_MALLOC_OK => 1,
bf99883d 24 );
42793c05
TB
25
26sub MY::postamble {
cf2f24a4 27 if ($^O =~ /MSWin32/ && !defined($ENV{SYSTEMROOT})) {
00b02797
JH
28 if ($Config{'make'} =~ /dmake/i) {
29 # dmake-specific
94bf5962 30 return <<'EOT';
7a958ec3
BS
31$(MYEXTLIB): sdbm/Makefile
32@[
33 cd sdbm
34 $(MAKE) all
35 cd ..
36]
00b02797
JH
37EOT
38 } elsif ($Config{'make'} =~ /nmake/i) {
39 #
94bf5962 40 return <<'EOT';
00b02797
JH
41$(MYEXTLIB): sdbm/Makefile
42 cd sdbm
43 $(MAKE) all
44 cd ..
45EOT
46 }
47} elsif ($^O ne 'VMS') {
42793c05
TB
48 '
49$(MYEXTLIB): sdbm/Makefile
137443ea 50 cd sdbm && $(MAKE) all
42793c05 51';
7a958ec3
BS
52 }
53 else {
54 '
17f28c40 55$(MYEXTLIB) : [.sdbm]descrip.mms
bf99883d
HM
56 set def [.sdbm]
57 $(MMS) all
58 set def [-]
59';
60 }
42793c05 61}