if enabled libcdio; then
check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
- die "ERROR: libcdio-paranoia not found"
+ die "ERROR: No usable libcdio/cdparanoia found"
fi
-check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
+enabled xlib &&
+ check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib
-if enabled libxcb || enabled x11grab && ! disabled libxcb; then
- check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || {
- enabled libxcb && die "ERROR: libxcb not found";
+if ! disabled libxcb; then
+ check_pkg_config "xcb >= 1.4" xcb/xcb.h xcb_connect || {
+ enabled libxcb && die "ERROR: libxcb >= 1.4 not found";
} && disable x11grab && enable libxcb
- disabled libxcb_shm ||
+if enabled libxcb; then
+ disabled libxcb_shm || {
check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
enabled libxcb_shm && die "ERROR: libxcb_shm not found";
- } && check_header sys/shm.h && enable libxcb_shm
+ } && check_header sys/shm.h && enable libxcb_shm; }
- disabled libxcb_xfixes ||
+ disabled libxcb_xfixes || {
check_pkg_config xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image || {
enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found";
- } && enable libxcb_xfixes
+ } && enable libxcb_xfixes; }
- add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
- add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs"
+ disabled libxcb_shape || {
+ check_pkg_config xcb-shape xcb/shape.h xcb_shape_get_rectangles || {
+ enabled libxcb_shape && die "ERROR: libxcb_shape not found";
+ } && enable libxcb_shape; }
+
+ add_cflags $xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags $xcb_shape_cflags
+ add_extralibs $xcb_libs $xcb_shm_libs $xcb_xfixes_libs $xcb_shape_libs
+fi
fi
if enabled x11grab; then