--- /home/flame/devel/gentoo-x86/sys-devel/libperl/libperl-5.8.8-r1.ebuild 2006-11-19 21:31:16.242957152 +0100 +++ libperl-5.8.8-r1.ebuild 2006-12-11 01:18:39.782749393 +0100 @@ -241,9 +241,11 @@ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a" - if [[ $(get_libdir) != "lib" ]] ; then - myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)" - fi + # For the library path, use what the compiler knows to look + # in already, rather than defaulting to /'s libraries paths, and + # avoid adding /usr/local as that's polluting the environment to + # start with + myconf "-Dlibpth=$( $(tc-getCC) -print-search-dirs | grep libraries | cut -d = -f 2 | tr ':' ' ' )" sh Configure -des \ -Darchname="${myarch}" \