mirror of https://github.com/mpv-player/mpv
build: detect VT_GETMODE on FreeBSD and DragonFly
$ ./waf configure Checking for vt.h : no Checking for DRM : vt.h not found [...] ../test.c:1:10: fatal error: 'sys/vt.h' file not found #include <sys/vt.h> ^~~~~~~~~~ $ build/mpv --gpu-context=drm /path/to/video.mkv Error parsing option gpu-context (option parameter could not be parsed) Setting commandline option --gpu-context=drm failed. Exiting... (Fatal error)
This commit is contained in:
parent
055a490cef
commit
427709575d
|
@ -21,12 +21,19 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include <poll.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vt.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_CONSIO_H
|
||||
#include <sys/consio.h>
|
||||
#else
|
||||
#include <sys/vt.h>
|
||||
#endif
|
||||
|
||||
#include "drm_common.h"
|
||||
|
||||
#include "common/common.h"
|
||||
|
|
8
wscript
8
wscript
|
@ -282,6 +282,12 @@ iconv support use --disable-iconv.",
|
|||
'desc': 'vt.h',
|
||||
'func': check_statement(['sys/vt.h', 'sys/ioctl.h'],
|
||||
'int m; ioctl(0, VT_GETMODE, &m)'),
|
||||
}, {
|
||||
'name': 'consio.h',
|
||||
'desc': 'consio.h',
|
||||
'deps': '!vt.h',
|
||||
'func': check_statement(['sys/consio.h', 'sys/ioctl.h'],
|
||||
'int m; ioctl(0, VT_GETMODE, &m)'),
|
||||
}, {
|
||||
'name': 'gbm.h',
|
||||
'desc': 'gbm.h',
|
||||
|
@ -495,7 +501,7 @@ video_output_features = [
|
|||
}, {
|
||||
'name': '--drm',
|
||||
'desc': 'DRM',
|
||||
'deps': 'vt.h',
|
||||
'deps': 'vt.h || consio.h',
|
||||
'func': check_pkg_config('libdrm', '>= 2.4.74'),
|
||||
}, {
|
||||
'name': '--gbm',
|
||||
|
|
Loading…
Reference in New Issue