2006-06-14 13:05:39 -04:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import glob
|
|
|
|
|
|
|
|
sndfile_files = glob.glob('src/*.c') + glob.glob('src/GSM610/*.c') + glob.glob('src/G72x/*.c')
|
|
|
|
|
2007-06-01 20:35:09 -04:00
|
|
|
Import('env install_prefix libraries use_flac')
|
2006-06-14 13:05:39 -04:00
|
|
|
sndfile = env.Copy()
|
2007-06-01 20:35:09 -04:00
|
|
|
if use_flac:
|
|
|
|
sndfile.Merge([libraries['flac'] ])
|
2006-06-14 13:05:39 -04:00
|
|
|
|
|
|
|
domain = 'libsndfile'
|
|
|
|
|
|
|
|
sndfile.Append(CCFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"")
|
|
|
|
sndfile.Append(CCFLAGS = "-DVERSION=\\\"ardour-special\\\"")
|
|
|
|
# mingw may need this
|
|
|
|
#sndfile.Append(CCFLAGS="-no-undefined")
|
|
|
|
sndfile.Append(PACKAGE = domain)
|
|
|
|
sndfile.Append(POTFILE = domain + '.pot')
|
|
|
|
|
2006-06-14 14:15:39 -04:00
|
|
|
conf = Configure(sndfile)
|
|
|
|
|
|
|
|
if conf.CheckCHeader('/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h'):
|
|
|
|
sndfile.Append(LINKFLAGS = "-framework CoreServices")
|
|
|
|
|
|
|
|
sndfile = conf.Finish()
|
|
|
|
|
2006-10-31 16:32:04 -05:00
|
|
|
libsndfile = sndfile.SharedLibrary('sndfile-ardour', sndfile_files)
|
2006-06-14 13:05:39 -04:00
|
|
|
|
2007-06-25 17:26:34 -04:00
|
|
|
if use_flac:
|
|
|
|
sndfile_h = sndfile.Command('src/sndfile.h', ['src/sndfile.h.in'], 'cd libs/libsndfile && ./configure && cd -', ENV=os.environ)
|
|
|
|
else:
|
|
|
|
sndfile_h = sndfile.Command('src/sndfile.h', ['src/sndfile.h.in'], 'cd libs/libsndfile && ./configure --disable-flac && cd -', ENV=os.environ)
|
2006-06-14 13:05:39 -04:00
|
|
|
|
|
|
|
Default([sndfile_h,libsndfile])
|
|
|
|
|
2007-01-03 15:00:57 -05:00
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), libsndfile))
|
2006-06-14 13:05:39 -04:00
|
|
|
|
|
|
|
env.Alias('tarball', env.Distribute (env['DISTTREE'],
|
|
|
|
[ 'NEWS', 'README', 'AUTHORS', 'ChangeLog',
|
2006-10-02 16:29:57 -04:00
|
|
|
'configure', 'SConscript',
|
|
|
|
'install-sh',
|
|
|
|
'libsndfile.spec.in',
|
|
|
|
'sndfile.pc.in',
|
|
|
|
'config.sub',
|
|
|
|
'config.guess'
|
|
|
|
] +
|
2006-06-14 13:05:39 -04:00
|
|
|
sndfile_files +
|
|
|
|
glob.glob('src/*.h') +
|
2006-10-02 16:29:57 -04:00
|
|
|
glob.glob('src/GSM610/*.h') +
|
|
|
|
glob.glob('src/G72x/*.h') +
|
2006-06-14 13:05:39 -04:00
|
|
|
[ 'src/sndfile.h.in', 'src/config.h.in', 'src/Symbols.linux', 'src/Symbols.darwin', 'src/libsndfile.def', 'src/cygsndfile.def' ]
|
|
|
|
))
|
|
|
|
|