Re: [Libreoffice] [BUG] Hide system pkg-config, to avoid finding stray freetype.
This is a protection-from-contaminated-system But in general, a system can be contaminamed in arbitrary ways. Should/can we really protect against arbitrary, unknown, ways in which a system might have been changed by helpful 3rd-party software or misguided sysadmins/users to not correspond to a normal installation of the OS in question? No, we can't. What we should do, IMHO, is to check in our own configure.in if there is a pkg-config in PATH on a system where one is not expected to be present (only Mac OS X, I guess?), and in that case emit a warning. But wait, we already do that! if test $_os = Darwin; then AC_MSG_CHECKING([for bogus pkg-config]) if test -n $PKG_CONFIG; then if test $PKG_CONFIG = /usr/bin/pkg-config ls -l /usr/bin/pkg-config | grep -q Mono.framework; then AC_MSG_RESULT([yes, from Mono]) else AC_MSG_RESULT([yes, from unknown origin]) fi AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG]) echo Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it warn else AC_MSG_RESULT([no]) fi fi --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [BUG] Hide system pkg-config, to avoid finding stray freetype.
Yes, we can't protect against an arbitrarily broken system. I'm not a good systems administrator. I don't know how to do please consider hiding it without breaking something else. I think pango is faulty; it needs to depend on how cairo was configured, but it is testing how the system is configured. But that's above my pay-grade. I like this change because it's within the part of the world that's currently open to me to possibly (depending on this conversation) change. On Thu, Dec 22, 2011 at 11:59 PM, Tor Lillqvist t...@iki.fi wrote: This is a protection-from-contaminated-system But in general, a system can be contaminamed in arbitrary ways. Should/can we really protect against arbitrary, unknown, ways in which a system might have been changed by helpful 3rd-party software or misguided sysadmins/users to not correspond to a normal installation of the OS in question? No, we can't. What we should do, IMHO, is to check in our own configure.in if there is a pkg-config in PATH on a system where one is not expected to be present (only Mac OS X, I guess?), and in that case emit a warning. But wait, we already do that! if test $_os = Darwin; then AC_MSG_CHECKING([for bogus pkg-config]) if test -n $PKG_CONFIG; then if test $PKG_CONFIG = /usr/bin/pkg-config ls -l /usr/bin/pkg-config | grep -q Mono.framework; then AC_MSG_RESULT([yes, from Mono]) else AC_MSG_RESULT([yes, from unknown origin]) fi AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG]) echo Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it warn else AC_MSG_RESULT([no]) fi fi --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [BUG] Hide system pkg-config, to avoid finding stray freetype.
Tor Lillqvist wrote: What we should do, IMHO, is to check in our own configure.in if there is a pkg-config in PATH on a system where one is not expected to be present (only Mac OS X, I guess?), and in that case emit a warning. But wait, we already do that! Have to agree with Tor here, best way out is to check in configure and fail fast. How about poking PATH there for suspicious segments like /opt/ and /usr/local/, and suggesting removal? Cheers, -- Thorsten pgppGT73bSbRz.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice