summaryrefslogtreecommitdiff
path: root/Net-DBus/Makefile.PL
diff options
context:
space:
mode:
authorcarlosg <carlosg>2006-12-11 12:30:58 +0000
committercarlosg <carlosg>2006-12-11 12:30:58 +0000
commit8ba6d4fa504865b6d55127ddbeb163fbc822e9c5 (patch)
treec7b98f91aeea4e1e3908bc82fe98e64934f85987 /Net-DBus/Makefile.PL
parent1d470381a102209d580dadc83ae5dba6752638ee (diff)
2006-12-11 Carlos Garnacho <carlosg@gnome.org>
* Net-DBus/*: update to Net::DBus 0.33.4, add some .cvsignore files
Diffstat (limited to 'Net-DBus/Makefile.PL')
-rw-r--r--Net-DBus/Makefile.PL12
1 files changed, 8 insertions, 4 deletions
diff --git a/Net-DBus/Makefile.PL b/Net-DBus/Makefile.PL
index 2f1cb9e..1945f20 100644
--- a/Net-DBus/Makefile.PL
+++ b/Net-DBus/Makefile.PL
@@ -3,6 +3,9 @@ use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
+`pkg-config --atleast-version=0.90 dbus-1`;
+my $has_0_90 = (($? >> 8) == 0 ? 1 : 0);
+
my $DBUS_LIBS = `pkg-config --libs dbus-1`;
my $DBUS_CFLAGS = `pkg-config --cflags dbus-1`;
@@ -15,17 +18,18 @@ if (!$DBUS_LIBS || !$DBUS_CFLAGS) {
WriteMakefile(
'NAME' => 'Net::DBus',
- 'MAKEFILE' => 'Makefile.perl',
'VERSION_FROM' => 'lib/Net/DBus.pm',
+ 'MAKEFILE' => 'Makefile.perl',
'PREREQ_PM' => {
'Test::More' => 0,
'Time::HiRes' => 0,
'XML::Twig' => 0,
},
-# 'ABSTRACT_FROM' => 'lib/Net/DBus.pm',
'AUTHOR' => 'Daniel Berrange <dan@berrange.com>',
- 'LIBS' => [$DBUS_LIBS],
- 'DEFINE' => "-DDBUS_API_SUBJECT_TO_CHANGE -DPD_DO_DEBUG=1",
+ 'LIBS' => [$DBUS_LIBS],
+ 'DEFINE' => ($has_0_90 ?
+ "-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=0 -DNET_DBUS_DEBUG=1" :
+ "-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=1 -DNET_DBUS_DEBUG=1"),
'INC' => "-Wall $DBUS_CFLAGS",
'depend' => {
Net-DBus.spec => '$(VERSION_FROM)',