Skip to content

Fix CUPS_VERSION_MAJOR typo and add CUPS_CFLAGS for libcups3 builds#158

Merged
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
rkt0209:immediate-cups3-build-fixes
Jun 18, 2026
Merged

Fix CUPS_VERSION_MAJOR typo and add CUPS_CFLAGS for libcups3 builds#158
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
rkt0209:immediate-cups3-build-fixes

Conversation

@rkt0209

@rkt0209 rkt0209 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Three small, self-contained build fixes needed to compile cleanly against
libcups3 (CUPS 3.x), where the CUPS headers live off the default include
path and are only found via CUPS_CFLAGS. None of these change runtime
behaviour; they only correct the build.

Changes

  1. cupsfilters/testfilters.c — fix CUPS_VERISON_MAJOR typo
    The macro name was misspelled, so the preprocessor treated it as 0.
    That made #if CUPS_VERISON_MAJOR < 3 always true, forcing the libcups2
    compatibility #defines onto a libcups3 build and breaking it. Corrected
    to CUPS_VERSION_MAJOR.

  2. Makefile.am — add $(CUPS_CFLAGS) to the test programs
    testcmyk, testdither, testimage, testrgb, testpdf1, testpdf2,
    test-analyze, test-pdf and test-ps include libcupsfilters headers
    that pull in <cups/cups.h>. Without $(CUPS_CFLAGS) they fail to find
    the CUPS headers under libcups3 (cups/cups.h: No such file or directory).
    test1284 and testfilters already passed $(CUPS_CFLAGS); this brings
    the rest in line.

  3. libcupsfilters.pc.in — add @CUPS_CFLAGS@ to Cflags
    The installed public headers #include <cups/cups.h>, so a downstream
    consumer compiling against pkg-config --cflags libcupsfilters also needs
    the CUPS include path. Without it, consumer builds break against libcups3.

@tillkamppeter tillkamppeter merged commit 6cb4b02 into OpenPrinting:master Jun 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants