$NetBSD: patch-aa,v 1.5 2024/03/18 11:50:49 nia Exp $ Use both the LDFLAGS from Perl and the directory passed from the pkgsrc makefile to find libidn. --- Makefile.PL.orig 2009-02-26 12:09:45.000000000 +0000 +++ Makefile.PL @@ -47,15 +47,12 @@ sub InitMakeParams "disable-tld" => \$disable_tld ); - if ($libdir) - { - $Params{LIBS} = "-L$libdir -lidn"; - } - else - { - $Params{LIBS} = $Config{ldflags} . ' -lidn'; - } - + $Params{LIBS} = ""; + $Params{LIBS} .= "-L$libdir " if ($libdir); + $Params{LIBS} .= "@COMPILER_RPATH_FLAG@$libdir " if ($libdir); + $Params{LIBS} .= $Config{ldflags}; + $Params{LIBS} .= " -lidn"; + if ($incdir) { $Params{INC} = "-I$incdir";