| |
1 use 5.006; |
| |
2 use ExtUtils::MakeMaker; |
| |
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence |
| |
4 # the contents of the Makefile that is written. |
| |
5 WriteMakefile( |
| |
6 'NAME' => 'Gaim', |
| |
7 'VERSION_FROM' => '@srcdir@/Gaim.pm', # finds $VERSION |
| |
8 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 |
| |
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 |
| |
10 (ABSTRACT_FROM => '@srcdir@/Gaim.pm', # retrieve abstract from module |
| |
11 AUTHOR => 'Christian Hammond <chipx86@gnupdate.org>') : ()), |
| |
12 'LIBS' => [''], # e.g., '-lm' |
| |
13 'DEFINE' => '@DEBUG_CFLAGS@', # e.g., '-DHAVE_SOMETHING' |
| |
14 'INC' => '-I. -I@srcdir@ -I@top_srcdir@ -I@top_srcdir@/src @GLIB_CFLAGS@ @GTK_CFLAGS@', # e.g., '-I. -I/usr/include/other' |
| |
15 'OBJECT' => '$(O_FILES)', # link all the C files too |
| |
16 ); |
| |
17 |
| |
18 if (eval {require ExtUtils::Constant; 1}) { |
| |
19 foreach (qw(GAIM_DEBUG_ALL GAIM_DEBUG_MISC GAIM_DEBUG_INFO |
| |
20 GAIM_DEBUG_WARNING GAIM_DEBUG_ERROR GAIM_DEBUG_FATAL)) { |
| |
21 push @names, {name => $_, type => "IV", macro => 1}; |
| |
22 } |
| |
23 |
| |
24 ExtUtils::Constant::WriteConstants( |
| |
25 NAME => 'Gaim::DebugLevel', |
| |
26 NAMES => \@names, |
| |
27 C_FILE => 'const-c.inc', |
| |
28 XS_FILE => 'const-xs.inc' |
| |
29 ); |
| |
30 } |
| |
31 else { |
| |
32 use File::Copy; |
| |
33 use File::Spec; |
| |
34 |
| |
35 foreach my $file ('const-c.inc', 'const-xs.inc') { |
| |
36 my $fallback = File::Spec->catfile('fallback', $file); |
| |
37 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!"; |
| |
38 } |
| |
39 } |