1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

#922: No need to check on gio, libnotify and dbus if gtk disabled.

This commit is contained in:
Charles Kerr 2008-05-08 17:12:57 +00:00
parent f48b2b24e9
commit 9dcd32530e

View file

@ -91,6 +91,9 @@ AC_ARG_ENABLE([gtk],
[want_gtk=${enableval}],
[want_gtk=${have_gtk}])
build_gtk=no
use_gio=no
use_libnotify=no
use_dbus_glib=no
if test "x$want_gtk" = "xyes" ; then
if test "x$have_gtk" = "xyes"; then
build_gtk=yes
@ -102,41 +105,44 @@ AM_CONDITIONAL([BUILD_GTK],[test "x$build_gtk" = "xyes"])
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
PKG_CHECK_MODULES([GIO],
[gio-2.0 >= $GIO_MINIMUM],
[use_gio=yes],
[use_gio=no])
AC_SUBST(GIO_LIBS)
AC_SUBST(GIO_CFLAGS)
if test "x$use_gio" = "xyes"; then
AC_DEFINE([HAVE_GIO], 1)
fi
if test "x$build_gtk" = "xyes"; then
PKG_CHECK_MODULES([LIBNOTIFY],
[libnotify >= $LIBNOTIFY_MINIMUM],
[have_libnotify=yes],
[have_libnotify=no])
AC_ARG_ENABLE([libnotify],
AS_HELP_STRING([--enable-libnotify],[enable notifications]),,
[enable_libnotify=yes])
use_libnotify=no
if test "x$enable_libnotify" = "xyes" ; then
if test "x$have_libnotify" = "xyes"; then
use_libnotify=yes
AC_SUBST(LIBNOTIFY_LIBS)
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_DEFINE([HAVE_LIBNOTIFY], 1)
PKG_CHECK_MODULES([GIO],
[gio-2.0 >= $GIO_MINIMUM],
[use_gio=yes],
[use_gio=no])
AC_SUBST(GIO_LIBS)
AC_SUBST(GIO_CFLAGS)
if test "x$use_gio" = "xyes"; then
AC_DEFINE([HAVE_GIO], 1)
fi
fi
PKG_CHECK_MODULES([DBUS_GLIB],
[dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
[use_dbus_glib=yes],
[use_dbus_glib=no])
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)
if test "x$use_dbus_glib" = "xyes"; then
AC_DEFINE([HAVE_DBUS_GLIB], 1)
PKG_CHECK_MODULES([LIBNOTIFY],
[libnotify >= $LIBNOTIFY_MINIMUM],
[have_libnotify=yes],
[have_libnotify=no])
AC_ARG_ENABLE([libnotify],
AS_HELP_STRING([--enable-libnotify],[enable notifications]),,
[enable_libnotify=yes])
use_libnotify=no
if test "x$enable_libnotify" = "xyes" ; then
if test "x$have_libnotify" = "xyes"; then
use_libnotify=yes
AC_SUBST(LIBNOTIFY_LIBS)
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_DEFINE([HAVE_LIBNOTIFY], 1)
fi
fi
PKG_CHECK_MODULES([DBUS_GLIB],
[dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
[use_dbus_glib=yes],
[use_dbus_glib=no])
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)
if test "x$use_dbus_glib" = "xyes"; then
AC_DEFINE([HAVE_DBUS_GLIB], 1)
fi
fi
AC_CHECK_HEADERS([libintl.h])