-
-def static_ffmpeg(conf):
- conf.check_cfg(package='libavformat', args='--cflags', uselib_store='AVFORMAT', mandatory=True)
- conf.env.STLIB_AVFORMAT = ['avformat']
- conf.check_cfg(package='libavfilter', args='--cflags', uselib_store='AVFILTER', mandatory=True)
- conf.env.STLIB_AVFILTER = ['avfilter', 'swresample']
- conf.check_cfg(package='libavcodec', args='--cflags', uselib_store='AVCODEC', mandatory=True)
- conf.env.STLIB_AVCODEC = ['avcodec']
- conf.env.LIB_AVCODEC = ['z']
- conf.check_cfg(package='libavutil', args='--cflags', uselib_store='AVUTIL', mandatory=True)
- conf.env.STLIB_AVUTIL = ['avutil']
- conf.check_cfg(package='libswscale', args='--cflags', uselib_store='SWSCALE', mandatory=True)
- conf.env.STLIB_SWSCALE = ['swscale']
- conf.check_cfg(package='libswresample', args='--cflags', uselib_store='SWRESAMPLE', mandatory=True)
- conf.env.STLIB_SWRESAMPLE = ['swresample']
- conf.check_cfg(package='libpostproc', args='--cflags', uselib_store='POSTPROC', mandatory=True)
- conf.env.STLIB_POSTPROC = ['postproc']
-
-def dynamic_ffmpeg(conf):
- conf.check_cfg(package='libavformat', args='--cflags --libs', uselib_store='AVFORMAT', mandatory=True)
- conf.check_cfg(package='libavfilter', args='--cflags --libs', uselib_store='AVFILTER', mandatory=True)
- conf.check_cfg(package='libavcodec', args='--cflags --libs', uselib_store='AVCODEC', mandatory=True)
- conf.check_cfg(package='libavutil', args='--cflags --libs', uselib_store='AVUTIL', mandatory=True)
- conf.check_cfg(package='libswscale', args='--cflags --libs', uselib_store='SWSCALE', mandatory=True)
- conf.check_cfg(package='libswresample', args='--cflags --libs', uselib_store='SWRESAMPLE', mandatory=True)
- conf.check_cfg(package='libpostproc', args='--cflags --libs', uselib_store='POSTPROC', mandatory=True)
-
-def static_openjpeg(conf):
- conf.check_cfg(package='libopenjpeg', args='--cflags', atleast_version='1.5.0', uselib_store='OPENJPEG', mandatory=True)
- conf.check_cfg(package='libopenjpeg', args='--cflags', max_version='1.5.2', mandatory=True)
- conf.env.STLIB_OPENJPEG = ['openjpeg']
-
-def dynamic_openjpeg(conf):
- conf.check_cfg(package='libopenjpeg', args='--cflags --libs', atleast_version='1.5.0', uselib_store='OPENJPEG', mandatory=True)
- conf.check_cfg(package='libopenjpeg', args='--cflags --libs', max_version='1.5.2', mandatory=True)
-
-def static_dcp(conf, static_boost, static_xmlpp, static_xmlsec, static_ssh):
- conf.check_cfg(package='libdcp-1.0', atleast_version='0.96', args='--cflags', uselib_store='DCP', mandatory=True)
- conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
- conf.env.STLIB_DCP = ['dcp-1.0', 'asdcp-libdcp-1.0', 'kumu-libdcp-1.0']
- conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt']
-
- if static_boost:
- conf.env.STLIB_DCP.append('boost_system')
-
- if static_xmlpp:
- conf.env.STLIB_DCP.append('xml++-2.6')
- else:
- conf.env.LIB_DCP.append('xml++-2.6')
-
- if static_xmlsec:
- conf.env.STLIB_DCP.append('xmlsec1-openssl')
- conf.env.STLIB_DCP.append('xmlsec1')
- else:
- conf.env.LIB_DCP.append('xmlsec1-openssl')
- conf.env.LIB_DCP.append('xmlsec1')
-
- if static_ssh:
- conf.env.STLIB_DCP.append('ssh')
- else:
- conf.env.LIB_DCP.append('ssh')
-
-def dynamic_dcp(conf):
- conf.check_cfg(package='libdcp-1.0', atleast_version='0.92', args='--cflags --libs', uselib_store='DCP', mandatory=True)
- conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP]
-
-def dynamic_ssh(conf):
- conf.check_cc(fragment="""
- #include <libssh/libssh.h>\n
- int main () {\n
- ssh_session s = ssh_new ();\n
- return 0;\n
- }
- """, msg='Checking for library libssh', mandatory=True, lib='ssh', uselib_store='SSH')
-
-def dynamic_boost(conf, lib_suffix, thread):
- conf.check_cxx(fragment="""
- #include <boost/version.hpp>\n
- #if BOOST_VERSION < 104500\n
- #error boost too old\n
- #endif\n
- int main(void) { return 0; }\n
- """,
- mandatory=True,
- msg='Checking for boost library >= 1.45',
- okmsg='yes',
- errmsg='too old\nPlease install boost version 1.45 or higher.')
-
- conf.check_cxx(fragment="""
- #include <boost/thread.hpp>\n
- int main() { boost::thread t (); }\n
- """, msg='Checking for boost threading library',
- libpath='/usr/local/lib',
- lib=[thread, 'boost_system%s' % lib_suffix],
- uselib_store='BOOST_THREAD')
-
- conf.check_cxx(fragment="""
- #include <boost/filesystem.hpp>\n
- int main() { boost::filesystem::copy_file ("a", "b"); }\n
- """, msg='Checking for boost filesystem library',
- libpath='/usr/local/lib',
- lib=['boost_filesystem%s' % lib_suffix, 'boost_system%s' % lib_suffix],
- uselib_store='BOOST_FILESYSTEM')
-
- conf.check_cxx(fragment="""
- #include <boost/date_time.hpp>\n
- int main() { boost::gregorian::day_clock::local_day(); }\n
- """, msg='Checking for boost datetime library',
- libpath='/usr/local/lib',
- lib=['boost_date_time%s' % lib_suffix, 'boost_system%s' % lib_suffix],
- uselib_store='BOOST_DATETIME')
-
- conf.check_cxx(fragment="""
- #include <boost/signals2.hpp>\n
- int main() { boost::signals2::signal<void (int)> x; }\n
- """,
- msg='Checking for boost signals2 library',
- uselib_store='BOOST_SIGNALS2')
-
-def static_boost(conf, lib_suffix):
- conf.env.STLIB_BOOST_THREAD = ['boost_thread']
- conf.env.STLIB_BOOST_FILESYSTEM = ['boost_filesystem%s' % lib_suffix]
- conf.env.STLIB_BOOST_DATETIME = ['boost_date_time%s' % lib_suffix, 'boost_system%s' % lib_suffix]
- conf.env.STLIB_BOOST_SIGNALS2 = ['boost_signals2']
-
-def dynamic_quickmail(conf):
- conf.check_cxx(fragment="""
- #include <quickmail.h>
- int main(void) { quickmail_initialize (); }
- """,
- mandatory=True,
- msg='Checking for libquickmail',
- libpath='/usr/local/lib',
- lib=['quickmail', 'curl'],
- uselib_store='QUICKMAIL')
+ opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to make a Windows package')
+ opt.add_option('--static-dcpomatic', action='store_true', default=False, help='link to components of DCP-o-matic statically')
+ opt.add_option('--static-boost', action='store_true', default=False, help='link statically to Boost')
+ opt.add_option('--static-openjpeg', action='store_true', default=False, help='link statically to OpenJPEG')
+ opt.add_option('--static-wxwidgets', action='store_true', default=False, help='link statically to wxWidgets')
+ opt.add_option('--static-ffmpeg', action='store_true', default=False, help='link statically to FFmpeg')
+ opt.add_option('--static-xmlpp', action='store_true', default=False, help='link statically to libxml++')
+ opt.add_option('--static-xmlsec', action='store_true', default=False, help='link statically to xmlsec')
+ opt.add_option('--static-ssh', action='store_true', default=False, help='link statically to libssh')
+ opt.add_option('--static-cxml', action='store_true', default=False, help='link statically to libcxml')
+ opt.add_option('--static-dcp', action='store_true', default=False, help='link statically to libdcp')
+ opt.add_option('--static-sub', action='store_true', default=False, help='link statically to libsub')
+ opt.add_option('--static-curl', action='store_true', default=False, help='link statically to libcurl')
+ opt.add_option('--workaround-gssapi', action='store_true', default=False, help='link to gssapi_krb5')