diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-11-24 14:37:07 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-11-24 15:16:23 -0800 |
commit | d2c9d8af50351bd2e1385cfa056eda44f06d19c5 (patch) | |
tree | 70e43646f47e1d61168979b5a3b77427e81f427a /src/weston-launch.c | |
parent | 89eebb7cebda60b1689209b9553ccf9a6d6a2af2 (diff) | |
download | weston-d2c9d8af50351bd2e1385cfa056eda44f06d19c5.tar.gz |
configure.ac: Make libdrm optional in weston-launch
If libdrm is available, weston-launch and launcer-util.c will support
getting the drm device and setting and dropping drm master, otherwise
we'll only support getting input devices.
Diffstat (limited to 'src/weston-launch.c')
-rw-r--r-- | src/weston-launch.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/weston-launch.c b/src/weston-launch.c index d8364c85..56e22b10 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c @@ -50,8 +50,6 @@ #include <grp.h> #include <security/pam_appl.h> -#include <xf86drm.h> - #ifdef HAVE_SYSTEMD_LOGIN #include <systemd/sd-login.h> #endif @@ -70,6 +68,26 @@ #define MAX_ARGV_SIZE 256 +#ifdef HAVE_LIBDRM + +#include <xf86drm.h> + +#else + +static inline int +drmDropMaster(int drm_fd) +{ + return 0; +} + +static inline int +drmSetMaster(int drm_fd) +{ + return 0; +} + +#endif + struct weston_launch { struct pam_conv pc; pam_handle_t *ph; |