1//================================================= -*- mode: c++ -*- ====
2//
3// poppler-config.h
4//
5// Copyright 1996-2011 Glyph & Cog, LLC
6//
7//========================================================================
8
9//========================================================================
10//
11// Modified under the Poppler project - http://poppler.freedesktop.org
12//
13// All changes made under the Poppler project to this file are licensed
14// under GPL version 2 or later
15//
16// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
17// Copyright (C) 2014 Hib Eris <hib@hiberis.nl>
18//
19// To see a description of the changes please see the Changelog file that
20// came with your tarball or type make ChangeLog if you are building from git
21//
22//========================================================================
23
24#ifndef POPPLER_CONFIG_H
25#define POPPLER_CONFIG_H
26
27#include <stdio.h>
28
29// We duplicate some of the config.h #define's here since they are
30// used in some of the header files we install.  The #ifndef/#endif
31// around #undef look odd, but it's to silence warnings about
32// redefining those symbols.
33
34/* Defines the poppler version. */
35#ifndef POPPLER_VERSION
36#undef POPPLER_VERSION
37#endif
38
39/* Enable multithreading support. */
40#ifndef MULTITHREADED
41#undef MULTITHREADED
42#endif
43
44/* Use fixedpoint. */
45#ifndef USE_FIXEDPOINT
46#undef USE_FIXEDPOINT
47#endif
48
49/* Use single precision arithmetic in the Splash backend */
50#ifndef USE_FLOAT
51#undef USE_FLOAT
52#endif
53
54/* Include support for OPI comments. */
55#ifndef OPI_SUPPORT
56#undef OPI_SUPPORT
57#endif
58
59/* Enable word list support. */
60#ifndef TEXTOUT_WORD_LIST
61#undef TEXTOUT_WORD_LIST
62#endif
63
64/* Support for curl is compiled in. */
65#ifndef POPPLER_HAS_CURL_SUPPORT
66#undef POPPLER_HAS_CURL_SUPPORT
67#endif
68
69/* Use libjpeg instead of builtin jpeg decoder. */
70#ifndef ENABLE_LIBJPEG
71#undef ENABLE_LIBJPEG
72#endif
73
74/* Build against libtiff. */
75#ifndef ENABLE_LIBTIFF
76#undef ENABLE_LIBTIFF
77#endif
78
79/* Build against libpng. */
80#ifndef ENABLE_LIBPNG
81#undef ENABLE_LIBPNG
82#endif
83
84/* Use zlib instead of builtin zlib decoder. */
85#ifndef ENABLE_ZLIB
86#undef ENABLE_ZLIB
87#endif
88
89/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
90   */
91#ifndef HAVE_DIRENT_H
92#undef HAVE_DIRENT_H
93#endif
94
95/* Defines if gettimeofday is available on your system */
96#ifndef HAVE_GETTIMEOFDAY
97#undef HAVE_GETTIMEOFDAY
98#endif
99
100/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
101#ifndef HAVE_NDIR_H
102#undef HAVE_NDIR_H
103#endif
104
105/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
106   */
107#ifndef HAVE_SYS_DIR_H
108#undef HAVE_SYS_DIR_H
109#endif
110
111/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
112   */
113#ifndef HAVE_SYS_NDIR_H
114#undef HAVE_SYS_NDIR_H
115#endif
116
117/* Have FreeType2 include files */
118#ifndef HAVE_FREETYPE_H
119#undef HAVE_FREETYPE_H
120#endif
121
122/* Defines if use cms */
123#ifndef USE_CMS
124#undef USE_CMS
125#endif
126
127// Also, there are preprocessor symbols in the header files
128// that are used but never defined when building poppler using configure
129// or cmake: DISABLE_OUTLINE, DEBUG_MEM, SPLASH_CMYK, HAVE_T1LIB_H,
130// ENABLE_PLUGINS, DEBUG_FORMS, HAVE_FREETYPE_FREETYPE_H
131
132//------------------------------------------------------------------------
133// version
134//------------------------------------------------------------------------
135
136// copyright notice
137#define popplerCopyright "Copyright 2005-2015 The Poppler Developers - http://poppler.freedesktop.org"
138#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
139
140//------------------------------------------------------------------------
141// popen
142//------------------------------------------------------------------------
143
144#if defined(_MSC_VER) || defined(__BORLANDC__)
145#define popen _popen
146#define pclose _pclose
147#endif
148
149#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
150#define POPEN_READ_MODE "rb"
151#else
152#define POPEN_READ_MODE "r"
153#endif
154
155//------------------------------------------------------------------------
156// Win32 stuff
157//------------------------------------------------------------------------
158
159#if defined(_WIN32) && !defined(_MSC_VER)
160#include <windef.h>
161#else
162#define CDECL
163#endif
164
165#if defined(_WIN32)
166#ifdef _MSC_VER
167#define strtok_r strtok_s
168#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION)
169char * strtok_r (char *s, const char *delim, char **save_ptr);
170#endif
171#endif
172
173//------------------------------------------------------------------------
174// Compiler
175//------------------------------------------------------------------------
176
177#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
178#ifdef __MINGW_PRINTF_FORMAT
179#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
180	__attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
181#else
182#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
183	__attribute__((__format__(__printf__, fmt_index, va_index)))
184#endif
185#else
186#define GCC_PRINTF_FORMAT(fmt_index, va_index)
187#endif
188
189#if defined(_MSC_VER)
190#define fmax(a, b) std::max(a, b)
191#define fmin(a, b) std::min(a, b)
192#endif
193
194
195#endif /* POPPLER_CONFIG_H */
196