Commit | Line | Data |
---|---|---|
a83c6a64 EB |
1 | Do not assume the SDL_image and SLD_mixer libraries are installed at the same |
2 | prefix reported by sdl-config, but instead get flags from the pkg-config files | |
3 | installed with these libraries. | |
4 | ||
5 | --- a/SConscript 2011-12-24 15:46:47.000000000 -0600 | |
6 | +++ b/SConscript 2014-06-12 21:20:45.702668330 -0500 | |
7 | @@ -199,7 +199,13 @@ | |
8 | self.fatal_error += " * library 'png' not found\n" | |
9 | ||
10 | def configure_sdl(self): | |
11 | - if self.conf.CheckMyProgram('sdl-config'): | |
12 | + if self.conf.CheckMyProgram('pkg-config'): | |
13 | + self.conf.env.ParseConfig("pkg-config --cflags --libs sdl") | |
14 | + for sdllib in ['image', 'mixer']: | |
15 | + self.conf.env.ParseConfig("pkg-config --cflags --libs SDL_%s" % sdllib) | |
16 | + if not self.conf.CheckSDLLib(sdllib): | |
17 | + self.fatal_error += " * SDL library '%s' not found\n" % sdllib | |
18 | + elif self.conf.CheckMyProgram('sdl-config'): | |
19 | self.conf.env.ParseConfig("sdl-config --cflags --libs | sed 's/-I/-isystem/g'") | |
20 | for sdllib in ['image', 'mixer']: | |
21 | if not self.conf.CheckSDLLib(sdllib): |