1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | # lib-prefix.m4 serial 3 (gettext-0.13) |
---|
14 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
---|
15 | dnl This file is free software, distributed under the terms of the GNU |
---|
16 | dnl General Public License. As a special exception to the GNU General |
---|
17 | dnl Public License, this file may be distributed as part of a program |
---|
18 | dnl that contains a configuration script generated by Autoconf, under |
---|
19 | dnl the same distribution terms as the rest of that program. |
---|
20 | |
---|
21 | dnl From Bruno Haible. |
---|
22 | |
---|
23 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
---|
24 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
---|
25 | dnl require excessive bracketing. |
---|
26 | ifdef([AC_HELP_STRING], |
---|
27 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
---|
28 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
---|
29 | |
---|
30 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
---|
31 | dnl to access previously installed libraries. The basic assumption is that |
---|
32 | dnl a user will want packages to use other packages he previously installed |
---|
33 | dnl with the same --prefix option. |
---|
34 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
---|
35 | dnl libraries, but is otherwise very convenient. |
---|
36 | AC_DEFUN([AC_LIB_PREFIX], |
---|
37 | [ |
---|
38 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
---|
39 | AC_REQUIRE([AC_PROG_CC]) |
---|
40 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
41 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
---|
42 | dnl By default, look in $includedir and $libdir. |
---|
43 | use_additional=yes |
---|
44 | AC_LIB_WITH_FINAL_PREFIX([ |
---|
45 | eval additional_includedir=\"$includedir\" |
---|
46 | eval additional_libdir=\"$libdir\" |
---|
47 | ]) |
---|
48 | AC_LIB_ARG_WITH([lib-prefix], |
---|
49 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
---|
50 | --without-lib-prefix don't search for libraries in includedir and libdir], |
---|
51 | [ |
---|
52 | if test "X$withval" = "Xno"; then |
---|
53 | use_additional=no |
---|
54 | else |
---|
55 | if test "X$withval" = "X"; then |
---|
56 | AC_LIB_WITH_FINAL_PREFIX([ |
---|
57 | eval additional_includedir=\"$includedir\" |
---|
58 | eval additional_libdir=\"$libdir\" |
---|
59 | ]) |
---|
60 | else |
---|
61 | additional_includedir="$withval/include" |
---|
62 | additional_libdir="$withval/lib" |
---|
63 | fi |
---|
64 | fi |
---|
65 | ]) |
---|
66 | if test $use_additional = yes; then |
---|
67 | dnl Potentially add $additional_includedir to $CPPFLAGS. |
---|
68 | dnl But don't add it |
---|
69 | dnl 1. if it's the standard /usr/include, |
---|
70 | dnl 2. if it's already present in $CPPFLAGS, |
---|
71 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
---|
72 | dnl 4. if it doesn't exist as a directory. |
---|
73 | if test "X$additional_includedir" != "X/usr/include"; then |
---|
74 | haveit= |
---|
75 | for x in $CPPFLAGS; do |
---|
76 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
77 | if test "X$x" = "X-I$additional_includedir"; then |
---|
78 | haveit=yes |
---|
79 | break |
---|
80 | fi |
---|
81 | done |
---|
82 | if test -z "$haveit"; then |
---|
83 | if test "X$additional_includedir" = "X/usr/local/include"; then |
---|
84 | if test -n "$GCC"; then |
---|
85 | case $host_os in |
---|
86 | linux*) haveit=yes;; |
---|
87 | esac |
---|
88 | fi |
---|
89 | fi |
---|
90 | if test -z "$haveit"; then |
---|
91 | if test -d "$additional_includedir"; then |
---|
92 | dnl Really add $additional_includedir to $CPPFLAGS. |
---|
93 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
---|
94 | fi |
---|
95 | fi |
---|
96 | fi |
---|
97 | fi |
---|
98 | dnl Potentially add $additional_libdir to $LDFLAGS. |
---|
99 | dnl But don't add it |
---|
100 | dnl 1. if it's the standard /usr/lib, |
---|
101 | dnl 2. if it's already present in $LDFLAGS, |
---|
102 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
---|
103 | dnl 4. if it doesn't exist as a directory. |
---|
104 | if test "X$additional_libdir" != "X/usr/lib"; then |
---|
105 | haveit= |
---|
106 | for x in $LDFLAGS; do |
---|
107 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
108 | if test "X$x" = "X-L$additional_libdir"; then |
---|
109 | haveit=yes |
---|
110 | break |
---|
111 | fi |
---|
112 | done |
---|
113 | if test -z "$haveit"; then |
---|
114 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
---|
115 | if test -n "$GCC"; then |
---|
116 | case $host_os in |
---|
117 | linux*) haveit=yes;; |
---|
118 | esac |
---|
119 | fi |
---|
120 | fi |
---|
121 | if test -z "$haveit"; then |
---|
122 | if test -d "$additional_libdir"; then |
---|
123 | dnl Really add $additional_libdir to $LDFLAGS. |
---|
124 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
---|
125 | fi |
---|
126 | fi |
---|
127 | fi |
---|
128 | fi |
---|
129 | fi |
---|
130 | ]) |
---|
131 | |
---|
132 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
---|
133 | dnl acl_final_exec_prefix, containing the values to which $prefix and |
---|
134 | dnl $exec_prefix will expand at the end of the configure script. |
---|
135 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
---|
136 | [ |
---|
137 | dnl Unfortunately, prefix and exec_prefix get only finally determined |
---|
138 | dnl at the end of configure. |
---|
139 | if test "X$prefix" = "XNONE"; then |
---|
140 | acl_final_prefix="$ac_default_prefix" |
---|
141 | else |
---|
142 | acl_final_prefix="$prefix" |
---|
143 | fi |
---|
144 | if test "X$exec_prefix" = "XNONE"; then |
---|
145 | acl_final_exec_prefix='${prefix}' |
---|
146 | else |
---|
147 | acl_final_exec_prefix="$exec_prefix" |
---|
148 | fi |
---|
149 | acl_save_prefix="$prefix" |
---|
150 | prefix="$acl_final_prefix" |
---|
151 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
---|
152 | prefix="$acl_save_prefix" |
---|
153 | ]) |
---|
154 | |
---|
155 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
---|
156 | dnl variables prefix and exec_prefix bound to the values they will have |
---|
157 | dnl at the end of the configure script. |
---|
158 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
---|
159 | [ |
---|
160 | acl_save_prefix="$prefix" |
---|
161 | prefix="$acl_final_prefix" |
---|
162 | acl_save_exec_prefix="$exec_prefix" |
---|
163 | exec_prefix="$acl_final_exec_prefix" |
---|
164 | $1 |
---|
165 | exec_prefix="$acl_save_exec_prefix" |
---|
166 | prefix="$acl_save_prefix" |
---|
167 | ]) |
---|
168 | |
---|
169 | # lib-link.m4 serial 4 (gettext-0.12) |
---|
170 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
---|
171 | dnl This file is free software, distributed under the terms of the GNU |
---|
172 | dnl General Public License. As a special exception to the GNU General |
---|
173 | dnl Public License, this file may be distributed as part of a program |
---|
174 | dnl that contains a configuration script generated by Autoconf, under |
---|
175 | dnl the same distribution terms as the rest of that program. |
---|
176 | |
---|
177 | dnl From Bruno Haible. |
---|
178 | |
---|
179 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
---|
180 | dnl the libraries corresponding to explicit and implicit dependencies. |
---|
181 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
---|
182 | dnl augments the CPPFLAGS variable. |
---|
183 | AC_DEFUN([AC_LIB_LINKFLAGS], |
---|
184 | [ |
---|
185 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
---|
186 | AC_REQUIRE([AC_LIB_RPATH]) |
---|
187 | define([Name],[translit([$1],[./-], [___])]) |
---|
188 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
---|
189 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
---|
190 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
---|
191 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
---|
192 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
---|
193 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
---|
194 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
---|
195 | ]) |
---|
196 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
---|
197 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
---|
198 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
---|
199 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
---|
200 | AC_SUBST([LIB]NAME) |
---|
201 | AC_SUBST([LTLIB]NAME) |
---|
202 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
---|
203 | dnl results of this search when this library appears as a dependency. |
---|
204 | HAVE_LIB[]NAME=yes |
---|
205 | undefine([Name]) |
---|
206 | undefine([NAME]) |
---|
207 | ]) |
---|
208 | |
---|
209 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
---|
210 | dnl searches for libname and the libraries corresponding to explicit and |
---|
211 | dnl implicit dependencies, together with the specified include files and |
---|
212 | dnl the ability to compile and link the specified testcode. If found, it |
---|
213 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
---|
214 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
---|
215 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
---|
216 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
---|
217 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
---|
218 | [ |
---|
219 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
---|
220 | AC_REQUIRE([AC_LIB_RPATH]) |
---|
221 | define([Name],[translit([$1],[./-], [___])]) |
---|
222 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
---|
223 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
---|
224 | |
---|
225 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
---|
226 | dnl accordingly. |
---|
227 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
---|
228 | |
---|
229 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
---|
230 | dnl because if the user has installed lib[]Name and not disabled its use |
---|
231 | dnl via --without-lib[]Name-prefix, he wants to use it. |
---|
232 | ac_save_CPPFLAGS="$CPPFLAGS" |
---|
233 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
---|
234 | |
---|
235 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
---|
236 | ac_save_LIBS="$LIBS" |
---|
237 | LIBS="$LIBS $LIB[]NAME" |
---|
238 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
---|
239 | LIBS="$ac_save_LIBS" |
---|
240 | ]) |
---|
241 | if test "$ac_cv_lib[]Name" = yes; then |
---|
242 | HAVE_LIB[]NAME=yes |
---|
243 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
---|
244 | AC_MSG_CHECKING([how to link with lib[]$1]) |
---|
245 | AC_MSG_RESULT([$LIB[]NAME]) |
---|
246 | else |
---|
247 | HAVE_LIB[]NAME=no |
---|
248 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
---|
249 | dnl $INC[]NAME either. |
---|
250 | CPPFLAGS="$ac_save_CPPFLAGS" |
---|
251 | LIB[]NAME= |
---|
252 | LTLIB[]NAME= |
---|
253 | fi |
---|
254 | AC_SUBST([HAVE_LIB]NAME) |
---|
255 | AC_SUBST([LIB]NAME) |
---|
256 | AC_SUBST([LTLIB]NAME) |
---|
257 | undefine([Name]) |
---|
258 | undefine([NAME]) |
---|
259 | ]) |
---|
260 | |
---|
261 | dnl Determine the platform dependent parameters needed to use rpath: |
---|
262 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
---|
263 | dnl hardcode_direct, hardcode_minus_L. |
---|
264 | AC_DEFUN([AC_LIB_RPATH], |
---|
265 | [ |
---|
266 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
---|
267 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
---|
268 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
---|
269 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
---|
270 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
---|
271 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
---|
272 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
---|
273 | . ./conftest.sh |
---|
274 | rm -f ./conftest.sh |
---|
275 | acl_cv_rpath=done |
---|
276 | ]) |
---|
277 | wl="$acl_cv_wl" |
---|
278 | libext="$acl_cv_libext" |
---|
279 | shlibext="$acl_cv_shlibext" |
---|
280 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
---|
281 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
---|
282 | hardcode_direct="$acl_cv_hardcode_direct" |
---|
283 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
---|
284 | dnl Determine whether the user wants rpath handling at all. |
---|
285 | AC_ARG_ENABLE(rpath, |
---|
286 | [ --disable-rpath do not hardcode runtime library paths], |
---|
287 | :, enable_rpath=yes) |
---|
288 | ]) |
---|
289 | |
---|
290 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
---|
291 | dnl the libraries corresponding to explicit and implicit dependencies. |
---|
292 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
---|
293 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
---|
294 | [ |
---|
295 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
---|
296 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
---|
297 | dnl By default, look in $includedir and $libdir. |
---|
298 | use_additional=yes |
---|
299 | AC_LIB_WITH_FINAL_PREFIX([ |
---|
300 | eval additional_includedir=\"$includedir\" |
---|
301 | eval additional_libdir=\"$libdir\" |
---|
302 | ]) |
---|
303 | AC_LIB_ARG_WITH([lib$1-prefix], |
---|
304 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
---|
305 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
---|
306 | [ |
---|
307 | if test "X$withval" = "Xno"; then |
---|
308 | use_additional=no |
---|
309 | else |
---|
310 | if test "X$withval" = "X"; then |
---|
311 | AC_LIB_WITH_FINAL_PREFIX([ |
---|
312 | eval additional_includedir=\"$includedir\" |
---|
313 | eval additional_libdir=\"$libdir\" |
---|
314 | ]) |
---|
315 | else |
---|
316 | additional_includedir="$withval/include" |
---|
317 | additional_libdir="$withval/lib" |
---|
318 | fi |
---|
319 | fi |
---|
320 | ]) |
---|
321 | dnl Search the library and its dependencies in $additional_libdir and |
---|
322 | dnl $LDFLAGS. Using breadth-first-seach. |
---|
323 | LIB[]NAME= |
---|
324 | LTLIB[]NAME= |
---|
325 | INC[]NAME= |
---|
326 | rpathdirs= |
---|
327 | ltrpathdirs= |
---|
328 | names_already_handled= |
---|
329 | names_next_round='$1 $2' |
---|
330 | while test -n "$names_next_round"; do |
---|
331 | names_this_round="$names_next_round" |
---|
332 | names_next_round= |
---|
333 | for name in $names_this_round; do |
---|
334 | already_handled= |
---|
335 | for n in $names_already_handled; do |
---|
336 | if test "$n" = "$name"; then |
---|
337 | already_handled=yes |
---|
338 | break |
---|
339 | fi |
---|
340 | done |
---|
341 | if test -z "$already_handled"; then |
---|
342 | names_already_handled="$names_already_handled $name" |
---|
343 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
---|
344 | dnl or AC_LIB_HAVE_LINKFLAGS call. |
---|
345 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
---|
346 | eval value=\"\$HAVE_LIB$uppername\" |
---|
347 | if test -n "$value"; then |
---|
348 | if test "$value" = yes; then |
---|
349 | eval value=\"\$LIB$uppername\" |
---|
350 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
---|
351 | eval value=\"\$LTLIB$uppername\" |
---|
352 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
---|
353 | else |
---|
354 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
---|
355 | dnl that this library doesn't exist. So just drop it. |
---|
356 | : |
---|
357 | fi |
---|
358 | else |
---|
359 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
---|
360 | dnl and the already constructed $LIBNAME/$LTLIBNAME. |
---|
361 | found_dir= |
---|
362 | found_la= |
---|
363 | found_so= |
---|
364 | found_a= |
---|
365 | if test $use_additional = yes; then |
---|
366 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
---|
367 | found_dir="$additional_libdir" |
---|
368 | found_so="$additional_libdir/lib$name.$shlibext" |
---|
369 | if test -f "$additional_libdir/lib$name.la"; then |
---|
370 | found_la="$additional_libdir/lib$name.la" |
---|
371 | fi |
---|
372 | else |
---|
373 | if test -f "$additional_libdir/lib$name.$libext"; then |
---|
374 | found_dir="$additional_libdir" |
---|
375 | found_a="$additional_libdir/lib$name.$libext" |
---|
376 | if test -f "$additional_libdir/lib$name.la"; then |
---|
377 | found_la="$additional_libdir/lib$name.la" |
---|
378 | fi |
---|
379 | fi |
---|
380 | fi |
---|
381 | fi |
---|
382 | if test "X$found_dir" = "X"; then |
---|
383 | for x in $LDFLAGS $LTLIB[]NAME; do |
---|
384 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
385 | case "$x" in |
---|
386 | -L*) |
---|
387 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
---|
388 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
---|
389 | found_dir="$dir" |
---|
390 | found_so="$dir/lib$name.$shlibext" |
---|
391 | if test -f "$dir/lib$name.la"; then |
---|
392 | found_la="$dir/lib$name.la" |
---|
393 | fi |
---|
394 | else |
---|
395 | if test -f "$dir/lib$name.$libext"; then |
---|
396 | found_dir="$dir" |
---|
397 | found_a="$dir/lib$name.$libext" |
---|
398 | if test -f "$dir/lib$name.la"; then |
---|
399 | found_la="$dir/lib$name.la" |
---|
400 | fi |
---|
401 | fi |
---|
402 | fi |
---|
403 | ;; |
---|
404 | esac |
---|
405 | if test "X$found_dir" != "X"; then |
---|
406 | break |
---|
407 | fi |
---|
408 | done |
---|
409 | fi |
---|
410 | if test "X$found_dir" != "X"; then |
---|
411 | dnl Found the library. |
---|
412 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
---|
413 | if test "X$found_so" != "X"; then |
---|
414 | dnl Linking with a shared library. We attempt to hardcode its |
---|
415 | dnl directory into the executable's runpath, unless it's the |
---|
416 | dnl standard /usr/lib. |
---|
417 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
---|
418 | dnl No hardcoding is needed. |
---|
419 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
---|
420 | else |
---|
421 | dnl Use an explicit option to hardcode DIR into the resulting |
---|
422 | dnl binary. |
---|
423 | dnl Potentially add DIR to ltrpathdirs. |
---|
424 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
---|
425 | haveit= |
---|
426 | for x in $ltrpathdirs; do |
---|
427 | if test "X$x" = "X$found_dir"; then |
---|
428 | haveit=yes |
---|
429 | break |
---|
430 | fi |
---|
431 | done |
---|
432 | if test -z "$haveit"; then |
---|
433 | ltrpathdirs="$ltrpathdirs $found_dir" |
---|
434 | fi |
---|
435 | dnl The hardcoding into $LIBNAME is system dependent. |
---|
436 | if test "$hardcode_direct" = yes; then |
---|
437 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
---|
438 | dnl resulting binary. |
---|
439 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
---|
440 | else |
---|
441 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
---|
442 | dnl Use an explicit option to hardcode DIR into the resulting |
---|
443 | dnl binary. |
---|
444 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
---|
445 | dnl Potentially add DIR to rpathdirs. |
---|
446 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
---|
447 | haveit= |
---|
448 | for x in $rpathdirs; do |
---|
449 | if test "X$x" = "X$found_dir"; then |
---|
450 | haveit=yes |
---|
451 | break |
---|
452 | fi |
---|
453 | done |
---|
454 | if test -z "$haveit"; then |
---|
455 | rpathdirs="$rpathdirs $found_dir" |
---|
456 | fi |
---|
457 | else |
---|
458 | dnl Rely on "-L$found_dir". |
---|
459 | dnl But don't add it if it's already contained in the LDFLAGS |
---|
460 | dnl or the already constructed $LIBNAME |
---|
461 | haveit= |
---|
462 | for x in $LDFLAGS $LIB[]NAME; do |
---|
463 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
464 | if test "X$x" = "X-L$found_dir"; then |
---|
465 | haveit=yes |
---|
466 | break |
---|
467 | fi |
---|
468 | done |
---|
469 | if test -z "$haveit"; then |
---|
470 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
---|
471 | fi |
---|
472 | if test "$hardcode_minus_L" != no; then |
---|
473 | dnl FIXME: Not sure whether we should use |
---|
474 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
---|
475 | dnl here. |
---|
476 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
---|
477 | else |
---|
478 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
---|
479 | dnl here, because this doesn't fit in flags passed to the |
---|
480 | dnl compiler. So give up. No hardcoding. This affects only |
---|
481 | dnl very old systems. |
---|
482 | dnl FIXME: Not sure whether we should use |
---|
483 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
---|
484 | dnl here. |
---|
485 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
---|
486 | fi |
---|
487 | fi |
---|
488 | fi |
---|
489 | fi |
---|
490 | else |
---|
491 | if test "X$found_a" != "X"; then |
---|
492 | dnl Linking with a static library. |
---|
493 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
---|
494 | else |
---|
495 | dnl We shouldn't come here, but anyway it's good to have a |
---|
496 | dnl fallback. |
---|
497 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
---|
498 | fi |
---|
499 | fi |
---|
500 | dnl Assume the include files are nearby. |
---|
501 | additional_includedir= |
---|
502 | case "$found_dir" in |
---|
503 | */lib | */lib/) |
---|
504 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
---|
505 | additional_includedir="$basedir/include" |
---|
506 | ;; |
---|
507 | esac |
---|
508 | if test "X$additional_includedir" != "X"; then |
---|
509 | dnl Potentially add $additional_includedir to $INCNAME. |
---|
510 | dnl But don't add it |
---|
511 | dnl 1. if it's the standard /usr/include, |
---|
512 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
---|
513 | dnl 3. if it's already present in $CPPFLAGS or the already |
---|
514 | dnl constructed $INCNAME, |
---|
515 | dnl 4. if it doesn't exist as a directory. |
---|
516 | if test "X$additional_includedir" != "X/usr/include"; then |
---|
517 | haveit= |
---|
518 | if test "X$additional_includedir" = "X/usr/local/include"; then |
---|
519 | if test -n "$GCC"; then |
---|
520 | case $host_os in |
---|
521 | linux*) haveit=yes;; |
---|
522 | esac |
---|
523 | fi |
---|
524 | fi |
---|
525 | if test -z "$haveit"; then |
---|
526 | for x in $CPPFLAGS $INC[]NAME; do |
---|
527 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
528 | if test "X$x" = "X-I$additional_includedir"; then |
---|
529 | haveit=yes |
---|
530 | break |
---|
531 | fi |
---|
532 | done |
---|
533 | if test -z "$haveit"; then |
---|
534 | if test -d "$additional_includedir"; then |
---|
535 | dnl Really add $additional_includedir to $INCNAME. |
---|
536 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
---|
537 | fi |
---|
538 | fi |
---|
539 | fi |
---|
540 | fi |
---|
541 | fi |
---|
542 | dnl Look for dependencies. |
---|
543 | if test -n "$found_la"; then |
---|
544 | dnl Read the .la file. It defines the variables |
---|
545 | dnl dlname, library_names, old_library, dependency_libs, current, |
---|
546 | dnl age, revision, installed, dlopen, dlpreopen, libdir. |
---|
547 | save_libdir="$libdir" |
---|
548 | case "$found_la" in |
---|
549 | */* | *\\*) . "$found_la" ;; |
---|
550 | *) . "./$found_la" ;; |
---|
551 | esac |
---|
552 | libdir="$save_libdir" |
---|
553 | dnl We use only dependency_libs. |
---|
554 | for dep in $dependency_libs; do |
---|
555 | case "$dep" in |
---|
556 | -L*) |
---|
557 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
---|
558 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
---|
559 | dnl But don't add it |
---|
560 | dnl 1. if it's the standard /usr/lib, |
---|
561 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
---|
562 | dnl 3. if it's already present in $LDFLAGS or the already |
---|
563 | dnl constructed $LIBNAME, |
---|
564 | dnl 4. if it doesn't exist as a directory. |
---|
565 | if test "X$additional_libdir" != "X/usr/lib"; then |
---|
566 | haveit= |
---|
567 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
---|
568 | if test -n "$GCC"; then |
---|
569 | case $host_os in |
---|
570 | linux*) haveit=yes;; |
---|
571 | esac |
---|
572 | fi |
---|
573 | fi |
---|
574 | if test -z "$haveit"; then |
---|
575 | haveit= |
---|
576 | for x in $LDFLAGS $LIB[]NAME; do |
---|
577 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
578 | if test "X$x" = "X-L$additional_libdir"; then |
---|
579 | haveit=yes |
---|
580 | break |
---|
581 | fi |
---|
582 | done |
---|
583 | if test -z "$haveit"; then |
---|
584 | if test -d "$additional_libdir"; then |
---|
585 | dnl Really add $additional_libdir to $LIBNAME. |
---|
586 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
---|
587 | fi |
---|
588 | fi |
---|
589 | haveit= |
---|
590 | for x in $LDFLAGS $LTLIB[]NAME; do |
---|
591 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
592 | if test "X$x" = "X-L$additional_libdir"; then |
---|
593 | haveit=yes |
---|
594 | break |
---|
595 | fi |
---|
596 | done |
---|
597 | if test -z "$haveit"; then |
---|
598 | if test -d "$additional_libdir"; then |
---|
599 | dnl Really add $additional_libdir to $LTLIBNAME. |
---|
600 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
---|
601 | fi |
---|
602 | fi |
---|
603 | fi |
---|
604 | fi |
---|
605 | ;; |
---|
606 | -R*) |
---|
607 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
---|
608 | if test "$enable_rpath" != no; then |
---|
609 | dnl Potentially add DIR to rpathdirs. |
---|
610 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
---|
611 | haveit= |
---|
612 | for x in $rpathdirs; do |
---|
613 | if test "X$x" = "X$dir"; then |
---|
614 | haveit=yes |
---|
615 | break |
---|
616 | fi |
---|
617 | done |
---|
618 | if test -z "$haveit"; then |
---|
619 | rpathdirs="$rpathdirs $dir" |
---|
620 | fi |
---|
621 | dnl Potentially add DIR to ltrpathdirs. |
---|
622 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
---|
623 | haveit= |
---|
624 | for x in $ltrpathdirs; do |
---|
625 | if test "X$x" = "X$dir"; then |
---|
626 | haveit=yes |
---|
627 | break |
---|
628 | fi |
---|
629 | done |
---|
630 | if test -z "$haveit"; then |
---|
631 | ltrpathdirs="$ltrpathdirs $dir" |
---|
632 | fi |
---|
633 | fi |
---|
634 | ;; |
---|
635 | -l*) |
---|
636 | dnl Handle this in the next round. |
---|
637 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
---|
638 | ;; |
---|
639 | *.la) |
---|
640 | dnl Handle this in the next round. Throw away the .la's |
---|
641 | dnl directory; it is already contained in a preceding -L |
---|
642 | dnl option. |
---|
643 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
---|
644 | ;; |
---|
645 | *) |
---|
646 | dnl Most likely an immediate library name. |
---|
647 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
---|
648 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
---|
649 | ;; |
---|
650 | esac |
---|
651 | done |
---|
652 | fi |
---|
653 | else |
---|
654 | dnl Didn't find the library; assume it is in the system directories |
---|
655 | dnl known to the linker and runtime loader. (All the system |
---|
656 | dnl directories known to the linker should also be known to the |
---|
657 | dnl runtime loader, otherwise the system is severely misconfigured.) |
---|
658 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
---|
659 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
---|
660 | fi |
---|
661 | fi |
---|
662 | fi |
---|
663 | done |
---|
664 | done |
---|
665 | if test "X$rpathdirs" != "X"; then |
---|
666 | if test -n "$hardcode_libdir_separator"; then |
---|
667 | dnl Weird platform: only the last -rpath option counts, the user must |
---|
668 | dnl pass all path elements in one option. We can arrange that for a |
---|
669 | dnl single library, but not when more than one $LIBNAMEs are used. |
---|
670 | alldirs= |
---|
671 | for found_dir in $rpathdirs; do |
---|
672 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
---|
673 | done |
---|
674 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
---|
675 | acl_save_libdir="$libdir" |
---|
676 | libdir="$alldirs" |
---|
677 | eval flag=\"$hardcode_libdir_flag_spec\" |
---|
678 | libdir="$acl_save_libdir" |
---|
679 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
---|
680 | else |
---|
681 | dnl The -rpath options are cumulative. |
---|
682 | for found_dir in $rpathdirs; do |
---|
683 | acl_save_libdir="$libdir" |
---|
684 | libdir="$found_dir" |
---|
685 | eval flag=\"$hardcode_libdir_flag_spec\" |
---|
686 | libdir="$acl_save_libdir" |
---|
687 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
---|
688 | done |
---|
689 | fi |
---|
690 | fi |
---|
691 | if test "X$ltrpathdirs" != "X"; then |
---|
692 | dnl When using libtool, the option that works for both libraries and |
---|
693 | dnl executables is -R. The -R options are cumulative. |
---|
694 | for found_dir in $ltrpathdirs; do |
---|
695 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
---|
696 | done |
---|
697 | fi |
---|
698 | ]) |
---|
699 | |
---|
700 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
---|
701 | dnl unless already present in VAR. |
---|
702 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
---|
703 | dnl contains two or three consecutive elements that belong together. |
---|
704 | AC_DEFUN([AC_LIB_APPENDTOVAR], |
---|
705 | [ |
---|
706 | for element in [$2]; do |
---|
707 | haveit= |
---|
708 | for x in $[$1]; do |
---|
709 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
---|
710 | if test "X$x" = "X$element"; then |
---|
711 | haveit=yes |
---|
712 | break |
---|
713 | fi |
---|
714 | done |
---|
715 | if test -z "$haveit"; then |
---|
716 | [$1]="${[$1]}${[$1]:+ }$element" |
---|
717 | fi |
---|
718 | done |
---|
719 | ]) |
---|
720 | |
---|
721 | # lib-ld.m4 serial 3 (gettext-0.13) |
---|
722 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
---|
723 | dnl This file is free software, distributed under the terms of the GNU |
---|
724 | dnl General Public License. As a special exception to the GNU General |
---|
725 | dnl Public License, this file may be distributed as part of a program |
---|
726 | dnl that contains a configuration script generated by Autoconf, under |
---|
727 | dnl the same distribution terms as the rest of that program. |
---|
728 | |
---|
729 | dnl Subroutines of libtool.m4, |
---|
730 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
---|
731 | dnl with libtool.m4. |
---|
732 | |
---|
733 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
---|
734 | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
---|
735 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
---|
736 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
737 | case `$LD -v 2>&1 </dev/null` in |
---|
738 | *GNU* | *'with BFD'*) |
---|
739 | acl_cv_prog_gnu_ld=yes ;; |
---|
740 | *) |
---|
741 | acl_cv_prog_gnu_ld=no ;; |
---|
742 | esac]) |
---|
743 | with_gnu_ld=$acl_cv_prog_gnu_ld |
---|
744 | ]) |
---|
745 | |
---|
746 | dnl From libtool-1.4. Sets the variable LD. |
---|
747 | AC_DEFUN([AC_LIB_PROG_LD], |
---|
748 | [AC_ARG_WITH(gnu-ld, |
---|
749 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
---|
750 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
---|
751 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
752 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
753 | # Prepare PATH_SEPARATOR. |
---|
754 | # The user is always right. |
---|
755 | if test "${PATH_SEPARATOR+set}" != set; then |
---|
756 | echo "#! /bin/sh" >conf$$.sh |
---|
757 | echo "exit 0" >>conf$$.sh |
---|
758 | chmod +x conf$$.sh |
---|
759 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
---|
760 | PATH_SEPARATOR=';' |
---|
761 | else |
---|
762 | PATH_SEPARATOR=: |
---|
763 | fi |
---|
764 | rm -f conf$$.sh |
---|
765 | fi |
---|
766 | ac_prog=ld |
---|
767 | if test "$GCC" = yes; then |
---|
768 | # Check if gcc -print-prog-name=ld gives a path. |
---|
769 | AC_MSG_CHECKING([for ld used by GCC]) |
---|
770 | case $host in |
---|
771 | *-*-mingw*) |
---|
772 | # gcc leaves a trailing carriage return which upsets mingw |
---|
773 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
774 | *) |
---|
775 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
776 | esac |
---|
777 | case $ac_prog in |
---|
778 | # Accept absolute paths. |
---|
779 | [[\\/]* | [A-Za-z]:[\\/]*)] |
---|
780 | [re_direlt='/[^/][^/]*/\.\./'] |
---|
781 | # Canonicalize the path of ld |
---|
782 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
---|
783 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
784 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
---|
785 | done |
---|
786 | test -z "$LD" && LD="$ac_prog" |
---|
787 | ;; |
---|
788 | "") |
---|
789 | # If it fails, then pretend we aren't using GCC. |
---|
790 | ac_prog=ld |
---|
791 | ;; |
---|
792 | *) |
---|
793 | # If it is relative, then search for the first ld in PATH. |
---|
794 | with_gnu_ld=unknown |
---|
795 | ;; |
---|
796 | esac |
---|
797 | elif test "$with_gnu_ld" = yes; then |
---|
798 | AC_MSG_CHECKING([for GNU ld]) |
---|
799 | else |
---|
800 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
801 | fi |
---|
802 | AC_CACHE_VAL(acl_cv_path_LD, |
---|
803 | [if test -z "$LD"; then |
---|
804 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
---|
805 | for ac_dir in $PATH; do |
---|
806 | test -z "$ac_dir" && ac_dir=. |
---|
807 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
808 | acl_cv_path_LD="$ac_dir/$ac_prog" |
---|
809 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
810 | # but apparently some GNU ld's only accept -v. |
---|
811 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
812 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
---|
813 | *GNU* | *'with BFD'*) |
---|
814 | test "$with_gnu_ld" != no && break ;; |
---|
815 | *) |
---|
816 | test "$with_gnu_ld" != yes && break ;; |
---|
817 | esac |
---|
818 | fi |
---|
819 | done |
---|
820 | IFS="$ac_save_ifs" |
---|
821 | else |
---|
822 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
823 | fi]) |
---|
824 | LD="$acl_cv_path_LD" |
---|
825 | if test -n "$LD"; then |
---|
826 | AC_MSG_RESULT($LD) |
---|
827 | else |
---|
828 | AC_MSG_RESULT(no) |
---|
829 | fi |
---|
830 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
831 | AC_LIB_PROG_LD_GNU |
---|
832 | ]) |
---|
833 | |
---|
834 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
835 | |
---|
836 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
837 | [AC_PREREQ([2.12]) |
---|
838 | AC_CONFIG_HEADER([$1]) |
---|
839 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
840 | dnl This file resides in the same directory as the config header |
---|
841 | dnl that is generated. We must strip everything past the first ":", |
---|
842 | dnl and everything past the last "/". |
---|
843 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
844 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
845 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
846 | <<am_indx=1 |
---|
847 | for am_file in <<$1>>; do |
---|
848 | case " <<$>>CONFIG_HEADERS " in |
---|
849 | *" <<$>>am_file "*<<)>> |
---|
850 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
851 | ;; |
---|
852 | esac |
---|
853 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
854 | done<<>>dnl>>) |
---|
855 | changequote([,]))]) |
---|
856 | |
---|
857 | # Do all the work for Automake. This macro actually does too much -- |
---|
858 | # some checks are only needed if your package does certain things. |
---|
859 | # But this isn't really a big deal. |
---|
860 | |
---|
861 | # serial 1 |
---|
862 | |
---|
863 | dnl Usage: |
---|
864 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
865 | |
---|
866 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
867 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
868 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
869 | PACKAGE=[$1] |
---|
870 | AC_SUBST(PACKAGE) |
---|
871 | VERSION=[$2] |
---|
872 | AC_SUBST(VERSION) |
---|
873 | dnl test to see if srcdir already configured |
---|
874 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
875 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
876 | fi |
---|
877 | ifelse([$3],, |
---|
878 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
879 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
880 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
881 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
882 | dnl FIXME This is truly gross. |
---|
883 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
884 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
885 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
886 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
887 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
888 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
889 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
890 | |
---|
891 | # Copyright 2002 Free Software Foundation, Inc. |
---|
892 | |
---|
893 | # This program is free software; you can redistribute it and/or modify |
---|
894 | # it under the terms of the GNU General Public License as published by |
---|
895 | # the Free Software Foundation; either version 2, or (at your option) |
---|
896 | # any later version. |
---|
897 | |
---|
898 | # This program is distributed in the hope that it will be useful, |
---|
899 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
900 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
901 | # GNU General Public License for more details. |
---|
902 | |
---|
903 | # You should have received a copy of the GNU General Public License |
---|
904 | # along with this program; if not, write to the Free Software |
---|
905 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
906 | |
---|
907 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
908 | # ---------------------------- |
---|
909 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
910 | # generated from the m4 files accompanying Automake X.Y. |
---|
911 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
912 | |
---|
913 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
914 | # ------------------------------- |
---|
915 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
916 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
917 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
918 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
919 | |
---|
920 | # |
---|
921 | # Check to make sure that the build environment is sane. |
---|
922 | # |
---|
923 | |
---|
924 | AC_DEFUN([AM_SANITY_CHECK], |
---|
925 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
926 | # Just in case |
---|
927 | sleep 1 |
---|
928 | echo timestamp > conftestfile |
---|
929 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
930 | # arguments. Must try -L first in case configure is actually a |
---|
931 | # symlink; some systems play weird games with the mod time of symlinks |
---|
932 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
933 | # directory). |
---|
934 | if ( |
---|
935 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
936 | if test "[$]*" = "X"; then |
---|
937 | # -L didn't work. |
---|
938 | set X `ls -t $srcdir/configure conftestfile` |
---|
939 | fi |
---|
940 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
941 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
942 | |
---|
943 | # If neither matched, then we have a broken ls. This can happen |
---|
944 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
945 | # broken ls alias from the environment. This has actually |
---|
946 | # happened. Such a system could not be considered "sane". |
---|
947 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
948 | alias in your environment]) |
---|
949 | fi |
---|
950 | |
---|
951 | test "[$]2" = conftestfile |
---|
952 | ) |
---|
953 | then |
---|
954 | # Ok. |
---|
955 | : |
---|
956 | else |
---|
957 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
958 | Check your system clock]) |
---|
959 | fi |
---|
960 | rm -f conftest* |
---|
961 | AC_MSG_RESULT(yes)]) |
---|
962 | |
---|
963 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
964 | dnl The program must properly implement --version. |
---|
965 | AC_DEFUN([AM_MISSING_PROG], |
---|
966 | [AC_MSG_CHECKING(for working $2) |
---|
967 | # Run test in a subshell; some versions of sh will print an error if |
---|
968 | # an executable is not found, even if stderr is redirected. |
---|
969 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
970 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
971 | $1=$2 |
---|
972 | AC_MSG_RESULT(found) |
---|
973 | else |
---|
974 | $1="$3/missing $2" |
---|
975 | AC_MSG_RESULT(missing) |
---|
976 | fi |
---|
977 | AC_SUBST($1)]) |
---|
978 | |
---|
979 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
---|
980 | |
---|
981 | # serial 47 AC_PROG_LIBTOOL |
---|
982 | |
---|
983 | |
---|
984 | # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) |
---|
985 | # ----------------------------------------------------------- |
---|
986 | # If this macro is not defined by Autoconf, define it here. |
---|
987 | m4_ifdef([AC_PROVIDE_IFELSE], |
---|
988 | [], |
---|
989 | [m4_define([AC_PROVIDE_IFELSE], |
---|
990 | [m4_ifdef([AC_PROVIDE_$1], |
---|
991 | [$2], [$3])])]) |
---|
992 | |
---|
993 | |
---|
994 | # AC_PROG_LIBTOOL |
---|
995 | # --------------- |
---|
996 | AC_DEFUN([AC_PROG_LIBTOOL], |
---|
997 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl |
---|
998 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX |
---|
999 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. |
---|
1000 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
---|
1001 | [AC_LIBTOOL_CXX], |
---|
1002 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX |
---|
1003 | ])]) |
---|
1004 | dnl And a similar setup for Fortran 77 support |
---|
1005 | AC_PROVIDE_IFELSE([AC_PROG_F77], |
---|
1006 | [AC_LIBTOOL_F77], |
---|
1007 | [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 |
---|
1008 | ])]) |
---|
1009 | |
---|
1010 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. |
---|
1011 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run |
---|
1012 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. |
---|
1013 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
---|
1014 | [AC_LIBTOOL_GCJ], |
---|
1015 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
---|
1016 | [AC_LIBTOOL_GCJ], |
---|
1017 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], |
---|
1018 | [AC_LIBTOOL_GCJ], |
---|
1019 | [ifdef([AC_PROG_GCJ], |
---|
1020 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
---|
1021 | ifdef([A][M_PROG_GCJ], |
---|
1022 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
---|
1023 | ifdef([LT_AC_PROG_GCJ], |
---|
1024 | [define([LT_AC_PROG_GCJ], |
---|
1025 | defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) |
---|
1026 | ])])# AC_PROG_LIBTOOL |
---|
1027 | |
---|
1028 | |
---|
1029 | # _AC_PROG_LIBTOOL |
---|
1030 | # ---------------- |
---|
1031 | AC_DEFUN([_AC_PROG_LIBTOOL], |
---|
1032 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
1033 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl |
---|
1034 | AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl |
---|
1035 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl |
---|
1036 | |
---|
1037 | # This can be used to rebuild libtool when needed |
---|
1038 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
---|
1039 | |
---|
1040 | # Always use our own libtool. |
---|
1041 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
1042 | AC_SUBST(LIBTOOL)dnl |
---|
1043 | |
---|
1044 | # Prevent multiple expansion |
---|
1045 | define([AC_PROG_LIBTOOL], []) |
---|
1046 | ])# _AC_PROG_LIBTOOL |
---|
1047 | |
---|
1048 | |
---|
1049 | # AC_LIBTOOL_SETUP |
---|
1050 | # ---------------- |
---|
1051 | AC_DEFUN([AC_LIBTOOL_SETUP], |
---|
1052 | [AC_PREREQ(2.50)dnl |
---|
1053 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
1054 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
1055 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
1056 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
1057 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
1058 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
1059 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
1060 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
---|
1061 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
1062 | |
---|
1063 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
1064 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
---|
1065 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! |
---|
1066 | AC_REQUIRE([AC_OBJEXT])dnl |
---|
1067 | AC_REQUIRE([AC_EXEEXT])dnl |
---|
1068 | dnl |
---|
1069 | |
---|
1070 | AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
1071 | AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
1072 | AC_LIBTOOL_OBJDIR |
---|
1073 | |
---|
1074 | AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
1075 | _LT_AC_PROG_ECHO_BACKSLASH |
---|
1076 | |
---|
1077 | case $host_os in |
---|
1078 | aix3*) |
---|
1079 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
1080 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
1081 | # vanish in a puff of smoke. |
---|
1082 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
1083 | COLLECT_NAMES= |
---|
1084 | export COLLECT_NAMES |
---|
1085 | fi |
---|
1086 | ;; |
---|
1087 | esac |
---|
1088 | |
---|
1089 | # Sed substitution that helps us do robust quoting. It backslashifies |
---|
1090 | # metacharacters that are still active within double-quoted strings. |
---|
1091 | Xsed='sed -e s/^X//' |
---|
1092 | [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] |
---|
1093 | |
---|
1094 | # Same as above, but do not quote variable references. |
---|
1095 | [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] |
---|
1096 | |
---|
1097 | # Sed substitution to delay expansion of an escaped shell variable in a |
---|
1098 | # double_quote_subst'ed string. |
---|
1099 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
---|
1100 | |
---|
1101 | # Sed substitution to avoid accidental globbing in evaled expressions |
---|
1102 | no_glob_subst='s/\*/\\\*/g' |
---|
1103 | |
---|
1104 | # Constants: |
---|
1105 | rm="rm -f" |
---|
1106 | |
---|
1107 | # Global variables: |
---|
1108 | default_ofile=libtool |
---|
1109 | can_build_shared=yes |
---|
1110 | |
---|
1111 | # All known linkers require a `.a' archive for static linking (except M$VC, |
---|
1112 | # which needs '.lib'). |
---|
1113 | libext=a |
---|
1114 | ltmain="$ac_aux_dir/ltmain.sh" |
---|
1115 | ofile="$default_ofile" |
---|
1116 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
---|
1117 | |
---|
1118 | AC_CHECK_TOOL(AR, ar, false) |
---|
1119 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
---|
1120 | AC_CHECK_TOOL(STRIP, strip, :) |
---|
1121 | |
---|
1122 | old_CC="$CC" |
---|
1123 | old_CFLAGS="$CFLAGS" |
---|
1124 | |
---|
1125 | # Set sane defaults for various variables |
---|
1126 | test -z "$AR" && AR=ar |
---|
1127 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
---|
1128 | test -z "$AS" && AS=as |
---|
1129 | test -z "$CC" && CC=cc |
---|
1130 | test -z "$LTCC" && LTCC=$CC |
---|
1131 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
---|
1132 | test -z "$LD" && LD=ld |
---|
1133 | test -z "$LN_S" && LN_S="ln -s" |
---|
1134 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
---|
1135 | test -z "$NM" && NM=nm |
---|
1136 | test -z "$SED" && SED=sed |
---|
1137 | test -z "$OBJDUMP" && OBJDUMP=objdump |
---|
1138 | test -z "$RANLIB" && RANLIB=: |
---|
1139 | test -z "$STRIP" && STRIP=: |
---|
1140 | test -z "$ac_objext" && ac_objext=o |
---|
1141 | |
---|
1142 | # Determine commands to create old-style static archives. |
---|
1143 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
---|
1144 | old_postinstall_cmds='chmod 644 $oldlib' |
---|
1145 | old_postuninstall_cmds= |
---|
1146 | |
---|
1147 | if test -n "$RANLIB"; then |
---|
1148 | case $host_os in |
---|
1149 | openbsd*) |
---|
1150 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
---|
1151 | ;; |
---|
1152 | *) |
---|
1153 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
---|
1154 | ;; |
---|
1155 | esac |
---|
1156 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
---|
1157 | fi |
---|
1158 | |
---|
1159 | # Only perform the check for file, if the check method requires it |
---|
1160 | case $deplibs_check_method in |
---|
1161 | file_magic*) |
---|
1162 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
---|
1163 | AC_PATH_MAGIC |
---|
1164 | fi |
---|
1165 | ;; |
---|
1166 | esac |
---|
1167 | |
---|
1168 | AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
---|
1169 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
---|
1170 | enable_win32_dll=yes, enable_win32_dll=no) |
---|
1171 | |
---|
1172 | AC_ARG_ENABLE([libtool-lock], |
---|
1173 | [AC_HELP_STRING([--disable-libtool-lock], |
---|
1174 | [avoid locking (might break parallel builds)])]) |
---|
1175 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
1176 | |
---|
1177 | AC_ARG_WITH([pic], |
---|
1178 | [AC_HELP_STRING([--with-pic], |
---|
1179 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
---|
1180 | [pic_mode="$withval"], |
---|
1181 | [pic_mode=default]) |
---|
1182 | test -z "$pic_mode" && pic_mode=default |
---|
1183 | |
---|
1184 | # Use C for the default configuration in the libtool script |
---|
1185 | tagname= |
---|
1186 | AC_LIBTOOL_LANG_C_CONFIG |
---|
1187 | _LT_AC_TAGCONFIG |
---|
1188 | ])# AC_LIBTOOL_SETUP |
---|
1189 | |
---|
1190 | |
---|
1191 | # _LT_AC_SYS_COMPILER |
---|
1192 | # ------------------- |
---|
1193 | AC_DEFUN([_LT_AC_SYS_COMPILER], |
---|
1194 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
1195 | |
---|
1196 | # If no C compiler was specified, use CC. |
---|
1197 | LTCC=${LTCC-"$CC"} |
---|
1198 | |
---|
1199 | # Allow CC to be a program name with arguments. |
---|
1200 | compiler=$CC |
---|
1201 | ])# _LT_AC_SYS_COMPILER |
---|
1202 | |
---|
1203 | |
---|
1204 | # _LT_AC_SYS_LIBPATH_AIX |
---|
1205 | # ---------------------- |
---|
1206 | # Links a minimal program and checks the executable |
---|
1207 | # for the system default hardcoded library path. In most cases, |
---|
1208 | # this is /usr/lib:/lib, but when the MPI compilers are used |
---|
1209 | # the location of the communication and MPI libs are included too. |
---|
1210 | # If we don't find anything, use the default library path according |
---|
1211 | # to the aix ld manual. |
---|
1212 | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], |
---|
1213 | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
---|
1214 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
---|
1215 | }'` |
---|
1216 | # Check for a 64-bit object if we didn't find anything. |
---|
1217 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
---|
1218 | }'`; fi],[]) |
---|
1219 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
---|
1220 | ])# _LT_AC_SYS_LIBPATH_AIX |
---|
1221 | |
---|
1222 | |
---|
1223 | # _LT_AC_SHELL_INIT(ARG) |
---|
1224 | # ---------------------- |
---|
1225 | AC_DEFUN([_LT_AC_SHELL_INIT], |
---|
1226 | [ifdef([AC_DIVERSION_NOTICE], |
---|
1227 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
---|
1228 | [AC_DIVERT_PUSH(NOTICE)]) |
---|
1229 | $1 |
---|
1230 | AC_DIVERT_POP |
---|
1231 | ])# _LT_AC_SHELL_INIT |
---|
1232 | |
---|
1233 | |
---|
1234 | # _LT_AC_PROG_ECHO_BACKSLASH |
---|
1235 | # -------------------------- |
---|
1236 | # Add some code to the start of the generated configure script which |
---|
1237 | # will find an echo command which doesn't interpret backslashes. |
---|
1238 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
---|
1239 | [_LT_AC_SHELL_INIT([ |
---|
1240 | # Check that we are running under the correct shell. |
---|
1241 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
1242 | |
---|
1243 | case X$ECHO in |
---|
1244 | X*--fallback-echo) |
---|
1245 | # Remove one level of quotation (which was required for Make). |
---|
1246 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
---|
1247 | ;; |
---|
1248 | esac |
---|
1249 | |
---|
1250 | echo=${ECHO-echo} |
---|
1251 | if test "X[$]1" = X--no-reexec; then |
---|
1252 | # Discard the --no-reexec flag, and continue. |
---|
1253 | shift |
---|
1254 | elif test "X[$]1" = X--fallback-echo; then |
---|
1255 | # Avoid inline document here, it may be left over |
---|
1256 | : |
---|
1257 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then |
---|
1258 | # Yippee, $echo works! |
---|
1259 | : |
---|
1260 | else |
---|
1261 | # Restart under the correct shell. |
---|
1262 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
1263 | fi |
---|
1264 | |
---|
1265 | if test "X[$]1" = X--fallback-echo; then |
---|
1266 | # used as fallback echo |
---|
1267 | shift |
---|
1268 | cat <<EOF |
---|
1269 | [$]* |
---|
1270 | EOF |
---|
1271 | exit 0 |
---|
1272 | fi |
---|
1273 | |
---|
1274 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
1275 | # if CDPATH is set. |
---|
1276 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
1277 | |
---|
1278 | if test -z "$ECHO"; then |
---|
1279 | if test "X${echo_test_string+set}" != Xset; then |
---|
1280 | # find a string as large as possible, as long as the shell can cope with it |
---|
1281 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
---|
1282 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
---|
1283 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
---|
1284 | echo_test_string="`eval $cmd`" && |
---|
1285 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
---|
1286 | then |
---|
1287 | break |
---|
1288 | fi |
---|
1289 | done |
---|
1290 | fi |
---|
1291 | |
---|
1292 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1293 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
1294 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1295 | : |
---|
1296 | else |
---|
1297 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
---|
1298 | # backslashes. This makes it impossible to quote backslashes using |
---|
1299 | # echo "$something" | sed 's/\\/\\\\/g' |
---|
1300 | # |
---|
1301 | # So, first we look for a working echo in the user's PATH. |
---|
1302 | |
---|
1303 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
1304 | for dir in $PATH /usr/ucb; do |
---|
1305 | IFS="$lt_save_ifs" |
---|
1306 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
---|
1307 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1308 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
---|
1309 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1310 | echo="$dir/echo" |
---|
1311 | break |
---|
1312 | fi |
---|
1313 | done |
---|
1314 | IFS="$lt_save_ifs" |
---|
1315 | |
---|
1316 | if test "X$echo" = Xecho; then |
---|
1317 | # We didn't find a better echo, so look for alternatives. |
---|
1318 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
---|
1319 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
---|
1320 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1321 | # This shell has a builtin print -r that does the trick. |
---|
1322 | echo='print -r' |
---|
1323 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
---|
1324 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
---|
1325 | # If we have ksh, try running configure again with it. |
---|
1326 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
1327 | export ORIGINAL_CONFIG_SHELL |
---|
1328 | CONFIG_SHELL=/bin/ksh |
---|
1329 | export CONFIG_SHELL |
---|
1330 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
1331 | else |
---|
1332 | # Try using printf. |
---|
1333 | echo='printf %s\n' |
---|
1334 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1335 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
1336 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1337 | # Cool, printf works |
---|
1338 | : |
---|
1339 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1340 | test "X$echo_testing_string" = 'X\t' && |
---|
1341 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1342 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1343 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
---|
1344 | export CONFIG_SHELL |
---|
1345 | SHELL="$CONFIG_SHELL" |
---|
1346 | export SHELL |
---|
1347 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1348 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1349 | test "X$echo_testing_string" = 'X\t' && |
---|
1350 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1351 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1352 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1353 | else |
---|
1354 | # maybe with a smaller string... |
---|
1355 | prev=: |
---|
1356 | |
---|
1357 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
---|
1358 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
---|
1359 | then |
---|
1360 | break |
---|
1361 | fi |
---|
1362 | prev="$cmd" |
---|
1363 | done |
---|
1364 | |
---|
1365 | if test "$prev" != 'sed 50q "[$]0"'; then |
---|
1366 | echo_test_string=`eval $prev` |
---|
1367 | export echo_test_string |
---|
1368 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
---|
1369 | else |
---|
1370 | # Oops. We lost completely, so just stick with echo. |
---|
1371 | echo=echo |
---|
1372 | fi |
---|
1373 | fi |
---|
1374 | fi |
---|
1375 | fi |
---|
1376 | fi |
---|
1377 | fi |
---|
1378 | |
---|
1379 | # Copy echo and quote the copy suitably for passing to libtool from |
---|
1380 | # the Makefile, instead of quoting the original, which is used later. |
---|
1381 | ECHO=$echo |
---|
1382 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
---|
1383 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
---|
1384 | fi |
---|
1385 | |
---|
1386 | AC_SUBST(ECHO) |
---|
1387 | ])])# _LT_AC_PROG_ECHO_BACKSLASH |
---|
1388 | |
---|
1389 | |
---|
1390 | # _LT_AC_LOCK |
---|
1391 | # ----------- |
---|
1392 | AC_DEFUN([_LT_AC_LOCK], |
---|
1393 | [AC_ARG_ENABLE([libtool-lock], |
---|
1394 | [AC_HELP_STRING([--disable-libtool-lock], |
---|
1395 | [avoid locking (might break parallel builds)])]) |
---|
1396 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
1397 | |
---|
1398 | # Some flags need to be propagated to the compiler or linker for good |
---|
1399 | # libtool support. |
---|
1400 | case $host in |
---|
1401 | ia64-*-hpux*) |
---|
1402 | # Find out which ABI we are using. |
---|
1403 | echo 'int i;' > conftest.$ac_ext |
---|
1404 | if AC_TRY_EVAL(ac_compile); then |
---|
1405 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1406 | *ELF-32*) |
---|
1407 | HPUX_IA64_MODE="32" |
---|
1408 | ;; |
---|
1409 | *ELF-64*) |
---|
1410 | HPUX_IA64_MODE="64" |
---|
1411 | ;; |
---|
1412 | esac |
---|
1413 | fi |
---|
1414 | rm -rf conftest* |
---|
1415 | ;; |
---|
1416 | *-*-irix6*) |
---|
1417 | # Find out which ABI we are using. |
---|
1418 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
1419 | if AC_TRY_EVAL(ac_compile); then |
---|
1420 | if test "$lt_cv_prog_gnu_ld" = yes; then |
---|
1421 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1422 | *32-bit*) |
---|
1423 | LD="${LD-ld} -melf32bsmip" |
---|
1424 | ;; |
---|
1425 | *N32*) |
---|
1426 | LD="${LD-ld} -melf32bmipn32" |
---|
1427 | ;; |
---|
1428 | *64-bit*) |
---|
1429 | LD="${LD-ld} -melf64bmip" |
---|
1430 | ;; |
---|
1431 | esac |
---|
1432 | else |
---|
1433 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1434 | *32-bit*) |
---|
1435 | LD="${LD-ld} -32" |
---|
1436 | ;; |
---|
1437 | *N32*) |
---|
1438 | LD="${LD-ld} -n32" |
---|
1439 | ;; |
---|
1440 | *64-bit*) |
---|
1441 | LD="${LD-ld} -64" |
---|
1442 | ;; |
---|
1443 | esac |
---|
1444 | fi |
---|
1445 | fi |
---|
1446 | rm -rf conftest* |
---|
1447 | ;; |
---|
1448 | |
---|
1449 | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) |
---|
1450 | # Find out which ABI we are using. |
---|
1451 | echo 'int i;' > conftest.$ac_ext |
---|
1452 | if AC_TRY_EVAL(ac_compile); then |
---|
1453 | case "`/usr/bin/file conftest.o`" in |
---|
1454 | *32-bit*) |
---|
1455 | case $host in |
---|
1456 | x86_64-*linux*) |
---|
1457 | LD="${LD-ld} -m elf_i386" |
---|
1458 | ;; |
---|
1459 | ppc64-*linux*|powerpc64-*linux*) |
---|
1460 | LD="${LD-ld} -m elf32ppclinux" |
---|
1461 | ;; |
---|
1462 | s390x-*linux*) |
---|
1463 | LD="${LD-ld} -m elf_s390" |
---|
1464 | ;; |
---|
1465 | sparc64-*linux*) |
---|
1466 | LD="${LD-ld} -m elf32_sparc" |
---|
1467 | ;; |
---|
1468 | esac |
---|
1469 | ;; |
---|
1470 | *64-bit*) |
---|
1471 | case $host in |
---|
1472 | x86_64-*linux*) |
---|
1473 | LD="${LD-ld} -m elf_x86_64" |
---|
1474 | ;; |
---|
1475 | ppc*-*linux*|powerpc*-*linux*) |
---|
1476 | LD="${LD-ld} -m elf64ppc" |
---|
1477 | ;; |
---|
1478 | s390*-*linux*) |
---|
1479 | LD="${LD-ld} -m elf64_s390" |
---|
1480 | ;; |
---|
1481 | sparc*-*linux*) |
---|
1482 | LD="${LD-ld} -m elf64_sparc" |
---|
1483 | ;; |
---|
1484 | esac |
---|
1485 | ;; |
---|
1486 | esac |
---|
1487 | fi |
---|
1488 | rm -rf conftest* |
---|
1489 | ;; |
---|
1490 | |
---|
1491 | *-*-sco3.2v5*) |
---|
1492 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
1493 | SAVE_CFLAGS="$CFLAGS" |
---|
1494 | CFLAGS="$CFLAGS -belf" |
---|
1495 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
1496 | [AC_LANG_PUSH(C) |
---|
1497 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
---|
1498 | AC_LANG_POP]) |
---|
1499 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
1500 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
1501 | CFLAGS="$SAVE_CFLAGS" |
---|
1502 | fi |
---|
1503 | ;; |
---|
1504 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
---|
1505 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
---|
1506 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
1507 | AC_CHECK_TOOL(AS, as, false) |
---|
1508 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
1509 | ;; |
---|
1510 | ]) |
---|
1511 | esac |
---|
1512 | |
---|
1513 | need_locks="$enable_libtool_lock" |
---|
1514 | |
---|
1515 | ])# _LT_AC_LOCK |
---|
1516 | |
---|
1517 | |
---|
1518 | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
---|
1519 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
---|
1520 | # ---------------------------------------------------------------- |
---|
1521 | # Check whether the given compiler option works |
---|
1522 | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], |
---|
1523 | [AC_REQUIRE([LT_AC_PROG_SED]) |
---|
1524 | AC_CACHE_CHECK([$1], [$2], |
---|
1525 | [$2=no |
---|
1526 | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
---|
1527 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
1528 | lt_compiler_flag="$3" |
---|
1529 | # Insert the option either (1) after the last *FLAGS variable, or |
---|
1530 | # (2) before a word containing "conftest.", or (3) at the end. |
---|
1531 | # Note that $ac_compile itself does not contain backslashes and begins |
---|
1532 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
---|
1533 | # The option is referenced via a variable to avoid confusing sed. |
---|
1534 | lt_compile=`echo "$ac_compile" | $SED \ |
---|
1535 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ |
---|
1536 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
---|
1537 | -e 's:$: $lt_compiler_flag:'` |
---|
1538 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
---|
1539 | (eval "$lt_compile" 2>conftest.err) |
---|
1540 | ac_status=$? |
---|
1541 | cat conftest.err >&AS_MESSAGE_LOG_FD |
---|
1542 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
---|
1543 | if (exit $ac_status) && test -s "$ac_outfile"; then |
---|
1544 | # The compiler can only warn and ignore the option if not recognized |
---|
1545 | # So say no if there are warnings |
---|
1546 | if test ! -s conftest.err; then |
---|
1547 | $2=yes |
---|
1548 | fi |
---|
1549 | fi |
---|
1550 | $rm conftest* |
---|
1551 | ]) |
---|
1552 | |
---|
1553 | if test x"[$]$2" = xyes; then |
---|
1554 | ifelse([$5], , :, [$5]) |
---|
1555 | else |
---|
1556 | ifelse([$6], , :, [$6]) |
---|
1557 | fi |
---|
1558 | ])# AC_LIBTOOL_COMPILER_OPTION |
---|
1559 | |
---|
1560 | |
---|
1561 | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
---|
1562 | # [ACTION-SUCCESS], [ACTION-FAILURE]) |
---|
1563 | # ------------------------------------------------------------ |
---|
1564 | # Check whether the given compiler option works |
---|
1565 | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], |
---|
1566 | [AC_CACHE_CHECK([$1], [$2], |
---|
1567 | [$2=no |
---|
1568 | save_LDFLAGS="$LDFLAGS" |
---|
1569 | LDFLAGS="$LDFLAGS $3" |
---|
1570 | printf "$lt_simple_link_test_code" > conftest.$ac_ext |
---|
1571 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
---|
1572 | # The compiler can only warn and ignore the option if not recognized |
---|
1573 | # So say no if there are warnings |
---|
1574 | if test -s conftest.err; then |
---|
1575 | # Append any errors to the config.log. |
---|
1576 | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
---|
1577 | else |
---|
1578 | $2=yes |
---|
1579 | fi |
---|
1580 | fi |
---|
1581 | $rm conftest* |
---|
1582 | LDFLAGS="$save_LDFLAGS" |
---|
1583 | ]) |
---|
1584 | |
---|
1585 | if test x"[$]$2" = xyes; then |
---|
1586 | ifelse([$4], , :, [$4]) |
---|
1587 | else |
---|
1588 | ifelse([$5], , :, [$5]) |
---|
1589 | fi |
---|
1590 | ])# AC_LIBTOOL_LINKER_OPTION |
---|
1591 | |
---|
1592 | |
---|
1593 | # AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
1594 | # -------------------------- |
---|
1595 | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
---|
1596 | [# find the maximum length of command line arguments |
---|
1597 | AC_MSG_CHECKING([the maximum length of command line arguments]) |
---|
1598 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
---|
1599 | i=0 |
---|
1600 | teststring="ABCD" |
---|
1601 | |
---|
1602 | case $build_os in |
---|
1603 | msdosdjgpp*) |
---|
1604 | # On DJGPP, this test can blow up pretty badly due to problems in libc |
---|
1605 | # (any single argument exceeding 2000 bytes causes a buffer overrun |
---|
1606 | # during glob expansion). Even if it were fixed, the result of this |
---|
1607 | # check would be larger than it should be. |
---|
1608 | lt_cv_sys_max_cmd_len=12288; # 12K is about right |
---|
1609 | ;; |
---|
1610 | |
---|
1611 | gnu*) |
---|
1612 | # Under GNU Hurd, this test is not required because there is |
---|
1613 | # no limit to the length of command line arguments. |
---|
1614 | # Libtool will interpret -1 as no limit whatsoever |
---|
1615 | lt_cv_sys_max_cmd_len=-1; |
---|
1616 | ;; |
---|
1617 | |
---|
1618 | cygwin* | mingw*) |
---|
1619 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
---|
1620 | # about 5 minutes as the teststring grows exponentially. |
---|
1621 | # Worse, since 9x/ME are not pre-emptively multitasking, |
---|
1622 | # you end up with a "frozen" computer, even though with patience |
---|
1623 | # the test eventually succeeds (with a max line length of 256k). |
---|
1624 | # Instead, let's just punt: use the minimum linelength reported by |
---|
1625 | # all of the supported platforms: 8192 (on NT/2K/XP). |
---|
1626 | lt_cv_sys_max_cmd_len=8192; |
---|
1627 | ;; |
---|
1628 | |
---|
1629 | amigaos*) |
---|
1630 | # On AmigaOS with pdksh, this test takes hours, literally. |
---|
1631 | # So we just punt and use a minimum line length of 8192. |
---|
1632 | lt_cv_sys_max_cmd_len=8192; |
---|
1633 | ;; |
---|
1634 | |
---|
1635 | *) |
---|
1636 | # If test is not a shell built-in, we'll probably end up computing a |
---|
1637 | # maximum length that is only half of the actual maximum length, but |
---|
1638 | # we can't tell. |
---|
1639 | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ |
---|
1640 | = "XX$teststring") >/dev/null 2>&1 && |
---|
1641 | new_result=`expr "X$teststring" : ".*" 2>&1` && |
---|
1642 | lt_cv_sys_max_cmd_len=$new_result && |
---|
1643 | test $i != 17 # 1/2 MB should be enough |
---|
1644 | do |
---|
1645 | i=`expr $i + 1` |
---|
1646 | teststring=$teststring$teststring |
---|
1647 | done |
---|
1648 | teststring= |
---|
1649 | # Add a significant safety factor because C++ compilers can tack on massive |
---|
1650 | # amounts of additional arguments before passing them to the linker. |
---|
1651 | # It appears as though 1/2 is a usable value. |
---|
1652 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
---|
1653 | ;; |
---|
1654 | esac |
---|
1655 | ]) |
---|
1656 | if test -n $lt_cv_sys_max_cmd_len ; then |
---|
1657 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
---|
1658 | else |
---|
1659 | AC_MSG_RESULT(none) |
---|
1660 | fi |
---|
1661 | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
1662 | |
---|
1663 | |
---|
1664 | # _LT_AC_CHECK_DLFCN |
---|
1665 | # -------------------- |
---|
1666 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
---|
1667 | [AC_CHECK_HEADERS(dlfcn.h)dnl |
---|
1668 | ])# _LT_AC_CHECK_DLFCN |
---|
1669 | |
---|
1670 | |
---|
1671 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
---|
1672 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
---|
1673 | # ------------------------------------------------------------------ |
---|
1674 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
---|
1675 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1676 | if test "$cross_compiling" = yes; then : |
---|
1677 | [$4] |
---|
1678 | else |
---|
1679 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
---|
1680 | lt_status=$lt_dlunknown |
---|
1681 | cat > conftest.$ac_ext <<EOF |
---|
1682 | [#line __oline__ "configure" |
---|
1683 | #include "confdefs.h" |
---|
1684 | |
---|
1685 | #if HAVE_DLFCN_H |
---|
1686 | #include <dlfcn.h> |
---|
1687 | #endif |
---|
1688 | |
---|
1689 | #include <stdio.h> |
---|
1690 | |
---|
1691 | #ifdef RTLD_GLOBAL |
---|
1692 | # define LT_DLGLOBAL RTLD_GLOBAL |
---|
1693 | #else |
---|
1694 | # ifdef DL_GLOBAL |
---|
1695 | # define LT_DLGLOBAL DL_GLOBAL |
---|
1696 | # else |
---|
1697 | # define LT_DLGLOBAL 0 |
---|
1698 | # endif |
---|
1699 | #endif |
---|
1700 | |
---|
1701 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
---|
1702 | find out it does not work in some platform. */ |
---|
1703 | #ifndef LT_DLLAZY_OR_NOW |
---|
1704 | # ifdef RTLD_LAZY |
---|
1705 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
---|
1706 | # else |
---|
1707 | # ifdef DL_LAZY |
---|
1708 | # define LT_DLLAZY_OR_NOW DL_LAZY |
---|
1709 | # else |
---|
1710 | # ifdef RTLD_NOW |
---|
1711 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
---|
1712 | # else |
---|
1713 | # ifdef DL_NOW |
---|
1714 | # define LT_DLLAZY_OR_NOW DL_NOW |
---|
1715 | # else |
---|
1716 | # define LT_DLLAZY_OR_NOW 0 |
---|
1717 | # endif |
---|
1718 | # endif |
---|
1719 | # endif |
---|
1720 | # endif |
---|
1721 | #endif |
---|
1722 | |
---|
1723 | #ifdef __cplusplus |
---|
1724 | extern "C" void exit (int); |
---|
1725 | #endif |
---|
1726 | |
---|
1727 | void fnord() { int i=42;} |
---|
1728 | int main () |
---|
1729 | { |
---|
1730 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
---|
1731 | int status = $lt_dlunknown; |
---|
1732 | |
---|
1733 | if (self) |
---|
1734 | { |
---|
1735 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
---|
1736 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
---|
1737 | /* dlclose (self); */ |
---|
1738 | } |
---|
1739 | |
---|
1740 | exit (status); |
---|
1741 | }] |
---|
1742 | EOF |
---|
1743 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
---|
1744 | (./conftest; exit; ) 2>/dev/null |
---|
1745 | lt_status=$? |
---|
1746 | case x$lt_status in |
---|
1747 | x$lt_dlno_uscore) $1 ;; |
---|
1748 | x$lt_dlneed_uscore) $2 ;; |
---|
1749 | x$lt_unknown|x*) $3 ;; |
---|
1750 | esac |
---|
1751 | else : |
---|
1752 | # compilation failed |
---|
1753 | $3 |
---|
1754 | fi |
---|
1755 | fi |
---|
1756 | rm -fr conftest* |
---|
1757 | ])# _LT_AC_TRY_DLOPEN_SELF |
---|
1758 | |
---|
1759 | |
---|
1760 | # AC_LIBTOOL_DLOPEN_SELF |
---|
1761 | # ------------------- |
---|
1762 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
---|
1763 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1764 | if test "x$enable_dlopen" != xyes; then |
---|
1765 | enable_dlopen=unknown |
---|
1766 | enable_dlopen_self=unknown |
---|
1767 | enable_dlopen_self_static=unknown |
---|
1768 | else |
---|
1769 | lt_cv_dlopen=no |
---|
1770 | lt_cv_dlopen_libs= |
---|
1771 | |
---|
1772 | case $host_os in |
---|
1773 | beos*) |
---|
1774 | lt_cv_dlopen="load_add_on" |
---|
1775 | lt_cv_dlopen_libs= |
---|
1776 | lt_cv_dlopen_self=yes |
---|
1777 | ;; |
---|
1778 | |
---|
1779 | mingw* | pw32*) |
---|
1780 | lt_cv_dlopen="LoadLibrary" |
---|
1781 | lt_cv_dlopen_libs= |
---|
1782 | ;; |
---|
1783 | |
---|
1784 | cygwin*) |
---|
1785 | lt_cv_dlopen="dlopen" |
---|
1786 | lt_cv_dlopen_libs= |
---|
1787 | ;; |
---|
1788 | |
---|
1789 | darwin*) |
---|
1790 | # if libdl is installed we need to link against it |
---|
1791 | AC_CHECK_LIB([dl], [dlopen], |
---|
1792 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ |
---|
1793 | lt_cv_dlopen="dyld" |
---|
1794 | lt_cv_dlopen_libs= |
---|
1795 | lt_cv_dlopen_self=yes |
---|
1796 | ]) |
---|
1797 | ;; |
---|
1798 | |
---|
1799 | *) |
---|
1800 | AC_CHECK_FUNC([shl_load], |
---|
1801 | [lt_cv_dlopen="shl_load"], |
---|
1802 | [AC_CHECK_LIB([dld], [shl_load], |
---|
1803 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
---|
1804 | [AC_CHECK_FUNC([dlopen], |
---|
1805 | [lt_cv_dlopen="dlopen"], |
---|
1806 | [AC_CHECK_LIB([dl], [dlopen], |
---|
1807 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
---|
1808 | [AC_CHECK_LIB([svld], [dlopen], |
---|
1809 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
---|
1810 | [AC_CHECK_LIB([dld], [dld_link], |
---|
1811 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
---|
1812 | ]) |
---|
1813 | ]) |
---|
1814 | ]) |
---|
1815 | ]) |
---|
1816 | ]) |
---|
1817 | ;; |
---|
1818 | esac |
---|
1819 | |
---|
1820 | if test "x$lt_cv_dlopen" != xno; then |
---|
1821 | enable_dlopen=yes |
---|
1822 | else |
---|
1823 | enable_dlopen=no |
---|
1824 | fi |
---|
1825 | |
---|
1826 | case $lt_cv_dlopen in |
---|
1827 | dlopen) |
---|
1828 | save_CPPFLAGS="$CPPFLAGS" |
---|
1829 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
---|
1830 | |
---|
1831 | save_LDFLAGS="$LDFLAGS" |
---|
1832 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
---|
1833 | |
---|
1834 | save_LIBS="$LIBS" |
---|
1835 | LIBS="$lt_cv_dlopen_libs $LIBS" |
---|
1836 | |
---|
1837 | AC_CACHE_CHECK([whether a program can dlopen itself], |
---|
1838 | lt_cv_dlopen_self, [dnl |
---|
1839 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1840 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
---|
1841 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
---|
1842 | ]) |
---|
1843 | |
---|
1844 | if test "x$lt_cv_dlopen_self" = xyes; then |
---|
1845 | LDFLAGS="$LDFLAGS $link_static_flag" |
---|
1846 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
---|
1847 | lt_cv_dlopen_self_static, [dnl |
---|
1848 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1849 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
---|
1850 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
---|
1851 | ]) |
---|
1852 | fi |
---|
1853 | |
---|
1854 | CPPFLAGS="$save_CPPFLAGS" |
---|
1855 | LDFLAGS="$save_LDFLAGS" |
---|
1856 | LIBS="$save_LIBS" |
---|
1857 | ;; |
---|
1858 | esac |
---|
1859 | |
---|
1860 | case $lt_cv_dlopen_self in |
---|
1861 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
---|
1862 | *) enable_dlopen_self=unknown ;; |
---|
1863 | esac |
---|
1864 | |
---|
1865 | case $lt_cv_dlopen_self_static in |
---|
1866 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
---|
1867 | *) enable_dlopen_self_static=unknown ;; |
---|
1868 | esac |
---|
1869 | fi |
---|
1870 | ])# AC_LIBTOOL_DLOPEN_SELF |
---|
1871 | |
---|
1872 | |
---|
1873 | # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) |
---|
1874 | # --------------------------------- |
---|
1875 | # Check to see if options -c and -o are simultaneously supported by compiler |
---|
1876 | AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
---|
1877 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
1878 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
---|
1879 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
---|
1880 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
---|
1881 | $rm -r conftest 2>/dev/null |
---|
1882 | mkdir conftest |
---|
1883 | cd conftest |
---|
1884 | mkdir out |
---|
1885 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
1886 | |
---|
1887 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
---|
1888 | # Insert the option either (1) after the last *FLAGS variable, or |
---|
1889 | # (2) before a word containing "conftest.", or (3) at the end. |
---|
1890 | # Note that $ac_compile itself does not contain backslashes and begins |
---|
1891 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
---|
1892 | lt_compile=`echo "$ac_compile" | $SED \ |
---|
1893 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ |
---|
1894 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
---|
1895 | -e 's:$: $lt_compiler_flag:'` |
---|
1896 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
---|
1897 | (eval "$lt_compile" 2>out/conftest.err) |
---|
1898 | ac_status=$? |
---|
1899 | cat out/conftest.err >&AS_MESSAGE_LOG_FD |
---|
1900 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
---|
1901 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
---|
1902 | then |
---|
1903 | # The compiler can only warn and ignore the option if not recognized |
---|
1904 | # So say no if there are warnings |
---|
1905 | if test ! -s out/conftest.err; then |
---|
1906 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
---|
1907 | fi |
---|
1908 | fi |
---|
1909 | chmod u+w . |
---|
1910 | $rm conftest* |
---|
1911 | # SGI C++ compiler will create directory out/ii_files/ for |
---|
1912 | # template instantiation |
---|
1913 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files |
---|
1914 | $rm out/* && rmdir out |
---|
1915 | cd .. |
---|
1916 | rmdir conftest |
---|
1917 | $rm conftest* |
---|
1918 | ]) |
---|
1919 | ])# AC_LIBTOOL_PROG_CC_C_O |
---|
1920 | |
---|
1921 | |
---|
1922 | # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) |
---|
1923 | # ----------------------------------------- |
---|
1924 | # Check to see if we can do hard links to lock some files if needed |
---|
1925 | AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
---|
1926 | [AC_REQUIRE([_LT_AC_LOCK])dnl |
---|
1927 | |
---|
1928 | hard_links="nottested" |
---|
1929 | if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
---|
1930 | # do not overwrite the value of need_locks provided by the user |
---|
1931 | AC_MSG_CHECKING([if we can lock with hard links]) |
---|
1932 | hard_links=yes |
---|
1933 | $rm conftest* |
---|
1934 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1935 | touch conftest.a |
---|
1936 | ln conftest.a conftest.b 2>&5 || hard_links=no |
---|
1937 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1938 | AC_MSG_RESULT([$hard_links]) |
---|
1939 | if test "$hard_links" = no; then |
---|
1940 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) |
---|
1941 | need_locks=warn |
---|
1942 | fi |
---|
1943 | else |
---|
1944 | need_locks=no |
---|
1945 | fi |
---|
1946 | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
---|
1947 | |
---|
1948 | |
---|
1949 | # AC_LIBTOOL_OBJDIR |
---|
1950 | # ----------------- |
---|
1951 | AC_DEFUN([AC_LIBTOOL_OBJDIR], |
---|
1952 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
---|
1953 | [rm -f .libs 2>/dev/null |
---|
1954 | mkdir .libs 2>/dev/null |
---|
1955 | if test -d .libs; then |
---|
1956 | lt_cv_objdir=.libs |
---|
1957 | else |
---|
1958 | # MS-DOS does not allow filenames that begin with a dot. |
---|
1959 | lt_cv_objdir=_libs |
---|
1960 | fi |
---|
1961 | rmdir .libs 2>/dev/null]) |
---|
1962 | objdir=$lt_cv_objdir |
---|
1963 | ])# AC_LIBTOOL_OBJDIR |
---|
1964 | |
---|
1965 | |
---|
1966 | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
---|
1967 | # ---------------------------------------------- |
---|
1968 | # Check hardcoding attributes. |
---|
1969 | AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
---|
1970 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) |
---|
1971 | _LT_AC_TAGVAR(hardcode_action, $1)= |
---|
1972 | if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ |
---|
1973 | test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ |
---|
1974 | test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then |
---|
1975 | |
---|
1976 | # We can hardcode non-existant directories. |
---|
1977 | if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && |
---|
1978 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
---|
1979 | # have to relink, otherwise we might link with an installed library |
---|
1980 | # when we should be linking with a yet-to-be-installed one |
---|
1981 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
---|
1982 | test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then |
---|
1983 | # Linking always hardcodes the temporary library directory. |
---|
1984 | _LT_AC_TAGVAR(hardcode_action, $1)=relink |
---|
1985 | else |
---|
1986 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
---|
1987 | _LT_AC_TAGVAR(hardcode_action, $1)=immediate |
---|
1988 | fi |
---|
1989 | else |
---|
1990 | # We cannot hardcode anything, or else we can only hardcode existing |
---|
1991 | # directories. |
---|
1992 | _LT_AC_TAGVAR(hardcode_action, $1)=unsupported |
---|
1993 | fi |
---|
1994 | AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) |
---|
1995 | |
---|
1996 | if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then |
---|
1997 | # Fast installation is not supported |
---|
1998 | enable_fast_install=no |
---|
1999 | elif test "$shlibpath_overrides_runpath" = yes || |
---|
2000 | test "$enable_shared" = no; then |
---|
2001 | # Fast installation is not necessary |
---|
2002 | enable_fast_install=needless |
---|
2003 | fi |
---|
2004 | ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
---|
2005 | |
---|
2006 | |
---|
2007 | # AC_LIBTOOL_SYS_LIB_STRIP |
---|
2008 | # ------------------------ |
---|
2009 | AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], |
---|
2010 | [striplib= |
---|
2011 | old_striplib= |
---|
2012 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
---|
2013 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
---|
2014 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
---|
2015 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
---|
2016 | AC_MSG_RESULT([yes]) |
---|
2017 | else |
---|
2018 | # FIXME - insert some real tests, host_os isn't really good enough |
---|
2019 | case $host_os in |
---|
2020 | darwin*) |
---|
2021 | if test -n "$STRIP" ; then |
---|
2022 | striplib="$STRIP -x" |
---|
2023 | AC_MSG_RESULT([yes]) |
---|
2024 | else |
---|
2025 | AC_MSG_RESULT([no]) |
---|
2026 | fi |
---|
2027 | ;; |
---|
2028 | *) |
---|
2029 | AC_MSG_RESULT([no]) |
---|
2030 | ;; |
---|
2031 | esac |
---|
2032 | fi |
---|
2033 | ])# AC_LIBTOOL_SYS_LIB_STRIP |
---|
2034 | |
---|
2035 | |
---|
2036 | # AC_LIBTOOL_SYS_DYNAMIC_LINKER |
---|
2037 | # ----------------------------- |
---|
2038 | # PORTME Fill in your ld.so characteristics |
---|
2039 | AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], |
---|
2040 | [AC_MSG_CHECKING([dynamic linker characteristics]) |
---|
2041 | library_names_spec= |
---|
2042 | libname_spec='lib$name' |
---|
2043 | soname_spec= |
---|
2044 | shrext_cmds=".so" |
---|
2045 | postinstall_cmds= |
---|
2046 | postuninstall_cmds= |
---|
2047 | finish_cmds= |
---|
2048 | finish_eval= |
---|
2049 | shlibpath_var= |
---|
2050 | shlibpath_overrides_runpath=unknown |
---|
2051 | version_type=none |
---|
2052 | dynamic_linker="$host_os ld.so" |
---|
2053 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
---|
2054 | if test "$GCC" = yes; then |
---|
2055 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
---|
2056 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then |
---|
2057 | # if the path contains ";" then we assume it to be the separator |
---|
2058 | # otherwise default to the standard path separator (i.e. ":") - it is |
---|
2059 | # assumed that no part of a normal pathname contains ";" but that should |
---|
2060 | # okay in the real world where ";" in dirpaths is itself problematic. |
---|
2061 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
---|
2062 | else |
---|
2063 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
---|
2064 | fi |
---|
2065 | else |
---|
2066 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
---|
2067 | fi |
---|
2068 | need_lib_prefix=unknown |
---|
2069 | hardcode_into_libs=no |
---|
2070 | |
---|
2071 | # when you set need_version to no, make sure it does not cause -set_version |
---|
2072 | # flags to be left without arguments |
---|
2073 | need_version=unknown |
---|
2074 | |
---|
2075 | case $host_os in |
---|
2076 | aix3*) |
---|
2077 | version_type=linux |
---|
2078 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' |
---|
2079 | shlibpath_var=LIBPATH |
---|
2080 | |
---|
2081 | # AIX 3 has no versioning support, so we append a major version to the name. |
---|
2082 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2083 | ;; |
---|
2084 | |
---|
2085 | aix4* | aix5*) |
---|
2086 | version_type=linux |
---|
2087 | need_lib_prefix=no |
---|
2088 | need_version=no |
---|
2089 | hardcode_into_libs=yes |
---|
2090 | if test "$host_cpu" = ia64; then |
---|
2091 | # AIX 5 supports IA64 |
---|
2092 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' |
---|
2093 | shlibpath_var=LD_LIBRARY_PATH |
---|
2094 | else |
---|
2095 | # With GCC up to 2.95.x, collect2 would create an import file |
---|
2096 | # for dependence libraries. The import file would start with |
---|
2097 | # the line `#! .'. This would cause the generated library to |
---|
2098 | # depend on `.', always an invalid library. This was fixed in |
---|
2099 | # development snapshots of GCC prior to 3.0. |
---|
2100 | case $host_os in |
---|
2101 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
---|
2102 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
---|
2103 | echo ' yes ' |
---|
2104 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
---|
2105 | : |
---|
2106 | else |
---|
2107 | can_build_shared=no |
---|
2108 | fi |
---|
2109 | ;; |
---|
2110 | esac |
---|
2111 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
---|
2112 | # soname into executable. Probably we can add versioning support to |
---|
2113 | # collect2, so additional links can be useful in future. |
---|
2114 | if test "$aix_use_runtimelinking" = yes; then |
---|
2115 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
---|
2116 | # instead of lib<name>.a to let people know that these are not |
---|
2117 | # typical AIX shared libraries. |
---|
2118 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2119 | else |
---|
2120 | # We preserve .a as extension for shared libraries through AIX4.2 |
---|
2121 | # and later when we are not doing run time linking. |
---|
2122 | library_names_spec='${libname}${release}.a $libname.a' |
---|
2123 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2124 | fi |
---|
2125 | shlibpath_var=LIBPATH |
---|
2126 | fi |
---|
2127 | ;; |
---|
2128 | |
---|
2129 | amigaos*) |
---|
2130 | library_names_spec='$libname.ixlibrary $libname.a' |
---|
2131 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
---|
2132 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
---|
2133 | ;; |
---|
2134 | |
---|
2135 | beos*) |
---|
2136 | library_names_spec='${libname}${shared_ext}' |
---|
2137 | dynamic_linker="$host_os ld.so" |
---|
2138 | shlibpath_var=LIBRARY_PATH |
---|
2139 | ;; |
---|
2140 | |
---|
2141 | bsdi4*) |
---|
2142 | version_type=linux |
---|
2143 | need_version=no |
---|
2144 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2145 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2146 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
---|
2147 | shlibpath_var=LD_LIBRARY_PATH |
---|
2148 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
---|
2149 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
---|
2150 | # the default ld.so.conf also contains /usr/contrib/lib and |
---|
2151 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
---|
2152 | # libtool to hard-code these into programs |
---|
2153 | ;; |
---|
2154 | |
---|
2155 | cygwin* | mingw* | pw32*) |
---|
2156 | version_type=windows |
---|
2157 | shrext_cmds=".dll" |
---|
2158 | need_version=no |
---|
2159 | need_lib_prefix=no |
---|
2160 | |
---|
2161 | case $GCC,$host_os in |
---|
2162 | yes,cygwin* | yes,mingw* | yes,pw32*) |
---|
2163 | library_names_spec='$libname.dll.a' |
---|
2164 | # DLL is installed to $(libdir)/../bin by postinstall_cmds |
---|
2165 | postinstall_cmds='base_file=`basename \${file}`~ |
---|
2166 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ |
---|
2167 | dldir=$destdir/`dirname \$dlpath`~ |
---|
2168 | test -d \$dldir || mkdir -p \$dldir~ |
---|
2169 | $install_prog $dir/$dlname \$dldir/$dlname' |
---|
2170 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
---|
2171 | dlpath=$dir/\$dldll~ |
---|
2172 | $rm \$dlpath' |
---|
2173 | shlibpath_overrides_runpath=yes |
---|
2174 | |
---|
2175 | case $host_os in |
---|
2176 | cygwin*) |
---|
2177 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
---|
2178 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
---|
2179 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" |
---|
2180 | ;; |
---|
2181 | mingw*) |
---|
2182 | # MinGW DLLs use traditional 'lib' prefix |
---|
2183 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
---|
2184 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
---|
2185 | if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then |
---|
2186 | # It is most probably a Windows format PATH printed by |
---|
2187 | # mingw gcc, but we are running on Cygwin. Gcc prints its search |
---|
2188 | # path with ; separators, and with drive letters. We can handle the |
---|
2189 | # drive letters (cygwin fileutils understands them), so leave them, |
---|
2190 | # especially as we might pass files found there to a mingw objdump, |
---|
2191 | # which wouldn't understand a cygwinified path. Ahh. |
---|
2192 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
---|
2193 | else |
---|
2194 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
---|
2195 | fi |
---|
2196 | ;; |
---|
2197 | pw32*) |
---|
2198 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
---|
2199 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' |
---|
2200 | ;; |
---|
2201 | esac |
---|
2202 | ;; |
---|
2203 | |
---|
2204 | *) |
---|
2205 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' |
---|
2206 | ;; |
---|
2207 | esac |
---|
2208 | dynamic_linker='Win32 ld.exe' |
---|
2209 | # FIXME: first we should search . and the directory the executable is in |
---|
2210 | shlibpath_var=PATH |
---|
2211 | ;; |
---|
2212 | |
---|
2213 | darwin* | rhapsody*) |
---|
2214 | dynamic_linker="$host_os dyld" |
---|
2215 | version_type=darwin |
---|
2216 | need_lib_prefix=no |
---|
2217 | need_version=no |
---|
2218 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' |
---|
2219 | soname_spec='${libname}${release}${major}$shared_ext' |
---|
2220 | shlibpath_overrides_runpath=yes |
---|
2221 | shlibpath_var=DYLD_LIBRARY_PATH |
---|
2222 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' |
---|
2223 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. |
---|
2224 | if test "$GCC" = yes; then |
---|
2225 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` |
---|
2226 | else |
---|
2227 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' |
---|
2228 | fi |
---|
2229 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' |
---|
2230 | ;; |
---|
2231 | |
---|
2232 | dgux*) |
---|
2233 | version_type=linux |
---|
2234 | need_lib_prefix=no |
---|
2235 | need_version=no |
---|
2236 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' |
---|
2237 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2238 | shlibpath_var=LD_LIBRARY_PATH |
---|
2239 | ;; |
---|
2240 | |
---|
2241 | freebsd1*) |
---|
2242 | dynamic_linker=no |
---|
2243 | ;; |
---|
2244 | |
---|
2245 | kfreebsd*-gnu) |
---|
2246 | version_type=linux |
---|
2247 | need_lib_prefix=no |
---|
2248 | need_version=no |
---|
2249 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
---|
2250 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2251 | shlibpath_var=LD_LIBRARY_PATH |
---|
2252 | shlibpath_overrides_runpath=no |
---|
2253 | hardcode_into_libs=yes |
---|
2254 | dynamic_linker='GNU ld.so' |
---|
2255 | ;; |
---|
2256 | |
---|
2257 | freebsd*) |
---|
2258 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
---|
2259 | version_type=freebsd-$objformat |
---|
2260 | case $version_type in |
---|
2261 | freebsd-elf*) |
---|
2262 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
---|
2263 | need_version=no |
---|
2264 | need_lib_prefix=no |
---|
2265 | ;; |
---|
2266 | freebsd-*) |
---|
2267 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' |
---|
2268 | need_version=yes |
---|
2269 | ;; |
---|
2270 | esac |
---|
2271 | shlibpath_var=LD_LIBRARY_PATH |
---|
2272 | case $host_os in |
---|
2273 | freebsd2*) |
---|
2274 | shlibpath_overrides_runpath=yes |
---|
2275 | ;; |
---|
2276 | freebsd3.[01]* | freebsdelf3.[01]*) |
---|
2277 | shlibpath_overrides_runpath=yes |
---|
2278 | hardcode_into_libs=yes |
---|
2279 | ;; |
---|
2280 | *) # from 3.2 on |
---|
2281 | shlibpath_overrides_runpath=no |
---|
2282 | hardcode_into_libs=yes |
---|
2283 | ;; |
---|
2284 | esac |
---|
2285 | ;; |
---|
2286 | |
---|
2287 | gnu*) |
---|
2288 | version_type=linux |
---|
2289 | need_lib_prefix=no |
---|
2290 | need_version=no |
---|
2291 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' |
---|
2292 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2293 | shlibpath_var=LD_LIBRARY_PATH |
---|
2294 | hardcode_into_libs=yes |
---|
2295 | ;; |
---|
2296 | |
---|
2297 | hpux9* | hpux10* | hpux11*) |
---|
2298 | # Give a soname corresponding to the major version so that dld.sl refuses to |
---|
2299 | # link against other versions. |
---|
2300 | version_type=sunos |
---|
2301 | need_lib_prefix=no |
---|
2302 | need_version=no |
---|
2303 | case "$host_cpu" in |
---|
2304 | ia64*) |
---|
2305 | shrext_cmds='.so' |
---|
2306 | hardcode_into_libs=yes |
---|
2307 | dynamic_linker="$host_os dld.so" |
---|
2308 | shlibpath_var=LD_LIBRARY_PATH |
---|
2309 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
---|
2310 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2311 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2312 | if test "X$HPUX_IA64_MODE" = X32; then |
---|
2313 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
---|
2314 | else |
---|
2315 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
---|
2316 | fi |
---|
2317 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
---|
2318 | ;; |
---|
2319 | hppa*64*) |
---|
2320 | shrext_cmds='.sl' |
---|
2321 | hardcode_into_libs=yes |
---|
2322 | dynamic_linker="$host_os dld.sl" |
---|
2323 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH |
---|
2324 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
---|
2325 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2326 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2327 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" |
---|
2328 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
---|
2329 | ;; |
---|
2330 | *) |
---|
2331 | shrext_cmds='.sl' |
---|
2332 | dynamic_linker="$host_os dld.sl" |
---|
2333 | shlibpath_var=SHLIB_PATH |
---|
2334 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
---|
2335 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2336 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2337 | ;; |
---|
2338 | esac |
---|
2339 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
---|
2340 | postinstall_cmds='chmod 555 $lib' |
---|
2341 | ;; |
---|
2342 | |
---|
2343 | irix5* | irix6* | nonstopux*) |
---|
2344 | case $host_os in |
---|
2345 | nonstopux*) version_type=nonstopux ;; |
---|
2346 | *) |
---|
2347 | if test "$lt_cv_prog_gnu_ld" = yes; then |
---|
2348 | version_type=linux |
---|
2349 | else |
---|
2350 | version_type=irix |
---|
2351 | fi ;; |
---|
2352 | esac |
---|
2353 | need_lib_prefix=no |
---|
2354 | need_version=no |
---|
2355 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2356 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' |
---|
2357 | case $host_os in |
---|
2358 | irix5* | nonstopux*) |
---|
2359 | libsuff= shlibsuff= |
---|
2360 | ;; |
---|
2361 | *) |
---|
2362 | case $LD in # libtool.m4 will add one of these switches to LD |
---|
2363 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") |
---|
2364 | libsuff= shlibsuff= libmagic=32-bit;; |
---|
2365 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") |
---|
2366 | libsuff=32 shlibsuff=N32 libmagic=N32;; |
---|
2367 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") |
---|
2368 | libsuff=64 shlibsuff=64 libmagic=64-bit;; |
---|
2369 | *) libsuff= shlibsuff= libmagic=never-match;; |
---|
2370 | esac |
---|
2371 | ;; |
---|
2372 | esac |
---|
2373 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
---|
2374 | shlibpath_overrides_runpath=no |
---|
2375 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
---|
2376 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
---|
2377 | hardcode_into_libs=yes |
---|
2378 | ;; |
---|
2379 | |
---|
2380 | # No shared lib support for Linux oldld, aout, or coff. |
---|
2381 | linux*oldld* | linux*aout* | linux*coff*) |
---|
2382 | dynamic_linker=no |
---|
2383 | ;; |
---|
2384 | |
---|
2385 | # This must be Linux ELF. |
---|
2386 | linux*) |
---|
2387 | version_type=linux |
---|
2388 | need_lib_prefix=no |
---|
2389 | need_version=no |
---|
2390 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2391 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2392 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
---|
2393 | shlibpath_var=LD_LIBRARY_PATH |
---|
2394 | shlibpath_overrides_runpath=no |
---|
2395 | # This implies no fast_install, which is unacceptable. |
---|
2396 | # Some rework will be needed to allow for fast_install |
---|
2397 | # before this can be enabled. |
---|
2398 | hardcode_into_libs=yes |
---|
2399 | |
---|
2400 | # find out which ABI we are using |
---|
2401 | libsuff= |
---|
2402 | case "$host_cpu" in |
---|
2403 | x86_64*|s390x*|powerpc64*) |
---|
2404 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
2405 | if AC_TRY_EVAL(ac_compile); then |
---|
2406 | case `/usr/bin/file conftest.$ac_objext` in |
---|
2407 | *64-bit*) |
---|
2408 | libsuff=64 |
---|
2409 | sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" |
---|
2410 | ;; |
---|
2411 | esac |
---|
2412 | fi |
---|
2413 | rm -rf conftest* |
---|
2414 | ;; |
---|
2415 | esac |
---|
2416 | |
---|
2417 | # Append ld.so.conf contents to the search path |
---|
2418 | if test -f /etc/ld.so.conf; then |
---|
2419 | lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` |
---|
2420 | sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" |
---|
2421 | fi |
---|
2422 | |
---|
2423 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
---|
2424 | # powerpc, because MkLinux only supported shared libraries with the |
---|
2425 | # GNU dynamic linker. Since this was broken with cross compilers, |
---|
2426 | # most powerpc-linux boxes support dynamic linking these days and |
---|
2427 | # people can always --disable-shared, the test was removed, and we |
---|
2428 | # assume the GNU/Linux dynamic linker is in use. |
---|
2429 | dynamic_linker='GNU/Linux ld.so' |
---|
2430 | ;; |
---|
2431 | |
---|
2432 | knetbsd*-gnu) |
---|
2433 | version_type=linux |
---|
2434 | need_lib_prefix=no |
---|
2435 | need_version=no |
---|
2436 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
---|
2437 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2438 | shlibpath_var=LD_LIBRARY_PATH |
---|
2439 | shlibpath_overrides_runpath=no |
---|
2440 | hardcode_into_libs=yes |
---|
2441 | dynamic_linker='GNU ld.so' |
---|
2442 | ;; |
---|
2443 | |
---|
2444 | netbsd*) |
---|
2445 | version_type=sunos |
---|
2446 | need_lib_prefix=no |
---|
2447 | need_version=no |
---|
2448 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2449 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2450 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2451 | dynamic_linker='NetBSD (a.out) ld.so' |
---|
2452 | else |
---|
2453 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
---|
2454 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2455 | dynamic_linker='NetBSD ld.elf_so' |
---|
2456 | fi |
---|
2457 | shlibpath_var=LD_LIBRARY_PATH |
---|
2458 | shlibpath_overrides_runpath=yes |
---|
2459 | hardcode_into_libs=yes |
---|
2460 | ;; |
---|
2461 | |
---|
2462 | newsos6) |
---|
2463 | version_type=linux |
---|
2464 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2465 | shlibpath_var=LD_LIBRARY_PATH |
---|
2466 | shlibpath_overrides_runpath=yes |
---|
2467 | ;; |
---|
2468 | |
---|
2469 | nto-qnx*) |
---|
2470 | version_type=linux |
---|
2471 | need_lib_prefix=no |
---|
2472 | need_version=no |
---|
2473 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2474 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2475 | shlibpath_var=LD_LIBRARY_PATH |
---|
2476 | shlibpath_overrides_runpath=yes |
---|
2477 | ;; |
---|
2478 | |
---|
2479 | openbsd*) |
---|
2480 | version_type=sunos |
---|
2481 | need_lib_prefix=no |
---|
2482 | need_version=yes |
---|
2483 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2484 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2485 | shlibpath_var=LD_LIBRARY_PATH |
---|
2486 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2487 | case $host_os in |
---|
2488 | openbsd2.[[89]] | openbsd2.[[89]].*) |
---|
2489 | shlibpath_overrides_runpath=no |
---|
2490 | ;; |
---|
2491 | *) |
---|
2492 | shlibpath_overrides_runpath=yes |
---|
2493 | ;; |
---|
2494 | esac |
---|
2495 | else |
---|
2496 | shlibpath_overrides_runpath=yes |
---|
2497 | fi |
---|
2498 | ;; |
---|
2499 | |
---|
2500 | os2*) |
---|
2501 | libname_spec='$name' |
---|
2502 | shrext_cmds=".dll" |
---|
2503 | need_lib_prefix=no |
---|
2504 | library_names_spec='$libname${shared_ext} $libname.a' |
---|
2505 | dynamic_linker='OS/2 ld.exe' |
---|
2506 | shlibpath_var=LIBPATH |
---|
2507 | ;; |
---|
2508 | |
---|
2509 | osf3* | osf4* | osf5*) |
---|
2510 | version_type=osf |
---|
2511 | need_lib_prefix=no |
---|
2512 | need_version=no |
---|
2513 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2514 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2515 | shlibpath_var=LD_LIBRARY_PATH |
---|
2516 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
---|
2517 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
---|
2518 | ;; |
---|
2519 | |
---|
2520 | sco3.2v5*) |
---|
2521 | version_type=osf |
---|
2522 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2523 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2524 | shlibpath_var=LD_LIBRARY_PATH |
---|
2525 | ;; |
---|
2526 | |
---|
2527 | solaris*) |
---|
2528 | version_type=linux |
---|
2529 | need_lib_prefix=no |
---|
2530 | need_version=no |
---|
2531 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2532 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2533 | shlibpath_var=LD_LIBRARY_PATH |
---|
2534 | shlibpath_overrides_runpath=yes |
---|
2535 | hardcode_into_libs=yes |
---|
2536 | # ldd complains unless libraries are executable |
---|
2537 | postinstall_cmds='chmod +x $lib' |
---|
2538 | ;; |
---|
2539 | |
---|
2540 | sunos4*) |
---|
2541 | version_type=sunos |
---|
2542 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2543 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
---|
2544 | shlibpath_var=LD_LIBRARY_PATH |
---|
2545 | shlibpath_overrides_runpath=yes |
---|
2546 | if test "$with_gnu_ld" = yes; then |
---|
2547 | need_lib_prefix=no |
---|
2548 | fi |
---|
2549 | need_version=yes |
---|
2550 | ;; |
---|
2551 | |
---|
2552 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
2553 | version_type=linux |
---|
2554 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2555 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2556 | shlibpath_var=LD_LIBRARY_PATH |
---|
2557 | case $host_vendor in |
---|
2558 | sni) |
---|
2559 | shlibpath_overrides_runpath=no |
---|
2560 | need_lib_prefix=no |
---|
2561 | export_dynamic_flag_spec='${wl}-Blargedynsym' |
---|
2562 | runpath_var=LD_RUN_PATH |
---|
2563 | ;; |
---|
2564 | siemens) |
---|
2565 | need_lib_prefix=no |
---|
2566 | ;; |
---|
2567 | motorola) |
---|
2568 | need_lib_prefix=no |
---|
2569 | need_version=no |
---|
2570 | shlibpath_overrides_runpath=no |
---|
2571 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
---|
2572 | ;; |
---|
2573 | esac |
---|
2574 | ;; |
---|
2575 | |
---|
2576 | sysv4*MP*) |
---|
2577 | if test -d /usr/nec ;then |
---|
2578 | version_type=linux |
---|
2579 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' |
---|
2580 | soname_spec='$libname${shared_ext}.$major' |
---|
2581 | shlibpath_var=LD_LIBRARY_PATH |
---|
2582 | fi |
---|
2583 | ;; |
---|
2584 | |
---|
2585 | uts4*) |
---|
2586 | version_type=linux |
---|
2587 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2588 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2589 | shlibpath_var=LD_LIBRARY_PATH |
---|
2590 | ;; |
---|
2591 | |
---|
2592 | *) |
---|
2593 | dynamic_linker=no |
---|
2594 | ;; |
---|
2595 | esac |
---|
2596 | AC_MSG_RESULT([$dynamic_linker]) |
---|
2597 | test "$dynamic_linker" = no && can_build_shared=no |
---|
2598 | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
---|
2599 | |
---|
2600 | |
---|
2601 | # _LT_AC_TAGCONFIG |
---|
2602 | # ---------------- |
---|
2603 | AC_DEFUN([_LT_AC_TAGCONFIG], |
---|
2604 | [AC_ARG_WITH([tags], |
---|
2605 | [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], |
---|
2606 | [include additional configurations @<:@automatic@:>@])], |
---|
2607 | [tagnames="$withval"]) |
---|
2608 | |
---|
2609 | if test -f "$ltmain" && test -n "$tagnames"; then |
---|
2610 | if test ! -f "${ofile}"; then |
---|
2611 | AC_MSG_WARN([output file `$ofile' does not exist]) |
---|
2612 | fi |
---|
2613 | |
---|
2614 | if test -z "$LTCC"; then |
---|
2615 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" |
---|
2616 | if test -z "$LTCC"; then |
---|
2617 | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) |
---|
2618 | else |
---|
2619 | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) |
---|
2620 | fi |
---|
2621 | fi |
---|
2622 | |
---|
2623 | # Extract list of available tagged configurations in $ofile. |
---|
2624 | # Note that this assumes the entire list is on one line. |
---|
2625 | available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
---|
2626 | |
---|
2627 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2628 | for tagname in $tagnames; do |
---|
2629 | IFS="$lt_save_ifs" |
---|
2630 | # Check whether tagname contains only valid characters |
---|
2631 | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in |
---|
2632 | "") ;; |
---|
2633 | *) AC_MSG_ERROR([invalid tag name: $tagname]) |
---|
2634 | ;; |
---|
2635 | esac |
---|
2636 | |
---|
2637 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null |
---|
2638 | then |
---|
2639 | AC_MSG_ERROR([tag name \"$tagname\" already exists]) |
---|
2640 | fi |
---|
2641 | |
---|
2642 | # Update the list of available tags. |
---|
2643 | if test -n "$tagname"; then |
---|
2644 | echo appending configuration tag \"$tagname\" to $ofile |
---|
2645 | |
---|
2646 | case $tagname in |
---|
2647 | CXX) |
---|
2648 | if test -n "$CXX" && test "X$CXX" != "Xno"; then |
---|
2649 | AC_LIBTOOL_LANG_CXX_CONFIG |
---|
2650 | else |
---|
2651 | tagname="" |
---|
2652 | fi |
---|
2653 | ;; |
---|
2654 | |
---|
2655 | F77) |
---|
2656 | if test -n "$F77" && test "X$F77" != "Xno"; then |
---|
2657 | AC_LIBTOOL_LANG_F77_CONFIG |
---|
2658 | else |
---|
2659 | tagname="" |
---|
2660 | fi |
---|
2661 | ;; |
---|
2662 | |
---|
2663 | GCJ) |
---|
2664 | if test -n "$GCJ" && test "X$GCJ" != "Xno"; then |
---|
2665 | AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
2666 | else |
---|
2667 | tagname="" |
---|
2668 | fi |
---|
2669 | ;; |
---|
2670 | |
---|
2671 | RC) |
---|
2672 | AC_LIBTOOL_LANG_RC_CONFIG |
---|
2673 | ;; |
---|
2674 | |
---|
2675 | *) |
---|
2676 | AC_MSG_ERROR([Unsupported tag name: $tagname]) |
---|
2677 | ;; |
---|
2678 | esac |
---|
2679 | |
---|
2680 | # Append the new tag name to the list of available tags. |
---|
2681 | if test -n "$tagname" ; then |
---|
2682 | available_tags="$available_tags $tagname" |
---|
2683 | fi |
---|
2684 | fi |
---|
2685 | done |
---|
2686 | IFS="$lt_save_ifs" |
---|
2687 | |
---|
2688 | # Now substitute the updated list of available tags. |
---|
2689 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then |
---|
2690 | mv "${ofile}T" "$ofile" |
---|
2691 | chmod +x "$ofile" |
---|
2692 | else |
---|
2693 | rm -f "${ofile}T" |
---|
2694 | AC_MSG_ERROR([unable to update list of available tagged configurations.]) |
---|
2695 | fi |
---|
2696 | fi |
---|
2697 | ])# _LT_AC_TAGCONFIG |
---|
2698 | |
---|
2699 | |
---|
2700 | # AC_LIBTOOL_DLOPEN |
---|
2701 | # ----------------- |
---|
2702 | # enable checks for dlopen support |
---|
2703 | AC_DEFUN([AC_LIBTOOL_DLOPEN], |
---|
2704 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) |
---|
2705 | ])# AC_LIBTOOL_DLOPEN |
---|
2706 | |
---|
2707 | |
---|
2708 | # AC_LIBTOOL_WIN32_DLL |
---|
2709 | # -------------------- |
---|
2710 | # declare package support for building win32 dll's |
---|
2711 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], |
---|
2712 | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) |
---|
2713 | ])# AC_LIBTOOL_WIN32_DLL |
---|
2714 | |
---|
2715 | |
---|
2716 | # AC_ENABLE_SHARED([DEFAULT]) |
---|
2717 | # --------------------------- |
---|
2718 | # implement the --enable-shared flag |
---|
2719 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2720 | AC_DEFUN([AC_ENABLE_SHARED], |
---|
2721 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2722 | AC_ARG_ENABLE([shared], |
---|
2723 | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
---|
2724 | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], |
---|
2725 | [p=${PACKAGE-default} |
---|
2726 | case $enableval in |
---|
2727 | yes) enable_shared=yes ;; |
---|
2728 | no) enable_shared=no ;; |
---|
2729 | *) |
---|
2730 | enable_shared=no |
---|
2731 | # Look at the argument we got. We use all the common list separators. |
---|
2732 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2733 | for pkg in $enableval; do |
---|
2734 | IFS="$lt_save_ifs" |
---|
2735 | if test "X$pkg" = "X$p"; then |
---|
2736 | enable_shared=yes |
---|
2737 | fi |
---|
2738 | done |
---|
2739 | IFS="$lt_save_ifs" |
---|
2740 | ;; |
---|
2741 | esac], |
---|
2742 | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) |
---|
2743 | ])# AC_ENABLE_SHARED |
---|
2744 | |
---|
2745 | |
---|
2746 | # AC_DISABLE_SHARED |
---|
2747 | # ----------------- |
---|
2748 | #- set the default shared flag to --disable-shared |
---|
2749 | AC_DEFUN([AC_DISABLE_SHARED], |
---|
2750 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2751 | AC_ENABLE_SHARED(no) |
---|
2752 | ])# AC_DISABLE_SHARED |
---|
2753 | |
---|
2754 | |
---|
2755 | # AC_ENABLE_STATIC([DEFAULT]) |
---|
2756 | # --------------------------- |
---|
2757 | # implement the --enable-static flag |
---|
2758 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2759 | AC_DEFUN([AC_ENABLE_STATIC], |
---|
2760 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2761 | AC_ARG_ENABLE([static], |
---|
2762 | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
---|
2763 | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], |
---|
2764 | [p=${PACKAGE-default} |
---|
2765 | case $enableval in |
---|
2766 | yes) enable_static=yes ;; |
---|
2767 | no) enable_static=no ;; |
---|
2768 | *) |
---|
2769 | enable_static=no |
---|
2770 | # Look at the argument we got. We use all the common list separators. |
---|
2771 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2772 | for pkg in $enableval; do |
---|
2773 | IFS="$lt_save_ifs" |
---|
2774 | if test "X$pkg" = "X$p"; then |
---|
2775 | enable_static=yes |
---|
2776 | fi |
---|
2777 | done |
---|
2778 | IFS="$lt_save_ifs" |
---|
2779 | ;; |
---|
2780 | esac], |
---|
2781 | [enable_static=]AC_ENABLE_STATIC_DEFAULT) |
---|
2782 | ])# AC_ENABLE_STATIC |
---|
2783 | |
---|
2784 | |
---|
2785 | # AC_DISABLE_STATIC |
---|
2786 | # ----------------- |
---|
2787 | # set the default static flag to --disable-static |
---|
2788 | AC_DEFUN([AC_DISABLE_STATIC], |
---|
2789 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2790 | AC_ENABLE_STATIC(no) |
---|
2791 | ])# AC_DISABLE_STATIC |
---|
2792 | |
---|
2793 | |
---|
2794 | # AC_ENABLE_FAST_INSTALL([DEFAULT]) |
---|
2795 | # --------------------------------- |
---|
2796 | # implement the --enable-fast-install flag |
---|
2797 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2798 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
---|
2799 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2800 | AC_ARG_ENABLE([fast-install], |
---|
2801 | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
---|
2802 | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
---|
2803 | [p=${PACKAGE-default} |
---|
2804 | case $enableval in |
---|
2805 | yes) enable_fast_install=yes ;; |
---|
2806 | no) enable_fast_install=no ;; |
---|
2807 | *) |
---|
2808 | enable_fast_install=no |
---|
2809 | # Look at the argument we got. We use all the common list separators. |
---|
2810 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2811 | for pkg in $enableval; do |
---|
2812 | IFS="$lt_save_ifs" |
---|
2813 | if test "X$pkg" = "X$p"; then |
---|
2814 | enable_fast_install=yes |
---|
2815 | fi |
---|
2816 | done |
---|
2817 | IFS="$lt_save_ifs" |
---|
2818 | ;; |
---|
2819 | esac], |
---|
2820 | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) |
---|
2821 | ])# AC_ENABLE_FAST_INSTALL |
---|
2822 | |
---|
2823 | |
---|
2824 | # AC_DISABLE_FAST_INSTALL |
---|
2825 | # ----------------------- |
---|
2826 | # set the default to --disable-fast-install |
---|
2827 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
---|
2828 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2829 | AC_ENABLE_FAST_INSTALL(no) |
---|
2830 | ])# AC_DISABLE_FAST_INSTALL |
---|
2831 | |
---|
2832 | |
---|
2833 | # AC_LIBTOOL_PICMODE([MODE]) |
---|
2834 | # -------------------------- |
---|
2835 | # implement the --with-pic flag |
---|
2836 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. |
---|
2837 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
---|
2838 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2839 | pic_mode=ifelse($#,1,$1,default) |
---|
2840 | ])# AC_LIBTOOL_PICMODE |
---|
2841 | |
---|
2842 | |
---|
2843 | # AC_PROG_EGREP |
---|
2844 | # ------------- |
---|
2845 | # This is predefined starting with Autoconf 2.54, so this conditional |
---|
2846 | # definition can be removed once we require Autoconf 2.54 or later. |
---|
2847 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], |
---|
2848 | [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], |
---|
2849 | [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
---|
2850 | then ac_cv_prog_egrep='grep -E' |
---|
2851 | else ac_cv_prog_egrep='egrep' |
---|
2852 | fi]) |
---|
2853 | EGREP=$ac_cv_prog_egrep |
---|
2854 | AC_SUBST([EGREP]) |
---|
2855 | ])]) |
---|
2856 | |
---|
2857 | |
---|
2858 | # AC_PATH_TOOL_PREFIX |
---|
2859 | # ------------------- |
---|
2860 | # find a file program which can recognise shared library |
---|
2861 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
---|
2862 | [AC_REQUIRE([AC_PROG_EGREP])dnl |
---|
2863 | AC_MSG_CHECKING([for $1]) |
---|
2864 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
---|
2865 | [case $MAGIC_CMD in |
---|
2866 | [[\\/*] | ?:[\\/]*]) |
---|
2867 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
---|
2868 | ;; |
---|
2869 | *) |
---|
2870 | lt_save_MAGIC_CMD="$MAGIC_CMD" |
---|
2871 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
2872 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
---|
2873 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
---|
2874 | dnl not every word. This closes a longstanding sh security hole. |
---|
2875 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
---|
2876 | for ac_dir in $ac_dummy; do |
---|
2877 | IFS="$lt_save_ifs" |
---|
2878 | test -z "$ac_dir" && ac_dir=. |
---|
2879 | if test -f $ac_dir/$1; then |
---|
2880 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
---|
2881 | if test -n "$file_magic_test_file"; then |
---|
2882 | case $deplibs_check_method in |
---|
2883 | "file_magic "*) |
---|
2884 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
---|
2885 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
2886 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
---|
2887 | $EGREP "$file_magic_regex" > /dev/null; then |
---|
2888 | : |
---|
2889 | else |
---|
2890 | cat <<EOF 1>&2 |
---|
2891 | |
---|
2892 | *** Warning: the command libtool uses to detect shared libraries, |
---|
2893 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
---|
2894 | *** The result is that libtool may fail to recognize shared libraries |
---|
2895 | *** as such. This will affect the creation of libtool libraries that |
---|
2896 | *** depend on shared libraries, but programs linked with such libtool |
---|
2897 | *** libraries will work regardless of this problem. Nevertheless, you |
---|
2898 | *** may want to report the problem to your system manager and/or to |
---|
2899 | *** bug-libtool@gnu.org |
---|
2900 | |
---|
2901 | EOF |
---|
2902 | fi ;; |
---|
2903 | esac |
---|
2904 | fi |
---|
2905 | break |
---|
2906 | fi |
---|
2907 | done |
---|
2908 | IFS="$lt_save_ifs" |
---|
2909 | MAGIC_CMD="$lt_save_MAGIC_CMD" |
---|
2910 | ;; |
---|
2911 | esac]) |
---|
2912 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
2913 | if test -n "$MAGIC_CMD"; then |
---|
2914 | AC_MSG_RESULT($MAGIC_CMD) |
---|
2915 | else |
---|
2916 | AC_MSG_RESULT(no) |
---|
2917 | fi |
---|
2918 | ])# AC_PATH_TOOL_PREFIX |
---|
2919 | |
---|
2920 | |
---|
2921 | # AC_PATH_MAGIC |
---|
2922 | # ------------- |
---|
2923 | # find a file program which can recognise a shared library |
---|
2924 | AC_DEFUN([AC_PATH_MAGIC], |
---|
2925 | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
---|
2926 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
---|
2927 | if test -n "$ac_tool_prefix"; then |
---|
2928 | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
---|
2929 | else |
---|
2930 | MAGIC_CMD=: |
---|
2931 | fi |
---|
2932 | fi |
---|
2933 | ])# AC_PATH_MAGIC |
---|
2934 | |
---|
2935 | |
---|
2936 | # AC_PROG_LD |
---|
2937 | # ---------- |
---|
2938 | # find the pathname to the GNU or non-GNU linker |
---|
2939 | AC_DEFUN([AC_PROG_LD], |
---|
2940 | [AC_ARG_WITH([gnu-ld], |
---|
2941 | [AC_HELP_STRING([--with-gnu-ld], |
---|
2942 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
---|
2943 | [test "$withval" = no || with_gnu_ld=yes], |
---|
2944 | [with_gnu_ld=no]) |
---|
2945 | AC_REQUIRE([LT_AC_PROG_SED])dnl |
---|
2946 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
2947 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
2948 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
2949 | ac_prog=ld |
---|
2950 | if test "$GCC" = yes; then |
---|
2951 | # Check if gcc -print-prog-name=ld gives a path. |
---|
2952 | AC_MSG_CHECKING([for ld used by $CC]) |
---|
2953 | case $host in |
---|
2954 | *-*-mingw*) |
---|
2955 | # gcc leaves a trailing carriage return which upsets mingw |
---|
2956 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
2957 | *) |
---|
2958 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
2959 | esac |
---|
2960 | case $ac_prog in |
---|
2961 | # Accept absolute paths. |
---|
2962 | [[\\/]]* | ?:[[\\/]]*) |
---|
2963 | re_direlt='/[[^/]][[^/]]*/\.\./' |
---|
2964 | # Canonicalize the pathname of ld |
---|
2965 | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` |
---|
2966 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
2967 | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` |
---|
2968 | done |
---|
2969 | test -z "$LD" && LD="$ac_prog" |
---|
2970 | ;; |
---|
2971 | "") |
---|
2972 | # If it fails, then pretend we aren't using GCC. |
---|
2973 | ac_prog=ld |
---|
2974 | ;; |
---|
2975 | *) |
---|
2976 | # If it is relative, then search for the first ld in PATH. |
---|
2977 | with_gnu_ld=unknown |
---|
2978 | ;; |
---|
2979 | esac |
---|
2980 | elif test "$with_gnu_ld" = yes; then |
---|
2981 | AC_MSG_CHECKING([for GNU ld]) |
---|
2982 | else |
---|
2983 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
2984 | fi |
---|
2985 | AC_CACHE_VAL(lt_cv_path_LD, |
---|
2986 | [if test -z "$LD"; then |
---|
2987 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
2988 | for ac_dir in $PATH; do |
---|
2989 | IFS="$lt_save_ifs" |
---|
2990 | test -z "$ac_dir" && ac_dir=. |
---|
2991 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
2992 | lt_cv_path_LD="$ac_dir/$ac_prog" |
---|
2993 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
2994 | # but apparently some GNU ld's only accept -v. |
---|
2995 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
2996 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
---|
2997 | *GNU* | *'with BFD'*) |
---|
2998 | test "$with_gnu_ld" != no && break |
---|
2999 | ;; |
---|
3000 | *) |
---|
3001 | test "$with_gnu_ld" != yes && break |
---|
3002 | ;; |
---|
3003 | esac |
---|
3004 | fi |
---|
3005 | done |
---|
3006 | IFS="$lt_save_ifs" |
---|
3007 | else |
---|
3008 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
3009 | fi]) |
---|
3010 | LD="$lt_cv_path_LD" |
---|
3011 | if test -n "$LD"; then |
---|
3012 | AC_MSG_RESULT($LD) |
---|
3013 | else |
---|
3014 | AC_MSG_RESULT(no) |
---|
3015 | fi |
---|
3016 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
3017 | AC_PROG_LD_GNU |
---|
3018 | ])# AC_PROG_LD |
---|
3019 | |
---|
3020 | |
---|
3021 | # AC_PROG_LD_GNU |
---|
3022 | # -------------- |
---|
3023 | AC_DEFUN([AC_PROG_LD_GNU], |
---|
3024 | [AC_REQUIRE([AC_PROG_EGREP])dnl |
---|
3025 | AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
---|
3026 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
3027 | case `$LD -v 2>&1 </dev/null` in |
---|
3028 | *GNU* | *'with BFD'*) |
---|
3029 | lt_cv_prog_gnu_ld=yes |
---|
3030 | ;; |
---|
3031 | *) |
---|
3032 | lt_cv_prog_gnu_ld=no |
---|
3033 | ;; |
---|
3034 | esac]) |
---|
3035 | with_gnu_ld=$lt_cv_prog_gnu_ld |
---|
3036 | ])# AC_PROG_LD_GNU |
---|
3037 | |
---|
3038 | |
---|
3039 | # AC_PROG_LD_RELOAD_FLAG |
---|
3040 | # ---------------------- |
---|
3041 | # find reload flag for linker |
---|
3042 | # -- PORTME Some linkers may need a different reload flag. |
---|
3043 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
---|
3044 | [AC_CACHE_CHECK([for $LD option to reload object files], |
---|
3045 | lt_cv_ld_reload_flag, |
---|
3046 | [lt_cv_ld_reload_flag='-r']) |
---|
3047 | reload_flag=$lt_cv_ld_reload_flag |
---|
3048 | case $reload_flag in |
---|
3049 | "" | " "*) ;; |
---|
3050 | *) reload_flag=" $reload_flag" ;; |
---|
3051 | esac |
---|
3052 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
---|
3053 | ])# AC_PROG_LD_RELOAD_FLAG |
---|
3054 | |
---|
3055 | |
---|
3056 | # AC_DEPLIBS_CHECK_METHOD |
---|
3057 | # ----------------------- |
---|
3058 | # how to check for library dependencies |
---|
3059 | # -- PORTME fill in with the dynamic library characteristics |
---|
3060 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
---|
3061 | [AC_CACHE_CHECK([how to recognise dependent libraries], |
---|
3062 | lt_cv_deplibs_check_method, |
---|
3063 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
---|
3064 | lt_cv_file_magic_test_file= |
---|
3065 | lt_cv_deplibs_check_method='unknown' |
---|
3066 | # Need to set the preceding variable on all platforms that support |
---|
3067 | # interlibrary dependencies. |
---|
3068 | # 'none' -- dependencies not supported. |
---|
3069 | # `unknown' -- same as none, but documents that we really don't know. |
---|
3070 | # 'pass_all' -- all dependencies passed with no checks. |
---|
3071 | # 'test_compile' -- check by making test program. |
---|
3072 | # 'file_magic [[regex]]' -- check by looking for files in library path |
---|
3073 | # which responds to the $file_magic_cmd with a given extended regex. |
---|
3074 | # If you have `file' or equivalent on your system and you're not sure |
---|
3075 | # whether `pass_all' will *always* work, you probably want this one. |
---|
3076 | |
---|
3077 | case $host_os in |
---|
3078 | aix4* | aix5*) |
---|
3079 | lt_cv_deplibs_check_method=pass_all |
---|
3080 | ;; |
---|
3081 | |
---|
3082 | beos*) |
---|
3083 | lt_cv_deplibs_check_method=pass_all |
---|
3084 | ;; |
---|
3085 | |
---|
3086 | bsdi4*) |
---|
3087 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
---|
3088 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3089 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3090 | ;; |
---|
3091 | |
---|
3092 | cygwin*) |
---|
3093 | # func_win32_libid is a shell function defined in ltmain.sh |
---|
3094 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
---|
3095 | lt_cv_file_magic_cmd='func_win32_libid' |
---|
3096 | ;; |
---|
3097 | |
---|
3098 | mingw* | pw32*) |
---|
3099 | # Base MSYS/MinGW do not provide the 'file' command needed by |
---|
3100 | # func_win32_libid shell function, so use a weaker test based on 'objdump'. |
---|
3101 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
---|
3102 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
---|
3103 | ;; |
---|
3104 | |
---|
3105 | darwin* | rhapsody*) |
---|
3106 | lt_cv_deplibs_check_method=pass_all |
---|
3107 | ;; |
---|
3108 | |
---|
3109 | freebsd* | kfreebsd*-gnu) |
---|
3110 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3111 | case $host_cpu in |
---|
3112 | i*86 ) |
---|
3113 | # Not sure whether the presence of OpenBSD here was a mistake. |
---|
3114 | # Let's accept both of them until this is cleared up. |
---|
3115 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
---|
3116 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3117 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3118 | ;; |
---|
3119 | esac |
---|
3120 | else |
---|
3121 | lt_cv_deplibs_check_method=pass_all |
---|
3122 | fi |
---|
3123 | ;; |
---|
3124 | |
---|
3125 | gnu*) |
---|
3126 | lt_cv_deplibs_check_method=pass_all |
---|
3127 | ;; |
---|
3128 | |
---|
3129 | hpux10.20* | hpux11*) |
---|
3130 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3131 | case "$host_cpu" in |
---|
3132 | ia64*) |
---|
3133 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
---|
3134 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
---|
3135 | ;; |
---|
3136 | hppa*64*) |
---|
3137 | [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] |
---|
3138 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
---|
3139 | ;; |
---|
3140 | *) |
---|
3141 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
---|
3142 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
---|
3143 | ;; |
---|
3144 | esac |
---|
3145 | ;; |
---|
3146 | |
---|
3147 | irix5* | irix6* | nonstopux*) |
---|
3148 | case $LD in |
---|
3149 | *-32|*"-32 ") libmagic=32-bit;; |
---|
3150 | *-n32|*"-n32 ") libmagic=N32;; |
---|
3151 | *-64|*"-64 ") libmagic=64-bit;; |
---|
3152 | *) libmagic=never-match;; |
---|
3153 | esac |
---|
3154 | lt_cv_deplibs_check_method=pass_all |
---|
3155 | ;; |
---|
3156 | |
---|
3157 | # This must be Linux ELF. |
---|
3158 | linux*) |
---|
3159 | case $host_cpu in |
---|
3160 | alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) |
---|
3161 | lt_cv_deplibs_check_method=pass_all ;; |
---|
3162 | *) |
---|
3163 | # glibc up to 2.1.1 does not perform some relocations on ARM |
---|
3164 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3165 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
---|
3166 | esac |
---|
3167 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
---|
3168 | lt_cv_deplibs_check_method=pass_all |
---|
3169 | ;; |
---|
3170 | |
---|
3171 | netbsd*) |
---|
3172 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3173 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
---|
3174 | else |
---|
3175 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
---|
3176 | fi |
---|
3177 | ;; |
---|
3178 | |
---|
3179 | newos6*) |
---|
3180 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
---|
3181 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3182 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
---|
3183 | ;; |
---|
3184 | |
---|
3185 | nto-qnx*) |
---|
3186 | lt_cv_deplibs_check_method=unknown |
---|
3187 | ;; |
---|
3188 | |
---|
3189 | openbsd*) |
---|
3190 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3191 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3192 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
3193 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
---|
3194 | else |
---|
3195 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
---|
3196 | fi |
---|
3197 | ;; |
---|
3198 | |
---|
3199 | osf3* | osf4* | osf5*) |
---|
3200 | lt_cv_deplibs_check_method=pass_all |
---|
3201 | ;; |
---|
3202 | |
---|
3203 | sco3.2v5*) |
---|
3204 | lt_cv_deplibs_check_method=pass_all |
---|
3205 | ;; |
---|
3206 | |
---|
3207 | solaris*) |
---|
3208 | lt_cv_deplibs_check_method=pass_all |
---|
3209 | ;; |
---|
3210 | |
---|
3211 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
3212 | case $host_vendor in |
---|
3213 | motorola) |
---|
3214 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' |
---|
3215 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
---|
3216 | ;; |
---|
3217 | ncr) |
---|
3218 | lt_cv_deplibs_check_method=pass_all |
---|
3219 | ;; |
---|
3220 | sequent) |
---|
3221 | lt_cv_file_magic_cmd='/bin/file' |
---|
3222 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
---|
3223 | ;; |
---|
3224 | sni) |
---|
3225 | lt_cv_file_magic_cmd='/bin/file' |
---|
3226 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
---|
3227 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3228 | ;; |
---|
3229 | siemens) |
---|
3230 | lt_cv_deplibs_check_method=pass_all |
---|
3231 | ;; |
---|
3232 | esac |
---|
3233 | ;; |
---|
3234 | |
---|
3235 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) |
---|
3236 | lt_cv_deplibs_check_method=pass_all |
---|
3237 | ;; |
---|
3238 | esac |
---|
3239 | ]) |
---|
3240 | file_magic_cmd=$lt_cv_file_magic_cmd |
---|
3241 | deplibs_check_method=$lt_cv_deplibs_check_method |
---|
3242 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
---|
3243 | ])# AC_DEPLIBS_CHECK_METHOD |
---|
3244 | |
---|
3245 | |
---|
3246 | # AC_PROG_NM |
---|
3247 | # ---------- |
---|
3248 | # find the pathname to a BSD-compatible name lister |
---|
3249 | AC_DEFUN([AC_PROG_NM], |
---|
3250 | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, |
---|
3251 | [if test -n "$NM"; then |
---|
3252 | # Let the user override the test. |
---|
3253 | lt_cv_path_NM="$NM" |
---|
3254 | else |
---|
3255 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3256 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
3257 | IFS="$lt_save_ifs" |
---|
3258 | test -z "$ac_dir" && ac_dir=. |
---|
3259 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" |
---|
3260 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
---|
3261 | # Check to see if the nm accepts a BSD-compat flag. |
---|
3262 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
3263 | # nm: unknown option "B" ignored |
---|
3264 | # Tru64's nm complains that /dev/null is an invalid object file |
---|
3265 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in |
---|
3266 | */dev/null* | *'Invalid file or object type'*) |
---|
3267 | lt_cv_path_NM="$tmp_nm -B" |
---|
3268 | break |
---|
3269 | ;; |
---|
3270 | *) |
---|
3271 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
---|
3272 | */dev/null*) |
---|
3273 | lt_cv_path_NM="$tmp_nm -p" |
---|
3274 | break |
---|
3275 | ;; |
---|
3276 | *) |
---|
3277 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
---|
3278 | continue # so that we can try to find one that supports BSD flags |
---|
3279 | ;; |
---|
3280 | esac |
---|
3281 | esac |
---|
3282 | fi |
---|
3283 | done |
---|
3284 | IFS="$lt_save_ifs" |
---|
3285 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
---|
3286 | fi]) |
---|
3287 | NM="$lt_cv_path_NM" |
---|
3288 | ])# AC_PROG_NM |
---|
3289 | |
---|
3290 | |
---|
3291 | # AC_CHECK_LIBM |
---|
3292 | # ------------- |
---|
3293 | # check for math library |
---|
3294 | AC_DEFUN([AC_CHECK_LIBM], |
---|
3295 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3296 | LIBM= |
---|
3297 | case $host in |
---|
3298 | *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) |
---|
3299 | # These system don't have libm, or don't need it |
---|
3300 | ;; |
---|
3301 | *-ncr-sysv4.3*) |
---|
3302 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
3303 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
---|
3304 | ;; |
---|
3305 | *) |
---|
3306 | AC_CHECK_LIB(m, cos, LIBM="-lm") |
---|
3307 | ;; |
---|
3308 | esac |
---|
3309 | ])# AC_CHECK_LIBM |
---|
3310 | |
---|
3311 | |
---|
3312 | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) |
---|
3313 | # ----------------------------------- |
---|
3314 | # sets LIBLTDL to the link flags for the libltdl convenience library and |
---|
3315 | # LTDLINCL to the include flags for the libltdl header and adds |
---|
3316 | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL |
---|
3317 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
---|
3318 | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will |
---|
3319 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with |
---|
3320 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
3321 | # flat and you're not using automake, define top_builddir and |
---|
3322 | # top_srcdir appropriately in the Makefiles. |
---|
3323 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
---|
3324 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3325 | case $enable_ltdl_convenience in |
---|
3326 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
3327 | "") enable_ltdl_convenience=yes |
---|
3328 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
3329 | esac |
---|
3330 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
3331 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3332 | # For backwards non-gettext consistent compatibility... |
---|
3333 | INCLTDL="$LTDLINCL" |
---|
3334 | ])# AC_LIBLTDL_CONVENIENCE |
---|
3335 | |
---|
3336 | |
---|
3337 | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) |
---|
3338 | # ----------------------------------- |
---|
3339 | # sets LIBLTDL to the link flags for the libltdl installable library and |
---|
3340 | # LTDLINCL to the include flags for the libltdl header and adds |
---|
3341 | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL |
---|
3342 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
---|
3343 | # DIRECTORY is not provided and an installed libltdl is not found, it is |
---|
3344 | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' |
---|
3345 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single |
---|
3346 | # quotes!). If your package is not flat and you're not using automake, |
---|
3347 | # define top_builddir and top_srcdir appropriately in the Makefiles. |
---|
3348 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
3349 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
---|
3350 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3351 | AC_CHECK_LIB(ltdl, lt_dlinit, |
---|
3352 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
3353 | [if test x"$enable_ltdl_install" = xno; then |
---|
3354 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
3355 | else |
---|
3356 | enable_ltdl_install=yes |
---|
3357 | fi |
---|
3358 | ]) |
---|
3359 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
3360 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
3361 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
3362 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3363 | else |
---|
3364 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
3365 | LIBLTDL="-lltdl" |
---|
3366 | LTDLINCL= |
---|
3367 | fi |
---|
3368 | # For backwards non-gettext consistent compatibility... |
---|
3369 | INCLTDL="$LTDLINCL" |
---|
3370 | ])# AC_LIBLTDL_INSTALLABLE |
---|
3371 | |
---|
3372 | |
---|
3373 | # AC_LIBTOOL_CXX |
---|
3374 | # -------------- |
---|
3375 | # enable support for C++ libraries |
---|
3376 | AC_DEFUN([AC_LIBTOOL_CXX], |
---|
3377 | [AC_REQUIRE([_LT_AC_LANG_CXX]) |
---|
3378 | ])# AC_LIBTOOL_CXX |
---|
3379 | |
---|
3380 | |
---|
3381 | # _LT_AC_LANG_CXX |
---|
3382 | # --------------- |
---|
3383 | AC_DEFUN([_LT_AC_LANG_CXX], |
---|
3384 | [AC_REQUIRE([AC_PROG_CXX]) |
---|
3385 | AC_REQUIRE([AC_PROG_CXXCPP]) |
---|
3386 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) |
---|
3387 | ])# _LT_AC_LANG_CXX |
---|
3388 | |
---|
3389 | |
---|
3390 | # AC_LIBTOOL_F77 |
---|
3391 | # -------------- |
---|
3392 | # enable support for Fortran 77 libraries |
---|
3393 | AC_DEFUN([AC_LIBTOOL_F77], |
---|
3394 | [AC_REQUIRE([_LT_AC_LANG_F77]) |
---|
3395 | ])# AC_LIBTOOL_F77 |
---|
3396 | |
---|
3397 | |
---|
3398 | # _LT_AC_LANG_F77 |
---|
3399 | # --------------- |
---|
3400 | AC_DEFUN([_LT_AC_LANG_F77], |
---|
3401 | [AC_REQUIRE([AC_PROG_F77]) |
---|
3402 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) |
---|
3403 | ])# _LT_AC_LANG_F77 |
---|
3404 | |
---|
3405 | |
---|
3406 | # AC_LIBTOOL_GCJ |
---|
3407 | # -------------- |
---|
3408 | # enable support for GCJ libraries |
---|
3409 | AC_DEFUN([AC_LIBTOOL_GCJ], |
---|
3410 | [AC_REQUIRE([_LT_AC_LANG_GCJ]) |
---|
3411 | ])# AC_LIBTOOL_GCJ |
---|
3412 | |
---|
3413 | |
---|
3414 | # _LT_AC_LANG_GCJ |
---|
3415 | # --------------- |
---|
3416 | AC_DEFUN([_LT_AC_LANG_GCJ], |
---|
3417 | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
---|
3418 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
---|
3419 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
---|
3420 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
---|
3421 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], |
---|
3422 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) |
---|
3423 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) |
---|
3424 | ])# _LT_AC_LANG_GCJ |
---|
3425 | |
---|
3426 | |
---|
3427 | # AC_LIBTOOL_RC |
---|
3428 | # -------------- |
---|
3429 | # enable support for Windows resource files |
---|
3430 | AC_DEFUN([AC_LIBTOOL_RC], |
---|
3431 | [AC_REQUIRE([LT_AC_PROG_RC]) |
---|
3432 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) |
---|
3433 | ])# AC_LIBTOOL_RC |
---|
3434 | |
---|
3435 | |
---|
3436 | # AC_LIBTOOL_LANG_C_CONFIG |
---|
3437 | # ------------------------ |
---|
3438 | # Ensure that the configuration vars for the C compiler are |
---|
3439 | # suitably defined. Those variables are subsequently used by |
---|
3440 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
3441 | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
---|
3442 | AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
---|
3443 | [lt_save_CC="$CC" |
---|
3444 | AC_LANG_PUSH(C) |
---|
3445 | |
---|
3446 | # Source file extension for C test sources. |
---|
3447 | ac_ext=c |
---|
3448 | |
---|
3449 | # Object file extension for compiled C test sources. |
---|
3450 | objext=o |
---|
3451 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
3452 | |
---|
3453 | # Code to be used in simple compile tests |
---|
3454 | lt_simple_compile_test_code="int some_variable = 0;\n" |
---|
3455 | |
---|
3456 | # Code to be used in simple link tests |
---|
3457 | lt_simple_link_test_code='int main(){return(0);}\n' |
---|
3458 | |
---|
3459 | _LT_AC_SYS_COMPILER |
---|
3460 | |
---|
3461 | # |
---|
3462 | # Check for any special shared library compilation flags. |
---|
3463 | # |
---|
3464 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= |
---|
3465 | if test "$GCC" = no; then |
---|
3466 | case $host_os in |
---|
3467 | sco3.2v5*) |
---|
3468 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' |
---|
3469 | ;; |
---|
3470 | esac |
---|
3471 | fi |
---|
3472 | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then |
---|
3473 | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) |
---|
3474 | if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : |
---|
3475 | else |
---|
3476 | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) |
---|
3477 | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no |
---|
3478 | fi |
---|
3479 | fi |
---|
3480 | |
---|
3481 | |
---|
3482 | # |
---|
3483 | # Check to make sure the static flag actually works. |
---|
3484 | # |
---|
3485 | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], |
---|
3486 | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
---|
3487 | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), |
---|
3488 | [], |
---|
3489 | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
---|
3490 | |
---|
3491 | |
---|
3492 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
---|
3493 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
3494 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
3495 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
3496 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
3497 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
3498 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
3499 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
3500 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
3501 | |
---|
3502 | # Report which librarie types wil actually be built |
---|
3503 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
3504 | AC_MSG_RESULT([$can_build_shared]) |
---|
3505 | |
---|
3506 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
3507 | test "$can_build_shared" = "no" && enable_shared=no |
---|
3508 | |
---|
3509 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
3510 | # are all built from PIC. |
---|
3511 | case "$host_os" in |
---|
3512 | aix3*) |
---|
3513 | test "$enable_shared" = yes && enable_static=no |
---|
3514 | if test -n "$RANLIB"; then |
---|
3515 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
3516 | postinstall_cmds='$RANLIB $lib' |
---|
3517 | fi |
---|
3518 | ;; |
---|
3519 | |
---|
3520 | aix4* | aix5*) |
---|
3521 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
---|
3522 | test "$enable_shared" = yes && enable_static=no |
---|
3523 | fi |
---|
3524 | ;; |
---|
3525 | darwin* | rhapsody*) |
---|
3526 | if test "$GCC" = yes; then |
---|
3527 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3528 | case "$host_os" in |
---|
3529 | rhapsody* | darwin1.[[012]]) |
---|
3530 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
3531 | ;; |
---|
3532 | *) # Darwin 1.3 on |
---|
3533 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
---|
3534 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3535 | else |
---|
3536 | case ${MACOSX_DEPLOYMENT_TARGET} in |
---|
3537 | 10.[[012]]) |
---|
3538 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3539 | ;; |
---|
3540 | 10.*) |
---|
3541 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' |
---|
3542 | ;; |
---|
3543 | esac |
---|
3544 | fi |
---|
3545 | ;; |
---|
3546 | esac |
---|
3547 | output_verbose_link_cmd='echo' |
---|
3548 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' |
---|
3549 | _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
---|
3550 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
3551 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3552 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3553 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3554 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
3555 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
3556 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
3557 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3558 | else |
---|
3559 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3560 | fi |
---|
3561 | ;; |
---|
3562 | esac |
---|
3563 | AC_MSG_RESULT([$enable_shared]) |
---|
3564 | |
---|
3565 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
3566 | # Make sure either enable_shared or enable_static is yes. |
---|
3567 | test "$enable_shared" = yes || enable_static=yes |
---|
3568 | AC_MSG_RESULT([$enable_static]) |
---|
3569 | |
---|
3570 | AC_LIBTOOL_CONFIG($1) |
---|
3571 | |
---|
3572 | AC_LANG_POP |
---|
3573 | CC="$lt_save_CC" |
---|
3574 | ])# AC_LIBTOOL_LANG_C_CONFIG |
---|
3575 | |
---|
3576 | |
---|
3577 | # AC_LIBTOOL_LANG_CXX_CONFIG |
---|
3578 | # -------------------------- |
---|
3579 | # Ensure that the configuration vars for the C compiler are |
---|
3580 | # suitably defined. Those variables are subsequently used by |
---|
3581 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
3582 | AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) |
---|
3583 | AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
---|
3584 | [AC_LANG_PUSH(C++) |
---|
3585 | AC_REQUIRE([AC_PROG_CXX]) |
---|
3586 | AC_REQUIRE([AC_PROG_CXXCPP]) |
---|
3587 | |
---|
3588 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3589 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
3590 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
3591 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
3592 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
3593 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3594 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
3595 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
3596 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
3597 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
3598 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
3599 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
3600 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
3601 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
3602 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
---|
3603 | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
---|
3604 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
3605 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
3606 | |
---|
3607 | # Dependencies to place before and after the object being linked: |
---|
3608 | _LT_AC_TAGVAR(predep_objects, $1)= |
---|
3609 | _LT_AC_TAGVAR(postdep_objects, $1)= |
---|
3610 | _LT_AC_TAGVAR(predeps, $1)= |
---|
3611 | _LT_AC_TAGVAR(postdeps, $1)= |
---|
3612 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)= |
---|
3613 | |
---|
3614 | # Source file extension for C++ test sources. |
---|
3615 | ac_ext=cc |
---|
3616 | |
---|
3617 | # Object file extension for compiled C++ test sources. |
---|
3618 | objext=o |
---|
3619 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
3620 | |
---|
3621 | # Code to be used in simple compile tests |
---|
3622 | lt_simple_compile_test_code="int some_variable = 0;\n" |
---|
3623 | |
---|
3624 | # Code to be used in simple link tests |
---|
3625 | lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' |
---|
3626 | |
---|
3627 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
3628 | _LT_AC_SYS_COMPILER |
---|
3629 | |
---|
3630 | # Allow CC to be a program name with arguments. |
---|
3631 | lt_save_CC=$CC |
---|
3632 | lt_save_LD=$LD |
---|
3633 | lt_save_GCC=$GCC |
---|
3634 | GCC=$GXX |
---|
3635 | lt_save_with_gnu_ld=$with_gnu_ld |
---|
3636 | lt_save_path_LD=$lt_cv_path_LD |
---|
3637 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then |
---|
3638 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx |
---|
3639 | else |
---|
3640 | unset lt_cv_prog_gnu_ld |
---|
3641 | fi |
---|
3642 | if test -n "${lt_cv_path_LDCXX+set}"; then |
---|
3643 | lt_cv_path_LD=$lt_cv_path_LDCXX |
---|
3644 | else |
---|
3645 | unset lt_cv_path_LD |
---|
3646 | fi |
---|
3647 | test -z "${LDCXX+set}" || LD=$LDCXX |
---|
3648 | CC=${CXX-"c++"} |
---|
3649 | compiler=$CC |
---|
3650 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
3651 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
---|
3652 | |
---|
3653 | # We don't want -fno-exception wen compiling C++ code, so set the |
---|
3654 | # no_builtin_flag separately |
---|
3655 | if test "$GXX" = yes; then |
---|
3656 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
---|
3657 | else |
---|
3658 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
---|
3659 | fi |
---|
3660 | |
---|
3661 | if test "$GXX" = yes; then |
---|
3662 | # Set up default GNU C++ configuration |
---|
3663 | |
---|
3664 | AC_PROG_LD |
---|
3665 | |
---|
3666 | # Check if GNU C++ uses GNU ld as the underlying linker, since the |
---|
3667 | # archiving commands below assume that GNU ld is being used. |
---|
3668 | if test "$with_gnu_ld" = yes; then |
---|
3669 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
3670 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
3671 | |
---|
3672 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
---|
3673 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
3674 | |
---|
3675 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
3676 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
---|
3677 | # investigate it a little bit more. (MM) |
---|
3678 | wlarc='${wl}' |
---|
3679 | |
---|
3680 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
3681 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ |
---|
3682 | grep 'no-whole-archive' > /dev/null; then |
---|
3683 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
3684 | else |
---|
3685 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
3686 | fi |
---|
3687 | else |
---|
3688 | with_gnu_ld=no |
---|
3689 | wlarc= |
---|
3690 | |
---|
3691 | # A generic and very simple default shared library creation |
---|
3692 | # command for GNU C++ for the case where it uses the native |
---|
3693 | # linker, instead of GNU ld. If possible, this setting should |
---|
3694 | # overridden to take advantage of the native linker features on |
---|
3695 | # the platform it is being used on. |
---|
3696 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
---|
3697 | fi |
---|
3698 | |
---|
3699 | # Commands to make compiler produce verbose output that lists |
---|
3700 | # what "hidden" libraries, object files and flags are used when |
---|
3701 | # linking a shared library. |
---|
3702 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
3703 | |
---|
3704 | else |
---|
3705 | GXX=no |
---|
3706 | with_gnu_ld=no |
---|
3707 | wlarc= |
---|
3708 | fi |
---|
3709 | |
---|
3710 | # PORTME: fill in a description of your system's C++ link characteristics |
---|
3711 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
---|
3712 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
3713 | case $host_os in |
---|
3714 | aix3*) |
---|
3715 | # FIXME: insert proper C++ library support |
---|
3716 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3717 | ;; |
---|
3718 | aix4* | aix5*) |
---|
3719 | if test "$host_cpu" = ia64; then |
---|
3720 | # On IA64, the linker does run time linking by default, so we don't |
---|
3721 | # have to do anything special. |
---|
3722 | aix_use_runtimelinking=no |
---|
3723 | exp_sym_flag='-Bexport' |
---|
3724 | no_entry_flag="" |
---|
3725 | else |
---|
3726 | aix_use_runtimelinking=no |
---|
3727 | |
---|
3728 | # Test if we are trying to use run time linking or normal |
---|
3729 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
3730 | # need to do runtime linking. |
---|
3731 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
3732 | for ld_flag in $LDFLAGS; do |
---|
3733 | case $ld_flag in |
---|
3734 | *-brtl*) |
---|
3735 | aix_use_runtimelinking=yes |
---|
3736 | break |
---|
3737 | ;; |
---|
3738 | esac |
---|
3739 | done |
---|
3740 | esac |
---|
3741 | |
---|
3742 | exp_sym_flag='-bexport' |
---|
3743 | no_entry_flag='-bnoentry' |
---|
3744 | fi |
---|
3745 | |
---|
3746 | # When large executables or shared objects are built, AIX ld can |
---|
3747 | # have problems creating the table of contents. If linking a library |
---|
3748 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
3749 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
3750 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
3751 | |
---|
3752 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
---|
3753 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3754 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
---|
3755 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3756 | |
---|
3757 | if test "$GXX" = yes; then |
---|
3758 | case $host_os in aix4.[012]|aix4.[012].*) |
---|
3759 | # We only want to do this on AIX 4.2 and lower, the check |
---|
3760 | # below for broken collect2 doesn't work under 4.3+ |
---|
3761 | collect2name=`${CC} -print-prog-name=collect2` |
---|
3762 | if test -f "$collect2name" && \ |
---|
3763 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
3764 | then |
---|
3765 | # We have reworked collect2 |
---|
3766 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3767 | else |
---|
3768 | # We have old collect2 |
---|
3769 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
3770 | # It fails to find uninstalled libraries when the uninstalled |
---|
3771 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
3772 | # to unsupported forces relinking |
---|
3773 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
3774 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3775 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
3776 | fi |
---|
3777 | esac |
---|
3778 | shared_flag='-shared' |
---|
3779 | else |
---|
3780 | # not using gcc |
---|
3781 | if test "$host_cpu" = ia64; then |
---|
3782 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
---|
3783 | # chokes on -Wl,-G. The following line is correct: |
---|
3784 | shared_flag='-G' |
---|
3785 | else |
---|
3786 | if test "$aix_use_runtimelinking" = yes; then |
---|
3787 | shared_flag='${wl}-G' |
---|
3788 | else |
---|
3789 | shared_flag='${wl}-bM:SRE' |
---|
3790 | fi |
---|
3791 | fi |
---|
3792 | fi |
---|
3793 | |
---|
3794 | # It seems that -bexpall does not export symbols beginning with |
---|
3795 | # underscore (_), so it is better to generate a list of symbols to export. |
---|
3796 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
3797 | if test "$aix_use_runtimelinking" = yes; then |
---|
3798 | # Warning - without using the other runtime loading flags (-brtl), |
---|
3799 | # -berok will link without error, but may produce a broken library. |
---|
3800 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
---|
3801 | # Determine the default libpath from the value encoded in an empty executable. |
---|
3802 | _LT_AC_SYS_LIBPATH_AIX |
---|
3803 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
3804 | |
---|
3805 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
---|
3806 | else |
---|
3807 | if test "$host_cpu" = ia64; then |
---|
3808 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
---|
3809 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
---|
3810 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
3811 | else |
---|
3812 | # Determine the default libpath from the value encoded in an empty executable. |
---|
3813 | _LT_AC_SYS_LIBPATH_AIX |
---|
3814 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
3815 | # Warning - without using the other run time loading flags, |
---|
3816 | # -berok will link without error, but may produce a broken library. |
---|
3817 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
---|
3818 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
---|
3819 | # -bexpall does not export symbols beginning with underscore (_) |
---|
3820 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
3821 | # Exported symbols can be pulled into shared objects from archives |
---|
3822 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
---|
3823 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
3824 | # This is similar to how AIX traditionally builds it's shared libraries. |
---|
3825 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
---|
3826 | fi |
---|
3827 | fi |
---|
3828 | ;; |
---|
3829 | chorus*) |
---|
3830 | case $cc_basename in |
---|
3831 | *) |
---|
3832 | # FIXME: insert proper C++ library support |
---|
3833 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3834 | ;; |
---|
3835 | esac |
---|
3836 | ;; |
---|
3837 | |
---|
3838 | cygwin* | mingw* | pw32*) |
---|
3839 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
---|
3840 | # as there is no search path for DLLs. |
---|
3841 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3842 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
3843 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
3844 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
3845 | |
---|
3846 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
---|
3847 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
3848 | # If the export-symbols file already is a .def file (1st line |
---|
3849 | # is EXPORTS), use it as is; otherwise, prepend... |
---|
3850 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
---|
3851 | cp $export_symbols $output_objdir/$soname.def; |
---|
3852 | else |
---|
3853 | echo EXPORTS > $output_objdir/$soname.def; |
---|
3854 | cat $export_symbols >> $output_objdir/$soname.def; |
---|
3855 | fi~ |
---|
3856 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
3857 | else |
---|
3858 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3859 | fi |
---|
3860 | ;; |
---|
3861 | |
---|
3862 | darwin* | rhapsody*) |
---|
3863 | if test "$GXX" = yes; then |
---|
3864 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3865 | case "$host_os" in |
---|
3866 | rhapsody* | darwin1.[[012]]) |
---|
3867 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
3868 | ;; |
---|
3869 | *) # Darwin 1.3 on |
---|
3870 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
---|
3871 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3872 | else |
---|
3873 | case ${MACOSX_DEPLOYMENT_TARGET} in |
---|
3874 | 10.[[012]]) |
---|
3875 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3876 | ;; |
---|
3877 | 10.*) |
---|
3878 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' |
---|
3879 | ;; |
---|
3880 | esac |
---|
3881 | fi |
---|
3882 | ;; |
---|
3883 | esac |
---|
3884 | lt_int_apple_cc_single_mod=no |
---|
3885 | output_verbose_link_cmd='echo' |
---|
3886 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then |
---|
3887 | lt_int_apple_cc_single_mod=yes |
---|
3888 | fi |
---|
3889 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
3890 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
3891 | else |
---|
3892 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
3893 | fi |
---|
3894 | _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
---|
3895 | |
---|
3896 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
3897 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
3898 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3899 | else |
---|
3900 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3901 | fi |
---|
3902 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3903 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3904 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
3905 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
3906 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
3907 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3908 | else |
---|
3909 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3910 | fi |
---|
3911 | ;; |
---|
3912 | |
---|
3913 | dgux*) |
---|
3914 | case $cc_basename in |
---|
3915 | ec++) |
---|
3916 | # FIXME: insert proper C++ library support |
---|
3917 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3918 | ;; |
---|
3919 | ghcx) |
---|
3920 | # Green Hills C++ Compiler |
---|
3921 | # FIXME: insert proper C++ library support |
---|
3922 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3923 | ;; |
---|
3924 | *) |
---|
3925 | # FIXME: insert proper C++ library support |
---|
3926 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3927 | ;; |
---|
3928 | esac |
---|
3929 | ;; |
---|
3930 | freebsd[12]*) |
---|
3931 | # C++ shared libraries reported to be fairly broken before switch to ELF |
---|
3932 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3933 | ;; |
---|
3934 | freebsd-elf*) |
---|
3935 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3936 | ;; |
---|
3937 | freebsd* | kfreebsd*-gnu) |
---|
3938 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
---|
3939 | # conventions |
---|
3940 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
3941 | ;; |
---|
3942 | gnu*) |
---|
3943 | ;; |
---|
3944 | hpux9*) |
---|
3945 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3946 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3947 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
3948 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3949 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
3950 | # but as the default |
---|
3951 | # location of the library. |
---|
3952 | |
---|
3953 | case $cc_basename in |
---|
3954 | CC) |
---|
3955 | # FIXME: insert proper C++ library support |
---|
3956 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3957 | ;; |
---|
3958 | aCC) |
---|
3959 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
3960 | # Commands to make compiler produce verbose output that lists |
---|
3961 | # what "hidden" libraries, object files and flags are used when |
---|
3962 | # linking a shared library. |
---|
3963 | # |
---|
3964 | # There doesn't appear to be a way to prevent this compiler from |
---|
3965 | # explicitly linking system object files so we need to strip them |
---|
3966 | # from the output so that they don't get included in the library |
---|
3967 | # dependencies. |
---|
3968 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3969 | ;; |
---|
3970 | *) |
---|
3971 | if test "$GXX" = yes; then |
---|
3972 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
3973 | else |
---|
3974 | # FIXME: insert proper C++ library support |
---|
3975 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3976 | fi |
---|
3977 | ;; |
---|
3978 | esac |
---|
3979 | ;; |
---|
3980 | hpux10*|hpux11*) |
---|
3981 | if test $with_gnu_ld = no; then |
---|
3982 | case "$host_cpu" in |
---|
3983 | hppa*64*) |
---|
3984 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3985 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
---|
3986 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3987 | ;; |
---|
3988 | ia64*) |
---|
3989 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3990 | ;; |
---|
3991 | *) |
---|
3992 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3993 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3994 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
3995 | ;; |
---|
3996 | esac |
---|
3997 | fi |
---|
3998 | case "$host_cpu" in |
---|
3999 | hppa*64*) |
---|
4000 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
4001 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
4002 | ;; |
---|
4003 | ia64*) |
---|
4004 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
4005 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
4006 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
4007 | # but as the default |
---|
4008 | # location of the library. |
---|
4009 | ;; |
---|
4010 | *) |
---|
4011 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
4012 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
4013 | # but as the default |
---|
4014 | # location of the library. |
---|
4015 | ;; |
---|
4016 | esac |
---|
4017 | |
---|
4018 | case $cc_basename in |
---|
4019 | CC) |
---|
4020 | # FIXME: insert proper C++ library support |
---|
4021 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4022 | ;; |
---|
4023 | aCC) |
---|
4024 | case "$host_cpu" in |
---|
4025 | hppa*64*|ia64*) |
---|
4026 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
---|
4027 | ;; |
---|
4028 | *) |
---|
4029 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
4030 | ;; |
---|
4031 | esac |
---|
4032 | # Commands to make compiler produce verbose output that lists |
---|
4033 | # what "hidden" libraries, object files and flags are used when |
---|
4034 | # linking a shared library. |
---|
4035 | # |
---|
4036 | # There doesn't appear to be a way to prevent this compiler from |
---|
4037 | # explicitly linking system object files so we need to strip them |
---|
4038 | # from the output so that they don't get included in the library |
---|
4039 | # dependencies. |
---|
4040 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4041 | ;; |
---|
4042 | *) |
---|
4043 | if test "$GXX" = yes; then |
---|
4044 | if test $with_gnu_ld = no; then |
---|
4045 | case "$host_cpu" in |
---|
4046 | ia64*|hppa*64*) |
---|
4047 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
---|
4048 | ;; |
---|
4049 | *) |
---|
4050 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
4051 | ;; |
---|
4052 | esac |
---|
4053 | fi |
---|
4054 | else |
---|
4055 | # FIXME: insert proper C++ library support |
---|
4056 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4057 | fi |
---|
4058 | ;; |
---|
4059 | esac |
---|
4060 | ;; |
---|
4061 | irix5* | irix6*) |
---|
4062 | case $cc_basename in |
---|
4063 | CC) |
---|
4064 | # SGI C++ |
---|
4065 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
4066 | |
---|
4067 | # Archives containing C++ object files must be created using |
---|
4068 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is |
---|
4069 | # necessary to make sure instantiated templates are included |
---|
4070 | # in the archive. |
---|
4071 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
---|
4072 | ;; |
---|
4073 | *) |
---|
4074 | if test "$GXX" = yes; then |
---|
4075 | if test "$with_gnu_ld" = no; then |
---|
4076 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
4077 | else |
---|
4078 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' |
---|
4079 | fi |
---|
4080 | fi |
---|
4081 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
4082 | ;; |
---|
4083 | esac |
---|
4084 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4085 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4086 | ;; |
---|
4087 | linux*) |
---|
4088 | case $cc_basename in |
---|
4089 | KCC) |
---|
4090 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
4091 | |
---|
4092 | # KCC will only create a shared library if the output file |
---|
4093 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
4094 | # to its proper name (with version) after linking. |
---|
4095 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
4096 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' |
---|
4097 | # Commands to make compiler produce verbose output that lists |
---|
4098 | # what "hidden" libraries, object files and flags are used when |
---|
4099 | # linking a shared library. |
---|
4100 | # |
---|
4101 | # There doesn't appear to be a way to prevent this compiler from |
---|
4102 | # explicitly linking system object files so we need to strip them |
---|
4103 | # from the output so that they don't get included in the library |
---|
4104 | # dependencies. |
---|
4105 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4106 | |
---|
4107 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
---|
4108 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
4109 | |
---|
4110 | # Archives containing C++ object files must be created using |
---|
4111 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
---|
4112 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
---|
4113 | ;; |
---|
4114 | icpc) |
---|
4115 | # Intel C++ |
---|
4116 | with_gnu_ld=yes |
---|
4117 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4118 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
4119 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
4120 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
4121 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
4122 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' |
---|
4123 | ;; |
---|
4124 | cxx) |
---|
4125 | # Compaq C++ |
---|
4126 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
4127 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' |
---|
4128 | |
---|
4129 | runpath_var=LD_RUN_PATH |
---|
4130 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
4131 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4132 | |
---|
4133 | # Commands to make compiler produce verbose output that lists |
---|
4134 | # what "hidden" libraries, object files and flags are used when |
---|
4135 | # linking a shared library. |
---|
4136 | # |
---|
4137 | # There doesn't appear to be a way to prevent this compiler from |
---|
4138 | # explicitly linking system object files so we need to strip them |
---|
4139 | # from the output so that they don't get included in the library |
---|
4140 | # dependencies. |
---|
4141 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4142 | ;; |
---|
4143 | esac |
---|
4144 | ;; |
---|
4145 | lynxos*) |
---|
4146 | # FIXME: insert proper C++ library support |
---|
4147 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4148 | ;; |
---|
4149 | m88k*) |
---|
4150 | # FIXME: insert proper C++ library support |
---|
4151 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4152 | ;; |
---|
4153 | mvs*) |
---|
4154 | case $cc_basename in |
---|
4155 | cxx) |
---|
4156 | # FIXME: insert proper C++ library support |
---|
4157 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4158 | ;; |
---|
4159 | *) |
---|
4160 | # FIXME: insert proper C++ library support |
---|
4161 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4162 | ;; |
---|
4163 | esac |
---|
4164 | ;; |
---|
4165 | netbsd*) |
---|
4166 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
4167 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' |
---|
4168 | wlarc= |
---|
4169 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
4170 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
4171 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
4172 | fi |
---|
4173 | # Workaround some broken pre-1.5 toolchains |
---|
4174 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' |
---|
4175 | ;; |
---|
4176 | osf3*) |
---|
4177 | case $cc_basename in |
---|
4178 | KCC) |
---|
4179 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
4180 | |
---|
4181 | # KCC will only create a shared library if the output file |
---|
4182 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
4183 | # to its proper name (with version) after linking. |
---|
4184 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
4185 | |
---|
4186 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
4187 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4188 | |
---|
4189 | # Archives containing C++ object files must be created using |
---|
4190 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
---|
4191 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
---|
4192 | |
---|
4193 | ;; |
---|
4194 | RCC) |
---|
4195 | # Rational C++ 2.4.1 |
---|
4196 | # FIXME: insert proper C++ library support |
---|
4197 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4198 | ;; |
---|
4199 | cxx) |
---|
4200 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
4201 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
4202 | |
---|
4203 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4204 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4205 | |
---|
4206 | # Commands to make compiler produce verbose output that lists |
---|
4207 | # what "hidden" libraries, object files and flags are used when |
---|
4208 | # linking a shared library. |
---|
4209 | # |
---|
4210 | # There doesn't appear to be a way to prevent this compiler from |
---|
4211 | # explicitly linking system object files so we need to strip them |
---|
4212 | # from the output so that they don't get included in the library |
---|
4213 | # dependencies. |
---|
4214 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4215 | ;; |
---|
4216 | *) |
---|
4217 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
4218 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
4219 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
4220 | |
---|
4221 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4222 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4223 | |
---|
4224 | # Commands to make compiler produce verbose output that lists |
---|
4225 | # what "hidden" libraries, object files and flags are used when |
---|
4226 | # linking a shared library. |
---|
4227 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
4228 | |
---|
4229 | else |
---|
4230 | # FIXME: insert proper C++ library support |
---|
4231 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4232 | fi |
---|
4233 | ;; |
---|
4234 | esac |
---|
4235 | ;; |
---|
4236 | osf4* | osf5*) |
---|
4237 | case $cc_basename in |
---|
4238 | KCC) |
---|
4239 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
4240 | |
---|
4241 | # KCC will only create a shared library if the output file |
---|
4242 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
4243 | # to its proper name (with version) after linking. |
---|
4244 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
4245 | |
---|
4246 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
4247 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4248 | |
---|
4249 | # Archives containing C++ object files must be created using |
---|
4250 | # the KAI C++ compiler. |
---|
4251 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
---|
4252 | ;; |
---|
4253 | RCC) |
---|
4254 | # Rational C++ 2.4.1 |
---|
4255 | # FIXME: insert proper C++ library support |
---|
4256 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4257 | ;; |
---|
4258 | cxx) |
---|
4259 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
4260 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
4261 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
---|
4262 | echo "-hidden">> $lib.exp~ |
---|
4263 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ |
---|
4264 | $rm $lib.exp' |
---|
4265 | |
---|
4266 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
4267 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4268 | |
---|
4269 | # Commands to make compiler produce verbose output that lists |
---|
4270 | # what "hidden" libraries, object files and flags are used when |
---|
4271 | # linking a shared library. |
---|
4272 | # |
---|
4273 | # There doesn't appear to be a way to prevent this compiler from |
---|
4274 | # explicitly linking system object files so we need to strip them |
---|
4275 | # from the output so that they don't get included in the library |
---|
4276 | # dependencies. |
---|
4277 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4278 | ;; |
---|
4279 | *) |
---|
4280 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
4281 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
4282 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
4283 | |
---|
4284 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4285 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4286 | |
---|
4287 | # Commands to make compiler produce verbose output that lists |
---|
4288 | # what "hidden" libraries, object files and flags are used when |
---|
4289 | # linking a shared library. |
---|
4290 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
4291 | |
---|
4292 | else |
---|
4293 | # FIXME: insert proper C++ library support |
---|
4294 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4295 | fi |
---|
4296 | ;; |
---|
4297 | esac |
---|
4298 | ;; |
---|
4299 | psos*) |
---|
4300 | # FIXME: insert proper C++ library support |
---|
4301 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4302 | ;; |
---|
4303 | sco*) |
---|
4304 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4305 | case $cc_basename in |
---|
4306 | CC) |
---|
4307 | # FIXME: insert proper C++ library support |
---|
4308 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4309 | ;; |
---|
4310 | *) |
---|
4311 | # FIXME: insert proper C++ library support |
---|
4312 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4313 | ;; |
---|
4314 | esac |
---|
4315 | ;; |
---|
4316 | sunos4*) |
---|
4317 | case $cc_basename in |
---|
4318 | CC) |
---|
4319 | # Sun C++ 4.x |
---|
4320 | # FIXME: insert proper C++ library support |
---|
4321 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4322 | ;; |
---|
4323 | lcc) |
---|
4324 | # Lucid |
---|
4325 | # FIXME: insert proper C++ library support |
---|
4326 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4327 | ;; |
---|
4328 | *) |
---|
4329 | # FIXME: insert proper C++ library support |
---|
4330 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4331 | ;; |
---|
4332 | esac |
---|
4333 | ;; |
---|
4334 | solaris*) |
---|
4335 | case $cc_basename in |
---|
4336 | CC) |
---|
4337 | # Sun C++ 4.2, 5.x and Centerline C++ |
---|
4338 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
---|
4339 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
4340 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4341 | $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4342 | |
---|
4343 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
4344 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
4345 | case $host_os in |
---|
4346 | solaris2.[0-5] | solaris2.[0-5].*) ;; |
---|
4347 | *) |
---|
4348 | # The C++ compiler is used as linker so we must use $wl |
---|
4349 | # flag to pass the commands to the underlying system |
---|
4350 | # linker. |
---|
4351 | # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
4352 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' |
---|
4353 | ;; |
---|
4354 | esac |
---|
4355 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
4356 | |
---|
4357 | # Commands to make compiler produce verbose output that lists |
---|
4358 | # what "hidden" libraries, object files and flags are used when |
---|
4359 | # linking a shared library. |
---|
4360 | # |
---|
4361 | # There doesn't appear to be a way to prevent this compiler from |
---|
4362 | # explicitly linking system object files so we need to strip them |
---|
4363 | # from the output so that they don't get included in the library |
---|
4364 | # dependencies. |
---|
4365 | output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4366 | |
---|
4367 | # Archives containing C++ object files must be created using |
---|
4368 | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
---|
4369 | # necessary to make sure instantiated templates are included |
---|
4370 | # in the archive. |
---|
4371 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
---|
4372 | ;; |
---|
4373 | gcx) |
---|
4374 | # Green Hills C++ Compiler |
---|
4375 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4376 | |
---|
4377 | # The C++ compiler must be used to create the archive. |
---|
4378 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
---|
4379 | ;; |
---|
4380 | *) |
---|
4381 | # GNU C++ compiler with Solaris linker |
---|
4382 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
4383 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
---|
4384 | if $CC --version | grep -v '^2\.7' > /dev/null; then |
---|
4385 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4386 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4387 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4388 | |
---|
4389 | # Commands to make compiler produce verbose output that lists |
---|
4390 | # what "hidden" libraries, object files and flags are used when |
---|
4391 | # linking a shared library. |
---|
4392 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
---|
4393 | else |
---|
4394 | # g++ 2.7 appears to require `-G' NOT `-shared' on this |
---|
4395 | # platform. |
---|
4396 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4397 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4398 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4399 | |
---|
4400 | # Commands to make compiler produce verbose output that lists |
---|
4401 | # what "hidden" libraries, object files and flags are used when |
---|
4402 | # linking a shared library. |
---|
4403 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
---|
4404 | fi |
---|
4405 | |
---|
4406 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
---|
4407 | fi |
---|
4408 | ;; |
---|
4409 | esac |
---|
4410 | ;; |
---|
4411 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
---|
4412 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4413 | ;; |
---|
4414 | tandem*) |
---|
4415 | case $cc_basename in |
---|
4416 | NCC) |
---|
4417 | # NonStop-UX NCC 3.20 |
---|
4418 | # FIXME: insert proper C++ library support |
---|
4419 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4420 | ;; |
---|
4421 | *) |
---|
4422 | # FIXME: insert proper C++ library support |
---|
4423 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4424 | ;; |
---|
4425 | esac |
---|
4426 | ;; |
---|
4427 | vxworks*) |
---|
4428 | # FIXME: insert proper C++ library support |
---|
4429 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4430 | ;; |
---|
4431 | *) |
---|
4432 | # FIXME: insert proper C++ library support |
---|
4433 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4434 | ;; |
---|
4435 | esac |
---|
4436 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
---|
4437 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
4438 | |
---|
4439 | _LT_AC_TAGVAR(GCC, $1)="$GXX" |
---|
4440 | _LT_AC_TAGVAR(LD, $1)="$LD" |
---|
4441 | |
---|
4442 | AC_LIBTOOL_POSTDEP_PREDEP($1) |
---|
4443 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4444 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4445 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4446 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4447 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4448 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4449 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4450 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
4451 | |
---|
4452 | AC_LIBTOOL_CONFIG($1) |
---|
4453 | |
---|
4454 | AC_LANG_POP |
---|
4455 | CC=$lt_save_CC |
---|
4456 | LDCXX=$LD |
---|
4457 | LD=$lt_save_LD |
---|
4458 | GCC=$lt_save_GCC |
---|
4459 | with_gnu_ldcxx=$with_gnu_ld |
---|
4460 | with_gnu_ld=$lt_save_with_gnu_ld |
---|
4461 | lt_cv_path_LDCXX=$lt_cv_path_LD |
---|
4462 | lt_cv_path_LD=$lt_save_path_LD |
---|
4463 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld |
---|
4464 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld |
---|
4465 | ])# AC_LIBTOOL_LANG_CXX_CONFIG |
---|
4466 | |
---|
4467 | # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) |
---|
4468 | # ------------------------ |
---|
4469 | # Figure out "hidden" library dependencies from verbose |
---|
4470 | # compiler output when linking a shared library. |
---|
4471 | # Parse the compiler output and extract the necessary |
---|
4472 | # objects, libraries and library flags. |
---|
4473 | AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ |
---|
4474 | dnl we can't use the lt_simple_compile_test_code here, |
---|
4475 | dnl because it contains code intended for an executable, |
---|
4476 | dnl not a library. It's possible we should let each |
---|
4477 | dnl tag define a new lt_????_link_test_code variable, |
---|
4478 | dnl but it's only used here... |
---|
4479 | ifelse([$1],[],[cat > conftest.$ac_ext <<EOF |
---|
4480 | int a; |
---|
4481 | void foo (void) { a = 0; } |
---|
4482 | EOF |
---|
4483 | ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF |
---|
4484 | class Foo |
---|
4485 | { |
---|
4486 | public: |
---|
4487 | Foo (void) { a = 0; } |
---|
4488 | private: |
---|
4489 | int a; |
---|
4490 | }; |
---|
4491 | EOF |
---|
4492 | ],[$1],[F77],[cat > conftest.$ac_ext <<EOF |
---|
4493 | subroutine foo |
---|
4494 | implicit none |
---|
4495 | integer*4 a |
---|
4496 | a=0 |
---|
4497 | return |
---|
4498 | end |
---|
4499 | EOF |
---|
4500 | ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF |
---|
4501 | public class foo { |
---|
4502 | private int a; |
---|
4503 | public void bar (void) { |
---|
4504 | a = 0; |
---|
4505 | } |
---|
4506 | }; |
---|
4507 | EOF |
---|
4508 | ]) |
---|
4509 | dnl Parse the compiler output and extract the necessary |
---|
4510 | dnl objects, libraries and library flags. |
---|
4511 | if AC_TRY_EVAL(ac_compile); then |
---|
4512 | # Parse the compiler output and extract the necessary |
---|
4513 | # objects, libraries and library flags. |
---|
4514 | |
---|
4515 | # Sentinel used to keep track of whether or not we are before |
---|
4516 | # the conftest object file. |
---|
4517 | pre_test_object_deps_done=no |
---|
4518 | |
---|
4519 | # The `*' in the case matches for architectures that use `case' in |
---|
4520 | # $output_verbose_cmd can trigger glob expansion during the loop |
---|
4521 | # eval without this substitution. |
---|
4522 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" |
---|
4523 | |
---|
4524 | for p in `eval $output_verbose_link_cmd`; do |
---|
4525 | case $p in |
---|
4526 | |
---|
4527 | -L* | -R* | -l*) |
---|
4528 | # Some compilers place space between "-{L,R}" and the path. |
---|
4529 | # Remove the space. |
---|
4530 | if test $p = "-L" \ |
---|
4531 | || test $p = "-R"; then |
---|
4532 | prev=$p |
---|
4533 | continue |
---|
4534 | else |
---|
4535 | prev= |
---|
4536 | fi |
---|
4537 | |
---|
4538 | if test "$pre_test_object_deps_done" = no; then |
---|
4539 | case $p in |
---|
4540 | -L* | -R*) |
---|
4541 | # Internal compiler library paths should come after those |
---|
4542 | # provided the user. The postdeps already come after the |
---|
4543 | # user supplied libs so there is no need to process them. |
---|
4544 | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
---|
4545 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
---|
4546 | else |
---|
4547 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
---|
4548 | fi |
---|
4549 | ;; |
---|
4550 | # The "-l" case would never come before the object being |
---|
4551 | # linked, so don't bother handling this case. |
---|
4552 | esac |
---|
4553 | else |
---|
4554 | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
---|
4555 | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
---|
4556 | else |
---|
4557 | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
---|
4558 | fi |
---|
4559 | fi |
---|
4560 | ;; |
---|
4561 | |
---|
4562 | *.$objext) |
---|
4563 | # This assumes that the test object file only shows up |
---|
4564 | # once in the compiler output. |
---|
4565 | if test "$p" = "conftest.$objext"; then |
---|
4566 | pre_test_object_deps_done=yes |
---|
4567 | continue |
---|
4568 | fi |
---|
4569 | |
---|
4570 | if test "$pre_test_object_deps_done" = no; then |
---|
4571 | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
---|
4572 | _LT_AC_TAGVAR(predep_objects, $1)="$p" |
---|
4573 | else |
---|
4574 | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
---|
4575 | fi |
---|
4576 | else |
---|
4577 | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
---|
4578 | _LT_AC_TAGVAR(postdep_objects, $1)="$p" |
---|
4579 | else |
---|
4580 | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
---|
4581 | fi |
---|
4582 | fi |
---|
4583 | ;; |
---|
4584 | |
---|
4585 | *) ;; # Ignore the rest. |
---|
4586 | |
---|
4587 | esac |
---|
4588 | done |
---|
4589 | |
---|
4590 | # Clean up. |
---|
4591 | rm -f a.out a.exe |
---|
4592 | else |
---|
4593 | echo "libtool.m4: error: problem compiling $1 test program" |
---|
4594 | fi |
---|
4595 | |
---|
4596 | $rm -f confest.$objext |
---|
4597 | |
---|
4598 | case " $_LT_AC_TAGVAR(postdeps, $1) " in |
---|
4599 | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
---|
4600 | esac |
---|
4601 | ])# AC_LIBTOOL_POSTDEP_PREDEP |
---|
4602 | |
---|
4603 | # AC_LIBTOOL_LANG_F77_CONFIG |
---|
4604 | # ------------------------ |
---|
4605 | # Ensure that the configuration vars for the C compiler are |
---|
4606 | # suitably defined. Those variables are subsequently used by |
---|
4607 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4608 | AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) |
---|
4609 | AC_DEFUN([_LT_AC_LANG_F77_CONFIG], |
---|
4610 | [AC_REQUIRE([AC_PROG_F77]) |
---|
4611 | AC_LANG_PUSH(Fortran 77) |
---|
4612 | |
---|
4613 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4614 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
4615 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
4616 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
4617 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
4618 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
4619 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
4620 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
4621 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
4622 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
4623 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
4624 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
4625 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
4626 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
4627 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
---|
4628 | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
---|
4629 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
4630 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
4631 | |
---|
4632 | # Source file extension for f77 test sources. |
---|
4633 | ac_ext=f |
---|
4634 | |
---|
4635 | # Object file extension for compiled f77 test sources. |
---|
4636 | objext=o |
---|
4637 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4638 | |
---|
4639 | # Code to be used in simple compile tests |
---|
4640 | lt_simple_compile_test_code=" subroutine t\n return\n end\n" |
---|
4641 | |
---|
4642 | # Code to be used in simple link tests |
---|
4643 | lt_simple_link_test_code=" program t\n end\n" |
---|
4644 | |
---|
4645 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4646 | _LT_AC_SYS_COMPILER |
---|
4647 | |
---|
4648 | # Allow CC to be a program name with arguments. |
---|
4649 | lt_save_CC="$CC" |
---|
4650 | CC=${F77-"f77"} |
---|
4651 | compiler=$CC |
---|
4652 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4653 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
---|
4654 | |
---|
4655 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
4656 | AC_MSG_RESULT([$can_build_shared]) |
---|
4657 | |
---|
4658 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
4659 | test "$can_build_shared" = "no" && enable_shared=no |
---|
4660 | |
---|
4661 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
4662 | # are all built from PIC. |
---|
4663 | case "$host_os" in |
---|
4664 | aix3*) |
---|
4665 | test "$enable_shared" = yes && enable_static=no |
---|
4666 | if test -n "$RANLIB"; then |
---|
4667 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
4668 | postinstall_cmds='$RANLIB $lib' |
---|
4669 | fi |
---|
4670 | ;; |
---|
4671 | aix4* | aix5*) |
---|
4672 | test "$enable_shared" = yes && enable_static=no |
---|
4673 | ;; |
---|
4674 | esac |
---|
4675 | AC_MSG_RESULT([$enable_shared]) |
---|
4676 | |
---|
4677 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
4678 | # Make sure either enable_shared or enable_static is yes. |
---|
4679 | test "$enable_shared" = yes || enable_static=yes |
---|
4680 | AC_MSG_RESULT([$enable_static]) |
---|
4681 | |
---|
4682 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
4683 | |
---|
4684 | _LT_AC_TAGVAR(GCC, $1)="$G77" |
---|
4685 | _LT_AC_TAGVAR(LD, $1)="$LD" |
---|
4686 | |
---|
4687 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4688 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4689 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4690 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4691 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4692 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4693 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4694 | |
---|
4695 | |
---|
4696 | AC_LIBTOOL_CONFIG($1) |
---|
4697 | |
---|
4698 | AC_LANG_POP |
---|
4699 | CC="$lt_save_CC" |
---|
4700 | ])# AC_LIBTOOL_LANG_F77_CONFIG |
---|
4701 | |
---|
4702 | |
---|
4703 | # AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
4704 | # -------------------------- |
---|
4705 | # Ensure that the configuration vars for the C compiler are |
---|
4706 | # suitably defined. Those variables are subsequently used by |
---|
4707 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4708 | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
---|
4709 | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
---|
4710 | [AC_LANG_SAVE |
---|
4711 | |
---|
4712 | # Source file extension for Java test sources. |
---|
4713 | ac_ext=java |
---|
4714 | |
---|
4715 | # Object file extension for compiled Java test sources. |
---|
4716 | objext=o |
---|
4717 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4718 | |
---|
4719 | # Code to be used in simple compile tests |
---|
4720 | lt_simple_compile_test_code="class foo {}\n" |
---|
4721 | |
---|
4722 | # Code to be used in simple link tests |
---|
4723 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' |
---|
4724 | |
---|
4725 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4726 | _LT_AC_SYS_COMPILER |
---|
4727 | |
---|
4728 | # Allow CC to be a program name with arguments. |
---|
4729 | lt_save_CC="$CC" |
---|
4730 | CC=${GCJ-"gcj"} |
---|
4731 | compiler=$CC |
---|
4732 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4733 | |
---|
4734 | # GCJ did not exist at the time GCC didn't implicitly link libc in. |
---|
4735 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4736 | |
---|
4737 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
---|
4738 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4739 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4740 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4741 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4742 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4743 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4744 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4745 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
4746 | |
---|
4747 | AC_LIBTOOL_CONFIG($1) |
---|
4748 | |
---|
4749 | AC_LANG_RESTORE |
---|
4750 | CC="$lt_save_CC" |
---|
4751 | ])# AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
4752 | |
---|
4753 | |
---|
4754 | # AC_LIBTOOL_LANG_RC_CONFIG |
---|
4755 | # -------------------------- |
---|
4756 | # Ensure that the configuration vars for the Windows resource compiler are |
---|
4757 | # suitably defined. Those variables are subsequently used by |
---|
4758 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4759 | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) |
---|
4760 | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], |
---|
4761 | [AC_LANG_SAVE |
---|
4762 | |
---|
4763 | # Source file extension for RC test sources. |
---|
4764 | ac_ext=rc |
---|
4765 | |
---|
4766 | # Object file extension for compiled RC test sources. |
---|
4767 | objext=o |
---|
4768 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4769 | |
---|
4770 | # Code to be used in simple compile tests |
---|
4771 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' |
---|
4772 | |
---|
4773 | # Code to be used in simple link tests |
---|
4774 | lt_simple_link_test_code="$lt_simple_compile_test_code" |
---|
4775 | |
---|
4776 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4777 | _LT_AC_SYS_COMPILER |
---|
4778 | |
---|
4779 | # Allow CC to be a program name with arguments. |
---|
4780 | lt_save_CC="$CC" |
---|
4781 | CC=${RC-"windres"} |
---|
4782 | compiler=$CC |
---|
4783 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4784 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
---|
4785 | |
---|
4786 | AC_LIBTOOL_CONFIG($1) |
---|
4787 | |
---|
4788 | AC_LANG_RESTORE |
---|
4789 | CC="$lt_save_CC" |
---|
4790 | ])# AC_LIBTOOL_LANG_RC_CONFIG |
---|
4791 | |
---|
4792 | |
---|
4793 | # AC_LIBTOOL_CONFIG([TAGNAME]) |
---|
4794 | # ---------------------------- |
---|
4795 | # If TAGNAME is not passed, then create an initial libtool script |
---|
4796 | # with a default configuration from the untagged config vars. Otherwise |
---|
4797 | # add code to config.status for appending the configuration named by |
---|
4798 | # TAGNAME from the matching tagged config vars. |
---|
4799 | AC_DEFUN([AC_LIBTOOL_CONFIG], |
---|
4800 | [# The else clause should only fire when bootstrapping the |
---|
4801 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
---|
4802 | # with your package, and you will get complaints that there are |
---|
4803 | # no rules to generate ltmain.sh. |
---|
4804 | if test -f "$ltmain"; then |
---|
4805 | # See if we are running on zsh, and set the options which allow our commands through |
---|
4806 | # without removal of \ escapes. |
---|
4807 | if test -n "${ZSH_VERSION+set}" ; then |
---|
4808 | setopt NO_GLOB_SUBST |
---|
4809 | fi |
---|
4810 | # Now quote all the things that may contain metacharacters while being |
---|
4811 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
---|
4812 | # variables and quote the copies for generation of the libtool script. |
---|
4813 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ |
---|
4814 | SED SHELL STRIP \ |
---|
4815 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ |
---|
4816 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ |
---|
4817 | deplibs_check_method reload_flag reload_cmds need_locks \ |
---|
4818 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ |
---|
4819 | lt_cv_sys_global_symbol_to_c_name_address \ |
---|
4820 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
---|
4821 | old_postinstall_cmds old_postuninstall_cmds \ |
---|
4822 | _LT_AC_TAGVAR(compiler, $1) \ |
---|
4823 | _LT_AC_TAGVAR(CC, $1) \ |
---|
4824 | _LT_AC_TAGVAR(LD, $1) \ |
---|
4825 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ |
---|
4826 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ |
---|
4827 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ |
---|
4828 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ |
---|
4829 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ |
---|
4830 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ |
---|
4831 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ |
---|
4832 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ |
---|
4833 | _LT_AC_TAGVAR(old_archive_cmds, $1) \ |
---|
4834 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ |
---|
4835 | _LT_AC_TAGVAR(predep_objects, $1) \ |
---|
4836 | _LT_AC_TAGVAR(postdep_objects, $1) \ |
---|
4837 | _LT_AC_TAGVAR(predeps, $1) \ |
---|
4838 | _LT_AC_TAGVAR(postdeps, $1) \ |
---|
4839 | _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ |
---|
4840 | _LT_AC_TAGVAR(archive_cmds, $1) \ |
---|
4841 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ |
---|
4842 | _LT_AC_TAGVAR(postinstall_cmds, $1) \ |
---|
4843 | _LT_AC_TAGVAR(postuninstall_cmds, $1) \ |
---|
4844 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ |
---|
4845 | _LT_AC_TAGVAR(allow_undefined_flag, $1) \ |
---|
4846 | _LT_AC_TAGVAR(no_undefined_flag, $1) \ |
---|
4847 | _LT_AC_TAGVAR(export_symbols_cmds, $1) \ |
---|
4848 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ |
---|
4849 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ |
---|
4850 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ |
---|
4851 | _LT_AC_TAGVAR(hardcode_automatic, $1) \ |
---|
4852 | _LT_AC_TAGVAR(module_cmds, $1) \ |
---|
4853 | _LT_AC_TAGVAR(module_expsym_cmds, $1) \ |
---|
4854 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ |
---|
4855 | _LT_AC_TAGVAR(exclude_expsyms, $1) \ |
---|
4856 | _LT_AC_TAGVAR(include_expsyms, $1); do |
---|
4857 | |
---|
4858 | case $var in |
---|
4859 | _LT_AC_TAGVAR(old_archive_cmds, $1) | \ |
---|
4860 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ |
---|
4861 | _LT_AC_TAGVAR(archive_cmds, $1) | \ |
---|
4862 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ |
---|
4863 | _LT_AC_TAGVAR(module_cmds, $1) | \ |
---|
4864 | _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ |
---|
4865 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ |
---|
4866 | _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ |
---|
4867 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ |
---|
4868 | postinstall_cmds | postuninstall_cmds | \ |
---|
4869 | old_postinstall_cmds | old_postuninstall_cmds | \ |
---|
4870 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
---|
4871 | # Double-quote double-evaled strings. |
---|
4872 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
---|
4873 | ;; |
---|
4874 | *) |
---|
4875 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
---|
4876 | ;; |
---|
4877 | esac |
---|
4878 | done |
---|
4879 | |
---|
4880 | case $lt_echo in |
---|
4881 | *'\[$]0 --fallback-echo"') |
---|
4882 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
---|
4883 | ;; |
---|
4884 | esac |
---|
4885 | |
---|
4886 | ifelse([$1], [], |
---|
4887 | [cfgfile="${ofile}T" |
---|
4888 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
---|
4889 | $rm -f "$cfgfile" |
---|
4890 | AC_MSG_NOTICE([creating $ofile])], |
---|
4891 | [cfgfile="$ofile"]) |
---|
4892 | |
---|
4893 | cat <<__EOF__ >> "$cfgfile" |
---|
4894 | ifelse([$1], [], |
---|
4895 | [#! $SHELL |
---|
4896 | |
---|
4897 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
---|
4898 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
---|
4899 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
---|
4900 | # |
---|
4901 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
---|
4902 | # Free Software Foundation, Inc. |
---|
4903 | # |
---|
4904 | # This file is part of GNU Libtool: |
---|
4905 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
---|
4906 | # |
---|
4907 | # This program is free software; you can redistribute it and/or modify |
---|
4908 | # it under the terms of the GNU General Public License as published by |
---|
4909 | # the Free Software Foundation; either version 2 of the License, or |
---|
4910 | # (at your option) any later version. |
---|
4911 | # |
---|
4912 | # This program is distributed in the hope that it will be useful, but |
---|
4913 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
4914 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
4915 | # General Public License for more details. |
---|
4916 | # |
---|
4917 | # You should have received a copy of the GNU General Public License |
---|
4918 | # along with this program; if not, write to the Free Software |
---|
4919 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
4920 | # |
---|
4921 | # As a special exception to the GNU General Public License, if you |
---|
4922 | # distribute this file as part of a program that contains a |
---|
4923 | # configuration script generated by Autoconf, you may include it under |
---|
4924 | # the same distribution terms that you use for the rest of that program. |
---|
4925 | |
---|
4926 | # A sed program that does not truncate output. |
---|
4927 | SED=$lt_SED |
---|
4928 | |
---|
4929 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
---|
4930 | Xsed="$SED -e s/^X//" |
---|
4931 | |
---|
4932 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
4933 | # if CDPATH is set. |
---|
4934 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
4935 | |
---|
4936 | # The names of the tagged configurations supported by this script. |
---|
4937 | available_tags= |
---|
4938 | |
---|
4939 | # ### BEGIN LIBTOOL CONFIG], |
---|
4940 | [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
---|
4941 | |
---|
4942 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
4943 | |
---|
4944 | # Shell to use when invoking shell scripts. |
---|
4945 | SHELL=$lt_SHELL |
---|
4946 | |
---|
4947 | # Whether or not to build shared libraries. |
---|
4948 | build_libtool_libs=$enable_shared |
---|
4949 | |
---|
4950 | # Whether or not to build static libraries. |
---|
4951 | build_old_libs=$enable_static |
---|
4952 | |
---|
4953 | # Whether or not to add -lc for building shared libraries. |
---|
4954 | build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) |
---|
4955 | |
---|
4956 | # Whether or not to disallow shared libs when runtime libs are static |
---|
4957 | allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) |
---|
4958 | |
---|
4959 | # Whether or not to optimize for fast installation. |
---|
4960 | fast_install=$enable_fast_install |
---|
4961 | |
---|
4962 | # The host system. |
---|
4963 | host_alias=$host_alias |
---|
4964 | host=$host |
---|
4965 | |
---|
4966 | # An echo program that does not interpret backslashes. |
---|
4967 | echo=$lt_echo |
---|
4968 | |
---|
4969 | # The archiver. |
---|
4970 | AR=$lt_AR |
---|
4971 | AR_FLAGS=$lt_AR_FLAGS |
---|
4972 | |
---|
4973 | # A C compiler. |
---|
4974 | LTCC=$lt_LTCC |
---|
4975 | |
---|
4976 | # A language-specific compiler. |
---|
4977 | CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) |
---|
4978 | |
---|
4979 | # Is the compiler the GNU C compiler? |
---|
4980 | with_gcc=$_LT_AC_TAGVAR(GCC, $1) |
---|
4981 | |
---|
4982 | # An ERE matcher. |
---|
4983 | EGREP=$lt_EGREP |
---|
4984 | |
---|
4985 | # The linker used to build libraries. |
---|
4986 | LD=$lt_[]_LT_AC_TAGVAR(LD, $1) |
---|
4987 | |
---|
4988 | # Whether we need hard or soft links. |
---|
4989 | LN_S=$lt_LN_S |
---|
4990 | |
---|
4991 | # A BSD-compatible nm program. |
---|
4992 | NM=$lt_NM |
---|
4993 | |
---|
4994 | # A symbol stripping program |
---|
4995 | STRIP=$lt_STRIP |
---|
4996 | |
---|
4997 | # Used to examine libraries when file_magic_cmd begins "file" |
---|
4998 | MAGIC_CMD=$MAGIC_CMD |
---|
4999 | |
---|
5000 | # Used on cygwin: DLL creation program. |
---|
5001 | DLLTOOL="$DLLTOOL" |
---|
5002 | |
---|
5003 | # Used on cygwin: object dumper. |
---|
5004 | OBJDUMP="$OBJDUMP" |
---|
5005 | |
---|
5006 | # Used on cygwin: assembler. |
---|
5007 | AS="$AS" |
---|
5008 | |
---|
5009 | # The name of the directory that contains temporary libtool files. |
---|
5010 | objdir=$objdir |
---|
5011 | |
---|
5012 | # How to create reloadable object files. |
---|
5013 | reload_flag=$lt_reload_flag |
---|
5014 | reload_cmds=$lt_reload_cmds |
---|
5015 | |
---|
5016 | # How to pass a linker flag through the compiler. |
---|
5017 | wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
---|
5018 | |
---|
5019 | # Object file suffix (normally "o"). |
---|
5020 | objext="$ac_objext" |
---|
5021 | |
---|
5022 | # Old archive suffix (normally "a"). |
---|
5023 | libext="$libext" |
---|
5024 | |
---|
5025 | # Shared library suffix (normally ".so"). |
---|
5026 | shrext_cmds='$shrext_cmds' |
---|
5027 | |
---|
5028 | # Executable file suffix (normally ""). |
---|
5029 | exeext="$exeext" |
---|
5030 | |
---|
5031 | # Additional compiler flags for building library objects. |
---|
5032 | pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
---|
5033 | pic_mode=$pic_mode |
---|
5034 | |
---|
5035 | # What is the maximum length of a command? |
---|
5036 | max_cmd_len=$lt_cv_sys_max_cmd_len |
---|
5037 | |
---|
5038 | # Does compiler simultaneously support -c and -o options? |
---|
5039 | compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) |
---|
5040 | |
---|
5041 | # Must we lock files when doing compilation ? |
---|
5042 | need_locks=$lt_need_locks |
---|
5043 | |
---|
5044 | # Do we need the lib prefix for modules? |
---|
5045 | need_lib_prefix=$need_lib_prefix |
---|
5046 | |
---|
5047 | # Do we need a version for libraries? |
---|
5048 | need_version=$need_version |
---|
5049 | |
---|
5050 | # Whether dlopen is supported. |
---|
5051 | dlopen_support=$enable_dlopen |
---|
5052 | |
---|
5053 | # Whether dlopen of programs is supported. |
---|
5054 | dlopen_self=$enable_dlopen_self |
---|
5055 | |
---|
5056 | # Whether dlopen of statically linked programs is supported. |
---|
5057 | dlopen_self_static=$enable_dlopen_self_static |
---|
5058 | |
---|
5059 | # Compiler flag to prevent dynamic linking. |
---|
5060 | link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) |
---|
5061 | |
---|
5062 | # Compiler flag to turn off builtin functions. |
---|
5063 | no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) |
---|
5064 | |
---|
5065 | # Compiler flag to allow reflexive dlopens. |
---|
5066 | export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) |
---|
5067 | |
---|
5068 | # Compiler flag to generate shared objects directly from archives. |
---|
5069 | whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) |
---|
5070 | |
---|
5071 | # Compiler flag to generate thread-safe objects. |
---|
5072 | thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) |
---|
5073 | |
---|
5074 | # Library versioning type. |
---|
5075 | version_type=$version_type |
---|
5076 | |
---|
5077 | # Format of library name prefix. |
---|
5078 | libname_spec=$lt_libname_spec |
---|
5079 | |
---|
5080 | # List of archive names. First name is the real one, the rest are links. |
---|
5081 | # The last name is the one that the linker finds with -lNAME. |
---|
5082 | library_names_spec=$lt_library_names_spec |
---|
5083 | |
---|
5084 | # The coded name of the library, if different from the real name. |
---|
5085 | soname_spec=$lt_soname_spec |
---|
5086 | |
---|
5087 | # Commands used to build and install an old-style archive. |
---|
5088 | RANLIB=$lt_RANLIB |
---|
5089 | old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) |
---|
5090 | old_postinstall_cmds=$lt_old_postinstall_cmds |
---|
5091 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
---|
5092 | |
---|
5093 | # Create an old-style archive from a shared archive. |
---|
5094 | old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) |
---|
5095 | |
---|
5096 | # Create a temporary old-style archive to link instead of a shared archive. |
---|
5097 | old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) |
---|
5098 | |
---|
5099 | # Commands used to build and install a shared archive. |
---|
5100 | archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) |
---|
5101 | archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) |
---|
5102 | postinstall_cmds=$lt_postinstall_cmds |
---|
5103 | postuninstall_cmds=$lt_postuninstall_cmds |
---|
5104 | |
---|
5105 | # Commands used to build a loadable module (assumed same as above if empty) |
---|
5106 | module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) |
---|
5107 | module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) |
---|
5108 | |
---|
5109 | # Commands to strip libraries. |
---|
5110 | old_striplib=$lt_old_striplib |
---|
5111 | striplib=$lt_striplib |
---|
5112 | |
---|
5113 | # Dependencies to place before the objects being linked to create a |
---|
5114 | # shared library. |
---|
5115 | predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) |
---|
5116 | |
---|
5117 | # Dependencies to place after the objects being linked to create a |
---|
5118 | # shared library. |
---|
5119 | postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) |
---|
5120 | |
---|
5121 | # Dependencies to place before the objects being linked to create a |
---|
5122 | # shared library. |
---|
5123 | predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) |
---|
5124 | |
---|
5125 | # Dependencies to place after the objects being linked to create a |
---|
5126 | # shared library. |
---|
5127 | postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) |
---|
5128 | |
---|
5129 | # The library search path used internally by the compiler when linking |
---|
5130 | # a shared library. |
---|
5131 | compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) |
---|
5132 | |
---|
5133 | # Method to check whether dependent libraries are shared objects. |
---|
5134 | deplibs_check_method=$lt_deplibs_check_method |
---|
5135 | |
---|
5136 | # Command to use when deplibs_check_method == file_magic. |
---|
5137 | file_magic_cmd=$lt_file_magic_cmd |
---|
5138 | |
---|
5139 | # Flag that allows shared libraries with undefined symbols to be built. |
---|
5140 | allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) |
---|
5141 | |
---|
5142 | # Flag that forces no undefined symbols. |
---|
5143 | no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) |
---|
5144 | |
---|
5145 | # Commands used to finish a libtool library installation in a directory. |
---|
5146 | finish_cmds=$lt_finish_cmds |
---|
5147 | |
---|
5148 | # Same as above, but a single script fragment to be evaled but not shown. |
---|
5149 | finish_eval=$lt_finish_eval |
---|
5150 | |
---|
5151 | # Take the output of nm and produce a listing of raw symbols and C names. |
---|
5152 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe |
---|
5153 | |
---|
5154 | # Transform the output of nm in a proper C declaration |
---|
5155 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl |
---|
5156 | |
---|
5157 | # Transform the output of nm in a C name address pair |
---|
5158 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address |
---|
5159 | |
---|
5160 | # This is the shared library runtime path variable. |
---|
5161 | runpath_var=$runpath_var |
---|
5162 | |
---|
5163 | # This is the shared library path variable. |
---|
5164 | shlibpath_var=$shlibpath_var |
---|
5165 | |
---|
5166 | # Is shlibpath searched before the hard-coded library search path? |
---|
5167 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
---|
5168 | |
---|
5169 | # How to hardcode a shared library path into an executable. |
---|
5170 | hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) |
---|
5171 | |
---|
5172 | # Whether we should hardcode library paths into libraries. |
---|
5173 | hardcode_into_libs=$hardcode_into_libs |
---|
5174 | |
---|
5175 | # Flag to hardcode \$libdir into a binary during linking. |
---|
5176 | # This must work even if \$libdir does not exist. |
---|
5177 | hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) |
---|
5178 | |
---|
5179 | # If ld is used when linking, flag to hardcode \$libdir into |
---|
5180 | # a binary during linking. This must work even if \$libdir does |
---|
5181 | # not exist. |
---|
5182 | hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) |
---|
5183 | |
---|
5184 | # Whether we need a single -rpath flag with a separated argument. |
---|
5185 | hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) |
---|
5186 | |
---|
5187 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the |
---|
5188 | # resulting binary. |
---|
5189 | hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) |
---|
5190 | |
---|
5191 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
---|
5192 | # resulting binary. |
---|
5193 | hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) |
---|
5194 | |
---|
5195 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
---|
5196 | # the resulting binary. |
---|
5197 | hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) |
---|
5198 | |
---|
5199 | # Set to yes if building a shared library automatically hardcodes DIR into the library |
---|
5200 | # and all subsequent libraries and executables linked against it. |
---|
5201 | hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) |
---|
5202 | |
---|
5203 | # Variables whose values should be saved in libtool wrapper scripts and |
---|
5204 | # restored at relink time. |
---|
5205 | variables_saved_for_relink="$variables_saved_for_relink" |
---|
5206 | |
---|
5207 | # Whether libtool must link a program against all its dependency libraries. |
---|
5208 | link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) |
---|
5209 | |
---|
5210 | # Compile-time system search path for libraries |
---|
5211 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
---|
5212 | |
---|
5213 | # Run-time system search path for libraries |
---|
5214 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
---|
5215 | |
---|
5216 | # Fix the shell variable \$srcfile for the compiler. |
---|
5217 | fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" |
---|
5218 | |
---|
5219 | # Set to yes if exported symbols are required. |
---|
5220 | always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) |
---|
5221 | |
---|
5222 | # The commands to list exported symbols. |
---|
5223 | export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) |
---|
5224 | |
---|
5225 | # The commands to extract the exported symbol list from a shared archive. |
---|
5226 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
---|
5227 | |
---|
5228 | # Symbols that should not be listed in the preloaded symbols. |
---|
5229 | exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) |
---|
5230 | |
---|
5231 | # Symbols that must always be exported. |
---|
5232 | include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) |
---|
5233 | |
---|
5234 | ifelse([$1],[], |
---|
5235 | [# ### END LIBTOOL CONFIG], |
---|
5236 | [# ### END LIBTOOL TAG CONFIG: $tagname]) |
---|
5237 | |
---|
5238 | __EOF__ |
---|
5239 | |
---|
5240 | ifelse([$1],[], [ |
---|
5241 | case $host_os in |
---|
5242 | aix3*) |
---|
5243 | cat <<\EOF >> "$cfgfile" |
---|
5244 | |
---|
5245 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
5246 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
5247 | # vanish in a puff of smoke. |
---|
5248 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
5249 | COLLECT_NAMES= |
---|
5250 | export COLLECT_NAMES |
---|
5251 | fi |
---|
5252 | EOF |
---|
5253 | ;; |
---|
5254 | esac |
---|
5255 | |
---|
5256 | # We use sed instead of cat because bash on DJGPP gets confused if |
---|
5257 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
---|
5258 | # text mode, it properly converts lines to CR/LF. This bash problem |
---|
5259 | # is reportedly fixed, but why not run on old versions too? |
---|
5260 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
---|
5261 | |
---|
5262 | mv -f "$cfgfile" "$ofile" || \ |
---|
5263 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
---|
5264 | chmod +x "$ofile" |
---|
5265 | ]) |
---|
5266 | else |
---|
5267 | # If there is no Makefile yet, we rely on a make rule to execute |
---|
5268 | # `config.status --recheck' to rerun these tests and create the |
---|
5269 | # libtool script then. |
---|
5270 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` |
---|
5271 | if test -f "$ltmain_in"; then |
---|
5272 | test -f Makefile && make "$ltmain" |
---|
5273 | fi |
---|
5274 | fi |
---|
5275 | ])# AC_LIBTOOL_CONFIG |
---|
5276 | |
---|
5277 | |
---|
5278 | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
---|
5279 | # ------------------------------------------- |
---|
5280 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
---|
5281 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
5282 | |
---|
5283 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
---|
5284 | |
---|
5285 | if test "$GCC" = yes; then |
---|
5286 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
---|
5287 | |
---|
5288 | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
---|
5289 | lt_cv_prog_compiler_rtti_exceptions, |
---|
5290 | [-fno-rtti -fno-exceptions], [], |
---|
5291 | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
---|
5292 | fi |
---|
5293 | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
---|
5294 | |
---|
5295 | |
---|
5296 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
5297 | # --------------------------------- |
---|
5298 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
---|
5299 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
5300 | AC_REQUIRE([AC_PROG_NM]) |
---|
5301 | AC_REQUIRE([AC_OBJEXT]) |
---|
5302 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
---|
5303 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
---|
5304 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
---|
5305 | [ |
---|
5306 | # These are sane defaults that work on at least a few old systems. |
---|
5307 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
---|
5308 | |
---|
5309 | # Character class describing NM global symbol codes. |
---|
5310 | symcode='[[BCDEGRST]]' |
---|
5311 | |
---|
5312 | # Regexp to match symbols that can be accessed directly from C. |
---|
5313 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
---|
5314 | |
---|
5315 | # Transform the above into a raw symbol and a C symbol. |
---|
5316 | symxfrm='\1 \2\3 \3' |
---|
5317 | |
---|
5318 | # Transform an extracted symbol line into a proper C declaration |
---|
5319 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" |
---|
5320 | |
---|
5321 | # Transform an extracted symbol line into symbol name and symbol address |
---|
5322 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
5323 | |
---|
5324 | # Define system-specific variables. |
---|
5325 | case $host_os in |
---|
5326 | aix*) |
---|
5327 | symcode='[[BCDT]]' |
---|
5328 | ;; |
---|
5329 | cygwin* | mingw* | pw32*) |
---|
5330 | symcode='[[ABCDGISTW]]' |
---|
5331 | ;; |
---|
5332 | hpux*) # Its linker distinguishes data from code symbols |
---|
5333 | if test "$host_cpu" = ia64; then |
---|
5334 | symcode='[[ABCDEGRST]]' |
---|
5335 | fi |
---|
5336 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
---|
5337 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
5338 | ;; |
---|
5339 | irix* | nonstopux*) |
---|
5340 | symcode='[[BCDEGRST]]' |
---|
5341 | ;; |
---|
5342 | osf*) |
---|
5343 | symcode='[[BCDEGQRST]]' |
---|
5344 | ;; |
---|
5345 | solaris* | sysv5*) |
---|
5346 | symcode='[[BDRT]]' |
---|
5347 | ;; |
---|
5348 | sysv4) |
---|
5349 | symcode='[[DFNSTU]]' |
---|
5350 | ;; |
---|
5351 | esac |
---|
5352 | |
---|
5353 | # Handle CRLF in mingw tool chain |
---|
5354 | opt_cr= |
---|
5355 | case $build_os in |
---|
5356 | mingw*) |
---|
5357 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
---|
5358 | ;; |
---|
5359 | esac |
---|
5360 | |
---|
5361 | # If we're using GNU nm, then use its standard symbol codes. |
---|
5362 | case `$NM -V 2>&1` in |
---|
5363 | *GNU* | *'with BFD'*) |
---|
5364 | symcode='[[ABCDGIRSTW]]' ;; |
---|
5365 | esac |
---|
5366 | |
---|
5367 | # Try without a prefix undercore, then with it. |
---|
5368 | for ac_symprfx in "" "_"; do |
---|
5369 | |
---|
5370 | # Write the raw and C identifiers. |
---|
5371 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
---|
5372 | |
---|
5373 | # Check to see that the pipe works correctly. |
---|
5374 | pipe_works=no |
---|
5375 | |
---|
5376 | rm -f conftest* |
---|
5377 | cat > conftest.$ac_ext <<EOF |
---|
5378 | #ifdef __cplusplus |
---|
5379 | extern "C" { |
---|
5380 | #endif |
---|
5381 | char nm_test_var; |
---|
5382 | void nm_test_func(){} |
---|
5383 | #ifdef __cplusplus |
---|
5384 | } |
---|
5385 | #endif |
---|
5386 | int main(){nm_test_var='a';nm_test_func();return(0);} |
---|
5387 | EOF |
---|
5388 | |
---|
5389 | if AC_TRY_EVAL(ac_compile); then |
---|
5390 | # Now try to grab the symbols. |
---|
5391 | nlist=conftest.nm |
---|
5392 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
---|
5393 | # Try sorting and uniquifying the output. |
---|
5394 | if sort "$nlist" | uniq > "$nlist"T; then |
---|
5395 | mv -f "$nlist"T "$nlist" |
---|
5396 | else |
---|
5397 | rm -f "$nlist"T |
---|
5398 | fi |
---|
5399 | |
---|
5400 | # Make sure that we snagged all the symbols we need. |
---|
5401 | if grep ' nm_test_var$' "$nlist" >/dev/null; then |
---|
5402 | if grep ' nm_test_func$' "$nlist" >/dev/null; then |
---|
5403 | cat <<EOF > conftest.$ac_ext |
---|
5404 | #ifdef __cplusplus |
---|
5405 | extern "C" { |
---|
5406 | #endif |
---|
5407 | |
---|
5408 | EOF |
---|
5409 | # Now generate the symbol file. |
---|
5410 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' |
---|
5411 | |
---|
5412 | cat <<EOF >> conftest.$ac_ext |
---|
5413 | #if defined (__STDC__) && __STDC__ |
---|
5414 | # define lt_ptr_t void * |
---|
5415 | #else |
---|
5416 | # define lt_ptr_t char * |
---|
5417 | # define const |
---|
5418 | #endif |
---|
5419 | |
---|
5420 | /* The mapping between symbol names and symbols. */ |
---|
5421 | const struct { |
---|
5422 | const char *name; |
---|
5423 | lt_ptr_t address; |
---|
5424 | } |
---|
5425 | lt_preloaded_symbols[[]] = |
---|
5426 | { |
---|
5427 | EOF |
---|
5428 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext |
---|
5429 | cat <<\EOF >> conftest.$ac_ext |
---|
5430 | {0, (lt_ptr_t) 0} |
---|
5431 | }; |
---|
5432 | |
---|
5433 | #ifdef __cplusplus |
---|
5434 | } |
---|
5435 | #endif |
---|
5436 | EOF |
---|
5437 | # Now try linking the two files. |
---|
5438 | mv conftest.$ac_objext conftstm.$ac_objext |
---|
5439 | lt_save_LIBS="$LIBS" |
---|
5440 | lt_save_CFLAGS="$CFLAGS" |
---|
5441 | LIBS="conftstm.$ac_objext" |
---|
5442 | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
---|
5443 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
---|
5444 | pipe_works=yes |
---|
5445 | fi |
---|
5446 | LIBS="$lt_save_LIBS" |
---|
5447 | CFLAGS="$lt_save_CFLAGS" |
---|
5448 | else |
---|
5449 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
---|
5450 | fi |
---|
5451 | else |
---|
5452 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
---|
5453 | fi |
---|
5454 | else |
---|
5455 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
---|
5456 | fi |
---|
5457 | else |
---|
5458 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
---|
5459 | cat conftest.$ac_ext >&5 |
---|
5460 | fi |
---|
5461 | rm -f conftest* conftst* |
---|
5462 | |
---|
5463 | # Do not use the global_symbol_pipe unless it works. |
---|
5464 | if test "$pipe_works" = yes; then |
---|
5465 | break |
---|
5466 | else |
---|
5467 | lt_cv_sys_global_symbol_pipe= |
---|
5468 | fi |
---|
5469 | done |
---|
5470 | ]) |
---|
5471 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
---|
5472 | lt_cv_sys_global_symbol_to_cdecl= |
---|
5473 | fi |
---|
5474 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
---|
5475 | AC_MSG_RESULT(failed) |
---|
5476 | else |
---|
5477 | AC_MSG_RESULT(ok) |
---|
5478 | fi |
---|
5479 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
5480 | |
---|
5481 | |
---|
5482 | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
---|
5483 | # --------------------------------------- |
---|
5484 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
---|
5485 | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
---|
5486 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5487 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
---|
5488 | |
---|
5489 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
---|
5490 | ifelse([$1],[CXX],[ |
---|
5491 | # C++ specific cases for pic, static, wl, etc. |
---|
5492 | if test "$GXX" = yes; then |
---|
5493 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5494 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5495 | |
---|
5496 | case $host_os in |
---|
5497 | aix*) |
---|
5498 | # All AIX code is PIC. |
---|
5499 | if test "$host_cpu" = ia64; then |
---|
5500 | # AIX 5 now supports IA64 processor |
---|
5501 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5502 | fi |
---|
5503 | ;; |
---|
5504 | amigaos*) |
---|
5505 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
5506 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
5507 | # like `-m68040'. |
---|
5508 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
---|
5509 | ;; |
---|
5510 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
5511 | # PIC is the default for these OSes. |
---|
5512 | ;; |
---|
5513 | mingw* | os2* | pw32*) |
---|
5514 | # This hack is so that the source file can tell whether it is being |
---|
5515 | # built for inclusion in a dll (and should export symbols for example). |
---|
5516 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5517 | ;; |
---|
5518 | darwin* | rhapsody*) |
---|
5519 | # PIC is the default on this platform |
---|
5520 | # Common symbols not allowed in MH_DYLIB files |
---|
5521 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
---|
5522 | ;; |
---|
5523 | *djgpp*) |
---|
5524 | # DJGPP does not support shared libraries at all |
---|
5525 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5526 | ;; |
---|
5527 | sysv4*MP*) |
---|
5528 | if test -d /usr/nec; then |
---|
5529 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
---|
5530 | fi |
---|
5531 | ;; |
---|
5532 | hpux*) |
---|
5533 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5534 | # not for PA HP-UX. |
---|
5535 | case "$host_cpu" in |
---|
5536 | hppa*64*|ia64*) |
---|
5537 | ;; |
---|
5538 | *) |
---|
5539 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5540 | ;; |
---|
5541 | esac |
---|
5542 | ;; |
---|
5543 | *) |
---|
5544 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5545 | ;; |
---|
5546 | esac |
---|
5547 | else |
---|
5548 | case $host_os in |
---|
5549 | aix4* | aix5*) |
---|
5550 | # All AIX code is PIC. |
---|
5551 | if test "$host_cpu" = ia64; then |
---|
5552 | # AIX 5 now supports IA64 processor |
---|
5553 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5554 | else |
---|
5555 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
---|
5556 | fi |
---|
5557 | ;; |
---|
5558 | chorus*) |
---|
5559 | case $cc_basename in |
---|
5560 | cxch68) |
---|
5561 | # Green Hills C++ Compiler |
---|
5562 | # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" |
---|
5563 | ;; |
---|
5564 | esac |
---|
5565 | ;; |
---|
5566 | dgux*) |
---|
5567 | case $cc_basename in |
---|
5568 | ec++) |
---|
5569 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5570 | ;; |
---|
5571 | ghcx) |
---|
5572 | # Green Hills C++ Compiler |
---|
5573 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5574 | ;; |
---|
5575 | *) |
---|
5576 | ;; |
---|
5577 | esac |
---|
5578 | ;; |
---|
5579 | freebsd* | kfreebsd*-gnu) |
---|
5580 | # FreeBSD uses GNU C++ |
---|
5581 | ;; |
---|
5582 | hpux9* | hpux10* | hpux11*) |
---|
5583 | case $cc_basename in |
---|
5584 | CC) |
---|
5585 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5586 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
---|
5587 | if test "$host_cpu" != ia64; then |
---|
5588 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5589 | fi |
---|
5590 | ;; |
---|
5591 | aCC) |
---|
5592 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5593 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
---|
5594 | case "$host_cpu" in |
---|
5595 | hppa*64*|ia64*) |
---|
5596 | # +Z the default |
---|
5597 | ;; |
---|
5598 | *) |
---|
5599 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5600 | ;; |
---|
5601 | esac |
---|
5602 | ;; |
---|
5603 | *) |
---|
5604 | ;; |
---|
5605 | esac |
---|
5606 | ;; |
---|
5607 | irix5* | irix6* | nonstopux*) |
---|
5608 | case $cc_basename in |
---|
5609 | CC) |
---|
5610 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5611 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5612 | # CC pic flag -KPIC is the default. |
---|
5613 | ;; |
---|
5614 | *) |
---|
5615 | ;; |
---|
5616 | esac |
---|
5617 | ;; |
---|
5618 | linux*) |
---|
5619 | case $cc_basename in |
---|
5620 | KCC) |
---|
5621 | # KAI C++ Compiler |
---|
5622 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
---|
5623 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5624 | ;; |
---|
5625 | icpc) |
---|
5626 | # Intel C++ |
---|
5627 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5628 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5629 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5630 | ;; |
---|
5631 | cxx) |
---|
5632 | # Compaq C++ |
---|
5633 | # Make sure the PIC flag is empty. It appears that all Alpha |
---|
5634 | # Linux and Compaq Tru64 Unix objects are PIC. |
---|
5635 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5636 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5637 | ;; |
---|
5638 | *) |
---|
5639 | ;; |
---|
5640 | esac |
---|
5641 | ;; |
---|
5642 | lynxos*) |
---|
5643 | ;; |
---|
5644 | m88k*) |
---|
5645 | ;; |
---|
5646 | mvs*) |
---|
5647 | case $cc_basename in |
---|
5648 | cxx) |
---|
5649 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
---|
5650 | ;; |
---|
5651 | *) |
---|
5652 | ;; |
---|
5653 | esac |
---|
5654 | ;; |
---|
5655 | netbsd*) |
---|
5656 | ;; |
---|
5657 | osf3* | osf4* | osf5*) |
---|
5658 | case $cc_basename in |
---|
5659 | KCC) |
---|
5660 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
---|
5661 | ;; |
---|
5662 | RCC) |
---|
5663 | # Rational C++ 2.4.1 |
---|
5664 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5665 | ;; |
---|
5666 | cxx) |
---|
5667 | # Digital/Compaq C++ |
---|
5668 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5669 | # Make sure the PIC flag is empty. It appears that all Alpha |
---|
5670 | # Linux and Compaq Tru64 Unix objects are PIC. |
---|
5671 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5672 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5673 | ;; |
---|
5674 | *) |
---|
5675 | ;; |
---|
5676 | esac |
---|
5677 | ;; |
---|
5678 | psos*) |
---|
5679 | ;; |
---|
5680 | sco*) |
---|
5681 | case $cc_basename in |
---|
5682 | CC) |
---|
5683 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5684 | ;; |
---|
5685 | *) |
---|
5686 | ;; |
---|
5687 | esac |
---|
5688 | ;; |
---|
5689 | solaris*) |
---|
5690 | case $cc_basename in |
---|
5691 | CC) |
---|
5692 | # Sun C++ 4.2, 5.x and Centerline C++ |
---|
5693 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5694 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5695 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
---|
5696 | ;; |
---|
5697 | gcx) |
---|
5698 | # Green Hills C++ Compiler |
---|
5699 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
---|
5700 | ;; |
---|
5701 | *) |
---|
5702 | ;; |
---|
5703 | esac |
---|
5704 | ;; |
---|
5705 | sunos4*) |
---|
5706 | case $cc_basename in |
---|
5707 | CC) |
---|
5708 | # Sun C++ 4.x |
---|
5709 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5710 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5711 | ;; |
---|
5712 | lcc) |
---|
5713 | # Lucid |
---|
5714 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5715 | ;; |
---|
5716 | *) |
---|
5717 | ;; |
---|
5718 | esac |
---|
5719 | ;; |
---|
5720 | tandem*) |
---|
5721 | case $cc_basename in |
---|
5722 | NCC) |
---|
5723 | # NonStop-UX NCC 3.20 |
---|
5724 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5725 | ;; |
---|
5726 | *) |
---|
5727 | ;; |
---|
5728 | esac |
---|
5729 | ;; |
---|
5730 | unixware*) |
---|
5731 | ;; |
---|
5732 | vxworks*) |
---|
5733 | ;; |
---|
5734 | *) |
---|
5735 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5736 | ;; |
---|
5737 | esac |
---|
5738 | fi |
---|
5739 | ], |
---|
5740 | [ |
---|
5741 | if test "$GCC" = yes; then |
---|
5742 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5743 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5744 | |
---|
5745 | case $host_os in |
---|
5746 | aix*) |
---|
5747 | # All AIX code is PIC. |
---|
5748 | if test "$host_cpu" = ia64; then |
---|
5749 | # AIX 5 now supports IA64 processor |
---|
5750 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5751 | fi |
---|
5752 | ;; |
---|
5753 | |
---|
5754 | amigaos*) |
---|
5755 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
5756 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
5757 | # like `-m68040'. |
---|
5758 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
---|
5759 | ;; |
---|
5760 | |
---|
5761 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
5762 | # PIC is the default for these OSes. |
---|
5763 | ;; |
---|
5764 | |
---|
5765 | mingw* | pw32* | os2*) |
---|
5766 | # This hack is so that the source file can tell whether it is being |
---|
5767 | # built for inclusion in a dll (and should export symbols for example). |
---|
5768 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5769 | ;; |
---|
5770 | |
---|
5771 | darwin* | rhapsody*) |
---|
5772 | # PIC is the default on this platform |
---|
5773 | # Common symbols not allowed in MH_DYLIB files |
---|
5774 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
---|
5775 | ;; |
---|
5776 | |
---|
5777 | msdosdjgpp*) |
---|
5778 | # Just because we use GCC doesn't mean we suddenly get shared libraries |
---|
5779 | # on systems that don't support them. |
---|
5780 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5781 | enable_shared=no |
---|
5782 | ;; |
---|
5783 | |
---|
5784 | sysv4*MP*) |
---|
5785 | if test -d /usr/nec; then |
---|
5786 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
---|
5787 | fi |
---|
5788 | ;; |
---|
5789 | |
---|
5790 | hpux*) |
---|
5791 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5792 | # not for PA HP-UX. |
---|
5793 | case "$host_cpu" in |
---|
5794 | hppa*64*|ia64*) |
---|
5795 | # +Z the default |
---|
5796 | ;; |
---|
5797 | *) |
---|
5798 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5799 | ;; |
---|
5800 | esac |
---|
5801 | ;; |
---|
5802 | |
---|
5803 | *) |
---|
5804 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5805 | ;; |
---|
5806 | esac |
---|
5807 | else |
---|
5808 | # PORTME Check for flag to pass linker flags through the system compiler. |
---|
5809 | case $host_os in |
---|
5810 | aix*) |
---|
5811 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5812 | if test "$host_cpu" = ia64; then |
---|
5813 | # AIX 5 now supports IA64 processor |
---|
5814 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5815 | else |
---|
5816 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
---|
5817 | fi |
---|
5818 | ;; |
---|
5819 | |
---|
5820 | mingw* | pw32* | os2*) |
---|
5821 | # This hack is so that the source file can tell whether it is being |
---|
5822 | # built for inclusion in a dll (and should export symbols for example). |
---|
5823 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5824 | ;; |
---|
5825 | |
---|
5826 | hpux9* | hpux10* | hpux11*) |
---|
5827 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5828 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5829 | # not for PA HP-UX. |
---|
5830 | case "$host_cpu" in |
---|
5831 | hppa*64*|ia64*) |
---|
5832 | # +Z the default |
---|
5833 | ;; |
---|
5834 | *) |
---|
5835 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5836 | ;; |
---|
5837 | esac |
---|
5838 | # Is there a better lt_prog_compiler_static that works with the bundled CC? |
---|
5839 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
---|
5840 | ;; |
---|
5841 | |
---|
5842 | irix5* | irix6* | nonstopux*) |
---|
5843 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5844 | # PIC (with -KPIC) is the default. |
---|
5845 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5846 | ;; |
---|
5847 | |
---|
5848 | newsos6) |
---|
5849 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5850 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5851 | ;; |
---|
5852 | |
---|
5853 | linux*) |
---|
5854 | case $CC in |
---|
5855 | icc* | ecc*) |
---|
5856 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5857 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5858 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5859 | ;; |
---|
5860 | ccc*) |
---|
5861 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5862 | # All Alpha code is PIC. |
---|
5863 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5864 | ;; |
---|
5865 | esac |
---|
5866 | ;; |
---|
5867 | |
---|
5868 | osf3* | osf4* | osf5*) |
---|
5869 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5870 | # All OSF/1 code is PIC. |
---|
5871 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5872 | ;; |
---|
5873 | |
---|
5874 | sco3.2v5*) |
---|
5875 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' |
---|
5876 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' |
---|
5877 | ;; |
---|
5878 | |
---|
5879 | solaris*) |
---|
5880 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5881 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5882 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5883 | ;; |
---|
5884 | |
---|
5885 | sunos4*) |
---|
5886 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
---|
5887 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
---|
5888 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5889 | ;; |
---|
5890 | |
---|
5891 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
5892 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5893 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5894 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5895 | ;; |
---|
5896 | |
---|
5897 | sysv4*MP*) |
---|
5898 | if test -d /usr/nec ;then |
---|
5899 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
---|
5900 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5901 | fi |
---|
5902 | ;; |
---|
5903 | |
---|
5904 | uts4*) |
---|
5905 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5906 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5907 | ;; |
---|
5908 | |
---|
5909 | *) |
---|
5910 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5911 | ;; |
---|
5912 | esac |
---|
5913 | fi |
---|
5914 | ]) |
---|
5915 | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
---|
5916 | |
---|
5917 | # |
---|
5918 | # Check to make sure the PIC flag actually works. |
---|
5919 | # |
---|
5920 | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
---|
5921 | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
---|
5922 | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
---|
5923 | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], |
---|
5924 | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
---|
5925 | "" | " "*) ;; |
---|
5926 | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
---|
5927 | esac], |
---|
5928 | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5929 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
---|
5930 | fi |
---|
5931 | case "$host_os" in |
---|
5932 | # For platforms which do not support PIC, -DPIC is meaningless: |
---|
5933 | *djgpp*) |
---|
5934 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5935 | ;; |
---|
5936 | *) |
---|
5937 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" |
---|
5938 | ;; |
---|
5939 | esac |
---|
5940 | ]) |
---|
5941 | |
---|
5942 | |
---|
5943 | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
---|
5944 | # ------------------------------------ |
---|
5945 | # See if the linker supports building shared libraries. |
---|
5946 | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
---|
5947 | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
---|
5948 | ifelse([$1],[CXX],[ |
---|
5949 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5950 | case $host_os in |
---|
5951 | aix4* | aix5*) |
---|
5952 | # If we're using GNU nm, then we don't want the "-C" option. |
---|
5953 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
---|
5954 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
---|
5955 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5956 | else |
---|
5957 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5958 | fi |
---|
5959 | ;; |
---|
5960 | pw32*) |
---|
5961 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
---|
5962 | ;; |
---|
5963 | cygwin* | mingw*) |
---|
5964 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5965 | ;; |
---|
5966 | *) |
---|
5967 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5968 | ;; |
---|
5969 | esac |
---|
5970 | ],[ |
---|
5971 | runpath_var= |
---|
5972 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
5973 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
5974 | _LT_AC_TAGVAR(archive_cmds, $1)= |
---|
5975 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
5976 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= |
---|
5977 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
---|
5978 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
5979 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
5980 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= |
---|
5981 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
5982 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
5983 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
5984 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
5985 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
5986 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
5987 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
5988 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
5989 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
5990 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
5991 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
5992 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5993 | # include_expsyms should be a list of space-separated symbols to be *always* |
---|
5994 | # included in the symbol list |
---|
5995 | _LT_AC_TAGVAR(include_expsyms, $1)= |
---|
5996 | # exclude_expsyms can be an extended regexp of symbols to exclude |
---|
5997 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
---|
5998 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
---|
5999 | # as well as any symbol that contains `d'. |
---|
6000 | _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" |
---|
6001 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
---|
6002 | # platforms (ab)use it in PIC code, but their linkers get confused if |
---|
6003 | # the symbol is explicitly referenced. Since portable code cannot |
---|
6004 | # rely on this symbol name, it's probably fine to never include it in |
---|
6005 | # preloaded symbol tables. |
---|
6006 | extract_expsyms_cmds= |
---|
6007 | |
---|
6008 | case $host_os in |
---|
6009 | cygwin* | mingw* | pw32*) |
---|
6010 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
---|
6011 | # When not using gcc, we currently assume that we are using |
---|
6012 | # Microsoft Visual C++. |
---|
6013 | if test "$GCC" != yes; then |
---|
6014 | with_gnu_ld=no |
---|
6015 | fi |
---|
6016 | ;; |
---|
6017 | openbsd*) |
---|
6018 | with_gnu_ld=no |
---|
6019 | ;; |
---|
6020 | esac |
---|
6021 | |
---|
6022 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
6023 | if test "$with_gnu_ld" = yes; then |
---|
6024 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
6025 | wlarc='${wl}' |
---|
6026 | |
---|
6027 | # See if GNU ld supports shared libraries. |
---|
6028 | case $host_os in |
---|
6029 | aix3* | aix4* | aix5*) |
---|
6030 | # On AIX/PPC, the GNU linker is very broken |
---|
6031 | if test "$host_cpu" != ia64; then |
---|
6032 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6033 | cat <<EOF 1>&2 |
---|
6034 | |
---|
6035 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
---|
6036 | *** to be unable to reliably create shared libraries on AIX. |
---|
6037 | *** Therefore, libtool is disabling shared libraries support. If you |
---|
6038 | *** really care for shared libraries, you may want to modify your PATH |
---|
6039 | *** so that a non-GNU linker is found, and then restart. |
---|
6040 | |
---|
6041 | EOF |
---|
6042 | fi |
---|
6043 | ;; |
---|
6044 | |
---|
6045 | amigaos*) |
---|
6046 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
6047 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6048 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6049 | |
---|
6050 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
---|
6051 | # that the semantics of dynamic libraries on AmigaOS, at least up |
---|
6052 | # to version 4, is to share data among multiple programs linked |
---|
6053 | # with the same dynamic library. Since this doesn't match the |
---|
6054 | # behavior of shared libraries on other platforms, we can't use |
---|
6055 | # them. |
---|
6056 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6057 | ;; |
---|
6058 | |
---|
6059 | beos*) |
---|
6060 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
6061 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6062 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
---|
6063 | # support --undefined. This deserves some investigation. FIXME |
---|
6064 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
6065 | else |
---|
6066 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6067 | fi |
---|
6068 | ;; |
---|
6069 | |
---|
6070 | cygwin* | mingw* | pw32*) |
---|
6071 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
---|
6072 | # as there is no search path for DLLs. |
---|
6073 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6074 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6075 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
6076 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
6077 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
---|
6078 | |
---|
6079 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
---|
6080 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
6081 | # If the export-symbols file already is a .def file (1st line |
---|
6082 | # is EXPORTS), use it as is; otherwise, prepend... |
---|
6083 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
---|
6084 | cp $export_symbols $output_objdir/$soname.def; |
---|
6085 | else |
---|
6086 | echo EXPORTS > $output_objdir/$soname.def; |
---|
6087 | cat $export_symbols >> $output_objdir/$soname.def; |
---|
6088 | fi~ |
---|
6089 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
6090 | else |
---|
6091 | ld_shlibs=no |
---|
6092 | fi |
---|
6093 | ;; |
---|
6094 | |
---|
6095 | netbsd*) |
---|
6096 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
6097 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
---|
6098 | wlarc= |
---|
6099 | else |
---|
6100 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
6101 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
6102 | fi |
---|
6103 | ;; |
---|
6104 | |
---|
6105 | solaris* | sysv5*) |
---|
6106 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then |
---|
6107 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6108 | cat <<EOF 1>&2 |
---|
6109 | |
---|
6110 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
---|
6111 | *** create shared libraries on Solaris systems. Therefore, libtool |
---|
6112 | *** is disabling shared libraries support. We urge you to upgrade GNU |
---|
6113 | *** binutils to release 2.9.1 or newer. Another option is to modify |
---|
6114 | *** your PATH or compiler configuration so that the native linker is |
---|
6115 | *** used, and then restart. |
---|
6116 | |
---|
6117 | EOF |
---|
6118 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
6119 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
6120 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
6121 | else |
---|
6122 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6123 | fi |
---|
6124 | ;; |
---|
6125 | |
---|
6126 | sunos4*) |
---|
6127 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
6128 | wlarc= |
---|
6129 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6130 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6131 | ;; |
---|
6132 | |
---|
6133 | linux*) |
---|
6134 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
6135 | tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
6136 | _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" |
---|
6137 | supports_anon_versioning=no |
---|
6138 | case `$LD -v 2>/dev/null` in |
---|
6139 | *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
---|
6140 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
---|
6141 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
---|
6142 | *\ 2.11.*) ;; # other 2.11 versions |
---|
6143 | *) supports_anon_versioning=yes ;; |
---|
6144 | esac |
---|
6145 | if test $supports_anon_versioning = yes; then |
---|
6146 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ |
---|
6147 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
---|
6148 | $echo "local: *; };" >> $output_objdir/$libname.ver~ |
---|
6149 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' |
---|
6150 | else |
---|
6151 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" |
---|
6152 | fi |
---|
6153 | else |
---|
6154 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6155 | fi |
---|
6156 | ;; |
---|
6157 | |
---|
6158 | *) |
---|
6159 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
6160 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
6161 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
6162 | else |
---|
6163 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6164 | fi |
---|
6165 | ;; |
---|
6166 | esac |
---|
6167 | |
---|
6168 | if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then |
---|
6169 | runpath_var=LD_RUN_PATH |
---|
6170 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
---|
6171 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
6172 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
6173 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then |
---|
6174 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
6175 | else |
---|
6176 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
6177 | fi |
---|
6178 | fi |
---|
6179 | else |
---|
6180 | # PORTME fill in a description of your system's linker (not GNU ld) |
---|
6181 | case $host_os in |
---|
6182 | aix3*) |
---|
6183 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6184 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
6185 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
---|
6186 | # Note: this linker hardcodes the directories in LIBPATH if there |
---|
6187 | # are no directories specified by -L. |
---|
6188 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6189 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
---|
6190 | # Neither direct hardcoding nor static linking is supported with a |
---|
6191 | # broken collect2. |
---|
6192 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
6193 | fi |
---|
6194 | ;; |
---|
6195 | |
---|
6196 | aix4* | aix5*) |
---|
6197 | if test "$host_cpu" = ia64; then |
---|
6198 | # On IA64, the linker does run time linking by default, so we don't |
---|
6199 | # have to do anything special. |
---|
6200 | aix_use_runtimelinking=no |
---|
6201 | exp_sym_flag='-Bexport' |
---|
6202 | no_entry_flag="" |
---|
6203 | else |
---|
6204 | # If we're using GNU nm, then we don't want the "-C" option. |
---|
6205 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
---|
6206 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
---|
6207 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
6208 | else |
---|
6209 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
6210 | fi |
---|
6211 | aix_use_runtimelinking=no |
---|
6212 | |
---|
6213 | # Test if we are trying to use run time linking or normal |
---|
6214 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
6215 | # need to do runtime linking. |
---|
6216 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
6217 | for ld_flag in $LDFLAGS; do |
---|
6218 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
---|
6219 | aix_use_runtimelinking=yes |
---|
6220 | break |
---|
6221 | fi |
---|
6222 | done |
---|
6223 | esac |
---|
6224 | |
---|
6225 | exp_sym_flag='-bexport' |
---|
6226 | no_entry_flag='-bnoentry' |
---|
6227 | fi |
---|
6228 | |
---|
6229 | # When large executables or shared objects are built, AIX ld can |
---|
6230 | # have problems creating the table of contents. If linking a library |
---|
6231 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
6232 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
6233 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
6234 | |
---|
6235 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
---|
6236 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6237 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
---|
6238 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6239 | |
---|
6240 | if test "$GCC" = yes; then |
---|
6241 | case $host_os in aix4.[012]|aix4.[012].*) |
---|
6242 | # We only want to do this on AIX 4.2 and lower, the check |
---|
6243 | # below for broken collect2 doesn't work under 4.3+ |
---|
6244 | collect2name=`${CC} -print-prog-name=collect2` |
---|
6245 | if test -f "$collect2name" && \ |
---|
6246 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
6247 | then |
---|
6248 | # We have reworked collect2 |
---|
6249 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6250 | else |
---|
6251 | # We have old collect2 |
---|
6252 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
6253 | # It fails to find uninstalled libraries when the uninstalled |
---|
6254 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
6255 | # to unsupported forces relinking |
---|
6256 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6257 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6258 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
6259 | fi |
---|
6260 | esac |
---|
6261 | shared_flag='-shared' |
---|
6262 | else |
---|
6263 | # not using gcc |
---|
6264 | if test "$host_cpu" = ia64; then |
---|
6265 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
---|
6266 | # chokes on -Wl,-G. The following line is correct: |
---|
6267 | shared_flag='-G' |
---|
6268 | else |
---|
6269 | if test "$aix_use_runtimelinking" = yes; then |
---|
6270 | shared_flag='${wl}-G' |
---|
6271 | else |
---|
6272 | shared_flag='${wl}-bM:SRE' |
---|
6273 | fi |
---|
6274 | fi |
---|
6275 | fi |
---|
6276 | |
---|
6277 | # It seems that -bexpall does not export symbols beginning with |
---|
6278 | # underscore (_), so it is better to generate a list of symbols to export. |
---|
6279 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
6280 | if test "$aix_use_runtimelinking" = yes; then |
---|
6281 | # Warning - without using the other runtime loading flags (-brtl), |
---|
6282 | # -berok will link without error, but may produce a broken library. |
---|
6283 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
---|
6284 | # Determine the default libpath from the value encoded in an empty executable. |
---|
6285 | _LT_AC_SYS_LIBPATH_AIX |
---|
6286 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
6287 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
---|
6288 | else |
---|
6289 | if test "$host_cpu" = ia64; then |
---|
6290 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
---|
6291 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
---|
6292 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
6293 | else |
---|
6294 | # Determine the default libpath from the value encoded in an empty executable. |
---|
6295 | _LT_AC_SYS_LIBPATH_AIX |
---|
6296 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
6297 | # Warning - without using the other run time loading flags, |
---|
6298 | # -berok will link without error, but may produce a broken library. |
---|
6299 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
---|
6300 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
---|
6301 | # -bexpall does not export symbols beginning with underscore (_) |
---|
6302 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
6303 | # Exported symbols can be pulled into shared objects from archives |
---|
6304 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
---|
6305 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6306 | # This is similar to how AIX traditionally builds it's shared libraries. |
---|
6307 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
---|
6308 | fi |
---|
6309 | fi |
---|
6310 | ;; |
---|
6311 | |
---|
6312 | amigaos*) |
---|
6313 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
6314 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6315 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6316 | # see comment about different semantics on the GNU ld section |
---|
6317 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6318 | ;; |
---|
6319 | |
---|
6320 | bsdi4*) |
---|
6321 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
---|
6322 | ;; |
---|
6323 | |
---|
6324 | cygwin* | mingw* | pw32*) |
---|
6325 | # When not using gcc, we currently assume that we are using |
---|
6326 | # Microsoft Visual C++. |
---|
6327 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
6328 | # no search path for DLLs. |
---|
6329 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
---|
6330 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6331 | # Tell ltmain to make .lib files, not .a files. |
---|
6332 | libext=lib |
---|
6333 | # Tell ltmain to make .dll files, not .so files. |
---|
6334 | shrext_cmds=".dll" |
---|
6335 | # FIXME: Setting linknames here is a bad hack. |
---|
6336 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
---|
6337 | # The linker will automatically build a .lib file if we build a DLL. |
---|
6338 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' |
---|
6339 | # FIXME: Should let the user specify the lib program. |
---|
6340 | _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' |
---|
6341 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
---|
6342 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
6343 | ;; |
---|
6344 | |
---|
6345 | darwin* | rhapsody*) |
---|
6346 | if test "$GXX" = yes ; then |
---|
6347 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
6348 | case "$host_os" in |
---|
6349 | rhapsody* | darwin1.[[012]]) |
---|
6350 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
6351 | ;; |
---|
6352 | *) # Darwin 1.3 on |
---|
6353 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
---|
6354 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
6355 | else |
---|
6356 | case ${MACOSX_DEPLOYMENT_TARGET} in |
---|
6357 | 10.[[012]]) |
---|
6358 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
6359 | ;; |
---|
6360 | 10.*) |
---|
6361 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' |
---|
6362 | ;; |
---|
6363 | esac |
---|
6364 | fi |
---|
6365 | ;; |
---|
6366 | esac |
---|
6367 | lt_int_apple_cc_single_mod=no |
---|
6368 | output_verbose_link_cmd='echo' |
---|
6369 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then |
---|
6370 | lt_int_apple_cc_single_mod=yes |
---|
6371 | fi |
---|
6372 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
6373 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
6374 | else |
---|
6375 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
6376 | fi |
---|
6377 | _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
---|
6378 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
6379 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
6380 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6381 | else |
---|
6382 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6383 | fi |
---|
6384 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6385 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6386 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
6387 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
6388 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
6389 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6390 | else |
---|
6391 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6392 | fi |
---|
6393 | ;; |
---|
6394 | |
---|
6395 | dgux*) |
---|
6396 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6397 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6398 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6399 | ;; |
---|
6400 | |
---|
6401 | freebsd1*) |
---|
6402 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6403 | ;; |
---|
6404 | |
---|
6405 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
---|
6406 | # support. Future versions do this automatically, but an explicit c++rt0.o |
---|
6407 | # does not break anything, and helps significantly (at the cost of a little |
---|
6408 | # extra space). |
---|
6409 | freebsd2.2*) |
---|
6410 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
---|
6411 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6412 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6413 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6414 | ;; |
---|
6415 | |
---|
6416 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
---|
6417 | freebsd2*) |
---|
6418 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
6419 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6420 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6421 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6422 | ;; |
---|
6423 | |
---|
6424 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
---|
6425 | freebsd* | kfreebsd*-gnu) |
---|
6426 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
---|
6427 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6428 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6429 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6430 | ;; |
---|
6431 | |
---|
6432 | hpux9*) |
---|
6433 | if test "$GCC" = yes; then |
---|
6434 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
6435 | else |
---|
6436 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
6437 | fi |
---|
6438 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6439 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6440 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6441 | |
---|
6442 | # hardcode_minus_L: Not really in the search PATH, |
---|
6443 | # but as the default location of the library. |
---|
6444 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6445 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6446 | ;; |
---|
6447 | |
---|
6448 | hpux10* | hpux11*) |
---|
6449 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then |
---|
6450 | case "$host_cpu" in |
---|
6451 | hppa*64*|ia64*) |
---|
6452 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6453 | ;; |
---|
6454 | *) |
---|
6455 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
---|
6456 | ;; |
---|
6457 | esac |
---|
6458 | else |
---|
6459 | case "$host_cpu" in |
---|
6460 | hppa*64*|ia64*) |
---|
6461 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6462 | ;; |
---|
6463 | *) |
---|
6464 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
---|
6465 | ;; |
---|
6466 | esac |
---|
6467 | fi |
---|
6468 | if test "$with_gnu_ld" = no; then |
---|
6469 | case "$host_cpu" in |
---|
6470 | hppa*64*) |
---|
6471 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6472 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
---|
6473 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6474 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6475 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6476 | ;; |
---|
6477 | ia64*) |
---|
6478 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6479 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6480 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6481 | |
---|
6482 | # hardcode_minus_L: Not really in the search PATH, |
---|
6483 | # but as the default location of the library. |
---|
6484 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6485 | ;; |
---|
6486 | *) |
---|
6487 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6488 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6489 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6490 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6491 | |
---|
6492 | # hardcode_minus_L: Not really in the search PATH, |
---|
6493 | # but as the default location of the library. |
---|
6494 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6495 | ;; |
---|
6496 | esac |
---|
6497 | fi |
---|
6498 | ;; |
---|
6499 | |
---|
6500 | irix5* | irix6* | nonstopux*) |
---|
6501 | if test "$GCC" = yes; then |
---|
6502 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6503 | else |
---|
6504 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6505 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' |
---|
6506 | fi |
---|
6507 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6508 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6509 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6510 | ;; |
---|
6511 | |
---|
6512 | netbsd*) |
---|
6513 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
6514 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
---|
6515 | else |
---|
6516 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
---|
6517 | fi |
---|
6518 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6519 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6520 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6521 | ;; |
---|
6522 | |
---|
6523 | newsos6) |
---|
6524 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6525 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6526 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6527 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6528 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6529 | ;; |
---|
6530 | |
---|
6531 | openbsd*) |
---|
6532 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6533 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6534 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
6535 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
6536 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
6537 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6538 | else |
---|
6539 | case $host_os in |
---|
6540 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
---|
6541 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
6542 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6543 | ;; |
---|
6544 | *) |
---|
6545 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
6546 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
6547 | ;; |
---|
6548 | esac |
---|
6549 | fi |
---|
6550 | ;; |
---|
6551 | |
---|
6552 | os2*) |
---|
6553 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6554 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6555 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6556 | _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
---|
6557 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
---|
6558 | ;; |
---|
6559 | |
---|
6560 | osf3*) |
---|
6561 | if test "$GCC" = yes; then |
---|
6562 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
6563 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6564 | else |
---|
6565 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
6566 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6567 | fi |
---|
6568 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6569 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6570 | ;; |
---|
6571 | |
---|
6572 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
---|
6573 | if test "$GCC" = yes; then |
---|
6574 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
6575 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6576 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6577 | else |
---|
6578 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
6579 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6580 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
---|
6581 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
---|
6582 | |
---|
6583 | # Both c and cxx compiler support -rpath directly |
---|
6584 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
6585 | fi |
---|
6586 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6587 | ;; |
---|
6588 | |
---|
6589 | sco3.2v5*) |
---|
6590 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6591 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6592 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' |
---|
6593 | runpath_var=LD_RUN_PATH |
---|
6594 | hardcode_runpath_var=yes |
---|
6595 | ;; |
---|
6596 | |
---|
6597 | solaris*) |
---|
6598 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
---|
6599 | if test "$GCC" = yes; then |
---|
6600 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6601 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6602 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' |
---|
6603 | else |
---|
6604 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6605 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6606 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
6607 | fi |
---|
6608 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6609 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6610 | case $host_os in |
---|
6611 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
---|
6612 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
6613 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; |
---|
6614 | esac |
---|
6615 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6616 | ;; |
---|
6617 | |
---|
6618 | sunos4*) |
---|
6619 | if test "x$host_vendor" = xsequent; then |
---|
6620 | # Use $CC to link under sequent, because it throws in some extra .o |
---|
6621 | # files that make .init and .fini sections work. |
---|
6622 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6623 | else |
---|
6624 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
---|
6625 | fi |
---|
6626 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6627 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6628 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6629 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6630 | ;; |
---|
6631 | |
---|
6632 | sysv4) |
---|
6633 | case $host_vendor in |
---|
6634 | sni) |
---|
6635 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6636 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
---|
6637 | ;; |
---|
6638 | siemens) |
---|
6639 | ## LD is ld it makes a PLAMLIB |
---|
6640 | ## CC just makes a GrossModule. |
---|
6641 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
6642 | _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' |
---|
6643 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6644 | ;; |
---|
6645 | motorola) |
---|
6646 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6647 | _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
---|
6648 | ;; |
---|
6649 | esac |
---|
6650 | runpath_var='LD_RUN_PATH' |
---|
6651 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6652 | ;; |
---|
6653 | |
---|
6654 | sysv4.3*) |
---|
6655 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6656 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6657 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
---|
6658 | ;; |
---|
6659 | |
---|
6660 | sysv4*MP*) |
---|
6661 | if test -d /usr/nec; then |
---|
6662 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6663 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6664 | runpath_var=LD_RUN_PATH |
---|
6665 | hardcode_runpath_var=yes |
---|
6666 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
6667 | fi |
---|
6668 | ;; |
---|
6669 | |
---|
6670 | sysv4.2uw2*) |
---|
6671 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
6672 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6673 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
6674 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6675 | hardcode_runpath_var=yes |
---|
6676 | runpath_var=LD_RUN_PATH |
---|
6677 | ;; |
---|
6678 | |
---|
6679 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
---|
6680 | _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' |
---|
6681 | if test "$GCC" = yes; then |
---|
6682 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6683 | else |
---|
6684 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6685 | fi |
---|
6686 | runpath_var='LD_RUN_PATH' |
---|
6687 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6688 | ;; |
---|
6689 | |
---|
6690 | sysv5*) |
---|
6691 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
---|
6692 | # $CC -shared without GNU ld will not create a library from C++ |
---|
6693 | # object files and a static libstdc++, better avoid it by now |
---|
6694 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6695 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6696 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
6697 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
6698 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6699 | runpath_var='LD_RUN_PATH' |
---|
6700 | ;; |
---|
6701 | |
---|
6702 | uts4*) |
---|
6703 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6704 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6705 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6706 | ;; |
---|
6707 | |
---|
6708 | *) |
---|
6709 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6710 | ;; |
---|
6711 | esac |
---|
6712 | fi |
---|
6713 | ]) |
---|
6714 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
---|
6715 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
6716 | |
---|
6717 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
---|
6718 | if test "$GCC" = yes; then |
---|
6719 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
---|
6720 | fi |
---|
6721 | |
---|
6722 | # |
---|
6723 | # Do we need to explicitly link libc? |
---|
6724 | # |
---|
6725 | case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in |
---|
6726 | x|xyes) |
---|
6727 | # Assume -lc should be added |
---|
6728 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6729 | |
---|
6730 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
---|
6731 | case $_LT_AC_TAGVAR(archive_cmds, $1) in |
---|
6732 | *'~'*) |
---|
6733 | # FIXME: we may have to deal with multi-command sequences. |
---|
6734 | ;; |
---|
6735 | '$CC '*) |
---|
6736 | # Test whether the compiler implicitly links with -lc since on some |
---|
6737 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
---|
6738 | # to ld, don't add -lc before -lgcc. |
---|
6739 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
---|
6740 | $rm conftest* |
---|
6741 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
6742 | |
---|
6743 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
---|
6744 | soname=conftest |
---|
6745 | lib=conftest |
---|
6746 | libobjs=conftest.$ac_objext |
---|
6747 | deplibs= |
---|
6748 | wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
---|
6749 | compiler_flags=-v |
---|
6750 | linker_flags=-v |
---|
6751 | verstring= |
---|
6752 | output_objdir=. |
---|
6753 | libname=conftest |
---|
6754 | lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) |
---|
6755 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
6756 | if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
---|
6757 | then |
---|
6758 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
6759 | else |
---|
6760 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6761 | fi |
---|
6762 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
---|
6763 | else |
---|
6764 | cat conftest.err 1>&5 |
---|
6765 | fi |
---|
6766 | $rm conftest* |
---|
6767 | AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) |
---|
6768 | ;; |
---|
6769 | esac |
---|
6770 | fi |
---|
6771 | ;; |
---|
6772 | esac |
---|
6773 | ])# AC_LIBTOOL_PROG_LD_SHLIBS |
---|
6774 | |
---|
6775 | |
---|
6776 | # _LT_AC_FILE_LTDLL_C |
---|
6777 | # ------------------- |
---|
6778 | # Be careful that the start marker always follows a newline. |
---|
6779 | AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ |
---|
6780 | # /* ltdll.c starts here */ |
---|
6781 | # #define WIN32_LEAN_AND_MEAN |
---|
6782 | # #include <windows.h> |
---|
6783 | # #undef WIN32_LEAN_AND_MEAN |
---|
6784 | # #include <stdio.h> |
---|
6785 | # |
---|
6786 | # #ifndef __CYGWIN__ |
---|
6787 | # # ifdef __CYGWIN32__ |
---|
6788 | # # define __CYGWIN__ __CYGWIN32__ |
---|
6789 | # # endif |
---|
6790 | # #endif |
---|
6791 | # |
---|
6792 | # #ifdef __cplusplus |
---|
6793 | # extern "C" { |
---|
6794 | # #endif |
---|
6795 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
---|
6796 | # #ifdef __cplusplus |
---|
6797 | # } |
---|
6798 | # #endif |
---|
6799 | # |
---|
6800 | # #ifdef __CYGWIN__ |
---|
6801 | # #include <cygwin/cygwin_dll.h> |
---|
6802 | # DECLARE_CYGWIN_DLL( DllMain ); |
---|
6803 | # #endif |
---|
6804 | # HINSTANCE __hDllInstance_base; |
---|
6805 | # |
---|
6806 | # BOOL APIENTRY |
---|
6807 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
---|
6808 | # { |
---|
6809 | # __hDllInstance_base = hInst; |
---|
6810 | # return TRUE; |
---|
6811 | # } |
---|
6812 | # /* ltdll.c ends here */ |
---|
6813 | ])# _LT_AC_FILE_LTDLL_C |
---|
6814 | |
---|
6815 | |
---|
6816 | # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) |
---|
6817 | # --------------------------------- |
---|
6818 | AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) |
---|
6819 | |
---|
6820 | |
---|
6821 | # old names |
---|
6822 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
---|
6823 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
---|
6824 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
---|
6825 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
---|
6826 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
---|
6827 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
---|
6828 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
---|
6829 | |
---|
6830 | # This is just to silence aclocal about the macro not being used |
---|
6831 | ifelse([AC_DISABLE_FAST_INSTALL]) |
---|
6832 | |
---|
6833 | AC_DEFUN([LT_AC_PROG_GCJ], |
---|
6834 | [AC_CHECK_TOOL(GCJ, gcj, no) |
---|
6835 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" |
---|
6836 | AC_SUBST(GCJFLAGS) |
---|
6837 | ]) |
---|
6838 | |
---|
6839 | AC_DEFUN([LT_AC_PROG_RC], |
---|
6840 | [AC_CHECK_TOOL(RC, windres, no) |
---|
6841 | ]) |
---|
6842 | |
---|
6843 | # NOTE: This macro has been submitted for inclusion into # |
---|
6844 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
---|
6845 | # a released version of Autoconf we should remove this # |
---|
6846 | # macro and use it instead. # |
---|
6847 | # LT_AC_PROG_SED |
---|
6848 | # -------------- |
---|
6849 | # Check for a fully-functional sed program, that truncates |
---|
6850 | # as few characters as possible. Prefer GNU sed if found. |
---|
6851 | AC_DEFUN([LT_AC_PROG_SED], |
---|
6852 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
---|
6853 | AC_CACHE_VAL(lt_cv_path_SED, |
---|
6854 | [# Loop through the user's path and test for sed and gsed. |
---|
6855 | # Then use that list of sed's as ones to test for truncation. |
---|
6856 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
---|
6857 | for as_dir in $PATH |
---|
6858 | do |
---|
6859 | IFS=$as_save_IFS |
---|
6860 | test -z "$as_dir" && as_dir=. |
---|
6861 | for lt_ac_prog in sed gsed; do |
---|
6862 | for ac_exec_ext in '' $ac_executable_extensions; do |
---|
6863 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then |
---|
6864 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" |
---|
6865 | fi |
---|
6866 | done |
---|
6867 | done |
---|
6868 | done |
---|
6869 | lt_ac_max=0 |
---|
6870 | lt_ac_count=0 |
---|
6871 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
---|
6872 | # along with /bin/sed that truncates output. |
---|
6873 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do |
---|
6874 | test ! -f $lt_ac_sed && break |
---|
6875 | cat /dev/null > conftest.in |
---|
6876 | lt_ac_count=0 |
---|
6877 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in |
---|
6878 | # Check for GNU sed and select it if it is found. |
---|
6879 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then |
---|
6880 | lt_cv_path_SED=$lt_ac_sed |
---|
6881 | break |
---|
6882 | fi |
---|
6883 | while true; do |
---|
6884 | cat conftest.in conftest.in >conftest.tmp |
---|
6885 | mv conftest.tmp conftest.in |
---|
6886 | cp conftest.in conftest.nl |
---|
6887 | echo >>conftest.nl |
---|
6888 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break |
---|
6889 | cmp -s conftest.out conftest.nl || break |
---|
6890 | # 10000 chars as input seems more than enough |
---|
6891 | test $lt_ac_count -gt 10 && break |
---|
6892 | lt_ac_count=`expr $lt_ac_count + 1` |
---|
6893 | if test $lt_ac_count -gt $lt_ac_max; then |
---|
6894 | lt_ac_max=$lt_ac_count |
---|
6895 | lt_cv_path_SED=$lt_ac_sed |
---|
6896 | fi |
---|
6897 | done |
---|
6898 | done |
---|
6899 | SED=$lt_cv_path_SED |
---|
6900 | ]) |
---|
6901 | AC_MSG_RESULT([$SED]) |
---|
6902 | ]) |
---|
6903 | |
---|
6904 | # Add --enable-maintainer-mode option to configure. |
---|
6905 | # From Jim Meyering |
---|
6906 | |
---|
6907 | # serial 1 |
---|
6908 | |
---|
6909 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
6910 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
6911 | dnl maintainer-mode is disabled by default |
---|
6912 | AC_ARG_ENABLE(maintainer-mode, |
---|
6913 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
6914 | (and sometimes confusing) to the casual installer], |
---|
6915 | USE_MAINTAINER_MODE=$enableval, |
---|
6916 | USE_MAINTAINER_MODE=no) |
---|
6917 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
6918 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
6919 | MAINT=$MAINTAINER_MODE_TRUE |
---|
6920 | AC_SUBST(MAINT)dnl |
---|
6921 | ] |
---|
6922 | ) |
---|
6923 | |
---|
6924 | # Define a conditional. |
---|
6925 | |
---|
6926 | AC_DEFUN([AM_CONDITIONAL], |
---|
6927 | [AC_SUBST($1_TRUE) |
---|
6928 | AC_SUBST($1_FALSE) |
---|
6929 | if $2; then |
---|
6930 | $1_TRUE= |
---|
6931 | $1_FALSE='#' |
---|
6932 | else |
---|
6933 | $1_TRUE='#' |
---|
6934 | $1_FALSE= |
---|
6935 | fi]) |
---|
6936 | |
---|