diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 9cb419162..ee5587d93 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md) xf86PciMatchDriver(md); #endif -#if defined(__linux__) +#if defined(HAVE_MODESETTING_DRIVER) xf86AddMatchedDriver(md, "modesetting"); #endif diff --git a/include/meson.build b/include/meson.build index 5e50e1fad..6c1c1dcd4 100644 --- a/include/meson.build +++ b/include/meson.build @@ -373,6 +373,7 @@ xorg_data.set('WSCONS_SUPPORT', xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h') ? '1' : false) xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h') ? '1' : false) xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false) +xorg_data.set('HAVE_MODESETTING_DRIVER', build_modesetting ? '1' : false) if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly' if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' diff --git a/include/xorg-config.h.meson.in b/include/xorg-config.h.meson.in index 59f1c2a8d..192c340dc 100644 --- a/include/xorg-config.h.meson.in +++ b/include/xorg-config.h.meson.in @@ -145,4 +145,7 @@ /* Fallback input driver if the assigned driver fails */ #mesondefine FALLBACK_INPUT_DRIVER +/* Define if building the modesetting driver */ +#mesondefine HAVE_MODESETTING_DRIVER + #endif /* _XORG_CONFIG_H_ */