diff options
author | Davyd Madeley <davyd@madeley.id.au> | 2006-04-13 17:48:18 +0000 |
---|---|---|
committer | Davyd Madeley <davyd@src.gnome.org> | 2006-04-13 17:48:18 +0000 |
commit | bb3fbbd442e80e07b540dbbf2a82b1eaf688c618 (patch) | |
tree | fe35b5fb9c140a99585bb449334a8e580e1ba644 | |
parent | 5d6c90dfc98551c0bc65f826bc6a453c4a6e6336 (diff) |
- get invest-applet building - refactor configure.in to make it somewhat
2006-04-14 Davyd Madeley <davyd@madeley.id.au>
* Makefile.am:
* configure.in:
* invest-applet/invest/Makefile.am:
- get invest-applet building
- refactor configure.in to make it somewhat more readable
* invest-applet/data/Makefile.am:
* invest-applet/data/GNOME_GtikApplet.server:
- transparently upgrade gtik
* invest-applet/invest/__init__.py:
* invest-applet/invest/applet.py:
* invest-applet/invest/chart.py:
* invest-applet/invest/defs.py.in:
* invest-applet/invest/invest-applet.py:
* invest-applet/invest/preferences.py:
- fix file paths for Glade/UI definitions
* po/POTFILES.in:
- add translatable files
* m4/acinclude.m4:
* m4/python.m4:
- add required m4 macros
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.in | 508 | ||||
-rw-r--r-- | invest-applet/data/GNOME_GtikApplet.server | 18 | ||||
-rw-r--r-- | invest-applet/data/Makefile.am | 12 | ||||
-rw-r--r-- | invest-applet/invest/Makefile.am | 5 | ||||
-rw-r--r-- | invest-applet/invest/__init__.py | 2 | ||||
-rw-r--r-- | invest-applet/invest/applet.py | 2 | ||||
-rw-r--r-- | invest-applet/invest/chart.py | 2 | ||||
-rw-r--r-- | invest-applet/invest/defs.py.in | 1 | ||||
-rwxr-xr-x | invest-applet/invest/invest-applet.py | 4 | ||||
-rw-r--r-- | invest-applet/invest/preferences.py | 2 | ||||
-rw-r--r-- | m4/acinclude.m4 | 40 | ||||
-rw-r--r-- | m4/python.m4 | 62 | ||||
-rw-r--r-- | po/POTFILES.in | 15 |
15 files changed, 456 insertions, 246 deletions
@@ -1,3 +1,26 @@ +2006-04-14 Davyd Madeley <davyd@madeley.id.au> + + * Makefile.am: + * configure.in: + * invest-applet/invest/Makefile.am: + - get invest-applet building + - refactor configure.in to make it somewhat more readable + * invest-applet/data/Makefile.am: + * invest-applet/data/GNOME_GtikApplet.server: + - transparently upgrade gtik + * invest-applet/invest/__init__.py: + * invest-applet/invest/applet.py: + * invest-applet/invest/chart.py: + * invest-applet/invest/defs.py.in: + * invest-applet/invest/invest-applet.py: + * invest-applet/invest/preferences.py: + - fix file paths for Glade/UI definitions + * po/POTFILES.in: + - add translatable files + * m4/acinclude.m4: + * m4/python.m4: + - add required m4 macros + 2006-04-13 Raphael Slinckx <rslinckx@cvs.gnome.org> * AUTHORS: diff --git a/Makefile.am b/Makefile.am index e062a2c16..15e1cd3b5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,6 @@ endif vfs_applets = \ drivemount \ - gtik \ libgweather \ gweather \ trashapplet @@ -41,6 +40,10 @@ if BUILD_CPUFREQ_APPLET cpufreq_SUBDIR = cpufreq endif +if BUILD_INVEST_APPLET +invest_applet_SUBDIR = invest-applet +endif + always_built_SUBDIRS = \ charpick \ geyes \ @@ -59,6 +62,7 @@ SUBDIRS = \ $(battstat_SUBDIR) \ $(accessx_status_SUBDIR)\ $(gswitchit_SUBDIRS) \ + $(invest_applet_SUBDIR) \ $(cpufreq_SUBDIR) DIST_SUBDIRS = \ diff --git a/configure.in b/configure.in index cca2bdc9b..d2fc57a51 100644 --- a/configure.in +++ b/configure.in @@ -1,31 +1,18 @@ -AC_INIT(drivemount/drivemount.c) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gnome-applets, 2.14.1) - -AM_MAINTAINER_MODE +dnl *************************************************************************** +dnl *** configure.in for GNOME-APPLETS *** +dnl *************************************************************************** +AC_INIT(gnome-applets, 2.15.0) +AC_PREREQ(2.59) +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(1.8) AC_CONFIG_MACRO_DIR(m4) -AC_PROG_INTLTOOL - -AC_ISC_POSIX -AC_PROG_CC -AC_STDC_HEADERS -AM_PROG_LIBTOOL -AC_PATH_PROGS(PATH_TO_XRDB, "xrdb") -AC_PATH_XTRA -X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" -AC_SUBST(X_LIBS) - -GNOME_COMPILE_WARNINGS - -dnl Check for non-portable headers -AC_CHECK_HEADERS([pty.h values.h]) - -dnl Stuff we might need, not quite sure yet - -GTK_REQUIRED=2.5.0 -GLIB_REQUIRED=2.5.0 +dnl *************************************************************************** +dnl *** Minimum library versions for GNOME-APPLETS *** +dnl *************************************************************************** +GTK_REQUIRED=2.6.0 +GLIB_REQUIRED=2.6.0 LIBGNOME_REQUIRED=2.8.0 LIBGNOMEUI_REQUIRED=2.8.0 GNOME_VFS_REQUIRED=2.8.0 @@ -42,8 +29,34 @@ LIBGNOME_DESKTOP_REQUIRED=2.11.1 LIBNOTIFY_REQUIRED=0.3.2 HAL_REQUIRED=0.5.3 DBUS_GLIB_REQUIRED=0.34 +PYGTK_REQUIRED=2.6 +PYGOBJECT_REQUIRED=2.6 +GNOME_PYTHON_REQUIRED=2.10 +dnl *************************************************************************** + +AM_MAINTAINER_MODE + +AC_PROG_INTLTOOL + +AC_PROG_CC +AC_ISC_POSIX +AC_STDC_HEADERS +AM_PROG_LIBTOOL +AC_PATH_XTRA +AM_PATH_PYTHON(2.4) +AM_CHECK_PYTHON_HEADERS(HAVE_PYHDRS="yes", HAVE_PYHDRS="no") + +X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" +AC_SUBST(X_LIBS) + +GNOME_COMPILE_WARNINGS -dnl Stolen from nautilus' configure.in *g* +dnl Check for non-portable headers +AC_CHECK_HEADERS([pty.h values.h]) + +dnl *************************************************************************** +dnl *** --enable-more-warnings turns on more compiler warnings *** +dnl *************************************************************************** AC_ARG_ENABLE(more-warnings, [ --enable-more-warnings Maximum compiler warnings], set_more_warnings="$enableval",[ @@ -78,35 +91,38 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then else AC_MSG_RESULT(no) fi +dnl *************************************************************************** +dnl *************************************************************************** +dnl *** Use pkg-config to check for dependancies *** +dnl *************************************************************************** - - - -dnl ****************************************** -dnl ** pkg-config dependency checks ** -dnl ****************************************** - +dnl -- Check for libgail (required) ------------------------------------------- PKG_CHECK_MODULES(GAILUTIL, gail >= $LIBGAIL_REQUIRED) AC_SUBST(GAILUTIL_CFLAGS) AC_SUBST(GAILUTIL_LIBS) +dnl -- Check for GTK+ 2.0 (required) ------------------------------------------ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED) AC_SUBST(GTK_FLAGS) AC_SUBST(GTK_LIBS) +dnl -- check for libpanelapplet (required) ------------------------------------ PKG_CHECK_MODULES(GNOME_APPLETS, libpanelapplet-2.0 >= $LIBPANEL_REQUIRED) AC_SUBST(GNOME_APPLETS_CFLAGS) AC_SUBST(GNOME_APPLETS_LIBS) +dnl -- check for libgnome (required) ------------------------------------------ PKG_CHECK_MODULES(GNOME_LIBS2, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED) AC_SUBST(GNOME_LIBS2_CFLAGS) AC_SUBST(GNOME_LIBS2_LIBS) +dnl -- check for gnome-desktop (required) ------------------------------------- PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED) AC_SUBST(GNOMEDESKTOP_CFLAGS) AC_SUBST(GNOMEDESKTOP_LIBS) +dnl -- check for gnome-vfs (optional) ----------------------------------------- build_gnome_vfs_applets=false PKG_CHECK_MODULES(GNOME_VFS_APPLETS, [gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED], @@ -115,37 +131,12 @@ AC_SUBST(GNOME_VFS_APPLETS_CFLAGS) AC_SUBST(GNOME_VFS_APPLETS_LIBS) AM_CONDITIONAL(BUILD_GNOME_VFS_APPLETS, $build_gnome_vfs_applets) +dnl -- check for libglade (required) ------------------------------------------ PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED) AC_SUBST(LIBGLADE_CFLAGS) AC_SUBST(LIBGLADE_LIBS) -AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) -AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) - -if test x"$GDK_PIXBUF_CSOURCE" = xno; then - AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK]) -fi - -AC_SUBST(GDK_PIXBUF_CSOURCE) - -AC_PATH_PROG(GCONFTOOL, gconftool-2, no) - -if test x"$GCONFTOOL" = xno; then - AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) -fi - -AM_GCONF_SOURCE_2 - -dnl checking for xsltproc - -AC_PATH_PROG(XSLTPROC, xsltproc, no) - -if test x"$XSLTPROC" = xno; then - AC_MSG_ERROR([xsltproc executable not found in your path - should be installed with libxslt]) -fi - -dnl Still need to decide on the checks for these - +dnl -- check for libgtop (optional) ------------------------------------------- build_gtop_applets=false PKG_CHECK_MODULES(GTOP_APPLETS, [libgtop-2.0 >= $LIBGTOP_REQUIRED], @@ -155,56 +146,138 @@ AC_SUBST(GTOP_APPLETS_CFLAGS) AC_SUBST(GTOP_APPLETS_LIBS) AM_CONDITIONAL(BUILD_GTOP_APPLETS, $build_gtop_applets) -dnl Setup for libxklavier +dnl -- check for libxklavier (required) --------------------------------------- PKG_CHECK_MODULES(LIBXKLAVIER, libxklavier >= $LIBXKLAVIER_REQUIRED,, AC_MSG_ERROR([libxklavier was not found and is required to build gnome-applets. Please get the latest version from http://freedesktop.org/Software/LibXklavier], 1)) - AC_SUBST(LIBXKLAVIER_CFLAGS) AC_SUBST(LIBXKLAVIER_LIBS) -AC_ARG_ENABLE(flags, -[ --enable-flags Enable flags usage in the keyboard indicators], -, enable_flags=no) -AM_CONDITIONAL(ENABLE_FLAGS, test x$enable_flags != xno) - +dnl -- check for libwnck (required) ------------------------------------------- PKG_CHECK_MODULES(LIBWNCK, libwnck-1.0 >= $LIBWNCK_REQUIRED,, AC_MSG_ERROR([libwnck is required to build gnome-applets.], 1)) AC_SUBST(LIBWNCK_CFLAGS) AC_SUBST(LIBWNCK_LIBS) -dnl ============== -dnl gswitchit -dnl ============== -dnl Make sure the new cvs virtual include has been checked out -AC_MSG_CHECKING([for inclusion of libgswitchit]) -if test ! -d "$srcdir/libgswitchit"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([Your checkout of gnome-applets is out of date. - The 'libgswitchit' module has been virtually included into - gnome-applets by CVS as a subdirectory. Please check - out again (this can be done on top of your existing checkout]) +dnl -- check for libnotify (optional) ----------------------------------------- +LIBNOTIFY_CFLAGS= +LIBNOTIFY_LIBS= +PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED, + HAVE_LIBNOTIFY="yes", HAVE_LIBNOTIFY="no") + +if test "x$HAVE_LIBNOTIFY" = "xyes"; then + AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available]) +fi + +AC_SUBST(LIBNOTIFY_CFLAGS) +AC_SUBST(LIBNOTIFY_LIBS) + +dnl -- check for glib/gobject (required) -------------------------------------- +PKG_CHECK_MODULES(CPUFREQ_SELECTOR, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED) +AC_SUBST(CPUFREQ_SELECTOR_CFLAGS) +AC_SUBST(CPUFREQ_SELECTOR_LIBS) + +dnl -- check for libhal (optional) -------------------------------------------- +HAL_CFLAGS= +HAL_LIBS= +AC_ARG_WITH(hal,[ --without-hal build without hal support]) + +if test "x$with_hal" != xno; then + PKG_CHECK_MODULES(HAL, hal >= $HAL_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, + HAVE_HAL="yes", + HAVE_HAL="no") + + if test "x$HAVE_HAL" = "xyes"; then + AC_DEFINE(HAVE_HAL, 1, [HAL available]) + fi else - AC_MSG_RESULT(yes) + AC_MSG_WARN(["Hal support disabled"]) fi -AC_MSG_CHECKING([for inclusion of libkbdraw]) -if test ! -d "$srcdir/libkbdraw"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([Your checkout of gnome-applets is out of date. - The 'libkbdraw' module has been virtually included into - gnome-applets by CVS as a subdirectory. Please check - out again (this can be done on top of your existing checkout]) +AC_SUBST(HAL_CFLAGS) +AC_SUBST(HAL_LIBS) + +dnl -- check for gucharmap (optional) ----------------------------------------- +GUCHARMAP_CFLAGS= +GUCHARMAP_LIBS= +PKG_CHECK_MODULES(GUCHARMAP, gucharmap >= 1.4.0, + HAVE_GUCHARMAP="yes", HAVE_GUCHARMAP="no") + +if test "x$HAVE_GUCHARMAP" = "xyes"; then + AC_DEFINE(HAVE_GUCHARMAP, 1, [Gucharmap Available]) else - AC_MSG_RESULT(yes) + AC_MSG_WARN([*** 'charpick' applet will not be built with gucharmap support ***]) fi +AC_SUBST(GUCHARMAP_CFLAGS) +AC_SUBST(GUCHARMAP_LIBS) -AM_CONDITIONAL(INCLUDE_GSWITCHIT_DEVEL, true) dnl pull devel from applet +dnl -- check for Python/GNOME modules (optional) ------------------------------ +PYGTK_CFLAGS= +PYGTK_LIBS= +PKG_CHECK_MODULES(PYGTK, + pygtk-2.0 >= $PYGTK_REQUIRED + pygobject-2.0 >= $PYGOBJECT_REQUIRED + gnome-python-2.0 >= $GNOME_PYTHON_REQUIRED, + HAVE_PYGTK="yes", HAVE_PYGTK="no") +AC_SUBST(PYGTK_LIBS) +AC_SUBST(PYGTK_CFLAGS) + +dnl *************************************************************************** +dnl *** find paths to installed binaries *** +dnl *************************************************************************** + +dnl -- xrdb ------------------------------------------------------------------- +AC_PATH_PROGS(PATH_TO_XRDB, "xrdb") + +dnl -- gdk-pixbuf-csource ----------------------------------------------------- +AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) + +if test x"$GDK_PIXBUF_CSOURCE" = xno; then + AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK]) +fi +AC_SUBST(GDK_PIXBUF_CSOURCE) + +dnl -- glib-genmarshal -------------------------------------------------------- +AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) + +dnl -- gconftool-2 ------------------------------------------------------------ +AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +if test x"$GCONFTOOL" = xno; then + AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) +fi + +dnl -- xsltproc --------------------------------------------------------------- +AC_PATH_PROG(XSLTPROC, xsltproc, no) +if test x"$XSLTPROC" = xno; then + AC_MSG_ERROR([xsltproc executable not found in your path - should be installed with libxslt]) +fi + +dnl -- scrollkeeper ----------------------------------------------------------- +AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no) +if test x$SCROLLKEEPER_CONFIG = xno; then + AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the Scrollkeeper 0.1.4 package) +fi +AC_SUBST(SCROLLKEEPER_REQUIRED) + +dnl -- jw --------------------------------------------------------------------- +AC_PATH_PROG(JW, jw, no) +if test x$JW = xno; then + HAVE_JW="no" +else + HAVE_JW="yes" +fi +AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes") +AC_SUBST(HAVE_JW) + +dnl *************************************************************************** +dnl *** GConf *** +dnl *************************************************************************** +AM_GCONF_SOURCE_2 -dnl ************************ -dnl ** Set up gettext ** -dnl ************************ +dnl *************************************************************************** +dnl *** Set up gettext *** +dnl *************************************************************************** ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de dz el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ka ko ku ky lt lv mk ml mn ms nb ne nl nn no pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sv ta te th tr uk vi wa xh zh_CN zh_HK zh_TW" @@ -218,47 +291,55 @@ AM_GLIB_GNU_GETTEXT gnomelocaledir='${prefix}/${DATADIRNAME}/locale' AC_SUBST(gnomelocaledir) -dnl gnome-doc-utils stuff - +dnl *************************************************************************** +dnl *** gnome-doc-utils *** +dnl *************************************************************************** GNOME_DOC_INIT +dnl *************************************************************************** +dnl *** gswitchit specific checks *** +dnl *************************************************************************** -dnl ****************************************** -dnl ** Check for Scrollkeeper ** -dnl ****************************************** +dnl -- check to enable flags with --enable-flags ------------------------------ +AC_ARG_ENABLE(flags, +[ --enable-flags Enable flags usage in the keyboard indicators], +, enable_flags=no) +AM_CONDITIONAL(ENABLE_FLAGS, test x$enable_flags != xno) -AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no) -if test x$SCROLLKEEPER_CONFIG = xno; then - AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the Scrollkeeper 0.1.4 package) +dnl -- make sure the cvs virtual includes have been checked out --------------- +AC_MSG_CHECKING([for inclusion of libgswitchit]) +if test ! -d "$srcdir/libgswitchit"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([Your checkout of gnome-applets is out of date. + The 'libgswitchit' module has been virtually included into + gnome-applets by CVS as a subdirectory. Please check + out again (this can be done on top of your existing checkout]) +else + AC_MSG_RESULT(yes) fi -AC_SUBST(SCROLLKEEPER_REQUIRED) -dnl ****************************************** -dnl ****************************************** - - -dnl ****************************************** -dnl ** Test whether jw is installed ** -dnl ****************************************** - -AC_PATH_PROG(JW, jw, no) -if test x$JW = xno; then - HAVE_JW="no" +AC_MSG_CHECKING([for inclusion of libkbdraw]) +if test ! -d "$srcdir/libkbdraw"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([Your checkout of gnome-applets is out of date. + The 'libkbdraw' module has been virtually included into + gnome-applets by CVS as a subdirectory. Please check + out again (this can be done on top of your existing checkout]) else - HAVE_JW="yes" + AC_MSG_RESULT(yes) fi -AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes") -AC_SUBST(HAVE_JW) + +AM_CONDITIONAL(INCLUDE_GSWITCHIT_DEVEL, true) dnl pull devel from applet case "$host" in -sparc-*-solaris*) gkb_type_sun=true;; -*) gkb_type_sun=false;; + sparc-*-solaris*) gkb_type_sun=true;; + *) gkb_type_sun=false;; esac AM_CONDITIONAL(GKB_SUN, $gkb_type_sun) -dnl ****************************************** -dnl ** battstat check ** -dnl ****************************************** +dnl *************************************************************************** +dnl *** battstat specific checks *** +dnl *************************************************************************** dnl --disable-battstat=(yes|no) AC_ARG_ENABLE(battstat, @@ -313,16 +394,16 @@ AM_CONDITIONAL(HAVE_LIBAPM, test "x$HAVE_LIBAPM" = "xyes") AM_CONDITIONAL(NEED_LIBAPM, test "x$NEED_LIBAPM" = "xyes") AM_CONDITIONAL(BUILD_BATTSTAT_APPLET, test x$build_battstat_applet = xyes) -dnl ******************************************* -dnl ** Mini-Commander checks ** -dnl ******************************************* +dnl *************************************************************************** +dnl *** Mini-Commander specific checks *** +dnl *************************************************************************** AC_ARG_ENABLE(mini-commander, [ --enable-mini-commander build mini-commander [[default: no, transparent upgrade to deskbar-applet]]], enable_mini_commander="yes", enable_mini_commander="no") AM_CONDITIONAL(BUILD_MINICOMMANDER_APPLET, test "x$enable_mini_commander" = "xyes") -dnl ******************************************* -dnl ** mixer applet check ** -dnl ******************************************* +dnl *************************************************************************** +dnl *** mixer applet specific checks *** +dnl *************************************************************************** GST_MAJORMINOR=auto AC_ARG_WITH(gstreamer, @@ -357,8 +438,6 @@ if test "x$GST_MAJORMINOR x$HAVE_GST_VER" = "xauto xnone" -o "x$GST_MAJORMINOR" PKG_CHECK_MODULES(MIXER, $GST8_PKGS, HAVE_GST_VER=0.8, HAVE_GST_VER=none) fi - - case $HAVE_GST_VER in 0.8|0.10) HAVE_GST="yes" @@ -385,63 +464,9 @@ fi AC_SUBST(MIXER_CFLAGS) AC_SUBST(MIXER_LIBS) -dnl *************************************** -dnl ** Check for libnotify ** -dnl *************************************** - -LIBNOTIFY_CFLAGS= -LIBNOTIFY_LIBS= -PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED, - HAVE_LIBNOTIFY="yes", HAVE_LIBNOTIFY="no") - -if test "x$HAVE_LIBNOTIFY" = "xyes"; then - AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available]) -fi - -AC_SUBST(LIBNOTIFY_CFLAGS) -AC_SUBST(LIBNOTIFY_LIBS) - -dnl *************************************** -dnl ** Check for libhal ** -dnl *************************************** - -HAL_CFLAGS= -HAL_LIBS= -AC_ARG_WITH(hal,[ --without-hal build without hal support]) - -if test "x$with_hal" != xno; then - - PKG_CHECK_MODULES(HAL, hal >= $HAL_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, - HAVE_HAL="yes", - HAVE_HAL="no") - - if test "x$HAVE_HAL" = "xyes"; then - AC_DEFINE(HAVE_HAL, 1, [HAL available]) - fi - -else - AC_MSG_WARN(["Hal support disabled"]) -fi - -AC_SUBST(HAL_CFLAGS) -AC_SUBST(HAL_LIBS) - -GUCHARMAP_CFLAGS= -GUCHARMAP_LIBS= -PKG_CHECK_MODULES(GUCHARMAP, gucharmap >= 1.4.0, - HAVE_GUCHARMAP="yes", HAVE_GUCHARMAP="no") - -if test "x$HAVE_GUCHARMAP" = "xyes"; then - AC_DEFINE(HAVE_GUCHARMAP, 1, [Gucharmap Available]) -else - AC_MSG_WARN([*** 'charpick' applet will not be built with gucharmap support ***]) -fi -AC_SUBST(GUCHARMAP_CFLAGS) -AC_SUBST(GUCHARMAP_LIBS) - -dnl ****************************************** -dnl ** keyboard accessibility status applet check -dnl ****************************************** +dnl *************************************************************************** +dnl *** keyboard accessibility status applet check *** +dnl *************************************************************************** savecppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $X_CFLAGS" @@ -454,9 +479,9 @@ if test "x$APPLET_ACCESSX" = "xtrue"; then fi CPPFLAGS=$savecppflags -dnl ****************************************** -dnl ** modemlights applet check ** -dnl ****************************************** +dnl *************************************************************************** +dnl *** modemlights applet check *** +dnl *************************************************************************** SU_TOOL= P_MODEMLIGHTS= @@ -470,16 +495,18 @@ AM_CONDITIONAL(APPLET_MODEMLIGHTS, test "x$HAVE_LIBUTIL" = "xtrue" -a "x$P_MODEM if test "x$SU_TOOL" == "x" -o "x$HAVE_LIBUTIL" != "xtrue" -o "x$P_MODEMLIGHTS" != "xmodemlights"; then AC_MSG_WARN([*** modemlights applet will not be built ***]) + build_modem_lights=false else MODEMLIGHTS_LIBS=" -lutil" AC_SUBST(MODEMLIGHTS_LIBS) AC_DEFINE_UNQUOTED(STB_SCRIPTS_DIR, "$STB_SCRIPTS_DIR", [System tools backends]) AC_DEFINE_UNQUOTED(SU_PATH, "${SU_TOOL}", [su executable path]) + build_modem_lights=true fi -dnl ****************************************** -dnl ** cpufreq applet check ** -dnl ****************************************** +dnl *************************************************************************** +dnl *** cpufreq applet check *** +dnl *************************************************************************** dnl --disable-cpufreq=(yes|no) AC_ARG_ENABLE(cpufreq, @@ -500,10 +527,6 @@ AC_ARG_ENABLE(suid, [[default: yes]]], , suid=yes) -PKG_CHECK_MODULES(CPUFREQ_SELECTOR, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED) -AC_SUBST(CPUFREQ_SELECTOR_CFLAGS) -AC_SUBST(CPUFREQ_SELECTOR_LIBS) - build_cpufreq_applet=no if test x$disable_cpufreq = xno; then @@ -522,17 +545,27 @@ AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes) AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes) AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$suid = xyes) +dnl *************************************************************************** +dnl *** invest-applet specific checks *** +dnl *************************************************************************** -dnl ==================================================================== -dnl Code for checking whether IPv6 is to be enabled on the system. -dnl ==================================================================== +if test "x$HAVE_PYGTK" = "xyes" -a "x$HAVE_PYHDRS" = "xyes"; then + AM_CHECK_PYMOD(gnomeapplet,, + BUILD_INVEST_APPLET="yes", BUILD_INVEST_APPLET="no") +else + BUILD_INVEST_APPLET="no" +fi + +AM_CONDITIONAL(BUILD_INVEST_APPLET, test "x$BUILD_INVEST_APPLET" = "xyes") + +dnl *************************************************************************** +dnl *** Check if IPv6 is available *** +dnl *************************************************************************** AC_MSG_CHECKING([whether to enable ipv6]) AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable IPv6 extensions], ,enable_ipv6=yes) if test $enable_ipv6 = yes; then - dnl ==================================================================== dnl Code for checking presence of AF_INET6 on the system. - dnl ==================================================================== AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/socket.h>], [ @@ -547,24 +580,9 @@ if test $enable_ipv6 = yes; then fi fi -dnl =================================================================dnl Code for checking presence of tm.tm_gmtoff on the system. -dnl ================================================================= -AC_CHECK_MEMBER([struct tm.tm_gmtoff],[struct_tm_tm_gmtoff=true],[struct_tm_tm_gmtoff=false],[#include <time.h>]) -case $struct_tm_tm_gmtoff in - true) - AC_DEFINE_UNQUOTED(HAVE_TM_TM_GMOFF, 1, Have the tm.tm_gmtoff member.) - ;; - *) - AC_CHECK_DECL(timezone,AC_DEFINE(HAVE_TIMEZONE,1,Have timezone),, -[ -#include <time.h> -]) - ;; -esac - -dnl ================================================================= -dnl Now we would check for specific function like getaddrinfo. -dnl ================================================================= +dnl *************************************************************************** +dnl *** Check for getaddrinfo *** +dnl *************************************************************************** have_getaddrinfo=no AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes) if test $have_getaddrinfo != yes; then @@ -577,14 +595,31 @@ if test $have_getaddrinfo = yes; then AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo() exists on the system]) fi -dnl ================================================================= -dnl End of IPv6 checks -dnl ================================================================= +dnl *************************************************************************** +dnl *** Check for presence of tm.tm_gmtoff on the system *** +dnl *************************************************************************** +AC_CHECK_MEMBER([struct tm.tm_gmtoff],[struct_tm_tm_gmtoff=true],[struct_tm_tm_gmtoff=false],[#include <time.h>]) +case $struct_tm_tm_gmtoff in + true) + AC_DEFINE_UNQUOTED(HAVE_TM_TM_GMOFF, 1, Have the tm.tm_gmtoff member.) + ;; + *) + AC_CHECK_DECL(timezone,AC_DEFINE(HAVE_TIMEZONE,1,Have timezone),, +[ +#include <time.h> +]) + ;; +esac -# Honor aclocal flags +dnl *************************************************************************** +dnl *** Honour aclocal flags *** +dnl *************************************************************************** ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" AC_SUBST(ACLOCAL_AMFLAGS) +dnl *************************************************************************** +dnl *** Set install directories *** +dnl *************************************************************************** iconsdir="${datadir}/icons" AC_SUBST(iconsdir) pixmapsdir="${datadir}/pixmaps" @@ -594,8 +629,6 @@ AC_SUBST(pkgdatadir) gladedir="${pkgdatadir}/glade" AC_SUBST(gladedir) -#defined the below to enable help to work for applets - AC_DEFINE_DIR(GNOME_ICONDIR, "${iconsdir}", [Gnome Icon Directory]) AC_DEFINE_DIR(GNOME_PIXMAPSDIR, "${pixmapsdir}", [Gnome Pixmaps Directory]) AC_DEFINE_DIR(GNOME_GLADEDIR, "${gladedir}", [Glade Resources Directory]) @@ -604,6 +637,20 @@ AC_DEFINE_DIR(SYSCONFDIR, "${sysconfdir}", [sysconfdir]) AC_DEFINE_DIR(LIBDIR, "${libdir}", [libdir]) AC_DEFINE_DIR(PREFIX, "$prefix", [install prefix]) +AS_AC_EXPAND(DATADIR, "${datadir}") +AS_AC_EXPAND(PYTHONDIR, $pythondir) +AS_AC_EXPAND(GLADEDIR, $gladedir) + +AC_SUBST(VERSION) +AC_SUBST(PACKAGE) +AC_SUBST(DATADIR) +AC_SUBST(LIBDIR) +AC_SUBST(PYTHONDIR) +AC_SUBST(GLADEDIR) + +dnl *************************************************************************** +dnl *** Output Makefiles et al *** +dnl *************************************************************************** AC_OUTPUT([ gnome-applets.spec Makefile @@ -626,9 +673,11 @@ gkb-new/xmodmap/Makefile gkb-new/xmodmap.sun/Makefile charpick/Makefile charpick/help/Makefile -gtik/Makefile -gtik/access/Makefile -gtik/help/Makefile +invest-applet/Makefile +invest-applet/invest/Makefile +invest-applet/invest/defs.py +invest-applet/data/Makefile +invest-applet/data/art/Makefile libgweather/Makefile libgweather/gweather.pc gweather/Makefile @@ -660,6 +709,9 @@ cpufreq/help/Makefile null_applet/Makefile ]) +dnl *************************************************************************** +dnl *** Display Summary *** +dnl *************************************************************************** echo " gnome-applets-$VERSION configure summary: @@ -678,11 +730,11 @@ gnome-applets-$VERSION configure summary: - drivemount $build_gnome_vfs_applets - geyes always - gswitchit always - - gtik $build_gnome_vfs_applets - gweather $build_gnome_vfs_applets + - invest-applet $BUILD_INVEST_APPLET - mini-commander $enable_mini_commander - mixer $HAVE_GST - - modemlights + - modemlights $build_modem_lights - multiload $build_gtop_applets - stickynotes always - trashapplet $build_gnome_vfs_applets diff --git a/invest-applet/data/GNOME_GtikApplet.server b/invest-applet/data/GNOME_GtikApplet.server new file mode 100644 index 000000000..b8069a634 --- /dev/null +++ b/invest-applet/data/GNOME_GtikApplet.server @@ -0,0 +1,18 @@ +<oaf_info> + +<!-- gtik was replaced by invest-applet, transparently upgrade the user --> +<oaf_server iid="OAFIID:GNOME_GtikApplet" + type="factory" + location="OAFIID:Invest_Applet_Factory"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + <item value="IDL:Bonobo/Unknown:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" value="Stock Ticker"/> + <oaf_attribute name="description" type="string" value="Replaced with invest-applet"/> + +</oaf_server> + +</oaf_info> diff --git a/invest-applet/data/Makefile.am b/invest-applet/data/Makefile.am index 16e3e476b..61a4eb4ab 100644 --- a/invest-applet/data/Makefile.am +++ b/invest-applet/data/Makefile.am @@ -5,7 +5,9 @@ SUBDIRS = art # ****************************************************************************** serverdir = $(libdir)/bonobo/servers server_in_files = Invest_Applet.server.in -server_DATA = $(server_in_files:.server.in=.server) +server_DATA = \ + $(server_in_files:.server.in=.server) \ + GNOME_GtikApplet.server # ****************************************************************************** # Desktop fdo launcher @@ -25,9 +27,10 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) # ****************************************************************************** # Misc data # ****************************************************************************** -resourcesdir = $(pkgdatadir) -resources_DATA = \ - Invest_Applet.xml \ +uidir = $(datadir)/gnome-2.0/ui +ui_DATA = \ + Invest_Applet.xml +glade_DATA = \ prefs-dialog.glade \ financialchart.glade @@ -58,6 +61,7 @@ DISTCLEANFILES = \ EXTRA_DIST = \ Invest_Applet.server.in.in \ + GNOME_GtikApplet.server \ $(resources_DATA) \ $(desktop_in_files) # $(schema_in_files) diff --git a/invest-applet/invest/Makefile.am b/invest-applet/invest/Makefile.am index afae4ccd3..e1d36af02 100644 --- a/invest-applet/invest/Makefile.am +++ b/invest-applet/invest/Makefile.am @@ -1,10 +1,9 @@ invest-applet: invest-applet.py - sed -e "s|\@PYTHONDIR\@|$(pythondir)/invest|" $< > $@ + sed -e "s|\@PYTHONDIR\@|$(pythondir)/|" $< > $@ bin_SCRIPTS = invest-chart -investbindir = $(libdir)/invest-applet -investbin_SCRIPTS = invest-applet +libexec_SCRIPTS = invest-applet investdir = $(pythondir)/invest invest_PYTHON = \ diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py index e00558800..7a771c099 100644 --- a/invest-applet/invest/__init__.py +++ b/invest-applet/invest/__init__.py @@ -21,7 +21,7 @@ if _check(name): if UNINSTALLED_INVEST: SHARED_DATA_DIR = abspath(join(dirname(__file__), '..', 'data')) else: - SHARED_DATA_DIR = join(DATA_DIR, "invest-applet") + SHARED_DATA_DIR = join(DATA_DIR, "gnome-applets", "invest-applet") print "Data Dir: %s" % SHARED_DATA_DIR USER_INVEST_DIR = expanduser("~/.gnome2/invest-applet") diff --git a/invest-applet/invest/applet.py b/invest-applet/invest/applet.py index 3e8bdd6f8..4c8f412a2 100644 --- a/invest-applet/invest/applet.py +++ b/invest-applet/invest/applet.py @@ -39,7 +39,7 @@ class InvestApplet: self.applet.add(box) self.applet.setup_menu_from_file ( - invest.SHARED_DATA_DIR, "Invest_Applet.xml", + invest.DATA_DIR, "Invest_Applet.xml", None, [("About", self.on_about), ("Prefs", self.on_preferences), ("Refresh", self.on_refresh)]) self.applet.show_all() diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py index 4d10bba84..033bebd45 100644 --- a/invest-applet/invest/chart.py +++ b/invest-applet/invest/chart.py @@ -213,7 +213,7 @@ class FinancialChart: self.autorefresh_id = gobject.timeout_add(AUTOREFRESH_TIMEOUT, self.on_refresh_chart, True) def show_chart(tickers): - ui = gtk.glade.XML(os.path.join(invest.SHARED_DATA_DIR, "financialchart.glade")) + ui = gtk.glade.XML(os.path.join(invest.GLADEDIR, "financialchart.glade")) chart = FinancialChart(ui) ui.get_widget("s").set_text(' '.join(tickers)) chart.on_refresh_chart() diff --git a/invest-applet/invest/defs.py.in b/invest-applet/invest/defs.py.in index b87ff3695..fcea79a5e 100644 --- a/invest-applet/invest/defs.py.in +++ b/invest-applet/invest/defs.py.in @@ -3,3 +3,4 @@ LIB_DIR = "@LIBDIR@" VERSION = "@VERSION@" PACKAGE = "@PACKAGE@" PYTHONDIR = "@PYTHONDIR@" +GLADEDIR = "@GLADEDIR@" diff --git a/invest-applet/invest/invest-applet.py b/invest-applet/invest/invest-applet.py index 626092eee..f6db7e381 100755 --- a/invest-applet/invest/invest-applet.py +++ b/invest-applet/invest/invest-applet.py @@ -16,8 +16,8 @@ if _check(name): print 'Running uninstalled invest, modifying PYTHONPATH' sys.path.insert(0, abspath(name)) else: - sys.path.insert(0, abspath("@PYTHONPATH@")) - print "Running installed invest, using [@PYTHONPATH@:$PYTHONPATH]" + sys.path.insert(0, abspath("@PYTHONDIR@")) + print "Running installed invest, using [@PYTHONDIR@:$PYTHONPATH]" # Now the path is set, import our applet import invest, invest.applet, invest.defs diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py index 3ef7c6e53..fb05b0f58 100644 --- a/invest-applet/invest/preferences.py +++ b/invest-applet/invest/preferences.py @@ -8,7 +8,7 @@ import cPickle class PrefsDialog: def __init__(self, applet): - self.glade = gtk.glade.XML(join(invest.SHARED_DATA_DIR, "prefs-dialog.glade")) + self.glade = gtk.glade.XML(join(invest.GLADEDIR, "prefs-dialog.glade")) self.dialog = self.glade.get_widget("preferences") self.treeview = self.glade.get_widget("stocks") diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 new file mode 100644 index 000000000..0c7117393 --- /dev/null +++ b/m4/acinclude.m4 @@ -0,0 +1,40 @@ +dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) +dnl +dnl example +dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) +dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local + +AC_DEFUN([AS_AC_EXPAND], +[ + EXP_VAR=[$1] + FROM_VAR=[$2] + + dnl first expand prefix and exec_prefix if necessary + prefix_save=$prefix + exec_prefix_save=$exec_prefix + + dnl if no prefix given, then use /usr/local, the default prefix + if test "x$prefix" = "xNONE"; then + prefix=$ac_default_prefix + fi + dnl if no exec_prefix given, then use prefix + if test "x$exec_prefix" = "xNONE"; then + exec_prefix=$prefix + fi + + full_var="$FROM_VAR" + dnl loop until it doesn't change anymore + while true; do + new_full_var="`eval echo $full_var`" + if test "x$new_full_var"="x$full_var"; then break; fi + full_var=$new_full_var + done + + dnl clean up + full_var=$new_full_var + AC_SUBST([$1], "$full_var") + + dnl restore prefix and exec_prefix + prefix=$prefix_save + exec_prefix=$exec_prefix_save +]) diff --git a/m4/python.m4 b/m4/python.m4 new file mode 100644 index 000000000..e1c5266de --- /dev/null +++ b/m4/python.m4 @@ -0,0 +1,62 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN([AM_CHECK_PYMOD], +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include <Python.h>],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) diff --git a/po/POTFILES.in b/po/POTFILES.in index 3e8bd52b1..1b8a67492 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -46,10 +46,6 @@ gswitchit/gswitchit-plugins.c gswitchit/gswitchit-plugins.glade gswitchit/gswitchit.glade gswitchit/gswitchit.schemas.in -gtik/GNOME_GtikApplet.server.in.in -gtik/GNOME_GtikApplet.xml -gtik/gtik.c -gtik/gtik.schemas.in gweather/GNOME_GWeatherApplet.xml gweather/GNOME_GWeatherApplet_Factory.server.in.in gweather/gweather-about.c @@ -57,6 +53,17 @@ gweather/gweather-applet.c gweather/gweather-dialog.c gweather/gweather-pref.c gweather/main.c +invest-applet/data/Invest_Applet.server.in.in +invest-applet/data/Invest_Applet.xml +invest-applet/data/financialchart.glade +invest-applet/data/invest-chart.desktop.in +invest-applet/data/prefs-dialog.glade +invest-applet/invest/about.py +invest-applet/invest/chart.py +invest-applet/invest/invest-applet.py +invest-applet/invest/preferences.py +invest-applet/invest/quotes.py +invest-applet/invest/widgets.py libgweather/gweather-gconf.c libgweather/gweather-prefs.c libgweather/weather.c |