summaryrefslogtreecommitdiff
path: root/x11/tk/patches/patch-ad
blob: b56ac2b5b64263e1073ad12d55a59a30c384b50f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-ad,v 1.9 2006/04/27 08:18:09 adam Exp $

--- unix/configure.in.orig	2006-04-19 14:29:37.000000000 +0200
+++ unix/configure.in
@@ -296,6 +296,10 @@ if test "x${x_libraries}" != "x"; then
 fi
 if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
     LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
+elif test "${TCL_LD_SEARCH_FLAGS}" = '-R${LIB_RUNTIME_DIR}'; then
+    LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -R/g'`
+elif test "${TCL_LD_SEARCH_FLAGS}" = '-Wl,-R${LIB_RUNTIME_DIR}'; then
+    LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -Wl,-R/g'`
 fi
 
 # The statement below is very tricky!  It actually *evaluates* the
@@ -470,11 +474,18 @@ else
     if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
         if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
             eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}"
+	    eval TK_BUILD_LIB_SPEC="libtk${VERSION}\${TK_DBGX}.la"
         else
             eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}"
+	    eval TK_BUILD_LIB_SPEC="libtk`echo ${VERSION} | tr -d .`\${TK_DBGX}.la"
         fi
-        TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
         TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
+	if test "${RPATH_FLAG}" != ""; then
+	    TK_LIB_SPEC_RPATH="${RPATH_FLAG}${exec_prefix}/lib"
+	else
+	    TK_LIB_SPEC_RPATH=""
+	fi
+	TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_SPEC_RPATH} ${TK_LIB_FLAG}"
     else
         TK_BUILD_EXP_FILE="lib.exp"
         eval "TK_EXP_FILE=libtk${TCL_EXPORT_FILE_SUFFIX}"