Applying website changes from release
[geeqie.git] / configure.in
index 9ab7cab..0b6bc1b 100644 (file)
@@ -15,10 +15,10 @@ 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], m4_esyscmd_s(git rev-parse --quiet --verify --short master), [geeqie-devel@lists.sourceforge.net], [], [http://www.geeqie.org/])
+AC_INIT([geeqie], m4_esyscmd_s(git rev-parse --quiet --verify --short HEAD), [geeqie-devel@lists.sourceforge.net], [], [http://www.geeqie.org/])
 
 # Add -Werror to the default CFLAGS
-CFLAGS+=" -Werror -Wno-error=deprecated-declarations"
+CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
 
 # Check for rightly dirs
 AC_CONFIG_SRCDIR([src/main.c])
@@ -132,6 +132,7 @@ fi
 
 AC_ISC_POSIX
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CXX
 AC_STDC_HEADERS
 AC_ARG_PROGRAM
@@ -365,6 +366,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
 # ----------------------------------------------------------------------
@@ -415,34 +442,30 @@ AC_SUBST(LDFLAGS)
 # ----------------------------------------------------------------------
 
 AC_ARG_ENABLE([map],
-  AC_HELP_STRING([--enable-map], [enable map support]),
-    [libgps=$enableval], [libgps=no])
+  AC_HELP_STRING([--disable-map], [disable map support]),
+    [libgps=$enableval], [libgps=auto])
 
 AC_ARG_ENABLE([gpu-accel],
-  AC_HELP_STRING([--enable-gpu-accel], [enable GPU acceleration support - experimental]),
+  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],
+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],
         [
-          PKG_CHECK_MODULES(CLUTTER_GTK, [clutter-gtk-1.0 >= 1.0],
-            [
-              HAVE_CLUTTER=yes
-              AC_DEFINE(HAVE_CLUTTER, 1, [define to enable use of clutter library])
-            ],
-            [
-              HAVE_CLUTTER=no
-              AC_MSG_WARN([$CLUTTER_GTK_PKG_ERRORS])
-            ])
+          HAVE_CLUTTER=yes
+          AC_DEFINE(HAVE_CLUTTER, 1, [define to enable use of clutter library])
         ],
         [
           HAVE_CLUTTER=no
-          AC_MSG_WARN([$CLUTTER_PKG_ERRORS])
+          AC_MSG_WARN([$CLUTTER_GTK_PKG_ERRORS])
         ])
-    else
-      HAVE_CLUTTER=disabled
-    fi
+    ],
+    [
+      HAVE_CLUTTER=no
+      AC_MSG_WARN([$CLUTTER_PKG_ERRORS])
+    ])
 else
   HAVE_CLUTTER=disabled
 fi
@@ -456,7 +479,7 @@ AC_SUBST(CLUTTER_GTK_LIBS)
 #  Libchamplain support - used for map facility
 # ----------------------------------------------------------------------
 
-if test "x${libgps}" = "xyes" -a "x${HAVE_CLUTTER}" = "xyes"; then
+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],
         [
@@ -474,7 +497,7 @@ 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
@@ -517,6 +540,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([
@@ -561,6 +589,7 @@ AC_CONFIG_FILES([
     plugins/rotate/Makefile
     plugins/ufraw/Makefile
     plugins/import/Makefile
+    plugins/geocode-parameters/Makefile
     geeqie.spec
 ])
 
@@ -610,6 +639,7 @@ Support:
   Libchamplain:                $HAVE_LIBCHAMPLAIN
   Libchamplain-gtk:    $HAVE_LIBCHAMPLAIN_GTK
   Lua:          $HAVE_LUA
+  FFmpegthumbnailer:   $HAVE_FFMPEGTHUMBNAILER
 
 Documentation:
   Doxygen:       $DX_DOXYGEN