summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_apm.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-05-09 18:04:29 +0000
committerAdam Jackson <ajax@nwnk.net>2006-05-09 18:04:29 +0000
commit86ffb46358965509aa3ee536f15cb5a4e5e04426 (patch)
tree899e93de29f4e34dff19b0f2eae0d1c87e0bcde5 /hw/xfree86/os-support/linux/lnx_apm.c
parentb46d6a44fa97a3e66de828385026b7f84d9e59b8 (diff)
Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer)
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_apm.c')
-rw-r--r--hw/xfree86/os-support/linux/lnx_apm.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index bd78d877f..a0722edd7 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -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