1 //================================================= -*- mode: c++ -*- ====
5 // Copyright 1996-2011 Glyph & Cog, LLC
7 //========================================================================
9 //========================================================================
11 // Modified under the Poppler project - http://poppler.freedesktop.org
13 // All changes made under the Poppler project to this file are licensed
14 // under GPL version 2 or later
16 // Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
17 // Copyright (C) 2014 Hib Eris <hib@hiberis.nl>
18 // Copyright (C) 2016 Tor Lillqvist <tml@collabora.com>
20 // To see a description of the changes please see the Changelog file that
21 // came with your tarball or type make ChangeLog if you are building from git
23 //========================================================================
25 #ifndef POPPLER_CONFIG_H
26 #define POPPLER_CONFIG_H
30 // We duplicate some of the config.h #define's here since they are
31 // used in some of the header files we install. The #ifndef/#endif
32 // around #undef look odd, but it's to silence warnings about
33 // redefining those symbols.
35 /* Defines the poppler version. */
36 #ifndef POPPLER_VERSION
37 #undef POPPLER_VERSION
40 /* Enable multithreading support. */
46 #ifndef USE_FIXEDPOINT
50 /* Use single precision arithmetic in the Splash backend */
55 /* Include support for OPI comments. */
60 /* Enable word list support. */
61 #ifndef TEXTOUT_WORD_LIST
62 #undef TEXTOUT_WORD_LIST
65 /* Support for curl is compiled in. */
66 #ifndef POPPLER_HAS_CURL_SUPPORT
67 #undef POPPLER_HAS_CURL_SUPPORT
70 /* Use libjpeg instead of builtin jpeg decoder. */
71 #ifndef ENABLE_LIBJPEG
75 /* Build against libtiff. */
76 #ifndef ENABLE_LIBTIFF
80 /* Build against libpng. */
85 /* Use zlib instead of builtin zlib decoder for uncompressing flate streams. */
86 #ifndef ENABLE_ZLIB_UNCOMPRESS
87 #undef ENABLE_ZLIB_UNCOMPRESS
90 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
96 /* Defines if gettimeofday is available on your system */
97 #ifndef HAVE_GETTIMEOFDAY
98 #undef HAVE_GETTIMEOFDAY
101 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
106 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
108 #ifndef HAVE_SYS_DIR_H
109 #undef HAVE_SYS_DIR_H
112 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
114 #ifndef HAVE_SYS_NDIR_H
115 #undef HAVE_SYS_NDIR_H
118 /* Have FreeType2 include files */
119 #ifndef HAVE_FREETYPE_H
120 #undef HAVE_FREETYPE_H
123 /* Defines if use cms */
128 // Also, there are preprocessor symbols in the header files
129 // that are used but never defined when building poppler using configure
130 // or cmake: DISABLE_OUTLINE, DEBUG_MEM, SPLASH_CMYK, HAVE_T1LIB_H,
131 // ENABLE_PLUGINS, DEBUG_FORMS, HAVE_FREETYPE_FREETYPE_H
133 //------------------------------------------------------------------------
135 //------------------------------------------------------------------------
138 #define popplerCopyright "Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org"
139 #define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
141 //------------------------------------------------------------------------
143 //------------------------------------------------------------------------
145 #if defined(_MSC_VER) || defined(__BORLANDC__)
147 #define pclose _pclose
150 #if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
151 #define POPEN_READ_MODE "rb"
153 #define POPEN_READ_MODE "r"
156 //------------------------------------------------------------------------
158 //------------------------------------------------------------------------
160 #if defined(_WIN32) && !defined(_MSC_VER)
168 #define strtok_r strtok_s
169 #elif __MINGW32__ && !defined(__WINPTHREADS_VERSION)
170 char * strtok_r (char *s
, const char *delim
, char **save_ptr
);
174 //------------------------------------------------------------------------
176 //------------------------------------------------------------------------
178 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
179 #ifdef __MINGW_PRINTF_FORMAT
180 #define GCC_PRINTF_FORMAT(fmt_index, va_index) \
181 __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
183 #define GCC_PRINTF_FORMAT(fmt_index, va_index) \
184 __attribute__((__format__(__printf__, fmt_index, va_index)))
187 #define GCC_PRINTF_FORMAT(fmt_index, va_index)
190 #if defined(_MSC_VER) && _MSC_VER < 1800
191 #define fmax(a, b) std::max(a, b)
192 #define fmin(a, b) std::min(a, b)
196 #endif /* POPPLER_CONFIG_H */