Hi,

can we please use pkgconfig to detect the X11 libraries?


Cheers,
Andre'

>From 977827314f4dc1d79969d0a725f297d1ea7b35c9 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Andr=C3=A9=20Draszik?= <andre.dras...@st.com>
Date: Sun, 18 Oct 2009 17:22:31 +0100
Subject: [PATCH 1/1] configure.in: fix X11 detection - use pkgconfig
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Signed-off-by: André Draszik <andre.dras...@st.com>
---
 configure.in |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/configure.in b/configure.in
index 03b1930..5a7776f 100644
--- a/configure.in
+++ b/configure.in
@@ -132,18 +132,8 @@ AC_ARG_ENABLE(x11,
   enable_x11=yes)
 
 if test "$enable_x11" = "yes"; then
-  CFLAGS_saved="$CFLAGS"
-  CFLAGS="$CFLAGS -I/usr/X11R6/include"
-  AC_CHECK_HEADER(X11/X.h, x11_found=yes, x11_found=no)
-  CFLAGS="$CFLAGS_saved"
-  if test "$x11_found" = no; then
-    enable_x11=no
-    AC_MSG_WARN([
-*** no X11/X.h found -- building without X11 support.])
-  else
-    X11_LIBS="-L/usr/X11R6/lib -lX11 -lXext"
-    X11_CFLAGS="-I/usr/X11R6/include"
-  fi
+  PKG_CHECK_MODULES([X11], [xproto x11 xext], [enable_x11="yes"], [enable_x11="no",
+    AC_MSG_WARN([*** no X11 found -- building without X11 support])])
 fi
 
 AM_CONDITIONAL(X11_CORE, test "$enable_x11" = "yes")
-- 
1.6.3.3

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to