Bug 1287325 - Prevent AC_CHECK_LIB from polluting LIBS after bug 1286649. r=glandium
authorJan Beich <jbeich@FreeBSD.org>
Sun, 17 Jul 2016 14:10:56 +0000
changeset 389940 5fa1e6c05e0cd3f0b941541de2df8cfd67eb57a3
parent 389939 e44c9f57299f408faa824ef26d1020457181080e
child 389941 42f884f30bc362ec9e85cd9a352dfb487745e7a8
push id23566
push usertkuo@mozilla.com
push dateWed, 20 Jul 2016 10:57:43 +0000
reviewersglandium
bugs1287325, 1286649
milestone50.0a1
Bug 1287325 - Prevent AC_CHECK_LIB from polluting LIBS after bug 1286649. r=glandium MozReview-Commit-ID: 2lvje6y30Ge
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -1685,16 +1685,17 @@ dnl ====================================
 dnl Checks for X libraries.
 dnl Ordering is important.
 dnl Xt is dependent upon SM as of X11R6
 dnl ========================================================
 if test -n "$MOZ_X11"; then
     AC_DEFINE_UNQUOTED(FUNCPROTO,15)
     XLIBS="-lX11-xcb -lX11 -lxcb-shm -lxcb $XLIBS"
     _SAVE_LDFLAGS="$LDFLAGS"
+    _SAVE_LIBS="$LIBS"
     LDFLAGS="$XLDFLAGS $LDFLAGS"
     AC_CHECK_LIB(X11, XDrawLines, [X11_LIBS="-lX11"],
         [MISSING_X="$MISSING_X -lX11"], $XLIBS)
     AC_CHECK_LIB(Xext, XextAddDisplay, [XEXT_LIBS="-lXext"],
         [MISSING_X="$MISSING_X -lXext"], $XLIBS)
 
     AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], [
         unset ac_cv_lib_Xt_XtFree
@@ -1715,16 +1716,17 @@ if test -n "$MOZ_X11"; then
     dnl = Check for Xss
     dnl ========================================================
     MOZ_CHECK_HEADER(X11/extensions/scrnsaver.h,
         AC_CHECK_LIB(Xss, XScreenSaverQueryInfo,
             [XSS_LIBS="-lXss $XEXT_LIBS $XLIBS"
              AC_DEFINE(HAVE_LIBXSS)],, $XEXT_LIBS $XLIBS))
 
     LDFLAGS="$_SAVE_LDFLAGS"
+    LIBS="$_SAVE_LIBS"
 fi # $MOZ_X11
 
 AC_SUBST_LIST(XCFLAGS)
 AC_SUBST_LIST(XLDFLAGS)
 AC_SUBST_LIST(XLIBS)
 AC_SUBST_LIST(XEXT_LIBS)
 AC_SUBST_LIST(XT_LIBS)
 AC_SUBST_LIST(XSS_LIBS)