configure.ac |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 457872f8cac849b319ad4f88a94c8390aa9e3df7
Author:     Michael Stahl <michael.st...@collabora.com>
AuthorDate: Mon Aug 18 13:08:40 2025 +0200
Commit:     Michael Stahl <michael.st...@collabora.com>
CommitDate: Mon Aug 18 16:40:25 2025 +0200

    rhbz#2354168 configure: workaround bogus "dbus-1" libs
    
    DBUS_LIBS contains -L/usr/lib64/pkgconfig/../../lib64 which eventually
    causes link failure:
      desktop/source/lib/init.cxx:6451: error: undefined reference to 
'ublock_getCode_77'
    
    Reportedly realpath(1) is available even on macOS now so use it to
    resolve these paths.
    
    Change-Id: I754447ad23982918d6f8e80f839112db22b75205
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189864
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@collabora.com>

diff --git a/configure.ac b/configure.ac
index f8964ea12a60..e6c60719cbd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,11 +69,18 @@ FilterLibs()
     else
         for f in $1; do
             case "$f" in
-                # let's start with Fedora's paths for now
-                
-L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/)
-                    # ignore it: on UNIXoids it is searched by default anyway
-                    # but if it's given explicitly then it may override other 
paths
-                    # (on macOS it would be an error to use it instead of SDK)
+                -L*)
+                    case `realpath "${f#-L}"` in
+                        # let's start with Fedora's paths for now
+                        
/lib|/lib/|/lib64|/lib64/|/usr/lib|/usr/lib/|/usr/lib64|/usr/lib64/)
+                        # ignore it: on UNIXoids it is searched by default 
anyway
+                        # but if it's given explicitly then it may override 
other paths
+                        # (on macOS it would be an error to use it instead of 
SDK)
+                            ;;
+                        *)
+                            filteredlibs="$filteredlibs $f"
+                            ;;
+                    esac
                     ;;
                 *)
                     filteredlibs="$filteredlibs $f"

Reply via email to