зеркало из https://github.com/mozilla/pjs.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:
Родитель
38acdd1740
Коммит
c56f8b9f0d
|
@ -574,11 +574,19 @@ endif
|
||||||
# Linux
|
# Linux
|
||||||
ifeq ($(OS_ARCH),Linux)
|
ifeq ($(OS_ARCH),Linux)
|
||||||
|
|
||||||
# Some linux platforms (there's so many of them) need special defines
|
# If the motif.mk file exists, it might define extra flags needed for
|
||||||
# for different versions of motif. Right now the only significant
|
# specific versions of motif.
|
||||||
# define is NS_MOTIF2_XP_LD_FLAGS (-lXp needed for motif 2.x)
|
#
|
||||||
|
# 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
|
-include $(DEPTH)/config/motif.mk
|
||||||
|
|
||||||
XTOOLLIB = -L/usr/X11R6/lib -lXt -lSM -lICE
|
XTOOLLIB = -L/usr/X11R6/lib -lXt -lSM -lICE
|
||||||
|
@ -592,8 +600,10 @@ else
|
||||||
|
|
||||||
MOTIFLIB =\
|
MOTIFLIB =\
|
||||||
$(MOTIFPATCH_LIB) \
|
$(MOTIFPATCH_LIB) \
|
||||||
|
$(MOZILLA_XM_2_1_BROKEN_LOCALE_FLAGS) \
|
||||||
-L/usr/X11R6/lib -lXm \
|
-L/usr/X11R6/lib -lXm \
|
||||||
$(NS_MOTIF2_XP_LD_FLAGS)
|
$(MOZILLA_XM_2_1_PRINT_SHELL_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
@ -607,7 +617,13 @@ OTHER_LIBS = $(MOTIFLIB) $(XTOOLLIB) $(XMULIB) $(EXTENSIONLIB) $(XLIB) -lm -ldl
|
||||||
# get two identical binaries.
|
# get two identical binaries.
|
||||||
#
|
#
|
||||||
ifeq ($(OS_RELEASE)$(CPU_ARCH),2.0x86)
|
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_OBJS = $(OBJDIR)/$(XFE_PROGNAME)-motif-export
|
||||||
EXTRA_EXPORT_BINARY = $(EXTRA_EXPORT_OBJS)
|
EXTRA_EXPORT_BINARY = $(EXTRA_EXPORT_OBJS)
|
||||||
|
|
|
@ -52,20 +52,40 @@ ifeq ($(OS_ARCH)$(OS_RELEASE),IRIX5)
|
||||||
TARGETS += $(OBJDIR)/gtscc$(BIN_SUFFIX)
|
TARGETS += $(OBJDIR)/gtscc$(BIN_SUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# On linux we need to generake a motif.mk file which has special defines
|
# On linux we need to generake a motif.mk file which has special flags
|
||||||
# for different motif versions.
|
# 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)
|
ifeq ($(OS_ARCH),Linux)
|
||||||
|
|
||||||
#GARBAGE += motif.mk
|
|
||||||
|
|
||||||
export:: motif.mk
|
export:: motif.mk
|
||||||
|
|
||||||
motif.mk:
|
motif.mk:
|
||||||
@rm -f $@
|
@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
|
else
|
||||||
@echo "NS_MOTIF2_XP_LD_FLAGS =" > $@
|
@echo "" > $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The contents of this file are subject to the Netscape Public License
|
|
||||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
|
||||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
|
||||||
# http://www.mozilla.org/NPL/
|
|
||||||
#
|
|
||||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
||||||
# for the specific language governing rights and limitations under the
|
|
||||||
# NPL.
|
|
||||||
#
|
|
||||||
# The Initial Developer of this code under the NPL is Netscape
|
|
||||||
# Communications Corporation. Portions created by Netscape are
|
|
||||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
||||||
# Reserved.
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
##
|
|
||||||
## 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.
|
|
||||||
##
|
|
||||||
## Also, more checks need to be added for more platforms.
|
|
||||||
## Currently this script is only usefull in the Linux Universe
|
|
||||||
## where there are a many versions of motif.
|
|
||||||
##
|
|
||||||
## Author: Ramiro Estrugo <ramiro@netscape.com>
|
|
||||||
##
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# The string build into the motif libs
|
|
||||||
MOTIF_VERSION_STRING="Motif Version"
|
|
||||||
|
|
||||||
# Make motif 1.x the default
|
|
||||||
MOTIF_DEFAULT_VERSION=1
|
|
||||||
|
|
||||||
# Reasonable defaults for motif lib locations
|
|
||||||
MOTIF_LIB_DIR=/usr/lib
|
|
||||||
MOTIF_STATIC_LIB=libXm.a
|
|
||||||
MOTIF_SHARED_LIB=libXm.so
|
|
||||||
|
|
||||||
os=`uname`
|
|
||||||
|
|
||||||
case `uname`
|
|
||||||
in
|
|
||||||
Linux)
|
|
||||||
case `uname -m`
|
|
||||||
in
|
|
||||||
ppc)
|
|
||||||
MOTIF_LIB_DIR=/usr/local/motif-1.2.4/lib
|
|
||||||
;;
|
|
||||||
|
|
||||||
i386|i486|i586|i686)
|
|
||||||
MOTIF_LIB_DIR=/usr/X11R6/lib
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
SunOS)
|
|
||||||
case `uname -r`
|
|
||||||
in
|
|
||||||
5.3|5.4|5.5.1|5.6)
|
|
||||||
MOTIF_LIB_DIR=/usr/dt/lib
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
HP-UX)
|
|
||||||
MOTIF_LIB_DIR=/usr/lib/Motif1.2
|
|
||||||
MOTIF_SHARED_LIB=libXm.sl
|
|
||||||
;;
|
|
||||||
|
|
||||||
AIX)
|
|
||||||
MOTIF_LIB_DIR=/usr/lib
|
|
||||||
MOTIF_SHARED_LIB=libXm.a
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Look for the shared one first
|
|
||||||
MOTIF_LIB=
|
|
||||||
|
|
||||||
if [ -f $MOTIF_LIB_DIR/$MOTIF_SHARED_LIB ]
|
|
||||||
then
|
|
||||||
MOTIF_LIB=$MOTIF_LIB_DIR/$MOTIF_SHARED_LIB
|
|
||||||
else
|
|
||||||
if [ -f $MOTIF_LIB_DIR/$MOTIF_STATIC_LIB ]
|
|
||||||
then
|
|
||||||
MOTIF_LIB=$MOTIF_LIB_DIR/$MOTIF_STATIC_LIB
|
|
||||||
else
|
|
||||||
echo $MOTIF_DEFAULT_VERSION
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=`strings $MOTIF_LIB | grep "Motif Version" | awk '{ print $3;}'`
|
|
||||||
|
|
||||||
MAJOR=`echo $VERSION | awk -F"." '{ print $1; }'`
|
|
||||||
|
|
||||||
echo $MAJOR
|
|
Загрузка…
Ссылка в новой задаче