From 10d472bf9d61bef32d0a383b2e3783e7a1d7621f Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Mon, 19 May 2008 05:15:30 +0200 Subject: [PATCH] Support for BSD apm XXX check amd64 pci init --- configure.ac | 13 +++++++++++++ hw/xfree86/os-support/bsd/Makefile.am | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9f5bbd06b..2cdce2fdf 100644 --- a/configure.ac +++ b/configure.ac @@ -272,6 +272,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, [ @@ -1268,6 +1277,10 @@ if test "x$XORG" = xyes; then xorg_bus_bsdpci="yes" ;; 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_bus_bsdpci="yes" diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am index 60a18d36f..70d6c1f1b 100644 --- a/hw/xfree86/os-support/bsd/Makefile.am +++ b/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