From 078f3ec042251af6bb9d9c194f29782c9e7b08a5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Aug 2009 11:00:54 +0200 Subject: Fix linking to uninstalled libraries after LIBS_PRIVATE. On ELF systems, the static linker isn't allowed to find a linked library's dependencies using the -L flag. That means if you're linking lib or app X against a library A, and library A links against library B, then -L$QTDIR/lib won't apply to B. Before LIBS_PRIVATE, we had -lB, so it did apply. Now we need to find another solution. The solution is one of: a) install the libraries before linking anything against them b) set LD_LIBRARY_PATH c) set -rpath or -rpath-link Reviewed-by: TrustMe --- configure | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/configure b/configure index 91a361a..8ad5823 100755 --- a/configure +++ b/configure @@ -47,6 +47,11 @@ QMAKE_VARS_FILE=.qmake.vars # utility functions #------------------------------------------------------------------------------- +shellEscape() +{ + echo "$@" | sed 's/ /\ /g' +} + # Adds a new qmake variable to the cache # Usage: QMakeVar mode varname contents # where mode is one of: set, add, del @@ -89,6 +94,29 @@ getQMakeConf() { print }' "$tmpSPEC/qmake.conf" } +# relies on $TEST_COMPILER being set correctly +compilerSupportsFlag() +{ + cat >conftest.cpp <> "$CACHEFILE.tmp" +elif linkerSupportsFlag -rpath "$outpath/lib"; then + echo "QMAKE_LFLAGS += -Wl,-rpath,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" +fi + if [ -n "$QT_CFLAGS_PSQL" ]; then echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp" fi -- cgit v0.12