Commit 3cd0536a authored by Nicolas Chauvet's avatar Nicolas Chauvet Committed by Jean-Paul Saman

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: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 1de1d36a
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment