1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-02 06:05:45 +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

@@ -50,6 +50,27 @@ AC_DEFUN([WM_CHECK_XFT_VERSION],
])
# WM_CHECK_LIBPANGO
# -----------------
#
# If the support was not disabled by user, check for the pango library using
# pkg-config, and if found place the appropriate stuff in the variables
# PANGO_CFLAGS (for compiler) and PANGO_LIBS (for linker)
AC_DEFUN([WM_CHECK_LIBPANGO],
[AS_IF([test "x$enable_pango" != "xno"],
[PKG_CHECK_MODULES([PANGO], [pangoxft],
[AC_DEFINE([USE_PANGO], [1], [defined when the pango library is used in WINGs])
pango="yes"],
[pango="no"])
AS_IF([test "x$enable_pango$pango" == "xyesno"],
[AC_MSG_ERROR([Pango library was not found - $PANGO_PKG_ERRORS])])
],
[pango="no"])
AC_SUBST([PANGO_CFLAGS])dnl
AC_SUBST([PANGO_LIBS])dnl
])
# _WM_LIB_CHECK_FUNCTS
# --------------------
# (internal shell functions)