Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer)
This commit is contained in:
parent
b46d6a44fa
commit
86ffb46358
13
ChangeLog
13
ChangeLog
|
@ -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>
|
2006-05-03 Alan Coopersmith <alan.coopersmith@sun.com>
|
||||||
|
|
||||||
Make Xephyr build on Solaris:
|
Make Xephyr build on Solaris:
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -111,7 +111,8 @@ AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h], AGP=yes)
|
||||||
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
|
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
|
||||||
|
|
||||||
dnl APM header
|
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
|
dnl fbdev header
|
||||||
AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes)
|
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
|
case $host_os in
|
||||||
linux*)
|
linux*)
|
||||||
|
if test "x$LNXAPM" = xyes; then
|
||||||
|
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
|
||||||
|
fi
|
||||||
XORG_OS="linux"
|
XORG_OS="linux"
|
||||||
XORG_OS_SUBDIR="linux"
|
XORG_OS_SUBDIR="linux"
|
||||||
XORG_OS_KBD="Lnx"
|
XORG_OS_KBD="Lnx"
|
||||||
xorg_bus_linuxpci="yes"
|
xorg_bus_linuxpci="yes"
|
||||||
|
AM_CONDITIONAL(LNXACPI,false)
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
ia64*)
|
ia64*)
|
||||||
linux_ia64=yes
|
linux_ia64=yes
|
||||||
|
AM_CONDITIONAL(LNXACPI,true)
|
||||||
;;
|
;;
|
||||||
alpha*)
|
alpha*)
|
||||||
linux_alpha=yes
|
linux_alpha=yes
|
||||||
XORG_OS_PCI="axp"
|
XORG_OS_PCI="axp"
|
||||||
xorg_bus_linuxpci="no"
|
xorg_bus_linuxpci="no"
|
||||||
;;
|
;;
|
||||||
|
x86*)
|
||||||
|
AM_CONDITIONAL(LNXACPI,true)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -21,20 +21,24 @@ INCLUDES = @XORG_INCS@
|
||||||
|
|
||||||
Xorg_SOURCES = xorg.c
|
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 $@
|
touch $@
|
||||||
|
|
||||||
OS_LIBS = os-support/libxorgos.la
|
DISTCLEANFILES = osandcommon.c xorg.c
|
||||||
|
|
||||||
XORG_LIBS = \
|
XORG_LIBS = \
|
||||||
@XORG_CORE_LIBS@ \
|
@XORG_CORE_LIBS@ \
|
||||||
common/libinit.a \
|
common/libinit.a \
|
||||||
loader/libloader.a \
|
loader/libloader.a \
|
||||||
common/libcommon.a \
|
libosandcommon.la \
|
||||||
parser/libxf86config.a \
|
parser/libxf86config.a \
|
||||||
$(OS_LIBS) \
|
|
||||||
dummylib/libdummy.a \
|
dummylib/libdummy.a \
|
||||||
dixmods/libdixmods.la \
|
dixmods/libdixmods.la \
|
||||||
@XORG_LIBS@
|
@XORG_LIBS@
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
noinst_LIBRARIES = libcommon.a libinit.a
|
noinst_LIBRARIES = libinit.a
|
||||||
|
noinst_LTLIBRARIES = libcommon.la
|
||||||
|
|
||||||
if XORG_BUS_SPARC
|
if XORG_BUS_SPARC
|
||||||
SBUS_SOURCES = xf86sbusBus.c
|
SBUS_SOURCES = xf86sbusBus.c
|
||||||
|
@ -30,7 +31,7 @@ xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES)
|
||||||
BUILT_SOURCES = xf86DefModeSet.c
|
BUILT_SOURCES = xf86DefModeSet.c
|
||||||
|
|
||||||
AM_LDFLAGS = -r
|
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 \
|
xf86Cursor.c xf86DGA.c xf86DPMS.c \
|
||||||
xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
|
xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
|
||||||
xf86Globals.c xf86Io.c xf86AutoConfig.c \
|
xf86Globals.c xf86Io.c xf86AutoConfig.c \
|
||||||
|
@ -41,7 +42,7 @@ libcommon_a_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
|
||||||
$(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
|
$(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
|
||||||
$(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
|
$(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
|
||||||
$(KBDSOURCES)
|
$(KBDSOURCES)
|
||||||
nodist_libcommon_a_SOURCES = xf86DefModeSet.c
|
nodist_libcommon_la_SOURCES = xf86DefModeSet.c
|
||||||
libinit_a_SOURCES = xf86Build.h xf86Init.c
|
libinit_a_SOURCES = xf86Build.h xf86Init.c
|
||||||
|
|
||||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
|
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
|
||||||
|
@ -98,4 +99,8 @@ EXTRA_DIST = \
|
||||||
modeline2c.pl \
|
modeline2c.pl \
|
||||||
$(DISTKBDSOURCES)
|
$(DISTKBDSOURCES)
|
||||||
|
|
||||||
|
if LNXACPI
|
||||||
|
XORG_CFLAGS += -DHAVE_ACPI
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
||||||
|
|
|
@ -216,7 +216,9 @@ Bool xf86sFlag = FALSE;
|
||||||
Bool xf86bsEnableFlag = FALSE;
|
Bool xf86bsEnableFlag = FALSE;
|
||||||
Bool xf86bsDisableFlag = FALSE;
|
Bool xf86bsDisableFlag = FALSE;
|
||||||
Bool xf86silkenMouseDisableFlag = FALSE;
|
Bool xf86silkenMouseDisableFlag = FALSE;
|
||||||
|
#ifdef HAVE_ACPI
|
||||||
Bool xf86acpiDisableFlag = FALSE;
|
Bool xf86acpiDisableFlag = FALSE;
|
||||||
|
#endif
|
||||||
char *xf86LayoutName = NULL;
|
char *xf86LayoutName = NULL;
|
||||||
char *xf86ScreenName = NULL;
|
char *xf86ScreenName = NULL;
|
||||||
char *xf86PointerName = NULL;
|
char *xf86PointerName = NULL;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.212 2004/01/27 01:31:45 dawes Exp $ */
|
/* $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:
|
* Loosely based on code bearing the following copyright:
|
||||||
|
@ -1661,11 +1661,13 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
xf86silkenMouseDisableFlag = TRUE;
|
xf86silkenMouseDisableFlag = TRUE;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_ACPI
|
||||||
if (!strcmp(argv[i], "-noacpi"))
|
if (!strcmp(argv[i], "-noacpi"))
|
||||||
{
|
{
|
||||||
xf86acpiDisableFlag = TRUE;
|
xf86acpiDisableFlag = TRUE;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!strcmp(argv[i], "-scanpci"))
|
if (!strcmp(argv[i], "-scanpci"))
|
||||||
{
|
{
|
||||||
DoScanPci(argc, argv, i);
|
DoScanPci(argc, argv, i);
|
||||||
|
|
|
@ -9,6 +9,16 @@ PLATFORM_PCI_SUPPORT = lnx_ev56.c \
|
||||||
$(srcdir)/../shared/xf86Axp.c
|
$(srcdir)/../shared/xf86Axp.c
|
||||||
endif
|
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 \
|
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 \
|
lnx_pci.c lnx_agp.c lnx_kmod.c lnx_KbdMap.c \
|
||||||
$(srcdir)/../shared/bios_mmap.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/stdResource.c \
|
||||||
$(srcdir)/../shared/libc_wrapper.c \
|
$(srcdir)/../shared/libc_wrapper.c \
|
||||||
$(srcdir)/../shared/at_scancode.c \
|
$(srcdir)/../shared/at_scancode.c \
|
||||||
|
$(ACPI_SOURCES) \
|
||||||
|
$(APM_SOURCES) \
|
||||||
$(PLATFORM_PCI_SUPPORT)
|
$(PLATFORM_PCI_SUPPORT)
|
||||||
|
|
||||||
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
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
|
# FIXME: These need to be added to the build
|
||||||
LNX_EXTRA_SOURCES = \
|
LNX_EXTRA_SOURCES = \
|
||||||
lnx_acpi.c \
|
|
||||||
lnx_apm.c \
|
|
||||||
lnx_axp.c \
|
|
||||||
lnx_font.c \
|
lnx_font.c \
|
||||||
lnx_ia64.c \
|
lnx_ia64.c \
|
||||||
lnx_jstk.c \
|
lnx_jstk.c \
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include "X.h"
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
#define XF86_OS_PRIVS
|
#define XF86_OS_PRIVS
|
||||||
#include "xf86_OSproc.h"
|
#include "xf86_OSproc.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_ACPI
|
||||||
|
extern PMClose lnxACPIOpen(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_APM
|
||||||
|
|
||||||
#include "lnx.h"
|
#include "lnx.h"
|
||||||
#include <linux/apm_bios.h>
|
#include <linux/apm_bios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -30,7 +37,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static PMClose lnxAPMOpen(void);
|
static PMClose lnxAPMOpen(void);
|
||||||
extern PMClose lnxACPIOpen(void);
|
|
||||||
static void lnxCloseAPM(void);
|
static void lnxCloseAPM(void);
|
||||||
static pointer APMihPtr = NULL;
|
static pointer APMihPtr = NULL;
|
||||||
|
|
||||||
|
@ -126,22 +132,30 @@ lnxPMConfirmEventToOs(int fd, pmEvent event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAVE_APM
|
||||||
|
|
||||||
PMClose
|
PMClose
|
||||||
xf86OSPMOpen(void)
|
xf86OSPMOpen(void)
|
||||||
{
|
{
|
||||||
PMClose ret = NULL;
|
PMClose ret = NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_ACPI
|
||||||
/* Favour ACPI over APM, but only when enabled */
|
/* Favour ACPI over APM, but only when enabled */
|
||||||
|
|
||||||
if (!xf86acpiDisableFlag)
|
if (!xf86acpiDisableFlag)
|
||||||
ret = lnxACPIOpen();
|
ret = lnxACPIOpen();
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_APM
|
||||||
ret = lnxAPMOpen();
|
ret = lnxAPMOpen();
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_APM
|
||||||
|
|
||||||
static PMClose
|
static PMClose
|
||||||
lnxAPMOpen(void)
|
lnxAPMOpen(void)
|
||||||
{
|
{
|
||||||
|
@ -190,3 +204,4 @@ lnxCloseAPM(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAVE_APM
|
||||||
|
|
|
@ -72,4 +72,4 @@ libminimi_la_SOURCES = \
|
||||||
|
|
||||||
libmi_la_SOURCES = $(libminimi_la_SOURCES)
|
libmi_la_SOURCES = $(libminimi_la_SOURCES)
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/mfb
|
INCLUDES = # -I$(top_srcdir)/mfb
|
||||||
|
|
|
@ -55,7 +55,9 @@ SOFTWARE.
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "regionstr.h"
|
#include "regionstr.h"
|
||||||
|
#if 0
|
||||||
#include "../mfb/maskbits.h"
|
#include "../mfb/maskbits.h"
|
||||||
|
#endif
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
|
|
||||||
#define NPT 128
|
#define NPT 128
|
||||||
|
|
Loading…
Reference in New Issue