The issue here is that -isystem/usr/include/apr-1 is valid for the C compiler, but not for SWIG, yet the same options are used for both.