]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Handle conditional jpeg/zlib building through AM_CONDITIONAL to make
authorAdam Tkac <atkac@redhat.com>
Wed, 22 Oct 2008 14:47:09 +0000 (14:47 +0000)
committerAdam Tkac <atkac@redhat.com>
Wed, 22 Oct 2008 14:47:09 +0000 (14:47 +0000)
    make dist working
[Bugfix] #include <jpeglib.h> (not jpeg/jpeglib.h) in JpegCompressor.h

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3043 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/Makefile.am
common/configure.ac
common/rdr/Makefile.am
common/rfb/JpegCompressor.h
common/rfb/Makefile.am

index ef1cdaa438263cac2b524f5c21f9067335ad5e3b..905a2b2d72d374f817e6f58bbf6aab72c5e75f19 100644 (file)
@@ -1 +1,10 @@
-SUBDIRS = @ZLIB_DIR@ @JPEG_DIR@ rdr network Xregion rfb
+SUBDIRS =
+
+if INCLUDED_ZLIB
+SUBDIRS += zlib
+endif
+if INCLUDED_JPEG
+SUBDIRS += jpeg
+endif
+
+SUBDIRS += rdr network Xregion rfb
index f0b8a8abe6b6dd766ded5689472c2a8eae9e328f..b895da61c79efa8f32c1a4b19046b75b90621658 100644 (file)
@@ -55,50 +55,29 @@ AC_CHECK_LIB(dmedia, dmICCreate,
   IRIX_MEDIA=yes])
 AM_CONDITIONAL([IRIX_MEDIA], [ test "x$IRIX_MEDIA" = xyes ])
 
+dnl Check for zlib library
+INCLUDED_ZLIB=no
 AC_ARG_WITH([included-zlib],
        AS_HELP_STRING([--with-included-zlib],
                       [use libz which is distributed with VNC]),
-       [], [with_included_zlib='no'])
-
-if test "x$with_included_zlib" = xno; then
-       AC_SEARCH_LIBS([inflateEnd], [z], [],
-               [ZLIB_DIR=zlib
-                ZLIB_INCLUDE='-I$(top_srcdir)/zlib'
-                ZLIB_LIB='$(top_srcdir)/zlib/libz.la'])
-else
-       ZLIB_DIR=zlib
-       ZLIB_INCLUDE='-I$(top_srcdir)/zlib'
-       ZLIB_LIB='$(top_srcdir)/zlib/libz.la'
-fi
-
-AC_SUBST(ZLIB_DIR)
-AC_SUBST(ZLIB_INCLUDE)
-AC_SUBST(ZLIB_LIB)
+       [INCLUDED_ZLIB=yes],
+       [AC_SEARCH_LIBS([inflateEnd], [z], [], [INCLUDED_ZLIB=yes])])
 
+AM_CONDITIONAL([INCLUDED_ZLIB], [ test "x$INCLUDED_ZLIB" = xyes ])
 AC_CONFIG_SUBDIRS([zlib])
 
+dnl Check for libjpeg library
+INCLUDED_JPEG=no
 AC_ARG_WITH([included-jpeg],
        AS_HELP_STRING([--with-included-jpeg], 
                       [use libjpeg which is distributed with VNC]),
-       [], [with_included_jpeg='no'])
-
-if test "x$with_included_jpeg" = xno; then
-  AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg], [],
-       [JPEG_DIR=jpeg
-        JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
-        JPEG_LIB='$(top_srcdir)/jpeg/libjpeg.la'])
-else
-       JPEG_DIR=jpeg
-       JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
-       JPEG_LIB='$(top_srcdir)/jpeg/libjpeg.la'
-fi
+       [INCLUDED_JPEG=yes],
+       [AC_SEARCH_LIBS([jpeg_destroy_compress], [jpeg], [],
+                       [INCLUDED_JPEG=yes])])
 
+AM_CONDITIONAL([INCLUDED_JPEG], [ test "x$INCLUDED_JPEG" = xyes ])
 AC_CONFIG_SUBDIRS([jpeg])
 
-AC_SUBST(JPEG_DIR)
-AC_SUBST(JPEG_INCLUDE)
-AC_SUBST(JPEG_LIB)
-
 AC_CHECK_FUNCS_ONCE([vsnprintf strcasecmp strncasecmp])
 
 AC_CHECK_TYPES([socklen_t],
index b1c0be51d534e6939dc686bd529d433f21ae4295..e9a01c10e8e7cccbe68b5f4a49f2555ed17066b5 100644 (file)
@@ -9,6 +9,10 @@ librdr_la_SOURCES = $(HDRS) Exception.cxx FdInStream.cxx FdOutStream.cxx \
        InStream.cxx RandomStream.cxx ZlibInStream.cxx ZlibOutStream.cxx \
        HexInStream.cxx HexOutStream.cxx
 
-librdr_la_CPPFLAGS = -I$(top_srcdir) @ZLIB_INCLUDE@
+librdr_la_CPPFLAGS = -I$(top_srcdir)
+librdr_la_LIBADD =
 
-librdr_la_LIBADD = @ZLIB_LIB@
+if INCLUDED_ZLIB
+librdr_la_CPPFLAGS += -I$(top_srcdir)/zlib
+librdr_la_LIBADD += $(top_srcdir)/zlib/libz.la
+endif
index 93fdc7bf96cb22cc7fc82a7c8551f99cd42806a1..93f6decf50b3a58a6c5d239dd6485bcc90cd00b6 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 extern "C" {
-#include <jpeg/jpeglib.h>
+#include <jpeglib.h>
 }
 
 #include <rdr/types.h>
index f2106d18e0aba3274b0039113db3a569c5824db3..29ffc9505ffd6fd7a65e768d58a11b3cb3225071 100644 (file)
@@ -46,20 +46,19 @@ librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
        VNCServerST.cxx ZRLEEncoder.cxx ZRLEDecoder.cxx encodings.cxx \
        secTypes.cxx util.cxx
 
+librfb_la_CPPFLAGS = -I$(top_srcdir)
+librfb_la_LIBADD =
+
 if IRIX_COMPRESS
 librfb_la_SOURCES += IrixCLJpegCompressor.cxx
+librfb_la_LIBADD += -lcl
 endif
 if IRIX_MEDIA
 librfb_la_SOURCES += IrixDMJpegCompressor.cxx IrixDMIC_RawToJpeg.cxx
+librfb_la_LIBADD += -ldmedia
 endif
 
-librfb_la_CPPFLAGS = -I$(top_srcdir) @JPEG_INCLUDE@
-
-librfb_la_LIBADD = @JPEG_LIB@
-
-if IRIX_COMPRESS
-librfb_la_LIBADD += -lcl
-endif
-if IRIX_MEDIA
-librfb_la_LIBADD += -ldmedia
+if INCLUDED_JPEG
+librfb_la_CPPFLAGS += -I$(top_srcdir)/jpeg
+librfb_la_LIBADD += $(top_srcdir)/jpeg/libjpeg.la
 endif