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