Browse Source

ZRLE no longer uses C++, but C

pull/1/head
dscho 19 years ago
parent
commit
937b906f0d
  1. 3
      AUTHORS
  2. 1
      ChangeLog
  3. 22
      Makefile.am
  4. 174
      Makefile.in
  5. 55
      autogen.sh
  6. 2
      classes/Makefile.in
  7. 3
      config.h.in
  8. 623
      configure
  9. 37
      configure.ac
  10. 3
      contrib/Makefile.in
  11. 3
      examples/Makefile.in
  12. 3
      libvncclient/Makefile.in
  13. 8
      rfb/rfb.h
  14. 2
      rfb/rfbproto.h
  15. 8
      rfbserver.c
  16. 3
      test/Makefile.in
  17. 11
      vncterm/Makefile.in
  18. 183
      zrle.c
  19. 272
      zrleencodetemplate.c
  20. 276
      zrleoutstream.c
  21. 62
      zrleoutstream.h
  22. 62
      zrlepalettehelper.c
  23. 46
      zrlepalettehelper.h
  24. 30
      zrletypes.h

3
AUTHORS

@ -22,7 +22,8 @@ Occasional important patches were sent by (in order I found the names in my
archives and please don't beat me, if I forgot you, but just send me an
email!): Akira Hatakeyama, Karl J. Runge, Justin "Zippy" Dearing,
Oliver Mihatsch, Greg Sternberg, Werner Hofer, Giampiero Giancipoli,
Glenn Mabutt, Paul Kreiner, Erik Kunze, Mike Frysinger.
Glenn Mabutt, Paul Kreiner, Erik Kunze, Mike Frysinger, Martin Waitz,
Mark McLoughlin.
Probably I forgot quite a few people sending a patch here and there, which
really made a difference. Without those, some obscure bugs still would

1
ChangeLog

@ -1,3 +1,4 @@
Mark sent me patches to no longer need C++ for ZRLE encoding!
added --disable-cxx Option for configure
x11vnc changes from Karl Runge:
- Changed all those whimpy printf(...)'s into manly fprintf(stdxxx,...)'s.

22
Makefile.am

@ -1,4 +1,4 @@
CFLAGS=-g
CFLAGS=-g -Wall
SUBDIRS=. examples contrib vncterm classes libvncclient test
DIST_SUBDIRS=examples contrib vncterm classes libvncclient test
@ -11,28 +11,20 @@ includedir=$(prefix)/include/rfb
include_HEADERS=rfb/rfb.h rfb/rfbconfig.h rfb/rfbint.h rfb/rfbproto.h \
rfb/keysym.h rfb/rfbregion.h rfb/rfbclient.h
noinst_HEADERS=d3des.h zrleDecode.h zrleEncode.h rfb/default8x16.h \
rdr/Exception.h rdr/FdInStream.h rdr/FdOutStream.h \
rdr/FixedMemOutStream.h rdr/InStream.h rdr/MemInStream.h \
rdr/MemOutStream.h rdr/NullOutStream.h rdr/OutStream.h \
rdr/ZlibInStream.h rdr/ZlibOutStream.h rdr/types.h
ZRLE_SRCS=zrle.cxx rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \
rdr/NullOutStream.cxx rdr/ZlibInStream.cxx rdr/ZlibOutStream.cxx
noinst_HEADERS=d3des.h rfb/default8x16.h zrleoutstream.h \
zrlepalettehelper.h zrletypes.h
EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
tableinitcmtemplate.c tabletrans24template.c $(ZRLE_SRCS)
tableinitcmtemplate.c tabletrans24template.c \
zrleencodetemplate.c
LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c httpd.c cursor.c font.c \
draw.c selbox.c d3des.c vncauth.c cargs.c
draw.c selbox.c d3des.c vncauth.c cargs.c \
zrle.c zrleoutstream.c zrlepalettehelper.c
if HAVE_CXX
libvncserver_a_SOURCES=$(LIB_SRCS) $(ZRLE_SRCS)
else
libvncserver_a_SOURCES=$(LIB_SRCS)
endif
lib_LIBRARIES=libvncserver.a

174
Makefile.in

@ -66,8 +66,6 @@ includedir = $(prefix)/include/rfb
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@
@ -82,7 +80,7 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
CFLAGS = -g
CFLAGS = -g -Wall
SUBDIRS = . examples contrib vncterm classes libvncclient test
DIST_SUBDIRS = examples contrib vncterm classes libvncclient test
@ -94,29 +92,23 @@ include_HEADERS = rfb/rfb.h rfb/rfbconfig.h rfb/rfbint.h rfb/rfbproto.h \
rfb/keysym.h rfb/rfbregion.h rfb/rfbclient.h
noinst_HEADERS = d3des.h zrleDecode.h zrleEncode.h rfb/default8x16.h \
rdr/Exception.h rdr/FdInStream.h rdr/FdOutStream.h \
rdr/FixedMemOutStream.h rdr/InStream.h rdr/MemInStream.h \
rdr/MemOutStream.h rdr/NullOutStream.h rdr/OutStream.h \
rdr/ZlibInStream.h rdr/ZlibOutStream.h rdr/types.h
ZRLE_SRCS = zrle.cxx rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \
rdr/NullOutStream.cxx rdr/ZlibInStream.cxx rdr/ZlibOutStream.cxx
noinst_HEADERS = d3des.h rfb/default8x16.h zrleoutstream.h \
zrlepalettehelper.h zrletypes.h
EXTRA_DIST = tableinit24.c tableinittctemplate.c tabletranstemplate.c \
tableinitcmtemplate.c tabletrans24template.c $(ZRLE_SRCS)
tableinitcmtemplate.c tabletrans24template.c \
zrleencodetemplate.c
LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c httpd.c cursor.c font.c \
draw.c selbox.c d3des.c vncauth.c cargs.c
draw.c selbox.c d3des.c vncauth.c cargs.c \
zrle.c zrleoutstream.c zrlepalettehelper.c
@HAVE_CXX_TRUE@libvncserver_a_SOURCES = $(LIB_SRCS) $(ZRLE_SRCS)
@HAVE_CXX_FALSE@libvncserver_a_SOURCES = $(LIB_SRCS)
libvncserver_a_SOURCES = $(LIB_SRCS)
lib_LIBRARIES = libvncserver.a
subdir = .
@ -134,14 +126,9 @@ am__objects_1 = main.$(OBJEXT) rfbserver.$(OBJEXT) rfbregion.$(OBJEXT) \
translate.$(OBJEXT) cutpaste.$(OBJEXT) zlib.$(OBJEXT) \
tight.$(OBJEXT) httpd.$(OBJEXT) cursor.$(OBJEXT) font.$(OBJEXT) \
draw.$(OBJEXT) selbox.$(OBJEXT) d3des.$(OBJEXT) \
vncauth.$(OBJEXT) cargs.$(OBJEXT)
am__objects_2 = zrle.$(OBJEXT) FdInStream.$(OBJEXT) \
FdOutStream.$(OBJEXT) InStream.$(OBJEXT) \
NullOutStream.$(OBJEXT) ZlibInStream.$(OBJEXT) \
ZlibOutStream.$(OBJEXT)
@HAVE_CXX_TRUE@am_libvncserver_a_OBJECTS = $(am__objects_1) \
@HAVE_CXX_TRUE@ $(am__objects_2)
@HAVE_CXX_FALSE@am_libvncserver_a_OBJECTS = $(am__objects_1)
vncauth.$(OBJEXT) cargs.$(OBJEXT) zrle.$(OBJEXT) \
zrleoutstream.$(OBJEXT) zrlepalettehelper.$(OBJEXT)
am_libvncserver_a_OBJECTS = $(am__objects_1)
libvncserver_a_OBJECTS = $(am_libvncserver_a_OBJECTS)
SCRIPTS = $(bin_SCRIPTS)
@ -153,31 +140,23 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/FdInStream.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/FdOutStream.Po ./$(DEPDIR)/InStream.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/NullOutStream.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/ZlibInStream.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/ZlibOutStream.Po ./$(DEPDIR)/auth.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/cargs.Po ./$(DEPDIR)/corre.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/cursor.Po ./$(DEPDIR)/cutpaste.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/d3des.Po ./$(DEPDIR)/draw.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/font.Po ./$(DEPDIR)/hextile.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/httpd.Po ./$(DEPDIR)/main.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/rfbregion.Po ./$(DEPDIR)/rfbserver.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/rre.Po ./$(DEPDIR)/selbox.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/stats.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/tight.Po ./$(DEPDIR)/translate.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/vncauth.Po ./$(DEPDIR)/zlib.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/zrle.Po
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/auth.Po ./$(DEPDIR)/cargs.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/corre.Po ./$(DEPDIR)/cursor.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/cutpaste.Po ./$(DEPDIR)/d3des.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/draw.Po ./$(DEPDIR)/font.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/hextile.Po ./$(DEPDIR)/httpd.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/rfbregion.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/rfbserver.Po ./$(DEPDIR)/rre.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/selbox.Po ./$(DEPDIR)/sockets.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/stats.Po ./$(DEPDIR)/tight.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/translate.Po ./$(DEPDIR)/vncauth.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/zlib.Po ./$(DEPDIR)/zrle.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/zrleoutstream.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/zrlepalettehelper.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
CXXFLAGS = @CXXFLAGS@
DIST_SOURCES = $(libvncserver_a_SOURCES)
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
@ -197,7 +176,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .cxx .o .obj
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
@ -264,12 +243,6 @@ uninstall-libLIBRARIES:
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
FdInStream.$(OBJEXT): rdr/FdInStream.cxx
FdOutStream.$(OBJEXT): rdr/FdOutStream.cxx
InStream.$(OBJEXT): rdr/InStream.cxx
NullOutStream.$(OBJEXT): rdr/NullOutStream.cxx
ZlibInStream.$(OBJEXT): rdr/ZlibInStream.cxx
ZlibOutStream.$(OBJEXT): rdr/ZlibOutStream.cxx
libvncserver.a: $(libvncserver_a_OBJECTS) $(libvncserver_a_DEPENDENCIES)
-rm -f libvncserver.a
$(libvncserver_a_AR) libvncserver.a $(libvncserver_a_OBJECTS) $(libvncserver_a_LIBADD)
@ -302,12 +275,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FdInStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FdOutStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NullOutStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ZlibInStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ZlibOutStream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cargs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corre.Po@am__quote@
@ -330,6 +297,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncauth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zrle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zrleoutstream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zrlepalettehelper.Po@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
@ -346,91 +315,6 @@ distclean-depend:
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
CCDEPMODE = @CCDEPMODE@
.cxx.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
.cxx.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
FdInStream.o: rdr/FdInStream.cxx
@AMDEP_TRUE@ source='rdr/FdInStream.cxx' object='FdInStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/FdInStream.Po' tmpdepfile='$(DEPDIR)/FdInStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FdInStream.o `test -f rdr/FdInStream.cxx || echo '$(srcdir)/'`rdr/FdInStream.cxx
FdInStream.obj: rdr/FdInStream.cxx
@AMDEP_TRUE@ source='rdr/FdInStream.cxx' object='FdInStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/FdInStream.Po' tmpdepfile='$(DEPDIR)/FdInStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FdInStream.obj `cygpath -w rdr/FdInStream.cxx`
FdOutStream.o: rdr/FdOutStream.cxx
@AMDEP_TRUE@ source='rdr/FdOutStream.cxx' object='FdOutStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/FdOutStream.Po' tmpdepfile='$(DEPDIR)/FdOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FdOutStream.o `test -f rdr/FdOutStream.cxx || echo '$(srcdir)/'`rdr/FdOutStream.cxx
FdOutStream.obj: rdr/FdOutStream.cxx
@AMDEP_TRUE@ source='rdr/FdOutStream.cxx' object='FdOutStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/FdOutStream.Po' tmpdepfile='$(DEPDIR)/FdOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FdOutStream.obj `cygpath -w rdr/FdOutStream.cxx`
InStream.o: rdr/InStream.cxx
@AMDEP_TRUE@ source='rdr/InStream.cxx' object='InStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/InStream.Po' tmpdepfile='$(DEPDIR)/InStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o InStream.o `test -f rdr/InStream.cxx || echo '$(srcdir)/'`rdr/InStream.cxx
InStream.obj: rdr/InStream.cxx
@AMDEP_TRUE@ source='rdr/InStream.cxx' object='InStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/InStream.Po' tmpdepfile='$(DEPDIR)/InStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o InStream.obj `cygpath -w rdr/InStream.cxx`
NullOutStream.o: rdr/NullOutStream.cxx
@AMDEP_TRUE@ source='rdr/NullOutStream.cxx' object='NullOutStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/NullOutStream.Po' tmpdepfile='$(DEPDIR)/NullOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NullOutStream.o `test -f rdr/NullOutStream.cxx || echo '$(srcdir)/'`rdr/NullOutStream.cxx
NullOutStream.obj: rdr/NullOutStream.cxx
@AMDEP_TRUE@ source='rdr/NullOutStream.cxx' object='NullOutStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/NullOutStream.Po' tmpdepfile='$(DEPDIR)/NullOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NullOutStream.obj `cygpath -w rdr/NullOutStream.cxx`
ZlibInStream.o: rdr/ZlibInStream.cxx
@AMDEP_TRUE@ source='rdr/ZlibInStream.cxx' object='ZlibInStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/ZlibInStream.Po' tmpdepfile='$(DEPDIR)/ZlibInStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ZlibInStream.o `test -f rdr/ZlibInStream.cxx || echo '$(srcdir)/'`rdr/ZlibInStream.cxx
ZlibInStream.obj: rdr/ZlibInStream.cxx
@AMDEP_TRUE@ source='rdr/ZlibInStream.cxx' object='ZlibInStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/ZlibInStream.Po' tmpdepfile='$(DEPDIR)/ZlibInStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ZlibInStream.obj `cygpath -w rdr/ZlibInStream.cxx`
ZlibOutStream.o: rdr/ZlibOutStream.cxx
@AMDEP_TRUE@ source='rdr/ZlibOutStream.cxx' object='ZlibOutStream.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/ZlibOutStream.Po' tmpdepfile='$(DEPDIR)/ZlibOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ZlibOutStream.o `test -f rdr/ZlibOutStream.cxx || echo '$(srcdir)/'`rdr/ZlibOutStream.cxx
ZlibOutStream.obj: rdr/ZlibOutStream.cxx
@AMDEP_TRUE@ source='rdr/ZlibOutStream.cxx' object='ZlibOutStream.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/ZlibOutStream.Po' tmpdepfile='$(DEPDIR)/ZlibOutStream.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ZlibOutStream.obj `cygpath -w rdr/ZlibOutStream.cxx`
CXXDEPMODE = @CXXDEPMODE@
uninstall-info-am:
includeHEADERS_INSTALL = $(INSTALL_HEADER)
install-includeHEADERS: $(include_HEADERS)
@ -562,7 +446,7 @@ distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/rdr $(distdir)/rfb
$(mkinstalldirs) $(distdir)/. $(distdir)/rfb
@for file in $(DISTFILES); do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \

55
autogen.sh

@ -0,0 +1,55 @@
#! /bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
AUTOMAKE=automake-1.4
ACLOCAL=aclocal-1.4
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
ACLOCAL=aclocal
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile libvncserver."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile libvncserver."
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
(test -f $srcdir/rfb/rfb.h) || {
echo "You must run this script in the top-level libvncserver directory"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
$ACLOCAL $ACLOCAL_FLAGS
autoheader
$AUTOMAKE --add-missing --copy
autoconf
echo "Running ./configure --enable-maintainer-mode" "$@"
$srcdir/configure --enable-maintainer-mode "$@"
echo "Now type 'make' to compile libvncserver."

2
classes/Makefile.in

@ -65,8 +65,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@

3
config.h.in

@ -155,9 +155,6 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
/* Use zrle compression; needs a c++ compiler */
#undef HAVE_ZRLE
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK

623
configure vendored

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE RANLIB ac_ct_RANLIB CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS HAVE_X_TRUE HAVE_X_FALSE EGREP HAVE_LIBPTHREAD_TRUE HAVE_LIBPTHREAD_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE HAVE_CXX_TRUE HAVE_CXX_FALSE CCLD LIBOBJS LINUX_TRUE LINUX_FALSE OSX_TRUE OSX_FALSE HAVE_RPM_TRUE HAVE_RPM_FALSE RPMSOURCEDIR LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE RANLIB ac_ct_RANLIB CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS HAVE_X_TRUE HAVE_X_FALSE EGREP HAVE_LIBPTHREAD_TRUE HAVE_LIBPTHREAD_FALSE LIBOBJS LINUX_TRUE LINUX_FALSE OSX_TRUE OSX_FALSE HAVE_RPM_TRUE HAVE_RPM_FALSE RPMSOURCEDIR LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -770,14 +770,6 @@ ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
ac_env_CXX_set=${CXX+set}
ac_env_CXX_value=$CXX
ac_cv_env_CXX_set=${CXX+set}
ac_cv_env_CXX_value=$CXX
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
#
# Report the --help message.
@ -861,7 +853,6 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
--disable-cxx disable use of c++
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -881,8 +872,6 @@ Some influential environment variables:
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@ -4998,15 +4987,15 @@ fi
fi
if test ! -z "$HAVE_PTHREAD_H"; then
if test ! -z "$HAVE_ZLIB_H"; then
echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
echo "$as_me:$LINENO: checking for deflate in -lz" >&5
echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_deflate+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@ -5021,11 +5010,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_mutex_lock ();
char deflate ();
int
main ()
{
pthread_mutex_lock ();
deflate ();
;
return 0;
}
@ -5042,34 +5031,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_mutex_lock=yes
ac_cv_lib_z_deflate=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_mutex_lock=no
ac_cv_lib_z_deflate=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6
if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then
echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
if test $ac_cv_lib_z_deflate = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
#define HAVE_LIBZ 1
_ACEOF
LIBS="-lpthread $LIBS"
LIBS="-lz $LIBS"
else
HAVE_ZLIB_H=""
fi
echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
if test ! -z "$HAVE_JPEGLIB_H" -a ! -z "$HAVE_ZLIB_H"; then
echo "$as_me:$LINENO: checking for jpeg_CreateCompress in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_CreateCompress in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_CreateCompress+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
LIBS="-ljpeg $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@ -5084,11 +5077,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_mutex_lock ();
char jpeg_CreateCompress ();
int
main ()
{
pthread_mutex_lock ();
jpeg_CreateCompress ();
;
return 0;
}
@ -5105,481 +5098,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_mutex_lock=yes
ac_cv_lib_jpeg_jpeg_CreateCompress=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_mutex_lock=no
ac_cv_lib_jpeg_jpeg_CreateCompress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6
if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then
HAVE_LIBPTHREAD="true"
fi
fi
if test ! -z "$HAVE_LIBPTHREAD"; then
HAVE_LIBPTHREAD_TRUE=
HAVE_LIBPTHREAD_FALSE='#'
else
HAVE_LIBPTHREAD_TRUE='#'
HAVE_LIBPTHREAD_FALSE=
fi
# Check whether --enable-cxx or --disable-cxx was given.
if test "${enable_cxx+set}" = set; then
enableval="$enable_cxx"
disable_cxx=yes
fi;
if test -z "$disable_cxx"; then
for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$CXX" && break
done
test -n "$CXX" || CXX="none"
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$ac_tool_prefix"; then
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$CXX" && break
done
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$ac_ct_CXX" && break
done
test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
CXX=$ac_ct_CXX
fi
# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
"checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cxx_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cxx_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
for ac_declaration in \
''\
'#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_CreateCompress" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_CreateCompress" >&6
if test $ac_cv_lib_jpeg_jpeg_CreateCompress = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CXX" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
am_cv_CXX_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CXX_dependencies_compiler_type=none
fi
LIBS="-ljpeg $LIBS"
fi
echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
else
CXX=none
fi
fi
if test ! -z "$HAVE_ZLIB_H"; then
if test ! -z "$HAVE_PTHREAD_H"; then
echo "$as_me:$LINENO: checking for deflate in -lz" >&5
echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_deflate+set}" = set; then
echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@ -5594,11 +5144,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char deflate ();
char pthread_mutex_lock ();
int
main ()
{
deflate ();
pthread_mutex_lock ();
;
return 0;
}
@ -5615,38 +5165,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_z_deflate=yes
ac_cv_lib_pthread_pthread_mutex_lock=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_z_deflate=no
ac_cv_lib_pthread_pthread_mutex_lock=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
if test $ac_cv_lib_z_deflate = yes; then
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6
if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBZ 1
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lz $LIBS"
LIBS="-lpthread $LIBS"
else
HAVE_ZLIB_H=""
fi
if test ! -z "$HAVE_JPEGLIB_H" -a ! -z "$HAVE_ZLIB_H"; then
echo "$as_me:$LINENO: checking for jpeg_CreateCompress in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_CreateCompress in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_CreateCompress+set}" = set; then
echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5
echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ljpeg $LIBS"
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@ -5661,11 +5207,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char jpeg_CreateCompress ();
char pthread_mutex_lock ();
int
main ()
{
jpeg_CreateCompress ();
pthread_mutex_lock ();
;
return 0;
}
@ -5682,59 +5228,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_jpeg_jpeg_CreateCompress=yes
ac_cv_lib_pthread_pthread_mutex_lock=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_jpeg_jpeg_CreateCompress=no
ac_cv_lib_pthread_pthread_mutex_lock=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_CreateCompress" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_CreateCompress" >&6
if test $ac_cv_lib_jpeg_jpeg_CreateCompress = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF
LIBS="-ljpeg $LIBS"
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6
if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then
HAVE_LIBPTHREAD="true"
fi
fi
if test ! -z "$HAVE_ZLIB_H"; then
# check for c++, but don't fail if not found
if test x$CXX != xnone; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ZRLE 1
_ACEOF
if test -z "$CXX"; then
CCLD="\$(CXX)"
else
CCLD="$CXX"
fi
fi
fi
else
CXX=none
fi
if test x$CXX != xnone -a ! -z "$HAVE_ZLIB_H"; then
HAVE_CXX_TRUE=
HAVE_CXX_FALSE='#'
if test ! -z "$HAVE_LIBPTHREAD"; then
HAVE_LIBPTHREAD_TRUE=
HAVE_LIBPTHREAD_FALSE='#'
else
HAVE_CXX_TRUE='#'
HAVE_CXX_FALSE=
HAVE_LIBPTHREAD_TRUE='#'
HAVE_LIBPTHREAD_FALSE=
fi
# Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@ -9590,13 +9111,6 @@ echo "$as_me: error: conditional \"HAVE_LIBPTHREAD\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"HAVE_CXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"HAVE_CXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@ -10202,13 +9716,6 @@ s,@HAVE_X_FALSE@,$HAVE_X_FALSE,;t t
s,@EGREP@,$EGREP,;t t
s,@HAVE_LIBPTHREAD_TRUE@,$HAVE_LIBPTHREAD_TRUE,;t t
s,@HAVE_LIBPTHREAD_FALSE@,$HAVE_LIBPTHREAD_FALSE,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@CXXDEPMODE@,$CXXDEPMODE,;t t
s,@HAVE_CXX_TRUE@,$HAVE_CXX_TRUE,;t t
s,@HAVE_CXX_FALSE@,$HAVE_CXX_FALSE,;t t
s,@CCLD@,$CCLD,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LINUX_TRUE@,$LINUX_TRUE,;t t
s,@LINUX_FALSE@,$LINUX_FALSE,;t t

37
configure.ac

@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(LibVNCServer, 0.6pre, http://sourceforge.net/projects/libvncserver)
AM_INIT_AUTOMAKE(LibVNCServer, 0.6pre)
AM_CONFIG_HEADER([config.h])
AM_CONFIG_HEADER(config.h)
AX_PREFIX_CONFIG_H([rfb/rfbconfig.h])
# Checks for programs.
@ -62,42 +62,17 @@ AC_ARG_WITH(libz,
if test "x$with_zlib" = "xyes" -a "x$with_libz" = "xyes"; then
AC_CHECK_HEADER(zlib.h, HAVE_ZLIB_H="true")
fi
if test ! -z "$HAVE_PTHREAD_H"; then
AC_CHECK_LIB(pthread, pthread_mutex_lock)
AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true")
fi
AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_LIBPTHREAD")
AC_ARG_ENABLE(cxx,
[ --disable-cxx disable use of c++],
[ disable_cxx=yes],)
if test -z "$disable_cxx"; then
AC_CHECK_PROGS(CXX,[g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC],none)
AC_PROG_CXX
else
CXX=none
fi
if test ! -z "$HAVE_ZLIB_H"; then
AC_CHECK_LIB(z, deflate, , HAVE_ZLIB_H="")
if test ! -z "$HAVE_JPEGLIB_H" -a ! -z "$HAVE_ZLIB_H"; then
AC_CHECK_LIB(jpeg, jpeg_CreateCompress)
fi
if test ! -z "$HAVE_ZLIB_H"; then
# check for c++, but don't fail if not found
AH_TEMPLATE(HAVE_ZRLE, [Use zrle compression; needs a c++ compiler])
if test x$CXX != xnone; then
AC_DEFINE(HAVE_ZRLE)
if test -z "$CXX"; then
CCLD="\$(CXX)"
else
CCLD="$CXX"
fi
fi
fi
else
CXX=none
fi
AM_CONDITIONAL(HAVE_CXX, test x$CXX != xnone -a ! -z "$HAVE_ZLIB_H")
AC_SUBST(CCLD)
if test ! -z "$HAVE_PTHREAD_H"; then
AC_CHECK_LIB(pthread, pthread_mutex_lock)
AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true")
fi
AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_LIBPTHREAD")
# Checks for header files.
AC_HEADER_STDC

3
contrib/Makefile.in

@ -65,8 +65,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@
@ -122,6 +120,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/x11vnc.Po ./$(DEPDIR)/zippy.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(x11vnc_SOURCES) $(zippy_SOURCES)
DIST_COMMON = ChangeLog Makefile.am Makefile.in

3
examples/Makefile.in

@ -65,8 +65,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@
@ -218,6 +216,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/vncev.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = blooptest.c colourmaptest.c example.c fontsel.c mac.c \
pnmshow.c pnmshow24.c regiontest.c simple.c simple15.c \

3
libvncclient/Makefile.in

@ -65,8 +65,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@
@ -126,6 +124,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/vncviewer.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libvncclient_a_SOURCES) $(client_test_SOURCES)
DIST_COMMON = Makefile.am Makefile.in

8
rfb/rfb.h

@ -89,13 +89,13 @@ extern "C"
the library and your application (at least the parts including rfb.h)
with the same support for pthreads. */
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_ZRLE
#ifdef LIBVNCSERVER_HAVE_LIBZ
#define rfbInitServer rfbInitServerWithPthreadsAndZRLE
#else
#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE
#endif
#else
#ifdef LIBVNCSERVER_HAVE_ZRLE