Preparing release
[geeqie.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.  -*- Autoconf
2  -*-
3
4 dnl This file is a part of Geeqie project (http://www.geeqie.org/).
5 dnl Copyright (C) 2008 - 2019 The Geeqie Team
6 dnl
7 dnl This program is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation; either version 2 of the License, or
10 dnl (at your option) any later version.
11 dnl
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 dnl GNU General Public License for more details.
16
17 AC_PREREQ(2.57)
18 AC_INIT([geeqie], 1.5, [https://github.com/BestImageViewer/geeqie/issues], [], [http://www.geeqie.org/])
19
20 # Add -Werror to the default CFLAGS
21 CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
22
23 # Check for rightly dirs
24 AC_CONFIG_SRCDIR([src/main.c])
25
26 AC_CONFIG_AUX_DIR(auxdir)
27 # Require Automake 1.14 for %reldir% support
28 AM_INIT_AUTOMAKE([1.14.1 subdir-objects foreign dist-xz no-dist-gzip])
29
30 AC_CONFIG_HEADER([config.h])
31
32 # Only for developers
33 AM_MAINTAINER_MODE
34
35 # Silent build for automake >= 1.11
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38 AC_ARG_ENABLE(developer, [
39 Development options:
40 AC_HELP_STRING([--enable-developer], [turn on developers mode [default=no]])],
41 [
42   __IS_DEVELOPER=yes
43 ],
44 [
45 if test "x${enable_developer}" != "xyes"
46 then
47   __IS_DEVELOPER=no
48 else
49   __IS_DEVELOPER=yes
50 fi
51 ])
52
53 DX_HTML_FEATURE(ON)
54 DX_CHM_FEATURE(OFF)
55 DX_CHI_FEATURE(OFF)
56 DX_MAN_FEATURE(OFF)
57 DX_RTF_FEATURE(OFF)
58 DX_XML_FEATURE(OFF)
59 DX_PDF_FEATURE(OFF)
60 DX_PS_FEATURE(OFF)
61
62 DX_INIT_DOXYGEN($PACKAGE_NAME, doxygen.conf, doc/doxygen)
63
64 #  Debug support
65 # ----------------------------------------------------------------------
66
67 dnl Debugging option
68 dnl FIXME: official release convert default to 'no'
69 dnl
70
71 AC_ARG_ENABLE([debug-flags], [
72 Development options:
73 AC_HELP_STRING([--enable-debug-flags], [use compiler flags for debugging [default=no]])], [],
74 [
75 if test "x${enable_developer}" != "xyes"
76 then
77   enable_debug_flags="no"
78 else
79   enable_debug_flags="yes"
80 fi
81 ])
82
83 AC_ARG_ENABLE([debug-log], [
84 Development options:
85 AC_HELP_STRING([--enable-debug-log], [enable debugging messages [default=yes]])], [], [enable_debug_log="yes"])
86
87 if test "x${enable_debug_flags}" != "xno"
88 then
89   if test "x${enable_developer}" = "xyes"
90   then
91     CXXFLAGS="${CXXFLAGS} -Wall"
92     CFLAGS="${CFLAGS} -Wstrict-prototypes -Wall"
93   fi
94   __COMMONFLAGS="-g -O0 -Wextra -Wunused-value -Wunused-variable -Wunused-function -Wunused-label -Wcomment -Wmissing-braces -Wparentheses -Wreturn-type -Wswitch -Wstrict-aliasing -Wno-unused-parameter -Wformat -Wformat-security -DGQ_DEBUG_PATH_UTF8=1"
95   CXXFLAGS="${CXXFLAGS} ${__COMMONFLAGS}"
96   CFLAGS="${CFLAGS} ${__COMMONFLAGS} -Wimplicit-int -Werror-implicit-function-declaration"
97   __IS_DEBUG_FLAGS=yes
98 else
99   __IS_DEBUG_FLAGS=no
100 fi
101
102 if test "x${enable_debug_log}" != "xno"
103 then
104   AC_DEFINE(DEBUG,1,[Defined if Geeqie is compiled with debugging messages support])
105   __IS_DEBUG_LOG=yes
106 else
107   __IS_DEBUG_LOG=no
108 fi
109
110 AM_CONDITIONAL(DEBUG, test x$enable_debug_flags = xyes)
111
112 AC_ARG_ENABLE(deprecated, [
113 AC_HELP_STRING([--enable-deprecated], [turn off checking of deprecated functions [default=yes]])], [],
114 [
115 if test "x${enable_developer}" != "xyes"
116 then
117   enable_deprecated="no"
118 else
119   enable_deprecated="yes"
120 fi
121 ])
122
123 if test "x${enable_deprecated}" != "xno"
124 then
125   CXXFLAGS="${CXXFLAGS} -DGTK_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGDK_PIXBUF_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1"
126   CFLAGS="${CFLAGS} -DGTK_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGDK_PIXBUF_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1"
127   __IS_DEPRECATED=yes
128 else
129   __IS_DEPRECATED=no
130 fi
131
132
133 AC_ISC_POSIX
134 AC_PROG_CC
135 AC_PROG_CC_C99
136 AC_PROG_CXX
137 AC_STDC_HEADERS
138 AC_ARG_PROGRAM
139 AC_SYS_LARGEFILE
140 IT_PROG_INTLTOOL([0.35.0])
141
142
143 dnl checks for functions
144 AC_CHECK_FUNCS(strverscmp access fsync fflush)
145
146
147 # Check target architecture
148
149 # Check for Win32
150 AC_MSG_CHECKING([for some Win32 platform])
151 case "$target_os" in
152   mingw* | cygwin*)
153     platform_win32=yes
154     AC_DEFINE(PLATFORM_WIN32, 1, [Build on win32 OS])
155     ;;
156   *)
157     platform_win32=no
158     ;;
159 esac
160 AC_MSG_RESULT([$platform_win32])
161 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
162
163 AC_MSG_CHECKING([for native Win32])
164 case "$target_os" in
165   mingw*)
166     os_win32=yes
167     AC_DEFINE(OS_WIN32, 1, [Build on native win32 OS])
168     os_unix=no
169     PATHSEP=';'
170     ;;
171   *)
172     os_win32=no
173     os_unix=yes
174     PATHSEP=':'
175     ;;
176 esac
177 AC_MSG_RESULT([$os_win32])
178 AC_SUBST(PATHSEP)
179 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
180 AM_CONDITIONAL(OS_UNIX, test "$os_unix" = "yes")
181
182 if test "$os_win32" = "yes"; then
183   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
184   AC_CHECK_TOOL(WINDRES, windres, :)
185 else
186   WINDRES=":"
187 fi
188
189 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
190 AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
191 AC_SUBST(WINDRES)
192
193 dnl reasonable guesses for where stuff is installed
194 if test "x$prefix" = "xNONE"; then
195   prefix="/usr/local"
196 else
197   prefix=$prefix
198 fi
199
200 AM_PATH_GLIB_2_0(2.24.0,,AC_MSG_ERROR(GLIB >= 2.24.0 not installed.))
201 AC_ARG_ENABLE([gtk3], AC_HELP_STRING([--enable-gtk3], [use gtk3 instead of gtk2]),[gtk3="${enableval}"], [gtk3=m4_ifdef([AM_PATH_GTK_3_0], m4_ifdef([AM_PATH_GTK_2_0], [no], [auto]), [no])])
202
203 if test x$gtk3 = xyes; then
204     AC_MSG_WARN("Gtk3 enabled")
205     m4_ifdef([AM_PATH_GTK_3_0], [AM_PATH_GTK_3_0(3.0.0,,AC_MSG_ERROR(GTK+ >= 3.0.0 not installed.))])
206 fi
207
208 if test x$gtk3 = xno; then
209     m4_ifdef([AM_PATH_GTK_2_0], [AM_PATH_GTK_2_0(2.20.0,,AC_MSG_ERROR(GTK+ >= 2.20.0 not installed.))])
210     true
211 fi
212
213 threads="auto"
214 AC_ARG_ENABLE([threads],
215   AC_HELP_STRING([--disable-threads], [disable thread support]), [threads="${enableval}"])
216
217 have_gthread="no"
218 if test "x${threads}" != "xno" ; then
219   PKG_CHECK_MODULES(GTHREAD, [gthread-2.0], have_gthread="yes", [AC_MSG_WARN("No thread support in glib")])
220 fi
221
222 if test "x$have_gthread" != "xno"; then
223         AC_DEFINE(HAVE_GTHREAD, 1, Define if you have gthread library)
224         GLIB_CFLAGS="$GTHREAD_CFLAGS"
225         GLIB_LIBS="$GTHREAD_LIBS"
226 fi
227
228
229 AC_PATH_PROGS(GDK_PIXBUF_CSOURCE, "gdk-pixbuf-csource")
230 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
231
232 AC_ARG_WITH(readmedir, [  --with-readmedir=DIR    install path for readme files],
233             readmedir=$withval, readmedir="$prefix/share/doc/geeqie-$VERSION")
234 AC_ARG_WITH(htmldir, [  --with-htmldir=DIR      install path for html files],
235             htmldir=$withval, htmldir="$readmedir/html")
236
237 AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$readmedir", [Location of documentation files])
238 AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$htmldir", [Location of html documentation])
239
240 AC_PATH_PROG(GNOME_DOC_TOOL, gnome-doc-tool)
241
242 AC_SUBST(readmedir)
243 AC_SUBST(htmldir)
244
245 eval "eval appdir=${datadir}/${PACKAGE}"
246 AC_DEFINE_UNQUOTED([GQ_APP_DIR], "$appdir", [Location of application data])
247 AC_SUBST(appdir)
248
249 eval "eval gq_bindir=${prefix}/lib/${PACKAGE}"
250 AC_DEFINE_UNQUOTED([GQ_BIN_DIR], "$gq_bindir", [Location of helper scripts and executables])
251 AC_SUBST(gq_bindir)
252
253 #  LIRC support
254 # ----------------------------------------------------------------------
255
256 dnl Check for LIRC client support
257 AC_MSG_CHECKING(if LIRC support is enabled)
258 lirc=no
259 AC_ARG_ENABLE([lirc],
260   AC_HELP_STRING([--disable-lirc], [disable lirc support (auto)]),
261 [
262 if test "x${enableval}" = "xyes" -a "x$GCC" = "xyes"; then
263   AC_MSG_RESULT(yes)
264   lirc=yes
265 else
266   AC_MSG_RESULT(no)
267   lirc=no
268 fi], AC_MSG_RESULT(no))
269
270
271 AC_ARG_WITH(lirc-prefix,
272 [  --with-lirc-prefix=PATH Prefix where LIRC is installed],
273 [
274 for dir in `echo "$withval" | tr : ' '`; do
275   if test -d $dir/lib; then CXXFLAGS="$CXXFLAGS -L$dir/lib"; fi
276   if test -d $dir/include; then CXXFLAGS="$CXXFLAGS -I$dir/include"; fi
277   done
278 ])
279
280 HAVE_LIRC=no
281 if test "x${lirc}" != "xno" ; then
282   AC_CHECK_HEADER(lirc/lirc_client.h,
283     [AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=yes;LIBS=-llirc_client $LIBS;AC_DEFINE([HAVE_LIRC],[],[Define to 1 if LIRC must be used])],,)],)
284 fi
285 AM_CONDITIONAL(HAVE_LIRC, [test "x$HAVE_LIRC" = xyes])
286
287
288 #  LCMS support
289 # ----------------------------------------------------------------------
290
291 AC_ARG_ENABLE([lcms],
292   AC_HELP_STRING([--disable-lcms], [disable lcms support]),
293     [liblcms=$enableval], [liblcms=auto])
294
295 if test "x${liblcms}" != "xno"; then
296   PKG_CHECK_MODULES(LCMS, [lcms2 >= 2.0],
297     [
298       HAVE_LCMS=yes
299       AC_DEFINE(HAVE_LCMS, 1, [define to enable use of color profiles with lcms])
300       AC_DEFINE(HAVE_LCMS2, 1, [lcms2 is used])
301     ],
302     [
303     PKG_CHECK_MODULES(LCMS, [lcms >= 1.14],
304       [
305         HAVE_LCMS=yes
306         AC_DEFINE(HAVE_LCMS, 1, [define to enable use of color profiles with lcms])
307       ],
308       [
309         HAVE_LCMS=no
310         AC_MSG_WARN([$LCMS_PKG_ERRORS])
311       ])
312     ])
313 else
314   HAVE_LCMS=disabled
315 fi
316
317 AM_CONDITIONAL(HAVE_LCMS, [test "x$HAVE_LCMS" = xyes])
318 AC_SUBST(LCMS_CFLAGS)
319 AC_SUBST(LCMS_LIBS)
320
321 #  libjpeg support
322 # ----------------------------------------------------------------------
323
324 AC_ARG_ENABLE([jpeg],
325   AC_HELP_STRING([--disable-jpeg], [disable direct jpeg support]),
326     [libjpeg=$enableval], [libjpeg=auto])
327
328 if test "x${libjpeg}" != "xno"; then
329   AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
330       HAVE_JPEG=yes
331       JPEG_LIBS=-ljpeg
332       AC_DEFINE(HAVE_JPEG, 1, [define to enable use of custom jpeg loader]),
333       HAVE_JPEG=no)
334 else
335   HAVE_JPEG=disabled
336 fi
337
338 AM_CONDITIONAL(HAVE_JPEG, [test "x$HAVE_JPEG" = xyes])
339 AC_SUBST(JPEG_CFLAGS)
340 AC_SUBST(JPEG_LIBS)
341
342
343 #  libtiff support
344 # ----------------------------------------------------------------------
345
346 AC_ARG_ENABLE([tiff],
347   AC_HELP_STRING([--disable-tiff], [disable direct tiff support]),
348     [libtiff=$enableval], [libtiff=auto])
349
350 if test "x${libtiff}" != "xno"; then
351   AC_CHECK_LIB(tiff, TIFFClientOpen,
352       HAVE_TIFF=yes
353       TIFF_LIBS=-ltiff
354       AC_DEFINE(HAVE_TIFF, 1, [define to enable use of custom tiff loader]),
355       HAVE_TIFF=no)
356 else
357   HAVE_TIFF=disabled
358 fi
359
360 AM_CONDITIONAL(HAVE_TIFF, [test "x$HAVE_TIFF" = xyes])
361 AC_SUBST(TIFF_CFLAGS)
362 AC_SUBST(TIFF_LIBS)
363
364 #  libffmpegthumbnailer support
365 # ----------------------------------------------------------------------
366
367 AC_ARG_ENABLE([ffmpegthumbnailer],
368   AC_HELP_STRING([--disable-ffmpegthumbnailer], [disable ffmpegthumbnailer support for generating thumbnails of video files]),
369     [ffmpegthumbnailer=$enableval], [ffmpegthumbnailer=auto])
370
371 if test "x${ffmpegthumbnailer}" != "xno"; then
372   PKG_CHECK_MODULES(FFMPEGTHUMBNAILER, [libffmpegthumbnailer >= 2.1.0],
373     [
374       HAVE_FFMPEGTHUMBNAILER=yes
375       AC_DEFINE(HAVE_FFMPEGTHUMBNAILER, 1, [define to enable ffmpegthumbnailer support])
376       AC_CHECK_MEMBER([video_thumbnailer.prefer_embedded_metadata], [AC_DEFINE(HAVE_FFMPEGTHUMBNAILER_METADATA, 1, [define if ffmpegthumbnailer supports embedded metadata])], [], [[#include <libffmpegthumbnailer/videothumbnailerc.h>]])
377       AC_CHECK_MEMBER([image_data.image_data_width], [AC_DEFINE(HAVE_FFMPEGTHUMBNAILER_RGB, 1, [define if ffmpegthumbnailer supports raw RGB output])], [], [[#include <libffmpegthumbnailer/videothumbnailerc.h>]])
378       AC_CHECK_LIB([ffmpegthumbnailer], [video_thumbnailer_set_size], [AC_DEFINE(HAVE_FFMPEGTHUMBNAILER_WH, 1, [define if ffmpegthumbnailer supports specifying size by width/height])])
379     ],
380     [
381       HAVE_FFMPEGTHUMBNAILER=no
382     ])
383 else
384   HAVE_FFMPEGTHUMBNAILER=disabled
385 fi
386
387 AM_CONDITIONAL(HAVE_FFMPEGTHUMBNAILER, [test "x$HAVE_FFMPEGTHUMBNAILER" = xyes])
388 AC_SUBST(FFMPEGTHUMBNAILER_CFLAGS)
389 AC_SUBST(FFMPEGTHUMBNAILER_LIBS)
390
391 #  Exiv2 support
392 # ----------------------------------------------------------------------
393
394 AC_ARG_ENABLE([exiv2],
395   AC_HELP_STRING([--disable-exiv2], [disable exiv2 support]),
396     [libexiv2=$enableval], [libexiv2=auto])
397
398 if test "x${libexiv2}" != "xno"; then
399   PKG_CHECK_MODULES(EXIV2, [exiv2 >= 0.11],
400     [
401       HAVE_EXIV2=yes
402       AC_DEFINE(HAVE_EXIV2, 1, [define to enable exiv2 support])
403     ],
404     [
405       HAVE_EXIV2=no
406       AC_MSG_WARN([$EXIV2_PKG_ERRORS])
407     ])
408 else
409   HAVE_EXIV2=disabled
410 fi
411
412 AM_CONDITIONAL(HAVE_EXIV2, [test "x$HAVE_EXIV2" = xyes])
413 AC_SUBST(EXIV2_CFLAGS)
414 AC_SUBST(EXIV2_LIBS)
415
416
417 #  Gettext support
418 # ----------------------------------------------------------------------
419
420 dnl Set of available languages
421 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
422 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
423
424 GETTEXT_PACKAGE=$PACKAGE
425 AC_SUBST(GETTEXT_PACKAGE)
426 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[Name of gettext file])
427 AM_GLIB_GNU_GETTEXT
428 AM_GLIB_DEFINE_LOCALEDIR(GQ_LOCALEDIR)
429
430 AC_SUBST(CFLAGS)
431 AC_SUBST(CXXFLAGS)
432 AC_SUBST(CPPFLAGS)
433 AC_SUBST(LDFLAGS)
434
435
436 #  clutter and champlain support
437 # ----------------------------------------------------------------------
438
439 AC_ARG_ENABLE([map],
440   AC_HELP_STRING([--disable-map], [disable map support]),
441     [libgps=$enableval], [libgps=auto])
442
443 AC_ARG_ENABLE([gpu-accel],
444   AC_HELP_STRING([--disable-gpu-accel], [disable GPU acceleration support - experimental]),
445     [libclutter=$enableval], [libclutter=auto])
446
447 if test "x${libclutter}" != "xno" -a "x${gtk3}" != "xno"; then
448   PKG_CHECK_MODULES(CLUTTER, [clutter-1.0 >= 1.0],
449     [
450       PKG_CHECK_MODULES(CLUTTER_GTK, [clutter-gtk-1.0 >= 1.0],
451         [
452           HAVE_CLUTTER=yes
453           AC_DEFINE(HAVE_CLUTTER, 1, [define to enable use of clutter library])
454         ],
455         [
456           HAVE_CLUTTER=no
457           AC_MSG_WARN([$CLUTTER_GTK_PKG_ERRORS])
458         ])
459     ],
460     [
461       HAVE_CLUTTER=no
462       AC_MSG_WARN([$CLUTTER_PKG_ERRORS])
463     ])
464 else
465   HAVE_CLUTTER=disabled
466 fi
467
468 AC_SUBST(CLUTTER_CFLAGS)
469 AC_SUBST(CLUTTER_LIBS)
470 AC_SUBST(CLUTTER_GTK_CFLAGS)
471 AC_SUBST(CLUTTER_GTK_LIBS)
472
473
474 #  Libchamplain support - used for map facility
475 # ----------------------------------------------------------------------
476
477 if test "x${libgps}" != "xno" -a "x${HAVE_CLUTTER}" = "xyes"; then
478     if test "x${gtk3}" != "xno"; then
479       PKG_CHECK_MODULES(LIBCHAMPLAIN, [champlain-0.12 >= 0.12],
480         [
481           HAVE_LIBCHAMPLAIN=yes
482           AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [define to enable use of maps])
483         ],
484         [
485           HAVE_LIBCHAMPLAIN=no
486           AC_MSG_WARN([$LIBCHAMPLAIN_PKG_ERRORS])
487         ])
488     else
489       HAVE_LIBCHAMPLAIN=disabled
490     fi
491 else
492   HAVE_LIBCHAMPLAIN=disabled
493 fi
494
495 if test "x${libgps}" != "xno" -a "x${HAVE_LIBCHAMPLAIN}" = "xyes" ; then
496   PKG_CHECK_MODULES(LIBCHAMPLAIN_GTK, [champlain-gtk-0.12 >= 0.12],
497     [
498       HAVE_LIBCHAMPLAIN_GTK=yes
499       AC_DEFINE(HAVE_LIBCHAMPLAIN_GTK, 1, [define to enable use of maps])
500     ],
501     [
502       HAVE_LIBCHAMPLAIN_GTK=no
503       AC_MSG_WARN([$LIBCHAMPLAIN_GTK_PKG_ERRORS])
504     ])
505 else
506   HAVE_LIBCHAMPLAIN_GTK=disabled
507 fi
508
509 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN_GTK, [test "x$HAVE_LIBCHAMPLAIN_GTK" = xyes])
510 AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
511 AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
512
513 #  Lua support
514 # ----------------------------------------------------------------------
515
516 AC_ARG_ENABLE([lua],
517   AC_HELP_STRING([--disable-lua], [disable lua support]),
518     [liblua=$enableval], [liblua=auto])
519
520 if test "x${liblua}" != "xno"; then
521   PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
522     [
523       HAVE_LUA=yes
524       AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
525     ],
526     [
527       PKG_CHECK_MODULES(LUA, lua >= 5.1,
528          [
529            HAVE_LUA=yes
530            AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
531          ],
532          [
533             HAVE_LUA=no
534             AC_MSG_WARN([$LUA_PKG_ERRORS])
535          ])
536     ])
537 else
538   HAVE_LUA=disabled
539 fi
540
541 AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
542 AC_SUBST(LUA_CFLAGS)
543 AC_SUBST(LUA_LIBS)
544
545 #  Pdf support
546 # ----------------------------------------------------------------------
547
548 if test "x${gtk3}" != "xno"; then
549     AC_ARG_ENABLE([pdf],
550       AC_HELP_STRING([--disable-pdf], [disable pdf support]),
551         [libpdf=$enableval], [libpdf=auto])
552
553     if test "x${libpdf}" != "xno"; then
554       PKG_CHECK_MODULES(PDF, poppler-glib >= 0.62,
555         [
556           HAVE_PDF=yes
557           AC_DEFINE(HAVE_PDF, 1, [define to enable pdf support])
558         ],
559         [
560           HAVE_PDF=no
561           AC_MSG_WARN([$PDF_PKG_ERRORS])
562         ])
563     else
564         HAVE_PDF=disabled
565     fi
566 else
567     HAVE_PDF=disabled
568 fi
569
570 AM_CONDITIONAL(HAVE_PDF, [test "x$HAVE_PDF" = xyes])
571 AC_SUBST(PDF_CFLAGS)
572 AC_SUBST(PDF_LIBS)
573
574 #  Markdown support
575 # ----------------------------------------------------------------------
576
577 AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
578
579 # ----------------------------------------------------------------------
580
581 AH_TOP([
582 /** \file
583  * \short autogenerated definition by autoheader.
584  * \author Bruclik
585  */
586
587 /*
588  *  This file is a part of Geeqie project (http://www.geeqie.org/).
589  *  Copyright (C) 2008 - 2016 The Geeqie Team
590  *
591  *  This program is free software; you can redistribute it and/or modify
592  *  it under the terms of the GNU General Public License as published by
593  *  the Free Software Foundation; either version 2 of the License, or
594  *  (at your option) any later version.
595  *
596  *  This program is distributed in the hope that it will be useful,
597  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
598  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
599  *  GNU General Public License for more details.
600  */
601
602 #ifndef _INCLUDE_CONFIG_H
603 #define _INCLUDE_CONFIG_H
604 ])
605
606 AH_BOTTOM([#endif])
607
608 dnl Write the output
609 dnl
610
611 AC_CONFIG_FILES([
612     Makefile
613     src/Makefile
614     src/icons/Makefile
615     src/icons/svg/Makefile
616     po/Makefile.in
617     doc/Makefile
618     plugins/Makefile
619     plugins/symlink/Makefile
620     plugins/rotate/Makefile
621     plugins/ufraw/Makefile
622     plugins/geocode-parameters/Makefile
623     plugins/export-jpeg/Makefile
624     plugins/tethered-photography/Makefile
625     plugins/camera-import/Makefile
626     plugins/image-crop/Makefile
627     plugins/random-image/Makefile
628     geeqie.spec
629 ])
630
631 AC_OUTPUT
632 dnl Print the results
633 dnl
634
635 cat > config.report << END
636
637      Config results:
638     -=-=-=-=-=-=-=-=-
639
640 Package:
641   Name:          $PACKAGE_NAME
642   Version:       $PACKAGE_VERSION
643
644 Architecture:
645   UNIX:          $os_unix
646   Win32:         $platform_win32 (native: $os_win32)
647
648 Flags:
649   Geeqie:        $GQ_CFLAGS
650   DEFS:          $DEFS
651   CPPFLAGS:      $__CPPFLAGS
652   CFLAGS:        $CFLAGS
653   CXXFLAGS:      $CXXFLAGS
654   Gtk:           $GTK_CFLAGS
655   Glib:          $GLIB_CFLAGS
656   Thread:        $GTHREAD_LIBS
657   Others:        $JPEG_LIBS $TIFF_LIBS $LCMS_LIBS $EXIV2_LIBS $CLUTTER_LIBS $CLUTTER_GTK_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS
658
659 Localization:
660   NLS support:   $USE_NLS
661   LINGUAS:       $LINGUAS
662
663 Settings:
664   Developer:     $__IS_DEVELOPER
665   Debug flags:   $__IS_DEBUG_FLAGS
666   Debug log:     $__IS_DEBUG_LOG
667   Deprecated:    $__IS_DEPRECATED
668
669 Support:
670   LCMS:          $HAVE_LCMS
671   Exiv2:         $HAVE_EXIV2
672   Lirc:          $HAVE_LIRC
673   Clutter:       $HAVE_CLUTTER
674   Libchamplain:         $HAVE_LIBCHAMPLAIN
675   Libchamplain-gtk:     $HAVE_LIBCHAMPLAIN_GTK
676   Lua:           $HAVE_LUA
677   FFmpegthumbnailer:    $HAVE_FFMPEGTHUMBNAILER
678   Pdf:           $HAVE_PDF
679
680 Documentation:
681   Doxygen:       $DX_DOXYGEN
682   doc-tool:      $GNOME_DOC_TOOL
683
684 END
685
686 cat config.report
687 cat <<EOF
688
689   Now you can type "make" to build Geeqie
690   (or you take blue pill and the story ends :)
691
692 EOF