]> git.street.me.uk Git - andy/viking.git/blobdiff - configure.ac
Fix bashisms.
[andy/viking.git] / configure.ac
index 0bf0eb2d9fc065285d3f347bf710951a6bd46e5d..3e960c59c0fdf841e5ca167d8c106320a9b2a406 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(viking, 0.9.9)
+AC_INIT(viking, 0.9.95)
 AM_INIT_AUTOMAKE()
 dnl AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADERS([src/config.h])
@@ -32,7 +32,7 @@ AC_SUBST(ACLOCAL_AMFLAGS)
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h sys/types.h sys/wait.h unistd.h math.h])
+AC_CHECK_HEADERS([malloc.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h sys/types.h sys/wait.h unistd.h math.h utime.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -42,6 +42,8 @@ AC_TYPE_MODE_T
 AC_FUNC_STAT
 AC_FUNC_STRTOD
 AC_CHECK_FUNCS([floor gethostbyname memset mkdtemp pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
+AC_CHECK_LIB(m, tan)
+AC_CHECK_LIB(z, inflate)
 
 # Expat
 AM_WITH_EXPAT
@@ -64,11 +66,17 @@ PKG_CHECK_MODULES(PACKAGE, [
         glib-2.0          >= 2.12
         gthread-2.0       >= 2.2
         gtk+-2.0          >= 2.12
+        gio-2.0           >= 2.12
 ])
 
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 
+dnl  -------------
+dnl | User Manual |---------------------------------------
+dnl  -------------
+GNOME_DOC_INIT
+
 ###############
 # Depecations #
 ###############
@@ -166,20 +174,6 @@ case $ac_cv_enable_bluemarble in
 esac
 AM_CONDITIONAL([BLUEMARBLE], [test x$ac_cv_enable_bluemarble = xyes])
 
-# OpenAerial
-AC_ARG_ENABLE(openaerial, AC_HELP_STRING([--enable-openaerial],
-              [enable OpenAerial stuff (default is enable)]),
-              [ac_cv_enable_openaerial=$enableval],
-              [ac_cv_enable_openaerial=yes])
-AC_CACHE_CHECK([whether to enable OpenAerial stuff],
-               [ac_cv_enable_openaerial], [ac_cv_enable_openaerial=yes])
-case $ac_cv_enable_openaerial in
-  yes)
-    AC_DEFINE(VIK_CONFIG_OPENAERIAL, [], [OPENAERIAL STUFF])
-    ;;
-esac
-AM_CONDITIONAL([OPENAERIAL], [test x$ac_cv_enable_openaerial = xyes])
-
 # GeoNames http://www.geonames.org/
 AC_ARG_ENABLE(geonames, AC_HELP_STRING([--enable-geonames],
               [enable Geonames stuff (default is enable)]),
@@ -235,6 +229,13 @@ case $ac_cv_enable_realtimegpstracking in
     ;;
 esac
 AM_CONDITIONAL([REALTIME_GPS_TRACKING], [test x$ac_cv_enable_realtimegpstracking = xyes])
+# Viking supports two incompatibles versions of GPSd: 2.39 and 2.90
+# But GPSd does not provides easy way to test features.
+if test x$ac_cv_enable_realtimegpstracking = xyes
+then
+  AC_CHECK_FUNCS(gps_stream)
+  AC_CHECK_FUNCS(gps_open_r)
+fi
 
 AC_ARG_WITH(search,
             [AC_HELP_STRING([--with-search],
@@ -272,6 +273,21 @@ AC_ARG_WITH(mapcache,
 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
                    [Size of the map cache])
 
+
+AC_ARG_WITH(tileage,
+            [AC_HELP_STRING([--with-tileage],
+                            [specify the age of a tile before checking it (default is 30 s)])],
+            [if test "x$withval" = "xno"; then
+                VIK_CONFIG_DEFAULT_TILE_AGE=0;
+             elif test "x$withval" = "xyes"; then
+                AC_MSG_ERROR([Please, set a value for age of tiles])
+             else
+                VIK_CONFIG_DEFAULT_TILE_AGE=${withval}
+             fi],
+             [VIK_CONFIG_DEFAULT_TILE_AGE=30])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_DEFAULT_TILE_AGE, ${VIK_CONFIG_DEFAULT_TILE_AGE},
+                   [Age of tiles before cheking it (in seconds)])
+
 dnl man pages processing
 DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
 AC_SUBST(DB2MAN_XSL)
@@ -289,6 +305,7 @@ AC_CONFIG_FILES([Makefile
                  src/icons/Makefile
                 po/Makefile.in
                  test/Makefile
+                 help/Makefile
                  doc/Makefile
                  doc/examples/Makefile
                  doc/dev/Makefile])
@@ -306,13 +323,13 @@ echo "Google Maps                      : $ac_cv_enable_google"
 echo "Terraserver Maps                 : $ac_cv_enable_terraserver"
 #echo "Expedia Maps                     : $ac_cv_enable_expedia"
 echo "Open Street Map                  : $ac_cv_enable_openstreetmap"
-echo "OpenAerial                       : $ac_cv_enable_openaerial"
 echo "BlueMarble                       : $ac_cv_enable_bluemarble"
 echo "Geonames                         : $ac_cv_enable_geonames"
 #echo "Geocaches Acquire                : $ac_cv_enable_geocaches"
 echo "USGS 24k DEM                     : $ac_cv_enable_dem24k"
 echo "Realtime GPS Tracking            : $ac_cv_enable_realtimegpstracking"
 echo "Size of map cache (in memory)    : ${VIK_CONFIG_MAPCACHE_SIZE}"
+echo "Age of tiles (in seconds)        : ${VIK_CONFIG_DEFAULT_TILE_AGE}"
 echo "-------------------------------------------"
 echo ""
 echo "Configure finished, type 'make' to build."