X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/e5c58469983b5f4e74c2ce9e110d84b5336d47db..130ac8051f7e267da9bd8205a81d58f06d0c47f6:/configure.ac diff --git a/configure.ac b/configure.ac index 22e369fd..1e832335 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(viking, 1.1) -AM_INIT_AUTOMAKE() +AC_INIT(viking, 1.3) +AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) dnl AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([src/config.h]) GTK_DOC_CHECK(1.0) @@ -54,7 +54,7 @@ LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found] # gdk-pixbuf-csource AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes]) -if test $GDK_PIXBUF_CSOURCE != "yes" +if test "x$GDK_PIXBUF_CSOURCE" != "xyes" then AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found]) fi @@ -64,7 +64,7 @@ dnl | Pkgconfig checks |--------------------------------------- dnl ------------------ PKG_CHECK_MODULES(PACKAGE, [ - glib-2.0 >= 2.12 + glib-2.0 >= 2.14 gthread-2.0 >= 2.2 gtk+-2.0 >= 2.12 gio-2.0 >= 2.12 @@ -115,6 +115,19 @@ case $ac_cv_enable_alpha_trw in ;; esac +AC_ARG_ENABLE(bing, AC_HELP_STRING([--enable-bing], + [enable Bing stuff (default is enable)]), + [ac_cv_enable_bing=$enableval], + [ac_cv_enable_bing=yes]) +AC_CACHE_CHECK([whether to enable Bing stuff], + [ac_cv_enable_bing], [ac_cv_enable_bing=yes]) +case $ac_cv_enable_bing in + yes) + AC_DEFINE(VIK_CONFIG_BING, [], [BING STUFF]) + ;; +esac +AM_CONDITIONAL([BING], [test x$ac_cv_enable_bing = xyes]) + AC_ARG_ENABLE(google, AC_HELP_STRING([--enable-google], [enable Google stuff (default is enable)]), [ac_cv_enable_google=$enableval], @@ -209,6 +222,20 @@ case $ac_cv_enable_geocaches in esac AM_CONDITIONAL([GEOCACHES], [test x$ac_cv_enable_geocaches = xyes]) +AC_ARG_ENABLE(geotag, AC_HELP_STRING([--enable-geotag], + [enable Geotag Support (default is enable).]), + [ac_cv_enable_geotag=$enableval], + [ac_cv_enable_geotag=yes]) +AC_CACHE_CHECK([whether to enable Geotag Support], + [ac_cv_enable_geotag], [ac_cv_enable_geotag=yes]) +case $ac_cv_enable_geotag in + yes) + AC_CHECK_LIB(exif,exif_loader_new,,AC_MSG_ERROR([libexif is needed for Geotag features[,] but is not found. The feature can be disabled with --disable-geotag])) + AC_DEFINE(VIK_CONFIG_GEOTAG, [], [GEOTAG STUFF]) + ;; +esac +AM_CONDITIONAL([GEOTAG], [test x$ac_cv_enable_geotag = xyes]) + AC_ARG_ENABLE(spotmaps, AC_HELP_STRING([--enable-spotmaps], [enable SPOTMaps map (default is enable).]), [ac_cv_enable_spotmaps=$enableval], @@ -245,18 +272,11 @@ AC_CACHE_CHECK([whether to enable Realtime GPS Tracking stuff], [ac_cv_enable_realtimegpstracking], [ac_cv_enable_realtimegpstracking=yes]) case $ac_cv_enable_realtimegpstracking in yes) - AC_CHECK_LIB(gps,gps_poll,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking])) + AC_CHECK_LIB(gps,gps_close,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking])) AC_DEFINE(VIK_CONFIG_REALTIME_GPS_TRACKING, [], [REALTIME GPS TRACKING STUFF]) ;; 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], @@ -297,7 +317,7 @@ AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE}, AC_ARG_WITH(tileage, [AC_HELP_STRING([--with-tileage], - [specify the age of a tile before checking it (default is 30 s)])], + [specify the age of a tile before checking it (default is 7 days)])], [if test "x$withval" = "xno"; then VIK_CONFIG_DEFAULT_TILE_AGE=0; elif test "x$withval" = "xyes"; then @@ -305,9 +325,9 @@ AC_ARG_WITH(tileage, else VIK_CONFIG_DEFAULT_TILE_AGE=${withval} fi], - [VIK_CONFIG_DEFAULT_TILE_AGE=30]) + [VIK_CONFIG_DEFAULT_TILE_AGE=604800]) AC_DEFINE_UNQUOTED(VIK_CONFIG_DEFAULT_TILE_AGE, ${VIK_CONFIG_DEFAULT_TILE_AGE}, - [Age of tiles before cheking it (in seconds)]) + [Age of tiles before checking it (in seconds)]) dnl man pages processing DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl @@ -321,6 +341,8 @@ dnl correct flags to aclocal. ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" AC_SUBST(ACLOCAL_AMFLAGS) +AM_CONDITIONAL(VIKING_DOC, test x${enable_gtk_doc} = xyes) + # Configuration AC_CONFIG_FILES([Makefile src/Makefile @@ -328,10 +350,10 @@ AC_CONFIG_FILES([Makefile po/Makefile.in test/Makefile help/Makefile + data/Makefile doc/Makefile doc/reference/Makefile - doc/examples/Makefile - doc/dev/Makefile]) + doc/examples/Makefile]) AC_OUTPUT([ viking.spec ]) @@ -342,6 +364,7 @@ echo "===========================================" echo "$PACKAGE $VERSION" echo "-------------------------------------------" echo "Alphabetized track & waypoints : $ac_cv_enable_alpha_trw" +echo "Bing Maps : $ac_cv_enable_bing" echo "Google Maps : $ac_cv_enable_google" echo "Terraserver Maps : $ac_cv_enable_terraserver" echo "Expedia Maps : $ac_cv_enable_expedia" @@ -349,7 +372,8 @@ echo "Open Street Map : $ac_cv_enable_openstreetmap" echo "BlueMarble : $ac_cv_enable_bluemarble" echo "SPOTMaps : $ac_cv_enable_spotmaps" echo "Geonames : $ac_cv_enable_geonames" -#echo "Geocaches Acquire : $ac_cv_enable_geocaches" +echo "Geocaches Acquire : $ac_cv_enable_geocaches" +echo "Geotag Support : $ac_cv_enable_geotag" 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}"