From 7d6c171379b2a57a97f332a4e7fcd3135dcccb5b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 17 Mar 2021 11:57:12 -0400 Subject: build: s/ -I/ -isystem/g in libraries' CFLAGS This suppresses warnings in libraries' headers, like: CC src/dodge_balls-game.o In file included from src/xml.h:24:0, from src/game.c:28: /usr/include/SDL2/SDL_stdinc.h: In function ‘SDL_memset4’: /usr/include/SDL2/SDL_stdinc.h:382:5: warning: switch missing default case [-Wswitch-default] switch (dwords % 4) ^~~~~~ --- (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2773d19..e43c092 100644 --- a/configure.ac +++ b/configure.ac @@ -109,10 +109,20 @@ done PKG_PROG_PKG_CONFIG() PKG_CHECK_MODULES([SDL], [sdl2]) +SDL_CFLAGS="$(printf ' %s' "${SDL_CFLAGS}" | \ + sed 's/ -I/ -isystem/g;')" PKG_CHECK_MODULES([SDL_IMAGE], [SDL2_image]) +SDL_IMAGE_CFLAGS="$(printf ' %s' "${SDL_IMAGE_CFLAGS}" | \ + sed 's/ -I/ -isystem/g;')" PKG_CHECK_MODULES([SDL_TTF], [SDL2_ttf]) +SDL_TTF_CFLAGS="$(printf ' %s' "${SDL_TTF_CFLAGS}" | \ + sed 's/ -I/ -isystem/g;')" PKG_CHECK_MODULES([ZLIB], [zlib]) +ZLIB_CFLAGS="$(printf ' %s' "${ZLIB_CFLAGS}" | \ + sed 's/ -I/ -isystem/g;')" PKG_CHECK_MODULES([EXPAT], [expat]) +EXPAT_CFLAGS="$(printf ' %s' "${EXPAT_CFLAGS}" | \ + sed 's/ -I/ -isystem/g;')" AC_ARG_VAR([XCF2PNG], [path to xcf2png utility]) AC_CHECK_PROGS([XCF2PNG], [xcf2png], [no]) -- cgit v0.9.1