# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.64)
-AC_INIT(viking, 1.6, , viking, http://viking.sf.net/)
+AC_INIT(viking, 1.6.1, , viking, http://viking.sf.net/)
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip subdir-objects])
dnl AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([src/config.h])
esac
AM_CONDITIONAL([SQLITE], [test x$ac_cv_enable_mbtiles = xyes])
+# Standard compression is handled by libz
+# libzip enables a friendlier file based interface
+# libzip itself depends on libz (which is required in the Viking build ATM)
+# ZIP
+AC_ARG_ENABLE(zip, AC_HELP_STRING([--enable-zip],
+ [enable zip support (default is enable).]),
+ [ac_cv_enable_zip=$enableval],
+ [ac_cv_enable_zip=yes])
+AC_CACHE_CHECK([whether to enable zip Support],
+ [ac_cv_enable_zip], [ac_cv_enable_zip=yes])
+case $ac_cv_enable_zip in
+ yes)
+ # NB As far as I can tell libzip doesn't provide any versioning info within the header code itself
+ # Thus supporting old versions via simple #if #else #endif directives is seemingly not possible
+ # Resort to checking versioning only via pkgconfig
+ PKG_CHECK_MODULES([LIBZIP], [libzip >= 0.11],
+ [ AC_CHECK_HEADERS([zip.h],[],[AC_MSG_ERROR([zip.h is needed but not found - you will need to install package 'libzip-dev' or similar. The feature can be disabled with --disable-zip])])
+ AC_CHECK_LIB(zip, [main], [], [AC_MSG_ERROR([libzip is needed but not found.])]) ],
+ [ AC_MSG_WARN([libzip version needs to be at least 0.11, use of libzip is disabled])
+ ac_cv_enable_zip=no ]
+ )
+ ;;
+esac
+AM_CONDITIONAL([ZIP], [test x$ac_cv_enable_zip = xyes])
+
# Mapnik rendering layer
AC_ARG_ENABLE(mapnik, AC_HELP_STRING([--enable-mapnik],
[enable Mapnik (default is enable)]),
AC_CHECK_PROG([HAVE_SCROLLKEEPER],scrollkeeper-config,"yes")
AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" == "yes" )
+ISODATE=`date +%Y-%m-%d`
+AC_SUBST(ISODATE)
+
# Configuration
AC_CONFIG_FILES([
Makefile
echo "bzip2 Support : $ac_cv_enable_bzip2"
echo "File Magic Support : $ac_cv_enable_magic"
echo "MBTiles Support (SQLite3) : $ac_cv_enable_mbtiles"
+echo "Zip File Support (with libzip) : $ac_cv_enable_zip"
echo "Mapnik Rendering Support (C++) : $ac_cv_enable_mapnik"
echo "Size of map cache (in memory) : ${VIK_CONFIG_MAPCACHE_SIZE}"
echo "Age of tiles (in seconds) : ${VIK_CONFIG_DEFAULT_TILE_AGE}"