diff --git a/ChangeLog b/ChangeLog index 8a02c14..72a10b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-01-29 Johannes E. Schindelin + * Honour the check for libz and libjpeg again. + 2004-01-21 Johannes E. Schindelin * do not send unneccessary updates when drawing a cursor * ignore SIGPIPE; it is handled by EPIPE diff --git a/Makefile.am b/Makefile.am index dda93ca..359012d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,11 +18,18 @@ EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \ tableinitcmtemplate.c tabletrans24template.c \ zrleencodetemplate.c +if HAVE_LIBZ +ZLIBSRCS = zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c +if HAVE_LIBJPEG +JPEGSRCS = tight.c +endif +endif + 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 \ + httpd.c cursor.c font.c \ draw.c selbox.c d3des.c vncauth.c cargs.c \ - zrle.c zrleoutstream.c zrlepalettehelper.c + $(ZLIBSRCS) $(JPEGSRCS) libvncserver_a_SOURCES=$(LIB_SRCS) diff --git a/configure.ac b/configure.ac index f213615..ddaec06 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ 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) + AC_CHECK_LIB(jpeg, jpeg_CreateCompress, , HAVE_JPEGLIB_H="") fi fi if test ! -z "$HAVE_PTHREAD_H"; then @@ -77,6 +77,8 @@ if test ! -z "$HAVE_PTHREAD_H"; then AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true") fi AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_LIBPTHREAD") +AM_CONDITIONAL(HAVE_LIBZ, test ! -z "$HAVE_ZLIB_H") +AM_CONDITIONAL(HAVE_LIBJPEG, test ! -u "$HAVE_JPEGLIB_H") # Checks for header files. AC_HEADER_STDC diff --git a/tight.c b/tight.c index 21198a1..b97adb9 100644 --- a/tight.c +++ b/tight.c @@ -27,9 +27,6 @@ /*#include */ #include -#ifdef LIBVNCSERVER_HAVE_LIBZ -#ifdef LIBVNCSERVER_HAVE_LIBJPEG - #ifdef WIN32 #define XMD_H #undef FAR @@ -1821,5 +1818,3 @@ JpegSetDstManager(j_compress_ptr cinfo) cinfo->dest = &jpegDstManager; } -#endif /* LIBJPEG */ -#endif /* LIBZ */ diff --git a/zlib.c b/zlib.c index e4ab1bd..9905810 100644 --- a/zlib.c +++ b/zlib.c @@ -32,8 +32,6 @@ #include -#ifdef LIBVNCSERVER_HAVE_LIBZ - /* * zlibBeforeBuf contains pixel data in the client's format. * zlibAfterBuf contains the zlib (deflated) encoding version. @@ -302,4 +300,3 @@ rfbSendRectEncodingZlib(cl, x, y, w, h) } -#endif diff --git a/zrle.c b/zrle.c index dd1b82e..6ab933e 100644 --- a/zrle.c +++ b/zrle.c @@ -24,8 +24,8 @@ * Routines to implement Zlib Run-length Encoding (ZRLE). */ -#include -#include +#include "rfb/rfb.h" +#include "zrleoutstream.h" #define GET_IMAGE_INTO_BUF(tx,ty,tw,th,buf) \ diff --git a/zrleencodetemplate.c b/zrleencodetemplate.c index f3147c1..a1772ae 100644 --- a/zrleencodetemplate.c +++ b/zrleencodetemplate.c @@ -31,8 +31,8 @@ * algorithm writes to the position one past the end of the pixel data. */ -#include -#include +#include "zrleoutstream.h" +#include "zrlepalettehelper.h" #include /* __RFB_CONCAT2 concatenates its two arguments. __RFB_CONCAT2E does the same diff --git a/zrleoutstream.c b/zrleoutstream.c index 47cc164..d22d649 100644 --- a/zrleoutstream.c +++ b/zrleoutstream.c @@ -18,7 +18,7 @@ * USA. */ -#include +#include "zrleoutstream.h" #include #define ZRLE_IN_BUFFER_SIZE 16384 diff --git a/zrleoutstream.h b/zrleoutstream.h index cc8f770..9e4fe51 100644 --- a/zrleoutstream.h +++ b/zrleoutstream.h @@ -22,8 +22,8 @@ #define __ZRLE_OUT_STREAM_H__ #include -#include -#include +#include "zrletypes.h" +#include "rfb/rfb.h" typedef struct { zrle_U8 *start; diff --git a/zrlepalettehelper.c b/zrlepalettehelper.c index 70cafb4..d758a26 100644 --- a/zrlepalettehelper.c +++ b/zrlepalettehelper.c @@ -18,7 +18,7 @@ * USA. */ -#include +#include "zrlepalettehelper.h" #include #include diff --git a/zrlepalettehelper.h b/zrlepalettehelper.h index c6723c9..e1213d1 100644 --- a/zrlepalettehelper.h +++ b/zrlepalettehelper.h @@ -26,7 +26,7 @@ #ifndef __ZRLE_PALETTE_HELPER_H__ #define __ZRLE_PALETTE_HELPER_H__ -#include +#include "zrletypes.h" #define ZRLE_PALETTE_MAX_SIZE 127