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