summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-14 14:17:42 +0900
committerdaniel <danieruru@gmail.com>2013-01-14 14:17:42 +0900
commit06907995e46e24396ade38042aabf2d382125917 (patch)
tree9d90d2a4bb82bbd71e91f95cc2c107092ade0309
parent138ea3e92af7c34055b418db8c513febfd1db8e1 (diff)
use ExtUtils::PkgConfig to get the libs and headers for glib/gthread
-rw-r--r--libvxi11client/perlbits/Makefile.PL6
1 files changed, 4 insertions, 2 deletions
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 <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}) {