mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 14:56:18 +00:00
testdisplay: make udev optional
Hopefully this makes Solaris happy. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
7f7cafe729
commit
fa461203e6
@ -57,7 +57,10 @@ PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
|
|||||||
|
|
||||||
# for testdisplay
|
# for testdisplay
|
||||||
PKG_CHECK_MODULES(CAIRO, cairo)
|
PKG_CHECK_MODULES(CAIRO, cairo)
|
||||||
PKG_CHECK_MODULES(LIBUDEV, libudev)
|
PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
|
||||||
|
if test x"$udev" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
|
||||||
|
fi
|
||||||
PKG_CHECK_MODULES(GLIB, glib-2.0)
|
PKG_CHECK_MODULES(GLIB, glib-2.0)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
@ -24,10 +24,14 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libudev.h>
|
|
||||||
|
|
||||||
#include "testdisplay.h"
|
#include "testdisplay.h"
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_UDEV
|
||||||
|
#include <libudev.h>
|
||||||
static struct udev_monitor *uevent_monitor;
|
static struct udev_monitor *uevent_monitor;
|
||||||
static struct udev *udev;
|
static struct udev *udev;
|
||||||
static GIOChannel *udevchannel;
|
static GIOChannel *udevchannel;
|
||||||
@ -119,3 +123,14 @@ void testdisplay_cleanup_hotplug(void)
|
|||||||
if (udev)
|
if (udev)
|
||||||
udev_unref(udev);
|
udev_unref(udev);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
gboolean testdisplay_setup_hotplug(void)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "no hotplug support on this platform\n");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void testdisplay_cleanup_hotplug(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user