From 29a464d50eab31b5ed7e3b39a5037ecf3c7c044e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Jan 2013 12:24:22 +0000 Subject: Tidy up openjpeg configuration, and insist on 1.5.0 or 1.5.1 (#38). --- wscript | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index f392ee67f..9acb61262 100644 --- a/wscript +++ b/wscript @@ -91,19 +91,19 @@ def configure(conf): conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True) conf.check_cfg(package = '', path = 'Magick++-config', args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True) - openjpeg_fragment = """ + if conf.options.static: + conf.check_cc(fragment = """ #include \n #include \n int main () {\n void* p = (void *) opj_image_create;\n return 0;\n } - """ - - if conf.options.static: - conf.check_cc(fragment = openjpeg_fragment, msg = 'Checking for library openjpeg', stlib = 'openjpeg', uselib_store = 'OPENJPEG') + """, msg = 'Checking for library openjpeg', stlib = 'openjpeg', uselib_store = 'OPENJPEG') else: - conf.check_cfg(package = 'libopenjpeg', args = '--cflags --libs', uselib_store = 'OPENJPEG', mandatory = True) + # 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_cc(fragment = """ #include \n -- cgit v1.2.3