| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 | 2 |
| 3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 env = Environment() | 9 env = Environment() |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 value = os.environ.get(key) | 34 value = os.environ.get(key) |
| 35 if value != None: | 35 if value != None: |
| 36 env[key] = Split(value) | 36 env[key] = Split(value) |
| 37 env['CCFLAGS'] += ['-fPIC', '-fno-exceptions', '-Wall'] | 37 env['CCFLAGS'] += ['-fPIC', '-fno-exceptions', '-Wall'] |
| 38 | 38 |
| 39 # Fix issue with scons not passing pkg-config vars through the environment. | 39 # Fix issue with scons not passing pkg-config vars through the environment. |
| 40 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): | 40 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'): |
| 41 if os.environ.has_key(key): | 41 if os.environ.has_key(key): |
| 42 env['ENV'][key] = os.environ[key] | 42 env['ENV'][key] = os.environ[key] |
| 43 | 43 |
| 44 # Enable local account only if user has specified one |
| 45 if os.path.exists('pam_localaccount.h'): |
| 46 print """ |
| 47 WARNING: pam local account is enabled! If you don't want this, remove |
| 48 pam_localaccount.h. |
| 49 """ |
| 50 env.Append(CPPDEFINES=['CHROMEOS_PAM_LOCALACCOUNT']) |
| 51 |
| 44 env_lib = env.Clone() | 52 env_lib = env.Clone() |
| 45 env_lib.SharedLibrary('chromeos_pam_offline', pam_sources) | 53 env_lib.SharedLibrary('chromeos_pam_offline', pam_sources) |
| 46 | 54 |
| 47 env_test = env.Clone() | 55 env_test = env.Clone() |
| 48 env_test.Append(LIBS=['gflags', 'gtest', 'pcrecpp', 'curl']) | 56 env_test.Append(LIBS=['gflags', 'gtest', 'pcrecpp', 'curl']) |
| 49 env_test.Program('pam_offline_unittests', pam_sources + test_sources) | 57 env_test.Program('pam_offline_unittests', pam_sources + test_sources) |
| OLD | NEW |