configure.ac 28.9 KB
Newer Older
1
m4_define([poppler_version_major],[0])
Albert Astals Cid's avatar
0.25.0    
Albert Astals Cid committed
2
m4_define([poppler_version_minor],[25])
Albert Astals Cid's avatar
Albert Astals Cid committed
3
m4_define([poppler_version_micro],[1])
4
5
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])

Kristian Høgsberg's avatar
Kristian Høgsberg committed
6
AC_PREREQ(2.59)
7
AC_INIT([poppler],[poppler_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=poppler])
Vincent Torri's avatar
Vincent Torri committed
8
AC_CONFIG_MACRO_DIR([m4])
9
AM_INIT_AUTOMAKE([foreign])
10
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
Nuno Araujo's avatar
Nuno Araujo committed
11
AC_CONFIG_HEADERS([config.h poppler/poppler-config.h])
12
AC_C_BIGENDIAN
Kristian Høgsberg's avatar
Kristian Høgsberg committed
13

14
15
dnl ##### Initialize libtool.
AC_LIBTOOL_WIN32_DLL
16
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
Kristian Høgsberg's avatar
Kristian Høgsberg committed
17
AC_PROG_LIBTOOL
18
19

dnl ##### Checks for programs.
Kristian Høgsberg's avatar
Kristian Høgsberg committed
20
AC_PROG_CC
21
AC_PROG_CXX
Kristian Høgsberg's avatar
Kristian Høgsberg committed
22
23
24
25
26
27
AC_ISC_POSIX
AC_PROG_CC_STDC
#if test -z "$CXX" -a "$CC" = "gcc"; then
#  CXX="gcc"
#fi
AC_PROG_CXX
28
if test "x$GXX" = "xyes"; then
29
30
31
32
  case "$host_os" in
    cygwin* | mingw*)
    ;;
    *)
33
34
35
36
37
38
39
      case "${CXXFLAGS}" in
      *-std=*)
        ;;
      *)
        CXXFLAGS="$CXXFLAGS -ansi"
        ;;
      esac
40
41
    ;;
  esac
42
fi
Kristian Høgsberg's avatar
Kristian Høgsberg committed
43
44
AC_PROG_INSTALL

45
dnl ##### Check for pkgconfig
Vincent Torri's avatar
Vincent Torri committed
46
PKG_PROG_PKG_CONFIG
47

48
dnl ##### Export the version
49
AC_DEFINE_UNQUOTED([POPPLER_VERSION], ["poppler_version"], [Defines the poppler version])
50

Kristian Høgsberg's avatar
Kristian Høgsberg committed
51
dnl Enable these unconditionally.
52
AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.])
Kristian Høgsberg's avatar
Kristian Høgsberg committed
53
54
55
AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])

Albert Astals Cid's avatar
Albert Astals Cid committed
56
57
58
dnl Check for OS specific flags
win32_libs=""
create_shared_lib=""
59
auto_import_flags=""
Albert Astals Cid's avatar
Albert Astals Cid committed
60
case "$host_os" in
61
62
63
  cygwin*)
    create_shared_lib="-no-undefined"
  ;;
Carlo Bramini's avatar
Carlo Bramini committed
64
  mingw*)
65
    os_win32=yes
Albert Astals Cid's avatar
Albert Astals Cid committed
66
67
    win32_libs="-lgdi32"
    create_shared_lib="-no-undefined"
68
    auto_import_flags="-Wl,--enable-auto-import"
69
70
71

    # Use mingw's ansi stdio extensions
    CXXFLAGS="$CXXFLAGS -D__USE_MINGW_ANSI_STDIO=1"
Albert Astals Cid's avatar
Albert Astals Cid committed
72
73
74
75
76
  ;;
esac

AC_SUBST(win32_libs)
AC_SUBST(create_shared_lib)
77
AC_SUBST(auto_import_flags)
Albert Astals Cid's avatar
Albert Astals Cid committed
78

79
AX_PTHREAD()
80

81
82
83
84
85
86
87
88
dnl Install xpdf headers
AC_ARG_ENABLE(xpdf-headers,
	      AC_HELP_STRING([--enable-xpdf-headers],
	                     [Install unsupported xpdf headers.]),
              enable_xpdf_headers=$enableval,
              enable_xpdf_headers="no")
AM_CONDITIONAL(ENABLE_XPDF_HEADERS, test x$enable_xpdf_headers = xyes)

89
90
AC_ARG_ENABLE(single-precision,
[  --enable-single-precision     use single precision arithmetic (instead of double precision) in the Splash backend],
91
AC_DEFINE(USE_FLOAT,      [1], [Use single precision arithmetic in the Splash backend]))
92

93
AC_ARG_ENABLE(fixedpoint,
94
[  --enable-fixedpoint     use fixed point (instead of double precision) arithmetic in the Splash backend],
95
AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend]))
96

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
dnl Relocation support
AC_ARG_ENABLE(relocatable,
    AC_HELP_STRING([--disable-relocatable],
                   [Hardcode the poppler library location (on Windows).]),
    enable_relocatable=$enableval,
    [if test x$os_win32 = xyes; then
         # default to yes on native Windows.
         enable_relocatable="yes"
     else
         # default to no everywhere else.
         enable_relocatable="no"
     fi
    ]
)

if test x$enable_relocatable = xyes; then
    if test x$os_win32 = xyes; then
     AC_DEFINE([ENABLE_RELOCATABLE],
               [1],[Do not hardcode the library location])
    else
        AC_MSG_ERROR(
               [Invalid setting for relocatable, only supported on windows])

    fi
fi

123
AC_DEFINE_DIR(POPPLER_DATADIR, "{datarootdir}/poppler", [Poppler data dir])
Kristian Høgsberg's avatar
Kristian Høgsberg committed
124
125
126
127

dnl ##### Checks for header files.
AC_PATH_XTRA
AC_HEADER_DIRENT
128
AC_CHECK_HEADERS([stdint.h])
Kristian Høgsberg's avatar
Kristian Høgsberg committed
129
130
131
132
133
134

dnl ##### Switch over to C++.  This will make the checks below a little
dnl ##### bit stricter (requiring function prototypes in include files).
dnl ##### (99% of xpdf is written in C++.)
AC_LANG_CPLUSPLUS

135
136
137
AC_CHECK_DECL(gettimeofday, [AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defines if gettimeofday is available on your system]))],[],[#include <sys/time.h>])
AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your system]))
AC_CHECK_FUNC(gmtime_r, AC_DEFINE(HAVE_GMTIME_R, 1, [Defines if gmtime_r is available on your system]))
138
AC_CHECK_FUNC(rand_r, AC_DEFINE(HAVE_RAND_R, 1, [Defines if rand_r is available on your system]))
139

Kristian Høgsberg's avatar
Kristian Høgsberg committed
140
141
142
143
144
145
dnl ##### Check for extra libraries needed by X.  (LynxOS needs this.)
AC_CHECK_FUNC(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
  AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd")
fi

146
147
148
149
150
151
152
153
154
155
156
157
158
159
AC_CHECK_FUNC(nanosleep,,)
dnl try in librt if not found in current LIBS
if test x$ac_cv_func_nanosleep = xno
then
   AC_CHECK_LIB(rt,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lrt")
fi

dnl try in libposix4, if not found so far
if test x$ac_cv_func_nanosleep = xno && test x$ac_cv_lib_rt_nanosleep = xno
then
   AC_CHECK_LIB(posix4,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix4")
fi


160
dnl Test for libopenjpeg. Versions prior to 1.4 do not provide a pkgconfig file.
161
162
163
164
165
166
AC_ARG_ENABLE(libopenjpeg,
	      AC_HELP_STRING([--disable-libopenjpeg],
	                     [Don't build against libopenjpeg.]),
              enable_libopenjpeg=$enableval,
              enable_libopenjpeg="try")
if test x$enable_libopenjpeg = xyes; then
167
168
169
170
171
172
173
  PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg,
  		    [],
    		    [AC_CHECK_LIB([openjpeg], [opj_cio_open],
  			LIBOPENJPEG_LIBS="-lopenjpeg",
		        AC_MSG_ERROR("*** libopenjpeg library not found ***"))
		     AC_CHECK_HEADERS([openjpeg.h],,
		     	AC_MSG_ERROR("*** libopenjpeg headers not found ***"))])
174
elif test x$enable_libopenjpeg = xtry; then
175
176
177
178
179
180
181
182
  PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg,
                    [enable_libopenjpeg="yes"],
  		    [AC_CHECK_LIB([openjpeg], [opj_cio_open],
		        [enable_libopenjpeg="yes"
  			 LIBOPENJPEG_LIBS="-lopenjpeg"],
	                [enable_libopenjpeg="no"])
		     AC_CHECK_HEADERS([openjpeg.h],,
		         [enable_libopenjpeg="no"])])
183
184
185
fi

if test x$enable_libopenjpeg = xyes; then
186
  AC_SUBST(LIBOPENJPEG_CFLAGS)
187
188
  AC_SUBST(LIBOPENJPEG_LIBS)
  AC_DEFINE(ENABLE_LIBOPENJPEG)
189
  PKG_CHECK_EXISTS(libopenjpeg >= 1.5,
190
      [AC_DEFINE(WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG, 1, [OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag.])],
191
      [])
192
193
194
195
196
197
fi

AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes)
AH_TEMPLATE([ENABLE_LIBOPENJPEG],
	    [Use libopenjpeg instead of builtin jpeg2000 decoder.])

198
199
200
201
202
203
204
dnl ##### Test for libtiff
AC_ARG_ENABLE(libtiff,
		AC_HELP_STRING([--disable-libtiff],
				[Don't build against libtiff.]),
		enable_libtiff=$enableval,
		enable_libtiff="try")

205
206
207
208
209
210
211
212
AC_ARG_VAR([LIBTIFF_CFLAGS], [C compiler flags for LIBTIFF])
AC_ARG_VAR([LIBTIFF_LIBS], [linker flags to link LIBTIFF (default is -ltiff)])
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $LIBTIFF_CFLAGS"
CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS"
LIBS="$LIBS $LIBTIFF_LIBS"
213
if test x$enable_libtiff = xyes; then
214
215
216
217
218
219
220
  if test x"$LIBTIFF_LIBS" != ; then
    AC_CHECK_FUNC([TIFFOpen],,
		  AC_MSG_ERROR("*** libtiff library not found ***"))
  else
    AC_CHECK_LIB([tiff], [TIFFOpen],,
		  AC_MSG_ERROR("*** libtiff library not found ***"))
  fi
221
222
223
  AC_CHECK_HEADERS([tiffio.h],,
		AC_MSG_ERROR("*** libtiff headers not found ***"))
elif test x$enable_libtiff = xtry; then
224
225
226
227
228
229
230
231
232
  if test x"$LIBTIFF_LIBS" != x; then
    AC_CHECK_FUNC([TIFFOpen],
		  [enable_libtiff="yes"],
		  [enable_libtiff="no"])
  else
    AC_CHECK_LIB([tiff], [TIFFOpen],
		 [enable_libtiff="yes"],
		 [enable_libtiff="no"])
  fi
233
234
235
  AC_CHECK_HEADERS([tiffio.h],,
		[enable_libtiff="no"])
fi
236
237
238
CPPFLAGS="$ac_save_CPPFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
239
240

if test x$enable_libtiff = xyes; then
241
242
243
244
  if test x"$LIBTIFF_LIBS" = x; then
    LIBTIFF_LIBS="-ltiff"
  fi
  AC_SUBST(LIBTIFF_CFLAGSS)
245
246
247
248
249
250
251
252
253
  AC_SUBST(LIBTIFF_LIBS)
  AC_DEFINE(ENABLE_LIBTIFF)
fi

AM_CONDITIONAL(BUILD_LIBTIFF, test x$enable_libtiff = xyes)
AH_TEMPLATE([ENABLE_LIBTIFF], [Build against libtiff.])
if test x$enable_libtiff = xyes; then
  AC_DEFINE(ENABLE_LIBTIFF, 1, [Build against libtiff.])
fi
254

Kristian Høgsberg's avatar
Kristian Høgsberg committed
255
dnl ##### Checks for library functions.
256
AC_CHECK_FUNCS(popen mkstemp mkstemps)
257
AC_CHECK_FUNCS(strcpy_s strcat_s)
Kristian Høgsberg's avatar
Kristian Høgsberg committed
258
259
260
261
262
263
264
265
266
267
268
269
270

dnl ##### Back to C for the library tests.
AC_LANG_C

dnl ##### Check for fseeko/ftello or fseek64/ftell64
dnl The LARGEFILE and FSEEKO macros have to be called in C, not C++, mode.
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(fseek64, xpdf_cv_func_fseek64=yes, xpdf_cv_func_fseek64=no)
AC_CHECK_FUNCS(ftell64, xpdf_cv_func_ftell64=yes, xpdf_cv_func_ftell64=no)
if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
  AC_DEFINE(HAVE_FSEEK64)
fi
271
AC_CHECK_FUNCS(pread64 lseek64)
Kristian Høgsberg's avatar
Kristian Høgsberg committed
272

273
dnl Test for zlib
274
275
276
AC_ARG_ENABLE([zlib],
  [AS_HELP_STRING([--enable-zlib],[Build with zlib])],
  [],[enable_zlib="no"])
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
if test x$enable_zlib = xyes; then
  AC_CHECK_LIB([z], [inflate],,
	       AC_MSG_ERROR("*** zlib library not found ***"))
  AC_CHECK_HEADERS([zlib.h],,
		   AC_MSG_ERROR("*** zlib headers not found ***"))
elif test x$enable_zlib = xtry; then
  AC_CHECK_LIB([z], [inflate],
               [enable_zlib="yes"],
	       [enable_zlib="no"])
  AC_CHECK_HEADERS([zlib.h],,
		   [enable_zlib="no"])
fi

if test x$enable_zlib = xyes; then
  ZLIB_LIBS="-lz"
  AC_SUBST(ZLIB_LIBS)
  AC_DEFINE(ENABLE_ZLIB)
fi

AM_CONDITIONAL(BUILD_ZLIB, test x$enable_zlib = xyes)
AH_TEMPLATE([ENABLE_ZLIB],
	    [Use zlib instead of builtin zlib decoder.])
299

Hib Eris's avatar
Hib Eris committed
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
dnl Test for libcurl
AC_ARG_ENABLE(libcurl,
	      AC_HELP_STRING([--enable-libcurl],
	                     [Build with libcurl based HTTP support.]),
              enable_libcurl=$enableval,
              enable_libcurl="no")

if test x$enable_libcurl = xyes; then
  PKG_CHECK_MODULES(LIBCURL, libcurl)
  AC_DEFINE(ENABLE_LIBCURL, 1, [Build against libcurl.])
  AC_DEFINE(POPPLER_HAS_CURL_SUPPORT, 1,
     [Support for curl based doc builder is compiled in.])
fi

AM_CONDITIONAL(BUILD_LIBCURL, test x$enable_libcurl = xyes)
315

316
317
318
319
320
321
dnl Test for libjpeg
AC_ARG_ENABLE(libjpeg,
	      AC_HELP_STRING([--disable-libjpeg],
	                     [Don't build against libjpeg.]),
              enable_libjpeg=$enableval,
              enable_libjpeg="try")
322
AC_ARG_VAR([LIBJPEG_CFLAGS], [C compiler flags for LIBJPEG])
323
if test x$enable_libjpeg != xno; then
324

325
326
327
328
329
330
331
332
  dnl
  dnl POPPLER_FIND_JPEG uses "USER_INCLUDES" and "USER_LIBS"
  dnl to receive the flags for header and library directories.
  dnl
  ac_save_USER_INCLUDES="$USER_INCLUDES"
  ac_save_USER_LDFLAGS="$USER_LDFLAGS"
  USER_INCLUDES="$USER_INCLUDES $LIBJPEG_CFLAGS"
  USER_LDFLAGS="$USER_LDFLAGS $LIBJPEG_CFLAGS"
333
  POPPLER_FIND_JPEG
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374

  dnl check INT16, INT32 typedef conflict in jmorecfg.h
  ac_save_CPPFLAGS="$CPPFLAGS"
  ac_save_CFLAGS="$CFLAGS"
  CPPFLAGS="$CPPFLAGS $LIBJPEG_CFLAGS"
  CFLAGS="$CFLAGS $LIBJPEG_CFLAGS"
  AC_MSG_CHECKING([libjpeg.h works correctly])
  AC_COMPILE_IFELSE([
    AC_LANG_PROGRAM([
#ifdef _WIN32
#include <windows.h>
#endif
#include <sys/types.h>
#include <stdio.h>
#include <jpeglib.h>
],[{return 0;}])],[
    AC_MSG_RESULT([ok])
  ],[
    AC_MSG_RESULT([no])
    AC_MSG_CHECKING([libjpeg.h problem can be fixed by XMD_H macro])
    CPPFLAGS="$CPPFLAGS -DXMD_H"
    CFLAGS="$CFLAGS -DXMD_H"
    AC_COMPILE_IFELSE([
      AC_LANG_PROGRAM([
#ifdef _WIN32
#include <windows.h>
#endif
#include <sys/types.h>
#include <stdio.h>
#include <jpeglib.h>
],[{return 0;}])],[
      AC_MSG_RESULT([ok, -DXMD_H is added to LIBJPEG_CFLAGS])
      LIBJPEG_CFLAGS="$LIBJPEG_CFLAGS -DXMD_H"
    ],[
      AC_MSG_RESULT([no, disable libjpeg])
      enable_libjpeg="no"
    ])
  ])
  CPPFLAGS="$ac_save_CPPFLAGS"
  CFLAGS="$ac_save_CFLAGS"

375
376
377
378
  dnl POPPLER_FIND_JPEG sets LIBJPEG_LIBS
  AC_SUBST(LIBJPEG_CFLAGS)
  USER_INCLUDES="$ac_save_USER_INCLUDES"
  USER_LDFLAGS="$ac_save_USER_LDFLAGS"
379
380
381
382
383
384
fi

AM_CONDITIONAL(BUILD_LIBJPEG, test x$enable_libjpeg = xyes)
AH_TEMPLATE([ENABLE_LIBJPEG],
            [Use libjpeg instead of builtin jpeg decoder.])

385
386
387
dnl Test for libpng
AC_ARG_ENABLE(libpng,
	      AC_HELP_STRING([--disable-libpng],
388
	                     [Do not build against libpng.]),
389
390
              enable_libpng=$enableval,
              enable_libpng="try")
391

392
if test x$enable_libpng != xno; then
393
394
395
396
397
398
  PKG_CHECK_MODULES(LIBPNG, libpng, [enable_libpng="yes"],
      [enable_libpng="no"])
fi

if test x$enable_libpng = xyes; then
  AC_DEFINE(ENABLE_LIBPNG, 1, [Build against libpng.])
399
400
401
fi

AM_CONDITIONAL(BUILD_LIBPNG, test x$enable_libpng = xyes)
402

Kristian Høgsberg's avatar
Kristian Høgsberg committed
403
dnl Check for freetype headers
404

405
PKG_CHECK_MODULES(FREETYPE, freetype2,
406
407
408
409
                  [freetype_pkgconfig=yes], [freetype_pkgconfig=no])

if test "x$freetype_pkgconfig" = "xyes"; then

Kristian Høgsberg's avatar
Kristian Høgsberg committed
410
411
  AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files])

412
413
else

414
415
416
  FREETYPE_LIBS=
  FREETYPE_CFLAGS=

417
418
  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
  if test "x$FREETYPE_CONFIG" != "xno" ; then
419

420
421
422
    FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
    FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
    AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files])
423

Kristian Høgsberg's avatar
Kristian Høgsberg committed
424
425
426
427
428
429
430
  fi

fi

AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)

431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
AC_MSG_CHECKING([which font configuration to use])
AC_ARG_WITH([font_configuration],
   [AS_HELP_STRING([--with-font-configuration=fontconfig|win32],
                   [Select font configuration backend])],
   [],
   [if test x$os_win32 = xyes; then
        # default to win32 on native Windows.
        with_font_configuration=win32
    else
        # default to fontconig everywhere else.
        with_font_configuration=fontconfig
    fi
   ]
)
AC_MSG_RESULT([$with_font_configuration])

case $with_font_configuration in
  win32)
     AC_DEFINE([WITH_FONTCONFIGURATION_WIN32],
               [1],[Use win32 font configuration backend])
     # Set the minimum required Internet Explorer version to 5.0
     CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x0500"
     ;;
  fontconfig)
     AC_DEFINE([WITH_FONTCONFIGURATION_FONTCONFIG],
               [1],[Use fontconfig font configuration backend])
     PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.0.0)
     ;;
  *)
     AC_MSG_ERROR(
               [Invalid font configuration setting: $with_font_configuration])
     ;;
esac

AM_CONDITIONAL(BUILD_WITH_WIN32_FONTCONFIGURATION,
               test x$with_font_configuration = xwin32)
467

Kristian Høgsberg's avatar
Kristian Høgsberg committed
468
469
470
471
472
AC_ARG_ENABLE(splash-output,
              AC_HELP_STRING([--disable-splash-output],
	                     [Don't build the Splash graphics backend.]),,
              enable_splash_output="yes")
AM_CONDITIONAL(BUILD_SPLASH_OUTPUT, test x$enable_splash_output = xyes)
473
474
475
476
AH_TEMPLATE([HAVE_SPLASH], [Use splash for rendering.])
if test x$enable_splash_output = xyes; then
  AC_DEFINE(HAVE_SPLASH)
fi
Kristian Høgsberg's avatar
Kristian Høgsberg committed
477

478
CAIRO_VERSION="1.10.0"
479
AC_SUBST(CAIRO_VERSION)
Kristian Høgsberg's avatar
Kristian Høgsberg committed
480
481
AC_ARG_ENABLE(cairo-output,
              AC_HELP_STRING([--disable-cairo-output],
482
483
484
                             [Don't build the cairo graphics backend.]),
              enable_cairo_output=$enableval,
              enable_cairo_output="try")
485
use_cairo=""
Kristian Høgsberg's avatar
Kristian Høgsberg committed
486
if test x$enable_cairo_output = xyes; then
487
  PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION)
488
elif test x$enable_cairo_output = xtry; then
489
  PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION,
490
                    [enable_cairo_output="yes"],
491
492
493
                    [enable_cairo_output="no"
		     use_cairo="no (requires cairo >= $CAIRO_VERSION)"])
fi
494
if test "x$use_cairo" = "x"; then
495
   use_cairo=$enable_cairo_output
Kristian Høgsberg's avatar
Kristian Høgsberg committed
496
497
fi

498
499
500
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRO_LIBS)

501
502
503
AM_CONDITIONAL(BUILD_CAIRO_OUTPUT, test x$enable_cairo_output = xyes)
AH_TEMPLATE([HAVE_CAIRO], [Use cairo for rendering.])
if test x$enable_cairo_output = xyes; then
504
505
506
507
508
509
510
511
512
513
  PDFTOCAIRO_DEPS="cairo cairo-ft"
  dnl Check for optional cairo backends used by pdftocairo
  PKG_CHECK_EXISTS(cairo-pdf, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-pdf"], [])
  PKG_CHECK_EXISTS(cairo-ps,  [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-ps"],  [])
  PKG_CHECK_EXISTS(cairo-svg, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-svg"], [])

  PKG_CHECK_MODULES(PDFTOCAIRO, $PDFTOCAIRO_DEPS)
  AC_SUBST(PDFTOCAIRO_CFLAGS)
  AC_SUBST(PDFTOCAIRO_LIBS)

514
  AC_DEFINE(HAVE_CAIRO)
515
516
  CAIRO_FEATURE="#define POPPLER_HAS_CAIRO 1"
  CAIRO_REQ="cairo"
Chris Wilson's avatar
Chris Wilson committed
517
  AC_CHECK_HEADERS(fcntl.h sys/mman.h sys/stat.h)
518
519
520
else
  CAIRO_FEATURE="#undef POPPLER_HAS_CAIRO"
  CAIRO_REQ=""
521
fi
522
523
AC_SUBST(CAIRO_FEATURE)
AC_SUBST(CAIRO_REQ)
524

525
use_glib=""
526
found_introspection=no
527
528
529
530
531
if test x$enable_cairo_output = xyes; then
  POPPLER_GLIB_DISABLE_DEPRECATED=""
  POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""

  GLIB_REQUIRED=2.18
Rex Dieter's avatar
Rex Dieter committed
532
  AC_SUBST(GLIB_REQUIRED)
533
534
535
536
537
538
  AC_ARG_ENABLE(poppler-glib,
	        AC_HELP_STRING([--disable-poppler-glib],
		               [Don't compile poppler glib wrapper.]),
              		       enable_poppler_glib=$enableval,
			       enable_poppler_glib="try")
  if test x$enable_poppler_glib = xyes; then
539
    PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)
540
  elif test x$enable_poppler_glib = xtry; then
541
    PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION,
542
                      [enable_poppler_glib="yes"],
543
                      [enable_poppler_glib="no"
544
                      use_glib="no (requires glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)"])
545
546
  fi
  if test x$enable_poppler_glib = xyes; then
547
548
549
    # Check for introspection
    GOBJECT_INTROSPECTION_CHECK([0.6.7])

550
551
552
553
554
555
556
557
    AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
    POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
    POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DG_DISABLE_SINGLE_INCLUDES"
  fi
else
  if test x$enable_poppler_glib = xyes; then
    AC_MSG_ERROR("Cairo output is required to build glib frontend")
  fi
558
  use_glib="no (requires cairo output)"
559
  enable_poppler_glib="no"
560
fi
suzuki toshiya's avatar
suzuki toshiya committed
561
562
if test x"$use_glib" = x; then
   use_glib="$enable_poppler_glib"
563
fi
564
AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes)
565
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
566
AC_SUBST(GLIB_REQ)
567
AC_SUBST(POPPLER_GLIB_DISABLE_DEPRECATED)
568
AC_SUBST(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
569

570
571
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])

572
573
574
575
dnl 
dnl Try Qt4
dnl

576
577
578
579
580
AC_ARG_ENABLE(poppler-qt4,
              AC_HELP_STRING([--disable-poppler-qt4],
	                     [Don't compile poppler Qt4 wrapper.]),
              enable_poppler_qt4=$enableval,
              enable_poppler_qt4="try")
581
if test x$enable_poppler_qt4 = xyes; then
582
  PKG_CHECK_MODULES(POPPLER_QT4, 
Albert Astals Cid's avatar
Albert Astals Cid committed
583
	            QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0)
584
  PKG_CHECK_MODULES(POPPLER_QT4_TEST, 
Albert Astals Cid's avatar
Albert Astals Cid committed
585
	            QtTest >= 4.4.0)
586
elif test x$enable_poppler_qt4 = xtry; then
587
  PKG_CHECK_MODULES(POPPLER_QT4,
Albert Astals Cid's avatar
Albert Astals Cid committed
588
                    QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0,
589
590
                    [enable_poppler_qt4="yes"],
                    [enable_poppler_qt4="no"])
591
592
  if test x$enable_poppler_qt4 = xyes; then
    PKG_CHECK_MODULES(POPPLER_QT4_TEST,
Albert Astals Cid's avatar
Albert Astals Cid committed
593
                    QtTest >= 4.4.0,
594
595
596
                    [enable_poppler_qt4="yes"],
                    [enable_poppler_qt4="no"])
  fi
597
fi
598
599
600

AC_SUBST(POPPLER_QT4_CXXFLAGS)
AC_SUBST(POPPLER_QT4_LIBS)
601
AC_SUBST(POPPLER_QT4_TEST_LIBS)
602

603
if test x$enable_poppler_qt4 = xyes; then
604
  AC_CHECK_TOOL(MOCQT4, moc)
605
606
607
608
  AC_MSG_CHECKING([for Qt4 moc])
  mocversion=`$MOCQT4 -v 2>&1`
  mocversiongrep=`echo $mocversion | grep "Qt 4"`
  if test x"$mocversiongrep" != x"$mocversion"; then
609
    AC_MSG_RESULT([no])
610
    # moc was not the qt4 one, try with moc-qt4
Albert Astals Cid's avatar
Albert Astals Cid committed
611
    AC_CHECK_TOOL(MOCQT42, moc-qt4)
612
    AC_MSG_CHECKING([for Qt4 moc-qt4])
Albert Astals Cid's avatar
Albert Astals Cid committed
613
    mocversion=`$MOCQT42 -v 2>&1`
614
615
616
617
618
    mocversiongrep=`echo $mocversion | grep "Qt 4"`
    if test x"$mocversiongrep" != x"$mocversion"; then
      # no valid moc found
      enable_poppler_qt4=no;
      MOCQT4="not found"
Albert Astals Cid's avatar
Albert Astals Cid committed
619
620
    else
      MOCQT4=$MOCQT42
621
622
623
624
625
626
    fi
  fi
  AC_SUBST(MOCQT4)
  AC_MSG_RESULT([$MOCQT4])
fi

627
AM_CONDITIONAL(BUILD_POPPLER_QT4, test "x$enable_poppler_qt4" = "xyes")
628

Albert Astals Cid's avatar
Albert Astals Cid committed
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
dnl 
dnl Try Qt5
dnl

AC_ARG_ENABLE(poppler-qt5,
              AC_HELP_STRING([--disable-poppler-qt5],
	                     [Don't compile poppler Qt5 wrapper.]),
              enable_poppler_qt5=$enableval,
              enable_poppler_qt5="try")
if test x$enable_poppler_qt5 = xyes; then
  PKG_CHECK_MODULES(POPPLER_QT5, 
	            Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Xml >= 5.0.0 Qt5Widgets >= 5.0.0)
  PKG_CHECK_MODULES(POPPLER_QT5_TEST, 
	            Qt5Test >= 5.0.0 ) 
elif test x$enable_poppler_qt5 = xtry; then
  PKG_CHECK_MODULES(POPPLER_QT5,
                    Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Xml >= 5.0.0 Qt5Widgets >= 5.0.0,
                    [enable_poppler_qt5="yes"],
                    [enable_poppler_qt5="no"])
  if test x$enable_poppler_qt5 = xyes; then
    PKG_CHECK_MODULES(POPPLER_QT5_TEST,
                    Qt5Test >= 5.0.0,
                    [enable_poppler_qt5="yes"],
                    [enable_poppler_qt5="no"])
  fi
fi

AC_SUBST(POPPLER_QT5_CXXFLAGS)
AC_SUBST(POPPLER_QT5_LIBS)
AC_SUBST(POPPLER_QT5_TEST_LIBS)

if test x$enable_poppler_qt5 = xyes; then
  AC_CHECK_TOOL(MOCQT5, moc)
  AC_MSG_CHECKING([for Qt5 moc])
  mocversion=`$MOCQT5 -v 2>&1`
Albert Astals Cid's avatar
Albert Astals Cid committed
664
  mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
Albert Astals Cid's avatar
Albert Astals Cid committed
665
666
667
  if test x"$mocversiongrep" != x"$mocversion"; then
    AC_MSG_RESULT([no])
    # moc was not the qt5 one, try with moc-qt5
668
    AC_CHECK_TOOL(MOCQT52, moc-qt5)
Albert Astals Cid's avatar
Albert Astals Cid committed
669
    AC_MSG_CHECKING([for Qt5 moc-qt5])
670
    mocversion=`$MOCQT52 -v 2>&1`
Albert Astals Cid's avatar
Albert Astals Cid committed
671
    mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
Albert Astals Cid's avatar
Albert Astals Cid committed
672
    if test x"$mocversiongrep" != x"$mocversion"; then
Albert Astals Cid's avatar
Albert Astals Cid committed
673
674
675
676
      AC_CHECK_TOOL(QTCHOOSER, qtchooser)
      AC_MSG_CHECKING([for qtchooser])
      qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2`
      mocversion=`$qt5tooldir/moc -v 2>&1`
Albert Astals Cid's avatar
Albert Astals Cid committed
677
      mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
Albert Astals Cid's avatar
Albert Astals Cid committed
678
679
680
681
682
683
684
      if test x"$mocversiongrep" != x"$mocversion"; then
        # no valid moc found
        enable_poppler_qt5=no;
        MOCQT5="not found"
      else
        MOCQT5=$qt5tooldir/moc
      fi
685
686
    else
      MOCQT5=$MOCQT52
Albert Astals Cid's avatar
Albert Astals Cid committed
687
688
689
690
691
692
693
694
    fi
  fi
  AC_SUBST(MOCQT5)
  AC_MSG_RESULT([$MOCQT5])
fi

AM_CONDITIONAL(BUILD_POPPLER_QT5, test "x$enable_poppler_qt5" = "xyes")

695
696
697
698
699
700
701
702
703
dnl
dnl CPP frontend
dnl

AC_ARG_ENABLE(poppler-cpp,
              AC_HELP_STRING([--disable-poppler-cpp],
                             [Don't compile poppler cpp wrapper.]),
              enable_poppler_cpp=$enableval,
              enable_poppler_cpp="yes")
704
705
706
707
708
709
if test x$enable_poppler_cpp = xyes; then
  AM_ICONV()
  if test x$am_func_iconv != xyes; then
    enable_poppler_cpp=no
  fi
fi
710
711
712
713

AM_CONDITIONAL(BUILD_POPPLER_CPP, test "x$enable_poppler_cpp" = "xyes")


Kristian Høgsberg's avatar
Kristian Høgsberg committed
714
715
AC_ARG_ENABLE(gtk-test,
              AC_HELP_STRING([--disable-gtk-test],
716
717
718
	                     [Don't compile GTK+ test program.]),
              enable_gtk_test=$enableval,
              enable_gtk_test="try")
Kristian Høgsberg's avatar
Kristian Høgsberg committed
719
if test x$enable_gtk_test = xyes; then
720
  PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.0 gdk-pixbuf-2.0)
721
elif test x$enable_gtk_test = xtry; then
722
  PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.0 gdk-pixbuf-2.0,
723
724
                    [enable_gtk_test="yes"],
                    [enable_gtk_test="no"])
Kristian Høgsberg's avatar
Kristian Høgsberg committed
725
fi
726
AM_CONDITIONAL(BUILD_GTK_TEST, test x$enable_gtk_test = xyes -a x$enable_poppler_glib = xyes)
Kristian Høgsberg's avatar
Kristian Høgsberg committed
727

728
729
730
731
732
733
734
AC_ARG_ENABLE(utils,
              AC_HELP_STRING([--disable-utils],
	                     [Don't compile poppler command line utils.]),
              enable_utils=$enableval,
              enable_utils="yes")
AM_CONDITIONAL(BUILD_UTILS, test x$enable_utils = xyes)

735
AC_ARG_ENABLE(compile-warnings,
736
              AC_HELP_STRING([--enable-compile-warnings=@<:@no/yes/kde@:>@],
737
738
739
                             [Turn on compiler warnings.]),,
              [enable_compile_warnings="yes"])

740
741
742
743
744
dnl
dnl   Color Management
dnl

AC_ARG_ENABLE(cms,
745
746
747
748
749
              AC_HELP_STRING([--enable-cms=@<:@auto/lcms1/lcms2/none@:>@],
                             [Use color management system. 'auto' prefers lcms2 over lcms1 if both are available [[default=auto]]]),
              [enable_cms=$enableval],
              [enable_cms="auto"])
if test x$enable_cms = xauto; then
Koji Otani's avatar
Koji Otani committed
750
751
  PKG_CHECK_MODULES(LCMS, lcms2, [lcms2=yes], [lcms2=no])
  if test x$lcms2 = xno; then
752
      PKG_CHECK_MODULES(LCMS, lcms, [lcms1=yes], [lcms1=no])
Koji Otani's avatar
Koji Otani committed
753
  fi
754
755
756
757
elif test x$enable_cms = xlcms1; then
  PKG_CHECK_MODULES(LCMS, lcms, [lcms1=yes], [lcms1=no])
elif test x$enable_cms = xlcms2; then
  PKG_CHECK_MODULES(LCMS, lcms2, [lcms2=yes], [lcms2=no])
758
759
fi

760
761
if test x$lcms1 = xyes || test x$lcms2 = xyes; then
  enable_cms=yes
762
  AC_DEFINE(USE_CMS, 1, [Defines if use cms])
763
  if test x$lcms1 = xyes; then
Koji Otani's avatar
Koji Otani committed
764
765
766
    lcms1=yes;
    AC_DEFINE(USE_LCMS1, 1, [Defines if use lcms1])
  fi
767
fi
768

769
AM_CONDITIONAL(USE_CMS, test x$enable_cms = xyes)
Koji Otani's avatar
Koji Otani committed
770
AM_CONDITIONAL(USE_LCMS1, test x$lcms1 = xyes)
771

772
AC_ARG_WITH([testdatadir],
Hib Eris's avatar
Hib Eris committed
773
   [AS_HELP_STRING([--with-testdatadir=/path/to/testdatadir],
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
                   [Specify test data dir])],
   [case $withval in
       [[\\/]]* | ?:[[\\/]]* )  # Absolute name.
          TESTDATADIR=$withval ;;
       *) # Relative name.
          TESTDATADIR=$ac_pwd/$withval ;;
    esac
   ],
   [case $srcdir in
       [[\\/]]* | ?:[[\\/]]* )  # Absolute name.
          TESTDATADIR=$srcdir/../test ;;
       *) # Relative name.
          TESTDATADIR=$ac_pwd/$srcdir/../test ;;
    esac
   ]
)
AC_MSG_CHECKING([for test data in $TESTDATADIR])
if test -d $TESTDATADIR && test -f $TESTDATADIR/test-poppler.c; then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([no])
  AC_MSG_WARN([
 No test data found in $TESTDATADIR.
 You will not be able to run 'make check' successfully.

 The test data is not included in the source packages
 and is also not part of the main git repository. Instead,
 you can checkout the test data from its own git
 repository with:

   git clone git://git.freedesktop.org/git/poppler/test

 You should checkout the test data as a sibling of your
 poppler source folder or specify the location of your
Hib Eris's avatar
Hib Eris committed
808
 checkout with --with-testdatadir=/path/to/checkoutdir/test.
809
810
811
812
])
fi
AC_SUBST(TESTDATADIR)

813
814
815
816
if test "x$GCC" != xyes; then
  enable_compile_warnings=no
fi
case "$enable_compile_warnings" in
817
  no)	;;
Albert Astals Cid's avatar
Albert Astals Cid committed
818
  yes)	CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS";
Hib Eris's avatar
Hib Eris committed
819
        CFLAGS="-Wall $CFLAGS" ;;
820
  kde)	CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \
821
		-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \
Albert Astals Cid's avatar
Albert Astals Cid committed
822
		-Wconversion -Wall -W -Wpointer-arith \
823
824
		-Wwrite-strings -O2 -Wformat-security \
		-Wmissing-format-attribute -fno-exceptions -fno-check-new \
Albert Astals Cid's avatar
Albert Astals Cid committed
825
		-fno-common $CXXFLAGS" ;;
826
esac
827
CXXFLAGS="-fPIC $CXXFLAGS";
828

829
case `$PKG_CONFIG --version` in
830
831
832
833
834
835
836
837
838
839
  0.?|0.1[0-7])
    PC_REQUIRES_PRIVATE="";
    PC_REQUIRES="poppler = $VERSION";;
  *)
    PC_REQUIRES_PRIVATE="Requires.private: poppler = $VERSION";
    PC_REQUIRES="";;
esac

AC_SUBST(PC_REQUIRES)
AC_SUBST(PC_REQUIRES_PRIVATE)
840

841
842
843
AC_SUBST([POPPLER_MAJOR_VERSION],[poppler_version_major])
AC_SUBST([POPPLER_MINOR_VERSION],[poppler_version_minor])
AC_SUBST([POPPLER_MICRO_VERSION],[poppler_version_micro])
844
AC_SUBST([POPPLER_VERSION],[poppler_version])
845

Kristian Høgsberg's avatar
Kristian Høgsberg committed
846
847
848
849
850
851
AC_OUTPUT([
Makefile
goo/Makefile
fofi/Makefile
splash/Makefile
poppler/Makefile
852
utils/Makefile
853
glib/Makefile
854
glib/poppler-features.h
855
glib/reference/Makefile
856
glib/reference/version.xml
857
glib/demo/Makefile
Kristian Høgsberg's avatar
Kristian Høgsberg committed
858
test/Makefile
859
860
861
qt4/Makefile
qt4/src/Makefile
qt4/tests/Makefile
862
qt4/demos/Makefile
Albert Astals Cid's avatar
Albert Astals Cid committed
863
864
865
866
qt5/Makefile
qt5/src/Makefile
qt5/tests/Makefile
qt5/demos/Makefile
867
cpp/Makefile
868
cpp/poppler-version.h
869
cpp/tests/Makefile
Kristian Høgsberg's avatar
Kristian Høgsberg committed
870
poppler.pc
871
poppler-uninstalled.pc
Kristian Høgsberg's avatar
Kristian Høgsberg committed
872
poppler-cairo.pc
873
poppler-cairo-uninstalled.pc
874
poppler-splash.pc
875
poppler-splash-uninstalled.pc
876
poppler-glib.pc
877
poppler-glib-uninstalled.pc
Pino Toscano's avatar
Pino Toscano committed
878
poppler-qt4.pc
879
poppler-qt4-uninstalled.pc
Albert Astals Cid's avatar
Albert Astals Cid committed
880
881
poppler-qt5.pc
poppler-qt5-uninstalled.pc
882
883
poppler-cpp.pc
poppler-cpp-uninstalled.pc])
884
885
886
887


echo ""
echo "Building poppler with support for:"
888
echo "  font configuration: $with_font_configuration"
889
echo "  splash output:      $enable_splash_output"
890
echo "  cairo output:       $use_cairo"
891
echo "  qt4 wrapper:        $enable_poppler_qt4"
Albert Astals Cid's avatar
Albert Astals Cid committed
892
echo "  qt5 wrapper:        $enable_poppler_qt5"
893
echo "  glib wrapper:       $use_glib"
894
echo "    introspection:    $found_introspection"
895
echo "  cpp wrapper:        $enable_poppler_cpp"
896
echo "  use gtk-doc:        $enable_gtk_doc"
897
echo "  use libjpeg:        $enable_libjpeg"
898
echo "  use libpng:         $enable_libpng"
899
echo "  use libtiff:        $enable_libtiff"
900
echo "  use zlib:           $enable_zlib"
Hib Eris's avatar
Hib Eris committed
901
echo "  use libcurl:        $enable_libcurl"
902
echo "  use libopenjpeg:    $enable_libopenjpeg"
903
echo "  use cms:            $enable_cms"
Koji Otani's avatar
Koji Otani committed
904
905
906
907
908
909
910
if test x$enable_cms = xyes;then
    if test x$lcms1 = xyes;then
        echo "      with lcms1"
    else
        echo "      with lcms2"
    fi
fi
Albert Astals Cid's avatar
   
Albert Astals Cid committed
911
echo "  command line utils: $enable_utils"
912
echo "  test data dir:      $TESTDATADIR"
913
914
915
916
917
918
echo ""

if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then
	echo "  Warning: There is no rendering backend enabled"
fi

919
920
921
922
if test x$enable_single_precision = xyes -a x$enable_fixedpoint = xyes; then
	echo "  Warning: Single precision and fixed point options should not be enabled at the same time"
fi

923
924
925
926
927
928
929
930
931
932
933
if test x$enable_libjpeg != xyes; then
	echo "  Warning: Using libjpeg is recommended"
fi

if test x$enable_zlib != xno; then
	echo "  Warning: Using zlib is not totally safe"
fi

if test x$enable_libopenjpeg != xyes; then
	echo "  Warning: Using libopenjpeg is recommended"
fi