Preparing stable version
[geeqie.git] / configure.in
index c5b726c..c71ae27 100644 (file)
@@ -1,8 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.  -*- Autoconf
  -*-
 
-dnl This file is a part of Geeqie project (http://geeqie.sourceforge.net/).
-dnl Copyright (C) 2008 - 2012 The Geeqie Team
+dnl This file is a part of Geeqie project (http://www.geeqie.org/).
+dnl Copyright (C) 2008 - 2016 The Geeqie Team
 dnl
 dnl This program is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -15,19 +15,26 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 
 AC_PREREQ(2.57)
-AC_INIT(geeqie, 1.1, geeqie-devel@lists.sourceforge.net)
+AC_INIT([geeqie], 1.4, [https://github.com/BestImageViewer/geeqie/issues], [], [http://www.geeqie.org/])
+
+# Add -Werror to the default CFLAGS
+CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
 
 # Check for rightly dirs
 AC_CONFIG_SRCDIR([src/main.c])
 
 AC_CONFIG_AUX_DIR(auxdir)
-AM_INIT_AUTOMAKE
+# Require Automake 1.14 for %reldir% support
+AM_INIT_AUTOMAKE([1.14.1 subdir-objects foreign])
 
 AC_CONFIG_HEADER([config.h])
 
 # Only for developers
 AM_MAINTAINER_MODE
 
+# Silent build for automake >= 1.11
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
 AC_ARG_ENABLE(developer, [
 Development options:
 AC_HELP_STRING([--enable-developer], [turn on developers mode [default=no]])],
@@ -125,6 +132,7 @@ fi
 
 AC_ISC_POSIX
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CXX
 AC_STDC_HEADERS
 AC_ARG_PROGRAM
@@ -190,16 +198,11 @@ else
 fi
 
 AM_PATH_GLIB_2_0(2.24.0,,AC_MSG_ERROR(GLIB >= 2.24.0 not installed.))
-AC_ARG_ENABLE([gtk3], AC_HELP_STRING([--disable-gtk3], [use gtk2 instead of gtk3]),[gtk3="${enableval}"], [gtk3=m4_ifdef([AM_PATH_GTK_3_0], [auto], [no])])
+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])])
 
 if test x$gtk3 == xyes; then
     AC_MSG_WARN("Gtk3 enabled")
     m4_ifdef([AM_PATH_GTK_3_0], [AM_PATH_GTK_3_0(3.0.0,,AC_MSG_ERROR(GTK+ >= 3.0.0 not installed.))])
-else
-    if test x$gtk3 != xno; then
-       AC_MSG_WARN("Gtk3 is preferred...")
-       m4_ifdef([AM_PATH_GTK_3_0], [AM_PATH_GTK_3_0(3.0.0,,[gtk3=no])])
-    fi
 fi
 
 if test x$gtk3 == xno; then
@@ -358,6 +361,32 @@ AM_CONDITIONAL(HAVE_TIFF, [test "x$HAVE_TIFF" = xyes])
 AC_SUBST(TIFF_CFLAGS)
 AC_SUBST(TIFF_LIBS)
 
+#  libffmpegthumbnailer support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([ffmpegthumbnailer],
+  AC_HELP_STRING([--disable-ffmpegthumbnailer], [disable ffmpegthumbnailer support for generating thumbnails of video files]),
+    [ffmpegthumbnailer=$enableval], [ffmpegthumbnailer=auto])
+
+if test "x${ffmpegthumbnailer}" != "xno"; then
+  PKG_CHECK_MODULES(FFMPEGTHUMBNAILER, [libffmpegthumbnailer >= 2.0.0],
+    [
+      HAVE_FFMPEGTHUMBNAILER=yes
+      AC_DEFINE(HAVE_FFMPEGTHUMBNAILER, 1, [define to enable ffmpegthumbnailer support])
+      AC_CHECK_MEMBER([video_thumbnailer.prefer_embedded_metadata], [AC_DEFINE(HAVE_FFMPEGTHUMBNAILER_METADATA, 1, [define if ffmpegthumbnailer supports embedded metadata])], [], [[#include <libffmpegthumbnailer/videothumbnailerc.h>]])
+      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>]])
+      AC_CHECK_LIB([ffmpegthumbnailer], [video_thumbnailer_set_size], [AC_DEFINE(HAVE_FFMPEGTHUMBNAILER_WH, 1, [define if ffmpegthumbnailer supports specifying size by width/height])])
+    ],
+    [
+      HAVE_FFMPEGTHUMBNAILER=no
+    ])
+else
+  HAVE_FFMPEGTHUMBNAILER=disabled
+fi
+
+AM_CONDITIONAL(HAVE_FFMPEGTHUMBNAILER, [test "x$HAVE_FFMPEGTHUMBNAILER" = xyes])
+AC_SUBST(FFMPEGTHUMBNAILER_CFLAGS)
+AC_SUBST(FFMPEGTHUMBNAILER_LIBS)
 
 #  Exiv2 support
 # ----------------------------------------------------------------------
@@ -404,14 +433,18 @@ AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
 
 
-#  clutter support - experimental
+#  clutter and champlain support
 # ----------------------------------------------------------------------
 
-AC_ARG_ENABLE([clutter],
-  AC_HELP_STRING([--enable-clutter], [enable clutter support - experimental]),
+AC_ARG_ENABLE([map],
+  AC_HELP_STRING([--disable-map], [disable map support]),
+    [libgps=$enableval], [libgps=auto])
+
+AC_ARG_ENABLE([gpu-accel],
+  AC_HELP_STRING([--disable-gpu-accel], [disable GPU acceleration support - experimental]),
     [libclutter=$enableval], [libclutter=auto])
 
-if test "x${libclutter}" = "xyes" -o "x${libgps}" = "xyes"; then
+if test "x${libclutter}" != "xno" -a "x${gtk3}" != "xno"; then
   PKG_CHECK_MODULES(CLUTTER, [clutter-1.0 >= 1.0],
     [
       PKG_CHECK_MODULES(CLUTTER_GTK, [clutter-gtk-1.0 >= 1.0],
@@ -423,7 +456,6 @@ if test "x${libclutter}" = "xyes" -o "x${libgps}" = "xyes"; then
           HAVE_CLUTTER=no
           AC_MSG_WARN([$CLUTTER_GTK_PKG_ERRORS])
         ])
-        
     ],
     [
       HAVE_CLUTTER=no
@@ -439,32 +471,32 @@ AC_SUBST(CLUTTER_GTK_CFLAGS)
 AC_SUBST(CLUTTER_GTK_LIBS)
 
 
-#  Libchamplain support - used for GPS map facility - experimental
+#  Libchamplain support - used for map facility
 # ----------------------------------------------------------------------
 
-AC_ARG_ENABLE([gps],
-  AC_HELP_STRING([--enable-gps], [enable GPS map support - experimental]),
-    [libgps=$enableval], [libgps=yes])
-
-if test "x${libgps}" = "xyes" -a "x${HAVE_CLUTTER}" = "xyes" ; then
-  PKG_CHECK_MODULES(LIBCHAMPLAIN, [champlain-0.12 >= 0.12],
-    [
-      HAVE_LIBCHAMPLAIN=yes
-      AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [define to enable use of GPS maps])
-    ],
-    [
-      HAVE_LIBCHAMPLAIN=no
-      AC_MSG_WARN([$LIBCHAMPLAIN_PKG_ERRORS])
-    ])
+if test "x${libgps}" != "xno" -a "x${HAVE_CLUTTER}" == "xyes"; then
+    if test "x${gtk3}" != "xno"; then
+      PKG_CHECK_MODULES(LIBCHAMPLAIN, [champlain-0.12 >= 0.12],
+        [
+          HAVE_LIBCHAMPLAIN=yes
+          AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [define to enable use of maps])
+        ],
+        [
+          HAVE_LIBCHAMPLAIN=no
+          AC_MSG_WARN([$LIBCHAMPLAIN_PKG_ERRORS])
+        ])
+    else
+      HAVE_LIBCHAMPLAIN=disabled
+    fi
 else
   HAVE_LIBCHAMPLAIN=disabled
 fi
 
-if test "x${libgps}" = "xyes" -a "x${HAVE_LIBCHAMPLAIN}" = "xyes" ; then
+if test "x${libgps}" != "xno" -a "x${HAVE_LIBCHAMPLAIN}" == "xyes" ; then
   PKG_CHECK_MODULES(LIBCHAMPLAIN_GTK, [champlain-gtk-0.12 >= 0.12],
     [
       HAVE_LIBCHAMPLAIN_GTK=yes
-      AC_DEFINE(HAVE_LIBCHAMPLAIN_GTK, 1, [define to enable use of GPS maps])
+      AC_DEFINE(HAVE_LIBCHAMPLAIN_GTK, 1, [define to enable use of maps])
     ],
     [
       HAVE_LIBCHAMPLAIN_GTK=no
@@ -503,6 +535,11 @@ AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
 AC_SUBST(LUA_CFLAGS)
 AC_SUBST(LUA_LIBS)
 
+#  Markdown support
+# ----------------------------------------------------------------------
+
+AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
+
 # ----------------------------------------------------------------------
 
 AH_TOP([
@@ -512,8 +549,8 @@ AH_TOP([
  */
 
 /*
- *  This file is a part of Geeqie project (http://geeqie.sourceforge.net/).
- *  Copyright (C) 2008 - 2012 The Geeqie Team
+ *  This file is a part of Geeqie project (http://www.geeqie.org/).
+ *  Copyright (C) 2008 - 2016 The Geeqie Team
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -547,6 +584,7 @@ AC_CONFIG_FILES([
     plugins/rotate/Makefile
     plugins/ufraw/Makefile
     plugins/import/Makefile
+    plugins/geocode-parameters/Makefile
     geeqie.spec
 ])
 
@@ -562,8 +600,6 @@ cat > config.report << END
 Package:
   Name:          $PACKAGE_NAME
   Version:       $PACKAGE_VERSION
-  Patch version: $GQ_PATCH_VERSION
-  Date:          $GQ_PATCH_DATE
 
 Architecture:
   UNIX:          $os_unix
@@ -598,10 +634,10 @@ Support:
   Libchamplain:                $HAVE_LIBCHAMPLAIN
   Libchamplain-gtk:    $HAVE_LIBCHAMPLAIN_GTK
   Lua:          $HAVE_LUA
+  FFmpegthumbnailer:   $HAVE_FFMPEGTHUMBNAILER
 
 Documentation:
-  Doxygen:       $DOXYGEN
-  Formats:       $doxy_formats_report
+  Doxygen:       $DX_DOXYGEN
   doc-tool:      $GNOME_DOC_TOOL
 
 END