Commit a0a8f45a1c8ca7952e4596785ad399ec47b7a0af

Authored by Jay Berkenbilt
1 parent 2d2f6196

Add libjpeg dependency

... ... @@ -13,11 +13,11 @@ warranty.
13 13 Prerequisites
14 14 =============
15 15  
16   -QPDF depends on the external library "zlib". This are part of every
17   -Linux distribution and is readily available. Download information
18   -appears in the documentation. For Windows, you can download pre-built
19   -binary versions of this libraries for some compilers; see
20   -README-windows.txt for additional details.
  16 +QPDF depends on the external libraries "zlib" and "jpeg". These are
  17 +part of every Linux distribution and are readily available. Download
  18 +information appears in the documentation. For Windows, you can
  19 +download pre-built binary versions of these libraries for some
  20 +compilers; see README-windows.txt for additional details.
21 21  
22 22 QPDF requires a C++ compiler that works with STL. Your compiler must
23 23 also support "long long". Almost all modern compilers do. If you are
... ... @@ -34,9 +34,10 @@ you had an otherwise working qpdf.
34 34 Licensing terms of embedded software
35 35 ====================================
36 36  
37   -QPDF makes use of zlib for its functionality. This package can be
38   -downloaded separately from its own download location, or it can be
39   -downloaded in the external-libs area of the qpdf download site.
  37 +QPDF makes use of zlib and jpeg libraries for its functionality. These
  38 +packages can be downloaded separately from their own download
  39 +locations, or they can be downloaded in the external-libs area of the
  40 +qpdf download site.
40 41  
41 42 The Rijndael encryption implementation used as the basis for AES
42 43 encryption and decryption support comes from Philip J. Erdelsky's
... ... @@ -147,10 +148,13 @@ sources to the user's manual can be found in the "manual" directory.
147 148  
148 149 The software library is just libqpdf, and all the header files are in
149 150 the qpdf subdirectory. If you link statically with -lqpdf, then you
150   -will also need to link with -lz. The shared qpdf library is linked
151   -with -lz, and none of qpdf's public header files directly include
152   -files from libz, so in many cases, qpdf's development files are self
153   -contained.
  151 +will also need to link with -lz and -ljpeg. The shared qpdf library is
  152 +linked with -lz and -ljpeg, none of qpdf's public header files
  153 +directly include files from libz, and only Pl_DCT.hh includes files
  154 +from libjpeg, so for most cases, qpdf's development files are self
  155 +contained. If you need to use Pl_DCT in your application code, you
  156 +will need to have the header files for some libjpeg distribution in
  157 +your include path.
154 158  
155 159 To learn about using the library, please read comments in the header
156 160 files in include/qpdf, especially QPDF.hh, QPDFObjectHandle.hh, and
... ...
README-what-to-download.txt
... ... @@ -47,7 +47,10 @@ download.
47 47  
48 48 If you want to build the external libraries on your own (for
49 49 Windows or anything else), you can download this archive. In
50   - addition to including an unmodified distribution zlib, it includes
51   - a README file and some scripts to help you build it for Windows.
  50 + addition to including an unmodified distribution zlib and the jpeg
  51 + libary, it includes a README file and some scripts to help you
  52 + build it for Windows. qpdf was built using a binary distribution of
  53 + libjpeg-turbo for Windows. You will also have to provide those. See
  54 + README-windows.txt for details.
52 55  
53 56 If you want to build on Windows, please see also README-windows.txt.
... ...
configure.ac
... ... @@ -102,6 +102,8 @@ fi
102 102 if test "$BUILD_INTERNAL_LIBS" = "0"; then
103 103 AC_CHECK_HEADER(zlib.h,,[MISSING_ZLIB_H=1; MISSING_ANY=1])
104 104 AC_SEARCH_LIBS(deflate,z zlib,,[MISSING_ZLIB=1; MISSING_ANY=1])
  105 + AC_CHECK_HEADER(jpeglib.h,,[MISSING_JPEG_H=1; MISSING_ANY=1])
  106 + AC_SEARCH_LIBS(jpeg_destroy,jpeg,,[MISSING_JPEG=1; MISSING_ANY=1])
105 107 fi
106 108  
107 109 if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then
... ... @@ -471,6 +473,14 @@ if test "$MISSING_ZLIB" = "1"; then
471 473 AC_MSG_WARN(unable to find required library z (or zlib))
472 474 fi
473 475  
  476 +if test "$MISSING_JPEG_H" = "1"; then
  477 + AC_MSG_WARN(unable to find required header jpeglib.h)
  478 +fi
  479 +
  480 +if test "$MISSING_JPEG" = "1"; then
  481 + AC_MSG_WARN(unable to find required library jpeg)
  482 +fi
  483 +
474 484 if test "$MISSING_DOCBOOK_FO" = "1"; then
475 485 AC_MSG_WARN(docbook fo stylesheets are required to build PDF documentation)
476 486 fi
... ... @@ -507,7 +517,7 @@ if test "$USE_EXTERNAL_LIBS" = "1"; then
507 517 # much trouble getting it to work with a different compiler.
508 518 CPPFLAGS="$CPPFLAGS -Iexternal-libs/include"
509 519 LDFLAGS="$LDFLAGS -Lexternal-libs/lib-$BUILDRULES$WINDOWS_WORDSIZE"
510   - LIBS="$LIBS -lz"
  520 + LIBS="$LIBS -lz -ljpeg"
511 521 fi
512 522  
513 523 AC_OUTPUT
... ...
libqpdf.pc.in
... ... @@ -6,6 +6,6 @@ includedir=@includedir@
6 6 Name: libqpdf
7 7 Description: PDF transformation library
8 8 Version: @PACKAGE_VERSION@
9   -Requires.private: zlib
  9 +Requires.private: zlib, libjpeg
10 10 Libs: -L${libdir} -lqpdf
11 11 Cflags: -I${includedir}
... ...
manual/qpdf-manual.xml
... ... @@ -93,8 +93,8 @@
93 93 <sect1 id="ref.prerequisites">
94 94 <title>System Requirements</title>
95 95 <para>
96   - The qpdf package has only one external dependencies. In
97   - order to build qpdf, the following packages are required:
  96 + The qpdf package has few external dependencies. In order to build
  97 + qpdf, the following packages are required:
98 98 <itemizedlist>
99 99 <listitem>
100 100 <para>
... ... @@ -103,6 +103,14 @@
103 103 </listitem>
104 104 <listitem>
105 105 <para>
  106 + jpeg: <ulink
  107 + url="http://www.ijg.org/files/">http://www.ijg.org/files/</ulink>
  108 + or <ulink
  109 + url="https://libjpeg-turbo.org/">https://libjpeg-turbo.org/</ulink>
  110 + </para>
  111 + </listitem>
  112 + <listitem>
  113 + <para>
106 114 gnu make 3.81 or newer: <ulink url="http://www.gnu.org/software/make">http://www.gnu.org/software/make</ulink>
107 115 </para>
108 116 </listitem>
... ... @@ -1509,7 +1517,7 @@ outfile.pdf&lt;/option&gt;
1509 1517 </para>
1510 1518 <para>
1511 1519 When linking against the qpdf static library, you may also need to
1512   - specify <literal>-lz</literal> on your link command. If
  1520 + specify <literal>-lz -ljpeg</literal> on your link command. If
1513 1521 your system understands how to read libtool
1514 1522 <filename>.la</filename> files, this may not be necessary.
1515 1523 </para>
... ...