fixed compilation with libnotify 0.5.2 (submitted by Lubos
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 7 Nov 2011 11:24:27 +0000 (11:24 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 7 Nov 2011 11:24:27 +0000 (11:24 +0000)
   Stanek).

NEWS
configure
po/Makefile.in
src/main.c
src/ui_notify.c

diff --git a/NEWS b/NEWS
index c6af5dc..8fbb06f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,12 @@
 * v0.6.2.13
-** psensor/psensor-server: build system supports gtk3
+** psensor/psensor-server: added gtk3 support build detection.
 ** psensor: fixed error about 'expose-event' (signal replaced by
    'draw') when compiled with gtk3.
 ** psensor: fixed typo in french translation file.
-** psensor-server: fixed compilation with microhttpd >= 0.9.2.
+** psensor-server: fixed compilation with microhttpd >= 0.9.2 (version
+   used by Fedora15) which introduces incompatible API changes.
+** psensor: fixed compilation with libnotify 0.5.2 (submitted by Lubos
+   Stanek).
 
 * v0.6.2.12
 ** psensor: added -d option to enable debug log (written to $HOME/.psensor/log).
index 5c1d5a0..6381d05 100755 (executable)
--- a/configure
+++ b/configure
@@ -7308,12 +7308,12 @@ if test -n "$GTK_CFLAGS"; then
     pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gtk+-3.0 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 " 2>/dev/null`
+  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -7325,12 +7325,12 @@ if test -n "$GTK_LIBS"; then
     pkg_cv_GTK_LIBS="$GTK_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gtk+-3.0 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 " 2>/dev/null`
+  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -7351,38 +7351,20 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 " 2>&1`
+               GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0" 2>&1`
         else
-               GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 " 2>&1`
+               GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$GTK_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (gtk+-3.0 ) were not met:
-
-$GTK_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"GTK+ 3 not present\"" >&5
+$as_echo "$as_me: WARNING: \"GTK+ 3 not present\"" >&2;}
 elif test $pkg_failed = untried; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"GTK+ 3 not present\"" >&5
+$as_echo "$as_me: WARNING: \"GTK+ 3 not present\"" >&2;}
 else
        GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
        GTK_LIBS=$pkg_cv_GTK_LIBS
index 5c58e32..f901ffc 100644 (file)
@@ -21,7 +21,7 @@ srcdir = .
 top_srcdir = ..
 
 
-prefix = /usr/local
+prefix = /tmp/r
 exec_prefix = ${prefix}
 datarootdir = ${prefix}/share
 datadir = ${datarootdir}
@@ -34,12 +34,12 @@ INSTALL_DATA = ${INSTALL} -m 644
 # We use $(mkdir_p).
 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /mnt/nfs4/users/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh does not start with $(SHELL), so we add it.
 # In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
 # versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /mnt/nfs4/users/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /mnt/nfs4/users/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune.net/svnpub/psensor/trunk/install-sh
 MKDIR_P = /bin/mkdir -p
 mkdir_p = /bin/mkdir -p
 
index 6f5f321..3ef7154 100644 (file)
@@ -346,6 +346,10 @@ int main(int argc, char **argv)
        textdomain(PACKAGE);
 #endif
 
+#if TUTU
+       printf("coucou\n");
+#endif
+
        while ((optc = getopt_long(argc, argv, "vhdu:", long_options,
                                   NULL)) != -1) {
                switch (optc) {
index e9e4b9d..716dcfc 100644 (file)
@@ -60,13 +60,10 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui)
        if (notify_is_initted() == TRUE) {
                name = strdup(sensor->name);
 
-#ifdef NOTIFY_VERSION_MAJOR
+#if defined(NOTIFY_CHECK_VERSION) && NOTIFY_CHECK_VERSION(0, 7, 0)
                /*
                 * since libnotify 0.7 notify_notification_new has
                 * only 3 parameters.
-                *
-                * libnotify < 0.7 does not define
-                * NOTIFY_VERSION_MAJOR
                 */
                notif = notify_notification_new(_("Temperature alert"),
                                                name,