From 123cab092cc2a837ebccd30c18e6c138bdcbc2a8 Mon Sep 17 00:00:00 2001
From: runge <runge>
Date: Wed, 22 Nov 2006 00:12:09 +0000
Subject: [PATCH] use AC_CHECK_LIB for fbpm and dpms

---
 configure.ac | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1abd74e..b54cafd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,16 +118,15 @@ elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
 			[#include <X11/Xlib.h>])
 
 		if test "x$with_fbpm" != "xno"; then
-			AC_CHECK_HEADER(X11/extensions/fbpm.h,
+			AC_CHECK_LIB(Xext, FBPMForceLevel, 
 				[AC_DEFINE(HAVE_FBPM)], ,
-				[#include <X11/Xlib.h>
-#include <X11/Xmd.h>])
+				$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
 		fi
 
 		if test "x$with_dpms" != "xno"; then
-			AC_CHECK_HEADER(X11/extensions/dpms.h,
+			AC_CHECK_LIB(Xext, DPMSForceLevel, 
 				[AC_DEFINE(HAVE_DPMS)], ,
-				[#include <X11/Xlib.h>])
+				$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
 		fi
 
 		AC_CHECK_LIB(Xtst, XTestGrabControl, 
-- 
2.18.1