1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

WINGs: Fix incorrect use of macro USE_PANGO in installed header

The header "WINGsP.h" needs different behaviour depending on whether the
support for Pango was enabled or not. But the related macro USE_PANGO is
defined by WindowMaker's configure, and after this header have been
installed the macro is no more valid.

This patch makes the "WINGsP.h" a generated file, so it will be different
depending on USE_PANGO, but will not make use of the macro itself.

As a side effect of being now generated, the include paths in the makefile
have been updated to include build-dir too, because for users doing an
out-of-tree build the generated file (that is used during compilation) is
placed in the build-dir.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-05-13 17:20:24 +02:00
committed by Carlos R. Mafra
parent eb2a9d97a2
commit fc63d72032
5 changed files with 19 additions and 10 deletions

View File

@@ -90,7 +90,8 @@ libWUtil_la_SOURCES = \
AM_CFLAGS =
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
-I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-I$(top_srcdir)/WINGs/WINGs -I$(top_builddir)/WINGs/WINGs \
-I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
@XFTFLAGS@ @HEADER_SEARCH_PATH@
pkgconfigdir = $(libdir)/pkgconfig

View File

@@ -5,4 +5,14 @@ AUTOMAKE_OPTIONS =
# is this a kluge? if so, how should i do it?
includedir = @includedir@/WINGs
include_HEADERS = WINGs.h WUtil.h WINGsP.h
BUILT_SOURCES = WINGsP.h
CLEANFILES = WINGsP.h
include_HEADERS = WINGs.h WUtil.h
nodist_include_HEADERS = WINGsP.h
EXTRA_DIST = WINGsP.h.in
WINGsP.h: WINGsP.h.in $(top_builddir)/config.h
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
--header "$(top_builddir)/config.h" \
--filter "USE_PANGO" \
-o $@ $<

View File

@@ -5,9 +5,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef USE_PANGO
#include <pango/pango.h>
#endif
@USE_PANGO@#include <pango/pango.h>
#include <WINGs/WINGs.h>
@@ -459,9 +457,7 @@ typedef struct W_Font {
short refCount;
char *name;
#ifdef USE_PANGO
PangoLayout *layout;
#endif
@USE_PANGO@ PangoLayout *layout;
} W_Font;
#define W_FONTID(f) (f)->font->fid

View File

@@ -48,7 +48,8 @@ WPrefs_SOURCES = \
AM_CFLAGS =
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
@HEADER_SEARCH_PATH@
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la

View File

@@ -152,7 +152,8 @@ AM_CFLAGS =
AM_CPPFLAGS = $(DFLAGS) \
-I$(top_srcdir)/wrlib \
-I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
-I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
@HEADER_SEARCH_PATH@
wmaker_LDADD = \