]> git.street.me.uk Git - andy/viking.git/blobdiff - configure.ac
Some spelling fixes in a comment
[andy/viking.git] / configure.ac
index bd80c6773ceb733c1b0728180f5626a663b8b5bc..f1b26d703b2704daf74bed63c221005ce979da4a 100644 (file)
@@ -62,8 +62,6 @@ AC_C_CONST
 AC_TYPE_MODE_T
 
 # Checks for library functions or symbols
-AC_FUNC_STAT
-AC_FUNC_STRTOD
 AC_CHECK_FUNCS([floor memset mkdtemp pow realpath sqrt strcasecmp strchr strncasecmp strtol strtoul])
 AC_CHECK_LIB(m, tan)
 AC_CHECK_LIB(z, inflate)
@@ -380,6 +378,21 @@ case $ac_cv_enable_zip in
 esac
 AM_CONDITIONAL([ZIP], [test x$ac_cv_enable_zip = xyes])
 
+# ATM only for MD5 Hashing which is currently only used for filename of image thumbnails
+AC_ARG_ENABLE(nettle, AC_HELP_STRING([--enable-nettle],
+              [enable MD5 Hash support (default is enable)]),
+              [ac_cv_enable_nettle=$enableval],
+              [ac_cv_enable_nettle=yes])
+AC_CACHE_CHECK([whether to enable MD5 Hash support],
+               [ac_cv_enable_nettle], [ac_cv_enable_nettle=yes])
+case $ac_cv_enable_nettle in
+  yes)
+    AC_CHECK_HEADER([nettle/md5-compat.h],[],[AC_MSG_ERROR([nettle/md5-compat.h is needed but not found - you will need to install package 'nettle-dev' or similar. The feature can be disabled with --disable-nettle])])
+    AC_CHECK_LIB([nettle], [main], [], [AC_MSG_ERROR([libnettle is needed but not found.])])
+    ;;
+esac
+AM_CONDITIONAL([MD5_HASH], [test x$ac_cv_enable_nettle = xyes])
+
 # Mapnik rendering layer
 AC_ARG_ENABLE(mapnik, AC_HELP_STRING([--enable-mapnik],
               [enable Mapnik (default is enable)]),
@@ -416,6 +429,36 @@ AC_PROG_CXX
 m4_popdef([AC_MSG_ERROR])
 ##
 
+dnl Compile time defined access token
+AC_ARG_WITH(mapbox_access_token,
+            [AC_HELP_STRING([--with-mapbox_access_token],
+            [Access token for MapBox tiles.
+              Please register your own if you're going to distribute the
+              package, as requests are limited per token.])],
+           [VIK_CONFIG_MAPBOX_TOKEN="\"${withval}\""],
+           [VIK_CONFIG_MAPBOX_TOKEN="\"pk.eyJ1Ijoicndub3JyaXMiLCJhIjoiY2lxc294anN2MDA5bWhzbWFseWsxMW1ydiJ9.HcybKtZsiG6RVuOHg481Kg\""])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPBOX_TOKEN, ${VIK_CONFIG_MAPBOX_TOKEN}, [Mapbox Token])
+
+
+dnl Compile time defined key
+AC_ARG_WITH(thunderforest_apikey,
+            [AC_HELP_STRING([--with-thunderforest_apikey],
+            [API Key for Thunderforest (OSM Cyclemap) tiles.
+              Please register your own if you're going to distribute the
+              package, as requests are limited per key.])],
+           [VIK_CONFIG_THUNDERFOREST_KEY="\"${withval}\""],
+           [VIK_CONFIG_THUNDERFOREST_KEY="\"7387c111d85642b18f63608bd4cb8b4f\""])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_THUNDERFOREST_KEY, ${VIK_CONFIG_THUNDERFOREST_KEY}, [Thunderforest key])
+
+AC_ARG_WITH(geonames_username,
+            [AC_HELP_STRING([--with-geonames_username],
+            [Username for the GeoNames webservice.
+              Please register your own if you're going to distribute the
+              package, as requests are limited per username.])],
+           [VIK_CONFIG_GEONAMES_USERNAME="\"${withval}\""],
+           [VIK_CONFIG_GEONAMES_USERNAME="\"$PACKAGE\""])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_GEONAMES_USERNAME, ${VIK_CONFIG_GEONAMES_USERNAME}, [geonames username])
+
 
 AC_ARG_WITH(mapcache,
             [AC_HELP_STRING([--with-mapcache],
@@ -453,7 +496,7 @@ AC_SUBST(DB2MAN_XSL)
 AC_PATH_PROG(XP,xsltproc)
 AM_CONDITIONAL([HAVE_XSLTPROC],[test "x$XP" != "x"])
 AC_CHECK_PROG([HAVE_SCROLLKEEPER],scrollkeeper-config,"yes")
-AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" == "yes" )
+AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" = "yes" )
 AM_COND_IF([GEN_MANPAGES], [ac_cv_enable_man=yes], [ac_cv_enable_man=no])
 
 ISODATE=`date +%Y-%m-%d`
@@ -505,9 +548,11 @@ bzip2 Support                    : $ac_cv_enable_bzip2
 File Magic Support               : $ac_cv_enable_magic
 MBTiles Support (SQLite3)        : $ac_cv_enable_mbtiles
 Zip File Support (with libzip)   : $ac_cv_enable_zip
+MD5 Hash Support (with libnettle): $ac_cv_enable_nettle
 Mapnik Rendering Support (C++)   : $ac_cv_enable_mapnik
 Size of map cache (in memory)    : ${VIK_CONFIG_MAPCACHE_SIZE}
 Age of tiles (in seconds)        : ${VIK_CONFIG_DEFAULT_TILE_AGE}
+GeoNames user                    : ${VIK_CONFIG_GEONAMES_USERNAME}
 Man page generation              : $ac_cv_enable_man
 Documentation (+HTML)            : ${enable_gtk_doc} (HTML: ${enable_gtk_doc_html})
 -------------------------------------------