4 use ExtUtils::MakeMaker ;
5 use ExtUtils::Constant qw(WriteConstants);
8 # OS2 is a special case, so check for it now.
9 my $OS2 = "-DOS2" if $Config{'osname'} eq 'os2' ;
13 $LIB = "-llibdb" if $^O eq 'MSWin32' ;
17 LIBS => ["-L/usr/local/lib $LIB"],
18 MAN3PODS => {}, # Pods will be built by installman.
19 #INC => '-I/usr/local/include',
20 VERSION_FROM => 'DB_File.pm',
21 OBJECT => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)',
22 XSPROTOARG => '-noprototypes',
24 INC => ($^O eq "MacOS" ? "-i ::::db:include" : ""),
25 ((ExtUtils::MakeMaker->VERSION() gt '6.30')
26 ? ('LICENSE' => 'perl')
31 ? (ABSTRACT_FROM => 'DB_File.pm',
32 AUTHOR => 'Paul Marquess <pmqs@cpan.org>')
36 'depend' => {'version$(OBJ_EXT)' => 'version.c'},
37 'clean' => {FILES => 'constants.h constants.xs'},
71 # Check the constants above all appear in @EXPORT in DB_File.pm
72 my %names = map { $_, 1} @names;
73 open F, "<DB_File.pm" or die "Cannot open DB_File.pm: $!\n";
76 last if /^\s*\@EXPORT\s+=\s+qw\(/ ;
83 delete $names{$1} if defined $1 ;
89 my $missing = join ("\n\t", sort keys %names) ;
90 die "The following names are missing from \@EXPORT in DB_File.pm\n" .
95 WriteConstants( NAME => 'DB_File',
97 C_FILE => 'constants.h',
98 XS_FILE => 'constants.xs',