Preparing release
[geeqie.git] / configure.ac
index 65df946..21925e0 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.  -*- Autoconf
  -*-
 
 dnl This file is a part of Geeqie project (http://www.geeqie.org/).
-dnl Copyright (C) 2008 - 2018 The Geeqie Team
+dnl Copyright (C) 2008 - 2020 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,7 +15,7 @@ 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 HEAD), [geeqie@freelists.org], [], [http://www.geeqie.org/])
+AC_INIT([geeqie], 1.6, [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"
@@ -25,7 +25,7 @@ AC_CONFIG_SRCDIR([src/main.c])
 
 AC_CONFIG_AUX_DIR(auxdir)
 # Require Automake 1.14 for %reldir% support
-AM_INIT_AUTOMAKE([1.14.1 subdir-objects foreign dist-xz no-dist-gzip])
+AM_INIT_AUTOMAKE([1.14.1 subdir-objects foreign dist-xz no-dist-gzip tar-ustar])
 
 AC_CONFIG_HEADER([config.h])
 
@@ -190,6 +190,8 @@ AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
 AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
 AC_SUBST(WINDRES)
 
+AM_CONDITIONAL([EXTERNAL_PREFIX], [test "x$prefix" != "xNONE"])
+
 dnl reasonable guesses for where stuff is installed
 if test "x$prefix" = "xNONE"; then
   prefix="/usr/local"
@@ -242,7 +244,7 @@ AC_ARG_WITH(htmldir, [  --with-htmldir=DIR      install path for html files],
 AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$readmedir", [Location of documentation files])
 AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$htmldir", [Location of html documentation])
 
-AC_PATH_PROG(GNOME_DOC_TOOL, gnome-doc-tool)
+AC_PATH_PROG(GNOME_DOC_TOOL, yelp-build)
 
 AC_SUBST(readmedir)
 AC_SUBST(htmldir)
@@ -523,22 +525,29 @@ AC_ARG_ENABLE([lua],
     [liblua=$enableval], [liblua=auto])
 
 if test "x${liblua}" != "xno"; then
-  PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+  PKG_CHECK_MODULES(LUA, lua5.3 >= 5.3,
     [
       HAVE_LUA=yes
       AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
     ],
     [
-      PKG_CHECK_MODULES(LUA, lua >= 5.1,
-        [
-          HAVE_LUA=yes
-          AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
-        ],
-        [
-           HAVE_LUA=no
-           AC_MSG_WARN([$LUA_PKG_ERRORS])
-        ])
-    ])
+     PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+       [
+        HAVE_LUA=yes
+        AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+       ],
+       [
+        PKG_CHECK_MODULES(LUA, lua >= 5.1,
+           [
+             HAVE_LUA=yes
+             AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+           ],
+           [
+              HAVE_LUA=no
+              AC_MSG_WARN([$LUA_PKG_ERRORS])
+           ])
+       ])
+     ])
 else
   HAVE_LUA=disabled
 fi
@@ -626,6 +635,31 @@ AM_CONDITIONAL(HAVE_WEBP, [test "x$HAVE_WEBP" = xyes])
 AC_SUBST(WEBP_CFLAGS)
 AC_SUBST(WEBP_LIBS)
 
+#  J2K support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([j2k],
+  AC_HELP_STRING([--disable-j2k], [disable j2k support]),
+    [libopenjp2=$enableval], [libopenjp2=auto])
+
+if test "x${libopenjp2}" != "xno"; then
+  PKG_CHECK_MODULES(J2K, libopenjp2 >= 2.3.0,
+    [
+      HAVE_J2K=yes
+      AC_DEFINE(HAVE_J2K, 1, [define to enable j2k support])
+    ],
+    [
+      HAVE_J2K=no
+      AC_MSG_WARN([$J2K_PKG_ERRORS])
+    ])
+else
+    HAVE_J2K=disabled
+fi
+
+AM_CONDITIONAL(HAVE_J2K, [test "x$HAVE_J2K" = xyes])
+AC_SUBST(J2K_CFLAGS)
+AC_SUBST(J2K_LIBS)
+
 #  DjVu support
 # ----------------------------------------------------------------------
 
@@ -720,6 +754,7 @@ AC_CONFIG_FILES([
     plugins/camera-import/Makefile
     plugins/image-crop/Makefile
     plugins/random-image/Makefile
+    plugins/lens/Makefile
     geeqie.spec
 ])
 
@@ -774,6 +809,7 @@ Support:
   HEIF:                 $HAVE_HEIF
   WebP:                 $HAVE_WEBP
   DjVu:                 $HAVE_DJVU
+  J2K:          $HAVE_J2K
 
 Documentation:
   Doxygen:       $DX_DOXYGEN