diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-13 16:40:57 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-13 16:40:57 +0000 |
commit | 379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee (patch) | |
tree | 684e7eee9ab6d8a8b5d51a1b3aa8bef6e85182e5 /Makefile.PL | |
parent | 355ddca5ff9694ce8219372b410d2572d9f4485b (diff) | |
download | perl-URPM-379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee.tar perl-URPM-379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee.tar.gz perl-URPM-379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee.tar.bz2 perl-URPM-379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee.tar.xz perl-URPM-379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee.zip |
Define new symbol in Makefile.PL depending on detected rpm version
(no simpler way to get it from the C preprocessor, it seems)
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL index 43a2444..e321882 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -46,12 +46,17 @@ rpm: rpmdist **MM** } +my $ccflags = '-Wall -fno-strict-aliasing'; +if ($version =~ /^4\.(?:[5-9]\.|\d\d)/) { + $ccflags .= ' -DRPM_CALLBACK_LONGLONG'; +} + WriteMakefile( NAME => 'URPM', PREREQ_PM => { 'MDV::Packdrakeng' => '1.00', }, - CCFLAGS => '-Wall -fno-strict-aliasing', + CCFLAGS => $ccflags, VERSION_FROM => 'URPM.pm', LIBS => [ '-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz' ], INC => '-I/usr/include/rpm', |