conf (743:e0f0cd7d244a) conf (1255:944efece387a)
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) NGINX, Inc.
4
5
6# To support dynamically loaded modules libnxt library must be a shared
7# object itself because an application linked with static libnxt library
8# may lack code required by the modules. Dynamic linkers allow to specify

--- 7 unchanged lines hidden (view full) ---

16# "ar -c" disables the "creating archive" warning.
17
18
19case "$NXT_SYSTEM" in
20
21 Linux)
22 nxt_have=NXT_LINUX . auto/have
23
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) NGINX, Inc.
4
5
6# To support dynamically loaded modules libnxt library must be a shared
7# object itself because an application linked with static libnxt library
8# may lack code required by the modules. Dynamic linkers allow to specify

--- 7 unchanged lines hidden (view full) ---

16# "ar -c" disables the "creating archive" warning.
17
18
19case "$NXT_SYSTEM" in
20
21 Linux)
22 nxt_have=NXT_LINUX . auto/have
23
24 NXT_STATIC_LINK="ar -r -c"
24 NXT_STATIC_LINK="\$(AR) -r -c"
25 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
26 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
27 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
28 NXT_MODULE_LINK="\$(CC) -shared"
29
30 # "-Wl,-E" exports symbols of executable file.
31 NXT_EXEC_LINK="\$(CC) -Wl,-E"
32 NXT_SHARED_LOCAL_EXEC_LINK=

--- 6 unchanged lines hidden (view full) ---

39
40 NXT_LIBM="-lm"
41 NXT_LIBS="$NXT_LIBRT $NXT_LIBDL $NXT_PTHREAD"
42 ;;
43
44 FreeBSD)
45 nxt_have=NXT_FREEBSD . auto/have
46
25 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
26 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
27 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
28 NXT_MODULE_LINK="\$(CC) -shared"
29
30 # "-Wl,-E" exports symbols of executable file.
31 NXT_EXEC_LINK="\$(CC) -Wl,-E"
32 NXT_SHARED_LOCAL_EXEC_LINK=

--- 6 unchanged lines hidden (view full) ---

39
40 NXT_LIBM="-lm"
41 NXT_LIBS="$NXT_LIBRT $NXT_LIBDL $NXT_PTHREAD"
42 ;;
43
44 FreeBSD)
45 nxt_have=NXT_FREEBSD . auto/have
46
47 NXT_STATIC_LINK="ar -r -c"
47 NXT_STATIC_LINK="\$(AR) -r -c"
48 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
49 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
50 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
51 NXT_MODULE_LINK="\$(CC) -shared"
52
53 # "-Wl,-E" exports symbols of executable file.
54 NXT_EXEC_LINK="\$(CC) -Wl,-E"
55 # "-Wl,-z,origin" enables $ORIGIN processing.

--- 10 unchanged lines hidden (view full) ---

66 ;;
67
68 SunOS)
69 nxt_have=NXT_SOLARIS . auto/have
70
71 case "$NXT_CC_NAME" in
72
73 SunC):
48 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
49 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
50 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
51 NXT_MODULE_LINK="\$(CC) -shared"
52
53 # "-Wl,-E" exports symbols of executable file.
54 NXT_EXEC_LINK="\$(CC) -Wl,-E"
55 # "-Wl,-z,origin" enables $ORIGIN processing.

--- 10 unchanged lines hidden (view full) ---

66 ;;
67
68 SunOS)
69 nxt_have=NXT_SOLARIS . auto/have
70
71 case "$NXT_CC_NAME" in
72
73 SunC):
74 NXT_STATIC_LINK="ar -r -c"
74 NXT_STATIC_LINK="\$(AR) -r -c"
75 NXT_SHARED_LINK="\$(CC) -G -h libnxt.so"
76 NXT_SHARED_LOCAL_LINK="\$(CC) -G -h \\\$\$ORIGIN/libnxt.so"
77 NXT_MODULE_LINK="\$(CC) -G"
78 ;;
79
80 *)
75 NXT_SHARED_LINK="\$(CC) -G -h libnxt.so"
76 NXT_SHARED_LOCAL_LINK="\$(CC) -G -h \\\$\$ORIGIN/libnxt.so"
77 NXT_MODULE_LINK="\$(CC) -G"
78 ;;
79
80 *)
81 NXT_STATIC_LINK="ar -r -c"
81 NXT_STATIC_LINK="\$(AR) -r -c"
82 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
83 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
84 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
85 NXT_MODULE_LINK="\$(CC) -shared"
86 ;;
87 esac
88
89 NXT_LIB_STATIC="libnxt.a"

--- 11 unchanged lines hidden (view full) ---

101 ;;
102
103 Darwin)
104 nxt_have=NXT_MACOSX . auto/have
105
106 # HFS+ volumes are caseless by default.
107 nxt_have=NXT_HAVE_CASELESS_FILESYSTEM . auto/have
108
82 NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so"
83 NXT_SHARED_LOCAL_LINK="\$(CC) -shared \
84 -Wl,-soname,\\\$\$ORIGIN/libnxt.so"
85 NXT_MODULE_LINK="\$(CC) -shared"
86 ;;
87 esac
88
89 NXT_LIB_STATIC="libnxt.a"

--- 11 unchanged lines hidden (view full) ---

101 ;;
102
103 Darwin)
104 nxt_have=NXT_MACOSX . auto/have
105
106 # HFS+ volumes are caseless by default.
107 nxt_have=NXT_HAVE_CASELESS_FILESYSTEM . auto/have
108
109 NXT_STATIC_LINK="ar -r -c"
109 NXT_STATIC_LINK="\$(AR) -r -c"
110 NXT_SHARED_LINK="\$(CC) -dynamiclib"
111 NXT_SHARED_LOCAL_LINK="\$(CC) -dynamiclib \
112 -install_name @executable_path/libnxt.dylib"
113 NXT_MODULE_LINK="\$(CC) -dynamiclib -undefined dynamic_lookup"
114
115 NXT_EXEC_LINK="\$(CC)"
116 NXT_SHARED_LOCAL_EXEC_LINK=
117

--- 7 unchanged lines hidden (view full) ---

125 NXT_LIBM=
126 NXT_LIBS=
127
128 ;;
129
130 NetBSD)
131 nxt_have=NXT_NETBSD . auto/have
132
110 NXT_SHARED_LINK="\$(CC) -dynamiclib"
111 NXT_SHARED_LOCAL_LINK="\$(CC) -dynamiclib \
112 -install_name @executable_path/libnxt.dylib"
113 NXT_MODULE_LINK="\$(CC) -dynamiclib -undefined dynamic_lookup"
114
115 NXT_EXEC_LINK="\$(CC)"
116 NXT_SHARED_LOCAL_EXEC_LINK=
117

--- 7 unchanged lines hidden (view full) ---

125 NXT_LIBM=
126 NXT_LIBS=
127
128 ;;
129
130 NetBSD)
131 nxt_have=NXT_NETBSD . auto/have
132
133 NXT_STATIC_LINK="ar -r -c"
133 NXT_STATIC_LINK="\$(AR) -r -c"
134 NXT_SHARED_LINK="\$(CC) -shared"
135 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
136 NXT_MODULE_LINK="\$(CC) -shared"
137
138 # "-Wl,-E" exports symbols of executable file.
139 NXT_EXEC_LINK="\$(CC) -Wl,-E"
140 NXT_SHARED_LOCAL_EXEC_LINK=
141

--- 5 unchanged lines hidden (view full) ---

147
148 NXT_LIBM="-lm"
149 NXT_LIBS="$NXT_LIBRT $NXT_PTHREAD"
150 ;;
151
152 OpenBSD)
153 nxt_have=NXT_OPENBSD . auto/have
154
134 NXT_SHARED_LINK="\$(CC) -shared"
135 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
136 NXT_MODULE_LINK="\$(CC) -shared"
137
138 # "-Wl,-E" exports symbols of executable file.
139 NXT_EXEC_LINK="\$(CC) -Wl,-E"
140 NXT_SHARED_LOCAL_EXEC_LINK=
141

--- 5 unchanged lines hidden (view full) ---

147
148 NXT_LIBM="-lm"
149 NXT_LIBS="$NXT_LIBRT $NXT_PTHREAD"
150 ;;
151
152 OpenBSD)
153 nxt_have=NXT_OPENBSD . auto/have
154
155 NXT_STATIC_LINK="ar -r -c"
155 NXT_STATIC_LINK="\$(AR) -r -c"
156 NXT_SHARED_LINK="\$(CC) -shared"
157 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
158 NXT_MODULE_LINK="\$(CC) -shared"
159
160 # "-Wl,-E" exports symbols of executable file.
161 NXT_EXEC_LINK="\$(CC) -Wl,-E"
162 NXT_SHARED_LOCAL_EXEC_LINK=
163

--- 5 unchanged lines hidden (view full) ---

169
170 NXT_LIBM="-lm"
171 NXT_LIBS="$NXT_PTHREAD"
172 ;;
173
174 DragonFly)
175 nxt_have=NXT_DRAGONFLY . auto/have
176
156 NXT_SHARED_LINK="\$(CC) -shared"
157 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
158 NXT_MODULE_LINK="\$(CC) -shared"
159
160 # "-Wl,-E" exports symbols of executable file.
161 NXT_EXEC_LINK="\$(CC) -Wl,-E"
162 NXT_SHARED_LOCAL_EXEC_LINK=
163

--- 5 unchanged lines hidden (view full) ---

169
170 NXT_LIBM="-lm"
171 NXT_LIBS="$NXT_PTHREAD"
172 ;;
173
174 DragonFly)
175 nxt_have=NXT_DRAGONFLY . auto/have
176
177 NXT_STATIC_LINK="ar -r -c"
177 NXT_STATIC_LINK="\$(AR) -r -c"
178 NXT_SHARED_LINK="\$(CC) -shared"
179 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
180 NXT_MODULE_LINK="\$(CC) -shared"
181
182 # "-Wl,-E" exports symbols of executable file.
183 NXT_EXEC_LINK="\$(CC) -Wl,-E"
184 NXT_SHARED_LOCAL_EXEC_LINK=
185

--- 5 unchanged lines hidden (view full) ---

191
192 NXT_LIBM="-lm"
193 NXT_LIBS="$NXT_LIBRT $NXT_PTHREAD"
194 ;;
195
196 AIX)
197 nxt_have=NXT_AIX . auto/have
198
178 NXT_SHARED_LINK="\$(CC) -shared"
179 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
180 NXT_MODULE_LINK="\$(CC) -shared"
181
182 # "-Wl,-E" exports symbols of executable file.
183 NXT_EXEC_LINK="\$(CC) -Wl,-E"
184 NXT_SHARED_LOCAL_EXEC_LINK=
185

--- 5 unchanged lines hidden (view full) ---

191
192 NXT_LIBM="-lm"
193 NXT_LIBS="$NXT_LIBRT $NXT_PTHREAD"
194 ;;
195
196 AIX)
197 nxt_have=NXT_AIX . auto/have
198
199 NXT_STATIC_LINK="ar -r -c"
199 NXT_STATIC_LINK="\$(AR) -r -c"
200 NXT_SHARED_LINK="\$(CC) -G"
201 NXT_SHARED_LOCAL_LINK="\$(CC) -G"
202 NXT_MODULE_LINK="\$(CC) -G"
203
204 NXT_EXEC_LINK="\$(CC)"
205 NXT_SHARED_LOCAL_EXEC_LINK=
206
207 NXT_LIB_STATIC="libnxt.a"

--- 7 unchanged lines hidden (view full) ---

215 ;;
216
217 HP-UX)
218 nxt_have=NXT_HPUX . auto/have
219
220 NXT_EXEC_LINK="\$(CC)"
221 NXT_SHARED_LOCAL_EXEC_LINK=
222
200 NXT_SHARED_LINK="\$(CC) -G"
201 NXT_SHARED_LOCAL_LINK="\$(CC) -G"
202 NXT_MODULE_LINK="\$(CC) -G"
203
204 NXT_EXEC_LINK="\$(CC)"
205 NXT_SHARED_LOCAL_EXEC_LINK=
206
207 NXT_LIB_STATIC="libnxt.a"

--- 7 unchanged lines hidden (view full) ---

215 ;;
216
217 HP-UX)
218 nxt_have=NXT_HPUX . auto/have
219
220 NXT_EXEC_LINK="\$(CC)"
221 NXT_SHARED_LOCAL_EXEC_LINK=
222
223 NXT_STATIC_LINK="ar -r -c"
223 NXT_STATIC_LINK="\$(AR) -r -c"
224 NXT_SHARED_LINK="\$(CC) -shared"
225 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
226 NXT_MODULE_LINK="\$(CC) -shared"
227
228 NXT_LIB_STATIC="libnxt.a"
229 NXT_LIB_SHARED="libnxt.so"
230 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
231
232 NXT_LIB_UNIT_STATIC="libunit.a"
233
234 NXT_LIBM="-lm"
235 NXT_LIBS="$NXT_PTHREAD $NXT_LIBHG"
236 ;;
237
238 QNX)
239 nxt_have=NXT_QNX . auto/have
240
224 NXT_SHARED_LINK="\$(CC) -shared"
225 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
226 NXT_MODULE_LINK="\$(CC) -shared"
227
228 NXT_LIB_STATIC="libnxt.a"
229 NXT_LIB_SHARED="libnxt.so"
230 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
231
232 NXT_LIB_UNIT_STATIC="libunit.a"
233
234 NXT_LIBM="-lm"
235 NXT_LIBS="$NXT_PTHREAD $NXT_LIBHG"
236 ;;
237
238 QNX)
239 nxt_have=NXT_QNX . auto/have
240
241 NXT_STATIC_LINK="ar -r -c"
241 NXT_STATIC_LINK="\$(AR) -r -c"
242 NXT_SHARED_LINK="\$(CC) -shared"
243 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
244 NXT_MODULE_LINK="\$(CC) -shared"
245
246 NXT_EXEC_LINK="\$(CC)"
247 NXT_SHARED_LOCAL_EXEC_LINK=
248
249 NXT_LIB_STATIC="libnxt.a"
250 NXT_LIB_SHARED="libnxt.so"
251 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
252
253 NXT_LIB_UNIT_STATIC="libunit.a"
254
255 NXT_LIBM="-lm"
256 NXT_LIBS="$NXT_PTHREAD"
257 ;;
258
259 *)
242 NXT_SHARED_LINK="\$(CC) -shared"
243 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
244 NXT_MODULE_LINK="\$(CC) -shared"
245
246 NXT_EXEC_LINK="\$(CC)"
247 NXT_SHARED_LOCAL_EXEC_LINK=
248
249 NXT_LIB_STATIC="libnxt.a"
250 NXT_LIB_SHARED="libnxt.so"
251 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
252
253 NXT_LIB_UNIT_STATIC="libunit.a"
254
255 NXT_LIBM="-lm"
256 NXT_LIBS="$NXT_PTHREAD"
257 ;;
258
259 *)
260 NXT_STATIC_LINK="ar -r -c"
260 NXT_STATIC_LINK="\$(AR) -r -c"
261 NXT_SHARED_LINK="\$(CC) -shared"
262 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
263 NXT_MODULE_LINK="\$(CC) -shared"
264
265 # "-Wl,-E" exports symbols of executable file.
266 NXT_EXEC_LINK="\$(CC) -Wl,-E"
267 NXT_SHARED_LOCAL_EXEC_LINK=
268
269 NXT_LIB_STATIC="libnxt.a"
270 NXT_LIB_SHARED="libnxt.so"
271 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
272
273 NXT_LIB_UNIT_STATIC="libunit.a"
274
275 NXT_LIBM="-lm"
276 NXT_LIBS="$NXT_LIBRT $NXT_LIBDL $NXT_PTHREAD"
277 ;;
278esac
261 NXT_SHARED_LINK="\$(CC) -shared"
262 NXT_SHARED_LOCAL_LINK="\$(CC) -shared"
263 NXT_MODULE_LINK="\$(CC) -shared"
264
265 # "-Wl,-E" exports symbols of executable file.
266 NXT_EXEC_LINK="\$(CC) -Wl,-E"
267 NXT_SHARED_LOCAL_EXEC_LINK=
268
269 NXT_LIB_STATIC="libnxt.a"
270 NXT_LIB_SHARED="libnxt.so"
271 NXT_LIB_SHARED_LOCAL="$NXT_BUILD_DIR/libnxt.so"
272
273 NXT_LIB_UNIT_STATIC="libunit.a"
274
275 NXT_LIBM="-lm"
276 NXT_LIBS="$NXT_LIBRT $NXT_LIBDL $NXT_PTHREAD"
277 ;;
278esac