[vlc-devel] commit: Add pkg-config support for directfb detection in 0.8.6-bugfix ( Nicolas Chauvet )

git version control git at videolan.org
Fri Jun 6 15:18:37 CEST 2008


vlc | branch: 0.8.6-neuros | Nicolas Chauvet <kwizart at gmail.com> | Mon May 26 14:26:12 2008 +0200| [3cd0536a9b8944e570a1a382fd52c407da919261]

Add pkg-config support for directfb detection in 0.8.6-bugfix

This patch is aimed to have pkg-config support for directfb
It also keep the legacy header detection as a falback

Nicolas Chauvet (kwizart)

Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3cd0536a9b8944e570a1a382fd52c407da919261
---

 configure.ac |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 17dbf5c..6133a38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4014,18 +4014,8 @@ AC_ARG_ENABLE(directfb,
   [  --enable-directfb       DirectFB support (default disabled)])
 if test "${enable_directfb}" = "yes"
 then
-  if test "${with_directfb}" = "no"
+  if test "${with_directfb}" = "yes"
   then
-    AC_CHECK_HEADER(directfb.h, have_directfb="true", have_directfb="false")
-    if test "${have_directfb}"= "true"
-    then
-        VLC_ADD_PLUGINS([directfb])
-        VLC_ADD_LDFLAGS([directfb],[-ldirectfb -lfusion -ldirect -lpthread -ljpeg -lz -ldl])
-        VLC_ADD_CPPFLAGS([directfb],[-I/usr/include/directfb -D_REENTRANT])
-    else
-        AC_MSG_ERROR([cannot find /usr/include/directfb headers, make sure directfb is installed on your system or use --disable-directfb])
-    fi
-  else
     CPPFLAGS_save="${CPPFLAGS}"
     CPPFLAGS="${CPPFLAGS} -I${with_directfb}/include"
     AC_CHECK_HEADER(directfb.h, have_directfb="true", have_directfb="false")
@@ -4039,6 +4029,20 @@ then
             VLC_ADD_LDFLAGS([directfb],[-L${with_directfb}/lib -ldirectfb -lfusion -ldirect -lpthread -ljpeg -lz -ldl])
         fi ],
         [ AC_MSG_ERROR([cannot find directfb headers in ${with_directfb}/include]) ])
+  else
+    PKG_CHECK_MODULES(DIRECTFB, directfb, [have_directfb="true"], [have_directfb="false"])
+    if test "${have_directfb}" = "false"
+    then
+        AC_CHECK_HEADER(directfb.h, have_directfb="true", have_directfb="false")
+    fi
+    if test "${have_directfb}" = "true"
+    then
+        VLC_ADD_PLUGINS([directfb])
+        VLC_ADD_LDFLAGS([directfb],[${DIRECTFB_LIBS}])
+        VLC_ADD_CPPFLAGS([directfb],[${DIRECTFB_CFLAGS}])
+    else
+        AC_MSG_ERROR([cannot find /usr/include/directfb headers, make sure directfb is installed on your system or use --disable-directfb])
+    fi
   fi
 fi
 




More information about the vlc-devel mailing list