- conf.env.HAVE_POSTPROC = 1
- conf.env.STLIB_POSTPROC = ['postproc']
-
- # This doesn't seem to be set up, and we need it otherwise resampling support
- # won't be included. Hack upon a hack, obviously
- conf.env.append_value('CXXFLAGS', ['-DHAVE_SWRESAMPLE=1'])
-
- conf.check_cfg(package = 'sndfile', args = '--cflags --libs', uselib_store = 'SNDFILE', mandatory = True)
- conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
-
- if conf.env.TARGET_LINUX:
- conf.check_cfg(package='liblzma', args='--cflags --libs', uselib_store='LZMA', mandatory=True)
-
- conf.check_cfg(package = '', path = conf.options.magickpp_config, args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True)
-
- if conf.options.static:
- conf.check_cc(fragment = """
- #include <stdio.h>\n
- #include <openjpeg.h>\n
- int main () {\n
- void* p = (void *) opj_image_create;\n
- return 0;\n
- }
- """, msg = 'Checking for library openjpeg', stlib = 'openjpeg', uselib_store = 'OPENJPEG')
- else:
- # Only 1.5.0 and 1.5.1 have been tested.
- 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.1', mandatory = True)
-
- 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_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')
-
- 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 = [boost_thread, 'boost_system%s' % boost_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' % boost_lib_suffix, 'boost_system%s' % boost_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' % boost_lib_suffix, 'boost_system%s' % boost_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')
-
- conf.check_cc(fragment = """
- #include <glib.h>
- int main() { g_format_size (1); }
- """, msg = 'Checking for g_format_size ()',
- uselib = 'GLIB',
- define_name = 'HAVE_G_FORMAT_SIZE',
- mandatory = False)
+ conf.env.STLIB_OPENJPEG = ['openjpeg']
+
+ # Dependencies which are always dynamically linked
+ conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True)
+ conf.check_cfg(package='glib-2.0', args='--cflags --libs', uselib_store='GLIB', mandatory=True)
+ conf.check_cfg(package= '', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True)
+ conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XML++', mandatory=True)
+
+ 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_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')
+
+ 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=[boost_thread, 'boost_system%s' % boost_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' % boost_lib_suffix, 'boost_system%s' % boost_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' % boost_lib_suffix, 'boost_system%s' % boost_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')
+
+ conf.check_cc(fragment="""
+ #include <glib.h>
+ int main() { g_format_size (1); }
+ """, msg='Checking for g_format_size ()',
+ uselib='GLIB',
+ define_name='HAVE_G_FORMAT_SIZE',
+ mandatory=False)