From 7f5955a081e2f8db5bcea4bde47c0cbd5ff3ac16 Mon Sep 17 00:00:00 2001 From: George Stagg Date: Wed, 13 Dec 2023 10:11:26 +0000 Subject: [PATCH] Ensure library link flags are unique Fixes compiling with Emscripten for webR, where linking is static and so multiple instances of the same library link flag, such as `-lz`, leads to duplicate symbol errors. --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 6f7b8f96..1a8f7a9b 100755 --- a/configure +++ b/configure @@ -49,6 +49,9 @@ elif [ `uname` = "Darwin" ]; then fi fi +# Ensure that lib link flags are unique +PKG_LIBS=$(echo ${PKG_LIBS} | xargs -n1 | sort -u | xargs) + # For debugging echo "Using PKG_CFLAGS=$PKG_CFLAGS" echo "Using PKG_LIBS=$PKG_LIBS"