Bundled pjproject: Do not discard the ambient CFLAGS

Commit f82393da0d ("Bundled pjproject: Make it
easier to override options in config_site.h") added

    PJPROJECT_CONFIG_OPTS += CFLAGS="$(PJPROJECT_CFLAGS)"

Previously CFLAGS was never passed on the aconfigure command line, so the
bundled pjproject inherited the exported CFLAGS from the environment. Passing
it explicitly overrides that, and PJPROJECT_CFLAGS contains only the options
this file adds (-DPJ_HAS_LINUX_EPOLL=1), so every distribution flag is lost.

Appending to the ambient CFLAGS rather than replacing them keeps the new
PJPROJECT_CFLAGS override working while restoring inheritance.

Resolves: #2132

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
22
Peter Lemenkov 2 weeks ago
parent d9bce86f84
commit c6a592a0ef

@ -50,4 +50,4 @@ ifeq ($(shell uname -s),Linux)
PJPROJECT_CFLAGS += -DPJ_HAS_LINUX_EPOLL=1
endif
PJPROJECT_CONFIG_OPTS += CFLAGS="$(PJPROJECT_CFLAGS)"
PJPROJECT_CONFIG_OPTS += CFLAGS="$(CFLAGS) $(PJPROJECT_CFLAGS)"

Loading…
Cancel
Save