From a396a857ff1f2a9cce79f20aa59f498c79bb0396 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Tue, 14 May 2002 04:04:23 +0000 Subject: [PATCH] Conditionally check for -lSM & -lICE if -lXt test fails. Use XT_LIBS variable for -lXt and its dependencies. Link XT_LIBS in static xlib builds. Use same modulename for xlib module in Makefile as the code uses. Bug #126163 & Bug #144182 r=bryner --- config/autoconf.mk.in | 1 + config/static-config.mk | 4 ++-- configure.in | 14 ++++++++++---- widget/src/xlib/Makefile.in | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index d6a39a33111..1d11530bb5d 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -344,6 +344,7 @@ MOZ_ENABLE_XINERAMA = @MOZ_ENABLE_XINERAMA@ MOZ_XINERAMA_LIBS = @MOZ_XINERAMA_LIBS@ MOZ_XIE_LIBS = @MOZ_XIE_LIBS@ +XT_LIBS = @XT_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ diff --git a/config/static-config.mk b/config/static-config.mk index 7767809973f..4fd29955105 100644 --- a/config/static-config.mk +++ b/config/static-config.mk @@ -86,8 +86,8 @@ ifdef MOZ_SVG STATIC_EXTRA_LIBS += $(MOZ_LIBART_LIBS) endif -ifdef MOZ_ENABLE_GTK -STATIC_EXTRA_LIBS += $(XLDFLAGS) -lXt +ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_XLIB)) +STATIC_EXTRA_LIBS += $(XLDFLAGS) $(XT_LIBS) endif ifdef MOZ_ENABLE_XINERAMA diff --git a/configure.in b/configure.in index a9cbb1be477..ce22d83e4b0 100644 --- a/configure.in +++ b/configure.in @@ -1644,11 +1644,17 @@ else [MISSING_X="$MISSING_X -lX11"], $XLIBS) AC_CHECK_LIB(Xext, XextAddDisplay, [XEXT_LIBS="-lXext"], [MISSING_X="$MISSING_X -lXext"], $XLIBS) - AC_CHECK_LIB(ICE, IceFlush, [XICE_LIBS="-lICE"],, $XLIBS) - AC_CHECK_LIB(SM, SmcCloseConnection, [XSM_LIBS="-lSM"],, $XLIBS) - AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], - [MISSING_X="$MISSING_X -lXt"], $X_PRE_LIBS $XLIBS) + + + AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt"], [ + unset ac_cv_lib_Xt_XtFree + AC_CHECK_LIB(ICE, IceFlush, [XT_LIBS="-lICE $XT_LIBS"],, $XT_LIBS $XLIBS) + AC_CHECK_LIB(SM, SmcCloseConnection, [XT_LIBS="-lSM $XT_LIBS"],, $XT_LIBS $XLIBS) + AC_CHECK_LIB(Xt, XtFree, [ XT_LIBS="-lXt $XT_LIBS"], + [MISSING_X="$MISSING_X -lXt"], $X_PRE_LIBS $XT_LIBS $XLIBS) + ]) + AC_SUBST(XT_LIBS) dnl ======================================================== dnl = Check for Xinerama dnl ======================================================== diff --git a/widget/src/xlib/Makefile.in b/widget/src/xlib/Makefile.in index dd2348aafb5..3a9958268d3 100644 --- a/widget/src/xlib/Makefile.in +++ b/widget/src/xlib/Makefile.in @@ -31,7 +31,7 @@ MODULE = widget LIBRARY_NAME = widget_xlib EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = nsWidgetXLibModule +MODULE_NAME = nsWidgetXLIBModule REQUIRES = xpcom \ string \ appshell \