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