]> git.street.me.uk Git - andy/viking.git/blobdiff - configure.ac
Revert "Declare the need of C99 compliant compiler"
[andy/viking.git] / configure.ac
index 82872708f7ceed0f3f2417034e2206ff896f95e9..eeff0354f4789ac96966e89bf9e3f0b7d4712dc4 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.2)
+AC_INIT(viking, 0.9.4)
 AM_INIT_AUTOMAKE()
 dnl AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADERS([src/config.h])
@@ -10,6 +10,24 @@ AC_CONFIG_HEADERS([src/config.h])
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+# I18N
+GETTEXT_PACKAGE=viking
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
+
+AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)
+
+AM_GLIB_GNU_GETTEXT
+IT_PROG_INTLTOOL([0.35.0])
+
+AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
+
+dnl This will cause the automake generated makefiles to pass the
+dnl correct flags to aclocal.
+ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
+AC_SUBST(ACLOCAL_AMFLAGS)
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -30,10 +48,6 @@ AM_WITH_EXPAT
 # Curl
 LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found])])
 
-# libgps
-AC_CHECK_LIB(gps,gps_poll,AC_DEFINE(HAVE_LIBGPS,[],[libgps to connect to gpsd]),)
-AM_CONDITIONAL([LIBGPS], [test x$ac_cv_lib_gps_gps_poll = xyes])
-
 AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
 if test $GDK_PIXBUF_CSOURCE != "yes"
 then
@@ -71,11 +85,11 @@ AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
 
 AC_ARG_ENABLE(oldgoogle, AC_HELP_STRING([--enable-old-google],
               [enable old Google stuff (default is disable)]),
-              [ac_cv_enable_google=$enableval],
-              [ac_cv_enable_google=no])
+              [ac_cv_enable_old_google=$enableval],
+              [ac_cv_enable_old_google=no])
 AC_CACHE_CHECK([whether to enable Old Google stuff],
                [ac_cv_enable_old_google], [ac_cv_enable_old_google=yes])
-case $ac_cv_enable_google in
+case $ac_cv_enable_old_google in
   yes)
     AC_DEFINE(VIK_CONFIG_OLD_GOOGLE, [], [OLD GOOGLE STUFF])
     ;;
@@ -123,7 +137,7 @@ esac
 AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes])
 
 AC_ARG_ENABLE(geocaches, AC_HELP_STRING([--enable-geocaches],
-             [enable Geocaches Acquire (default is disable). WARNING: Broken, do not enable]),
+             [enable Geocaches Acquire (default is disable).]),
               [ac_cv_enable_geocaches=$enableval],
               [ac_cv_enable_geocaches=no])
 AC_CACHE_CHECK([whether to enable Geocaches Acquire],
@@ -149,6 +163,21 @@ case $ac_cv_enable_dem24k in
 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(mapcache,
             [AC_HELP_STRING([--with-mapcache],
                             [specify the size of the map cache (default is 50331648)])],
@@ -163,13 +192,39 @@ AC_ARG_WITH(mapcache,
 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
                    [Size of the map cache])
 
+dnl This will cause the automake generated makefiles to pass the
+dnl correct flags to aclocal.
+ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
+AC_SUBST(ACLOCAL_AMFLAGS)
+
 # Configuration
 AC_CONFIG_FILES([Makefile
                  src/Makefile
                  src/icons/Makefile
+                po/Makefile.in
                  test/Makefile
                  doc/Makefile
                  doc/dev/Makefile])
 AC_OUTPUT([
           viking.spec
           ])
+
+dnl Output the configuration summary
+echo ""
+echo "==========================================="
+echo "$PACKAGE $VERSION"
+echo "-------------------------------------------"
+echo "Alphabetized track & waypoints   : $ac_cv_enable_alpha_trw"
+echo "Google Maps                      : $ac_cv_enable_google"
+#echo "Old Google Maps                  : $ac_cv_enable_old_google"
+echo "Terraserver Maps                 : $ac_cv_enable_terraserver"
+#echo "Expedia Maps                     : $ac_cv_enable_expedia"
+echo "Open Street Map                  : $ac_cv_enable_openstreetmap"
+#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 "-------------------------------------------"
+echo ""
+echo "Configure finished, type 'make' to build."
+