Subject: | Patch to improve portability |
Date: | Mon, 15 Sep 2008 17:01:57 +0200 (CEST) |
To: | bug-Net-LibIDN [...] rt.cpan.org |
From: | Havard Eidnes <he [...] NetBSD.org> |
Hi,
as you have probably experienced/heard, not every system has
/etc/ld.so.conf to tweak run-time handling of paths to find
libraries -- some systems (such as NetBSD) need a run-path
supplied at link time.
This information is available via the Config.pm core module, so
this diff should improve portability for all:
--- Makefile.PL.orig 2008-08-26 19:39:22.000000000 +0200
+++ Makefile.PL
@@ -1,6 +1,7 @@
use strict;
use ExtUtils::MakeMaker;
use Getopt::Long;
+use Config;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
@@ -48,7 +49,7 @@ sub InitMakeParams
if ($libdir)
{
- $Params{LIBS} = "-L$libdir -lidn";
+ $Params{LIBS} = $Config{ldflags} . " -lidn";
}
else
{
Regards,
- Havard