cmd = "LANG= svn info " + path + " | awk '/^Revision:/ { print $2}'"
return commands.getoutput(cmd)
+def fetch_gcc_version ():
+ cmd = "LANG= gcc --version"
+ output = commands.getoutput(cmd).splitlines()
+ version = output[0].split(' ')[2].split('.')
+ return version
+
def fetch_git_revision (path):
cmd = "LANG= git log --abbrev HEAD^..HEAD " + path
output = commands.getoutput(cmd).splitlines()
#
conf.env.append_value('CCFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
+ conf.env.append_value('CCFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
conf.env.append_value('CXXFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
+ conf.env.append_value('CXXFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
if opt.nls:
conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
conf.env.append_value('CCFLAGS', '-DENABLE_NLS')
opt.add_option('--boost-sp-debug', action='store_true', default=False, dest='boost_sp_debug',
help='Compile with Boost shared pointer debugging')
opt.add_option('--audiounits', action='store_true', default=False, dest='audiounits',
- help='Compile with Apple\'s AudioUnit library (experimental)')
+ help='Compile with Apple\'s AudioUnit library')
opt.add_option('--coreaudio', action='store_true', default=False, dest='coreaudio',
help='Compile with Apple\'s CoreAudio library')
opt.add_option('--dist-target', type='string', default='auto', dest='dist_target',
opt.add_option('--nls', action='store_true', default=True, dest='nls',
help='Enable i18n (native language support) (default)')
opt.add_option('--no-nls', action='store_false', dest='nls')
+ opt.add_option('--phone-home', action='store_false', default=True, dest='phone_home')
opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug',
help='Build with debugging for the STL')
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
def configure(conf):
create_stored_revision()
+ conf.env['VERSION'] = VERSION
autowaf.set_recursive()
autowaf.configure(conf)
-
+
+ gcc_versions = fetch_gcc_version()
+ if not Options.options.debug and gcc_versions[0] == '4' and gcc_versions[1] > '4':
+ print 'Version 4.5 of gcc is not ready for use when compiling Ardour with optimization.'
+ print 'Please use a different version or re-configure with --debug'
+ exit (1)
+
if sys.platform == 'darwin':
#
# Define OSX as a uselib to use when compiling
autowaf.check_header(conf, 'boost/signals2.hpp', mandatory = True)
+ autowaf.check_header(conf, 'jack/session.h', define="JACK_SESSION")
+
conf.check_cc(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
execute = "1",
mandatory = True,
# Fix utterly braindead FLAC include path to not smash assert.h
conf.env['CPPPATH_FLAC'] = []
+ conf.check_cc(function_name='dlopen', header_name='dlfcn.h', linkflags='-ldl', uselib_store='DL')
+ conf.check_cc(function_name='curl_global_init', header_name='curl/curl.h', linkflags='-lcurl', uselib_store='CURL')
+
# Tell everyone that this is a waf build
conf.env.append_value('CCFLAGS', '-DWAF_BUILD')
conf.env.append_value('CXXFLAGS', '-DWAF_BUILD')
autowaf.print_summary(conf)
+
+ # debug builds should not call home
+
opts = Options.options
+ if opts.debug:
+ opts.phone_home = False;
+
autowaf.display_header('Ardour Configuration')
autowaf.display_msg(conf, 'Build Target', conf.env['build_target'])
autowaf.display_msg(conf, 'Architecture flags', opts.arch)
conf.define ('COREAUDIO', 1)
if opts.audiounits:
conf.define('AUDIOUNITS',1)
+ autowaf.display_msg(conf, 'Phone Home', opts.phone_home)
+ if opts.phone_home:
+ conf.env['PHONE_HOME'] = opts.phone_home
autowaf.display_msg(conf, 'FPU Optimization', opts.fpu_optimization)
if opts.fpu_optimization:
conf.define('FPU_OPTIMIZATION', 1)
autowaf.display_msg(conf, 'Tranzport', opts.tranzport)
if opts.build_tests:
conf.env['BUILD_TESTS'] = opts.build_tests
- autowaf.display_msg(conf, 'Unit Tests', bool(conf.env['BUILD_TESTS']) and bool (conf.env['HAVE_CPPUNIT']))
+ autowaf.display_msg(conf, 'Unit Tests', bool(conf.env['BUILD_TESTS']) and bool (conf.env['HAVE_CPPUNIT']))
if opts.tranzport:
conf.define('TRANZPORT', 1)
autowaf.display_msg(conf, 'Universal Binary', opts.universal)
autowaf.display_msg(conf, 'VST Support', opts.vst)
if opts.vst:
conf.define('VST_SUPPORT', 1)
+ if bool(conf.env['JACK_SESSION']):
+ conf.define ('HAVE_JACK_SESSION', 1)
autowaf.display_msg(conf, 'Wiimote Support', opts.wiimote)
if opts.wiimote:
conf.define('WIIMOTE',1)
- if opts.windows_key:
- conf.define('WINDOWS_KEY', opts.windows_key)
+ conf.define('WINDOWS_KEY', opts.windows_key)
autowaf.display_msg(conf, 'Windows Key', opts.windows_key)
conf.env['PROGRAM_NAME'] = opts.program_name
autowaf.display_msg(conf, 'Program Name', opts.program_name)