MacOS support, part 1 (from Matthias Neeracher
[p5sagit/p5-mst-13.2.git] / ext / DB_File / Makefile.PL
1 use ExtUtils::MakeMaker 5.16 ;
2 use Config ;
3
4 # OS2 is a special case, so check for it now.
5 my $OS2 = "-DOS2" if $Config{'osname'} eq 'os2' ;
6
7 my $LIB = "-ldb" ;
8 # so is win32
9 $LIB = "-llibdb" if $^O eq 'MSWin32' ;
10
11 WriteMakefile(
12         NAME            => 'DB_File',
13         LIBS            => ["-L/usr/local/lib $LIB"],
14         MAN3PODS        => {},         # Pods will be built by installman.
15         #INC            => '-I/usr/local/include',
16         VERSION_FROM    => 'DB_File.pm',
17         OBJECT          => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)',
18         XSPROTOARG      => '-noprototypes',
19         DEFINE          => $OS2 || "",
20         INC => ($^O eq "MacOS" ? "-i ::::db:include" : "")
21         );
22
23 sub MY::postamble {
24       '
25 version$(OBJ_EXT):      version.c
26
27 ' ;
28 }
29