annotate src/portaudio_20140130/build/scons/SConscript_common @ 39:7ddb4fc30dac

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