]> granicus.if.org Git - transmission/commitdiff
(gtk) #891: patch: add option to disable libnotify support at compile time
authorCharles Kerr <charles@transmissionbt.com>
Sun, 20 Apr 2008 13:30:44 +0000 (13:30 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 20 Apr 2008 13:30:44 +0000 (13:30 +0000)
configure.ac
libtransmission/inout.c

index b7d8f79b1515428f03c076bd4c5bdb1aca69647f..c129857d1fef38f3ca94b258c28d48cea3cd291c 100644 (file)
@@ -108,15 +108,15 @@ if test "x$use_gio" = "xyes"; then
     AC_DEFINE([HAVE_GIO], 1)
 fi
 
-PKG_CHECK_MODULES([LIBNOTIFY],
-                  [libnotify >= $LIBNOTIFY_MINIMUM],
-                  [use_libnotify=yes],
-                  [use_libnotify=no])
-AC_SUBST(LIBNOTIFY_LIBS)
-AC_SUBST(LIBNOTIFY_CFLAGS)
-if test "x$use_libnotify" = "xyes"; then
-    AC_DEFINE([HAVE_LIBNOTIFY], 1)
-fi
+AC_ARG_ENABLE([libnotify], 
+              AS_HELP_STRING([--enable-libnotify],[enable notifications]),, 
+              [enable_libnotify=yes]) 
+if test x$enable_libnotify = xyes ; then 
+    PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= $LIBNOTIFY_MINIMUM]) 
+    AC_SUBST(LIBNOTIFY_LIBS) 
+    AC_SUBST(LIBNOTIFY_CFLAGS) 
+    AC_DEFINE([HAVE_LIBNOTIFY], 1) 
+fi 
 
 PKG_CHECK_MODULES([DBUS_GLIB],
                   [dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
@@ -303,7 +303,7 @@ Configuration:
         Build GTK+ client:          ${build_gtk}
           ... gio support:          ${use_gio}
           ... dbus-glib support:    ${use_dbus_glib}
-          ... libnotify support:    ${use_libnotify}
+          ... libnotify support:    ${enable_libnotify}
         Build OS X client:          ${build_darwin}
         Build wxWidgets client:     ${build_wx}
 
index 50a75c7f44a25a03f88173440095cf9898ffcae9..e5945366cda1de4818b67ad49bc254221bc0b040 100644 (file)
@@ -125,7 +125,13 @@ findFileLocation( const tr_torrent * tor,
 
     assert( inf->files[first].offset <= offset );
     if( offset >= inf->files[first].offset + inf->files[first].length ) {
+        fprintf( stderr, "piece index is %lu\n", (unsigned long)pieceIndex );
+        fprintf( stderr, "piece offset is %lu\n", (unsigned long)pieceOffset );
+        fprintf( stderr, "piece size is %lu\n", (unsigned long)inf->pieceSize );
+        fprintf( stderr, "inf->totalSize is %"PRIu64"\n", inf->totalSize );
         fprintf( stderr, "offset is %"PRIu64"\n", offset );
+        fprintf( stderr, "first is is %"PRIu64"\n", (uint64_t)first );
+        fprintf( stderr, "inf->fileCount is %"PRIu64"\n", (uint64_t)inf->fileCount );
         fprintf( stderr, "inf->fileCount is %d\n", (int)inf->fileCount );
         fprintf( stderr, "inf->files[first].offset is %"PRIu64"\n", inf->files[first].offset );
         fprintf( stderr, "inf->files[first].length is %"PRIu64"\n", inf->files[first].length );