From e7ce51e08ffcaad30e54050f6e540913a63d3d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Mon, 4 May 2015 13:57:17 +1000 Subject: [PATCH 01/16] build: refactor pkg-config for shared libraries Improve detection and usage of pkg-config. This simplifies the setup of all our shared libraries. If pkg-config is installed on the host and `--shared` flags are passed by the user, we try to get defaults from pkg-config instead of using the default provided by configure. --- configure | 116 +++++++++++++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 63 deletions(-) diff --git a/configure b/configure index 4d4bf6e720149b..a2e4102c34b0ac 100755 --- a/configure +++ b/configure @@ -343,18 +343,31 @@ def b(value): def pkg_config(pkg): - cmd = os.popen('pkg-config --libs %s' % pkg, 'r') - libs = cmd.readline().strip() - ret = cmd.close() - if (ret): return None + pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') + pkg_config_args = '--silence-errors' + try: + subprocess.check_output([pkg_config, '--version']) + except OSError: + # no pkg-config/pkgconf installed + return (None, None) + + retval = () + for flag in ['--libs', '--cflags']: + try: + val = subprocess.check_output([pkg_config, pkg_config_args, flag, pkg]) + except subprocess.CalledProcessError: + # most likely missing a .pc-file + val = None - cmd = os.popen('pkg-config --cflags %s' % pkg, 'r') - cflags = cmd.readline().strip() - ret = cmd.close() - if (ret): return None + retval += (val,) - return (libs, cflags) + return retval +def format_libraries(list): + """Returns string of space separated libraries""" + list = list.replace(' ', '') + set = list.split(',') + return ' '.join('-l{0}'.format(i) for i in set) def try_check_compiler(cc, lang): try: @@ -672,41 +685,25 @@ def configure_node(o): o['variables']['node_target_type'] = 'static_library' -def configure_libz(o): - o['variables']['node_shared_zlib'] = b(options.shared_zlib) - - if options.shared_zlib: - o['libraries'] += ['-l%s' % options.shared_zlib_libname] - if options.shared_zlib_libpath: - o['libraries'] += ['-L%s' % options.shared_zlib_libpath] - if options.shared_zlib_includes: - o['include_dirs'] += [options.shared_zlib_includes] - - -def configure_http_parser(o): - o['variables']['node_shared_http_parser'] = b(options.shared_http_parser) - - if options.shared_http_parser: - o['libraries'] += ['-l%s' % options.shared_http_parser_libname] - if options.shared_http_parser_libpath: - o['libraries'] += ['-L%s' % options.shared_http_parser_libpath] - if options.shared_http_parser_includes: - o['include_dirs'] += [options.shared_http_parser_includes] - - -def configure_libuv(o): - o['variables']['node_shared_libuv'] = b(options.shared_libuv) - - if options.shared_libuv: - o['libraries'] += ['-l%s' % options.shared_libuv_libname] - if options.shared_libuv_libpath: - o['libraries'] += ['-L%s' % options.shared_libuv_libpath] - else: - o['variables']['uv_library'] = 'static_library' - - if options.shared_libuv_includes: - o['include_dirs'] += [options.shared_libuv_includes] - +def configure_library(lib, output): + shared_lib = 'shared_%s' % lib + output['variables']['node_%s' % shared_lib] = b(getattr(options, shared_lib)) + + if getattr(options, shared_lib): + default_lib = format_libraries(getattr(options, '%s_libname' % shared_lib)) + default_libpath = getattr(options, '%s_libpath' % shared_lib) + default_cflags = getattr(options, '%s_includes' % shared_lib) + + (pkg_libs, pkg_cflags) = pkg_config(lib) + libs = pkg_libs if pkg_libs else default_lib + cflags = pkg_cflags if pkg_cflags else default_cflags + + if libs: + output['libraries'] += libs.split() + if cflags: + output['include_dirs'] += cflags.split() + if default_libpath: + output['libraries'] += ['-L%s' % default_libpath] def configure_v8(o): o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 @@ -718,26 +715,12 @@ def configure_v8(o): def configure_openssl(o): o['variables']['node_use_openssl'] = b(not options.without_ssl) o['variables']['node_shared_openssl'] = b(options.shared_openssl) - o['variables']['openssl_no_asm'] = ( - 1 if options.openssl_no_asm else 0) + o['variables']['openssl_no_asm'] = 1 if options.openssl_no_asm else 0 if options.without_ssl: return - if options.shared_openssl: - (libs, cflags) = pkg_config('openssl') or ('-lssl -lcrypto', '') - - libnames = options.shared_openssl_libname.split(',') - o['libraries'] += ['-l%s' % s for s in libnames] - - if options.shared_openssl_libpath: - o['libraries'] += ['-L%s' % options.shared_openssl_libpath] - - if options.shared_openssl_includes: - o['include_dirs'] += [options.shared_openssl_includes] - else: - o['cflags'] += cflags.split() - + configure_library('openssl', o) def configure_fullystatic(o): if options.fully_static: @@ -1020,15 +1003,22 @@ if (options.dest_os): flavor = GetFlavor(flavor_params) configure_node(output) -configure_libz(output) -configure_http_parser(output) -configure_libuv(output) +configure_library('zlib', output) +configure_library('http_parser', output) +configure_library('libuv', output) configure_v8(output) configure_openssl(output) configure_winsdk(output) configure_intl(output) configure_fullystatic(output) +# remove duplicates from libraries +unique_libraries = [] +for library in output['libraries']: + if library not in unique_libraries: + unique_libraries.append(library) +output['libraries'] = unique_libraries + # variables should be a root level element, # move everything else to target_defaults variables = output['variables'] From 38c619575a1d51c5b5b3e1296951740704e59e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 09:23:56 +1000 Subject: [PATCH 02/16] fixup! simplify library uniqueness --- configure | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configure b/configure index a2e4102c34b0ac..1404f37a45e272 100755 --- a/configure +++ b/configure @@ -1013,11 +1013,7 @@ configure_intl(output) configure_fullystatic(output) # remove duplicates from libraries -unique_libraries = [] -for library in output['libraries']: - if library not in unique_libraries: - unique_libraries.append(library) -output['libraries'] = unique_libraries +output['libraries'] = list(set(output['libraries'])) # variables should be a root level element, # move everything else to target_defaults From 4365f34fd5fe4eb1125ec22f17232a51bee15fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 09:25:50 +1000 Subject: [PATCH 03/16] fixup! avoid one pkg-config call --- configure | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 1404f37a45e272..f9cbc13616d268 100755 --- a/configure +++ b/configure @@ -345,11 +345,6 @@ def b(value): def pkg_config(pkg): pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') pkg_config_args = '--silence-errors' - try: - subprocess.check_output([pkg_config, '--version']) - except OSError: - # no pkg-config/pkgconf installed - return (None, None) retval = () for flag in ['--libs', '--cflags']: @@ -358,6 +353,9 @@ def pkg_config(pkg): except subprocess.CalledProcessError: # most likely missing a .pc-file val = None + except OSError: + # no pkg-config/pkgconf installed + return (None, None) retval += (val,) From d5990d1cb6a16dee2f4feb6d700789f228eafcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 09:28:41 +1000 Subject: [PATCH 04/16] fixup! style --- configure | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure b/configure index f9cbc13616d268..8d31f6244ab6e4 100755 --- a/configure +++ b/configure @@ -345,7 +345,6 @@ def b(value): def pkg_config(pkg): pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') pkg_config_args = '--silence-errors' - retval = () for flag in ['--libs', '--cflags']: try: @@ -356,9 +355,7 @@ def pkg_config(pkg): except OSError: # no pkg-config/pkgconf installed return (None, None) - retval += (val,) - return retval def format_libraries(list): @@ -717,7 +714,6 @@ def configure_openssl(o): if options.without_ssl: return - configure_library('openssl', o) def configure_fullystatic(o): From 43feb457b9c5f17513a00c0a8e12caba7ed56416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 09:29:24 +1000 Subject: [PATCH 05/16] fixup! remove unneeded string replace --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 8d31f6244ab6e4..e29633eafe420a 100755 --- a/configure +++ b/configure @@ -360,7 +360,6 @@ def pkg_config(pkg): def format_libraries(list): """Returns string of space separated libraries""" - list = list.replace(' ', '') set = list.split(',') return ' '.join('-l{0}'.format(i) for i in set) From 82e5af7fb2c99ef1b2f1cb92208156d7310db419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 09:34:06 +1000 Subject: [PATCH 06/16] fixup! check PKG_CONFIG_PATH as well PKG_CONFIG_PATH is the default path to pkg-config, while PKG_CONFIG is used as a result of a floating patch from Paul McClave --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index e29633eafe420a..def2367ab112ef 100755 --- a/configure +++ b/configure @@ -343,7 +343,8 @@ def b(value): def pkg_config(pkg): - pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') + pkg_config = os.environ.get('PKG_CONFIG_PATH', + os.environ.get('PKG_CONFIG', 'pkg-config')) pkg_config_args = '--silence-errors' retval = () for flag in ['--libs', '--cflags']: From 524de59b2dc745d31cb0815bf98495df0367c407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 5 May 2015 10:14:04 +1000 Subject: [PATCH 07/16] fixup: properly parse include headers --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index def2367ab112ef..8ef0b3854c0bcd 100755 --- a/configure +++ b/configure @@ -347,9 +347,9 @@ def pkg_config(pkg): os.environ.get('PKG_CONFIG', 'pkg-config')) pkg_config_args = '--silence-errors' retval = () - for flag in ['--libs', '--cflags']: + for flag in ['--libs-only-l', '--cflags-only-I']: try: - val = subprocess.check_output([pkg_config, pkg_config_args, flag, pkg]) + val = subprocess.check_output([pkg_config, pkg_config_args, flag, pkg]).rstrip('\n') except subprocess.CalledProcessError: # most likely missing a .pc-file val = None @@ -691,12 +691,12 @@ def configure_library(lib, output): (pkg_libs, pkg_cflags) = pkg_config(lib) libs = pkg_libs if pkg_libs else default_lib - cflags = pkg_cflags if pkg_cflags else default_cflags + cflags = pkg_cflags.split("-I") if pkg_cflags else default_cflags if libs: output['libraries'] += libs.split() if cflags: - output['include_dirs'] += cflags.split() + output['include_dirs'] += [cflags] if default_libpath: output['libraries'] += ['-L%s' % default_libpath] From ac3df1b0779933c274fdc9d72facf0d186b26c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 12 May 2015 10:35:22 +1000 Subject: [PATCH 08/16] fixup: styling and libpath support - fix outstanding styling issues brought up by @bnoordhuis - add libpath support through pkg-config - minor fixes to icu since we've modified pkg_config --- configure | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 8ef0b3854c0bcd..c1d79eeccb18c9 100755 --- a/configure +++ b/configure @@ -343,27 +343,30 @@ def b(value): def pkg_config(pkg): - pkg_config = os.environ.get('PKG_CONFIG_PATH', - os.environ.get('PKG_CONFIG', 'pkg-config')) - pkg_config_args = '--silence-errors' + pkg_config = 'pkg-config' + pkg_config = os.environ.get('PKG_CONFIG', pkg_config) + pkg_config = os.environ.get('PKG_CONFIG_PATH', pkg_config) + args = '--silence-errors' retval = () - for flag in ['--libs-only-l', '--cflags-only-I']: + for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L']: try: - val = subprocess.check_output([pkg_config, pkg_config_args, flag, pkg]).rstrip('\n') + val = subprocess.check_output([pkg_config, args, flag, pkg]).rstrip('\n') except subprocess.CalledProcessError: # most likely missing a .pc-file val = None except OSError: # no pkg-config/pkgconf installed - return (None, None) + return (None, None, None) retval += (val,) return retval + def format_libraries(list): """Returns string of space separated libraries""" set = list.split(',') return ' '.join('-l{0}'.format(i) for i in set) + def try_check_compiler(cc, lang): try: proc = subprocess.Popen(shlex.split(cc) + ['-E', '-P', '-x', lang, '-'], @@ -681,24 +684,26 @@ def configure_node(o): def configure_library(lib, output): - shared_lib = 'shared_%s' % lib - output['variables']['node_%s' % shared_lib] = b(getattr(options, shared_lib)) + shared_lib = 'shared_' + lib + output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib)) if getattr(options, shared_lib): - default_lib = format_libraries(getattr(options, '%s_libname' % shared_lib)) - default_libpath = getattr(options, '%s_libpath' % shared_lib) - default_cflags = getattr(options, '%s_includes' % shared_lib) - - (pkg_libs, pkg_cflags) = pkg_config(lib) - libs = pkg_libs if pkg_libs else default_lib + default_cflags = getattr(options, shared_lib + '_includes') + default_lib = format_libraries(getattr(options, shared_lib + '_libname')) + default_libpath = getattr(options, shared_lib + '_libpath') + if default_libpath: + default_libpath = "-L" + default_libpath + (pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib) cflags = pkg_cflags.split("-I") if pkg_cflags else default_cflags + libs = pkg_libs if pkg_libs else default_lib + libpath = pkg_libpath if pkg_libpath else default_libpath if libs: output['libraries'] += libs.split() if cflags: output['include_dirs'] += [cflags] - if default_libpath: - output['libraries'] += ['-L%s' % default_libpath] + if libpath: + output['libraries'] += [libpath] def configure_v8(o): o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 @@ -834,12 +839,13 @@ def configure_intl(o): # ICU from pkg-config. o['variables']['v8_enable_i18n_support'] = 1 pkgicu = pkg_config('icu-i18n') - if not pkgicu: + if pkgicu[1] == None: print 'Error: could not load pkg-config data for "icu-i18n".' print 'See above errors or the README.md.' sys.exit(1) - (libs, cflags) = pkgicu + (libs, cflags, libpath) = pkgicu o['libraries'] += libs.split() + o['libraries'] += libpath.split() o['cflags'] += cflags.split() # use the "system" .gyp o['variables']['icu_gyp_path'] = 'tools/icu/icu-system.gyp' From bb6697f9998457ba5ace83a336913d5023105f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 12 May 2015 10:55:21 +1000 Subject: [PATCH 09/16] fixup: another styling nit --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c1d79eeccb18c9..a624db5e2d06ea 100755 --- a/configure +++ b/configure @@ -721,6 +721,7 @@ def configure_openssl(o): return configure_library('openssl', o) + def configure_fullystatic(o): if options.fully_static: o['libraries'] += ['-static'] From 1f9934578443831ff270cc19cbe5110795e7f4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 12 May 2015 11:00:56 +1000 Subject: [PATCH 10/16] fixup: check for libs when using system-icu --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index a624db5e2d06ea..e26aa30e8176e3 100755 --- a/configure +++ b/configure @@ -840,7 +840,7 @@ def configure_intl(o): # ICU from pkg-config. o['variables']['v8_enable_i18n_support'] = 1 pkgicu = pkg_config('icu-i18n') - if pkgicu[1] == None: + if pkgicu[0] == None: print 'Error: could not load pkg-config data for "icu-i18n".' print 'See above errors or the README.md.' sys.exit(1) From dea139a8d43bb07a8d677ce24808058481708c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 12 May 2015 11:23:22 +1000 Subject: [PATCH 11/16] fixup: check_output returns bytes, not a string --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e26aa30e8176e3..d31bbb19cee58e 100755 --- a/configure +++ b/configure @@ -350,7 +350,9 @@ def pkg_config(pkg): retval = () for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L']: try: - val = subprocess.check_output([pkg_config, args, flag, pkg]).rstrip('\n') + val = subprocess.check_output([pkg_config, args, flag, pkg]) + # check_output returns bytes + val = val.encode().strip().rstrip('\n') except subprocess.CalledProcessError: # most likely missing a .pc-file val = None @@ -697,7 +699,7 @@ def configure_library(lib, output): cflags = pkg_cflags.split("-I") if pkg_cflags else default_cflags libs = pkg_libs if pkg_libs else default_lib libpath = pkg_libpath if pkg_libpath else default_libpath - + if libs: output['libraries'] += libs.split() if cflags: From 0350f1478602e4704f8b39f242d961bf81c2bbad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Thu, 14 May 2015 11:48:31 +1000 Subject: [PATCH 12/16] fixup: style and document info about splitting lib/libpath # Please enter the commit message for your changes. Lines starting --- configure | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure b/configure index d31bbb19cee58e..6d3d6402f17b1f 100755 --- a/configure +++ b/configure @@ -694,19 +694,22 @@ def configure_library(lib, output): default_lib = format_libraries(getattr(options, shared_lib + '_libname')) default_libpath = getattr(options, shared_lib + '_libpath') if default_libpath: - default_libpath = "-L" + default_libpath + default_libpath = '-L' + default_libpath (pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib) - cflags = pkg_cflags.split("-I") if pkg_cflags else default_cflags + cflags = pkg_cflags.split('-I') if pkg_cflags else default_cflags libs = pkg_libs if pkg_libs else default_lib libpath = pkg_libpath if pkg_libpath else default_libpath if libs: + # libs passed to the linker cannot contain spaces. + # (libpath on the other hand can) output['libraries'] += libs.split() if cflags: output['include_dirs'] += [cflags] if libpath: output['libraries'] += [libpath] + def configure_v8(o): o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. @@ -842,13 +845,15 @@ def configure_intl(o): # ICU from pkg-config. o['variables']['v8_enable_i18n_support'] = 1 pkgicu = pkg_config('icu-i18n') - if pkgicu[0] == None: + if pkgicu[0] is None: print 'Error: could not load pkg-config data for "icu-i18n".' print 'See above errors or the README.md.' sys.exit(1) (libs, cflags, libpath) = pkgicu + # safe to split, cannot contain spaces o['libraries'] += libs.split() - o['libraries'] += libpath.split() + # libpath provides linker path which may contain spaces + o['libraries'] += [libpath] o['cflags'] += cflags.split() # use the "system" .gyp o['variables']['icu_gyp_path'] = 'tools/icu/icu-system.gyp' From d8f4f6d41e8a2cad7806c31401d8891bf4e10ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Mon, 18 May 2015 15:17:01 +1000 Subject: [PATCH 13/16] fixup: provide libpath ahead of libraries --- configure | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 6d3d6402f17b1f..b742c1e67ff6a0 100755 --- a/configure +++ b/configure @@ -700,14 +700,15 @@ def configure_library(lib, output): libs = pkg_libs if pkg_libs else default_lib libpath = pkg_libpath if pkg_libpath else default_libpath + # libpath needs to be provided ahead libraries + if libpath: + output['libraries'] += [libpath] if libs: # libs passed to the linker cannot contain spaces. # (libpath on the other hand can) output['libraries'] += libs.split() if cflags: output['include_dirs'] += [cflags] - if libpath: - output['libraries'] += [libpath] def configure_v8(o): @@ -850,10 +851,10 @@ def configure_intl(o): print 'See above errors or the README.md.' sys.exit(1) (libs, cflags, libpath) = pkgicu - # safe to split, cannot contain spaces - o['libraries'] += libs.split() # libpath provides linker path which may contain spaces o['libraries'] += [libpath] + # safe to split, cannot contain spaces + o['libraries'] += libs.split() o['cflags'] += cflags.split() # use the "system" .gyp o['variables']['icu_gyp_path'] = 'tools/icu/icu-system.gyp' From c5fed675b7a5fe06e9b39e035031e7dd0431ff49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Mon, 18 May 2015 15:17:43 +1000 Subject: [PATCH 14/16] fixup: avoid using set for variable name --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b742c1e67ff6a0..dcb431c770f5da 100755 --- a/configure +++ b/configure @@ -365,8 +365,8 @@ def pkg_config(pkg): def format_libraries(list): """Returns string of space separated libraries""" - set = list.split(',') - return ' '.join('-l{0}'.format(i) for i in set) + libraries = list.split(',') + return ' '.join('-l{0}'.format(i) for i in libraries) def try_check_compiler(cc, lang): From 1e1b008e6e2a2ab1ab875d27467b4a28d92a7236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 19 May 2015 08:18:11 +1000 Subject: [PATCH 15/16] fix: Don't use PKG_CONFIG_PATH --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index dcb431c770f5da..1570c7f62c78bf 100755 --- a/configure +++ b/configure @@ -343,9 +343,7 @@ def b(value): def pkg_config(pkg): - pkg_config = 'pkg-config' - pkg_config = os.environ.get('PKG_CONFIG', pkg_config) - pkg_config = os.environ.get('PKG_CONFIG_PATH', pkg_config) + pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') args = '--silence-errors' retval = () for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L']: From 389a667cb789e21203579f0607df78c0c5137262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 19 May 2015 08:19:21 +1000 Subject: [PATCH 16/16] fix: don't sort/unique libs --- configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure b/configure index 1570c7f62c78bf..f02d557ca6d731 100755 --- a/configure +++ b/configure @@ -1019,9 +1019,6 @@ configure_winsdk(output) configure_intl(output) configure_fullystatic(output) -# remove duplicates from libraries -output['libraries'] = list(set(output['libraries'])) - # variables should be a root level element, # move everything else to target_defaults variables = output['variables']