Commit 747daa90 authored by Christophe Mutricy's avatar Christophe Mutricy

Use pkg-config for freetype and fribidi. Please report if your distro don't...

Use pkg-config for freetype and fribidi. Please report if your distro don't have the .pc for those. It also affect skins2 cflags and libs
parent 0c596874
...@@ -4147,54 +4147,35 @@ AC_ARG_ENABLE(fribidi, ...@@ -4147,54 +4147,35 @@ AC_ARG_ENABLE(fribidi,
[ --enable-fribidi fribidi support (default enabled)]) [ --enable-fribidi fribidi support (default enabled)])
if test "${enable_freetype}" != "no" if test "${enable_freetype}" != "no"
then then
FREETYPE_PATH="${PATH}" PKG_CHECK_MODULES(FREETYPE, freetype2,[
AC_ARG_WITH(freetype-config-path,
[ --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
[ if test "${with_freetype_config_path}" != "no"
then
FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
if test "${FREETYPE_CONFIG}" != "no"
then
VLC_ADD_PLUGINS([freetype]) VLC_ADD_PLUGINS([freetype])
VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`]) have_freetype=yes
VLC_ADD_LIBS([freetype],[`${FREETYPE_CONFIG} --libs`]) VLC_ADD_CFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
if test "${SYS}" = "mingw32"; then if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([freetype],[-lxml2]) VLC_ADD_LIBS([freetype skins2],[-lxml2])
fi fi
AC_CHECK_HEADERS(fontconfig/fontconfig.h, AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG]) [VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([freetype],[-lfontconfig])]) VLC_ADD_LIBS([freetype],[-lfontconfig])])
AC_CHECK_HEADERS(Carbon/Carbon.h, AC_CHECK_HEADERS(Carbon/Carbon.h,
[VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])]) [VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
elif test "${enable_freetype}" = "yes" ],[
then have_freetype=no
AS_IF([ test "${enable_freetype}" = "yes"],[
AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2 AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day. from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
]) ])
fi ])
])
dnl fribidi support dnl fribidi support
if test "${enable_fribidi}" != "no" if test "${enable_fribidi}" != "no"
then then
FRIBIDI_PATH="${PATH}" PKG_CHECK_MODULES(FRIBIDI, fribidi, [
AC_ARG_WITH(fribidi-config-path, VLC_ADD_CFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
[ --with-fribidi-config-path=PATH fribidi-config path (default search in \$PATH)], VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
[ if test "${with_fribidi_config_path}" != "no" ])
then
FRIBIDI_PATH="${with_fribidi_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no, ${FRIBIDI_PATH})
if test "${FRIBIDI_CONFIG}" != "no"
then
VLC_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_CPPFLAGS([skins2], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_LIBS([freetype], [`${FRIBIDI_CONFIG} --libs`])
VLC_ADD_LIBS([skins2], [`${FRIBIDI_CONFIG} --libs`])
fi
fi fi
fi fi
...@@ -4870,10 +4851,7 @@ if test "${enable_skins2}" = "yes" || ...@@ -4870,10 +4851,7 @@ if test "${enable_skins2}" = "yes" ||
skins2_missing_lib="no" skins2_missing_lib="no"
dnl freetype dnl freetype
if test "${FREETYPE_CONFIG}" != "no"; then if test "${have_freetype}" != "yes"; then
VLC_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
VLC_ADD_LIBS([skins2],[`${FREETYPE_CONFIG} --libs`])
else
skins2_missing_lib="yes" skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find freetype (required for skins2)]) AC_MSG_ERROR([Could not find freetype (required for skins2)])
......
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