Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer)

This commit is contained in:
Adam Jackson 2006-05-09 18:04:29 +00:00
parent b46d6a44fa
commit 86ffb46358
11 changed files with 76 additions and 16 deletions

View File

@ -1,3 +1,16 @@
2006-05-09 Adam Jackson <ajax@freedesktop.org>
* configure.ac:
* hw/xfree86/Makefile.am:
* hw/xfree86/common/Makefile.am:
* hw/xfree86/common/xf86Globals.c:
* hw/xfree86/common/xf86Init.c:
* hw/xfree86/os-support/linux/Makefile.am:
* hw/xfree86/os-support/linux/lnx_acpi.c:
* hw/xfree86/os-support/linux/lnx_apm.c:
Bug #5209: Re-enable building APM and ACPI support. (Michel
Dänzer)
2006-05-03 Alan Coopersmith <alan.coopersmith@sun.com>
Make Xephyr build on Solaris:

View File

@ -111,7 +111,8 @@ AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h], AGP=yes)
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
dnl APM header
AC_CHECK_HEADERS([linux/apm_bios.h])
AC_CHECK_HEADERS([linux/apm_bios.h], LNXAPM=yes)
AM_CONDITIONAL(LNXAPM, [test "x$LNXAPM" = xyes])
dnl fbdev header
AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes)
@ -1045,19 +1046,27 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
case $host_os in
linux*)
if test "x$LNXAPM" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
fi
XORG_OS="linux"
XORG_OS_SUBDIR="linux"
XORG_OS_KBD="Lnx"
xorg_bus_linuxpci="yes"
AM_CONDITIONAL(LNXACPI,false)
case $host_cpu in
ia64*)
linux_ia64=yes
AM_CONDITIONAL(LNXACPI,true)
;;
alpha*)
linux_alpha=yes
XORG_OS_PCI="axp"
xorg_bus_linuxpci="no"
;;
x86*)
AM_CONDITIONAL(LNXACPI,true)
;;
*)
;;
esac

View File

@ -21,20 +21,24 @@ INCLUDES = @XORG_INCS@
Xorg_SOURCES = xorg.c
DISTCLEANFILES = xorg.c
# libxorgos and libcommon need symbols from each other
noinst_LTLIBRARIES = libosandcommon.la
libosandcommon_la_SOURCES = osandcommon.c
libosandcommon_la_LIBADD = \
os-support/libxorgos.la \
common/libcommon.la
xorg.c:
osandcommon.c xorg.c:
touch $@
OS_LIBS = os-support/libxorgos.la
DISTCLEANFILES = osandcommon.c xorg.c
XORG_LIBS = \
@XORG_CORE_LIBS@ \
common/libinit.a \
loader/libloader.a \
common/libcommon.a \
libosandcommon.la \
parser/libxf86config.a \
$(OS_LIBS) \
dummylib/libdummy.a \
dixmods/libdixmods.la \
@XORG_LIBS@

View File

@ -1,4 +1,5 @@
noinst_LIBRARIES = libcommon.a libinit.a
noinst_LIBRARIES = libinit.a
noinst_LTLIBRARIES = libcommon.la
if XORG_BUS_SPARC
SBUS_SOURCES = xf86sbusBus.c
@ -30,7 +31,7 @@ xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES)
BUILT_SOURCES = xf86DefModeSet.c
AM_LDFLAGS = -r
libcommon_a_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
xf86Cursor.c xf86DGA.c xf86DPMS.c \
xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
xf86Globals.c xf86Io.c xf86AutoConfig.c \
@ -41,7 +42,7 @@ libcommon_a_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
$(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
$(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
$(KBDSOURCES)
nodist_libcommon_a_SOURCES = xf86DefModeSet.c
nodist_libcommon_la_SOURCES = xf86DefModeSet.c
libinit_a_SOURCES = xf86Build.h xf86Init.c
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
@ -98,4 +99,8 @@ EXTRA_DIST = \
modeline2c.pl \
$(DISTKBDSOURCES)
if LNXACPI
XORG_CFLAGS += -DHAVE_ACPI
endif
AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@

View File

@ -216,7 +216,9 @@ Bool xf86sFlag = FALSE;
Bool xf86bsEnableFlag = FALSE;
Bool xf86bsDisableFlag = FALSE;
Bool xf86silkenMouseDisableFlag = FALSE;
#ifdef HAVE_ACPI
Bool xf86acpiDisableFlag = FALSE;
#endif
char *xf86LayoutName = NULL;
char *xf86ScreenName = NULL;
char *xf86PointerName = NULL;

View File

@ -1,5 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.212 2004/01/27 01:31:45 dawes Exp $ */
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Init.c,v 1.33 2006/03/25 19:52:03 ajax Exp $ */
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Init.c,v 1.34 2006/04/04 14:17:04 ajax Exp $ */
/*
* Loosely based on code bearing the following copyright:
@ -1661,11 +1661,13 @@ ddxProcessArgument(int argc, char **argv, int i)
xf86silkenMouseDisableFlag = TRUE;
return 1;
}
#ifdef HAVE_ACPI
if (!strcmp(argv[i], "-noacpi"))
{
xf86acpiDisableFlag = TRUE;
return 1;
}
#endif
if (!strcmp(argv[i], "-scanpci"))
{
DoScanPci(argc, argv, i);

View File

@ -9,6 +9,16 @@ PLATFORM_PCI_SUPPORT = lnx_ev56.c \
$(srcdir)/../shared/xf86Axp.c
endif
if LNXACPI
ACPI_SOURCES = lnx_acpi.c lnx_apm.c
XORG_CFLAGS += -DHAVE_ACPI
endif
if LNXAPM
APM_SOURCES = lnx_apm.c
XORG_CFLAGS += -DHAVE_APM
endif
liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_io.c lnx_kbd.c lnx_mouse.c \
lnx_pci.c lnx_agp.c lnx_kmod.c lnx_KbdMap.c \
$(srcdir)/../shared/bios_mmap.c \
@ -20,6 +30,8 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_io.c lnx_kbd.c lnx_mouse.c \
$(srcdir)/../shared/stdResource.c \
$(srcdir)/../shared/libc_wrapper.c \
$(srcdir)/../shared/at_scancode.c \
$(ACPI_SOURCES) \
$(APM_SOURCES) \
$(PLATFORM_PCI_SUPPORT)
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
@ -28,9 +40,6 @@ INCLUDES = $(XORG_INCS) -I/usr/include/drm # FIXME this last part is crack
# FIXME: These need to be added to the build
LNX_EXTRA_SOURCES = \
lnx_acpi.c \
lnx_apm.c \
lnx_axp.c \
lnx_font.c \
lnx_ia64.c \
lnx_jstk.c \

View File

@ -1,4 +1,3 @@
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"

View File

@ -10,6 +10,13 @@
#include "xf86Priv.h"
#define XF86_OS_PRIVS
#include "xf86_OSproc.h"
#ifdef HAVE_ACPI
extern PMClose lnxACPIOpen(void);
#endif
#ifdef HAVE_APM
#include "lnx.h"
#include <linux/apm_bios.h>
#include <unistd.h>
@ -30,7 +37,6 @@
#endif
static PMClose lnxAPMOpen(void);
extern PMClose lnxACPIOpen(void);
static void lnxCloseAPM(void);
static pointer APMihPtr = NULL;
@ -126,22 +132,30 @@ lnxPMConfirmEventToOs(int fd, pmEvent event)
}
}
#endif // HAVE_APM
PMClose
xf86OSPMOpen(void)
{
PMClose ret = NULL;
#ifdef HAVE_ACPI
/* Favour ACPI over APM, but only when enabled */
if (!xf86acpiDisableFlag)
ret = lnxACPIOpen();
if (!ret)
#endif
#ifdef HAVE_APM
ret = lnxAPMOpen();
#endif
return ret;
}
#ifdef HAVE_APM
static PMClose
lnxAPMOpen(void)
{
@ -190,3 +204,4 @@ lnxCloseAPM(void)
}
}
#endif // HAVE_APM

View File

@ -72,4 +72,4 @@ libminimi_la_SOURCES = \
libmi_la_SOURCES = $(libminimi_la_SOURCES)
INCLUDES = -I$(top_srcdir)/mfb
INCLUDES = # -I$(top_srcdir)/mfb

View File

@ -55,7 +55,9 @@ SOFTWARE.
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "regionstr.h"
#if 0
#include "../mfb/maskbits.h"
#endif
#include "mi.h"
#define NPT 128