Explicitly ignore potential unwanted pkg-config found on Mac OS X

We want to be buildable on Mac OS X without pkg-config. For instance
Mono installs a symlink /usr/bin/pkg-config that just confuses this
goal if you happen to build LibreOffice on a machine with Mono
installed.
This commit is contained in:
Tor Lillqvist 2011-06-02 14:04:59 +03:00
parent 4b93f8cdc7
commit 89b73e32fd

View file

@ -2416,7 +2416,7 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_CHECK_TOOL(AR,ar) AC_CHECK_TOOL(AR,ar)
AC_CHECK_TOOL(NM,nm) AC_CHECK_TOOL(NM,nm)
AC_CHECK_TOOL(OBJDUMP,objdump) AC_CHECK_TOOL(OBJDUMP,objdump)
AC_CHECK_TOOL(PKG_CONFIG,pkg-config) AC_PATH_TOOL(PKG_CONFIG,pkg-config)
AC_CHECK_TOOL(RANLIB,ranlib) AC_CHECK_TOOL(RANLIB,ranlib)
AC_CHECK_TOOL(STRIP,strip) AC_CHECK_TOOL(STRIP,strip)
if test "$_os" = "WINNT"; then if test "$_os" = "WINNT"; then
@ -2433,6 +2433,25 @@ AC_SUBST(RANLIB)
AC_SUBST(STRIP) AC_SUBST(STRIP)
AC_SUBST(WINDRES) AC_SUBST(WINDRES)
dnl ===================================================================
dnl pkg-config checks on Mac OS X
dnl ===================================================================
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, ignoring])
PKG_CONFIG=""
else
AC_MSG_RESULT([yes, from unknown origin, ignoring])
PKG_CONFIG=""
fi
else
AC_MSG_RESULT([no])
fi
fi
dnl =================================================================== dnl ===================================================================
dnl .NET needs special treatment dnl .NET needs special treatment
dnl (does the above comment really mean .NET, or is it misusing dnl (does the above comment really mean .NET, or is it misusing