]> git.street.me.uk Git - andy/viking.git/blobdiff - configure.ac
Merge 'viking-0.9.7'
[andy/viking.git] / configure.ac
index 71ce4cc09acf48975d8b82119f35efb9867c0c28..4721b97619ac8e43da9395464b7d147200da7351 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
 # 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.7)
 AM_INIT_AUTOMAKE()
 dnl AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADERS([src/config.h])
 AM_INIT_AUTOMAKE()
 dnl AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADERS([src/config.h])
@@ -10,10 +10,28 @@ AC_CONFIG_HEADERS([src/config.h])
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_MAKE_SET
 # 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
 
 # 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 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])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -22,7 +40,7 @@ AC_TYPE_MODE_T
 # Checks for library functions.
 AC_FUNC_STAT
 AC_FUNC_STRTOD
 # Checks for library functions.
 AC_FUNC_STAT
 AC_FUNC_STRTOD
-AC_CHECK_FUNCS([bzero floor gethostbyname memset mkdir mkdtemp pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
+AC_CHECK_FUNCS([floor gethostbyname memset mkdtemp pow realpath socket sqrt strcasecmp strchr strdup strncasecmp strtol strtoul])
 
 # Expat
 AM_WITH_EXPAT
 
 # Expat
 AM_WITH_EXPAT
@@ -30,10 +48,6 @@ AM_WITH_EXPAT
 # Curl
 LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found])])
 
 # 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
 AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
 if test $GDK_PIXBUF_CSOURCE != "yes"
 then
@@ -69,19 +83,6 @@ case $ac_cv_enable_google in
 esac
 AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
 
 esac
 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_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
-  yes)
-    AC_DEFINE(VIK_CONFIG_OLD_GOOGLE, [], [OLD GOOGLE STUFF])
-    ;;
-esac
-AM_CONDITIONAL([OLDGOOGLE], [test x$ac_cv_enable_old_google = xyes])
-
 AC_ARG_ENABLE(terraserver, AC_HELP_STRING([--enable-terraserver],
               [enable Terraserver stuff (default is enable)]),
               [ac_cv_enable_terraserver=$enableval],
 AC_ARG_ENABLE(terraserver, AC_HELP_STRING([--enable-terraserver],
               [enable Terraserver stuff (default is enable)]),
               [ac_cv_enable_terraserver=$enableval],
@@ -122,8 +123,36 @@ case $ac_cv_enable_openstreetmap in
 esac
 AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes])
 
 esac
 AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes])
 
+# BlueMarble
+AC_ARG_ENABLE(bluemarble, AC_HELP_STRING([--enable-bluemarble],
+              [enable BlueMarble stuff (default is enable)]),
+              [ac_cv_enable_bluemarble=$enableval],
+              [ac_cv_enable_bluemarble=yes])
+AC_CACHE_CHECK([whether to enable BlueMarble stuff],
+               [ac_cv_enable_bluemarble], [ac_cv_enable_bluemarble=yes])
+case $ac_cv_enable_bluemarble in
+  yes)
+    AC_DEFINE(VIK_CONFIG_BLUEMARBLE, [], [BLUEMARBLE STUFF])
+    ;;
+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])
+
 AC_ARG_ENABLE(geocaches, AC_HELP_STRING([--enable-geocaches],
 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],
               [ac_cv_enable_geocaches=$enableval],
               [ac_cv_enable_geocaches=no])
 AC_CACHE_CHECK([whether to enable Geocaches Acquire],
@@ -178,10 +207,22 @@ AC_ARG_WITH(mapcache,
 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
                    [Size of the map cache])
 
 AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
                    [Size of the map cache])
 
+dnl man pages processing
+DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+AC_SUBST(DB2MAN_XSL)
+AC_PATH_PROG(XP,xsltproc)
+AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"])
+
+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
 # Configuration
 AC_CONFIG_FILES([Makefile
                  src/Makefile
                  src/icons/Makefile
+                po/Makefile.in
                  test/Makefile
                  doc/Makefile
                  doc/dev/Makefile])
                  test/Makefile
                  doc/Makefile
                  doc/dev/Makefile])
@@ -196,10 +237,11 @@ echo "$PACKAGE $VERSION"
 echo "-------------------------------------------"
 echo "Alphabetized track & waypoints   : $ac_cv_enable_alpha_trw"
 echo "Google Maps                      : $ac_cv_enable_google"
 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 "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 "Geocaches Acquire                : $ac_cv_enable_geocaches"
 echo "USGS 24k DEM                     : $ac_cv_enable_dem24k"
 echo "Realtime GPS Tracking            : $ac_cv_enable_realtimegpstracking"
 #echo "Geocaches Acquire                : $ac_cv_enable_geocaches"
 echo "USGS 24k DEM                     : $ac_cv_enable_dem24k"
 echo "Realtime GPS Tracking            : $ac_cv_enable_realtimegpstracking"