1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-14 04:45:57 +01:00

Configure: Rewrite the detection for Pango library

Make use of the standard macro for PKG_CONFIG; the default behaviour is now
to use Pango if present, instead of requiring explicit user request, yet
still not making it mandatory.

The detection code was moved to a macro to keep the configure.ac script
(relatively) small, and consistent with what is done for most other libs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-05-29 18:59:24 +02:00
committed by Carlos R. Mafra
parent 4221e30bd2
commit f049635fa5
4 changed files with 34 additions and 22 deletions

View File

@@ -636,24 +636,15 @@ AC_SUBST(XFT_LIBS)
dnl PANGO support
dnl =============
pango=no
AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango], [enable Pango text layout support]),
pango=$enableval, pango=no)
dnl The libray can be used by WINGs to get better support on UTF-8 for i18n
AC_ARG_ENABLE([pango],
[AS_HELP_STRING([--disable-pango], [disable Pango text layout support @<:@default=auto@:>@])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --disable-pango])] )],
[enable_pango=auto])
WM_CHECK_LIBPANGO
PANGOFLAGS=
PANGOLIBS=
if test "$pango" = yes; then
PANGOLIBS=`$PKG_CONFIG pangoxft --libs`
PANGOFLAGS=`$PKG_CONFIG pangoxft --cflags`
if test "x$PANGOLIBS" = "x" ; then
AC_MSG_RESULT([not found])
else
AC_DEFINE(USE_PANGO, 1, [Define if Pango is to be used])
AC_MSG_RESULT([found])
fi
fi
inc_search_path="$inc_search_path $PANGOFLAGS"
AC_SUBST(PANGOLIBS)
dnl ==============================================
dnl Graphic Format Libraries