The `$WriteMakefileArgs{CCFLAGS} = "$Config{ccflags} "` part should probably be added even if pkg-config is not available (that is, before the `if`).