build: meson cannot find cups headers
Hi.
On OpenBSD, meson cannot find the cups headers. They are installed under /usr/local/include/
modules/printbackends/meson.build:98:6: ERROR: Problem encountered: Need CUPS version >= 1.7
This is trying to configure gtk+ 3.24.9 with meson 0.51.0.
Extract from the logs:
Running compile:
Working directory: /tmp/tmpj4s3ciia
Command line: cc -I/usr/local/include /tmp/tmpj4s3ciia/testfile.c -pipe -D_FILE_OFFSET_BITS=64 -E -P -O2 -g -O0
Code:
#ifdef __has_include
#if !__has_include("cups/cups.h")
#error "Header 'cups/cups.h' could not be found"
#endif
#else
#include <cups/cups.h>
#endif
Compiler stdout:
Compiler stderr:
Has header "cups/cups.h" : YES
Running compile:
Working directory: /tmp/tmpbhyqsuit
Command line: cc -L/usr/local/lib /tmp/tmpbhyqsuit/testfile.c -pipe -D_FILE_OFFSET_BITS=64 -o /tmp/tmpbhyqsuit/output.exe -O2 -g -O0
Code:
#include<stdio.h>
#include <cups/cups.h>
int main(int argc, char **argv) {
printf("%ld\n", (long)(CUPS_VERSION_MAJOR));
return 0;
};
Compiler stdout:
Compiler stderr:
/tmp/tmpbhyqsuit/testfile.c:2:18: fatal error: 'cups/cups.h' file not found
#include <cups/cups.h>
^~~~~~~~~~~~~
1 error generated.
CPPFLAGS and LDFLAGS are set correctly:
Appending LDFLAGS from environment: ' -L/usr/local/lib'
Appending CPPFLAGS from environment: ' -I/usr/local/include'
But CPPFLAGS is missing when searching for cups/cups.h.