summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
Diffstat (limited to 'xserver')
-rw-r--r--xserver/configure.ac13
-rw-r--r--xserver/hw/xfree86/os-support/bsd/Makefile.am10
2 files changed, 22 insertions, 1 deletions
diff --git a/xserver/configure.ac b/xserver/configure.ac
index 1abc33cfc..b6a7216a2 100644
--- a/xserver/configure.ac
+++ b/xserver/configure.ac
@@ -171,6 +171,15 @@ if test -c /dev/xf86 ; then
AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver])
fi
+dnl BSD APM support
+AC_CHECK_HEADER([machine/apmvar.h],[
+ AC_CHECK_HEADER([sys/event.h],
+ ac_cv_BSD_KQUEUE_APM=yes,
+ ac_cv_BSD_APM=yes)])
+
+AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes])
+AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes])
+
dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c)
AC_CHECK_HEADER([execinfo.h],[
AC_CHECK_LIB(c, backtrace, [
@@ -1181,6 +1190,10 @@ int main () {
esac
;;
openbsd*)
+ if test "x$ac_cv_BSD_APM" = xyes \
+ -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then
+ XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
+ fi
XORG_OS="openbsd"
XORG_OS_SUBDIR="bsd"
XORG_OS_KBD="BSD"
diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.am b/xserver/hw/xfree86/os-support/bsd/Makefile.am
index 7aa1d7783..90ed35349 100644
--- a/xserver/hw/xfree86/os-support/bsd/Makefile.am
+++ b/xserver/hw/xfree86/os-support/bsd/Makefile.am
@@ -2,8 +2,16 @@ noinst_LTLIBRARIES = libbsd.la
# FIXME: Add USB mouse support?
-# FIXME: APM support.
+# APM support.
+if BSD_KQUEUE_APM
+APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+else
+if BSD_APM
+APM_SOURCES = $(srcdir)/bsd_apm.c
+else
APM_SOURCES = $(srcdir)/../shared/pm_noop.c
+endif
+endif
if FREEBSD_KLDLOAD
KMOD_SOURCES = bsd_kmod.c