Mercurial > hg > CbC > CbC_gcc
comparison gcc/aclocal.m4 @ 57:326d9e06c2e3
modify c-parser.c
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 15 Feb 2010 00:54:17 +0900 |
parents | 11a6cbe2d14c 77e2b8dfacca |
children | 1b10fe6932e1 |
comparison
equal
deleted
inserted
replaced
54:f62c169bbc24 | 57:326d9e06c2e3 |
---|---|
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*- | 1 # generated automatically by aclocal 1.11 -*- Autoconf -*- |
2 | 2 |
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
4 # 2005 Free Software Foundation, Inc. | 4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
5 # This file is free software; the Free Software Foundation | 5 # This file is free software; the Free Software Foundation |
6 # gives unlimited permission to copy and/or distribute it, | 6 # gives unlimited permission to copy and/or distribute it, |
7 # with or without modifications, as long as this notice is preserved. | 7 # with or without modifications, as long as this notice is preserved. |
8 | 8 |
9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
12 # PARTICULAR PURPOSE. | 12 # PARTICULAR PURPOSE. |
13 | |
14 # codeset.m4 serial 2 (gettext-0.16) | |
15 dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. | |
16 dnl This file is free software; the Free Software Foundation | |
17 dnl gives unlimited permission to copy and/or distribute it, | |
18 dnl with or without modifications, as long as this notice is preserved. | |
19 | |
20 dnl From Bruno Haible. | |
21 | |
22 AC_DEFUN([AM_LANGINFO_CODESET], | |
23 [ | |
24 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, | |
25 [AC_TRY_LINK([#include <langinfo.h>], | |
26 [char* cs = nl_langinfo(CODESET); return !cs;], | |
27 am_cv_langinfo_codeset=yes, | |
28 am_cv_langinfo_codeset=no) | |
29 ]) | |
30 if test $am_cv_langinfo_codeset = yes; then | |
31 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | |
32 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | |
33 fi | |
34 ]) | |
35 | |
36 # iconv.m4 serial AM6 (gettext-0.17) | |
37 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. | |
38 dnl This file is free software; the Free Software Foundation | |
39 dnl gives unlimited permission to copy and/or distribute it, | |
40 dnl with or without modifications, as long as this notice is preserved. | |
41 | |
42 dnl From Bruno Haible. | |
43 | |
44 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | |
45 [ | |
46 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | |
47 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
48 AC_REQUIRE([AC_LIB_RPATH]) | |
49 | |
50 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | |
51 dnl accordingly. | |
52 AC_LIB_LINKFLAGS_BODY([iconv]) | |
53 ]) | |
54 | |
55 AC_DEFUN([AM_ICONV_LINK], | |
56 [ | |
57 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | |
58 dnl those with the standalone portable GNU libiconv installed). | |
59 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | |
60 | |
61 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | |
62 dnl accordingly. | |
63 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | |
64 | |
65 dnl Add $INCICONV to CPPFLAGS before performing the following checks, | |
66 dnl because if the user has installed libiconv and not disabled its use | |
67 dnl via --without-libiconv-prefix, he wants to use it. The first | |
68 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. | |
69 am_save_CPPFLAGS="$CPPFLAGS" | |
70 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | |
71 | |
72 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ | |
73 am_cv_func_iconv="no, consider installing GNU libiconv" | |
74 am_cv_lib_iconv=no | |
75 AC_TRY_LINK([#include <stdlib.h> | |
76 #include <iconv.h>], | |
77 [iconv_t cd = iconv_open("",""); | |
78 iconv(cd,NULL,NULL,NULL,NULL); | |
79 iconv_close(cd);], | |
80 am_cv_func_iconv=yes) | |
81 if test "$am_cv_func_iconv" != yes; then | |
82 am_save_LIBS="$LIBS" | |
83 LIBS="$LIBS $LIBICONV" | |
84 AC_TRY_LINK([#include <stdlib.h> | |
85 #include <iconv.h>], | |
86 [iconv_t cd = iconv_open("",""); | |
87 iconv(cd,NULL,NULL,NULL,NULL); | |
88 iconv_close(cd);], | |
89 am_cv_lib_iconv=yes | |
90 am_cv_func_iconv=yes) | |
91 LIBS="$am_save_LIBS" | |
92 fi | |
93 ]) | |
94 if test "$am_cv_func_iconv" = yes; then | |
95 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ | |
96 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. | |
97 am_save_LIBS="$LIBS" | |
98 if test $am_cv_lib_iconv = yes; then | |
99 LIBS="$LIBS $LIBICONV" | |
100 fi | |
101 AC_TRY_RUN([ | |
102 #include <iconv.h> | |
103 #include <string.h> | |
104 int main () | |
105 { | |
106 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful | |
107 returns. */ | |
108 { | |
109 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); | |
110 if (cd_utf8_to_88591 != (iconv_t)(-1)) | |
111 { | |
112 static const char input[] = "\342\202\254"; /* EURO SIGN */ | |
113 char buf[10]; | |
114 const char *inptr = input; | |
115 size_t inbytesleft = strlen (input); | |
116 char *outptr = buf; | |
117 size_t outbytesleft = sizeof (buf); | |
118 size_t res = iconv (cd_utf8_to_88591, | |
119 (char **) &inptr, &inbytesleft, | |
120 &outptr, &outbytesleft); | |
121 if (res == 0) | |
122 return 1; | |
123 } | |
124 } | |
125 #if 0 /* This bug could be worked around by the caller. */ | |
126 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ | |
127 { | |
128 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); | |
129 if (cd_88591_to_utf8 != (iconv_t)(-1)) | |
130 { | |
131 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; | |
132 char buf[50]; | |
133 const char *inptr = input; | |
134 size_t inbytesleft = strlen (input); | |
135 char *outptr = buf; | |
136 size_t outbytesleft = sizeof (buf); | |
137 size_t res = iconv (cd_88591_to_utf8, | |
138 (char **) &inptr, &inbytesleft, | |
139 &outptr, &outbytesleft); | |
140 if ((int)res > 0) | |
141 return 1; | |
142 } | |
143 } | |
144 #endif | |
145 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is | |
146 provided. */ | |
147 if (/* Try standardized names. */ | |
148 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | |
149 /* Try IRIX, OSF/1 names. */ | |
150 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | |
151 /* Try AIX names. */ | |
152 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | |
153 /* Try HP-UX names. */ | |
154 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | |
155 return 1; | |
156 return 0; | |
157 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], | |
158 [case "$host_os" in | |
159 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | |
160 *) am_cv_func_iconv_works="guessing yes" ;; | |
161 esac]) | |
162 LIBS="$am_save_LIBS" | |
163 ]) | |
164 case "$am_cv_func_iconv_works" in | |
165 *no) am_func_iconv=no am_cv_lib_iconv=no ;; | |
166 *) am_func_iconv=yes ;; | |
167 esac | |
168 else | |
169 am_func_iconv=no am_cv_lib_iconv=no | |
170 fi | |
171 if test "$am_func_iconv" = yes; then | |
172 AC_DEFINE(HAVE_ICONV, 1, | |
173 [Define if you have the iconv() function and it works.]) | |
174 fi | |
175 if test "$am_cv_lib_iconv" = yes; then | |
176 AC_MSG_CHECKING([how to link with libiconv]) | |
177 AC_MSG_RESULT([$LIBICONV]) | |
178 else | |
179 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | |
180 dnl either. | |
181 CPPFLAGS="$am_save_CPPFLAGS" | |
182 LIBICONV= | |
183 LTLIBICONV= | |
184 fi | |
185 AC_SUBST(LIBICONV) | |
186 AC_SUBST(LTLIBICONV) | |
187 ]) | |
188 | |
189 AC_DEFUN([AM_ICONV], | |
190 [ | |
191 AM_ICONV_LINK | |
192 if test "$am_cv_func_iconv" = yes; then | |
193 AC_MSG_CHECKING([for iconv declaration]) | |
194 AC_CACHE_VAL(am_cv_proto_iconv, [ | |
195 AC_TRY_COMPILE([ | |
196 #include <stdlib.h> | |
197 #include <iconv.h> | |
198 extern | |
199 #ifdef __cplusplus | |
200 "C" | |
201 #endif | |
202 #if defined(__STDC__) || defined(__cplusplus) | |
203 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
204 #else | |
205 size_t iconv(); | |
206 #endif | |
207 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") | |
208 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) | |
209 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
210 AC_MSG_RESULT([$]{ac_t:- | |
211 }[$]am_cv_proto_iconv) | |
212 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, | |
213 [Define as const if the declaration of iconv() needs const.]) | |
214 fi | |
215 ]) | |
216 | |
217 # lib-ld.m4 serial 3 (gettext-0.13) | |
218 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. | |
219 dnl This file is free software; the Free Software Foundation | |
220 dnl gives unlimited permission to copy and/or distribute it, | |
221 dnl with or without modifications, as long as this notice is preserved. | |
222 | |
223 dnl Subroutines of libtool.m4, | |
224 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | |
225 dnl with libtool.m4. | |
226 | |
227 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | |
228 AC_DEFUN([AC_LIB_PROG_LD_GNU], | |
229 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, | |
230 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
231 case `$LD -v 2>&1 </dev/null` in | |
232 *GNU* | *'with BFD'*) | |
233 acl_cv_prog_gnu_ld=yes ;; | |
234 *) | |
235 acl_cv_prog_gnu_ld=no ;; | |
236 esac]) | |
237 with_gnu_ld=$acl_cv_prog_gnu_ld | |
238 ]) | |
239 | |
240 dnl From libtool-1.4. Sets the variable LD. | |
241 AC_DEFUN([AC_LIB_PROG_LD], | |
242 [AC_ARG_WITH(gnu-ld, | |
243 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
244 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
245 AC_REQUIRE([AC_PROG_CC])dnl | |
246 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
247 # Prepare PATH_SEPARATOR. | |
248 # The user is always right. | |
249 if test "${PATH_SEPARATOR+set}" != set; then | |
250 echo "#! /bin/sh" >conf$$.sh | |
251 echo "exit 0" >>conf$$.sh | |
252 chmod +x conf$$.sh | |
253 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
254 PATH_SEPARATOR=';' | |
255 else | |
256 PATH_SEPARATOR=: | |
257 fi | |
258 rm -f conf$$.sh | |
259 fi | |
260 ac_prog=ld | |
261 if test "$GCC" = yes; then | |
262 # Check if gcc -print-prog-name=ld gives a path. | |
263 AC_MSG_CHECKING([for ld used by GCC]) | |
264 case $host in | |
265 *-*-mingw*) | |
266 # gcc leaves a trailing carriage return which upsets mingw | |
267 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
268 *) | |
269 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
270 esac | |
271 case $ac_prog in | |
272 # Accept absolute paths. | |
273 [[\\/]* | [A-Za-z]:[\\/]*)] | |
274 [re_direlt='/[^/][^/]*/\.\./'] | |
275 # Canonicalize the path of ld | |
276 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
277 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
278 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
279 done | |
280 test -z "$LD" && LD="$ac_prog" | |
281 ;; | |
282 "") | |
283 # If it fails, then pretend we aren't using GCC. | |
284 ac_prog=ld | |
285 ;; | |
286 *) | |
287 # If it is relative, then search for the first ld in PATH. | |
288 with_gnu_ld=unknown | |
289 ;; | |
290 esac | |
291 elif test "$with_gnu_ld" = yes; then | |
292 AC_MSG_CHECKING([for GNU ld]) | |
293 else | |
294 AC_MSG_CHECKING([for non-GNU ld]) | |
295 fi | |
296 AC_CACHE_VAL(acl_cv_path_LD, | |
297 [if test -z "$LD"; then | |
298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
299 for ac_dir in $PATH; do | |
300 test -z "$ac_dir" && ac_dir=. | |
301 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
302 acl_cv_path_LD="$ac_dir/$ac_prog" | |
303 # Check to see if the program is GNU ld. I'd rather use --version, | |
304 # but apparently some GNU ld's only accept -v. | |
305 # Break only if it was the GNU/non-GNU ld that we prefer. | |
306 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in | |
307 *GNU* | *'with BFD'*) | |
308 test "$with_gnu_ld" != no && break ;; | |
309 *) | |
310 test "$with_gnu_ld" != yes && break ;; | |
311 esac | |
312 fi | |
313 done | |
314 IFS="$ac_save_ifs" | |
315 else | |
316 acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
317 fi]) | |
318 LD="$acl_cv_path_LD" | |
319 if test -n "$LD"; then | |
320 AC_MSG_RESULT($LD) | |
321 else | |
322 AC_MSG_RESULT(no) | |
323 fi | |
324 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
325 AC_LIB_PROG_LD_GNU | |
326 ]) | |
327 | |
328 # lib-link.m4 serial 13 (gettext-0.17) | |
329 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. | |
330 dnl This file is free software; the Free Software Foundation | |
331 dnl gives unlimited permission to copy and/or distribute it, | |
332 dnl with or without modifications, as long as this notice is preserved. | |
333 | |
334 dnl From Bruno Haible. | |
335 | |
336 AC_PREREQ(2.54) | |
337 | |
338 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | |
339 dnl the libraries corresponding to explicit and implicit dependencies. | |
340 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | |
341 dnl augments the CPPFLAGS variable. | |
342 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | |
343 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
344 AC_DEFUN([AC_LIB_LINKFLAGS], | |
345 [ | |
346 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
347 AC_REQUIRE([AC_LIB_RPATH]) | |
348 define([Name],[translit([$1],[./-], [___])]) | |
349 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | |
350 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | |
351 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | |
352 AC_LIB_LINKFLAGS_BODY([$1], [$2]) | |
353 ac_cv_lib[]Name[]_libs="$LIB[]NAME" | |
354 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | |
355 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | |
356 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" | |
357 ]) | |
358 LIB[]NAME="$ac_cv_lib[]Name[]_libs" | |
359 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | |
360 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | |
361 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" | |
362 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | |
363 AC_SUBST([LIB]NAME) | |
364 AC_SUBST([LTLIB]NAME) | |
365 AC_SUBST([LIB]NAME[_PREFIX]) | |
366 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | |
367 dnl results of this search when this library appears as a dependency. | |
368 HAVE_LIB[]NAME=yes | |
369 undefine([Name]) | |
370 undefine([NAME]) | |
371 ]) | |
372 | |
373 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) | |
374 dnl searches for libname and the libraries corresponding to explicit and | |
375 dnl implicit dependencies, together with the specified include files and | |
376 dnl the ability to compile and link the specified testcode. If found, it | |
377 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and | |
378 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | |
379 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | |
380 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | |
381 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | |
382 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
383 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |
384 [ | |
385 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
386 AC_REQUIRE([AC_LIB_RPATH]) | |
387 define([Name],[translit([$1],[./-], [___])]) | |
388 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | |
389 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | |
390 | |
391 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | |
392 dnl accordingly. | |
393 AC_LIB_LINKFLAGS_BODY([$1], [$2]) | |
394 | |
395 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, | |
396 dnl because if the user has installed lib[]Name and not disabled its use | |
397 dnl via --without-lib[]Name-prefix, he wants to use it. | |
398 ac_save_CPPFLAGS="$CPPFLAGS" | |
399 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | |
400 | |
401 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | |
402 ac_save_LIBS="$LIBS" | |
403 LIBS="$LIBS $LIB[]NAME" | |
404 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | |
405 LIBS="$ac_save_LIBS" | |
406 ]) | |
407 if test "$ac_cv_lib[]Name" = yes; then | |
408 HAVE_LIB[]NAME=yes | |
409 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) | |
410 AC_MSG_CHECKING([how to link with lib[]$1]) | |
411 AC_MSG_RESULT([$LIB[]NAME]) | |
412 else | |
413 HAVE_LIB[]NAME=no | |
414 dnl If $LIB[]NAME didn't lead to a usable library, we don't need | |
415 dnl $INC[]NAME either. | |
416 CPPFLAGS="$ac_save_CPPFLAGS" | |
417 LIB[]NAME= | |
418 LTLIB[]NAME= | |
419 LIB[]NAME[]_PREFIX= | |
420 fi | |
421 AC_SUBST([HAVE_LIB]NAME) | |
422 AC_SUBST([LIB]NAME) | |
423 AC_SUBST([LTLIB]NAME) | |
424 AC_SUBST([LIB]NAME[_PREFIX]) | |
425 undefine([Name]) | |
426 undefine([NAME]) | |
427 ]) | |
428 | |
429 dnl Determine the platform dependent parameters needed to use rpath: | |
430 dnl acl_libext, | |
431 dnl acl_shlibext, | |
432 dnl acl_hardcode_libdir_flag_spec, | |
433 dnl acl_hardcode_libdir_separator, | |
434 dnl acl_hardcode_direct, | |
435 dnl acl_hardcode_minus_L. | |
436 AC_DEFUN([AC_LIB_RPATH], | |
437 [ | |
438 dnl Tell automake >= 1.10 to complain if config.rpath is missing. | |
439 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) | |
440 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS | |
441 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | |
442 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | |
443 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | |
444 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ | |
445 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
446 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
447 . ./conftest.sh | |
448 rm -f ./conftest.sh | |
449 acl_cv_rpath=done | |
450 ]) | |
451 wl="$acl_cv_wl" | |
452 acl_libext="$acl_cv_libext" | |
453 acl_shlibext="$acl_cv_shlibext" | |
454 acl_libname_spec="$acl_cv_libname_spec" | |
455 acl_library_names_spec="$acl_cv_library_names_spec" | |
456 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
457 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
458 acl_hardcode_direct="$acl_cv_hardcode_direct" | |
459 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
460 dnl Determine whether the user wants rpath handling at all. | |
461 AC_ARG_ENABLE(rpath, | |
462 [ --disable-rpath do not hardcode runtime library paths], | |
463 :, enable_rpath=yes) | |
464 ]) | |
465 | |
466 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | |
467 dnl the libraries corresponding to explicit and implicit dependencies. | |
468 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | |
469 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found | |
470 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |
471 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |
472 [ | |
473 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
474 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | |
475 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | |
476 dnl Autoconf >= 2.61 supports dots in --with options. | |
477 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) | |
478 dnl By default, look in $includedir and $libdir. | |
479 use_additional=yes | |
480 AC_LIB_WITH_FINAL_PREFIX([ | |
481 eval additional_includedir=\"$includedir\" | |
482 eval additional_libdir=\"$libdir\" | |
483 ]) | |
484 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], | |
485 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | |
486 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], | |
487 [ | |
488 if test "X$withval" = "Xno"; then | |
489 use_additional=no | |
490 else | |
491 if test "X$withval" = "X"; then | |
492 AC_LIB_WITH_FINAL_PREFIX([ | |
493 eval additional_includedir=\"$includedir\" | |
494 eval additional_libdir=\"$libdir\" | |
495 ]) | |
496 else | |
497 additional_includedir="$withval/include" | |
498 additional_libdir="$withval/$acl_libdirstem" | |
499 fi | |
500 fi | |
501 ]) | |
502 dnl Search the library and its dependencies in $additional_libdir and | |
503 dnl $LDFLAGS. Using breadth-first-seach. | |
504 LIB[]NAME= | |
505 LTLIB[]NAME= | |
506 INC[]NAME= | |
507 LIB[]NAME[]_PREFIX= | |
508 rpathdirs= | |
509 ltrpathdirs= | |
510 names_already_handled= | |
511 names_next_round='$1 $2' | |
512 while test -n "$names_next_round"; do | |
513 names_this_round="$names_next_round" | |
514 names_next_round= | |
515 for name in $names_this_round; do | |
516 already_handled= | |
517 for n in $names_already_handled; do | |
518 if test "$n" = "$name"; then | |
519 already_handled=yes | |
520 break | |
521 fi | |
522 done | |
523 if test -z "$already_handled"; then | |
524 names_already_handled="$names_already_handled $name" | |
525 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | |
526 dnl or AC_LIB_HAVE_LINKFLAGS call. | |
527 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
528 eval value=\"\$HAVE_LIB$uppername\" | |
529 if test -n "$value"; then | |
530 if test "$value" = yes; then | |
531 eval value=\"\$LIB$uppername\" | |
532 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" | |
533 eval value=\"\$LTLIB$uppername\" | |
534 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" | |
535 else | |
536 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined | |
537 dnl that this library doesn't exist. So just drop it. | |
538 : | |
539 fi | |
540 else | |
541 dnl Search the library lib$name in $additional_libdir and $LDFLAGS | |
542 dnl and the already constructed $LIBNAME/$LTLIBNAME. | |
543 found_dir= | |
544 found_la= | |
545 found_so= | |
546 found_a= | |
547 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | |
548 if test -n "$acl_shlibext"; then | |
549 shrext=".$acl_shlibext" # typically: shrext=.so | |
550 else | |
551 shrext= | |
552 fi | |
553 if test $use_additional = yes; then | |
554 dir="$additional_libdir" | |
555 dnl The same code as in the loop below: | |
556 dnl First look for a shared library. | |
557 if test -n "$acl_shlibext"; then | |
558 if test -f "$dir/$libname$shrext"; then | |
559 found_dir="$dir" | |
560 found_so="$dir/$libname$shrext" | |
561 else | |
562 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
563 ver=`(cd "$dir" && \ | |
564 for f in "$libname$shrext".*; do echo "$f"; done \ | |
565 | sed -e "s,^$libname$shrext\\\\.,," \ | |
566 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
567 | sed 1q ) 2>/dev/null` | |
568 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
569 found_dir="$dir" | |
570 found_so="$dir/$libname$shrext.$ver" | |
571 fi | |
572 else | |
573 eval library_names=\"$acl_library_names_spec\" | |
574 for f in $library_names; do | |
575 if test -f "$dir/$f"; then | |
576 found_dir="$dir" | |
577 found_so="$dir/$f" | |
578 break | |
579 fi | |
580 done | |
581 fi | |
582 fi | |
583 fi | |
584 dnl Then look for a static library. | |
585 if test "X$found_dir" = "X"; then | |
586 if test -f "$dir/$libname.$acl_libext"; then | |
587 found_dir="$dir" | |
588 found_a="$dir/$libname.$acl_libext" | |
589 fi | |
590 fi | |
591 if test "X$found_dir" != "X"; then | |
592 if test -f "$dir/$libname.la"; then | |
593 found_la="$dir/$libname.la" | |
594 fi | |
595 fi | |
596 fi | |
597 if test "X$found_dir" = "X"; then | |
598 for x in $LDFLAGS $LTLIB[]NAME; do | |
599 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
600 case "$x" in | |
601 -L*) | |
602 dir=`echo "X$x" | sed -e 's/^X-L//'` | |
603 dnl First look for a shared library. | |
604 if test -n "$acl_shlibext"; then | |
605 if test -f "$dir/$libname$shrext"; then | |
606 found_dir="$dir" | |
607 found_so="$dir/$libname$shrext" | |
608 else | |
609 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
610 ver=`(cd "$dir" && \ | |
611 for f in "$libname$shrext".*; do echo "$f"; done \ | |
612 | sed -e "s,^$libname$shrext\\\\.,," \ | |
613 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
614 | sed 1q ) 2>/dev/null` | |
615 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
616 found_dir="$dir" | |
617 found_so="$dir/$libname$shrext.$ver" | |
618 fi | |
619 else | |
620 eval library_names=\"$acl_library_names_spec\" | |
621 for f in $library_names; do | |
622 if test -f "$dir/$f"; then | |
623 found_dir="$dir" | |
624 found_so="$dir/$f" | |
625 break | |
626 fi | |
627 done | |
628 fi | |
629 fi | |
630 fi | |
631 dnl Then look for a static library. | |
632 if test "X$found_dir" = "X"; then | |
633 if test -f "$dir/$libname.$acl_libext"; then | |
634 found_dir="$dir" | |
635 found_a="$dir/$libname.$acl_libext" | |
636 fi | |
637 fi | |
638 if test "X$found_dir" != "X"; then | |
639 if test -f "$dir/$libname.la"; then | |
640 found_la="$dir/$libname.la" | |
641 fi | |
642 fi | |
643 ;; | |
644 esac | |
645 if test "X$found_dir" != "X"; then | |
646 break | |
647 fi | |
648 done | |
649 fi | |
650 if test "X$found_dir" != "X"; then | |
651 dnl Found the library. | |
652 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" | |
653 if test "X$found_so" != "X"; then | |
654 dnl Linking with a shared library. We attempt to hardcode its | |
655 dnl directory into the executable's runpath, unless it's the | |
656 dnl standard /usr/lib. | |
657 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then | |
658 dnl No hardcoding is needed. | |
659 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
660 else | |
661 dnl Use an explicit option to hardcode DIR into the resulting | |
662 dnl binary. | |
663 dnl Potentially add DIR to ltrpathdirs. | |
664 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | |
665 haveit= | |
666 for x in $ltrpathdirs; do | |
667 if test "X$x" = "X$found_dir"; then | |
668 haveit=yes | |
669 break | |
670 fi | |
671 done | |
672 if test -z "$haveit"; then | |
673 ltrpathdirs="$ltrpathdirs $found_dir" | |
674 fi | |
675 dnl The hardcoding into $LIBNAME is system dependent. | |
676 if test "$acl_hardcode_direct" = yes; then | |
677 dnl Using DIR/libNAME.so during linking hardcodes DIR into the | |
678 dnl resulting binary. | |
679 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
680 else | |
681 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
682 dnl Use an explicit option to hardcode DIR into the resulting | |
683 dnl binary. | |
684 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
685 dnl Potentially add DIR to rpathdirs. | |
686 dnl The rpathdirs will be appended to $LIBNAME at the end. | |
687 haveit= | |
688 for x in $rpathdirs; do | |
689 if test "X$x" = "X$found_dir"; then | |
690 haveit=yes | |
691 break | |
692 fi | |
693 done | |
694 if test -z "$haveit"; then | |
695 rpathdirs="$rpathdirs $found_dir" | |
696 fi | |
697 else | |
698 dnl Rely on "-L$found_dir". | |
699 dnl But don't add it if it's already contained in the LDFLAGS | |
700 dnl or the already constructed $LIBNAME | |
701 haveit= | |
702 for x in $LDFLAGS $LIB[]NAME; do | |
703 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
704 if test "X$x" = "X-L$found_dir"; then | |
705 haveit=yes | |
706 break | |
707 fi | |
708 done | |
709 if test -z "$haveit"; then | |
710 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | |
711 fi | |
712 if test "$acl_hardcode_minus_L" != no; then | |
713 dnl FIXME: Not sure whether we should use | |
714 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | |
715 dnl here. | |
716 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | |
717 else | |
718 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH | |
719 dnl here, because this doesn't fit in flags passed to the | |
720 dnl compiler. So give up. No hardcoding. This affects only | |
721 dnl very old systems. | |
722 dnl FIXME: Not sure whether we should use | |
723 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | |
724 dnl here. | |
725 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | |
726 fi | |
727 fi | |
728 fi | |
729 fi | |
730 else | |
731 if test "X$found_a" != "X"; then | |
732 dnl Linking with a static library. | |
733 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" | |
734 else | |
735 dnl We shouldn't come here, but anyway it's good to have a | |
736 dnl fallback. | |
737 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" | |
738 fi | |
739 fi | |
740 dnl Assume the include files are nearby. | |
741 additional_includedir= | |
742 case "$found_dir" in | |
743 */$acl_libdirstem | */$acl_libdirstem/) | |
744 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | |
745 LIB[]NAME[]_PREFIX="$basedir" | |
746 additional_includedir="$basedir/include" | |
747 ;; | |
748 esac | |
749 if test "X$additional_includedir" != "X"; then | |
750 dnl Potentially add $additional_includedir to $INCNAME. | |
751 dnl But don't add it | |
752 dnl 1. if it's the standard /usr/include, | |
753 dnl 2. if it's /usr/local/include and we are using GCC on Linux, | |
754 dnl 3. if it's already present in $CPPFLAGS or the already | |
755 dnl constructed $INCNAME, | |
756 dnl 4. if it doesn't exist as a directory. | |
757 if test "X$additional_includedir" != "X/usr/include"; then | |
758 haveit= | |
759 if test "X$additional_includedir" = "X/usr/local/include"; then | |
760 if test -n "$GCC"; then | |
761 case $host_os in | |
762 linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
763 esac | |
764 fi | |
765 fi | |
766 if test -z "$haveit"; then | |
767 for x in $CPPFLAGS $INC[]NAME; do | |
768 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
769 if test "X$x" = "X-I$additional_includedir"; then | |
770 haveit=yes | |
771 break | |
772 fi | |
773 done | |
774 if test -z "$haveit"; then | |
775 if test -d "$additional_includedir"; then | |
776 dnl Really add $additional_includedir to $INCNAME. | |
777 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" | |
778 fi | |
779 fi | |
780 fi | |
781 fi | |
782 fi | |
783 dnl Look for dependencies. | |
784 if test -n "$found_la"; then | |
785 dnl Read the .la file. It defines the variables | |
786 dnl dlname, library_names, old_library, dependency_libs, current, | |
787 dnl age, revision, installed, dlopen, dlpreopen, libdir. | |
788 save_libdir="$libdir" | |
789 case "$found_la" in | |
790 */* | *\\*) . "$found_la" ;; | |
791 *) . "./$found_la" ;; | |
792 esac | |
793 libdir="$save_libdir" | |
794 dnl We use only dependency_libs. | |
795 for dep in $dependency_libs; do | |
796 case "$dep" in | |
797 -L*) | |
798 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
799 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | |
800 dnl But don't add it | |
801 dnl 1. if it's the standard /usr/lib, | |
802 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, | |
803 dnl 3. if it's already present in $LDFLAGS or the already | |
804 dnl constructed $LIBNAME, | |
805 dnl 4. if it doesn't exist as a directory. | |
806 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | |
807 haveit= | |
808 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | |
809 if test -n "$GCC"; then | |
810 case $host_os in | |
811 linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
812 esac | |
813 fi | |
814 fi | |
815 if test -z "$haveit"; then | |
816 haveit= | |
817 for x in $LDFLAGS $LIB[]NAME; do | |
818 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
819 if test "X$x" = "X-L$additional_libdir"; then | |
820 haveit=yes | |
821 break | |
822 fi | |
823 done | |
824 if test -z "$haveit"; then | |
825 if test -d "$additional_libdir"; then | |
826 dnl Really add $additional_libdir to $LIBNAME. | |
827 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | |
828 fi | |
829 fi | |
830 haveit= | |
831 for x in $LDFLAGS $LTLIB[]NAME; do | |
832 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
833 if test "X$x" = "X-L$additional_libdir"; then | |
834 haveit=yes | |
835 break | |
836 fi | |
837 done | |
838 if test -z "$haveit"; then | |
839 if test -d "$additional_libdir"; then | |
840 dnl Really add $additional_libdir to $LTLIBNAME. | |
841 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | |
842 fi | |
843 fi | |
844 fi | |
845 fi | |
846 ;; | |
847 -R*) | |
848 dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
849 if test "$enable_rpath" != no; then | |
850 dnl Potentially add DIR to rpathdirs. | |
851 dnl The rpathdirs will be appended to $LIBNAME at the end. | |
852 haveit= | |
853 for x in $rpathdirs; do | |
854 if test "X$x" = "X$dir"; then | |
855 haveit=yes | |
856 break | |
857 fi | |
858 done | |
859 if test -z "$haveit"; then | |
860 rpathdirs="$rpathdirs $dir" | |
861 fi | |
862 dnl Potentially add DIR to ltrpathdirs. | |
863 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | |
864 haveit= | |
865 for x in $ltrpathdirs; do | |
866 if test "X$x" = "X$dir"; then | |
867 haveit=yes | |
868 break | |
869 fi | |
870 done | |
871 if test -z "$haveit"; then | |
872 ltrpathdirs="$ltrpathdirs $dir" | |
873 fi | |
874 fi | |
875 ;; | |
876 -l*) | |
877 dnl Handle this in the next round. | |
878 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
879 ;; | |
880 *.la) | |
881 dnl Handle this in the next round. Throw away the .la's | |
882 dnl directory; it is already contained in a preceding -L | |
883 dnl option. | |
884 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
885 ;; | |
886 *) | |
887 dnl Most likely an immediate library name. | |
888 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" | |
889 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" | |
890 ;; | |
891 esac | |
892 done | |
893 fi | |
894 else | |
895 dnl Didn't find the library; assume it is in the system directories | |
896 dnl known to the linker and runtime loader. (All the system | |
897 dnl directories known to the linker should also be known to the | |
898 dnl runtime loader, otherwise the system is severely misconfigured.) | |
899 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | |
900 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" | |
901 fi | |
902 fi | |
903 fi | |
904 done | |
905 done | |
906 if test "X$rpathdirs" != "X"; then | |
907 if test -n "$acl_hardcode_libdir_separator"; then | |
908 dnl Weird platform: only the last -rpath option counts, the user must | |
909 dnl pass all path elements in one option. We can arrange that for a | |
910 dnl single library, but not when more than one $LIBNAMEs are used. | |
911 alldirs= | |
912 for found_dir in $rpathdirs; do | |
913 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | |
914 done | |
915 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. | |
916 acl_save_libdir="$libdir" | |
917 libdir="$alldirs" | |
918 eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
919 libdir="$acl_save_libdir" | |
920 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | |
921 else | |
922 dnl The -rpath options are cumulative. | |
923 for found_dir in $rpathdirs; do | |
924 acl_save_libdir="$libdir" | |
925 libdir="$found_dir" | |
926 eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
927 libdir="$acl_save_libdir" | |
928 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | |
929 done | |
930 fi | |
931 fi | |
932 if test "X$ltrpathdirs" != "X"; then | |
933 dnl When using libtool, the option that works for both libraries and | |
934 dnl executables is -R. The -R options are cumulative. | |
935 for found_dir in $ltrpathdirs; do | |
936 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | |
937 done | |
938 fi | |
939 ]) | |
940 | |
941 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | |
942 dnl unless already present in VAR. | |
943 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes | |
944 dnl contains two or three consecutive elements that belong together. | |
945 AC_DEFUN([AC_LIB_APPENDTOVAR], | |
946 [ | |
947 for element in [$2]; do | |
948 haveit= | |
949 for x in $[$1]; do | |
950 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
951 if test "X$x" = "X$element"; then | |
952 haveit=yes | |
953 break | |
954 fi | |
955 done | |
956 if test -z "$haveit"; then | |
957 [$1]="${[$1]}${[$1]:+ }$element" | |
958 fi | |
959 done | |
960 ]) | |
961 | |
962 dnl For those cases where a variable contains several -L and -l options | |
963 dnl referring to unknown libraries and directories, this macro determines the | |
964 dnl necessary additional linker options for the runtime path. | |
965 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) | |
966 dnl sets LDADDVAR to linker options needed together with LIBSVALUE. | |
967 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, | |
968 dnl otherwise linking without libtool is assumed. | |
969 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |
970 [ | |
971 AC_REQUIRE([AC_LIB_RPATH]) | |
972 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
973 $1= | |
974 if test "$enable_rpath" != no; then | |
975 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
976 dnl Use an explicit option to hardcode directories into the resulting | |
977 dnl binary. | |
978 rpathdirs= | |
979 next= | |
980 for opt in $2; do | |
981 if test -n "$next"; then | |
982 dir="$next" | |
983 dnl No need to hardcode the standard /usr/lib. | |
984 if test "X$dir" != "X/usr/$acl_libdirstem"; then | |
985 rpathdirs="$rpathdirs $dir" | |
986 fi | |
987 next= | |
988 else | |
989 case $opt in | |
990 -L) next=yes ;; | |
991 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | |
992 dnl No need to hardcode the standard /usr/lib. | |
993 if test "X$dir" != "X/usr/$acl_libdirstem"; then | |
994 rpathdirs="$rpathdirs $dir" | |
995 fi | |
996 next= ;; | |
997 *) next= ;; | |
998 esac | |
999 fi | |
1000 done | |
1001 if test "X$rpathdirs" != "X"; then | |
1002 if test -n ""$3""; then | |
1003 dnl libtool is used for linking. Use -R options. | |
1004 for dir in $rpathdirs; do | |
1005 $1="${$1}${$1:+ }-R$dir" | |
1006 done | |
1007 else | |
1008 dnl The linker is used for linking directly. | |
1009 if test -n "$acl_hardcode_libdir_separator"; then | |
1010 dnl Weird platform: only the last -rpath option counts, the user | |
1011 dnl must pass all path elements in one option. | |
1012 alldirs= | |
1013 for dir in $rpathdirs; do | |
1014 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" | |
1015 done | |
1016 acl_save_libdir="$libdir" | |
1017 libdir="$alldirs" | |
1018 eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
1019 libdir="$acl_save_libdir" | |
1020 $1="$flag" | |
1021 else | |
1022 dnl The -rpath options are cumulative. | |
1023 for dir in $rpathdirs; do | |
1024 acl_save_libdir="$libdir" | |
1025 libdir="$dir" | |
1026 eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
1027 libdir="$acl_save_libdir" | |
1028 $1="${$1}${$1:+ }$flag" | |
1029 done | |
1030 fi | |
1031 fi | |
1032 fi | |
1033 fi | |
1034 fi | |
1035 AC_SUBST([$1]) | |
1036 ]) | |
1037 | |
1038 # lib-prefix.m4 serial 5 (gettext-0.15) | |
1039 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | |
1040 dnl This file is free software; the Free Software Foundation | |
1041 dnl gives unlimited permission to copy and/or distribute it, | |
1042 dnl with or without modifications, as long as this notice is preserved. | |
1043 | |
1044 dnl From Bruno Haible. | |
1045 | |
1046 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | |
1047 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | |
1048 dnl require excessive bracketing. | |
1049 ifdef([AC_HELP_STRING], | |
1050 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], | |
1051 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) | |
1052 | |
1053 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed | |
1054 dnl to access previously installed libraries. The basic assumption is that | |
1055 dnl a user will want packages to use other packages he previously installed | |
1056 dnl with the same --prefix option. | |
1057 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate | |
1058 dnl libraries, but is otherwise very convenient. | |
1059 AC_DEFUN([AC_LIB_PREFIX], | |
1060 [ | |
1061 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | |
1062 AC_REQUIRE([AC_PROG_CC]) | |
1063 AC_REQUIRE([AC_CANONICAL_HOST]) | |
1064 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | |
1065 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | |
1066 dnl By default, look in $includedir and $libdir. | |
1067 use_additional=yes | |
1068 AC_LIB_WITH_FINAL_PREFIX([ | |
1069 eval additional_includedir=\"$includedir\" | |
1070 eval additional_libdir=\"$libdir\" | |
1071 ]) | |
1072 AC_LIB_ARG_WITH([lib-prefix], | |
1073 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | |
1074 --without-lib-prefix don't search for libraries in includedir and libdir], | |
1075 [ | |
1076 if test "X$withval" = "Xno"; then | |
1077 use_additional=no | |
1078 else | |
1079 if test "X$withval" = "X"; then | |
1080 AC_LIB_WITH_FINAL_PREFIX([ | |
1081 eval additional_includedir=\"$includedir\" | |
1082 eval additional_libdir=\"$libdir\" | |
1083 ]) | |
1084 else | |
1085 additional_includedir="$withval/include" | |
1086 additional_libdir="$withval/$acl_libdirstem" | |
1087 fi | |
1088 fi | |
1089 ]) | |
1090 if test $use_additional = yes; then | |
1091 dnl Potentially add $additional_includedir to $CPPFLAGS. | |
1092 dnl But don't add it | |
1093 dnl 1. if it's the standard /usr/include, | |
1094 dnl 2. if it's already present in $CPPFLAGS, | |
1095 dnl 3. if it's /usr/local/include and we are using GCC on Linux, | |
1096 dnl 4. if it doesn't exist as a directory. | |
1097 if test "X$additional_includedir" != "X/usr/include"; then | |
1098 haveit= | |
1099 for x in $CPPFLAGS; do | |
1100 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
1101 if test "X$x" = "X-I$additional_includedir"; then | |
1102 haveit=yes | |
1103 break | |
1104 fi | |
1105 done | |
1106 if test -z "$haveit"; then | |
1107 if test "X$additional_includedir" = "X/usr/local/include"; then | |
1108 if test -n "$GCC"; then | |
1109 case $host_os in | |
1110 linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
1111 esac | |
1112 fi | |
1113 fi | |
1114 if test -z "$haveit"; then | |
1115 if test -d "$additional_includedir"; then | |
1116 dnl Really add $additional_includedir to $CPPFLAGS. | |
1117 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" | |
1118 fi | |
1119 fi | |
1120 fi | |
1121 fi | |
1122 dnl Potentially add $additional_libdir to $LDFLAGS. | |
1123 dnl But don't add it | |
1124 dnl 1. if it's the standard /usr/lib, | |
1125 dnl 2. if it's already present in $LDFLAGS, | |
1126 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | |
1127 dnl 4. if it doesn't exist as a directory. | |
1128 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | |
1129 haveit= | |
1130 for x in $LDFLAGS; do | |
1131 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
1132 if test "X$x" = "X-L$additional_libdir"; then | |
1133 haveit=yes | |
1134 break | |
1135 fi | |
1136 done | |
1137 if test -z "$haveit"; then | |
1138 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | |
1139 if test -n "$GCC"; then | |
1140 case $host_os in | |
1141 linux*) haveit=yes;; | |
1142 esac | |
1143 fi | |
1144 fi | |
1145 if test -z "$haveit"; then | |
1146 if test -d "$additional_libdir"; then | |
1147 dnl Really add $additional_libdir to $LDFLAGS. | |
1148 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" | |
1149 fi | |
1150 fi | |
1151 fi | |
1152 fi | |
1153 fi | |
1154 ]) | |
1155 | |
1156 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, | |
1157 dnl acl_final_exec_prefix, containing the values to which $prefix and | |
1158 dnl $exec_prefix will expand at the end of the configure script. | |
1159 AC_DEFUN([AC_LIB_PREPARE_PREFIX], | |
1160 [ | |
1161 dnl Unfortunately, prefix and exec_prefix get only finally determined | |
1162 dnl at the end of configure. | |
1163 if test "X$prefix" = "XNONE"; then | |
1164 acl_final_prefix="$ac_default_prefix" | |
1165 else | |
1166 acl_final_prefix="$prefix" | |
1167 fi | |
1168 if test "X$exec_prefix" = "XNONE"; then | |
1169 acl_final_exec_prefix='${prefix}' | |
1170 else | |
1171 acl_final_exec_prefix="$exec_prefix" | |
1172 fi | |
1173 acl_save_prefix="$prefix" | |
1174 prefix="$acl_final_prefix" | |
1175 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
1176 prefix="$acl_save_prefix" | |
1177 ]) | |
1178 | |
1179 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the | |
1180 dnl variables prefix and exec_prefix bound to the values they will have | |
1181 dnl at the end of the configure script. | |
1182 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | |
1183 [ | |
1184 acl_save_prefix="$prefix" | |
1185 prefix="$acl_final_prefix" | |
1186 acl_save_exec_prefix="$exec_prefix" | |
1187 exec_prefix="$acl_final_exec_prefix" | |
1188 $1 | |
1189 exec_prefix="$acl_save_exec_prefix" | |
1190 prefix="$acl_save_prefix" | |
1191 ]) | |
1192 | |
1193 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | |
1194 dnl the basename of the libdir, either "lib" or "lib64". | |
1195 AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | |
1196 [ | |
1197 dnl There is no formal standard regarding lib and lib64. The current | |
1198 dnl practice is that on a system supporting 32-bit and 64-bit instruction | |
1199 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | |
1200 dnl libraries go under $prefix/lib. We determine the compiler's default | |
1201 dnl mode by looking at the compiler's library search path. If at least | |
1202 dnl of its elements ends in /lib64 or points to a directory whose absolute | |
1203 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | |
1204 dnl default, namely "lib". | |
1205 acl_libdirstem=lib | |
1206 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
1207 if test -n "$searchpath"; then | |
1208 acl_save_IFS="${IFS= }"; IFS=":" | |
1209 for searchdir in $searchpath; do | |
1210 if test -d "$searchdir"; then | |
1211 case "$searchdir" in | |
1212 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | |
1213 *) searchdir=`cd "$searchdir" && pwd` | |
1214 case "$searchdir" in | |
1215 */lib64 ) acl_libdirstem=lib64 ;; | |
1216 esac ;; | |
1217 esac | |
1218 fi | |
1219 done | |
1220 IFS="$acl_save_IFS" | |
1221 fi | |
1222 ]) | |
1223 | |
1224 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- | |
1225 | |
1226 # serial 52 AC_PROG_LIBTOOL | |
1227 | |
1228 | |
1229 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) | |
1230 # ----------------------------------------------------------- | |
1231 # If this macro is not defined by Autoconf, define it here. | |
1232 m4_ifdef([AC_PROVIDE_IFELSE], | |
1233 [], | |
1234 [m4_define([AC_PROVIDE_IFELSE], | |
1235 [m4_ifdef([AC_PROVIDE_$1], | |
1236 [$2], [$3])])]) | |
1237 | |
1238 | |
1239 # AC_PROG_LIBTOOL | |
1240 # --------------- | |
1241 AC_DEFUN([AC_PROG_LIBTOOL], | |
1242 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl | |
1243 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX | |
1244 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. | |
1245 AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
1246 [AC_LIBTOOL_CXX], | |
1247 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX | |
1248 ])]) | |
1249 dnl And a similar setup for Fortran 77 support | |
1250 AC_PROVIDE_IFELSE([AC_PROG_F77], | |
1251 [AC_LIBTOOL_F77], | |
1252 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 | |
1253 ])]) | |
1254 | |
1255 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. | |
1256 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run | |
1257 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. | |
1258 AC_PROVIDE_IFELSE([AC_PROG_GCJ], | |
1259 [AC_LIBTOOL_GCJ], | |
1260 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | |
1261 [AC_LIBTOOL_GCJ], | |
1262 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], | |
1263 [AC_LIBTOOL_GCJ], | |
1264 [ifdef([AC_PROG_GCJ], | |
1265 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | |
1266 ifdef([A][M_PROG_GCJ], | |
1267 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | |
1268 ifdef([LT_AC_PROG_GCJ], | |
1269 [define([LT_AC_PROG_GCJ], | |
1270 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) | |
1271 ])])# AC_PROG_LIBTOOL | |
1272 | |
1273 | |
1274 # _AC_PROG_LIBTOOL | |
1275 # ---------------- | |
1276 AC_DEFUN([_AC_PROG_LIBTOOL], | |
1277 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
1278 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl | |
1279 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl | |
1280 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl | |
1281 | |
1282 # This can be used to rebuild libtool when needed | |
1283 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" | |
1284 | |
1285 # Always use our own libtool. | |
1286 LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
1287 AC_SUBST(LIBTOOL)dnl | |
1288 | |
1289 # Prevent multiple expansion | |
1290 define([AC_PROG_LIBTOOL], []) | |
1291 ])# _AC_PROG_LIBTOOL | |
1292 | |
1293 | |
1294 # AC_LIBTOOL_SETUP | |
1295 # ---------------- | |
1296 AC_DEFUN([AC_LIBTOOL_SETUP], | |
1297 [AC_PREREQ(2.50)dnl | |
1298 AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
1299 AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
1300 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
1301 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
1302 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
1303 AC_REQUIRE([AC_PROG_CC])dnl | |
1304 AC_REQUIRE([AC_PROG_LD])dnl | |
1305 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | |
1306 AC_REQUIRE([AC_PROG_NM])dnl | |
1307 | |
1308 AC_REQUIRE([AC_PROG_LN_S])dnl | |
1309 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | |
1310 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | |
1311 AC_REQUIRE([AC_OBJEXT])dnl | |
1312 AC_REQUIRE([AC_EXEEXT])dnl | |
1313 dnl | |
1314 AC_LIBTOOL_SYS_MAX_CMD_LEN | |
1315 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
1316 AC_LIBTOOL_OBJDIR | |
1317 | |
1318 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
1319 _LT_AC_PROG_ECHO_BACKSLASH | |
1320 | |
1321 case $host_os in | |
1322 aix3*) | |
1323 # AIX sometimes has problems with the GCC collect2 program. For some | |
1324 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
1325 # vanish in a puff of smoke. | |
1326 if test "X${COLLECT_NAMES+set}" != Xset; then | |
1327 COLLECT_NAMES= | |
1328 export COLLECT_NAMES | |
1329 fi | |
1330 ;; | |
1331 esac | |
1332 | |
1333 # Sed substitution that helps us do robust quoting. It backslashifies | |
1334 # metacharacters that are still active within double-quoted strings. | |
1335 Xsed='sed -e 1s/^X//' | |
1336 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] | |
1337 | |
1338 # Same as above, but do not quote variable references. | |
1339 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] | |
1340 | |
1341 # Sed substitution to delay expansion of an escaped shell variable in a | |
1342 # double_quote_subst'ed string. | |
1343 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
1344 | |
1345 # Sed substitution to avoid accidental globbing in evaled expressions | |
1346 no_glob_subst='s/\*/\\\*/g' | |
1347 | |
1348 # Constants: | |
1349 rm="rm -f" | |
1350 | |
1351 # Global variables: | |
1352 default_ofile=libtool | |
1353 can_build_shared=yes | |
1354 | |
1355 # All known linkers require a `.a' archive for static linking (except MSVC, | |
1356 # which needs '.lib'). | |
1357 libext=a | |
1358 ltmain="$ac_aux_dir/ltmain.sh" | |
1359 ofile="$default_ofile" | |
1360 with_gnu_ld="$lt_cv_prog_gnu_ld" | |
1361 | |
1362 AC_CHECK_TOOL(AR, ar, false) | |
1363 AC_CHECK_TOOL(RANLIB, ranlib, :) | |
1364 AC_CHECK_TOOL(STRIP, strip, :) | |
1365 | |
1366 old_CC="$CC" | |
1367 old_CFLAGS="$CFLAGS" | |
1368 | |
1369 # Set sane defaults for various variables | |
1370 test -z "$AR" && AR=ar | |
1371 test -z "$AR_FLAGS" && AR_FLAGS=cru | |
1372 test -z "$AS" && AS=as | |
1373 test -z "$CC" && CC=cc | |
1374 test -z "$LTCC" && LTCC=$CC | |
1375 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | |
1376 test -z "$DLLTOOL" && DLLTOOL=dlltool | |
1377 test -z "$LD" && LD=ld | |
1378 test -z "$LN_S" && LN_S="ln -s" | |
1379 test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
1380 test -z "$NM" && NM=nm | |
1381 test -z "$SED" && SED=sed | |
1382 test -z "$OBJDUMP" && OBJDUMP=objdump | |
1383 test -z "$RANLIB" && RANLIB=: | |
1384 test -z "$STRIP" && STRIP=: | |
1385 test -z "$ac_objext" && ac_objext=o | |
1386 | |
1387 # Determine commands to create old-style static archives. | |
1388 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' | |
1389 old_postinstall_cmds='chmod 644 $oldlib' | |
1390 old_postuninstall_cmds= | |
1391 | |
1392 if test -n "$RANLIB"; then | |
1393 case $host_os in | |
1394 openbsd*) | |
1395 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" | |
1396 ;; | |
1397 *) | |
1398 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" | |
1399 ;; | |
1400 esac | |
1401 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
1402 fi | |
1403 | |
1404 _LT_CC_BASENAME([$compiler]) | |
1405 | |
1406 # Only perform the check for file, if the check method requires it | |
1407 case $deplibs_check_method in | |
1408 file_magic*) | |
1409 if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
1410 AC_PATH_MAGIC | |
1411 fi | |
1412 ;; | |
1413 esac | |
1414 | |
1415 _LT_REQUIRED_DARWIN_CHECKS | |
1416 | |
1417 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) | |
1418 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], | |
1419 enable_win32_dll=yes, enable_win32_dll=no) | |
1420 | |
1421 AC_ARG_ENABLE([libtool-lock], | |
1422 [AC_HELP_STRING([--disable-libtool-lock], | |
1423 [avoid locking (might break parallel builds)])]) | |
1424 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
1425 | |
1426 AC_ARG_WITH([pic], | |
1427 [AC_HELP_STRING([--with-pic], | |
1428 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | |
1429 [pic_mode="$withval"], | |
1430 [pic_mode=default]) | |
1431 test -z "$pic_mode" && pic_mode=default | |
1432 | |
1433 # Check if we have a version mismatch between libtool.m4 and ltmain.sh. | |
1434 # | |
1435 # Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. | |
1436 # We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually | |
1437 # calls AC_LIBTOOL_CONFIG and creates libtool. | |
1438 # | |
1439 _LT_VERSION_CHECK | |
1440 | |
1441 # Use C for the default configuration in the libtool script | |
1442 tagname= | |
1443 AC_LIBTOOL_LANG_C_CONFIG | |
1444 _LT_AC_TAGCONFIG | |
1445 ])# AC_LIBTOOL_SETUP | |
1446 | |
1447 | |
1448 # _LT_VERSION_CHECK | |
1449 # ----------------- | |
1450 AC_DEFUN([_LT_VERSION_CHECK], | |
1451 [AC_MSG_CHECKING([for correct ltmain.sh version]) | |
1452 if test "x$ltmain" = "x" ; then | |
1453 AC_MSG_RESULT(no) | |
1454 AC_MSG_ERROR([ | |
1455 | |
1456 *** @<:@Gentoo@:>@ sanity check failed! *** | |
1457 *** \$ltmain is not defined, please check the patch for consistency! *** | |
1458 ]) | |
1459 fi | |
1460 gentoo_lt_version="1.5.26" | |
1461 gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` | |
1462 if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then | |
1463 AC_MSG_RESULT(no) | |
1464 AC_MSG_ERROR([ | |
1465 | |
1466 *** @<:@Gentoo@:>@ sanity check failed! *** | |
1467 *** libtool.m4 and ltmain.sh have a version mismatch! *** | |
1468 *** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** | |
1469 | |
1470 Please run: | |
1471 | |
1472 libtoolize --copy --force | |
1473 | |
1474 if appropriate, please contact the maintainer of this | |
1475 package (or your distribution) for help. | |
1476 ]) | |
1477 else | |
1478 AC_MSG_RESULT(yes) | |
1479 fi | |
1480 ])# _LT_VERSION_CHECK | |
1481 | |
1482 | |
1483 # _LT_AC_SYS_COMPILER | |
1484 # ------------------- | |
1485 AC_DEFUN([_LT_AC_SYS_COMPILER], | |
1486 [AC_REQUIRE([AC_PROG_CC])dnl | |
1487 | |
1488 # If no C compiler was specified, use CC. | |
1489 LTCC=${LTCC-"$CC"} | |
1490 | |
1491 # If no C compiler flags were specified, use CFLAGS. | |
1492 LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
1493 | |
1494 # Allow CC to be a program name with arguments. | |
1495 compiler=$CC | |
1496 ])# _LT_AC_SYS_COMPILER | |
1497 | |
1498 | |
1499 # _LT_CC_BASENAME(CC) | |
1500 # ------------------- | |
1501 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. | |
1502 AC_DEFUN([_LT_CC_BASENAME], | |
1503 [for cc_temp in $1""; do | |
1504 case $cc_temp in | |
1505 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; | |
1506 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; | |
1507 \-*) ;; | |
1508 *) break;; | |
1509 esac | |
1510 done | |
1511 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` | |
1512 ]) | |
1513 | |
1514 | |
1515 # _LT_COMPILER_BOILERPLATE | |
1516 # ------------------------ | |
1517 # Check for compiler boilerplate output or warnings with | |
1518 # the simple compiler test code. | |
1519 AC_DEFUN([_LT_COMPILER_BOILERPLATE], | |
1520 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
1521 ac_outfile=conftest.$ac_objext | |
1522 echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
1523 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
1524 _lt_compiler_boilerplate=`cat conftest.err` | |
1525 $rm conftest* | |
1526 ])# _LT_COMPILER_BOILERPLATE | |
1527 | |
1528 | |
1529 # _LT_LINKER_BOILERPLATE | |
1530 # ---------------------- | |
1531 # Check for linker boilerplate output or warnings with | |
1532 # the simple link test code. | |
1533 AC_DEFUN([_LT_LINKER_BOILERPLATE], | |
1534 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
1535 ac_outfile=conftest.$ac_objext | |
1536 echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
1537 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
1538 _lt_linker_boilerplate=`cat conftest.err` | |
1539 $rm -r conftest* | |
1540 ])# _LT_LINKER_BOILERPLATE | |
1541 | |
1542 # _LT_REQUIRED_DARWIN_CHECKS | |
1543 # -------------------------- | |
1544 # Check for some things on darwin | |
1545 AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ | |
1546 case $host_os in | |
1547 rhapsody* | darwin*) | |
1548 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) | |
1549 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) | |
1550 | |
1551 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], | |
1552 [lt_cv_apple_cc_single_mod=no | |
1553 if test -z "${LT_MULTI_MODULE}"; then | |
1554 # By default we will add the -single_module flag. You can override | |
1555 # by either setting the environment variable LT_MULTI_MODULE | |
1556 # non-empty at configure time, or by adding -multi_module to the | |
1557 # link flags. | |
1558 echo "int foo(void){return 1;}" > conftest.c | |
1559 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
1560 -dynamiclib ${wl}-single_module conftest.c | |
1561 if test -f libconftest.dylib; then | |
1562 lt_cv_apple_cc_single_mod=yes | |
1563 rm -rf libconftest.dylib* | |
1564 fi | |
1565 rm conftest.c | |
1566 fi]) | |
1567 AC_CACHE_CHECK([for -exported_symbols_list linker flag], | |
1568 [lt_cv_ld_exported_symbols_list], | |
1569 [lt_cv_ld_exported_symbols_list=no | |
1570 save_LDFLAGS=$LDFLAGS | |
1571 echo "_main" > conftest.sym | |
1572 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | |
1573 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | |
1574 [lt_cv_ld_exported_symbols_list=yes], | |
1575 [lt_cv_ld_exported_symbols_list=no]) | |
1576 LDFLAGS="$save_LDFLAGS" | |
1577 ]) | |
1578 case $host_os in | |
1579 rhapsody* | darwin1.[[0123]]) | |
1580 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | |
1581 darwin1.*) | |
1582 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1583 darwin*) | |
1584 # if running on 10.5 or later, the deployment target defaults | |
1585 # to the OS version, if on x86, and 10.4, the deployment | |
1586 # target defaults to 10.4. Don't you love it? | |
1587 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
1588 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | |
1589 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1590 10.[[012]]*) | |
1591 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1592 10.*) | |
1593 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1594 esac | |
1595 ;; | |
1596 esac | |
1597 if test "$lt_cv_apple_cc_single_mod" = "yes"; then | |
1598 _lt_dar_single_mod='$single_module' | |
1599 fi | |
1600 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | |
1601 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | |
1602 else | |
1603 _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" | |
1604 fi | |
1605 if test "$DSYMUTIL" != ":"; then | |
1606 _lt_dsymutil="~$DSYMUTIL \$lib || :" | |
1607 else | |
1608 _lt_dsymutil= | |
1609 fi | |
1610 ;; | |
1611 esac | |
1612 ]) | |
1613 | |
1614 # _LT_AC_SYS_LIBPATH_AIX | |
1615 # ---------------------- | |
1616 # Links a minimal program and checks the executable | |
1617 # for the system default hardcoded library path. In most cases, | |
1618 # this is /usr/lib:/lib, but when the MPI compilers are used | |
1619 # the location of the communication and MPI libs are included too. | |
1620 # If we don't find anything, use the default library path according | |
1621 # to the aix ld manual. | |
1622 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], | |
1623 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
1624 AC_LINK_IFELSE(AC_LANG_PROGRAM,[ | |
1625 lt_aix_libpath_sed=' | |
1626 /Import File Strings/,/^$/ { | |
1627 /^0/ { | |
1628 s/^0 *\(.*\)$/\1/ | |
1629 p | |
1630 } | |
1631 }' | |
1632 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1633 # Check for a 64-bit object if we didn't find anything. | |
1634 if test -z "$aix_libpath"; then | |
1635 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1636 fi],[]) | |
1637 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | |
1638 ])# _LT_AC_SYS_LIBPATH_AIX | |
1639 | |
1640 | |
1641 # _LT_AC_SHELL_INIT(ARG) | |
1642 # ---------------------- | |
1643 AC_DEFUN([_LT_AC_SHELL_INIT], | |
1644 [ifdef([AC_DIVERSION_NOTICE], | |
1645 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | |
1646 [AC_DIVERT_PUSH(NOTICE)]) | |
1647 $1 | |
1648 AC_DIVERT_POP | |
1649 ])# _LT_AC_SHELL_INIT | |
1650 | |
1651 | |
1652 # _LT_AC_PROG_ECHO_BACKSLASH | |
1653 # -------------------------- | |
1654 # Add some code to the start of the generated configure script which | |
1655 # will find an echo command which doesn't interpret backslashes. | |
1656 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], | |
1657 [_LT_AC_SHELL_INIT([ | |
1658 # Check that we are running under the correct shell. | |
1659 SHELL=${CONFIG_SHELL-/bin/sh} | |
1660 | |
1661 case X$ECHO in | |
1662 X*--fallback-echo) | |
1663 # Remove one level of quotation (which was required for Make). | |
1664 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | |
1665 ;; | |
1666 esac | |
1667 | |
1668 echo=${ECHO-echo} | |
1669 if test "X[$]1" = X--no-reexec; then | |
1670 # Discard the --no-reexec flag, and continue. | |
1671 shift | |
1672 elif test "X[$]1" = X--fallback-echo; then | |
1673 # Avoid inline document here, it may be left over | |
1674 : | |
1675 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then | |
1676 # Yippee, $echo works! | |
1677 : | |
1678 else | |
1679 # Restart under the correct shell. | |
1680 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1681 fi | |
1682 | |
1683 if test "X[$]1" = X--fallback-echo; then | |
1684 # used as fallback echo | |
1685 shift | |
1686 cat <<EOF | |
1687 [$]* | |
1688 EOF | |
1689 exit 0 | |
1690 fi | |
1691 | |
1692 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
1693 # if CDPATH is set. | |
1694 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
1695 | |
1696 if test -z "$ECHO"; then | |
1697 if test "X${echo_test_string+set}" != Xset; then | |
1698 # find a string as large as possible, as long as the shell can cope with it | |
1699 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | |
1700 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
1701 if (echo_test_string=`eval $cmd`) 2>/dev/null && | |
1702 echo_test_string=`eval $cmd` && | |
1703 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | |
1704 then | |
1705 break | |
1706 fi | |
1707 done | |
1708 fi | |
1709 | |
1710 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1711 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1712 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1713 : | |
1714 else | |
1715 # The Solaris, AIX, and Digital Unix default echo programs unquote | |
1716 # backslashes. This makes it impossible to quote backslashes using | |
1717 # echo "$something" | sed 's/\\/\\\\/g' | |
1718 # | |
1719 # So, first we look for a working echo in the user's PATH. | |
1720 | |
1721 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1722 for dir in $PATH /usr/ucb; do | |
1723 IFS="$lt_save_ifs" | |
1724 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
1725 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
1726 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
1727 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1728 echo="$dir/echo" | |
1729 break | |
1730 fi | |
1731 done | |
1732 IFS="$lt_save_ifs" | |
1733 | |
1734 if test "X$echo" = Xecho; then | |
1735 # We didn't find a better echo, so look for alternatives. | |
1736 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | |
1737 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | |
1738 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1739 # This shell has a builtin print -r that does the trick. | |
1740 echo='print -r' | |
1741 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | |
1742 test "X$CONFIG_SHELL" != X/bin/ksh; then | |
1743 # If we have ksh, try running configure again with it. | |
1744 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
1745 export ORIGINAL_CONFIG_SHELL | |
1746 CONFIG_SHELL=/bin/ksh | |
1747 export CONFIG_SHELL | |
1748 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1749 else | |
1750 # Try using printf. | |
1751 echo='printf %s\n' | |
1752 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1753 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1754 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1755 # Cool, printf works | |
1756 : | |
1757 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1758 test "X$echo_testing_string" = 'X\t' && | |
1759 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1760 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1761 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | |
1762 export CONFIG_SHELL | |
1763 SHELL="$CONFIG_SHELL" | |
1764 export SHELL | |
1765 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1766 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1767 test "X$echo_testing_string" = 'X\t' && | |
1768 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1769 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1770 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1771 else | |
1772 # maybe with a smaller string... | |
1773 prev=: | |
1774 | |
1775 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | |
1776 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | |
1777 then | |
1778 break | |
1779 fi | |
1780 prev="$cmd" | |
1781 done | |
1782 | |
1783 if test "$prev" != 'sed 50q "[$]0"'; then | |
1784 echo_test_string=`eval $prev` | |
1785 export echo_test_string | |
1786 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | |
1787 else | |
1788 # Oops. We lost completely, so just stick with echo. | |
1789 echo=echo | |
1790 fi | |
1791 fi | |
1792 fi | |
1793 fi | |
1794 fi | |
1795 fi | |
1796 | |
1797 # Copy echo and quote the copy suitably for passing to libtool from | |
1798 # the Makefile, instead of quoting the original, which is used later. | |
1799 ECHO=$echo | |
1800 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | |
1801 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | |
1802 fi | |
1803 | |
1804 AC_SUBST(ECHO) | |
1805 ])])# _LT_AC_PROG_ECHO_BACKSLASH | |
1806 | |
1807 | |
1808 # _LT_AC_LOCK | |
1809 # ----------- | |
1810 AC_DEFUN([_LT_AC_LOCK], | |
1811 [AC_ARG_ENABLE([libtool-lock], | |
1812 [AC_HELP_STRING([--disable-libtool-lock], | |
1813 [avoid locking (might break parallel builds)])]) | |
1814 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
1815 | |
1816 # Some flags need to be propagated to the compiler or linker for good | |
1817 # libtool support. | |
1818 case $host in | |
1819 ia64-*-hpux*) | |
1820 # Find out which ABI we are using. | |
1821 echo 'int i;' > conftest.$ac_ext | |
1822 if AC_TRY_EVAL(ac_compile); then | |
1823 case `/usr/bin/file conftest.$ac_objext` in | |
1824 *ELF-32*) | |
1825 HPUX_IA64_MODE="32" | |
1826 ;; | |
1827 *ELF-64*) | |
1828 HPUX_IA64_MODE="64" | |
1829 ;; | |
1830 esac | |
1831 fi | |
1832 rm -rf conftest* | |
1833 ;; | |
1834 *-*-irix6*) | |
1835 # Find out which ABI we are using. | |
1836 echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
1837 if AC_TRY_EVAL(ac_compile); then | |
1838 if test "$lt_cv_prog_gnu_ld" = yes; then | |
1839 case `/usr/bin/file conftest.$ac_objext` in | |
1840 *32-bit*) | |
1841 LD="${LD-ld} -melf32bsmip" | |
1842 ;; | |
1843 *N32*) | |
1844 LD="${LD-ld} -melf32bmipn32" | |
1845 ;; | |
1846 *64-bit*) | |
1847 LD="${LD-ld} -melf64bmip" | |
1848 ;; | |
1849 esac | |
1850 else | |
1851 case `/usr/bin/file conftest.$ac_objext` in | |
1852 *32-bit*) | |
1853 LD="${LD-ld} -32" | |
1854 ;; | |
1855 *N32*) | |
1856 LD="${LD-ld} -n32" | |
1857 ;; | |
1858 *64-bit*) | |
1859 LD="${LD-ld} -64" | |
1860 ;; | |
1861 esac | |
1862 fi | |
1863 fi | |
1864 rm -rf conftest* | |
1865 ;; | |
1866 | |
1867 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ | |
1868 s390*-*linux*|sparc*-*linux*) | |
1869 # Find out which ABI we are using. | |
1870 echo 'int i;' > conftest.$ac_ext | |
1871 if AC_TRY_EVAL(ac_compile); then | |
1872 case `/usr/bin/file conftest.o` in | |
1873 *32-bit*) | |
1874 case $host in | |
1875 x86_64-*kfreebsd*-gnu) | |
1876 LD="${LD-ld} -m elf_i386_fbsd" | |
1877 ;; | |
1878 x86_64-*linux*) | |
1879 LD="${LD-ld} -m elf_i386" | |
1880 ;; | |
1881 ppc64-*linux*|powerpc64-*linux*) | |
1882 LD="${LD-ld} -m elf32ppclinux" | |
1883 ;; | |
1884 s390x-*linux*) | |
1885 LD="${LD-ld} -m elf_s390" | |
1886 ;; | |
1887 sparc64-*linux*) | |
1888 LD="${LD-ld} -m elf32_sparc" | |
1889 ;; | |
1890 esac | |
1891 ;; | |
1892 *64-bit*) | |
1893 case $host in | |
1894 x86_64-*kfreebsd*-gnu) | |
1895 LD="${LD-ld} -m elf_x86_64_fbsd" | |
1896 ;; | |
1897 x86_64-*linux*) | |
1898 LD="${LD-ld} -m elf_x86_64" | |
1899 ;; | |
1900 ppc*-*linux*|powerpc*-*linux*) | |
1901 LD="${LD-ld} -m elf64ppc" | |
1902 ;; | |
1903 s390*-*linux*) | |
1904 LD="${LD-ld} -m elf64_s390" | |
1905 ;; | |
1906 sparc*-*linux*) | |
1907 LD="${LD-ld} -m elf64_sparc" | |
1908 ;; | |
1909 esac | |
1910 ;; | |
1911 esac | |
1912 fi | |
1913 rm -rf conftest* | |
1914 ;; | |
1915 | |
1916 *-*-sco3.2v5*) | |
1917 # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1918 SAVE_CFLAGS="$CFLAGS" | |
1919 CFLAGS="$CFLAGS -belf" | |
1920 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
1921 [AC_LANG_PUSH(C) | |
1922 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
1923 AC_LANG_POP]) | |
1924 if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1925 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1926 CFLAGS="$SAVE_CFLAGS" | |
1927 fi | |
1928 ;; | |
1929 sparc*-*solaris*) | |
1930 # Find out which ABI we are using. | |
1931 echo 'int i;' > conftest.$ac_ext | |
1932 if AC_TRY_EVAL(ac_compile); then | |
1933 case `/usr/bin/file conftest.o` in | |
1934 *64-bit*) | |
1935 case $lt_cv_prog_gnu_ld in | |
1936 yes*) LD="${LD-ld} -m elf64_sparc" ;; | |
1937 *) | |
1938 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | |
1939 LD="${LD-ld} -64" | |
1940 fi | |
1941 ;; | |
1942 esac | |
1943 ;; | |
1944 esac | |
1945 fi | |
1946 rm -rf conftest* | |
1947 ;; | |
1948 | |
1949 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], | |
1950 [*-*-cygwin* | *-*-mingw* | *-*-pw32*) | |
1951 AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
1952 AC_CHECK_TOOL(AS, as, false) | |
1953 AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
1954 ;; | |
1955 ]) | |
1956 esac | |
1957 | |
1958 need_locks="$enable_libtool_lock" | |
1959 | |
1960 ])# _LT_AC_LOCK | |
1961 | |
1962 | |
1963 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
1964 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1965 # ---------------------------------------------------------------- | |
1966 # Check whether the given compiler option works | |
1967 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], | |
1968 [AC_REQUIRE([LT_AC_PROG_SED]) | |
1969 AC_CACHE_CHECK([$1], [$2], | |
1970 [$2=no | |
1971 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | |
1972 echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
1973 lt_compiler_flag="$3" | |
1974 # Insert the option either (1) after the last *FLAGS variable, or | |
1975 # (2) before a word containing "conftest.", or (3) at the end. | |
1976 # Note that $ac_compile itself does not contain backslashes and begins | |
1977 # with a dollar sign (not a hyphen), so the echo should work correctly. | |
1978 # The option is referenced via a variable to avoid confusing sed. | |
1979 lt_compile=`echo "$ac_compile" | $SED \ | |
1980 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
1981 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
1982 -e 's:$: $lt_compiler_flag:'` | |
1983 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
1984 (eval "$lt_compile" 2>conftest.err) | |
1985 ac_status=$? | |
1986 cat conftest.err >&AS_MESSAGE_LOG_FD | |
1987 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
1988 if (exit $ac_status) && test -s "$ac_outfile"; then | |
1989 # The compiler can only warn and ignore the option if not recognized | |
1990 # So say no if there are warnings other than the usual output. | |
1991 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp | |
1992 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
1993 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
1994 $2=yes | |
1995 fi | |
1996 fi | |
1997 $rm conftest* | |
1998 ]) | |
1999 | |
2000 if test x"[$]$2" = xyes; then | |
2001 ifelse([$5], , :, [$5]) | |
2002 else | |
2003 ifelse([$6], , :, [$6]) | |
2004 fi | |
2005 ])# AC_LIBTOOL_COMPILER_OPTION | |
2006 | |
2007 | |
2008 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
2009 # [ACTION-SUCCESS], [ACTION-FAILURE]) | |
2010 # ------------------------------------------------------------ | |
2011 # Check whether the given compiler option works | |
2012 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], | |
2013 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
2014 AC_CACHE_CHECK([$1], [$2], | |
2015 [$2=no | |
2016 save_LDFLAGS="$LDFLAGS" | |
2017 LDFLAGS="$LDFLAGS $3" | |
2018 echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
2019 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
2020 # The linker can only warn and ignore the option if not recognized | |
2021 # So say no if there are warnings | |
2022 if test -s conftest.err; then | |
2023 # Append any errors to the config.log. | |
2024 cat conftest.err 1>&AS_MESSAGE_LOG_FD | |
2025 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp | |
2026 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
2027 if diff conftest.exp conftest.er2 >/dev/null; then | |
2028 $2=yes | |
2029 fi | |
2030 else | |
2031 $2=yes | |
2032 fi | |
2033 fi | |
2034 $rm -r conftest* | |
2035 LDFLAGS="$save_LDFLAGS" | |
2036 ]) | |
2037 | |
2038 if test x"[$]$2" = xyes; then | |
2039 ifelse([$4], , :, [$4]) | |
2040 else | |
2041 ifelse([$5], , :, [$5]) | |
2042 fi | |
2043 ])# AC_LIBTOOL_LINKER_OPTION | |
2044 | |
2045 | |
2046 # AC_LIBTOOL_SYS_MAX_CMD_LEN | |
2047 # -------------------------- | |
2048 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], | |
2049 [# find the maximum length of command line arguments | |
2050 AC_MSG_CHECKING([the maximum length of command line arguments]) | |
2051 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | |
2052 i=0 | |
2053 teststring="ABCD" | |
2054 | |
2055 case $build_os in | |
2056 msdosdjgpp*) | |
2057 # On DJGPP, this test can blow up pretty badly due to problems in libc | |
2058 # (any single argument exceeding 2000 bytes causes a buffer overrun | |
2059 # during glob expansion). Even if it were fixed, the result of this | |
2060 # check would be larger than it should be. | |
2061 lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
2062 ;; | |
2063 | |
2064 gnu*) | |
2065 # Under GNU Hurd, this test is not required because there is | |
2066 # no limit to the length of command line arguments. | |
2067 # Libtool will interpret -1 as no limit whatsoever | |
2068 lt_cv_sys_max_cmd_len=-1; | |
2069 ;; | |
2070 | |
2071 cygwin* | mingw*) | |
2072 # On Win9x/ME, this test blows up -- it succeeds, but takes | |
2073 # about 5 minutes as the teststring grows exponentially. | |
2074 # Worse, since 9x/ME are not pre-emptively multitasking, | |
2075 # you end up with a "frozen" computer, even though with patience | |
2076 # the test eventually succeeds (with a max line length of 256k). | |
2077 # Instead, let's just punt: use the minimum linelength reported by | |
2078 # all of the supported platforms: 8192 (on NT/2K/XP). | |
2079 lt_cv_sys_max_cmd_len=8192; | |
2080 ;; | |
2081 | |
2082 amigaos*) | |
2083 # On AmigaOS with pdksh, this test takes hours, literally. | |
2084 # So we just punt and use a minimum line length of 8192. | |
2085 lt_cv_sys_max_cmd_len=8192; | |
2086 ;; | |
2087 | |
2088 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) | |
2089 # This has been around since 386BSD, at least. Likely further. | |
2090 if test -x /sbin/sysctl; then | |
2091 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | |
2092 elif test -x /usr/sbin/sysctl; then | |
2093 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | |
2094 else | |
2095 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | |
2096 fi | |
2097 # And add a safety zone | |
2098 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
2099 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
2100 ;; | |
2101 | |
2102 interix*) | |
2103 # We know the value 262144 and hardcode it with a safety zone (like BSD) | |
2104 lt_cv_sys_max_cmd_len=196608 | |
2105 ;; | |
2106 | |
2107 osf*) | |
2108 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | |
2109 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | |
2110 # nice to cause kernel panics so lets avoid the loop below. | |
2111 # First set a reasonable default. | |
2112 lt_cv_sys_max_cmd_len=16384 | |
2113 # | |
2114 if test -x /sbin/sysconfig; then | |
2115 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | |
2116 *1*) lt_cv_sys_max_cmd_len=-1 ;; | |
2117 esac | |
2118 fi | |
2119 ;; | |
2120 sco3.2v5*) | |
2121 lt_cv_sys_max_cmd_len=102400 | |
2122 ;; | |
2123 sysv5* | sco5v6* | sysv4.2uw2*) | |
2124 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | |
2125 if test -n "$kargmax"; then | |
2126 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | |
2127 else | |
2128 lt_cv_sys_max_cmd_len=32768 | |
2129 fi | |
2130 ;; | |
2131 *) | |
2132 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` | |
2133 if test -n "$lt_cv_sys_max_cmd_len"; then | |
2134 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
2135 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
2136 else | |
2137 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | |
2138 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ | |
2139 = "XX$teststring") >/dev/null 2>&1 && | |
2140 new_result=`expr "X$teststring" : ".*" 2>&1` && | |
2141 lt_cv_sys_max_cmd_len=$new_result && | |
2142 test $i != 17 # 1/2 MB should be enough | |
2143 do | |
2144 i=`expr $i + 1` | |
2145 teststring=$teststring$teststring | |
2146 done | |
2147 teststring= | |
2148 # Add a significant safety factor because C++ compilers can tack on massive | |
2149 # amounts of additional arguments before passing them to the linker. | |
2150 # It appears as though 1/2 is a usable value. | |
2151 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
2152 fi | |
2153 ;; | |
2154 esac | |
2155 ]) | |
2156 if test -n $lt_cv_sys_max_cmd_len ; then | |
2157 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | |
2158 else | |
2159 AC_MSG_RESULT(none) | |
2160 fi | |
2161 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN | |
2162 | |
2163 | |
2164 # _LT_AC_CHECK_DLFCN | |
2165 # ------------------ | |
2166 AC_DEFUN([_LT_AC_CHECK_DLFCN], | |
2167 [AC_CHECK_HEADERS(dlfcn.h)dnl | |
2168 ])# _LT_AC_CHECK_DLFCN | |
2169 | |
2170 | |
2171 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | |
2172 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
2173 # --------------------------------------------------------------------- | |
2174 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], | |
2175 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
2176 if test "$cross_compiling" = yes; then : | |
2177 [$4] | |
2178 else | |
2179 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
2180 lt_status=$lt_dlunknown | |
2181 cat > conftest.$ac_ext <<EOF | |
2182 [#line __oline__ "configure" | |
2183 #include "confdefs.h" | |
2184 | |
2185 #if HAVE_DLFCN_H | |
2186 #include <dlfcn.h> | |
2187 #endif | |
2188 | |
2189 #include <stdio.h> | |
2190 | |
2191 #ifdef RTLD_GLOBAL | |
2192 # define LT_DLGLOBAL RTLD_GLOBAL | |
2193 #else | |
2194 # ifdef DL_GLOBAL | |
2195 # define LT_DLGLOBAL DL_GLOBAL | |
2196 # else | |
2197 # define LT_DLGLOBAL 0 | |
2198 # endif | |
2199 #endif | |
2200 | |
2201 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
2202 find out it does not work in some platform. */ | |
2203 #ifndef LT_DLLAZY_OR_NOW | |
2204 # ifdef RTLD_LAZY | |
2205 # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
2206 # else | |
2207 # ifdef DL_LAZY | |
2208 # define LT_DLLAZY_OR_NOW DL_LAZY | |
2209 # else | |
2210 # ifdef RTLD_NOW | |
2211 # define LT_DLLAZY_OR_NOW RTLD_NOW | |
2212 # else | |
2213 # ifdef DL_NOW | |
2214 # define LT_DLLAZY_OR_NOW DL_NOW | |
2215 # else | |
2216 # define LT_DLLAZY_OR_NOW 0 | |
2217 # endif | |
2218 # endif | |
2219 # endif | |
2220 # endif | |
2221 #endif | |
2222 | |
2223 #ifdef __cplusplus | |
2224 extern "C" void exit (int); | |
2225 #endif | |
2226 | |
2227 void fnord() { int i=42;} | |
2228 int main () | |
2229 { | |
2230 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
2231 int status = $lt_dlunknown; | |
2232 | |
2233 if (self) | |
2234 { | |
2235 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
2236 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
2237 /* dlclose (self); */ | |
2238 } | |
2239 else | |
2240 puts (dlerror ()); | |
2241 | |
2242 exit (status); | |
2243 }] | |
2244 EOF | |
2245 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
2246 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null | |
2247 lt_status=$? | |
2248 case x$lt_status in | |
2249 x$lt_dlno_uscore) $1 ;; | |
2250 x$lt_dlneed_uscore) $2 ;; | |
2251 x$lt_dlunknown|x*) $3 ;; | |
2252 esac | |
2253 else : | |
2254 # compilation failed | |
2255 $3 | |
2256 fi | |
2257 fi | |
2258 rm -fr conftest* | |
2259 ])# _LT_AC_TRY_DLOPEN_SELF | |
2260 | |
2261 | |
2262 # AC_LIBTOOL_DLOPEN_SELF | |
2263 # ---------------------- | |
2264 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], | |
2265 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
2266 if test "x$enable_dlopen" != xyes; then | |
2267 enable_dlopen=unknown | |
2268 enable_dlopen_self=unknown | |
2269 enable_dlopen_self_static=unknown | |
2270 else | |
2271 lt_cv_dlopen=no | |
2272 lt_cv_dlopen_libs= | |
2273 | |
2274 case $host_os in | |
2275 beos*) | |
2276 lt_cv_dlopen="load_add_on" | |
2277 lt_cv_dlopen_libs= | |
2278 lt_cv_dlopen_self=yes | |
2279 ;; | |
2280 | |
2281 mingw* | pw32*) | |
2282 lt_cv_dlopen="LoadLibrary" | |
2283 lt_cv_dlopen_libs= | |
2284 ;; | |
2285 | |
2286 cygwin*) | |
2287 lt_cv_dlopen="dlopen" | |
2288 lt_cv_dlopen_libs= | |
2289 ;; | |
2290 | |
2291 darwin*) | |
2292 # if libdl is installed we need to link against it | |
2293 AC_CHECK_LIB([dl], [dlopen], | |
2294 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ | |
2295 lt_cv_dlopen="dyld" | |
2296 lt_cv_dlopen_libs= | |
2297 lt_cv_dlopen_self=yes | |
2298 ]) | |
2299 ;; | |
2300 | |
2301 *) | |
2302 AC_CHECK_FUNC([shl_load], | |
2303 [lt_cv_dlopen="shl_load"], | |
2304 [AC_CHECK_LIB([dld], [shl_load], | |
2305 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], | |
2306 [AC_CHECK_FUNC([dlopen], | |
2307 [lt_cv_dlopen="dlopen"], | |
2308 [AC_CHECK_LIB([dl], [dlopen], | |
2309 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
2310 [AC_CHECK_LIB([svld], [dlopen], | |
2311 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
2312 [AC_CHECK_LIB([dld], [dld_link], | |
2313 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) | |
2314 ]) | |
2315 ]) | |
2316 ]) | |
2317 ]) | |
2318 ]) | |
2319 ;; | |
2320 esac | |
2321 | |
2322 if test "x$lt_cv_dlopen" != xno; then | |
2323 enable_dlopen=yes | |
2324 else | |
2325 enable_dlopen=no | |
2326 fi | |
2327 | |
2328 case $lt_cv_dlopen in | |
2329 dlopen) | |
2330 save_CPPFLAGS="$CPPFLAGS" | |
2331 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
2332 | |
2333 save_LDFLAGS="$LDFLAGS" | |
2334 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
2335 | |
2336 save_LIBS="$LIBS" | |
2337 LIBS="$lt_cv_dlopen_libs $LIBS" | |
2338 | |
2339 AC_CACHE_CHECK([whether a program can dlopen itself], | |
2340 lt_cv_dlopen_self, [dnl | |
2341 _LT_AC_TRY_DLOPEN_SELF( | |
2342 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
2343 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
2344 ]) | |
2345 | |
2346 if test "x$lt_cv_dlopen_self" = xyes; then | |
2347 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | |
2348 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
2349 lt_cv_dlopen_self_static, [dnl | |
2350 _LT_AC_TRY_DLOPEN_SELF( | |
2351 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
2352 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
2353 ]) | |
2354 fi | |
2355 | |
2356 CPPFLAGS="$save_CPPFLAGS" | |
2357 LDFLAGS="$save_LDFLAGS" | |
2358 LIBS="$save_LIBS" | |
2359 ;; | |
2360 esac | |
2361 | |
2362 case $lt_cv_dlopen_self in | |
2363 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
2364 *) enable_dlopen_self=unknown ;; | |
2365 esac | |
2366 | |
2367 case $lt_cv_dlopen_self_static in | |
2368 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
2369 *) enable_dlopen_self_static=unknown ;; | |
2370 esac | |
2371 fi | |
2372 ])# AC_LIBTOOL_DLOPEN_SELF | |
2373 | |
2374 | |
2375 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) | |
2376 # --------------------------------- | |
2377 # Check to see if options -c and -o are simultaneously supported by compiler | |
2378 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], | |
2379 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
2380 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
2381 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | |
2382 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | |
2383 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | |
2384 $rm -r conftest 2>/dev/null | |
2385 mkdir conftest | |
2386 cd conftest | |
2387 mkdir out | |
2388 echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
2389 | |
2390 lt_compiler_flag="-o out/conftest2.$ac_objext" | |
2391 # Insert the option either (1) after the last *FLAGS variable, or | |
2392 # (2) before a word containing "conftest.", or (3) at the end. | |
2393 # Note that $ac_compile itself does not contain backslashes and begins | |
2394 # with a dollar sign (not a hyphen), so the echo should work correctly. | |
2395 lt_compile=`echo "$ac_compile" | $SED \ | |
2396 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
2397 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
2398 -e 's:$: $lt_compiler_flag:'` | |
2399 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
2400 (eval "$lt_compile" 2>out/conftest.err) | |
2401 ac_status=$? | |
2402 cat out/conftest.err >&AS_MESSAGE_LOG_FD | |
2403 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
2404 if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
2405 then | |
2406 # The compiler can only warn and ignore the option if not recognized | |
2407 # So say no if there are warnings | |
2408 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp | |
2409 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 | |
2410 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
2411 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
2412 fi | |
2413 fi | |
2414 chmod u+w . 2>&AS_MESSAGE_LOG_FD | |
2415 $rm conftest* | |
2416 # SGI C++ compiler will create directory out/ii_files/ for | |
2417 # template instantiation | |
2418 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | |
2419 $rm out/* && rmdir out | |
2420 cd .. | |
2421 rmdir conftest | |
2422 $rm conftest* | |
2423 ]) | |
2424 ])# AC_LIBTOOL_PROG_CC_C_O | |
2425 | |
2426 | |
2427 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) | |
2428 # ----------------------------------------- | |
2429 # Check to see if we can do hard links to lock some files if needed | |
2430 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], | |
2431 [AC_REQUIRE([_LT_AC_LOCK])dnl | |
2432 | |
2433 hard_links="nottested" | |
2434 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | |
2435 # do not overwrite the value of need_locks provided by the user | |
2436 AC_MSG_CHECKING([if we can lock with hard links]) | |
2437 hard_links=yes | |
2438 $rm conftest* | |
2439 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2440 touch conftest.a | |
2441 ln conftest.a conftest.b 2>&5 || hard_links=no | |
2442 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2443 AC_MSG_RESULT([$hard_links]) | |
2444 if test "$hard_links" = no; then | |
2445 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | |
2446 need_locks=warn | |
2447 fi | |
2448 else | |
2449 need_locks=no | |
2450 fi | |
2451 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS | |
2452 | |
2453 | |
2454 # AC_LIBTOOL_OBJDIR | |
2455 # ----------------- | |
2456 AC_DEFUN([AC_LIBTOOL_OBJDIR], | |
2457 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | |
2458 [rm -f .libs 2>/dev/null | |
2459 mkdir .libs 2>/dev/null | |
2460 if test -d .libs; then | |
2461 lt_cv_objdir=.libs | |
2462 else | |
2463 # MS-DOS does not allow filenames that begin with a dot. | |
2464 lt_cv_objdir=_libs | |
2465 fi | |
2466 rmdir .libs 2>/dev/null]) | |
2467 objdir=$lt_cv_objdir | |
2468 ])# AC_LIBTOOL_OBJDIR | |
2469 | |
2470 | |
2471 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) | |
2472 # ---------------------------------------------- | |
2473 # Check hardcoding attributes. | |
2474 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], | |
2475 [AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
2476 _LT_AC_TAGVAR(hardcode_action, $1)= | |
2477 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ | |
2478 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ | |
2479 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then | |
2480 | |
2481 # We can hardcode non-existant directories. | |
2482 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && | |
2483 # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
2484 # have to relink, otherwise we might link with an installed library | |
2485 # when we should be linking with a yet-to-be-installed one | |
2486 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && | |
2487 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then | |
2488 # Linking always hardcodes the temporary library directory. | |
2489 _LT_AC_TAGVAR(hardcode_action, $1)=relink | |
2490 else | |
2491 # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
2492 _LT_AC_TAGVAR(hardcode_action, $1)=immediate | |
2493 fi | |
2494 else | |
2495 # We cannot hardcode anything, or else we can only hardcode existing | |
2496 # directories. | |
2497 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported | |
2498 fi | |
2499 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) | |
2500 | |
2501 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then | |
2502 # Fast installation is not supported | |
2503 enable_fast_install=no | |
2504 elif test "$shlibpath_overrides_runpath" = yes || | |
2505 test "$enable_shared" = no; then | |
2506 # Fast installation is not necessary | |
2507 enable_fast_install=needless | |
2508 fi | |
2509 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH | |
2510 | |
2511 | |
2512 # AC_LIBTOOL_SYS_LIB_STRIP | |
2513 # ------------------------ | |
2514 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], | |
2515 [striplib= | |
2516 old_striplib= | |
2517 AC_MSG_CHECKING([whether stripping libraries is possible]) | |
2518 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | |
2519 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2520 test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2521 AC_MSG_RESULT([yes]) | |
2522 else | |
2523 # FIXME - insert some real tests, host_os isn't really good enough | |
2524 case $host_os in | |
2525 darwin*) | |
2526 if test -n "$STRIP" ; then | |
2527 striplib="$STRIP -x" | |
2528 old_striplib="$STRIP -S" | |
2529 AC_MSG_RESULT([yes]) | |
2530 else | |
2531 AC_MSG_RESULT([no]) | |
2532 fi | |
2533 ;; | |
2534 *) | |
2535 AC_MSG_RESULT([no]) | |
2536 ;; | |
2537 esac | |
2538 fi | |
2539 ])# AC_LIBTOOL_SYS_LIB_STRIP | |
2540 | |
2541 | |
2542 # AC_LIBTOOL_SYS_DYNAMIC_LINKER | |
2543 # ----------------------------- | |
2544 # PORTME Fill in your ld.so characteristics | |
2545 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], | |
2546 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
2547 AC_MSG_CHECKING([dynamic linker characteristics]) | |
2548 library_names_spec= | |
2549 libname_spec='lib$name' | |
2550 soname_spec= | |
2551 shrext_cmds=".so" | |
2552 postinstall_cmds= | |
2553 postuninstall_cmds= | |
2554 finish_cmds= | |
2555 finish_eval= | |
2556 shlibpath_var= | |
2557 shlibpath_overrides_runpath=unknown | |
2558 version_type=none | |
2559 dynamic_linker="$host_os ld.so" | |
2560 sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
2561 m4_if($1,[],[ | |
2562 if test "$GCC" = yes; then | |
2563 case $host_os in | |
2564 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | |
2565 *) lt_awk_arg="/^libraries:/" ;; | |
2566 esac | |
2567 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` | |
2568 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then | |
2569 # if the path contains ";" then we assume it to be the separator | |
2570 # otherwise default to the standard path separator (i.e. ":") - it is | |
2571 # assumed that no part of a normal pathname contains ";" but that should | |
2572 # okay in the real world where ";" in dirpaths is itself problematic. | |
2573 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` | |
2574 else | |
2575 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2576 fi | |
2577 # Ok, now we have the path, separated by spaces, we can step through it | |
2578 # and add multilib dir if necessary. | |
2579 lt_tmp_lt_search_path_spec= | |
2580 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | |
2581 for lt_sys_path in $lt_search_path_spec; do | |
2582 if test -d "$lt_sys_path/$lt_multi_os_dir"; then | |
2583 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | |
2584 else | |
2585 test -d "$lt_sys_path" && \ | |
2586 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | |
2587 fi | |
2588 done | |
2589 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' | |
2590 BEGIN {RS=" "; FS="/|\n";} { | |
2591 lt_foo=""; | |
2592 lt_count=0; | |
2593 for (lt_i = NF; lt_i > 0; lt_i--) { | |
2594 if ($lt_i != "" && $lt_i != ".") { | |
2595 if ($lt_i == "..") { | |
2596 lt_count++; | |
2597 } else { | |
2598 if (lt_count == 0) { | |
2599 lt_foo="/" $lt_i lt_foo; | |
2600 } else { | |
2601 lt_count--; | |
2602 } | |
2603 } | |
2604 } | |
2605 } | |
2606 if (lt_foo != "") { lt_freq[[lt_foo]]++; } | |
2607 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } | |
2608 }'` | |
2609 sys_lib_search_path_spec=`echo $lt_search_path_spec` | |
2610 else | |
2611 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
2612 fi]) | |
2613 need_lib_prefix=unknown | |
2614 hardcode_into_libs=no | |
2615 | |
2616 # when you set need_version to no, make sure it does not cause -set_version | |
2617 # flags to be left without arguments | |
2618 need_version=unknown | |
2619 | |
2620 case $host_os in | |
2621 aix3*) | |
2622 version_type=linux | |
2623 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
2624 shlibpath_var=LIBPATH | |
2625 | |
2626 # AIX 3 has no versioning support, so we append a major version to the name. | |
2627 soname_spec='${libname}${release}${shared_ext}$major' | |
2628 ;; | |
2629 | |
2630 aix[[4-9]]*) | |
2631 version_type=linux | |
2632 need_lib_prefix=no | |
2633 need_version=no | |
2634 hardcode_into_libs=yes | |
2635 if test "$host_cpu" = ia64; then | |
2636 # AIX 5 supports IA64 | |
2637 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
2638 shlibpath_var=LD_LIBRARY_PATH | |
2639 else | |
2640 # With GCC up to 2.95.x, collect2 would create an import file | |
2641 # for dependence libraries. The import file would start with | |
2642 # the line `#! .'. This would cause the generated library to | |
2643 # depend on `.', always an invalid library. This was fixed in | |
2644 # development snapshots of GCC prior to 3.0. | |
2645 case $host_os in | |
2646 aix4 | aix4.[[01]] | aix4.[[01]].*) | |
2647 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
2648 echo ' yes ' | |
2649 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
2650 : | |
2651 else | |
2652 can_build_shared=no | |
2653 fi | |
2654 ;; | |
2655 esac | |
2656 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
2657 # soname into executable. Probably we can add versioning support to | |
2658 # collect2, so additional links can be useful in future. | |
2659 if test "$aix_use_runtimelinking" = yes; then | |
2660 # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
2661 # instead of lib<name>.a to let people know that these are not | |
2662 # typical AIX shared libraries. | |
2663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2664 else | |
2665 # We preserve .a as extension for shared libraries through AIX4.2 | |
2666 # and later when we are not doing run time linking. | |
2667 library_names_spec='${libname}${release}.a $libname.a' | |
2668 soname_spec='${libname}${release}${shared_ext}$major' | |
2669 fi | |
2670 shlibpath_var=LIBPATH | |
2671 fi | |
2672 ;; | |
2673 | |
2674 amigaos*) | |
2675 library_names_spec='$libname.ixlibrary $libname.a' | |
2676 # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
2677 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' | |
2678 ;; | |
2679 | |
2680 beos*) | |
2681 library_names_spec='${libname}${shared_ext}' | |
2682 dynamic_linker="$host_os ld.so" | |
2683 shlibpath_var=LIBRARY_PATH | |
2684 ;; | |
2685 | |
2686 bsdi[[45]]*) | |
2687 version_type=linux | |
2688 need_version=no | |
2689 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2690 soname_spec='${libname}${release}${shared_ext}$major' | |
2691 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
2692 shlibpath_var=LD_LIBRARY_PATH | |
2693 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
2694 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
2695 # the default ld.so.conf also contains /usr/contrib/lib and | |
2696 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
2697 # libtool to hard-code these into programs | |
2698 ;; | |
2699 | |
2700 cygwin* | mingw* | pw32*) | |
2701 version_type=windows | |
2702 shrext_cmds=".dll" | |
2703 need_version=no | |
2704 need_lib_prefix=no | |
2705 | |
2706 case $GCC,$host_os in | |
2707 yes,cygwin* | yes,mingw* | yes,pw32*) | |
2708 library_names_spec='$libname.dll.a' | |
2709 # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
2710 postinstall_cmds='base_file=`basename \${file}`~ | |
2711 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | |
2712 dldir=$destdir/`dirname \$dlpath`~ | |
2713 test -d \$dldir || mkdir -p \$dldir~ | |
2714 $install_prog $dir/$dlname \$dldir/$dlname~ | |
2715 chmod a+x \$dldir/$dlname' | |
2716 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2717 dlpath=$dir/\$dldll~ | |
2718 $rm \$dlpath' | |
2719 shlibpath_overrides_runpath=yes | |
2720 | |
2721 case $host_os in | |
2722 cygwin*) | |
2723 # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
2724 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2725 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | |
2726 ;; | |
2727 mingw*) | |
2728 # MinGW DLLs use traditional 'lib' prefix | |
2729 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2730 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | |
2731 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then | |
2732 # It is most probably a Windows format PATH printed by | |
2733 # mingw gcc, but we are running on Cygwin. Gcc prints its search | |
2734 # path with ; separators, and with drive letters. We can handle the | |
2735 # drive letters (cygwin fileutils understands them), so leave them, | |
2736 # especially as we might pass files found there to a mingw objdump, | |
2737 # which wouldn't understand a cygwinified path. Ahh. | |
2738 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | |
2739 else | |
2740 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2741 fi | |
2742 ;; | |
2743 pw32*) | |
2744 # pw32 DLLs use 'pw' prefix rather than 'lib' | |
2745 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2746 ;; | |
2747 esac | |
2748 ;; | |
2749 | |
2750 *) | |
2751 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
2752 ;; | |
2753 esac | |
2754 dynamic_linker='Win32 ld.exe' | |
2755 # FIXME: first we should search . and the directory the executable is in | |
2756 shlibpath_var=PATH | |
2757 ;; | |
2758 | |
2759 darwin* | rhapsody*) | |
2760 dynamic_linker="$host_os dyld" | |
2761 version_type=darwin | |
2762 need_lib_prefix=no | |
2763 need_version=no | |
2764 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
2765 soname_spec='${libname}${release}${major}$shared_ext' | |
2766 shlibpath_overrides_runpath=yes | |
2767 shlibpath_var=DYLD_LIBRARY_PATH | |
2768 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
2769 m4_if([$1], [],[ | |
2770 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) | |
2771 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
2772 ;; | |
2773 | |
2774 dgux*) | |
2775 version_type=linux | |
2776 need_lib_prefix=no | |
2777 need_version=no | |
2778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
2779 soname_spec='${libname}${release}${shared_ext}$major' | |
2780 shlibpath_var=LD_LIBRARY_PATH | |
2781 ;; | |
2782 | |
2783 freebsd1*) | |
2784 dynamic_linker=no | |
2785 ;; | |
2786 | |
2787 freebsd* | dragonfly*) | |
2788 # DragonFly does not have aout. When/if they implement a new | |
2789 # versioning mechanism, adjust this. | |
2790 if test -x /usr/bin/objformat; then | |
2791 objformat=`/usr/bin/objformat` | |
2792 else | |
2793 case $host_os in | |
2794 freebsd[[123]]*) objformat=aout ;; | |
2795 *) objformat=elf ;; | |
2796 esac | |
2797 fi | |
2798 # Handle Gentoo/FreeBSD as it was Linux | |
2799 case $host_vendor in | |
2800 gentoo) | |
2801 version_type=linux ;; | |
2802 *) | |
2803 version_type=freebsd-$objformat ;; | |
2804 esac | |
2805 | |
2806 case $version_type in | |
2807 freebsd-elf*) | |
2808 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2809 need_version=no | |
2810 need_lib_prefix=no | |
2811 ;; | |
2812 freebsd-*) | |
2813 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
2814 need_version=yes | |
2815 ;; | |
2816 linux) | |
2817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2818 soname_spec='${libname}${release}${shared_ext}$major' | |
2819 need_lib_prefix=no | |
2820 need_version=no | |
2821 ;; | |
2822 esac | |
2823 shlibpath_var=LD_LIBRARY_PATH | |
2824 case $host_os in | |
2825 freebsd2*) | |
2826 shlibpath_overrides_runpath=yes | |
2827 ;; | |
2828 freebsd3.[[01]]* | freebsdelf3.[[01]]*) | |
2829 shlibpath_overrides_runpath=yes | |
2830 hardcode_into_libs=yes | |
2831 ;; | |
2832 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ | |
2833 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) | |
2834 shlibpath_overrides_runpath=no | |
2835 hardcode_into_libs=yes | |
2836 ;; | |
2837 *) # from 4.6 on, and DragonFly | |
2838 shlibpath_overrides_runpath=yes | |
2839 hardcode_into_libs=yes | |
2840 ;; | |
2841 esac | |
2842 ;; | |
2843 | |
2844 gnu*) | |
2845 version_type=linux | |
2846 need_lib_prefix=no | |
2847 need_version=no | |
2848 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
2849 soname_spec='${libname}${release}${shared_ext}$major' | |
2850 shlibpath_var=LD_LIBRARY_PATH | |
2851 hardcode_into_libs=yes | |
2852 ;; | |
2853 | |
2854 hpux9* | hpux10* | hpux11*) | |
2855 # Give a soname corresponding to the major version so that dld.sl refuses to | |
2856 # link against other versions. | |
2857 version_type=sunos | |
2858 need_lib_prefix=no | |
2859 need_version=no | |
2860 case $host_cpu in | |
2861 ia64*) | |
2862 shrext_cmds='.so' | |
2863 hardcode_into_libs=yes | |
2864 dynamic_linker="$host_os dld.so" | |
2865 shlibpath_var=LD_LIBRARY_PATH | |
2866 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2867 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2868 soname_spec='${libname}${release}${shared_ext}$major' | |
2869 if test "X$HPUX_IA64_MODE" = X32; then | |
2870 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
2871 else | |
2872 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
2873 fi | |
2874 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2875 ;; | |
2876 hppa*64*) | |
2877 shrext_cmds='.sl' | |
2878 hardcode_into_libs=yes | |
2879 dynamic_linker="$host_os dld.sl" | |
2880 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
2881 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2882 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2883 soname_spec='${libname}${release}${shared_ext}$major' | |
2884 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
2885 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2886 ;; | |
2887 *) | |
2888 shrext_cmds='.sl' | |
2889 dynamic_linker="$host_os dld.sl" | |
2890 shlibpath_var=SHLIB_PATH | |
2891 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2893 soname_spec='${libname}${release}${shared_ext}$major' | |
2894 ;; | |
2895 esac | |
2896 # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
2897 postinstall_cmds='chmod 555 $lib' | |
2898 ;; | |
2899 | |
2900 interix[[3-9]]*) | |
2901 version_type=linux | |
2902 need_lib_prefix=no | |
2903 need_version=no | |
2904 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2905 soname_spec='${libname}${release}${shared_ext}$major' | |
2906 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
2907 shlibpath_var=LD_LIBRARY_PATH | |
2908 shlibpath_overrides_runpath=no | |
2909 hardcode_into_libs=yes | |
2910 ;; | |
2911 | |
2912 irix5* | irix6* | nonstopux*) | |
2913 case $host_os in | |
2914 nonstopux*) version_type=nonstopux ;; | |
2915 *) | |
2916 if test "$lt_cv_prog_gnu_ld" = yes; then | |
2917 version_type=linux | |
2918 else | |
2919 version_type=irix | |
2920 fi ;; | |
2921 esac | |
2922 need_lib_prefix=no | |
2923 need_version=no | |
2924 soname_spec='${libname}${release}${shared_ext}$major' | |
2925 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2926 case $host_os in | |
2927 irix5* | nonstopux*) | |
2928 libsuff= shlibsuff= | |
2929 ;; | |
2930 *) | |
2931 case $LD in # libtool.m4 will add one of these switches to LD | |
2932 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
2933 libsuff= shlibsuff= libmagic=32-bit;; | |
2934 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
2935 libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2936 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
2937 libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2938 *) libsuff= shlibsuff= libmagic=never-match;; | |
2939 esac | |
2940 ;; | |
2941 esac | |
2942 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
2943 shlibpath_overrides_runpath=no | |
2944 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2945 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2946 hardcode_into_libs=yes | |
2947 ;; | |
2948 | |
2949 # No shared lib support for Linux oldld, aout, or coff. | |
2950 linux*oldld* | linux*aout* | linux*coff*) | |
2951 dynamic_linker=no | |
2952 ;; | |
2953 | |
2954 # This must be Linux ELF. | |
2955 linux* | k*bsd*-gnu) | |
2956 version_type=linux | |
2957 need_lib_prefix=no | |
2958 need_version=no | |
2959 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2960 soname_spec='${libname}${release}${shared_ext}$major' | |
2961 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2962 shlibpath_var=LD_LIBRARY_PATH | |
2963 shlibpath_overrides_runpath=no | |
2964 # This implies no fast_install, which is unacceptable. | |
2965 # Some rework will be needed to allow for fast_install | |
2966 # before this can be enabled. | |
2967 hardcode_into_libs=yes | |
2968 | |
2969 # Append ld.so.conf contents to the search path | |
2970 if test -f /etc/ld.so.conf; then | |
2971 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` | |
2972 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | |
2973 fi | |
2974 | |
2975 # We used to test for /lib/ld.so.1 and disable shared libraries on | |
2976 # powerpc, because MkLinux only supported shared libraries with the | |
2977 # GNU dynamic linker. Since this was broken with cross compilers, | |
2978 # most powerpc-linux boxes support dynamic linking these days and | |
2979 # people can always --disable-shared, the test was removed, and we | |
2980 # assume the GNU/Linux dynamic linker is in use. | |
2981 dynamic_linker='GNU/Linux ld.so' | |
2982 ;; | |
2983 | |
2984 netbsd*) | |
2985 version_type=sunos | |
2986 need_lib_prefix=no | |
2987 need_version=no | |
2988 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2989 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2990 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2991 dynamic_linker='NetBSD (a.out) ld.so' | |
2992 else | |
2993 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2994 soname_spec='${libname}${release}${shared_ext}$major' | |
2995 dynamic_linker='NetBSD ld.elf_so' | |
2996 fi | |
2997 shlibpath_var=LD_LIBRARY_PATH | |
2998 shlibpath_overrides_runpath=yes | |
2999 hardcode_into_libs=yes | |
3000 ;; | |
3001 | |
3002 newsos6) | |
3003 version_type=linux | |
3004 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3005 shlibpath_var=LD_LIBRARY_PATH | |
3006 shlibpath_overrides_runpath=yes | |
3007 ;; | |
3008 | |
3009 nto-qnx*) | |
3010 version_type=linux | |
3011 need_lib_prefix=no | |
3012 need_version=no | |
3013 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3014 soname_spec='${libname}${release}${shared_ext}$major' | |
3015 shlibpath_var=LD_LIBRARY_PATH | |
3016 shlibpath_overrides_runpath=yes | |
3017 ;; | |
3018 | |
3019 openbsd*) | |
3020 version_type=sunos | |
3021 sys_lib_dlsearch_path_spec="/usr/lib" | |
3022 need_lib_prefix=no | |
3023 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
3024 case $host_os in | |
3025 openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
3026 *) need_version=no ;; | |
3027 esac | |
3028 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
3029 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
3030 shlibpath_var=LD_LIBRARY_PATH | |
3031 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
3032 case $host_os in | |
3033 openbsd2.[[89]] | openbsd2.[[89]].*) | |
3034 shlibpath_overrides_runpath=no | |
3035 ;; | |
3036 *) | |
3037 shlibpath_overrides_runpath=yes | |
3038 ;; | |
3039 esac | |
3040 else | |
3041 shlibpath_overrides_runpath=yes | |
3042 fi | |
3043 ;; | |
3044 | |
3045 os2*) | |
3046 libname_spec='$name' | |
3047 shrext_cmds=".dll" | |
3048 need_lib_prefix=no | |
3049 library_names_spec='$libname${shared_ext} $libname.a' | |
3050 dynamic_linker='OS/2 ld.exe' | |
3051 shlibpath_var=LIBPATH | |
3052 ;; | |
3053 | |
3054 osf3* | osf4* | osf5*) | |
3055 version_type=osf | |
3056 need_lib_prefix=no | |
3057 need_version=no | |
3058 soname_spec='${libname}${release}${shared_ext}$major' | |
3059 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3060 shlibpath_var=LD_LIBRARY_PATH | |
3061 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
3062 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
3063 ;; | |
3064 | |
3065 rdos*) | |
3066 dynamic_linker=no | |
3067 ;; | |
3068 | |
3069 solaris*) | |
3070 version_type=linux | |
3071 need_lib_prefix=no | |
3072 need_version=no | |
3073 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3074 soname_spec='${libname}${release}${shared_ext}$major' | |
3075 shlibpath_var=LD_LIBRARY_PATH | |
3076 shlibpath_overrides_runpath=yes | |
3077 hardcode_into_libs=yes | |
3078 # ldd complains unless libraries are executable | |
3079 postinstall_cmds='chmod +x $lib' | |
3080 ;; | |
3081 | |
3082 sunos4*) | |
3083 version_type=sunos | |
3084 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
3085 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
3086 shlibpath_var=LD_LIBRARY_PATH | |
3087 shlibpath_overrides_runpath=yes | |
3088 if test "$with_gnu_ld" = yes; then | |
3089 need_lib_prefix=no | |
3090 fi | |
3091 need_version=yes | |
3092 ;; | |
3093 | |
3094 sysv4 | sysv4.3*) | |
3095 version_type=linux | |
3096 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3097 soname_spec='${libname}${release}${shared_ext}$major' | |
3098 shlibpath_var=LD_LIBRARY_PATH | |
3099 case $host_vendor in | |
3100 sni) | |
3101 shlibpath_overrides_runpath=no | |
3102 need_lib_prefix=no | |
3103 export_dynamic_flag_spec='${wl}-Blargedynsym' | |
3104 runpath_var=LD_RUN_PATH | |
3105 ;; | |
3106 siemens) | |
3107 need_lib_prefix=no | |
3108 ;; | |
3109 motorola) | |
3110 need_lib_prefix=no | |
3111 need_version=no | |
3112 shlibpath_overrides_runpath=no | |
3113 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
3114 ;; | |
3115 esac | |
3116 ;; | |
3117 | |
3118 sysv4*MP*) | |
3119 if test -d /usr/nec ;then | |
3120 version_type=linux | |
3121 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
3122 soname_spec='$libname${shared_ext}.$major' | |
3123 shlibpath_var=LD_LIBRARY_PATH | |
3124 fi | |
3125 ;; | |
3126 | |
3127 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
3128 version_type=freebsd-elf | |
3129 need_lib_prefix=no | |
3130 need_version=no | |
3131 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
3132 soname_spec='${libname}${release}${shared_ext}$major' | |
3133 shlibpath_var=LD_LIBRARY_PATH | |
3134 hardcode_into_libs=yes | |
3135 if test "$with_gnu_ld" = yes; then | |
3136 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
3137 shlibpath_overrides_runpath=no | |
3138 else | |
3139 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | |
3140 shlibpath_overrides_runpath=yes | |
3141 case $host_os in | |
3142 sco3.2v5*) | |
3143 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
3144 ;; | |
3145 esac | |
3146 fi | |
3147 sys_lib_dlsearch_path_spec='/usr/lib' | |
3148 ;; | |
3149 | |
3150 uts4*) | |
3151 version_type=linux | |
3152 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
3153 soname_spec='${libname}${release}${shared_ext}$major' | |
3154 shlibpath_var=LD_LIBRARY_PATH | |
3155 ;; | |
3156 | |
3157 *) | |
3158 dynamic_linker=no | |
3159 ;; | |
3160 esac | |
3161 AC_MSG_RESULT([$dynamic_linker]) | |
3162 test "$dynamic_linker" = no && can_build_shared=no | |
3163 | |
3164 AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], | |
3165 [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) | |
3166 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
3167 AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], | |
3168 [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) | |
3169 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
3170 | |
3171 variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
3172 if test "$GCC" = yes; then | |
3173 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
3174 fi | |
3175 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER | |
3176 | |
3177 | |
3178 # _LT_AC_TAGCONFIG | |
3179 # ---------------- | |
3180 AC_DEFUN([_LT_AC_TAGCONFIG], | |
3181 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
3182 AC_ARG_WITH([tags], | |
3183 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], | |
3184 [include additional configurations @<:@automatic@:>@])], | |
3185 [tagnames="$withval"]) | |
3186 | |
3187 if test -f "$ltmain" && test -n "$tagnames"; then | |
3188 if test ! -f "${ofile}"; then | |
3189 AC_MSG_WARN([output file `$ofile' does not exist]) | |
3190 fi | |
3191 | |
3192 if test -z "$LTCC"; then | |
3193 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" | |
3194 if test -z "$LTCC"; then | |
3195 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) | |
3196 else | |
3197 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) | |
3198 fi | |
3199 fi | |
3200 if test -z "$LTCFLAGS"; then | |
3201 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" | |
3202 fi | |
3203 | |
3204 # Extract list of available tagged configurations in $ofile. | |
3205 # Note that this assumes the entire list is on one line. | |
3206 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` | |
3207 | |
3208 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
3209 for tagname in $tagnames; do | |
3210 IFS="$lt_save_ifs" | |
3211 # Check whether tagname contains only valid characters | |
3212 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in | |
3213 "") ;; | |
3214 *) AC_MSG_ERROR([invalid tag name: $tagname]) | |
3215 ;; | |
3216 esac | |
3217 | |
3218 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null | |
3219 then | |
3220 AC_MSG_ERROR([tag name \"$tagname\" already exists]) | |
3221 fi | |
3222 | |
3223 # Update the list of available tags. | |
3224 if test -n "$tagname"; then | |
3225 echo appending configuration tag \"$tagname\" to $ofile | |
3226 | |
3227 case $tagname in | |
3228 CXX) | |
3229 if test -n "$CXX" && ( test "X$CXX" != "Xno" && | |
3230 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
3231 (test "X$CXX" != "Xg++"))) ; then | |
3232 AC_LIBTOOL_LANG_CXX_CONFIG | |
3233 else | |
3234 tagname="" | |
3235 fi | |
3236 ;; | |
3237 | |
3238 F77) | |
3239 if test -n "$F77" && test "X$F77" != "Xno"; then | |
3240 AC_LIBTOOL_LANG_F77_CONFIG | |
3241 else | |
3242 tagname="" | |
3243 fi | |
3244 ;; | |
3245 | |
3246 GCJ) | |
3247 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then | |
3248 AC_LIBTOOL_LANG_GCJ_CONFIG | |
3249 else | |
3250 tagname="" | |
3251 fi | |
3252 ;; | |
3253 | |
3254 RC) | |
3255 AC_LIBTOOL_LANG_RC_CONFIG | |
3256 ;; | |
3257 | |
3258 *) | |
3259 AC_MSG_ERROR([Unsupported tag name: $tagname]) | |
3260 ;; | |
3261 esac | |
3262 | |
3263 # Append the new tag name to the list of available tags. | |
3264 if test -n "$tagname" ; then | |
3265 available_tags="$available_tags $tagname" | |
3266 fi | |
3267 fi | |
3268 done | |
3269 IFS="$lt_save_ifs" | |
3270 | |
3271 # Now substitute the updated list of available tags. | |
3272 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then | |
3273 mv "${ofile}T" "$ofile" | |
3274 chmod +x "$ofile" | |
3275 else | |
3276 rm -f "${ofile}T" | |
3277 AC_MSG_ERROR([unable to update list of available tagged configurations.]) | |
3278 fi | |
3279 fi | |
3280 ])# _LT_AC_TAGCONFIG | |
3281 | |
3282 | |
3283 # AC_LIBTOOL_DLOPEN | |
3284 # ----------------- | |
3285 # enable checks for dlopen support | |
3286 AC_DEFUN([AC_LIBTOOL_DLOPEN], | |
3287 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) | |
3288 ])# AC_LIBTOOL_DLOPEN | |
3289 | |
3290 | |
3291 # AC_LIBTOOL_WIN32_DLL | |
3292 # -------------------- | |
3293 # declare package support for building win32 DLLs | |
3294 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], | |
3295 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) | |
3296 ])# AC_LIBTOOL_WIN32_DLL | |
3297 | |
3298 | |
3299 # AC_ENABLE_SHARED([DEFAULT]) | |
3300 # --------------------------- | |
3301 # implement the --enable-shared flag | |
3302 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
3303 AC_DEFUN([AC_ENABLE_SHARED], | |
3304 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
3305 AC_ARG_ENABLE([shared], | |
3306 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | |
3307 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], | |
3308 [p=${PACKAGE-default} | |
3309 case $enableval in | |
3310 yes) enable_shared=yes ;; | |
3311 no) enable_shared=no ;; | |
3312 *) | |
3313 enable_shared=no | |
3314 # Look at the argument we got. We use all the common list separators. | |
3315 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
3316 for pkg in $enableval; do | |
3317 IFS="$lt_save_ifs" | |
3318 if test "X$pkg" = "X$p"; then | |
3319 enable_shared=yes | |
3320 fi | |
3321 done | |
3322 IFS="$lt_save_ifs" | |
3323 ;; | |
3324 esac], | |
3325 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) | |
3326 ])# AC_ENABLE_SHARED | |
3327 | |
3328 | |
3329 # AC_DISABLE_SHARED | |
3330 # ----------------- | |
3331 # set the default shared flag to --disable-shared | |
3332 AC_DEFUN([AC_DISABLE_SHARED], | |
3333 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3334 AC_ENABLE_SHARED(no) | |
3335 ])# AC_DISABLE_SHARED | |
3336 | |
3337 | |
3338 # AC_ENABLE_STATIC([DEFAULT]) | |
3339 # --------------------------- | |
3340 # implement the --enable-static flag | |
3341 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
3342 AC_DEFUN([AC_ENABLE_STATIC], | |
3343 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
3344 AC_ARG_ENABLE([static], | |
3345 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], | |
3346 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], | |
3347 [p=${PACKAGE-default} | |
3348 case $enableval in | |
3349 yes) enable_static=yes ;; | |
3350 no) enable_static=no ;; | |
3351 *) | |
3352 enable_static=no | |
3353 # Look at the argument we got. We use all the common list separators. | |
3354 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
3355 for pkg in $enableval; do | |
3356 IFS="$lt_save_ifs" | |
3357 if test "X$pkg" = "X$p"; then | |
3358 enable_static=yes | |
3359 fi | |
3360 done | |
3361 IFS="$lt_save_ifs" | |
3362 ;; | |
3363 esac], | |
3364 [enable_static=]AC_ENABLE_STATIC_DEFAULT) | |
3365 ])# AC_ENABLE_STATIC | |
3366 | |
3367 | |
3368 # AC_DISABLE_STATIC | |
3369 # ----------------- | |
3370 # set the default static flag to --disable-static | |
3371 AC_DEFUN([AC_DISABLE_STATIC], | |
3372 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3373 AC_ENABLE_STATIC(no) | |
3374 ])# AC_DISABLE_STATIC | |
3375 | |
3376 | |
3377 # AC_ENABLE_FAST_INSTALL([DEFAULT]) | |
3378 # --------------------------------- | |
3379 # implement the --enable-fast-install flag | |
3380 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
3381 AC_DEFUN([AC_ENABLE_FAST_INSTALL], | |
3382 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
3383 AC_ARG_ENABLE([fast-install], | |
3384 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | |
3385 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | |
3386 [p=${PACKAGE-default} | |
3387 case $enableval in | |
3388 yes) enable_fast_install=yes ;; | |
3389 no) enable_fast_install=no ;; | |
3390 *) | |
3391 enable_fast_install=no | |
3392 # Look at the argument we got. We use all the common list separators. | |
3393 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
3394 for pkg in $enableval; do | |
3395 IFS="$lt_save_ifs" | |
3396 if test "X$pkg" = "X$p"; then | |
3397 enable_fast_install=yes | |
3398 fi | |
3399 done | |
3400 IFS="$lt_save_ifs" | |
3401 ;; | |
3402 esac], | |
3403 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) | |
3404 ])# AC_ENABLE_FAST_INSTALL | |
3405 | |
3406 | |
3407 # AC_DISABLE_FAST_INSTALL | |
3408 # ----------------------- | |
3409 # set the default to --disable-fast-install | |
3410 AC_DEFUN([AC_DISABLE_FAST_INSTALL], | |
3411 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3412 AC_ENABLE_FAST_INSTALL(no) | |
3413 ])# AC_DISABLE_FAST_INSTALL | |
3414 | |
3415 | |
3416 # AC_LIBTOOL_PICMODE([MODE]) | |
3417 # -------------------------- | |
3418 # implement the --with-pic flag | |
3419 # MODE is either `yes' or `no'. If omitted, it defaults to `both'. | |
3420 AC_DEFUN([AC_LIBTOOL_PICMODE], | |
3421 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3422 pic_mode=ifelse($#,1,$1,default) | |
3423 ])# AC_LIBTOOL_PICMODE | |
3424 | |
3425 | |
3426 # AC_PROG_EGREP | |
3427 # ------------- | |
3428 # This is predefined starting with Autoconf 2.54, so this conditional | |
3429 # definition can be removed once we require Autoconf 2.54 or later. | |
3430 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], | |
3431 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], | |
3432 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3433 then ac_cv_prog_egrep='grep -E' | |
3434 else ac_cv_prog_egrep='egrep' | |
3435 fi]) | |
3436 EGREP=$ac_cv_prog_egrep | |
3437 AC_SUBST([EGREP]) | |
3438 ])]) | |
3439 | |
3440 | |
3441 # AC_PATH_TOOL_PREFIX | |
3442 # ------------------- | |
3443 # find a file program which can recognize shared library | |
3444 AC_DEFUN([AC_PATH_TOOL_PREFIX], | |
3445 [AC_REQUIRE([AC_PROG_EGREP])dnl | |
3446 AC_MSG_CHECKING([for $1]) | |
3447 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
3448 [case $MAGIC_CMD in | |
3449 [[\\/*] | ?:[\\/]*]) | |
3450 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
3451 ;; | |
3452 *) | |
3453 lt_save_MAGIC_CMD="$MAGIC_CMD" | |
3454 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3455 dnl $ac_dummy forces splitting on constant user-supplied paths. | |
3456 dnl POSIX.2 word splitting is done only on the output of word expansions, | |
3457 dnl not every word. This closes a longstanding sh security hole. | |
3458 ac_dummy="ifelse([$2], , $PATH, [$2])" | |
3459 for ac_dir in $ac_dummy; do | |
3460 IFS="$lt_save_ifs" | |
3461 test -z "$ac_dir" && ac_dir=. | |
3462 if test -f $ac_dir/$1; then | |
3463 lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
3464 if test -n "$file_magic_test_file"; then | |
3465 case $deplibs_check_method in | |
3466 "file_magic "*) | |
3467 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
3468 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3469 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
3470 $EGREP "$file_magic_regex" > /dev/null; then | |
3471 : | |
3472 else | |
3473 cat <<EOF 1>&2 | |
3474 | |
3475 *** Warning: the command libtool uses to detect shared libraries, | |
3476 *** $file_magic_cmd, produces output that libtool cannot recognize. | |
3477 *** The result is that libtool may fail to recognize shared libraries | |
3478 *** as such. This will affect the creation of libtool libraries that | |
3479 *** depend on shared libraries, but programs linked with such libtool | |
3480 *** libraries will work regardless of this problem. Nevertheless, you | |
3481 *** may want to report the problem to your system manager and/or to | |
3482 *** bug-libtool@gnu.org | |
3483 | |
3484 EOF | |
3485 fi ;; | |
3486 esac | |
3487 fi | |
3488 break | |
3489 fi | |
3490 done | |
3491 IFS="$lt_save_ifs" | |
3492 MAGIC_CMD="$lt_save_MAGIC_CMD" | |
3493 ;; | |
3494 esac]) | |
3495 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3496 if test -n "$MAGIC_CMD"; then | |
3497 AC_MSG_RESULT($MAGIC_CMD) | |
3498 else | |
3499 AC_MSG_RESULT(no) | |
3500 fi | |
3501 ])# AC_PATH_TOOL_PREFIX | |
3502 | |
3503 | |
3504 # AC_PATH_MAGIC | |
3505 # ------------- | |
3506 # find a file program which can recognize a shared library | |
3507 AC_DEFUN([AC_PATH_MAGIC], | |
3508 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | |
3509 if test -z "$lt_cv_path_MAGIC_CMD"; then | |
3510 if test -n "$ac_tool_prefix"; then | |
3511 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | |
3512 else | |
3513 MAGIC_CMD=: | |
3514 fi | |
3515 fi | |
3516 ])# AC_PATH_MAGIC | |
3517 | |
3518 | |
3519 # AC_PROG_LD | |
3520 # ---------- | |
3521 # find the pathname to the GNU or non-GNU linker | |
3522 AC_DEFUN([AC_PROG_LD], | |
3523 [AC_ARG_WITH([gnu-ld], | |
3524 [AC_HELP_STRING([--with-gnu-ld], | |
3525 [assume the C compiler uses GNU ld @<:@default=no@:>@])], | |
3526 [test "$withval" = no || with_gnu_ld=yes], | |
3527 [with_gnu_ld=no]) | |
3528 AC_REQUIRE([LT_AC_PROG_SED])dnl | |
3529 AC_REQUIRE([AC_PROG_CC])dnl | |
3530 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3531 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
3532 ac_prog=ld | |
3533 if test "$GCC" = yes; then | |
3534 # Check if gcc -print-prog-name=ld gives a path. | |
3535 AC_MSG_CHECKING([for ld used by $CC]) | |
3536 case $host in | |
3537 *-*-mingw*) | |
3538 # gcc leaves a trailing carriage return which upsets mingw | |
3539 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
3540 *) | |
3541 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
3542 esac | |
3543 case $ac_prog in | |
3544 # Accept absolute paths. | |
3545 [[\\/]]* | ?:[[\\/]]*) | |
3546 re_direlt='/[[^/]][[^/]]*/\.\./' | |
3547 # Canonicalize the pathname of ld | |
3548 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` | |
3549 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
3550 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` | |
3551 done | |
3552 test -z "$LD" && LD="$ac_prog" | |
3553 ;; | |
3554 "") | |
3555 # If it fails, then pretend we aren't using GCC. | |
3556 ac_prog=ld | |
3557 ;; | |
3558 *) | |
3559 # If it is relative, then search for the first ld in PATH. | |
3560 with_gnu_ld=unknown | |
3561 ;; | |
3562 esac | |
3563 elif test "$with_gnu_ld" = yes; then | |
3564 AC_MSG_CHECKING([for GNU ld]) | |
3565 else | |
3566 AC_MSG_CHECKING([for non-GNU ld]) | |
3567 fi | |
3568 AC_CACHE_VAL(lt_cv_path_LD, | |
3569 [if test -z "$LD"; then | |
3570 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3571 for ac_dir in $PATH; do | |
3572 IFS="$lt_save_ifs" | |
3573 test -z "$ac_dir" && ac_dir=. | |
3574 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
3575 lt_cv_path_LD="$ac_dir/$ac_prog" | |
3576 # Check to see if the program is GNU ld. I'd rather use --version, | |
3577 # but apparently some variants of GNU ld only accept -v. | |
3578 # Break only if it was the GNU/non-GNU ld that we prefer. | |
3579 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
3580 *GNU* | *'with BFD'*) | |
3581 test "$with_gnu_ld" != no && break | |
3582 ;; | |
3583 *) | |
3584 test "$with_gnu_ld" != yes && break | |
3585 ;; | |
3586 esac | |
3587 fi | |
3588 done | |
3589 IFS="$lt_save_ifs" | |
3590 else | |
3591 lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
3592 fi]) | |
3593 LD="$lt_cv_path_LD" | |
3594 if test -n "$LD"; then | |
3595 AC_MSG_RESULT($LD) | |
3596 else | |
3597 AC_MSG_RESULT(no) | |
3598 fi | |
3599 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
3600 AC_PROG_LD_GNU | |
3601 ])# AC_PROG_LD | |
3602 | |
3603 | |
3604 # AC_PROG_LD_GNU | |
3605 # -------------- | |
3606 AC_DEFUN([AC_PROG_LD_GNU], | |
3607 [AC_REQUIRE([AC_PROG_EGREP])dnl | |
3608 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
3609 [# I'd rather use --version here, but apparently some GNU lds only accept -v. | |
3610 case `$LD -v 2>&1 </dev/null` in | |
3611 *GNU* | *'with BFD'*) | |
3612 lt_cv_prog_gnu_ld=yes | |
3613 ;; | |
3614 *) | |
3615 lt_cv_prog_gnu_ld=no | |
3616 ;; | |
3617 esac]) | |
3618 with_gnu_ld=$lt_cv_prog_gnu_ld | |
3619 ])# AC_PROG_LD_GNU | |
3620 | |
3621 | |
3622 # AC_PROG_LD_RELOAD_FLAG | |
3623 # ---------------------- | |
3624 # find reload flag for linker | |
3625 # -- PORTME Some linkers may need a different reload flag. | |
3626 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], | |
3627 [AC_CACHE_CHECK([for $LD option to reload object files], | |
3628 lt_cv_ld_reload_flag, | |
3629 [lt_cv_ld_reload_flag='-r']) | |
3630 reload_flag=$lt_cv_ld_reload_flag | |
3631 case $reload_flag in | |
3632 "" | " "*) ;; | |
3633 *) reload_flag=" $reload_flag" ;; | |
3634 esac | |
3635 reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
3636 case $host_os in | |
3637 darwin*) | |
3638 if test "$GCC" = yes; then | |
3639 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | |
3640 else | |
3641 reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
3642 fi | |
3643 ;; | |
3644 esac | |
3645 ])# AC_PROG_LD_RELOAD_FLAG | |
3646 | |
3647 | |
3648 # AC_DEPLIBS_CHECK_METHOD | |
3649 # ----------------------- | |
3650 # how to check for library dependencies | |
3651 # -- PORTME fill in with the dynamic library characteristics | |
3652 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], | |
3653 [AC_CACHE_CHECK([how to recognize dependent libraries], | |
3654 lt_cv_deplibs_check_method, | |
3655 [lt_cv_file_magic_cmd='$MAGIC_CMD' | |
3656 lt_cv_file_magic_test_file= | |
3657 lt_cv_deplibs_check_method='unknown' | |
3658 # Need to set the preceding variable on all platforms that support | |
3659 # interlibrary dependencies. | |
3660 # 'none' -- dependencies not supported. | |
3661 # `unknown' -- same as none, but documents that we really don't know. | |
3662 # 'pass_all' -- all dependencies passed with no checks. | |
3663 # 'test_compile' -- check by making test program. | |
3664 # 'file_magic [[regex]]' -- check by looking for files in library path | |
3665 # which responds to the $file_magic_cmd with a given extended regex. | |
3666 # If you have `file' or equivalent on your system and you're not sure | |
3667 # whether `pass_all' will *always* work, you probably want this one. | |
3668 | |
3669 case $host_os in | |
3670 aix[[4-9]]*) | |
3671 lt_cv_deplibs_check_method=pass_all | |
3672 ;; | |
3673 | |
3674 beos*) | |
3675 lt_cv_deplibs_check_method=pass_all | |
3676 ;; | |
3677 | |
3678 bsdi[[45]]*) | |
3679 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
3680 lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3681 lt_cv_file_magic_test_file=/shlib/libc.so | |
3682 ;; | |
3683 | |
3684 cygwin*) | |
3685 # func_win32_libid is a shell function defined in ltmain.sh | |
3686 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3687 lt_cv_file_magic_cmd='func_win32_libid' | |
3688 ;; | |
3689 | |
3690 mingw* | pw32*) | |
3691 # Base MSYS/MinGW do not provide the 'file' command needed by | |
3692 # func_win32_libid shell function, so use a weaker test based on 'objdump', | |
3693 # unless we find 'file', for example because we are cross-compiling. | |
3694 if ( file / ) >/dev/null 2>&1; then | |
3695 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3696 lt_cv_file_magic_cmd='func_win32_libid' | |
3697 else | |
3698 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
3699 lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3700 fi | |
3701 ;; | |
3702 | |
3703 darwin* | rhapsody*) | |
3704 lt_cv_deplibs_check_method=pass_all | |
3705 ;; | |
3706 | |
3707 freebsd* | dragonfly*) | |
3708 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
3709 case $host_cpu in | |
3710 i*86 ) | |
3711 # Not sure whether the presence of OpenBSD here was a mistake. | |
3712 # Let's accept both of them until this is cleared up. | |
3713 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' | |
3714 lt_cv_file_magic_cmd=/usr/bin/file | |
3715 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
3716 ;; | |
3717 esac | |
3718 else | |
3719 lt_cv_deplibs_check_method=pass_all | |
3720 fi | |
3721 ;; | |
3722 | |
3723 gnu*) | |
3724 lt_cv_deplibs_check_method=pass_all | |
3725 ;; | |
3726 | |
3727 hpux10.20* | hpux11*) | |
3728 lt_cv_file_magic_cmd=/usr/bin/file | |
3729 case $host_cpu in | |
3730 ia64*) | |
3731 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | |
3732 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
3733 ;; | |
3734 hppa*64*) | |
3735 [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]'] | |
3736 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | |
3737 ;; | |
3738 *) | |
3739 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | |
3740 lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
3741 ;; | |
3742 esac | |
3743 ;; | |
3744 | |
3745 interix[[3-9]]*) | |
3746 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | |
3747 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' | |
3748 ;; | |
3749 | |
3750 irix5* | irix6* | nonstopux*) | |
3751 case $LD in | |
3752 *-32|*"-32 ") libmagic=32-bit;; | |
3753 *-n32|*"-n32 ") libmagic=N32;; | |
3754 *-64|*"-64 ") libmagic=64-bit;; | |
3755 *) libmagic=never-match;; | |
3756 esac | |
3757 lt_cv_deplibs_check_method=pass_all | |
3758 ;; | |
3759 | |
3760 # This must be Linux ELF. | |
3761 linux* | k*bsd*-gnu) | |
3762 lt_cv_deplibs_check_method=pass_all | |
3763 ;; | |
3764 | |
3765 netbsd*) | |
3766 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
3767 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3768 else | |
3769 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | |
3770 fi | |
3771 ;; | |
3772 | |
3773 newos6*) | |
3774 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
3775 lt_cv_file_magic_cmd=/usr/bin/file | |
3776 lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
3777 ;; | |
3778 | |
3779 nto-qnx*) | |
3780 lt_cv_deplibs_check_method=unknown | |
3781 ;; | |
3782 | |
3783 openbsd*) | |
3784 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
3785 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' | |
3786 else | |
3787 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3788 fi | |
3789 ;; | |
3790 | |
3791 osf3* | osf4* | osf5*) | |
3792 lt_cv_deplibs_check_method=pass_all | |
3793 ;; | |
3794 | |
3795 rdos*) | |
3796 lt_cv_deplibs_check_method=pass_all | |
3797 ;; | |
3798 | |
3799 solaris*) | |
3800 lt_cv_deplibs_check_method=pass_all | |
3801 ;; | |
3802 | |
3803 sysv4 | sysv4.3*) | |
3804 case $host_vendor in | |
3805 motorola) | |
3806 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]]' | |
3807 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
3808 ;; | |
3809 ncr) | |
3810 lt_cv_deplibs_check_method=pass_all | |
3811 ;; | |
3812 sequent) | |
3813 lt_cv_file_magic_cmd='/bin/file' | |
3814 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
3815 ;; | |
3816 sni) | |
3817 lt_cv_file_magic_cmd='/bin/file' | |
3818 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
3819 lt_cv_file_magic_test_file=/lib/libc.so | |
3820 ;; | |
3821 siemens) | |
3822 lt_cv_deplibs_check_method=pass_all | |
3823 ;; | |
3824 pc) | |
3825 lt_cv_deplibs_check_method=pass_all | |
3826 ;; | |
3827 esac | |
3828 ;; | |
3829 | |
3830 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
3831 lt_cv_deplibs_check_method=pass_all | |
3832 ;; | |
3833 esac | |
3834 ]) | |
3835 file_magic_cmd=$lt_cv_file_magic_cmd | |
3836 deplibs_check_method=$lt_cv_deplibs_check_method | |
3837 test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
3838 ])# AC_DEPLIBS_CHECK_METHOD | |
3839 | |
3840 | |
3841 # AC_PROG_NM | |
3842 # ---------- | |
3843 # find the pathname to a BSD-compatible name lister | |
3844 AC_DEFUN([AC_PROG_NM], | |
3845 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, | |
3846 [if test -n "$NM"; then | |
3847 # Let the user override the test. | |
3848 lt_cv_path_NM="$NM" | |
3849 else | |
3850 lt_nm_to_check="${ac_tool_prefix}nm" | |
3851 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | |
3852 lt_nm_to_check="$lt_nm_to_check nm" | |
3853 fi | |
3854 for lt_tmp_nm in $lt_nm_to_check; do | |
3855 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3856 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | |
3857 IFS="$lt_save_ifs" | |
3858 test -z "$ac_dir" && ac_dir=. | |
3859 tmp_nm="$ac_dir/$lt_tmp_nm" | |
3860 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
3861 # Check to see if the nm accepts a BSD-compat flag. | |
3862 # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
3863 # nm: unknown option "B" ignored | |
3864 # Tru64's nm complains that /dev/null is an invalid object file | |
3865 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | |
3866 */dev/null* | *'Invalid file or object type'*) | |
3867 lt_cv_path_NM="$tmp_nm -B" | |
3868 break | |
3869 ;; | |
3870 *) | |
3871 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
3872 */dev/null*) | |
3873 lt_cv_path_NM="$tmp_nm -p" | |
3874 break | |
3875 ;; | |
3876 *) | |
3877 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
3878 continue # so that we can try to find one that supports BSD flags | |
3879 ;; | |
3880 esac | |
3881 ;; | |
3882 esac | |
3883 fi | |
3884 done | |
3885 IFS="$lt_save_ifs" | |
3886 done | |
3887 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm | |
3888 fi]) | |
3889 NM="$lt_cv_path_NM" | |
3890 ])# AC_PROG_NM | |
3891 | |
3892 | |
3893 # AC_CHECK_LIBM | |
3894 # ------------- | |
3895 # check for math library | |
3896 AC_DEFUN([AC_CHECK_LIBM], | |
3897 [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3898 LIBM= | |
3899 case $host in | |
3900 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) | |
3901 # These system don't have libm, or don't need it | |
3902 ;; | |
3903 *-ncr-sysv4.3*) | |
3904 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
3905 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | |
3906 ;; | |
3907 *) | |
3908 AC_CHECK_LIB(m, cos, LIBM="-lm") | |
3909 ;; | |
3910 esac | |
3911 ])# AC_CHECK_LIBM | |
3912 | |
3913 | |
3914 # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) | |
3915 # ----------------------------------- | |
3916 # sets LIBLTDL to the link flags for the libltdl convenience library and | |
3917 # LTDLINCL to the include flags for the libltdl header and adds | |
3918 # --enable-ltdl-convenience to the configure arguments. Note that | |
3919 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, | |
3920 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with | |
3921 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' | |
3922 # (note the single quotes!). If your package is not flat and you're not | |
3923 # using automake, define top_builddir and top_srcdir appropriately in | |
3924 # the Makefiles. | |
3925 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], | |
3926 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3927 case $enable_ltdl_convenience in | |
3928 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
3929 "") enable_ltdl_convenience=yes | |
3930 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
3931 esac | |
3932 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la | |
3933 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
3934 # For backwards non-gettext consistent compatibility... | |
3935 INCLTDL="$LTDLINCL" | |
3936 ])# AC_LIBLTDL_CONVENIENCE | |
3937 | |
3938 | |
3939 # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) | |
3940 # ----------------------------------- | |
3941 # sets LIBLTDL to the link flags for the libltdl installable library and | |
3942 # LTDLINCL to the include flags for the libltdl header and adds | |
3943 # --enable-ltdl-install to the configure arguments. Note that | |
3944 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, | |
3945 # and an installed libltdl is not found, it is assumed to be `libltdl'. | |
3946 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with | |
3947 # '${top_srcdir}/' (note the single quotes!). If your package is not | |
3948 # flat and you're not using automake, define top_builddir and top_srcdir | |
3949 # appropriately in the Makefiles. | |
3950 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
3951 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], | |
3952 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3953 AC_CHECK_LIB(ltdl, lt_dlinit, | |
3954 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
3955 [if test x"$enable_ltdl_install" = xno; then | |
3956 AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
3957 else | |
3958 enable_ltdl_install=yes | |
3959 fi | |
3960 ]) | |
3961 if test x"$enable_ltdl_install" = x"yes"; then | |
3962 ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
3963 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la | |
3964 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
3965 else | |
3966 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
3967 LIBLTDL="-lltdl" | |
3968 LTDLINCL= | |
3969 fi | |
3970 # For backwards non-gettext consistent compatibility... | |
3971 INCLTDL="$LTDLINCL" | |
3972 ])# AC_LIBLTDL_INSTALLABLE | |
3973 | |
3974 | |
3975 # AC_LIBTOOL_CXX | |
3976 # -------------- | |
3977 # enable support for C++ libraries | |
3978 AC_DEFUN([AC_LIBTOOL_CXX], | |
3979 [AC_REQUIRE([_LT_AC_LANG_CXX]) | |
3980 ])# AC_LIBTOOL_CXX | |
3981 | |
3982 | |
3983 # _LT_AC_LANG_CXX | |
3984 # --------------- | |
3985 AC_DEFUN([_LT_AC_LANG_CXX], | |
3986 [AC_REQUIRE([AC_PROG_CXX]) | |
3987 AC_REQUIRE([_LT_AC_PROG_CXXCPP]) | |
3988 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) | |
3989 ])# _LT_AC_LANG_CXX | |
3990 | |
3991 # _LT_AC_PROG_CXXCPP | |
3992 # ------------------ | |
3993 AC_DEFUN([_LT_AC_PROG_CXXCPP], | |
3994 [ | |
3995 AC_REQUIRE([AC_PROG_CXX]) | |
3996 if test -n "$CXX" && ( test "X$CXX" != "Xno" && | |
3997 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
3998 (test "X$CXX" != "Xg++"))) ; then | |
3999 AC_PROG_CXXCPP | |
4000 fi | |
4001 ])# _LT_AC_PROG_CXXCPP | |
4002 | |
4003 # AC_LIBTOOL_F77 | |
4004 # -------------- | |
4005 # enable support for Fortran 77 libraries | |
4006 AC_DEFUN([AC_LIBTOOL_F77], | |
4007 [AC_REQUIRE([_LT_AC_LANG_F77]) | |
4008 ])# AC_LIBTOOL_F77 | |
4009 | |
4010 | |
4011 # _LT_AC_LANG_F77 | |
4012 # --------------- | |
4013 AC_DEFUN([_LT_AC_LANG_F77], | |
4014 [AC_REQUIRE([AC_PROG_F77]) | |
4015 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) | |
4016 ])# _LT_AC_LANG_F77 | |
4017 | |
4018 | |
4019 # AC_LIBTOOL_GCJ | |
4020 # -------------- | |
4021 # enable support for GCJ libraries | |
4022 AC_DEFUN([AC_LIBTOOL_GCJ], | |
4023 [AC_REQUIRE([_LT_AC_LANG_GCJ]) | |
4024 ])# AC_LIBTOOL_GCJ | |
4025 | |
4026 | |
4027 # _LT_AC_LANG_GCJ | |
4028 # --------------- | |
4029 AC_DEFUN([_LT_AC_LANG_GCJ], | |
4030 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], | |
4031 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], | |
4032 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], | |
4033 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], | |
4034 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], | |
4035 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) | |
4036 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) | |
4037 ])# _LT_AC_LANG_GCJ | |
4038 | |
4039 | |
4040 # AC_LIBTOOL_RC | |
4041 # ------------- | |
4042 # enable support for Windows resource files | |
4043 AC_DEFUN([AC_LIBTOOL_RC], | |
4044 [AC_REQUIRE([LT_AC_PROG_RC]) | |
4045 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) | |
4046 ])# AC_LIBTOOL_RC | |
4047 | |
4048 | |
4049 # AC_LIBTOOL_LANG_C_CONFIG | |
4050 # ------------------------ | |
4051 # Ensure that the configuration vars for the C compiler are | |
4052 # suitably defined. Those variables are subsequently used by | |
4053 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
4054 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) | |
4055 AC_DEFUN([_LT_AC_LANG_C_CONFIG], | |
4056 [lt_save_CC="$CC" | |
4057 AC_LANG_PUSH(C) | |
4058 | |
4059 # Source file extension for C test sources. | |
4060 ac_ext=c | |
4061 | |
4062 # Object file extension for compiled C test sources. | |
4063 objext=o | |
4064 _LT_AC_TAGVAR(objext, $1)=$objext | |
4065 | |
4066 # Code to be used in simple compile tests | |
4067 lt_simple_compile_test_code="int some_variable = 0;" | |
4068 | |
4069 # Code to be used in simple link tests | |
4070 lt_simple_link_test_code='int main(){return(0);}' | |
4071 | |
4072 _LT_AC_SYS_COMPILER | |
4073 | |
4074 # save warnings/boilerplate of simple test code | |
4075 _LT_COMPILER_BOILERPLATE | |
4076 _LT_LINKER_BOILERPLATE | |
4077 | |
4078 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | |
4079 AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
4080 AC_LIBTOOL_PROG_CC_C_O($1) | |
4081 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
4082 AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
4083 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
4084 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
4085 AC_LIBTOOL_SYS_LIB_STRIP | |
4086 AC_LIBTOOL_DLOPEN_SELF | |
4087 | |
4088 # Report which library types will actually be built | |
4089 AC_MSG_CHECKING([if libtool supports shared libraries]) | |
4090 AC_MSG_RESULT([$can_build_shared]) | |
4091 | |
4092 AC_MSG_CHECKING([whether to build shared libraries]) | |
4093 test "$can_build_shared" = "no" && enable_shared=no | |
4094 | |
4095 # On AIX, shared libraries and static libraries use the same namespace, and | |
4096 # are all built from PIC. | |
4097 case $host_os in | |
4098 aix3*) | |
4099 test "$enable_shared" = yes && enable_static=no | |
4100 if test -n "$RANLIB"; then | |
4101 archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
4102 postinstall_cmds='$RANLIB $lib' | |
4103 fi | |
4104 ;; | |
4105 | |
4106 aix[[4-9]]*) | |
4107 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
4108 test "$enable_shared" = yes && enable_static=no | |
4109 fi | |
4110 ;; | |
4111 esac | |
4112 AC_MSG_RESULT([$enable_shared]) | |
4113 | |
4114 AC_MSG_CHECKING([whether to build static libraries]) | |
4115 # Make sure either enable_shared or enable_static is yes. | |
4116 test "$enable_shared" = yes || enable_static=yes | |
4117 AC_MSG_RESULT([$enable_static]) | |
4118 | |
4119 AC_LIBTOOL_CONFIG($1) | |
4120 | |
4121 AC_LANG_POP | |
4122 CC="$lt_save_CC" | |
4123 ])# AC_LIBTOOL_LANG_C_CONFIG | |
4124 | |
4125 | |
4126 # AC_LIBTOOL_LANG_CXX_CONFIG | |
4127 # -------------------------- | |
4128 # Ensure that the configuration vars for the C compiler are | |
4129 # suitably defined. Those variables are subsequently used by | |
4130 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
4131 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) | |
4132 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], | |
4133 [AC_LANG_PUSH(C++) | |
4134 AC_REQUIRE([AC_PROG_CXX]) | |
4135 AC_REQUIRE([_LT_AC_PROG_CXXCPP]) | |
4136 | |
4137 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
4138 _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
4139 _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
4140 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | |
4141 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
4142 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
4143 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4144 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
4145 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
4146 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
4147 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
4148 _LT_AC_TAGVAR(hardcode_automatic, $1)=no | |
4149 _LT_AC_TAGVAR(module_cmds, $1)= | |
4150 _LT_AC_TAGVAR(module_expsym_cmds, $1)= | |
4151 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | |
4152 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
4153 _LT_AC_TAGVAR(no_undefined_flag, $1)= | |
4154 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
4155 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
4156 | |
4157 # Dependencies to place before and after the object being linked: | |
4158 _LT_AC_TAGVAR(predep_objects, $1)= | |
4159 _LT_AC_TAGVAR(postdep_objects, $1)= | |
4160 _LT_AC_TAGVAR(predeps, $1)= | |
4161 _LT_AC_TAGVAR(postdeps, $1)= | |
4162 _LT_AC_TAGVAR(compiler_lib_search_path, $1)= | |
4163 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= | |
4164 | |
4165 # Source file extension for C++ test sources. | |
4166 ac_ext=cpp | |
4167 | |
4168 # Object file extension for compiled C++ test sources. | |
4169 objext=o | |
4170 _LT_AC_TAGVAR(objext, $1)=$objext | |
4171 | |
4172 # Code to be used in simple compile tests | |
4173 lt_simple_compile_test_code="int some_variable = 0;" | |
4174 | |
4175 # Code to be used in simple link tests | |
4176 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' | |
4177 | |
4178 # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
4179 _LT_AC_SYS_COMPILER | |
4180 | |
4181 # save warnings/boilerplate of simple test code | |
4182 _LT_COMPILER_BOILERPLATE | |
4183 _LT_LINKER_BOILERPLATE | |
4184 | |
4185 # Allow CC to be a program name with arguments. | |
4186 lt_save_CC=$CC | |
4187 lt_save_LD=$LD | |
4188 lt_save_GCC=$GCC | |
4189 GCC=$GXX | |
4190 lt_save_with_gnu_ld=$with_gnu_ld | |
4191 lt_save_path_LD=$lt_cv_path_LD | |
4192 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | |
4193 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | |
4194 else | |
4195 $as_unset lt_cv_prog_gnu_ld | |
4196 fi | |
4197 if test -n "${lt_cv_path_LDCXX+set}"; then | |
4198 lt_cv_path_LD=$lt_cv_path_LDCXX | |
4199 else | |
4200 $as_unset lt_cv_path_LD | |
4201 fi | |
4202 test -z "${LDCXX+set}" || LD=$LDCXX | |
4203 CC=${CXX-"c++"} | |
4204 compiler=$CC | |
4205 _LT_AC_TAGVAR(compiler, $1)=$CC | |
4206 _LT_CC_BASENAME([$compiler]) | |
4207 | |
4208 # We don't want -fno-exception wen compiling C++ code, so set the | |
4209 # no_builtin_flag separately | |
4210 if test "$GXX" = yes; then | |
4211 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
4212 else | |
4213 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
4214 fi | |
4215 | |
4216 if test "$GXX" = yes; then | |
4217 # Set up default GNU C++ configuration | |
4218 | |
4219 AC_PROG_LD | |
4220 | |
4221 # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
4222 # archiving commands below assume that GNU ld is being used. | |
4223 if test "$with_gnu_ld" = yes; then | |
4224 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4225 _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' | |
4226 | |
4227 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
4228 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4229 | |
4230 # If archive_cmds runs LD, not CC, wlarc should be empty | |
4231 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
4232 # investigate it a little bit more. (MM) | |
4233 wlarc='${wl}' | |
4234 | |
4235 # ancient GNU ld didn't support --whole-archive et. al. | |
4236 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ | |
4237 grep 'no-whole-archive' > /dev/null; then | |
4238 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
4239 else | |
4240 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
4241 fi | |
4242 else | |
4243 with_gnu_ld=no | |
4244 wlarc= | |
4245 | |
4246 # A generic and very simple default shared library creation | |
4247 # command for GNU C++ for the case where it uses the native | |
4248 # linker, instead of GNU ld. If possible, this setting should | |
4249 # overridden to take advantage of the native linker features on | |
4250 # the platform it is being used on. | |
4251 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
4252 fi | |
4253 | |
4254 # Commands to make compiler produce verbose output that lists | |
4255 # what "hidden" libraries, object files and flags are used when | |
4256 # linking a shared library. | |
4257 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | |
4258 | |
4259 else | |
4260 GXX=no | |
4261 with_gnu_ld=no | |
4262 wlarc= | |
4263 fi | |
4264 | |
4265 # PORTME: fill in a description of your system's C++ link characteristics | |
4266 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
4267 _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
4268 case $host_os in | |
4269 aix3*) | |
4270 # FIXME: insert proper C++ library support | |
4271 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4272 ;; | |
4273 aix[[4-9]]*) | |
4274 if test "$host_cpu" = ia64; then | |
4275 # On IA64, the linker does run time linking by default, so we don't | |
4276 # have to do anything special. | |
4277 aix_use_runtimelinking=no | |
4278 exp_sym_flag='-Bexport' | |
4279 no_entry_flag="" | |
4280 else | |
4281 aix_use_runtimelinking=no | |
4282 | |
4283 # Test if we are trying to use run time linking or normal | |
4284 # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
4285 # need to do runtime linking. | |
4286 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
4287 for ld_flag in $LDFLAGS; do | |
4288 case $ld_flag in | |
4289 *-brtl*) | |
4290 aix_use_runtimelinking=yes | |
4291 break | |
4292 ;; | |
4293 esac | |
4294 done | |
4295 ;; | |
4296 esac | |
4297 | |
4298 exp_sym_flag='-bexport' | |
4299 no_entry_flag='-bnoentry' | |
4300 fi | |
4301 | |
4302 # When large executables or shared objects are built, AIX ld can | |
4303 # have problems creating the table of contents. If linking a library | |
4304 # or program results in "error TOC overflow" add -mminimal-toc to | |
4305 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
4306 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
4307 | |
4308 _LT_AC_TAGVAR(archive_cmds, $1)='' | |
4309 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
4310 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
4311 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
4312 | |
4313 if test "$GXX" = yes; then | |
4314 case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
4315 # We only want to do this on AIX 4.2 and lower, the check | |
4316 # below for broken collect2 doesn't work under 4.3+ | |
4317 collect2name=`${CC} -print-prog-name=collect2` | |
4318 if test -f "$collect2name" && \ | |
4319 strings "$collect2name" | grep resolve_lib_name >/dev/null | |
4320 then | |
4321 # We have reworked collect2 | |
4322 : | |
4323 else | |
4324 # We have old collect2 | |
4325 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
4326 # It fails to find uninstalled libraries when the uninstalled | |
4327 # path is not listed in the libpath. Setting hardcode_minus_L | |
4328 # to unsupported forces relinking | |
4329 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
4330 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4331 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
4332 fi | |
4333 ;; | |
4334 esac | |
4335 shared_flag='-shared' | |
4336 if test "$aix_use_runtimelinking" = yes; then | |
4337 shared_flag="$shared_flag "'${wl}-G' | |
4338 fi | |
4339 else | |
4340 # not using gcc | |
4341 if test "$host_cpu" = ia64; then | |
4342 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
4343 # chokes on -Wl,-G. The following line is correct: | |
4344 shared_flag='-G' | |
4345 else | |
4346 if test "$aix_use_runtimelinking" = yes; then | |
4347 shared_flag='${wl}-G' | |
4348 else | |
4349 shared_flag='${wl}-bM:SRE' | |
4350 fi | |
4351 fi | |
4352 fi | |
4353 | |
4354 # It seems that -bexpall does not export symbols beginning with | |
4355 # underscore (_), so it is better to generate a list of symbols to export. | |
4356 _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
4357 if test "$aix_use_runtimelinking" = yes; then | |
4358 # Warning - without using the other runtime loading flags (-brtl), | |
4359 # -berok will link without error, but may produce a broken library. | |
4360 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | |
4361 # Determine the default libpath from the value encoded in an empty executable. | |
4362 _LT_AC_SYS_LIBPATH_AIX | |
4363 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
4364 | |
4365 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
4366 else | |
4367 if test "$host_cpu" = ia64; then | |
4368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
4369 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
4370 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
4371 else | |
4372 # Determine the default libpath from the value encoded in an empty executable. | |
4373 _LT_AC_SYS_LIBPATH_AIX | |
4374 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
4375 # Warning - without using the other run time loading flags, | |
4376 # -berok will link without error, but may produce a broken library. | |
4377 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
4378 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
4379 # Exported symbols can be pulled into shared objects from archives | |
4380 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
4381 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
4382 # This is similar to how AIX traditionally builds its shared libraries. | |
4383 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
4384 fi | |
4385 fi | |
4386 ;; | |
4387 | |
4388 beos*) | |
4389 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
4390 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4391 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
4392 # support --undefined. This deserves some investigation. FIXME | |
4393 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4394 else | |
4395 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4396 fi | |
4397 ;; | |
4398 | |
4399 chorus*) | |
4400 case $cc_basename in | |
4401 *) | |
4402 # FIXME: insert proper C++ library support | |
4403 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4404 ;; | |
4405 esac | |
4406 ;; | |
4407 | |
4408 cygwin* | mingw* | pw32*) | |
4409 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
4410 # as there is no search path for DLLs. | |
4411 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4412 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4413 _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
4414 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
4415 | |
4416 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | |
4417 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
4418 # If the export-symbols file already is a .def file (1st line | |
4419 # is EXPORTS), use it as is; otherwise, prepend... | |
4420 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
4421 cp $export_symbols $output_objdir/$soname.def; | |
4422 else | |
4423 echo EXPORTS > $output_objdir/$soname.def; | |
4424 cat $export_symbols >> $output_objdir/$soname.def; | |
4425 fi~ | |
4426 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
4427 else | |
4428 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4429 fi | |
4430 ;; | |
4431 darwin* | rhapsody*) | |
4432 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
4433 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
4434 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes | |
4435 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
4436 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' | |
4437 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
4438 _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" | |
4439 if test "$GXX" = yes ; then | |
4440 output_verbose_link_cmd='echo' | |
4441 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" | |
4442 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
4443 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
4444 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
4445 if test "$lt_cv_apple_cc_single_mod" != "yes"; then | |
4446 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -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${_lt_dsymutil}" | |
4447 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}" | |
4448 fi | |
4449 else | |
4450 case $cc_basename in | |
4451 xlc*) | |
4452 output_verbose_link_cmd='echo' | |
4453 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' | |
4454 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | |
4455 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds | |
4456 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
4457 _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}' | |
4458 ;; | |
4459 *) | |
4460 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4461 ;; | |
4462 esac | |
4463 fi | |
4464 ;; | |
4465 | |
4466 dgux*) | |
4467 case $cc_basename in | |
4468 ec++*) | |
4469 # FIXME: insert proper C++ library support | |
4470 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4471 ;; | |
4472 ghcx*) | |
4473 # Green Hills C++ Compiler | |
4474 # FIXME: insert proper C++ library support | |
4475 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4476 ;; | |
4477 *) | |
4478 # FIXME: insert proper C++ library support | |
4479 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4480 ;; | |
4481 esac | |
4482 ;; | |
4483 freebsd[[12]]*) | |
4484 # C++ shared libraries reported to be fairly broken before switch to ELF | |
4485 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4486 ;; | |
4487 freebsd-elf*) | |
4488 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
4489 ;; | |
4490 freebsd* | dragonfly*) | |
4491 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
4492 # conventions | |
4493 _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
4494 ;; | |
4495 gnu*) | |
4496 ;; | |
4497 hpux9*) | |
4498 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
4499 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4500 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4501 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
4502 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
4503 # but as the default | |
4504 # location of the library. | |
4505 | |
4506 case $cc_basename in | |
4507 CC*) | |
4508 # FIXME: insert proper C++ library support | |
4509 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4510 ;; | |
4511 aCC*) | |
4512 _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' | |
4513 # Commands to make compiler produce verbose output that lists | |
4514 # what "hidden" libraries, object files and flags are used when | |
4515 # linking a shared library. | |
4516 # | |
4517 # There doesn't appear to be a way to prevent this compiler from | |
4518 # explicitly linking system object files so we need to strip them | |
4519 # from the output so that they don't get included in the library | |
4520 # dependencies. | |
4521 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' | |
4522 ;; | |
4523 *) | |
4524 if test "$GXX" = yes; then | |
4525 _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' | |
4526 else | |
4527 # FIXME: insert proper C++ library support | |
4528 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4529 fi | |
4530 ;; | |
4531 esac | |
4532 ;; | |
4533 hpux10*|hpux11*) | |
4534 if test $with_gnu_ld = no; then | |
4535 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
4536 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4537 | |
4538 case $host_cpu in | |
4539 hppa*64*|ia64*) ;; | |
4540 *) | |
4541 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4542 ;; | |
4543 esac | |
4544 fi | |
4545 case $host_cpu in | |
4546 hppa*64*|ia64*) | |
4547 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
4548 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4549 ;; | |
4550 *) | |
4551 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
4552 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
4553 # but as the default | |
4554 # location of the library. | |
4555 ;; | |
4556 esac | |
4557 | |
4558 case $cc_basename in | |
4559 CC*) | |
4560 # FIXME: insert proper C++ library support | |
4561 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4562 ;; | |
4563 aCC*) | |
4564 case $host_cpu in | |
4565 hppa*64*) | |
4566 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4567 ;; | |
4568 ia64*) | |
4569 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4570 ;; | |
4571 *) | |
4572 _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' | |
4573 ;; | |
4574 esac | |
4575 # Commands to make compiler produce verbose output that lists | |
4576 # what "hidden" libraries, object files and flags are used when | |
4577 # linking a shared library. | |
4578 # | |
4579 # There doesn't appear to be a way to prevent this compiler from | |
4580 # explicitly linking system object files so we need to strip them | |
4581 # from the output so that they don't get included in the library | |
4582 # dependencies. | |
4583 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' | |
4584 ;; | |
4585 *) | |
4586 if test "$GXX" = yes; then | |
4587 if test $with_gnu_ld = no; then | |
4588 case $host_cpu in | |
4589 hppa*64*) | |
4590 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4591 ;; | |
4592 ia64*) | |
4593 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4594 ;; | |
4595 *) | |
4596 _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' | |
4597 ;; | |
4598 esac | |
4599 fi | |
4600 else | |
4601 # FIXME: insert proper C++ library support | |
4602 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4603 fi | |
4604 ;; | |
4605 esac | |
4606 ;; | |
4607 interix[[3-9]]*) | |
4608 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
4609 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4610 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4611 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4612 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
4613 # Instead, shared libraries are loaded at an image base (0x10000000 by | |
4614 # default) and relocated if they conflict, which is a slow very memory | |
4615 # consuming and fragmenting process. To avoid this, we pick a random, | |
4616 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
4617 # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
4618 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
4619 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
4620 ;; | |
4621 irix5* | irix6*) | |
4622 case $cc_basename in | |
4623 CC*) | |
4624 # SGI C++ | |
4625 _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 ${output_objdir}/so_locations -o $lib' | |
4626 | |
4627 # Archives containing C++ object files must be created using | |
4628 # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
4629 # necessary to make sure instantiated templates are included | |
4630 # in the archive. | |
4631 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
4632 ;; | |
4633 *) | |
4634 if test "$GXX" = yes; then | |
4635 if test "$with_gnu_ld" = no; then | |
4636 _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}${output_objdir}/so_locations -o $lib' | |
4637 else | |
4638 _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' | |
4639 fi | |
4640 fi | |
4641 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
4642 ;; | |
4643 esac | |
4644 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4645 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4646 ;; | |
4647 linux* | k*bsd*-gnu) | |
4648 case $cc_basename in | |
4649 KCC*) | |
4650 # Kuck and Associates, Inc. (KAI) C++ Compiler | |
4651 | |
4652 # KCC will only create a shared library if the output file | |
4653 # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
4654 # to its proper name (with version) after linking. | |
4655 _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' | |
4656 _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' | |
4657 # Commands to make compiler produce verbose output that lists | |
4658 # what "hidden" libraries, object files and flags are used when | |
4659 # linking a shared library. | |
4660 # | |
4661 # There doesn't appear to be a way to prevent this compiler from | |
4662 # explicitly linking system object files so we need to strip them | |
4663 # from the output so that they don't get included in the library | |
4664 # dependencies. | |
4665 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' | |
4666 | |
4667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' | |
4668 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4669 | |
4670 # Archives containing C++ object files must be created using | |
4671 # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
4672 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
4673 ;; | |
4674 icpc*) | |
4675 # Intel C++ | |
4676 with_gnu_ld=yes | |
4677 # version 8.0 and above of icpc choke on multiply defined symbols | |
4678 # if we add $predep_objects and $postdep_objects, however 7.1 and | |
4679 # earlier do not add the objects themselves. | |
4680 case `$CC -V 2>&1` in | |
4681 *"Version 7."*) | |
4682 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4683 _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' | |
4684 ;; | |
4685 *) # Version 8.0 or newer | |
4686 tmp_idyn= | |
4687 case $host_cpu in | |
4688 ia64*) tmp_idyn=' -i_dynamic';; | |
4689 esac | |
4690 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4691 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
4692 ;; | |
4693 esac | |
4694 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
4695 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4696 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4697 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
4698 ;; | |
4699 pgCC* | pgcpp*) | |
4700 # Portland Group C++ compiler | |
4701 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
4702 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
4703 | |
4704 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
4705 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' | |
4707 ;; | |
4708 cxx*) | |
4709 # Compaq C++ | |
4710 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4711 _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' | |
4712 | |
4713 runpath_var=LD_RUN_PATH | |
4714 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
4715 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4716 | |
4717 # Commands to make compiler produce verbose output that lists | |
4718 # what "hidden" libraries, object files and flags are used when | |
4719 # linking a shared library. | |
4720 # | |
4721 # There doesn't appear to be a way to prevent this compiler from | |
4722 # explicitly linking system object files so we need to strip them | |
4723 # from the output so that they don't get included in the library | |
4724 # dependencies. | |
4725 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' | |
4726 ;; | |
4727 *) | |
4728 case `$CC -V 2>&1 | sed 5q` in | |
4729 *Sun\ C*) | |
4730 # Sun C++ 5.9 | |
4731 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
4732 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4733 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' | |
4734 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4735 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' | |
4736 | |
4737 # Not sure whether something based on | |
4738 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | |
4739 # would be better. | |
4740 output_verbose_link_cmd='echo' | |
4741 | |
4742 # Archives containing C++ object files must be created using | |
4743 # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
4744 # necessary to make sure instantiated templates are included | |
4745 # in the archive. | |
4746 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
4747 ;; | |
4748 esac | |
4749 ;; | |
4750 esac | |
4751 ;; | |
4752 lynxos*) | |
4753 # FIXME: insert proper C++ library support | |
4754 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4755 ;; | |
4756 m88k*) | |
4757 # FIXME: insert proper C++ library support | |
4758 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4759 ;; | |
4760 mvs*) | |
4761 case $cc_basename in | |
4762 cxx*) | |
4763 # FIXME: insert proper C++ library support | |
4764 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4765 ;; | |
4766 *) | |
4767 # FIXME: insert proper C++ library support | |
4768 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4769 ;; | |
4770 esac | |
4771 ;; | |
4772 netbsd*) | |
4773 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
4774 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | |
4775 wlarc= | |
4776 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4777 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
4778 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4779 fi | |
4780 # Workaround some broken pre-1.5 toolchains | |
4781 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | |
4782 ;; | |
4783 openbsd2*) | |
4784 # C++ shared libraries are fairly broken | |
4785 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4786 ;; | |
4787 openbsd*) | |
4788 if test -f /usr/libexec/ld.so; then | |
4789 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
4790 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4791 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
4792 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4793 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
4794 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' | |
4795 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4796 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
4797 fi | |
4798 output_verbose_link_cmd='echo' | |
4799 else | |
4800 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4801 fi | |
4802 ;; | |
4803 osf3*) | |
4804 case $cc_basename in | |
4805 KCC*) | |
4806 # Kuck and Associates, Inc. (KAI) C++ Compiler | |
4807 | |
4808 # KCC will only create a shared library if the output file | |
4809 # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
4810 # to its proper name (with version) after linking. | |
4811 _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' | |
4812 | |
4813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4814 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4815 | |
4816 # Archives containing C++ object files must be created using | |
4817 # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
4818 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
4819 | |
4820 ;; | |
4821 RCC*) | |
4822 # Rational C++ 2.4.1 | |
4823 # FIXME: insert proper C++ library support | |
4824 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4825 ;; | |
4826 cxx*) | |
4827 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
4828 _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 ${output_objdir}/so_locations -o $lib' | |
4829 | |
4830 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4831 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4832 | |
4833 # Commands to make compiler produce verbose output that lists | |
4834 # what "hidden" libraries, object files and flags are used when | |
4835 # linking a shared library. | |
4836 # | |
4837 # There doesn't appear to be a way to prevent this compiler from | |
4838 # explicitly linking system object files so we need to strip them | |
4839 # from the output so that they don't get included in the library | |
4840 # dependencies. | |
4841 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' | |
4842 ;; | |
4843 *) | |
4844 if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
4845 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
4846 _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}${output_objdir}/so_locations -o $lib' | |
4847 | |
4848 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4849 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4850 | |
4851 # Commands to make compiler produce verbose output that lists | |
4852 # what "hidden" libraries, object files and flags are used when | |
4853 # linking a shared library. | |
4854 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | |
4855 | |
4856 else | |
4857 # FIXME: insert proper C++ library support | |
4858 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4859 fi | |
4860 ;; | |
4861 esac | |
4862 ;; | |
4863 osf4* | osf5*) | |
4864 case $cc_basename in | |
4865 KCC*) | |
4866 # Kuck and Associates, Inc. (KAI) C++ Compiler | |
4867 | |
4868 # KCC will only create a shared library if the output file | |
4869 # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
4870 # to its proper name (with version) after linking. | |
4871 _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' | |
4872 | |
4873 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4874 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4875 | |
4876 # Archives containing C++ object files must be created using | |
4877 # the KAI C++ compiler. | |
4878 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' | |
4879 ;; | |
4880 RCC*) | |
4881 # Rational C++ 2.4.1 | |
4882 # FIXME: insert proper C++ library support | |
4883 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4884 ;; | |
4885 cxx*) | |
4886 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
4887 _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 ${output_objdir}/so_locations -o $lib' | |
4888 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | |
4889 echo "-hidden">> $lib.exp~ | |
4890 $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 ${output_objdir}/so_locations -o $lib~ | |
4891 $rm $lib.exp' | |
4892 | |
4893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
4894 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4895 | |
4896 # Commands to make compiler produce verbose output that lists | |
4897 # what "hidden" libraries, object files and flags are used when | |
4898 # linking a shared library. | |
4899 # | |
4900 # There doesn't appear to be a way to prevent this compiler from | |
4901 # explicitly linking system object files so we need to strip them | |
4902 # from the output so that they don't get included in the library | |
4903 # dependencies. | |
4904 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' | |
4905 ;; | |
4906 *) | |
4907 if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
4908 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
4909 _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}${output_objdir}/so_locations -o $lib' | |
4910 | |
4911 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4912 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
4913 | |
4914 # Commands to make compiler produce verbose output that lists | |
4915 # what "hidden" libraries, object files and flags are used when | |
4916 # linking a shared library. | |
4917 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | |
4918 | |
4919 else | |
4920 # FIXME: insert proper C++ library support | |
4921 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4922 fi | |
4923 ;; | |
4924 esac | |
4925 ;; | |
4926 psos*) | |
4927 # FIXME: insert proper C++ library support | |
4928 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4929 ;; | |
4930 sunos4*) | |
4931 case $cc_basename in | |
4932 CC*) | |
4933 # Sun C++ 4.x | |
4934 # FIXME: insert proper C++ library support | |
4935 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4936 ;; | |
4937 lcc*) | |
4938 # Lucid | |
4939 # FIXME: insert proper C++ library support | |
4940 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4941 ;; | |
4942 *) | |
4943 # FIXME: insert proper C++ library support | |
4944 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
4945 ;; | |
4946 esac | |
4947 ;; | |
4948 solaris*) | |
4949 case $cc_basename in | |
4950 CC*) | |
4951 # Sun C++ 4.2, 5.x and Centerline C++ | |
4952 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes | |
4953 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
4954 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
4955 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
4956 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | |
4957 | |
4958 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4959 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4960 case $host_os in | |
4961 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
4962 *) | |
4963 # The compiler driver will combine and reorder linker options, | |
4964 # but understands `-z linker_flag'. | |
4965 # Supported since Solaris 2.6 (maybe 2.5.1?) | |
4966 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
4967 ;; | |
4968 esac | |
4969 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
4970 | |
4971 output_verbose_link_cmd='echo' | |
4972 | |
4973 # Archives containing C++ object files must be created using | |
4974 # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
4975 # necessary to make sure instantiated templates are included | |
4976 # in the archive. | |
4977 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
4978 ;; | |
4979 gcx*) | |
4980 # Green Hills C++ Compiler | |
4981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
4982 | |
4983 # The C++ compiler must be used to create the archive. | |
4984 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
4985 ;; | |
4986 *) | |
4987 # GNU C++ compiler with Solaris linker | |
4988 if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
4989 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | |
4990 if $CC --version | grep -v '^2\.7' > /dev/null; then | |
4991 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
4992 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
4993 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | |
4994 | |
4995 # Commands to make compiler produce verbose output that lists | |
4996 # what "hidden" libraries, object files and flags are used when | |
4997 # linking a shared library. | |
4998 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | |
4999 else | |
5000 # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
5001 # platform. | |
5002 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
5003 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
5004 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | |
5005 | |
5006 # Commands to make compiler produce verbose output that lists | |
5007 # what "hidden" libraries, object files and flags are used when | |
5008 # linking a shared library. | |
5009 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | |
5010 fi | |
5011 | |
5012 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | |
5013 case $host_os in | |
5014 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
5015 *) | |
5016 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
5017 ;; | |
5018 esac | |
5019 fi | |
5020 ;; | |
5021 esac | |
5022 ;; | |
5023 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
5024 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5025 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
5026 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5027 runpath_var='LD_RUN_PATH' | |
5028 | |
5029 case $cc_basename in | |
5030 CC*) | |
5031 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5033 ;; | |
5034 *) | |
5035 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5036 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5037 ;; | |
5038 esac | |
5039 ;; | |
5040 sysv5* | sco3.2v5* | sco5v6*) | |
5041 # Note: We can NOT use -z defs as we might desire, because we do not | |
5042 # link with -lc, and that would cause any symbols used from libc to | |
5043 # always be unresolved, which means just about no library would | |
5044 # ever link correctly. If we're not using GNU ld we use -z text | |
5045 # though, which does catch some bad symbols but isn't as heavy-handed | |
5046 # as -z defs. | |
5047 # For security reasons, it is highly recommended that you always | |
5048 # use absolute paths for naming shared libraries, and exclude the | |
5049 # DT_RUNPATH tag from executables and libraries. But doing so | |
5050 # requires that you compile everything twice, which is a pain. | |
5051 # So that behaviour is only enabled if SCOABSPATH is set to a | |
5052 # non-empty value in the environment. Most likely only useful for | |
5053 # creating official distributions of packages. | |
5054 # This is a hack until libtool officially supports absolute path | |
5055 # names for shared libraries. | |
5056 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5057 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
5058 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
5059 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5060 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' | |
5061 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5062 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
5063 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
5064 runpath_var='LD_RUN_PATH' | |
5065 | |
5066 case $cc_basename in | |
5067 CC*) | |
5068 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5069 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5070 ;; | |
5071 *) | |
5072 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5073 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5074 ;; | |
5075 esac | |
5076 ;; | |
5077 tandem*) | |
5078 case $cc_basename in | |
5079 NCC*) | |
5080 # NonStop-UX NCC 3.20 | |
5081 # FIXME: insert proper C++ library support | |
5082 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5083 ;; | |
5084 *) | |
5085 # FIXME: insert proper C++ library support | |
5086 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5087 ;; | |
5088 esac | |
5089 ;; | |
5090 vxworks*) | |
5091 # FIXME: insert proper C++ library support | |
5092 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5093 ;; | |
5094 *) | |
5095 # FIXME: insert proper C++ library support | |
5096 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
5097 ;; | |
5098 esac | |
5099 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | |
5100 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
5101 | |
5102 _LT_AC_TAGVAR(GCC, $1)="$GXX" | |
5103 _LT_AC_TAGVAR(LD, $1)="$LD" | |
5104 | |
5105 AC_LIBTOOL_POSTDEP_PREDEP($1) | |
5106 AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
5107 AC_LIBTOOL_PROG_CC_C_O($1) | |
5108 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
5109 AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
5110 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
5111 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
5112 | |
5113 AC_LIBTOOL_CONFIG($1) | |
5114 | |
5115 AC_LANG_POP | |
5116 CC=$lt_save_CC | |
5117 LDCXX=$LD | |
5118 LD=$lt_save_LD | |
5119 GCC=$lt_save_GCC | |
5120 with_gnu_ldcxx=$with_gnu_ld | |
5121 with_gnu_ld=$lt_save_with_gnu_ld | |
5122 lt_cv_path_LDCXX=$lt_cv_path_LD | |
5123 lt_cv_path_LD=$lt_save_path_LD | |
5124 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | |
5125 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | |
5126 ])# AC_LIBTOOL_LANG_CXX_CONFIG | |
5127 | |
5128 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) | |
5129 # ------------------------------------ | |
5130 # Figure out "hidden" library dependencies from verbose | |
5131 # compiler output when linking a shared library. | |
5132 # Parse the compiler output and extract the necessary | |
5133 # objects, libraries and library flags. | |
5134 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], | |
5135 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
5136 dnl we can't use the lt_simple_compile_test_code here, | |
5137 dnl because it contains code intended for an executable, | |
5138 dnl not a library. It's possible we should let each | |
5139 dnl tag define a new lt_????_link_test_code variable, | |
5140 dnl but it's only used here... | |
5141 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF | |
5142 int a; | |
5143 void foo (void) { a = 0; } | |
5144 EOF | |
5145 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF | |
5146 class Foo | |
5147 { | |
5148 public: | |
5149 Foo (void) { a = 0; } | |
5150 private: | |
5151 int a; | |
5152 }; | |
5153 EOF | |
5154 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF | |
5155 subroutine foo | |
5156 implicit none | |
5157 integer*4 a | |
5158 a=0 | |
5159 return | |
5160 end | |
5161 EOF | |
5162 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF | |
5163 public class foo { | |
5164 private int a; | |
5165 public void bar (void) { | |
5166 a = 0; | |
5167 } | |
5168 }; | |
5169 EOF | |
5170 ]) | |
5171 dnl Parse the compiler output and extract the necessary | |
5172 dnl objects, libraries and library flags. | |
5173 if AC_TRY_EVAL(ac_compile); then | |
5174 # Parse the compiler output and extract the necessary | |
5175 # objects, libraries and library flags. | |
5176 | |
5177 # Sentinel used to keep track of whether or not we are before | |
5178 # the conftest object file. | |
5179 pre_test_object_deps_done=no | |
5180 | |
5181 # The `*' in the case matches for architectures that use `case' in | |
5182 # $output_verbose_cmd can trigger glob expansion during the loop | |
5183 # eval without this substitution. | |
5184 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` | |
5185 | |
5186 for p in `eval $output_verbose_link_cmd`; do | |
5187 case $p in | |
5188 | |
5189 -L* | -R* | -l*) | |
5190 # Some compilers place space between "-{L,R}" and the path. | |
5191 # Remove the space. | |
5192 if test $p = "-L" \ | |
5193 || test $p = "-R"; then | |
5194 prev=$p | |
5195 continue | |
5196 else | |
5197 prev= | |
5198 fi | |
5199 | |
5200 if test "$pre_test_object_deps_done" = no; then | |
5201 case $p in | |
5202 -L* | -R*) | |
5203 # Internal compiler library paths should come after those | |
5204 # provided the user. The postdeps already come after the | |
5205 # user supplied libs so there is no need to process them. | |
5206 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then | |
5207 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | |
5208 else | |
5209 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | |
5210 fi | |
5211 ;; | |
5212 # The "-l" case would never come before the object being | |
5213 # linked, so don't bother handling this case. | |
5214 esac | |
5215 else | |
5216 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then | |
5217 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" | |
5218 else | |
5219 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" | |
5220 fi | |
5221 fi | |
5222 ;; | |
5223 | |
5224 *.$objext) | |
5225 # This assumes that the test object file only shows up | |
5226 # once in the compiler output. | |
5227 if test "$p" = "conftest.$objext"; then | |
5228 pre_test_object_deps_done=yes | |
5229 continue | |
5230 fi | |
5231 | |
5232 if test "$pre_test_object_deps_done" = no; then | |
5233 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then | |
5234 _LT_AC_TAGVAR(predep_objects, $1)="$p" | |
5235 else | |
5236 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" | |
5237 fi | |
5238 else | |
5239 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then | |
5240 _LT_AC_TAGVAR(postdep_objects, $1)="$p" | |
5241 else | |
5242 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" | |
5243 fi | |
5244 fi | |
5245 ;; | |
5246 | |
5247 *) ;; # Ignore the rest. | |
5248 | |
5249 esac | |
5250 done | |
5251 | |
5252 # Clean up. | |
5253 rm -f a.out a.exe | |
5254 else | |
5255 echo "libtool.m4: error: problem compiling $1 test program" | |
5256 fi | |
5257 | |
5258 $rm -f confest.$objext | |
5259 | |
5260 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= | |
5261 if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then | |
5262 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | |
5263 fi | |
5264 | |
5265 # PORTME: override above test on systems where it is broken | |
5266 ifelse([$1],[CXX], | |
5267 [case $host_os in | |
5268 interix[[3-9]]*) | |
5269 # Interix 3.5 installs completely hosed .la files for C++, so rather than | |
5270 # hack all around it, let's just trust "g++" to DTRT. | |
5271 _LT_AC_TAGVAR(predep_objects,$1)= | |
5272 _LT_AC_TAGVAR(postdep_objects,$1)= | |
5273 _LT_AC_TAGVAR(postdeps,$1)= | |
5274 ;; | |
5275 | |
5276 linux*) | |
5277 case `$CC -V 2>&1 | sed 5q` in | |
5278 *Sun\ C*) | |
5279 # Sun C++ 5.9 | |
5280 # | |
5281 # The more standards-conforming stlport4 library is | |
5282 # incompatible with the Cstd library. Avoid specifying | |
5283 # it if it's in CXXFLAGS. Ignore libCrun as | |
5284 # -library=stlport4 depends on it. | |
5285 case " $CXX $CXXFLAGS " in | |
5286 *" -library=stlport4 "*) | |
5287 solaris_use_stlport4=yes | |
5288 ;; | |
5289 esac | |
5290 if test "$solaris_use_stlport4" != yes; then | |
5291 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
5292 fi | |
5293 ;; | |
5294 esac | |
5295 ;; | |
5296 | |
5297 solaris*) | |
5298 case $cc_basename in | |
5299 CC*) | |
5300 # The more standards-conforming stlport4 library is | |
5301 # incompatible with the Cstd library. Avoid specifying | |
5302 # it if it's in CXXFLAGS. Ignore libCrun as | |
5303 # -library=stlport4 depends on it. | |
5304 case " $CXX $CXXFLAGS " in | |
5305 *" -library=stlport4 "*) | |
5306 solaris_use_stlport4=yes | |
5307 ;; | |
5308 esac | |
5309 | |
5310 # Adding this requires a known-good setup of shared libraries for | |
5311 # Sun compiler versions before 5.6, else PIC objects from an old | |
5312 # archive will be linked into the output, leading to subtle bugs. | |
5313 if test "$solaris_use_stlport4" != yes; then | |
5314 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
5315 fi | |
5316 ;; | |
5317 esac | |
5318 ;; | |
5319 esac | |
5320 ]) | |
5321 case " $_LT_AC_TAGVAR(postdeps, $1) " in | |
5322 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; | |
5323 esac | |
5324 ])# AC_LIBTOOL_POSTDEP_PREDEP | |
5325 | |
5326 # AC_LIBTOOL_LANG_F77_CONFIG | |
5327 # -------------------------- | |
5328 # Ensure that the configuration vars for the C compiler are | |
5329 # suitably defined. Those variables are subsequently used by | |
5330 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
5331 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) | |
5332 AC_DEFUN([_LT_AC_LANG_F77_CONFIG], | |
5333 [AC_REQUIRE([AC_PROG_F77]) | |
5334 AC_LANG_PUSH(Fortran 77) | |
5335 | |
5336 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
5337 _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
5338 _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
5339 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | |
5340 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
5341 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
5342 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
5343 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
5344 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
5345 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
5346 _LT_AC_TAGVAR(hardcode_automatic, $1)=no | |
5347 _LT_AC_TAGVAR(module_cmds, $1)= | |
5348 _LT_AC_TAGVAR(module_expsym_cmds, $1)= | |
5349 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | |
5350 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
5351 _LT_AC_TAGVAR(no_undefined_flag, $1)= | |
5352 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
5353 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
5354 | |
5355 # Source file extension for f77 test sources. | |
5356 ac_ext=f | |
5357 | |
5358 # Object file extension for compiled f77 test sources. | |
5359 objext=o | |
5360 _LT_AC_TAGVAR(objext, $1)=$objext | |
5361 | |
5362 # Code to be used in simple compile tests | |
5363 lt_simple_compile_test_code="\ | |
5364 subroutine t | |
5365 return | |
5366 end | |
5367 " | |
5368 | |
5369 # Code to be used in simple link tests | |
5370 lt_simple_link_test_code="\ | |
5371 program t | |
5372 end | |
5373 " | |
5374 | |
5375 # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
5376 _LT_AC_SYS_COMPILER | |
5377 | |
5378 # save warnings/boilerplate of simple test code | |
5379 _LT_COMPILER_BOILERPLATE | |
5380 _LT_LINKER_BOILERPLATE | |
5381 | |
5382 # Allow CC to be a program name with arguments. | |
5383 lt_save_CC="$CC" | |
5384 CC=${F77-"f77"} | |
5385 compiler=$CC | |
5386 _LT_AC_TAGVAR(compiler, $1)=$CC | |
5387 _LT_CC_BASENAME([$compiler]) | |
5388 | |
5389 AC_MSG_CHECKING([if libtool supports shared libraries]) | |
5390 AC_MSG_RESULT([$can_build_shared]) | |
5391 | |
5392 AC_MSG_CHECKING([whether to build shared libraries]) | |
5393 test "$can_build_shared" = "no" && enable_shared=no | |
5394 | |
5395 # On AIX, shared libraries and static libraries use the same namespace, and | |
5396 # are all built from PIC. | |
5397 case $host_os in | |
5398 aix3*) | |
5399 test "$enable_shared" = yes && enable_static=no | |
5400 if test -n "$RANLIB"; then | |
5401 archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
5402 postinstall_cmds='$RANLIB $lib' | |
5403 fi | |
5404 ;; | |
5405 aix[[4-9]]*) | |
5406 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
5407 test "$enable_shared" = yes && enable_static=no | |
5408 fi | |
5409 ;; | |
5410 esac | |
5411 AC_MSG_RESULT([$enable_shared]) | |
5412 | |
5413 AC_MSG_CHECKING([whether to build static libraries]) | |
5414 # Make sure either enable_shared or enable_static is yes. | |
5415 test "$enable_shared" = yes || enable_static=yes | |
5416 AC_MSG_RESULT([$enable_static]) | |
5417 | |
5418 _LT_AC_TAGVAR(GCC, $1)="$G77" | |
5419 _LT_AC_TAGVAR(LD, $1)="$LD" | |
5420 | |
5421 AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
5422 AC_LIBTOOL_PROG_CC_C_O($1) | |
5423 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
5424 AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
5425 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
5426 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
5427 | |
5428 AC_LIBTOOL_CONFIG($1) | |
5429 | |
5430 AC_LANG_POP | |
5431 CC="$lt_save_CC" | |
5432 ])# AC_LIBTOOL_LANG_F77_CONFIG | |
5433 | |
5434 | |
5435 # AC_LIBTOOL_LANG_GCJ_CONFIG | |
5436 # -------------------------- | |
5437 # Ensure that the configuration vars for the C compiler are | |
5438 # suitably defined. Those variables are subsequently used by | |
5439 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
5440 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) | |
5441 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], | |
5442 [AC_LANG_SAVE | |
5443 | |
5444 # Source file extension for Java test sources. | |
5445 ac_ext=java | |
5446 | |
5447 # Object file extension for compiled Java test sources. | |
5448 objext=o | |
5449 _LT_AC_TAGVAR(objext, $1)=$objext | |
5450 | |
5451 # Code to be used in simple compile tests | |
5452 lt_simple_compile_test_code="class foo {}" | |
5453 | |
5454 # Code to be used in simple link tests | |
5455 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' | |
5456 | |
5457 # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
5458 _LT_AC_SYS_COMPILER | |
5459 | |
5460 # save warnings/boilerplate of simple test code | |
5461 _LT_COMPILER_BOILERPLATE | |
5462 _LT_LINKER_BOILERPLATE | |
5463 | |
5464 # Allow CC to be a program name with arguments. | |
5465 lt_save_CC="$CC" | |
5466 CC=${GCJ-"gcj"} | |
5467 compiler=$CC | |
5468 _LT_AC_TAGVAR(compiler, $1)=$CC | |
5469 _LT_CC_BASENAME([$compiler]) | |
5470 | |
5471 # GCJ did not exist at the time GCC didn't implicitly link libc in. | |
5472 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
5473 | |
5474 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
5475 | |
5476 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | |
5477 AC_LIBTOOL_PROG_COMPILER_PIC($1) | |
5478 AC_LIBTOOL_PROG_CC_C_O($1) | |
5479 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | |
5480 AC_LIBTOOL_PROG_LD_SHLIBS($1) | |
5481 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | |
5482 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | |
5483 | |
5484 AC_LIBTOOL_CONFIG($1) | |
5485 | |
5486 AC_LANG_RESTORE | |
5487 CC="$lt_save_CC" | |
5488 ])# AC_LIBTOOL_LANG_GCJ_CONFIG | |
5489 | |
5490 | |
5491 # AC_LIBTOOL_LANG_RC_CONFIG | |
5492 # ------------------------- | |
5493 # Ensure that the configuration vars for the Windows resource compiler are | |
5494 # suitably defined. Those variables are subsequently used by | |
5495 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | |
5496 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) | |
5497 AC_DEFUN([_LT_AC_LANG_RC_CONFIG], | |
5498 [AC_LANG_SAVE | |
5499 | |
5500 # Source file extension for RC test sources. | |
5501 ac_ext=rc | |
5502 | |
5503 # Object file extension for compiled RC test sources. | |
5504 objext=o | |
5505 _LT_AC_TAGVAR(objext, $1)=$objext | |
5506 | |
5507 # Code to be used in simple compile tests | |
5508 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | |
5509 | |
5510 # Code to be used in simple link tests | |
5511 lt_simple_link_test_code="$lt_simple_compile_test_code" | |
5512 | |
5513 # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
5514 _LT_AC_SYS_COMPILER | |
5515 | |
5516 # save warnings/boilerplate of simple test code | |
5517 _LT_COMPILER_BOILERPLATE | |
5518 _LT_LINKER_BOILERPLATE | |
5519 | |
5520 # Allow CC to be a program name with arguments. | |
5521 lt_save_CC="$CC" | |
5522 CC=${RC-"windres"} | |
5523 compiler=$CC | |
5524 _LT_AC_TAGVAR(compiler, $1)=$CC | |
5525 _LT_CC_BASENAME([$compiler]) | |
5526 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
5527 | |
5528 AC_LIBTOOL_CONFIG($1) | |
5529 | |
5530 AC_LANG_RESTORE | |
5531 CC="$lt_save_CC" | |
5532 ])# AC_LIBTOOL_LANG_RC_CONFIG | |
5533 | |
5534 | |
5535 # AC_LIBTOOL_CONFIG([TAGNAME]) | |
5536 # ---------------------------- | |
5537 # If TAGNAME is not passed, then create an initial libtool script | |
5538 # with a default configuration from the untagged config vars. Otherwise | |
5539 # add code to config.status for appending the configuration named by | |
5540 # TAGNAME from the matching tagged config vars. | |
5541 AC_DEFUN([AC_LIBTOOL_CONFIG], | |
5542 [# The else clause should only fire when bootstrapping the | |
5543 # libtool distribution, otherwise you forgot to ship ltmain.sh | |
5544 # with your package, and you will get complaints that there are | |
5545 # no rules to generate ltmain.sh. | |
5546 if test -f "$ltmain"; then | |
5547 # See if we are running on zsh, and set the options which allow our commands through | |
5548 # without removal of \ escapes. | |
5549 if test -n "${ZSH_VERSION+set}" ; then | |
5550 setopt NO_GLOB_SUBST | |
5551 fi | |
5552 # Now quote all the things that may contain metacharacters while being | |
5553 # careful not to overquote the AC_SUBSTed values. We take copies of the | |
5554 # variables and quote the copies for generation of the libtool script. | |
5555 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ | |
5556 SED SHELL STRIP \ | |
5557 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | |
5558 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | |
5559 deplibs_check_method reload_flag reload_cmds need_locks \ | |
5560 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | |
5561 lt_cv_sys_global_symbol_to_c_name_address \ | |
5562 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | |
5563 old_postinstall_cmds old_postuninstall_cmds \ | |
5564 _LT_AC_TAGVAR(compiler, $1) \ | |
5565 _LT_AC_TAGVAR(CC, $1) \ | |
5566 _LT_AC_TAGVAR(LD, $1) \ | |
5567 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ | |
5568 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ | |
5569 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ | |
5570 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ | |
5571 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ | |
5572 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ | |
5573 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ | |
5574 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ | |
5575 _LT_AC_TAGVAR(old_archive_cmds, $1) \ | |
5576 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ | |
5577 _LT_AC_TAGVAR(predep_objects, $1) \ | |
5578 _LT_AC_TAGVAR(postdep_objects, $1) \ | |
5579 _LT_AC_TAGVAR(predeps, $1) \ | |
5580 _LT_AC_TAGVAR(postdeps, $1) \ | |
5581 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ | |
5582 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ | |
5583 _LT_AC_TAGVAR(archive_cmds, $1) \ | |
5584 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ | |
5585 _LT_AC_TAGVAR(postinstall_cmds, $1) \ | |
5586 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ | |
5587 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ | |
5588 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ | |
5589 _LT_AC_TAGVAR(no_undefined_flag, $1) \ | |
5590 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ | |
5591 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ | |
5592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ | |
5593 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ | |
5594 _LT_AC_TAGVAR(hardcode_automatic, $1) \ | |
5595 _LT_AC_TAGVAR(module_cmds, $1) \ | |
5596 _LT_AC_TAGVAR(module_expsym_cmds, $1) \ | |
5597 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ | |
5598 _LT_AC_TAGVAR(fix_srcfile_path, $1) \ | |
5599 _LT_AC_TAGVAR(exclude_expsyms, $1) \ | |
5600 _LT_AC_TAGVAR(include_expsyms, $1); do | |
5601 | |
5602 case $var in | |
5603 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ | |
5604 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ | |
5605 _LT_AC_TAGVAR(archive_cmds, $1) | \ | |
5606 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ | |
5607 _LT_AC_TAGVAR(module_cmds, $1) | \ | |
5608 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ | |
5609 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ | |
5610 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ | |
5611 extract_expsyms_cmds | reload_cmds | finish_cmds | \ | |
5612 postinstall_cmds | postuninstall_cmds | \ | |
5613 old_postinstall_cmds | old_postuninstall_cmds | \ | |
5614 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | |
5615 # Double-quote double-evaled strings. | |
5616 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | |
5617 ;; | |
5618 *) | |
5619 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | |
5620 ;; | |
5621 esac | |
5622 done | |
5623 | |
5624 case $lt_echo in | |
5625 *'\[$]0 --fallback-echo"') | |
5626 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` | |
5627 ;; | |
5628 esac | |
5629 | |
5630 ifelse([$1], [], | |
5631 [cfgfile="${ofile}T" | |
5632 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 | |
5633 $rm -f "$cfgfile" | |
5634 AC_MSG_NOTICE([creating $ofile])], | |
5635 [cfgfile="$ofile"]) | |
5636 | |
5637 cat <<__EOF__ >> "$cfgfile" | |
5638 ifelse([$1], [], | |
5639 [#! $SHELL | |
5640 | |
5641 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
5642 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
5643 # NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
5644 # | |
5645 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 | |
5646 # Free Software Foundation, Inc. | |
5647 # | |
5648 # This file is part of GNU Libtool: | |
5649 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
5650 # | |
5651 # This program is free software; you can redistribute it and/or modify | |
5652 # it under the terms of the GNU General Public License as published by | |
5653 # the Free Software Foundation; either version 2 of the License, or | |
5654 # (at your option) any later version. | |
5655 # | |
5656 # This program is distributed in the hope that it will be useful, but | |
5657 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
5658 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5659 # General Public License for more details. | |
5660 # | |
5661 # You should have received a copy of the GNU General Public License | |
5662 # along with this program; if not, write to the Free Software | |
5663 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
5664 # | |
5665 # As a special exception to the GNU General Public License, if you | |
5666 # distribute this file as part of a program that contains a | |
5667 # configuration script generated by Autoconf, you may include it under | |
5668 # the same distribution terms that you use for the rest of that program. | |
5669 | |
5670 # A sed program that does not truncate output. | |
5671 SED=$lt_SED | |
5672 | |
5673 # Sed that helps us avoid accidentally triggering echo(1) options like -n. | |
5674 Xsed="$SED -e 1s/^X//" | |
5675 | |
5676 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
5677 # if CDPATH is set. | |
5678 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
5679 | |
5680 # The names of the tagged configurations supported by this script. | |
5681 available_tags= | |
5682 | |
5683 # ### BEGIN LIBTOOL CONFIG], | |
5684 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) | |
5685 | |
5686 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
5687 | |
5688 # Shell to use when invoking shell scripts. | |
5689 SHELL=$lt_SHELL | |
5690 | |
5691 # Whether or not to build shared libraries. | |
5692 build_libtool_libs=$enable_shared | |
5693 | |
5694 # Whether or not to build static libraries. | |
5695 build_old_libs=$enable_static | |
5696 | |
5697 # Whether or not to add -lc for building shared libraries. | |
5698 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) | |
5699 | |
5700 # Whether or not to disallow shared libs when runtime libs are static | |
5701 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) | |
5702 | |
5703 # Whether or not to optimize for fast installation. | |
5704 fast_install=$enable_fast_install | |
5705 | |
5706 # The host system. | |
5707 host_alias=$host_alias | |
5708 host=$host | |
5709 host_os=$host_os | |
5710 | |
5711 # The build system. | |
5712 build_alias=$build_alias | |
5713 build=$build | |
5714 build_os=$build_os | |
5715 | |
5716 # An echo program that does not interpret backslashes. | |
5717 echo=$lt_echo | |
5718 | |
5719 # The archiver. | |
5720 AR=$lt_AR | |
5721 AR_FLAGS=$lt_AR_FLAGS | |
5722 | |
5723 # A C compiler. | |
5724 LTCC=$lt_LTCC | |
5725 | |
5726 # LTCC compiler flags. | |
5727 LTCFLAGS=$lt_LTCFLAGS | |
5728 | |
5729 # A language-specific compiler. | |
5730 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) | |
5731 | |
5732 # Is the compiler the GNU C compiler? | |
5733 with_gcc=$_LT_AC_TAGVAR(GCC, $1) | |
5734 | |
5735 # An ERE matcher. | |
5736 EGREP=$lt_EGREP | |
5737 | |
5738 # The linker used to build libraries. | |
5739 LD=$lt_[]_LT_AC_TAGVAR(LD, $1) | |
5740 | |
5741 # Whether we need hard or soft links. | |
5742 LN_S=$lt_LN_S | |
5743 | |
5744 # A BSD-compatible nm program. | |
5745 NM=$lt_NM | |
5746 | |
5747 # A symbol stripping program | |
5748 STRIP=$lt_STRIP | |
5749 | |
5750 # Used to examine libraries when file_magic_cmd begins "file" | |
5751 MAGIC_CMD=$MAGIC_CMD | |
5752 | |
5753 # Used on cygwin: DLL creation program. | |
5754 DLLTOOL="$DLLTOOL" | |
5755 | |
5756 # Used on cygwin: object dumper. | |
5757 OBJDUMP="$OBJDUMP" | |
5758 | |
5759 # Used on cygwin: assembler. | |
5760 AS="$AS" | |
5761 | |
5762 # The name of the directory that contains temporary libtool files. | |
5763 objdir=$objdir | |
5764 | |
5765 # How to create reloadable object files. | |
5766 reload_flag=$lt_reload_flag | |
5767 reload_cmds=$lt_reload_cmds | |
5768 | |
5769 # How to pass a linker flag through the compiler. | |
5770 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | |
5771 | |
5772 # Object file suffix (normally "o"). | |
5773 objext="$ac_objext" | |
5774 | |
5775 # Old archive suffix (normally "a"). | |
5776 libext="$libext" | |
5777 | |
5778 # Shared library suffix (normally ".so"). | |
5779 shrext_cmds='$shrext_cmds' | |
5780 | |
5781 # Executable file suffix (normally ""). | |
5782 exeext="$exeext" | |
5783 | |
5784 # Additional compiler flags for building library objects. | |
5785 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) | |
5786 pic_mode=$pic_mode | |
5787 | |
5788 # What is the maximum length of a command? | |
5789 max_cmd_len=$lt_cv_sys_max_cmd_len | |
5790 | |
5791 # Does compiler simultaneously support -c and -o options? | |
5792 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) | |
5793 | |
5794 # Must we lock files when doing compilation? | |
5795 need_locks=$lt_need_locks | |
5796 | |
5797 # Do we need the lib prefix for modules? | |
5798 need_lib_prefix=$need_lib_prefix | |
5799 | |
5800 # Do we need a version for libraries? | |
5801 need_version=$need_version | |
5802 | |
5803 # Whether dlopen is supported. | |
5804 dlopen_support=$enable_dlopen | |
5805 | |
5806 # Whether dlopen of programs is supported. | |
5807 dlopen_self=$enable_dlopen_self | |
5808 | |
5809 # Whether dlopen of statically linked programs is supported. | |
5810 dlopen_self_static=$enable_dlopen_self_static | |
5811 | |
5812 # Compiler flag to prevent dynamic linking. | |
5813 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) | |
5814 | |
5815 # Compiler flag to turn off builtin functions. | |
5816 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) | |
5817 | |
5818 # Compiler flag to allow reflexive dlopens. | |
5819 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) | |
5820 | |
5821 # Compiler flag to generate shared objects directly from archives. | |
5822 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) | |
5823 | |
5824 # Compiler flag to generate thread-safe objects. | |
5825 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) | |
5826 | |
5827 # Library versioning type. | |
5828 version_type=$version_type | |
5829 | |
5830 # Format of library name prefix. | |
5831 libname_spec=$lt_libname_spec | |
5832 | |
5833 # List of archive names. First name is the real one, the rest are links. | |
5834 # The last name is the one that the linker finds with -lNAME. | |
5835 library_names_spec=$lt_library_names_spec | |
5836 | |
5837 # The coded name of the library, if different from the real name. | |
5838 soname_spec=$lt_soname_spec | |
5839 | |
5840 # Commands used to build and install an old-style archive. | |
5841 RANLIB=$lt_RANLIB | |
5842 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) | |
5843 old_postinstall_cmds=$lt_old_postinstall_cmds | |
5844 old_postuninstall_cmds=$lt_old_postuninstall_cmds | |
5845 | |
5846 # Create an old-style archive from a shared archive. | |
5847 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | |
5848 | |
5849 # Create a temporary old-style archive to link instead of a shared archive. | |
5850 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | |
5851 | |
5852 # Commands used to build and install a shared archive. | |
5853 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) | |
5854 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) | |
5855 postinstall_cmds=$lt_postinstall_cmds | |
5856 postuninstall_cmds=$lt_postuninstall_cmds | |
5857 | |
5858 # Commands used to build a loadable module (assumed same as above if empty) | |
5859 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) | |
5860 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) | |
5861 | |
5862 # Commands to strip libraries. | |
5863 old_striplib=$lt_old_striplib | |
5864 striplib=$lt_striplib | |
5865 | |
5866 # Dependencies to place before the objects being linked to create a | |
5867 # shared library. | |
5868 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) | |
5869 | |
5870 # Dependencies to place after the objects being linked to create a | |
5871 # shared library. | |
5872 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | |
5873 | |
5874 # Dependencies to place before the objects being linked to create a | |
5875 # shared library. | |
5876 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) | |
5877 | |
5878 # Dependencies to place after the objects being linked to create a | |
5879 # shared library. | |
5880 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) | |
5881 | |
5882 # The directories searched by this compiler when creating a shared | |
5883 # library | |
5884 compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) | |
5885 | |
5886 # The library search path used internally by the compiler when linking | |
5887 # a shared library. | |
5888 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | |
5889 | |
5890 # Method to check whether dependent libraries are shared objects. | |
5891 deplibs_check_method=$lt_deplibs_check_method | |
5892 | |
5893 # Command to use when deplibs_check_method == file_magic. | |
5894 file_magic_cmd=$lt_file_magic_cmd | |
5895 | |
5896 # Flag that allows shared libraries with undefined symbols to be built. | |
5897 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) | |
5898 | |
5899 # Flag that forces no undefined symbols. | |
5900 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) | |
5901 | |
5902 # Commands used to finish a libtool library installation in a directory. | |
5903 finish_cmds=$lt_finish_cmds | |
5904 | |
5905 # Same as above, but a single script fragment to be evaled but not shown. | |
5906 finish_eval=$lt_finish_eval | |
5907 | |
5908 # Take the output of nm and produce a listing of raw symbols and C names. | |
5909 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | |
5910 | |
5911 # Transform the output of nm in a proper C declaration | |
5912 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | |
5913 | |
5914 # Transform the output of nm in a C name address pair | |
5915 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | |
5916 | |
5917 # This is the shared library runtime path variable. | |
5918 runpath_var=$runpath_var | |
5919 | |
5920 # This is the shared library path variable. | |
5921 shlibpath_var=$shlibpath_var | |
5922 | |
5923 # Is shlibpath searched before the hard-coded library search path? | |
5924 shlibpath_overrides_runpath=$shlibpath_overrides_runpath | |
5925 | |
5926 # How to hardcode a shared library path into an executable. | |
5927 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) | |
5928 | |
5929 # Whether we should hardcode library paths into libraries. | |
5930 hardcode_into_libs=$hardcode_into_libs | |
5931 | |
5932 # Flag to hardcode \$libdir into a binary during linking. | |
5933 # This must work even if \$libdir does not exist. | |
5934 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) | |
5935 | |
5936 # If ld is used when linking, flag to hardcode \$libdir into | |
5937 # a binary during linking. This must work even if \$libdir does | |
5938 # not exist. | |
5939 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) | |
5940 | |
5941 # Whether we need a single -rpath flag with a separated argument. | |
5942 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) | |
5943 | |
5944 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | |
5945 # resulting binary. | |
5946 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) | |
5947 | |
5948 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |
5949 # resulting binary. | |
5950 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) | |
5951 | |
5952 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | |
5953 # the resulting binary. | |
5954 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) | |
5955 | |
5956 # Set to yes if building a shared library automatically hardcodes DIR into the library | |
5957 # and all subsequent libraries and executables linked against it. | |
5958 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) | |
5959 | |
5960 # Variables whose values should be saved in libtool wrapper scripts and | |
5961 # restored at relink time. | |
5962 variables_saved_for_relink="$variables_saved_for_relink" | |
5963 | |
5964 # Whether libtool must link a program against all its dependency libraries. | |
5965 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) | |
5966 | |
5967 # Compile-time system search path for libraries | |
5968 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | |
5969 | |
5970 # Run-time system search path for libraries | |
5971 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | |
5972 | |
5973 # Fix the shell variable \$srcfile for the compiler. | |
5974 fix_srcfile_path=$lt_fix_srcfile_path | |
5975 | |
5976 # Set to yes if exported symbols are required. | |
5977 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) | |
5978 | |
5979 # The commands to list exported symbols. | |
5980 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) | |
5981 | |
5982 # The commands to extract the exported symbol list from a shared archive. | |
5983 extract_expsyms_cmds=$lt_extract_expsyms_cmds | |
5984 | |
5985 # Symbols that should not be listed in the preloaded symbols. | |
5986 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) | |
5987 | |
5988 # Symbols that must always be exported. | |
5989 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) | |
5990 | |
5991 ifelse([$1],[], | |
5992 [# ### END LIBTOOL CONFIG], | |
5993 [# ### END LIBTOOL TAG CONFIG: $tagname]) | |
5994 | |
5995 __EOF__ | |
5996 | |
5997 ifelse([$1],[], [ | |
5998 case $host_os in | |
5999 aix3*) | |
6000 cat <<\EOF >> "$cfgfile" | |
6001 | |
6002 # AIX sometimes has problems with the GCC collect2 program. For some | |
6003 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
6004 # vanish in a puff of smoke. | |
6005 if test "X${COLLECT_NAMES+set}" != Xset; then | |
6006 COLLECT_NAMES= | |
6007 export COLLECT_NAMES | |
6008 fi | |
6009 EOF | |
6010 ;; | |
6011 esac | |
6012 | |
6013 # We use sed instead of cat because bash on DJGPP gets confused if | |
6014 # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
6015 # text mode, it properly converts lines to CR/LF. This bash problem | |
6016 # is reportedly fixed, but why not run on old versions too? | |
6017 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) | |
6018 | |
6019 mv -f "$cfgfile" "$ofile" || \ | |
6020 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | |
6021 chmod +x "$ofile" | |
6022 ]) | |
6023 else | |
6024 # If there is no Makefile yet, we rely on a make rule to execute | |
6025 # `config.status --recheck' to rerun these tests and create the | |
6026 # libtool script then. | |
6027 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | |
6028 if test -f "$ltmain_in"; then | |
6029 test -f Makefile && make "$ltmain" | |
6030 fi | |
6031 fi | |
6032 ])# AC_LIBTOOL_CONFIG | |
6033 | |
6034 | |
6035 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) | |
6036 # ------------------------------------------- | |
6037 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], | |
6038 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | |
6039 | |
6040 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
6041 | |
6042 if test "$GCC" = yes; then | |
6043 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
6044 | |
6045 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | |
6046 lt_cv_prog_compiler_rtti_exceptions, | |
6047 [-fno-rtti -fno-exceptions], [], | |
6048 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | |
6049 fi | |
6050 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI | |
6051 | |
6052 | |
6053 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
6054 # --------------------------------- | |
6055 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], | |
6056 [AC_REQUIRE([AC_CANONICAL_HOST]) | |
6057 AC_REQUIRE([LT_AC_PROG_SED]) | |
6058 AC_REQUIRE([AC_PROG_NM]) | |
6059 AC_REQUIRE([AC_OBJEXT]) | |
6060 # Check for command to grab the raw symbol name followed by C symbol from nm. | |
6061 AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | |
6062 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | |
6063 [ | |
6064 # These are sane defaults that work on at least a few old systems. | |
6065 # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
6066 | |
6067 # Character class describing NM global symbol codes. | |
6068 symcode='[[BCDEGRST]]' | |
6069 | |
6070 # Regexp to match symbols that can be accessed directly from C. | |
6071 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
6072 | |
6073 # Transform an extracted symbol line into a proper C declaration | |
6074 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" | |
6075 | |
6076 # Transform an extracted symbol line into symbol name and symbol address | |
6077 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'" | |
6078 | |
6079 # Define system-specific variables. | |
6080 case $host_os in | |
6081 aix*) | |
6082 symcode='[[BCDT]]' | |
6083 ;; | |
6084 cygwin* | mingw* | pw32*) | |
6085 symcode='[[ABCDGISTW]]' | |
6086 ;; | |
6087 hpux*) # Its linker distinguishes data from code symbols | |
6088 if test "$host_cpu" = ia64; then | |
6089 symcode='[[ABCDEGRST]]' | |
6090 fi | |
6091 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
6092 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'" | |
6093 ;; | |
6094 linux* | k*bsd*-gnu) | |
6095 if test "$host_cpu" = ia64; then | |
6096 symcode='[[ABCDGIRSTW]]' | |
6097 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
6098 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'" | |
6099 fi | |
6100 ;; | |
6101 irix* | nonstopux*) | |
6102 symcode='[[BCDEGRST]]' | |
6103 ;; | |
6104 osf*) | |
6105 symcode='[[BCDEGQRST]]' | |
6106 ;; | |
6107 solaris*) | |
6108 symcode='[[BDRT]]' | |
6109 ;; | |
6110 sco3.2v5*) | |
6111 symcode='[[DT]]' | |
6112 ;; | |
6113 sysv4.2uw2*) | |
6114 symcode='[[DT]]' | |
6115 ;; | |
6116 sysv5* | sco5v6* | unixware* | OpenUNIX*) | |
6117 symcode='[[ABDT]]' | |
6118 ;; | |
6119 sysv4) | |
6120 symcode='[[DFNSTU]]' | |
6121 ;; | |
6122 esac | |
6123 | |
6124 # Handle CRLF in mingw tool chain | |
6125 opt_cr= | |
6126 case $build_os in | |
6127 mingw*) | |
6128 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
6129 ;; | |
6130 esac | |
6131 | |
6132 # If we're using GNU nm, then use its standard symbol codes. | |
6133 case `$NM -V 2>&1` in | |
6134 *GNU* | *'with BFD'*) | |
6135 symcode='[[ABCDGIRSTW]]' ;; | |
6136 esac | |
6137 | |
6138 # Try without a prefix undercore, then with it. | |
6139 for ac_symprfx in "" "_"; do | |
6140 | |
6141 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | |
6142 symxfrm="\\1 $ac_symprfx\\2 \\2" | |
6143 | |
6144 # Write the raw and C identifiers. | |
6145 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
6146 | |
6147 # Check to see that the pipe works correctly. | |
6148 pipe_works=no | |
6149 | |
6150 rm -f conftest* | |
6151 cat > conftest.$ac_ext <<EOF | |
6152 #ifdef __cplusplus | |
6153 extern "C" { | |
6154 #endif | |
6155 char nm_test_var; | |
6156 void nm_test_func(){} | |
6157 #ifdef __cplusplus | |
6158 } | |
6159 #endif | |
6160 int main(){nm_test_var='a';nm_test_func();return(0);} | |
6161 EOF | |
6162 | |
6163 if AC_TRY_EVAL(ac_compile); then | |
6164 # Now try to grab the symbols. | |
6165 nlist=conftest.nm | |
6166 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | |
6167 # Try sorting and uniquifying the output. | |
6168 if sort "$nlist" | uniq > "$nlist"T; then | |
6169 mv -f "$nlist"T "$nlist" | |
6170 else | |
6171 rm -f "$nlist"T | |
6172 fi | |
6173 | |
6174 # Make sure that we snagged all the symbols we need. | |
6175 if grep ' nm_test_var$' "$nlist" >/dev/null; then | |
6176 if grep ' nm_test_func$' "$nlist" >/dev/null; then | |
6177 cat <<EOF > conftest.$ac_ext | |
6178 #ifdef __cplusplus | |
6179 extern "C" { | |
6180 #endif | |
6181 | |
6182 EOF | |
6183 # Now generate the symbol file. | |
6184 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' | |
6185 | |
6186 cat <<EOF >> conftest.$ac_ext | |
6187 #if defined (__STDC__) && __STDC__ | |
6188 # define lt_ptr_t void * | |
6189 #else | |
6190 # define lt_ptr_t char * | |
6191 # define const | |
6192 #endif | |
6193 | |
6194 /* The mapping between symbol names and symbols. */ | |
6195 const struct { | |
6196 const char *name; | |
6197 lt_ptr_t address; | |
6198 } | |
6199 lt_preloaded_symbols[[]] = | |
6200 { | |
6201 EOF | |
6202 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext | |
6203 cat <<\EOF >> conftest.$ac_ext | |
6204 {0, (lt_ptr_t) 0} | |
6205 }; | |
6206 | |
6207 #ifdef __cplusplus | |
6208 } | |
6209 #endif | |
6210 EOF | |
6211 # Now try linking the two files. | |
6212 mv conftest.$ac_objext conftstm.$ac_objext | |
6213 lt_save_LIBS="$LIBS" | |
6214 lt_save_CFLAGS="$CFLAGS" | |
6215 LIBS="conftstm.$ac_objext" | |
6216 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | |
6217 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | |
6218 pipe_works=yes | |
6219 fi | |
6220 LIBS="$lt_save_LIBS" | |
6221 CFLAGS="$lt_save_CFLAGS" | |
6222 else | |
6223 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | |
6224 fi | |
6225 else | |
6226 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | |
6227 fi | |
6228 else | |
6229 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | |
6230 fi | |
6231 else | |
6232 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | |
6233 cat conftest.$ac_ext >&5 | |
6234 fi | |
6235 rm -rf conftest* conftst* | |
6236 | |
6237 # Do not use the global_symbol_pipe unless it works. | |
6238 if test "$pipe_works" = yes; then | |
6239 break | |
6240 else | |
6241 lt_cv_sys_global_symbol_pipe= | |
6242 fi | |
6243 done | |
6244 ]) | |
6245 if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
6246 lt_cv_sys_global_symbol_to_cdecl= | |
6247 fi | |
6248 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
6249 AC_MSG_RESULT(failed) | |
6250 else | |
6251 AC_MSG_RESULT(ok) | |
6252 fi | |
6253 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
6254 | |
6255 | |
6256 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) | |
6257 # --------------------------------------- | |
6258 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], | |
6259 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= | |
6260 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6261 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= | |
6262 | |
6263 AC_MSG_CHECKING([for $compiler option to produce PIC]) | |
6264 ifelse([$1],[CXX],[ | |
6265 # C++ specific cases for pic, static, wl, etc. | |
6266 if test "$GXX" = yes; then | |
6267 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6268 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
6269 | |
6270 case $host_os in | |
6271 aix*) | |
6272 # All AIX code is PIC. | |
6273 if test "$host_cpu" = ia64; then | |
6274 # AIX 5 now supports IA64 processor | |
6275 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6276 fi | |
6277 ;; | |
6278 amigaos*) | |
6279 # FIXME: we need at least 68020 code to build shared libraries, but | |
6280 # adding the `-m68020' flag to GCC prevents building anything better, | |
6281 # like `-m68040'. | |
6282 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
6283 ;; | |
6284 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
6285 # PIC is the default for these OSes. | |
6286 ;; | |
6287 mingw* | cygwin* | os2* | pw32*) | |
6288 # This hack is so that the source file can tell whether it is being | |
6289 # built for inclusion in a dll (and should export symbols for example). | |
6290 # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
6291 # (--disable-auto-import) libraries | |
6292 m4_if([$1], [GCJ], [], | |
6293 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
6294 ;; | |
6295 darwin* | rhapsody*) | |
6296 # PIC is the default on this platform | |
6297 # Common symbols not allowed in MH_DYLIB files | |
6298 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
6299 ;; | |
6300 *djgpp*) | |
6301 # DJGPP does not support shared libraries at all | |
6302 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6303 ;; | |
6304 interix[[3-9]]*) | |
6305 # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
6306 # Instead, we relocate shared libraries at runtime. | |
6307 ;; | |
6308 sysv4*MP*) | |
6309 if test -d /usr/nec; then | |
6310 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
6311 fi | |
6312 ;; | |
6313 hpux*) | |
6314 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
6315 # not for PA HP-UX. | |
6316 case $host_cpu in | |
6317 hppa*64*|ia64*) | |
6318 ;; | |
6319 *) | |
6320 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
6321 ;; | |
6322 esac | |
6323 ;; | |
6324 *) | |
6325 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
6326 ;; | |
6327 esac | |
6328 else | |
6329 case $host_os in | |
6330 aix[[4-9]]*) | |
6331 # All AIX code is PIC. | |
6332 if test "$host_cpu" = ia64; then | |
6333 # AIX 5 now supports IA64 processor | |
6334 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6335 else | |
6336 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
6337 fi | |
6338 ;; | |
6339 chorus*) | |
6340 case $cc_basename in | |
6341 cxch68*) | |
6342 # Green Hills C++ Compiler | |
6343 # _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" | |
6344 ;; | |
6345 esac | |
6346 ;; | |
6347 darwin*) | |
6348 # PIC is the default on this platform | |
6349 # Common symbols not allowed in MH_DYLIB files | |
6350 case $cc_basename in | |
6351 xlc*) | |
6352 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' | |
6353 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6354 ;; | |
6355 esac | |
6356 ;; | |
6357 dgux*) | |
6358 case $cc_basename in | |
6359 ec++*) | |
6360 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6361 ;; | |
6362 ghcx*) | |
6363 # Green Hills C++ Compiler | |
6364 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
6365 ;; | |
6366 *) | |
6367 ;; | |
6368 esac | |
6369 ;; | |
6370 freebsd* | dragonfly*) | |
6371 # FreeBSD uses GNU C++ | |
6372 ;; | |
6373 hpux9* | hpux10* | hpux11*) | |
6374 case $cc_basename in | |
6375 CC*) | |
6376 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6377 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
6378 if test "$host_cpu" != ia64; then | |
6379 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
6380 fi | |
6381 ;; | |
6382 aCC*) | |
6383 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6384 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
6385 case $host_cpu in | |
6386 hppa*64*|ia64*) | |
6387 # +Z the default | |
6388 ;; | |
6389 *) | |
6390 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
6391 ;; | |
6392 esac | |
6393 ;; | |
6394 *) | |
6395 ;; | |
6396 esac | |
6397 ;; | |
6398 interix*) | |
6399 # This is c89, which is MS Visual C++ (no shared libs) | |
6400 # Anyone wants to do a port? | |
6401 ;; | |
6402 irix5* | irix6* | nonstopux*) | |
6403 case $cc_basename in | |
6404 CC*) | |
6405 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6406 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6407 # CC pic flag -KPIC is the default. | |
6408 ;; | |
6409 *) | |
6410 ;; | |
6411 esac | |
6412 ;; | |
6413 linux* | k*bsd*-gnu) | |
6414 case $cc_basename in | |
6415 KCC*) | |
6416 # KAI C++ Compiler | |
6417 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
6418 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
6419 ;; | |
6420 icpc* | ecpc*) | |
6421 # Intel C++ | |
6422 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6423 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6424 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
6425 ;; | |
6426 pgCC* | pgcpp*) | |
6427 # Portland Group C++ compiler. | |
6428 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6429 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
6430 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6431 ;; | |
6432 cxx*) | |
6433 # Compaq C++ | |
6434 # Make sure the PIC flag is empty. It appears that all Alpha | |
6435 # Linux and Compaq Tru64 Unix objects are PIC. | |
6436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6437 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6438 ;; | |
6439 *) | |
6440 case `$CC -V 2>&1 | sed 5q` in | |
6441 *Sun\ C*) | |
6442 # Sun C++ 5.9 | |
6443 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6444 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6445 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
6446 ;; | |
6447 esac | |
6448 ;; | |
6449 esac | |
6450 ;; | |
6451 lynxos*) | |
6452 ;; | |
6453 m88k*) | |
6454 ;; | |
6455 mvs*) | |
6456 case $cc_basename in | |
6457 cxx*) | |
6458 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | |
6459 ;; | |
6460 *) | |
6461 ;; | |
6462 esac | |
6463 ;; | |
6464 netbsd*) | |
6465 ;; | |
6466 osf3* | osf4* | osf5*) | |
6467 case $cc_basename in | |
6468 KCC*) | |
6469 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
6470 ;; | |
6471 RCC*) | |
6472 # Rational C++ 2.4.1 | |
6473 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
6474 ;; | |
6475 cxx*) | |
6476 # Digital/Compaq C++ | |
6477 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6478 # Make sure the PIC flag is empty. It appears that all Alpha | |
6479 # Linux and Compaq Tru64 Unix objects are PIC. | |
6480 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6481 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6482 ;; | |
6483 *) | |
6484 ;; | |
6485 esac | |
6486 ;; | |
6487 psos*) | |
6488 ;; | |
6489 solaris*) | |
6490 case $cc_basename in | |
6491 CC*) | |
6492 # Sun C++ 4.2, 5.x and Centerline C++ | |
6493 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6494 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6495 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
6496 ;; | |
6497 gcx*) | |
6498 # Green Hills C++ Compiler | |
6499 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
6500 ;; | |
6501 *) | |
6502 ;; | |
6503 esac | |
6504 ;; | |
6505 sunos4*) | |
6506 case $cc_basename in | |
6507 CC*) | |
6508 # Sun C++ 4.x | |
6509 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
6510 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6511 ;; | |
6512 lcc*) | |
6513 # Lucid | |
6514 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
6515 ;; | |
6516 *) | |
6517 ;; | |
6518 esac | |
6519 ;; | |
6520 tandem*) | |
6521 case $cc_basename in | |
6522 NCC*) | |
6523 # NonStop-UX NCC 3.20 | |
6524 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6525 ;; | |
6526 *) | |
6527 ;; | |
6528 esac | |
6529 ;; | |
6530 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
6531 case $cc_basename in | |
6532 CC*) | |
6533 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6534 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6535 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6536 ;; | |
6537 esac | |
6538 ;; | |
6539 vxworks*) | |
6540 ;; | |
6541 *) | |
6542 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
6543 ;; | |
6544 esac | |
6545 fi | |
6546 ], | |
6547 [ | |
6548 if test "$GCC" = yes; then | |
6549 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6550 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
6551 | |
6552 case $host_os in | |
6553 aix*) | |
6554 # All AIX code is PIC. | |
6555 if test "$host_cpu" = ia64; then | |
6556 # AIX 5 now supports IA64 processor | |
6557 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6558 fi | |
6559 ;; | |
6560 | |
6561 amigaos*) | |
6562 # FIXME: we need at least 68020 code to build shared libraries, but | |
6563 # adding the `-m68020' flag to GCC prevents building anything better, | |
6564 # like `-m68040'. | |
6565 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
6566 ;; | |
6567 | |
6568 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
6569 # PIC is the default for these OSes. | |
6570 ;; | |
6571 | |
6572 mingw* | cygwin* | pw32* | os2*) | |
6573 # This hack is so that the source file can tell whether it is being | |
6574 # built for inclusion in a dll (and should export symbols for example). | |
6575 # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
6576 # (--disable-auto-import) libraries | |
6577 m4_if([$1], [GCJ], [], | |
6578 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
6579 ;; | |
6580 | |
6581 darwin* | rhapsody*) | |
6582 # PIC is the default on this platform | |
6583 # Common symbols not allowed in MH_DYLIB files | |
6584 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
6585 ;; | |
6586 | |
6587 interix[[3-9]]*) | |
6588 # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
6589 # Instead, we relocate shared libraries at runtime. | |
6590 ;; | |
6591 | |
6592 msdosdjgpp*) | |
6593 # Just because we use GCC doesn't mean we suddenly get shared libraries | |
6594 # on systems that don't support them. | |
6595 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
6596 enable_shared=no | |
6597 ;; | |
6598 | |
6599 sysv4*MP*) | |
6600 if test -d /usr/nec; then | |
6601 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
6602 fi | |
6603 ;; | |
6604 | |
6605 hpux*) | |
6606 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
6607 # not for PA HP-UX. | |
6608 case $host_cpu in | |
6609 hppa*64*|ia64*) | |
6610 # +Z the default | |
6611 ;; | |
6612 *) | |
6613 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
6614 ;; | |
6615 esac | |
6616 ;; | |
6617 | |
6618 *) | |
6619 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
6620 ;; | |
6621 esac | |
6622 else | |
6623 # PORTME Check for flag to pass linker flags through the system compiler. | |
6624 case $host_os in | |
6625 aix*) | |
6626 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6627 if test "$host_cpu" = ia64; then | |
6628 # AIX 5 now supports IA64 processor | |
6629 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6630 else | |
6631 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
6632 fi | |
6633 ;; | |
6634 darwin*) | |
6635 # PIC is the default on this platform | |
6636 # Common symbols not allowed in MH_DYLIB files | |
6637 case $cc_basename in | |
6638 xlc*) | |
6639 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' | |
6640 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6641 ;; | |
6642 esac | |
6643 ;; | |
6644 | |
6645 mingw* | cygwin* | pw32* | os2*) | |
6646 # This hack is so that the source file can tell whether it is being | |
6647 # built for inclusion in a dll (and should export symbols for example). | |
6648 m4_if([$1], [GCJ], [], | |
6649 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
6650 ;; | |
6651 | |
6652 hpux9* | hpux10* | hpux11*) | |
6653 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6654 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
6655 # not for PA HP-UX. | |
6656 case $host_cpu in | |
6657 hppa*64*|ia64*) | |
6658 # +Z the default | |
6659 ;; | |
6660 *) | |
6661 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
6662 ;; | |
6663 esac | |
6664 # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
6665 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
6666 ;; | |
6667 | |
6668 irix5* | irix6* | nonstopux*) | |
6669 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6670 # PIC (with -KPIC) is the default. | |
6671 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6672 ;; | |
6673 | |
6674 newsos6) | |
6675 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6676 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6677 ;; | |
6678 | |
6679 linux* | k*bsd*-gnu) | |
6680 case $cc_basename in | |
6681 icc* | ecc*) | |
6682 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6683 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6684 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
6685 ;; | |
6686 pgcc* | pgf77* | pgf90* | pgf95*) | |
6687 # Portland Group compilers (*not* the Pentium gcc compiler, | |
6688 # which looks to be a dead project) | |
6689 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6690 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
6691 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6692 ;; | |
6693 ccc*) | |
6694 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6695 # All Alpha code is PIC. | |
6696 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6697 ;; | |
6698 *) | |
6699 case `$CC -V 2>&1 | sed 5q` in | |
6700 *Sun\ C*) | |
6701 # Sun C 5.9 | |
6702 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6703 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6704 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6705 ;; | |
6706 *Sun\ F*) | |
6707 # Sun Fortran 8.3 passes all unrecognized flags to the linker | |
6708 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6709 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6710 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' | |
6711 ;; | |
6712 esac | |
6713 ;; | |
6714 esac | |
6715 ;; | |
6716 | |
6717 osf3* | osf4* | osf5*) | |
6718 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6719 # All OSF/1 code is PIC. | |
6720 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6721 ;; | |
6722 | |
6723 rdos*) | |
6724 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
6725 ;; | |
6726 | |
6727 solaris*) | |
6728 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6729 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6730 case $cc_basename in | |
6731 f77* | f90* | f95*) | |
6732 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; | |
6733 *) | |
6734 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; | |
6735 esac | |
6736 ;; | |
6737 | |
6738 sunos4*) | |
6739 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
6740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
6741 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6742 ;; | |
6743 | |
6744 sysv4 | sysv4.2uw2* | sysv4.3*) | |
6745 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6746 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6747 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6748 ;; | |
6749 | |
6750 sysv4*MP*) | |
6751 if test -d /usr/nec ;then | |
6752 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | |
6753 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6754 fi | |
6755 ;; | |
6756 | |
6757 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
6758 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
6760 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6761 ;; | |
6762 | |
6763 unicos*) | |
6764 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
6765 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
6766 ;; | |
6767 | |
6768 uts4*) | |
6769 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
6770 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
6771 ;; | |
6772 | |
6773 *) | |
6774 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
6775 ;; | |
6776 esac | |
6777 fi | |
6778 ]) | |
6779 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) | |
6780 | |
6781 # | |
6782 # Check to make sure the PIC flag actually works. | |
6783 # | |
6784 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then | |
6785 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], | |
6786 _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), | |
6787 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], | |
6788 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in | |
6789 "" | " "*) ;; | |
6790 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; | |
6791 esac], | |
6792 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6793 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | |
6794 fi | |
6795 case $host_os in | |
6796 # For platforms which do not support PIC, -DPIC is meaningless: | |
6797 *djgpp*) | |
6798 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | |
6799 ;; | |
6800 *) | |
6801 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" | |
6802 ;; | |
6803 esac | |
6804 | |
6805 # | |
6806 # Check to make sure the static flag actually works. | |
6807 # | |
6808 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" | |
6809 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], | |
6810 _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), | |
6811 $lt_tmp_static_flag, | |
6812 [], | |
6813 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) | |
6814 ]) | |
6815 | |
6816 | |
6817 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) | |
6818 # ------------------------------------ | |
6819 # See if the linker supports building shared libraries. | |
6820 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], | |
6821 [AC_REQUIRE([LT_AC_PROG_SED])dnl | |
6822 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
6823 ifelse([$1],[CXX],[ | |
6824 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
6825 case $host_os in | |
6826 aix[[4-9]]*) | |
6827 # If we're using GNU nm, then we don't want the "-C" option. | |
6828 # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
6829 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | |
6830 _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' | |
6831 else | |
6832 _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' | |
6833 fi | |
6834 ;; | |
6835 pw32*) | |
6836 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | |
6837 ;; | |
6838 cygwin* | mingw*) | |
6839 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' | |
6840 ;; | |
6841 *) | |
6842 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
6843 ;; | |
6844 esac | |
6845 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
6846 ],[ | |
6847 runpath_var= | |
6848 _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
6849 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
6850 _LT_AC_TAGVAR(archive_cmds, $1)= | |
6851 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | |
6852 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= | |
6853 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= | |
6854 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
6855 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
6856 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= | |
6857 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
6858 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
6859 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
6860 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
6861 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | |
6862 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
6863 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | |
6864 _LT_AC_TAGVAR(hardcode_automatic, $1)=no | |
6865 _LT_AC_TAGVAR(module_cmds, $1)= | |
6866 _LT_AC_TAGVAR(module_expsym_cmds, $1)= | |
6867 _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
6868 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
6869 # include_expsyms should be a list of space-separated symbols to be *always* | |
6870 # included in the symbol list | |
6871 _LT_AC_TAGVAR(include_expsyms, $1)= | |
6872 # exclude_expsyms can be an extended regexp of symbols to exclude | |
6873 # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
6874 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
6875 # as well as any symbol that contains `d'. | |
6876 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
6877 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
6878 # platforms (ab)use it in PIC code, but their linkers get confused if | |
6879 # the symbol is explicitly referenced. Since portable code cannot | |
6880 # rely on this symbol name, it's probably fine to never include it in | |
6881 # preloaded symbol tables. | |
6882 # Exclude shared library initialization/finalization symbols. | |
6883 dnl Note also adjust exclude_expsyms for C++ above. | |
6884 extract_expsyms_cmds= | |
6885 # Just being paranoid about ensuring that cc_basename is set. | |
6886 _LT_CC_BASENAME([$compiler]) | |
6887 case $host_os in | |
6888 cygwin* | mingw* | pw32*) | |
6889 # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
6890 # When not using gcc, we currently assume that we are using | |
6891 # Microsoft Visual C++. | |
6892 if test "$GCC" != yes; then | |
6893 with_gnu_ld=no | |
6894 fi | |
6895 ;; | |
6896 interix*) | |
6897 # we just hope/assume this is gcc and not c89 (= MSVC++) | |
6898 with_gnu_ld=yes | |
6899 ;; | |
6900 openbsd*) | |
6901 with_gnu_ld=no | |
6902 ;; | |
6903 esac | |
6904 | |
6905 _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
6906 if test "$with_gnu_ld" = yes; then | |
6907 # If archive_cmds runs LD, not CC, wlarc should be empty | |
6908 wlarc='${wl}' | |
6909 | |
6910 # Set some defaults for GNU ld with shared library support. These | |
6911 # are reset later if shared libraries are not supported. Putting them | |
6912 # here allows them to be overridden if necessary. | |
6913 runpath_var=LD_RUN_PATH | |
6914 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
6915 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6916 # ancient GNU ld didn't support --whole-archive et. al. | |
6917 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then | |
6918 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
6919 else | |
6920 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
6921 fi | |
6922 supports_anon_versioning=no | |
6923 case `$LD -v 2>/dev/null` in | |
6924 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | |
6925 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | |
6926 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | |
6927 *\ 2.11.*) ;; # other 2.11 versions | |
6928 *) supports_anon_versioning=yes ;; | |
6929 esac | |
6930 | |
6931 # See if GNU ld supports shared libraries. | |
6932 case $host_os in | |
6933 aix[[3-9]]*) | |
6934 # On AIX/PPC, the GNU linker is very broken | |
6935 if test "$host_cpu" != ia64; then | |
6936 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
6937 cat <<EOF 1>&2 | |
6938 | |
6939 *** Warning: the GNU linker, at least up to release 2.9.1, is reported | |
6940 *** to be unable to reliably create shared libraries on AIX. | |
6941 *** Therefore, libtool is disabling shared libraries support. If you | |
6942 *** really care for shared libraries, you may want to modify your PATH | |
6943 *** so that a non-GNU linker is found, and then restart. | |
6944 | |
6945 EOF | |
6946 fi | |
6947 ;; | |
6948 | |
6949 amigaos*) | |
6950 _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)' | |
6951 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
6952 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
6953 | |
6954 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |
6955 # that the semantics of dynamic libraries on AmigaOS, at least up | |
6956 # to version 4, is to share data among multiple programs linked | |
6957 # with the same dynamic library. Since this doesn't match the | |
6958 # behavior of shared libraries on other platforms, we can't use | |
6959 # them. | |
6960 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
6961 ;; | |
6962 | |
6963 beos*) | |
6964 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
6965 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
6966 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
6967 # support --undefined. This deserves some investigation. FIXME | |
6968 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6969 else | |
6970 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
6971 fi | |
6972 ;; | |
6973 | |
6974 cygwin* | mingw* | pw32*) | |
6975 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
6976 # as there is no search path for DLLs. | |
6977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
6978 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
6979 _LT_AC_TAGVAR(always_export_symbols, $1)=no | |
6980 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
6981 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' | |
6982 | |
6983 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | |
6984 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
6985 # If the export-symbols file already is a .def file (1st line | |
6986 # is EXPORTS), use it as is; otherwise, prepend... | |
6987 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
6988 cp $export_symbols $output_objdir/$soname.def; | |
6989 else | |
6990 echo EXPORTS > $output_objdir/$soname.def; | |
6991 cat $export_symbols >> $output_objdir/$soname.def; | |
6992 fi~ | |
6993 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
6994 else | |
6995 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
6996 fi | |
6997 ;; | |
6998 | |
6999 interix[[3-9]]*) | |
7000 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
7001 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7002 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
7003 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
7004 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
7005 # Instead, shared libraries are loaded at an image base (0x10000000 by | |
7006 # default) and relocated if they conflict, which is a slow very memory | |
7007 # consuming and fragmenting process. To avoid this, we pick a random, | |
7008 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
7009 # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
7010 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
7011 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
7012 ;; | |
7013 | |
7014 gnu* | linux* | k*bsd*-gnu) | |
7015 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
7016 tmp_addflag= | |
7017 case $cc_basename,$host_cpu in | |
7018 pgcc*) # Portland Group C compiler | |
7019 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' | |
7020 tmp_addflag=' $pic_flag' | |
7021 ;; | |
7022 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers | |
7023 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' | |
7024 tmp_addflag=' $pic_flag -Mnomain' ;; | |
7025 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | |
7026 tmp_addflag=' -i_dynamic' ;; | |
7027 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | |
7028 tmp_addflag=' -i_dynamic -nofor_main' ;; | |
7029 ifc* | ifort*) # Intel Fortran compiler | |
7030 tmp_addflag=' -nofor_main' ;; | |
7031 esac | |
7032 case `$CC -V 2>&1 | sed 5q` in | |
7033 *Sun\ C*) # Sun C 5.9 | |
7034 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' | |
7035 tmp_sharedflag='-G' ;; | |
7036 *Sun\ F*) # Sun Fortran 8.3 | |
7037 tmp_sharedflag='-G' ;; | |
7038 *) | |
7039 tmp_sharedflag='-shared' ;; | |
7040 esac | |
7041 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
7042 | |
7043 if test $supports_anon_versioning = yes; then | |
7044 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ | |
7045 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
7046 $echo "local: *; };" >> $output_objdir/$libname.ver~ | |
7047 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
7048 fi | |
7049 else | |
7050 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7051 fi | |
7052 ;; | |
7053 | |
7054 netbsd*) | |
7055 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
7056 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
7057 wlarc= | |
7058 else | |
7059 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
7060 _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' | |
7061 fi | |
7062 ;; | |
7063 | |
7064 solaris*) | |
7065 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | |
7066 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7067 cat <<EOF 1>&2 | |
7068 | |
7069 *** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
7070 *** create shared libraries on Solaris systems. Therefore, libtool | |
7071 *** is disabling shared libraries support. We urge you to upgrade GNU | |
7072 *** binutils to release 2.9.1 or newer. Another option is to modify | |
7073 *** your PATH or compiler configuration so that the native linker is | |
7074 *** used, and then restart. | |
7075 | |
7076 EOF | |
7077 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
7078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
7079 _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' | |
7080 else | |
7081 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7082 fi | |
7083 ;; | |
7084 | |
7085 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) | |
7086 case `$LD -v 2>&1` in | |
7087 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) | |
7088 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7089 cat <<_LT_EOF 1>&2 | |
7090 | |
7091 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not | |
7092 *** reliably create shared libraries on SCO systems. Therefore, libtool | |
7093 *** is disabling shared libraries support. We urge you to upgrade GNU | |
7094 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | |
7095 *** your PATH or compiler configuration so that the native linker is | |
7096 *** used, and then restart. | |
7097 | |
7098 _LT_EOF | |
7099 ;; | |
7100 *) | |
7101 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
7102 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' | |
7103 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' | |
7104 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' | |
7105 else | |
7106 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7107 fi | |
7108 ;; | |
7109 esac | |
7110 ;; | |
7111 | |
7112 sunos4*) | |
7113 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
7114 wlarc= | |
7115 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7116 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7117 ;; | |
7118 | |
7119 *) | |
7120 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | |
7121 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
7122 _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' | |
7123 else | |
7124 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7125 fi | |
7126 ;; | |
7127 esac | |
7128 | |
7129 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then | |
7130 runpath_var= | |
7131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
7132 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | |
7133 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | |
7134 fi | |
7135 else | |
7136 # PORTME fill in a description of your system's linker (not GNU ld) | |
7137 case $host_os in | |
7138 aix3*) | |
7139 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
7140 _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
7141 _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' | |
7142 # Note: this linker hardcodes the directories in LIBPATH if there | |
7143 # are no directories specified by -L. | |
7144 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7145 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | |
7146 # Neither direct hardcoding nor static linking is supported with a | |
7147 # broken collect2. | |
7148 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
7149 fi | |
7150 ;; | |
7151 | |
7152 aix[[4-9]]*) | |
7153 if test "$host_cpu" = ia64; then | |
7154 # On IA64, the linker does run time linking by default, so we don't | |
7155 # have to do anything special. | |
7156 aix_use_runtimelinking=no | |
7157 exp_sym_flag='-Bexport' | |
7158 no_entry_flag="" | |
7159 else | |
7160 # If we're using GNU nm, then we don't want the "-C" option. | |
7161 # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
7162 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | |
7163 _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' | |
7164 else | |
7165 _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' | |
7166 fi | |
7167 aix_use_runtimelinking=no | |
7168 | |
7169 # Test if we are trying to use run time linking or normal | |
7170 # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
7171 # need to do runtime linking. | |
7172 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
7173 for ld_flag in $LDFLAGS; do | |
7174 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
7175 aix_use_runtimelinking=yes | |
7176 break | |
7177 fi | |
7178 done | |
7179 ;; | |
7180 esac | |
7181 | |
7182 exp_sym_flag='-bexport' | |
7183 no_entry_flag='-bnoentry' | |
7184 fi | |
7185 | |
7186 # When large executables or shared objects are built, AIX ld can | |
7187 # have problems creating the table of contents. If linking a library | |
7188 # or program results in "error TOC overflow" add -mminimal-toc to | |
7189 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
7190 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
7191 | |
7192 _LT_AC_TAGVAR(archive_cmds, $1)='' | |
7193 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7194 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
7195 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
7196 | |
7197 if test "$GCC" = yes; then | |
7198 case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
7199 # We only want to do this on AIX 4.2 and lower, the check | |
7200 # below for broken collect2 doesn't work under 4.3+ | |
7201 collect2name=`${CC} -print-prog-name=collect2` | |
7202 if test -f "$collect2name" && \ | |
7203 strings "$collect2name" | grep resolve_lib_name >/dev/null | |
7204 then | |
7205 # We have reworked collect2 | |
7206 : | |
7207 else | |
7208 # We have old collect2 | |
7209 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | |
7210 # It fails to find uninstalled libraries when the uninstalled | |
7211 # path is not listed in the libpath. Setting hardcode_minus_L | |
7212 # to unsupported forces relinking | |
7213 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | |
7216 fi | |
7217 ;; | |
7218 esac | |
7219 shared_flag='-shared' | |
7220 if test "$aix_use_runtimelinking" = yes; then | |
7221 shared_flag="$shared_flag "'${wl}-G' | |
7222 fi | |
7223 else | |
7224 # not using gcc | |
7225 if test "$host_cpu" = ia64; then | |
7226 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
7227 # chokes on -Wl,-G. The following line is correct: | |
7228 shared_flag='-G' | |
7229 else | |
7230 if test "$aix_use_runtimelinking" = yes; then | |
7231 shared_flag='${wl}-G' | |
7232 else | |
7233 shared_flag='${wl}-bM:SRE' | |
7234 fi | |
7235 fi | |
7236 fi | |
7237 | |
7238 # It seems that -bexpall does not export symbols beginning with | |
7239 # underscore (_), so it is better to generate a list of symbols to export. | |
7240 _LT_AC_TAGVAR(always_export_symbols, $1)=yes | |
7241 if test "$aix_use_runtimelinking" = yes; then | |
7242 # Warning - without using the other runtime loading flags (-brtl), | |
7243 # -berok will link without error, but may produce a broken library. | |
7244 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | |
7245 # Determine the default libpath from the value encoded in an empty executable. | |
7246 _LT_AC_SYS_LIBPATH_AIX | |
7247 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
7248 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
7249 else | |
7250 if test "$host_cpu" = ia64; then | |
7251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
7252 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
7253 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
7254 else | |
7255 # Determine the default libpath from the value encoded in an empty executable. | |
7256 _LT_AC_SYS_LIBPATH_AIX | |
7257 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
7258 # Warning - without using the other run time loading flags, | |
7259 # -berok will link without error, but may produce a broken library. | |
7260 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
7261 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
7262 # Exported symbols can be pulled into shared objects from archives | |
7263 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
7264 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
7265 # This is similar to how AIX traditionally builds its shared libraries. | |
7266 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
7267 fi | |
7268 fi | |
7269 ;; | |
7270 | |
7271 amigaos*) | |
7272 _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)' | |
7273 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7274 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7275 # see comment about different semantics on the GNU ld section | |
7276 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7277 ;; | |
7278 | |
7279 bsdi[[45]]*) | |
7280 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | |
7281 ;; | |
7282 | |
7283 cygwin* | mingw* | pw32*) | |
7284 # When not using gcc, we currently assume that we are using | |
7285 # Microsoft Visual C++. | |
7286 # hardcode_libdir_flag_spec is actually meaningless, as there is | |
7287 # no search path for DLLs. | |
7288 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
7289 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
7290 # Tell ltmain to make .lib files, not .a files. | |
7291 libext=lib | |
7292 # Tell ltmain to make .dll files, not .so files. | |
7293 shrext_cmds=".dll" | |
7294 # FIXME: Setting linknames here is a bad hack. | |
7295 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
7296 # The linker will automatically build a .lib file if we build a DLL. | |
7297 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' | |
7298 # FIXME: Should let the user specify the lib program. | |
7299 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' | |
7300 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' | |
7301 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
7302 ;; | |
7303 | |
7304 darwin* | rhapsody*) | |
7305 case $host_os in | |
7306 rhapsody* | darwin1.[[012]]) | |
7307 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' | |
7308 ;; | |
7309 *) # Darwin 1.3 on | |
7310 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | |
7311 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' | |
7312 else | |
7313 case ${MACOSX_DEPLOYMENT_TARGET} in | |
7314 10.[[012]]) | |
7315 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' | |
7316 ;; | |
7317 10.*) | |
7318 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' | |
7319 ;; | |
7320 esac | |
7321 fi | |
7322 ;; | |
7323 esac | |
7324 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
7325 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
7326 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes | |
7327 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
7328 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' | |
7329 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
7330 if test "$GCC" = yes ; then | |
7331 output_verbose_link_cmd='echo' | |
7332 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" | |
7333 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
7334 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | |
7335 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | |
7336 else | |
7337 case $cc_basename in | |
7338 xlc*) | |
7339 output_verbose_link_cmd='echo' | |
7340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' | |
7341 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | |
7342 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds | |
7343 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
7344 _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}' | |
7345 ;; | |
7346 *) | |
7347 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7348 ;; | |
7349 esac | |
7350 fi | |
7351 ;; | |
7352 | |
7353 dgux*) | |
7354 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7355 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7356 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7357 ;; | |
7358 | |
7359 freebsd1*) | |
7360 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7361 ;; | |
7362 | |
7363 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
7364 # support. Future versions do this automatically, but an explicit c++rt0.o | |
7365 # does not break anything, and helps significantly (at the cost of a little | |
7366 # extra space). | |
7367 freebsd2.2*) | |
7368 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
7369 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
7370 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7371 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7372 ;; | |
7373 | |
7374 # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
7375 freebsd2*) | |
7376 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
7377 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7378 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7379 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7380 ;; | |
7381 | |
7382 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
7383 freebsd* | dragonfly*) | |
7384 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
7385 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
7386 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7387 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7388 ;; | |
7389 | |
7390 hpux9*) | |
7391 if test "$GCC" = yes; then | |
7392 _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' | |
7393 else | |
7394 _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' | |
7395 fi | |
7396 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
7397 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7398 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7399 | |
7400 # hardcode_minus_L: Not really in the search PATH, | |
7401 # but as the default location of the library. | |
7402 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7403 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
7404 ;; | |
7405 | |
7406 hpux10*) | |
7407 if test "$GCC" = yes -a "$with_gnu_ld" = no; then | |
7408 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
7409 else | |
7410 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
7411 fi | |
7412 if test "$with_gnu_ld" = no; then | |
7413 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
7414 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7415 | |
7416 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7417 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
7418 | |
7419 # hardcode_minus_L: Not really in the search PATH, | |
7420 # but as the default location of the library. | |
7421 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7422 fi | |
7423 ;; | |
7424 | |
7425 hpux11*) | |
7426 if test "$GCC" = yes -a "$with_gnu_ld" = no; then | |
7427 case $host_cpu in | |
7428 hppa*64*) | |
7429 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7430 ;; | |
7431 ia64*) | |
7432 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
7433 ;; | |
7434 *) | |
7435 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
7436 ;; | |
7437 esac | |
7438 else | |
7439 case $host_cpu in | |
7440 hppa*64*) | |
7441 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7442 ;; | |
7443 ia64*) | |
7444 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
7445 ;; | |
7446 *) | |
7447 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
7448 ;; | |
7449 esac | |
7450 fi | |
7451 if test "$with_gnu_ld" = no; then | |
7452 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
7453 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7454 | |
7455 case $host_cpu in | |
7456 hppa*64*|ia64*) | |
7457 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' | |
7458 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
7459 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7460 ;; | |
7461 *) | |
7462 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7463 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
7464 | |
7465 # hardcode_minus_L: Not really in the search PATH, | |
7466 # but as the default location of the library. | |
7467 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7468 ;; | |
7469 esac | |
7470 fi | |
7471 ;; | |
7472 | |
7473 irix5* | irix6* | nonstopux*) | |
7474 if test "$GCC" = yes; then | |
7475 _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' | |
7476 else | |
7477 _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' | |
7478 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' | |
7479 fi | |
7480 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
7481 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7482 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
7483 ;; | |
7484 | |
7485 netbsd*) | |
7486 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
7487 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
7488 else | |
7489 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
7490 fi | |
7491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
7492 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7493 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7494 ;; | |
7495 | |
7496 newsos6) | |
7497 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7498 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7499 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
7500 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7501 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7502 ;; | |
7503 | |
7504 openbsd*) | |
7505 if test -f /usr/libexec/ld.so; then | |
7506 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7507 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7508 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
7509 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
7510 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | |
7511 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
7512 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
7513 else | |
7514 case $host_os in | |
7515 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
7516 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
7517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
7518 ;; | |
7519 *) | |
7520 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
7521 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
7522 ;; | |
7523 esac | |
7524 fi | |
7525 else | |
7526 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7527 fi | |
7528 ;; | |
7529 | |
7530 os2*) | |
7531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7532 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7533 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | |
7534 _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' | |
7535 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
7536 ;; | |
7537 | |
7538 osf3*) | |
7539 if test "$GCC" = yes; then | |
7540 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
7541 _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' | |
7542 else | |
7543 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
7544 _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' | |
7545 fi | |
7546 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
7547 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7548 ;; | |
7549 | |
7550 osf4* | osf5*) # as osf3* with the addition of -msym flag | |
7551 if test "$GCC" = yes; then | |
7552 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
7553 _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' | |
7554 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
7555 else | |
7556 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
7557 _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' | |
7558 _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~ | |
7559 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' | |
7560 | |
7561 # Both c and cxx compiler support -rpath directly | |
7562 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
7563 fi | |
7564 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | |
7565 ;; | |
7566 | |
7567 solaris*) | |
7568 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' | |
7569 if test "$GCC" = yes; then | |
7570 wlarc='${wl}' | |
7571 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7572 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
7573 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | |
7574 else | |
7575 wlarc='' | |
7576 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7577 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
7578 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
7579 fi | |
7580 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
7581 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7582 case $host_os in | |
7583 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
7584 *) | |
7585 # The compiler driver will combine and reorder linker options, | |
7586 # but understands `-z linker_flag'. GCC discards it without `$wl', | |
7587 # but is careful enough not to reorder. | |
7588 # Supported since Solaris 2.6 (maybe 2.5.1?) | |
7589 if test "$GCC" = yes; then | |
7590 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
7591 else | |
7592 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
7593 fi | |
7594 ;; | |
7595 esac | |
7596 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
7597 ;; | |
7598 | |
7599 sunos4*) | |
7600 if test "x$host_vendor" = xsequent; then | |
7601 # Use $CC to link under sequent, because it throws in some extra .o | |
7602 # files that make .init and .fini sections work. | |
7603 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
7604 else | |
7605 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
7606 fi | |
7607 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7608 _LT_AC_TAGVAR(hardcode_direct, $1)=yes | |
7609 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | |
7610 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7611 ;; | |
7612 | |
7613 sysv4) | |
7614 case $host_vendor in | |
7615 sni) | |
7616 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7617 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | |
7618 ;; | |
7619 siemens) | |
7620 ## LD is ld it makes a PLAMLIB | |
7621 ## CC just makes a GrossModule. | |
7622 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
7623 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | |
7624 _LT_AC_TAGVAR(hardcode_direct, $1)=no | |
7625 ;; | |
7626 motorola) | |
7627 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7628 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | |
7629 ;; | |
7630 esac | |
7631 runpath_var='LD_RUN_PATH' | |
7632 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7633 ;; | |
7634 | |
7635 sysv4.3*) | |
7636 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7637 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7638 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | |
7639 ;; | |
7640 | |
7641 sysv4*MP*) | |
7642 if test -d /usr/nec; then | |
7643 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7644 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7645 runpath_var=LD_RUN_PATH | |
7646 hardcode_runpath_var=yes | |
7647 _LT_AC_TAGVAR(ld_shlibs, $1)=yes | |
7648 fi | |
7649 ;; | |
7650 | |
7651 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
7652 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
7653 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
7654 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7655 runpath_var='LD_RUN_PATH' | |
7656 | |
7657 if test "$GCC" = yes; then | |
7658 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7659 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7660 else | |
7661 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7662 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7663 fi | |
7664 ;; | |
7665 | |
7666 sysv5* | sco3.2v5* | sco5v6*) | |
7667 # Note: We can NOT use -z defs as we might desire, because we do not | |
7668 # link with -lc, and that would cause any symbols used from libc to | |
7669 # always be unresolved, which means just about no library would | |
7670 # ever link correctly. If we're not using GNU ld we use -z text | |
7671 # though, which does catch some bad symbols but isn't as heavy-handed | |
7672 # as -z defs. | |
7673 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
7674 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
7675 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
7676 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' | |
7678 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | |
7679 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | |
7680 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
7681 runpath_var='LD_RUN_PATH' | |
7682 | |
7683 if test "$GCC" = yes; then | |
7684 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7685 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7686 else | |
7687 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7688 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
7689 fi | |
7690 ;; | |
7691 | |
7692 uts4*) | |
7693 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
7694 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
7695 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | |
7696 ;; | |
7697 | |
7698 *) | |
7699 _LT_AC_TAGVAR(ld_shlibs, $1)=no | |
7700 ;; | |
7701 esac | |
7702 fi | |
7703 ]) | |
7704 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | |
7705 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
7706 | |
7707 # | |
7708 # Do we need to explicitly link libc? | |
7709 # | |
7710 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in | |
7711 x|xyes) | |
7712 # Assume -lc should be added | |
7713 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
7714 | |
7715 if test "$enable_shared" = yes && test "$GCC" = yes; then | |
7716 case $_LT_AC_TAGVAR(archive_cmds, $1) in | |
7717 *'~'*) | |
7718 # FIXME: we may have to deal with multi-command sequences. | |
7719 ;; | |
7720 '$CC '*) | |
7721 # Test whether the compiler implicitly links with -lc since on some | |
7722 # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
7723 # to ld, don't add -lc before -lgcc. | |
7724 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | |
7725 $rm conftest* | |
7726 echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
7727 | |
7728 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | |
7729 soname=conftest | |
7730 lib=conftest | |
7731 libobjs=conftest.$ac_objext | |
7732 deplibs= | |
7733 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | |
7734 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) | |
7735 compiler_flags=-v | |
7736 linker_flags=-v | |
7737 verstring= | |
7738 output_objdir=. | |
7739 libname=conftest | |
7740 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) | |
7741 _LT_AC_TAGVAR(allow_undefined_flag, $1)= | |
7742 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) | |
7743 then | |
7744 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | |
7745 else | |
7746 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | |
7747 fi | |
7748 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | |
7749 else | |
7750 cat conftest.err 1>&5 | |
7751 fi | |
7752 $rm conftest* | |
7753 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) | |
7754 ;; | |
7755 esac | |
7756 fi | |
7757 ;; | |
7758 esac | |
7759 ])# AC_LIBTOOL_PROG_LD_SHLIBS | |
7760 | |
7761 | |
7762 # _LT_AC_FILE_LTDLL_C | |
7763 # ------------------- | |
7764 # Be careful that the start marker always follows a newline. | |
7765 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ | |
7766 # /* ltdll.c starts here */ | |
7767 # #define WIN32_LEAN_AND_MEAN | |
7768 # #include <windows.h> | |
7769 # #undef WIN32_LEAN_AND_MEAN | |
7770 # #include <stdio.h> | |
7771 # | |
7772 # #ifndef __CYGWIN__ | |
7773 # # ifdef __CYGWIN32__ | |
7774 # # define __CYGWIN__ __CYGWIN32__ | |
7775 # # endif | |
7776 # #endif | |
7777 # | |
7778 # #ifdef __cplusplus | |
7779 # extern "C" { | |
7780 # #endif | |
7781 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | |
7782 # #ifdef __cplusplus | |
7783 # } | |
7784 # #endif | |
7785 # | |
7786 # #ifdef __CYGWIN__ | |
7787 # #include <cygwin/cygwin_dll.h> | |
7788 # DECLARE_CYGWIN_DLL( DllMain ); | |
7789 # #endif | |
7790 # HINSTANCE __hDllInstance_base; | |
7791 # | |
7792 # BOOL APIENTRY | |
7793 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | |
7794 # { | |
7795 # __hDllInstance_base = hInst; | |
7796 # return TRUE; | |
7797 # } | |
7798 # /* ltdll.c ends here */ | |
7799 ])# _LT_AC_FILE_LTDLL_C | |
7800 | |
7801 | |
7802 # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) | |
7803 # --------------------------------- | |
7804 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) | |
7805 | |
7806 | |
7807 # old names | |
7808 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) | |
7809 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | |
7810 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | |
7811 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | |
7812 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | |
7813 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) | |
7814 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) | |
7815 | |
7816 # This is just to silence aclocal about the macro not being used | |
7817 ifelse([AC_DISABLE_FAST_INSTALL]) | |
7818 | |
7819 AC_DEFUN([LT_AC_PROG_GCJ], | |
7820 [AC_CHECK_TOOL(GCJ, gcj, no) | |
7821 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | |
7822 AC_SUBST(GCJFLAGS) | |
7823 ]) | |
7824 | |
7825 AC_DEFUN([LT_AC_PROG_RC], | |
7826 [AC_CHECK_TOOL(RC, windres, no) | |
7827 ]) | |
7828 | |
7829 | |
7830 # Cheap backport of AS_EXECUTABLE_P and required macros | |
7831 # from Autoconf 2.59; we should not use $as_executable_p directly. | |
7832 | |
7833 # _AS_TEST_PREPARE | |
7834 # ---------------- | |
7835 m4_ifndef([_AS_TEST_PREPARE], | |
7836 [m4_defun([_AS_TEST_PREPARE], | |
7837 [if test -x / >/dev/null 2>&1; then | |
7838 as_executable_p='test -x' | |
7839 else | |
7840 as_executable_p='test -f' | |
7841 fi | |
7842 ])])# _AS_TEST_PREPARE | |
7843 | |
7844 # AS_EXECUTABLE_P | |
7845 # --------------- | |
7846 # Check whether a file is executable. | |
7847 m4_ifndef([AS_EXECUTABLE_P], | |
7848 [m4_defun([AS_EXECUTABLE_P], | |
7849 [AS_REQUIRE([_AS_TEST_PREPARE])dnl | |
7850 $as_executable_p $1[]dnl | |
7851 ])])# AS_EXECUTABLE_P | |
7852 | |
7853 # NOTE: This macro has been submitted for inclusion into # | |
7854 # GNU Autoconf as AC_PROG_SED. When it is available in # | |
7855 # a released version of Autoconf we should remove this # | |
7856 # macro and use it instead. # | |
7857 # LT_AC_PROG_SED | |
7858 # -------------- | |
7859 # Check for a fully-functional sed program, that truncates | |
7860 # as few characters as possible. Prefer GNU sed if found. | |
7861 AC_DEFUN([LT_AC_PROG_SED], | |
7862 [AC_MSG_CHECKING([for a sed that does not truncate output]) | |
7863 AC_CACHE_VAL(lt_cv_path_SED, | |
7864 [# Loop through the user's path and test for sed and gsed. | |
7865 # Then use that list of sed's as ones to test for truncation. | |
7866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7867 for as_dir in $PATH | |
7868 do | |
7869 IFS=$as_save_IFS | |
7870 test -z "$as_dir" && as_dir=. | |
7871 for lt_ac_prog in sed gsed; do | |
7872 for ac_exec_ext in '' $ac_executable_extensions; do | |
7873 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then | |
7874 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | |
7875 fi | |
7876 done | |
7877 done | |
7878 done | |
7879 IFS=$as_save_IFS | |
7880 lt_ac_max=0 | |
7881 lt_ac_count=0 | |
7882 # Add /usr/xpg4/bin/sed as it is typically found on Solaris | |
7883 # along with /bin/sed that truncates output. | |
7884 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | |
7885 test ! -f $lt_ac_sed && continue | |
7886 cat /dev/null > conftest.in | |
7887 lt_ac_count=0 | |
7888 echo $ECHO_N "0123456789$ECHO_C" >conftest.in | |
7889 # Check for GNU sed and select it if it is found. | |
7890 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | |
7891 lt_cv_path_SED=$lt_ac_sed | |
7892 break | |
7893 fi | |
7894 while true; do | |
7895 cat conftest.in conftest.in >conftest.tmp | |
7896 mv conftest.tmp conftest.in | |
7897 cp conftest.in conftest.nl | |
7898 echo >>conftest.nl | |
7899 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | |
7900 cmp -s conftest.out conftest.nl || break | |
7901 # 10000 chars as input seems more than enough | |
7902 test $lt_ac_count -gt 10 && break | |
7903 lt_ac_count=`expr $lt_ac_count + 1` | |
7904 if test $lt_ac_count -gt $lt_ac_max; then | |
7905 lt_ac_max=$lt_ac_count | |
7906 lt_cv_path_SED=$lt_ac_sed | |
7907 fi | |
7908 done | |
7909 done | |
7910 ]) | |
7911 SED=$lt_cv_path_SED | |
7912 AC_SUBST([SED]) | |
7913 AC_MSG_RESULT([$SED]) | |
7914 ]) | |
7915 | |
7916 # progtest.m4 serial 4 (gettext-0.14.2) | |
7917 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. | |
7918 dnl This file is free software; the Free Software Foundation | |
7919 dnl gives unlimited permission to copy and/or distribute it, | |
7920 dnl with or without modifications, as long as this notice is preserved. | |
7921 dnl | |
7922 dnl This file can can be used in projects which are not available under | |
7923 dnl the GNU General Public License or the GNU Library General Public | |
7924 dnl License but which still want to provide support for the GNU gettext | |
7925 dnl functionality. | |
7926 dnl Please note that the actual code of the GNU gettext library is covered | |
7927 dnl by the GNU Library General Public License, and the rest of the GNU | |
7928 dnl gettext package package is covered by the GNU General Public License. | |
7929 dnl They are *not* in the public domain. | |
7930 | |
7931 dnl Authors: | |
7932 dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | |
7933 | |
7934 AC_PREREQ(2.50) | |
7935 | |
7936 # Search path for a program which passes the given test. | |
7937 | |
7938 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | |
7939 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | |
7940 AC_DEFUN([AM_PATH_PROG_WITH_TEST], | |
7941 [ | |
7942 # Prepare PATH_SEPARATOR. | |
7943 # The user is always right. | |
7944 if test "${PATH_SEPARATOR+set}" != set; then | |
7945 echo "#! /bin/sh" >conf$$.sh | |
7946 echo "exit 0" >>conf$$.sh | |
7947 chmod +x conf$$.sh | |
7948 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7949 PATH_SEPARATOR=';' | |
7950 else | |
7951 PATH_SEPARATOR=: | |
7952 fi | |
7953 rm -f conf$$.sh | |
7954 fi | |
7955 | |
7956 # Find out how to test for executable files. Don't use a zero-byte file, | |
7957 # as systems may use methods other than mode bits to determine executability. | |
7958 cat >conf$$.file <<_ASEOF | |
7959 #! /bin/sh | |
7960 exit 0 | |
7961 _ASEOF | |
7962 chmod +x conf$$.file | |
7963 if test -x conf$$.file >/dev/null 2>&1; then | |
7964 ac_executable_p="test -x" | |
7965 else | |
7966 ac_executable_p="test -f" | |
7967 fi | |
7968 rm -f conf$$.file | |
7969 | |
7970 # Extract the first word of "$2", so it can be a program name with args. | |
7971 set dummy $2; ac_word=[$]2 | |
7972 AC_MSG_CHECKING([for $ac_word]) | |
7973 AC_CACHE_VAL(ac_cv_path_$1, | |
7974 [case "[$]$1" in | |
7975 [[\\/]]* | ?:[[\\/]]*) | |
7976 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | |
7977 ;; | |
7978 *) | |
7979 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
7980 for ac_dir in ifelse([$5], , $PATH, [$5]); do | |
7981 IFS="$ac_save_IFS" | |
7982 test -z "$ac_dir" && ac_dir=. | |
7983 for ac_exec_ext in '' $ac_executable_extensions; do | |
7984 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
7985 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD | |
7986 if [$3]; then | |
7987 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" | |
7988 break 2 | |
7989 fi | |
7990 fi | |
7991 done | |
7992 done | |
7993 IFS="$ac_save_IFS" | |
7994 dnl If no 4th arg is given, leave the cache variable unset, | |
7995 dnl so AC_PATH_PROGS will keep looking. | |
7996 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | |
7997 ])dnl | |
7998 ;; | |
7999 esac])dnl | |
8000 $1="$ac_cv_path_$1" | |
8001 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | |
8002 AC_MSG_RESULT([$]$1) | |
8003 else | |
8004 AC_MSG_RESULT(no) | |
8005 fi | |
8006 AC_SUBST($1)dnl | |
8007 ]) | |
8008 | 13 |
8009 # AM_AUX_DIR_EXPAND -*- Autoconf -*- | 14 # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
8010 | 15 |
8011 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | 16 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
8012 # | 17 # |
8057 AC_PREREQ([2.50])dnl | 62 AC_PREREQ([2.50])dnl |
8058 # expand $ac_aux_dir to an absolute path | 63 # expand $ac_aux_dir to an absolute path |
8059 am_aux_dir=`cd $ac_aux_dir && pwd` | 64 am_aux_dir=`cd $ac_aux_dir && pwd` |
8060 ]) | 65 ]) |
8061 | 66 |
8062 # Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. | 67 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
68 # Free Software Foundation, Inc. | |
8063 # | 69 # |
8064 # This file is free software; the Free Software Foundation | 70 # This file is free software; the Free Software Foundation |
8065 # gives unlimited permission to copy and/or distribute it, | 71 # gives unlimited permission to copy and/or distribute it, |
8066 # with or without modifications, as long as this notice is preserved. | 72 # with or without modifications, as long as this notice is preserved. |
8067 | 73 |
8068 # serial 3 | 74 # serial 6 |
8069 | 75 |
8070 # AM_PROG_CC_C_O | 76 # AM_PROG_CC_C_O |
8071 # -------------- | 77 # -------------- |
8072 # Like AC_PROG_CC_C_O, but changed for automake. | 78 # Like AC_PROG_CC_C_O, but changed for automake. |
8073 AC_DEFUN([AM_PROG_CC_C_O], | 79 AC_DEFUN([AM_PROG_CC_C_O], |
8074 [AC_REQUIRE([AC_PROG_CC_C_O])dnl | 80 [AC_REQUIRE([AC_PROG_CC_C_O])dnl |
8075 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | 81 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
82 AC_REQUIRE_AUX_FILE([compile])dnl | |
8076 # FIXME: we rely on the cache variable name because | 83 # FIXME: we rely on the cache variable name because |
8077 # there is no other way. | 84 # there is no other way. |
8078 set dummy $CC | 85 set dummy $CC |
8079 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` | 86 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` |
8080 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | 87 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o |
88 if test "$am_t" != yes; then | |
8081 # Losing compiler, so override with the script. | 89 # Losing compiler, so override with the script. |
8082 # FIXME: It is wrong to rewrite CC. | 90 # FIXME: It is wrong to rewrite CC. |
8083 # But if we don't then we get into trouble of one sort or another. | 91 # But if we don't then we get into trouble of one sort or another. |
8084 # A longer-term fix would be to have automake use am__CC in this case, | 92 # A longer-term fix would be to have automake use am__CC in this case, |
8085 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | 93 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" |
8086 CC="$am_aux_dir/compile $CC" | 94 CC="$am_aux_dir/compile $CC" |
8087 fi | 95 fi |
96 dnl Make sure AC_PROG_CC is never called again, or it will override our | |
97 dnl setting of CC. | |
98 m4_define([AC_PROG_CC], | |
99 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) | |
8088 ]) | 100 ]) |
8089 | 101 |
102 m4_include([../libtool.m4]) | |
103 m4_include([../ltoptions.m4]) | |
104 m4_include([../ltsugar.m4]) | |
105 m4_include([../ltversion.m4]) | |
106 m4_include([../lt~obsolete.m4]) | |
107 m4_include([../config/acx.m4]) | |
108 m4_include([../config/codeset.m4]) | |
109 m4_include([../config/gettext-sister.m4]) | |
110 m4_include([../config/iconv.m4]) | |
111 m4_include([../config/lcmessage.m4]) | |
112 m4_include([../config/lib-ld.m4]) | |
113 m4_include([../config/lib-link.m4]) | |
114 m4_include([../config/lib-prefix.m4]) | |
115 m4_include([../config/override.m4]) | |
116 m4_include([../config/progtest.m4]) | |
117 m4_include([../config/stdint.m4]) | |
118 m4_include([../config/unwind_ipinfo.m4]) | |
119 m4_include([../config/warnings.m4]) | |
8090 m4_include([acinclude.m4]) | 120 m4_include([acinclude.m4]) |