Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ dnl kdrive and its subsystems
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: yes)]), [KDRIVE=$enableval], [KDRIVE=yes])
AC_ARG_ENABLE(xvesa, AS_HELP_STRING([--disable-xvesa], [Build Xvesa server (default: yes)]), [XVESA=$enableval], [XVESA=yes])
AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--disable-xfbdev], [Build Xfbdev server (default: yes)]), [XFBDEV=$enableval], [XFBDEV=yes])

AC_ARG_ENABLE(xmodesetting, AS_HELP_STRING([--disable-xmodesetting], [Build Xmodesetting server (default: yes)]), [XMODESETTING=$enableval], [XMODESETTING=yes])

dnl chown/chmod to be setuid root as part of build
dnl Replaces InstallXserverSetUID in imake
Expand Down Expand Up @@ -548,7 +548,16 @@ if test "$KDRIVE" = yes; then
AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server])
fi
fi



PKG_CHECK_MODULES(GBM, "gbm", [GBM=yes], [GBM=no])
PKG_CHECK_MODULES(LIBDRM, "libdrm", [LIBDRM=yes], [LIBDRM=no])
if test "x$GBM" != "xno" -a "x$LIBDRM" != "xno"; then
if test "x$XMODESETTING" != "xno"; then
AC_DEFINE(KDRIVEMODESETTING, 1, [Build modesetting-based kdrive server])
fi
fi

# damage shadow extension fb mi
KDRIVE_INC='-I$(top_srcdir)/kdrive/src'
KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
Expand Down Expand Up @@ -579,6 +588,7 @@ AC_SUBST(KDRIVE_LIBS)
AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes])
AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_asm_vm86_h" = xyes -a "x$XVESA" != "xno"])
AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes -a "x$XFBDEV" != "xno"])
AM_CONDITIONAL(KDRIVEMODESETTING, [test "x$XMODESETTING" != "xno"])

dnl and the rest of these are generic, so they're in config.h
AC_DEFINE(XResExtension, 1, [Build XRes extension])
Expand Down Expand Up @@ -661,6 +671,7 @@ xfixes/Makefile
kdrive/Makefile
kdrive/fbdev/Makefile
kdrive/linux/Makefile
kdrive/modesetting/Makefile
kdrive/src/Makefile
kdrive/vesa/Makefile
])
7 changes: 6 additions & 1 deletion kdrive/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if KDRIVEFBDEV
FBDEV_SUBDIRS = fbdev
endif

if KDRIVEMODESETTING
MODESETTING_SUBDIRS = modesetting
endif

if KDRIVELINUX
LINUX_SUBDIRS = linux
endif
Expand All @@ -14,6 +18,7 @@ SUBDIRS = \
src \
$(LINUX_SUBDIRS) \
$(FBDEV_SUBDIRS) \
$(VESA_SUBDIRS)
$(VESA_SUBDIRS) \
$(MODESETTING_SUBDIRS)

DIST_SUBDIRS = vesa fbdev src linux
31 changes: 31 additions & 0 deletions kdrive/modesetting/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
AM_CPPFLAGS = \
@KDRIVE_INCS@ \
@KDRIVE_CFLAGS@ \
$(shell pkg-config --cflags libdrm gbm)

noinst_LIBRARIES = libmodesetting.a

bin_PROGRAMS = Xmodesetting

libmodesetting_a_SOURCES = \
modesetting.c \
modesetting.h

Xmodesetting_SOURCES = \
msinit.c

Xmodesetting_LDFLAGS = $(shell pkg-config --libs libdrm gbm)

Xmodesetting_LDADD = \
libmodesetting.a \
@KDRIVE_LIBS@ \
@XSERVER_LIBS@

Xmodesetting_DEPENDENCIES = \
libmodesetting.a @KDRIVE_LIBS@

install-exec-hook:
if INSTALL_SETUID
chown root $(DESTDIR)$(bindir)/Xmodesetting
chmod u+s $(DESTDIR)$(bindir)/Xmodesetting
endif
Loading