Bug 1045783 - Make most *_LIBS variables from configure lists in moz.build. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 06 Aug 2014 07:24:55 +0900
changeset 198012 ab8a104509b487d30915d6a207e19c60b4dd59a3
parent 198011 704e316fd36ef0440898669fc250576bf0711e23
child 198013 95cd38a0e6a54b3fc4e0a5969228e84300893fa9
push id47275
push usermh@glandium.org
push dateTue, 05 Aug 2014 22:26:46 +0000
treeherdermozilla-inbound@2aa5813d2808 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1045783
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1045783 - Make most *_LIBS variables from configure lists in moz.build. r=mshal
build/autoconf/icu.m4
build/autoconf/nspr-build.m4
build/autoconf/nspr.m4
build/autoconf/nss.m4
build/autoconf/pkg.m4
build/autoconf/zlib.m4
configure.in
js/src/configure.in
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -111,17 +111,16 @@ if test -n "$ENABLE_INTL_API"; then
             MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(addsuffix $(MOZ_ICU_DBG_SUFFIX),$(ICU_LIB_NAMES)),$(DEPTH)/intl/icu/target/lib)'
         fi
     fi
 fi
 
 AC_SUBST(MOZ_ICU_DBG_SUFFIX)
 AC_SUBST(ENABLE_INTL_API)
 AC_SUBST(ICU_LIB_NAMES)
-AC_SUBST(MOZ_ICU_LIBS)
 
 if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
     dnl We build ICU as a static library for non-shared js builds and as a shared library for shared js builds.
     if test -z "$MOZ_SHARED_ICU"; then
         AC_DEFINE(U_STATIC_IMPLEMENTATION)
     fi
     dnl Source files that use ICU should have control over which parts of the ICU
     dnl namespace they want to use.
--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -166,17 +166,16 @@ elif test -z "$JS_POSIX_NSPR"; then
         fi
     else
         NSPR_CFLAGS=`"${LIBXUL_DIST}"/sdk/bin/nspr-config --prefix="${LIBXUL_DIST}" --includedir="${LIBXUL_DIST}/include/nspr" --cflags`
         NSPR_LIBS=`"${LIBXUL_DIST}"/sdk/bin/nspr-config --prefix="${LIBXUL_DIST}" --libdir="${LIBXUL_DIST}"/lib --libs`
     fi
 fi
 
 AC_SUBST(NSPR_CFLAGS)
-AC_SUBST(NSPR_LIBS)
 
 NSPR_PKGCONF_CHECK="nspr"
 if test -n "$MOZ_NATIVE_NSPR"; then
     # piggy back on $MOZ_NATIVE_NSPR to set a variable for the nspr check for js.pc
     NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER"
 
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $NSPR_CFLAGS"
--- a/build/autoconf/nspr.m4
+++ b/build/autoconf/nspr.m4
@@ -92,11 +92,11 @@ AC_ARG_WITH(nspr-exec-prefix,
 		ifelse([$2], , :, [$2])     
 	else
 		AC_MSG_RESULT(no)
 		ifelse([$3], , :, [$3])
 	fi
 
 
 	AC_SUBST(NSPR_CFLAGS)
-	AC_SUBST(NSPR_LIBS)
+	AC_SUBST_LIST(NSPR_LIBS)
 
 ])
--- a/build/autoconf/nss.m4
+++ b/build/autoconf/nss.m4
@@ -73,11 +73,11 @@ AC_ARG_WITH(nss-exec-prefix,
 		ifelse([$2], , :, [$2])     
 	else
 		AC_MSG_RESULT(no)
 		ifelse([$3], , :, [$3])
 	fi
 
 
 	AC_SUBST(NSS_CFLAGS)
-	AC_SUBST(NSS_LIBS)
+	AC_SUBST_LIST(NSS_LIBS)
 
 ])
--- a/build/autoconf/pkg.m4
+++ b/build/autoconf/pkg.m4
@@ -39,17 +39,17 @@ AC_DEFUN([PKG_CHECK_MODULES],
             $1_LIBS=""
             ## If we have a custom action on failure, don't print errors, but 
             ## do set a variable so people can do so.
             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
             ifelse([$4], ,echo $$1_PKG_ERRORS,)
         fi
 
         AC_SUBST_LIST($1_CFLAGS)
-        AC_SUBST($1_LIBS)
+        AC_SUBST_LIST($1_LIBS)
      else
         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
         echo "*** See http://www.freedesktop.org/software/pkgconfig"
      fi
   fi
 
   if test $succeeded = yes; then
      ifelse([$3], , :, [$3])
--- a/build/autoconf/zlib.m4
+++ b/build/autoconf/zlib.m4
@@ -43,12 +43,12 @@ if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLA
         fi
     fi
     CFLAGS=$_SAVE_CFLAGS
     LDFLAGS=$_SAVE_LDFLAGS
     LIBS=$_SAVE_LIBS
 fi
 
 AC_SUBST(MOZ_ZLIB_CFLAGS)
-AC_SUBST(MOZ_ZLIB_LIBS)
+AC_SUBST_LIST(MOZ_ZLIB_LIBS)
 AC_SUBST(MOZ_NATIVE_ZLIB)
 
 ])
--- a/configure.in
+++ b/configure.in
@@ -2768,21 +2768,21 @@ else
         AC_CHECK_LIB(Xss, XScreenSaverQueryInfo,
             [XSS_LIBS="-lXss $XEXT_LIBS $XLIBS"
              AC_DEFINE(HAVE_LIBXSS)],, $XEXT_LIBS $XLIBS))
 
     LDFLAGS="$_SAVE_LDFLAGS"
 fi # $no_x
 
 AC_SUBST_LIST(XCFLAGS)
-AC_SUBST(XLDFLAGS)
-AC_SUBST(XLIBS)
-AC_SUBST(XEXT_LIBS)
-AC_SUBST(XT_LIBS)
-AC_SUBST(XSS_LIBS)
+AC_SUBST_LIST(XLDFLAGS)
+AC_SUBST_LIST(XLIBS)
+AC_SUBST_LIST(XEXT_LIBS)
+AC_SUBST_LIST(XT_LIBS)
+AC_SUBST_LIST(XSS_LIBS)
 
 dnl ========================================================
 dnl = pthread support
 dnl = Start by checking whether the system support pthreads
 dnl ========================================================
 case "$target_os" in
 darwin*)
     MOZ_USE_PTHREADS=1
@@ -2929,17 +2929,17 @@ AC_CACHE_CHECK(for clock_gettime(CLOCK_M
                                  ac_cv_clock_monotonic=no)
                     LIBS="$_SAVE_LIBS"
                 done])
 if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
     REALTIME_LIBS=$ac_cv_clock_monotonic
     AC_DEFINE(HAVE_CLOCK_MONOTONIC)
     AC_SUBST(HAVE_CLOCK_MONOTONIC)
-    AC_SUBST(REALTIME_LIBS)
+    AC_SUBST_LIST(REALTIME_LIBS)
 fi
 
 dnl check for wcrtomb/mbrtowc
 dnl =======================================================================
 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_CACHE_CHECK(for wcrtomb,
@@ -3047,17 +3047,17 @@ if test "$ac_cv_func_iconv" = "yes"; the
         AC_DEFINE(HAVE_ICONV_WITH_CONST_INPUT)
     fi
 fi
 LIBS=$_SAVE_LIBS
 
     ;;
 esac
 
-AC_SUBST(ICONV_LIBS)
+AC_SUBST_LIST(ICONV_LIBS)
 
 AM_LANGINFO_CODESET
 
 AC_LANG_C
 
 dnl **********************
 dnl *** va_copy checks ***
 AC_CACHE_CHECK([for an implementation of va_copy()],
@@ -3497,17 +3497,16 @@ elif test -z "$MOZ_NATIVE_LIBEVENT"; the
                   MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
                  [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
 fi
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
 AC_SUBST(MOZ_NATIVE_LIBEVENT)
-AC_SUBST(MOZ_LIBEVENT_LIBS)
 
 dnl ========================================================
 dnl = If NSS was not detected in the system,
 dnl = use the one in the source tree (mozilla/security/nss)
 dnl ========================================================
 
 MOZ_ARG_WITH_BOOL(system-nss,
 [  --with-system-nss       Use system installed NSS],
@@ -4326,17 +4325,16 @@ then
 
     if test "$MOZ_ENABLE_STARTUP_NOTIFICATION"; then
         AC_DEFINE(MOZ_ENABLE_STARTUP_NOTIFICATION)
     fi
 
     TK_LIBS="$TK_LIBS $MOZ_STARTUP_NOTIFICATION_LIBS"
 fi
 AC_SUBST(MOZ_ENABLE_STARTUP_NOTIFICATION)
-AC_SUBST(MOZ_STARTUP_NOTIFICATION_LIBS)
 
 dnl ========================================================
 dnl Disable printing
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(printing,
 [  --disable-printing      Disable printing support],
     NS_PRINTING=,
     NS_PRINTING=1)
@@ -4504,31 +4502,29 @@ then
        MOZ_QT_LIBS="$MOZ_QT_LIBS $_CONTENTACTION_LIBS"
        AC_DEFINE(MOZ_ENABLE_CONTENTACTION)
        AC_SUBST(MOZ_ENABLE_CONTENTACTION)
     fi
 fi
 
 AC_SUBST(GTK_CONFIG)
 AC_SUBST_LIST(TK_CFLAGS)
-AC_SUBST(TK_LIBS)
+AC_SUBST_LIST(TK_LIBS)
 
 AC_SUBST(MOZ_ENABLE_GTK2)
 AC_SUBST(MOZ_ENABLE_GTK3)
 AC_SUBST(MOZ_ENABLE_GTK)
 AC_SUBST(MOZ_ENABLE_QT)
 AC_SUBST(MOZ_ENABLE_QTNETWORK)
 AC_SUBST(MOZ_ENABLE_QMSYSTEM2)
 AC_SUBST(MOZ_ENABLE_QTMOBILITY)
 AC_SUBST(MOZ_ENABLE_XREMOTE)
-AC_SUBST(MOZ_GTK2_LIBS)
-AC_SUBST(MOZ_GTK3_LIBS)
 AC_SUBST(MOZ_WIDGET_GTK)
 AC_SUBST_LIST(MOZ_QT_CFLAGS)
-AC_SUBST(MOZ_QT_LIBS)
+AC_SUBST_LIST(MOZ_QT_LIBS)
 
 AC_SUBST(MOC)
 AC_SUBST(RCC)
 
 AC_SUBST(MOZ_X11)
 
 dnl ========================================================
 dnl =
@@ -4605,17 +4601,16 @@ AC_SUBST(MOZ_DISTRIBUTION_ID)
 dnl ========================================================
 dnl = Pango
 dnl ========================================================
 if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
 then
     PKG_CHECK_MODULES(_PANGOCHK, pango >= $PANGO_VERSION)
 
     PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION)
-    AC_SUBST(MOZ_PANGO_LIBS)
 fi
 
 dnl ========================================================
 dnl = GnomeVFS, GIO and GConf support module
 dnl ========================================================
 
 if test "$MOZ_X11"
 then
@@ -4646,17 +4641,16 @@ then
             then
                 AC_MSG_ERROR([* * * Could not find gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION])
             fi
             MOZ_ENABLE_GNOMEVFS=
         ])
     fi
 
     AC_SUBST(MOZ_ENABLE_GNOMEVFS)
-    AC_SUBST(MOZ_GNOMEVFS_LIBS)
 
     dnl ========================================================
     dnl = GIO support module
     dnl ========================================================
     MOZ_ARG_DISABLE_BOOL(gio,
     [  --disable-gio           Disable GIO support],
         MOZ_ENABLE_GIO=,
         MOZ_ENABLE_GIO=force)
@@ -4677,17 +4671,16 @@ then
             then
                 AC_MSG_ERROR([* * * Could not find gio-2.0 >= $GIO_VERSION])
             fi
             MOZ_ENABLE_GIO=
         ])
     fi
 
     AC_SUBST(MOZ_ENABLE_GIO)
-    AC_SUBST(MOZ_GIO_LIBS)
 
     dnl ========================================================
     dnl = GConf support module
     dnl ========================================================
     MOZ_ARG_DISABLE_BOOL(gconf,
     [  --disable-gconf      Disable Gconf support ],
         MOZ_ENABLE_GCONF=,
         MOZ_ENABLE_GCONF=force)
@@ -4706,17 +4699,16 @@ then
         ])
     fi
 
     if test "$MOZ_ENABLE_GCONF"; then
         AC_DEFINE(MOZ_ENABLE_GCONF)
     fi
 
     AC_SUBST(MOZ_ENABLE_GCONF)
-    AC_SUBST(MOZ_GCONF_LIBS)
 fi
 
 dnl ========================================================
 dnl = libproxy support
 dnl ========================================================
 
 if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
 then
@@ -4729,17 +4721,16 @@ then
 
     if test "$MOZ_ENABLE_LIBPROXY"
     then
         PKG_CHECK_MODULES(MOZ_LIBPROXY, libproxy-1.0)
         AC_DEFINE(MOZ_ENABLE_LIBPROXY)
     fi
 fi
 AC_SUBST(MOZ_ENABLE_LIBPROXY)
-AC_SUBST(MOZ_LIBPROXY_LIBS)
 
 dnl ========================================================
 dnl = GNOME component (mozgnome)
 dnl ========================================================
 
 if test "$MOZ_ENABLE_GTK"
 then
     MOZ_ENABLE_GNOME_COMPONENT=1
@@ -4794,18 +4785,16 @@ then
     if test "$MOZ_ENABLE_DBUS"
     then
         PKG_CHECK_MODULES(MOZ_DBUS, dbus-1 >= $DBUS_VERSION)
         PKG_CHECK_MODULES(MOZ_DBUS_GLIB, dbus-glib-1 >= $DBUS_VERSION)
         AC_DEFINE(MOZ_ENABLE_DBUS)
     fi
 fi
 AC_SUBST(MOZ_ENABLE_DBUS)
-AC_SUBST(MOZ_DBUS_LIBS)
-AC_SUBST(MOZ_DBUS_GLIB_LIBS)
 
 dnl ========================================================
 dnl = Enable Android History instead of Places
 dnl ========================================================
 if test -n "$MOZ_ANDROID_HISTORY"; then
     if test -z "$MOZ_PLACES"; then
         AC_DEFINE(MOZ_ANDROID_HISTORY)
     else
@@ -4984,17 +4973,17 @@ fi
 
 AC_SUBST(MOZ_WEBRTC)
 AC_SUBST(MOZ_WEBRTC_LEAKING_TESTS)
 AC_SUBST(MOZ_WEBRTC_SIGNALING)
 AC_SUBST(MOZ_PEERCONNECTION)
 AC_SUBST(MOZ_WEBRTC_ASSERT_ALWAYS)
 AC_SUBST(MOZ_SCTP)
 AC_SUBST(MOZ_SRTP)
-AC_SUBST(MOZ_WEBRTC_X11_LIBS)
+AC_SUBST_LIST(MOZ_WEBRTC_X11_LIBS)
 
 dnl Use integers over floats for audio on B2G and Android
 dnl (regarless of the CPU architecture, because audio
 dnl backends for those platforms don't support floats. We also
 dnl use integers on ARM with other OS, because it's more efficient.
 if test "$OS_TARGET" = "Android" -o "$CPU_ARCH" = "arm"; then
     MOZ_SAMPLE_TYPE_S16=1
     AC_DEFINE(MOZ_SAMPLE_TYPE_S16)
@@ -5272,17 +5261,17 @@ if test -n "$MOZ_VPX"; then
         fi
     fi
     CFLAGS=$_SAVE_CFLAGS
     LIBS=$_SAVE_LIBS
 fi
 
 AC_SUBST(MOZ_NATIVE_LIBVPX)
 AC_SUBST_LIST(MOZ_LIBVPX_CFLAGS)
-AC_SUBST(MOZ_LIBVPX_LIBS)
+AC_SUBST_LIST(MOZ_LIBVPX_LIBS)
 
 if test "$MOZ_WEBM"; then
     if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
         MOZ_VORBIS=1
     else
         MOZ_TREMOR=1
     fi
 fi
@@ -5429,17 +5418,16 @@ MOZ_ARG_ENABLE_BOOL(alsa,
 
 if test -n "$MOZ_ALSA"; then
     PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
          [echo "$MOZ_ALSA_PKG_ERRORS"
           AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)])])
 fi
 
 AC_SUBST(MOZ_ALSA)
-AC_SUBST(MOZ_ALSA_LIBS)
 
 dnl ========================================================
 dnl = Disable PulseAudio
 dnl ========================================================
 
 dnl If using Linux, ensure that the PA library is available
 case "$OS_TARGET" in
 WINNT|Darwin|Android|OpenBSD)
@@ -5515,18 +5503,16 @@ if test -n "$MOZ_GSTREAMER"; then
     LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
     AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
     if test -n "$_HAVE_LIBGSTVIDEO" ; then
         GSTREAMER_LIBS="$GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
     else
         AC_MSG_ERROR([gstreamer-plugins-base found, but no libgstvideo. Something has gone terribly wrong. Try reinstalling gstreamer-plugins-base; failing that, disable the gstreamer backend with --disable-gstreamer.])
     fi
     LDFLAGS=$_SAVE_LDFLAGS
-
-    AC_SUBST(GSTREAMER_LIBS)
 fi
 
 AC_SUBST(MOZ_GSTREAMER)
 AC_SUBST(GST_API_VERSION)
 
 if test -n "$MOZ_GSTREAMER"; then
      AC_DEFINE(MOZ_GSTREAMER)
      AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION")
@@ -5922,17 +5908,16 @@ if test "$OS_ARCH" != "$HOST_OS_ARCH" -a
 fi
 
 if test -n "$MOZ_CRASHREPORTER"; then
    AC_DEFINE(MOZ_CRASHREPORTER)
 
   if test "$OS_TARGET" = "Linux" -o "$OS_ARCH" = "SunOS" && \
     test -z "$SKIP_LIBRARY_CHECKS"; then
     PKG_CHECK_MODULES(MOZ_GTHREAD, gthread-2.0)
-    AC_SUBST(MOZ_GTHREAD_LIBS)
   fi
 
   if test "$OS_ARCH" = "WINNT"; then
     if test -z "$HAVE_64BIT_BUILD"; then
       MOZ_CRASHREPORTER_INJECTOR=1
       AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
     fi
   fi
@@ -7042,17 +7027,17 @@ else
     ;;
   esac
 fi # MOZ_MEMORY
 AC_SUBST(MOZ_MEMORY)
 AC_SUBST(MOZ_JEMALLOC3)
 AC_SUBST(MOZ_NATIVE_JEMALLOC)
 AC_SUBST(MOZ_GLUE_LDFLAGS)
 AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
-AC_SUBST(WIN32_CRT_LIBS)
+AC_SUBST_LIST(WIN32_CRT_LIBS)
 dnl Need to set this for make because NSS doesn't have configure
 AC_SUBST(DLLFLAGS)
 
 dnl We need to wrap dlopen and related functions on Android because we use
 dnl our own linker.
 if test "$OS_TARGET" = Android; then
     WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozglue"
     WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=PR_GetEnv,--wrap=PR_SetEnv"
@@ -7850,18 +7835,17 @@ fi
 
 if test -z "${GLIB_GMODULE_LIBS}" \
    -a -n "${GLIB_CONFIG}"\
     -a "${GLIB_CONFIG}" != no\
 ; then
     GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs`
 fi
 
-AC_SUBST(GLIB_LIBS)
-AC_SUBST(GLIB_GMODULE_LIBS)
+AC_SUBST_LIST(GLIB_GMODULE_LIBS)
 
 dnl ========================================================
 dnl Graphics checks.
 dnl ========================================================
 
 if test "${OS_TARGET}" = "WINNT"; then
   if $PERL -e "exit($MOZ_WINSDK_MAXVER < 0x06020000)"; then
     MOZ_ENABLE_DIRECT2D1_1=1
@@ -7987,17 +7971,17 @@ fi
 if test "$MOZ_TREE_PIXMAN"; then
     AC_DEFINE(MOZ_TREE_PIXMAN)
 else
     PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.19.2)
     MOZ_PIXMAN_CFLAGS="$PIXMAN_CFLAGS"
     MOZ_PIXMAN_LIBS="$PIXMAN_LIBS"
 fi
 AC_SUBST(MOZ_PIXMAN_CFLAGS)
-AC_SUBST(MOZ_PIXMAN_LIBS)
+AC_SUBST_LIST(MOZ_PIXMAN_LIBS)
 
 # Check for headers defining standard int types.
 if test -n "$COMPILE_ENVIRONMENT"; then
     MOZ_CHECK_HEADERS(stdint.h inttypes.h sys/int_types.h)
 
     if test "${ac_cv_header_inttypes_h}" = "yes"; then
         HAVE_INTTYPES_H=1
     fi
@@ -8107,18 +8091,18 @@ else
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
         MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS"
         MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
     fi
 fi
 
 AC_SUBST(MOZ_TREE_CAIRO)
 AC_SUBST_LIST(MOZ_CAIRO_CFLAGS)
-AC_SUBST(MOZ_CAIRO_LIBS)
-AC_SUBST(MOZ_CAIRO_OSLIBS)
+AC_SUBST_LIST(MOZ_CAIRO_LIBS)
+AC_SUBST_LIST(MOZ_CAIRO_OSLIBS)
 AC_SUBST(MOZ_TREE_PIXMAN)
 
 dnl ========================================================
 dnl Skia
 dnl ========================================================
 if test "$MOZ_ENABLE_SKIA"; then
   AC_DEFINE(MOZ_ENABLE_SKIA)
   AC_DEFINE(USE_SKIA)
@@ -8627,42 +8611,40 @@ HOST_CXXFLAGS=`echo \
     $HOST_CXXFLAGS \
     $_DEPEND_CFLAGS`
 
 AC_SUBST(MOZ_NATIVE_JPEG)
 AC_SUBST(MOZ_NATIVE_PNG)
 AC_SUBST(MOZ_NATIVE_BZ2)
 
 AC_SUBST(MOZ_JPEG_CFLAGS)
-AC_SUBST(MOZ_JPEG_LIBS)
+AC_SUBST_LIST(MOZ_JPEG_LIBS)
 AC_SUBST(MOZ_BZ2_CFLAGS)
-AC_SUBST(MOZ_BZ2_LIBS)
+AC_SUBST_LIST(MOZ_BZ2_LIBS)
 AC_SUBST(MOZ_PNG_CFLAGS)
-AC_SUBST(MOZ_PNG_LIBS)
+AC_SUBST_LIST(MOZ_PNG_LIBS)
 
 if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_NUWA_PROCESS"; then
     export MOZ_NUWA_PROCESS
     AC_DEFINE(MOZ_NUWA_PROCESS)
 fi
 AC_SUBST(MOZ_NUWA_PROCESS)
 if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_B2G_LOADER"; then
     if test -z "$MOZ_NUWA_PROCESS"; then
        AC_MSG_ERROR([B2G loader works with Nuwa]);
     fi
     export MOZ_B2G_LOADER
     AC_DEFINE(MOZ_B2G_LOADER)
 fi
 AC_SUBST(MOZ_B2G_LOADER)
 
 AC_SUBST(NSPR_CFLAGS)
-AC_SUBST(NSPR_LIBS)
 AC_SUBST(MOZ_NATIVE_NSPR)
 
 AC_SUBST(NSS_CFLAGS)
-AC_SUBST(NSS_LIBS)
 AC_SUBST(MOZ_NATIVE_NSS)
 AC_SUBST(NSS_DISABLE_DBM)
 
 OS_CFLAGS="$CFLAGS"
 OS_CXXFLAGS="$CXXFLAGS"
 OS_CPPFLAGS="$CPPFLAGS"
 OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
 OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
@@ -8727,17 +8709,17 @@ AC_SUBST(OBJ_SUFFIX)
 AC_SUBST(BIN_SUFFIX)
 AC_SUBST(ASM_SUFFIX)
 AC_SUBST(IMPORT_LIB_SUFFIX)
 AC_SUBST(USE_N32)
 AC_SUBST(CC_VERSION)
 AC_SUBST(CXX_VERSION)
 AC_SUBST(MSMANIFEST_TOOL)
 AC_SUBST(NS_ENABLE_TSF)
-AC_SUBST(MOZ_APP_EXTRA_LIBS)
+AC_SUBST_LIST(MOZ_APP_EXTRA_LIBS)
 
 AC_SUBST(MOZ_WAVE)
 AC_SUBST(MOZ_VORBIS)
 AC_SUBST(MOZ_TREMOR)
 AC_SUBST(MOZ_OPUS)
 AC_SUBST(MOZ_WEBM)
 AC_SUBST(MOZ_WMF)
 AC_SUBST(MOZ_FFMPEG)
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -3627,17 +3627,17 @@ if test -z "$SKIP_LIBRARY_CHECKS" -a -z 
     JS_BUNDLED_EDITLINE=1
   fi
 
   dnl Either way, we want to build with line editing support.
   AC_DEFINE(EDITLINE)
 fi
 AC_SUBST(JS_BUNDLED_EDITLINE)
 AC_SUBST(JS_DISABLE_SHELL)
-AC_SUBST(EDITLINE_LIBS)
+AC_SUBST_LIST(EDITLINE_LIBS)
 
 dnl ========================================================
 dnl =
 dnl = Standalone module options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla))
 
@@ -3765,17 +3765,17 @@ HOST_CFLAGS=`echo \
     $HOST_CFLAGS \
     $_DEPEND_CFLAGS`
 
 HOST_CXXFLAGS=`echo \
     $HOST_CXXFLAGS \
     $_DEPEND_CFLAGS`
 
 AC_SUBST(NSPR_CFLAGS)
-AC_SUBST(NSPR_LIBS)
+AC_SUBST_LIST(NSPR_LIBS)
 AC_SUBST(MOZ_NATIVE_NSPR)
 
 if test -n "$MOZ_NUWA_PROCESS"; then
     AC_DEFINE(MOZ_NUWA_PROCESS)
 fi
 
 OS_CFLAGS="$CFLAGS"
 OS_CXXFLAGS="$CXXFLAGS"