11 # Variables for 'waf dist'
30 'libs/clearlooks-newer',
43 def fetch_svn_revision (path
):
44 cmd
= "LANG= svn info " + path
+ " | awk '/^Revision:/ { print $2}'"
45 return commands
.getoutput(cmd
)
47 def fetch_gcc_version ():
48 cmd
= "LANG= gcc --version"
49 output
= commands
.getoutput(cmd
).splitlines()
50 version
= output
[0].split(' ')[2].split('.')
53 def fetch_git_revision (path
):
54 cmd
= "LANG= git log --abbrev HEAD^..HEAD " + path
55 output
= commands
.getoutput(cmd
).splitlines()
56 rev
= output
[0].replace ("commit", "git")[0:10]
59 if "git-svn-id" in line
:
60 line
= line
.split('@')[1].split(' ')
66 def fetch_bzr_revision (path
):
67 cmd
= subprocess
.Popen("LANG= bzr log -l 1 " + path
, stdout
=subprocess
.PIPE
, shell
=True)
68 out
= cmd
.communicate()[0]
69 svn
= re
.search('^svn revno: [0-9]*', out
, re
.MULTILINE
)
72 return string
.lstrip(str, chars
)
74 def create_stored_revision():
76 if os
.path
.exists('.svn'):
77 rev
= fetch_svn_revision('.');
78 elif os
.path
.exists('.git'):
79 rev
= fetch_git_revision('.');
80 elif os
.path
.exists('.bzr'):
81 rev
= fetch_bzr_revision('.');
82 print "Revision: " + rev
;
83 elif os
.path
.exists('libs/ardour/svn_revision.cc'):
84 print "Using packaged svn revision"
87 print "Missing libs/ardour/svn_revision.cc. Blame the packager."
91 text
= '#include "ardour/svn_revision.h"\n'
92 text
+= 'namespace ARDOUR { const char* svn_revision = \"' + rev
+ '\"; }\n'
93 print 'Writing svn revision info to libs/ardour/svn_revision.cc'
94 o
= file('libs/ardour/svn_revision.cc', 'w')
98 print 'Could not open libs/ardour/svn_revision.cc for writing\n'
101 def set_compiler_flags (conf
,opt
):
103 # Compiler flags and other system-dependent stuff
106 build_host_supports_sse
= False
107 optimization_flags
= []
109 debug_flags
= [ '-pg' ]
111 debug_flags
= [ ] # waf adds -O0 -g itself. thanks waf!
113 # guess at the platform, used to define compiler flags
115 config_guess
= os
.popen("tools/config.guess").read()[:-1]
121 config
= config_guess
.split ("-")
123 autowaf
.display_msg(conf
, "System Triple", config_guess
)
126 if opt
.dist_target
== 'auto':
127 if config
[config_arch
] == 'apple':
128 # The [.] matches to the dot after the major version, "." would match any character
129 if re
.search ("darwin[0-7][.]", config
[config_kernel
]) != None:
130 conf
.define ('build_target', 'panther')
131 elif re
.search ("darwin8[.]", config
[config_kernel
]) != None:
132 conf
.define ('build_target', 'tiger')
134 conf
.define ('build_target', 'leopard')
136 if re
.search ("x86_64", config
[config_cpu
]) != None:
137 conf
.define ('build_target', 'x86_64')
138 elif re
.search("i[0-5]86", config
[config_cpu
]) != None:
139 conf
.define ('build_target', 'i386')
140 elif re
.search("powerpc", config
[config_cpu
]) != None:
141 conf
.define ('build_target', 'powerpc')
143 conf
.define ('build_target', 'i686')
145 conf
.define ('build_target', opt
.dist_target
)
147 if config
[config_cpu
] == 'powerpc' and conf
.env
['build_target'] != 'none':
149 # Apple/PowerPC optimization options
151 # -mcpu=7450 does not reliably work with gcc 3.*
153 if opt
.dist_target
== 'panther' or opt
.dist_target
== 'tiger':
154 if config
[config_arch
] == 'apple':
155 # optimization_flags.extend ([ "-mcpu=7450", "-faltivec"])
156 # to support g3s but still have some optimization for above
157 optimization_flags
.extend ([ "-mcpu=G3", "-mtune=7450"])
159 optimization_flags
.extend ([ "-mcpu=7400", "-maltivec", "-mabi=altivec"])
161 optimization_flags
.extend([ "-mcpu=750", "-mmultiple" ])
162 optimization_flags
.extend (["-mhard-float", "-mpowerpc-gfxopt"])
163 optimization_flags
.extend (["-Os"])
165 elif ((re
.search ("i[0-9]86", config
[config_cpu
]) != None) or (re
.search ("x86_64", config
[config_cpu
]) != None)) and conf
.env
['build_target'] != 'none':
169 # ARCH_X86 means anything in the x86 family from i386 to x86_64
170 # USE_X86_64_ASM is used to distingush 32 and 64 bit assembler
173 if (re
.search ("(i[0-9]86|x86_64)", config
[config_cpu
]) != None):
174 debug_flags
.append ("-DARCH_X86")
175 optimization_flags
.append ("-DARCH_X86")
177 if config
[config_kernel
] == 'linux' :
180 # determine processor flags via /proc/cpuinfo
183 if conf
.env
['build_target'] != 'i386':
185 flag_line
= os
.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
186 x86_flags
= flag_line
.split (": ")[1:][0].split ()
188 if "mmx" in x86_flags
:
189 optimization_flags
.append ("-mmmx")
190 if "sse" in x86_flags
:
191 build_host_supports_sse
= True
192 if "3dnow" in x86_flags
:
193 optimization_flags
.append ("-m3dnow")
195 if config
[config_cpu
] == "i586":
196 optimization_flags
.append ("-march=i586")
197 elif config
[config_cpu
] == "i686":
198 optimization_flags
.append ("-march=i686")
200 if ((conf
.env
['build_target'] == 'i686') or (conf
.env
['build_target'] == 'x86_64')) and build_host_supports_sse
:
201 optimization_flags
.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
202 debug_flags
.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
204 # end of processor-specific section
206 # optimization section
207 if conf
.env
['FPU_OPTIMIZATION']:
208 if conf
.env
['build_target'] == 'tiger' or conf
.env
['build_target'] == 'leopard':
209 optimization_flags
.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
210 debug_flags
.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
211 conf
.env
.append_value('LINKFLAGS', "-framework Accelerate")
212 elif conf
.env
['build_target'] == 'i686' or conf
.env
['build_target'] == 'x86_64':
213 optimization_flags
.append ("-DBUILD_SSE_OPTIMIZATIONS")
214 debug_flags
.append ("-DBUILD_SSE_OPTIMIZATIONS")
215 elif conf
.env
['build_target'] == 'x86_64':
216 optimization_flags
.append ("-DUSE_X86_64_ASM")
217 debug_flags
.append ("-DUSE_X86_64_ASM")
218 if not build_host_supports_sse
:
219 print "\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)"
221 # check this even if we aren't using FPU optimization
222 if not conf
.env
['HAVE_POSIX_MEMALIGN']:
223 optimization_flags
.append("-DNO_POSIX_MEMALIGN")
225 # end optimization section
231 if conf
.env
['build_target'] == 'x86_64' and opt
.vst
:
232 print "\n\n=================================================="
233 print "You cannot use VST plugins with a 64 bit host. Please run waf with --vst=0"
234 print "\nIt is theoretically possible to build a 32 bit host on a 64 bit system."
235 print "However, this is tricky and not recommended for beginners."
239 # a single way to test if we're on OS X
242 if conf
.env
['build_target'] in ['panther', 'tiger', 'leopard' ]:
243 conf
.define ('IS_OSX', 1)
244 # force tiger or later, to avoid issues on PPC which defaults
245 # back to 10.1 if we don't tell it otherwise.
246 conf
.env
.append_value('CCFLAGS', "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040")
249 conf
.define ('IS_OSX', 0)
252 # save off guessed arch element in an env
254 conf
.define ('CONFIG_ARCH', config
[config_arch
])
257 # ARCH="..." overrides all
261 optimization_flags
= opt
.arch
.split()
264 # prepend boiler plate optimization flags that work on all architectures
267 optimization_flags
[:0] = [
269 "-fomit-frame-pointer",
276 conf
.env
.append_value('CCFLAGS', debug_flags
)
277 conf
.env
.append_value('CXXFLAGS', debug_flags
)
278 conf
.env
.append_value('LINKFLAGS', debug_flags
)
280 conf
.env
.append_value('CCFLAGS', optimization_flags
)
281 conf
.env
.append_value('CXXFLAGS', optimization_flags
)
282 conf
.env
.append_value('LINKFLAGS', optimization_flags
)
285 conf
.env
.append_value('CXXFLAGS', "-D_GLIBCXX_DEBUG")
288 conf
.env
.append_value('CCFLAGS', "-arch i386 -arch ppc")
289 conf
.env
.append_value('CXXFLAGS', "-arch i386 -arch ppc")
290 conf
.env
.append_value('LINKFLAGS', "-arch i386 -arch ppc")
296 conf
.env
.append_value('CCFLAGS', "-Wall")
297 conf
.env
.append_value('CXXFLAGS', [ '-Wall', '-Woverloaded-virtual'])
300 flags
= [ '-Wextra' ]
301 conf
.env
.append_value('CCFLAGS', flags
)
302 conf
.env
.append_value('CXXFLAGS', flags
)
309 conf
.env
.append_value('CCFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
310 conf
.env
.append_value('CCFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
311 conf
.env
.append_value('CXXFLAGS', [ '-D_LARGEFILE64_SOURCE', '-D_LARGEFILE_SOURCE' ])
312 conf
.env
.append_value('CXXFLAGS', [ '-D_FILE_OFFSET_BITS=64', '-D_FILE_OFFSET_BITS=64' ])
314 conf
.env
.append_value('CXXFLAGS', [ '-D__STDC_LIMIT_MACROS', '-D__STDC_LIMIT_MACROS' ])
315 conf
.env
.append_value('CXXFLAGS', [ '-D__STDC_FORMAT_MACROS', '-D__STDC_FORMAT_MACROS' ])
318 conf
.env
.append_value('CXXFLAGS', '-DENABLE_NLS')
319 conf
.env
.append_value('CCFLAGS', '-DENABLE_NLS')
322 #----------------------------------------------------------------
326 def set_options(opt
):
327 autowaf
.set_options(opt
)
328 opt
.add_option('--program-name', type='string', action
='store', default
='Ardour', dest
='program_name',
329 help='The user-visible name of the program being built')
330 opt
.add_option('--arch', type='string', action
='store', dest
='arch',
331 help='Architecture-specific compiler flags')
332 opt
.add_option('--boost-sp-debug', action
='store_true', default
=False, dest
='boost_sp_debug',
333 help='Compile with Boost shared pointer debugging')
334 opt
.add_option('--audiounits', action
='store_true', default
=False, dest
='audiounits',
335 help='Compile with Apple\'s AudioUnit library')
336 opt
.add_option('--coreaudio', action
='store_true', default
=False, dest
='coreaudio',
337 help='Compile with Apple\'s CoreAudio library')
338 opt
.add_option('--dist-target', type='string', default
='auto', dest
='dist_target',
339 help='Specify the target for cross-compiling [auto,none,x86,i386,i686,x86_64,powerpc,tiger,leopard]')
340 opt
.add_option('--extra-warn', action
='store_true', default
=False, dest
='extra_warn',
341 help='Build with even more compiler warning flags')
342 opt
.add_option('--fpu-optimization', action
='store_true', default
=True, dest
='fpu_optimization',
343 help='Build runtime checked assembler code (default)')
344 opt
.add_option('--no-fpu-optimization', action
='store_false', dest
='fpu_optimization')
345 opt
.add_option('--freedesktop', action
='store_true', default
=False, dest
='freedesktop',
346 help='Install MIME type, icons and .desktop file as per freedesktop.org standards')
347 opt
.add_option('--freesound', action
='store_true', default
=False, dest
='freesound',
348 help='Include Freesound database lookup')
349 opt
.add_option('--gprofile', action
='store_true', default
=False, dest
='gprofile',
350 help='Compile for use with gprofile')
351 opt
.add_option('--gtkosx', action
='store_true', default
=False, dest
='gtkosx',
352 help='Compile for use with GTK-OSX, not GTK-X11')
353 opt
.add_option('--lv2', action
='store_true', default
=False, dest
='lv2',
354 help='Compile with support for LV2 (if slv2 is available)')
355 opt
.add_option('--nls', action
='store_true', default
=True, dest
='nls',
356 help='Enable i18n (native language support) (default)')
357 opt
.add_option('--no-nls', action
='store_false', dest
='nls')
358 opt
.add_option('--phone-home', action
='store_false', default
=True, dest
='phone_home')
359 opt
.add_option('--stl-debug', action
='store_true', default
=False, dest
='stl_debug',
360 help='Build with debugging for the STL')
361 opt
.add_option('--test', action
='store_true', default
=False, dest
='build_tests',
362 help="Build unit tests")
363 opt
.add_option('--tranzport', action
='store_true', default
=False, dest
='tranzport',
364 help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
365 opt
.add_option('--universal', action
='store_true', default
=False, dest
='universal',
366 help='Compile as universal binary (requires that external libraries are universal)')
367 opt
.add_option('--versioned', action
='store_true', default
=False, dest
='versioned',
368 help='Add revision information to executable name inside the build directory')
369 opt
.add_option('--vst', action
='store_true', default
=False, dest
='vst',
370 help='Compile with support for VST')
371 opt
.add_option('--wiimote', action
='store_true', default
=False, dest
='wiimote',
372 help='Build the wiimote control surface')
373 opt
.add_option('--windows-key', type='string', action
='store', dest
='windows_key', default
='Mod4><Super',
374 help='X Modifier(s) (Mod1,Mod2, etc) for the Windows key (X11 builds only). ' +
375 'Multiple modifiers must be separated by \'><\'')
380 def sub_config_and_use(conf
, name
, has_objects
= True):
381 conf
.sub_config(name
)
382 autowaf
.set_local_lib(conf
, name
, has_objects
)
385 create_stored_revision()
386 conf
.env
['VERSION'] = VERSION
388 autowaf
.set_recursive()
389 autowaf
.configure(conf
)
390 autowaf
.display_header('Ardour Configuration')
392 gcc_versions
= fetch_gcc_version()
393 if not Options
.options
.debug
and gcc_versions
[0] == '4' and gcc_versions
[1] > '4':
394 print 'Version 4.5 of gcc is not ready for use when compiling Ardour with optimization.'
395 print 'Please use a different version or re-configure with --debug'
398 if sys
.platform
== 'darwin':
400 # Define OSX as a uselib to use when compiling
401 # on Darwin to add all applicable flags at once
403 conf
.env
.append_value('CXXFLAGS_OSX', "-mmacosx-version-min=10.4")
404 conf
.env
.append_value('CCFLAGS_OSX', "-mmacosx-version-min=10.4")
405 conf
.env
.append_value('CXXFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
406 conf
.env
.append_value('CCFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
407 conf
.env
.append_value('LINKFLAGS_OSX', "-mmacosx-version-min=10.4")
408 conf
.env
.append_value('LINKFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
410 conf
.env
.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk")
411 conf
.env
.append_value('LINKFLAGS_OSX', "-F/System/Library/Frameworks")
413 conf
.env
.append_value('CXXFLAGS_OSX', "-msse")
414 conf
.env
.append_value('CCFLAGS_OSX', "-msse")
415 conf
.env
.append_value('CXXFLAGS_OSX', "-msse2")
416 conf
.env
.append_value('CCFLAGS_OSX', "-msse2")
418 # TODO: The previous sse flags NEED to be based
419 # off processor type. Need to add in a check
423 conf
.env
.append_value('CPPPATH_OSX', "/System/Library/Frameworks/")
424 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/")
425 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0")
426 conf
.env
.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0/i686-apple-darwin8/")
428 # TODO: Fix the above include path, it needs to be
429 # defined based off what is read in the configuration
430 # stage about the machine(PPC, X86, X86_64, etc.)
432 conf
.env
.append_value('CPPPATH_OSX', "/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/")
434 # TODO: Likewise this needs to be defined not only
435 # based off the machine characteristics, but also
436 # based off the version of GCC being used.
439 conf
.env
.append_value('FRAMEWORK_OSX', ['CoreFoundation'])
441 conf
.env
.append_value('LINKFLAGS_OSX', ['-undefined', 'suppress'])
442 conf
.env
.append_value('LINKFLAGS_OSX', "-flat_namespace")
444 # The previous 2 flags avoid circular dependencies
445 # between libardour and libardour_cp on OS X.
446 # ld reported -undefined suppress as an unknown option
447 # in one of the tests ran, removing it for the moment
449 conf
.env
.append_value('CXXFLAGS_OSX', "-F/System/Library/Frameworks")
450 conf
.env
.append_value('CCFLAGS_OSX', "-F/System/Library/Frameworks")
452 # GTKOSX only builds on darwin anyways
453 if Options
.options
.gtkosx
:
455 # Define Include Paths for GTKOSX
457 conf
.env
.append_value('CXXFLAGS_GTKOSX', '-DTOP_MENUBAR')
458 conf
.env
.append_value('CXXFLAGS_GTKOSX', '-DGTKOSX')
459 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-framework AppKit")
460 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-Xlinker -headerpad")
461 conf
.env
.append_value('LINKFLAGS_GTKOSX', "-Xlinker 2048")
462 conf
.env
.append_value('CPPPATH_GTKOSX', "/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/")
464 if Options
.options
.coreaudio
:
465 conf
.check_cc (header_name
= '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h',
466 define_name
= 'HAVE_COREAUDIO', linkflags
= ['-framework CoreAudio'],
467 uselib_store
="COREAUDIO")
468 conf
.check_cxx (header_name
= '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h',
469 linkflags
= [ '-framework AudioToolbox' ], uselib_store
="COREAUDIO")
470 conf
.check_cc (header_name
= '/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h',
471 linkflags
= ['-framework CoreServices'], uselib_store
="COREAUDIO")
473 if Options
.options
.audiounits
:
474 #conf.env.append_value('CXXFLAGS_AUDIOUNIT', "-DHAVE_AUDIOUNITS")
475 conf
.env
.append_value('FRAMEWORK_AUDIOUNIT', ['AudioToolbox'])
476 conf
.env
.append_value('FRAMEWORK_AUDIOUNIT', ['CoreServices'])
477 conf
.check_cc (header_name
= '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h',
478 define_name
= 'HAVE_AUDIOUNITS', linkflags
= [ '-framework AudioUnit' ],
479 uselib_store
="AUDIOUNIT")
481 if Options
.options
.boost_sp_debug
:
482 conf
.env
.append_value('CXXFLAGS', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
484 autowaf
.check_header(conf
, 'boost/signals2.hpp', mandatory
= True)
486 autowaf
.check_header(conf
, 'jack/session.h', define
="JACK_SESSION")
488 conf
.check_cc(fragment
= "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
491 msg
= 'Checking for boost library >= 1.39',
493 errmsg
= 'too old\nPlease install boost version 1.39 or higher.')
495 autowaf
.check_pkg(conf
, 'cppunit', uselib_store
='CPPUNIT', atleast_version
='1.12.0', mandatory
=False)
496 autowaf
.check_pkg(conf
, 'glib-2.0', uselib_store
='GLIB', atleast_version
='2.2')
497 autowaf
.check_pkg(conf
, 'gthread-2.0', uselib_store
='GTHREAD', atleast_version
='2.2')
498 autowaf
.check_pkg(conf
, 'glibmm-2.4', uselib_store
='GLIBMM', atleast_version
='2.14.0')
500 if sys
.platform
== 'darwin':
501 sub_config_and_use(conf
, 'libs/appleutility')
503 sub_config_and_use(conf
, i
)
505 # Fix utterly braindead FLAC include path to not smash assert.h
506 conf
.env
['CPPPATH_FLAC'] = []
508 conf
.check_cc(function_name
='dlopen', header_name
='dlfcn.h', linkflags
='-ldl', uselib_store
='DL')
509 conf
.check_cc(function_name
='curl_global_init', header_name
='curl/curl.h', linkflags
='-lcurl', uselib_store
='CURL')
511 if conf
.check_cc(function_name
='posix_memalign', header_name
='stdlib.h', ccflags
='-D_XOPEN_SOURCE=600') == False:
512 conf
.env
['HAVE_POSIX_MEMALIGN'] = True
514 # Tell everyone that this is a waf build
516 conf
.env
.append_value('CCFLAGS', '-DWAF_BUILD')
517 conf
.env
.append_value('CXXFLAGS', '-DWAF_BUILD')
519 # debug builds should not call home
521 opts
= Options
.options
523 opts
.phone_home
= False;
525 autowaf
.display_msg(conf
, 'Build Target', conf
.env
['build_target'])
526 autowaf
.display_msg(conf
, 'Architecture flags', opts
.arch
)
527 autowaf
.display_msg(conf
, 'Aubio', bool(conf
.env
['HAVE_AUBIO']))
528 autowaf
.display_msg(conf
, 'AudioUnits', opts
.audiounits
)
529 autowaf
.display_msg(conf
, 'CoreAudio', bool(conf
.env
['HAVE_COREAUDIO']))
530 autowaf
.display_msg(conf
, 'FLAC', bool(conf
.env
['HAVE_FLAC']))
531 if bool(conf
.env
['HAVE_COREAUDIO']):
532 conf
.define ('COREAUDIO', 1)
534 conf
.define('AUDIOUNITS',1)
535 autowaf
.display_msg(conf
, 'Phone Home', opts
.phone_home
)
537 conf
.env
['PHONE_HOME'] = opts
.phone_home
538 autowaf
.display_msg(conf
, 'FPU Optimization', opts
.fpu_optimization
)
539 if opts
.fpu_optimization
:
540 conf
.define('FPU_OPTIMIZATION', 1)
541 autowaf
.display_msg(conf
, 'Freedesktop Files', opts
.freedesktop
)
542 autowaf
.display_msg(conf
, 'Freesound', opts
.freesound
)
544 conf
.define('FREESOUND',1)
545 autowaf
.display_msg(conf
, 'GtkOSX', opts
.gtkosx
)
547 conf
.define ('GTKOSX', 1)
548 autowaf
.display_msg(conf
, 'LV2 Support', bool(conf
.env
['HAVE_SLV2']))
549 autowaf
.display_msg(conf
, 'OGG', bool(conf
.env
['HAVE_OGG']))
550 autowaf
.display_msg(conf
, 'Rubberband', bool(conf
.env
['HAVE_RUBBERBAND']))
551 autowaf
.display_msg(conf
, 'Samplerate', bool(conf
.env
['HAVE_SAMPLERATE']))
552 autowaf
.display_msg(conf
, 'Soundtouch', bool(conf
.env
['HAVE_SOUNDTOUCH']))
553 autowaf
.display_msg(conf
, 'Translation', opts
.nls
)
555 conf
.define ('ENABLE_NLS', 1)
556 autowaf
.display_msg(conf
, 'Tranzport', opts
.tranzport
)
558 conf
.env
['BUILD_TESTS'] = opts
.build_tests
559 autowaf
.display_msg(conf
, 'Unit Tests', bool(conf
.env
['BUILD_TESTS']) and bool (conf
.env
['HAVE_CPPUNIT']))
561 conf
.define('TRANZPORT', 1)
562 autowaf
.display_msg(conf
, 'Universal Binary', opts
.universal
)
563 autowaf
.display_msg(conf
, 'VST Support', opts
.vst
)
565 conf
.define('VST_SUPPORT', 1)
566 if bool(conf
.env
['JACK_SESSION']):
567 conf
.define ('HAVE_JACK_SESSION', 1)
568 autowaf
.display_msg(conf
, 'Wiimote Support', opts
.wiimote
)
570 conf
.define('WIIMOTE',1)
571 conf
.define('WINDOWS_KEY', opts
.windows_key
)
572 autowaf
.display_msg(conf
, 'Windows Key', opts
.windows_key
)
573 conf
.env
['PROGRAM_NAME'] = opts
.program_name
574 autowaf
.display_msg(conf
, 'Program Name', opts
.program_name
)
576 set_compiler_flags (conf
, Options
.options
)
578 autowaf
.display_msg(conf
, 'C Compiler flags', conf
.env
['CCFLAGS'])
579 autowaf
.display_msg(conf
, 'C++ Compiler flags', conf
.env
['CXXFLAGS'])
582 # and dump the same stuff to a file for use in the build
584 config_text
= open ('libs/ardour/config_text.cc',"w")
585 config_text
.write ('#include "ardour/ardour.h"\n\nnamespace ARDOUR {\nconst char* const ardour_config_info = "\\n\\\n')
586 config_text
.write ("Install prefix: "); config_text
.write (str (conf
.env
['PREFIX'])); config_text
.write ("\\n\\\n")
587 config_text
.write ("Debuggable build: "); config_text
.write (str (str(conf
.env
['DEBUG']))); config_text
.write ("\\n\\\n")
588 config_text
.write ("Strict compiler flags: "); config_text
.write (str (str(conf
.env
['STRICT']))); config_text
.write ("\\n\\\n")
589 config_text
.write ("Build documentation: "); config_text
.write (str (str(conf
.env
['DOCS']))); config_text
.write ("\\n\\\n")
590 config_text
.write ('Build target: '); config_text
.write (str (conf
.env
['build_target'])); config_text
.write ("\\n\\\n")
591 config_text
.write ('Architecture flags: '); config_text
.write (str (opts
.arch
)); config_text
.write ("\\n\\\n")
592 config_text
.write ('Aubio: '); config_text
.write (str (bool(conf
.env
['HAVE_AUBIO']))); config_text
.write ("\\n\\\n")
593 config_text
.write ('AudioUnits: '); config_text
.write (str (opts
.audiounits
)); config_text
.write ("\\n\\\n")
594 config_text
.write ('CoreAudio: '); config_text
.write (str (bool(conf
.env
['HAVE_COREAUDIO']))); config_text
.write ("\\n\\\n")
595 config_text
.write ('FPU optimization: '); config_text
.write (str (opts
.fpu_optimization
)); config_text
.write ("\\n\\\n")
596 config_text
.write ('Freedesktop files: '); config_text
.write (str (opts
.freedesktop
)); config_text
.write ("\\n\\\n")
597 config_text
.write ('Freesound: '); config_text
.write (str (opts
.freesound
)); config_text
.write ("\\n\\\n")
598 config_text
.write ('GtkOSX: '); config_text
.write (str (opts
.gtkosx
)); config_text
.write ("\\n\\\n")
599 config_text
.write ('LV2 support: '); config_text
.write (str (bool(conf
.env
['HAVE_SLV2']))); config_text
.write ("\\n\\\n")
600 config_text
.write ('Rubberband: '); config_text
.write (str (bool(conf
.env
['HAVE_RUBBERBAND']))); config_text
.write ("\\n\\\n")
601 config_text
.write ('Samplerate: '); config_text
.write (str (bool(conf
.env
['HAVE_SAMPLERATE']))); config_text
.write ("\\n\\\n")
602 config_text
.write ('Soundtouch: '); config_text
.write (str (bool(conf
.env
['HAVE_SOUNDTOUCH']))); config_text
.write ("\\n\\\n")
603 config_text
.write ('Translation: '); config_text
.write (str (opts
.nls
)); config_text
.write ("\\n\\\n")
604 config_text
.write ('Tranzport: '); config_text
.write (str (opts
.tranzport
)); config_text
.write ("\\n\\\n")
605 config_text
.write ('Universal binary: '); config_text
.write (str (opts
.universal
)); config_text
.write ("\\n\\\n")
606 config_text
.write ('VST support: '); config_text
.write (str (opts
.vst
)); config_text
.write ("\\n\\\n")
607 config_text
.write ('Wiimote support: '); config_text
.write (str (opts
.wiimote
)); config_text
.write ("\\n\\\n")
608 config_text
.write ('Windows key: '); config_text
.write (str (opts
.windows_key
)); config_text
.write ("\\n\\\n")
609 config_text
.write ('C compiler flags: '); config_text
.write (str (conf
.env
['CCFLAGS'])); config_text
.write ("\\n\\\n")
610 config_text
.write ('C++ compiler flags: '); config_text
.write (str (conf
.env
['CXXFLAGS'])); config_text
.write ("\\n\\\n")
611 config_text
.write ('Phone home: '); config_text
.write (str (bool(conf
.env
['PHONE_HOME']))); config_text
.write ("\\n\\\n")
612 config_text
.write ('JACK session support: '); config_text
.write (str (bool(conf
.env
['JACK_SESSION']))); config_text
.write ("\\n\\\n")
613 config_text
.write ('";}\n')
617 autowaf
.set_recursive()
618 if sys
.platform
== 'darwin':
619 bld
.add_subdirs('libs/appleutility')
623 # ideally, we'd like to use the OS-provided MIDI API
624 # for default ports. that doesn't work on at least
625 # Fedora (Nov 9th, 2009) so use JACK MIDI on linux.
627 if sys
.platform
== 'darwin':
629 'MIDITAG' : 'control',
630 'MIDITYPE' : 'coremidi',
631 'JACK_INPUT' : 'auditioner'
635 'MIDITAG' : 'control',
637 'JACK_INPUT' : 'auditioner'
640 obj
= bld
.new_task_gen('subst')
641 obj
.source
= 'ardour.rc.in'
642 obj
.target
= 'ardour_system.rc'
643 obj
.dict = rc_subst_dict
644 obj
.install_path
= '${CONFIGDIR}/ardour3'
647 bld
.recurse (i18n_children
)