compiler_flags_dictionaries= {
'gcc' : {
# Flags required when building a debug build
- 'debuggable' : [ '-O0', '-g' ],
+ 'debuggable' : [ '-g' ],
# Flags required for the linker (if any) when building a debug build
'linker-debuggable' : '',
# Flags required when building a non-debug optimized build
'nondebuggable' : '-DNDEBUG',
- # Flags required to enable profiling at runtime
- 'profile' : '-pg',
+ # Flags required to enable profiling at runtime with optimized builds
+ 'profile' : [ '-fno-omit-frame-pointer' ],
+ # Flags required to enable gprofile profiling
+ 'gprofile' : '-pg',
# Flags required to disable warnings about unused arguments to function calls
'silence-unused-arguments' : '',
# Flags required to use SSE unit for general math
'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
'linker-debuggable' : ['/DEBUG', '/INCREMENTAL' ],
'nondebuggable' : ['/DNDEBUG', '/Ob1', '/MD', '/Gd', '/EHsc'],
- 'profile' : '',
+ 'profile' : '/Oy-',
'sse' : '/arch:SSE',
'silence-unused-arguments' : '',
'sse' : '',
# can cause odd problems elsewhere. Note that
# in python3, encode and decode do not return
# strings, so we have to force the type.
-VERSION = str (V.encode ('ascii', 'ignore'))
-PROGRAM_VERSION = str (MAJOR.encode ('ascii', 'ignore'))
-
-# It seems, that on msys2, with python3, it puts quotes around
-# the version number, which breaks the build.
-VERSION = VERSION.replace('\'', '')
-PROGRAM_VERSION = PROGRAM_VERSION.replace('\'', '')
+VERSION = V.encode ('ascii', 'ignore').decode ("utf-8")
+PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore').decode ("utf-8")
if len (sys.argv) > 1 and sys.argv[1] == 'dist':
if not 'APPNAME' in os.environ:
- print "You must define APPNAME in the environment when running ./waf dist"
+ print ("You must define APPNAME in the environment when running ./waf dist")
sys.exit (1)
APPNAME = os.environ['APPNAME'];
linker_flags.append('-fsanitize=address')
if opt.gprofile:
- debug_flags = [ flags_dict['profile'] ]
+ debug_flags = [ flags_dict['gprofile'] ]
# OSX
if platform == 'darwin':
linker_flags.append('--stdlib=libstdc++')
# Prevents visibility issues in standard headers
conf.define("_DARWIN_C_SOURCE", 1)
+ else:
+ cxx_flags.append('-DBOOST_NO_AUTO_PTR')
if (is_clang and platform == "darwin") or conf.env['build_host'] in ['mavericks', 'yosemite']:
# Silence warnings about the non-existing osx clang compiler flags
if opt.debug_symbols:
optimization_flags += flags_dict['debuggable']
+ if opt.profile:
+ optimization_flags += flags_dict['profile']
+
if opt.stl_debug:
cxx_flags.append("-D_GLIBCXX_DEBUG")
opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
opt.add_option('--exports-hidden', action='store_true', default=False, dest='exports_hidden')
opt.add_option('--freedesktop', action='store_true', default=False, dest='freedesktop',
- help='Install MIME type, icons and .desktop file as per freedesktop.org standards')
+ help='Build MIME type and .desktop files as per freedesktop.org standards (will be placed in build/gtk2_ardour)')
opt.add_option('--freebie', action='store_true', default=False, dest='freebie',
help='Build a version suitable for distribution as a zero-cost binary')
+ opt.add_option('--profile', action='store_true', default=False, dest='profile',
+ help='Compile for use with profiling tools requiring a frame pointer')
opt.add_option('--gprofile', action='store_true', default=False, dest='gprofile',
help='Compile for use with gprofile')
opt.add_option('--libjack', type='string', default="auto", dest='libjack_link',
autowaf.configure(conf)
autowaf.display_header('Ardour Configuration')
- gcc_versions = fetch_gcc_version(str(conf.env['CC']))
- 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)
-
# systems with glibc have libintl builtin. systems without require explicit
# linkage against libintl.
#
if Options.options.lv2dir:
conf.env['LV2DIR'] = Options.options.lv2dir
else:
- conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], 'ardour' + str(conf.env['MAJOR']), 'lv2')
+ conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], 'ardour' + str(conf.env['MAJOR']), 'LV2')
conf.env['LV2DIR'] = os.path.normpath(conf.env['LV2DIR'])
autowaf.check_pkg(conf, 'vamp-hostsdk', uselib_store='VAMPHOSTSDK', atleast_version='2.1', mandatory=True)
autowaf.check_pkg(conf, 'rubberband', uselib_store='RUBBERBAND', mandatory=True)
+ have_rf64_riff_support = conf.check_cc(fragment = '''
+#include <sndfile.h>
+int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
+''',
+ features = 'c',
+ mandatory = False,
+ execute = False,
+ use = 'SNDFILE',
+ msg = 'Checking for sndfile RF64=>RIFF support',
+ okmsg = 'Found',
+ errmsg = 'Not found, no RF64-to-WAV support')
+
+ if have_rf64_riff_support:
+ conf.env.append_value('CXXFLAGS', "-DHAVE_RF64_RIFF")
+ conf.env.append_value('CFLAGS', "-DHAVE_RF64_RIFF")
+
if Options.options.dist_target == 'mingw':
Options.options.fpu_optimization = True
conf.env.append_value('CFLAGS', '-DPLATFORM_WINDOWS')
conf.env['PHONE_HOME'] = True
if opts.fpu_optimization:
conf.env['FPU_OPTIMIZATION'] = True
+ if opts.freedesktop:
+ conf.env['FREEDESKTOP'] = True
if opts.nls:
conf.define('ENABLE_NLS', 1)
conf.env['ENABLE_NLS'] = True
sub_config_and_use(conf, 'libs/appleutility')
elif Options.options.dist_target != 'mingw':
sub_config_and_use(conf, 'tools/sanity_check')
+ sub_config_and_use(conf, 'tools/gccabicheck')
sub_config_and_use(conf, 'libs/clearlooks-newer')
write_config_text('Free/Demo copy', conf.is_defined('FREEBIE'))
write_config_text('Build target', conf.env['build_target'])
write_config_text('CoreAudio', conf.is_defined('HAVE_COREAUDIO'))
+ write_config_text('CoreAudio 10.5 compat', conf.is_defined('COREAUDIO105'))
write_config_text('CoreAudio/Midi Backend',conf.env['BUILD_CORECRAPPITA'])
write_config_text('Debug RT allocations', conf.is_defined('DEBUG_RT_ALLOC'))
write_config_text('Debug Symbols', conf.is_defined('debug_symbols') or conf.env['DEBUG'])
bld.recurse('libs/appleutility')
elif bld.env['build_target'] != 'mingw':
bld.recurse('tools/sanity_check')
+ bld.recurse('tools/gccabicheck')
bld.recurse('libs/clearlooks-newer')