From 311a7888e0e489c697357316d630d5da479c89b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Fri, 10 Dec 2021 09:41:37 +0100 Subject: [PATCH] fltk-config: Don't use "-luuid" in shared linking flags on Windows. The uuid library just exports various GUIDs. There is no actual shared library with that name on Windows. The necessary symbols are already (statically) linked into the shared FLTK library. No need to link to it again when linking to the shared FLTK library. It can actually be harmful to link with "-luuid" when (libtool?) projects try to link a shared library with the shared FLTK library. Remove "-luuid" from the LDFLAGS for "fltk-config --ldflags". But keep it for "fltk-config --ldstaticflags". --- fltk-config.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fltk-config.in b/fltk-config.in index bf0bdef4e..4dd754d54 100644 --- a/fltk-config.in +++ b/fltk-config.in @@ -233,8 +233,18 @@ else fi # Calculate needed libraries +if test "$OSTYPE" = "msys" -o "$OSTYPE" = "cygwin"; then + # Remove "-luuid" from shared linker flags. + for lib in $LDLIBS; do + if test "$lib" != "-luuid"; then + LDSHAREDLIBS="$LDSHAREDLIBS $lib" + fi + done +else + LDSHAREDLIBS="$LDLIBS" +fi LDSTATIC="$libdir/libfltk.a $LDLIBS" -LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS" +LDLIBS="-lfltk$SHAREDSUFFIX $LDSHAREDLIBS" if test x$use_forms = xyes; then LDLIBS="-lfltk_forms$SHAREDSUFFIX $LDLIBS"