зеркало из https://github.com/mozilla/gecko-dev.git
Make sure the client can properly link with motif 2.1 and gnu libc2 on
linux. Also link with libBrokenLocale.so since locale support in motif 2.1 with GLIBC is currently broken.
This commit is contained in:
Родитель
a388f68a46
Коммит
4c3f9250dd
|
@ -574,11 +574,19 @@ endif
|
|||
# Linux
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
|
||||
# Some linux platforms (there's so many of them) need special defines
|
||||
# for different versions of motif. Right now the only significant
|
||||
# define is NS_MOTIF2_XP_LD_FLAGS (-lXp needed for motif 2.x)
|
||||
# If the motif.mk file exists, it might define extra flags needed for
|
||||
# specific versions of motif.
|
||||
#
|
||||
# Currently there is only 2 flags:
|
||||
#
|
||||
# MOZILLA_XM_2_1_PRINT_SHELL_FLAGS: X Print Shell Extension available
|
||||
# starting with X11R6.3 and needed by motif 2.1.
|
||||
#
|
||||
# MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS: Needed because of currently
|
||||
# broken locale support in motif 2.1 when linked with gnu libc2.
|
||||
#
|
||||
# Please direct questions about motif and linux to ramiro@netscape.com.
|
||||
#
|
||||
# The file motif.mk holds such defines.
|
||||
-include $(DEPTH)/config/motif.mk
|
||||
|
||||
XTOOLLIB = -L/usr/X11R6/lib -lXt -lSM -lICE
|
||||
|
@ -592,8 +600,10 @@ else
|
|||
|
||||
MOTIFLIB =\
|
||||
$(MOTIFPATCH_LIB) \
|
||||
$(MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS) \
|
||||
-L/usr/X11R6/lib -lXm \
|
||||
$(NS_MOTIF2_XP_LD_FLAGS)
|
||||
$(MOZILLA_XM_2_1_PRINT_SHELL_FLAGS)
|
||||
|
||||
|
||||
endif
|
||||
else
|
||||
|
@ -607,7 +617,13 @@ OTHER_LIBS = $(MOTIFLIB) $(XTOOLLIB) $(XMULIB) $(EXTENSIONLIB) $(XLIB) -lm -ldl
|
|||
# get two identical binaries.
|
||||
#
|
||||
ifeq ($(OS_RELEASE)$(CPU_ARCH),2.0x86)
|
||||
DYN_MOTIFLIB = $(MOTIFPATCH_LIB) -lXm $(NS_MOTIF2_XP_LD_FLAGS)
|
||||
|
||||
DYN_MOTIFLIB =\
|
||||
$(MOTIFPATCH_LIB) \
|
||||
$(MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS) \
|
||||
-lXm \
|
||||
$(MOZILLA_XM_2_1_PRINT_SHELL_FLAGS)
|
||||
|
||||
|
||||
EXTRA_EXPORT_OBJS = $(OBJDIR)/$(XFE_PROGNAME)-motif-export
|
||||
EXTRA_EXPORT_BINARY = $(EXTRA_EXPORT_OBJS)
|
||||
|
|
|
@ -52,20 +52,40 @@ ifeq ($(OS_ARCH)$(OS_RELEASE),IRIX5)
|
|||
TARGETS += $(OBJDIR)/gtscc$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
# On linux we need to generake a motif.mk file which has special defines
|
||||
# for different motif versions.
|
||||
# On linux we need to generake a motif.mk file which has special flags
|
||||
# for different motif versions and/or broken libraries.
|
||||
#
|
||||
# Currently there is only 2 flags:
|
||||
#
|
||||
# MOZILLA_XM_2_1_PRINT_SHELL_FLAGS: X Print Shell Extension available
|
||||
# starting with X11R6.3 and needed by motif 2.1.
|
||||
#
|
||||
# MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS: Needed because of currently
|
||||
# broken locale support in motif 2.1 when linked with gnu libc2.
|
||||
#
|
||||
# Please direct questions about motif and linux to ramiro@netscape.com.
|
||||
#
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
|
||||
#GARBAGE += motif.mk
|
||||
|
||||
export:: motif.mk
|
||||
|
||||
motif.mk:
|
||||
@rm -f $@
|
||||
ifeq ($(shell $(DEPTH)/config/xmversion.sh),2)
|
||||
@echo "NS_MOTIF2_XP_LD_FLAGS = -lXp" > $@
|
||||
|
||||
# Check for motif 2.1 which needs the X Print Shell extension (-lXp)
|
||||
#
|
||||
# Also check for /lib/libc.so.6 (GNU libc2). If we are using GLIBC2 with
|
||||
# Motif 2.1, we need to check for /usr/lib/libBrokenLocale.so. At this
|
||||
# time locale support on motif 2.1 seems to break with GLIBC2.
|
||||
ifeq ($(shell $(DEPTH)/config/xmversion.sh),2.1)
|
||||
|
||||
@echo "MOZILLA_XM_2_1_PRINT_SHELL_FLAGS = -lXp" > $@
|
||||
|
||||
@if test -f /lib/libc.so.6 -a -f /usr/lib/libBrokenLocale.so; then \
|
||||
echo "MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS = -lBrokenLocale" >> $@; \
|
||||
fi
|
||||
else
|
||||
@echo "NS_MOTIF2_XP_LD_FLAGS =" > $@
|
||||
@echo "" > $@
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
|
@ -20,13 +20,12 @@
|
|||
##
|
||||
## Name: xmversion.sh - a fast way to get a motif lib's version
|
||||
##
|
||||
## Description: Print the major version number for motif libs on the
|
||||
## system that executes the script. Can be tweaked to output
|
||||
## more info. (such as cmd line args to print major/minor
|
||||
## version numbers). Currently prints only the major number.
|
||||
## Description: Print the major and minor version numbers for motif libs on
|
||||
## the system that executes the script. Could be tweaked
|
||||
## to output more info.
|
||||
##
|
||||
## Also, more checks need to be added for more platforms.
|
||||
## Currently this script is only usefull in the Linux Universe
|
||||
## More checks need to be added for more platforms.
|
||||
## Currently this script is only useful in Linux Universe
|
||||
## where there are a many versions of motif.
|
||||
##
|
||||
## Author: Ramiro Estrugo <ramiro@netscape.com>
|
||||
|
@ -101,5 +100,7 @@ fi
|
|||
VERSION=`strings $MOTIF_LIB | grep "Motif Version" | awk '{ print $3;}'`
|
||||
|
||||
MAJOR=`echo $VERSION | awk -F"." '{ print $1; }'`
|
||||
MINOR=`echo $VERSION | awk -F"." '{ print $2; }'`
|
||||
|
||||
echo $MAJOR.$MINOR
|
||||
|
||||
echo $MAJOR
|
||||
|
|
Загрузка…
Ссылка в новой задаче