summaryrefslogtreecommitdiff
path: root/lang/tcl/patches/patch-af
blob: 3f7179dbb8a6df66565fc6408163de215602ef44 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
$NetBSD: patch-af,v 1.25 2011/11/14 01:31:18 marino Exp $

--- unix/tcl.m4.orig	2008-02-06 15:38:26.000000000 +0000
+++ unix/tcl.m4
@@ -1033,6 +1033,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
     # Step 3: set configuration options based on system name and version.
 
     do64bit_ok=no
+    TCL_LIB_SPEC_RPATH=""
     LDFLAGS_ORIG="$LDFLAGS"
     TCL_EXPORT_FILE_SUFFIX=""
     UNSHARED_LIB_SUFFIX=""
@@ -1263,6 +1264,21 @@ dnl AC_CHECK_TOOL(AR, ar)
 		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
 	    fi
 	    ;;
+	Interix-3.*)
+	    SHLIB_CFLAGS=""
+	    SHLIB_LD='${TCL_CC} -shared'
+	    SHLIB_LD_LIBS=""
+	    SHLIB_SUFFIX=".so"
+	    DL_OBJS="tclLoadDl.o"
+	    DL_LIBS="-ldl"
+	    LDFLAGS="$LDFLAGS -Wl,-E"
+	    CC_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+	    LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    TCL_LIB_SPEC_RPATH="-Wl,-R${exec_prefix}/lib"
+	    TCL_LIB_VERSIONS_OK=nodots
+	    ;;
 	IRIX-4.*)
 	    SHLIB_CFLAGS="-G 0"
 	    SHLIB_SUFFIX=".a"
@@ -1284,6 +1300,9 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    DL_LIBS=""
 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
 	IRIX-6.*)
 	    SHLIB_CFLAGS=""
@@ -1309,6 +1328,9 @@ dnl AC_CHECK_TOOL(AR, ar)
 		esac
 		LDFLAGS="$LDFLAGS -n32"
 	    fi
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
 	IRIX64-6.*)
 	    SHLIB_CFLAGS=""
@@ -1332,6 +1354,9 @@ dnl AC_CHECK_TOOL(AR, ar)
 	            LDFLAGS="$LDFLAGS -64"
 	        fi
 	    fi
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
 	Linux*)
 	    SHLIB_CFLAGS="-fPIC"
@@ -1388,6 +1413,9 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    # XIM peeking works under XFree86.
 	    AC_DEFINE(PEEK_XCLOSEIM)
 
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
 	GNU*)
 	    SHLIB_CFLAGS="-fPIC"
@@ -1447,23 +1475,26 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    LD_SEARCH_FLAGS=""
 	    ;;
 	NetBSD-*|FreeBSD-[[1-2]].*)
+	    if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
+		CFLAGS_OPTIMIZE=-O0
+	    fi
 	    # Not available on all versions:  check for include file.
 	    AC_CHECK_HEADER(dlfcn.h, [
 		# NetBSD/SPARC needs -fPIC, -fpic will not do.
 		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
 		SHLIB_LD_LIBS='${LIBS}'
 		SHLIB_SUFFIX=".so"
 		DL_OBJS="tclLoadDl.o"
 		DL_LIBS=""
 		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 		AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
 		    AC_EGREP_CPP(yes, [
 #ifdef __ELF__
 	yes
 #endif
 		    ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
+		SHLIB_LD='${TCL_CC} -shared -Wl,-x'
+		LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
 		if test $tcl_cv_ld_elf = yes; then
 		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
 		else
@@ -1486,7 +1517,7 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
 	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
-	OpenBSD-*)
+	OpenBSD-*|MirBSD-*)
 	    case `arch -s` in
 	    m88k|vax)
 		SHLIB_CFLAGS=""
@@ -1534,7 +1565,7 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
 	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
-	FreeBSD-*)
+	FreeBSD-*|DragonFly-*)
 	    # FreeBSD 3.* and greater have ELF.
 	    SHLIB_CFLAGS="-fPIC"
 	    SHLIB_LD="ld -Bshareable -x"
@@ -1558,6 +1589,12 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
 	    	TCL_LIB_VERSIONS_OK=nodots
 		;;
+	    DragonFly-*)
+		# "nodots" required to confirm to pkgsrc lang/tcl PLIST   
+		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+		TCL_LIB_VERSIONS_OK=nodots	    	
+		;;
 	    esac
 	    ;;
 	Darwin-*)
@@ -1933,6 +1970,9 @@ dnl AC_CHECK_TOOL(AR, ar)
 		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 	    fi
+	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+	    TCL_LIB_VERSIONS_OK=nodots
 	    ;;
 	ULTRIX-4.*)
 	    SHLIB_CFLAGS="-G 0"
@@ -2091,7 +2131,7 @@ dnl # preprocessing tests use only CPPFL
 		    ;;
 		IRIX*)
 		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
+		NetBSD-*|FreeBSD-*|OpenBSD-*|MirBSD-*)
 		    ;;
 		Darwin-*)
 		    ;;
@@ -2117,8 +2157,8 @@ dnl # preprocessing tests use only CPPFL
 
     if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
         LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-        MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
-        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+        MAKE_LIB='${SHLIB_LD} -o ${@:C/\.so.*/.la/} ${OBJS:.o=.lo} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} -version-info 1:0'
+        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE:C/\.so.*/.la/) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
     else
         LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}