Fix CUPS_VERSION_MAJOR typo and add CUPS_CFLAGS for libcups3 builds#158
Merged
tillkamppeter merged 1 commit intoJun 18, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 runtimebehaviour; they only correct the build.
Changes
cupsfilters/testfilters.c— fixCUPS_VERISON_MAJORtypoThe macro name was misspelled, so the preprocessor treated it as
0.That made
#if CUPS_VERISON_MAJOR < 3always true, forcing the libcups2compatibility
#defines onto a libcups3 build and breaking it. Correctedto
CUPS_VERSION_MAJOR.Makefile.am— add$(CUPS_CFLAGS)to the test programstestcmyk,testdither,testimage,testrgb,testpdf1,testpdf2,test-analyze,test-pdfandtest-psinclude libcupsfilters headersthat pull in
<cups/cups.h>. Without$(CUPS_CFLAGS)they fail to findthe CUPS headers under libcups3 (
cups/cups.h: No such file or directory).test1284andtestfiltersalready passed$(CUPS_CFLAGS); this bringsthe rest in line.
libcupsfilters.pc.in— add@CUPS_CFLAGS@toCflagsThe installed public headers
#include <cups/cups.h>, so a downstreamconsumer compiling against
pkg-config --cflags libcupsfiltersalso needsthe CUPS include path. Without it, consumer builds break against libcups3.