Mercurial > hg > sv-dependency-builds
comparison src/portaudio_20140130/build/scons/SConscript_common @ 124:e3d5853d5918
Current stable PortAudio source
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 18 Oct 2016 13:11:05 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
123:0cef3a1bd1ae | 124:e3d5853d5918 |
---|---|
1 import os.path, sys | |
2 | |
3 class ConfigurationError(Exception): | |
4 def __init__(self, reason): | |
5 Exception.__init__(self, "Configuration failed: %s" % reason) | |
6 | |
7 env = Environment() | |
8 | |
9 # sunos, aix, hpux, irix, sunos appear to be platforms known by SCons, assuming they're POSIX compliant | |
10 Posix = ("linux", "darwin", "sunos", "aix", "hpux", "irix", "sunos", "netbsd") | |
11 Windows = ("win32", "cygwin") | |
12 | |
13 if env["PLATFORM"] == "posix": | |
14 if sys.platform[:5] == "linux": | |
15 Platform = "linux" | |
16 elif sys.platform[:6] == "netbsd": | |
17 Platform = "netbsd" | |
18 else: | |
19 raise ConfigurationError("Unknown platform %s" % sys.platform) | |
20 else: | |
21 if not env["PLATFORM"] in ("win32", "cygwin") + Posix: | |
22 raise ConfigurationError("Unknown platform %s" % env["PLATFORM"]) | |
23 Platform = env["PLATFORM"] | |
24 | |
25 # Inspired by the versioning scheme followed by Qt, it seems sensible enough. There are three components: major, minor | |
26 # and micro. Major changes with each subtraction from the API (backward-incompatible, i.e. V19 vs. V18), minor changes | |
27 # with each addition to the API (backward-compatible), micro changes with each revision of the source code. | |
28 ApiVer = "2.0.0" | |
29 | |
30 Export("Platform", "Posix", "ConfigurationError", "ApiVer") |