beta-0.89.2
[luatex.git] / source / libs / poppler / configure.ac
blobeb9f94de1db6e1d15c1ecd3fc55bc5fede97b2be
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl   Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
4 dnl
5 dnl   This file is free software; the copyright holder
6 dnl   gives unlimited permission to copy and/or distribute it,
7 dnl   with or without modifications, as long as this notice is preserved.
8 dnl
9 m4_include([version.ac])[] dnl define poppler_version
10 AC_INIT([poppler (TeX Live)], poppler_version, [tex-k@tug.org])
11 AC_PREREQ([2.65])
12 AC_CONFIG_SRCDIR([poppler-src/poppler/Array.cc])
13 AC_CONFIG_AUX_DIR([../../build-aux])
14 AC_CONFIG_MACRO_DIR([../../m4])
16 KPSE_BASIC([poppler], [no-define])
18 AC_PROG_CC
19 AC_PROG_CXX
20 AC_PROG_RANLIB
21 AC_PROG_LN_S
23 KPSE_COMPILER_VISIBILITY
25 AC_CHECK_SIZEOF([long long])
26 if test $ac_cv_sizeof_long_long -lt 8; then
27   AC_MSG_ERROR([Sorry, your compiler has no `long long' with at least 8 bytes.])
30 test "x$GXX" = xyes && NO_WARN_CXXFLAGS='-Wno-write-strings'
31 AC_SUBST([NO_WARN_CXXFLAGS])  
33 dnl ##### Optional features.
34 AC_ARG_ENABLE([opi],
35               AS_HELP_STRING([--enable-opi],
36                              [include support for OPI comments]),
37               [if test "x$enableval" = xyes; then
38   AC_DEFINE([OPI_SUPPORT], 1, [Generate OPI comments in PS output.])
42 AC_ARG_ENABLE([multithreaded],
43               AS_HELP_STRING([--enable-multithreaded],
44                              [include support for multithreading]),
45               [if test "x$enableval" != xno; then
46   AC_DEFINE([MULTITHREADED], 1, [Enable multithreading support.])
50 AC_ARG_ENABLE([exceptions],
51               AS_HELP_STRING([--enable-exceptions],
52                              [use C++ exceptions]),
53               [if test "x$enableval" = xyes; then
54   AC_DEFINE([USE_EXCEPTIONS], 1, [Throw exceptions to deal with not enough memory and similar problems])
58 AC_ARG_ENABLE([fixedpoint],
59               AS_HELP_STRING([--enable-fixedpoint],
60                              [use fixed point (instead of floating point) arithmetic]),
61               [if test "x$enableval" = xyes; then
62   AC_DEFINE([USE_FIXEDPOINT], 1, [Use fixed point arithmetic])
66 dnl **** Checks for header files ****
68 AC_CHECK_HEADERS([strings.h])
69 AC_HEADER_DIRENT
71 dnl **** Checks for library functions ****
73 AC_CHECK_FUNCS([gettimeofday gmtime_r mkstemp popen rand_r])
74 AC_SYS_LARGEFILE
75 AC_FUNC_FSEEKO
76 AC_CHECK_FUNC([ftell64], [AC_CHECK_FUNCS([fseek64])])
78 KPSE_COND_MINGW32
80 if test "x$kpse_cv_have_win32" = xmingw32; then
81   AC_DEFINE([_WIN32_WINNT], [0x0500],
82             [Define for MinGW32 to 0x0500 to declare `GetFileSizeEx'.])
85 AC_CONFIG_HEADERS([config.h])
87 AC_CONFIG_HEADERS([poppler-config.h:poppler-src/poppler/poppler-config.h.in])
89 dnl ##### Export the version
90 AC_DEFINE_UNQUOTED([POPPLER_VERSION], ["poppler_version"], [Define to the poppler version.])
92 KPSE_ZLIB_FLAGS
94 AM_CONDITIONAL([build], [test "x$enable_build" != xno])
96 if test "x$enable_build" != xno || test -f config.force; then
98 KPSE_ADD_FLAGS([zlib])
99 AC_CHECK_FUNC([inflate], , [AC_ERROR([zlib not found])])
100 AC_CHECK_HEADERS([zlib.h], , [AC_ERROR([zlib not found])])
101 KPSE_RESTORE_FLAGS
103 echo timestamp >config.force
106 AC_DEFINE([ENABLE_ZLIB], 1, [Use zlib instead of builtin zlib decoder.])
108 AC_SUBST([POPPLER_TREE], [poppler-src])
110 AC_CONFIG_FILES([Makefile include/Makefile include/goo/Makefile include/fofi/Makefile])
112 AC_OUTPUT