On 01/18/2012 05:34 PM, Eric Anholt wrote:
AC_CHECK_LIB has this nasty behavior, like the cflags tests, of
automatically putting the tested value into the global LIBS on
success.  This caused -lexpat to end up in LIBS, but without the
--with-expat dir, so my 32-bit build on a 64 system using expat from a
custom prefix could only find the system expat and fail to link on the
one current consumer of the LIBS variable: the dri driver test link.
---
  configure.ac |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3f5e3e..7baa04a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1269,8 +1269,10 @@ if test "x$enable_dri" = xyes; then
              EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
              ])
          AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for 
DRI.])])
+       save_LIBS="$LIBS"
          AC_CHECK_LIB([expat],[XML_ParserCreate],[],
              [AC_MSG_ERROR([Expat required for DRI.])])
+       LIBS="$save_LIBS"
      fi

      # libdrm is required for all except swrast

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to