AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
-GTK_DOC_CHECK(1.9)
# Check for required packages
PKG_CHECK_MODULES(GIS, libgis)
+AC_SUBST(PLUGINSDIR, `pkg-config --variable=pluginsdir libgis`)
# Define odd RSL install location
AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
#!/bin/bash
dir=$(dirname $(readlink -f $0))
-# "--libdir=$dir/src/plugins"
-# "--datadir=$dir/data"
+PKG_CONFIG_PATH="../libgis/src/" \
./autogen.sh \
- --enable-gtk-doc \
+ "--datadir=$dir/data" \
+ "--libdir=$dir/src/plugins" \
CFLAGS="-g -Werror -Wno-unused $CFLAGS" \
LDFLAGS="-Wl,-z,defs"
aweather_SOURCES = main.c \
aweather-gui.c aweather-gui.h \
aweather-location.c aweather-location.h
-aweather_CPPFLAGS = $(AM_CPPFLAGS) -DDATADIR="\"$(datadir)\""
+aweather_CPPFLAGS = $(AM_CPPFLAGS) \
+ -DPKGDATADIR="\"$(pkgdatadir)\"" -DPLUGINSDIR="\"$(pkglibdir)\""
wsr88ddec = wsr88ddec.c
wsr88ddec_LDADD = -lbz2
MAINTAINERCLEANFILES = Makefile.in
test: all
- aweather -o -d 7 -s KVNX
+ .libs/aweather -o -d 7 -s KVNX
gdb: all
- gdb aweather
+ gdb .libs/aweather
ddd: all
- ddd aweather
+ ddd .libs/aweather
g_debug("AWeatherGui: init");
/* Simple things */
- self->prefs = gis_prefs_new("aweather");
- self->plugins = gis_plugins_new();
+ gchar *config = g_build_filename(g_get_user_cache_dir(), "config.ini", NULL);
+ gchar *defaults = g_build_filename(PKGDATADIR, "defaults.ini", NULL);
+ self->prefs = gis_prefs_new(config, defaults);
+ self->plugins = gis_plugins_new(PLUGINSDIR);
self->world = gis_world_new();
self->view = gis_view_new();
self->opengl = gis_opengl_new(self->world, self->view, self->plugins);
+ g_free(config);
+ g_free(defaults);
/* Setup window */
self->builder = gtk_builder_new();
GError *error = NULL;
- if (!gtk_builder_add_from_file(self->builder, DATADIR "/aweather/main.ui", &error))
+ if (!gtk_builder_add_from_file(self->builder, PKGDATADIR "/main.ui", &error))
g_error("Failed to create gtk builder: %s", error->message);
gtk_widget_reparent(aweather_gui_get_widget(self, "main_body"), GTK_WIDGET(self));
GtkWidget *paned = aweather_gui_get_widget(self, "main_paned");
/* Plugins */
GtkTreeIter iter;
self->gtk_plugins = GTK_LIST_STORE(aweather_gui_get_object(self, "plugins"));
- for (GList *cur = gis_plugins_available(); cur; cur = cur->next) {
+ for (GList *cur = gis_plugins_available(self->plugins); cur; cur = cur->next) {
gchar *name = cur->data;
gboolean enabled = gis_prefs_get_boolean_v(self->prefs, cur->data, "enabled");
gtk_list_store_append(self->gtk_plugins, &iter);
AM_LDFLAGS = -module -avoid-version
LIBS = $(GIS_LIBS)
-plugindir = $(libdir)/gis
+pluginsdir = $(PLUGINSDIR)
-plugin_LTLIBRARIES =
+plugins_LTLIBRARIES =
if HAVE_RSL
-plugin_LTLIBRARIES += radar.la
+plugins_LTLIBRARIES += radar.la
radar_la_SOURCES = radar.c radar.h \
marching.c marching.h \
radar-colormap.c