summaryrefslogtreecommitdiff
path: root/games/scid/patches/patch-aa
blob: a86d54ad0a3ea00221327a354ba0e2505c7cf4d7 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$NetBSD: patch-aa,v 1.2 2006/04/21 11:52:19 joerg Exp $

--- configure.orig	2004-03-02 19:09:53.000000000 +0000
+++ configure
@@ -26,6 +26,9 @@ tclsh=tclsh;
 ##  done; \
 ## done
 
+# Read tclConfig.sh \
+. ${TCLCONFIG_SH}; export TCL_LIBS
+
 # Now execute this script using the best tclsh version found:
 # The backslash at the end of this line is needed: \
 exec $tclsh "$0" ${1+"$@"}
@@ -61,10 +64,10 @@ set var(TCL_VERSION) $tcl_version
 set var(WARNINGS) -Wall
 set var(ZLIB) -lz
 
-set defaultVar(TCL_INCLUDE) {-I/usr/include}
-set defaultVar(TCL_LIBRARY) {-L/usr/lib -ltcl$(TCL_VERSION) -ldl}
+set defaultVar(TCL_INCLUDE) {-I@TCLPREFIX@/include}
+set defaultVar(TCL_LIBRARY) {-L@TCLPREFIX@/lib -Wl,-R@TCLPREFIX@/lib -ltcl$(TCL_VERSION) @LIBDL@}
 set defaultVar(TK_LIBRARY) \
-    {$(TCL_LIBRARY) -ltk$(TCL_VERSION) -L/usr/X11R6/lib -lX11}
+    {-L@TKPREFIX@/lib -Wl,-R@TKPREFIX@/lib $(TCL_LIBRARY) -ltk$(TCL_VERSION) $(X_LDFLAGS) -lX11}
 
 
 # findDir:
@@ -105,14 +108,8 @@ proc findTclTkPaths {} {
 
     # headerPath: List of possible locations for tcl.h and tk.h
     set headerPath {
-        /usr/include
-        /usr/local/tcl/include
-        /usr/local/include
-        /usr/X11/include
-        /usr/X11R6/include
-        /usr/local/X11/include
-        /opt/tcltk/include
-        /usr/X11R/include
+        @TCLPREFIX@/include
+        @TKPREFIX@/include
     }
     lappend headerPath "/usr/local/include/tcl${tclv}"
     lappend headerPath "/usr/local/include/tk${tclv}"
@@ -125,11 +122,8 @@ proc findTclTkPaths {} {
 
     # libraryPath: List of possible locations of Tcl/Tk library.
     set libraryPath {
-        /usr/lib
-        /usr/local/tcl/lib
-        /usr/local/lib
-        /usr/X11R6/lib
-        /opt/tcltk/lib
+        @TCLPREFIX@/lib
+        @TKPREFIX@/lib
     }
     lappend libraryPath "/usr/lib/tcl${tclv}"
     lappend libraryPath "/usr/lib/tk${tclv}"
@@ -242,7 +236,8 @@ proc findTclTkPaths {} {
             }
         }
         if {! [info exists var(TCL_LIBRARY)]} {
-            set var(TCL_LIBRARY) "-L$opt(tcl_lib) -l$opt(tcl_lib_file) -ldl"
+	    global env
+            set var(TCL_LIBRARY) "-L$env(LDFLAGS) -l$opt(tcl_lib_file) @LIBDL@ $env(TCL_LIBS)"
         }
         if {! [info exists var(TK_LIBRARY)]} {
             set var(TK_LIBRARY) {$(TCL_LIBRARY)}