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