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 if ( $^O eq 'MSWin32' ) {
14 $LIB = $Config{cc} =~ /gcc/ ? "-ldb" : "-llibdb";
19 LIBS => ["-L/usr/local/lib $LIB"],
20 MAN3PODS => {}, # Pods will be built by installman.
21 #INC => '-I/usr/local/include',
22 VERSION_FROM => 'DB_File.pm',
23 OBJECT => 'version$(OBJ_EXT) DB_File$(OBJ_EXT)',
24 XSPROTOARG => '-noprototypes',
26 INC => ($^O eq "MacOS" ? "-i ::::db:include" : ""),
27 XS_VERSION => eval MM->parse_version('DB_File.pm'),
28 ((ExtUtils::MakeMaker->VERSION() gt '6.30')
29 ? ('LICENSE' => 'perl')
34 ? (ABSTRACT_FROM => 'DB_File.pm',
35 AUTHOR => 'Paul Marquess <pmqs@cpan.org>')
39 'depend' => {'version$(OBJ_EXT)' => 'version.c'},
40 'clean' => {FILES => 'constants.h constants.xs'},
74 # Check the constants above all appear in @EXPORT in DB_File.pm
75 my %names = map { $_, 1} @names;
76 open F, "<DB_File.pm" or die "Cannot open DB_File.pm: $!\n";
79 last if /^\s*\@EXPORT\s+=\s+qw\(/ ;
86 delete $names{$1} if defined $1 ;
92 my $missing = join ("\n\t", sort keys %names) ;
93 die "The following names are missing from \@EXPORT in DB_File.pm\n" .
98 WriteConstants( NAME => 'DB_File',
100 C_FILE => 'constants.h',
101 XS_FILE => 'constants.xs',