1 dnl Process this file with autoconf to produce a configure script. -*- Autoconf
4 dnl This file is a part of Geeqie project (http://www.geeqie.org/).
5 dnl Copyright (C) 2008 - 2019 The Geeqie Team
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.
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.
18 AC_INIT([geeqie], 1.5, [https://github.com/BestImageViewer/geeqie/issues], [], [http://www.geeqie.org/])
20 # Add -Werror to the default CFLAGS
21 CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
23 # Check for rightly dirs
24 AC_CONFIG_SRCDIR([src/main.c])
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])
30 AC_CONFIG_HEADER([config.h])
35 # Silent build for automake >= 1.11
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
38 AC_ARG_ENABLE(developer, [
40 AC_HELP_STRING([--enable-developer], [turn on developers mode [default=no]])],
45 if test "x${enable_developer}" != "xyes"
62 DX_INIT_DOXYGEN($PACKAGE_NAME, doxygen.conf, doc/doxygen)
65 # ----------------------------------------------------------------------
68 dnl FIXME: official release convert default to 'no'
71 AC_ARG_ENABLE([debug-flags], [
73 AC_HELP_STRING([--enable-debug-flags], [use compiler flags for debugging [default=no]])], [],
75 if test "x${enable_developer}" != "xyes"
77 enable_debug_flags="no"
79 enable_debug_flags="yes"
83 AC_ARG_ENABLE([debug-log], [
85 AC_HELP_STRING([--enable-debug-log], [enable debugging messages [default=yes]])], [], [enable_debug_log="yes"])
87 if test "x${enable_debug_flags}" != "xno"
89 if test "x${enable_developer}" = "xyes"
91 CXXFLAGS="${CXXFLAGS} -Wall"
92 CFLAGS="${CFLAGS} -Wstrict-prototypes -Wall"
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"
102 if test "x${enable_debug_log}" != "xno"
104 AC_DEFINE(DEBUG,1,[Defined if Geeqie is compiled with debugging messages support])
110 AM_CONDITIONAL(DEBUG, test x$enable_debug_flags = xyes)
112 AC_ARG_ENABLE(deprecated, [
113 AC_HELP_STRING([--enable-deprecated], [turn off checking of deprecated functions [default=yes]])], [],
115 if test "x${enable_developer}" != "xyes"
117 enable_deprecated="no"
119 enable_deprecated="yes"
123 if test "x${enable_deprecated}" != "xno"
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"
140 IT_PROG_INTLTOOL([0.35.0])
143 dnl checks for functions
144 AC_CHECK_FUNCS(strverscmp access fsync fflush)
147 # Check target architecture
150 AC_MSG_CHECKING([for some Win32 platform])
154 AC_DEFINE(PLATFORM_WIN32, 1, [Build on win32 OS])
160 AC_MSG_RESULT([$platform_win32])
161 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
163 AC_MSG_CHECKING([for native Win32])
167 AC_DEFINE(OS_WIN32, 1, [Build on native win32 OS])
177 AC_MSG_RESULT([$os_win32])
179 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
180 AM_CONDITIONAL(OS_UNIX, test "$os_unix" = "yes")
182 if test "$os_win32" = "yes"; then
183 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
184 AC_CHECK_TOOL(WINDRES, windres, :)
189 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
190 AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
193 dnl reasonable guesses for where stuff is installed
194 if test "x$prefix" = "xNONE"; then
200 AM_PATH_GLIB_2_0(2.52.0,,AC_MSG_ERROR(GLIB >= 2.52.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])])
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.))])
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.))])
214 AC_ARG_ENABLE([threads],
215 AC_HELP_STRING([--disable-threads], [disable thread support]), [threads="${enableval}"])
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")])
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"
229 AC_PATH_PROGS(GDK_PIXBUF_CSOURCE, "gdk-pixbuf-csource")
230 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
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")
237 AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$readmedir", [Location of documentation files])
238 AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$htmldir", [Location of html documentation])
240 AC_PATH_PROG(GNOME_DOC_TOOL, gnome-doc-tool)
245 eval "eval appdir=${datadir}/${PACKAGE}"
246 AC_DEFINE_UNQUOTED([GQ_APP_DIR], "$appdir", [Location of application data])
249 eval "eval gq_bindir=${prefix}/lib/${PACKAGE}"
250 AC_DEFINE_UNQUOTED([GQ_BIN_DIR], "$gq_bindir", [Location of helper scripts and executables])
254 # ----------------------------------------------------------------------
256 dnl Check for LIRC client support
257 AC_MSG_CHECKING(if LIRC support is enabled)
259 AC_ARG_ENABLE([lirc],
260 AC_HELP_STRING([--disable-lirc], [disable lirc support (auto)]),
262 if test "x${enableval}" = "xyes" -a "x$GCC" = "xyes"; then
268 fi], AC_MSG_RESULT(no))
271 AC_ARG_WITH(lirc-prefix,
272 [ --with-lirc-prefix=PATH Prefix where LIRC is installed],
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
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])],,)],)
285 AM_CONDITIONAL(HAVE_LIRC, [test "x$HAVE_LIRC" = xyes])
289 # ----------------------------------------------------------------------
291 AC_ARG_ENABLE([lcms],
292 AC_HELP_STRING([--disable-lcms], [disable lcms support]),
293 [liblcms=$enableval], [liblcms=auto])
295 if test "x${liblcms}" != "xno"; then
296 PKG_CHECK_MODULES(LCMS, [lcms2 >= 2.0],
299 AC_DEFINE(HAVE_LCMS, 1, [define to enable use of color profiles with lcms])
300 AC_DEFINE(HAVE_LCMS2, 1, [lcms2 is used])
303 PKG_CHECK_MODULES(LCMS, [lcms >= 1.14],
306 AC_DEFINE(HAVE_LCMS, 1, [define to enable use of color profiles with lcms])
310 AC_MSG_WARN([$LCMS_PKG_ERRORS])
317 AM_CONDITIONAL(HAVE_LCMS, [test "x$HAVE_LCMS" = xyes])
318 AC_SUBST(LCMS_CFLAGS)
322 # ----------------------------------------------------------------------
324 AC_ARG_ENABLE([jpeg],
325 AC_HELP_STRING([--disable-jpeg], [disable direct jpeg support]),
326 [libjpeg=$enableval], [libjpeg=auto])
328 if test "x${libjpeg}" != "xno"; then
329 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
332 AC_DEFINE(HAVE_JPEG, 1, [define to enable use of custom jpeg loader]),
338 AM_CONDITIONAL(HAVE_JPEG, [test "x$HAVE_JPEG" = xyes])
339 AC_SUBST(JPEG_CFLAGS)
344 # ----------------------------------------------------------------------
346 AC_ARG_ENABLE([tiff],
347 AC_HELP_STRING([--disable-tiff], [disable direct tiff support]),
348 [libtiff=$enableval], [libtiff=auto])
350 if test "x${libtiff}" != "xno"; then
351 AC_CHECK_LIB(tiff, TIFFClientOpen,
354 AC_DEFINE(HAVE_TIFF, 1, [define to enable use of custom tiff loader]),
360 AM_CONDITIONAL(HAVE_TIFF, [test "x$HAVE_TIFF" = xyes])
361 AC_SUBST(TIFF_CFLAGS)
364 # libffmpegthumbnailer support
365 # ----------------------------------------------------------------------
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])
371 if test "x${ffmpegthumbnailer}" != "xno"; then
372 PKG_CHECK_MODULES(FFMPEGTHUMBNAILER, [libffmpegthumbnailer >= 2.1.0],
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])])
381 HAVE_FFMPEGTHUMBNAILER=no
384 HAVE_FFMPEGTHUMBNAILER=disabled
387 AM_CONDITIONAL(HAVE_FFMPEGTHUMBNAILER, [test "x$HAVE_FFMPEGTHUMBNAILER" = xyes])
388 AC_SUBST(FFMPEGTHUMBNAILER_CFLAGS)
389 AC_SUBST(FFMPEGTHUMBNAILER_LIBS)
392 # ----------------------------------------------------------------------
394 AC_ARG_ENABLE([exiv2],
395 AC_HELP_STRING([--disable-exiv2], [disable exiv2 support]),
396 [libexiv2=$enableval], [libexiv2=auto])
398 if test "x${libexiv2}" != "xno"; then
399 PKG_CHECK_MODULES(EXIV2, [exiv2 >= 0.11],
402 AC_DEFINE(HAVE_EXIV2, 1, [define to enable exiv2 support])
406 AC_MSG_WARN([$EXIV2_PKG_ERRORS])
412 AM_CONDITIONAL(HAVE_EXIV2, [test "x$HAVE_EXIV2" = xyes])
413 AC_SUBST(EXIV2_CFLAGS)
418 # ----------------------------------------------------------------------
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'])
424 GETTEXT_PACKAGE=$PACKAGE
425 AC_SUBST(GETTEXT_PACKAGE)
426 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[Name of gettext file])
428 AM_GLIB_DEFINE_LOCALEDIR(GQ_LOCALEDIR)
436 # clutter and champlain support
437 # ----------------------------------------------------------------------
440 AC_HELP_STRING([--disable-map], [disable map support]),
441 [libgps=$enableval], [libgps=auto])
443 AC_ARG_ENABLE([gpu-accel],
444 AC_HELP_STRING([--disable-gpu-accel], [disable GPU acceleration support - experimental]),
445 [libclutter=$enableval], [libclutter=auto])
447 if test "x${libclutter}" != "xno" -a "x${gtk3}" != "xno"; then
448 PKG_CHECK_MODULES(CLUTTER, [clutter-1.0 >= 1.0],
450 PKG_CHECK_MODULES(CLUTTER_GTK, [clutter-gtk-1.0 >= 1.0],
453 AC_DEFINE(HAVE_CLUTTER, 1, [define to enable use of clutter library])
457 AC_MSG_WARN([$CLUTTER_GTK_PKG_ERRORS])
462 AC_MSG_WARN([$CLUTTER_PKG_ERRORS])
465 HAVE_CLUTTER=disabled
468 AC_SUBST(CLUTTER_CFLAGS)
469 AC_SUBST(CLUTTER_LIBS)
470 AC_SUBST(CLUTTER_GTK_CFLAGS)
471 AC_SUBST(CLUTTER_GTK_LIBS)
474 # Libchamplain support - used for map facility
475 # ----------------------------------------------------------------------
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],
481 HAVE_LIBCHAMPLAIN=yes
482 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [define to enable use of maps])
486 AC_MSG_WARN([$LIBCHAMPLAIN_PKG_ERRORS])
489 HAVE_LIBCHAMPLAIN=disabled
492 HAVE_LIBCHAMPLAIN=disabled
495 if test "x${libgps}" != "xno" -a "x${HAVE_LIBCHAMPLAIN}" = "xyes" ; then
496 PKG_CHECK_MODULES(LIBCHAMPLAIN_GTK, [champlain-gtk-0.12 >= 0.12],
498 HAVE_LIBCHAMPLAIN_GTK=yes
499 AC_DEFINE(HAVE_LIBCHAMPLAIN_GTK, 1, [define to enable use of maps])
502 HAVE_LIBCHAMPLAIN_GTK=no
503 AC_MSG_WARN([$LIBCHAMPLAIN_GTK_PKG_ERRORS])
506 HAVE_LIBCHAMPLAIN_GTK=disabled
509 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN_GTK, [test "x$HAVE_LIBCHAMPLAIN_GTK" = xyes])
510 AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
511 AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
514 # ----------------------------------------------------------------------
517 AC_HELP_STRING([--disable-lua], [disable lua support]),
518 [liblua=$enableval], [liblua=auto])
520 if test "x${liblua}" != "xno"; then
521 PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
524 AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
527 PKG_CHECK_MODULES(LUA, lua >= 5.1,
530 AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
534 AC_MSG_WARN([$LUA_PKG_ERRORS])
541 AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
546 # ----------------------------------------------------------------------
548 if test "x${gtk3}" != "xno"; then
550 AC_HELP_STRING([--disable-pdf], [disable pdf support]),
551 [libpdf=$enableval], [libpdf=auto])
553 if test "x${libpdf}" != "xno"; then
554 PKG_CHECK_MODULES(PDF, poppler-glib >= 0.62,
557 AC_DEFINE(HAVE_PDF, 1, [define to enable pdf support])
561 AC_MSG_WARN([$PDF_PKG_ERRORS])
570 AM_CONDITIONAL(HAVE_PDF, [test "x$HAVE_PDF" = xyes])
575 # ----------------------------------------------------------------------
577 AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
579 # ----------------------------------------------------------------------
583 * \short autogenerated definition by autoheader.
588 * This file is a part of Geeqie project (http://www.geeqie.org/).
589 * Copyright (C) 2008 - 2016 The Geeqie Team
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.
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.
602 #ifndef _INCLUDE_CONFIG_H
603 #define _INCLUDE_CONFIG_H
615 src/icons/svg/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
632 dnl Print the results
635 cat > config.report << END
642 Version: $PACKAGE_VERSION
646 Win32: $platform_win32 (native: $os_win32)
651 CPPFLAGS: $__CPPFLAGS
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
660 NLS support: $USE_NLS
664 Developer: $__IS_DEVELOPER
665 Debug flags: $__IS_DEBUG_FLAGS
666 Debug log: $__IS_DEBUG_LOG
667 Deprecated: $__IS_DEPRECATED
673 Clutter: $HAVE_CLUTTER
674 Libchamplain: $HAVE_LIBCHAMPLAIN
675 Libchamplain-gtk: $HAVE_LIBCHAMPLAIN_GTK
677 FFmpegthumbnailer: $HAVE_FFMPEGTHUMBNAILER
682 doc-tool: $GNOME_DOC_TOOL
689 Now you can type "make" to build Geeqie
690 (or you take blue pill and the story ends :)