mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[draw] Build with GTK by default instead of Imlib2
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f31517817c
commit
32fc1a0a78
2 changed files with 12 additions and 12 deletions
|
@ -21,11 +21,11 @@
|
|||
|
||||
#include <cairo-xcb.h>
|
||||
|
||||
#ifdef HAVE_GTK
|
||||
#ifdef HAVE_IMLIB2
|
||||
#include <Imlib2.h>
|
||||
#else
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#else
|
||||
#include <Imlib2.h>
|
||||
#endif
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
@ -647,7 +647,7 @@ void draw_image_from_argb_data(DrawCtx *ctx, int x, int y, int w, int h,
|
|||
cairo_surface_destroy(source);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GTK
|
||||
#ifndef HAVE_IMLIB2
|
||||
|
||||
/** Draw an image (PNG format only) from a file to a draw context
|
||||
* \param ctx Draw context to draw to
|
||||
|
@ -710,7 +710,7 @@ draw_get_image_size(const char *filename)
|
|||
return size;
|
||||
}
|
||||
|
||||
#else /* HAVE_GTK */
|
||||
#else /* HAVE_IMLIB2 */
|
||||
|
||||
static const char *
|
||||
draw_imlib_load_strerror(Imlib_Load_Error e)
|
||||
|
@ -823,7 +823,7 @@ draw_get_image_size(const char *filename)
|
|||
|
||||
return size;
|
||||
}
|
||||
#endif /* HAVE_GTK */
|
||||
#endif /* HAVE_IMLIB2 */
|
||||
|
||||
/** Rotate a drawable
|
||||
* \param ctx Draw context to draw to
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -113,15 +113,15 @@ PKG_CHECK_MODULES([pangocairo], [pangocairo],,
|
|||
[AC_MSG_ERROR([awesome requires pangocairo.])])
|
||||
PKG_CHECK_MODULES([confuse], [libconfuse >= 2.6],,
|
||||
[AC_MSG_ERROR([awesome requires libconfuse >= 2.6.])])
|
||||
AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build with gtk library (default: disabled)]))
|
||||
AC_ARG_WITH([imlib2], AS_HELP_STRING([--with-imlib2], [Build with Imlib2 (default: disabled)]))
|
||||
|
||||
if test "x$with_gtk" == "xyes"; then
|
||||
if test "x$with_imlib2" == "xyes"; then
|
||||
PKG_CHECK_MODULES([imlib2], [imlib2],,
|
||||
[AC_MSG_ERROR([Cannot fined Imlib2.])])
|
||||
AC_DEFINE([WITH_IMLIB2],1,[Defined to use Imlib2])
|
||||
else
|
||||
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.2],,
|
||||
[AC_MSG_ERROR([Cannot find gtk+-2.0 >= 2.2])])
|
||||
AC_DEFINE([HAVE_GTK],1,[Defined to use gtk])
|
||||
else
|
||||
PKG_CHECK_MODULES([imlib2], [imlib2],,
|
||||
[AC_MSG_ERROR([awesome requires Imlib2.])])
|
||||
fi
|
||||
PKG_CHECK_MODULES([xcb], [xcb],,
|
||||
[AC_MSG_ERROR([awesome requires xcb.])])
|
||||
|
|
Loading…
Reference in a new issue