From 379dcf31a7c22de3e9788305cfd3ad48c8ccc4ee Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 13 Mar 2006 16:40:57 +0000 Subject: Define new symbol in Makefile.PL depending on detected rpm version (no simpler way to get it from the C preprocessor, it seems) --- Makefile.PL | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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', -- cgit v1.2.1