(build automation and i18n changes). Latest server changes (2439 and 2440) are OK. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2442 3789f03b-4d11-0410-bbf8-ca57d06f2519tags/v0.0.90
@@ -1,3 +0,0 @@ | |||
SUBDIRS = common unix po | |||
ACLOCAL_AMFLAGS = -I m4 |
@@ -1,11 +0,0 @@ | |||
SUBDIRS = | |||
if ZLIB | |||
SUBDIRS += zlib | |||
endif | |||
#if JPEG | |||
#SUBDIRS += jpeg | |||
#endif | |||
SUBDIRS += rdr network Xregion rfb |
@@ -0,0 +1,4 @@ | |||
SUBDIRS = @ZLIB_DIR@ @JPEG_DIR@ rdr network Xregion rfb | |||
# followed by boilerplate.mk |
@@ -1,3 +0,0 @@ | |||
noinst_LTLIBRARIES = libXregion.la | |||
libXregion_la_SOURCES = Region.c region.h Xregion.h |
@@ -0,0 +1,15 @@ | |||
SRCS = Region.c | |||
OBJS = $(SRCS:.c=.o) | |||
library = libXregion.a | |||
all:: $(library) | |||
$(library): $(OBJS) | |||
rm -f $(library) | |||
$(AR) $(library) $(OBJS) | |||
$(RANLIB) $(library) | |||
# followed by boilerplate.mk |
@@ -0,0 +1,35 @@ | |||
all:: | |||
@subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done | |||
clean:: | |||
@subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done | |||
clean:: | |||
rm -f $(program) $(library) *.o | |||
SHELL = @SHELL@ | |||
top_srcdir = @top_srcdir@ | |||
@SET_MAKE@ | |||
CC = @CC@ | |||
CFLAGS = @CFLAGS@ $(DIR_CFLAGS) | |||
CCLD = $(CC) | |||
CXX = @CXX@ | |||
CXXFLAGS = @CXXFLAGS@ | |||
CXXLD = $(CXX) | |||
CPPFLAGS = @CPPFLAGS@ | |||
DEFS = @DEFS@ | |||
ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) | |||
LIBS = @LIBS@ | |||
LDFLAGS = @LDFLAGS@ | |||
RANLIB = @RANLIB@ | |||
AR = ar cq | |||
.SUFFIXES: | |||
.SUFFIXES: .cxx .c .o | |||
.c.o: | |||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -o $@ -c $< | |||
.cxx.o: | |||
$(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -o $@ -c $< |
@@ -0,0 +1,138 @@ | |||
dnl Process this file with autoconf to produce a configure script. | |||
AC_INIT(rdr/InStream.h) | |||
dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS | |||
ac_cv_prog_cc_g=no | |||
ac_cv_prog_cxx_g=no | |||
dnl Checks for programs. | |||
AC_PROG_CC | |||
AC_PROG_CXX | |||
AC_PROG_RANLIB | |||
AC_PROG_MAKE_SET | |||
AC_LANG_CPLUSPLUS | |||
case "`(uname -sr) 2>/dev/null`" in | |||
"SunOS 5"*) | |||
SOLARIS=yes | |||
;; | |||
"Linux"*) | |||
LINUX=yes | |||
;; | |||
"IRIX 6"*) | |||
X_LIBS="-L/usr/lib32" | |||
;; | |||
"LynxOS 2"*) | |||
SJLJ_EXCEPTIONS=yes | |||
;; | |||
esac | |||
dnl FIXME: Remove duplication between this script and ../unix/configure.in | |||
if test "$GCC" = yes; then | |||
CFLAGS="$CFLAGS -Wall" | |||
if test "$SOLARIS" = yes; then | |||
CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int" | |||
fi | |||
fi | |||
if test "$GXX" = yes; then | |||
CXXFLAGS="$CXXFLAGS -Wall" | |||
if test "$SOLARIS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive" | |||
fi | |||
if test "$SJLJ_EXCEPTIONS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -fsjlj-exceptions" | |||
fi | |||
fi | |||
dnl Checks for IRIX-specific Compression Library. | |||
AC_CHECK_LIB(cl, clQuerySchemeFromName, | |||
[AC_DEFINE(HAVE_CL) | |||
PLATFORM_CXXSRCS="$PLATFORM_CXXSRCS IrixCLJpegCompressor.cxx" | |||
LIBS="$LIBS -lcl"]) | |||
dnl Checks for IRIX-specific Digital Media libraries. | |||
AC_CHECK_LIB(dmedia, dmICCreate, | |||
[AC_DEFINE(HAVE_DMEDIA) | |||
PLATFORM_CXXSRCS="$PLATFORM_CXXSRCS IrixDMJpegCompressor.cxx" | |||
PLATFORM_CXXSRCS="$PLATFORM_CXXSRCS IrixDMIC_RawToJpeg.cxx" | |||
LIBS="$LIBS -ldmedia"]) | |||
AC_SUBST(PLATFORM_CXXSRCS) | |||
AC_ARG_WITH(installed-zlib, | |||
[ --with-installed-zlib use the version of zlib which is installed on the | |||
system instead of the one distributed with VNC]) | |||
if test "$with_installed_zlib" = yes; then | |||
echo "using installed zlib" | |||
ZLIB_LIB=-lz | |||
else | |||
ZLIB_DIR=zlib | |||
ZLIB_INCLUDE='-I$(top_srcdir)/zlib' | |||
ZLIB_LIB='$(top_srcdir)/zlib/libz.a' | |||
echo "configuring zlib..." | |||
(cd zlib; ./configure) | |||
echo "...done configuring zlib" | |||
fi | |||
AC_SUBST(ZLIB_DIR) | |||
AC_SUBST(ZLIB_INCLUDE) | |||
AC_SUBST(ZLIB_LIB) | |||
AC_ARG_WITH(installed-jpeg, | |||
[ --with-installed-jpeg use the version of jpeg which is installed on the | |||
system instead of the one distributed with VNC]) | |||
if test "$with_installed_jpeg" = yes; then | |||
echo "using installed jpeg" | |||
JPEG_LIB=-ljpeg | |||
else | |||
JPEG_DIR=jpeg/build | |||
JPEG_INCLUDE='-I$(top_srcdir)/jpeg' | |||
JPEG_LIB='$(top_srcdir)/jpeg/build/libjpeg.a' | |||
echo "configuring jpeg..." | |||
(mkdir jpeg/build; cd jpeg/build; ../configure) | |||
echo "...done configuring jpeg" | |||
fi | |||
AC_SUBST(JPEG_DIR) | |||
AC_SUBST(JPEG_INCLUDE) | |||
AC_SUBST(JPEG_LIB) | |||
AC_CHECK_FUNC(vsnprintf,VSNPRINTF_DEFINE='-DHAVE_VSNPRINTF',VSNPRINTF_DEFINE=) | |||
AC_SUBST(VSNPRINTF_DEFINE) | |||
AC_CHECK_FUNC(strcasecmp,STRCASECMP_DEFINE='-DHAVE_STRCASECMP', | |||
STRCASECMP_DEFINE=) | |||
AC_SUBST(STRCASECMP_DEFINE) | |||
AC_CHECK_FUNC(strncasecmp,STRNCASECMP_DEFINE='-DHAVE_STRNCASECMP', | |||
STRNCASECMP_DEFINE=) | |||
AC_SUBST(STRNCASECMP_DEFINE) | |||
AC_MSG_CHECKING(for socklen_t) | |||
AC_TRY_COMPILE( | |||
[#include <sys/types.h> | |||
#include <sys/socket.h>], | |||
[socklen_t x; | |||
accept(0, 0, &x);], | |||
AC_MSG_RESULT(yes) | |||
SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t', | |||
AC_MSG_RESULT(using int) | |||
SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=int') | |||
AC_SUBST(SOCKLEN_T_DEFINE) | |||
BOILERPLATE=boilerplate.mk | |||
if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then | |||
if sh -c "vncmkdepend" >/dev/null 2>&1; then | |||
BOILERPLATE="$BOILERPLATE:depend.mk" | |||
fi | |||
fi | |||
AC_OUTPUT(Makefile:Makefile.in:$BOILERPLATE \ | |||
rdr/Makefile:rdr/Makefile.in:$BOILERPLATE \ | |||
network/Makefile:network/Makefile.in:$BOILERPLATE \ | |||
Xregion/Makefile:Xregion/Makefile.in:$BOILERPLATE \ | |||
rfb/Makefile:rfb/Makefile.in:$BOILERPLATE \ | |||
) |
@@ -0,0 +1,76 @@ | |||
# | |||
# C / C++ header dependency stuff | |||
# | |||
# Needs GNU make and vncmkdepend, a hacked version of makedepend | |||
.SUFFIXES: .d | |||
CMAKEDEPEND = vncmkdepend | |||
CXXMAKEDEPEND = vncmkdepend | |||
# | |||
# The recommended method of doing dependency analysis in the GNU make manual | |||
# turns out to be painfully slow. This method is similar but it's | |||
# substantially faster and retains the desirable property that the user doesn't | |||
# need to manually invoke a "make depend" step. | |||
# | |||
# As with the method described in the manual, we generate a separate dependency | |||
# (.d) file for each source file. The .d file records the header files that | |||
# each C or C++ source file includes. Any source file recorded in SRCS or | |||
# CXXSRCS will cause us to try and include the corresponding .d file and GNU | |||
# make then treats each .d file as a target to be remade. | |||
# | |||
# Unlike the manual's method, the rule we provide for making the .d file is | |||
# actually a fake. All it does is record in a temporary file that the .d file | |||
# needs to be remade. But as well as all the .d files, we also try to include | |||
# a file called "depend.phony". This file never exists, but it causes GNU make | |||
# to try and make the target "depend.phony". The rule for depend.phony then | |||
# looks at the temporary files generated by the .d rules and then invokes the | |||
# "omkdepend" program on all of the source files in one go. | |||
# | |||
# | |||
# We use simple assignment here to remove any of the depend.tmp files | |||
# at the time make parses this bit. | |||
# | |||
dummyvariable := $(shell $(RM) cdepend.tmp cxxdepend.tmp) | |||
# | |||
# Now the "fake" rules for generating .d files. | |||
# | |||
%.d: %.c | |||
@echo "$<" >> cdepend.tmp | |||
%.d: %.cxx | |||
@echo "$<" >> cxxdepend.tmp | |||
# | |||
# The depend.phony rule which actually runs omkdepend. | |||
# | |||
depend.phony: | |||
@if [ -f cdepend.tmp ]; then \ | |||
echo $(CMAKEDEPEND) $(ALL_CPPFLAGS) `cat cdepend.tmp`; \ | |||
$(CMAKEDEPEND) $(ALL_CPPFLAGS) `cat cdepend.tmp`; \ | |||
rm -f cdepend.tmp; \ | |||
fi; \ | |||
if [ -f cxxdepend.tmp ]; then \ | |||
echo $(CXXMAKEDEPEND) $(ALL_CPPFLAGS) `cat cxxdepend.tmp`; \ | |||
$(CXXMAKEDEPEND) $(ALL_CPPFLAGS) `cat cxxdepend.tmp`; \ | |||
rm -f cxxdepend.tmp; \ | |||
fi | |||
# | |||
# Now include the .d files and the "depend.phony" file which never exists. | |||
# For some reason GNU make evaluates the targets in reverse order, so we need | |||
# to include depend.phony first. The "-" tells make not to complain that it | |||
# can't find the file. | |||
# | |||
-include depend.phony | |||
ifdef SRCS | |||
-include $(patsubst %.c,%.d,$(patsubst %.cxx,%.d,$(SRCS))) | |||
endif |
@@ -1,5 +0,0 @@ | |||
noinst_LTLIBRARIES = libnetwork.la | |||
libnetwork_la_SOURCES = Socket.h TcpSocket.cxx TcpSocket.h | |||
libnetwork_la_CPPFLAGS = -I$(COMMON_DIR) |
@@ -0,0 +1,17 @@ | |||
SRCS = TcpSocket.cxx | |||
OBJS = $(SRCS:.cxx=.o) | |||
DIR_CPPFLAGS = -I$(top_srcdir) @SOCKLEN_T_DEFINE@ | |||
library = libnetwork.a | |||
all:: $(library) | |||
$(library): $(OBJS) | |||
rm -f $(library) | |||
$(AR) $(library) $(OBJS) | |||
$(RANLIB) $(library) | |||
# followed by boilerplate.mk |
@@ -16,10 +16,6 @@ | |||
* USA. | |||
*/ | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#ifdef WIN32 | |||
//#include <io.h> | |||
#include <winsock2.h> |
@@ -1,10 +0,0 @@ | |||
noinst_LTLIBRARIES = librdr.la | |||
librdr_la_SOURCES = Exception.cxx Exception.h FdInStream.cxx FdInStream.h \ | |||
FdOutStream.cxx FdOutStream.h FixedMemOutStream.h HexInStream.cxx \ | |||
HexInStream.h HexOutStream.cxx HexOutStream.h InStream.cxx InStream.h \ | |||
MemInStream.h MemOutStream.h OutStream.h RandomStream.cxx \ | |||
RandomStream.h SubstitutingInStream.h types.h ZlibInStream.cxx \ | |||
ZlibInStream.h ZlibOutStream.cxx ZlibOutStream.h | |||
librdr_la_CPPFLAGS = -I$(COMMON_DIR) |
@@ -0,0 +1,19 @@ | |||
SRCS = Exception.cxx FdInStream.cxx FdOutStream.cxx InStream.cxx \ | |||
RandomStream.cxx ZlibInStream.cxx ZlibOutStream.cxx \ | |||
HexInStream.cxx HexOutStream.cxx | |||
OBJS = $(SRCS:.cxx=.o) | |||
DIR_CPPFLAGS = -I$(top_srcdir) @ZLIB_INCLUDE@ | |||
library = librdr.a | |||
all:: $(library) | |||
$(library): $(OBJS) | |||
rm -f $(library) | |||
$(AR) $(library) $(OBJS) | |||
$(RANLIB) $(library) | |||
# followed by boilerplate.mk |
@@ -4,7 +4,7 @@ | |||
#include <stdio.h> | |||
#include <sys/types.h> | |||
extern "C" { | |||
#include <jpeglib.h> | |||
#include <jpeg/jpeglib.h> | |||
} | |||
#include <rdr/types.h> |
@@ -18,10 +18,6 @@ | |||
// -=- Logger.cxx - support for the Logger and LogWriter classes | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <stdarg.h> | |||
#include <stdio.h> | |||
#include <string.h> |
@@ -1,55 +0,0 @@ | |||
noinst_LTLIBRARIES = librfb.la | |||
librfb_la_SOURCES = Blacklist.cxx Blacklist.h CapsContainer.cxx \ | |||
CapsContainer.h CapsList.cxx CapsList.h CConnection.cxx CConnection.h \ | |||
CFTMsgReader.cxx CFTMsgReader.h CFTMsgWriter.cxx CFTMsgWriter.h \ | |||
CMsgHandler.cxx CMsgHandler.h CMsgReader.cxx CMsgReader.h \ | |||
CMsgReaderV3.cxx CMsgReaderV3.h CMsgWriter.cxx CMsgWriter.h \ | |||
CMsgWriterV3.cxx CMsgWriterV3.h ColourCube.h ColourMap.h \ | |||
ComparingUpdateTracker.cxx ComparingUpdateTracker.h Configuration.cxx \ | |||
Configuration.h ConnParams.cxx ConnParams.h CSecurity.h \ | |||
CSecurityNone.h CSecurityVncAuth.cxx CSecurityVncAuth.h Cursor.cxx \ | |||
Cursor.h Decoder.cxx Decoder.h DirManager.h d3des.c d3des.h \ | |||
Encoder.cxx Encoder.h encodings.cxx encodings.h Exception.h \ | |||
FileInfo.cxx FileInfo.h FileManager.cxx FileManager.h FileReader.cxx \ | |||
FileReader.h FileWriter.cxx FileWriter.h fttypes.h hextileConstants.h \ | |||
hextileDecode.h HextileDecoder.cxx HextileDecoder.h \ | |||
hextileEncodeBetter.h hextileEncode.h HextileEncoder.cxx \ | |||
HextileEncoder.h Hostname.h HTTPServer.cxx HTTPServer.h ImageGetter.h \ | |||
InputHandler.h JpegCompressor.cxx JpegCompressor.h JpegEncoder.cxx \ | |||
JpegEncoder.h KeyRemapper.cxx KeyRemapper.h keysymdef.h \ | |||
ListConnInfo.h Logger.cxx Logger_file.cxx Logger_file.h Logger.h \ | |||
Logger_stdio.cxx Logger_stdio.h LogWriter.cxx LogWriter.h msgTypes.h \ | |||
Password.cxx Password.h PixelBuffer.cxx PixelBuffer.h PixelFormat.cxx \ | |||
PixelFormat.h Pixel.h RawDecoder.cxx RawDecoder.h RawEncoder.cxx \ | |||
RawEncoder.h Rect.h Region.cxx Region.h rreDecode.h RREDecoder.cxx \ | |||
RREDecoder.h rreEncode.h RREEncoder.cxx RREEncoder.h \ | |||
ScaledPixelBuffer.cxx ScaledPixelBuffer.h ScaleFilters.cxx \ | |||
ScaleFilters.h SConnection.cxx SConnection.h SDesktop.h secTypes.cxx \ | |||
secTypes.h ServerCore.cxx ServerCore.h SFileTransfer.cxx \ | |||
SFileTransfer.h SFileTransferManager.cxx SFileTransferManager.h \ | |||
SFTMsgReader.cxx SFTMsgReader.h SFTMsgWriter.cxx SFTMsgWriter.h \ | |||
SMsgHandler.cxx SMsgHandler.h SMsgReader.cxx SMsgReader.h \ | |||
SMsgReaderV3.cxx SMsgReaderV3.h SMsgWriter.cxx SMsgWriter.h \ | |||
SMsgWriterV3.cxx SMsgWriterV3.h SSecurityFactoryStandard.cxx \ | |||
SSecurityFactoryStandard.h SSecurity.h SSecurityNone.h \ | |||
SSecurityVncAuth.cxx SSecurityVncAuth.h Threading.h tightDecode.h \ | |||
TightDecoder.cxx TightDecoder.h tightEncode.h TightEncoder.cxx \ | |||
TightEncoder.h TightPalette.cxx TightPalette.h Timer.cxx Timer.h \ | |||
TransferQueue.cxx TransferQueue.h TransImageGetter.cxx \ | |||
TransImageGetter.h transInitTempl.h transTempl.h TrueColourMap.h \ | |||
UpdateTracker.cxx UpdateTracker.h UserPasswdGetter.h util.cxx util.h \ | |||
VNCSConnectionST.cxx VNCSConnectionST.h VNCServer.h VNCServerST.cxx \ | |||
VNCServerST.h zrleDecode.h ZRLEDecoder.cxx ZRLEDecoder.h zrleEncode.h \ | |||
ZRLEEncoder.cxx ZRLEEncoder.h | |||
if CL | |||
librfb_la_SOURCES += IrixCLJpegCompressor.cxx IrixCLJpegCompressor.h | |||
endif | |||
if DMEDIA | |||
librfb_la_SOURCES += IrixDMIC_RawToJpeg.cxx IrixDMIC_RawToJpeg.h \ | |||
IrixDMJpegCompressor.cxx IrixDMJpegCompressor.h | |||
endif | |||
librfb_la_CPPFLAGS = -I$(COMMON_DIR) |
@@ -0,0 +1,88 @@ | |||
CXXSRCS = \ | |||
Blacklist.cxx \ | |||
CConnection.cxx \ | |||
CMsgHandler.cxx \ | |||
CMsgReader.cxx \ | |||
CMsgReaderV3.cxx \ | |||
CMsgWriter.cxx \ | |||
CMsgWriterV3.cxx \ | |||
CSecurityVncAuth.cxx \ | |||
CapsContainer.cxx \ | |||
CapsList.cxx \ | |||
ComparingUpdateTracker.cxx \ | |||
Configuration.cxx \ | |||
ConnParams.cxx \ | |||
Cursor.cxx \ | |||
Decoder.cxx \ | |||
Encoder.cxx \ | |||
FileInfo.cxx \ | |||
FileManager.cxx \ | |||
FileReader.cxx \ | |||
FileWriter.cxx \ | |||
JpegCompressor.cxx \ | |||
JpegEncoder.cxx \ | |||
HTTPServer.cxx \ | |||
HextileDecoder.cxx \ | |||
HextileEncoder.cxx \ | |||
KeyRemapper.cxx \ | |||
LogWriter.cxx \ | |||
Logger.cxx \ | |||
Logger_file.cxx \ | |||
Logger_stdio.cxx \ | |||
Password.cxx \ | |||
PixelBuffer.cxx \ | |||
PixelFormat.cxx \ | |||
RREEncoder.cxx \ | |||
RREDecoder.cxx \ | |||
RawDecoder.cxx \ | |||
RawEncoder.cxx \ | |||
Region.cxx \ | |||
SConnection.cxx \ | |||
SFTMsgReader.cxx \ | |||
SFTMsgWriter.cxx \ | |||
SFileTransfer.cxx \ | |||
SFileTransferManager.cxx \ | |||
SMsgHandler.cxx \ | |||
SMsgReader.cxx \ | |||
SMsgReaderV3.cxx \ | |||
SMsgWriter.cxx \ | |||
SMsgWriterV3.cxx \ | |||
ServerCore.cxx \ | |||
SSecurityFactoryStandard.cxx \ | |||
SSecurityVncAuth.cxx \ | |||
ScaledPixelBuffer.cxx \ | |||
ScaleFilters.cxx \ | |||
Timer.cxx \ | |||
TightDecoder.cxx \ | |||
TightEncoder.cxx \ | |||
TightPalette.cxx \ | |||
TransImageGetter.cxx \ | |||
TransferQueue.cxx \ | |||
UpdateTracker.cxx \ | |||
VNCSConnectionST.cxx \ | |||
VNCServerST.cxx \ | |||
ZRLEEncoder.cxx \ | |||
ZRLEDecoder.cxx \ | |||
encodings.cxx \ | |||
secTypes.cxx \ | |||
util.cxx \ | |||
@PLATFORM_CXXSRCS@ | |||
SRCS = d3des.c $(CXXSRCS) | |||
OBJS = d3des.o $(CXXSRCS:.cxx=.o) | |||
DIR_CPPFLAGS = -I$(top_srcdir) @JPEG_INCLUDE@ @VSNPRINTF_DEFINE@ \ | |||
@STRCASECMP_DEFINE@ @STRNCASECMP_DEFINE@ | |||
library = librfb.a | |||
all:: $(library) | |||
$(library): $(OBJS) | |||
rm -f $(library) | |||
$(AR) $(library) $(OBJS) | |||
$(RANLIB) $(library) | |||
# followed by boilerplate.mk |
@@ -23,10 +23,6 @@ | |||
#ifndef __RFB_UTIL_H__ | |||
#define __RFB_UTIL_H__ | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <limits.h> | |||
#include <string.h> | |||
@@ -1,7 +0,0 @@ | |||
noinst_LTLIBRARIES = libz.la | |||
libz_la_SOURCES = adler32.c compress.c crc32.c deflate.c deflate.h example.c \ | |||
gzio.c infblock.c infblock.h infcodes.c infcodes.h inffast.c \ | |||
inffast.h inffixed.h inflate.c inftrees.c inftrees.h infutil.c \ | |||
infutil.h maketree.c minigzip.c trees.c trees.h uncompr.c zconf.h \ | |||
zlib.h zutil.c zutil.h |
@@ -0,0 +1,175 @@ | |||
# Makefile for zlib | |||
# Copyright (C) 1995-2002 Jean-loup Gailly. | |||
# For conditions of distribution and use, see copyright notice in zlib.h | |||
# To compile and test, type: | |||
# ./configure; make test | |||
# The call of configure is optional if you don't have special requirements | |||
# If you wish to build zlib as a shared library, use: ./configure -s | |||
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | |||
# make install | |||
# To install in $HOME instead of /usr/local, use: | |||
# make install prefix=$HOME | |||
CC=cc | |||
CFLAGS=-O | |||
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | |||
#CFLAGS=-g -DDEBUG | |||
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | |||
# -Wstrict-prototypes -Wmissing-prototypes | |||
LDFLAGS=-L. -lz | |||
LDSHARED=$(CC) | |||
CPP=$(CC) -E | |||
VER=1.1.4 | |||
LIBS=libz.a | |||
SHAREDLIB=libz.so | |||
AR=ar rc | |||
RANLIB=ranlib | |||
TAR=tar | |||
SHELL=/bin/sh | |||
prefix = /usr/local | |||
exec_prefix = ${prefix} | |||
libdir = ${exec_prefix}/lib | |||
includedir = ${prefix}/include | |||
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | |||
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | |||
OBJA = | |||
# to use the asm code: make OBJA=match.o | |||
TEST_OBJS = example.o minigzip.o | |||
DISTFILES = README FAQ INDEX ChangeLog configure Make*[a-z0-9] *.[ch] *.mms \ | |||
algorithm.txt zlib.3 zlib.html \ | |||
msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ | |||
nt/Make*[a-z0-9] nt/zlib.dnt amiga/Make*.??? os2/M*.os2 os2/zlib.def \ | |||
contrib/RE*.contrib contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \ | |||
contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/asm[56]86/*.?86 \ | |||
contrib/asm[56]86/*.S contrib/iostream/*.cpp \ | |||
contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ | |||
contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \ | |||
contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \ | |||
contrib/delphi*/*.??? | |||
all: example minigzip | |||
test: all | |||
@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ | |||
echo hello world | ./minigzip | ./minigzip -d || \ | |||
echo ' *** minigzip test FAILED ***' ; \ | |||
if ./example; then \ | |||
echo ' *** zlib test OK ***'; \ | |||
else \ | |||
echo ' *** zlib test FAILED ***'; \ | |||
fi | |||
libz.a: $(OBJS) $(OBJA) | |||
$(AR) $@ $(OBJS) $(OBJA) | |||
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1 | |||
match.o: match.S | |||
$(CPP) match.S > _match.s | |||
$(CC) -c _match.s | |||
mv _match.o match.o | |||
rm -f _match.s | |||
$(SHAREDLIB).$(VER): $(OBJS) | |||
$(LDSHARED) -o $@ $(OBJS) | |||
rm -f $(SHAREDLIB) $(SHAREDLIB).1 | |||
ln -s $@ $(SHAREDLIB) | |||
ln -s $@ $(SHAREDLIB).1 | |||
example: example.o $(LIBS) | |||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | |||
minigzip: minigzip.o $(LIBS) | |||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | |||
install: $(LIBS) | |||
-@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi | |||
-@if [ ! -d $(libdir) ]; then mkdir $(libdir); fi | |||
cp zlib.h zconf.h $(includedir) | |||
chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h | |||
cp $(LIBS) $(libdir) | |||
cd $(libdir); chmod 755 $(LIBS) | |||
-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 | |||
cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \ | |||
rm -f $(SHAREDLIB) $(SHAREDLIB).1; \ | |||
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \ | |||
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \ | |||
(ldconfig || true) >/dev/null 2>&1; \ | |||
fi | |||
# The ranlib in install is needed on NeXTSTEP which checks file times | |||
# ldconfig is for Linux | |||
uninstall: | |||
cd $(includedir); \ | |||
v=$(VER); \ | |||
if test -f zlib.h; then \ | |||
v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \ | |||
rm -f zlib.h zconf.h; \ | |||
fi; \ | |||
cd $(libdir); rm -f libz.a; \ | |||
if test -f $(SHAREDLIB).$$v; then \ | |||
rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \ | |||
fi | |||
clean: | |||
rm -f *.o *~ example minigzip libz.a libz.so* foo.gz so_locations \ | |||
_match.s maketree | |||
distclean: clean | |||
zip: | |||
mv Makefile Makefile~; cp -p Makefile.in Makefile | |||
rm -f test.c ztest*.c contrib/minizip/test.zip | |||
v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | |||
zip -ul9 zlib$$v $(DISTFILES) | |||
mv Makefile~ Makefile | |||
dist: | |||
mv Makefile Makefile~; cp -p Makefile.in Makefile | |||
rm -f test.c ztest*.c contrib/minizip/test.zip | |||
d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | |||
rm -f $$d.tar.gz; \ | |||
if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | |||
files=""; \ | |||
for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | |||
cd ..; \ | |||
GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | |||
if test ! -d $$d; then rm -f $$d; fi | |||
mv Makefile~ Makefile | |||
tags: | |||
etags *.[ch] | |||
depend: | |||
makedepend -- $(CFLAGS) -- *.[ch] | |||
# DO NOT DELETE THIS LINE -- make depend depends on it. | |||
adler32.o: zlib.h zconf.h | |||
compress.o: zlib.h zconf.h | |||
crc32.o: zlib.h zconf.h | |||
deflate.o: deflate.h zutil.h zlib.h zconf.h | |||
example.o: zlib.h zconf.h | |||
gzio.o: zutil.h zlib.h zconf.h | |||
infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h | |||
infcodes.o: zutil.h zlib.h zconf.h | |||
infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h | |||
inffast.o: zutil.h zlib.h zconf.h inftrees.h | |||
inffast.o: infblock.h infcodes.h infutil.h inffast.h | |||
inflate.o: zutil.h zlib.h zconf.h infblock.h | |||
inftrees.o: zutil.h zlib.h zconf.h inftrees.h | |||
infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | |||
minigzip.o: zlib.h zconf.h | |||
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h | |||
uncompr.o: zlib.h zconf.h | |||
zutil.o: zutil.h zlib.h zconf.h |
@@ -0,0 +1,213 @@ | |||
#!/bin/sh | |||
# configure script for zlib. This script is needed only if | |||
# you wish to build a shared library and your system supports them, | |||
# of if you need special compiler, flags or install directory. | |||
# Otherwise, you can just use directly "make test; make install" | |||
# | |||
# To create a shared library, use "configure --shared"; by default a static | |||
# library is created. If the primitive shared library support provided here | |||
# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz | |||
# | |||
# To impose specific compiler or flags or install directory, use for example: | |||
# prefix=$HOME CC=cc CFLAGS="-O4" ./configure | |||
# or for csh/tcsh users: | |||
# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) | |||
# LDSHARED is the command to be used to create a shared library | |||
# Incorrect settings of CC or CFLAGS may prevent creating a shared library. | |||
# If you have problems, try without defining CC and CFLAGS before reporting | |||
# an error. | |||
LIBS=libz.a | |||
SHAREDLIB=libz.so | |||
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` | |||
AR=${AR-"ar rc"} | |||
RANLIB=${RANLIB-"ranlib"} | |||
prefix=${prefix-/usr/local} | |||
exec_prefix=${exec_prefix-'${prefix}'} | |||
libdir=${libdir-'${exec_prefix}/lib'} | |||
includedir=${includedir-'${prefix}/include'} | |||
shared_ext='.so' | |||
shared=0 | |||
gcc=0 | |||
old_cc="$CC" | |||
old_cflags="$CFLAGS" | |||
while test $# -ge 1 | |||
do | |||
case "$1" in | |||
-h* | --h*) | |||
echo 'usage:' | |||
echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' | |||
echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' | |||
exit 0;; | |||
-p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | |||
-e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | |||
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | |||
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; | |||
-p* | --p*) prefix="$2"; shift; shift;; | |||
-e* | --e*) exec_prefix="$2"; shift; shift;; | |||
-l* | --l*) libdir="$2"; shift; shift;; | |||
-i* | --i*) includedir="$2"; shift; shift;; | |||
-s* | --s*) shared=1; shift;; | |||
*) shift;; | |||
esac | |||
done | |||
test=ztest$$ | |||
cat > $test.c <<EOF | |||
extern int getchar(); | |||
int hello() {return getchar();} | |||
EOF | |||
test -z "$CC" && echo Checking for gcc... | |||
cc=${CC-gcc} | |||
cflags=${CFLAGS-"-O3"} | |||
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure | |||
case "$cc" in | |||
*gcc*) gcc=1;; | |||
esac | |||
if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
CC="$cc" | |||
SFLAGS=${CFLAGS-"-fPIC -O3"} | |||
CFLAGS="$cflags" | |||
case `(uname -s || echo unknown) 2>/dev/null` in | |||
Linux | linux) LDSHARED=${LDSHARED-"gcc -shared -Wl,-soname,libz.so.1"};; | |||
*) LDSHARED=${LDSHARED-"gcc -shared"};; | |||
esac | |||
else | |||
# find system name and corresponding cc options | |||
CC=${CC-cc} | |||
case `(uname -sr || echo unknown) 2>/dev/null` in | |||
HP-UX*) SFLAGS=${CFLAGS-"-O +z"} | |||
CFLAGS=${CFLAGS-"-O"} | |||
# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} | |||
LDSHARED=${LDSHARED-"ld -b"} | |||
shared_ext='.sl' | |||
SHAREDLIB='libz.sl';; | |||
IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} | |||
CFLAGS=${CFLAGS-"-ansi -O2"} | |||
LDSHARED=${LDSHARED-"cc -shared"};; | |||
OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} | |||
CFLAGS=${CFLAGS-"-O -std1"} | |||
LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,$SHAREDLIB -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; | |||
OSF1*) SFLAGS=${CFLAGS-"-O -std1"} | |||
CFLAGS=${CFLAGS-"-O -std1"} | |||
LDSHARED=${LDSHARED-"cc -shared"};; | |||
QNX*) SFLAGS=${CFLAGS-"-4 -O"} | |||
CFLAGS=${CFLAGS-"-4 -O"} | |||
LDSHARED=${LDSHARED-"cc"} | |||
RANLIB=${RANLIB-"true"} | |||
AR="cc -A";; | |||
SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} | |||
CFLAGS=${CFLAGS-"-O3"} | |||
LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; | |||
SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} | |||
CFLAGS=${CFLAGS-"-fast -xcg89"} | |||
LDSHARED=${LDSHARED-"cc -G"};; | |||
SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} | |||
CFLAGS=${CFLAGS-"-O2"} | |||
LDSHARED=${LDSHARED-"ld"};; | |||
UNIX_System_V\ 4.2.0) | |||
SFLAGS=${CFLAGS-"-KPIC -O"} | |||
CFLAGS=${CFLAGS-"-O"} | |||
LDSHARED=${LDSHARED-"cc -G"};; | |||
UNIX_SV\ 4.2MP) | |||
SFLAGS=${CFLAGS-"-Kconform_pic -O"} | |||
CFLAGS=${CFLAGS-"-O"} | |||
LDSHARED=${LDSHARED-"cc -G"};; | |||
# send working options for other systems to support@gzip.org | |||
*) SFLAGS=${CFLAGS-"-O"} | |||
CFLAGS=${CFLAGS-"-O"} | |||
LDSHARED=${LDSHARED-"cc -shared"};; | |||
esac | |||
fi | |||
if test $shared -eq 1; then | |||
echo Checking for shared library support... | |||
# we must test in two steps (cc then ld), required at least on SunOS 4.x | |||
if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && | |||
test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then | |||
CFLAGS="$SFLAGS" | |||
LIBS="$SHAREDLIB.$VER" | |||
echo Building shared library $SHAREDLIB.$VER with $CC. | |||
elif test -z "$old_cc" -a -z "$old_cflags"; then | |||
echo No shared library suppport. | |||
shared=0; | |||
else | |||
echo 'No shared library suppport; try without defining CC and CFLAGS' | |||
shared=0; | |||
fi | |||
fi | |||
if test $shared -eq 0; then | |||
LDSHARED="$CC" | |||
echo Building static library $LIBS version $VER with $CC. | |||
fi | |||
cat > $test.c <<EOF | |||
#include <unistd.h> | |||
int main() { return 0; } | |||
EOF | |||
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | |||
CFLAGS="$CFLAGS -DHAVE_UNISTD_H" | |||
echo "Checking for unistd.h... Yes." | |||
else | |||
echo "Checking for unistd.h... No." | |||
fi | |||
cat > $test.c <<EOF | |||
#include <errno.h> | |||
int main() { return 0; } | |||
EOF | |||
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | |||
echo "Checking for errno.h... Yes." | |||
else | |||
echo "Checking for errno.h... No." | |||
CFLAGS="$CFLAGS -DNO_ERRNO_H" | |||
fi | |||
cat > $test.c <<EOF | |||
#include <sys/types.h> | |||
#include <sys/mman.h> | |||
#include <sys/stat.h> | |||
caddr_t hello() { | |||
return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); | |||
} | |||
EOF | |||
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | |||
CFLAGS="$CFLAGS -DUSE_MMAP" | |||
echo Checking for mmap support... Yes. | |||
else | |||
echo Checking for mmap support... No. | |||
fi | |||
CPP=${CPP-"$CC -E"} | |||
case $CFLAGS in | |||
*ASMV*) | |||
if test "`nm $test.o | grep _hello`" = ""; then | |||
CPP="$CPP -DNO_UNDERLINE" | |||
echo Checking for underline in external names... No. | |||
else | |||
echo Checking for underline in external names... Yes. | |||
fi;; | |||
esac | |||
rm -f $test.[co] $test$shared_ext | |||
# udpate Makefile | |||
sed < Makefile.in " | |||
/^CC *=/s%=.*%=$CC% | |||
/^CFLAGS *=/s%=.*%=$CFLAGS% | |||
/^CPP *=/s%=.*%=$CPP% | |||
/^LDSHARED *=/s%=.*%=$LDSHARED% | |||
/^LIBS *=/s%=.*%=$LIBS% | |||
/^SHAREDLIB *=/s%=.*%=$SHAREDLIB% | |||
/^AR *=/s%=.*%=$AR% | |||
/^RANLIB *=/s%=.*%=$RANLIB% | |||
/^VER *=/s%=.*%=$VER% | |||
/^prefix *=/s%=.*%=$prefix% | |||
/^exec_prefix *=/s%=.*%=$exec_prefix% | |||
/^libdir *=/s%=.*%=$libdir% | |||
/^includedir *=/s%=.*%=$includedir% | |||
" > Makefile |
@@ -1,30 +0,0 @@ | |||
# -*- Autoconf -*- | |||
# Process this file with autoconf to produce a configure script. | |||
AC_PREREQ([2.61]) | |||
AC_INIT([zlib], [1.1.4]) | |||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2]) | |||
# Checks for programs. | |||
AC_PROG_CC | |||
AC_PROG_LIBTOOL | |||
# Checks for libraries. | |||
# Checks for header files. | |||
AC_HEADER_STDC | |||
AC_CHECK_HEADERS([fcntl.h malloc.h stddef.h stdlib.h string.h unistd.h errno.h]) | |||
# Checks for typedefs, structures, and compiler characteristics. | |||
AC_C_CONST | |||
AC_TYPE_OFF_T | |||
# Checks for library functions. | |||
AC_FUNC_ERROR_AT_LINE | |||
AC_FUNC_MMAP | |||
AC_FUNC_VPRINTF | |||
AC_CHECK_FUNCS([munmap strerror]) | |||
AC_CONFIG_HEADERS([config.h]) | |||
AC_CONFIG_FILES([Makefile]) | |||
AC_OUTPUT |
@@ -15,10 +15,6 @@ | |||
/* @(#) $Id: minigzip.c,v 1.1 2004/10/08 09:44:26 const_k Exp $ */ | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <stdio.h> | |||
#include "zlib.h" | |||
@@ -29,7 +25,7 @@ | |||
extern void exit OF((int)); | |||
#endif | |||
#ifdef HAVE_MMAP | |||
#ifdef USE_MMAP | |||
# include <sys/types.h> | |||
# include <sys/mman.h> | |||
# include <sys/stat.h> | |||
@@ -79,7 +75,7 @@ char *prog; | |||
void error OF((const char *msg)); | |||
void gz_compress OF((FILE *in, gzFile out)); | |||
#ifdef HAVE_MMAP | |||
#ifdef USE_MMAP | |||
int gz_compress_mmap OF((FILE *in, gzFile out)); | |||
#endif | |||
void gz_uncompress OF((gzFile in, FILE *out)); | |||
@@ -109,7 +105,7 @@ void gz_compress(in, out) | |||
int len; | |||
int err; | |||
#ifdef HAVE_MMAP | |||
#ifdef USE_MMAP | |||
/* Try first compressing with mmap. If mmap fails (minigzip used in a | |||
* pipe), use the normal fread loop. | |||
*/ | |||
@@ -129,7 +125,7 @@ void gz_compress(in, out) | |||
if (gzclose(out) != Z_OK) error("failed gzclose"); | |||
} | |||
#ifdef HAVE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */ | |||
#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */ | |||
/* Try compressing the input file at once using mmap. Return Z_OK if | |||
* if success, Z_ERRNO otherwise. | |||
@@ -164,7 +160,7 @@ int gz_compress_mmap(in, out) | |||
if (gzclose(out) != Z_OK) error("failed gzclose"); | |||
return Z_OK; | |||
} | |||
#endif /* HAVE_MMAP */ | |||
#endif /* USE_MMAP */ | |||
/* =========================================================================== | |||
* Uncompress input to output then close both files. |
@@ -8,10 +8,6 @@ | |||
#ifndef _ZCONF_H | |||
#define _ZCONF_H | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
/* | |||
* If you *really* need a unique prefix for all types and library functions, | |||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
@@ -13,10 +13,6 @@ | |||
#ifndef _Z_UTIL_H | |||
#define _Z_UTIL_H | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include "zlib.h" | |||
#ifdef STDC | |||
@@ -24,10 +20,10 @@ | |||
# include <string.h> | |||
# include <stdlib.h> | |||
#endif | |||
#ifdef HAVE_ERRNO_H | |||
# include <errno.h> | |||
#else | |||
#ifdef NO_ERRNO_H | |||
extern int errno; | |||
#else | |||
# include <errno.h> | |||
#endif | |||
#ifndef local |
@@ -1,159 +0,0 @@ | |||
dnl Process this file with autoconf to produce a configure script. | |||
AC_INIT([tightvnc], [1.5.0a1], [http://www.tightvnc.com/bugs.html]) | |||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2]) | |||
dnl Checks for programs. | |||
AM_GNU_GETTEXT([external]) | |||
AM_GNU_GETTEXT_VERSION([0.17]) | |||
AC_PROG_CC | |||
AC_PROG_CXX | |||
AC_PROG_LIBTOOL | |||
AC_PROG_MAKE_SET | |||
AC_LANG([C++]) | |||
saved_cflags="$CFLAGS" | |||
saved_cxxflags="$CXXFLAGS" | |||
CFLAGS="$CFLAGS -Wall -Wextra" | |||
CXXFLAGS="$CXXFLAGS -Wall -Wextra" | |||
AC_MSG_CHECKING([if compiler supports -Wall and -Werror flags]) | |||
AC_COMPILE_IFELSE( | |||
[AC_LANG_PROGRAM([])], | |||
[AC_MSG_RESULT([yes])], | |||
[AC_MSG_RESULT([no]) | |||
CFLAGS="$saved_cflags" | |||
CXXFLAGS="$saved_cxxflags"]) | |||
AC_SUBST([COMMON_DIR], ['$(top_srcdir)/common']) | |||
AC_SUBST([UNIX_DIR], ['$(top_srcdir)/unix']) | |||
AC_SUBST([TX_DIR], ['$(UNIX_DIR)/tx']) | |||
AC_SUBST([RFB_LIBS], ['$(COMMON_DIR)/rfb/librfb.la']) | |||
AC_SUBST([RDR_LIBS], ['$(COMMON_DIR)/rdr/librdr.la']) | |||
AC_SUBST([NETWORK_LIBS], ['$(COMMON_DIR)/network/libnetwork.la']) | |||
AC_SUBST([TX_LIBS], ['$(TX_DIR)/libtx.la']) | |||
dnl XXX this statement really bother me | |||
case "`(uname -sr) 2>/dev/null`" in | |||
"SunOS 5"*) | |||
SOLARIS=yes | |||
USE_MITSHM=yes | |||
USE_SUN_OVL=yes | |||
;; | |||
"Linux"*) | |||
LINUX=yes | |||
USE_MITSHM=yes | |||
;; | |||
"IRIX 6"*) | |||
X_LIBS="-L/usr/lib32" | |||
USE_MITSHM=yes | |||
USE_READDISPLAY=yes | |||
;; | |||
"LynxOS 2"*) | |||
SJLJ_EXCEPTIONS=yes | |||
;; | |||
esac | |||
dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option. | |||
if test "$USE_MITSHM" = yes; then | |||
AC_DEFINE([HAVE_MITSHM], 1, [Define if you have MIT-SHM extension]) | |||
fi | |||
if test "$GCC" = yes; then | |||
if test "$SOLARIS" = yes; then | |||
CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int" | |||
fi | |||
fi | |||
if test "$GXX" = yes; then | |||
if test "$SOLARIS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive" | |||
fi | |||
if test "$SJLJ_EXCEPTIONS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -fsjlj-exceptions" | |||
fi | |||
fi | |||
AC_PATH_XTRA | |||
AC_ARG_ENABLE([vncconfig], | |||
AS_HELP_STRING([--enable-vncconfig], | |||
[build the vncconfig utility(default yes)]), | |||
[BUILD_VNCCONFIG="$enableval"], [BUILD_VNCCONFIG="yes"]) | |||
AM_CONDITIONAL([VNCCONFIG], [test "x$BUILD_VNCCONFIG" = xyes]) | |||
dnl Check for the XTest X11 extension library. | |||
AC_SEARCH_LIBS([XTestGrabControl], [Xtst], | |||
[AC_DEFINE([HAVE_XTEST], [], [Define if you have Xtst library])], | |||
[AC_MSG_WARN([No XTest extension, building x0vncserver view-only])], | |||
[-lXext -lX11]) | |||
dnl Support for READDISPLAY (Irix) and SUN_OVL (Solaris) extensions | |||
dnl FIXME: Implement corresponding --with options. | |||
if test "$USE_READDISPLAY" = yes; then | |||
AC_DEFINE([HAVE_READDISPLAY], [], [Define if you have READDISPLAY extension]) | |||
elif test "$USE_SUN_OVL" = yes; then | |||
AC_DEFINE([HAVE_SUN_OVL], [], [Define if you have SUN_OVL extension]) | |||
fi | |||
dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve | |||
dnl gethostbyname, inet_addr, htons etc. Check if it's necessary. | |||
AC_SEARCH_LIBS([gethostbyname], [c bsd]) | |||
dnl Checks for IRIX-specific Compression Library. | |||
AC_SEARCH_LIBS([clQuerySchemeFromName], [cl], | |||
[AC_DEFINE([HAVE_CL], [], [Define if you have cl library]) | |||
USE_CL=yes]) | |||
AM_CONDITIONAL([CL], [test "x$USE_CL" = xyes]) | |||
dnl Checks for IRIX-specific Digital Media libraries. | |||
AC_SEARCH_LIBS([dmICCreate], [dmedia], | |||
[AC_DEFINE([HAVE_DMEDIA], [], [Define if you have dmedia library]) | |||
USE_DMEDIA=yes]) | |||
AM_CONDITIONAL([DMEDIA], [test "x$USE_DMEDIA" = xyes]) | |||
AC_CONFIG_SUBDIRS([common/zlib]) | |||
AC_SEARCH_LIBS([inflate], [z], [], | |||
[ZLIB_LIBS='$(COMMON_DIR)/zlib/libz.la' | |||
VNC_ZLIB=yes]) | |||
AM_CONDITIONAL([ZLIB], [test "x$VNC_ZLIB" = xyes]) | |||
AC_SUBST(ZLIB_LIBS) | |||
dnl AC_CONFIG_SUBDIRS([common/jpeg]) | |||
AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg], [], | |||
[JPEG_LIBS='$(COMMON_DIR)/jpeg/libjpeg.a' | |||
VNC_JPEG=yes]) | |||
AM_CONDITIONAL([JPEG], [test "x$VNC_JPEG" = xyes]) | |||
AC_SUBST(JPEG_LIBS) | |||
AC_CHECK_FUNCS_ONCE([vsnprintf strcasecmp strncasecmp]) | |||
AC_MSG_CHECKING([for socklen_t]) | |||
AC_COMPILE_IFELSE( | |||
[AC_LANG_PROGRAM( | |||
[[#include <sys/types.h> | |||
#include <sys/socket.h>]], | |||
[[socklen_t x; | |||
accept(0, 0, &x);]])], | |||
[AC_MSG_RESULT([yes]) | |||
AC_DEFINE([VNC_SOCKLEN_T], [socklen_t], [Define to socklen_t or int])], | |||
[AC_MSG_RESULT([using int]) | |||
AC_DEFINE([VNC_SOCKLEN_T], [int], [Define to socklen_t or int])]) | |||
AC_CONFIG_HEADER([config.h]) | |||
AC_CONFIG_FILES([Makefile | |||
po/Makefile.in | |||
common/Makefile | |||
common/rdr/Makefile | |||
common/network/Makefile | |||
common/Xregion/Makefile | |||
common/rfb/Makefile | |||
unix/Makefile | |||
unix/tx/Makefile | |||
unix/x0vncserver/Makefile | |||
unix/vncviewer/Makefile | |||
unix/vncconfig/Makefile | |||
unix/vncpasswd/Makefile]) | |||
AC_OUTPUT |
@@ -1 +0,0 @@ | |||
sv de |
@@ -1,366 +0,0 @@ | |||
# Makefile for PO directory in any package using GNU gettext. | |||
# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper <drepper@gnu.ai.mit.edu> | |||
# | |||
# This file can be copied and used freely without restrictions. It can | |||
# be used in projects which are not available under the GNU General Public | |||
# License but which still want to provide support for the GNU gettext | |||
# functionality. | |||
# Please note that the actual code of GNU gettext is covered by the GNU | |||
# General Public License and is *not* in the public domain. | |||
# | |||
# Origin: gettext-0.14 | |||
PACKAGE = @PACKAGE@ | |||
VERSION = @VERSION@ | |||
SHELL = /bin/sh | |||
@SET_MAKE@ | |||
srcdir = @srcdir@ | |||
top_srcdir = @top_srcdir@ | |||
VPATH = @srcdir@ | |||
prefix = @prefix@ | |||
exec_prefix = @exec_prefix@ | |||
datadir = @datadir@ | |||
localedir = $(datadir)/locale | |||
gettextsrcdir = $(datadir)/gettext/po | |||
INSTALL = @INSTALL@ | |||
INSTALL_DATA = @INSTALL_DATA@ | |||
MKINSTALLDIRS = @MKINSTALLDIRS@ | |||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) | |||
GMSGFMT = @GMSGFMT@ | |||
MSGFMT = @MSGFMT@ | |||
XGETTEXT = @XGETTEXT@ | |||
MSGMERGE = msgmerge | |||
MSGMERGE_UPDATE = @MSGMERGE@ --update | |||
MSGINIT = msginit | |||
MSGCONV = msgconv | |||
MSGFILTER = msgfilter | |||
POFILES = @POFILES@ | |||
GMOFILES = @GMOFILES@ | |||
UPDATEPOFILES = @UPDATEPOFILES@ | |||
DUMMYPOFILES = @DUMMYPOFILES@ | |||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \ | |||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) | |||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ | |||
$(POFILES) $(GMOFILES) \ | |||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) | |||
POTFILES = \ | |||
CATALOGS = @CATALOGS@ | |||
# Makevars gets inserted here. (Don't remove this line!) | |||
.SUFFIXES: | |||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update | |||
.po.mo: | |||
@echo "$(MSGFMT) -c -o $@ $<"; \ | |||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ | |||
.po.gmo: | |||
@lang=`echo $* | sed -e 's,.*/,,'`; \ | |||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ | |||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo | |||
.sin.sed: | |||
sed -e '/^#/d' $< > t-$@ | |||
mv t-$@ $@ | |||
all: all-@USE_NLS@ | |||
all-yes: stamp-po | |||
all-no: | |||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have | |||
# been loosely updated. Its purpose is that when a developer or translator | |||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, | |||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent | |||
# invocations of "make" will do nothing. This timestamp would not be necessary | |||
# if updating the $(CATALOGS) would always touch them; however, the rule for | |||
# $(POFILES) has been designed to not touch files that don't need to be | |||
# changed. | |||
stamp-po: $(srcdir)/$(DOMAIN).pot | |||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) | |||
@echo "touch stamp-po" | |||
@echo timestamp > stamp-poT | |||
@mv stamp-poT stamp-po | |||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', | |||
# otherwise packages like GCC can not be built if only parts of the source | |||
# have been downloaded. | |||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. | |||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. | |||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | |||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | |||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ | |||
--files-from=$(srcdir)/POTFILES.in \ | |||
--copyright-holder='$(COPYRIGHT_HOLDER)' \ | |||
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' | |||
test ! -f $(DOMAIN).po || { \ | |||
if test -f $(srcdir)/$(DOMAIN).pot; then \ | |||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | |||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ | |||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ | |||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ | |||
else \ | |||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ | |||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ | |||
fi; \ | |||
else \ | |||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ | |||
fi; \ | |||
} | |||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at | |||
# every "make" invocation, only create it when it is missing. | |||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. | |||
$(srcdir)/$(DOMAIN).pot: | |||
$(MAKE) $(DOMAIN).pot-update | |||
# This target rebuilds a PO file if $(DOMAIN).pot has changed. | |||
# Note that a PO file is not touched if it doesn't need to be changed. | |||
$(POFILES): $(srcdir)/$(DOMAIN).pot | |||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | |||
if test -f "$(srcdir)/$${lang}.po"; then \ | |||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ | |||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ | |||
else \ | |||
$(MAKE) $${lang}.po-create; \ | |||
fi | |||
install: install-exec install-data | |||
install-exec: | |||
install-data: install-data-@USE_NLS@ | |||
if test "$(PACKAGE)" = "gettext-tools"; then \ | |||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ | |||
for file in $(DISTFILES.common) Makevars.template; do \ | |||
$(INSTALL_DATA) $(srcdir)/$$file \ | |||
$(DESTDIR)$(gettextsrcdir)/$$file; \ | |||
done; \ | |||
for file in Makevars; do \ | |||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ | |||
done; \ | |||
else \ | |||
: ; \ | |||
fi | |||
install-data-no: all | |||
install-data-yes: all | |||
$(mkinstalldirs) $(DESTDIR)$(datadir) | |||
@catalogs='$(CATALOGS)'; \ | |||
for cat in $$catalogs; do \ | |||
cat=`basename $$cat`; \ | |||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |||
dir=$(localedir)/$$lang/LC_MESSAGES; \ | |||
$(mkinstalldirs) $(DESTDIR)$$dir; \ | |||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ | |||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ | |||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ | |||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ | |||
if test -n "$$lc"; then \ | |||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ | |||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ | |||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ | |||
for file in *; do \ | |||
if test -f $$file; then \ | |||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ | |||
fi; \ | |||
done); \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |||
else \ | |||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ | |||
:; \ | |||
else \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
fi; \ | |||
fi; \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ | |||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ | |||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ | |||
fi; \ | |||
done; \ | |||
done | |||
install-strip: install | |||
installdirs: installdirs-exec installdirs-data | |||
installdirs-exec: | |||
installdirs-data: installdirs-data-@USE_NLS@ | |||
if test "$(PACKAGE)" = "gettext-tools"; then \ | |||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ | |||
else \ | |||
: ; \ | |||
fi | |||
installdirs-data-no: | |||
installdirs-data-yes: | |||
$(mkinstalldirs) $(DESTDIR)$(datadir) | |||
@catalogs='$(CATALOGS)'; \ | |||
for cat in $$catalogs; do \ | |||
cat=`basename $$cat`; \ | |||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |||
dir=$(localedir)/$$lang/LC_MESSAGES; \ | |||
$(mkinstalldirs) $(DESTDIR)$$dir; \ | |||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ | |||
if test -n "$$lc"; then \ | |||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ | |||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ | |||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ | |||
for file in *; do \ | |||
if test -f $$file; then \ | |||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ | |||
fi; \ | |||
done); \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |||
else \ | |||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ | |||
:; \ | |||
else \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |||
fi; \ | |||
fi; \ | |||
fi; \ | |||
done; \ | |||
done | |||
# Define this as empty until I found a useful application. | |||
installcheck: | |||
uninstall: uninstall-exec uninstall-data | |||
uninstall-exec: | |||
uninstall-data: uninstall-data-@USE_NLS@ | |||
if test "$(PACKAGE)" = "gettext-tools"; then \ | |||
for file in $(DISTFILES.common) Makevars.template; do \ | |||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ | |||
done; \ | |||
else \ | |||
: ; \ | |||
fi | |||
uninstall-data-no: | |||
uninstall-data-yes: | |||
catalogs='$(CATALOGS)'; \ | |||
for cat in $$catalogs; do \ | |||
cat=`basename $$cat`; \ | |||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ | |||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |||
done; \ | |||
done | |||
check: all | |||
info dvi ps pdf html tags TAGS ctags CTAGS ID: | |||
mostlyclean: | |||
rm -f remove-potcdate.sed | |||
rm -f stamp-poT | |||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po | |||
rm -fr *.o | |||
clean: mostlyclean | |||
distclean: clean | |||
rm -f Makefile Makefile.in POTFILES *.mo | |||
maintainer-clean: distclean | |||
@echo "This command is intended for maintainers to use;" | |||
@echo "it deletes files that may require special tools to rebuild." | |||
rm -f stamp-po $(GMOFILES) | |||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | |||
dist distdir: | |||
$(MAKE) update-po | |||
@$(MAKE) dist2 | |||
# This is a separate target because 'update-po' must be executed before. | |||
dist2: $(DISTFILES) | |||
dists="$(DISTFILES)"; \ | |||
if test "$(PACKAGE)" = "gettext-tools"; then \ | |||
dists="$$dists Makevars.template"; \ | |||
fi; \ | |||
if test -f $(srcdir)/ChangeLog; then \ | |||
dists="$$dists ChangeLog"; \ | |||
fi; \ | |||
for i in 0 1 2 3 4 5 6 7 8 9; do \ | |||
if test -f $(srcdir)/ChangeLog.$$i; then \ | |||
dists="$$dists ChangeLog.$$i"; \ | |||
fi; \ | |||
done; \ | |||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ | |||
for file in $$dists; do \ | |||
if test -f $$file; then \ | |||
cp -p $$file $(distdir); \ | |||
else \ | |||
cp -p $(srcdir)/$$file $(distdir); \ | |||
fi; \ | |||
done | |||
update-po: Makefile | |||
$(MAKE) $(DOMAIN).pot-update | |||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) | |||
$(MAKE) update-gmo | |||
# General rule for creating PO files. | |||
.nop.po-create: | |||
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ | |||
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ | |||
exit 1 | |||
# General rule for updating PO files. | |||
.nop.po-update: | |||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ | |||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ | |||
tmpdir=`pwd`; \ | |||
echo "$$lang:"; \ | |||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ | |||
cd $(srcdir); \ | |||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ | |||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ | |||
rm -f $$tmpdir/$$lang.new.po; \ | |||
else \ | |||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ | |||
:; \ | |||
else \ | |||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ | |||
exit 1; \ | |||
fi; \ | |||
fi; \ | |||
else \ | |||
echo "msgmerge for $$lang.po failed!" 1>&2; \ | |||
rm -f $$tmpdir/$$lang.new.po; \ | |||
fi | |||
$(DUMMYPOFILES): | |||
update-gmo: Makefile $(GMOFILES) | |||
@: | |||
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ | |||
cd $(top_builddir) \ | |||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ | |||
$(SHELL) ./config.status | |||
force: | |||
# Tell versions [3.59,3.63) of GNU make not to export all variables. | |||
# Otherwise a system limit (for SysV at least) may be exceeded. | |||
.NOEXPORT: |
@@ -1,41 +0,0 @@ | |||
# Makefile variables for PO directory in any package using GNU gettext. | |||
# Usually the message domain is the same as the package name. | |||
DOMAIN = $(PACKAGE) | |||
# These two variables depend on the location of this directory. | |||
subdir = po | |||
top_builddir = .. | |||
# These options get passed to xgettext. | |||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --no-location | |||
# This is the copyright holder that gets inserted into the header of the | |||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding | |||
# package. (Note that the msgstr strings, extracted from the package's | |||
# sources, belong to the copyright holder of the package.) Translators are | |||
# expected to transfer the copyright for their translations to this person | |||
# or entity, or to disclaim their copyright. The empty string stands for | |||
# the public domain; in this case the translators are expected to disclaim | |||
# their copyright. | |||
COPYRIGHT_HOLDER = RealVNC Ltd, Constantin Kaplinsky, Peter Astrand, Cendio AB | |||
# This is the email address or URL to which the translators shall report | |||
# bugs in the untranslated strings: | |||
# - Strings which are not entire sentences, see the maintainer guidelines | |||
# in the GNU gettext documentation, section 'Preparing Strings'. | |||
# - Strings which use unclear terms or require additional context to be | |||
# understood. | |||
# - Strings which make invalid assumptions about notation of date, time or | |||
# money. | |||
# - Pluralisation problems. | |||
# - Incorrect English spelling. | |||
# - Incorrect formatting. | |||
# It can be your email address, or a mailing list address where translators | |||
# can write to without being subscribed, or the URL of a web page through | |||
# which the translators can contact you. | |||
MSGID_BUGS_ADDRESS = devteam@tightvnc.com | |||
# This is the list of locale categories, beyond LC_MESSAGES, for which the | |||
# message catalogs shall be used. It is usually empty. | |||
EXTRA_LOCALE_CATEGORIES = |
@@ -1,12 +0,0 @@ | |||
# vncviewer_unix | |||
unix/vncviewer/AboutDialog.h | |||
unix/vncviewer/CConn.cxx | |||
unix/vncviewer/CConn.h | |||
unix/vncviewer/DesktopWindow.cxx | |||
unix/vncviewer/DesktopWindow.h | |||
unix/vncviewer/InfoDialog.h | |||
unix/vncviewer/OptionsDialog.h | |||
unix/vncviewer/parameters.h | |||
unix/vncviewer/PasswdDialog.h | |||
unix/vncviewer/ServerDialog.h | |||
unix/vncviewer/vncviewer.cxx |
@@ -1,47 +0,0 @@ | |||
# Special Makefile rules for English message catalogs with quotation marks. | |||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot | |||
.SUFFIXES: .insert-header .po-update-en | |||
en@quot.po-create: | |||
$(MAKE) en@quot.po-update | |||
en@boldquot.po-create: | |||
$(MAKE) en@boldquot.po-update | |||
en@quot.po-update: en@quot.po-update-en | |||
en@boldquot.po-update: en@boldquot.po-update-en | |||
.insert-header.po-update-en: | |||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ | |||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ | |||
tmpdir=`pwd`; \ | |||
echo "$$lang:"; \ | |||
ll=`echo $$lang | sed -e 's/@.*//'`; \ | |||
LC_ALL=C; export LC_ALL; \ | |||
cd $(srcdir); \ | |||
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ | |||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ | |||
rm -f $$tmpdir/$$lang.new.po; \ | |||
else \ | |||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ | |||
:; \ | |||
else \ | |||
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ | |||
exit 1; \ | |||
fi; \ | |||
fi; \ | |||
else \ | |||
echo "creation of $$lang.po failed!" 1>&2; \ | |||
rm -f $$tmpdir/$$lang.new.po; \ | |||
fi | |||
en@quot.insert-header: insert-header.sin | |||
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header | |||
en@boldquot.insert-header: insert-header.sin | |||
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header | |||
mostlyclean: mostlyclean-quot | |||
mostlyclean-quot: | |||
rm -f *.insert-header |
@@ -1,10 +0,0 @@ | |||
s/"\([^"]*\)"/“\1”/g | |||
s/`\([^`']*\)'/‘\1’/g | |||
s/ '\([^`']*\)' / ‘\1’ /g | |||
s/ '\([^`']*\)'$/ ‘\1’/g | |||
s/^'\([^`']*\)' /‘\1’ /g | |||
s/“”/""/g | |||
s/“/“[1m/g | |||
s/”/[0m”/g | |||
s/‘/‘[1m/g | |||
s/’/[0m’/g |
@@ -1,191 +0,0 @@ | |||
# German translations for tightvnc package | |||
# Deutsche Übersetzung für das Tightvnc Paket | |||
# Copyright (C) 2005 RealVNC Ltd, Constantin Kaplinsky, Peter Astrand, Cendio AB | |||
# Copyright (C) 2005 Klaus Franken, StrukturPunkt | |||
# This file is distributed under the same license as the tightvnc package. | |||
# Klaus Franken <Klaus.Franken@StrukturPunkt.de>, 2005. | |||
# | |||
msgid "" | |||
msgstr "" | |||
"Project-Id-Version: tightvnc 1.5.0\n" | |||
"Report-Msgid-Bugs-To: devteam@tightvnc.com\n" | |||
"POT-Creation-Date: 2005-03-01 20:37+0100\n" | |||
"PO-Revision-Date: 2005-03-01 20:41+0100\n" | |||
"Last-Translator: Klaus Franken <Klaus.Franken@StrukturPunkt.de>\n" | |||
"Language-Team: German\n" | |||
"MIME-Version: 1.0\n" | |||
"Content-Type: text/plain; charset=ISO-8859-1\n" | |||
"Content-Transfer-Encoding: 8bit\n" | |||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | |||
msgid "About VNC Viewer" | |||
msgstr "Über VNC-Viewer" | |||
msgid "VNC authentication" | |||
msgstr "VNC Authentifizierung" | |||
msgid "Exit viewer" | |||
msgstr "Viewer beenden" | |||
msgid "Full screen" | |||
msgstr "Vollbild" | |||
msgid "Ctrl" | |||
msgstr "Strg" | |||
msgid "Alt" | |||
msgstr "Alt" | |||
#, c-format | |||
msgid "Send %s" | |||
msgstr "Sende %s" | |||
msgid "Send Ctrl-Alt-Del" | |||
msgstr "Sende Strg-Alt-Del" | |||
msgid "Refresh screen" | |||
msgstr "Bildschirm auffrischen" | |||
msgid "New connection..." | |||
msgstr "Neue Verbindung..." | |||
msgid "Options..." | |||
msgstr "Optionen..." | |||
msgid "Connection info..." | |||
msgstr "Verbindungsinformationen..." | |||
msgid "About VNCviewer..." | |||
msgstr "Über VNC-Viewer" | |||
msgid "Dismiss menu" | |||
msgstr "Menü verlassen" | |||
msgid "VNC Menu" | |||
msgstr "VNC-Menü" | |||
#, c-format | |||
msgid "" | |||
"Desktop name: %.80s\n" | |||
"Host: %.80s port: %d\n" | |||
"Size: %d x %d\n" | |||
"Pixel format: %s\n" | |||
"(server default %s)\n" | |||
"Requested encoding: %s\n" | |||
"Last used encoding: %s\n" | |||
"Line speed estimate: %d kbit/s\n" | |||
"Protocol version: %d.%d\n" | |||
"Security method: %s\n" | |||
msgstr "" | |||
"Desktopname: %.80s\n" | |||
"Host: %.80s port: %d\n" | |||
"Größe: %d x %d\n" | |||
"Pixelformat: %s\n" | |||
"(Server Standard %s)\n" | |||
"gewünschte Kodierung: %s\n" | |||
"letzte benutzte Kodierung: %s\n" | |||
"Leitungsgeschwindigkeit (geschätzt): %d kbit/s\n" | |||
"Protokollversion: %d.%d\n" | |||
"Sicherheitsmethode: %s\n" | |||
msgid "VNC connection info" | |||
msgstr "VNC Verbindungsinformation" | |||
msgid "VNC Viewer: Connection Options" | |||
msgstr "VNC-Viewer: Verbindungsoptionen" | |||
msgid "Encoding and Color Level:" | |||
msgstr "Kodierung und Farbtiefe:" | |||
msgid "Inputs:" | |||
msgstr "Eingaben:" | |||
msgid "Misc:" | |||
msgstr "Diverses:" | |||
msgid "Auto select" | |||
msgstr "automatische Auswahl" | |||
msgid "Full (all available colors)" | |||
msgstr "Voll (alle verfügbaren Farben)" | |||
msgid "Medium (256 colors)" | |||
msgstr "Mittel (256 Farben)" | |||
msgid "Low (64 colors)" | |||
msgstr "Gering (64 Farben)" | |||
msgid "Very low (8 colors)" | |||
msgstr "Sehr gering (8 Farben)" | |||
msgid "Custom compression level:" | |||
msgstr "individueller Kompressionslevel:" | |||
msgid "level (1=fast, 9=best)" | |||
msgstr "Level (1=schnell, 9=bester)" | |||
msgid "Allow JPEG compression:" | |||
msgstr "Erlaube JPEG-Kompression:" | |||
msgid "quality (1=poor, 9=best)" | |||
msgstr "Qualität (0=schlechte, 9=beste)" | |||
msgid "View only (ignore mouse & keyboard)" | |||
msgstr "nur Ansicht (ignoriere Maus und Tastatur)" | |||
msgid "Accept clipboard from server" | |||
msgstr "Akzeptiere Zwischenablage vom Server" | |||
msgid "Send clipboard to server" | |||
msgstr "Sende Zwischenablage zum Server" | |||
msgid "Send primary selection & cut buffer as clipboard" | |||
msgstr "Sende primary selection & cut buffer als Zwischenablage" | |||
msgid "Shared (don't disconnect other viewers)" | |||
msgstr "Gemeinsamer Zugriff (andere VNC-Viewer nicht trennen)" | |||
msgid "Full-screen mode" | |||
msgstr "Vollbild-Modus" | |||
msgid "Render cursor locally" | |||
msgstr "Zeige Cursor lokal" | |||
msgid "Show dot when no cursor" | |||
msgstr "Zeige Punkt wenn kein Cursor" | |||
msgid "OK" | |||
msgstr "Ok" | |||
msgid "Cancel" | |||
msgstr "Abbruch" | |||
msgid "Username:" | |||
msgstr "Benutzername:" | |||
msgid "Password:" | |||
msgstr "Passwort:" | |||
msgid "VNC Viewer: Connection Details" | |||
msgstr "VNC-Viewer: Verbindungsdetails" | |||
msgid "VNC server:" | |||
msgstr "VNC-Server:" | |||
msgid "About..." | |||
msgstr "Über..." | |||
#, c-format | |||
msgid "" | |||
"TightVNC viewer for X version 4.0 - built %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"See http://www.tightvnc.com for information on TightVNC." | |||
msgstr "" | |||
"TightVNC-Viewer für X version 4.0 - gebaut %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky.\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"Copyright (C) 2005 Klaus Franken, StrukturPunkt\n" | |||
"Siehe http://www.tightvnc.com für Informationen über TightVNC." |
@@ -1,25 +0,0 @@ | |||
# All this catalog "translates" are quotation characters. | |||
# The msgids must be ASCII and therefore cannot contain real quotation | |||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27) | |||
# and double quote (0x22). These substitutes look strange; see | |||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html | |||
# | |||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to | |||
# left single quotation mark (U+2018) and right single quotation mark (U+2019). | |||
# It also translates pairs of apostrophe (0x27) to | |||
# left single quotation mark (U+2018) and right single quotation mark (U+2019) | |||
# and pairs of quotation mark (0x22) to | |||
# left double quotation mark (U+201C) and right double quotation mark (U+201D). | |||
# | |||
# When output to an UTF-8 terminal, the quotation characters appear perfectly. | |||
# When output to an ISO-8859-1 terminal, the single quotation marks are | |||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to | |||
# grave/acute accent (by libiconv), and the double quotation marks are | |||
# transliterated to 0x22. | |||
# When output to an ASCII terminal, the single quotation marks are | |||
# transliterated to apostrophes, and the double quotation marks are | |||
# transliterated to 0x22. | |||
# | |||
# This catalog furthermore displays the text between the quotation marks in | |||
# bold face, assuming the VT100/XTerm escape sequences. | |||
# |
@@ -1,22 +0,0 @@ | |||
# All this catalog "translates" are quotation characters. | |||
# The msgids must be ASCII and therefore cannot contain real quotation | |||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27) | |||
# and double quote (0x22). These substitutes look strange; see | |||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html | |||
# | |||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to | |||
# left single quotation mark (U+2018) and right single quotation mark (U+2019). | |||
# It also translates pairs of apostrophe (0x27) to | |||
# left single quotation mark (U+2018) and right single quotation mark (U+2019) | |||
# and pairs of quotation mark (0x22) to | |||
# left double quotation mark (U+201C) and right double quotation mark (U+201D). | |||
# | |||
# When output to an UTF-8 terminal, the quotation characters appear perfectly. | |||
# When output to an ISO-8859-1 terminal, the single quotation marks are | |||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to | |||
# grave/acute accent (by libiconv), and the double quotation marks are | |||
# transliterated to 0x22. | |||
# When output to an ASCII terminal, the single quotation marks are | |||
# transliterated to apostrophes, and the double quotation marks are | |||
# transliterated to 0x22. | |||
# |
@@ -1,23 +0,0 @@ | |||
# Sed script that inserts the file called HEADER before the header entry. | |||
# | |||
# At each occurrence of a line starting with "msgid ", we execute the following | |||
# commands. At the first occurrence, insert the file. At the following | |||
# occurrences, do nothing. The distinction between the first and the following | |||
# occurrences is achieved by looking at the hold space. | |||
/^msgid /{ | |||
x | |||
# Test if the hold space is empty. | |||
s/m/m/ | |||
ta | |||
# Yes it was empty. First occurrence. Read the file. | |||
r HEADER | |||
# Output the file's contents by reading the next line. But don't lose the | |||
# current line while doing this. | |||
g | |||
N | |||
bb | |||
:a | |||
# The hold space was nonempty. Following occurrences. Do nothing. | |||
x | |||
:b | |||
} |
@@ -1,6 +0,0 @@ | |||
s/"\([^"]*\)"/“\1”/g | |||
s/`\([^`']*\)'/‘\1’/g | |||
s/ '\([^`']*\)' / ‘\1’ /g | |||
s/ '\([^`']*\)'$/ ‘\1’/g | |||
s/^'\([^`']*\)' /‘\1’ /g | |||
s/“”/""/g |
@@ -1,19 +0,0 @@ | |||
# Sed script that remove the POT-Creation-Date line in the header entry | |||
# from a POT file. | |||
# | |||
# The distinction between the first and the following occurrences of the | |||
# pattern is achieved by looking at the hold space. | |||
/^"POT-Creation-Date: .*"$/{ | |||
x | |||
# Test if the hold space is empty. | |||
s/P/P/ | |||
ta | |||
# Yes it was empty. First occurrence. Remove the line. | |||
g | |||
d | |||
bb | |||
:a | |||
# The hold space was nonempty. Following occurrences. Do nothing. | |||
x | |||
:b | |||
} |
@@ -1,188 +0,0 @@ | |||
# Russian translation for tightvnc package | |||
# òÕÓÓËÉÊ ÐÅÒÅ×ÏÄ ÐÁËÅÔÁ tightvnc | |||
# Copyright (C) 2005 RealVNC Ltd, Constantin Kaplinsky, Peter Astrand, Cendio AB | |||
# This file is distributed under the same license as the tightvnc package. | |||
# Constantin Kaplinsky <const@tightvnc.com>, 2006. | |||
# | |||
msgid "" | |||
msgstr "" | |||
"Project-Id-Version: tightvnc 1.5.0\n" | |||
"Report-Msgid-Bugs-To: devteam@tightvnc.com\n" | |||
"POT-Creation-Date: 2005-03-01 20:37+0100\n" | |||
"PO-Revision-Date: 2006-04-13 20:13+0700\n" | |||
"Last-Translator: Constantin Kaplinsky <const@tightvnc.com>\n" | |||
"Language-Team: Russian\n" | |||
"MIME-Version: 1.0\n" | |||
"Content-Type: text/plain; charset=KOI8-R\n" | |||
"Content-Transfer-Encoding: 8bit\n" | |||
msgid "About VNC Viewer" | |||
msgstr "ï VNC Viewer" | |||
msgid "VNC authentication" | |||
msgstr "áÕÔÅÎÔÉÆÉËÁÃÉÑ VNC" | |||
msgid "Exit viewer" | |||
msgstr "÷ÙÈÏÄ" | |||
msgid "Full screen" | |||
msgstr "ðÏÌÎÏÜËÒÁÎÎÙÊ ÒÅÖÉÍ" | |||
msgid "Ctrl" | |||
msgstr "Ctrl" | |||
msgid "Alt" | |||
msgstr "Alt" | |||
#, c-format | |||
msgid "Send %s" | |||
msgstr "ðÏÓÌÁÔØ %s" | |||
msgid "Send Ctrl-Alt-Del" | |||
msgstr "ðÏÓÌÁÔØ Ctrl-Alt-Del" | |||
msgid "Refresh screen" | |||
msgstr "ïÂÎÏ×ÉÔØ ÜËÒÁÎ" | |||
msgid "New connection..." | |||
msgstr "îÏ×ÏÅ ÓÏÅÄÉÎÅÎÉÅ..." | |||
msgid "Options..." | |||
msgstr "ðÁÒÁÍÅÔÒÙ..." | |||
msgid "Connection info..." | |||
msgstr "éÎÆÏÒÍÁÃÉÑ Ï ÓÏÅÄÉÎÅÎÉÉ..." | |||
msgid "About VNCviewer..." | |||
msgstr "ï VNC Viewer..." | |||
msgid "Dismiss menu" | |||
msgstr "úÁËÒÙÔØ ÍÅÎÀ" | |||
msgid "VNC Menu" | |||
msgstr "íÅÎÀ VNC" | |||
#, c-format | |||
msgid "" | |||
"Desktop name: %.80s\n" | |||
"Host: %.80s port: %d\n" | |||
"Size: %d x %d\n" | |||
"Pixel format: %s\n" | |||
"(server default %s)\n" | |||
"Requested encoding: %s\n" | |||
"Last used encoding: %s\n" | |||
"Line speed estimate: %d kbit/s\n" | |||
"Protocol version: %d.%d\n" | |||
"Security method: %s\n" | |||
msgstr "" | |||
"éÍÑ ÓÅÁÎÓÁ: %.80s\n" | |||
"íÁÛÉÎÁ: %.80s ÐÏÒÔ: %d\n" | |||
"òÁÚÍÅÒ: %d x %d\n" | |||
"æÏÒÍÁÔ Ã×ÅÔÁ: %s\n" | |||
"(ÚÎÁÞÅÎÉÅ ÓÅÒ×ÅÒÁ %s)\n" | |||
"úÁÐÒÏÛÅÎÎÁÑ ÓÈÅÍÁ ËÏÄÉÒÏ×ÁÎÉÑ: %s\n" | |||
"ðÏÓÌÅÄÎÑÑ ÓÈÅÍÁ ËÏÄÉÒÏ×ÁÎÉÑ: %s\n" | |||
"óËÏÒÏÓÔØ ÌÉÎÉÉ Ó×ÑÚÉ: %d ËÂÉÔ/Ó\n" | |||
"÷ÅÒÓÉÑ ÐÒÏÔÏËÏÌÁ: %d.%d\n" | |||
"óÈÅÍÁ ÂÅÚÏÐÁÓÎÏÓÔÉ: %s\n" | |||
msgid "VNC connection info" | |||
msgstr "éÎÆÏÒÍÁÃÉÑ Ï ÓÏÅÄÉÎÅÎÉÉ VNC" | |||
msgid "VNC Viewer: Connection Options" | |||
msgstr "VNC Viewer: ÐÁÒÁÍÅÔÒÙ ÓÏÅÄÉÎÅÎÉÑ" | |||
msgid "Encoding and Color Level:" | |||
msgstr "ëÏÄÉÒÏ×ÁÎÉÅ É Ã×ÅÔÏ×ÏÊ ÒÅÖÉÍ:" | |||
msgid "Inputs:" | |||
msgstr "÷×ÏÄ:" | |||
msgid "Misc:" | |||
msgstr "òÁÚÎÏÅ:" | |||
msgid "Auto select" | |||
msgstr "á×ÔÏÍÁÔÉÞÅÓËÉÊ ×ÙÂÏÒ" | |||
msgid "Full (all available colors)" | |||
msgstr "íÎÏÇÏÃ×ÅÔÎÙÊ ÒÅÖÉÍ (×ÓÅ ÄÏÓÔÕÐÎÙÅ Ã×ÅÔÁ)" | |||
msgid "Medium (256 colors)" | |||
msgstr "óÒÅÄÎÅÅ ËÁÞÅÓÔ×Ï Ã×ÅÔÁ (256 Ã×ÅÔÏ×)" | |||
msgid "Low (64 colors)" | |||
msgstr "îÉÚËÏÅ ËÁÞÅÓÔ×Ï Ã×ÅÔÁ (64 Ã×ÅÔÁ)" | |||
msgid "Very low (8 colors)" | |||
msgstr "íÉÎÉÍÕÍ Ã×ÅÔÁ (8 Ã×ÅÔÏ×)" | |||
msgid "Custom compression level:" | |||
msgstr "îÅÓÔÁÎÄÁÒÔÎÙÊ ÕÒÏ×ÅÎØ ÓÖÁÔÉÑ:" | |||
msgid "level (1=fast, 9=best)" | |||
msgstr "ÕÒÏ×ÅÎØ (1=ÂÙÓÔÒÏ, 9=ÍÁËÓ.ÓÖÁÔÉÅ)" | |||
msgid "Allow JPEG compression:" | |||
msgstr "òÁÚÒÅÛÉÔØ ÓÖÁÔÉÅ JPEG:" | |||
msgid "quality (1=poor, 9=best)" | |||
msgstr "ËÁÞÅÓÔ×Ï (1=ÎÉÚËÏÅ, 9=ÎÁÉÌÕÞÛÅÅ)" | |||
msgid "View only (ignore mouse & keyboard)" | |||
msgstr "ôÏÌØËÏ ÐÒÏÓÍÏÔÒ (ÉÇÎÏÒÉÒÏ×ÁÔØ ÍÙÛØ É ËÌÁ×ÉÁÔÕÒÕ)" | |||
msgid "Accept clipboard from server" | |||
msgstr "ðÒÉÎÉÍÁÔØ ÂÕÆÅÒ ÏÂÍÅÎÁ Ó ÓÅÒ×ÅÒÁ" | |||
msgid "Send clipboard to server" | |||
msgstr "ðÏÓÙÌÁÔØ ÂÕÆÅÒ ÏÂÍÅÎÁ ÎÁ ÓÅÒ×ÅÒ" | |||
msgid "Send primary selection & cut buffer as clipboard" | |||
msgstr "ðÏÓÙÌÁÔØ \"primary selection\" É \"cut buffer\" ËÁË ÂÕÆÅÒ ÏÂÍÅÎÁ" | |||
msgid "Shared (don't disconnect other viewers)" | |||
msgstr "òÁÚÄÅÌÑÅÍÙÊ ÒÅÖÉÍ (ÎÅ ÏÔËÌÀÞÁÔØ ÄÒÕÇÉÈ ËÌÉÅÎÔÏ×)" | |||
msgid "Full-screen mode" | |||
msgstr "ðÏÌÎÏÜËÒÁÎÎÙÊ ÒÅÖÉÍ" | |||
msgid "Render cursor locally" | |||
msgstr "òÉÓÏ×ÁÔØ ËÕÒÓÏÒ ÌÏËÁÌØÎÏ" | |||
msgid "Show dot when no cursor" | |||
msgstr "ðÏËÁÚÙ×ÁÔØ ÔÏÞËÕ ÐÒÉ ÏÔÓÕÔÓÔ×ÉÉ ËÕÒÓÏÒÁ" | |||
msgid "OK" | |||
msgstr "OK" | |||
msgid "Cancel" | |||
msgstr "ïÔÍÅÎÁ" | |||
msgid "Username:" | |||
msgstr "éÍÑ ÐÏÌØÚÏ×ÁÔÅÌÑ:" | |||
msgid "Password:" | |||
msgstr "ðÁÒÏÌØ:" | |||
msgid "VNC Viewer: Connection Details" | |||
msgstr "VNC Viewer: ÄÅÔÁÌÉ ÓÏÅÄÉÎÅÎÉÑ" | |||
msgid "VNC server:" | |||
msgstr "óÅÒ×ÅÒ VNC:" | |||
msgid "About..." | |||
msgstr "ï ÐÒÏÇÒÁÍÍÅ..." | |||
#, c-format | |||
msgid "" | |||
"TightVNC viewer for X version 4.0 - built %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"See http://www.tightvnc.com for information on TightVNC." | |||
msgstr "" | |||
"TightVNC viewer ÄÌÑ X, ×ÅÒÓÉÑ 4.0 - ×ÒÅÍÑ ÓÂÏÒËÉ %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 ëÏÎÓÔÁÎÔÉÎ ëÁÐÌÉÎÓËÉÊ\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"éÝÉÔÅ ÉÎÆÏÒÍÁÃÉÀ Ï TightVNC ÎÁ ÓÁÊÔÅ http://www.tightvnc.com" |
@@ -1,189 +0,0 @@ | |||
# Swedish translations for tightvnc package | |||
# Svenska översättningar för paket tightvnc. | |||
# Copyright (C) 2005 RealVNC Ltd, Constantin Kaplinsky, Peter Astrand, Cendio AB | |||
# This file is distributed under the same license as the tightvnc package. | |||
# Peter Astrand <astrand@cendio.se>, 2005. | |||
# | |||
msgid "" | |||
msgstr "" | |||
"Project-Id-Version: tightvnc 1.5.0\n" | |||
"Report-Msgid-Bugs-To: devteam@tightvnc.com\n" | |||
"POT-Creation-Date: 2005-03-01 20:37+0100\n" | |||
"PO-Revision-Date: 2005-03-01 20:39+0100\n" | |||
"Last-Translator: Peter Astrand <astrand@cendio.se>\n" | |||
"Language-Team: Swedish\n" | |||
"MIME-Version: 1.0\n" | |||
"Content-Type: text/plain; charset=ISO-8859-1\n" | |||
"Content-Transfer-Encoding: 8bit\n" | |||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | |||
msgid "About VNC Viewer" | |||
msgstr "Om VNC-visaren" | |||
msgid "VNC authentication" | |||
msgstr "VNC-autentisering" | |||
msgid "Exit viewer" | |||
msgstr "Avsluta visaren" | |||
msgid "Full screen" | |||
msgstr "Fullskärm" | |||
msgid "Ctrl" | |||
msgstr "Ctrl" | |||
msgid "Alt" | |||
msgstr "Alt" | |||
#, c-format | |||
msgid "Send %s" | |||
msgstr "Skicka %s" | |||
msgid "Send Ctrl-Alt-Del" | |||
msgstr "Skicka Ctrl-Alt-Del" | |||
msgid "Refresh screen" | |||
msgstr "Uppdatera skärm" | |||
msgid "New connection..." | |||
msgstr "Ny anslutning..." | |||
msgid "Options..." | |||
msgstr "Inställningar..." | |||
msgid "Connection info..." | |||
msgstr "Information om anslutningen..." | |||
msgid "About VNCviewer..." | |||
msgstr "Om VNC-visaren..." | |||
msgid "Dismiss menu" | |||
msgstr "Stäng meny" | |||
msgid "VNC Menu" | |||
msgstr "VNC-meny" | |||
#, c-format | |||
msgid "" | |||
"Desktop name: %.80s\n" | |||
"Host: %.80s port: %d\n" | |||
"Size: %d x %d\n" | |||
"Pixel format: %s\n" | |||
"(server default %s)\n" | |||
"Requested encoding: %s\n" | |||
"Last used encoding: %s\n" | |||
"Line speed estimate: %d kbit/s\n" | |||
"Protocol version: %d.%d\n" | |||
"Security method: %s\n" | |||
msgstr "" | |||
"Skrivbordsnamn: %.80s\n" | |||
"Värd: %.80s port: %d\n" | |||
"Storlek: %d x %d\n" | |||
"Pixelformat: %s\n" | |||
"(serverstandard %s)\n" | |||
"Begärd kodning: %s\n" | |||
"Senast använd kodning: %s\n" | |||
"Uppskattad hastighet på förbindelsen: %d kbit/s\n" | |||
"Protokollversion: %d.%d\n" | |||
"Säkerhetsmetod: %s\n" | |||
msgid "VNC connection info" | |||
msgstr "VNC anslutningsinformation" | |||
msgid "VNC Viewer: Connection Options" | |||
msgstr "VNC-visare: Anslutningsalternativ" | |||
msgid "Encoding and Color Level:" | |||
msgstr "Kodning och färgnivå:" | |||
msgid "Inputs:" | |||
msgstr "Inmatning:" | |||
msgid "Misc:" | |||
msgstr "Diverse:" | |||
msgid "Auto select" | |||
msgstr "Automatiskt val" | |||
msgid "Full (all available colors)" | |||
msgstr "Full (alla tillgängliga färger)" | |||
msgid "Medium (256 colors)" | |||
msgstr "Medium (256 färger)" | |||
msgid "Low (64 colors)" | |||
msgstr "Låg (64 färger)" | |||
msgid "Very low (8 colors)" | |||
msgstr "Mycket låg (8 färger)" | |||
msgid "Custom compression level:" | |||
msgstr "Anpassad kompressionsnivå:" | |||
msgid "level (1=fast, 9=best)" | |||
msgstr "nivå (1=snabb, 9=bäst)" | |||
msgid "Allow JPEG compression:" | |||
msgstr "Tillåt JPEG-kompression:" | |||
msgid "quality (1=poor, 9=best)" | |||
msgstr "kvalitet (0=dålig, 9=bäst)" | |||
msgid "View only (ignore mouse & keyboard)" | |||
msgstr "Endast visning (ignorera mus och tangentbord)" | |||
msgid "Accept clipboard from server" | |||
msgstr "Acceptera urklipp från server" | |||
msgid "Send clipboard to server" | |||
msgstr "Skicka urklipp till server" | |||
msgid "Send primary selection & cut buffer as clipboard" | |||
msgstr "Skicka PRIMARY och CUT_BUFFER som urklipp" | |||
msgid "Shared (don't disconnect other viewers)" | |||
msgstr "Delad (koppla ej från andra visare)" | |||
msgid "Full-screen mode" | |||
msgstr "Fullskärmsläge" | |||
msgid "Render cursor locally" | |||
msgstr "Hantera muspekaren lokalt" | |||
msgid "Show dot when no cursor" | |||
msgstr "Visa punkt när muspekare saknas" | |||
msgid "OK" | |||
msgstr "Ok" | |||
msgid "Cancel" | |||
msgstr "Avbryt" | |||
msgid "Username:" | |||
msgstr "Användarnamn:" | |||
msgid "Password:" | |||
msgstr "Lösenord:" | |||
msgid "VNC Viewer: Connection Details" | |||
msgstr "VNC-visare: Anslutningsdetaljer" | |||
msgid "VNC server:" | |||
msgstr "VNC-server:" | |||
msgid "About..." | |||
msgstr "Om..." | |||
#, c-format | |||
msgid "" | |||
"TightVNC viewer for X version 4.0 - built %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"See http://www.tightvnc.com for information on TightVNC." | |||
msgstr "" | |||
"TightVNC-visare för X version 4.0 - byggd %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky.\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"Se http://www.tightvnc.com för information om TightVNC." |
@@ -1,173 +0,0 @@ | |||
# SOME DESCRIPTIVE TITLE. | |||
# Copyright (C) YEAR RealVNC Ltd, Constantin Kaplinsky, Peter Astrand, Cendio AB | |||
# This file is distributed under the same license as the PACKAGE package. | |||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |||
# | |||
#, fuzzy | |||
msgid "" | |||
msgstr "" | |||
"Project-Id-Version: PACKAGE VERSION\n" | |||
"Report-Msgid-Bugs-To: devteam@tightvnc.com\n" | |||
"POT-Creation-Date: 2005-03-01 20:37+0100\n" | |||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |||
"Language-Team: LANGUAGE <LL@li.org>\n" | |||
"MIME-Version: 1.0\n" | |||
"Content-Type: text/plain; charset=CHARSET\n" | |||
"Content-Transfer-Encoding: 8bit\n" | |||
msgid "About VNC Viewer" | |||
msgstr "" | |||
msgid "VNC authentication" | |||
msgstr "" | |||
msgid "Exit viewer" | |||
msgstr "" | |||
msgid "Full screen" | |||
msgstr "" | |||
msgid "Ctrl" | |||
msgstr "" | |||
msgid "Alt" | |||
msgstr "" | |||
#, c-format | |||
msgid "Send %s" | |||
msgstr "" | |||
msgid "Send Ctrl-Alt-Del" | |||
msgstr "" | |||
msgid "Refresh screen" | |||
msgstr "" | |||
msgid "New connection..." | |||
msgstr "" | |||
msgid "Options..." | |||
msgstr "" | |||
msgid "Connection info..." | |||
msgstr "" | |||
msgid "About VNCviewer..." | |||
msgstr "" | |||
msgid "Dismiss menu" | |||
msgstr "" | |||
msgid "VNC Menu" | |||
msgstr "" | |||
#, c-format | |||
msgid "" | |||
"Desktop name: %.80s\n" | |||
"Host: %.80s port: %d\n" | |||
"Size: %d x %d\n" | |||
"Pixel format: %s\n" | |||
"(server default %s)\n" | |||
"Requested encoding: %s\n" | |||
"Last used encoding: %s\n" | |||
"Line speed estimate: %d kbit/s\n" | |||
"Protocol version: %d.%d\n" | |||
"Security method: %s\n" | |||
msgstr "" | |||
msgid "VNC connection info" | |||
msgstr "" | |||
msgid "VNC Viewer: Connection Options" | |||
msgstr "" | |||
msgid "Encoding and Color Level:" | |||
msgstr "" | |||
msgid "Inputs:" | |||
msgstr "" | |||
msgid "Misc:" | |||
msgstr "" | |||
msgid "Auto select" | |||
msgstr "" | |||
msgid "Full (all available colors)" | |||
msgstr "" | |||
msgid "Medium (256 colors)" | |||
msgstr "" | |||
msgid "Low (64 colors)" | |||
msgstr "" | |||
msgid "Very low (8 colors)" | |||
msgstr "" | |||
msgid "Custom compression level:" | |||
msgstr "" | |||
msgid "level (1=fast, 9=best)" | |||
msgstr "" | |||
msgid "Allow JPEG compression:" | |||
msgstr "" | |||
msgid "quality (1=poor, 9=best)" | |||
msgstr "" | |||
msgid "View only (ignore mouse & keyboard)" | |||
msgstr "" | |||
msgid "Accept clipboard from server" | |||
msgstr "" | |||
msgid "Send clipboard to server" | |||
msgstr "" | |||
msgid "Send primary selection & cut buffer as clipboard" | |||
msgstr "" | |||
msgid "Shared (don't disconnect other viewers)" | |||
msgstr "" | |||
msgid "Full-screen mode" | |||
msgstr "" | |||
msgid "Render cursor locally" | |||
msgstr "" | |||
msgid "Show dot when no cursor" | |||
msgstr "" | |||
msgid "OK" | |||
msgstr "" | |||
msgid "Cancel" | |||
msgstr "" | |||
msgid "Username:" | |||
msgstr "" | |||
msgid "Password:" | |||
msgstr "" | |||
msgid "VNC Viewer: Connection Details" | |||
msgstr "" | |||
msgid "VNC server:" | |||
msgstr "" | |||
msgid "About..." | |||
msgstr "" | |||
#, c-format | |||
msgid "" | |||
"TightVNC viewer for X version 4.0 - built %s\n" | |||
"Copyright (C) 2002-2004 RealVNC Ltd.\n" | |||
"Copyright (C) 2000-2004 Constantin Kaplinsky\n" | |||
"Copyright (C) 2004-2005 Peter Astrand, Cendio AB\n" | |||
"See http://www.tightvnc.com for information on TightVNC." | |||
msgstr "" |
@@ -0,0 +1,768 @@ | |||
Notes on the Free Translation Project | |||
************************************* | |||
Free software is going international! The Free Translation Project is | |||
a way to get maintainers of free software, translators, and users all | |||
together, so that will gradually become able to speak many languages. | |||
A few packages already provide translations for their messages. | |||
If you found this `ABOUT-NLS' file inside a distribution, you may | |||
assume that the distributed package does use GNU `gettext' internally, | |||
itself available at your nearest GNU archive site. But you do _not_ | |||
need to install GNU `gettext' prior to configuring, installing or using | |||
this package with messages translated. | |||
Installers will find here some useful hints. These notes also | |||
explain how users should proceed for getting the programs to use the | |||
available translations. They tell how people wanting to contribute and | |||
work at translations should contact the appropriate team. | |||
When reporting bugs in the `intl/' directory or bugs which may be | |||
related to internationalization, you should tell about the version of | |||
`gettext' which is used. The information can be found in the | |||
`intl/VERSION' file, in internationalized packages. | |||
Quick configuration advice | |||
========================== | |||
If you want to exploit the full power of internationalization, you | |||
should configure it using | |||
./configure --with-included-gettext | |||
to force usage of internationalizing routines provided within this | |||
package, despite the existence of internationalizing capabilities in the | |||
operating system where this package is being installed. So far, only | |||
the `gettext' implementation in the GNU C library version 2 provides as | |||
many features (such as locale alias, message inheritance, automatic | |||
charset conversion or plural form handling) as the implementation here. | |||
It is also not possible to offer this additional functionality on top | |||
of a `catgets' implementation. Future versions of GNU `gettext' will | |||
very likely convey even more functionality. So it might be a good idea | |||
to change to GNU `gettext' as soon as possible. | |||
So you need _not_ provide this option if you are using GNU libc 2 or | |||
you have installed a recent copy of the GNU gettext package with the | |||
included `libintl'. | |||
INSTALL Matters | |||
=============== | |||
Some packages are "localizable" when properly installed; the programs | |||
they contain can be made to speak your own native language. Most such | |||
packages use GNU `gettext'. Other packages have their own ways to | |||
internationalization, predating GNU `gettext'. | |||
By default, this package will be installed to allow translation of | |||
messages. It will automatically detect whether the system already | |||
provides the GNU `gettext' functions. If not, the GNU `gettext' own | |||
library will be used. This library is wholly contained within this | |||
package, usually in the `intl/' subdirectory, so prior installation of | |||
the GNU `gettext' package is _not_ required. Installers may use | |||
special options at configuration time for changing the default | |||
behaviour. The commands: | |||
./configure --with-included-gettext | |||
./configure --disable-nls | |||
will respectively bypass any pre-existing `gettext' to use the | |||
internationalizing routines provided within this package, or else, | |||
_totally_ disable translation of messages. | |||
When you already have GNU `gettext' installed on your system and run | |||
configure without an option for your new package, `configure' will | |||
probably detect the previously built and installed `libintl.a' file and | |||
will decide to use this. This might be not what is desirable. You | |||
should use the more recent version of the GNU `gettext' library. I.e. | |||
if the file `intl/VERSION' shows that the library which comes with this | |||
package is more recent, you should use | |||
./configure --with-included-gettext | |||
to prevent auto-detection. | |||
The configuration process will not test for the `catgets' function | |||
and therefore it will not be used. The reason is that even an | |||
emulation of `gettext' on top of `catgets' could not provide all the | |||
extensions of the GNU `gettext' library. | |||
Internationalized packages have usually many `po/LL.po' files, where | |||
LL gives an ISO 639 two-letter code identifying the language. Unless | |||
translations have been forbidden at `configure' time by using the | |||
`--disable-nls' switch, all available translations are installed | |||
together with the package. However, the environment variable `LINGUAS' | |||
may be set, prior to configuration, to limit the installed set. | |||
`LINGUAS' should then contain a space separated list of two-letter | |||
codes, stating which languages are allowed. | |||
Using This Package | |||
================== | |||
As a user, if your language has been installed for this package, you | |||
only have to set the `LANG' environment variable to the appropriate | |||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, | |||
and `CC' is an ISO 3166 two-letter country code. For example, let's | |||
suppose that you speak German and live in Germany. At the shell | |||
prompt, merely execute `setenv LANG de_DE' (in `csh'), | |||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). | |||
This can be done from your `.login' or `.profile' file, once and for | |||
all. | |||
You might think that the country code specification is redundant. | |||
But in fact, some languages have dialects in different countries. For | |||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The | |||
country code serves to distinguish the dialects. | |||
The locale naming convention of `LL_CC', with `LL' denoting the | |||
language and `CC' denoting the country, is the one use on systems based | |||
on GNU libc. On other systems, some variations of this scheme are | |||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of | |||
locales supported by your system for your country by running the command | |||
`locale -a | grep '^LL''. | |||
Not all programs have translations for all languages. By default, an | |||
English message is shown in place of a nonexistent translation. If you | |||
understand other languages, you can set up a priority list of languages. | |||
This is done through a different environment variable, called | |||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' | |||
for the purpose of message handling, but you still need to have `LANG' | |||
set to the primary language; this is required by other parts of the | |||
system libraries. For example, some Swedish users who would rather | |||
read translations in German than English for when Swedish is not | |||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. | |||
Special advice for Norwegian users: The language code for Norwegian | |||
bokma*l changed from `no' to `nb' recently (in 2003). During the | |||
transition period, while some message catalogs for this language are | |||
installed under `nb' and some older ones under `no', it's recommended | |||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and | |||
older translations are used. | |||
In the `LANGUAGE' environment variable, but not in the `LANG' | |||
environment variable, `LL_CC' combinations can be abbreviated as `LL' | |||
to denote the language's main dialect. For example, `de' is equivalent | |||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' | |||
(Portuguese as spoken in Portugal) in this context. | |||
Translating Teams | |||
================= | |||
For the Free Translation Project to be a success, we need interested | |||
people who like their own language and write it well, and who are also | |||
able to synergize with other translators speaking the same language. | |||
Each translation team has its own mailing list. The up-to-date list of | |||
teams can be found at the Free Translation Project's homepage, | |||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" | |||
area. | |||
If you'd like to volunteer to _work_ at translating messages, you | |||
should become a member of the translating team for your own language. | |||
The subscribing address is _not_ the same as the list itself, it has | |||
`-request' appended. For example, speakers of Swedish can send a | |||
message to `sv-request@li.org', having this message body: | |||
subscribe | |||
Keep in mind that team members are expected to participate | |||
_actively_ in translations, or at solving translational difficulties, | |||
rather than merely lurking around. If your team does not exist yet and | |||
you want to start one, or if you are unsure about what to do or how to | |||
get started, please write to `translation@iro.umontreal.ca' to reach the | |||
coordinator for all translator teams. | |||
The English team is special. It works at improving and uniformizing | |||
the terminology in use. Proven linguistic skill are praised more than | |||
programming skill, here. | |||
Available Packages | |||
================== | |||
Languages are not equally supported in all packages. The following | |||
matrix shows the current state of internationalization, as of January | |||
2004. The matrix shows, in regard of each package, for which languages | |||
PO files have been submitted to translation coordination, with a | |||
translation percentage of at least 50%. | |||
Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es | |||
+----------------------------------------------------+ | |||
a2ps | [] [] [] [] | | |||
aegis | () | | |||
ant-phone | () | | |||
anubis | | | |||
ap-utils | | | |||
aspell | [] | | |||
bash | [] [] [] [] | | |||
batchelor | | | |||
bfd | [] [] | | |||
binutils | [] [] | | |||
bison | [] [] [] | | |||
bluez-pin | [] [] [] | | |||
clisp | | | |||
clisp | [] [] [] | | |||
console-tools | [] [] | | |||
coreutils | [] [] [] [] | | |||
cpio | [] [] [] | | |||
darkstat | [] () [] | | |||
diffutils | [] [] [] [] [] [] [] | | |||
e2fsprogs | [] [] [] | | |||
enscript | [] [] [] [] | | |||
error | [] [] [] [] [] | | |||
fetchmail | [] () [] [] [] [] | | |||
fileutils | [] [] [] | | |||
findutils | [] [] [] [] [] [] [] | | |||
flex | [] [] [] [] | | |||
fslint | | | |||
gas | [] | | |||
gawk | [] [] [] [] | | |||
gbiff | [] | | |||
gcal | [] | | |||
gcc | [] [] | | |||
gettext | [] [] [] [] [] | | |||
gettext-examples | [] [] [] [] | | |||
gettext-runtime | [] [] [] [] [] | | |||
gettext-tools | [] [] [] | | |||
gimp-print | [] [] [] [] [] | | |||
gliv | | | |||
glunarclock | [] [] | | |||
gnubiff | [] | | |||
gnucash | [] () [] [] | | |||
gnucash-glossary | [] () [] | | |||
gnupg | [] () [] [] [] [] | | |||
gpe-aerial | [] | | |||
gpe-beam | [] [] | | |||
gpe-calendar | [] [] | | |||
gpe-clock | [] [] | | |||
gpe-conf | [] [] | | |||
gpe-contacts | [] [] | | |||
gpe-edit | [] | | |||
gpe-go | [] | | |||
gpe-login | [] [] | | |||
gpe-ownerinfo | [] [] | | |||
gpe-sketchbook | [] [] | | |||
gpe-su | [] [] | | |||
gpe-taskmanager | [] [] | | |||
gpe-timesheet | [] | | |||
gpe-today | [] [] | | |||
gpe-todo | [] [] | | |||
gphoto2 | [] [] [] [] | | |||
gprof | [] [] [] | | |||
gpsdrive | () () () | | |||
gramadoir | [] | | |||
grep | [] [] [] [] [] [] | | |||
gretl | [] | | |||
gtick | [] () | | |||
hello | [] [] [] [] [] [] | | |||
id-utils | [] [] | | |||
indent | [] [] [] [] | | |||
iso_3166 | [] [] [] [] [] [] [] [] [] [] | | |||
iso_3166_1 | [] [] [] [] [] [] | | |||
iso_3166_2 | | | |||
iso_3166_3 | [] | | |||
iso_4217 | [] [] [] [] | | |||
iso_639 | | | |||
jpilot | [] [] [] | | |||
jtag | | | |||
jwhois | [] | | |||
kbd | [] [] [] [] [] | | |||
latrine | () | | |||
ld | [] [] | | |||
libc | [] [] [] [] [] [] | | |||
libgpewidget | [] [] | | |||
libiconv | [] [] [] [] [] | | |||
lifelines | [] () | | |||
lilypond | [] | | |||
lingoteach | | | |||
lingoteach_lessons | () () | | |||
lynx | [] [] [] [] | | |||
m4 | [] [] [] [] | | |||
mailutils | [] [] | | |||
make | [] [] [] | | |||
man-db | [] () [] [] () | | |||
minicom | [] [] [] | | |||
mysecretdiary | [] [] [] | | |||
nano | [] () [] [] [] | | |||
nano_1_0 | [] () [] [] [] | | |||
opcodes | [] | | |||
parted | [] [] [] [] [] | | |||
ptx | [] [] [] [] [] | | |||
python | | | |||
radius | [] | | |||
recode | [] [] [] [] [] [] [] | | |||
rpm | [] [] | | |||
screem | | | |||
scrollkeeper | [] [] [] [] [] [] | | |||
sed | [] [] [] [] [] [] | | |||
sh-utils | [] [] [] | | |||
shared-mime-info | | | |||
sharutils | [] [] [] [] [] [] | | |||
silky | () | | |||
skencil | [] () [] | | |||
sketch | [] () [] | | |||
soundtracker | [] [] [] | | |||
sp | [] | | |||
tar | [] [] [] [] | | |||
texinfo | [] [] [] | | |||
textutils | [] [] [] [] | | |||
tin | () () | | |||
tp-robot | | | |||
tuxpaint | [] [] [] [] [] [] [] | | |||
unicode-han-tra... | | | |||
unicode-transla... | | | |||
util-linux | [] [] [] [] [] | | |||
vorbis-tools | [] [] [] [] | | |||
wastesedge | () | | |||
wdiff | [] [] [] [] | | |||
wget | [] [] [] [] [] [] | | |||
xchat | [] [] [] [] | | |||
xfree86_xkb_xml | [] [] | | |||
xpad | [] | | |||
+----------------------------------------------------+ | |||
af am ar az be bg bs ca cs da de el en en_GB eo es | |||
4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 | |||
et eu fa fi fr ga gl he hr hu id is it ja ko lg | |||
+-------------------------------------------------+ | |||
a2ps | [] [] [] () () | | |||
aegis | | | |||
ant-phone | [] | | |||
anubis | [] | | |||
ap-utils | [] | | |||
aspell | [] [] | | |||
bash | [] [] | | |||
batchelor | [] [] | | |||
bfd | [] | | |||
binutils | [] [] | | |||
bison | [] [] [] [] | | |||
bluez-pin | [] [] [] [] [] | | |||
clisp | | | |||
clisp | [] | | |||
console-tools | | | |||
coreutils | [] [] [] [] [] [] | | |||
cpio | [] [] [] [] | | |||
darkstat | () [] [] [] | | |||
diffutils | [] [] [] [] [] [] [] | | |||
e2fsprogs | | | |||
enscript | [] [] | | |||
error | [] [] [] [] | | |||
fetchmail | [] | | |||
fileutils | [] [] [] [] [] [] | | |||
findutils | [] [] [] [] [] [] [] [] [] [] [] | | |||
flex | [] [] [] | | |||
fslint | [] | | |||
gas | [] | | |||
gawk | [] [] [] | | |||
gbiff | [] | | |||
gcal | [] | | |||
gcc | [] | | |||
gettext | [] [] [] | | |||
gettext-examples | [] [] | | |||
gettext-runtime | [] [] [] [] [] | | |||
gettext-tools | [] [] [] | | |||
gimp-print | [] [] | | |||
gliv | () | | |||
glunarclock | [] [] [] [] | | |||
gnubiff | [] | | |||
gnucash | () [] | | |||
gnucash-glossary | [] | | |||
gnupg | [] [] [] [] [] [] [] | | |||
gpe-aerial | [] | | |||
gpe-beam | [] | | |||
gpe-calendar | [] [] [] | | |||
gpe-clock | [] | | |||
gpe-conf | [] | | |||
gpe-contacts | [] [] | | |||
gpe-edit | [] [] | | |||
gpe-go | [] | | |||
gpe-login | [] [] | | |||
gpe-ownerinfo | [] [] [] | | |||
gpe-sketchbook | [] | | |||
gpe-su | [] | | |||
gpe-taskmanager | [] | | |||
gpe-timesheet | [] [] [] | | |||
gpe-today | [] [] | | |||
gpe-todo | [] [] | | |||
gphoto2 | [] [] [] | | |||
gprof | [] [] | | |||
gpsdrive | () () () | | |||
gramadoir | [] [] | | |||
grep | [] [] [] [] [] [] [] [] [] [] [] | | |||
gretl | [] [] | | |||
gtick | [] [] [] | | |||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | | |||
id-utils | [] [] [] [] | | |||
indent | [] [] [] [] [] [] [] [] [] | | |||
iso_3166 | [] [] [] [] [] [] [] | | |||
iso_3166_1 | [] [] [] [] [] | | |||
iso_3166_2 | | | |||
iso_3166_3 | | | |||
iso_4217 | [] [] [] [] [] [] | | |||
iso_639 | | | |||
jpilot | [] () | | |||
jtag | [] | | |||
jwhois | [] [] [] [] | | |||
kbd | [] | | |||
latrine | [] | | |||
ld | [] | | |||
libc | [] [] [] [] [] [] | | |||
libgpewidget | [] [] [] [] | | |||
libiconv | [] [] [] [] [] [] [] [] [] | | |||
lifelines | () | | |||
lilypond | [] | | |||
lingoteach | [] [] | | |||
lingoteach_lessons | | | |||
lynx | [] [] [] [] | | |||
m4 | [] [] [] [] | | |||
mailutils | | | |||
make | [] [] [] [] [] [] | | |||
man-db | () () | | |||
minicom | [] [] [] [] | | |||
mysecretdiary | [] [] | | |||
nano | [] [] [] [] | | |||
nano_1_0 | [] [] [] [] | | |||
opcodes | [] | | |||
parted | [] [] [] | | |||
ptx | [] [] [] [] [] [] [] | | |||
python | | | |||
radius | [] | | |||
recode | [] [] [] [] [] [] | | |||
rpm | [] [] | | |||
screem | | | |||
scrollkeeper | [] | | |||
sed | [] [] [] [] [] [] [] [] [] | | |||
sh-utils | [] [] [] [] [] [] [] | | |||
shared-mime-info | [] [] [] | | |||
sharutils | [] [] [] [] [] | | |||
silky | () [] () () | | |||
skencil | [] | | |||
sketch | [] | | |||
soundtracker | [] [] | | |||
sp | [] () | | |||
tar | [] [] [] [] [] [] [] [] [] | | |||
texinfo | [] [] [] [] | | |||
textutils | [] [] [] [] [] [] | | |||
tin | [] () | | |||
tp-robot | [] | | |||
tuxpaint | [] [] [] [] [] [] [] [] [] | | |||
unicode-han-tra... | | | |||
unicode-transla... | [] [] | | |||
util-linux | [] [] [] [] () [] | | |||
vorbis-tools | [] | | |||
wastesedge | () | | |||
wdiff | [] [] [] [] [] [] | | |||
wget | [] [] [] [] [] [] [] | | |||
xchat | [] [] [] | | |||
xfree86_xkb_xml | [] [] | | |||
xpad | [] [] | | |||
+-------------------------------------------------+ | |||
et eu fa fi fr ga gl he hr hu id is it ja ko lg | |||
22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 | |||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru | |||
+-----------------------------------------------------+ | |||
a2ps | [] [] () () [] [] [] | | |||
aegis | () () () | | |||
ant-phone | [] [] | | |||
anubis | [] [] [] [] [] [] | | |||
ap-utils | [] () [] | | |||
aspell | [] | | |||
bash | [] [] [] | | |||
batchelor | [] | | |||
bfd | [] | | |||
binutils | [] | | |||
bison | [] [] [] [] [] | | |||
bluez-pin | [] [] [] | | |||
clisp | | | |||
clisp | [] | | |||
console-tools | [] | | |||
coreutils | [] [] | | |||
cpio | [] [] [] [] [] | | |||
darkstat | [] [] [] [] | | |||
diffutils | [] [] [] [] [] [] | | |||
e2fsprogs | [] | | |||
enscript | [] [] [] [] | | |||
error | [] [] [] | | |||
fetchmail | [] [] () [] | | |||
fileutils | [] [] [] | | |||
findutils | [] [] [] [] [] | | |||
flex | [] [] [] [] | | |||
fslint | [] [] | | |||
gas | | | |||
gawk | [] [] [] | | |||
gbiff | [] [] | | |||
gcal | | | |||
gcc | | | |||
gettext | [] [] [] | | |||
gettext-examples | [] [] [] | | |||
gettext-runtime | [] [] [] [] | | |||
gettext-tools | [] [] | | |||
gimp-print | [] | | |||
gliv | [] [] [] | | |||
glunarclock | [] [] [] [] | | |||
gnubiff | [] | | |||
gnucash | [] [] () [] | | |||
gnucash-glossary | [] [] | | |||
gnupg | [] | | |||
gpe-aerial | [] [] [] [] | | |||
gpe-beam | [] [] [] [] | | |||
gpe-calendar | [] [] [] [] | | |||
gpe-clock | [] [] [] [] | | |||
gpe-conf | [] [] [] [] | | |||
gpe-contacts | [] [] [] [] | | |||
gpe-edit | [] [] [] [] | | |||
gpe-go | [] [] [] | | |||
gpe-login | [] [] [] [] | | |||
gpe-ownerinfo | [] [] [] [] | | |||
gpe-sketchbook | [] [] [] [] | | |||
gpe-su | [] [] [] [] | | |||
gpe-taskmanager | [] [] [] [] | | |||
gpe-timesheet | [] [] [] [] | | |||
gpe-today | [] [] [] [] | | |||
gpe-todo | [] [] [] [] | | |||
gphoto2 | [] | | |||
gprof | [] [] | | |||
gpsdrive | () () [] | | |||
gramadoir | () [] | | |||
grep | [] [] [] [] [] | | |||
gretl | | | |||
gtick | [] [] [] | | |||
hello | [] [] [] [] [] [] [] [] [] [] | | |||
id-utils | [] [] [] [] | | |||
indent | [] [] [] [] | | |||
iso_3166 | [] [] [] | | |||
iso_3166_1 | [] [] | | |||
iso_3166_2 | | | |||
iso_3166_3 | [] | | |||
iso_4217 | [] [] [] [] [] [] [] [] | | |||
iso_639 | [] | | |||
jpilot | () () | | |||
jtag | | | |||
jwhois | [] [] [] [] () | | |||
kbd | [] [] [] | | |||
latrine | [] | | |||
ld | | | |||
libc | [] [] [] [] | | |||
libgpewidget | [] [] [] | | |||
libiconv | [] [] [] [] [] | | |||
lifelines | | | |||
lilypond | | | |||
lingoteach | | | |||
lingoteach_lessons | | | |||
lynx | [] [] [] | | |||
m4 | [] [] [] [] [] | | |||
mailutils | [] [] [] | | |||
make | [] [] [] [] | | |||
man-db | [] | | |||
minicom | [] [] [] [] | | |||
mysecretdiary | [] [] [] | | |||
nano | [] [] [] [] [] | | |||
nano_1_0 | [] [] [] [] [] [] | | |||
opcodes | [] [] | | |||
parted | [] [] [] [] | | |||
ptx | [] [] [] [] [] [] [] [] | | |||
python | | | |||
radius | [] [] | | |||
recode | [] [] [] [] | | |||
rpm | [] [] [] | | |||
screem | | | |||
scrollkeeper | [] [] [] [] [] | | |||
sed | [] [] [] | | |||
sh-utils | [] [] | | |||
shared-mime-info | [] [] | | |||
sharutils | [] [] | | |||
silky | () | | |||
skencil | [] [] | | |||
sketch | [] [] | | |||
soundtracker | | | |||
sp | | | |||
tar | [] [] [] [] [] [] | | |||
texinfo | [] [] [] [] | | |||
textutils | [] [] | | |||
tin | | | |||
tp-robot | [] | | |||
tuxpaint | [] [] [] [] [] [] [] [] | | |||
unicode-han-tra... | | | |||
unicode-transla... | | | |||
util-linux | [] [] [] | | |||
vorbis-tools | [] [] [] | | |||
wastesedge | | | |||
wdiff | [] [] [] [] [] | | |||
wget | [] [] [] | | |||
xchat | [] [] [] | | |||
xfree86_xkb_xml | [] [] | | |||
xpad | [] [] | | |||
+-----------------------------------------------------+ | |||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru | |||
1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 | |||
sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu | |||
+-----------------------------------------------------+ | |||
a2ps | [] [] [] [] | 16 | |||
aegis | | 0 | |||
ant-phone | | 3 | |||
anubis | [] [] | 9 | |||
ap-utils | () | 3 | |||
aspell | | 4 | |||
bash | | 9 | |||
batchelor | | 3 | |||
bfd | [] [] | 6 | |||
binutils | [] [] [] | 8 | |||
bison | [] [] | 14 | |||
bluez-pin | [] [] [] | 14 | |||
clisp | | 0 | |||
clisp | | 5 | |||
console-tools | | 3 | |||
coreutils | [] [] [] [] | 16 | |||
cpio | [] [] | 14 | |||
darkstat | [] [] [] () () | 12 | |||
diffutils | [] [] [] | 23 | |||
e2fsprogs | [] [] | 6 | |||
enscript | [] [] | 12 | |||
error | [] [] [] | 15 | |||
fetchmail | [] [] | 11 | |||
fileutils | [] [] [] [] [] | 17 | |||
findutils | [] [] [] [] [] [] | 29 | |||
flex | [] [] | 13 | |||
fslint | | 3 | |||
gas | [] | 3 | |||
gawk | [] [] | 12 | |||
gbiff | | 4 | |||
gcal | [] [] | 4 | |||
gcc | [] | 4 | |||
gettext | [] [] [] [] [] | 16 | |||
gettext-examples | [] [] [] [] [] | 14 | |||
gettext-runtime | [] [] [] [] [] [] [] [] | 22 | |||
gettext-tools | [] [] [] [] [] [] | 14 | |||
gimp-print | [] [] | 10 | |||
gliv | | 3 | |||
glunarclock | [] [] [] | 13 | |||
gnubiff | | 3 | |||
gnucash | [] [] | 9 | |||
gnucash-glossary | [] [] [] | 8 | |||
gnupg | [] [] [] [] | 17 | |||
gpe-aerial | [] | 7 | |||
gpe-beam | [] | 8 | |||
gpe-calendar | [] [] [] [] | 13 | |||
gpe-clock | [] [] [] | 10 | |||
gpe-conf | [] [] | 9 | |||
gpe-contacts | [] [] [] | 11 | |||
gpe-edit | [] [] [] [] [] | 12 | |||
gpe-go | | 5 | |||
gpe-login | [] [] [] [] [] | 13 | |||
gpe-ownerinfo | [] [] [] [] | 13 | |||
gpe-sketchbook | [] [] | 9 | |||
gpe-su | [] [] [] | 10 | |||
gpe-taskmanager | [] [] [] | 10 | |||
gpe-timesheet | [] [] [] [] | 12 | |||
gpe-today | [] [] [] [] [] | 13 | |||
gpe-todo | [] [] [] [] | 12 | |||
gphoto2 | [] [] [] | 11 | |||
gprof | [] [] | 9 | |||
gpsdrive | [] [] | 3 | |||
gramadoir | [] | 5 | |||
grep | [] [] [] [] | 26 | |||
gretl | | 3 | |||
gtick | | 7 | |||
hello | [] [] [] [] [] | 34 | |||
id-utils | [] [] | 12 | |||
indent | [] [] [] [] | 21 | |||
iso_3166 | [] [] [] [] [] [] [] | 27 | |||
iso_3166_1 | [] [] [] | 16 | |||
iso_3166_2 | | 0 | |||
iso_3166_3 | | 2 | |||
iso_4217 | [] [] [] [] [] [] | 24 | |||
iso_639 | | 1 | |||
jpilot | [] [] [] [] [] | 9 | |||
jtag | [] | 2 | |||
jwhois | () [] [] | 11 | |||
kbd | [] [] | 11 | |||
latrine | | 2 | |||
ld | [] [] | 5 | |||
libc | [] [] [] [] | 20 | |||
libgpewidget | [] [] [] [] | 13 | |||
libiconv | [] [] [] [] [] [] [] [] | 27 | |||
lifelines | [] | 2 | |||
lilypond | [] | 3 | |||
lingoteach | | 2 | |||
lingoteach_lessons | () | 0 | |||
lynx | [] [] [] | 14 | |||
m4 | [] [] | 15 | |||
mailutils | | 5 | |||
make | [] [] [] | 16 | |||
man-db | [] | 5 | |||
minicom | | 11 | |||
mysecretdiary | [] [] | 10 | |||
nano | [] [] [] [] | 17 | |||
nano_1_0 | [] [] [] | 17 | |||
opcodes | [] [] | 6 | |||
parted | [] [] [] | 15 | |||
ptx | [] [] | 22 | |||
python | | 0 | |||
radius | | 4 | |||
recode | [] [] [] | 20 | |||
rpm | [] [] | 9 | |||
screem | [] [] | 2 | |||
scrollkeeper | [] [] [] | 15 | |||
sed | [] [] [] [] [] [] | 24 | |||
sh-utils | [] [] | 14 | |||
shared-mime-info | [] [] | 7 | |||
sharutils | [] [] [] [] | 17 | |||
silky | () | 3 | |||
skencil | [] | 6 | |||
sketch | [] | 6 | |||
soundtracker | [] [] | 7 | |||
sp | [] | 3 | |||
tar | [] [] [] [] [] | 24 | |||
texinfo | [] [] [] | 14 | |||
textutils | [] [] [] [] | 16 | |||
tin | | 1 | |||
tp-robot | | 2 | |||
tuxpaint | [] [] [] [] [] | 29 | |||
unicode-han-tra... | | 0 | |||
unicode-transla... | | 2 | |||
util-linux | [] [] | 15 | |||
vorbis-tools | | 8 | |||
wastesedge | | 0 | |||
wdiff | [] [] [] | 18 | |||
wget | [] [] [] [] [] [] [] [] | 24 | |||
xchat | [] [] [] [] [] | 15 | |||
xfree86_xkb_xml | [] [] [] [] [] | 11 | |||
xpad | | 5 | |||
+-----------------------------------------------------+ | |||
63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu | |||
131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 | |||
Some counters in the preceding matrix are higher than the number of | |||
visible blocks let us expect. This is because a few extra PO files are | |||
used for implementing regional variants of languages, or language | |||
dialects. | |||
For a PO file in the matrix above to be effective, the package to | |||
which it applies should also have been internationalized and | |||
distributed as such by its maintainer. There might be an observable | |||
lag between the mere existence a PO file and its wide availability in a | |||
distribution. | |||
If January 2004 seems to be old, you may fetch a more recent copy of | |||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date | |||
matrix with full percentage details can be found at | |||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. | |||
Using `gettext' in new packages | |||
=============================== | |||
If you are writing a freely available program and want to | |||
internationalize it you are welcome to use GNU `gettext' in your | |||
package. Of course you have to respect the GNU Library General Public | |||
License which covers the use of the GNU `gettext' library. This means | |||
in particular that even non-free programs can use `libintl' as a shared | |||
library, whereas only free software can use `libintl' as a static | |||
library or use modified versions of `libintl'. | |||
Once the sources are changed appropriately and the setup can handle | |||
the use of `gettext' the only thing missing are the translations. The | |||
Free Translation Project is also available for packages which are not | |||
developed inside the GNU project. Therefore the information given above | |||
applies also for every other Free Software Project. Contact | |||
`translation@iro.umontreal.ca' to make the `.pot' files available to | |||
the translation teams. | |||
@@ -1,5 +0,0 @@ | |||
SUBDIRS = tx x0vncserver vncviewer vncpasswd | |||
if VNCCONFIG | |||
SUBDIRS += vncconfig | |||
endif |
@@ -0,0 +1,7 @@ | |||
PACKAGE = @PACKAGE@ | |||
VERSION = @VERSION@ | |||
SUBDIRS = ../common intl tx x0vncserver vncviewer po vncpasswd @VNCCONFIG_DIR@ | |||
# followed by boilerplate.mk |
@@ -0,0 +1,36 @@ | |||
all:: | |||
@subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done | |||
clean:: | |||
@subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done | |||
clean:: | |||
rm -f $(program) $(library) *.o | |||
SHELL = @SHELL@ | |||
top_srcdir = @top_srcdir@ | |||
top_builddir = @top_builddir@ | |||
@SET_MAKE@ | |||
CC = @CC@ | |||
CFLAGS = @CFLAGS@ $(DIR_CFLAGS) | |||
CCLD = $(CC) | |||
CXX = @CXX@ | |||
CXXFLAGS = @CXXFLAGS@ | |||
CXXLD = $(CXX) | |||
CPPFLAGS = @CPPFLAGS@ | |||
DEFS = @DEFS@ | |||
ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) | |||
LIBS = @LIBS@ | |||
LDFLAGS = @LDFLAGS@ | |||
RANLIB = @RANLIB@ | |||
AR = ar cq | |||
.SUFFIXES: | |||
.SUFFIXES: .cxx .c .o | |||
.c.o: | |||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -o $@ -c $< | |||
.cxx.o: | |||
$(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -o $@ -c $< |
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
rm -rf autom4te.cache | |||
autoreconf -i |
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
rm `find ../common -name "*.d" -print` | |||
rm `find . -name "*.d" -print` |
@@ -0,0 +1,2 @@ | |||
COMMON = @top_srcdir@/../common | |||
TOP = @top_srcdir@ |
@@ -0,0 +1,548 @@ | |||
#! /bin/sh | |||
# Output a system dependent set of variables, describing how to set the | |||
# run time search path of shared libraries in an executable. | |||
# | |||
# Copyright 1996-2003 Free Software Foundation, Inc. | |||
# Taken from GNU libtool, 2001 | |||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |||
# | |||
# This program is free software; you can redistribute it and/or modify | |||
# it under the terms of the GNU General Public License as published by | |||
# the Free Software Foundation; either version 2 of the License, or | |||
# (at your option) any later version. | |||
# | |||
# This program is distributed in the hope that it will be useful, but | |||
# WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
# General Public License for more details. | |||
# | |||
# You should have received a copy of the GNU General Public License | |||
# along with this program; if not, write to the Free Software | |||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
# | |||
# As a special exception to the GNU General Public License, if you | |||
# distribute this file as part of a program that contains a | |||
# configuration script generated by Autoconf, you may include it under | |||
# the same distribution terms that you use for the rest of that program. | |||
# | |||
# The first argument passed to this file is the canonical host specification, | |||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |||
# or | |||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld | |||
# should be set by the caller. | |||
# | |||
# The set of defined variables is at the end of this script. | |||
# Known limitations: | |||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer | |||
# than 256 bytes, otherwise the compiler driver will dump core. The only | |||
# known workaround is to choose shorter directory names for the build | |||
# directory and/or the installation directory. | |||
# All known linkers require a `.a' archive for static linking (except M$VC, | |||
# which needs '.lib'). | |||
libext=a | |||
shrext=.so | |||
host="$1" | |||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. | |||
wl= | |||
if test "$GCC" = yes; then | |||
wl='-Wl,' | |||
else | |||
case "$host_os" in | |||
aix*) | |||
wl='-Wl,' | |||
;; | |||
mingw* | pw32* | os2*) | |||
;; | |||
hpux9* | hpux10* | hpux11*) | |||
wl='-Wl,' | |||
;; | |||
irix5* | irix6* | nonstopux*) | |||
wl='-Wl,' | |||
;; | |||
newsos6) | |||
;; | |||
linux*) | |||
case $CC in | |||
icc|ecc) | |||
wl='-Wl,' | |||
;; | |||
ccc) | |||
wl='-Wl,' | |||
;; | |||
esac | |||
;; | |||
osf3* | osf4* | osf5*) | |||
wl='-Wl,' | |||
;; | |||
sco3.2v5*) | |||
;; | |||
solaris*) | |||
wl='-Wl,' | |||
;; | |||
sunos4*) | |||
wl='-Qoption ld ' | |||
;; | |||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |||
wl='-Wl,' | |||
;; | |||
sysv4*MP*) | |||
;; | |||
uts4*) | |||
;; | |||
esac | |||
fi | |||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. | |||
hardcode_libdir_flag_spec= | |||
hardcode_libdir_separator= | |||
hardcode_direct=no | |||
hardcode_minus_L=no | |||
case "$host_os" in | |||
cygwin* | mingw* | pw32*) | |||
# FIXME: the MSVC++ port hasn't been tested in a loooong time | |||
# When not using gcc, we currently assume that we are using | |||
# Microsoft Visual C++. | |||
if test "$GCC" != yes; then | |||
with_gnu_ld=no | |||
fi | |||
;; | |||
openbsd*) | |||
with_gnu_ld=no | |||
;; | |||
esac | |||
ld_shlibs=yes | |||
if test "$with_gnu_ld" = yes; then | |||
case "$host_os" in | |||
aix3* | aix4* | aix5*) | |||
# On AIX/PPC, the GNU linker is very broken | |||
if test "$host_cpu" != ia64; then | |||
ld_shlibs=no | |||
fi | |||
;; | |||
amigaos*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_minus_L=yes | |||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |||
# that the semantics of dynamic libraries on AmigaOS, at least up | |||
# to version 4, is to share data among multiple programs linked | |||
# with the same dynamic library. Since this doesn't match the | |||
# behavior of shared libraries on other platforms, we can use | |||
# them. | |||
ld_shlibs=no | |||
;; | |||
beos*) | |||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |||
: | |||
else | |||
ld_shlibs=no | |||
fi | |||
;; | |||
cygwin* | mingw* | pw32*) | |||
# hardcode_libdir_flag_spec is actually meaningless, as there is | |||
# no search path for DLLs. | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | |||
: | |||
else | |||
ld_shlibs=no | |||
fi | |||
;; | |||
netbsd*) | |||
;; | |||
solaris* | sysv5*) | |||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | |||
ld_shlibs=no | |||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |||
: | |||
else | |||
ld_shlibs=no | |||
fi | |||
;; | |||
sunos4*) | |||
hardcode_direct=yes | |||
;; | |||
*) | |||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |||
: | |||
else | |||
ld_shlibs=no | |||
fi | |||
;; | |||
esac | |||
if test "$ld_shlibs" = yes; then | |||
# Unlike libtool, we use -rpath here, not --rpath, since the documented | |||
# option of GNU ld is called -rpath, not --rpath. | |||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |||
fi | |||
else | |||
case "$host_os" in | |||
aix3*) | |||
# Note: this linker hardcodes the directories in LIBPATH if there | |||
# are no directories specified by -L. | |||
hardcode_minus_L=yes | |||
if test "$GCC" = yes; then | |||
# Neither direct hardcoding nor static linking is supported with a | |||
# broken collect2. | |||
hardcode_direct=unsupported | |||
fi | |||
;; | |||
aix4* | aix5*) | |||
if test "$host_cpu" = ia64; then | |||
# On IA64, the linker does run time linking by default, so we don't | |||
# have to do anything special. | |||
aix_use_runtimelinking=no | |||
else | |||
aix_use_runtimelinking=no | |||
# Test if we are trying to use run time linking or normal | |||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we | |||
# need to do runtime linking. | |||
case $host_os in aix4.[23]|aix4.[23].*|aix5*) | |||
for ld_flag in $LDFLAGS; do | |||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |||
aix_use_runtimelinking=yes | |||
break | |||
fi | |||
done | |||
esac | |||
fi | |||
hardcode_direct=yes | |||
hardcode_libdir_separator=':' | |||
if test "$GCC" = yes; then | |||
case $host_os in aix4.[012]|aix4.[012].*) | |||
collect2name=`${CC} -print-prog-name=collect2` | |||
if test -f "$collect2name" && \ | |||
strings "$collect2name" | grep resolve_lib_name >/dev/null | |||
then | |||
# We have reworked collect2 | |||
hardcode_direct=yes | |||
else | |||
# We have old collect2 | |||
hardcode_direct=unsupported | |||
hardcode_minus_L=yes | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_libdir_separator= | |||
fi | |||
esac | |||
fi | |||
# Begin _LT_AC_SYS_LIBPATH_AIX. | |||
echo 'int main () { return 0; }' > conftest.c | |||
${CC} ${LDFLAGS} conftest.c -o conftest | |||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | |||
}'` | |||
if test -z "$aix_libpath"; then | |||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | |||
}'` | |||
fi | |||
if test -z "$aix_libpath"; then | |||
aix_libpath="/usr/lib:/lib" | |||
fi | |||
rm -f conftest.c conftest | |||
# End _LT_AC_SYS_LIBPATH_AIX. | |||
if test "$aix_use_runtimelinking" = yes; then | |||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | |||
else | |||
if test "$host_cpu" = ia64; then | |||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | |||
else | |||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | |||
fi | |||
fi | |||
;; | |||
amigaos*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_minus_L=yes | |||
# see comment about different semantics on the GNU ld section | |||
ld_shlibs=no | |||
;; | |||
bsdi4*) | |||
;; | |||
cygwin* | mingw* | pw32*) | |||
# When not using gcc, we currently assume that we are using | |||
# Microsoft Visual C++. | |||
# hardcode_libdir_flag_spec is actually meaningless, as there is | |||
# no search path for DLLs. | |||
hardcode_libdir_flag_spec=' ' | |||
libext=lib | |||
;; | |||
darwin* | rhapsody*) | |||
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then | |||
hardcode_direct=no | |||
fi | |||
;; | |||
dgux*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
;; | |||
freebsd1*) | |||
ld_shlibs=no | |||
;; | |||
freebsd2.2*) | |||
hardcode_libdir_flag_spec='-R$libdir' | |||
hardcode_direct=yes | |||
;; | |||
freebsd2*) | |||
hardcode_direct=yes | |||
hardcode_minus_L=yes | |||
;; | |||
freebsd*) | |||
hardcode_libdir_flag_spec='-R$libdir' | |||
hardcode_direct=yes | |||
;; | |||
hpux9*) | |||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
hardcode_direct=yes | |||
# hardcode_minus_L: Not really in the search PATH, | |||
# but as the default location of the library. | |||
hardcode_minus_L=yes | |||
;; | |||
hpux10* | hpux11*) | |||
if test "$with_gnu_ld" = no; then | |||
case "$host_cpu" in | |||
hppa*64*) | |||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
hardcode_direct=no | |||
;; | |||
ia64*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_direct=no | |||
# hardcode_minus_L: Not really in the search PATH, | |||
# but as the default location of the library. | |||
hardcode_minus_L=yes | |||
;; | |||
*) | |||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
hardcode_direct=yes | |||
# hardcode_minus_L: Not really in the search PATH, | |||
# but as the default location of the library. | |||
hardcode_minus_L=yes | |||
;; | |||
esac | |||
fi | |||
;; | |||
irix5* | irix6* | nonstopux*) | |||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
;; | |||
netbsd*) | |||
hardcode_libdir_flag_spec='-R$libdir' | |||
hardcode_direct=yes | |||
;; | |||
newsos6) | |||
hardcode_direct=yes | |||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
;; | |||
openbsd*) | |||
hardcode_direct=yes | |||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |||
else | |||
case "$host_os" in | |||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | |||
hardcode_libdir_flag_spec='-R$libdir' | |||
;; | |||
*) | |||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |||
;; | |||
esac | |||
fi | |||
;; | |||
os2*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_minus_L=yes | |||
;; | |||
osf3*) | |||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |||
hardcode_libdir_separator=: | |||
;; | |||
osf4* | osf5*) | |||
if test "$GCC" = yes; then | |||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |||
else | |||
# Both cc and cxx compiler support -rpath directly | |||
hardcode_libdir_flag_spec='-rpath $libdir' | |||
fi | |||
hardcode_libdir_separator=: | |||
;; | |||
sco3.2v5*) | |||
;; | |||
solaris*) | |||
hardcode_libdir_flag_spec='-R$libdir' | |||
;; | |||
sunos4*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
hardcode_direct=yes | |||
hardcode_minus_L=yes | |||
;; | |||
sysv4) | |||
case $host_vendor in | |||
sni) | |||
hardcode_direct=yes # is this really true??? | |||
;; | |||
siemens) | |||
hardcode_direct=no | |||
;; | |||
motorola) | |||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |||
;; | |||
esac | |||
;; | |||
sysv4.3*) | |||
;; | |||
sysv4*MP*) | |||
if test -d /usr/nec; then | |||
ld_shlibs=yes | |||
fi | |||
;; | |||
sysv4.2uw2*) | |||
hardcode_direct=yes | |||
hardcode_minus_L=no | |||
;; | |||
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) | |||
;; | |||
sysv5*) | |||
hardcode_libdir_flag_spec= | |||
;; | |||
uts4*) | |||
hardcode_libdir_flag_spec='-L$libdir' | |||
;; | |||
*) | |||
ld_shlibs=no | |||
;; | |||
esac | |||
fi | |||
# Check dynamic linker characteristics | |||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. | |||
libname_spec='lib$name' | |||
case "$host_os" in | |||
aix3*) | |||
;; | |||
aix4* | aix5*) | |||
;; | |||
amigaos*) | |||
;; | |||
beos*) | |||
;; | |||
bsdi4*) | |||
;; | |||
cygwin* | mingw* | pw32*) | |||
shrext=.dll | |||
;; | |||
darwin* | rhapsody*) | |||
shrext=.dylib | |||
;; | |||
dgux*) | |||
;; | |||
freebsd1*) | |||
;; | |||
freebsd*) | |||
;; | |||
gnu*) | |||
;; | |||
hpux9* | hpux10* | hpux11*) | |||
case "$host_cpu" in | |||
ia64*) | |||
shrext=.so | |||
;; | |||
hppa*64*) | |||
shrext=.sl | |||
;; | |||
*) | |||
shrext=.sl | |||
;; | |||
esac | |||
;; | |||
irix5* | irix6* | nonstopux*) | |||
case "$host_os" in | |||
irix5* | nonstopux*) | |||
libsuff= shlibsuff= | |||
;; | |||
*) | |||
case $LD in | |||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; | |||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; | |||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; | |||
*) libsuff= shlibsuff= ;; | |||
esac | |||
;; | |||
esac | |||
;; | |||
linux*oldld* | linux*aout* | linux*coff*) | |||
;; | |||
linux*) | |||
;; | |||
netbsd*) | |||
;; | |||
newsos6) | |||
;; | |||
nto-qnx) | |||
;; | |||
openbsd*) | |||
;; | |||
os2*) | |||
libname_spec='$name' | |||
shrext=.dll | |||
;; | |||
osf3* | osf4* | osf5*) | |||
;; | |||
sco3.2v5*) | |||
;; | |||
solaris*) | |||
;; | |||
sunos4*) | |||
;; | |||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |||
;; | |||
sysv4*MP*) | |||
;; | |||
uts4*) | |||
;; | |||
esac | |||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g' | |||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` | |||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'` | |||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` | |||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF | |||
# How to pass a linker flag through the compiler. | |||
wl="$escaped_wl" | |||
# Static library suffix (normally "a"). | |||
libext="$libext" | |||
# Shared library suffix (normally "so"). | |||
shlibext="$shlibext" | |||
# Flag to hardcode \$libdir into a binary during linking. | |||
# This must work even if \$libdir does not exist. | |||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" | |||
# Whether we need a single -rpath flag with a separated argument. | |||
hardcode_libdir_separator="$hardcode_libdir_separator" | |||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the | |||
# resulting binary. | |||
hardcode_direct="$hardcode_direct" | |||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |||
# resulting binary. | |||
hardcode_minus_L="$hardcode_minus_L" | |||
EOF |
@@ -0,0 +1,184 @@ | |||
dnl Process this file with autoconf to produce a configure script. | |||
AC_INIT(vncviewer/vncviewer.cxx) | |||
PACKAGE=tightvnc | |||
VERSION=1.5.0 | |||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") | |||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION") | |||
AC_SUBST(PACKAGE) | |||
AC_SUBST(VERSION) | |||
dnl Configure the common directory | |||
echo "configuring common..." | |||
(cd ../common; ./configure $*) | |||
echo "...done configuring common" | |||
dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS | |||
ac_cv_prog_cc_g=no | |||
ac_cv_prog_cxx_g=no | |||
dnl Checks for programs. | |||
AC_PROG_CC | |||
AC_PROG_CXX | |||
AC_PROG_RANLIB | |||
AC_PROG_MAKE_SET | |||
AC_LANG_CPLUSPLUS | |||
case "`(uname -sr) 2>/dev/null`" in | |||
"SunOS 5"*) | |||
SOLARIS=yes | |||
USE_MITSHM=yes | |||
USE_SUN_OVL=yes | |||
;; | |||
"Linux"*) | |||
LINUX=yes | |||
USE_MITSHM=yes | |||
;; | |||
"IRIX 6"*) | |||
X_LIBS="-L/usr/lib32" | |||
USE_MITSHM=yes | |||
USE_READDISPLAY=yes | |||
;; | |||
"LynxOS 2"*) | |||
SJLJ_EXCEPTIONS=yes | |||
;; | |||
esac | |||
dnl FIXME: Check for MIT-SHM properly, add a corresponding --with option. | |||
if test "$USE_MITSHM" = yes; then | |||
MITSHM_DEFINE="-DHAVE_MITSHM" | |||
fi | |||
AC_SUBST(MITSHM_DEFINE) | |||
if test "$GCC" = yes; then | |||
CFLAGS="$CFLAGS -Wall" | |||
if test "$SOLARIS" = yes; then | |||
CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int" | |||
fi | |||
fi | |||
if test "$GXX" = yes; then | |||
CXXFLAGS="$CXXFLAGS -Wall" | |||
if test "$SOLARIS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -fpermissive" | |||
fi | |||
if test "$SJLJ_EXCEPTIONS" = yes; then | |||
CXXFLAGS="$CXXFLAGS -fsjlj-exceptions" | |||
fi | |||
fi | |||
dnl Check for IRIX-specific Compression Library. | |||
AC_CHECK_LIB(cl, clQuerySchemeFromName, | |||
[AC_DEFINE(HAVE_CL) | |||
CL_LIB=-lcl]) | |||
AC_SUBST(CL_LIB) | |||
dnl Check for IRIX-specific Digital Media libraries. | |||
AC_CHECK_LIB(dmedia, dmICCreate, | |||
[AC_DEFINE(HAVE_DMEDIA) | |||
DMEDIA_LIB=-ldmedia]) | |||
AC_SUBST(DMEDIA_LIB) | |||
AC_PATH_XTRA | |||
AC_ARG_WITH(installed-zlib, | |||
[ --with-installed-zlib use the version of zlib which is installed on the | |||
system instead of the one distributed with VNC]) | |||
if test "$with_installed_zlib" = yes; then | |||
echo "using installed zlib" | |||
ZLIB_LIB=-lz | |||
else | |||
ZLIB_DIR='$(COMMON)/zlib' | |||
ZLIB_INCLUDE='-I$(COMMON)/zlib' | |||
ZLIB_LIB='$(COMMON)/zlib/libz.a' | |||
fi | |||
AC_SUBST(ZLIB_DIR) | |||
AC_SUBST(ZLIB_INCLUDE) | |||
AC_SUBST(ZLIB_LIB) | |||
AC_ARG_WITH(installed-jpeg, | |||
[ --with-installed-jpeg use the version of jpeg which is installed on the | |||
system instead of the one distributed with VNC]) | |||
if test "$with_installed_jpeg" = yes; then | |||
echo "using installed jpeg" | |||
JPEG_LIB=-ljpeg | |||
else | |||
JPEG_DIR='$(COMMON)/jpeg/build' | |||
JPEG_INCLUDE='-I$(COMMON)/jpeg' | |||
JPEG_LIB='$(COMMON)/jpeg/build/libjpeg.a' | |||
fi | |||
AC_SUBST(JPEG_DIR) | |||
AC_SUBST(JPEG_INCLUDE) | |||
AC_SUBST(JPEG_LIB) | |||
AC_ARG_ENABLE(vncconfig, | |||
[ --enable-vncconfig build the vncconfig utility (assumed by default), | |||
use --disable-vncconfig to skip building vncconfig]) | |||
if test "$enable_vncconfig" = no; then | |||
echo "vncconfig utility will not be built" | |||
VNCCONFIG_DIR= | |||
else | |||
VNCCONFIG_DIR='vncconfig' | |||
fi | |||
AC_SUBST(VNCCONFIG_DIR) | |||
dnl Check for the XTest X11 extension library. | |||
AC_CHECK_LIB(Xtst,XTestGrabControl,USE_XTEST=yes,USE_XTEST=, | |||
["$X_LIBS" -lXext -lX11]) | |||
if test "$USE_XTEST" = yes; then | |||
XTEST_DEFINE='-DHAVE_XTEST' | |||
XTEST_LIB=-lXtst | |||
else | |||
echo Warning: No XTest extension, building x0vncserver view-only | |||
XTEST_DEFINE= | |||
XTEST_LIB= | |||
fi | |||
AC_SUBST(XTEST_DEFINE) | |||
AC_SUBST(XTEST_LIB) | |||
dnl Support for READDISPLAY (Irix) and SUN_OVL (Solaris) extensions | |||
dnl FIXME: Implement corresponding --with options. | |||
if test "$USE_READDISPLAY" = yes; then | |||
READDISPLAY_DEFINE='-DHAVE_READDISPLAY' | |||
elif test "$USE_SUN_OVL" = yes; then | |||
READDISPLAY_DEFINE='-DHAVE_SUN_OVL' | |||
else | |||
READDISPLAY_DEFINE= | |||
fi | |||
AC_SUBST(READDISPLAY_DEFINE) | |||
dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve | |||
dnl gethostbyname, inet_addr, htons etc. Check if it's necessary. | |||
dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add | |||
dnl -lbsd to LIBS. We set INET_LIB instead. | |||
AC_LANG_SAVE | |||
AC_LANG_C | |||
AC_CHECK_FUNC(gethostbyname,INET_LIB_REQ=,INET_LIB_REQ=yes) | |||
if test "$INET_LIB_REQ" = yes; then | |||
AC_CHECK_LIB(bsd,gethostbyname,INET_LIB=-lbsd,INET_LIB=) | |||
fi | |||
AC_LANG_RESTORE | |||
AC_SUBST(INET_LIB) | |||
AM_GNU_GETTEXT | |||
BOILERPLATE=boilerplate.mk | |||
if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then | |||
if sh -c "vncmkdepend" >/dev/null 2>&1; then | |||
BOILERPLATE="$BOILERPLATE:depend.mk" | |||
fi | |||
fi | |||
AC_OUTPUT(Makefile:common.mk:Makefile.in:$BOILERPLATE \ | |||
tx/Makefile:common.mk:tx/Makefile.in:$BOILERPLATE \ | |||
x0vncserver/Makefile:common.mk:x0vncserver/Makefile.in:$BOILERPLATE \ | |||
vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \ | |||
vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \ | |||
vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \ | |||
intl/Makefile \ | |||
po/Makefile.in \ | |||
) |
@@ -0,0 +1,76 @@ | |||
# | |||
# C / C++ header dependency stuff | |||
# | |||
# Needs GNU make and vncmkdepend, a hacked version of makedepend | |||
.SUFFIXES: .d | |||
CMAKEDEPEND = vncmkdepend | |||
CXXMAKEDEPEND = vncmkdepend | |||
# | |||
# The recommended method of doing dependency analysis in the GNU make manual | |||
# turns out to be painfully slow. This method is similar but it's | |||
# substantially faster and retains the desirable property that the user doesn't | |||
# need to manually invoke a "make depend" step. | |||
# | |||
# As with the method described in the manual, we generate a separate dependency | |||
# (.d) file for each source file. The .d file records the header files that | |||
# each C or C++ source file includes. Any source file recorded in SRCS or | |||
# CXXSRCS will cause us to try and include the corresponding .d file and GNU | |||
# make then treats each .d file as a target to be remade. | |||
# | |||
# Unlike the manual's method, the rule we provide for making the .d file is | |||
# actually a fake. All it does is record in a temporary file that the .d file | |||
# needs to be remade. But as well as all the .d files, we also try to include | |||
# a file called "depend.phony". This file never exists, but it causes GNU make | |||
# to try and make the target "depend.phony". The rule for depend.phony then | |||
# looks at the temporary files generated by the .d rules and then invokes the | |||
# "omkdepend" program on all of the source files in one go. | |||
# | |||
# | |||
# We use simple assignment here to remove any of the depend.tmp files | |||
# at the time make parses this bit. | |||
# | |||
dummyvariable := $(shell $(RM) cdepend.tmp cxxdepend.tmp) | |||
# | |||
# Now the "fake" rules for generating .d files. | |||
# | |||
%.d: %.c | |||
@echo "$<" >> cdepend.tmp | |||
%.d: %.cxx | |||
@echo "$<" >> cxxdepend.tmp | |||
# | |||
# The depend.phony rule which actually runs omkdepend. | |||
# | |||
depend.phony: | |||
@if [ -f cdepend.tmp ]; then \ | |||
echo $(CMAKEDEPEND) $(ALL_CPPFLAGS) `cat cdepend.tmp`; \ | |||
$(CMAKEDEPEND) $(ALL_CPPFLAGS) `cat cdepend.tmp`; \ | |||
rm -f cdepend.tmp; \ | |||
fi; \ | |||
if [ -f cxxdepend.tmp ]; then \ | |||
echo $(CXXMAKEDEPEND) $(ALL_CPPFLAGS) `cat cxxdepend.tmp`; \ | |||
$(CXXMAKEDEPEND) $(ALL_CPPFLAGS) `cat cxxdepend.tmp`; \ | |||
rm -f cxxdepend.tmp; \ | |||
fi | |||
# | |||
# Now include the .d files and the "depend.phony" file which never exists. | |||
# For some reason GNU make evaluates the targets in reverse order, so we need | |||
# to include depend.phony first. The "-" tells make not to complain that it | |||
# can't find the file. | |||
# | |||
-include depend.phony | |||
ifdef SRCS | |||
-include $(patsubst %.c,%.d,$(patsubst %.cxx,%.d,$(SRCS))) | |||
endif |
@@ -0,0 +1,322 @@ | |||
#!/bin/sh | |||
# install - install a program, script, or datafile | |||
scriptversion=2004-09-10.20 | |||
# This originates from X11R5 (mit/util/scripts/install.sh), which was | |||
# later released in X11R6 (xc/config/util/install.sh) with the | |||
# following copyright and license. | |||
# | |||
# Copyright (C) 1994 X Consortium | |||
# | |||
# Permission is hereby granted, free of charge, to any person obtaining a copy | |||
# of this software and associated documentation files (the "Software"), to | |||
# deal in the Software without restriction, including without limitation the | |||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |||
# sell copies of the Software, and to permit persons to whom the Software is | |||
# furnished to do so, subject to the following conditions: | |||
# | |||
# The above copyright notice and this permission notice shall be included in | |||
# all copies or substantial portions of the Software. | |||
# | |||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
# | |||
# Except as contained in this notice, the name of the X Consortium shall not | |||
# be used in advertising or otherwise to promote the sale, use or other deal- | |||
# ings in this Software without prior written authorization from the X Consor- | |||
# tium. | |||
# | |||
# | |||
# FSF changes to this file are in the public domain. | |||
# | |||
# Calling this script install-sh is preferred over install.sh, to prevent | |||
# `make' implicit rules from creating a file called install from it | |||
# when there is no Makefile. | |||
# | |||
# This script is compatible with the BSD install script, but was written | |||
# from scratch. It can only install one file at a time, a restriction | |||
# shared with many OS's install programs. | |||
# set DOITPROG to echo to test this script | |||
# Don't use :- since 4.3BSD and earlier shells don't like it. | |||
doit="${DOITPROG-}" | |||
# put in absolute paths if you don't have them in your path; or use env. vars. | |||
mvprog="${MVPROG-mv}" | |||
cpprog="${CPPROG-cp}" | |||
chmodprog="${CHMODPROG-chmod}" | |||
chownprog="${CHOWNPROG-chown}" | |||
chgrpprog="${CHGRPPROG-chgrp}" | |||
stripprog="${STRIPPROG-strip}" | |||
rmprog="${RMPROG-rm}" | |||
mkdirprog="${MKDIRPROG-mkdir}" | |||
chmodcmd="$chmodprog 0755" | |||
chowncmd= | |||
chgrpcmd= | |||
stripcmd= | |||
rmcmd="$rmprog -f" | |||
mvcmd="$mvprog" | |||
src= | |||
dst= | |||
dir_arg= | |||
dstarg= | |||
no_target_directory= | |||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |||
or: $0 [OPTION]... SRCFILES... DIRECTORY | |||
or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |||
or: $0 [OPTION]... -d DIRECTORIES... | |||
In the 1st form, copy SRCFILE to DSTFILE. | |||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |||
In the 4th, create DIRECTORIES. | |||
Options: | |||
-c (ignored) | |||
-d create directories instead of installing files. | |||
-g GROUP $chgrpprog installed files to GROUP. | |||
-m MODE $chmodprog installed files to MODE. | |||
-o USER $chownprog installed files to USER. | |||
-s $stripprog installed files. | |||
-t DIRECTORY install into DIRECTORY. | |||
-T report an error if DSTFILE is a directory. | |||
--help display this help and exit. | |||
--version display version info and exit. | |||
Environment variables override the default commands: | |||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG | |||
" | |||
while test -n "$1"; do | |||
case $1 in | |||
-c) shift | |||
continue;; | |||
-d) dir_arg=true | |||
shift | |||
continue;; | |||
-g) chgrpcmd="$chgrpprog $2" | |||
shift | |||
shift | |||
continue;; | |||
--help) echo "$usage"; exit 0;; | |||
-m) chmodcmd="$chmodprog $2" | |||
shift | |||
shift | |||
continue;; | |||
-o) chowncmd="$chownprog $2" | |||
shift | |||
shift | |||
continue;; | |||
-s) stripcmd=$stripprog | |||
shift | |||
continue;; | |||
-t) dstarg=$2 | |||
shift | |||
shift | |||
continue;; | |||
-T) no_target_directory=true | |||
shift | |||
continue;; | |||
--version) echo "$0 $scriptversion"; exit 0;; | |||
*) # When -d is used, all remaining arguments are directories to create. | |||
# When -t is used, the destination is already specified. | |||
test -n "$dir_arg$dstarg" && break | |||
# Otherwise, the last argument is the destination. Remove it from $@. | |||
for arg | |||
do | |||
if test -n "$dstarg"; then | |||
# $@ is not empty: it contains at least $arg. | |||
set fnord "$@" "$dstarg" | |||
shift # fnord | |||
fi | |||
shift # arg | |||
dstarg=$arg | |||
done | |||
break;; | |||
esac | |||
done | |||
if test -z "$1"; then | |||
if test -z "$dir_arg"; then | |||
echo "$0: no input file specified." >&2 | |||
exit 1 | |||
fi | |||
# It's OK to call `install-sh -d' without argument. | |||
# This can happen when creating conditional directories. | |||
exit 0 | |||
fi | |||
for src | |||
do | |||
# Protect names starting with `-'. | |||
case $src in | |||
-*) src=./$src ;; | |||
esac | |||
if test -n "$dir_arg"; then | |||
dst=$src | |||
src= | |||
if test -d "$dst"; then | |||
mkdircmd=: | |||
chmodcmd= | |||
else | |||
mkdircmd=$mkdirprog | |||
fi | |||
else | |||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |||
# might cause directories to be created, which would be especially bad | |||
# if $src (and thus $dsttmp) contains '*'. | |||
if test ! -f "$src" && test ! -d "$src"; then | |||
echo "$0: $src does not exist." >&2 | |||
exit 1 | |||
fi | |||
if test -z "$dstarg"; then | |||
echo "$0: no destination specified." >&2 | |||
exit 1 | |||
fi | |||
dst=$dstarg | |||
# Protect names starting with `-'. | |||
case $dst in | |||
-*) dst=./$dst ;; | |||
esac | |||
# If destination is a directory, append the input filename; won't work | |||
# if double slashes aren't ignored. | |||
if test -d "$dst"; then | |||
if test -n "$no_target_directory"; then | |||
echo "$0: $dstarg: Is a directory" >&2 | |||
exit 1 | |||
fi | |||
dst=$dst/`basename "$src"` | |||
fi | |||
fi | |||
# This sed command emulates the dirname command. | |||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` | |||
# Make sure that the destination directory exists. | |||
# Skip lots of stat calls in the usual case. | |||
if test ! -d "$dstdir"; then | |||
defaultIFS=' | |||
' | |||
IFS="${IFS-$defaultIFS}" | |||
oIFS=$IFS | |||
# Some sh's can't handle IFS=/ for some reason. | |||
IFS='%' | |||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` | |||
IFS=$oIFS | |||
pathcomp= | |||
while test $# -ne 0 ; do | |||
pathcomp=$pathcomp$1 | |||
shift | |||
if test ! -d "$pathcomp"; then | |||
$mkdirprog "$pathcomp" | |||
# mkdir can fail with a `File exist' error in case several | |||
# install-sh are creating the directory concurrently. This | |||
# is OK. | |||
test -d "$pathcomp" || exit | |||
fi | |||
pathcomp=$pathcomp/ | |||
done | |||
fi | |||
if test -n "$dir_arg"; then | |||
$doit $mkdircmd "$dst" \ | |||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ | |||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ | |||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ | |||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } | |||
else | |||
dstfile=`basename "$dst"` | |||
# Make a couple of temp file names in the proper directory. | |||
dsttmp=$dstdir/_inst.$$_ | |||
rmtmp=$dstdir/_rm.$$_ | |||
# Trap to clean up those temp files at exit. | |||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |||
trap '(exit $?); exit' 1 2 13 15 | |||
# Copy the file name to the temp name. | |||
$doit $cpprog "$src" "$dsttmp" && | |||
# and set any options; do chmod last to preserve setuid bits. | |||
# | |||
# If any of these fail, we abort the whole thing. If we want to | |||
# ignore errors from any of these, just make sure not to ignore | |||
# errors from the above "$doit $cpprog $src $dsttmp" command. | |||
# | |||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ | |||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ | |||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ | |||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && | |||
# Now rename the file to the real destination. | |||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ | |||
|| { | |||
# The rename failed, perhaps because mv can't rename something else | |||
# to itself, or perhaps because mv is so ancient that it does not | |||
# support -f. | |||
# Now remove or move aside any old file at destination location. | |||
# We try this two ways since rm can't unlink itself on some | |||
# systems and the destination file might be busy for other | |||
# reasons. In this case, the final cleanup might fail but the new | |||
# file should still install successfully. | |||
{ | |||
if test -f "$dstdir/$dstfile"; then | |||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ | |||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ | |||
|| { | |||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 | |||
(exit 1); exit | |||
} | |||
else | |||
: | |||
fi | |||
} && | |||
# Now rename the file to the real destination. | |||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" | |||
} | |||
} | |||
fi || { (exit 1); exit; } | |||
done | |||
# The final little trick to "correctly" pass the exit status to the exit trap. | |||
{ | |||
(exit 0); exit | |||
} | |||
# Local variables: | |||
# eval: (add-hook 'write-file-hooks 'time-stamp) | |||
# time-stamp-start: "scriptversion=" | |||
# time-stamp-format: "%:y-%02m-%02d.%02H" | |||
# time-stamp-end: "$" | |||
# End: |
@@ -0,0 +1,111 @@ | |||
#! /bin/sh | |||
# mkinstalldirs --- make directory hierarchy | |||
# Author: Noah Friedman <friedman@prep.ai.mit.edu> | |||
# Created: 1993-05-16 | |||
# Public domain | |||
errstatus=0 | |||
dirmode="" | |||
usage="\ | |||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." | |||
# process command line arguments | |||
while test $# -gt 0 ; do | |||
case $1 in | |||
-h | --help | --h*) # -h for help | |||
echo "$usage" 1>&2 | |||
exit 0 | |||
;; | |||
-m) # -m PERM arg | |||
shift | |||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } | |||
dirmode=$1 | |||
shift | |||
;; | |||
--) # stop option processing | |||
shift | |||
break | |||
;; | |||
-*) # unknown option | |||
echo "$usage" 1>&2 | |||
exit 1 | |||
;; | |||
*) # first non-opt arg | |||
break | |||
;; | |||
esac | |||
done | |||
for file | |||
do | |||
if test -d "$file"; then | |||
shift | |||
else | |||
break | |||
fi | |||
done | |||
case $# in | |||
0) exit 0 ;; | |||
esac | |||
case $dirmode in | |||
'') | |||
if mkdir -p -- . 2>/dev/null; then | |||
echo "mkdir -p -- $*" | |||
exec mkdir -p -- "$@" | |||
fi | |||
;; | |||
*) | |||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then | |||
echo "mkdir -m $dirmode -p -- $*" | |||
exec mkdir -m "$dirmode" -p -- "$@" | |||
fi | |||
;; | |||
esac | |||
for file | |||
do | |||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` | |||
shift | |||
pathcomp= | |||
for d | |||
do | |||
pathcomp="$pathcomp$d" | |||
case $pathcomp in | |||
-*) pathcomp=./$pathcomp ;; | |||
esac | |||
if test ! -d "$pathcomp"; then | |||
echo "mkdir $pathcomp" | |||
mkdir "$pathcomp" || lasterr=$? | |||
if test ! -d "$pathcomp"; then | |||
errstatus=$lasterr | |||
else | |||
if test ! -z "$dirmode"; then | |||
echo "chmod $dirmode $pathcomp" | |||
lasterr="" | |||
chmod "$dirmode" "$pathcomp" || lasterr=$? | |||
if test ! -z "$lasterr"; then | |||
errstatus=$lasterr | |||
fi | |||
fi | |||
fi | |||
fi | |||
pathcomp="$pathcomp/" | |||
done | |||
done | |||
exit $errstatus | |||
# Local Variables: | |||
# mode: shell-script | |||
# sh-indentation: 2 | |||
# End: | |||
# mkinstalldirs ends here |
@@ -1,7 +0,0 @@ | |||
noinst_LTLIBRARIES = libtx.la | |||
libtx_la_SOURCES = TXButton.h TXDialog.h TXEntry.h TXCheckbox.h TXImage.cxx \ | |||
TXImage.h TXLabel.h TXMenu.cxx TXMenu.h TXMsgBox.h TXScrollbar.cxx \ | |||
TXScrollbar.h TXViewport.cxx TXViewport.h TXWindow.cxx TXWindow.h | |||
libtx_la_CPPFLAGS = -I$(COMMON_DIR) |
@@ -0,0 +1,17 @@ | |||
SRCS = TXWindow.cxx TXScrollbar.cxx TXViewport.cxx TXImage.cxx TXMenu.cxx | |||
OBJS = $(SRCS:.cxx=.o) | |||
DIR_CPPFLAGS = -I$(COMMON) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS | |||
library = libtx.a | |||
all:: $(library) | |||
$(library): $(OBJS) | |||
rm -f $(library) | |||
$(AR) $(library) $(OBJS) | |||
$(RANLIB) $(library) | |||
# followed by boilerplate.mk |
@@ -19,9 +19,6 @@ | |||
// TXImage.cxx | |||
// | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <stdio.h> | |||
#include <stdlib.h> |
@@ -33,10 +33,6 @@ | |||
#ifndef __TXIMAGE_H__ | |||
#define __TXIMAGE_H__ | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <X11/Xlib.h> | |||
#include <rfb/PixelBuffer.h> | |||
#include <rfb/ColourMap.h> |
@@ -1,9 +0,0 @@ | |||
bin_PROGRAMS = vncconfig | |||
vncconfig_SOURCES = buildtime.c QueryConnectDialog.cxx QueryConnectDialog.h \ | |||
vncconfig.cxx vncExt.c vncExt.h | |||
vncconfig_CPPFLAGS = -I$(COMMON_DIR) -I$(TX_DIR) | |||
vncconfig_LDADD = $(TX_LIBS) $(RFB_LIBS) $(NETWORK_LIBS) $(RDR_LIBS) -lX11 \ | |||
-lXext |
@@ -0,0 +1,24 @@ | |||
SRCS = vncExt.c vncconfig.cxx QueryConnectDialog.cxx | |||
OBJS = vncExt.o vncconfig.o QueryConnectDialog.o | |||
program = vncconfig | |||
DEP_LIBS = $(TOP)/tx/libtx.a $(COMMON)/rfb/librfb.a \ | |||
$(COMMON)/network/libnetwork.a \ | |||
$(COMMON)/rdr/librdr.a | |||
EXTRA_LIBS = @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@ | |||
DIR_CPPFLAGS = -I$(COMMON) -I$(TOP)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS | |||
all:: $(program) | |||
$(program): $(OBJS) buildtime.o $(DEP_LIBS) | |||
rm -f $(program) | |||
$(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) | |||
buildtime.o: $(OBJS) $(DEP_LIBS) | |||
# followed by boilerplate.mk |
@@ -0,0 +1,97 @@ | |||
#!/bin/sh | |||
# | |||
# Copyright (C) 2002-2005 RealVNC Ltd. | |||
# | |||
# This is free software; you can redistribute it and/or modify | |||
# it under the terms of the GNU General Public License as published by | |||
# the Free Software Foundation; either version 2 of the License, or | |||
# (at your option) any later version. | |||
# | |||
# This software is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU General Public License for more details. | |||
# | |||
# You should have received a copy of the GNU General Public License | |||
# along with this software; if not, write to the Free Software | |||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |||
# USA. | |||
# | |||
# | |||
# vncinstall - copy the VNC programs to an installation directory. | |||
# Also tries to install the manual pages somewhere sensible. | |||
# | |||
if [ $# -lt 1 -o $# -gt 3 -o ! -d "$1" ]; then | |||
echo "usage: $0 <installation-directory> [<man-page-directory>] [<module-directory>]" | |||
echo "e.g. $0 /usr/local/bin" | |||
exit 1 | |||
fi | |||
dst=$1 | |||
shift | |||
if [ $# -gt 0 ]; then | |||
mandst="$1/man1" | |||
shift | |||
if [ $# -gt 0 ]; then | |||
moduledst=$1 | |||
shift | |||
else | |||
moduledst=/usr/X11R6/lib/modules/extensions | |||
fi | |||
else | |||
if [ "`basename $dst`" = bin ]; then | |||
mandst="`dirname $dst`/man/man1" | |||
if [ ! -d "$mandst" -a "$dst" = /usr/bin ]; then | |||
mandst=/usr/share/man/man1 | |||
fi | |||
fi | |||
fi | |||
if [ "$mandst" != "" ]; then | |||
if [ ! -d "$mandst" -o ! -w "$mandst" ]; then | |||
echo "Can't install manual pages to $mandst" | |||
mandst="" | |||
fi | |||
fi | |||
for f in xc/programs/Xserver/Xvnc vncviewer/vncviewer vncpasswd/vncpasswd \ | |||
vncconfig/vncconfig vncserver x0vncserver/x0vncserver; do | |||
if [ ! -f $f ]; then | |||
echo "Couldn't find $f" | |||
else | |||
if cmp -s $f $dst/`basename $f`; then | |||
echo "`basename $f` hasn't changed" | |||
else | |||
echo "Copying $f to $dst" | |||
cp -pf $f $dst | |||
chmod 0555 $dst/`basename $f` | |||
fi | |||
if [ -f $f.man ]; then | |||
if [ "$mandst" != "" -a -d "$mandst" ]; then | |||
if cmp -s $f.man $mandst/`basename $f.1`; then | |||
echo "`basename $f.man` hasn't changed" | |||
else | |||
echo "Copying $f.man to $mandst/`basename $f.1`" | |||
cp -pf $f.man $mandst/`basename $f.1` | |||
chmod 0444 $mandst/`basename $f.1` | |||
fi | |||
fi | |||
fi | |||
fi | |||
done | |||
vncModule=xc/programs/Xserver/vnc/module/vnc.so | |||
if [ -f "$vncModule" -a -d "$moduledst" ]; then | |||
if cmp -s $vncModule $moduledst/`basename $vncModule`; then | |||
echo "`basename $vncModule` hasn't changed" | |||
else | |||
echo "Copying $vncModule to $moduledst" | |||
cp -pf $vncModule $moduledst | |||
chmod 0555 $moduledst/`basename $vncModule` | |||
fi | |||
fi |
@@ -0,0 +1,4 @@ | |||
SRCS = include.c main.c parse.c pr.c cppsetup.c ifparser.c | |||
OBJS = $(SRCS:.c=.o) | |||
vncmkdepend: $(OBJS) | |||
$(CC) $^ -o $@ |
@@ -0,0 +1,39 @@ | |||
vncmkdepend | |||
=========== | |||
This code is taken from the X11R6 makedepend sources. All I have done is: | |||
* Remove all predefined symbols, include directories and other | |||
platform-specific behaviour. Its behaviour should be the same on all | |||
platforms. All symbols and include directories must be explicitly given on | |||
the command line with -D and -I flags. | |||
* Fix processing of numbers in #if expressions. | |||
* Fix processing of -D flag. | |||
* Fix C++ comment handling. | |||
* Improve #error warnings. | |||
* Change the output so that processing <name>.<suffix> produces <name>.d | |||
The copyright on the code is: | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. |
@@ -0,0 +1,242 @@ | |||
/* $XConsortium: cppsetup.c,v 1.13 94/04/17 20:10:32 gildea Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include "def.h" | |||
#ifdef CPP | |||
/* | |||
* This file is strictly for the sake of cpy.y and yylex.c (if | |||
* you indeed have the source for cpp). | |||
*/ | |||
#define IB 1 | |||
#define SB 2 | |||
#define NB 4 | |||
#define CB 8 | |||
#define QB 16 | |||
#define WB 32 | |||
#define SALT '#' | |||
#if pdp11 | vax | ns16000 | mc68000 | ibm032 | |||
#define COFF 128 | |||
#else | |||
#define COFF 0 | |||
#endif | |||
/* | |||
* These variables used by cpy.y and yylex.c | |||
*/ | |||
extern char *outp, *inp, *newp, *pend; | |||
extern char *ptrtab; | |||
extern char fastab[]; | |||
extern char slotab[]; | |||
/* | |||
* cppsetup | |||
*/ | |||
struct filepointer *currentfile; | |||
struct inclist *currentinc; | |||
cppsetup(line, filep, inc) | |||
register char *line; | |||
register struct filepointer *filep; | |||
register struct inclist *inc; | |||
{ | |||
register char *p, savec; | |||
static boolean setupdone = FALSE; | |||
boolean value; | |||
if (!setupdone) { | |||
cpp_varsetup(); | |||
setupdone = TRUE; | |||
} | |||
currentfile = filep; | |||
currentinc = inc; | |||
inp = newp = line; | |||
for (p=newp; *p; p++) | |||
; | |||
/* | |||
* put a newline back on the end, and set up pend, etc. | |||
*/ | |||
*p++ = '\n'; | |||
savec = *p; | |||
*p = '\0'; | |||
pend = p; | |||
ptrtab = slotab+COFF; | |||
*--inp = SALT; | |||
outp=inp; | |||
value = yyparse(); | |||
*p = savec; | |||
return(value); | |||
} | |||
struct symtab *lookup(symbol) | |||
char *symbol; | |||
{ | |||
static struct symtab undefined; | |||
struct symtab *sp; | |||
sp = isdefined(symbol, currentinc, NULL); | |||
if (sp == NULL) { | |||
sp = &undefined; | |||
sp->s_value = NULL; | |||
} | |||
return (sp); | |||
} | |||
pperror(tag, x0,x1,x2,x3,x4) | |||
int tag,x0,x1,x2,x3,x4; | |||
{ | |||
warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line); | |||
warning(x0,x1,x2,x3,x4); | |||
} | |||
yyerror(s) | |||
register char *s; | |||
{ | |||
fatalerr("Fatal error: %s\n", s); | |||
} | |||
#else /* not CPP */ | |||
#include "ifparser.h" | |||
struct _parse_data { | |||
struct filepointer *filep; | |||
struct inclist *inc; | |||
const char *line; | |||
}; | |||
static const char * | |||
_my_if_errors (ip, cp, expecting) | |||
IfParser *ip; | |||
const char *cp; | |||
const char *expecting; | |||
{ | |||
struct _parse_data *pd = (struct _parse_data *) ip->data; | |||
int lineno = pd->filep->f_line; | |||
char *filename = pd->inc->i_file; | |||
char prefix[300]; | |||
int prefixlen; | |||
int i; | |||
sprintf (prefix, "\"%s\":%d", filename, lineno); | |||
prefixlen = strlen(prefix); | |||
fprintf (stderr, "%s: %s", prefix, pd->line); | |||
i = cp - pd->line; | |||
if (i > 0 && pd->line[i-1] != '\n') { | |||
putc ('\n', stderr); | |||
} | |||
for (i += prefixlen + 3; i > 0; i--) { | |||
putc (' ', stderr); | |||
} | |||
fprintf (stderr, "^--- expecting %s\n", expecting); | |||
return NULL; | |||
} | |||
#define MAXNAMELEN 256 | |||
static struct symtab * | |||
_lookup_variable (ip, var, len) | |||
IfParser *ip; | |||
const char *var; | |||
int len; | |||
{ | |||
char tmpbuf[MAXNAMELEN + 1]; | |||
struct _parse_data *pd = (struct _parse_data *) ip->data; | |||
if (len > MAXNAMELEN) | |||
return 0; | |||
strncpy (tmpbuf, var, len); | |||
tmpbuf[len] = '\0'; | |||
return isdefined (tmpbuf, pd->inc, NULL); | |||
} | |||
static int | |||
_my_eval_defined (ip, var, len) | |||
IfParser *ip; | |||
const char *var; | |||
int len; | |||
{ | |||
if (_lookup_variable (ip, var, len)) | |||
return 1; | |||
else | |||
return 0; | |||
} | |||
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_') | |||
static int | |||
_my_eval_variable (ip, var, len) | |||
IfParser *ip; | |||
const char *var; | |||
int len; | |||
{ | |||
struct symtab *s; | |||
s = _lookup_variable (ip, var, len); | |||
if (!s) | |||
return 0; | |||
do { | |||
var = s->s_value; | |||
if (!isvarfirstletter(*var)) | |||
break; | |||
s = _lookup_variable (ip, var, strlen(var)); | |||
} while (s); | |||
return atoi(var); | |||
} | |||
cppsetup(line, filep, inc) | |||
register char *line; | |||
register struct filepointer *filep; | |||
register struct inclist *inc; | |||
{ | |||
IfParser ip; | |||
struct _parse_data pd; | |||
int val = 0; | |||
pd.filep = filep; | |||
pd.inc = inc; | |||
pd.line = line; | |||
ip.funcs.handle_error = _my_if_errors; | |||
ip.funcs.eval_defined = _my_eval_defined; | |||
ip.funcs.eval_variable = _my_eval_variable; | |||
ip.data = (char *) &pd; | |||
(void) ParseIfExpression (&ip, line, &val); | |||
if (val) | |||
return IF; | |||
else | |||
return IFFALSE; | |||
} | |||
#endif /* CPP */ | |||
@@ -0,0 +1,140 @@ | |||
/* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include <stdio.h> | |||
#include <ctype.h> | |||
#ifndef X_NOT_POSIX | |||
#ifndef _POSIX_SOURCE | |||
#define _POSIX_SOURCE | |||
#endif | |||
#endif | |||
#include <sys/types.h> | |||
#include <fcntl.h> | |||
#include <sys/stat.h> | |||
#define MAXDEFINES 512 | |||
#define MAXFILES 512 | |||
#define MAXDIRS 64 | |||
#define SYMTABINC 10 /* must be > 1 for define() to work right */ | |||
#define TRUE 1 | |||
#define FALSE 0 | |||
/* the following must match the directives table in main.c */ | |||
#define IF 0 | |||
#define IFDEF 1 | |||
#define IFNDEF 2 | |||
#define ELSE 3 | |||
#define ENDIF 4 | |||
#define DEFINE 5 | |||
#define UNDEF 6 | |||
#define INCLUDE 7 | |||
#define LINE 8 | |||
#define PRAGMA 9 | |||
#define ERROR 10 | |||
#define IDENT 11 | |||
#define SCCS 12 | |||
#define ELIF 13 | |||
#define EJECT 14 | |||
#define IFFALSE 15 /* pseudo value --- never matched */ | |||
#define ELIFFALSE 16 /* pseudo value --- never matched */ | |||
#define INCLUDEDOT 17 /* pseudo value --- never matched */ | |||
#define IFGUESSFALSE 18 /* pseudo value --- never matched */ | |||
#define ELIFGUESSFALSE 19 /* pseudo value --- never matched */ | |||
#ifdef DEBUG | |||
extern int _debugmask; | |||
/* | |||
* debug levels are: | |||
* | |||
* 0 show ifn*(def)*,endif | |||
* 1 trace defined/!defined | |||
* 2 show #include | |||
* 3 show #include SYMBOL | |||
* 4-6 unused | |||
*/ | |||
#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; } | |||
#else | |||
#define debug(level,arg) /**/ | |||
#endif /* DEBUG */ | |||
typedef unsigned char boolean; | |||
struct symtab { | |||
char *s_name; | |||
char *s_value; | |||
}; | |||
struct inclist { | |||
char *i_incstring; /* string from #include line */ | |||
char *i_file; /* path name of the include file */ | |||
struct inclist **i_list; /* list of files it itself includes */ | |||
int i_listlen; /* length of i_list */ | |||
struct symtab *i_defs; /* symbol table for this file */ | |||
int i_ndefs; /* current # defines */ | |||
int i_deflen; /* amount of space in table */ | |||
boolean i_defchecked; /* whether defines have been checked */ | |||
boolean i_notified; /* whether we have revealed includes */ | |||
boolean i_marked; /* whether it's in the makefile */ | |||
boolean i_searched; /* whether we have read this */ | |||
boolean i_included_sym; /* whether #include SYMBOL was found */ | |||
/* Can't use i_list if TRUE */ | |||
}; | |||
struct filepointer { | |||
char *f_p; | |||
char *f_base; | |||
char *f_end; | |||
long f_len; | |||
long f_line; | |||
}; | |||
#ifndef X_NOT_STDC_ENV | |||
#include <stdlib.h> | |||
#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ | |||
char *malloc(), *realloc(); | |||
#endif /* macII */ | |||
#else | |||
char *malloc(); | |||
char *realloc(); | |||
#endif | |||
char *copy(); | |||
char *base_name(); | |||
char *getline(); | |||
struct symtab *slookup(); | |||
struct symtab *isdefined(); | |||
struct symtab *fdefined(); | |||
struct filepointer *getfile(); | |||
struct inclist *newinclude(); | |||
struct inclist *inc_path(); | |||
#if NeedVarargsPrototypes | |||
extern fatalerr(char *, ...); | |||
extern warning(char *, ...); | |||
extern warning1(char *, ...); | |||
#endif |
@@ -0,0 +1,445 @@ | |||
/* | |||
* $XConsortium: ifparser.c,v 1.7 94/01/18 21:30:50 rws Exp $ | |||
* | |||
* Copyright 1992 Network Computing Devices, Inc. | |||
* | |||
* Permission to use, copy, modify, and distribute this software and its | |||
* documentation for any purpose and without fee is hereby granted, provided | |||
* that the above copyright notice appear in all copies and that both that | |||
* copyright notice and this permission notice appear in supporting | |||
* documentation, and that the name of Network Computing Devices may not be | |||
* used in advertising or publicity pertaining to distribution of the software | |||
* without specific, written prior permission. Network Computing Devices makes | |||
* no representations about the suitability of this software for any purpose. | |||
* It is provided ``as is'' without express or implied warranty. | |||
* | |||
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | |||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, | |||
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL, | |||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | |||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |||
* PERFORMANCE OF THIS SOFTWARE. | |||
* | |||
* Author: Jim Fulton | |||
* Network Computing Devices, Inc. | |||
* | |||
* Simple if statement processor | |||
* | |||
* This module can be used to evaluate string representations of C language | |||
* if constructs. It accepts the following grammar: | |||
* | |||
* EXPRESSION := VALUE | |||
* | VALUE BINOP EXPRESSION | |||
* | |||
* VALUE := '(' EXPRESSION ')' | |||
* | '!' VALUE | |||
* | '-' VALUE | |||
* | 'defined' '(' variable ')' | |||
* | 'defined' variable | |||
* | # variable '(' variable-list ')' | |||
* | variable | |||
* | number | |||
* | |||
* BINOP := '*' | '/' | '%' | |||
* | '+' | '-' | |||
* | '<<' | '>>' | |||
* | '<' | '>' | '<=' | '>=' | |||
* | '==' | '!=' | |||
* | '&' | '|' | |||
* | '&&' | '||' | |||
* | |||
* The normal C order of precidence is supported. | |||
* | |||
* | |||
* External Entry Points: | |||
* | |||
* ParseIfExpression parse a string for #if | |||
*/ | |||
#include "ifparser.h" | |||
#include <ctype.h> | |||
/**************************************************************************** | |||
Internal Macros and Utilities for Parser | |||
****************************************************************************/ | |||
#define DO(val) if (!(val)) return NULL | |||
#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff)) | |||
#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++ | |||
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_') | |||
static const char * | |||
parse_variable (g, cp, varp) | |||
IfParser *g; | |||
const char *cp; | |||
const char **varp; | |||
{ | |||
SKIPSPACE (cp); | |||
if (!isvarfirstletter (*cp)) | |||
return CALLFUNC(g, handle_error) (g, cp, "variable name"); | |||
*varp = cp; | |||
/* EMPTY */ | |||
for (cp++; isalnum(*cp) || *cp == '_'; cp++) ; | |||
return cp; | |||
} | |||
static const char * | |||
parse_number (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
SKIPSPACE (cp); | |||
if (!isdigit(*cp)) | |||
return CALLFUNC(g, handle_error) (g, cp, "number"); | |||
*valp = strtol(cp, &cp, 0); | |||
return cp; | |||
} | |||
static const char * | |||
parse_value (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
const char *var; | |||
*valp = 0; | |||
SKIPSPACE (cp); | |||
if (!*cp) | |||
return cp; | |||
switch (*cp) { | |||
case '(': | |||
DO (cp = ParseIfExpression (g, cp + 1, valp)); | |||
SKIPSPACE (cp); | |||
if (*cp != ')') | |||
return CALLFUNC(g, handle_error) (g, cp, ")"); | |||
return cp + 1; /* skip the right paren */ | |||
case '!': | |||
DO (cp = parse_value (g, cp + 1, valp)); | |||
*valp = !(*valp); | |||
return cp; | |||
case '-': | |||
DO (cp = parse_value (g, cp + 1, valp)); | |||
*valp = -(*valp); | |||
return cp; | |||
case '#': | |||
DO (cp = parse_variable (g, cp + 1, &var)); | |||
SKIPSPACE (cp); | |||
if (*cp != '(') | |||
return CALLFUNC(g, handle_error) (g, cp, "("); | |||
do { | |||
DO (cp = parse_variable (g, cp + 1, &var)); | |||
SKIPSPACE (cp); | |||
} while (*cp && *cp != ')'); | |||
if (*cp != ')') | |||
return CALLFUNC(g, handle_error) (g, cp, ")"); | |||
*valp = 1; /* XXX */ | |||
return cp + 1; | |||
case 'd': | |||
if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) { | |||
int paren = 0; | |||
cp += 7; | |||
SKIPSPACE (cp); | |||
if (*cp == '(') { | |||
paren = 1; | |||
cp++; | |||
} | |||
DO (cp = parse_variable (g, cp, &var)); | |||
SKIPSPACE (cp); | |||
if (paren && *cp != ')') | |||
return CALLFUNC(g, handle_error) (g, cp, ")"); | |||
*valp = (*(g->funcs.eval_defined)) (g, var, cp - var); | |||
return cp + paren; /* skip the right paren */ | |||
} | |||
/* fall out */ | |||
} | |||
if (isdigit(*cp)) { | |||
DO (cp = parse_number (g, cp, valp)); | |||
} else if (!isvarfirstletter(*cp)) | |||
return CALLFUNC(g, handle_error) (g, cp, "variable or number"); | |||
else { | |||
DO (cp = parse_variable (g, cp, &var)); | |||
*valp = (*(g->funcs.eval_variable)) (g, var, cp - var); | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_product (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_value (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '*': | |||
DO (cp = parse_product (g, cp + 1, &rightval)); | |||
*valp = (*valp * rightval); | |||
break; | |||
case '/': | |||
DO (cp = parse_product (g, cp + 1, &rightval)); | |||
*valp = (*valp / rightval); | |||
break; | |||
case '%': | |||
DO (cp = parse_product (g, cp + 1, &rightval)); | |||
*valp = (*valp % rightval); | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_sum (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_product (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '+': | |||
DO (cp = parse_sum (g, cp + 1, &rightval)); | |||
*valp = (*valp + rightval); | |||
break; | |||
case '-': | |||
DO (cp = parse_sum (g, cp + 1, &rightval)); | |||
*valp = (*valp - rightval); | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_shift (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_sum (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '<': | |||
if (cp[1] == '<') { | |||
DO (cp = parse_shift (g, cp + 2, &rightval)); | |||
*valp = (*valp << rightval); | |||
} | |||
break; | |||
case '>': | |||
if (cp[1] == '>') { | |||
DO (cp = parse_shift (g, cp + 2, &rightval)); | |||
*valp = (*valp >> rightval); | |||
} | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_inequality (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_shift (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '<': | |||
if (cp[1] == '=') { | |||
DO (cp = parse_inequality (g, cp + 2, &rightval)); | |||
*valp = (*valp <= rightval); | |||
} else { | |||
DO (cp = parse_inequality (g, cp + 1, &rightval)); | |||
*valp = (*valp < rightval); | |||
} | |||
break; | |||
case '>': | |||
if (cp[1] == '=') { | |||
DO (cp = parse_inequality (g, cp + 2, &rightval)); | |||
*valp = (*valp >= rightval); | |||
} else { | |||
DO (cp = parse_inequality (g, cp + 1, &rightval)); | |||
*valp = (*valp > rightval); | |||
} | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_equality (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_inequality (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '=': | |||
if (cp[1] == '=') | |||
cp++; | |||
DO (cp = parse_equality (g, cp + 1, &rightval)); | |||
*valp = (*valp == rightval); | |||
break; | |||
case '!': | |||
if (cp[1] != '=') | |||
break; | |||
DO (cp = parse_equality (g, cp + 2, &rightval)); | |||
*valp = (*valp != rightval); | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_band (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_equality (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '&': | |||
if (cp[1] != '&') { | |||
DO (cp = parse_band (g, cp + 1, &rightval)); | |||
*valp = (*valp & rightval); | |||
} | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_bor (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_band (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '|': | |||
if (cp[1] != '|') { | |||
DO (cp = parse_bor (g, cp + 1, &rightval)); | |||
*valp = (*valp | rightval); | |||
} | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_land (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_bor (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '&': | |||
if (cp[1] != '&') | |||
return CALLFUNC(g, handle_error) (g, cp, "&&"); | |||
DO (cp = parse_land (g, cp + 2, &rightval)); | |||
*valp = (*valp && rightval); | |||
break; | |||
} | |||
return cp; | |||
} | |||
static const char * | |||
parse_lor (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
int rightval; | |||
DO (cp = parse_land (g, cp, valp)); | |||
SKIPSPACE (cp); | |||
switch (*cp) { | |||
case '|': | |||
if (cp[1] != '|') | |||
return CALLFUNC(g, handle_error) (g, cp, "||"); | |||
DO (cp = parse_lor (g, cp + 2, &rightval)); | |||
*valp = (*valp || rightval); | |||
break; | |||
} | |||
return cp; | |||
} | |||
/**************************************************************************** | |||
External Entry Points | |||
****************************************************************************/ | |||
const char * | |||
ParseIfExpression (g, cp, valp) | |||
IfParser *g; | |||
const char *cp; | |||
int *valp; | |||
{ | |||
return parse_lor (g, cp, valp); | |||
} | |||
@@ -0,0 +1,76 @@ | |||
/* | |||
* $XConsortium: ifparser.h,v 1.1 92/08/22 13:05:39 rws Exp $ | |||
* | |||
* Copyright 1992 Network Computing Devices, Inc. | |||
* | |||
* Permission to use, copy, modify, and distribute this software and its | |||
* documentation for any purpose and without fee is hereby granted, provided | |||
* that the above copyright notice appear in all copies and that both that | |||
* copyright notice and this permission notice appear in supporting | |||
* documentation, and that the name of Network Computing Devices may not be | |||
* used in advertising or publicity pertaining to distribution of the software | |||
* without specific, written prior permission. Network Computing Devices makes | |||
* no representations about the suitability of this software for any purpose. | |||
* It is provided ``as is'' without express or implied warranty. | |||
* | |||
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | |||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, | |||
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL, | |||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | |||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |||
* PERFORMANCE OF THIS SOFTWARE. | |||
* | |||
* Author: Jim Fulton | |||
* Network Computing Devices, Inc. | |||
* | |||
* Simple if statement processor | |||
* | |||
* This module can be used to evaluate string representations of C language | |||
* if constructs. It accepts the following grammar: | |||
* | |||
* EXPRESSION := VALUE | |||
* | VALUE BINOP EXPRESSION | |||
* | |||
* VALUE := '(' EXPRESSION ')' | |||
* | '!' VALUE | |||
* | '-' VALUE | |||
* | 'defined' '(' variable ')' | |||
* | variable | |||
* | number | |||
* | |||
* BINOP := '*' | '/' | '%' | |||
* | '+' | '-' | |||
* | '<<' | '>>' | |||
* | '<' | '>' | '<=' | '>=' | |||
* | '==' | '!=' | |||
* | '&' | '|' | |||
* | '&&' | '||' | |||
* | |||
* The normal C order of precidence is supported. | |||
* | |||
* | |||
* External Entry Points: | |||
* | |||
* ParseIfExpression parse a string for #if | |||
*/ | |||
#include <stdio.h> | |||
#define const /**/ | |||
typedef int Bool; | |||
#define False 0 | |||
#define True 1 | |||
typedef struct _if_parser { | |||
struct { /* functions */ | |||
char *(*handle_error) (/* struct _if_parser *, const char *, | |||
const char * */); | |||
int (*eval_variable) (/* struct _if_parser *, const char *, int */); | |||
int (*eval_defined) (/* struct _if_parser *, const char *, int */); | |||
} funcs; | |||
char *data; | |||
} IfParser; | |||
char *ParseIfExpression (/* IfParser *, const char *, int * */); | |||
@@ -0,0 +1,312 @@ | |||
/* $XConsortium: include.c,v 1.17 94/12/05 19:33:08 gildea Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include "def.h" | |||
extern struct inclist inclist[ MAXFILES ], | |||
*inclistp; | |||
extern char *includedirs[ ]; | |||
extern char *notdotdot[ ]; | |||
extern boolean show_where_not; | |||
extern boolean warn_multiple; | |||
struct inclist *inc_path(file, include, dot) | |||
register char *file, | |||
*include; | |||
boolean dot; | |||
{ | |||
static char path[ BUFSIZ ]; | |||
register char **pp, *p; | |||
register struct inclist *ip; | |||
struct stat st; | |||
boolean found = FALSE; | |||
/* | |||
* Check all previously found include files for a path that | |||
* has already been expanded. | |||
*/ | |||
for (ip = inclist; ip->i_file; ip++) | |||
if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym) | |||
{ | |||
found = TRUE; | |||
break; | |||
} | |||
/* | |||
* If the path was surrounded by "" or is an absolute path, | |||
* then check the exact path provided. | |||
*/ | |||
if (!found && (dot || *include == '/')) { | |||
if (stat(include, &st) == 0) { | |||
ip = newinclude(include, include); | |||
found = TRUE; | |||
} | |||
else if (show_where_not) | |||
warning1("\tnot in %s\n", include); | |||
} | |||
/* | |||
* See if this include file is in the directory of the | |||
* file being compiled. | |||
*/ | |||
if (!found) { | |||
for (p=file+strlen(file); p>file; p--) | |||
if (*p == '/') | |||
break; | |||
if (p == file) | |||
strcpy(path, include); | |||
else { | |||
strncpy(path, file, (p-file) + 1); | |||
path[ (p-file) + 1 ] = '\0'; | |||
strcpy(path + (p-file) + 1, include); | |||
} | |||
remove_dotdot(path); | |||
if (stat(path, &st) == 0) { | |||
ip = newinclude(path, include); | |||
found = TRUE; | |||
} | |||
else if (show_where_not) | |||
warning1("\tnot in %s\n", path); | |||
} | |||
/* | |||
* Check the include directories specified. (standard include dir | |||
* should be at the end.) | |||
*/ | |||
if (!found) | |||
for (pp = includedirs; *pp; pp++) { | |||
#ifdef WIN32 | |||
sprintf(path, "%s\\%s", *pp, include); | |||
#else | |||
sprintf(path, "%s/%s", *pp, include); | |||
#endif | |||
remove_dotdot(path); | |||
if (stat(path, &st) == 0) { | |||
ip = newinclude(path, include); | |||
found = TRUE; | |||
break; | |||
} | |||
else if (show_where_not) | |||
warning1("\tnot in %s\n", path); | |||
} | |||
if (!found) | |||
ip = NULL; | |||
return(ip); | |||
} | |||
/* | |||
* Occasionally, pathnames are created that look like .../x/../y | |||
* Any of the 'x/..' sequences within the name can be eliminated. | |||
* (but only if 'x' is not a symbolic link!!) | |||
*/ | |||
remove_dotdot(path) | |||
char *path; | |||
{ | |||
register char *end, *from, *to, **cp; | |||
char *components[ MAXFILES ], | |||
newpath[ BUFSIZ ]; | |||
boolean component_copied; | |||
/* | |||
* slice path up into components. | |||
*/ | |||
to = newpath; | |||
if (*path == '/') | |||
*to++ = '/'; | |||
*to = '\0'; | |||
cp = components; | |||
for (from=end=path; *end; end++) | |||
if (*end == '/') { | |||
while (*end == '/') | |||
*end++ = '\0'; | |||
if (*from) | |||
*cp++ = from; | |||
from = end; | |||
} | |||
*cp++ = from; | |||
*cp = NULL; | |||
/* | |||
* Recursively remove all 'x/..' component pairs. | |||
*/ | |||
cp = components; | |||
while(*cp) { | |||
if (!isdot(*cp) && !isdotdot(*cp) && isdotdot(*(cp+1)) | |||
&& !issymbolic(newpath, *cp)) | |||
{ | |||
char **fp = cp + 2; | |||
char **tp = cp; | |||
do | |||
*tp++ = *fp; /* move all the pointers down */ | |||
while (*fp++); | |||
if (cp != components) | |||
cp--; /* go back and check for nested ".." */ | |||
} else { | |||
cp++; | |||
} | |||
} | |||
/* | |||
* Concatenate the remaining path elements. | |||
*/ | |||
cp = components; | |||
component_copied = FALSE; | |||
while(*cp) { | |||
if (component_copied) | |||
*to++ = '/'; | |||
component_copied = TRUE; | |||
for (from = *cp; *from; ) | |||
*to++ = *from++; | |||
*to = '\0'; | |||
cp++; | |||
} | |||
*to++ = '\0'; | |||
/* | |||
* copy the reconstituted path back to our pointer. | |||
*/ | |||
strcpy(path, newpath); | |||
} | |||
isdot(p) | |||
register char *p; | |||
{ | |||
if(p && *p++ == '.' && *p++ == '\0') | |||
return(TRUE); | |||
return(FALSE); | |||
} | |||
isdotdot(p) | |||
register char *p; | |||
{ | |||
if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0') | |||
return(TRUE); | |||
return(FALSE); | |||
} | |||
issymbolic(dir, component) | |||
register char *dir, *component; | |||
{ | |||
#ifdef S_IFLNK | |||
struct stat st; | |||
char buf[ BUFSIZ ], **pp; | |||
sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component); | |||
for (pp=notdotdot; *pp; pp++) | |||
if (strcmp(*pp, buf) == 0) | |||
return (TRUE); | |||
if (lstat(buf, &st) == 0 | |||
&& (st.st_mode & S_IFMT) == S_IFLNK) { | |||
*pp++ = copy(buf); | |||
if (pp >= ¬dotdot[ MAXDIRS ]) | |||
fatalerr("out of .. dirs, increase MAXDIRS\n"); | |||
return(TRUE); | |||
} | |||
#endif | |||
return(FALSE); | |||
} | |||
/* | |||
* Add an include file to the list of those included by 'file'. | |||
*/ | |||
struct inclist *newinclude(newfile, incstring) | |||
register char *newfile, *incstring; | |||
{ | |||
register struct inclist *ip; | |||
/* | |||
* First, put this file on the global list of include files. | |||
*/ | |||
ip = inclistp++; | |||
if (inclistp == inclist + MAXFILES - 1) | |||
fatalerr("out of space: increase MAXFILES\n"); | |||
ip->i_file = copy(newfile); | |||
ip->i_included_sym = FALSE; | |||
if (incstring == NULL) | |||
ip->i_incstring = ip->i_file; | |||
else | |||
ip->i_incstring = copy(incstring); | |||
return(ip); | |||
} | |||
included_by(ip, newfile) | |||
register struct inclist *ip, *newfile; | |||
{ | |||
register i; | |||
if (ip == NULL) | |||
return; | |||
/* | |||
* Put this include file (newfile) on the list of files included | |||
* by 'file'. If 'file' is NULL, then it is not an include | |||
* file itself (i.e. was probably mentioned on the command line). | |||
* If it is already on the list, don't stick it on again. | |||
*/ | |||
if (ip->i_list == NULL) | |||
ip->i_list = (struct inclist **) | |||
malloc(sizeof(struct inclist *) * ++ip->i_listlen); | |||
else { | |||
for (i=0; i<ip->i_listlen; i++) | |||
if (ip->i_list[ i ] == newfile) { | |||
i = strlen(newfile->i_file); | |||
if (!ip->i_included_sym && | |||
!(i > 2 && | |||
newfile->i_file[i-1] == 'c' && | |||
newfile->i_file[i-2] == '.')) | |||
{ | |||
/* only bitch if ip has */ | |||
/* no #include SYMBOL lines */ | |||
/* and is not a .c file */ | |||
if (warn_multiple) | |||
{ | |||
warning("%s includes %s more than once!\n", | |||
ip->i_file, newfile->i_file); | |||
warning1("Already have\n"); | |||
for (i=0; i<ip->i_listlen; i++) | |||
warning1("\t%s\n", ip->i_list[i]->i_file); | |||
} | |||
} | |||
return; | |||
} | |||
ip->i_list = (struct inclist **) realloc(ip->i_list, | |||
sizeof(struct inclist *) * ++ip->i_listlen); | |||
} | |||
ip->i_list[ ip->i_listlen-1 ] = newfile; | |||
} | |||
inc_clean () | |||
{ | |||
register struct inclist *ip; | |||
for (ip = inclist; ip < inclistp; ip++) { | |||
ip->i_marked = FALSE; | |||
} | |||
} |
@@ -0,0 +1,593 @@ | |||
/* $XConsortium: main.c,v 1.84 94/11/30 16:10:44 kaleb Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include "def.h" | |||
#ifdef hpux | |||
#define sigvec sigvector | |||
#endif /* hpux */ | |||
#ifdef X_POSIX_C_SOURCE | |||
#define _POSIX_C_SOURCE X_POSIX_C_SOURCE | |||
#include <signal.h> | |||
#undef _POSIX_C_SOURCE | |||
#else | |||
#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE) | |||
#include <signal.h> | |||
#else | |||
#define _POSIX_SOURCE | |||
#include <signal.h> | |||
#undef _POSIX_SOURCE | |||
#endif | |||
#endif | |||
#if NeedVarargsPrototypes | |||
#include <stdarg.h> | |||
#endif | |||
#ifdef DEBUG | |||
int _debugmask; | |||
#endif | |||
char *ProgramName; | |||
char *directives[] = { | |||
"if", | |||
"ifdef", | |||
"ifndef", | |||
"else", | |||
"endif", | |||
"define", | |||
"undef", | |||
"include", | |||
"line", | |||
"pragma", | |||
"error", | |||
"ident", | |||
"sccs", | |||
"elif", | |||
"eject", | |||
NULL | |||
}; | |||
struct symtab predefs[] = { {NULL, NULL} }; | |||
struct inclist inclist[ MAXFILES ], | |||
*inclistp = inclist, | |||
maininclist; | |||
char *filelist[ MAXFILES ]; | |||
char *includedirs[ MAXDIRS + 1 ]; | |||
char *notdotdot[ MAXDIRS ]; | |||
char *objprefix = ""; | |||
char *objsuffix = ".o"; | |||
int width = 78; | |||
boolean append = FALSE; | |||
boolean printed = FALSE; | |||
boolean verbose = FALSE; | |||
boolean show_where_not = FALSE; | |||
boolean warn_multiple = FALSE; /* Warn on multiple includes of same file */ | |||
static | |||
#ifdef SIGNALRETURNSINT | |||
int | |||
#else | |||
void | |||
#endif | |||
catch (sig) | |||
int sig; | |||
{ | |||
fflush (stdout); | |||
fatalerr ("got signal %d\n", sig); | |||
} | |||
#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32) || defined(__nextstep__) | |||
#define USGISH | |||
#endif | |||
#ifndef USGISH | |||
#ifndef _POSIX_SOURCE | |||
#define sigaction sigvec | |||
#define sa_handler sv_handler | |||
#define sa_mask sv_mask | |||
#define sa_flags sv_flags | |||
#endif | |||
struct sigaction sig_act; | |||
#endif /* USGISH */ | |||
main(argc, argv) | |||
int argc; | |||
char **argv; | |||
{ | |||
register char **fp = filelist; | |||
register char **incp = includedirs; | |||
register char *p; | |||
register struct inclist *ip; | |||
char *makefile = NULL; | |||
struct filepointer *filecontent; | |||
struct symtab *psymp = predefs; | |||
char *endmarker = NULL; | |||
char *defincdir = NULL; | |||
ProgramName = argv[0]; | |||
while (psymp->s_name) | |||
{ | |||
define2(psymp->s_name, psymp->s_value, &maininclist); | |||
psymp++; | |||
} | |||
if (argc == 2 && argv[1][0] == '@') { | |||
struct stat ast; | |||
int afd; | |||
char *args; | |||
char **nargv; | |||
int nargc; | |||
char quotechar = '\0'; | |||
nargc = 1; | |||
if ((afd = open(argv[1]+1, O_RDONLY)) < 0) | |||
fatalerr("cannot open \"%s\"\n", argv[1]+1); | |||
fstat(afd, &ast); | |||
args = (char *)malloc(ast.st_size + 1); | |||
if ((ast.st_size = read(afd, args, ast.st_size)) < 0) | |||
fatalerr("failed to read %s\n", argv[1]+1); | |||
args[ast.st_size] = '\0'; | |||
close(afd); | |||
for (p = args; *p; p++) { | |||
if (quotechar) { | |||
if (quotechar == '\\' || | |||
(*p == quotechar && p[-1] != '\\')) | |||
quotechar = '\0'; | |||
continue; | |||
} | |||
switch (*p) { | |||
case '\\': | |||
case '"': | |||
case '\'': | |||
quotechar = *p; | |||
break; | |||
case ' ': | |||
case '\n': | |||
*p = '\0'; | |||
if (p > args && p[-1]) | |||
nargc++; | |||
break; | |||
} | |||
} | |||
if (p[-1]) | |||
nargc++; | |||
nargv = (char **)malloc(nargc * sizeof(char *)); | |||
nargv[0] = argv[0]; | |||
argc = 1; | |||
for (p = args; argc < nargc; p += strlen(p) + 1) | |||
if (*p) nargv[argc++] = p; | |||
argv = nargv; | |||
} | |||
for(argc--, argv++; argc; argc--, argv++) { | |||
/* if looking for endmarker then check before parsing */ | |||
if (endmarker && strcmp (endmarker, *argv) == 0) { | |||
endmarker = NULL; | |||
continue; | |||
} | |||
if (**argv != '-') { | |||
/* treat +thing as an option for C++ */ | |||
if (endmarker && **argv == '+') | |||
continue; | |||
*fp++ = argv[0]; | |||
continue; | |||
} | |||
switch(argv[0][1]) { | |||
case '-': | |||
endmarker = &argv[0][2]; | |||
if (endmarker[0] == '\0') endmarker = "--"; | |||
break; | |||
case 'D': | |||
{ | |||
int offset = 2; | |||
if (argv[0][2] == '\0') { | |||
argv++; | |||
argc--; | |||
offset = 0; | |||
} | |||
for (p=argv[0] + offset; *p ; p++) | |||
if (*p == '=') { | |||
*p = ' '; | |||
break; | |||
} | |||
define(argv[0] + offset, &maininclist); | |||
break; | |||
} | |||
case 'I': | |||
if (incp >= includedirs + MAXDIRS) | |||
fatalerr("Too many -I flags.\n"); | |||
*incp++ = argv[0]+2; | |||
if (**(incp-1) == '\0') { | |||
*(incp-1) = *(++argv); | |||
argc--; | |||
} | |||
break; | |||
case 'Y': | |||
defincdir = argv[0]+2; | |||
break; | |||
/* do not use if endmarker processing */ | |||
case 'a': | |||
if (endmarker) break; | |||
append = TRUE; | |||
break; | |||
case 'w': | |||
if (endmarker) break; | |||
if (argv[0][2] == '\0') { | |||
argv++; | |||
argc--; | |||
width = atoi(argv[0]); | |||
} else | |||
width = atoi(argv[0]+2); | |||
break; | |||
case 'o': | |||
if (endmarker) break; | |||
if (argv[0][2] == '\0') { | |||
argv++; | |||
argc--; | |||
objsuffix = argv[0]; | |||
} else | |||
objsuffix = argv[0]+2; | |||
break; | |||
case 'p': | |||
if (endmarker) break; | |||
if (argv[0][2] == '\0') { | |||
argv++; | |||
argc--; | |||
objprefix = argv[0]; | |||
} else | |||
objprefix = argv[0]+2; | |||
break; | |||
case 'v': | |||
if (endmarker) break; | |||
verbose = TRUE; | |||
#ifdef DEBUG | |||
if (argv[0][2]) | |||
_debugmask = atoi(argv[0]+2); | |||
#endif | |||
break; | |||
case 'm': | |||
warn_multiple = TRUE; | |||
break; | |||
/* Ignore -O, -g so we can just pass ${CFLAGS} to | |||
makedepend | |||
*/ | |||
case 'O': | |||
case 'g': | |||
break; | |||
default: | |||
if (endmarker) break; | |||
/* fatalerr("unknown opt = %s\n", argv[0]); */ | |||
warning("ignoring option %s\n", argv[0]); | |||
} | |||
} | |||
if (!defincdir) { | |||
} else if (*defincdir) { | |||
if (incp >= includedirs + MAXDIRS) | |||
fatalerr("Too many -I flags.\n"); | |||
*incp++ = defincdir; | |||
} | |||
/* | |||
* catch signals. | |||
*/ | |||
#ifdef USGISH | |||
/* should really reset SIGINT to SIG_IGN if it was. */ | |||
#ifdef SIGHUP | |||
signal (SIGHUP, catch); | |||
#endif | |||
signal (SIGINT, catch); | |||
#ifdef SIGQUIT | |||
signal (SIGQUIT, catch); | |||
#endif | |||
signal (SIGILL, catch); | |||
#ifdef SIGBUS | |||
signal (SIGBUS, catch); | |||
#endif | |||
signal (SIGSEGV, catch); | |||
#ifdef SIGSYS | |||
signal (SIGSYS, catch); | |||
#endif | |||
#else | |||
sig_act.sa_handler = catch; | |||
#ifdef _POSIX_SOURCE | |||
sigemptyset(&sig_act.sa_mask); | |||
sigaddset(&sig_act.sa_mask, SIGINT); | |||
sigaddset(&sig_act.sa_mask, SIGQUIT); | |||
#ifdef SIGBUS | |||
sigaddset(&sig_act.sa_mask, SIGBUS); | |||
#endif | |||
sigaddset(&sig_act.sa_mask, SIGILL); | |||
sigaddset(&sig_act.sa_mask, SIGSEGV); | |||
sigaddset(&sig_act.sa_mask, SIGHUP); | |||
sigaddset(&sig_act.sa_mask, SIGPIPE); | |||
#ifdef SIGSYS | |||
sigaddset(&sig_act.sa_mask, SIGSYS); | |||
#endif | |||
#else | |||
sig_act.sa_mask = ((1<<(SIGINT -1)) | |||
|(1<<(SIGQUIT-1)) | |||
#ifdef SIGBUS | |||
|(1<<(SIGBUS-1)) | |||
#endif | |||
|(1<<(SIGILL-1)) | |||
|(1<<(SIGSEGV-1)) | |||
|(1<<(SIGHUP-1)) | |||
|(1<<(SIGPIPE-1)) | |||
#ifdef SIGSYS | |||
|(1<<(SIGSYS-1)) | |||
#endif | |||
); | |||
#endif /* _POSIX_SOURCE */ | |||
sig_act.sa_flags = 0; | |||
sigaction(SIGHUP, &sig_act, (struct sigaction *)0); | |||
sigaction(SIGINT, &sig_act, (struct sigaction *)0); | |||
sigaction(SIGQUIT, &sig_act, (struct sigaction *)0); | |||
sigaction(SIGILL, &sig_act, (struct sigaction *)0); | |||
#ifdef SIGBUS | |||
sigaction(SIGBUS, &sig_act, (struct sigaction *)0); | |||
#endif | |||
sigaction(SIGSEGV, &sig_act, (struct sigaction *)0); | |||
#ifdef SIGSYS | |||
sigaction(SIGSYS, &sig_act, (struct sigaction *)0); | |||
#endif | |||
#endif /* USGISH */ | |||
/* | |||
* now peruse through the list of files. | |||
*/ | |||
for(fp=filelist; *fp; fp++) { | |||
char *base = base_name(*fp); | |||
char *depfile = (char *)malloc(strlen(base) + 3); | |||
sprintf(depfile,"%s.d",base); | |||
if (!freopen(depfile, "wb", stdout)) | |||
fatalerr("cannot open \"%s\"\n", depfile); | |||
free(depfile); | |||
free(base); | |||
printed = FALSE; | |||
filecontent = getfile(*fp); | |||
ip = newinclude(*fp, (char *)NULL); | |||
find_includes(filecontent, ip, ip, 0, TRUE); | |||
freefile(filecontent); | |||
recursive_pr_include(ip, ip->i_file, base_name(*fp)); | |||
inc_clean(); | |||
if (printed) | |||
printf("\n"); | |||
} | |||
exit(0); | |||
} | |||
struct filepointer *getfile(file) | |||
char *file; | |||
{ | |||
register int fd; | |||
struct filepointer *content; | |||
struct stat st; | |||
content = (struct filepointer *)malloc(sizeof(struct filepointer)); | |||
if ((fd = open(file, O_RDONLY)) < 0) { | |||
warning("cannot open \"%s\"\n", file); | |||
content->f_p = content->f_base = content->f_end = (char *)malloc(1); | |||
*content->f_p = '\0'; | |||
return(content); | |||
} | |||
fstat(fd, &st); | |||
content->f_base = (char *)malloc(st.st_size+1); | |||
if (content->f_base == NULL) | |||
fatalerr("cannot allocate mem\n"); | |||
if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0) | |||
fatalerr("failed to read %s\n", file); | |||
close(fd); | |||
content->f_len = st.st_size+1; | |||
content->f_p = content->f_base; | |||
content->f_end = content->f_base + st.st_size; | |||
*content->f_end = '\0'; | |||
content->f_line = 0; | |||
return(content); | |||
} | |||
freefile(fp) | |||
struct filepointer *fp; | |||
{ | |||
free(fp->f_base); | |||
free(fp); | |||
} | |||
char *copy(str) | |||
register char *str; | |||
{ | |||
register char *p = (char *)malloc(strlen(str) + 1); | |||
strcpy(p, str); | |||
return(p); | |||
} | |||
match(str, list) | |||
register char *str, **list; | |||
{ | |||
register int i; | |||
for (i=0; *list; i++, list++) | |||
if (strcmp(str, *list) == 0) | |||
return(i); | |||
return(-1); | |||
} | |||
/* | |||
* Get the next line. We only return lines beginning with '#' since that | |||
* is all this program is ever interested in. | |||
*/ | |||
char *getline(filep) | |||
register struct filepointer *filep; | |||
{ | |||
register char *p, /* walking pointer */ | |||
*eof, /* end of file pointer */ | |||
*bol; /* beginning of line pointer */ | |||
register lineno; /* line number */ | |||
p = filep->f_p; | |||
eof = filep->f_end; | |||
if (p >= eof) | |||
return((char *)NULL); | |||
lineno = filep->f_line; | |||
for(bol = p--; ++p < eof; ) { | |||
if (*p == '/' && *(p+1) == '*') { /* consume comments */ | |||
*p++ = ' ', *p++ = ' '; | |||
while (*p) { | |||
if (*p == '*' && *(p+1) == '/') { | |||
*p++ = ' ', *p = ' '; | |||
break; | |||
} | |||
else if (*p == '\n') | |||
lineno++; | |||
*p++ = ' '; | |||
} | |||
continue; | |||
} | |||
else if (*p == '/' && *(p+1) == '/') { /* consume comments */ | |||
*p++ = ' ', *p++ = ' '; | |||
while (*p && *p != '\n') | |||
*p++ = ' '; | |||
p--; /* go back to before newline */ | |||
lineno++; | |||
continue; | |||
} | |||
else if (*p == '\\') { | |||
if (*(p+1) == '\n') { | |||
*p = ' '; | |||
*(p+1) = ' '; | |||
lineno++; | |||
} | |||
} | |||
else if (*p == '\n') { | |||
lineno++; | |||
if (*bol == '#') { | |||
register char *cp; | |||
*p++ = '\0'; | |||
/* punt lines with just # (yacc generated) */ | |||
for (cp = bol+1; | |||
*cp && (*cp == ' ' || *cp == '\t'); cp++); | |||
if (*cp) goto done; | |||
} | |||
bol = p+1; | |||
} | |||
} | |||
if (*bol != '#') | |||
bol = NULL; | |||
done: | |||
filep->f_p = p; | |||
filep->f_line = lineno; | |||
return(bol); | |||
} | |||
/* | |||
* Strip the file name down to what we want to see in the Makefile. | |||
* It will have objprefix and objsuffix around it. | |||
*/ | |||
char *base_name(file) | |||
register char *file; | |||
{ | |||
register char *p; | |||
for(p=file+strlen(file); p>file && *p != '/' && *p != '\\'; p--) ; | |||
if (p>file) p++; | |||
file = copy(p); | |||
for(p=file+strlen(file); p>file && *p != '.'; p--) ; | |||
if (*p == '.') | |||
*p = '\0'; | |||
return(file); | |||
} | |||
#if NeedVarargsPrototypes | |||
fatalerr(char *msg, ...) | |||
#else | |||
/*VARARGS*/ | |||
fatalerr(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9) | |||
char *msg; | |||
#endif | |||
{ | |||
#if NeedVarargsPrototypes | |||
va_list args; | |||
#endif | |||
fprintf(stderr, "%s: error: ", ProgramName); | |||
#if NeedVarargsPrototypes | |||
va_start(args, msg); | |||
vfprintf(stderr, msg, args); | |||
va_end(args); | |||
#else | |||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9); | |||
#endif | |||
exit (1); | |||
} | |||
#if NeedVarargsPrototypes | |||
warning(char *msg, ...) | |||
#else | |||
/*VARARGS0*/ | |||
warning(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9) | |||
char *msg; | |||
#endif | |||
{ | |||
#if NeedVarargsPrototypes | |||
va_list args; | |||
#endif | |||
fprintf(stderr, "%s: warning: ", ProgramName); | |||
#if NeedVarargsPrototypes | |||
va_start(args, msg); | |||
vfprintf(stderr, msg, args); | |||
va_end(args); | |||
#else | |||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9); | |||
#endif | |||
} | |||
#if NeedVarargsPrototypes | |||
warning1(char *msg, ...) | |||
#else | |||
/*VARARGS0*/ | |||
warning1(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9) | |||
char *msg; | |||
#endif | |||
{ | |||
#if NeedVarargsPrototypes | |||
va_list args; | |||
va_start(args, msg); | |||
vfprintf(stderr, msg, args); | |||
va_end(args); | |||
#else | |||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9); | |||
#endif | |||
} |
@@ -0,0 +1,568 @@ | |||
/* $XConsortium: parse.c,v 1.30 94/04/17 20:10:38 gildea Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include "def.h" | |||
extern char *directives[]; | |||
extern struct inclist maininclist; | |||
find_includes(filep, file, file_red, recursion, failOK) | |||
struct filepointer *filep; | |||
struct inclist *file, *file_red; | |||
int recursion; | |||
boolean failOK; | |||
{ | |||
register char *line; | |||
register int type; | |||
boolean recfailOK; | |||
while (line = getline(filep)) { | |||
switch(type = deftype(line, filep, file_red, file, TRUE)) { | |||
case IF: | |||
doif: | |||
type = find_includes(filep, file, | |||
file_red, recursion+1, failOK); | |||
while ((type == ELIF) || (type == ELIFFALSE) || | |||
(type == ELIFGUESSFALSE)) | |||
type = gobble(filep, file, file_red); | |||
if (type == ELSE) | |||
gobble(filep, file, file_red); | |||
break; | |||
case IFFALSE: | |||
case IFGUESSFALSE: | |||
doiffalse: | |||
if (type == IFGUESSFALSE || type == ELIFGUESSFALSE) | |||
recfailOK = TRUE; | |||
else | |||
recfailOK = failOK; | |||
type = gobble(filep, file, file_red); | |||
if (type == ELSE) | |||
find_includes(filep, file, | |||
file_red, recursion+1, recfailOK); | |||
else | |||
if (type == ELIF) | |||
goto doif; | |||
else | |||
if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE)) | |||
goto doiffalse; | |||
break; | |||
case IFDEF: | |||
case IFNDEF: | |||
if ((type == IFDEF && isdefined(line, file_red, NULL)) | |||
|| (type == IFNDEF && !isdefined(line, file_red, NULL))) { | |||
debug(1,(type == IFNDEF ? | |||
"line %d: %s !def'd in %s via %s%s\n" : "", | |||
filep->f_line, line, | |||
file->i_file, file_red->i_file, ": doit")); | |||
type = find_includes(filep, file, | |||
file_red, recursion+1, failOK); | |||
while (type == ELIF || type == ELIFFALSE || type == ELIFGUESSFALSE) | |||
type = gobble(filep, file, file_red); | |||
if (type == ELSE) | |||
gobble(filep, file, file_red); | |||
} | |||
else { | |||
debug(1,(type == IFDEF ? | |||
"line %d: %s !def'd in %s via %s%s\n" : "", | |||
filep->f_line, line, | |||
file->i_file, file_red->i_file, ": gobble")); | |||
type = gobble(filep, file, file_red); | |||
if (type == ELSE) | |||
find_includes(filep, file, | |||
file_red, recursion+1, failOK); | |||
else if (type == ELIF) | |||
goto doif; | |||
else if (type == ELIFFALSE || type == ELIFGUESSFALSE) | |||
goto doiffalse; | |||
} | |||
break; | |||
case ELSE: | |||
case ELIFFALSE: | |||
case ELIFGUESSFALSE: | |||
case ELIF: | |||
if (!recursion) | |||
gobble(filep, file, file_red); | |||
case ENDIF: | |||
if (recursion) | |||
return(type); | |||
case DEFINE: | |||
define(line, file); | |||
break; | |||
case UNDEF: | |||
if (!*line) { | |||
warning("%s, line %d: incomplete undef == \"%s\"\n", | |||
file_red->i_file, filep->f_line, line); | |||
break; | |||
} | |||
undefine(line, file_red); | |||
break; | |||
case INCLUDE: | |||
add_include(filep, file, file_red, line, FALSE, failOK); | |||
break; | |||
case INCLUDEDOT: | |||
add_include(filep, file, file_red, line, TRUE, failOK); | |||
break; | |||
case ERROR: | |||
warning("(from %s) %s: %d: %s\n", | |||
file_red->i_file, file->i_file, | |||
filep->f_line, line); | |||
break; | |||
case PRAGMA: | |||
case IDENT: | |||
case SCCS: | |||
case EJECT: | |||
break; | |||
case -1: | |||
warning("%s", file_red->i_file); | |||
if (file_red != file) | |||
warning1(" (reading %s)", file->i_file); | |||
warning1(", line %d: unknown directive == \"%s\"\n", | |||
filep->f_line, line); | |||
break; | |||
case -2: | |||
warning("%s", file_red->i_file); | |||
if (file_red != file) | |||
warning1(" (reading %s)", file->i_file); | |||
warning1(", line %d: incomplete include == \"%s\"\n", | |||
filep->f_line, line); | |||
break; | |||
} | |||
} | |||
return(-1); | |||
} | |||
gobble(filep, file, file_red) | |||
register struct filepointer *filep; | |||
struct inclist *file, *file_red; | |||
{ | |||
register char *line; | |||
register int type; | |||
while (line = getline(filep)) { | |||
switch(type = deftype(line, filep, file_red, file, FALSE)) { | |||
case IF: | |||
case IFFALSE: | |||
case IFGUESSFALSE: | |||
case IFDEF: | |||
case IFNDEF: | |||
type = gobble(filep, file, file_red); | |||
while ((type == ELIF) || (type == ELIFFALSE) || | |||
(type == ELIFGUESSFALSE)) | |||
type = gobble(filep, file, file_red); | |||
if (type == ELSE) | |||
(void)gobble(filep, file, file_red); | |||
break; | |||
case ELSE: | |||
case ENDIF: | |||
debug(0,("%s, line %d: #%s\n", | |||
file->i_file, filep->f_line, | |||
directives[type])); | |||
return(type); | |||
case DEFINE: | |||
case UNDEF: | |||
case INCLUDE: | |||
case INCLUDEDOT: | |||
case PRAGMA: | |||
case ERROR: | |||
case IDENT: | |||
case SCCS: | |||
case EJECT: | |||
break; | |||
case ELIF: | |||
case ELIFFALSE: | |||
case ELIFGUESSFALSE: | |||
return(type); | |||
case -1: | |||
warning("%s, line %d: unknown directive == \"%s\"\n", | |||
file_red->i_file, filep->f_line, line); | |||
break; | |||
} | |||
} | |||
return(-1); | |||
} | |||
/* | |||
* Decide what type of # directive this line is. | |||
*/ | |||
int deftype (line, filep, file_red, file, parse_it) | |||
register char *line; | |||
register struct filepointer *filep; | |||
register struct inclist *file_red, *file; | |||
int parse_it; | |||
{ | |||
register char *p; | |||
char *directive, savechar; | |||
register int ret; | |||
/* | |||
* Parse the directive... | |||
*/ | |||
directive=line+1; | |||
while (*directive == ' ' || *directive == '\t') | |||
directive++; | |||
p = directive; | |||
while (*p >= 'a' && *p <= 'z') | |||
p++; | |||
savechar = *p; | |||
*p = '\0'; | |||
ret = match(directive, directives); | |||
*p = savechar; | |||
/* If we don't recognize this compiler directive or we happen to just | |||
* be gobbling up text while waiting for an #endif or #elif or #else | |||
* in the case of an #elif we must check the zero_value and return an | |||
* ELIF or an ELIFFALSE. | |||
*/ | |||
if (ret == ELIF && !parse_it) | |||
{ | |||
while (*p == ' ' || *p == '\t') | |||
p++; | |||
/* | |||
* parse an expression. | |||
*/ | |||
debug(0,("%s, line %d: #elif %s ", | |||
file->i_file, filep->f_line, p)); | |||
ret = zero_value(p, filep, file_red); | |||
if (ret != IF) | |||
{ | |||
debug(0,("false...\n")); | |||
if (ret == IFFALSE) | |||
return(ELIFFALSE); | |||
else | |||
return(ELIFGUESSFALSE); | |||
} | |||
else | |||
{ | |||
debug(0,("true...\n")); | |||
return(ELIF); | |||
} | |||
} | |||
if (ret < 0 || ! parse_it) | |||
return(ret); | |||
/* | |||
* now decide how to parse the directive, and do it. | |||
*/ | |||
while (*p == ' ' || *p == '\t') | |||
p++; | |||
switch (ret) { | |||
case IF: | |||
/* | |||
* parse an expression. | |||
*/ | |||
ret = zero_value(p, filep, file_red); | |||
debug(0,("%s, line %d: %s #if %s\n", | |||
file->i_file, filep->f_line, ret?"false":"true", p)); | |||
break; | |||
case IFDEF: | |||
case IFNDEF: | |||
debug(0,("%s, line %d: #%s %s\n", | |||
file->i_file, filep->f_line, directives[ret], p)); | |||
case UNDEF: | |||
/* | |||
* separate the name of a single symbol. | |||
*/ | |||
while (isalnum(*p) || *p == '_') | |||
*line++ = *p++; | |||
*line = '\0'; | |||
break; | |||
case INCLUDE: | |||
debug(2,("%s, line %d: #include %s\n", | |||
file->i_file, filep->f_line, p)); | |||
/* Support ANSI macro substitution */ | |||
{ | |||
struct symtab *sym = isdefined(p, file_red, NULL); | |||
while (sym) { | |||
p = sym->s_value; | |||
debug(3,("%s : #includes SYMBOL %s = %s\n", | |||
file->i_incstring, | |||
sym -> s_name, | |||
sym -> s_value)); | |||
/* mark file as having included a 'soft include' */ | |||
file->i_included_sym = TRUE; | |||
sym = isdefined(p, file_red, NULL); | |||
} | |||
} | |||
/* | |||
* Separate the name of the include file. | |||
*/ | |||
while (*p && *p != '"' && *p != '<') | |||
p++; | |||
if (! *p) | |||
return(-2); | |||
if (*p++ == '"') { | |||
ret = INCLUDEDOT; | |||
while (*p && *p != '"') | |||
*line++ = *p++; | |||
} else | |||
while (*p && *p != '>') | |||
*line++ = *p++; | |||
*line = '\0'; | |||
break; | |||
case DEFINE: | |||
/* | |||
* copy the definition back to the beginning of the line. | |||
*/ | |||
strcpy (line, p); | |||
break; | |||
case ELSE: | |||
case ENDIF: | |||
case ELIF: | |||
case PRAGMA: | |||
case ERROR: | |||
case IDENT: | |||
case SCCS: | |||
case EJECT: | |||
debug(0,("%s, line %d: #%s\n", | |||
file->i_file, filep->f_line, directives[ret])); | |||
/* | |||
* nothing to do. | |||
*/ | |||
break; | |||
} | |||
return(ret); | |||
} | |||
struct symtab *isdefined(symbol, file, srcfile) | |||
register char *symbol; | |||
struct inclist *file; | |||
struct inclist **srcfile; | |||
{ | |||
register struct symtab *val; | |||
if (val = slookup(symbol, &maininclist)) { | |||
debug(1,("%s defined on command line\n", symbol)); | |||
if (srcfile != NULL) *srcfile = &maininclist; | |||
return(val); | |||
} | |||
if (val = fdefined(symbol, file, srcfile)) | |||
return(val); | |||
debug(1,("%s not defined in %s\n", symbol, file->i_file)); | |||
return(NULL); | |||
} | |||
struct symtab *fdefined(symbol, file, srcfile) | |||
register char *symbol; | |||
struct inclist *file; | |||
struct inclist **srcfile; | |||
{ | |||
register struct inclist **ip; | |||
register struct symtab *val; | |||
register int i; | |||
static int recurse_lvl = 0; | |||
if (file->i_defchecked) | |||
return(NULL); | |||
file->i_defchecked = TRUE; | |||
if (val = slookup(symbol, file)) | |||
debug(1,("%s defined in %s as %s\n", symbol, file->i_file, val->s_value)); | |||
if (val == NULL && file->i_list) | |||
{ | |||
for (ip = file->i_list, i=0; i < file->i_listlen; i++, ip++) | |||
if (val = fdefined(symbol, *ip, srcfile)) { | |||
break; | |||
} | |||
} | |||
else if (val != NULL && srcfile != NULL) *srcfile = file; | |||
recurse_lvl--; | |||
file->i_defchecked = FALSE; | |||
return(val); | |||
} | |||
/* | |||
* Return type based on if the #if expression evaluates to 0 | |||
*/ | |||
zero_value(exp, filep, file_red) | |||
register char *exp; | |||
register struct filepointer *filep; | |||
register struct inclist *file_red; | |||
{ | |||
if (cppsetup(exp, filep, file_red)) | |||
return(IFFALSE); | |||
else | |||
return(IF); | |||
} | |||
define(def, file) | |||
char *def; | |||
struct inclist *file; | |||
{ | |||
char *val; | |||
/* Separate symbol name and its value */ | |||
val = def; | |||
while (isalnum(*val) || *val == '_') | |||
val++; | |||
if (*val) | |||
*val++ = '\0'; | |||
while (*val == ' ' || *val == '\t') | |||
val++; | |||
if (!*val) | |||
val = "1"; | |||
define2(def, val, file); | |||
} | |||
define2(name, val, file) | |||
char *name, *val; | |||
struct inclist *file; | |||
{ | |||
int first, last, below; | |||
register struct symtab *sp = NULL, *dest; | |||
/* Make space if it's needed */ | |||
if (file->i_defs == NULL) | |||
{ | |||
file->i_defs = (struct symtab *) | |||
malloc(sizeof (struct symtab) * SYMTABINC); | |||
file->i_deflen = SYMTABINC; | |||
file->i_ndefs = 0; | |||
} | |||
else if (file->i_ndefs == file->i_deflen) | |||
file->i_defs = (struct symtab *) | |||
realloc(file->i_defs, | |||
sizeof(struct symtab)*(file->i_deflen+=SYMTABINC)); | |||
if (file->i_defs == NULL) | |||
fatalerr("malloc()/realloc() failure in insert_defn()\n"); | |||
below = first = 0; | |||
last = file->i_ndefs - 1; | |||
while (last >= first) | |||
{ | |||
/* Fast inline binary search */ | |||
register char *s1; | |||
register char *s2; | |||
register int middle = (first + last) / 2; | |||
/* Fast inline strchr() */ | |||
s1 = name; | |||
s2 = file->i_defs[middle].s_name; | |||
while (*s1++ == *s2++) | |||
if (s2[-1] == '\0') break; | |||
/* If exact match, set sp and break */ | |||
if (*--s1 == *--s2) | |||
{ | |||
sp = file->i_defs + middle; | |||
break; | |||
} | |||
/* If name > i_defs[middle] ... */ | |||
if (*s1 > *s2) | |||
{ | |||
below = first; | |||
first = middle + 1; | |||
} | |||
/* else ... */ | |||
else | |||
{ | |||
below = last = middle - 1; | |||
} | |||
} | |||
/* Search is done. If we found an exact match to the symbol name, | |||
just replace its s_value */ | |||
if (sp != NULL) | |||
{ | |||
free(sp->s_value); | |||
sp->s_value = copy(val); | |||
return; | |||
} | |||
sp = file->i_defs + file->i_ndefs++; | |||
dest = file->i_defs + below + 1; | |||
while (sp > dest) | |||
{ | |||
*sp = sp[-1]; | |||
sp--; | |||
} | |||
sp->s_name = copy(name); | |||
sp->s_value = copy(val); | |||
} | |||
struct symtab *slookup(symbol, file) | |||
register char *symbol; | |||
register struct inclist *file; | |||
{ | |||
register int first = 0; | |||
register int last = file->i_ndefs - 1; | |||
if (file) while (last >= first) | |||
{ | |||
/* Fast inline binary search */ | |||
register char *s1; | |||
register char *s2; | |||
register int middle = (first + last) / 2; | |||
/* Fast inline strchr() */ | |||
s1 = symbol; | |||
s2 = file->i_defs[middle].s_name; | |||
while (*s1++ == *s2++) | |||
if (s2[-1] == '\0') break; | |||
/* If exact match, we're done */ | |||
if (*--s1 == *--s2) | |||
{ | |||
return file->i_defs + middle; | |||
} | |||
/* If symbol > i_defs[middle] ... */ | |||
if (*s1 > *s2) | |||
{ | |||
first = middle + 1; | |||
} | |||
/* else ... */ | |||
else | |||
{ | |||
last = middle - 1; | |||
} | |||
} | |||
return(NULL); | |||
} | |||
undefine(symbol, file) | |||
char *symbol; | |||
register struct inclist *file; | |||
{ | |||
register struct symtab *ptr; | |||
struct inclist *srcfile; | |||
while ((ptr = isdefined(symbol, file, &srcfile)) != NULL) | |||
{ | |||
srcfile->i_ndefs--; | |||
for (; ptr < srcfile->i_defs + srcfile->i_ndefs; ptr++) | |||
*ptr = ptr[1]; | |||
} | |||
} |
@@ -0,0 +1,130 @@ | |||
/* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */ | |||
/* | |||
Copyright (c) 1993, 1994 X Consortium | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
Except as contained in this notice, the name of the X Consortium shall not be | |||
used in advertising or otherwise to promote the sale, use or other dealings | |||
in this Software without prior written authorization from the X Consortium. | |||
*/ | |||
#include "def.h" | |||
extern struct inclist inclist[ MAXFILES ], | |||
*inclistp; | |||
extern char *objprefix; | |||
extern char *objsuffix; | |||
extern int width; | |||
extern boolean printed; | |||
extern boolean verbose; | |||
extern boolean show_where_not; | |||
add_include(filep, file, file_red, include, dot, failOK) | |||
struct filepointer *filep; | |||
struct inclist *file, *file_red; | |||
char *include; | |||
boolean dot; | |||
{ | |||
register struct inclist *newfile; | |||
register struct filepointer *content; | |||
/* | |||
* First decide what the pathname of this include file really is. | |||
*/ | |||
newfile = inc_path(file->i_file, include, dot); | |||
if (newfile == NULL) { | |||
if (failOK) | |||
return; | |||
if (file != file_red) | |||
warning("%s (reading %s, line %d): ", | |||
file_red->i_file, file->i_file, filep->f_line); | |||
else | |||
warning("%s, line %d: ", file->i_file, filep->f_line); | |||
warning1("cannot find include file \"%s\"\n", include); | |||
show_where_not = TRUE; | |||
newfile = inc_path(file->i_file, include, dot); | |||
show_where_not = FALSE; | |||
} | |||
if (newfile) { | |||
included_by(file, newfile); | |||
if (!newfile->i_searched) { | |||
newfile->i_searched = TRUE; | |||
content = getfile(newfile->i_file); | |||
find_includes(content, newfile, file_red, 0, failOK); | |||
freefile(content); | |||
} | |||
} | |||
} | |||
recursive_pr_include(head, file, base) | |||
register struct inclist *head; | |||
register char *file, *base; | |||
{ | |||
register int i; | |||
if (head->i_marked) | |||
return; | |||
head->i_marked = TRUE; | |||
if (head->i_file != file) | |||
pr(head, file, base); | |||
for (i=0; i<head->i_listlen; i++) | |||
recursive_pr_include(head->i_list[ i ], file, base); | |||
} | |||
pr(ip, file, base) | |||
register struct inclist *ip; | |||
char *file, *base; | |||
{ | |||
static char *lastfile; | |||
register int len, i; | |||
char buf[ BUFSIZ ]; | |||
#ifdef WIN32 | |||
char *transfile = TranslateFileNameD2U(ip->i_file,0); | |||
#else | |||
char *transfile = ip->i_file; | |||
#endif | |||
printed = TRUE; | |||
if (file != lastfile) { | |||
lastfile = file; | |||
sprintf(buf, "%s%s%s %s.d: %s", objprefix, base, objsuffix, | |||
base, transfile); | |||
} | |||
else { | |||
sprintf(buf, " \\\n %s", transfile); | |||
} | |||
fwrite(buf, strlen(buf), 1, stdout); | |||
/* | |||
* If verbose is set, then print out what this file includes. | |||
*/ | |||
if (! verbose || ip->i_list == NULL || ip->i_notified) | |||
return; | |||
ip->i_notified = TRUE; | |||
lastfile = NULL; | |||
printf("\n# %s includes:", transfile); | |||
for (i=0; i<ip->i_listlen; i++) | |||
printf("\n#\t%s", ip->i_list[ i ]->i_incstring); | |||
#ifdef WIN32 | |||
free(transfile); | |||
#endif | |||
} |
@@ -1,7 +0,0 @@ | |||
bin_PROGRAMS = vncpasswd | |||
vncpasswd_SOURCES = vncpasswd.cxx | |||
vncpasswd_CPPFLAGS = -I$(COMMON_DIR) | |||
vncpasswd_LDADD = $(RFB_LIBS) |
@@ -0,0 +1,18 @@ | |||
SRCS = vncpasswd.cxx | |||
OBJS = vncpasswd.o | |||
program = vncpasswd | |||
DEP_LIBS = $(COMMON)/rfb/librfb.a | |||
DIR_CPPFLAGS = -I$(COMMON) | |||
all:: $(program) | |||
$(program): $(OBJS) $(DEP_LIBS) | |||
rm -f $(program) | |||
$(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(DEP_LIBS) $(LIBS) | |||
# followed by boilerplate.mk |
@@ -25,7 +25,7 @@ | |||
#include "TXMsgBox.h" | |||
#include "parameters.h" | |||
#include "gettext.h" | |||
#include <intl/gettext.h> | |||
#define _(String) gettext (String) | |||
#define gettext_noop(String) String | |||
#define N_(String) gettext_noop (String) |
@@ -1,13 +0,0 @@ | |||
bin_PROGRAMS = vncviewer | |||
vncviewer_SOURCES = AboutDialog.h buildtime.c CConn.cxx CConn.h \ | |||
DesktopWindow.cxx DesktopWindow.h InfoDialog.h OptionsDialog.h \ | |||
parameters.h PasswdDialog.h ServerDialog.h vncviewer.cxx \ | |||
gettext.h | |||
vncviewer_CPPFLAGS = -I$(COMMON_DIR) -I$(TX_DIR) \ | |||
-I$(UNIX_DIR) -DLOCALEDIR=\"$(localedir)\" | |||
vncviewer_LDADD = $(TX_LIBS) $(RFB_LIBS) $(NETWORK_LIBS) $(RDR_LIBS) -lXext \ | |||
-lX11 $(JPEG_LIBS) $(ZLIB_LIBS) $(LIBINTL) | |||
@@ -0,0 +1,33 @@ | |||
PACKAGE = @PACKAGE@ | |||
VERSION = @VERSION@ | |||
prefix = @prefix@ | |||
datadir = @datadir@ | |||
localedir = $(datadir)/locale | |||
SRCS = DesktopWindow.cxx CConn.cxx vncviewer.cxx | |||
OBJS = $(SRCS:.cxx=.o) | |||
program = vncviewer | |||
DEP_LIBS = $(TOP)/tx/libtx.a \ | |||
$(COMMON)/rfb/librfb.a \ | |||
$(COMMON)/network/libnetwork.a \ | |||
$(COMMON)/rdr/librdr.a | |||
EXTRA_LIBS = @ZLIB_LIB@ @JPEG_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 \ | |||
@X_EXTRA_LIBS@ @CL_LIB@ @DMEDIA_LIB@ @LIBINTL@ | |||
DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/intl -DLOCALEDIR=\"$(localedir)\" @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS | |||
all:: $(program) | |||
$(program): $(OBJS) buildtime.o $(DEP_LIBS) | |||
rm -f $(program) | |||
$(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) | |||
buildtime.o: $(OBJS) $(DEP_LIBS) | |||
# followed by boilerplate.mk |
@@ -1,271 +0,0 @@ | |||
/* Convenience header for conditional use of GNU <libintl.h>. | |||
Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. | |||
This program is free software; you can redistribute it and/or modify it | |||
under the terms of the GNU General Public License as published | |||
by the Free Software Foundation; either version 2, or (at your option) | |||
any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | |||
You should have received a copy of the GNU General Public | |||
License along with this program; if not, write to the Free Software | |||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |||
USA. */ | |||
#ifndef _LIBGETTEXT_H | |||
#define _LIBGETTEXT_H 1 | |||
/* NLS can be disabled through the configure --disable-nls option. */ | |||
#if ENABLE_NLS | |||
/* Get declarations of GNU message catalog functions. */ | |||
# include <libintl.h> | |||
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by | |||
the gettext() and ngettext() macros. This is an alternative to calling | |||
textdomain(), and is useful for libraries. */ | |||
# ifdef DEFAULT_TEXT_DOMAIN | |||
# undef gettext | |||
# define gettext(Msgid) \ | |||
dgettext (DEFAULT_TEXT_DOMAIN, Msgid) | |||
# undef ngettext | |||
# define ngettext(Msgid1, Msgid2, N) \ | |||
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) | |||
# endif | |||
#else | |||
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which | |||
chokes if dcgettext is defined as a macro. So include it now, to make | |||
later inclusions of <locale.h> a NOP. We don't include <libintl.h> | |||
as well because people using "gettext.h" will not include <libintl.h>, | |||
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> | |||
is OK. */ | |||
#if defined(__sun) | |||
# include <locale.h> | |||
#endif | |||
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include | |||
<libintl.h>, which chokes if dcgettext is defined as a macro. So include | |||
it now, to make later inclusions of <libintl.h> a NOP. */ | |||
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) | |||
# include <cstdlib> | |||
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H | |||
# include <libintl.h> | |||
# endif | |||
#endif | |||
/* Disabled NLS. | |||
The casts to 'const char *' serve the purpose of producing warnings | |||
for invalid uses of the value returned from these functions. | |||
On pre-ANSI systems without 'const', the config.h file is supposed to | |||
contain "#define const". */ | |||
# define gettext(Msgid) ((const char *) (Msgid)) | |||
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) | |||
# define dcgettext(Domainname, Msgid, Category) \ | |||
((void) (Category), dgettext (Domainname, Msgid)) | |||
# define ngettext(Msgid1, Msgid2, N) \ | |||
((N) == 1 \ | |||
? ((void) (Msgid2), (const char *) (Msgid1)) \ | |||
: ((void) (Msgid1), (const char *) (Msgid2))) | |||
# define dngettext(Domainname, Msgid1, Msgid2, N) \ | |||
((void) (Domainname), ngettext (Msgid1, Msgid2, N)) | |||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ | |||
((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) | |||
# define textdomain(Domainname) ((const char *) (Domainname)) | |||
# define bindtextdomain(Domainname, Dirname) \ | |||
((void) (Domainname), (const char *) (Dirname)) | |||
# define bind_textdomain_codeset(Domainname, Codeset) \ | |||
((void) (Domainname), (const char *) (Codeset)) | |||
#endif | |||
/* A pseudo function call that serves as a marker for the automated | |||
extraction of messages, but does not call gettext(). The run-time | |||
translation is done at a different place in the code. | |||
The argument, String, should be a literal string. Concatenated strings | |||
and other string expressions won't work. | |||
The macro's expansion is not parenthesized, so that it is suitable as | |||
initializer for static 'char[]' or 'const char[]' variables. */ | |||
#define gettext_noop(String) String | |||
/* The separator between msgctxt and msgid in a .mo file. */ | |||
#define GETTEXT_CONTEXT_GLUE "\004" | |||
/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a | |||
MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be | |||
short and rarely need to change. | |||
The letter 'p' stands for 'particular' or 'special'. */ | |||
#ifdef DEFAULT_TEXT_DOMAIN | |||
# define pgettext(Msgctxt, Msgid) \ | |||
pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) | |||
#else | |||
# define pgettext(Msgctxt, Msgid) \ | |||
pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) | |||
#endif | |||
#define dpgettext(Domainname, Msgctxt, Msgid) \ | |||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) | |||
#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ | |||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) | |||
#ifdef DEFAULT_TEXT_DOMAIN | |||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ | |||
npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) | |||
#else | |||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ | |||
npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) | |||
#endif | |||
#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ | |||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) | |||
#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ | |||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) | |||
#ifdef __GNUC__ | |||
__inline | |||
#else | |||
#ifdef __cplusplus | |||
inline | |||
#endif | |||
#endif | |||
static const char * | |||
pgettext_aux (const char *domain, | |||
const char *msg_ctxt_id, const char *msgid, | |||
int category) | |||
{ | |||
const char *translation = dcgettext (domain, msg_ctxt_id, category); | |||
if (translation == msg_ctxt_id) | |||
return msgid; | |||
else | |||
return translation; | |||
} | |||
#ifdef __GNUC__ | |||
__inline | |||
#else | |||
#ifdef __cplusplus | |||
inline | |||
#endif | |||
#endif | |||
static const char * | |||
npgettext_aux (const char *domain, | |||
const char *msg_ctxt_id, const char *msgid, | |||
const char *msgid_plural, unsigned long int n, | |||
int category) | |||
{ | |||
const char *translation = | |||
dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); | |||
if (translation == msg_ctxt_id || translation == msgid_plural) | |||
return (n == 1 ? msgid : msgid_plural); | |||
else | |||
return translation; | |||
} | |||
/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID | |||
can be arbitrary expressions. But for string literals these macros are | |||
less efficient than those above. */ | |||
#include <string.h> | |||
#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ | |||
(((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ | |||
/* || __STDC_VERSION__ >= 199901L */ ) | |||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | |||
#include <stdlib.h> | |||
#endif | |||
#define pgettext_expr(Msgctxt, Msgid) \ | |||
dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) | |||
#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ | |||
dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) | |||
#ifdef __GNUC__ | |||
__inline | |||
#else | |||
#ifdef __cplusplus | |||
inline | |||
#endif | |||
#endif | |||
static const char * | |||
dcpgettext_expr (const char *domain, | |||
const char *msgctxt, const char *msgid, | |||
int category) | |||
{ | |||
size_t msgctxt_len = strlen (msgctxt) + 1; | |||
size_t msgid_len = strlen (msgid) + 1; | |||
const char *translation; | |||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | |||
char msg_ctxt_id[msgctxt_len + msgid_len]; | |||
#else | |||
char buf[1024]; | |||
char *msg_ctxt_id = | |||
(msgctxt_len + msgid_len <= sizeof (buf) | |||
? buf | |||
: (char *) malloc (msgctxt_len + msgid_len)); | |||
if (msg_ctxt_id != NULL) | |||
#endif | |||
{ | |||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | |||
msg_ctxt_id[msgctxt_len - 1] = '\004'; | |||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | |||
translation = dcgettext (domain, msg_ctxt_id, category); | |||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | |||
if (msg_ctxt_id != buf) | |||
free (msg_ctxt_id); | |||
#endif | |||
if (translation != msg_ctxt_id) | |||
return translation; | |||
} | |||
return msgid; | |||
} | |||
#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ | |||
dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) | |||
#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ | |||
dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) | |||
#ifdef __GNUC__ | |||
__inline | |||
#else | |||
#ifdef __cplusplus | |||
inline | |||
#endif | |||
#endif | |||
static const char * | |||
dcnpgettext_expr (const char *domain, | |||
const char *msgctxt, const char *msgid, | |||
const char *msgid_plural, unsigned long int n, | |||
int category) | |||
{ | |||
size_t msgctxt_len = strlen (msgctxt) + 1; | |||
size_t msgid_len = strlen (msgid) + 1; | |||
const char *translation; | |||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | |||
char msg_ctxt_id[msgctxt_len + msgid_len]; | |||
#else | |||
char buf[1024]; | |||
char *msg_ctxt_id = | |||
(msgctxt_len + msgid_len <= sizeof (buf) | |||
? buf | |||
: (char *) malloc (msgctxt_len + msgid_len)); | |||
if (msg_ctxt_id != NULL) | |||
#endif | |||
{ | |||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | |||
msg_ctxt_id[msgctxt_len - 1] = '\004'; | |||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | |||
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); | |||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | |||
if (msg_ctxt_id != buf) | |||
free (msg_ctxt_id); | |||
#endif | |||
if (!(translation == msg_ctxt_id || translation == msgid_plural)) | |||
return translation; | |||
} | |||
return (n == 1 ? msgid : msgid_plural); | |||
} | |||
#endif /* _LIBGETTEXT_H */ |
@@ -38,7 +38,7 @@ | |||
#include "TXMsgBox.h" | |||
#include "CConn.h" | |||
#include "gettext.h" | |||
#include <intl/gettext.h> | |||
#define _(String) gettext (String) | |||
#define gettext_noop(String) String | |||
#define N_(String) gettext_noop (String) |
@@ -20,10 +20,6 @@ | |||
// Image.cxx | |||
// | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <sys/types.h> |
@@ -23,10 +23,6 @@ | |||
#ifndef __IMAGE_H__ | |||
#define __IMAGE_H__ | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <X11/Xlib.h> | |||
#include <X11/Xutil.h> | |||
@@ -1,13 +0,0 @@ | |||
bin_PROGRAMS = x0vncserver | |||
x0vncserver_SOURCES = buildtime.c Geometry.cxx Geometry.h Image.cxx Image.h \ | |||
PollingManager.cxx PollingManager.h PollingScheduler.cxx \ | |||
PollingScheduler.h TimeMillis.cxx TimeMillis.h XPixelBuffer.cxx \ | |||
XPixelBuffer.h x0vncserver.cxx \ | |||
$(UNIX_DIR)/vncconfig/QueryConnectDialog.cxx | |||
x0vncserver_CPPFLAGS = -I$(UNIX_DIR) -I$(COMMON_DIR) -I$(TX_DIR) \ | |||
-I$(VNCCONFIG_DIR) | |||
x0vncserver_LDADD = $(RFB_LIBS) $(NETWORK_LIBS) $(RDR_LIBS) $(TX_LIBS) \ | |||
$(ZLIB_LIBS) $(JPEG_LIBS) -lXext -lX11 |
@@ -0,0 +1,30 @@ | |||
SRCS = Image.cxx TimeMillis.cxx PollingScheduler.cxx PollingManager.cxx \ | |||
Geometry.cxx XPixelBuffer.cxx \ | |||
x0vncserver.cxx ../vncconfig/QueryConnectDialog.cxx | |||
OBJS = $(SRCS:.cxx=.o) | |||
program = x0vncserver | |||
DEP_LIBS = $(COMMON)/rfb/librfb.a \ | |||
$(COMMON)/network/libnetwork.a \ | |||
$(COMMON)/rdr/librdr.a \ | |||
$(TOP)/tx/libtx.a | |||
EXTRA_LIBS = @ZLIB_LIB@ @JPEG_LIB@ @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \ | |||
@XTEST_LIB@ -lXext -lX11 @X_EXTRA_LIBS@ @CL_LIB@ @DMEDIA_LIB@ | |||
# X_CFLAGS are really CPPFLAGS | |||
DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/vncconfig \ | |||
@XTEST_DEFINE@ @READDISPLAY_DEFINE@ @MITSHM_DEFINE@ @X_CFLAGS@ | |||
all:: $(program) | |||
$(program): $(OBJS) buildtime.o $(DEP_LIBS) | |||
rm -f $(program) | |||
$(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) | |||
buildtime.o: $(OBJS) $(DEP_LIBS) | |||
# followed by boilerplate.mk |
@@ -20,10 +20,6 @@ | |||
// FIXME: Check cases when screen width/height is not a multiply of 32. | |||
// e.g. 800x600. | |||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
#include <strings.h> | |||
#include <sys/types.h> | |||
#include <sys/stat.h> |