]> git.itanic.dy.fi Git - maemo-mapper/blobdiff - configure.ac
Administrative changes in preparation for release of Maemo Mapper v2.6.2.
[maemo-mapper] / configure.ac
index ee7c55c0ee2be5d1041ec1834b0f73e868d9eb1d..63f18801ff4c585c1d4a37969fcfea6161bb9822 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(maemo-mapper, 2.0.2)
+AM_INIT_AUTOMAKE(maemo-mapper, 2.6.2)
 
 AC_PROG_CPP
 AC_CONFIG_HEADERS(src/config.h)
@@ -29,14 +29,6 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0)
 AC_SUBST(GTK_LIBS)
 AC_SUBST(GTK_CFLAGS)
 
-PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp)
-AC_SUBST(OSSO_LIBS)
-AC_SUBST(OSSO_CFLAGS)
-
-PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
-AC_SUBST(HILDON_LIBS)
-AC_SUBST(HILDON_CFLAGS)
-
 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
 AC_SUBST(GNOME_VFS_LIBS)
 AC_SUBST(GNOME_VFS_CFLAGS)
@@ -53,16 +45,46 @@ PKG_CHECK_MODULES(SQLITE, sqlite3)
 AC_SUBST(SQLITE_LIBS)
 AC_SUBST(SQLITE_CFLAGS)
 
-PKG_CHECK_MODULES(CONIC, conic)
+PKG_CHECK_MODULES(CONIC, conic, AC_DEFINE(CONIC, 1, Use the conic library), AC_MSG_WARN(conic not found. Compiling without conic support.))
 AC_SUBST(CONIC_LIBS)
 AC_SUBST(CONIC_CFLAGS)
 
-AC_CHECK_HEADER(gdbm.h, [has_gdbm=yes], [has_gdbm=no], [])
+AC_CHECK_HEADER(gdbm.h, , AC_MSG_ERROR(gdbm.h not found. Please install libgdbm-dev.))
+AC_CHECK_LIB(gdbm, gdbm_open, , AC_MSG_ERROR(libgdbm.so not found. Please install libgdbm.), -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0)
+
+AC_CHECK_HEADER(gpsmgr.h, , AC_MSG_WARN(gpsmgr.h not found. Compiling without gpsmgr support.))
+AC_CHECK_LIB(gpsmgr, gpsmgr_start, , AC_MSG_WARN(libgpsmgr.so not found. Compiling without gpsmgr support.), -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0)
+
+AC_ARG_ENABLE(legacy, 
+        AS_HELP_STRING([--enable-legacy],[Enable building for Chinook]),
+        [case "${enableval}" in
+                yes) HAVE_LEGACY=yes ;;
+                no)  HAVE_LEGACY=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-legacy) ;;
+        esac],
+        [HAVE_LEGACY=no])
+
+AS_IF([test "x$HAVE_LEGACY" = xyes], 
+        [
+                PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp)
+                PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
+                AC_DEFINE(LEGACY, 1, Build for OS2006/OS2007)
+        ],
+        [
+                PKG_CHECK_MODULES(OSSO, libosso >= 1 hildon-help)
+                PKG_CHECK_MODULES(HILDON, hildon-1 hildon-fm-2)
+                AC_CHECK_HEADER(gps.h, , AC_MSG_ERROR(gps.h not found. Please install libgps-dev.))
+                AC_CHECK_LIB(gps, gps_open, , AC_MSG_ERROR(libgps.so not found. Please install libgps.), -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0)
+                AC_CHECK_HEADER(gpsbt.h, , AC_MSG_WARN(gpsbt.h not found. Compiling without gpsbt support.))
+                AC_CHECK_LIB(gpsbt, gpsbt_start, , AC_MSG_WARN(libgpsbt.so not found. Compiling without gpsbt support.), -lgps -lgpsmgr -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0)
+        ])
+
+AC_SUBST(OSSO_LIBS)
+AC_SUBST(OSSO_CFLAGS)
+
+AC_SUBST(HILDON_LIBS)
+AC_SUBST(HILDON_CFLAGS)
 
-if test "$has_gdbm" != "yes"
-then
-       AC_MSG_ERROR(gdbm.h not found. Please install libgdbm-dev.)
-fi
 
 # Localisation
 localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
@@ -70,7 +92,7 @@ AC_PROG_INTLTOOL([0.23])
 GETTEXT_PACKAGE=$PACKAGE
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", [Name of gettext package])
-ALL_LINGUAS="en_US en_GB nl_NL it_IT bg_BG fi_FI"
+ALL_LINGUAS="bg_BG de_DE en_US en_GB es_ES fi_FI it_IT nl_NL sv_SE ru_RU"
 AM_GLIB_GNU_GETTEXT
 
 
@@ -91,6 +113,7 @@ icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
 icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
+icon_aprsdir=$datadir/icons/hicolor/scalable/hildon
 
 # Help file install directory
 helpfile_enusdir=$datadir/osso-help/en_US
@@ -113,12 +136,15 @@ AC_SUBST(icon_26x26dir)
 AC_SUBST(icon_34x34dir)
 AC_SUBST(icon_40x40dir)
 AC_SUBST(icon_50x50dir)
+AC_SUBST(icon_aprsdir)
 AC_SUBST(icon_scalabledir)
 AC_SUBST(pluginlibdir)
 AC_SUBST(plugindesktopentrydir)
 
 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Runtime locale catalog files path])
 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
+AC_DEFINE([INCLUDE_APRS], [1], [Include APRS functionality])
+
 
 # Produce output files
 AC_OUTPUT(