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 'depend' => {'version$(OBJ_EXT)' => 'version.c'},
26 'clean' => {FILES => 'constants.h constants.xs'},
60 # Check the constants above all appear in @EXPORT in DB_File.pm
61 my %names = map { $_, 1} @names;
62 open F, "<DB_File.pm" or die "Cannot open DB_File.pm: $!\n";
65 last if /^\s*\@EXPORT\s+=\s+qw\(/ ;
72 delete $names{$1} if defined $1 ;
78 my $missing = join ("\n\t", sort keys %names) ;
79 die "The following names are missing from \@EXPORT in DB_File.pm\n" .
84 WriteConstants( NAME => 'DB_File',
86 C_FILE => 'constants.h',
87 XS_FILE => 'constants.xs',