2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Add libjpeg dependency

This commit is contained in:
Jay Berkenbilt 2017-08-17 19:12:19 -04:00
parent 2d2f619665
commit a0a8f45a1c
5 changed files with 44 additions and 19 deletions

28
README
View File

@ -13,11 +13,11 @@ warranty.
Prerequisites
=============
QPDF depends on the external library "zlib". This are part of every
Linux distribution and is readily available. Download information
appears in the documentation. For Windows, you can download pre-built
binary versions of this libraries for some compilers; see
README-windows.txt for additional details.
QPDF depends on the external libraries "zlib" and "jpeg". These are
part of every Linux distribution and are readily available. Download
information appears in the documentation. For Windows, you can
download pre-built binary versions of these libraries for some
compilers; see README-windows.txt for additional details.
QPDF requires a C++ compiler that works with STL. Your compiler must
also support "long long". Almost all modern compilers do. If you are
@ -34,9 +34,10 @@ you had an otherwise working qpdf.
Licensing terms of embedded software
====================================
QPDF makes use of zlib for its functionality. This package can be
downloaded separately from its own download location, or it can be
downloaded in the external-libs area of the qpdf download site.
QPDF makes use of zlib and jpeg libraries for its functionality. These
packages can be downloaded separately from their own download
locations, or they can be downloaded in the external-libs area of the
qpdf download site.
The Rijndael encryption implementation used as the basis for AES
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.
The software library is just libqpdf, and all the header files are in
the qpdf subdirectory. If you link statically with -lqpdf, then you
will also need to link with -lz. The shared qpdf library is linked
with -lz, and none of qpdf's public header files directly include
files from libz, so in many cases, qpdf's development files are self
contained.
will also need to link with -lz and -ljpeg. The shared qpdf library is
linked with -lz and -ljpeg, none of qpdf's public header files
directly include files from libz, and only Pl_DCT.hh includes files
from libjpeg, so for most cases, qpdf's development files are self
contained. If you need to use Pl_DCT in your application code, you
will need to have the header files for some libjpeg distribution in
your include path.
To learn about using the library, please read comments in the header
files in include/qpdf, especially QPDF.hh, QPDFObjectHandle.hh, and

View File

@ -47,7 +47,10 @@ download.
If you want to build the external libraries on your own (for
Windows or anything else), you can download this archive. In
addition to including an unmodified distribution zlib, it includes
a README file and some scripts to help you build it for Windows.
addition to including an unmodified distribution zlib and the jpeg
libary, it includes a README file and some scripts to help you
build it for Windows. qpdf was built using a binary distribution of
libjpeg-turbo for Windows. You will also have to provide those. See
README-windows.txt for details.
If you want to build on Windows, please see also README-windows.txt.

View File

@ -102,6 +102,8 @@ fi
if test "$BUILD_INTERNAL_LIBS" = "0"; then
AC_CHECK_HEADER(zlib.h,,[MISSING_ZLIB_H=1; MISSING_ANY=1])
AC_SEARCH_LIBS(deflate,z zlib,,[MISSING_ZLIB=1; MISSING_ANY=1])
AC_CHECK_HEADER(jpeglib.h,,[MISSING_JPEG_H=1; MISSING_ANY=1])
AC_SEARCH_LIBS(jpeg_destroy,jpeg,,[MISSING_JPEG=1; MISSING_ANY=1])
fi
if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then
@ -471,6 +473,14 @@ if test "$MISSING_ZLIB" = "1"; then
AC_MSG_WARN(unable to find required library z (or zlib))
fi
if test "$MISSING_JPEG_H" = "1"; then
AC_MSG_WARN(unable to find required header jpeglib.h)
fi
if test "$MISSING_JPEG" = "1"; then
AC_MSG_WARN(unable to find required library jpeg)
fi
if test "$MISSING_DOCBOOK_FO" = "1"; then
AC_MSG_WARN(docbook fo stylesheets are required to build PDF documentation)
fi
@ -507,7 +517,7 @@ if test "$USE_EXTERNAL_LIBS" = "1"; then
# much trouble getting it to work with a different compiler.
CPPFLAGS="$CPPFLAGS -Iexternal-libs/include"
LDFLAGS="$LDFLAGS -Lexternal-libs/lib-$BUILDRULES$WINDOWS_WORDSIZE"
LIBS="$LIBS -lz"
LIBS="$LIBS -lz -ljpeg"
fi
AC_OUTPUT

View File

@ -6,6 +6,6 @@ includedir=@includedir@
Name: libqpdf
Description: PDF transformation library
Version: @PACKAGE_VERSION@
Requires.private: zlib
Requires.private: zlib, libjpeg
Libs: -L${libdir} -lqpdf
Cflags: -I${includedir}

View File

@ -93,14 +93,22 @@
<sect1 id="ref.prerequisites">
<title>System Requirements</title>
<para>
The qpdf package has only one external dependencies. In
order to build qpdf, the following packages are required:
The qpdf package has few external dependencies. In order to build
qpdf, the following packages are required:
<itemizedlist>
<listitem>
<para>
zlib: <ulink url="http://www.zlib.net/">http://www.zlib.net/</ulink>
</para>
</listitem>
<listitem>
<para>
jpeg: <ulink
url="http://www.ijg.org/files/">http://www.ijg.org/files/</ulink>
or <ulink
url="https://libjpeg-turbo.org/">https://libjpeg-turbo.org/</ulink>
</para>
</listitem>
<listitem>
<para>
gnu make 3.81 or newer: <ulink url="http://www.gnu.org/software/make">http://www.gnu.org/software/make</ulink>
@ -1509,7 +1517,7 @@ outfile.pdf</option>
</para>
<para>
When linking against the qpdf static library, you may also need to
specify <literal>-lz</literal> on your link command. If
specify <literal>-lz -ljpeg</literal> on your link command. If
your system understands how to read libtool
<filename>.la</filename> files, this may not be necessary.
</para>