+
+AC_ARG_ENABLE(dem24k, AC_HELP_STRING([--enable-dem24k],
+ [enable USGS 24k DEM (default is disable) download source. Requires dem24k.pl script in path.]),
+ [ac_cv_enable_dem24k=$enableval],
+ [ac_cv_enable_dem24k=no])
+AC_CACHE_CHECK([whether to enable USGS DEM 24k download source],
+ [ac_cv_enable_dem24k], [ac_cv_enable_dem24k=yes])
+case $ac_cv_enable_dem24k in
+ yes)
+ AC_DEFINE(VIK_CONFIG_DEM24K, [], [DEM24K STUFF])
+ ;;
+esac
+AM_CONDITIONAL([DEM24K], [test x$ac_cv_enable_dem24k = xyes])
+
+# Realtime GPS tracking
+AC_ARG_ENABLE(realtime-gps-tracking, AC_HELP_STRING([--enable-realtime-gps-tracking],
+ [enable realtime GPS tracking (default is enable)]),
+ [ac_cv_enable_realtimegpstracking=$enableval],
+ [ac_cv_enable_realtimegpstracking=yes])
+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_DEFINE(VIK_CONFIG_REALTIME_GPS_TRACKING, [], [REALTIME GPS TRACKING STUFF])
+ ;;
+esac
+AM_CONDITIONAL([REALTIME_GPS_TRACKING], [test x$ac_cv_enable_realtimegpstracking = xyes])
+
+AC_ARG_WITH(search,
+ [AC_HELP_STRING([--with-search],
+ [specify google or geonames for searching (default is google)])],
+ [case "x$withval" in
+ "xgoogle")
+ VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GOOGLE
+ ;;
+ "xgeonames")
+ VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GEONAMES
+ ;;
+ *)
+ AC_MSG_ERROR([Please, set a value for search method])
+ esac],
+ [VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GOOGLE])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH_GOOGLE, 1,
+ [Id. for searching via GOOGLE])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH_GEONAMES, 2,
+ [Id. for searching via GEONAMES])
+AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH, ${VIK_CONFIG_SEARCH},
+ [Method for the search])
+
+