From 06907995e46e24396ade38042aabf2d382125917 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 14 Jan 2013 14:17:42 +0900 Subject: use ExtUtils::PkgConfig to get the libs and headers for glib/gthread --- libvxi11client/perlbits/Makefile.PL | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libvxi11client') diff --git a/libvxi11client/perlbits/Makefile.PL b/libvxi11client/perlbits/Makefile.PL index 43b9d41..3c56128 100644 --- a/libvxi11client/perlbits/Makefile.PL +++ b/libvxi11client/perlbits/Makefile.PL @@ -1,5 +1,7 @@ use 5.014002; use ExtUtils::MakeMaker; +use ExtUtils::PkgConfig; + # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( @@ -9,9 +11,9 @@ WriteMakefile( ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/VXI11/Client.pm', # retrieve abstract from module AUTHOR => 'daniel ') : ()), - LIBS => ['-lpthread -lgthread-2.0 -lrt -lglib-2.0'], # e.g., '-lm' + LIBS => ['-lpthread -lrt ' . ExtUtils::PkgConfig->libs("gthread-2.0") . ' ' . ExtUtils::PkgConfig->libs("glib-2.0")], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' - INC => '-I. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include', # e.g., '-I. -I/usr/include/other' + INC => '-I.' . ExtUtils::PkgConfig->cflags_only_I("gthread-2.0") . ' ' . ExtUtils::PkgConfig->cflags_only_I("glib-2.0"), # e.g., '-I. -I/usr/include/other' OBJECT => '$(O_FILES)', # link all the C files too ); if (eval {require ExtUtils::Constant; 1}) { -- cgit