Rivet 4.1.1/4.1.2 fails to configure on LCG macOS nodes

Rivet 4.1.1/4.1.2 fails to configure on LCG macis nodes:

checking FastJet test program compilation... failed
configure: error: Couldn't build FastJet test program: are your FastJet and FastJet Contrib versions up to date, and did you install Contrib with 'make fragile-shared-install'?

Rivet configure calls fastjet-config --libs --plugins --rpath=no but then keeps only the -l... library names and drops the -L... search paths. gcc on Linux adds default lib paths (for libgfortran, libquadmath) and it works.

clang on macOS does not know where Homebrew gfortran libs live... Without the -L... paths from fastjet-config the link test cannot find libgfortran, libquadmath....

The patch we apply now:

--- configure.ac.orig   2025-10-31 14:23:36.593313784 +0100
+++ configure.ac        2025-10-31 14:58:50.907018142 +0100
@@ -205,12 +205,13 @@
     AC_MSG_ERROR([FastJet version 3.2.0 or later is required])
   fi
   # Only keep -l flags (library names)
-  FASTJETLIBADD=`echo "$($FJCONFIG --libs --plugins --rpath=no)" | tr ' ' '\n' | grep '^-l' | tr '\n' ' '`
+  FJ_ALL="$($FJCONFIG --libs --plugins --rpath=no)"
+  FASTJETLIBADD="$(printf '%s\n' "$FJ_ALL" | tr ' ' '\n' | grep '^-l' | tr '\n' ' ')"
+  FASTJETLDFLAGS="$FASTJETLDFLAGS -L$FASTJETLIBPATH $(printf '%s\n' "$FJ_ALL" | tr ' ' '\n' | grep '^-L' | tr '\n' ' ')"
 else
   FASTJETLIBADD="-l$FASTJETLIBNAME -lfastjetplugins"
 fi
-FASTJETLDFLAGS="-L$FASTJETLIBPATH"
-
+FASTJETLDFLAGS="-L$FASTJETLIBPATH $FASTJETLIBADD $FASTJETLDFLAGS"
 
 ## FastJet contrib (allow paths specified separately from FJ)
 AC_ARG_WITH([fjcontrib],
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information