-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
77 lines (63 loc) · 2.41 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([Remove ToUnicode CMap from PDF], [1.0.0], ,
[pdf-rm-tuc], [https://github.com/trueroad/pdf-rm-tuc])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/main.cc])
AC_CONFIG_HEADERS([config.h])
PACKAGE_COPYRIGHT="Copyright (C) 2019 Masamichi Hosoda. All rights reserved."
PACKAGE_LICENSE="License: BSD-2-Clause"
AC_SUBST([PACKAGE_COPYRIGHT])
AC_SUBST([PACKAGE_LICENSE])
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT], ["$PACKAGE_COPYRIGHT"],
[Define to the copyright of this package.])
AC_DEFINE_UNQUOTED([PACKAGE_LICENSE], ["$PACKAGE_LICENSE"],
[Define to the license of this package.])
# Checks for programs.
AC_PROG_CXX
AC_PROG_GREP
AC_PATH_PROG([DIFF], [diff])
AS_IF([test "x$DIFF" = x],
[AC_MSG_WARN([diff isn't found. `make check' will fail tests.])])
AC_SUBST([DIFF])
AC_PATH_PROG([PDFFONTS], [pdffonts])
AS_IF([test "x$PDFFONTS" = x],
[AC_MSG_WARN([pdffonts isn't found. `make check' will fail tests.])])
AC_SUBST([PDFFONTS])
AC_PATH_PROG([PDFTOTEXT], [pdftotext])
AS_IF([test "x$PDFTOTEXT" = x],
[AC_MSG_WARN([pdftotext isn't found. `make check' will fail tests.])])
AC_SUBST([PDFTOTEXT])
AC_MSG_CHECKING([for pre-generated test PDFs])
AS_IF([test ! -e ${srcdir}/test/ascii.pdf],
[AC_MSG_RESULT([no])
AC_PATH_PROG([LUATEX], [luatex])
AS_IF([test "x$LUATEX" = x],
[AC_MSG_WARN(
[luatex isn't found. Test PDFs cannot be generated.])
AC_MSG_WARN(
[You cannot use `make check'.])],
[AC_MSG_NOTICE(
[luatex is found. Test PDFs will be generated.])])],
[AC_MSG_RESULT([yes])])
AC_SUBST([LUATEX])
AC_MSG_CHECKING([for pre-generated expected text files])
AS_IF([test ! -e ${srcdir}/test/ascii-expected.pdftotext],
[AC_MSG_RESULT([no])
AC_MSG_WARN(
[Text files will be generated.])
AC_MSG_WARN(
[`make check' cannot compare with the correct expected results.])],
[AC_MSG_RESULT([yes])])
# Checks for libraries.
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([LIBQPDF], [libqpdf])
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
# Checks for library functions.
AC_CONFIG_FILES([Makefile
src/Makefile
test/Makefile])
AC_OUTPUT