mirror of https://github.com/qpdf/qpdf.git
Remove old build files
This commit is contained in:
parent
87db567e1f
commit
70d0d0889b
216
INSTALL
216
INSTALL
|
@ -1,216 +0,0 @@
|
|||
These instructions based on the generic INSTALL file from automake
|
||||
1.10. However, qpdf does not use automake, so not all of that file
|
||||
applies.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
You can also define the variable DESTDIR when you run make install
|
||||
to install the package in a separate subdirectory. This is useful for
|
||||
packaging.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
139
Makefile
139
Makefile
|
@ -1,139 +0,0 @@
|
|||
# This makefile is inspired by abuild (http://www.abuild.org), which
|
||||
# was used during the development of qpdf. The goal here is to have a
|
||||
# non-recursive build with all the proper dependencies so we can start
|
||||
# the build from anywhere and get the right stuff. Each directory has
|
||||
# a build.mk that is included from here and is written from this
|
||||
# directory's perspective. Each directory also has a proxy Makefile
|
||||
# that allows you to start the build from any directory and get
|
||||
# reasonable semantics for the all, check, and clean targets.
|
||||
|
||||
# Our "build items" are directories. They are listed here such that
|
||||
# no item precedes any item it depends on. Therefore, each item can
|
||||
# safely reference variables set in its predecessors.
|
||||
|
||||
# For each build item B, you can run make build_B, make check_B, or
|
||||
# make clean_B to build, test, or clean B. Full dependencies are
|
||||
# represented across all the items, so it is possible to start
|
||||
# anywhere. From the top level, the "all", "check", and "clean"
|
||||
# targets build, test, or clean everything.
|
||||
|
||||
# To run test suites without rebuilding, pass NO_REBUILD=1 to the
|
||||
# build. This can be useful for testing binary interface compatibility
|
||||
# as it enables you to rebuild libraries and rerun tests without
|
||||
# relinking.
|
||||
|
||||
# Although this is not a GNU package and does not use automake, you
|
||||
# can still run make clean to remove everything that is compiled, make
|
||||
# distclean to remove everything that is generated by the end user,
|
||||
# and make maintainer-clean to remove everything that is generated
|
||||
# including things distributed with the source distribution. You can
|
||||
# pass CLEAN=1 to prevent this Makefile from complaining if
|
||||
# ./configure has not been run.
|
||||
|
||||
# The install target works as usual and obeys --prefix and so forth
|
||||
# passed to ./configure. You can also pass DESTDIR=/dir to make
|
||||
# install to install in a separate location. This is useful for
|
||||
# packagers.
|
||||
|
||||
BUILD_ITEMS := manual libqpdf qpdf zlib-flate libtests fuzz examples
|
||||
OUTPUT_DIR = build
|
||||
ALL_TARGETS =
|
||||
|
||||
.PHONY: default
|
||||
default: all
|
||||
|
||||
CLEAN ?=
|
||||
ifneq ($(CLEAN),1)
|
||||
ifeq ($(words $(wildcard autoconf.mk)),0)
|
||||
DUMMY := $(shell echo 1>&2)
|
||||
DUMMY := $(shell echo 1>&2 Please run ./configure before running $(MAKE))
|
||||
DUMMY := $(shell echo 1>&2)
|
||||
$(error unable to continue with build)
|
||||
endif
|
||||
|
||||
autoconf.mk:
|
||||
|
||||
include autoconf.mk
|
||||
|
||||
endif
|
||||
|
||||
# Prevent gnu make from trying to rebuild .dep files
|
||||
$(foreach B,$(BUILD_ITEMS),$(eval \
|
||||
$(B)/$(OUTPUT_DIR)/%.dep: ;))
|
||||
|
||||
# Prevent gnu make from trying to rebuild .mk files
|
||||
$(foreach B,$(BUILD_ITEMS),$(eval \
|
||||
$(B)/%.mk: ;))
|
||||
%.mk: ;
|
||||
make/%.mk: ;
|
||||
|
||||
BUILDRULES ?= libtool
|
||||
include make/rules.mk
|
||||
|
||||
DUMMY := $(shell mkdir $(foreach B,$(BUILD_ITEMS),$(B)/$(OUTPUT_DIR)) 2>/dev/null)
|
||||
|
||||
include $(foreach B,$(BUILD_ITEMS),$(B)/build.mk)
|
||||
|
||||
ALL_TARGETS = $(foreach B,$(BUILD_ITEMS),$(TARGETS_$(B)))
|
||||
|
||||
TEST_ITEMS = $(foreach D,\
|
||||
$(wildcard $(foreach B,$(BUILD_ITEMS),$(B)/qtest)),\
|
||||
$(subst /,,$(dir $(D))))
|
||||
|
||||
TEST_TARGETS = $(foreach B,$(TEST_ITEMS),check_$(B))
|
||||
|
||||
CLEAN_TARGETS = $(foreach B,$(BUILD_ITEMS),clean_$(B))
|
||||
|
||||
# For test suites
|
||||
export QPDF_BIN = $(abspath qpdf/$(OUTPUT_DIR)/qpdf)
|
||||
export QPDF_SKIP_TEST_COMPARE_IMAGES
|
||||
export QPDF_LARGE_FILE_TEST_PATH
|
||||
|
||||
clean:: $(CLEAN_TARGETS)
|
||||
$(RM) -r appimage/build
|
||||
|
||||
.PHONY: $(CLEAN_TARGETS)
|
||||
$(foreach B,$(BUILD_ITEMS),$(eval \
|
||||
clean_$(B): ; \
|
||||
$(RM) -r $(B)/$(OUTPUT_DIR)))
|
||||
|
||||
distclean: clean
|
||||
$(RM) -r autoconf.mk autom4te.cache config.log config.status libtool
|
||||
$(RM) libqpdf/qpdf/qpdf-config.h
|
||||
$(RM) manual/html.xsl
|
||||
$(RM) manual/print.xsl
|
||||
$(RM) libqpdf.pc libqpdf.map
|
||||
|
||||
maintainer-clean: distclean
|
||||
$(RM) -r install-mingw* install-msvc* external-libs
|
||||
|
||||
.PHONY: $(TEST_TARGETS)
|
||||
|
||||
NO_REBUILD ?=
|
||||
ifneq ($(NO_REBUILD),1)
|
||||
$(foreach B,$(TEST_ITEMS),$(eval \
|
||||
check_$(B): $(TARGETS_$(B))))
|
||||
endif
|
||||
|
||||
.PHONY: $(foreach B,$(BUILD_ITEMS),build_$(B))
|
||||
$(foreach B,$(BUILD_ITEMS),$(eval \
|
||||
build_$(B): $(TARGETS_$(B))))
|
||||
|
||||
.PHONY: all
|
||||
all: $(ALL_TARGETS) ;
|
||||
|
||||
check: $(TEST_TARGETS)
|
||||
|
||||
.PHONY: spell
|
||||
# npm install -g cspell; add exceptions to cSpell.json
|
||||
spell:
|
||||
cspell **/*.hh include/qpdf/*.h **/*.cc \
|
||||
manual/*.rst manual/*.in manual/_ext/*.py \
|
||||
ChangeLog README* TODO
|
||||
|
||||
# Install targets are in the make directory in the rules-specific make
|
||||
# fragments.
|
||||
|
||||
QTEST=$(abspath qtest/bin/qtest-driver)
|
||||
$(TEST_TARGETS):
|
||||
$(call run_qtest,$(subst check_,,$@))
|
|
@ -1,12 +0,0 @@
|
|||
This file is README-windows-install.txt in the source distribution and
|
||||
README.txt in the Windows binary distribution.
|
||||
|
||||
QPDF is completely relocatable. To use qpdf.exe or the qpdf DLL, just
|
||||
have the bin directory in your path. To compile with qpdf, just add
|
||||
the lib directory to your library path and the include directory to
|
||||
your include path. If you are going to use Pl_DCT in your code, you
|
||||
will also need to have jpeg library development files in your build
|
||||
environment. Detailed documentation may be found in the doc directory
|
||||
and at https://qpdf.readthedocs.io.
|
||||
|
||||
Enjoy!
|
|
@ -1,22 +0,0 @@
|
|||
# generated automatically by aclocal 1.16.4 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_include([m4/ax_cxx_compile_stdcxx.m4])
|
||||
m4_include([m4/ax_random_device.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
m4_include([m4/ltversion.m4])
|
||||
m4_include([m4/lt~obsolete.m4])
|
||||
m4_include([m4/pkg.m4])
|
|
@ -1,53 +0,0 @@
|
|||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||
LT_CURRENT=@LT_CURRENT@
|
||||
LT_REVISION=@LT_REVISION@
|
||||
LT_AGE=@LT_AGE@
|
||||
top_builddir=@top_builddir@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
datarootdir=@datarootdir@
|
||||
mandir=@mandir@
|
||||
docdir=@docdir@
|
||||
htmldir=@htmldir@
|
||||
pdfdir=@pdfdir
|
||||
CC=@CC@
|
||||
WFLAGS=@WFLAGS@
|
||||
CXXWFLAGS=@CXXWFLAGS@
|
||||
CFLAGS=@CFLAGS@ $(WFLAGS)
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBS=@LIBS@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@ $(CXXWFLAGS) $(WFLAGS) -DPOINTERHOLDER_TRANSITION=2
|
||||
RPATH=@RPATH@
|
||||
AR=@AR@
|
||||
RANLIB=@RANLIB@
|
||||
DLLTOOL=@DLLTOOL@
|
||||
STRIP=@STRIP@
|
||||
OBJDUMP=@OBJDUMP@
|
||||
GENDEPS=@GENDEPS@
|
||||
LIBTOOL=@LIBTOOL@
|
||||
USE_CRYPTO_NATIVE=@USE_CRYPTO_NATIVE@
|
||||
USE_CRYPTO_OPENSSL=@USE_CRYPTO_OPENSSL@
|
||||
USE_CRYPTO_GNUTLS=@USE_CRYPTO_GNUTLS@
|
||||
MAINTAINER_MODE=@MAINTAINER_MODE@
|
||||
SPHINX=@SPHINX@
|
||||
BUILD_HTML=@BUILD_HTML@
|
||||
BUILD_PDF=@BUILD_PDF@
|
||||
OSS_FUZZ=@OSS_FUZZ@
|
||||
QPDF_SKIP_TEST_COMPARE_IMAGES=@QPDF_SKIP_TEST_COMPARE_IMAGES@
|
||||
BUILDRULES=@BUILDRULES@
|
||||
HAVE_LD_VERSION_SCRIPT=@HAVE_LD_VERSION_SCRIPT@
|
||||
IS_32BIT=@IS_32BIT@
|
||||
WINDOWS_WORDSIZE=@WINDOWS_WORDSIZE@
|
||||
WINDOWS_WMAIN_COMPILE=@WINDOWS_WMAIN_COMPILE@
|
||||
WINDOWS_WMAIN_LINK=@WINDOWS_WMAIN_LINK@
|
||||
WINDOWS_WMAIN_XLINK_FLAGS=@WINDOWS_WMAIN_XLINK_FLAGS@
|
||||
WINDOWS_MAIN_XLINK_FLAGS=@WINDOWS_MAIN_XLINK_FLAGS@
|
||||
SHOW_FAILED_TEST_OUTPUT=@SHOW_FAILED_TEST_OUTPUT@
|
||||
# Allow environment variable to override
|
||||
QPDF_LARGE_FILE_TEST_PATH?=@QPDF_LARGE_FILE_TEST_PATH@
|
|
@ -1,11 +0,0 @@
|
|||
74a0030f31be13c151ca4afed3fda6bf33c5ddb17bc891a146deca119bd3e7f0 configure.ac
|
||||
a45b129101efb46d7ac59ca2cf12d137a5742c2593ea11ebb32401aefd915b96 aclocal.m4
|
||||
c12d837479fa9a3fa4c278b6dc7d6b449503d663e0f0d294305595a51ff43f70 libqpdf/qpdf/qpdf-config.h.in
|
||||
5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4
|
||||
35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4
|
||||
1451e63710701b5f00a668f3a79b435015ef2e63547f0ad0ce8c8c062d53b599 m4/libtool.m4
|
||||
e77ebba8361b36f14b4d0927173a034b98c5d05049697a9ded84d85eb99a7990 m4/ltoptions.m4
|
||||
5a6735cda60e0ba0d1b706c0ef648f5d096298da46daefd9cdecdb6a0f4584d3 m4/ltsugar.m4
|
||||
a27b754709de61575197bf5a980696c98ae49da3f92f0de8ee7f42dd543b7465 m4/ltversion.m4
|
||||
26fa3285c35dd6ab00ed1e466ba92a17e4655e01897731ec18a587a4cf5e4f8d m4/lt~obsolete.m4
|
||||
9fab676fae13feb97d5183a8ed86ae9398c76d21927c28bc59460d230f3e0884 m4/pkg.m4
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
aclocal -I m4
|
||||
autoheader
|
||||
autoconf
|
||||
rm -f m4/*~ 2>/dev/null || true
|
||||
sha256sum configure.ac aclocal.m4 libqpdf/qpdf/qpdf-config.h.in m4/* >| autofiles.sums
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
if g++ -v 2>&1 | grep Target: | grep -q x86_64; then
|
||||
wordsize=64
|
||||
else
|
||||
wordsize=32
|
||||
fi
|
||||
./configure --disable-test-compare-images --enable-external-libs --enable-werror --with-buildrules=mingw ${1+"$@"} --enable-crypto-openssl --disable-crypto-gnutls
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
if cl 2>&1 | grep -q 'for x64'; then
|
||||
wordsize=64
|
||||
else
|
||||
wordsize=32
|
||||
fi
|
||||
CC=cl CXX="cl -TP -GR" ./configure --disable-test-compare-images --enable-external-libs --enable-werror --with-buildrules=msvc ${1+"$@"} --enable-crypto-openssl --disable-crypto-gnutls
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
945
configure.ac
945
configure.ac
|
@ -1,945 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl This config.in requires autoconf 2.5 or greater.
|
||||
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([qpdf],[10.6.3])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_FILES([autoconf.mk])
|
||||
AC_CONFIG_FILES([libqpdf.pc])
|
||||
AC_CONFIG_FILES([libqpdf.map])
|
||||
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
|
||||
|
||||
AC_SUBST(MAINTAINER_MODE)
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
AS_HELP_STRING([--enable-maintainer-mode],
|
||||
[turn on features intended for maintainers that may change generated files and require additional tools; implies enable-doc-maintenances]),
|
||||
[if test "$enableval" = "no"; then
|
||||
MAINTAINER_MODE=0
|
||||
else
|
||||
MAINTAINER_MODE=1
|
||||
fi],
|
||||
[MAINTAINER_MODE=0])
|
||||
|
||||
AC_ARG_ENABLE(check-autofiles,
|
||||
AS_HELP_STRING([--enable-check-autofiles],
|
||||
[if specified, verify checksums on automatically generated files (default=yes); package maintainers may want to disable this]),
|
||||
[if test "$enableval" = "no"; then
|
||||
CHECK_AUTOFILES=0
|
||||
else
|
||||
CHECK_AUTOFILES=1
|
||||
fi],
|
||||
[CHECK_AUTOFILES=1])
|
||||
|
||||
# Check to see if automatically generated files are outdated and if we
|
||||
# can update them.
|
||||
AC_CHECK_PROG(AUTOCONF,autoconf,1,0)
|
||||
AC_CHECK_PROG(AUTOHEADER,autoheader,1,0)
|
||||
AC_CHECK_PROG(ACLOCAL,aclocal,1,0)
|
||||
AC_CHECK_PROG(SHA256SUM,sha256sum,1,0)
|
||||
if test "$CHECK_AUTOFILES$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "11111"; then
|
||||
if ! sha256sum -c autofiles.sums; then
|
||||
AC_MSG_ERROR(autofiles are outdated; rerun autogen.sh)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_CXX
|
||||
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
|
||||
AC_HEADER_STDC
|
||||
LT_INIT([win32-dll])
|
||||
|
||||
# * If any interfaces have been removed or changed, or if any private
|
||||
# member variables or virtual functions have been added to any
|
||||
# class, we are not binary compatible. Increment LT_CURRENT, and set
|
||||
# LT_AGE and LT_REVISION to 0.
|
||||
#
|
||||
# * Otherwise, if any interfaces have been added since the last public
|
||||
# release, then increment LT_CURRENT and LT_AGE, and set LT_REVISION
|
||||
# to 0.
|
||||
#
|
||||
# * Otherwise, increment LT_REVISION
|
||||
|
||||
# LT = libtool
|
||||
LT_CURRENT=34
|
||||
LT_AGE=6
|
||||
LT_REVISION=3
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
AC_SUBST(LT_AGE)
|
||||
LT_SONAME=$(expr $LT_CURRENT - $LT_AGE)
|
||||
AC_SUBST(LT_SONAME)
|
||||
|
||||
AC_MSG_CHECKING(for whether to use -rpath)
|
||||
AC_ARG_ENABLE(rpath,
|
||||
AS_HELP_STRING([--enable-rpath],
|
||||
[whether to pass -rpath to the linker when building libraries]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
qpdf_USE_RPATH=1;
|
||||
else
|
||||
qpdf_USE_RPATH=0;
|
||||
fi], [qpdf_USE_RPATH=1])
|
||||
if test "$qpdf_USE_RPATH" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
RPATH='-rpath $(libdir)'
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST(RPATH)
|
||||
|
||||
AC_MSG_CHECKING(for -fvisibility=hidden)
|
||||
try_flags=-fvisibility=hidden
|
||||
oCXXFLAGS=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS $try_flags"
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[class X
|
||||
{
|
||||
public:
|
||||
__attribute__ ((visibility ("default")))
|
||||
X() {}
|
||||
__attribute__ ((visibility ("default")))
|
||||
void f() {}
|
||||
};
|
||||
]],[[X x; x.f();]])],
|
||||
[qpdf_VISIBILITY_HIDDEN=1],
|
||||
[qpdf_VISIBILITY_HIDDEN=0])
|
||||
AC_LANG_POP
|
||||
if test "$qpdf_VISIBILITY_HIDDEN" = "0"; then
|
||||
AC_MSG_RESULT(no)
|
||||
CXXFLAGS=$oCXXFLAGS
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$CFLAGS $try_flags"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether to use insecure random numbers)
|
||||
AC_ARG_ENABLE(insecure-random,
|
||||
AS_HELP_STRING([--enable-insecure-random],
|
||||
[whether to use stdlib's random number generator (default is no)]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
qpdf_INSECURE_RANDOM=1;
|
||||
else
|
||||
qpdf_INSECURE_RANDOM=0;
|
||||
fi], [qpdf_INSECURE_RANDOM=0])
|
||||
if test "$qpdf_INSECURE_RANDOM" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([USE_INSECURE_RANDOM], [1], [Whether to use insecure random numbers])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether to use OS-provided secure random numbers)
|
||||
AC_ARG_ENABLE(os-secure-random,
|
||||
AS_HELP_STRING([--enable-os-secure-random],
|
||||
[whether to try to use OS-provided secure random numbers (default is yes)]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
qpdf_OS_SECURE_RANDOM=1;
|
||||
else
|
||||
qpdf_OS_SECURE_RANDOM=0;
|
||||
fi], [qpdf_OS_SECURE_RANDOM=1])
|
||||
if test "$qpdf_OS_SECURE_RANDOM" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE([SKIP_OS_SECURE_RANDOM], [1], [Whether to suppress use of OS-provided secure random numbers])
|
||||
fi
|
||||
|
||||
AX_RANDOM_DEVICE
|
||||
|
||||
AC_MSG_CHECKING(whether to avoid Windows HANDLE type)
|
||||
AC_ARG_ENABLE(avoid-windows-handle,
|
||||
AS_HELP_STRING([--enable-avoid-windows-handle],
|
||||
[whether to avoid use of HANDLE, useful for some embedded Windows builds (default is no)]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
qpdf_AVOID_HANDLE=1;
|
||||
else
|
||||
qpdf_AVOID_HANDLE=0;
|
||||
fi], [qpdf_AVOID_HANDLE=0])
|
||||
if test "$qpdf_AVOID_HANDLE" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([AVOID_WINDOWS_HANDLE], [1], [Whether to avoid use of HANDLE in Windows])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
USE_EXTERNAL_LIBS=0
|
||||
AC_MSG_CHECKING(for whether to use external libraries distribution)
|
||||
AC_ARG_ENABLE(external-libs,
|
||||
AS_HELP_STRING([--enable-external-libs],
|
||||
[whether to use external libraries distribution]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
USE_EXTERNAL_LIBS=1;
|
||||
else
|
||||
USE_EXTERNAL_LIBS=0;
|
||||
fi], [BUILD_INTERNAL_LIBS=0])
|
||||
if test "$BUILD_INTERNAL_LIBS" = "0"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF([size_t])
|
||||
if test "$ac_cv_sizeof_size_t" = "4"; then
|
||||
IS_32BIT=1
|
||||
WINDOWS_WORDSIZE=32
|
||||
else
|
||||
IS_32BIT=0
|
||||
WINDOWS_WORDSIZE=64
|
||||
fi
|
||||
AC_SUBST(IS_32BIT)
|
||||
AC_SUBST(WINDOWS_WORDSIZE)
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
if test "$BUILD_INTERNAL_LIBS" = "0"; then
|
||||
if test "$PKG_CONFIG" != ""; then
|
||||
PKG_CHECK_MODULES([pc_zlib], [zlib],
|
||||
[CFLAGS="$CFLAGS $pc_zlib_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $pc_zlib_CFLAGS $pc_zlib_CXXFLAGS"
|
||||
LIBS="$LIBS $pc_zlib_LIBS"
|
||||
], [:])
|
||||
PKG_CHECK_MODULES([pc_libjpeg], [libjpeg],
|
||||
[CFLAGS="$CFLAGS $pc_libjpeg_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $pc_libjpeg_CFLAGS $pc_libjpeg_CXXFLAGS"
|
||||
LIBS="$LIBS $pc_libjpeg_LIBS"
|
||||
],[:])
|
||||
fi
|
||||
if test "$pc_zlib_LIBS" = ""; 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])
|
||||
fi
|
||||
if test "$pc_libjpeg_LIBS" = ""; then
|
||||
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 "$LIBS" != ""; then
|
||||
nLIBS=""
|
||||
for x in $LIBS; do
|
||||
if echo $x | grep -q '^-L'; then
|
||||
LDFLAGS="$LDFLAGS $x"
|
||||
else
|
||||
nLIBS="$nLIBS $x"
|
||||
fi
|
||||
LIBS=$nLIBS
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
qpdf_USE_WMAIN=0
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_SUBST(WINDOWS_WMAIN_COMPILE)
|
||||
AC_SUBST(WINDOWS_WMAIN_LINK)
|
||||
for i in 0 1; do
|
||||
if test "$qpdf_USE_WMAIN" = "0"; then
|
||||
oLDFLAGS="$LDFLAGS"
|
||||
if test "$i" = "1"; then
|
||||
nLDFLAGS="-municode"
|
||||
LDFLAGS="$LDFLAGS $nLDFLAGS"
|
||||
msg="checking for wmain with $nLDFLAGS"
|
||||
else
|
||||
nLDFLAGS=
|
||||
msg="checking for wmain"
|
||||
fi
|
||||
AC_MSG_CHECKING($msg)
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||
[[#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
extern "C"
|
||||
int wmain(int argc, wchar_t* argv[])
|
||||
{
|
||||
size_t x = wcslen(argv[0]);
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[qpdf_USE_WMAIN=1],
|
||||
[qpdf_USE_WMAIN=0])
|
||||
LDFLAGS="$oLDFLAGS"
|
||||
if test "$qpdf_USE_WMAIN" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
WINDOWS_WMAIN_COMPILE="-DWINDOWS_WMAIN $nLDFLAGS"
|
||||
WINDOWS_WMAIN_LINK="$nLDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
done
|
||||
AC_LANG_POP
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_MSG_CHECKING(whether to use -latomic)
|
||||
dnl On some platforms with some versions of gcc, you have to link with
|
||||
dnl -latomic in order for std::atomic to work. Passing --as-needed
|
||||
dnl prevents unnecessary linking with -latomic.
|
||||
oLDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--as-needed -latomic"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||
[[#include <atomic>
|
||||
int main()
|
||||
{
|
||||
static std::atomic<int> a{0};
|
||||
a = a.fetch_add(1);
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[qpdf_USE_ATOMIC=1],
|
||||
[qpdf_USE_ATOMIC=0])
|
||||
if test "$qpdf_USE_ATOMIC" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
LDFLAGS="$oLDFLAGS"
|
||||
fi
|
||||
AC_LANG_POP
|
||||
|
||||
if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then
|
||||
OLIBS=$LIBS
|
||||
LIBS="$LIBS Advapi32.lib"
|
||||
AC_MSG_CHECKING(for Advapi32 library)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#pragma comment(lib, "crypt32.lib")
|
||||
#include <windows.h>
|
||||
#include <wincrypt.h>
|
||||
HCRYPTPROV cp;]],
|
||||
[CryptAcquireContext(&cp, NULL, NULL, PROV_RSA_FULL, 0);]
|
||||
)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
LIBS="$OLIBS -lAdvapi32"],
|
||||
[AC_MSG_RESULT(no)
|
||||
LIBS=$OLIBS])
|
||||
fi
|
||||
|
||||
QPDF_LARGE_FILE_TEST_PATH=
|
||||
AC_SUBST(QPDF_LARGE_FILE_TEST_PATH)
|
||||
AC_ARG_WITH(large-file-test-path,
|
||||
AS_HELP_STRING([--with-large-file-test-path=path],
|
||||
[To enable testing of files > 4GB, give the path to a directory with at least 11 GB free. The test suite will write temporary files to this directory. Alternatively, just set the QPDF_LARGE_FILE_TEST_PATH environment variable to the path before running the test suite.]),
|
||||
[QPDF_LARGE_FILE_TEST_PATH=$withval],
|
||||
[QPDF_LARGE_FILE_TEST_PATH=])
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
AC_FUNC_FSEEKO
|
||||
AC_CHECK_FUNCS([fseeko64 random localtime_r])
|
||||
|
||||
# Check if LD supports linker scripts, and define conditional
|
||||
# HAVE_LD_VERSION_SCRIPT if so. This functionality is currently
|
||||
# constrained to compilers using GNU ld on ELF systems or systems
|
||||
# which provide an adequate emulation thereof.
|
||||
AC_ARG_ENABLE([ld-version-script],
|
||||
AS_HELP_STRING([--enable-ld-version-script],
|
||||
[enable linker version script (default is enabled)]),
|
||||
[have_ld_version_script=$enableval], [have_ld_version_script=yes])
|
||||
if test "$have_ld_version_script" != no; then
|
||||
AC_MSG_CHECKING([if LD -Wl,--version-script works])
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
|
||||
cat > conftest.map <<EOF
|
||||
VERS_1 {
|
||||
global: sym;
|
||||
};
|
||||
|
||||
VERS_2 {
|
||||
global: sym;
|
||||
} VERS_1;
|
||||
EOF
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||
[have_ld_version_script=yes], [have_ld_version_script=no])
|
||||
rm -f conftest.map
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
AC_MSG_RESULT($have_ld_version_script)
|
||||
fi
|
||||
if test "$have_ld_version_script" = "yes"; then
|
||||
HAVE_LD_VERSION_SCRIPT=1
|
||||
else
|
||||
HAVE_LD_VERSION_SCRIPT=0
|
||||
fi
|
||||
AC_SUBST(HAVE_LD_VERSION_SCRIPT)
|
||||
|
||||
make_okay=0
|
||||
for make_prog in make gmake; do
|
||||
this_make_okay=0
|
||||
AC_MSG_CHECKING(for gnu make >= 3.81 ($make_prog))
|
||||
if $make_prog --version >/dev/null 2>&1; then
|
||||
v=`$make_prog --version | grep 'GNU Make' | sed -e 's/.*Make //'`
|
||||
maj=`echo $v | cut -d. -f 1`
|
||||
min=`echo $v | cut -d. -f 2`
|
||||
if test $maj -gt 3 -o '(' $maj -eq 3 -a $min -ge 81 ')'; then
|
||||
this_make_okay=1
|
||||
make_okay=1
|
||||
fi
|
||||
fi
|
||||
if test "$this_make_okay" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$make_okay" = "0"; then
|
||||
dnl Don't set MISSING_ANY=1 -- maybe user calls make something else
|
||||
MISSING_MAKE_381=1
|
||||
ISSUE_WARNINGS=1
|
||||
fi
|
||||
|
||||
AC_SUBST(GENDEPS)
|
||||
GENDEPS=0
|
||||
AC_MSG_CHECKING(for whether $CC supports -MD -MF x.dep -MP)
|
||||
oCFLAGS=$CFLAGS
|
||||
rm -f x.dep
|
||||
CFLAGS="$CFLAGS -MD -MF x.dep -MP"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <stdio.h>]], [[FILE* a = stdout]]
|
||||
)],
|
||||
[qpdf_DEPFLAGS=yes],
|
||||
[qpdf_DEPFLAGS=no])
|
||||
CFLAGS=$oCFLAGS
|
||||
if test "$qpdf_DEPFLAGS" = "yes"; then
|
||||
if ! grep stdio.h x.dep >/dev/null 2>&1; then
|
||||
qpdf_DEPFLAGS=no
|
||||
fi
|
||||
fi
|
||||
rm -f x.dep
|
||||
if test "$qpdf_DEPFLAGS" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
GENDEPS=1
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(which build rules to use)
|
||||
AC_SUBST(BUILDRULES)
|
||||
AC_ARG_WITH(buildrules,
|
||||
AS_HELP_STRING([--with-buildrules=rules],
|
||||
[which build rules to use; see README.md]),
|
||||
[BUILDRULES=$withval],
|
||||
[BUILDRULES=libtool])
|
||||
AC_MSG_RESULT($BUILDRULES)
|
||||
|
||||
AC_SUBST(WFLAGS)
|
||||
AC_SUBST(CXXWFLAGS)
|
||||
qpdf_USE_EXTRA_WARNINGS=0
|
||||
if test "$BUILDRULES" = "msvc"; then
|
||||
dnl /w14996 makes warning 4996 a level 1 warning. This warning
|
||||
dnl reports on functions that Microsoft considers unsafe or
|
||||
dnl deprecated. Removing these warnings helps people who want to
|
||||
dnl write applications based on qpdf that can be Windows 8
|
||||
dnl certified.
|
||||
try_flags="-w14996"
|
||||
else
|
||||
try_flags="-Wall"
|
||||
fi
|
||||
AC_MSG_CHECKING(for whether $CC supports $try_flags)
|
||||
oCFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $try_flags"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
|
||||
[qpdf_USE_EXTRA_WARNINGS=1],[qpdf_USE_EXTRA_WARNINGS=0])
|
||||
CFLAGS=$oCFLAGS
|
||||
if test "$qpdf_USE_EXTRA_WARNINGS" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
WFLAGS="$try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
if test "$BUILDRULES" != "msvc"; then
|
||||
qpdf_USE_EXTRA_WARNINGS=0
|
||||
try_flags="-Wold-style-cast"
|
||||
AC_MSG_CHECKING(for whether $CXX supports $try_flags)
|
||||
oCXXFLAGS=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS $try_flags"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
|
||||
[qpdf_USE_EXTRA_WARNINGS=1],[qpdf_USE_EXTRA_WARNINGS=0])
|
||||
CXXFLAGS=$oCXXFLAGS
|
||||
if test "$qpdf_USE_EXTRA_WARNINGS" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CXXWFLAGS="$try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$BUILDRULES" = "msvc"; then
|
||||
try_flags=-FS
|
||||
AC_MSG_CHECKING(for whether $CC supports $try_flags)
|
||||
oCFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $try_flags"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
|
||||
[qpdf_USE_FS=1],[qpdf_USE_FS=0])
|
||||
if test "$qpdf_USE_FS" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CXXFLAGS="$CXXFLAGS $try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
CFLAGS=$oCFLAGS
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$BUILDRULES" = "msvc"; then
|
||||
try_flags="-WX"
|
||||
else
|
||||
try_flags="-Werror"
|
||||
fi
|
||||
AC_MSG_CHECKING(for whether to use $try_flags)
|
||||
AC_ARG_ENABLE(werror,
|
||||
AS_HELP_STRING([--enable-werror],
|
||||
[whether to treat warnings as errors (default is no)]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
qpdf_USE_WERROR=1;
|
||||
else
|
||||
qpdf_USE_WERROR=0;
|
||||
fi], [qpdf_USE_WERROR=0])
|
||||
if test "$qpdf_USE_WERROR" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
WFLAGS="$WFLAGS $try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
if test "$BUILDRULES" = "msvc"; then
|
||||
try_flags="-W3"
|
||||
else
|
||||
try_flags="-Wconversion -Wsign-conversion"
|
||||
fi
|
||||
oCFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $try_flags"
|
||||
AC_MSG_CHECKING(for whether to use $try_flags)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
|
||||
[qpdf_INT_WARNINGS=1],[qpdf_INT_WARNINGS=0])
|
||||
if test "$qpdf_INT_WARNINGS" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CXXFLAGS="$CXXFLAGS $try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
CFLAGS=$oCFLAGS
|
||||
fi
|
||||
|
||||
if test "$BUILDRULES" != "msvc"; then
|
||||
try_flags="-Wshadow=local"
|
||||
oCFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $try_flags -Werror"
|
||||
AC_MSG_CHECKING(for whether to use $try_flags)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
|
||||
[qpdf_SHADOW_WARNINGS=1],[qpdf_SHADOW_WARNINGS=0])
|
||||
if test "$qpdf_SHADOW_WARNINGS" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$oCFLAGS $try_flags"
|
||||
CXXFLAGS="$CXXFLAGS $try_flags"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
CFLAGS=$oCFLAGS
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for tm_gmtoff in struct tm)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <time.h>
|
||||
]],[[
|
||||
struct tm tm;
|
||||
tm.tm_gmtoff = 1;
|
||||
]])], [qpdf_TM_GMTOFF=1], [qpdf_TM_GMTOFF=0])
|
||||
if test "$qpdf_TM_GMTOFF" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_TM_GMTOFF], [1], [Whether struct tm has tm_gmtoff])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for extern long timezone)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
]],[[
|
||||
tzset();
|
||||
printf("%ld\n", timezone);
|
||||
]])], [qpdf_EXTERN_LONG_TIMEZONE=1], [qpdf_EXTERN_LONG_TIMEZONE=0])
|
||||
if test "$qpdf_EXTERN_LONG_TIMEZONE" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_EXTERN_LONG_TIMEZONE], [1], [Whether extern long timezone is available])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
LL_FMT=""
|
||||
oCFLAGS=$CFLAGS
|
||||
CFLAGS="$WFLAGS $CFLAGS"
|
||||
for fmt in "%lld" "%I64d" "%I64lld"; do
|
||||
if test "$LL_FMT" = ""; then
|
||||
AC_MSG_CHECKING(printf format for long long: $fmt)
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
]],
|
||||
[[
|
||||
long long int a = 123456789012345ll;
|
||||
char s[30];
|
||||
sprintf(s, "]$fmt[", a);
|
||||
return (strcmp(s, "123456789012345") == 0) ? 0 : 1
|
||||
]]
|
||||
)],
|
||||
[LL_FMT=$fmt],[],[LL_FMT="%lld"])
|
||||
if test "$LL_FMT" != ""; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
done
|
||||
CFLAGS=$oCFLAGS
|
||||
if test "LL_FMT" = ""; then
|
||||
LL_FMT="%lld%"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([LL_FMT], ["$LL_FMT"], [printf format for long long])
|
||||
|
||||
AC_SUBST(WINDOWS_WMAIN_XLINK_FLAGS)
|
||||
AC_SUBST(WINDOWS_MAIN_XLINK_FLAGS)
|
||||
if test "$BUILDRULES" = "msvc"; then
|
||||
WINDOWS_WMAIN_XLINK_FLAGS="-link wsetargv.obj"
|
||||
WINDOWS_MAIN_XLINK_FLAGS="-link setargv.obj"
|
||||
fi
|
||||
|
||||
dnl BEGIN CRYPTO
|
||||
|
||||
dnl By default, we build in support for every crypto provider that we
|
||||
dnl can. If implicit crypto is disabled, we don't build support for
|
||||
dnl any crypto that is not explicitly enabled. Test for various crypto
|
||||
dnl providers in increasing order of priority. The last one found
|
||||
dnl becomes the default unless a default is explicitly specified.
|
||||
|
||||
AC_MSG_CHECKING(for whether to use implicit crypto)
|
||||
AC_ARG_ENABLE(implicit-crypto,
|
||||
AS_HELP_STRING([--enable-implicit-crypto],
|
||||
[whether to enable available crypto providers that are not explicitly requested; true by default]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
IMPLICIT_CRYPTO=1
|
||||
else
|
||||
IMPLICIT_CRYPTO=0
|
||||
fi],
|
||||
[IMPLICIT_CRYPTO=1])
|
||||
if test "$IMPLICIT_CRYPTO" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl Native crypto is always available unless explicitly disabled.
|
||||
|
||||
AC_SUBST(USE_CRYPTO_NATIVE)
|
||||
AC_ARG_ENABLE(crypto-native,
|
||||
AS_HELP_STRING([--enable-crypto-native],
|
||||
[whether to include support for native crypto provider]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
USE_CRYPTO_NATIVE=1
|
||||
else
|
||||
USE_CRYPTO_NATIVE=0
|
||||
fi],
|
||||
[USE_CRYPTO_NATIVE=$IMPLICIT_CRYPTO])
|
||||
if test "$USE_CRYPTO_NATIVE" = "1"; then
|
||||
AC_DEFINE([USE_CRYPTO_NATIVE], 1, [Whether to use the native crypto provider])
|
||||
DEFAULT_CRYPTO=native
|
||||
fi
|
||||
|
||||
dnl If the openssl/BoringSSL provider is explicitly requested, require openssl.
|
||||
dnl If the openssl provider is not explicitly disabled, enable it if
|
||||
dnl openssl is available. If the openssl provider is explicitly
|
||||
dnl disabled, do not link with openssl even if present.
|
||||
|
||||
if test "$USE_EXTERNAL_LIBS" = "1"; then
|
||||
OPENSSL_FOUND=1
|
||||
else
|
||||
PKG_CHECK_MODULES([pc_openssl], [openssl >= 1.1.0],
|
||||
[OPENSSL_FOUND=1], [OPENSSL_FOUND=0])
|
||||
fi
|
||||
|
||||
dnl Override pkg-config if headers and libraries are present.
|
||||
AS_IF([test "$OPENSSL_FOUND" = "0"],
|
||||
[AC_CHECK_HEADER(
|
||||
[openssl/evp.h],
|
||||
[AC_SEARCH_LIBS(EVP_MD_CTX_new,crypto,[OPENSSL_FOUND=1])])
|
||||
])
|
||||
|
||||
IMPLICIT_OPENSSL=0
|
||||
USE_CRYPTO_OPENSSL=0
|
||||
AC_SUBST(USE_CRYPTO_OPENSSL)
|
||||
AC_ARG_ENABLE(crypto-openssl,
|
||||
AS_HELP_STRING([--enable-crypto-openssl],
|
||||
[whether to include support for the openssl crypto provider]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
USE_CRYPTO_OPENSSL=1
|
||||
else
|
||||
USE_CRYPTO_OPENSSL=0
|
||||
fi],
|
||||
[IMPLICIT_OPENSSL=$IMPLICIT_CRYPTO])
|
||||
|
||||
if test "$IMPLICIT_OPENSSL" = "1"; then
|
||||
USE_CRYPTO_OPENSSL=$OPENSSL_FOUND
|
||||
if test "$USE_CRYPTO_OPENSSL" = "1"; then
|
||||
AC_MSG_NOTICE(enabling openssl crypto provider since openssl is available)
|
||||
else
|
||||
AC_MSG_NOTICE(not enabling openssl crypto provider since openssl was not found)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$USE_CRYPTO_OPENSSL" = "1" -a "$OPENSSL_FOUND" = "0"; then
|
||||
AC_MSG_ERROR(unable to use requested openssl crypto provider without openssl)
|
||||
fi
|
||||
|
||||
if test "$USE_CRYPTO_OPENSSL" = "1"; then
|
||||
CFLAGS="$CFLAGS $pc_openssl_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $pc_openssl_CFLAGS $pc_openssl_CXXFLAGS"
|
||||
LIBS="$LIBS $pc_openssl_LIBS"
|
||||
AC_DEFINE([USE_CRYPTO_OPENSSL], 1, [Whether to use the openssl crypto provider])
|
||||
DEFAULT_CRYPTO=openssl
|
||||
elif test "$OPENSSL_FOUND" = "1"; then
|
||||
AC_MSG_NOTICE(not linking with openssl even though it is available)
|
||||
fi
|
||||
|
||||
dnl If the gnutls provider is explicitly requested, require gnutls. If
|
||||
dnl the gnutls provider is not explicitly disabled, enable it if
|
||||
dnl gnutls is available. If the gnutls provider is explicitly
|
||||
dnl disabled, do not link with gnutls even if present.
|
||||
|
||||
PKG_CHECK_MODULES([pc_gnutls], [gnutls], [GNUTLS_FOUND=1], [GNUTLS_FOUND=0])
|
||||
if test "$GNUTLS_FOUND" = "0"; then
|
||||
AC_CHECK_HEADER(gnutls/gnutls.h,[GNUTLS_FOUND=1],[GNUTLS_FOUND=0])
|
||||
AC_SEARCH_LIBS(gnutls_hash_init,gnutls,[GNUTLS_FOUND=1],[GNUTLS_FOUND=0])
|
||||
fi
|
||||
|
||||
IMPLICIT_GNUTLS=0
|
||||
USE_CRYPTO_GNUTLS=0
|
||||
AC_SUBST(USE_CRYPTO_GNUTLS)
|
||||
AC_ARG_ENABLE(crypto-gnutls,
|
||||
AS_HELP_STRING([--enable-crypto-gnutls],
|
||||
[whether to include support for gnutls crypto provider]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
USE_CRYPTO_GNUTLS=1
|
||||
else
|
||||
USE_CRYPTO_GNUTLS=0
|
||||
fi],
|
||||
[IMPLICIT_GNUTLS=$IMPLICIT_CRYPTO])
|
||||
|
||||
if test "$IMPLICIT_GNUTLS" = "1"; then
|
||||
USE_CRYPTO_GNUTLS=$GNUTLS_FOUND
|
||||
if test "$USE_CRYPTO_GNUTLS" = "1"; then
|
||||
AC_MSG_NOTICE(enabling gnutls crypto provider since gnutls is available)
|
||||
else
|
||||
AC_MSG_NOTICE(not enabling gnutls crypto provider since gnutls was not found)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$USE_CRYPTO_GNUTLS" = "1" -a "$GNUTLS_FOUND" = "0"; then
|
||||
AC_MSG_ERROR(unable to use requested gnutls crypto provider without gnutls)
|
||||
fi
|
||||
|
||||
if test "$USE_CRYPTO_GNUTLS" = "1"; then
|
||||
CFLAGS="$CFLAGS $pc_gnutls_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $pc_gnutls_CFLAGS $pc_gnutls_CXXFLAGS"
|
||||
LIBS="$LIBS $pc_gnutls_LIBS"
|
||||
AC_DEFINE([USE_CRYPTO_GNUTLS], 1, [Whether to use the gnutls crypto provider])
|
||||
DEFAULT_CRYPTO=gnutls
|
||||
elif test "$GNUTLS_FOUND" = "1"; then
|
||||
AC_MSG_NOTICE(not linking with gnutls even though it is available)
|
||||
fi
|
||||
|
||||
dnl Allow the default crypto provider to be specified explicitly.
|
||||
|
||||
AC_MSG_CHECKING(which crypto to use by default)
|
||||
AC_SUBST(DEFAULT_CRYPTO)
|
||||
AC_ARG_WITH(default-crypto,
|
||||
AS_HELP_STRING([--with-default-crypto=provider],
|
||||
[which crypto provider to use by default; see README.md]),
|
||||
[DEFAULT_CRYPTO=$withval],
|
||||
[])
|
||||
AC_MSG_RESULT($DEFAULT_CRYPTO)
|
||||
AC_DEFINE_UNQUOTED([DEFAULT_CRYPTO], "$DEFAULT_CRYPTO", [Default crypto provider])
|
||||
|
||||
dnl Make sure the default crypto provider is actually being built.
|
||||
|
||||
bad_crypto=0
|
||||
case "$DEFAULT_CRYPTO" in
|
||||
"native")
|
||||
if test "$USE_CRYPTO_NATIVE" != "1"; then
|
||||
bad_crypto=1
|
||||
fi
|
||||
;;
|
||||
"openssl")
|
||||
if test "$USE_CRYPTO_OPENSSL" != "1"; then
|
||||
bad_crypto=1
|
||||
fi
|
||||
;;
|
||||
"gnutls")
|
||||
if test "$USE_CRYPTO_GNUTLS" != "1"; then
|
||||
bad_crypto=1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
bad_crypto=1
|
||||
;;
|
||||
esac
|
||||
if test "$bad_crypto" = "1"; then
|
||||
AC_MSG_ERROR(Unsupported default crypto: $DEFAULT_CRYPTO)
|
||||
fi
|
||||
|
||||
dnl END CRYPTO
|
||||
|
||||
AC_SUBST(QPDF_SKIP_TEST_COMPARE_IMAGES)
|
||||
AC_ARG_ENABLE(test-compare-images,
|
||||
AS_HELP_STRING([--enable-test-compare-images],
|
||||
[whether to compare images in test suite; disabled by default, enabling requires ghostscript and tiffcmp to be available]),
|
||||
[if test "$enableval" = "no"; then
|
||||
QPDF_SKIP_TEST_COMPARE_IMAGES=1
|
||||
else
|
||||
QPDF_SKIP_TEST_COMPARE_IMAGES=0
|
||||
fi],
|
||||
[QPDF_SKIP_TEST_COMPARE_IMAGES=1])
|
||||
|
||||
AC_SUBST(SHOW_FAILED_TEST_OUTPUT)
|
||||
AC_ARG_ENABLE(show-failed-test-output,
|
||||
AS_HELP_STRING([--enable-show-failed-test-output],
|
||||
[if specified, write failed test output to the console; useful for building on build servers where you can't easily open the test output files]),
|
||||
[if test "$enableval" = "no"; then
|
||||
SHOW_FAILED_TEST_OUTPUT=0
|
||||
else
|
||||
SHOW_FAILED_TEST_OUTPUT=1
|
||||
fi],
|
||||
[SHOW_FAILED_TEST_OUTPUT=0])
|
||||
|
||||
AC_CHECK_PROG(LATEX,latex,latex,[])
|
||||
AC_CHECK_PROG(PDFLATEX,pdflatex,pdflatex,[])
|
||||
AC_CHECK_PROG(LATEXMK,latexmk,latexmk,[])
|
||||
AC_CHECK_PROG(SPHINX,sphinx-build,sphinx-build,[])
|
||||
|
||||
AC_ARG_ENABLE(doc-maintenance,
|
||||
AS_HELP_STRING([--enable-doc-maintenance],
|
||||
[if set, enables all documentation options; also turned on by maintainer mode]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
doc_default=1;
|
||||
else
|
||||
doc_default=0;
|
||||
fi],
|
||||
[doc_default=$MAINTAINER_MODE])
|
||||
|
||||
BUILD_HTML=0
|
||||
AC_SUBST(BUILD_HTML)
|
||||
AC_ARG_ENABLE(html-doc,
|
||||
AS_HELP_STRING([--enable-html-doc],
|
||||
[whether to build HTML documents]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
BUILD_HTML=1;
|
||||
else
|
||||
BUILD_HTML=0;
|
||||
fi],
|
||||
[BUILD_HTML=$doc_default])
|
||||
BUILD_PDF=0
|
||||
AC_SUBST(BUILD_PDF)
|
||||
AC_ARG_ENABLE(pdf-doc,
|
||||
AS_HELP_STRING([--enable-pdf-doc],
|
||||
[whether to build PDF documents]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
BUILD_PDF=1;
|
||||
else
|
||||
BUILD_PDF=0;
|
||||
fi],
|
||||
[BUILD_PDF=$doc_default])
|
||||
|
||||
AC_SUBST(OSS_FUZZ)
|
||||
AC_ARG_ENABLE(oss-fuzz,
|
||||
AS_HELP_STRING([--enable-oss-fuzz],
|
||||
[if set, build static fuzzers for oss-fuzz]),
|
||||
[if test "$enableval" = "yes"; then
|
||||
OSS_FUZZ=1;
|
||||
else
|
||||
OSS_FUZZ=0;
|
||||
fi],
|
||||
[OSS_FUZZ=0])
|
||||
|
||||
if test "$BUILD_HTML" = "1"; then
|
||||
if test "$SPHINX" = ""; then
|
||||
MISSING_SPHINX=1
|
||||
MISSING_ANY=1
|
||||
fi
|
||||
fi
|
||||
if test "$BUILD_PDF" = "1"; then
|
||||
if test "$SPHINX" = ""; then
|
||||
MISSING_SPHINX=1
|
||||
MISSING_ANY=1
|
||||
fi
|
||||
if test "$LATEX" = ""; then
|
||||
MISSING_LATEX=1
|
||||
MISSING_ANY=1
|
||||
fi
|
||||
if test "$LATEXMK" = ""; then
|
||||
MISSING_LATEXMK=1
|
||||
MISSING_ANY=1
|
||||
fi
|
||||
if test "$PDFLATEX" = ""; then
|
||||
MISSING_PDFLATEX=1
|
||||
MISSING_ANY=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$MISSING_ANY" = "1"; then
|
||||
ISSUE_WARNINGS=1
|
||||
fi
|
||||
if test "$ISSUE_WARNINGS" = "1"; then
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if test "$MISSING_MAKE_381" = "1"; then
|
||||
AC_MSG_WARN(gnu make >= 3.81 is required)
|
||||
fi
|
||||
|
||||
if test "$MISSING_ZLIB_H" = "1"; then
|
||||
AC_MSG_WARN(unable to find required header zlib.h)
|
||||
fi
|
||||
|
||||
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_LATEX" = "1"; then
|
||||
AC_MSG_WARN(latex is required to build PDF documentation)
|
||||
fi
|
||||
|
||||
if test "$MISSING_LATEXMK" = "1"; then
|
||||
AC_MSG_WARN(latexmk is required to build PDF documentation)
|
||||
fi
|
||||
|
||||
if test "$MISSING_PDFLATEX" = "1"; then
|
||||
AC_MSG_WARN(pdflatex is required to build PDF documentation)
|
||||
fi
|
||||
|
||||
if test "$MISSING_SPHINX" = "1"; then
|
||||
AC_MSG_WARN(sphinx-build is required to build documentation)
|
||||
fi
|
||||
|
||||
if test "$ISSUE_WARNINGS" = "1"; then
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if test "$MISSING_ANY" = "1"; then
|
||||
AC_MSG_ERROR(some required prerequisites were not found)
|
||||
fi
|
||||
|
||||
# Do this last so it doesn't interfere with other tests.
|
||||
if test "$USE_EXTERNAL_LIBS" = "1"; then
|
||||
# Don't actually check for the presence of this -- we document that
|
||||
# the user can run this and then edit autoconf.mk if they have too
|
||||
# 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 -ljpeg -lssl -lcrypto -lmsvcrt -lws2_32 -lshell32 -ladvapi32 -lgdi32 -luser32 -lcrypt32"
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
|
@ -1,53 +0,0 @@
|
|||
BINS_examples = \
|
||||
pdf-attach-file \
|
||||
pdf-bookmarks \
|
||||
pdf-count-strings \
|
||||
pdf-create \
|
||||
pdf-custom-filter \
|
||||
pdf-double-page-size \
|
||||
pdf-filter-tokens \
|
||||
pdf-invert-images \
|
||||
pdf-mod-info \
|
||||
pdf-name-number-tree \
|
||||
pdf-npages \
|
||||
pdf-overlay-page \
|
||||
pdf-parse-content \
|
||||
pdf-set-form-values \
|
||||
pdf-split-pages \
|
||||
qpdf-job
|
||||
CBINS_examples = \
|
||||
pdf-c-objects \
|
||||
pdf-linearize \
|
||||
qpdfjob-c
|
||||
|
||||
TARGETS_examples = $(foreach B,$(BINS_examples) $(CBINS_examples),examples/$(OUTPUT_DIR)/$(call binname,$(B)))
|
||||
|
||||
$(TARGETS_examples): $(TARGETS_qpdf)
|
||||
|
||||
INCLUDES_examples = include
|
||||
|
||||
TC_SRCS_examples = $(wildcard examples/*.cc)
|
||||
|
||||
# -----
|
||||
|
||||
$(foreach B,$(BINS_examples),$(eval \
|
||||
OBJS_$(B) = $(call src_to_obj,examples/$(B).cc)))
|
||||
|
||||
$(foreach B,$(CBINS_examples),$(eval \
|
||||
OBJS_$(B) = $(call c_src_to_obj,examples/$(B).c)))
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(foreach B,$(BINS_examples) $(CBINS_examples),$(call obj_to_dep,$(OBJS_$(B))))
|
||||
endif
|
||||
|
||||
$(foreach B,$(BINS_examples),$(eval \
|
||||
$(OBJS_$(B)): examples/$(OUTPUT_DIR)/%.$(OBJ): examples/$(B).cc ; \
|
||||
$(call compile,examples/$(B).cc,$(INCLUDES_examples))))
|
||||
|
||||
$(foreach B,$(CBINS_examples),$(eval \
|
||||
$(OBJS_$(B)): examples/$(OUTPUT_DIR)/%.$(OBJ): examples/$(B).c ; \
|
||||
$(call c_compile,examples/$(B).c,$(INCLUDES_examples))))
|
||||
|
||||
$(foreach B,$(BINS_examples) $(CBINS_examples),$(eval \
|
||||
examples/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
||||
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))))
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
153
fuzz/build.mk
153
fuzz/build.mk
|
@ -1,153 +0,0 @@
|
|||
# This directory contains support for Google's oss-fuzz project. See
|
||||
# https://github.com/google/oss-fuzz/tree/master/projects/qpdf
|
||||
|
||||
FUZZERS = \
|
||||
qpdf_fuzzer \
|
||||
ascii85_fuzzer \
|
||||
dct_fuzzer \
|
||||
flate_fuzzer \
|
||||
hex_fuzzer \
|
||||
lzw_fuzzer \
|
||||
pngpredictor_fuzzer \
|
||||
runlength_fuzzer \
|
||||
tiffpredictor_fuzzer
|
||||
|
||||
DEFAULT_FUZZ_RUNNER := standalone_fuzz_target_runner
|
||||
OBJ_DEFAULT_FUZZ := fuzz/$(OUTPUT_DIR)/$(DEFAULT_FUZZ_RUNNER).$(OBJ)
|
||||
|
||||
BINS_fuzz = $(foreach B,$(FUZZERS),fuzz/$(OUTPUT_DIR)/$(call binname,$(B)))
|
||||
TARGETS_fuzz = $(OBJ_DEFAULT_FUZZ) $(BINS_fuzz) fuzz_corpus
|
||||
|
||||
# Fuzzers test private classes too, so we need libqpdf in the include path
|
||||
INCLUDES_fuzz = include libqpdf
|
||||
|
||||
# LIB_FUZZING_ENGINE is overridden by oss-fuzz
|
||||
LIB_FUZZING_ENGINE ?= $(OBJ_DEFAULT_FUZZ)
|
||||
|
||||
# Depend on OBJ_DEFAULT_FUZZ to ensure that it is always compiled.
|
||||
# Don't depend on LIB_FUZZING_ENGINE, which we can't build. When used
|
||||
# by oss-fuzz, it will be there.
|
||||
$(BINS_fuzz): $(TARGETS_libqpdf) $(OBJ_DEFAULT_FUZZ)
|
||||
|
||||
# Files from the test suite that are good for seeding the fuzzer.
|
||||
# Update $qpdf_n_test_files in qtest/fuzz.test if you change this list.
|
||||
CORPUS_FROM_TEST = \
|
||||
stream-data.pdf \
|
||||
lin5.pdf \
|
||||
field-types.pdf \
|
||||
image-streams-small.pdf \
|
||||
need-appearances.pdf \
|
||||
outlines-with-actions.pdf \
|
||||
outlines-with-old-root-dests.pdf \
|
||||
page-labels-and-outlines.pdf \
|
||||
page-labels-num-tree.pdf \
|
||||
dr-with-indirect-item.pdf \
|
||||
fuzz-16214.pdf \
|
||||
issue-99b.pdf \
|
||||
issue-99.pdf \
|
||||
issue-100.pdf \
|
||||
issue-101.pdf \
|
||||
issue-106.pdf \
|
||||
issue-117.pdf \
|
||||
issue-119.pdf \
|
||||
issue-120.pdf \
|
||||
issue-141a.pdf \
|
||||
issue-141b.pdf \
|
||||
issue-143.pdf \
|
||||
issue-146.pdf \
|
||||
issue-147.pdf \
|
||||
issue-148.pdf \
|
||||
issue-149.pdf \
|
||||
issue-150.pdf \
|
||||
issue-202.pdf \
|
||||
issue-263.pdf \
|
||||
issue-335a.pdf \
|
||||
issue-335b.pdf
|
||||
|
||||
# Any file that qpdf_fuzzer should be tested with can be named
|
||||
# something.fuzz and dropped into this directory.
|
||||
CORPUS_OTHER = $(wildcard fuzz/qpdf_extra/*.fuzz)
|
||||
|
||||
# -----
|
||||
|
||||
CORPUS_EXTRA := $(foreach F,$(CORPUS_FROM_TEST),qpdf/qtest/qpdf/$F) \
|
||||
$(CORPUS_OTHER)
|
||||
CORPUS_DIR := fuzz/$(OUTPUT_DIR)/qpdf_fuzzer_seed_corpus
|
||||
|
||||
.PHONY: fuzz_corpus
|
||||
fuzz_corpus:: fuzz/$(OUTPUT_DIR)/fuzz_corpus.stamp
|
||||
$(foreach F,$(CORPUS_EXTRA),$(eval \
|
||||
SHA1_$(notdir $(F)) := $(shell perl fuzz/get_sha1 < $F)))
|
||||
$(foreach F,$(CORPUS_EXTRA),$(eval \
|
||||
fuzz_corpus:: $(CORPUS_DIR)/$(SHA1_$(notdir $(F)))))
|
||||
$(foreach F,$(CORPUS_EXTRA),$(eval \
|
||||
$(CORPUS_DIR)/$(SHA1_$(notdir $(F))): $(F) ; \
|
||||
mkdir -p $(CORPUS_DIR); \
|
||||
cp $(F) $(CORPUS_DIR)/$(SHA1_$(notdir $(F)))))
|
||||
|
||||
fuzz/$(OUTPUT_DIR)/fuzz_corpus.stamp: $(CORPUS_EXTRA)
|
||||
mkdir -p $(CORPUS_DIR)
|
||||
touch $@
|
||||
|
||||
$(foreach B,$(FUZZERS),$(eval \
|
||||
OBJS_$(B) = $(call src_to_obj,fuzz/$(B).cc)))
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(foreach B,$(FUZZERS),$(call obj_to_dep,$(OBJS_$(B))))
|
||||
endif
|
||||
|
||||
$(foreach B,$(DEFAULT_FUZZ_RUNNER),$(eval \
|
||||
fuzz/$(OUTPUT_DIR)/%.$(OBJ): fuzz/$(B).cc ; \
|
||||
$(call compile,fuzz/$(B).cc,$(INCLUDES_fuzz))))
|
||||
|
||||
$(foreach B,$(FUZZERS),$(eval \
|
||||
$(OBJS_$(B)): fuzz/$(OUTPUT_DIR)/%.$(OBJ): fuzz/$(B).cc ; \
|
||||
$(call compile,fuzz/$(B).cc,$(INCLUDES_fuzz))))
|
||||
|
||||
ifeq ($(suffix $(LIB_FUZZING_ENGINE)),.$(OBJ))
|
||||
FUZZ_as_obj := $(LIB_FUZZING_ENGINE)
|
||||
FUZZ_as_lib :=
|
||||
else
|
||||
FUZZ_as_obj :=
|
||||
FUZZ_as_lib := $(LIB_FUZZING_ENGINE)
|
||||
endif
|
||||
|
||||
$(foreach B,$(FUZZERS),$(eval \
|
||||
fuzz/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
||||
$(call makebin,$(OBJS_$(B)) $(FUZZ_as_obj),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(FUZZ_as_lib) $(LIBS_libqpdf) $(LIBS))))
|
||||
|
||||
ifeq ($(OSS_FUZZ),1)
|
||||
|
||||
# Build fuzzers linked with static libraries and installed into a
|
||||
# location provided by oss-fuzz. This is specifically to support the
|
||||
# oss-fuzz project. These rules won't on systems that don't allow main
|
||||
# to be in a library or don't name their libraries libsomething.a.
|
||||
|
||||
STATIC_BINS_fuzz := $(foreach B,$(FUZZERS),fuzz/$(OUTPUT_DIR)/static/$(call binname,$(B)))
|
||||
$(STATIC_BINS_fuzz): $(TARGETS_libqpdf) $(OBJ_DEFAULT_FUZZ)
|
||||
|
||||
# OUT is provided in the oss-fuzz environment
|
||||
OUT ?= $(CURDIR)/fuzz/$(OUTPUT_DIR)/fuzz-install
|
||||
|
||||
# These are not fully static, but they statically link with qpdf and
|
||||
# our external dependencies other than system libraries.
|
||||
$(foreach B,$(FUZZERS),$(eval \
|
||||
fuzz/$(OUTPUT_DIR)/static/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
||||
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIB_FUZZING_ENGINE) $(patsubst -l%,-l:lib%.a,$(LIBS_libqpdf) $(LIBS)))))
|
||||
|
||||
# The install_fuzz target is used by build.sh in oss-fuzz's qpdf project.
|
||||
install_fuzz: $(STATIC_BINS_fuzz)
|
||||
mkdir -p $(OUT)
|
||||
cp fuzz/pdf.dict $(STATIC_BINS_fuzz) $(OUT)/
|
||||
for B in $(FUZZERS); do \
|
||||
if test -f fuzz/$${B}.options; then \
|
||||
cp fuzz/$${B}.options $(OUT)/$${B}.options; \
|
||||
fi; \
|
||||
if test -d fuzz/$(OUTPUT_DIR)/$${B}_seed_corpus; then \
|
||||
(cd fuzz/$(OUTPUT_DIR)/$${B}_seed_corpus; zip -q -r $(OUT)/$${B}_seed_corpus.zip .); \
|
||||
elif test -d fuzz/$${B}_seed_corpus; then \
|
||||
(cd fuzz/$${B}_seed_corpus; zip -q -r $(OUT)/$${B}_seed_corpus.zip .); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
endif # OSS_FUZZ
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env perl
|
||||
require 5.008;
|
||||
use warnings;
|
||||
use strict;
|
||||
use Digest::SHA;
|
||||
|
||||
binmode STDIN;
|
||||
my $digest = Digest::SHA->new('sha1')->addfile(*STDIN)->hexdigest;
|
||||
print "$digest";
|
518
install-sh
518
install-sh
|
@ -1,518 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p' feature.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
151
libqpdf/build.mk
151
libqpdf/build.mk
|
@ -1,151 +0,0 @@
|
|||
TARGETS_libqpdf = libqpdf/$(OUTPUT_DIR)/$(call libname,qpdf)
|
||||
|
||||
ifeq ($(MAINTAINER_MODE), 1)
|
||||
_ := $(shell ./generate_auto_job --generate)
|
||||
endif
|
||||
|
||||
INCLUDES_libqpdf = include libqpdf
|
||||
LDFLAGS_libqpdf = -Llibqpdf/$(OUTPUT_DIR)
|
||||
LIBS_libqpdf = -lqpdf
|
||||
|
||||
CRYPTO_NATIVE = \
|
||||
libqpdf/AES_PDF_native.cc \
|
||||
libqpdf/MD5_native.cc \
|
||||
libqpdf/QPDFCrypto_native.cc \
|
||||
libqpdf/RC4_native.cc \
|
||||
libqpdf/SHA2_native.cc \
|
||||
libqpdf/rijndael.cc \
|
||||
libqpdf/sha2.c \
|
||||
libqpdf/sha2big.c
|
||||
|
||||
CRYPTO_OPENSSL = \
|
||||
libqpdf/QPDFCrypto_openssl.cc
|
||||
|
||||
CRYPTO_GNUTLS = \
|
||||
libqpdf/QPDFCrypto_gnutls.cc
|
||||
|
||||
SRCS_libqpdf = \
|
||||
libqpdf/BitStream.cc \
|
||||
libqpdf/BitWriter.cc \
|
||||
libqpdf/Buffer.cc \
|
||||
libqpdf/BufferInputSource.cc \
|
||||
libqpdf/ClosedFileInputSource.cc \
|
||||
libqpdf/ContentNormalizer.cc \
|
||||
libqpdf/CryptoRandomDataProvider.cc \
|
||||
libqpdf/FileInputSource.cc \
|
||||
libqpdf/InputSource.cc \
|
||||
libqpdf/InsecureRandomDataProvider.cc \
|
||||
libqpdf/JSON.cc \
|
||||
libqpdf/JSONHandler.cc \
|
||||
libqpdf/MD5.cc \
|
||||
libqpdf/NNTree.cc \
|
||||
libqpdf/OffsetInputSource.cc \
|
||||
libqpdf/PDFVersion.cc \
|
||||
libqpdf/Pipeline.cc \
|
||||
libqpdf/Pl_AES_PDF.cc \
|
||||
libqpdf/Pl_ASCII85Decoder.cc \
|
||||
libqpdf/Pl_ASCIIHexDecoder.cc \
|
||||
libqpdf/Pl_Buffer.cc \
|
||||
libqpdf/Pl_Concatenate.cc \
|
||||
libqpdf/Pl_Count.cc \
|
||||
libqpdf/Pl_DCT.cc \
|
||||
libqpdf/Pl_Discard.cc \
|
||||
libqpdf/Pl_Flate.cc \
|
||||
libqpdf/Pl_LZWDecoder.cc \
|
||||
libqpdf/Pl_MD5.cc \
|
||||
libqpdf/Pl_PNGFilter.cc \
|
||||
libqpdf/Pl_QPDFTokenizer.cc \
|
||||
libqpdf/Pl_RC4.cc \
|
||||
libqpdf/Pl_RunLength.cc \
|
||||
libqpdf/Pl_SHA2.cc \
|
||||
libqpdf/Pl_StdioFile.cc \
|
||||
libqpdf/Pl_TIFFPredictor.cc \
|
||||
libqpdf/QPDF.cc \
|
||||
libqpdf/QPDFAcroFormDocumentHelper.cc \
|
||||
libqpdf/QPDFAnnotationObjectHelper.cc \
|
||||
libqpdf/QPDFArgParser.cc \
|
||||
libqpdf/QPDFCryptoProvider.cc \
|
||||
libqpdf/QPDFEFStreamObjectHelper.cc \
|
||||
libqpdf/QPDFEmbeddedFileDocumentHelper.cc \
|
||||
libqpdf/QPDFExc.cc \
|
||||
libqpdf/QPDFFileSpecObjectHelper.cc \
|
||||
libqpdf/QPDFFormFieldObjectHelper.cc \
|
||||
libqpdf/QPDFJob.cc \
|
||||
libqpdf/QPDFJob_argv.cc \
|
||||
libqpdf/QPDFJob_config.cc \
|
||||
libqpdf/QPDFJob_json.cc \
|
||||
libqpdf/QPDFMatrix.cc \
|
||||
libqpdf/QPDFNameTreeObjectHelper.cc \
|
||||
libqpdf/QPDFNumberTreeObjectHelper.cc \
|
||||
libqpdf/QPDFObjGen.cc \
|
||||
libqpdf/QPDFObject.cc \
|
||||
libqpdf/QPDFObjectHandle.cc \
|
||||
libqpdf/QPDFOutlineDocumentHelper.cc \
|
||||
libqpdf/QPDFOutlineObjectHelper.cc \
|
||||
libqpdf/QPDFPageDocumentHelper.cc \
|
||||
libqpdf/QPDFPageLabelDocumentHelper.cc \
|
||||
libqpdf/QPDFPageObjectHelper.cc \
|
||||
libqpdf/QPDFStreamFilter.cc \
|
||||
libqpdf/QPDFSystemError.cc \
|
||||
libqpdf/QPDFTokenizer.cc \
|
||||
libqpdf/QPDFUsage.cc \
|
||||
libqpdf/QPDFWriter.cc \
|
||||
libqpdf/QPDFXRefEntry.cc \
|
||||
libqpdf/QPDF_Array.cc \
|
||||
libqpdf/QPDF_Bool.cc \
|
||||
libqpdf/QPDF_Dictionary.cc \
|
||||
libqpdf/QPDF_InlineImage.cc \
|
||||
libqpdf/QPDF_Integer.cc \
|
||||
libqpdf/QPDF_Name.cc \
|
||||
libqpdf/QPDF_Null.cc \
|
||||
libqpdf/QPDF_Operator.cc \
|
||||
libqpdf/QPDF_Real.cc \
|
||||
libqpdf/QPDF_Reserved.cc \
|
||||
libqpdf/QPDF_Stream.cc \
|
||||
libqpdf/QPDF_String.cc \
|
||||
libqpdf/QPDF_encryption.cc \
|
||||
libqpdf/QPDF_linearization.cc \
|
||||
libqpdf/QPDF_optimization.cc \
|
||||
libqpdf/QPDF_pages.cc \
|
||||
libqpdf/QTC.cc \
|
||||
libqpdf/QUtil.cc \
|
||||
libqpdf/RC4.cc \
|
||||
libqpdf/ResourceFinder.cc \
|
||||
libqpdf/SecureRandomDataProvider.cc \
|
||||
libqpdf/SF_FlateLzwDecode.cc \
|
||||
libqpdf/SparseOHArray.cc \
|
||||
libqpdf/qpdf-c.cc \
|
||||
libqpdf/qpdfjob-c.cc
|
||||
|
||||
ifeq ($(USE_CRYPTO_NATIVE), 1)
|
||||
SRCS_libqpdf += $(CRYPTO_NATIVE)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_CRYPTO_OPENSSL), 1)
|
||||
SRCS_libqpdf += $(CRYPTO_OPENSSL)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_CRYPTO_GNUTLS), 1)
|
||||
SRCS_libqpdf += $(CRYPTO_GNUTLS)
|
||||
endif
|
||||
|
||||
# -----
|
||||
|
||||
CCSRCS_libqpdf = $(filter %.cc,$(SRCS_libqpdf))
|
||||
CSRCS_libqpdf = $(filter %.c,$(SRCS_libqpdf))
|
||||
|
||||
CCOBJS_libqpdf = $(call src_to_lobj,$(CCSRCS_libqpdf))
|
||||
COBJS_libqpdf = $(call c_src_to_lobj,$(CSRCS_libqpdf))
|
||||
OBJS_libqpdf = $(CCOBJS_libqpdf) $(COBJS_libqpdf)
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(call lobj_to_dep,$(OBJS_libqpdf))
|
||||
endif
|
||||
|
||||
$(CCOBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.cc
|
||||
$(call libcompile,$<,$(INCLUDES_libqpdf))
|
||||
$(COBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.c
|
||||
$(call c_libcompile,$<,$(INCLUDES_libqpdf))
|
||||
|
||||
$(TARGETS_libqpdf): $(OBJS_libqpdf)
|
||||
$(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(LT_CURRENT),$(LT_REVISION),$(LT_AGE))
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
|
@ -1,58 +0,0 @@
|
|||
BINS_libtests = \
|
||||
cxx11 \
|
||||
aes \
|
||||
arg_parser \
|
||||
ascii85 \
|
||||
bits \
|
||||
buffer \
|
||||
closed_file_input_source \
|
||||
concatenate \
|
||||
dct_compress \
|
||||
dct_uncompress \
|
||||
flate \
|
||||
hex \
|
||||
input_source \
|
||||
json \
|
||||
json_handler \
|
||||
json_parse \
|
||||
lzw \
|
||||
main_from_wmain \
|
||||
matrix \
|
||||
md5 \
|
||||
nntree \
|
||||
numrange \
|
||||
pdf_version \
|
||||
pointer_holder \
|
||||
predictors \
|
||||
qintc \
|
||||
qutil \
|
||||
random \
|
||||
rc4 \
|
||||
runlength \
|
||||
sha2 \
|
||||
sparse_array
|
||||
|
||||
TARGETS_libtests = $(foreach B,$(BINS_libtests),libtests/$(OUTPUT_DIR)/$(call binname,$(B)))
|
||||
|
||||
$(TARGETS_libtests): $(TARGETS_libqpdf) $(TARGETS_qpdf)
|
||||
|
||||
INCLUDES_libtests = include libqpdf
|
||||
|
||||
TC_SRCS_libtests = $(wildcard libqpdf/*.cc) $(wildcard libtests/*.cc) libqpdf/qpdf/bits_functions.hh
|
||||
|
||||
# -----
|
||||
|
||||
$(foreach B,$(BINS_libtests),$(eval \
|
||||
OBJS_$(B) = $(call src_to_obj,libtests/$(B).cc)))
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(foreach B,$(BINS_libtests),$(call obj_to_dep,$(OBJS_$(B))))
|
||||
endif
|
||||
|
||||
$(foreach B,$(BINS_libtests),$(eval \
|
||||
$(OBJS_$(B)): libtests/$(OUTPUT_DIR)/%.$(OBJ): libtests/$(B).cc ; \
|
||||
$(call compile,libtests/$(B).cc,$(INCLUDES_libtests))))
|
||||
|
||||
$(foreach B,$(BINS_libtests),$(eval \
|
||||
libtests/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
||||
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))))
|
|
@ -1,951 +0,0 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
|
||||
# or '14' (for the C++14 standard).
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
# required and that the macro should error out if no mode with that
|
||||
# support is found. If specified 'optional', then configuration proceeds
|
||||
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||
# supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 11
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
[$2], [noext], [],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
switch="-std=gnu++${alternative}"
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$2], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in "" -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
else
|
||||
HAVE_CXX$1=1
|
||||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
])
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L && ! defined(_MSC_VER)
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual ~Base() {}
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual ~Derived() override {}
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L && ! defined(_MSC_VER)
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201703L && ! defined(_MSC_VER)
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus < 201703L
|
||||
|
||||
]])
|
|
@ -1,31 +0,0 @@
|
|||
dnl @synopsis AX_RANDOM_DEVICE
|
||||
dnl
|
||||
dnl This macro will check for a random device, allowing the user to explicitly
|
||||
dnl set the path. The user uses '--with-random=FILE' as an argument to
|
||||
dnl configure.
|
||||
dnl
|
||||
dnl If A random device is found then HAVE_RANDOM_DEVICE is set to 1 and
|
||||
dnl RANDOM_DEVICE contains the path.
|
||||
dnl
|
||||
dnl @category Miscellaneous
|
||||
dnl @author Martin Ebourne
|
||||
dnl @version 2005/07/01
|
||||
dnl @license AllPermissive
|
||||
|
||||
AC_DEFUN([AX_RANDOM_DEVICE], [
|
||||
AC_ARG_WITH([random],
|
||||
[AC_HELP_STRING([--with-random=FILE], [Use FILE as random number seed [auto-detected]])],
|
||||
[RANDOM_DEVICE="$withval"],
|
||||
[AC_CHECK_FILE("/dev/urandom", [RANDOM_DEVICE="/dev/urandom";],
|
||||
[AC_CHECK_FILE("/dev/arandom", [RANDOM_DEVICE="/dev/arandom";],
|
||||
[AC_CHECK_FILE("/dev/random", [RANDOM_DEVICE="/dev/random";])]
|
||||
)])
|
||||
])
|
||||
if test "x$RANDOM_DEVICE" != "x" ; then
|
||||
AC_DEFINE([HAVE_RANDOM_DEVICE], 1,
|
||||
[Define to 1 (and set RANDOM_DEVICE) if a random device is available])
|
||||
AC_SUBST([RANDOM_DEVICE])
|
||||
AC_DEFINE_UNQUOTED([RANDOM_DEVICE], ["$RANDOM_DEVICE"],
|
||||
[Define to the filename of the random device (and set HAVE_RANDOM_DEVICE)])
|
||||
fi
|
||||
])dnl
|
File diff suppressed because it is too large
Load Diff
|
@ -1,437 +0,0 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -1,124 +0,0 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -1,23 +0,0 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -1,99 +0,0 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
275
m4/pkg.m4
275
m4/pkg.m4
|
@ -1,275 +0,0 @@
|
|||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
dnl serial 11 (pkg-config-0.29.1)
|
||||
dnl
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if you
|
||||
dnl distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by Autoconf, you may include it under
|
||||
dnl the same distribution terms that you use for the rest of that
|
||||
dnl program.
|
||||
|
||||
dnl PKG_PREREQ(MIN-VERSION)
|
||||
dnl -----------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Verify that the version of the pkg-config macros are at least
|
||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||
dnl installed version of pkg-config, this checks the developer's version
|
||||
dnl of pkg.m4 when generating configure.
|
||||
dnl
|
||||
dnl To ensure that this macro is defined, also add:
|
||||
dnl m4_ifndef([PKG_PREREQ],
|
||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||
dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
dnl ----------------------------------
|
||||
dnl Since: 0.16
|
||||
dnl
|
||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||
dnl first found in the path. Checks that the version of pkg-config found
|
||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||
dnl used since that's the first version where most current features of
|
||||
dnl pkg-config existed.
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Since: 0.18
|
||||
dnl
|
||||
dnl Check to see whether a particular set of modules exists. Similar to
|
||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
dnl
|
||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
dnl only at the first occurence in configure.ac, so if the first place
|
||||
dnl it's called might be skipped (such as if it is within an "if", you
|
||||
dnl have to call PKG_CHECK_EXISTS manually
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
dnl ---------------------------------------------
|
||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||
dnl pkg_failed based on the result.
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])dnl _PKG_CONFIG
|
||||
|
||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
dnl ---------------------------
|
||||
dnl Internal check to see if pkg-config supports short errors.
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Since: 0.4.0
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])dnl PKG_CHECK_MODULES
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Checks for existence of MODULES and gathers its build flags with
|
||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||
dnl configure.ac.
|
||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
_save_PKG_CONFIG=$PKG_CONFIG
|
||||
PKG_CONFIG="$PKG_CONFIG --static"
|
||||
PKG_CHECK_MODULES($@)
|
||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||
])dnl PKG_CHECK_MODULES_STATIC
|
||||
|
||||
|
||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||
dnl -------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||
dnl should install pkg-config .pc files. By default the directory is
|
||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
dnl parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||
dnl --------------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
dnl module should install arch-independent pkg-config .pc files. By
|
||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||
dnl changed by passing DIRECTORY. The user can override through the
|
||||
dnl --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------
|
||||
dnl Since: 0.28
|
||||
dnl
|
||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
|
@ -1,21 +0,0 @@
|
|||
DEST=$(INSTALL_DIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
||||
IMPORT_LIB_NAME := $(call libname,qpdf)
|
||||
installwin: all
|
||||
$(RM) -r $(INSTALL_DIR)
|
||||
mkdir $(INSTALL_DIR)
|
||||
mkdir $(DEST)
|
||||
mkdir $(DEST)/bin
|
||||
mkdir $(DEST)/lib
|
||||
mkdir $(DEST)/include
|
||||
mkdir $(DEST)/include/qpdf
|
||||
cp libqpdf/$(OUTPUT_DIR)/$(IMPORT_LIB_NAME) $(DEST)/lib
|
||||
cp libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(DEST)/bin
|
||||
perl copy_dlls libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(DEST)/bin $(OBJDUMP) $(WINDOWS_WORDSIZE)
|
||||
cp qpdf/$(OUTPUT_DIR)/qpdf.exe $(DEST)/bin
|
||||
cp zlib-flate/$(OUTPUT_DIR)/zlib-flate.exe $(DEST)/bin
|
||||
cp qpdf/$(OUTPUT_DIR)/fix-qdf.exe $(DEST)/bin
|
||||
cp include/qpdf/*.h $(DEST)/include/qpdf
|
||||
cp include/qpdf/*.hh $(DEST)/include/qpdf
|
||||
if [ -d doc ]; then \
|
||||
cp -r doc $(DEST); \
|
||||
fi
|
141
make/libtool.mk
141
make/libtool.mk
|
@ -1,141 +0,0 @@
|
|||
# --- Required interface definitions ---
|
||||
|
||||
# LIBTOOL needs bash
|
||||
SHELL=/bin/bash
|
||||
|
||||
OBJ=o
|
||||
LOBJ=lo
|
||||
|
||||
# Usage: $(call libname,base)
|
||||
define libname
|
||||
lib$(1).la
|
||||
endef
|
||||
|
||||
# Usage: $(call binname,base)
|
||||
define binname
|
||||
$(1)
|
||||
endef
|
||||
|
||||
# --- Private definitions ---
|
||||
|
||||
ifeq ($(HAVE_LD_VERSION_SCRIPT), 1)
|
||||
LD_VERSION_FLAGS=-Wl,--version-script=libqpdf.map
|
||||
else
|
||||
LD_VERSION_FLAGS=
|
||||
endif
|
||||
|
||||
# Usage: $(call libdepflags,$(basename obj))
|
||||
# Usage: $(call fixdeps,$(basename obj))
|
||||
ifeq ($(GENDEPS),1)
|
||||
libdepflags=-MD -MF $(1).tdep -MP
|
||||
fixdeps=sed -e 's/\.o:/.lo:/' < $(1).tdep > $(1).dep
|
||||
|
||||
else
|
||||
libdepflags=
|
||||
fixdeps=
|
||||
endif
|
||||
|
||||
# --- Required rule definitions ---
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call compile,src,includes,xflags)
|
||||
define compile
|
||||
$(CXX) $(CXXFLAGS) $(3) \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call c_compile,src,includes,xflags)
|
||||
define c_compile
|
||||
$(CC) $(CFLAGS) $(3) \
|
||||
$(call depflags,$(basename $(call c_src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define libcompile
|
||||
$(LIBTOOL) --quiet --mode=compile --tag=CXX \
|
||||
$(CXX) $(CXXFLAGS) \
|
||||
$(call libdepflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call src_to_obj,$(1)); \
|
||||
$(call fixdeps,$(basename $(call src_to_obj,$(1))))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define c_libcompile
|
||||
$(LIBTOOL) --quiet --mode=compile --tag=CC \
|
||||
$(CC) $(CFLAGS) \
|
||||
$(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
$(CPPFLAGS) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1)); \
|
||||
$(call fixdeps,$(basename $(call src_to_obj,$(1))))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call makeslib,objs,library)
|
||||
define makeslib
|
||||
$(RM) $2
|
||||
$(AR) cru $(2) $(1)
|
||||
$(RANLIB) $(2)
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5 6 7
|
||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||
define makelib
|
||||
$(LIBTOOL) --mode=link --tag=CXX \
|
||||
$(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
|
||||
-o $(2) $(1) $(3) $(4) \
|
||||
$(RPATH) -version-info $(5):$(6):$(7) -no-undefined
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5
|
||||
# Usage: $(call makebin,objs,binary,ldflags,libs,xlinkflags)
|
||||
define makebin
|
||||
$(LIBTOOL) --mode=link --tag=CXX \
|
||||
$(CXX) $(CXXFLAGS) $(5) $(1) -o $(2) $(3) $(4)
|
||||
endef
|
||||
|
||||
install-libs: build_libqpdf
|
||||
./mkinstalldirs -m 0755 $(DESTDIR)$(libdir)/pkgconfig
|
||||
./mkinstalldirs -m 0755 $(DESTDIR)$(includedir)/qpdf
|
||||
$(LIBTOOL) --mode=install ./install-sh \
|
||||
libqpdf/$(OUTPUT_DIR)/libqpdf.la \
|
||||
$(DESTDIR)$(libdir)/libqpdf.la
|
||||
$(LIBTOOL) --finish $(DESTDIR)$(libdir)
|
||||
./install-sh -m 0644 include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf
|
||||
./install-sh -m 0644 include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf
|
||||
./install-sh -m 0644 libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig
|
||||
|
||||
# Install target
|
||||
|
||||
# NOTE: If installing any new executables, remember to update the
|
||||
# lambda layer code in build-scripts/build-appimage.
|
||||
|
||||
# Ensure that installwin in make/installwin.mk is consistent with
|
||||
# this.
|
||||
|
||||
install: all install-libs
|
||||
./mkinstalldirs -m 0755 $(DESTDIR)$(bindir)
|
||||
./mkinstalldirs -m 0755 $(DESTDIR)$(docdir)
|
||||
./mkinstalldirs -m 0755 $(DESTDIR)$(mandir)/man1
|
||||
$(LIBTOOL) --mode=install ./install-sh \
|
||||
qpdf/$(OUTPUT_DIR)/qpdf \
|
||||
$(DESTDIR)$(bindir)/qpdf
|
||||
$(LIBTOOL) --mode=install ./install-sh \
|
||||
zlib-flate/$(OUTPUT_DIR)/zlib-flate \
|
||||
$(DESTDIR)$(bindir)/zlib-flate
|
||||
$(LIBTOOL) --mode=install ./install-sh \
|
||||
qpdf/$(OUTPUT_DIR)/fix-qdf \
|
||||
$(DESTDIR)$(bindir)/fix-qdf
|
||||
./install-sh -m 0644 README-doc.txt $(DESTDIR)$(docdir); \
|
||||
./install-sh -m 0644 manual/$(OUTPUT_DIR)/*.1 $(DESTDIR)$(mandir)/man1
|
|
@ -1,82 +0,0 @@
|
|||
# --- Required interface definitions ---
|
||||
|
||||
OBJ=o
|
||||
LOBJ=o
|
||||
|
||||
# Usage: $(call libname,base)
|
||||
define libname
|
||||
lib$(1).dll.a
|
||||
endef
|
||||
|
||||
# Usage: $(call binname,base)
|
||||
define binname
|
||||
$(1).exe
|
||||
endef
|
||||
|
||||
# --- Required rule definitions ---
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call compile,src,includes,xflags)
|
||||
define compile
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(3) \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -o $(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call c_compile,src,includes,xflags)
|
||||
define c_compile
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(3) \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define libcompile
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DDLL_EXPORT \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -o $(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call c_libcompile,src,includes)
|
||||
define c_libcompile
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DDLL_EXPORT \
|
||||
$(call depflags,$(basename $(call src_to_obj,$(1)))) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -o $(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call makeslib,objs,library)
|
||||
define makeslib
|
||||
$(RM) $2
|
||||
$(AR) cru $(2) $(1)
|
||||
$(RANLIB) $(2)
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5 6 7
|
||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||
define makelib
|
||||
$(DLLTOOL) -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).dll.a,/\1,'`$(shell expr $(5) - $(7)).dll) $(1); \
|
||||
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).dll.a,/\1,'`$(shell expr $(5) - $(7)).dll \
|
||||
$(1) $(3) $(4)
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5
|
||||
# Usage: $(call makebin,objs,binary,ldflags,libs,xlinkflags)
|
||||
define makebin
|
||||
$(CXX) $(CXXFLAGS) $(5) $(1) -o $(2) $(3) $(4)
|
||||
endef
|
||||
|
||||
# Install target
|
||||
|
||||
INSTALL_DIR = install-mingw$(WINDOWS_WORDSIZE)
|
||||
include make/installwin.mk
|
||||
install: installwin
|
||||
$(STRIP) $(DEST)/bin/*.exe
|
||||
$(STRIP) $(DEST)/bin/*.dll
|
97
make/msvc.mk
97
make/msvc.mk
|
@ -1,97 +0,0 @@
|
|||
# --- Required interface definitions ---
|
||||
|
||||
OBJ=obj
|
||||
LOBJ=obj
|
||||
|
||||
# Usage: $(call libname,base)
|
||||
define libname
|
||||
$(1).lib
|
||||
endef
|
||||
|
||||
# Usage: $(call binname,base)
|
||||
define binname
|
||||
$(1).exe
|
||||
endef
|
||||
|
||||
# --- Local Changes ---
|
||||
|
||||
# Filter out -g
|
||||
CFLAGS := $(filter-out -g,$(CFLAGS))
|
||||
CXXFLAGS := $(filter-out -g,$(CXXFLAGS))
|
||||
|
||||
clean::
|
||||
$(RM) *.pdb
|
||||
|
||||
# --- Required rule definitions ---
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call compile,src,includes,xflags)
|
||||
define compile
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD -TP -GR $(CPPFLAGS) $(CXXFLAGS) $(3) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -Fo$(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2 3
|
||||
# Usage: $(call c_compile,src,includes,xflags)
|
||||
define c_compile
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD $(CPPFLAGS) $(CFLAGS) $(3) \
|
||||
$(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -Fo$(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call libcompile,src,includes)
|
||||
define libcompile
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD -TP -GR $(CPPFLAGS) $(CXXFLAGS) \
|
||||
-DDLL_EXPORT $(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -Fo$(call src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call c_libcompile,src,includes)
|
||||
define c_libcompile
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD $(CPPFLAGS) $(CXXFLAGS) \
|
||||
-DDLL_EXPORT $(foreach I,$(2),-I$(I)) \
|
||||
-c $(1) -Fo$(call c_src_to_obj,$(1))
|
||||
endef
|
||||
|
||||
# 1 2
|
||||
# Usage: $(call makeslib,objs,library)
|
||||
define makeslib
|
||||
lib -nologo -OUT:$(2) $(1)
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5 6 7
|
||||
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
|
||||
define makelib
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD -LD -Fe$(basename $(2))$(shell expr $(5) - $(7)).dll $(1) \
|
||||
-link -SUBSYSTEM:CONSOLE -incremental:no \
|
||||
$(foreach L,$(subst -L,,$(3)),-LIBPATH:$(L)) \
|
||||
$(foreach L,$(subst -l,,$(4)),$(L).lib)
|
||||
if [ -f $(basename $(2))$(shell expr $(5) - $(7)).dll.manifest ]; then \
|
||||
mt.exe -nologo -manifest $(basename $(2))$(shell expr $(5) - $(7)).dll.manifest \
|
||||
-outputresource:$(basename $(2))$(shell expr $(5) - $(7)).dll\;2; \
|
||||
fi
|
||||
mv $(basename $(2))$(shell expr $(5) - $(7)).lib $(2)
|
||||
endef
|
||||
|
||||
# 1 2 3 4 5
|
||||
# Usage: $(call makebin,objs,binary,ldflags,libs,xlinkflags)
|
||||
define makebin
|
||||
cl -nologo -O2 -Zi -Gy -EHsc -MD $(1) \
|
||||
$(if $(5),$(5),$(WINDOWS_MAIN_XLINK_FLAGS)) \
|
||||
-link -SUBSYSTEM:CONSOLE -incremental:no -OUT:$(2) \
|
||||
$(foreach L,$(subst -L,,$(3)),-LIBPATH:$(L)) \
|
||||
$(foreach L,$(subst -l,,$(4)),$(L).lib)
|
||||
if [ -f $(2).manifest ]; then \
|
||||
mt.exe -nologo -manifest $(2).manifest \
|
||||
-outputresource:$(2)\;2; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Install target
|
||||
|
||||
INSTALL_DIR = install-msvc$(WINDOWS_WORDSIZE)
|
||||
include make/installwin.mk
|
||||
install: installwin
|
|
@ -1,10 +0,0 @@
|
|||
THIS=$(notdir $(abspath .))
|
||||
|
||||
all:
|
||||
$(MAKE) -C .. build_$(THIS)
|
||||
|
||||
check:
|
||||
$(MAKE) -C .. check_$(THIS)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C .. clean_$(THIS)
|
|
@ -1,72 +0,0 @@
|
|||
include make/$(BUILDRULES).mk
|
||||
|
||||
define firstelem
|
||||
$(word 1,$(subst /, ,$(1)))
|
||||
endef
|
||||
SPC := $(subst /, ,/)
|
||||
define lastelem
|
||||
$(subst $(SPC),/,$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1))))
|
||||
endef
|
||||
define objbase
|
||||
$(patsubst %.$(2),%.$(3),$(firstelem)/$(OUTPUT_DIR)/$(lastelem))
|
||||
endef
|
||||
|
||||
# Usage: $(call src_to_obj,srcs)
|
||||
define src_to_obj
|
||||
$(foreach F,$(1),$(call objbase,$(F),cc,$(OBJ)))
|
||||
endef
|
||||
|
||||
# Usage: $(call c_src_to_obj,srcs)
|
||||
define c_src_to_obj
|
||||
$(foreach F,$(1),$(call objbase,$(F),c,$(OBJ)))
|
||||
endef
|
||||
|
||||
# Usage: $(call src_to_lobj,srcs)
|
||||
define src_to_lobj
|
||||
$(foreach F,$(1),$(call objbase,$(F),cc,$(LOBJ)))
|
||||
endef
|
||||
|
||||
# Usage: $(call c_src_to_lobj,srcs)
|
||||
define c_src_to_lobj
|
||||
$(foreach F,$(1),$(call objbase,$(F),c,$(LOBJ)))
|
||||
endef
|
||||
|
||||
# Usage: $(call obj_to_dep,objs)
|
||||
define obj_to_dep
|
||||
$(patsubst %.$(OBJ),%.dep,$(1))
|
||||
endef
|
||||
|
||||
# Usage: $(call lobj_to_dep,objs)
|
||||
define lobj_to_dep
|
||||
$(patsubst %.$(LOBJ),%.dep,$(1))
|
||||
endef
|
||||
|
||||
# Usage: $(call depflags,$(basename obj))
|
||||
ifeq ($(GENDEPS),1)
|
||||
depflags=-MD -MF $(1).dep -MP
|
||||
else
|
||||
depflags=
|
||||
endif
|
||||
|
||||
ifeq ($(QTEST_COLOR),1)
|
||||
QTEST_ARGS := -stdout-tty=1
|
||||
else
|
||||
QTEST_ARGS :=
|
||||
endif
|
||||
|
||||
# Usage: $(call run_qtest,dir)
|
||||
define run_qtest
|
||||
@echo running qtest-driver for $(1)
|
||||
@(cd $(1)/$(OUTPUT_DIR); \
|
||||
if TC_SRCS="$(foreach T,$(TC_SRCS_$(1)),../../$(T))" \
|
||||
$(QTEST) $(QTEST_ARGS) -bindirs .:..:../../qpdf/$(OUTPUT_DIR) \
|
||||
-datadir ../qtest -covdir .. \
|
||||
-junit-suffix `basename $(1)`; then \
|
||||
true; \
|
||||
else \
|
||||
if test "$(SHOW_FAILED_TEST_OUTPUT)" = "1"; then \
|
||||
cat -v qtest.log; \
|
||||
fi; \
|
||||
false; \
|
||||
fi)
|
||||
endef
|
|
@ -1,58 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -d external-libs ]; then
|
||||
echo "Please extract qpdf-external-libs-bin.zip and try again"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if echo $PATH | grep -q /mingw64; then
|
||||
wordsize=64
|
||||
else
|
||||
wordsize=32
|
||||
fi
|
||||
|
||||
if [ "$wordsize" = 64 ]; then
|
||||
if [ ! -f win.32 ]; then
|
||||
echo "Waiting for win.32 to appear"
|
||||
while [ ! -f win.32 ]; do
|
||||
sleep 5
|
||||
done
|
||||
fi
|
||||
else
|
||||
rm -f win.32 win.64
|
||||
echo ''
|
||||
echo "You may now start $0 in a 64-bit window."
|
||||
echo ''
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
cwd=`pwd`
|
||||
PATH=$cwd/libqpdf/build:$PATH
|
||||
|
||||
for i in msvc mingw; do
|
||||
rm -rf {install,qtest}-$i$wordsize
|
||||
./config-$i
|
||||
make -j8
|
||||
make -k check || \
|
||||
{ mkdir qtest-$i$wordsize; \
|
||||
tar cf - */build/qtest.log | (cd qtest-$i$wordsize; tar xf -) }
|
||||
make install
|
||||
make distclean
|
||||
done
|
||||
|
||||
touch win.$wordsize
|
||||
|
||||
set +x
|
||||
|
||||
echo "Finished builds for $wordsize."
|
||||
|
||||
if [ "$wordsize" = 32 ]; then
|
||||
echo "If not done already, rerun this in a "`expr 96 - $wordsize`"-bit environment."
|
||||
echo ''
|
||||
else
|
||||
echo 'Running "./make_windows_releases-finish".'
|
||||
echo ''
|
||||
./make_windows_releases-finish
|
||||
fi
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ ! -d external-libs ]; then
|
||||
echo "Please extract qpdf-external-libs-bin.zip and try again"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Waiting for win.32 and win.64"
|
||||
while [ ! -f win.32 ] || [ ! -f win.64 ]; do sleep 1; done
|
||||
|
||||
set -e
|
||||
set -x
|
||||
cwd=`pwd`
|
||||
PATH=$cwd/libqpdf/build:$PATH
|
||||
|
||||
cd install-mingw32
|
||||
v=`ls -d qpdf-*`
|
||||
cd ..
|
||||
|
||||
for i in mingw32 mingw64 msvc32 msvc64; do
|
||||
cp -p README-windows-install.txt install-$i/$v/README.txt
|
||||
(cd install-$i; zip -r ../$v-bin-$i.zip $v)
|
||||
done
|
||||
|
||||
set +x
|
||||
|
||||
echo ""
|
||||
echo "$v-bin-mingw{32,64}.zip and $v-bin-msvc{32,64}.zip have been created."
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
|
@ -1,61 +0,0 @@
|
|||
DOC_OUT := manual/$(OUTPUT_DIR)
|
||||
S_HTML_OUT := $(DOC_OUT)/singlehtml
|
||||
S_HTML_TARGET := $(S_HTML_OUT)/index.html
|
||||
HTML_OUT := $(DOC_OUT)/html
|
||||
HTML_TARGET := $(HTML_OUT)/index.html
|
||||
PDF_OUT := $(DOC_OUT)/latex
|
||||
PDF_TARGET := $(PDF_OUT)/qpdf.pdf
|
||||
|
||||
TARGETS_manual := \
|
||||
$(DOC_OUT)/qpdf.1 \
|
||||
$(DOC_OUT)/fix-qdf.1 \
|
||||
$(DOC_OUT)/zlib-flate.1
|
||||
ifeq ($(BUILD_HTML),1)
|
||||
TARGETS_manual += $(HTML_TARGET) $(S_HTML_TARGET)
|
||||
endif
|
||||
ifeq ($(BUILD_PDF),1)
|
||||
TARGETS_manual += $(PDF_TARGET)
|
||||
endif
|
||||
|
||||
MANUAL_DEPS = $(wildcard manual/*.rst) manual/conf.py manual/_ext/qpdf.py
|
||||
|
||||
# Prevent targets that run $(SPHINX) from running in parallel by using
|
||||
# order-only dependencies (the dependencies listed after the |) to
|
||||
# avoid clashes in temporary files that cause the build to fail with
|
||||
# the error "_pickle.UnpicklingError: pickle data was truncated"
|
||||
$(HTML_TARGET): $(MANUAL_DEPS)
|
||||
$(SPHINX) -M html manual $(DOC_OUT) -W
|
||||
|
||||
$(S_HTML_TARGET): $(MANUAL_DEPS) | $(HTML_TARGET)
|
||||
$(SPHINX) -M singlehtml manual $(DOC_OUT) -W
|
||||
|
||||
$(PDF_TARGET): $(MANUAL_DEPS) | $(S_HTML_TARGET) $(HTML_TARGET)
|
||||
$(SPHINX) -M latexpdf manual $(DOC_OUT) -W
|
||||
|
||||
$(DOC_OUT)/%.1: manual/%.1.in
|
||||
sed -e 's:@PACKAGE_VERSION@:$(PACKAGE_VERSION):g' < $< > $@
|
||||
|
||||
# The doc-dist target must not removed $(DOC_DEST) so that it works to
|
||||
# do stuff like make doc-dist DOC_DEST=$(DESTDIR)/$(docdir). Make sure
|
||||
# what this does is consistent with ../README-doc.txt and the
|
||||
# information in the manual and ../README.md.
|
||||
.PHONY: doc-dist
|
||||
doc-dist: build_manual
|
||||
@if test x"$(DOC_DEST)" = x; then \
|
||||
echo DOC_DEST must be set 1>& 2; \
|
||||
false; \
|
||||
fi
|
||||
if test -d $(DOC_DEST); then \
|
||||
$(RM) -rf $(DOC_DEST)/*html $(DOC_DEST)/*.pdf; \
|
||||
else \
|
||||
mkdir -p $(DOC_DEST); \
|
||||
fi
|
||||
if [ -d $(DOC_OUT)/html ]; then \
|
||||
cp -r $(DOC_OUT)/html $(DOC_DEST); \
|
||||
fi
|
||||
if [ -d $(DOC_OUT)/singlehtml ]; then \
|
||||
cp -r $(DOC_OUT)/singlehtml $(DOC_DEST); \
|
||||
fi
|
||||
if [ -f $(PDF_TARGET) ]; then \
|
||||
cp $(PDF_TARGET) $(DOC_DEST)/qpdf-manual.pdf; \
|
||||
fi
|
162
mkinstalldirs
162
mkinstalldirs
|
@ -1,162 +0,0 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
|
@ -1,59 +0,0 @@
|
|||
BINS_qpdf = \
|
||||
qpdf \
|
||||
fix-qdf \
|
||||
pdf_from_scratch \
|
||||
test_driver \
|
||||
test_large_file \
|
||||
test_parsedoffset \
|
||||
test_pdf_doc_encoding \
|
||||
test_pdf_unicode \
|
||||
test_renumber \
|
||||
test_shell_glob \
|
||||
test_tokenizer \
|
||||
test_unicode_filenames \
|
||||
test_xref
|
||||
CBINS_qpdf = \
|
||||
qpdf-ctest \
|
||||
qpdfjob-ctest
|
||||
|
||||
TARGETS_qpdf = $(foreach B,$(BINS_qpdf) $(CBINS_qpdf),qpdf/$(OUTPUT_DIR)/$(call binname,$(B)))
|
||||
|
||||
$(TARGETS_qpdf): $(TARGETS_libqpdf)
|
||||
|
||||
INCLUDES_qpdf = include
|
||||
|
||||
TC_SRCS_qpdf = $(wildcard libqpdf/*.cc) $(wildcard qpdf/*.cc)
|
||||
|
||||
# -----
|
||||
|
||||
XCFLAGS_qpdf_qpdf-ctest := -Ilibqpdf
|
||||
|
||||
define use_wmain
|
||||
XCXXFLAGS_qpdf_$(1) := $(WINDOWS_WMAIN_COMPILE)
|
||||
XLDFLAGS_qpdf_$(1) := $(WINDOWS_WMAIN_LINK)
|
||||
XLINK_FLAGS_qpdf_$(1) := $(WINDOWS_WMAIN_XLINK_FLAGS)
|
||||
endef
|
||||
|
||||
$(foreach B,qpdf test_unicode_filenames fix-qdf test_shell_glob,\
|
||||
$(eval $(call use_wmain,$(B))))
|
||||
|
||||
$(foreach B,$(BINS_qpdf),$(eval \
|
||||
OBJS_$(B) = $(call src_to_obj,qpdf/$(B).cc)))
|
||||
$(foreach B,$(CBINS_qpdf),$(eval \
|
||||
OBJS_$(B) = $(call c_src_to_obj,qpdf/$(B).c)))
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(foreach B,$(BINS_qpdf) $(CBINS_qpdf),$(call obj_to_dep,$(OBJS_$(B))))
|
||||
endif
|
||||
|
||||
$(foreach B,$(BINS_qpdf),$(eval \
|
||||
$(OBJS_$(B)): qpdf/$(OUTPUT_DIR)/%.$(OBJ): qpdf/$(B).cc ; \
|
||||
$(call compile,qpdf/$(B).cc,$(INCLUDES_qpdf),$(XCXXFLAGS_qpdf_$(B)))))
|
||||
|
||||
$(foreach B,$(CBINS_qpdf),$(eval \
|
||||
$(OBJS_$(B)): qpdf/$(OUTPUT_DIR)/%.$(OBJ): qpdf/$(B).c ; \
|
||||
$(call c_compile,qpdf/$(B).c,$(INCLUDES_qpdf),$(XCFLAGS_qpdf_$(B)))))
|
||||
|
||||
$(foreach B,$(BINS_qpdf) $(CBINS_qpdf),$(eval \
|
||||
qpdf/$(OUTPUT_DIR)/$(call binname,$(B)): $(OBJS_$(B)) ; \
|
||||
$(call makebin,$(OBJS_$(B)),$$@,$(LDFLAGS_libqpdf) $(LDFLAGS) $(XLDFLAGS_qpdf_$(B)),$(LIBS_libqpdf) $(LIBS),$(XLINK_FLAGS_qpdf_$(B)))))
|
|
@ -1,653 +0,0 @@
|
|||
ignored-scope: libtests
|
||||
QPDF err expected endobj 0
|
||||
QPDF err wrong objid/generation 0
|
||||
QPDF check objid 1
|
||||
QPDF check generation 1
|
||||
QPDF check obj 1
|
||||
QPDF hint table length indirect 0
|
||||
QPDF hint table length direct 0
|
||||
QPDF P absent in lindict 0
|
||||
QPDF P present in lindict 0
|
||||
QPDF expected n n obj 0
|
||||
QPDF /L mismatch 0
|
||||
QPDF err /T mismatch 0
|
||||
QPDF err /O mismatch 0
|
||||
QPDF opt direct pages resource 1
|
||||
QPDF opt inheritable keys 0
|
||||
QPDF opt no inheritable keys 0
|
||||
QPDF opt erase empty key ancestor 0
|
||||
QPDF opt resource inherited 0
|
||||
QPDF opt page resource hides ancestor 0
|
||||
QPDF opt key ancestors depth > 1 0
|
||||
QPDF opt loop detected 0
|
||||
QPDF categorize pagemode present 1
|
||||
QPDF categorize pagemode outlines 1
|
||||
QPDF warn /E mismatch 0
|
||||
QPDF lin outlines in part 1
|
||||
QPDF lin nshared_total > nshared_first_page 1
|
||||
QPDF lin part 8 empty 1
|
||||
QPDF lin check shared past first page 0
|
||||
main QTest implicit 0
|
||||
main QTest indirect 1
|
||||
main QTest null 0
|
||||
main QTest bool 1
|
||||
main QTest int 0
|
||||
main QTest real 0
|
||||
main QTest name 0
|
||||
main QTest string 0
|
||||
main QTest array 0
|
||||
main QTest array indirect 1
|
||||
main QTest dictionary 0
|
||||
main QTest dictionary indirect 1
|
||||
main QTest stream 0
|
||||
QPDFWriter write to stdout 0
|
||||
QPDFWriter write to file 0
|
||||
QPDF lin write nshared_total > nshared_first_page 1
|
||||
QPDFWriter encrypted hint stream 0
|
||||
QPDF opt inherited scalar 0
|
||||
QPDF xref reused object 0
|
||||
QPDF xref gen > 0 1
|
||||
QPDF xref size mismatch 0
|
||||
QPDF not a pdf file 0
|
||||
QPDF can't find startxref 0
|
||||
QPDF invalid xref 0
|
||||
QPDF invalid xref entry 0
|
||||
QPDF missing trailer 0
|
||||
QPDF trailer lacks size 0
|
||||
QPDF trailer size not integer 0
|
||||
QPDF trailer prev not integer 0
|
||||
QPDFObjectHandle bad brace 0
|
||||
QPDFObjectHandle bad array close 0
|
||||
QPDF stream without length 0
|
||||
QPDF stream length not integer 0
|
||||
QPDF missing endstream 0
|
||||
QPDFObjectHandle bad dictionary close 0
|
||||
QPDF can't find xref 0
|
||||
QPDFTokenizer bad ) 0
|
||||
QPDFTokenizer bad > 0
|
||||
QPDFTokenizer bad hexstring character 0
|
||||
QPDFTokenizer null in name 0
|
||||
QPDFTokenizer bad name 0
|
||||
QPDF_Stream invalid filter 0
|
||||
QPDF UseOutlines but no Outlines 0
|
||||
QPDFObjectHandle clone bool 0
|
||||
QPDFObjectHandle clone null 0
|
||||
QPDFObjectHandle clone integer 0
|
||||
QPDFObjectHandle clone real 0
|
||||
QPDFObjectHandle clone name 0
|
||||
QPDFObjectHandle clone string 0
|
||||
QPDFObjectHandle clone array 0
|
||||
QPDFObjectHandle clone dictionary 0
|
||||
QPDFObjectHandle makeDirect loop 0
|
||||
QPDFObjectHandle copy stream 1
|
||||
QPDF default for xref stream field 0 0
|
||||
QPDF prev key in xref stream dictionary 0
|
||||
QPDF prev key in trailer dictionary 0
|
||||
QPDF found xref stream 0
|
||||
QPDF ignoring XRefStm in trailer 0
|
||||
QPDF xref deleted object 0
|
||||
SF_FlateLzwDecode PNG filter 0
|
||||
QPDF xref /Index is null 0
|
||||
QPDF xref /Index is array 1
|
||||
QPDFWriter copy Extends 0
|
||||
QPDFWriter encrypt object stream 0
|
||||
QPDFWriter uncompressing page dictionary 0
|
||||
QPDFWriter uncompressing root 0
|
||||
QPDFWriter compressing uncompressed stream 0
|
||||
QPDF exclude indirect length 0
|
||||
QPDFWriter generate >1 ostream 0
|
||||
QPDF exclude encryption dictionary 0
|
||||
QPDF loop detected traversing objects 0
|
||||
QPDF reconstructed xref table 0
|
||||
QPDF recovered in readObjectAtOffset 0
|
||||
QPDF recovered stream length 0
|
||||
QPDF found wrong endstream in recovery 0
|
||||
QPDF_Stream pipeStreamData with null pipeline 0
|
||||
QPDFWriter not recompressing /FlateDecode 0
|
||||
QPDF_encryption xref stream from encrypted file 0
|
||||
QPDFJob unable to filter 0
|
||||
QUtil non-trivial UTF-16 0
|
||||
QPDF xref overwrite object 0
|
||||
QPDF decoding error warning 0
|
||||
qpdf-c called qpdf_init 0
|
||||
qpdf-c called qpdf_cleanup 0
|
||||
qpdf-c called qpdf_more_warnings 0
|
||||
qpdf-c qpdf_get_error returned error 0
|
||||
qpdf-c qpdf_next_warning returned warning 0
|
||||
qpdf-c called qpdf_set_suppress_warnings 0
|
||||
qpdf-c called qpdf_set_ignore_xref_streams 0
|
||||
qpdf-c called qpdf_set_attempt_recovery 0
|
||||
qpdf-c called qpdf_read 2
|
||||
qpdf-c called qpdf_get_pdf_version 0
|
||||
qpdf-c called qpdf_get_user_password 0
|
||||
qpdf-c called qpdf_is_linearized 0
|
||||
qpdf-c called qpdf_is_encrypted 0
|
||||
qpdf-c called qpdf_init_write 3
|
||||
qpdf-c called qpdf_set_object_stream_mode 0
|
||||
qpdf-c called qpdf_set_stream_data_mode 0
|
||||
qpdf-c called qpdf_set_content_normalization 0
|
||||
qpdf-c called qpdf_set_qdf_mode 0
|
||||
qpdf-c called qpdf_set_static_ID 0
|
||||
qpdf-c called qpdf_set_suppress_original_object_IDs 0
|
||||
qpdf-c called qpdf_set_preserve_encryption 0
|
||||
qpdf-c called qpdf_set_r2_encryption_parameters 0
|
||||
qpdf-c called qpdf_set_r3_encryption_parameters 0
|
||||
qpdf-c called qpdf_set_linearization 0
|
||||
qpdf-c called qpdf_write 1
|
||||
qpdf-c called qpdf_allow_accessibility 0
|
||||
qpdf-c called qpdf_allow_extract_all 0
|
||||
qpdf-c called qpdf_allow_print_low_res 0
|
||||
qpdf-c called qpdf_allow_print_high_res 0
|
||||
qpdf-c called qpdf_allow_modify_assembly 0
|
||||
qpdf-c called qpdf_allow_modify_form 0
|
||||
qpdf-c called qpdf_allow_modify_annotation 0
|
||||
qpdf-c called qpdf_allow_modify_other 0
|
||||
qpdf-c called qpdf_allow_modify_all 0
|
||||
QPDFWriter increasing minimum version 1
|
||||
QPDFWriter using forced PDF version 0
|
||||
qpdf-c called qpdf_set_minimum_pdf_version 0
|
||||
qpdf-c called qpdf_force_pdf_version 0
|
||||
qpdf-c called qpdf_init_write multiple times 0
|
||||
QPDF_encryption rc4 decode string 0
|
||||
QPDF_encryption rc4 decode stream 0
|
||||
QPDFWriter not compressing metadata 0
|
||||
QPDF_encryption CFM V2 0
|
||||
QPDF_encryption CFM AESV2 0
|
||||
QPDF_encryption aes decode string 0
|
||||
QPDF_encryption cleartext metadata 0
|
||||
QPDF_encryption aes decode stream 0
|
||||
QPDFWriter forcing object stream disable 0
|
||||
QPDFWriter forced version disabled encryption 0
|
||||
qpdf-c called qpdf_set_r4_encryption_parameters 0
|
||||
qpdf-c called qpdf_set_static_aes_IV 0
|
||||
QPDF_encryption stream crypt filter 0
|
||||
QPDF ERR object stream with wrong type 0
|
||||
QPDF object gone after xref reconstruction 0
|
||||
qpdf-c called qpdf_has_error 0
|
||||
qpdf-c called qpdf_get_qpdf_version 0
|
||||
QPDF_Stream pipe original stream data 0
|
||||
QPDF_Stream pipe replaced stream data 0
|
||||
QPDF_Stream pipe use stream provider 0
|
||||
QPDF_Stream provider length mismatch 0
|
||||
QPDFObjectHandle newStream 0
|
||||
QPDFObjectHandle newStream with data 0
|
||||
QPDF_Stream pipe no stream data 0
|
||||
QPDFObjectHandle prepend page contents 0
|
||||
QPDFObjectHandle append page contents 0
|
||||
QPDF_Stream getRawStreamData 0
|
||||
QPDF_Stream getStreamData 0
|
||||
QPDF_Stream expand filter abbreviation 0
|
||||
qpdf-c called qpdf_read_memory 0
|
||||
QPDF stream without newline 0
|
||||
QPDF stream with CR only 0
|
||||
QPDF stream with CRNL 0
|
||||
QPDF stream with NL only 0
|
||||
QPDF replaceObject called with indirect object 0
|
||||
QPDFWriter copy encrypt metadata 1
|
||||
qpdf-c get_info_key 1
|
||||
qpdf-c set_info_key to value 0
|
||||
qpdf-c set_info_key to null 0
|
||||
qpdf-c set-info-key use existing info 0
|
||||
qpdf-c add info to trailer 0
|
||||
qpdf-c called qpdf_init_write_memory 0
|
||||
exercise processFile(name) 0
|
||||
exercise processFile(FILE*) 0
|
||||
exercise processMemoryFile 0
|
||||
QPDF remove page 2
|
||||
QPDF insert page 2
|
||||
QPDF updateAllPagesCache 0
|
||||
QPDF insert non-indirect page 0
|
||||
QPDF insert indirect page 0
|
||||
QPDFObjectHandle ERR shallow copy stream 0
|
||||
QPDFObjectHandle shallow copy array 0
|
||||
QPDFObjectHandle shallow copy dictionary 0
|
||||
QPDFObjectHandle shallow copy scalar 0
|
||||
QPDFObjectHandle newStream with string 0
|
||||
QPDF unknown key not inherited 0
|
||||
QPDF_Stream provider length not provided 0
|
||||
QPDF_Stream unknown stream length 0
|
||||
QPDF replaceReserved 0
|
||||
QPDF copyForeign direct 0
|
||||
QPDF copyForeign not foreign 0
|
||||
QPDF copy indirect 0
|
||||
QPDF loop reserving objects 0
|
||||
QPDF replace indirect 0
|
||||
QPDF replace array 0
|
||||
QPDF replace dictionary 0
|
||||
QPDF replace stream 0
|
||||
QPDF reserve array 0
|
||||
QPDF reserve dictionary 0
|
||||
QPDF reserve stream 0
|
||||
QPDF not crossing page boundary 0
|
||||
QPDF replace foreign indirect with null 0
|
||||
QPDF not copying pages object 0
|
||||
QPDF insert foreign page 0
|
||||
QPDFWriter foreign object 0
|
||||
QPDFWriter copy use_aes 1
|
||||
QPDFObjectHandle indirect without context 0
|
||||
QPDFObjectHandle trailing data in parse 0
|
||||
QPDFJob pages encryption password 0
|
||||
QPDFTokenizer EOF reading token 0
|
||||
QPDFTokenizer EOF reading appendable token 0
|
||||
QPDFWriter extra header text no newline 0
|
||||
QPDFWriter extra header text add newline 0
|
||||
QPDF bogus 0 offset 0
|
||||
QPDF global offset 0
|
||||
QPDFWriter copy V5 0
|
||||
QPDFWriter increasing extension level 0
|
||||
QPDFWriter make Extensions direct 0
|
||||
QPDFWriter make ADBE direct 1
|
||||
QPDFWriter preserve Extensions 0
|
||||
QPDFWriter create Extensions 1
|
||||
QPDFWriter remove ADBE 0
|
||||
QPDFWriter remove existing Extensions 0
|
||||
QPDFWriter preserve ADBE 0
|
||||
QPDF_encryption skip 0x28 0
|
||||
QPDF_encrypt crypt array 0
|
||||
QPDF_encryption CFM AESV3 0
|
||||
QPDFWriter remove Crypt 0
|
||||
qpdf-c called qpdf_get_pdf_extension_level 0
|
||||
qpdf-c called qpdf_set_r5_encryption_parameters 0
|
||||
qpdf-c called qpdf_set_r6_encryption_parameters 0
|
||||
QPDFObjectHandle EOF in inline image 0
|
||||
QPDFObjectHandle inline image token 0
|
||||
QPDF not caching overridden objstm object 0
|
||||
QPDFWriter original obj non-zero gen 0
|
||||
QPDF_optimization indirect outlines 0
|
||||
QPDF xref space 2
|
||||
QPDFJob pages range omitted at end 1
|
||||
QPDFJob pages range omitted in middle 0
|
||||
QPDFJob npages 0
|
||||
QPDF already reserved object 0
|
||||
QPDFWriter standard deterministic ID 1
|
||||
QPDFWriter linearized deterministic ID 1
|
||||
QPDFWriter deterministic with no data 0
|
||||
qpdf-c called qpdf_set_deterministic_ID 0
|
||||
QPDFObjectHandle indirect with 0 objid 0
|
||||
QPDF object id 0 0
|
||||
QPDF recursion loop in resolve 0
|
||||
QPDFObjectHandle treat word as string 0
|
||||
QPDFObjectHandle found fake 1
|
||||
QPDFObjectHandle no val for last key 0
|
||||
QPDF resolve failure to null 0
|
||||
QPDFWriter preserve unreferenced standard 0
|
||||
QPDFObjectHandle errors in parsecontent 0
|
||||
QPDFJob same file error 0
|
||||
QPDFJob split-pages %d 0
|
||||
QPDFJob split-pages .pdf 0
|
||||
QPDFJob split-pages other 0
|
||||
QPDFTokenizer allowing bad token 0
|
||||
QPDF ignore first space in xref entry 0
|
||||
QPDF ignore first extra space in xref entry 0
|
||||
QPDF ignore second extra space in xref entry 0
|
||||
QPDF ignore length error xref entry 0
|
||||
QPDF_encryption pad short parameter 0
|
||||
QPDFWriter ignore self-referential object stream 0
|
||||
QPDFObjectHandle found old angle 1
|
||||
QPDF_Stream special filters 3
|
||||
QPDFTokenizer block long token 0
|
||||
qpdf-c called qpdf_set_decode_level 0
|
||||
qpdf-c called qpdf_set_compress_streams 0
|
||||
qpdf-c called qpdf_set_preserve_unreferenced_objects 0
|
||||
qpdf-c called qpdf_set_newline_before_endstream 0
|
||||
SF_FlateLzwDecode TIFF predictor 0
|
||||
QPDFTokenizer inline image at EOF 0
|
||||
Pl_QPDFTokenizer found ID 0
|
||||
QPDFObjectHandle non-stream in stream array 0
|
||||
QPDFObjectHandle coalesce called on stream 0
|
||||
QPDFObjectHandle coalesce provide stream data 0
|
||||
QPDF_Stream bad token at end during normalize 0
|
||||
QPDFObjectHandle bad token in parse 0
|
||||
QPDFObjectHandle eof in parseInternal 0
|
||||
QPDFObjectHandle array bounds 0
|
||||
QPDFObjectHandle boolean returning false 0
|
||||
QPDFObjectHandle integer returning 0 0
|
||||
QPDFObjectHandle real returning 0.0 0
|
||||
QPDFObjectHandle name returning dummy name 0
|
||||
QPDFObjectHandle string returning empty string 0
|
||||
QPDFObjectHandle string returning empty utf8 0
|
||||
QPDFObjectHandle operator returning fake value 0
|
||||
QPDFObjectHandle inlineimage returning empty data 0
|
||||
QPDFObjectHandle array treating as empty 0
|
||||
QPDFObjectHandle array null for non-array 0
|
||||
QPDFObjectHandle array treating as empty vector 0
|
||||
QPDFObjectHandle array ignoring set item 0
|
||||
QPDFObjectHandle array ignoring replace items 0
|
||||
QPDFObjectHandle array ignoring insert item 0
|
||||
QPDFObjectHandle array ignoring append item 0
|
||||
QPDFObjectHandle array ignoring erase item 0
|
||||
QPDFObjectHandle dictionary false for hasKey 0
|
||||
QPDFObjectHandle dictionary null for getKey 0
|
||||
QPDFObjectHandle dictionary empty set for getKeys 0
|
||||
QPDFObjectHandle dictionary empty map for asMap 0
|
||||
QPDFObjectHandle dictionary ignoring replaceKey 0
|
||||
QPDFObjectHandle dictionary ignoring removeKey 0
|
||||
QPDFObjectHandle dictionary ignoring removereplace 0
|
||||
QPDFObjectHandle numeric non-numeric 0
|
||||
QPDFObjectHandle erase array bounds 0
|
||||
qpdf-c called qpdf_check_pdf 0
|
||||
QPDF xref loop 0
|
||||
QPDFObjectHandle too deep 0
|
||||
QPDFFormFieldObjectHelper non-trivial inheritance 0
|
||||
QPDFFormFieldObjectHelper non-trivial qualified name 0
|
||||
QPDFFormFieldObjectHelper TU present 0
|
||||
QPDFFormFieldObjectHelper TM present 0
|
||||
QPDFFormFieldObjectHelper TU absent 0
|
||||
QPDFFormFieldObjectHelper TM absent 0
|
||||
QPDFFormFieldObjectHelper Q present 1
|
||||
QPDFFormFieldObjectHelper DA present 1
|
||||
QPDFAnnotationObjectHelper AS present 0
|
||||
QPDFAnnotationObjectHelper AS absent 0
|
||||
QPDFAnnotationObjectHelper AP stream 0
|
||||
QPDFAnnotationObjectHelper AP dictionary 0
|
||||
QPDFAnnotationObjectHelper AP sub stream 0
|
||||
QPDFAnnotationObjectHelper AP null 0
|
||||
QPDFAcroFormDocumentHelper fields not array 0
|
||||
QPDFAcroFormDocumentHelper orphaned widget 0
|
||||
QPDFAcroFormDocumentHelper direct field 0
|
||||
QPDFAcroFormDocumentHelper non-dictionary field 0
|
||||
QPDFAcroFormDocumentHelper loop 0
|
||||
QPDFAcroFormDocumentHelper field found 1
|
||||
QPDFAcroFormDocumentHelper annotation found 1
|
||||
QPDFJob keep files open n 0
|
||||
QPDFJob keep files open y 0
|
||||
QPDFJob automatically set keep files open 1
|
||||
QPDFPageLabelDocumentHelper skip first 0
|
||||
QPDFOutlineObjectHelper direct dest 0
|
||||
QPDFOutlineObjectHelper action dest 0
|
||||
QPDFOutlineObjectHelper named dest 0
|
||||
QPDFOutlineDocumentHelper name named dest 0
|
||||
QPDFOutlineDocumentHelper string named dest 0
|
||||
QPDFOutlineObjectHelper loop 0
|
||||
QPDFObjectHandle merge top type mismatch 0
|
||||
QPDFObjectHandle merge shallow copy 0
|
||||
QPDFObjectHandle merge array 0
|
||||
QPDFObjectHandle merge array dup 0
|
||||
QPDFObjectHandle merge copy from other 0
|
||||
QPDFAnnotationObjectHelper explicit matrix 0
|
||||
QPDFAnnotationObjectHelper default matrix 0
|
||||
QPDFAnnotationObjectHelper rotate 90 0
|
||||
QPDFAnnotationObjectHelper rotate 180 0
|
||||
QPDFAnnotationObjectHelper rotate 270 0
|
||||
QPDFPageDocumentHelper skip widget need appearances 0
|
||||
QPDFPageDocumentHelper merge DR 0
|
||||
QPDFPageDocumentHelper non-widget annotation 0
|
||||
QPDFPageDocumentHelper remove annots 0
|
||||
QPDFPageDocumentHelper replace indirect annots 0
|
||||
QPDFPageDocumentHelper replace direct annots 0
|
||||
QPDFObjectHandle replace with copy 0
|
||||
QPDFPageDocumentHelper indirect as resources 0
|
||||
QPDFAnnotationObjectHelper forbidden flags 0
|
||||
QPDFAnnotationObjectHelper missing required flags 0
|
||||
QPDFFormFieldObjectHelper set parent radio button 0
|
||||
QPDFFormFieldObjectHelper radio button grandkid 0
|
||||
QPDFFormFieldObjectHelper turn on radio button 0
|
||||
QPDFFormFieldObjectHelper turn off radio button 0
|
||||
QPDFFormFieldObjectHelper checkbox kid widget 0
|
||||
QPDFObjectHandle broken radio button 0
|
||||
QPDFFormFieldObjectHelper set checkbox AS 0
|
||||
QPDFObjectHandle broken checkbox 0
|
||||
QPDFFormFieldObjectHelper list not found 0
|
||||
QPDFFormFieldObjectHelper list found 0
|
||||
QPDFFormFieldObjectHelper list first too low 0
|
||||
QPDFFormFieldObjectHelper list last too high 0
|
||||
QPDF detected dangling ref 0
|
||||
QPDFJob image optimize no pipeline 0
|
||||
QPDFJob image optimize no shrink 0
|
||||
QPDFJob image optimize too small 0
|
||||
QPDFFormFieldObjectHelper WinAnsi 0
|
||||
QPDF pipe foreign encrypted stream 0
|
||||
QPDF copy foreign stream with provider 0
|
||||
QPDF copy foreign stream with buffer 0
|
||||
QPDF immediate copy stream data 0
|
||||
QPDFJob copy same page more than once 1
|
||||
QPDFPageObjectHelper bad token finding names 0
|
||||
QPDFJob password mode bytes 0
|
||||
QPDFJob password mode hex-bytes 0
|
||||
QPDFJob password not unicode 0
|
||||
QPDFJob password not encodable 0
|
||||
QPDFJob auto-encode password 0
|
||||
QPDFJob bytes fallback warning 0
|
||||
QPDFJob invalid utf-8 in auto 0
|
||||
QPDFJob input password hex-bytes 0
|
||||
QPDFPageDocumentHelper ignore annotation with no appearance 0
|
||||
QPDFFormFieldObjectHelper create AS from scratch 0
|
||||
QPDFFormFieldObjectHelper create AP from scratch 0
|
||||
QPDFFormFieldObjectHelper replaced BMC at EOF 0
|
||||
QPDFFormFieldObjectHelper fallback Tf 0
|
||||
QPDFPageObjectHelper non-trivial inheritance 0
|
||||
QPDFPageObjectHelper copy shared attribute 1
|
||||
QPDFJob from_nr from repeat_nr 0
|
||||
QPDF resolve duplicated page object 0
|
||||
QPDF handle direct page object 0
|
||||
QPDFTokenizer finder found wrong word 0
|
||||
QPDFTokenizer found EI by byte count 0
|
||||
QPDFTokenizer found EI after more than one try 0
|
||||
QPDFPageObjectHelper externalize inline image 0
|
||||
QPDFPageObjectHelper keep inline image 0
|
||||
QPDFJob image optimize colorspace 0
|
||||
QPDFJob image optimize bits per component 0
|
||||
QPDFWriter remove empty DecodeParms 0
|
||||
QPDFObjectHandle uint returning 0 0
|
||||
QPDFObjectHandle int returning INT_MIN 0
|
||||
QPDFObjectHandle int returning INT_MAX 0
|
||||
QPDFObjectHandle uint returning UINT_MAX 0
|
||||
QPDFObjectHandle uint uint returning 0 0
|
||||
QPDF xref skipped space 0
|
||||
QPDF eof skipping spaces before xref 1
|
||||
QPDF_encryption user matches owner V < 5 0
|
||||
QPDF_encryption same password 1
|
||||
QPDFWriter stream in ostream 0
|
||||
QPDFObjectHandle duplicate dict key 0
|
||||
QPDFWriter no encryption sig contents 0
|
||||
QPDFPageObjectHelper colorspace lookup 0
|
||||
QPDFWriter ignore XRef in qdf mode 0
|
||||
QPDFPageObjectHelper filter form xobject 0
|
||||
QPDFJob found resources in non-leaf 0
|
||||
QPDFJob found shared resources in leaf 0
|
||||
QPDFJob found shared xobject in leaf 0
|
||||
QPDF copy foreign with data 1
|
||||
QPDF copy foreign with foreign_stream 1
|
||||
QPDFObjectHandle need_newline 1
|
||||
QPDFJob pages range omitted with . 0
|
||||
qpdf-c invalid object handle 0
|
||||
qpdf-c called qpdf_oh_release 0
|
||||
qpdf-c called qpdf_oh_release_all 0
|
||||
qpdf-c called qpdf_new_object 0
|
||||
qpdf-c called qpdf_get_trailer 0
|
||||
qpdf-c called qpdf_get_root 0
|
||||
qpdf-c called qpdf_oh_is_bool 0
|
||||
qpdf-c called qpdf_oh_is_null 0
|
||||
qpdf-c called qpdf_oh_is_integer 0
|
||||
qpdf-c called qpdf_oh_is_real 0
|
||||
qpdf-c called qpdf_oh_is_name 0
|
||||
qpdf-c called qpdf_oh_is_string 0
|
||||
qpdf-c called qpdf_oh_is_operator 0
|
||||
qpdf-c called qpdf_oh_is_inline_image 0
|
||||
qpdf-c called qpdf_oh_is_array 0
|
||||
qpdf-c called qpdf_oh_is_dictionary 0
|
||||
qpdf-c called qpdf_oh_is_stream 0
|
||||
qpdf-c called qpdf_oh_is_indirect 0
|
||||
qpdf-c called qpdf_oh_is_scalar 0
|
||||
qpdf-c called qpdf_oh_is_name_and_equals 0
|
||||
qpdf-c called qpdf_oh_is_dictionary_of_type 0
|
||||
qpdf-c called qpdf_oh_get_type_code 0
|
||||
qpdf-c called qpdf_oh_get_type_name 0
|
||||
qpdf-c array to wrap_in_array 0
|
||||
qpdf-c non-array to wrap_in_array 0
|
||||
qpdf-c called qpdf_oh_parse 0
|
||||
qpdf-c called qpdf_oh_get_bool_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_bool 0
|
||||
qpdf-c called qpdf_oh_get_int_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_longlong 0
|
||||
qpdf-c called qpdf_oh_get_int_value_as_int 0
|
||||
qpdf-c called qpdf_oh_get_value_as_int 0
|
||||
qpdf-c called qpdf_oh_get_uint_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_ulonglong 0
|
||||
qpdf-c called qpdf_oh_get_uint_value_as_uint 0
|
||||
qpdf-c called qpdf_oh_get_value_as_uint 0
|
||||
qpdf-c called qpdf_oh_get_real_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_real 0
|
||||
qpdf-c called qpdf_oh_is_number 0
|
||||
qpdf-c called qpdf_oh_get_value_as_number 0
|
||||
qpdf-c called qpdf_oh_get_numeric_value 0
|
||||
qpdf-c called qpdf_oh_get_name 0
|
||||
qpdf-c called qpdf_oh_get_value_as_name 0
|
||||
qpdf-c called qpdf_oh_get_string_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_string 0
|
||||
qpdf-c called qpdf_oh_get_utf8_value 0
|
||||
qpdf-c called qpdf_oh_get_value_as_utf8 0
|
||||
qpdf-c called qpdf_oh_get_array_n_items 0
|
||||
qpdf-c called qpdf_oh_get_array_item 0
|
||||
qpdf-c called qpdf_oh_begin_dict_key_iter 0
|
||||
qpdf-c called qpdf_oh_dict_more_keys 0
|
||||
qpdf-c called qpdf_oh_dict_next_key 0
|
||||
qpdf-c called qpdf_oh_has_key 0
|
||||
qpdf-c called qpdf_oh_get_key 0
|
||||
qpdf-c called qpdf_oh_get_key_if_dict 0
|
||||
qpdf-c called qpdf_oh_is_or_has_name 0
|
||||
qpdf-c called qpdf_oh_new_null 0
|
||||
qpdf-c called qpdf_oh_new_bool 0
|
||||
qpdf-c called qpdf_oh_new_integer 0
|
||||
qpdf-c called qpdf_oh_new_real_from_string 0
|
||||
qpdf-c called qpdf_oh_new_real_from_double 0
|
||||
qpdf-c called qpdf_oh_new_name 0
|
||||
qpdf-c called qpdf_oh_new_string 0
|
||||
qpdf-c called qpdf_oh_new_unicode_string 0
|
||||
qpdf-c called qpdf_oh_new_array 0
|
||||
qpdf-c called qpdf_oh_new_dictionary 0
|
||||
qpdf-c called qpdf_oh_make_direct 0
|
||||
qpdf-c called qpdf_oh_set_array_item 0
|
||||
qpdf-c called qpdf_oh_insert_item 0
|
||||
qpdf-c called qpdf_oh_append_item 0
|
||||
qpdf-c called qpdf_oh_erase_item 0
|
||||
qpdf-c called qpdf_oh_replace_key 0
|
||||
qpdf-c called qpdf_oh_remove_key 0
|
||||
qpdf-c called qpdf_oh_replace_or_remove_key 0
|
||||
qpdf-c called qpdf_oh_get_dict 0
|
||||
qpdf-c called qpdf_oh_get_object_id 0
|
||||
qpdf-c called qpdf_oh_get_generation 0
|
||||
qpdf-c called qpdf_oh_unparse 0
|
||||
qpdf-c called qpdf_oh_unparse_resolved 0
|
||||
qpdf-c called qpdf_oh_unparse_binary 0
|
||||
QPDFWriter getFilterOnWrite false 0
|
||||
QPDFPageObjectHelper::forEachXObject 3
|
||||
NNTree deepen: invalid node 0
|
||||
NNTree deepen: loop 0
|
||||
NNTree skip invalid kid 0
|
||||
NNTree skip item at end of short items 0
|
||||
NNTree skip invalid key 0
|
||||
NNTree no valid items node in insertFirst 0
|
||||
NNTree deepen found empty 0
|
||||
NNTree insert inserts first 0
|
||||
NNTree insert replaces 0
|
||||
NNTree insert inserts after 0
|
||||
NNTree unable to determine limits 0
|
||||
NNTree warn indirect kid 0
|
||||
NNTree fix indirect kid 0
|
||||
NNTree repair 0
|
||||
NNTree split root + leaf 0
|
||||
NNTree split root + !leaf 0
|
||||
NNTree split kids 0
|
||||
NNTree split items 0
|
||||
NNTree split second half item 0
|
||||
NNTree split parent 0
|
||||
NNTree split second half kid 0
|
||||
NNTree missing limits 0
|
||||
NNTree item is wrong type 0
|
||||
NNTree kid is invalid 0
|
||||
NNTree loop in find 0
|
||||
NNTree -1 in binary search 0
|
||||
NNTree bad node during find 0
|
||||
NNTree node is not a dictionary 0
|
||||
NNTree limits didn't change 0
|
||||
NNTree increment end() 0
|
||||
NNTree insertAfter inserts first 0
|
||||
NNTree remove not found 0
|
||||
NNTree remove reset limits 0
|
||||
NNTree erased last item 0
|
||||
NNTree erased non-last item 0
|
||||
NNTree items is empty after remove 0
|
||||
NNTree erased all items on leaf/root 0
|
||||
NNTree erased first or last kid 0
|
||||
NNTree erased last kid 0
|
||||
NNTree erased non-last kid 0
|
||||
NNTree non-flat tree is empty after remove 0
|
||||
NNTree remove walking up tree 0
|
||||
NNTree erased last item in tree 0
|
||||
NNTree remove limits from root 0
|
||||
QPDFPageObjectHelper unresolved names 0
|
||||
QPDFPageObjectHelper resolving unresolved 0
|
||||
QPDFFileSpecObjectHelper empty compat_name 0
|
||||
QPDFFileSpecObjectHelper non-empty compat_name 0
|
||||
QPDFPageObjectHelper flatten inherit rotate 0
|
||||
QPDFAcroFormDocumentHelper copy annotation 3
|
||||
QPDFAcroFormDocumentHelper field with parent 3
|
||||
QPDFAcroFormDocumentHelper modify ap matrix 0
|
||||
QPDFJob copy form fields in split_pages 0
|
||||
QPDFJob keep some fields in pages 0
|
||||
QPDFJob pages keeping field from original 0
|
||||
QPDFJob no more fields in pages 0
|
||||
QPDFObjectHandle merge reuse 0
|
||||
QPDFObjectHandle merge generate 0
|
||||
QPDFFormFieldObjectHelper get font from /DR 0
|
||||
QPDFAcroFormDocumentHelper override da 0
|
||||
QPDFAcroFormDocumentHelper override q 0
|
||||
QPDFAcroFormDocumentHelper replaced DA token 0
|
||||
QPDFAcroFormDocumentHelper ap conflict 0
|
||||
QPDFAcroFormDocumentHelper ap rename 0
|
||||
QPDFAcroFormDocumentHelper /DA parse error 0
|
||||
QPDFAcroFormDocumentHelper AP parse error 0
|
||||
QPDFJob copy fields not this file 0
|
||||
QPDFJob copy fields non-first from orig 0
|
||||
QPDF resolve duplicated page in insert 0
|
||||
QPDFWriter preserve object streams 1
|
||||
QPDFWriter exclude from object stream 0
|
||||
QPDF_pages findPage not found 0
|
||||
QPDFJob overlay page with no resources 0
|
||||
QPDFObjectHandle check ownership 0
|
||||
QPDFJob weak crypto warning 0
|
||||
qpdf-c called qpdf_oh_is_initialized 0
|
||||
qpdf-c registered progress reporter 0
|
||||
qpdf-c called qpdf_oh_new_uninitialized 0
|
||||
qpdf-c warn about oh error 1
|
||||
qpdf-c cleanup warned about unhandled error 0
|
||||
qpdf-c called qpdf_get_object_by_id 0
|
||||
qpdf-c called qpdf_replace_object 0
|
||||
qpdf-c called qpdf_num_pages 0
|
||||
qpdf-c called qpdf_get_page_n 0
|
||||
qpdf-c called qpdf_update_all_pages_cache 0
|
||||
qpdf-c called qpdf_find_page_by_id 0
|
||||
qpdf-c called qpdf_find_page_by_oh 0
|
||||
qpdf-c called qpdf_push_inherited_attributes_to_page 0
|
||||
qpdf-c called qpdf_add_page 0
|
||||
qpdf-c called qpdf_add_page_at 0
|
||||
qpdf-c called qpdf_remove_page 0
|
||||
qpdf-c called qpdf_oh_new_stream 0
|
||||
qpdf-c called qpdf_oh_copy_foreign_object 0
|
||||
qpdf-c stream data filtered set 1
|
||||
qpdf-c stream data buf set 1
|
||||
qpdf-c called qpdf_oh_get_page_content_data 0
|
||||
qpdf-c called qpdf_oh_replace_stream_data 0
|
||||
qpdf-c silence oh errors 0
|
||||
qpdf-c called qpdf_oh_get_binary_string_value 0
|
||||
qpdf-c called qpdf_oh_get_binary_utf8_value 0
|
||||
qpdf-c called qpdf_oh_new_binary_string 0
|
||||
qpdf-c called qpdf_oh_new_binary_unicode_string 0
|
||||
QPDFJob duplicated pages password 0
|
||||
QPDFJob misplaced pages password 0
|
||||
QPDFJob check encrypted encrypted 0
|
||||
QPDFJob check encrypted not encrypted 0
|
||||
QPDFJob check password password incorrect 0
|
||||
QPDFJob check password password correct 0
|
||||
QPDFJob check password not encrypted 0
|
||||
QPDFJob_config password file 0
|
||||
QPDFJob_config password stdin 0
|
||||
QPDFJob json bare not empty 0
|
||||
QPDFJob json choice mismatch 0
|
||||
QPDFJob json choice match 0
|
||||
QPDFJob json encrypt no key length 0
|
||||
QPDFJob json encrypt duplicate key length 0
|
||||
QPDFJob json encrypt missing password 0
|
||||
QPDFJob json pages no file 0
|
||||
qpdf-c called qpdf_empty_pdf 0
|
|
@ -1 +0,0 @@
|
|||
include ../make/proxy.mk
|
|
@ -1,22 +0,0 @@
|
|||
TARGETS_zlib-flate = \
|
||||
zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate)
|
||||
|
||||
$(TARGETS_zlib-flate): $(TARGETS_libqpdf)
|
||||
|
||||
INCLUDES_zlib-flate = include
|
||||
|
||||
SRCS_zlib-flate = zlib-flate/zlib-flate.cc
|
||||
|
||||
# -----
|
||||
|
||||
OBJS_zlib-flate = $(call src_to_obj,$(SRCS_zlib-flate))
|
||||
|
||||
ifeq ($(GENDEPS),1)
|
||||
-include $(call obj_to_dep,$(OBJS_zlib-flate))
|
||||
endif
|
||||
|
||||
$(OBJS_zlib-flate): zlib-flate/$(OUTPUT_DIR)/%.$(OBJ): zlib-flate/%.cc
|
||||
$(call compile,$<,$(INCLUDES_zlib-flate))
|
||||
|
||||
zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate): $(OBJS_zlib-flate)
|
||||
$(call makebin,$(OBJS_zlib-flate),$@,$(LDFLAGS_libqpdf) $(LDFLAGS),$(LIBS_libqpdf) $(LIBS))
|
Loading…
Reference in New Issue