Update installation script for metadata spelling
[geeqie.git] / configure.ac
index 799128b..bbd30fd 100644 (file)
@@ -1,7 +1,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 This file is a part of Geeqie project (https://www.geeqie.org/).
 dnl Copyright (C) 2008 - 2018 The Geeqie Team
 dnl
 dnl This program is free software; you can redistribute it and/or modify
@@ -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_translit(m4_esyscmd([if [ $(git tag --list 'v[1-9]*' --points-at HEAD | wc -c) -gt 0 ]; then git tag --list v[1-9]* --points-at HEAD | tail -n 1 | tr -d 'v' ; else git tag --list v[1-9]* | tail -n 1 | tr -d 'v' && echo "+git" && git log --max-count=1 --date=format:"%Y%m%d" --format="%ad" && echo "-" && git rev-parse --quiet --verify --short HEAD; fi ]), m4_newline), [geeqie@freelists.org], [], [http://www.geeqie.org/])
+AC_INIT([geeqie], m4_translit(m4_esyscmd([./version.sh]), m4_newline), [geeqie@freelists.org], [], [https://www.geeqie.org/])
 
 # Add -Werror to the default CFLAGS
 CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
@@ -393,6 +393,31 @@ AM_CONDITIONAL(HAVE_RAW, [test "x$HAVE_RAW" = xyes])
 AC_SUBST(RAW_CFLAGS)
 AC_SUBST(RAW_LIBS)
 
+#  libgspell support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([spell],
+  AC_HELP_STRING([--disable-spell], [disable libgspell support]),
+    [libgspell=$enableval], [libgspell=auto])
+
+if test "x${libgspell}" != "xno" -a "x${gtk3}" != "xno"; then
+  PKG_CHECK_MODULES(SPELL, [gspell-1 >= 1.6],
+    [
+      HAVE_SPELL=yes
+      AC_DEFINE(HAVE_SPELL, 1, [define to enable libgspell support])
+    ],
+    [
+      HAVE_SPELL=no
+      AC_MSG_WARN([$SPELL_PKG_ERRORS])
+    ])
+else
+  HAVE_SPELL=disabled
+fi
+
+AM_CONDITIONAL(HAVE_SPELL, [test "x$HAVE_SPELL" = xyes])
+AC_SUBST(SPELL_CFLAGS)
+AC_SUBST(SPELL_LIBS)
+
 #  libffmpegthumbnailer support
 # ----------------------------------------------------------------------
 
@@ -660,6 +685,31 @@ AM_CONDITIONAL(HAVE_WEBP, [test "x$HAVE_WEBP" = xyes])
 AC_SUBST(WEBP_CFLAGS)
 AC_SUBST(WEBP_LIBS)
 
+#  Libarchive support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([archive],
+  AC_HELP_STRING([--disable-archive], [disable archive support]),
+    [libarchive=$enableval], [libarchive=auto])
+
+if test "x${libarchive}" != "xno"; then
+  PKG_CHECK_MODULES(ARCHIVE, libarchive >= 3.4.0,
+    [
+      HAVE_ARCHIVE=yes
+      AC_DEFINE(HAVE_ARCHIVE, 1, [define to enable archive support])
+    ],
+    [
+      HAVE_ARCHIVE=no
+      AC_MSG_WARN([$ARCHIVE_PKG_ERRORS])
+    ])
+else
+    HAVE_ARCHIVE=disabled
+fi
+
+AM_CONDITIONAL(HAVE_ARCHIVE, [test "x$HAVE_ARCHIVE" = xyes])
+AC_SUBST(ARCHIVE_CFLAGS)
+AC_SUBST(ARCHIVE_LIBS)
+
 #  J2K support
 # ----------------------------------------------------------------------
 
@@ -710,10 +760,35 @@ AM_CONDITIONAL(HAVE_DJVU, [test "x$HAVE_DJVU" = xyes])
 AC_SUBST(DJVU_CFLAGS)
 AC_SUBST(DJVU_LIBS)
 
+#  JPEG XL support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([jpegxl],
+  AC_HELP_STRING([--disable-jpegxl], [disable jpeg xl support]),
+    [libjxl=$enableval], [libjxl=auto])
+
+if test "x${libjxl}" != "xno"; then
+  PKG_CHECK_MODULES(JPEGXL, libjxl >= 0.3.7,
+    [
+      HAVE_JPEGXL=yes
+      AC_DEFINE(HAVE_JPEGXL, 1, [define to enable JPEG XL support])
+    ],
+    [
+      HAVE_JPEGXL=no
+      AC_MSG_WARN([$JPEGXL_PKG_ERRORS])
+    ])
+else
+    HAVE_JPEGXL=disabled
+fi
+
+AM_CONDITIONAL(HAVE_JPEGXL, [test "x$HAVE_JPEGXL" = xyes])
+AC_SUBST(JPEGXL_CFLAGS)
+AC_SUBST(JPEGXL_LIBS)
+
 #  Markdown support
 # ----------------------------------------------------------------------
 
-AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
+AM_CONDITIONAL(HAVE_PANDOC, [ "$(command -v pandoc)" ])
 
 # _NL_TIME_FIRST_WEEKDAY support
 # note that it is an enum and not a define
@@ -739,7 +814,7 @@ AH_TOP([
  */
 
 /*
- *  This file is a part of Geeqie project (http://www.geeqie.org/).
+ *  This file is a part of Geeqie project (https://www.geeqie.org/).
  *  Copyright (C) 2008 - 2016 The Geeqie Team
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -772,7 +847,6 @@ AC_CONFIG_FILES([
     plugins/Makefile
     plugins/symlink/Makefile
     plugins/rotate/Makefile
-    plugins/ufraw/Makefile
     plugins/geocode-parameters/Makefile
     plugins/export-jpeg/Makefile
     plugins/tethered-photography/Makefile
@@ -809,7 +883,7 @@ Flags:
   Gtk:           $GTK_CFLAGS
   Glib:          $GLIB_CFLAGS
   Thread:        $GTHREAD_LIBS
-  Others:       $JPEG_LIBS $TIFF_LIBS $LCMS_LIBS $EXIV2_LIBS $CLUTTER_LIBS $CLUTTER_GTK_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS $RAW_LIBS
+  Others:       $JPEG_LIBS $TIFF_LIBS $LCMS_LIBS $EXIV2_LIBS $CLUTTER_LIBS $CLUTTER_GTK_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS $RAW_LIBS $JPEGXL_LIBS
 
 Localization:
   NLS support:   $USE_NLS
@@ -836,6 +910,9 @@ Support:
   DjVu:                 $HAVE_DJVU
   J2K:          $HAVE_J2K
   LibRaw:        $HAVE_RAW
+  Libjxl:        $HAVE_JPEGXL
+  Libarchive:    $HAVE_ARCHIVE
+  Spelling       $HAVE_SPELL
 
 Documentation:
   Doxygen:       $DX_DOXYGEN