xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Fri Nov 1 08:30:20 CET 2013


 configure.ac             |   14 +++++++-------
 include/xorg-config.h.in |    3 +++
 2 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 66c5ee0ff4690e630a69656331fd9d545c99c26c
Author: Egbert Eich <eich at freedesktop.org>
Date:   Wed Aug 14 18:18:56 2013 +0200

    config/APM: Add option to disable building of APM support on Linux
    
        APM support in the Xserver was used to restore the console mode
        prior to a power management event. This was to ensure the mode
        upon suspend/resume was one that the system firmware or kernel
        could deal with.
        APM support is now largely obsolete, KMS drivers don't require a
        mode restoration anyhow. Therefore it should be possible to disable
        this feature.
    
    (small modification by keithp - move test for XF86PM flag after check
    for APM, then move XF86PM flag to xorg-config.h.in)
    
    Signed-off-by: Egbert Eich <eich at freedesktop.org>
    Tested-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 9b8b89f..c48d2aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -228,10 +228,6 @@ dnl AGPGART headers
 AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
 AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
 
-dnl APM header
-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)
 AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes])
@@ -638,6 +634,7 @@ AC_ARG_ENABLE(libdrm,         AS_HELP_STRING([--enable-libdrm], [Build Xorg with
 AC_ARG_ENABLE(clientids,      AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes])
 AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
 AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
+AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
 
 dnl DDXes.
 AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -1736,9 +1733,6 @@ if test "x$XORG" = xyes; then
 
 	case $host_os in
 	  linux*)
-		if test "x$LNXAPM" = xyes; then
-			XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		fi
 		XORG_OS_SUBDIR="linux"
 		linux_acpi="no"
 		case $host_cpu in
@@ -1751,6 +1745,11 @@ if test "x$XORG" = xyes; then
 		  *)
 			;;
 		esac
+		dnl APM header
+		AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm])
+		if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then
+			AC_DEFINE(XF86PM, 1, [Support APM/ACPI power management in the server])
+		fi
 		;;
 	  freebsd* | kfreebsd*-gnu | dragonfly*)
 		XORG_OS_SUBDIR="bsd"
@@ -1913,6 +1912,7 @@ AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
 AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
 AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
+AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes])
 AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
 AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
 AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 0df31ae..487d7ad 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -142,4 +142,7 @@
 /* Define to 1 if you have the `seteuid' function. */
 #undef HAVE_SETEUID
 
+/* Support APM/ACPI power management in the server */
+#undef XF86PM
+
 #endif /* _XORG_CONFIG_H_ */


More information about the xorg-commit mailing list