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

New commits:
commit db867ee5d6b6a239a7d822233ad022d18962ccd4
Author:     Michael Stahl <michael.st...@collabora.com>
AuthorDate: Mon Aug 18 13:08:40 2025 +0200
Commit:     Michael Stahl <michael.st...@collabora.com>
CommitDate: Tue Aug 19 11:34:56 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>
    (cherry picked from commit 457872f8cac849b319ad4f88a94c8390aa9e3df7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189879
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com>

diff --git a/configure.ac b/configure.ac
index af83b5c638b2..ed70d0c79d44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,11 +60,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