[SDL_Tizen] Blcok partial update extension
[platform/upstream/SDL.git] / aclocal.m4
1 AC_DEFUN([AC_CHECK_DEFINE],[dnl
2   AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
3     AC_EGREP_CPP([YES_IS_DEFINED], [
4 #include <$2>
5 #ifdef $1
6 YES_IS_DEFINED
7 #endif
8     ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
9   )
10   if test "$ac_cv_define_$1" = "yes" ; then
11     AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
12   fi
13 ])dnl
14 AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
15 ##############################################################################
16 dnl Configure Paths for Alsa
17 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
18 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
19 dnl Jaroslav Kysela <perex@suse.cz>
20 dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
21 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
22 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
23 dnl enables arguments --with-alsa-prefix=
24 dnl                   --with-alsa-enc-prefix=
25 dnl                   --disable-alsatest
26 dnl
27 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
28 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
29 dnl
30 AC_DEFUN([AM_PATH_ALSA],
31 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
32 alsa_save_CFLAGS="$CFLAGS"
33 alsa_save_LDFLAGS="$LDFLAGS"
34 alsa_save_LIBS="$LIBS"
35 alsa_found=yes
36
37 dnl
38 dnl Get the cflags and libraries for alsa
39 dnl
40 AC_ARG_WITH(alsa-prefix,
41 [  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)],
42 [alsa_prefix="$withval"], [alsa_prefix=""])
43
44 AC_ARG_WITH(alsa-inc-prefix,
45 [  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)],
46 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
47
48 dnl FIXME: this is not yet implemented
49 AC_ARG_ENABLE(alsatest,
50 [  --disable-alsatest      Do not try to compile and run a test Alsa program],
51 [enable_alsatest="$enableval"],
52 [enable_alsatest=yes])
53
54 dnl Add any special include directories
55 AC_MSG_CHECKING(for ALSA CFLAGS)
56 if test "$alsa_inc_prefix" != "" ; then
57         ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
58         CFLAGS="$CFLAGS -I$alsa_inc_prefix"
59 fi
60 AC_MSG_RESULT($ALSA_CFLAGS)
61
62 dnl add any special lib dirs
63 AC_MSG_CHECKING(for ALSA LDFLAGS)
64 if test "$alsa_prefix" != "" ; then
65         ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
66         LDFLAGS="$LDFLAGS $ALSA_LIBS"
67 fi
68
69 dnl add the alsa library
70 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
71 LIBS=`echo $LIBS | sed 's/-lm//'`
72 LIBS=`echo $LIBS | sed 's/-ldl//'`
73 LIBS=`echo $LIBS | sed 's/-lpthread//'`
74 LIBS=`echo $LIBS | sed 's/  //'`
75 LIBS="$ALSA_LIBS $LIBS"
76 AC_MSG_RESULT($ALSA_LIBS)
77
78 dnl Check for a working version of libasound that is of the right version.
79 min_alsa_version=ifelse([$1], ,0.1.1,$1)
80 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
81 no_alsa=""
82     alsa_min_major_version=`echo $min_alsa_version | \
83            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
84     alsa_min_minor_version=`echo $min_alsa_version | \
85            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
86     alsa_min_micro_version=`echo $min_alsa_version | \
87            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
88
89 AC_LANG_SAVE
90 AC_LANG_C
91 AC_TRY_COMPILE([
92 #include <alsa/asoundlib.h>
93 ], [
94 /* ensure backward compatibility */
95 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
96 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
97 #endif
98 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
99 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
100 #endif
101 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
102 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
103 #endif
104
105 #  if(SND_LIB_MAJOR > $alsa_min_major_version)
106   exit(0);
107 #  else
108 #    if(SND_LIB_MAJOR < $alsa_min_major_version)
109 #       error not present
110 #    endif
111
112 #   if(SND_LIB_MINOR > $alsa_min_minor_version)
113   exit(0);
114 #   else
115 #     if(SND_LIB_MINOR < $alsa_min_minor_version)
116 #          error not present
117 #      endif
118
119 #      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
120 #        error not present
121 #      endif
122 #    endif
123 #  endif
124 exit(0);
125 ],
126   [AC_MSG_RESULT(found.)],
127   [AC_MSG_RESULT(not present.)
128    ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
129    alsa_found=no]
130 )
131 AC_LANG_RESTORE
132
133 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
134 if test "x$enable_alsatest" = "xyes"; then
135 AC_CHECK_LIB([asound], [snd_ctl_open],,
136         [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
137          alsa_found=no]
138 )
139 fi
140
141 if test "x$alsa_found" = "xyes" ; then
142    ifelse([$2], , :, [$2])
143    LIBS=`echo $LIBS | sed 's/-lasound//g'`
144    LIBS=`echo $LIBS | sed 's/  //'`
145    LIBS="-lasound $LIBS"
146 fi
147 if test "x$alsa_found" = "xno" ; then
148    ifelse([$3], , :, [$3])
149    CFLAGS="$alsa_save_CFLAGS"
150    LDFLAGS="$alsa_save_LDFLAGS"
151    LIBS="$alsa_save_LIBS"
152    ALSA_CFLAGS=""
153    ALSA_LIBS=""
154 fi
155
156 dnl That should be it.  Now just export out symbols:
157 AC_SUBST(ALSA_CFLAGS)
158 AC_SUBST(ALSA_LIBS)
159 ])
160 # ===========================================================================
161 #  http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html
162 # ===========================================================================
163 #
164 # SYNOPSIS
165 #
166 #   AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
167 #
168 # DESCRIPTION
169 #
170 #   Check whether the given compiler FLAGS work with the current language's
171 #   compiler, or whether they give an error. (Warnings, however, are
172 #   ignored.)
173 #
174 #   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
175 #   success/failure.
176 #
177 # LICENSE
178 #
179 #   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
180 #   Copyright (c) 2009 Matteo Frigo
181 #
182 #   This program is free software: you can redistribute it and/or modify it
183 #   under the terms of the GNU General Public License as published by the
184 #   Free Software Foundation, either version 3 of the License, or (at your
185 #   option) any later version.
186 #
187 #   This program is distributed in the hope that it will be useful, but
188 #   WITHOUT ANY WARRANTY; without even the implied warranty of
189 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
190 #   Public License for more details.
191 #
192 #   You should have received a copy of the GNU General Public License along
193 #   with this program. If not, see <http://www.gnu.org/licenses/>.
194 #
195 #   As a special exception, the respective Autoconf Macro's copyright owner
196 #   gives unlimited permission to copy, distribute and modify the configure
197 #   scripts that are the output of Autoconf when processing the Macro. You
198 #   need not follow the terms of the GNU General Public License when using
199 #   or distributing such scripts, even though portions of the text of the
200 #   Macro appear in them. The GNU General Public License (GPL) does govern
201 #   all other use of the material that constitutes the Autoconf Macro.
202 #
203 #   This special exception to the GPL applies to versions of the Autoconf
204 #   Macro released by the Autoconf Archive. When you make and distribute a
205 #   modified version of the Autoconf Macro, you may extend this special
206 #   exception to the GPL to apply to your modified version as well.
207
208 #serial 9
209
210 AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
211 [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
212 AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
213 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
214 AS_LITERAL_IF([$1],
215   [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
216       ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
217       _AC_LANG_PREFIX[]FLAGS="$1"
218       AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
219         AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
220         AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
221       _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
222   [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
223    _AC_LANG_PREFIX[]FLAGS="$1"
224    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
225      eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
226      eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
227    _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
228 eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
229 AC_MSG_RESULT($ax_check_compiler_flags)
230 if test "x$ax_check_compiler_flags" = xyes; then
231         m4_default([$2], :)
232 else
233         m4_default([$3], :)
234 fi
235 ])dnl AX_CHECK_COMPILER_FLAGS
236 # ===========================================================================
237 #      http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html
238 # ===========================================================================
239 #
240 # SYNOPSIS
241 #
242 #   AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
243 #
244 # DESCRIPTION
245 #
246 #   This macro tries to guess the "native" arch corresponding to the target
247 #   architecture for use with gcc's -march=arch or -mtune=arch flags. If
248 #   found, the cache variable $ax_cv_gcc_archflag is set to this flag and
249 #   ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to
250 #   "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is
251 #   to add $ax_cv_gcc_archflag to the end of $CFLAGS.
252 #
253 #   PORTABLE? should be either [yes] (default) or [no]. In the former case,
254 #   the flag is set to -mtune (or equivalent) so that the architecture is
255 #   only used for tuning, but the instruction set used is still portable. In
256 #   the latter case, the flag is set to -march (or equivalent) so that
257 #   architecture-specific instructions are enabled.
258 #
259 #   The user can specify --with-gcc-arch=<arch> in order to override the
260 #   macro's choice of architecture, or --without-gcc-arch to disable this.
261 #
262 #   When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
263 #   called unless the user specified --with-gcc-arch manually.
264 #
265 #   Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
266 #
267 #   (The main emphasis here is on recent CPUs, on the principle that doing
268 #   high-performance computing on old hardware is uncommon.)
269 #
270 # LICENSE
271 #
272 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
273 #   Copyright (c) 2008 Matteo Frigo
274 #
275 #   This program is free software: you can redistribute it and/or modify it
276 #   under the terms of the GNU General Public License as published by the
277 #   Free Software Foundation, either version 3 of the License, or (at your
278 #   option) any later version.
279 #
280 #   This program is distributed in the hope that it will be useful, but
281 #   WITHOUT ANY WARRANTY; without even the implied warranty of
282 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
283 #   Public License for more details.
284 #
285 #   You should have received a copy of the GNU General Public License along
286 #   with this program. If not, see <http://www.gnu.org/licenses/>.
287 #
288 #   As a special exception, the respective Autoconf Macro's copyright owner
289 #   gives unlimited permission to copy, distribute and modify the configure
290 #   scripts that are the output of Autoconf when processing the Macro. You
291 #   need not follow the terms of the GNU General Public License when using
292 #   or distributing such scripts, even though portions of the text of the
293 #   Macro appear in them. The GNU General Public License (GPL) does govern
294 #   all other use of the material that constitutes the Autoconf Macro.
295 #
296 #   This special exception to the GPL applies to versions of the Autoconf
297 #   Macro released by the Autoconf Archive. When you make and distribute a
298 #   modified version of the Autoconf Macro, you may extend this special
299 #   exception to the GPL to apply to your modified version as well.
300
301 #serial 8
302
303 AC_DEFUN([AX_GCC_ARCHFLAG],
304 [AC_REQUIRE([AC_PROG_CC])
305 AC_REQUIRE([AC_CANONICAL_HOST])
306
307 AC_ARG_WITH(gcc-arch, [AS_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
308         ax_gcc_arch=$withval, ax_gcc_arch=yes)
309
310 AC_MSG_CHECKING([for gcc architecture flag])
311 AC_MSG_RESULT([])
312 AC_CACHE_VAL(ax_cv_gcc_archflag,
313 [
314 ax_cv_gcc_archflag="unknown"
315
316 if test "$GCC" = yes; then
317
318 if test "x$ax_gcc_arch" = xyes; then
319 ax_gcc_arch=""
320 if test "$cross_compiling" = no; then
321 case $host_cpu in
322   i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
323      AX_GCC_X86_CPUID(0)
324      AX_GCC_X86_CPUID(1)
325      case $ax_cv_gcc_x86_cpuid_0 in
326        *:756e6547:*:*) # Intel
327           case $ax_cv_gcc_x86_cpuid_1 in
328             *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
329             *5??:*:*:*) ax_gcc_arch=pentium ;;
330             *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
331             *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
332             *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
333             *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
334             *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
335             *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
336             *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
337                 case $host_cpu in
338                   x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
339                   *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
340                 esac ;;
341             *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
342           esac ;;
343        *:68747541:*:*) # AMD
344           case $ax_cv_gcc_x86_cpuid_1 in
345             *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
346             *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
347             *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
348             *60?:*:*:*) ax_gcc_arch=k7 ;;
349             *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
350             *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
351             *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
352             *6[[68a]]?:*:*:*)
353                AX_GCC_X86_CPUID(0x80000006) # L2 cache size
354                case $ax_cv_gcc_x86_cpuid_0x80000006 in
355                  *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
356                         ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
357                  *) ax_gcc_arch="athlon-4 athlon k7" ;;
358                esac ;;
359             *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
360             *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
361             *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
362             *f??:*:*:*) ax_gcc_arch="k8" ;;
363           esac ;;
364         *:746e6543:*:*) # IDT
365            case $ax_cv_gcc_x86_cpuid_1 in
366              *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
367              *58?:*:*:*) ax_gcc_arch=winchip2 ;;
368              *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
369              *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
370            esac ;;
371      esac
372      if test x"$ax_gcc_arch" = x; then # fallback
373         case $host_cpu in
374           i586*) ax_gcc_arch=pentium ;;
375           i686*) ax_gcc_arch=pentiumpro ;;
376         esac
377      fi
378      ;;
379
380   sparc*)
381      AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
382      cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
383      cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
384      case $cputype in
385          *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
386          *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
387          *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
388          *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
389          *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
390          *cypress*) ax_gcc_arch=cypress ;;
391      esac ;;
392
393   alphaev5) ax_gcc_arch=ev5 ;;
394   alphaev56) ax_gcc_arch=ev56 ;;
395   alphapca56) ax_gcc_arch="pca56 ev56" ;;
396   alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
397   alphaev6) ax_gcc_arch=ev6 ;;
398   alphaev67) ax_gcc_arch=ev67 ;;
399   alphaev68) ax_gcc_arch="ev68 ev67" ;;
400   alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
401   alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
402   alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
403
404   powerpc*)
405      cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
406      cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
407      case $cputype in
408        *750*) ax_gcc_arch="750 G3" ;;
409        *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
410        *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
411        *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
412        *970*) ax_gcc_arch="970 G5 power4";;
413        *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
414        *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
415        603ev|8240) ax_gcc_arch="$cputype 603e 603";;
416        *) ax_gcc_arch=$cputype ;;
417      esac
418      ax_gcc_arch="$ax_gcc_arch powerpc"
419      ;;
420 esac
421 fi # not cross-compiling
422 fi # guess arch
423
424 if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
425 for arch in $ax_gcc_arch; do
426   if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
427     flags="-mtune=$arch"
428     # -mcpu=$arch and m$arch generate nonportable code on every arch except
429     # x86.  And some other arches (e.g. Alpha) don't accept -mtune.  Grrr.
430     case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
431   else
432     flags="-march=$arch -mcpu=$arch -m$arch"
433   fi
434   for flag in $flags; do
435     AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
436   done
437   test "x$ax_cv_gcc_archflag" = xunknown || break
438 done
439 fi
440
441 fi # $GCC=yes
442 ])
443 AC_MSG_CHECKING([for gcc architecture flag])
444 AC_MSG_RESULT($ax_cv_gcc_archflag)
445 if test "x$ax_cv_gcc_archflag" = xunknown; then
446   m4_default([$3],:)
447 else
448   m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
449 fi
450 ])
451 # ===========================================================================
452 #     http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html
453 # ===========================================================================
454 #
455 # SYNOPSIS
456 #
457 #   AX_GCC_X86_CPUID(OP)
458 #
459 # DESCRIPTION
460 #
461 #   On Pentium and later x86 processors, with gcc or a compiler that has a
462 #   compatible syntax for inline assembly instructions, run a small program
463 #   that executes the cpuid instruction with input OP. This can be used to
464 #   detect the CPU type.
465 #
466 #   On output, the values of the eax, ebx, ecx, and edx registers are stored
467 #   as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
468 #   ax_cv_gcc_x86_cpuid_OP.
469 #
470 #   If the cpuid instruction fails (because you are running a
471 #   cross-compiler, or because you are not using gcc, or because you are on
472 #   a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
473 #   is set to the string "unknown".
474 #
475 #   This macro mainly exists to be used in AX_GCC_ARCHFLAG.
476 #
477 # LICENSE
478 #
479 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
480 #   Copyright (c) 2008 Matteo Frigo
481 #
482 #   This program is free software: you can redistribute it and/or modify it
483 #   under the terms of the GNU General Public License as published by the
484 #   Free Software Foundation, either version 3 of the License, or (at your
485 #   option) any later version.
486 #
487 #   This program is distributed in the hope that it will be useful, but
488 #   WITHOUT ANY WARRANTY; without even the implied warranty of
489 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
490 #   Public License for more details.
491 #
492 #   You should have received a copy of the GNU General Public License along
493 #   with this program. If not, see <http://www.gnu.org/licenses/>.
494 #
495 #   As a special exception, the respective Autoconf Macro's copyright owner
496 #   gives unlimited permission to copy, distribute and modify the configure
497 #   scripts that are the output of Autoconf when processing the Macro. You
498 #   need not follow the terms of the GNU General Public License when using
499 #   or distributing such scripts, even though portions of the text of the
500 #   Macro appear in them. The GNU General Public License (GPL) does govern
501 #   all other use of the material that constitutes the Autoconf Macro.
502 #
503 #   This special exception to the GPL applies to versions of the Autoconf
504 #   Macro released by the Autoconf Archive. When you make and distribute a
505 #   modified version of the Autoconf Macro, you may extend this special
506 #   exception to the GPL to apply to your modified version as well.
507
508 #serial 7
509
510 AC_DEFUN([AX_GCC_X86_CPUID],
511 [AC_REQUIRE([AC_PROG_CC])
512 AC_LANG_PUSH([C])
513 AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
514  [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
515      int op = $1, eax, ebx, ecx, edx;
516      FILE *f;
517       __asm__("cpuid"
518         : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
519         : "a" (op));
520      f = fopen("conftest_cpuid", "w"); if (!f) return 1;
521      fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
522      fclose(f);
523      return 0;
524 ])],
525      [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
526      [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
527      [ax_cv_gcc_x86_cpuid_$1=unknown])])
528 AC_LANG_POP([C])
529 ])
530 ##############################################################################
531 #
532 # --- esd.m4 ---
533 #
534 # Configure paths for ESD
535 # Manish Singh    98-9-30
536 # stolen back from Frank Belew
537 # stolen from Manish Singh
538 # Shamelessly stolen from Owen Taylor
539
540 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
541 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
542 dnl
543 AC_DEFUN([AM_PATH_ESD],
544 [dnl 
545 dnl Get the cflags and libraries from the esd-config script
546 dnl
547 AC_ARG_WITH(esd-prefix,[  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)],
548             esd_prefix="$withval", esd_prefix="")
549 AC_ARG_WITH(esd-exec-prefix,[  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
550             esd_exec_prefix="$withval", esd_exec_prefix="")
551 AC_ARG_ENABLE(esdtest, [  --disable-esdtest       Do not try to compile and run a test ESD program],
552                     , enable_esdtest=yes)
553
554   if test x$esd_exec_prefix != x ; then
555      esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
556      if test x${ESD_CONFIG+set} != xset ; then
557         ESD_CONFIG=$esd_exec_prefix/bin/esd-config
558      fi
559   fi
560   if test x$esd_prefix != x ; then
561      esd_args="$esd_args --prefix=$esd_prefix"
562      if test x${ESD_CONFIG+set} != xset ; then
563         ESD_CONFIG=$esd_prefix/bin/esd-config
564      fi
565   fi
566
567   AC_PATH_PROG(ESD_CONFIG, esd-config, no)
568   min_esd_version=ifelse([$1], ,0.2.7,$1)
569   AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
570   no_esd=""
571   if test "$ESD_CONFIG" = "no" ; then
572     no_esd=yes
573   else
574     ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
575     ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
576
577     esd_major_version=`$ESD_CONFIG $esd_args --version | \
578            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
579     esd_minor_version=`$ESD_CONFIG $esd_args --version | \
580            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
581     esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
582            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
583     if test "x$enable_esdtest" = "xyes" ; then
584       ac_save_CFLAGS="$CFLAGS"
585       ac_save_LIBS="$LIBS"
586       CFLAGS="$CFLAGS $ESD_CFLAGS"
587       LIBS="$LIBS $ESD_LIBS"
588 dnl
589 dnl Now check if the installed ESD is sufficiently new. (Also sanity
590 dnl checks the results of esd-config to some extent
591 dnl
592       rm -f conf.esdtest
593       AC_TRY_RUN([
594 #include <stdio.h>
595 #include <stdlib.h>
596 #include <string.h>
597 #include <esd.h>
598
599 char*
600 my_strdup (char *str)
601 {
602   char *new_str;
603   
604   if (str)
605     {
606       new_str = malloc ((strlen (str) + 1) * sizeof(char));
607       strcpy (new_str, str);
608     }
609   else
610     new_str = NULL;
611   
612   return new_str;
613 }
614
615 int main ()
616 {
617   int major, minor, micro;
618   char *tmp_version;
619
620   system ("touch conf.esdtest");
621
622   /* HP/UX 9 (%@#!) writes to sscanf strings */
623   tmp_version = my_strdup("$min_esd_version");
624   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
625      printf("%s, bad version string\n", "$min_esd_version");
626      exit(1);
627    }
628
629    if (($esd_major_version > major) ||
630       (($esd_major_version == major) && ($esd_minor_version > minor)) ||
631       (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
632     {
633       return 0;
634     }
635   else
636     {
637       printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
638       printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
639       printf("*** best to upgrade to the required version.\n");
640       printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
641       printf("*** to point to the correct copy of esd-config, and remove the file\n");
642       printf("*** config.cache before re-running configure\n");
643       return 1;
644     }
645 }
646
647 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
648        CFLAGS="$ac_save_CFLAGS"
649        LIBS="$ac_save_LIBS"
650      fi
651   fi
652   if test "x$no_esd" = x ; then
653      AC_MSG_RESULT(yes)
654      ifelse([$2], , :, [$2])     
655   else
656      AC_MSG_RESULT(no)
657      if test "$ESD_CONFIG" = "no" ; then
658        echo "*** The esd-config script installed by ESD could not be found"
659        echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
660        echo "*** your path, or set the ESD_CONFIG environment variable to the"
661        echo "*** full path to esd-config."
662      else
663        if test -f conf.esdtest ; then
664         :
665        else
666           echo "*** Could not run ESD test program, checking why..."
667           CFLAGS="$CFLAGS $ESD_CFLAGS"
668           LIBS="$LIBS $ESD_LIBS"
669           AC_TRY_LINK([
670 #include <stdio.h>
671 #include <esd.h>
672 ],      [ return 0; ],
673         [ echo "*** The test program compiled, but did not run. This usually means"
674           echo "*** that the run-time linker is not finding ESD or finding the wrong"
675           echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
676           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
677           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
678           echo "*** is required on your system"
679           echo "***"
680           echo "*** If you have an old version installed, it is best to remove it, although"
681           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
682         [ echo "*** The test program failed to compile or link. See the file config.log for the"
683           echo "*** exact error that occured. This usually means ESD was incorrectly installed"
684           echo "*** or that you have moved ESD since it was installed. In the latter case, you"
685           echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
686           CFLAGS="$ac_save_CFLAGS"
687           LIBS="$ac_save_LIBS"
688        fi
689      fi
690      ESD_CFLAGS=""
691      ESD_LIBS=""
692      ifelse([$3], , :, [$3])
693   fi
694   AC_SUBST(ESD_CFLAGS)
695   AC_SUBST(ESD_LIBS)
696   rm -f conf.esdtest
697 ])
698 ##############################################################################
699 # Based on libtool-2.4.2
700 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
701 #
702 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
703 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
704 #                 Foundation, Inc.
705 #   Written by Gordon Matzigkeit, 1996
706 #
707 # This file is free software; the Free Software Foundation gives
708 # unlimited permission to copy and/or distribute it, with or without
709 # modifications, as long as this notice is preserved.
710
711 m4_define([_LT_COPYING], [dnl
712 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
713 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
714 #                 Foundation, Inc.
715 #   Written by Gordon Matzigkeit, 1996
716 #
717 #   This file is part of GNU Libtool.
718 #
719 # GNU Libtool is free software; you can redistribute it and/or
720 # modify it under the terms of the GNU General Public License as
721 # published by the Free Software Foundation; either version 2 of
722 # the License, or (at your option) any later version.
723 #
724 # As a special exception to the GNU General Public License,
725 # if you distribute this file as part of a program or library that
726 # is built using GNU Libtool, you may include this file under the
727 # same distribution terms that you use for the rest of that program.
728 #
729 # GNU Libtool is distributed in the hope that it will be useful,
730 # but WITHOUT ANY WARRANTY; without even the implied warranty of
731 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
732 # GNU General Public License for more details.
733 #
734 # You should have received a copy of the GNU General Public License
735 # along with GNU Libtool; see the file COPYING.  If not, a copy
736 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
737 # obtained by writing to the Free Software Foundation, Inc.,
738 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
739 ])
740
741 # serial 57 LT_INIT
742
743
744 # LT_PREREQ(VERSION)
745 # ------------------
746 # Complain and exit if this libtool version is less that VERSION.
747 m4_defun([LT_PREREQ],
748 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
749        [m4_default([$3],
750                    [m4_fatal([Libtool version $1 or higher is required],
751                              63)])],
752        [$2])])
753
754
755 # _LT_CHECK_BUILDDIR
756 # ------------------
757 # Complain if the absolute build directory name contains unusual characters
758 m4_defun([_LT_CHECK_BUILDDIR],
759 [case `pwd` in
760   *\ * | *\     *)
761     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
762 esac
763 ])
764
765
766 # LT_INIT([OPTIONS])
767 # ------------------
768 AC_DEFUN([LT_INIT],
769 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
770 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
771 AC_BEFORE([$0], [LT_LANG])dnl
772 AC_BEFORE([$0], [LT_OUTPUT])dnl
773 AC_BEFORE([$0], [LTDL_INIT])dnl
774 m4_require([_LT_CHECK_BUILDDIR])dnl
775
776 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
777 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
778 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
779 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
780 dnl unless we require an AC_DEFUNed macro:
781 AC_REQUIRE([LTOPTIONS_VERSION])dnl
782 AC_REQUIRE([LTSUGAR_VERSION])dnl
783 AC_REQUIRE([LTVERSION_VERSION])dnl
784 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
785 m4_require([_LT_PROG_LTMAIN])dnl
786
787 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
788
789 dnl Parse OPTIONS
790 _LT_SET_OPTIONS([$0], [$1])
791
792 # This can be used to rebuild libtool when needed
793 LIBTOOL_DEPS="$ltmain"
794
795 # Always use our own libtool.
796 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
797 AC_SUBST(LIBTOOL)dnl
798
799 _LT_SETUP
800
801 # Only expand once:
802 m4_define([LT_INIT])
803 ])# LT_INIT
804
805 # Old names:
806 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
807 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
808 dnl aclocal-1.4 backwards compatibility:
809 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
810 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
811
812
813 # _LT_CC_BASENAME(CC)
814 # -------------------
815 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
816 m4_defun([_LT_CC_BASENAME],
817 [for cc_temp in $1""; do
818   case $cc_temp in
819     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
820     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
821     \-*) ;;
822     *) break;;
823   esac
824 done
825 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
826 ])
827
828
829 # _LT_FILEUTILS_DEFAULTS
830 # ----------------------
831 # It is okay to use these file commands and assume they have been set
832 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
833 m4_defun([_LT_FILEUTILS_DEFAULTS],
834 [: ${CP="cp -f"}
835 : ${MV="mv -f"}
836 : ${RM="rm -f"}
837 ])# _LT_FILEUTILS_DEFAULTS
838
839
840 # _LT_SETUP
841 # ---------
842 m4_defun([_LT_SETUP],
843 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
844 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
845 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
846 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
847
848 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
849 dnl
850 _LT_DECL([], [host_alias], [0], [The host system])dnl
851 _LT_DECL([], [host], [0])dnl
852 _LT_DECL([], [host_os], [0])dnl
853 dnl
854 _LT_DECL([], [build_alias], [0], [The build system])dnl
855 _LT_DECL([], [build], [0])dnl
856 _LT_DECL([], [build_os], [0])dnl
857 dnl
858 AC_REQUIRE([AC_PROG_CC])dnl
859 AC_REQUIRE([LT_PATH_LD])dnl
860 AC_REQUIRE([LT_PATH_NM])dnl
861 dnl
862 AC_REQUIRE([AC_PROG_LN_S])dnl
863 test -z "$LN_S" && LN_S="ln -s"
864 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
865 dnl
866 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
867 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
868 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
869 dnl
870 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
871 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
872 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
873 m4_require([_LT_CMD_RELOAD])dnl
874 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
875 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
876 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
877 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
878 m4_require([_LT_WITH_SYSROOT])dnl
879
880 _LT_CONFIG_LIBTOOL_INIT([
881 # See if we are running on zsh, and set the options which allow our
882 # commands through without removal of \ escapes INIT.
883 if test -n "\${ZSH_VERSION+set}" ; then
884    setopt NO_GLOB_SUBST
885 fi
886 ])
887 if test -n "${ZSH_VERSION+set}" ; then
888    setopt NO_GLOB_SUBST
889 fi
890
891 _LT_CHECK_OBJDIR
892
893 m4_require([_LT_TAG_COMPILER])dnl
894
895 case $host_os in
896 aix3*)
897   # AIX sometimes has problems with the GCC collect2 program.  For some
898   # reason, if we set the COLLECT_NAMES environment variable, the problems
899   # vanish in a puff of smoke.
900   if test "X${COLLECT_NAMES+set}" != Xset; then
901     COLLECT_NAMES=
902     export COLLECT_NAMES
903   fi
904   ;;
905 esac
906
907 # Global variables:
908 ofile=libtool
909 can_build_shared=yes
910
911 # All known linkers require a `.a' archive for static linking (except MSVC,
912 # which needs '.lib').
913 libext=a
914
915 with_gnu_ld="$lt_cv_prog_gnu_ld"
916
917 old_CC="$CC"
918 old_CFLAGS="$CFLAGS"
919
920 # Set sane defaults for various variables
921 test -z "$CC" && CC=cc
922 test -z "$LTCC" && LTCC=$CC
923 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
924 test -z "$LD" && LD=ld
925 test -z "$ac_objext" && ac_objext=o
926
927 _LT_CC_BASENAME([$compiler])
928
929 # Only perform the check for file, if the check method requires it
930 test -z "$MAGIC_CMD" && MAGIC_CMD=file
931 case $deplibs_check_method in
932 file_magic*)
933   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
934     _LT_PATH_MAGIC
935   fi
936   ;;
937 esac
938
939 # Use C for the default configuration in the libtool script
940 LT_SUPPORTED_TAG([CC])
941 _LT_LANG_C_CONFIG
942 _LT_LANG_DEFAULT_CONFIG
943 _LT_CONFIG_COMMANDS
944 ])# _LT_SETUP
945
946
947 # _LT_PREPARE_SED_QUOTE_VARS
948 # --------------------------
949 # Define a few sed substitution that help us do robust quoting.
950 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
951 [# Backslashify metacharacters that are still active within
952 # double-quoted strings.
953 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
954
955 # Same as above, but do not quote variable references.
956 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
957
958 # Sed substitution to delay expansion of an escaped shell variable in a
959 # double_quote_subst'ed string.
960 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
961
962 # Sed substitution to delay expansion of an escaped single quote.
963 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
964
965 # Sed substitution to avoid accidental globbing in evaled expressions
966 no_glob_subst='s/\*/\\\*/g'
967 ])
968
969 # _LT_PROG_LTMAIN
970 # ---------------
971 # Note that this code is called both from `configure', and `config.status'
972 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
973 # `config.status' has no value for ac_aux_dir unless we are using Automake,
974 # so we pass a copy along to make sure it has a sensible value anyway.
975 m4_defun([_LT_PROG_LTMAIN],
976 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
977 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
978 ltmain="$ac_aux_dir/ltmain.sh"
979 ])# _LT_PROG_LTMAIN
980
981
982 ## ------------------------------------- ##
983 ## Accumulate code for creating libtool. ##
984 ## ------------------------------------- ##
985
986 # So that we can recreate a full libtool script including additional
987 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
988 # in macros and then make a single call at the end using the `libtool'
989 # label.
990
991
992 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
993 # ----------------------------------------
994 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
995 m4_define([_LT_CONFIG_LIBTOOL_INIT],
996 [m4_ifval([$1],
997           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
998                      [$1
999 ])])])
1000
1001 # Initialize.
1002 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1003
1004
1005 # _LT_CONFIG_LIBTOOL([COMMANDS])
1006 # ------------------------------
1007 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1008 m4_define([_LT_CONFIG_LIBTOOL],
1009 [m4_ifval([$1],
1010           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1011                      [$1
1012 ])])])
1013
1014 # Initialize.
1015 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1016
1017
1018 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1019 # -----------------------------------------------------
1020 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1021 [_LT_CONFIG_LIBTOOL([$1])
1022 _LT_CONFIG_LIBTOOL_INIT([$2])
1023 ])
1024
1025
1026 # _LT_FORMAT_COMMENT([COMMENT])
1027 # -----------------------------
1028 # Add leading comment marks to the start of each line, and a trailing
1029 # full-stop to the whole comment if one is not present already.
1030 m4_define([_LT_FORMAT_COMMENT],
1031 [m4_ifval([$1], [
1032 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1033               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1034 )])
1035
1036
1037
1038 ## ------------------------ ##
1039 ## FIXME: Eliminate VARNAME ##
1040 ## ------------------------ ##
1041
1042
1043 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1044 # -------------------------------------------------------------------
1045 # CONFIGNAME is the name given to the value in the libtool script.
1046 # VARNAME is the (base) name used in the configure script.
1047 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1048 # VARNAME.  Any other value will be used directly.
1049 m4_define([_LT_DECL],
1050 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1051     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1052         [m4_ifval([$1], [$1], [$2])])
1053     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1054     m4_ifval([$4],
1055         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1056     lt_dict_add_subkey([lt_decl_dict], [$2],
1057         [tagged?], [m4_ifval([$5], [yes], [no])])])
1058 ])
1059
1060
1061 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1062 # --------------------------------------------------------
1063 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1064
1065
1066 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1067 # ------------------------------------------------
1068 m4_define([lt_decl_tag_varnames],
1069 [_lt_decl_filter([tagged?], [yes], $@)])
1070
1071
1072 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1073 # ---------------------------------------------------------
1074 m4_define([_lt_decl_filter],
1075 [m4_case([$#],
1076   [0], [m4_fatal([$0: too few arguments: $#])],
1077   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1078   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1079   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1080   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1081 ])
1082
1083
1084 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1085 # --------------------------------------------------
1086 m4_define([lt_decl_quote_varnames],
1087 [_lt_decl_filter([value], [1], $@)])
1088
1089
1090 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1091 # ---------------------------------------------------
1092 m4_define([lt_decl_dquote_varnames],
1093 [_lt_decl_filter([value], [2], $@)])
1094
1095
1096 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1097 # ---------------------------------------------------
1098 m4_define([lt_decl_varnames_tagged],
1099 [m4_assert([$# <= 2])dnl
1100 _$0(m4_quote(m4_default([$1], [[, ]])),
1101     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1102     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1103 m4_define([_lt_decl_varnames_tagged],
1104 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1105
1106
1107 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1108 # ------------------------------------------------
1109 m4_define([lt_decl_all_varnames],
1110 [_$0(m4_quote(m4_default([$1], [[, ]])),
1111      m4_if([$2], [],
1112            m4_quote(lt_decl_varnames),
1113         m4_quote(m4_shift($@))))[]dnl
1114 ])
1115 m4_define([_lt_decl_all_varnames],
1116 [lt_join($@, lt_decl_varnames_tagged([$1],
1117                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1118 ])
1119
1120
1121 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1122 # ------------------------------------
1123 # Quote a variable value, and forward it to `config.status' so that its
1124 # declaration there will have the same value as in `configure'.  VARNAME
1125 # must have a single quote delimited value for this to work.
1126 m4_define([_LT_CONFIG_STATUS_DECLARE],
1127 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1128
1129
1130 # _LT_CONFIG_STATUS_DECLARATIONS
1131 # ------------------------------
1132 # We delimit libtool config variables with single quotes, so when
1133 # we write them to config.status, we have to be sure to quote all
1134 # embedded single quotes properly.  In configure, this macro expands
1135 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1136 #
1137 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1138 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1139 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1140     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1141
1142
1143 # _LT_LIBTOOL_TAGS
1144 # ----------------
1145 # Output comment and list of tags supported by the script
1146 m4_defun([_LT_LIBTOOL_TAGS],
1147 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1148 available_tags="_LT_TAGS"dnl
1149 ])
1150
1151
1152 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1153 # -----------------------------------
1154 # Extract the dictionary values for VARNAME (optionally with TAG) and
1155 # expand to a commented shell variable setting:
1156 #
1157 #    # Some comment about what VAR is for.
1158 #    visible_name=$lt_internal_name
1159 m4_define([_LT_LIBTOOL_DECLARE],
1160 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1161                                            [description])))[]dnl
1162 m4_pushdef([_libtool_name],
1163     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1164 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1165     [0], [_libtool_name=[$]$1],
1166     [1], [_libtool_name=$lt_[]$1],
1167     [2], [_libtool_name=$lt_[]$1],
1168     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1169 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1170 ])
1171
1172
1173 # _LT_LIBTOOL_CONFIG_VARS
1174 # -----------------------
1175 # Produce commented declarations of non-tagged libtool config variables
1176 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1177 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1178 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1179 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1180 [m4_foreach([_lt_var],
1181     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1182     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1183
1184
1185 # _LT_LIBTOOL_TAG_VARS(TAG)
1186 # -------------------------
1187 m4_define([_LT_LIBTOOL_TAG_VARS],
1188 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1189     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1190
1191
1192 # _LT_TAGVAR(VARNAME, [TAGNAME])
1193 # ------------------------------
1194 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1195
1196
1197 # _LT_CONFIG_COMMANDS
1198 # -------------------
1199 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1200 # variables for single and double quote escaping we saved from calls
1201 # to _LT_DECL, we can put quote escaped variables declarations
1202 # into `config.status', and then the shell code to quote escape them in
1203 # for loops in `config.status'.  Finally, any additional code accumulated
1204 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1205 m4_defun([_LT_CONFIG_COMMANDS],
1206 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1207         dnl If the libtool generation code has been placed in $CONFIG_LT,
1208         dnl instead of duplicating it all over again into config.status,
1209         dnl then we will have config.status run $CONFIG_LT later, so it
1210         dnl needs to know what name is stored there:
1211         [AC_CONFIG_COMMANDS([libtool],
1212             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1213     dnl If the libtool generation code is destined for config.status,
1214     dnl expand the accumulated commands and init code now:
1215     [AC_CONFIG_COMMANDS([libtool],
1216         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1217 ])#_LT_CONFIG_COMMANDS
1218
1219
1220 # Initialize.
1221 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1222 [
1223
1224 # The HP-UX ksh and POSIX shell print the target directory to stdout
1225 # if CDPATH is set.
1226 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1227
1228 sed_quote_subst='$sed_quote_subst'
1229 double_quote_subst='$double_quote_subst'
1230 delay_variable_subst='$delay_variable_subst'
1231 _LT_CONFIG_STATUS_DECLARATIONS
1232 LTCC='$LTCC'
1233 LTCFLAGS='$LTCFLAGS'
1234 compiler='$compiler_DEFAULT'
1235
1236 # A function that is used when there is no print builtin or printf.
1237 func_fallback_echo ()
1238 {
1239   eval 'cat <<_LTECHO_EOF
1240 \$[]1
1241 _LTECHO_EOF'
1242 }
1243
1244 # Quote evaled strings.
1245 for var in lt_decl_all_varnames([[ \
1246 ]], lt_decl_quote_varnames); do
1247     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1248     *[[\\\\\\\`\\"\\\$]]*)
1249       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1250       ;;
1251     *)
1252       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1253       ;;
1254     esac
1255 done
1256
1257 # Double-quote double-evaled strings.
1258 for var in lt_decl_all_varnames([[ \
1259 ]], lt_decl_dquote_varnames); do
1260     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1261     *[[\\\\\\\`\\"\\\$]]*)
1262       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1263       ;;
1264     *)
1265       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1266       ;;
1267     esac
1268 done
1269
1270 _LT_OUTPUT_LIBTOOL_INIT
1271 ])
1272
1273 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1274 # ------------------------------------
1275 # Generate a child script FILE with all initialization necessary to
1276 # reuse the environment learned by the parent script, and make the
1277 # file executable.  If COMMENT is supplied, it is inserted after the
1278 # `#!' sequence but before initialization text begins.  After this
1279 # macro, additional text can be appended to FILE to form the body of
1280 # the child script.  The macro ends with non-zero status if the
1281 # file could not be fully written (such as if the disk is full).
1282 m4_ifdef([AS_INIT_GENERATED],
1283 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1284 [m4_defun([_LT_GENERATED_FILE_INIT],
1285 [m4_require([AS_PREPARE])]dnl
1286 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1287 [lt_write_fail=0
1288 cat >$1 <<_ASEOF || lt_write_fail=1
1289 #! $SHELL
1290 # Generated by $as_me.
1291 $2
1292 SHELL=\${CONFIG_SHELL-$SHELL}
1293 export SHELL
1294 _ASEOF
1295 cat >>$1 <<\_ASEOF || lt_write_fail=1
1296 AS_SHELL_SANITIZE
1297 _AS_PREPARE
1298 exec AS_MESSAGE_FD>&1
1299 _ASEOF
1300 test $lt_write_fail = 0 && chmod +x $1[]dnl
1301 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1302
1303 # LT_OUTPUT
1304 # ---------
1305 # This macro allows early generation of the libtool script (before
1306 # AC_OUTPUT is called), incase it is used in configure for compilation
1307 # tests.
1308 AC_DEFUN([LT_OUTPUT],
1309 [: ${CONFIG_LT=./config.lt}
1310 AC_MSG_NOTICE([creating $CONFIG_LT])
1311 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1312 [# Run this file to recreate a libtool stub with the current configuration.])
1313
1314 cat >>"$CONFIG_LT" <<\_LTEOF
1315 lt_cl_silent=false
1316 exec AS_MESSAGE_LOG_FD>>config.log
1317 {
1318   echo
1319   AS_BOX([Running $as_me.])
1320 } >&AS_MESSAGE_LOG_FD
1321
1322 lt_cl_help="\
1323 \`$as_me' creates a local libtool stub from the current configuration,
1324 for use in further configure time tests before the real libtool is
1325 generated.
1326
1327 Usage: $[0] [[OPTIONS]]
1328
1329   -h, --help      print this help, then exit
1330   -V, --version   print version number, then exit
1331   -q, --quiet     do not print progress messages
1332   -d, --debug     don't remove temporary files
1333
1334 Report bugs to <bug-libtool@gnu.org>."
1335
1336 lt_cl_version="\
1337 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1338 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1339 configured by $[0], generated by m4_PACKAGE_STRING.
1340
1341 Copyright (C) 2011 Free Software Foundation, Inc.
1342 This config.lt script is free software; the Free Software Foundation
1343 gives unlimited permision to copy, distribute and modify it."
1344
1345 while test $[#] != 0
1346 do
1347   case $[1] in
1348     --version | --v* | -V )
1349       echo "$lt_cl_version"; exit 0 ;;
1350     --help | --h* | -h )
1351       echo "$lt_cl_help"; exit 0 ;;
1352     --debug | --d* | -d )
1353       debug=: ;;
1354     --quiet | --q* | --silent | --s* | -q )
1355       lt_cl_silent=: ;;
1356
1357     -*) AC_MSG_ERROR([unrecognized option: $[1]
1358 Try \`$[0] --help' for more information.]) ;;
1359
1360     *) AC_MSG_ERROR([unrecognized argument: $[1]
1361 Try \`$[0] --help' for more information.]) ;;
1362   esac
1363   shift
1364 done
1365
1366 if $lt_cl_silent; then
1367   exec AS_MESSAGE_FD>/dev/null
1368 fi
1369 _LTEOF
1370
1371 cat >>"$CONFIG_LT" <<_LTEOF
1372 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1373 _LTEOF
1374
1375 cat >>"$CONFIG_LT" <<\_LTEOF
1376 AC_MSG_NOTICE([creating $ofile])
1377 _LT_OUTPUT_LIBTOOL_COMMANDS
1378 AS_EXIT(0)
1379 _LTEOF
1380 chmod +x "$CONFIG_LT"
1381
1382 # configure is writing to config.log, but config.lt does its own redirection,
1383 # appending to config.log, which fails on DOS, as config.log is still kept
1384 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1385 # config.log, so it can be properly (re)opened and appended to by config.lt.
1386 lt_cl_success=:
1387 test "$silent" = yes &&
1388   lt_config_lt_args="$lt_config_lt_args --quiet"
1389 exec AS_MESSAGE_LOG_FD>/dev/null
1390 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1391 exec AS_MESSAGE_LOG_FD>>config.log
1392 $lt_cl_success || AS_EXIT(1)
1393 ])# LT_OUTPUT
1394
1395
1396 # _LT_CONFIG(TAG)
1397 # ---------------
1398 # If TAG is the built-in tag, create an initial libtool script with a
1399 # default configuration from the untagged config vars.  Otherwise add code
1400 # to config.status for appending the configuration named by TAG from the
1401 # matching tagged config vars.
1402 m4_defun([_LT_CONFIG],
1403 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1404 _LT_CONFIG_SAVE_COMMANDS([
1405   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1406   m4_if(_LT_TAG, [C], [
1407     # See if we are running on zsh, and set the options which allow our
1408     # commands through without removal of \ escapes.
1409     if test -n "${ZSH_VERSION+set}" ; then
1410       setopt NO_GLOB_SUBST
1411     fi
1412
1413     cfgfile="${ofile}T"
1414     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1415     $RM "$cfgfile"
1416
1417     cat <<_LT_EOF >> "$cfgfile"
1418 #! $SHELL
1419
1420 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1421 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1422 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1423 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1424 #
1425 _LT_COPYING
1426 _LT_LIBTOOL_TAGS
1427
1428 # ### BEGIN LIBTOOL CONFIG
1429 _LT_LIBTOOL_CONFIG_VARS
1430 _LT_LIBTOOL_TAG_VARS
1431 # ### END LIBTOOL CONFIG
1432
1433 _LT_EOF
1434
1435   case $host_os in
1436   aix3*)
1437     cat <<\_LT_EOF >> "$cfgfile"
1438 # AIX sometimes has problems with the GCC collect2 program.  For some
1439 # reason, if we set the COLLECT_NAMES environment variable, the problems
1440 # vanish in a puff of smoke.
1441 if test "X${COLLECT_NAMES+set}" != Xset; then
1442   COLLECT_NAMES=
1443   export COLLECT_NAMES
1444 fi
1445 _LT_EOF
1446     ;;
1447   esac
1448
1449   _LT_PROG_LTMAIN
1450
1451   # We use sed instead of cat because bash on DJGPP gets confused if
1452   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1453   # text mode, it properly converts lines to CR/LF.  This bash problem
1454   # is reportedly fixed, but why not run on old versions too?
1455   sed '$q' "$ltmain" >> "$cfgfile" \
1456      || (rm -f "$cfgfile"; exit 1)
1457
1458   _LT_PROG_REPLACE_SHELLFNS
1459
1460    mv -f "$cfgfile" "$ofile" ||
1461     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1462   chmod +x "$ofile"
1463 ],
1464 [cat <<_LT_EOF >> "$ofile"
1465
1466 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1467 dnl in a comment (ie after a #).
1468 # ### BEGIN LIBTOOL TAG CONFIG: $1
1469 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1470 # ### END LIBTOOL TAG CONFIG: $1
1471 _LT_EOF
1472 ])dnl /m4_if
1473 ],
1474 [m4_if([$1], [], [
1475     PACKAGE='$PACKAGE'
1476     VERSION='$VERSION'
1477     TIMESTAMP='$TIMESTAMP'
1478     RM='$RM'
1479     ofile='$ofile'], [])
1480 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1481 ])# _LT_CONFIG
1482
1483
1484 # LT_SUPPORTED_TAG(TAG)
1485 # ---------------------
1486 # Trace this macro to discover what tags are supported by the libtool
1487 # --tag option, using:
1488 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1489 AC_DEFUN([LT_SUPPORTED_TAG], [])
1490
1491
1492 # C support is built-in for now
1493 m4_define([_LT_LANG_C_enabled], [])
1494 m4_define([_LT_TAGS], [])
1495
1496
1497 # LT_LANG(LANG)
1498 # -------------
1499 # Enable libtool support for the given language if not already enabled.
1500 AC_DEFUN([LT_LANG],
1501 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1502 m4_case([$1],
1503   [C],                  [_LT_LANG(C)],
1504   [C++],                [_LT_LANG(CXX)],
1505   [Go],                 [_LT_LANG(GO)],
1506   [Java],               [_LT_LANG(GCJ)],
1507   [Fortran 77],         [_LT_LANG(F77)],
1508   [Fortran],            [_LT_LANG(FC)],
1509   [Windows Resource],   [_LT_LANG(RC)],
1510   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1511     [_LT_LANG($1)],
1512     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1513 ])# LT_LANG
1514
1515
1516 # _LT_LANG(LANGNAME)
1517 # ------------------
1518 m4_defun([_LT_LANG],
1519 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1520   [LT_SUPPORTED_TAG([$1])dnl
1521   m4_append([_LT_TAGS], [$1 ])dnl
1522   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1523   _LT_LANG_$1_CONFIG($1)])dnl
1524 ])# _LT_LANG
1525
1526
1527 m4_ifndef([AC_PROG_GO], [
1528 ############################################################
1529 # NOTE: This macro has been submitted for inclusion into   #
1530 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1531 #  a released version of Autoconf we should remove this    #
1532 #  macro and use it instead.                               #
1533 ############################################################
1534 m4_defun([AC_PROG_GO],
1535 [AC_LANG_PUSH(Go)dnl
1536 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1537 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1538 _AC_ARG_VAR_LDFLAGS()dnl
1539 AC_CHECK_TOOL(GOC, gccgo)
1540 if test -z "$GOC"; then
1541   if test -n "$ac_tool_prefix"; then
1542     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1543   fi
1544 fi
1545 if test -z "$GOC"; then
1546   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1547 fi
1548 ])#m4_defun
1549 ])#m4_ifndef
1550
1551
1552 # _LT_LANG_DEFAULT_CONFIG
1553 # -----------------------
1554 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1555 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1556   [LT_LANG(CXX)],
1557   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1558
1559 AC_PROVIDE_IFELSE([AC_PROG_F77],
1560   [LT_LANG(F77)],
1561   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1562
1563 AC_PROVIDE_IFELSE([AC_PROG_FC],
1564   [LT_LANG(FC)],
1565   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1566
1567 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1568 dnl pulling things in needlessly.
1569 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1570   [LT_LANG(GCJ)],
1571   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1572     [LT_LANG(GCJ)],
1573     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1574       [LT_LANG(GCJ)],
1575       [m4_ifdef([AC_PROG_GCJ],
1576         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1577        m4_ifdef([A][M_PROG_GCJ],
1578         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1579        m4_ifdef([LT_PROG_GCJ],
1580         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1581
1582 AC_PROVIDE_IFELSE([AC_PROG_GO],
1583   [LT_LANG(GO)],
1584   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1585
1586 AC_PROVIDE_IFELSE([LT_PROG_RC],
1587   [LT_LANG(RC)],
1588   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1589 ])# _LT_LANG_DEFAULT_CONFIG
1590
1591 # Obsolete macros:
1592 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1593 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1594 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1595 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1596 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1597 dnl aclocal-1.4 backwards compatibility:
1598 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1599 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1600 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1601 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1602 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1603
1604
1605 # _LT_TAG_COMPILER
1606 # ----------------
1607 m4_defun([_LT_TAG_COMPILER],
1608 [AC_REQUIRE([AC_PROG_CC])dnl
1609
1610 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1611 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1612 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1613 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1614
1615 # If no C compiler was specified, use CC.
1616 LTCC=${LTCC-"$CC"}
1617
1618 # If no C compiler flags were specified, use CFLAGS.
1619 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1620
1621 # Allow CC to be a program name with arguments.
1622 compiler=$CC
1623 ])# _LT_TAG_COMPILER
1624
1625
1626 # _LT_COMPILER_BOILERPLATE
1627 # ------------------------
1628 # Check for compiler boilerplate output or warnings with
1629 # the simple compiler test code.
1630 m4_defun([_LT_COMPILER_BOILERPLATE],
1631 [m4_require([_LT_DECL_SED])dnl
1632 ac_outfile=conftest.$ac_objext
1633 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1634 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1635 _lt_compiler_boilerplate=`cat conftest.err`
1636 $RM conftest*
1637 ])# _LT_COMPILER_BOILERPLATE
1638
1639
1640 # _LT_LINKER_BOILERPLATE
1641 # ----------------------
1642 # Check for linker boilerplate output or warnings with
1643 # the simple link test code.
1644 m4_defun([_LT_LINKER_BOILERPLATE],
1645 [m4_require([_LT_DECL_SED])dnl
1646 ac_outfile=conftest.$ac_objext
1647 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1648 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1649 _lt_linker_boilerplate=`cat conftest.err`
1650 $RM -r conftest*
1651 ])# _LT_LINKER_BOILERPLATE
1652
1653 # _LT_REQUIRED_DARWIN_CHECKS
1654 # -------------------------
1655 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1656   case $host_os in
1657     rhapsody* | darwin*)
1658     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1659     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1660     AC_CHECK_TOOL([LIPO], [lipo], [:])
1661     AC_CHECK_TOOL([OTOOL], [otool], [:])
1662     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1663     _LT_DECL([], [DSYMUTIL], [1],
1664       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1665     _LT_DECL([], [NMEDIT], [1],
1666       [Tool to change global to local symbols on Mac OS X])
1667     _LT_DECL([], [LIPO], [1],
1668       [Tool to manipulate fat objects and archives on Mac OS X])
1669     _LT_DECL([], [OTOOL], [1],
1670       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1671     _LT_DECL([], [OTOOL64], [1],
1672       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1673
1674     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1675       [lt_cv_apple_cc_single_mod=no
1676       if test -z "${LT_MULTI_MODULE}"; then
1677         # By default we will add the -single_module flag. You can override
1678         # by either setting the environment variable LT_MULTI_MODULE
1679         # non-empty at configure time, or by adding -multi_module to the
1680         # link flags.
1681         rm -rf libconftest.dylib*
1682         echo "int foo(void){return 1;}" > conftest.c
1683         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1684 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1685         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1686           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1687         _lt_result=$?
1688         # If there is a non-empty error log, and "single_module"
1689         # appears in it, assume the flag caused a linker warning
1690         if test -s conftest.err && $GREP single_module conftest.err; then
1691           cat conftest.err >&AS_MESSAGE_LOG_FD
1692         # Otherwise, if the output was created with a 0 exit code from
1693         # the compiler, it worked.
1694         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1695           lt_cv_apple_cc_single_mod=yes
1696         else
1697           cat conftest.err >&AS_MESSAGE_LOG_FD
1698         fi
1699         rm -rf libconftest.dylib*
1700         rm -f conftest.*
1701       fi])
1702
1703     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1704       [lt_cv_ld_exported_symbols_list],
1705       [lt_cv_ld_exported_symbols_list=no
1706       save_LDFLAGS=$LDFLAGS
1707       echo "_main" > conftest.sym
1708       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1709       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1710         [lt_cv_ld_exported_symbols_list=yes],
1711         [lt_cv_ld_exported_symbols_list=no])
1712         LDFLAGS="$save_LDFLAGS"
1713     ])
1714
1715     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1716       [lt_cv_ld_force_load=no
1717       cat > conftest.c << _LT_EOF
1718 int forced_loaded() { return 2;}
1719 _LT_EOF
1720       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1721       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1722       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1723       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1724       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1725       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1726       cat > conftest.c << _LT_EOF
1727 int main() { return 0;}
1728 _LT_EOF
1729       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1730       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1731       _lt_result=$?
1732       if test -s conftest.err && $GREP force_load conftest.err; then
1733         cat conftest.err >&AS_MESSAGE_LOG_FD
1734       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1735         lt_cv_ld_force_load=yes
1736       else
1737         cat conftest.err >&AS_MESSAGE_LOG_FD
1738       fi
1739         rm -f conftest.err libconftest.a conftest conftest.c
1740         rm -rf conftest.dSYM
1741     ])
1742     case $host_os in
1743     rhapsody* | darwin1.[[012]])
1744       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1745     darwin1.*)
1746       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1747     darwin*) # darwin 5.x on
1748       # if running on 10.5 or later, the deployment target defaults
1749       # to the OS version, if on x86, and 10.4, the deployment
1750       # target defaults to 10.4. Don't you love it?
1751       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1752         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1753           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1754         10.[[012]]*)
1755           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1756         10.*)
1757           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1758       esac
1759     ;;
1760   esac
1761     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1762       _lt_dar_single_mod='$single_module'
1763     fi
1764     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1765       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1766     else
1767       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1768     fi
1769     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1770       _lt_dsymutil='~$DSYMUTIL $lib || :'
1771     else
1772       _lt_dsymutil=
1773     fi
1774     ;;
1775   esac
1776 ])
1777
1778
1779 # _LT_DARWIN_LINKER_FEATURES([TAG])
1780 # ---------------------------------
1781 # Checks for linker and compiler features on darwin
1782 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1783 [
1784   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1785   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1786   _LT_TAGVAR(hardcode_direct, $1)=no
1787   _LT_TAGVAR(hardcode_automatic, $1)=yes
1788   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1789   if test "$lt_cv_ld_force_load" = "yes"; then
1790     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1791     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1792                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1793   else
1794     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1795   fi
1796   _LT_TAGVAR(link_all_deplibs, $1)=yes
1797   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1798   case $cc_basename in
1799      ifort*) _lt_dar_can_shared=yes ;;
1800      *) _lt_dar_can_shared=$GCC ;;
1801   esac
1802   if test "$_lt_dar_can_shared" = "yes"; then
1803     output_verbose_link_cmd=func_echo_all
1804     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1805     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1806     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1807     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1808     m4_if([$1], [CXX],
1809 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1810       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1811       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1812     fi
1813 ],[])
1814   else
1815   _LT_TAGVAR(ld_shlibs, $1)=no
1816   fi
1817 ])
1818
1819 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1820 # ----------------------------------
1821 # Links a minimal program and checks the executable
1822 # for the system default hardcoded library path. In most cases,
1823 # this is /usr/lib:/lib, but when the MPI compilers are used
1824 # the location of the communication and MPI libs are included too.
1825 # If we don't find anything, use the default library path according
1826 # to the aix ld manual.
1827 # Store the results from the different compilers for each TAGNAME.
1828 # Allow to override them for all tags through lt_cv_aix_libpath.
1829 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1830 [m4_require([_LT_DECL_SED])dnl
1831 if test "${lt_cv_aix_libpath+set}" = set; then
1832   aix_libpath=$lt_cv_aix_libpath
1833 else
1834   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1835   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1836   lt_aix_libpath_sed='[
1837       /Import File Strings/,/^$/ {
1838           /^0/ {
1839               s/^0  *\([^ ]*\) *$/\1/
1840               p
1841           }
1842       }]'
1843   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1844   # Check for a 64-bit object if we didn't find anything.
1845   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1846     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1847   fi],[])
1848   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1849     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1850   fi
1851   ])
1852   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1853 fi
1854 ])# _LT_SYS_MODULE_PATH_AIX
1855
1856
1857 # _LT_SHELL_INIT(ARG)
1858 # -------------------
1859 m4_define([_LT_SHELL_INIT],
1860 [m4_divert_text([M4SH-INIT], [$1
1861 ])])# _LT_SHELL_INIT
1862
1863
1864
1865 # _LT_PROG_ECHO_BACKSLASH
1866 # -----------------------
1867 # Find how we can fake an echo command that does not interpret backslash.
1868 # In particular, with Autoconf 2.60 or later we add some code to the start
1869 # of the generated configure script which will find a shell with a builtin
1870 # printf (which we can use as an echo command).
1871 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1872 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1873 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1874 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1875
1876 AC_MSG_CHECKING([how to print strings])
1877 # Test print first, because it will be a builtin if present.
1878 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1879    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1880   ECHO='print -r --'
1881 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1882   ECHO='printf %s\n'
1883 else
1884   # Use this function as a fallback that always works.
1885   func_fallback_echo ()
1886   {
1887     eval 'cat <<_LTECHO_EOF
1888 $[]1
1889 _LTECHO_EOF'
1890   }
1891   ECHO='func_fallback_echo'
1892 fi
1893
1894 # func_echo_all arg...
1895 # Invoke $ECHO with all args, space-separated.
1896 func_echo_all ()
1897 {
1898     $ECHO "$*" 
1899 }
1900
1901 case "$ECHO" in
1902   printf*) AC_MSG_RESULT([printf]) ;;
1903   print*) AC_MSG_RESULT([print -r]) ;;
1904   *) AC_MSG_RESULT([cat]) ;;
1905 esac
1906
1907 m4_ifdef([_AS_DETECT_SUGGESTED],
1908 [_AS_DETECT_SUGGESTED([
1909   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1910     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1911     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1912     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1913     PATH=/empty FPATH=/empty; export PATH FPATH
1914     test "X`printf %s $ECHO`" = "X$ECHO" \
1915       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1916
1917 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1918 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1919 ])# _LT_PROG_ECHO_BACKSLASH
1920
1921
1922 # _LT_WITH_SYSROOT
1923 # ----------------
1924 AC_DEFUN([_LT_WITH_SYSROOT],
1925 [AC_MSG_CHECKING([for sysroot])
1926 AC_ARG_WITH([sysroot],
1927 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
1928                         (or the compiler's sysroot if not specified).],
1929 [], [with_sysroot=no])
1930
1931 dnl lt_sysroot will always be passed unquoted.  We quote it here
1932 dnl in case the user passed a directory name.
1933 lt_sysroot=
1934 case ${with_sysroot} in #(
1935  yes)
1936    if test "$GCC" = yes; then
1937      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1938    fi
1939    ;; #(
1940  /*)
1941    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1942    ;; #(
1943  no|'')
1944    ;; #(
1945  *)
1946    AC_MSG_RESULT([${with_sysroot}])
1947    AC_MSG_ERROR([The sysroot must be an absolute path.])
1948    ;;
1949 esac
1950
1951  AC_MSG_RESULT([${lt_sysroot:-no}])
1952 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1953 [dependent libraries, and in which our libraries should be installed.])])
1954
1955 # _LT_ENABLE_LOCK
1956 # ---------------
1957 m4_defun([_LT_ENABLE_LOCK],
1958 [AC_ARG_ENABLE([libtool-lock],
1959   [AS_HELP_STRING([--disable-libtool-lock],
1960     [avoid locking (might break parallel builds)])])
1961 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1962
1963 # Some flags need to be propagated to the compiler or linker for good
1964 # libtool support.
1965 case $host in
1966 ia64-*-hpux*)
1967   # Find out which ABI we are using.
1968   echo 'int i;' > conftest.$ac_ext
1969   if AC_TRY_EVAL(ac_compile); then
1970     case `/usr/bin/file conftest.$ac_objext` in
1971       *ELF-32*)
1972         HPUX_IA64_MODE="32"
1973         ;;
1974       *ELF-64*)
1975         HPUX_IA64_MODE="64"
1976         ;;
1977     esac
1978   fi
1979   rm -rf conftest*
1980   ;;
1981 *-*-irix6*)
1982   # Find out which ABI we are using.
1983   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1984   if AC_TRY_EVAL(ac_compile); then
1985     if test "$lt_cv_prog_gnu_ld" = yes; then
1986       case `/usr/bin/file conftest.$ac_objext` in
1987         *32-bit*)
1988           LD="${LD-ld} -melf32bsmip"
1989           ;;
1990         *N32*)
1991           LD="${LD-ld} -melf32bmipn32"
1992           ;;
1993         *64-bit*)
1994           LD="${LD-ld} -melf64bmip"
1995         ;;
1996       esac
1997     else
1998       case `/usr/bin/file conftest.$ac_objext` in
1999         *32-bit*)
2000           LD="${LD-ld} -32"
2001           ;;
2002         *N32*)
2003           LD="${LD-ld} -n32"
2004           ;;
2005         *64-bit*)
2006           LD="${LD-ld} -64"
2007           ;;
2008       esac
2009     fi
2010   fi
2011   rm -rf conftest*
2012   ;;
2013
2014 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2015 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2016   # Find out which ABI we are using.
2017   echo 'int i;' > conftest.$ac_ext
2018   if AC_TRY_EVAL(ac_compile); then
2019     case `/usr/bin/file conftest.o` in
2020       *32-bit*)
2021         case $host in
2022           x86_64-*kfreebsd*-gnu)
2023             LD="${LD-ld} -m elf_i386_fbsd"
2024             ;;
2025           x86_64-*linux*)
2026             LD="${LD-ld} -m elf_i386"
2027             ;;
2028           ppc64-*linux*|powerpc64-*linux*)
2029             LD="${LD-ld} -m elf32ppclinux"
2030             ;;
2031           s390x-*linux*)
2032             LD="${LD-ld} -m elf_s390"
2033             ;;
2034           sparc64-*linux*)
2035             LD="${LD-ld} -m elf32_sparc"
2036             ;;
2037         esac
2038         ;;
2039       *64-bit*)
2040         case $host in
2041           x86_64-*kfreebsd*-gnu)
2042             LD="${LD-ld} -m elf_x86_64_fbsd"
2043             ;;
2044           x86_64-*linux*)
2045             LD="${LD-ld} -m elf_x86_64"
2046             ;;
2047           ppc*-*linux*|powerpc*-*linux*)
2048             LD="${LD-ld} -m elf64ppc"
2049             ;;
2050           s390*-*linux*|s390*-*tpf*)
2051             LD="${LD-ld} -m elf64_s390"
2052             ;;
2053           sparc*-*linux*)
2054             LD="${LD-ld} -m elf64_sparc"
2055             ;;
2056         esac
2057         ;;
2058     esac
2059   fi
2060   rm -rf conftest*
2061   ;;
2062
2063 *-*-sco3.2v5*)
2064   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2065   SAVE_CFLAGS="$CFLAGS"
2066   CFLAGS="$CFLAGS -belf"
2067   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2068     [AC_LANG_PUSH(C)
2069      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2070      AC_LANG_POP])
2071   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2072     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2073     CFLAGS="$SAVE_CFLAGS"
2074   fi
2075   ;;
2076 *-*solaris*)
2077   # Find out which ABI we are using.
2078   echo 'int i;' > conftest.$ac_ext
2079   if AC_TRY_EVAL(ac_compile); then
2080     case `/usr/bin/file conftest.o` in
2081     *64-bit*)
2082       case $lt_cv_prog_gnu_ld in
2083       yes*)
2084         case $host in
2085         i?86-*-solaris*)
2086           LD="${LD-ld} -m elf_x86_64"
2087           ;;
2088         sparc*-*-solaris*)
2089           LD="${LD-ld} -m elf64_sparc"
2090           ;;
2091         esac
2092         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2093         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2094           LD="${LD-ld}_sol2"
2095         fi
2096         ;;
2097       *)
2098         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2099           LD="${LD-ld} -64"
2100         fi
2101         ;;
2102       esac
2103       ;;
2104     esac
2105   fi
2106   rm -rf conftest*
2107   ;;
2108 esac
2109
2110 need_locks="$enable_libtool_lock"
2111 ])# _LT_ENABLE_LOCK
2112
2113
2114 # _LT_PROG_AR
2115 # -----------
2116 m4_defun([_LT_PROG_AR],
2117 [AC_CHECK_TOOLS(AR, [ar], false)
2118 : ${AR=ar}
2119 : ${AR_FLAGS=cru}
2120 _LT_DECL([], [AR], [1], [The archiver])
2121 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2122
2123 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2124   [lt_cv_ar_at_file=no
2125    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2126      [echo conftest.$ac_objext > conftest.lst
2127       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2128       AC_TRY_EVAL([lt_ar_try])
2129       if test "$ac_status" -eq 0; then
2130         # Ensure the archiver fails upon bogus file names.
2131         rm -f conftest.$ac_objext libconftest.a
2132         AC_TRY_EVAL([lt_ar_try])
2133         if test "$ac_status" -ne 0; then
2134           lt_cv_ar_at_file=@
2135         fi
2136       fi
2137       rm -f conftest.* libconftest.a
2138      ])
2139   ])
2140
2141 if test "x$lt_cv_ar_at_file" = xno; then
2142   archiver_list_spec=
2143 else
2144   archiver_list_spec=$lt_cv_ar_at_file
2145 fi
2146 _LT_DECL([], [archiver_list_spec], [1],
2147   [How to feed a file listing to the archiver])
2148 ])# _LT_PROG_AR
2149
2150
2151 # _LT_CMD_OLD_ARCHIVE
2152 # -------------------
2153 m4_defun([_LT_CMD_OLD_ARCHIVE],
2154 [_LT_PROG_AR
2155
2156 AC_CHECK_TOOL(STRIP, strip, :)
2157 test -z "$STRIP" && STRIP=:
2158 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2159
2160 AC_CHECK_TOOL(RANLIB, ranlib, :)
2161 test -z "$RANLIB" && RANLIB=:
2162 _LT_DECL([], [RANLIB], [1],
2163     [Commands used to install an old-style archive])
2164
2165 # Determine commands to create old-style static archives.
2166 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2167 old_postinstall_cmds='chmod 644 $oldlib'
2168 old_postuninstall_cmds=
2169
2170 if test -n "$RANLIB"; then
2171   case $host_os in
2172   openbsd*)
2173     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2174     ;;
2175   *)
2176     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2177     ;;
2178   esac
2179   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2180 fi
2181
2182 case $host_os in
2183   darwin*)
2184     lock_old_archive_extraction=yes ;;
2185   *)
2186     lock_old_archive_extraction=no ;;
2187 esac
2188 _LT_DECL([], [old_postinstall_cmds], [2])
2189 _LT_DECL([], [old_postuninstall_cmds], [2])
2190 _LT_TAGDECL([], [old_archive_cmds], [2],
2191     [Commands used to build an old-style archive])
2192 _LT_DECL([], [lock_old_archive_extraction], [0],
2193     [Whether to use a lock for old archive extraction])
2194 ])# _LT_CMD_OLD_ARCHIVE
2195
2196
2197 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2198 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2199 # ----------------------------------------------------------------
2200 # Check whether the given compiler option works
2201 AC_DEFUN([_LT_COMPILER_OPTION],
2202 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2203 m4_require([_LT_DECL_SED])dnl
2204 AC_CACHE_CHECK([$1], [$2],
2205   [$2=no
2206    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2207    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2208    lt_compiler_flag="$3"
2209    # Insert the option either (1) after the last *FLAGS variable, or
2210    # (2) before a word containing "conftest.", or (3) at the end.
2211    # Note that $ac_compile itself does not contain backslashes and begins
2212    # with a dollar sign (not a hyphen), so the echo should work correctly.
2213    # The option is referenced via a variable to avoid confusing sed.
2214    lt_compile=`echo "$ac_compile" | $SED \
2215    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2216    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2217    -e 's:$: $lt_compiler_flag:'`
2218    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2219    (eval "$lt_compile" 2>conftest.err)
2220    ac_status=$?
2221    cat conftest.err >&AS_MESSAGE_LOG_FD
2222    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2223    if (exit $ac_status) && test -s "$ac_outfile"; then
2224      # The compiler can only warn and ignore the option if not recognized
2225      # So say no if there are warnings other than the usual output.
2226      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2227      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2228      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2229        $2=yes
2230      fi
2231    fi
2232    $RM conftest*
2233 ])
2234
2235 if test x"[$]$2" = xyes; then
2236     m4_if([$5], , :, [$5])
2237 else
2238     m4_if([$6], , :, [$6])
2239 fi
2240 ])# _LT_COMPILER_OPTION
2241
2242 # Old name:
2243 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2244 dnl aclocal-1.4 backwards compatibility:
2245 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2246
2247
2248 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2249 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2250 # ----------------------------------------------------
2251 # Check whether the given linker option works
2252 AC_DEFUN([_LT_LINKER_OPTION],
2253 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2254 m4_require([_LT_DECL_SED])dnl
2255 AC_CACHE_CHECK([$1], [$2],
2256   [$2=no
2257    save_LDFLAGS="$LDFLAGS"
2258    LDFLAGS="$LDFLAGS $3"
2259    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2260    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2261      # The linker can only warn and ignore the option if not recognized
2262      # So say no if there are warnings
2263      if test -s conftest.err; then
2264        # Append any errors to the config.log.
2265        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2266        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2267        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2268        if diff conftest.exp conftest.er2 >/dev/null; then
2269          $2=yes
2270        fi
2271      else
2272        $2=yes
2273      fi
2274    fi
2275    $RM -r conftest*
2276    LDFLAGS="$save_LDFLAGS"
2277 ])
2278
2279 if test x"[$]$2" = xyes; then
2280     m4_if([$4], , :, [$4])
2281 else
2282     m4_if([$5], , :, [$5])
2283 fi
2284 ])# _LT_LINKER_OPTION
2285
2286 # Old name:
2287 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2288 dnl aclocal-1.4 backwards compatibility:
2289 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2290
2291
2292 # LT_CMD_MAX_LEN
2293 #---------------
2294 AC_DEFUN([LT_CMD_MAX_LEN],
2295 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2296 # find the maximum length of command line arguments
2297 AC_MSG_CHECKING([the maximum length of command line arguments])
2298 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2299   i=0
2300   teststring="ABCD"
2301
2302   case $build_os in
2303   msdosdjgpp*)
2304     # On DJGPP, this test can blow up pretty badly due to problems in libc
2305     # (any single argument exceeding 2000 bytes causes a buffer overrun
2306     # during glob expansion).  Even if it were fixed, the result of this
2307     # check would be larger than it should be.
2308     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2309     ;;
2310
2311   gnu*)
2312     # Under GNU Hurd, this test is not required because there is
2313     # no limit to the length of command line arguments.
2314     # Libtool will interpret -1 as no limit whatsoever
2315     lt_cv_sys_max_cmd_len=-1;
2316     ;;
2317
2318   cygwin* | mingw* | cegcc*)
2319     # On Win9x/ME, this test blows up -- it succeeds, but takes
2320     # about 5 minutes as the teststring grows exponentially.
2321     # Worse, since 9x/ME are not pre-emptively multitasking,
2322     # you end up with a "frozen" computer, even though with patience
2323     # the test eventually succeeds (with a max line length of 256k).
2324     # Instead, let's just punt: use the minimum linelength reported by
2325     # all of the supported platforms: 8192 (on NT/2K/XP).
2326     lt_cv_sys_max_cmd_len=8192;
2327     ;;
2328
2329   mint*)
2330     # On MiNT this can take a long time and run out of memory.
2331     lt_cv_sys_max_cmd_len=8192;
2332     ;;
2333
2334   amigaos*)
2335     # On AmigaOS with pdksh, this test takes hours, literally.
2336     # So we just punt and use a minimum line length of 8192.
2337     lt_cv_sys_max_cmd_len=8192;
2338     ;;
2339
2340   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2341     # This has been around since 386BSD, at least.  Likely further.
2342     if test -x /sbin/sysctl; then
2343       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2344     elif test -x /usr/sbin/sysctl; then
2345       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2346     else
2347       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2348     fi
2349     # And add a safety zone
2350     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2351     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2352     ;;
2353
2354   interix*)
2355     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2356     lt_cv_sys_max_cmd_len=196608
2357     ;;
2358
2359   os2*)
2360     # The test takes a long time on OS/2.
2361     lt_cv_sys_max_cmd_len=8192
2362     ;;
2363
2364   osf*)
2365     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2366     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2367     # nice to cause kernel panics so lets avoid the loop below.
2368     # First set a reasonable default.
2369     lt_cv_sys_max_cmd_len=16384
2370     #
2371     if test -x /sbin/sysconfig; then
2372       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2373         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2374       esac
2375     fi
2376     ;;
2377   sco3.2v5*)
2378     lt_cv_sys_max_cmd_len=102400
2379     ;;
2380   sysv5* | sco5v6* | sysv4.2uw2*)
2381     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2382     if test -n "$kargmax"; then
2383       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2384     else
2385       lt_cv_sys_max_cmd_len=32768
2386     fi
2387     ;;
2388   *)
2389     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2390     if test -n "$lt_cv_sys_max_cmd_len"; then
2391       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2392       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2393     else
2394       # Make teststring a little bigger before we do anything with it.
2395       # a 1K string should be a reasonable start.
2396       for i in 1 2 3 4 5 6 7 8 ; do
2397         teststring=$teststring$teststring
2398       done
2399       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2400       # If test is not a shell built-in, we'll probably end up computing a
2401       # maximum length that is only half of the actual maximum length, but
2402       # we can't tell.
2403       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2404                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2405               test $i != 17 # 1/2 MB should be enough
2406       do
2407         i=`expr $i + 1`
2408         teststring=$teststring$teststring
2409       done
2410       # Only check the string length outside the loop.
2411       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2412       teststring=
2413       # Add a significant safety factor because C++ compilers can tack on
2414       # massive amounts of additional arguments before passing them to the
2415       # linker.  It appears as though 1/2 is a usable value.
2416       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2417     fi
2418     ;;
2419   esac
2420 ])
2421 if test -n $lt_cv_sys_max_cmd_len ; then
2422   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2423 else
2424   AC_MSG_RESULT(none)
2425 fi
2426 max_cmd_len=$lt_cv_sys_max_cmd_len
2427 _LT_DECL([], [max_cmd_len], [0],
2428     [What is the maximum length of a command?])
2429 ])# LT_CMD_MAX_LEN
2430
2431 # Old name:
2432 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2433 dnl aclocal-1.4 backwards compatibility:
2434 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2435
2436
2437 # _LT_HEADER_DLFCN
2438 # ----------------
2439 m4_defun([_LT_HEADER_DLFCN],
2440 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2441 ])# _LT_HEADER_DLFCN
2442
2443
2444 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2445 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2446 # ----------------------------------------------------------------
2447 m4_defun([_LT_TRY_DLOPEN_SELF],
2448 [m4_require([_LT_HEADER_DLFCN])dnl
2449 if test "$cross_compiling" = yes; then :
2450   [$4]
2451 else
2452   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2453   lt_status=$lt_dlunknown
2454   cat > conftest.$ac_ext <<_LT_EOF
2455 [#line $LINENO "configure"
2456 #include "confdefs.h"
2457
2458 #if HAVE_DLFCN_H
2459 #include <dlfcn.h>
2460 #endif
2461
2462 #include <stdio.h>
2463
2464 #ifdef RTLD_GLOBAL
2465 #  define LT_DLGLOBAL           RTLD_GLOBAL
2466 #else
2467 #  ifdef DL_GLOBAL
2468 #    define LT_DLGLOBAL         DL_GLOBAL
2469 #  else
2470 #    define LT_DLGLOBAL         0
2471 #  endif
2472 #endif
2473
2474 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2475    find out it does not work in some platform. */
2476 #ifndef LT_DLLAZY_OR_NOW
2477 #  ifdef RTLD_LAZY
2478 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2479 #  else
2480 #    ifdef DL_LAZY
2481 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2482 #    else
2483 #      ifdef RTLD_NOW
2484 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2485 #      else
2486 #        ifdef DL_NOW
2487 #          define LT_DLLAZY_OR_NOW      DL_NOW
2488 #        else
2489 #          define LT_DLLAZY_OR_NOW      0
2490 #        endif
2491 #      endif
2492 #    endif
2493 #  endif
2494 #endif
2495
2496 /* When -fvisbility=hidden is used, assume the code has been annotated
2497    correspondingly for the symbols needed.  */
2498 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2499 int fnord () __attribute__((visibility("default")));
2500 #endif
2501
2502 int fnord () { return 42; }
2503 int main ()
2504 {
2505   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2506   int status = $lt_dlunknown;
2507
2508   if (self)
2509     {
2510       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2511       else
2512         {
2513           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2514           else puts (dlerror ());
2515         }
2516       /* dlclose (self); */
2517     }
2518   else
2519     puts (dlerror ());
2520
2521   return status;
2522 }]
2523 _LT_EOF
2524   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2525     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2526     lt_status=$?
2527     case x$lt_status in
2528       x$lt_dlno_uscore) $1 ;;
2529       x$lt_dlneed_uscore) $2 ;;
2530       x$lt_dlunknown|x*) $3 ;;
2531     esac
2532   else :
2533     # compilation failed
2534     $3
2535   fi
2536 fi
2537 rm -fr conftest*
2538 ])# _LT_TRY_DLOPEN_SELF
2539
2540
2541 # LT_SYS_DLOPEN_SELF
2542 # ------------------
2543 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2544 [m4_require([_LT_HEADER_DLFCN])dnl
2545 if test "x$enable_dlopen" != xyes; then
2546   enable_dlopen=unknown
2547   enable_dlopen_self=unknown
2548   enable_dlopen_self_static=unknown
2549 else
2550   lt_cv_dlopen=no
2551   lt_cv_dlopen_libs=
2552
2553   case $host_os in
2554   beos*)
2555     lt_cv_dlopen="load_add_on"
2556     lt_cv_dlopen_libs=
2557     lt_cv_dlopen_self=yes
2558     ;;
2559
2560   mingw* | pw32* | cegcc*)
2561     lt_cv_dlopen="LoadLibrary"
2562     lt_cv_dlopen_libs=
2563     ;;
2564
2565   cygwin*)
2566     lt_cv_dlopen="dlopen"
2567     lt_cv_dlopen_libs=
2568     ;;
2569
2570   darwin*)
2571   # if libdl is installed we need to link against it
2572     AC_CHECK_LIB([dl], [dlopen],
2573                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2574     lt_cv_dlopen="dyld"
2575     lt_cv_dlopen_libs=
2576     lt_cv_dlopen_self=yes
2577     ])
2578     ;;
2579
2580   *)
2581     AC_CHECK_FUNC([shl_load],
2582           [lt_cv_dlopen="shl_load"],
2583       [AC_CHECK_LIB([dld], [shl_load],
2584             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2585         [AC_CHECK_FUNC([dlopen],
2586               [lt_cv_dlopen="dlopen"],
2587           [AC_CHECK_LIB([dl], [dlopen],
2588                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2589             [AC_CHECK_LIB([svld], [dlopen],
2590                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2591               [AC_CHECK_LIB([dld], [dld_link],
2592                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2593               ])
2594             ])
2595           ])
2596         ])
2597       ])
2598     ;;
2599   esac
2600
2601   if test "x$lt_cv_dlopen" != xno; then
2602     enable_dlopen=yes
2603   else
2604     enable_dlopen=no
2605   fi
2606
2607   case $lt_cv_dlopen in
2608   dlopen)
2609     save_CPPFLAGS="$CPPFLAGS"
2610     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2611
2612     save_LDFLAGS="$LDFLAGS"
2613     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2614
2615     save_LIBS="$LIBS"
2616     LIBS="$lt_cv_dlopen_libs $LIBS"
2617
2618     AC_CACHE_CHECK([whether a program can dlopen itself],
2619           lt_cv_dlopen_self, [dnl
2620           _LT_TRY_DLOPEN_SELF(
2621             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2622             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2623     ])
2624
2625     if test "x$lt_cv_dlopen_self" = xyes; then
2626       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2627       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2628           lt_cv_dlopen_self_static, [dnl
2629           _LT_TRY_DLOPEN_SELF(
2630             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2631             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2632       ])
2633     fi
2634
2635     CPPFLAGS="$save_CPPFLAGS"
2636     LDFLAGS="$save_LDFLAGS"
2637     LIBS="$save_LIBS"
2638     ;;
2639   esac
2640
2641   case $lt_cv_dlopen_self in
2642   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2643   *) enable_dlopen_self=unknown ;;
2644   esac
2645
2646   case $lt_cv_dlopen_self_static in
2647   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2648   *) enable_dlopen_self_static=unknown ;;
2649   esac
2650 fi
2651 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2652          [Whether dlopen is supported])
2653 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2654          [Whether dlopen of programs is supported])
2655 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2656          [Whether dlopen of statically linked programs is supported])
2657 ])# LT_SYS_DLOPEN_SELF
2658
2659 # Old name:
2660 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2661 dnl aclocal-1.4 backwards compatibility:
2662 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2663
2664
2665 # _LT_COMPILER_C_O([TAGNAME])
2666 # ---------------------------
2667 # Check to see if options -c and -o are simultaneously supported by compiler.
2668 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2669 m4_defun([_LT_COMPILER_C_O],
2670 [m4_require([_LT_DECL_SED])dnl
2671 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2672 m4_require([_LT_TAG_COMPILER])dnl
2673 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2674   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2675   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2676    $RM -r conftest 2>/dev/null
2677    mkdir conftest
2678    cd conftest
2679    mkdir out
2680    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2681
2682    lt_compiler_flag="-o out/conftest2.$ac_objext"
2683    # Insert the option either (1) after the last *FLAGS variable, or
2684    # (2) before a word containing "conftest.", or (3) at the end.
2685    # Note that $ac_compile itself does not contain backslashes and begins
2686    # with a dollar sign (not a hyphen), so the echo should work correctly.
2687    lt_compile=`echo "$ac_compile" | $SED \
2688    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2689    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2690    -e 's:$: $lt_compiler_flag:'`
2691    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2692    (eval "$lt_compile" 2>out/conftest.err)
2693    ac_status=$?
2694    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2695    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2696    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2697    then
2698      # The compiler can only warn and ignore the option if not recognized
2699      # So say no if there are warnings
2700      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2701      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2702      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2703        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2704      fi
2705    fi
2706    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2707    $RM conftest*
2708    # SGI C++ compiler will create directory out/ii_files/ for
2709    # template instantiation
2710    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2711    $RM out/* && rmdir out
2712    cd ..
2713    $RM -r conftest
2714    $RM conftest*
2715 ])
2716 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2717         [Does compiler simultaneously support -c and -o options?])
2718 ])# _LT_COMPILER_C_O
2719
2720
2721 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2722 # ----------------------------------
2723 # Check to see if we can do hard links to lock some files if needed
2724 m4_defun([_LT_COMPILER_FILE_LOCKS],
2725 [m4_require([_LT_ENABLE_LOCK])dnl
2726 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2727 _LT_COMPILER_C_O([$1])
2728
2729 hard_links="nottested"
2730 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2731   # do not overwrite the value of need_locks provided by the user
2732   AC_MSG_CHECKING([if we can lock with hard links])
2733   hard_links=yes
2734   $RM conftest*
2735   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2736   touch conftest.a
2737   ln conftest.a conftest.b 2>&5 || hard_links=no
2738   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2739   AC_MSG_RESULT([$hard_links])
2740   if test "$hard_links" = no; then
2741     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2742     need_locks=warn
2743   fi
2744 else
2745   need_locks=no
2746 fi
2747 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2748 ])# _LT_COMPILER_FILE_LOCKS
2749
2750
2751 # _LT_CHECK_OBJDIR
2752 # ----------------
2753 m4_defun([_LT_CHECK_OBJDIR],
2754 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2755 [rm -f .libs 2>/dev/null
2756 mkdir .libs 2>/dev/null
2757 if test -d .libs; then
2758   lt_cv_objdir=.libs
2759 else
2760   # MS-DOS does not allow filenames that begin with a dot.
2761   lt_cv_objdir=_libs
2762 fi
2763 rmdir .libs 2>/dev/null])
2764 objdir=$lt_cv_objdir
2765 _LT_DECL([], [objdir], [0],
2766          [The name of the directory that contains temporary libtool files])dnl
2767 m4_pattern_allow([LT_OBJDIR])dnl
2768 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2769   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2770 ])# _LT_CHECK_OBJDIR
2771
2772
2773 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2774 # --------------------------------------
2775 # Check hardcoding attributes.
2776 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2777 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2778 _LT_TAGVAR(hardcode_action, $1)=
2779 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2780    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2781    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2782
2783   # We can hardcode non-existent directories.
2784   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2785      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2786      # have to relink, otherwise we might link with an installed library
2787      # when we should be linking with a yet-to-be-installed one
2788      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2789      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2790     # Linking always hardcodes the temporary library directory.
2791     _LT_TAGVAR(hardcode_action, $1)=relink
2792   else
2793     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2794     _LT_TAGVAR(hardcode_action, $1)=immediate
2795   fi
2796 else
2797   # We cannot hardcode anything, or else we can only hardcode existing
2798   # directories.
2799   _LT_TAGVAR(hardcode_action, $1)=unsupported
2800 fi
2801 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2802
2803 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2804    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2805   # Fast installation is not supported
2806   enable_fast_install=no
2807 elif test "$shlibpath_overrides_runpath" = yes ||
2808      test "$enable_shared" = no; then
2809   # Fast installation is not necessary
2810   enable_fast_install=needless
2811 fi
2812 _LT_TAGDECL([], [hardcode_action], [0],
2813     [How to hardcode a shared library path into an executable])
2814 ])# _LT_LINKER_HARDCODE_LIBPATH
2815
2816
2817 # _LT_CMD_STRIPLIB
2818 # ----------------
2819 m4_defun([_LT_CMD_STRIPLIB],
2820 [m4_require([_LT_DECL_EGREP])
2821 striplib=
2822 old_striplib=
2823 AC_MSG_CHECKING([whether stripping libraries is possible])
2824 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2825   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2826   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2827   AC_MSG_RESULT([yes])
2828 else
2829 # FIXME - insert some real tests, host_os isn't really good enough
2830   case $host_os in
2831   darwin*)
2832     if test -n "$STRIP" ; then
2833       striplib="$STRIP -x"
2834       old_striplib="$STRIP -S"
2835       AC_MSG_RESULT([yes])
2836     else
2837       AC_MSG_RESULT([no])
2838     fi
2839     ;;
2840   *)
2841     AC_MSG_RESULT([no])
2842     ;;
2843   esac
2844 fi
2845 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2846 _LT_DECL([], [striplib], [1])
2847 ])# _LT_CMD_STRIPLIB
2848
2849
2850 # _LT_SYS_DYNAMIC_LINKER([TAG])
2851 # -----------------------------
2852 # PORTME Fill in your ld.so characteristics
2853 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2854 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2855 m4_require([_LT_DECL_EGREP])dnl
2856 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2857 m4_require([_LT_DECL_OBJDUMP])dnl
2858 m4_require([_LT_DECL_SED])dnl
2859 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2860 AC_MSG_CHECKING([dynamic linker characteristics])
2861 m4_if([$1],
2862         [], [
2863 if test "$GCC" = yes; then
2864   case $host_os in
2865     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2866     *) lt_awk_arg="/^libraries:/" ;;
2867   esac
2868   case $host_os in
2869     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2870     *) lt_sed_strip_eq="s,=/,/,g" ;;
2871   esac
2872   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2873   case $lt_search_path_spec in
2874   *\;*)
2875     # if the path contains ";" then we assume it to be the separator
2876     # otherwise default to the standard path separator (i.e. ":") - it is
2877     # assumed that no part of a normal pathname contains ";" but that should
2878     # okay in the real world where ";" in dirpaths is itself problematic.
2879     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2880     ;;
2881   *)
2882     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2883     ;;
2884   esac
2885   # Ok, now we have the path, separated by spaces, we can step through it
2886   # and add multilib dir if necessary...
2887   lt_tmp_lt_search_path_spec=
2888   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2889   # ...but if some path already ends with the multilib dir we assume
2890   # that all is fine and trust -print-search-dirs as is (GCC 4.2 or newer).
2891   case "$lt_multi_os_dir; $lt_search_path_spec " in
2892   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2893     lt_multi_os_dir=
2894     ;;
2895   esac
2896   for lt_sys_path in $lt_search_path_spec; do
2897     if test -d "$lt_sys_path$lt_multi_os_dir"; then
2898       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2899     elif test -n "$lt_multi_os_dir"; then
2900       test -d "$lt_sys_path" && \
2901         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2902     fi
2903   done
2904   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2905 BEGIN {RS=" "; FS="/|\n";} {
2906   lt_foo="";
2907   lt_count=0;
2908   for (lt_i = NF; lt_i > 0; lt_i--) {
2909     if ($lt_i != "" && $lt_i != ".") {
2910       if ($lt_i == "..") {
2911         lt_count++;
2912       } else {
2913         if (lt_count == 0) {
2914           lt_foo="/" $lt_i lt_foo;
2915         } else {
2916           lt_count--;
2917         }
2918       }
2919     }
2920   }
2921   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2922   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2923 }'`
2924   # AWK program above erroneously prepends '/' to C:/dos/paths
2925   # for these hosts.
2926   case $host_os in
2927     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2928       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2929   esac
2930   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2931 else
2932   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2933 fi])
2934 library_names_spec=
2935 libname_spec='lib$name'
2936 soname_spec=
2937 shrext_cmds=".so"
2938 postinstall_cmds=
2939 postuninstall_cmds=
2940 finish_cmds=
2941 finish_eval=
2942 shlibpath_var=
2943 shlibpath_overrides_runpath=unknown
2944 version_type=none
2945 dynamic_linker="$host_os ld.so"
2946 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2947 need_lib_prefix=unknown
2948 hardcode_into_libs=no
2949
2950 # when you set need_version to no, make sure it does not cause -set_version
2951 # flags to be left without arguments
2952 need_version=unknown
2953
2954 case $host_os in
2955 aix3*)
2956   version_type=linux # correct to gnu/linux during the next big refactor
2957   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2958   shlibpath_var=LIBPATH
2959
2960   # AIX 3 has no versioning support, so we append a major version to the name.
2961   soname_spec='${libname}${release}${shared_ext}$major'
2962   ;;
2963
2964 aix[[4-9]]*)
2965   version_type=linux # correct to gnu/linux during the next big refactor
2966   need_lib_prefix=no
2967   need_version=no
2968   hardcode_into_libs=yes
2969   if test "$host_cpu" = ia64; then
2970     # AIX 5 supports IA64
2971     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2972     shlibpath_var=LD_LIBRARY_PATH
2973   else
2974     # With GCC up to 2.95.x, collect2 would create an import file
2975     # for dependence libraries.  The import file would start with
2976     # the line `#! .'.  This would cause the generated library to
2977     # depend on `.', always an invalid library.  This was fixed in
2978     # development snapshots of GCC prior to 3.0.
2979     case $host_os in
2980       aix4 | aix4.[[01]] | aix4.[[01]].*)
2981       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2982            echo ' yes '
2983            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2984         :
2985       else
2986         can_build_shared=no
2987       fi
2988       ;;
2989     esac
2990     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2991     # soname into executable. Probably we can add versioning support to
2992     # collect2, so additional links can be useful in future.
2993     if test "$aix_use_runtimelinking" = yes; then
2994       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2995       # instead of lib<name>.a to let people know that these are not
2996       # typical AIX shared libraries.
2997       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2998     else
2999       # We preserve .a as extension for shared libraries through AIX4.2
3000       # and later when we are not doing run time linking.
3001       library_names_spec='${libname}${release}.a $libname.a'
3002       soname_spec='${libname}${release}${shared_ext}$major'
3003     fi
3004     shlibpath_var=LIBPATH
3005   fi
3006   ;;
3007
3008 amigaos*)
3009   case $host_cpu in
3010   powerpc)
3011     # Since July 2007 AmigaOS4 officially supports .so libraries.
3012     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3013     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3014     ;;
3015   m68k)
3016     library_names_spec='$libname.ixlibrary $libname.a'
3017     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3018     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3019     ;;
3020   esac
3021   ;;
3022
3023 beos*)
3024   library_names_spec='${libname}${shared_ext}'
3025   dynamic_linker="$host_os ld.so"
3026   shlibpath_var=LIBRARY_PATH
3027   ;;
3028
3029 bsdi[[45]]*)
3030   version_type=linux # correct to gnu/linux during the next big refactor
3031   need_version=no
3032   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3033   soname_spec='${libname}${release}${shared_ext}$major'
3034   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3035   shlibpath_var=LD_LIBRARY_PATH
3036   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3037   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3038   # the default ld.so.conf also contains /usr/contrib/lib and
3039   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3040   # libtool to hard-code these into programs
3041   ;;
3042
3043 cygwin* | mingw* | pw32* | cegcc*)
3044   version_type=windows
3045   shrext_cmds=".dll"
3046   need_version=no
3047   need_lib_prefix=no
3048
3049   case $GCC,$cc_basename in
3050   yes,*)
3051     # gcc
3052     library_names_spec='$libname.dll.a'
3053     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3054     postinstall_cmds='base_file=`basename \${file}`~
3055       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3056       dldir=$destdir/`dirname \$dlpath`~
3057       test -d \$dldir || mkdir -p \$dldir~
3058       $install_prog $dir/$dlname \$dldir/$dlname~
3059       chmod a+x \$dldir/$dlname~
3060       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3061         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3062       fi'
3063     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3064       dlpath=$dir/\$dldll~
3065        $RM \$dlpath'
3066     shlibpath_overrides_runpath=yes
3067
3068     case $host_os in
3069     cygwin*)
3070       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3071       #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3072       soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
3073 m4_if([$1], [],[
3074       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3075       ;;
3076     mingw* | cegcc*)
3077       # MinGW DLLs use traditional 'lib' prefix
3078       #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3079       soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
3080       ;;
3081     pw32*)
3082       # pw32 DLLs use 'pw' prefix rather than 'lib'
3083       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3084       ;;
3085     esac
3086     dynamic_linker='Win32 ld.exe'
3087     ;;
3088
3089   *,cl*)
3090     # Native MSVC
3091     libname_spec='$name'
3092     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3093     library_names_spec='${libname}.dll.lib'
3094
3095     case $build_os in
3096     mingw*)
3097       sys_lib_search_path_spec=
3098       lt_save_ifs=$IFS
3099       IFS=';'
3100       for lt_path in $LIB
3101       do
3102         IFS=$lt_save_ifs
3103         # Let DOS variable expansion print the short 8.3 style file name.
3104         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3105         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3106       done
3107       IFS=$lt_save_ifs
3108       # Convert to MSYS style.
3109       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3110       ;;
3111     cygwin*)
3112       # Convert to unix form, then to dos form, then back to unix form
3113       # but this time dos style (no spaces!) so that the unix form looks
3114       # like /cygdrive/c/PROGRA~1:/cygdr...
3115       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3116       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3117       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3118       ;;
3119     *)
3120       sys_lib_search_path_spec="$LIB"
3121       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3122         # It is most probably a Windows format PATH.
3123         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3124       else
3125         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3126       fi
3127       # FIXME: find the short name or the path components, as spaces are
3128       # common. (e.g. "Program Files" -> "PROGRA~1")
3129       ;;
3130     esac
3131
3132     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3133     postinstall_cmds='base_file=`basename \${file}`~
3134       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3135       dldir=$destdir/`dirname \$dlpath`~
3136       test -d \$dldir || mkdir -p \$dldir~
3137       $install_prog $dir/$dlname \$dldir/$dlname'
3138     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3139       dlpath=$dir/\$dldll~
3140        $RM \$dlpath'
3141     shlibpath_overrides_runpath=yes
3142     dynamic_linker='Win32 link.exe'
3143     ;;
3144
3145   *)
3146     # Assume MSVC wrapper
3147     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3148     dynamic_linker='Win32 ld.exe'
3149     ;;
3150   esac
3151   # FIXME: first we should search . and the directory the executable is in
3152   shlibpath_var=PATH
3153   ;;
3154
3155 darwin* | rhapsody*)
3156   dynamic_linker="$host_os dyld"
3157   version_type=darwin
3158   need_lib_prefix=no
3159   need_version=no
3160   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3161   soname_spec='${libname}${release}${major}$shared_ext'
3162   shlibpath_overrides_runpath=yes
3163   shlibpath_var=DYLD_LIBRARY_PATH
3164   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3165 m4_if([$1], [],[
3166   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3167   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3168   ;;
3169
3170 dgux*)
3171   version_type=linux # correct to gnu/linux during the next big refactor
3172   need_lib_prefix=no
3173   need_version=no
3174   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3175   soname_spec='${libname}${release}${shared_ext}$major'
3176   shlibpath_var=LD_LIBRARY_PATH
3177   ;;
3178
3179 freebsd* | dragonfly*)
3180   # DragonFly does not have aout.  When/if they implement a new
3181   # versioning mechanism, adjust this.
3182   if test -x /usr/bin/objformat; then
3183     objformat=`/usr/bin/objformat`
3184   else
3185     case $host_os in
3186     freebsd[[23]].*) objformat=aout ;;
3187     *) objformat=elf ;;
3188     esac
3189   fi
3190   version_type=freebsd-$objformat
3191   case $version_type in
3192     freebsd-elf*)
3193       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3194       need_version=no
3195       need_lib_prefix=no
3196       ;;
3197     freebsd-*)
3198       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3199       need_version=yes
3200       ;;
3201   esac
3202   shlibpath_var=LD_LIBRARY_PATH
3203   case $host_os in
3204   freebsd2.*)
3205     shlibpath_overrides_runpath=yes
3206     ;;
3207   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3208     shlibpath_overrides_runpath=yes
3209     hardcode_into_libs=yes
3210     ;;
3211   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3212   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3213     shlibpath_overrides_runpath=no
3214     hardcode_into_libs=yes
3215     ;;
3216   *) # from 4.6 on, and DragonFly
3217     shlibpath_overrides_runpath=yes
3218     hardcode_into_libs=yes
3219     ;;
3220   esac
3221   ;;
3222
3223 gnu*)
3224   version_type=linux # correct to gnu/linux during the next big refactor
3225   need_lib_prefix=no
3226   need_version=no
3227   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3228   soname_spec='${libname}${release}${shared_ext}$major'
3229   shlibpath_var=LD_LIBRARY_PATH
3230   shlibpath_overrides_runpath=no
3231   hardcode_into_libs=yes
3232   ;;
3233
3234 haiku*)
3235   version_type=linux # correct to gnu/linux during the next big refactor
3236   need_lib_prefix=no
3237   need_version=no
3238   dynamic_linker="$host_os runtime_loader"
3239   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3240   soname_spec='${libname}${release}${shared_ext}$major'
3241   shlibpath_var=LIBRARY_PATH
3242   shlibpath_overrides_runpath=yes
3243   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3244   hardcode_into_libs=yes
3245   ;;
3246
3247 hpux9* | hpux10* | hpux11*)
3248   # Give a soname corresponding to the major version so that dld.sl refuses to
3249   # link against other versions.
3250   version_type=sunos
3251   need_lib_prefix=no
3252   need_version=no
3253   case $host_cpu in
3254   ia64*)
3255     shrext_cmds='.so'
3256     hardcode_into_libs=yes
3257     dynamic_linker="$host_os dld.so"
3258     shlibpath_var=LD_LIBRARY_PATH
3259     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3260     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3261     soname_spec='${libname}${release}${shared_ext}$major'
3262     if test "X$HPUX_IA64_MODE" = X32; then
3263       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3264     else
3265       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3266     fi
3267     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3268     ;;
3269   hppa*64*)
3270     shrext_cmds='.sl'
3271     hardcode_into_libs=yes
3272     dynamic_linker="$host_os dld.sl"
3273     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3274     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3275     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3276     soname_spec='${libname}${release}${shared_ext}$major'
3277     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3278     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3279     ;;
3280   *)
3281     shrext_cmds='.sl'
3282     dynamic_linker="$host_os dld.sl"
3283     shlibpath_var=SHLIB_PATH
3284     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3285     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3286     soname_spec='${libname}${release}${shared_ext}$major'
3287     ;;
3288   esac
3289   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3290   postinstall_cmds='chmod 555 $lib'
3291   # or fails outright, so override atomically:
3292   install_override_mode=555
3293   ;;
3294
3295 interix[[3-9]]*)
3296   version_type=linux # correct to gnu/linux during the next big refactor
3297   need_lib_prefix=no
3298   need_version=no
3299   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3300   soname_spec='${libname}${release}${shared_ext}$major'
3301   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3302   shlibpath_var=LD_LIBRARY_PATH
3303   shlibpath_overrides_runpath=no
3304   hardcode_into_libs=yes
3305   ;;
3306
3307 irix5* | irix6* | nonstopux*)
3308   case $host_os in
3309     nonstopux*) version_type=nonstopux ;;
3310     *)
3311         if test "$lt_cv_prog_gnu_ld" = yes; then
3312                 version_type=linux # correct to gnu/linux during the next big refactor
3313         else
3314                 version_type=irix
3315         fi ;;
3316   esac
3317   need_lib_prefix=no
3318   need_version=no
3319   soname_spec='${libname}${release}${shared_ext}$major'
3320   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3321   case $host_os in
3322   irix5* | nonstopux*)
3323     libsuff= shlibsuff=
3324     ;;
3325   *)
3326     case $LD in # libtool.m4 will add one of these switches to LD
3327     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3328       libsuff= shlibsuff= libmagic=32-bit;;
3329     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3330       libsuff=32 shlibsuff=N32 libmagic=N32;;
3331     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3332       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3333     *) libsuff= shlibsuff= libmagic=never-match;;
3334     esac
3335     ;;
3336   esac
3337   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3338   shlibpath_overrides_runpath=no
3339   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3340   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3341   hardcode_into_libs=yes
3342   ;;
3343
3344 # No shared lib support for Linux oldld, aout, or coff.
3345 linux*oldld* | linux*aout* | linux*coff*)
3346   dynamic_linker=no
3347   ;;
3348
3349 # This must be glibc/ELF.
3350 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3351   version_type=linux # correct to gnu/linux during the next big refactor
3352   need_lib_prefix=no
3353   need_version=no
3354   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3355   soname_spec='${libname}${release}${shared_ext}$major'
3356   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3357   shlibpath_var=LD_LIBRARY_PATH
3358   shlibpath_overrides_runpath=no
3359
3360   # Some binutils ld are patched to set DT_RUNPATH
3361   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3362     [lt_cv_shlibpath_overrides_runpath=no
3363     save_LDFLAGS=$LDFLAGS
3364     save_libdir=$libdir
3365     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3366          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3367     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3368       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3369          [lt_cv_shlibpath_overrides_runpath=yes])])
3370     LDFLAGS=$save_LDFLAGS
3371     libdir=$save_libdir
3372     ])
3373   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3374
3375   # This implies no fast_install, which is unacceptable.
3376   # Some rework will be needed to allow for fast_install
3377   # before this can be enabled.
3378   hardcode_into_libs=yes
3379
3380   # Append ld.so.conf contents to the search path
3381   if test -f /etc/ld.so.conf; then
3382     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3383     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3384   fi
3385
3386   # We used to test for /lib/ld.so.1 and disable shared libraries on
3387   # powerpc, because MkLinux only supported shared libraries with the
3388   # GNU dynamic linker.  Since this was broken with cross compilers,
3389   # most powerpc-linux boxes support dynamic linking these days and
3390   # people can always --disable-shared, the test was removed, and we
3391   # assume the GNU/Linux dynamic linker is in use.
3392   dynamic_linker='GNU/Linux ld.so'
3393   ;;
3394
3395 netbsd*)
3396   version_type=sunos
3397   need_lib_prefix=no
3398   need_version=no
3399   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3400     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3401     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3402     dynamic_linker='NetBSD (a.out) ld.so'
3403   else
3404     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3405     soname_spec='${libname}${release}${shared_ext}$major'
3406     dynamic_linker='NetBSD ld.elf_so'
3407   fi
3408   shlibpath_var=LD_LIBRARY_PATH
3409   shlibpath_overrides_runpath=yes
3410   hardcode_into_libs=yes
3411   ;;
3412
3413 newsos6)
3414   version_type=linux # correct to gnu/linux during the next big refactor
3415   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3416   shlibpath_var=LD_LIBRARY_PATH
3417   shlibpath_overrides_runpath=yes
3418   ;;
3419
3420 *nto* | *qnx*)
3421   version_type=qnx
3422   need_lib_prefix=no
3423   need_version=no
3424   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3425   soname_spec='${libname}${release}${shared_ext}$major'
3426   shlibpath_var=LD_LIBRARY_PATH
3427   shlibpath_overrides_runpath=no
3428   hardcode_into_libs=yes
3429   dynamic_linker='ldqnx.so'
3430   ;;
3431
3432 openbsd*)
3433   version_type=sunos
3434   sys_lib_dlsearch_path_spec="/usr/lib"
3435   need_lib_prefix=no
3436   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3437   case $host_os in
3438     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3439     *)                          need_version=no  ;;
3440   esac
3441   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3442   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3443   shlibpath_var=LD_LIBRARY_PATH
3444   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3445     case $host_os in
3446       openbsd2.[[89]] | openbsd2.[[89]].*)
3447         shlibpath_overrides_runpath=no
3448         ;;
3449       *)
3450         shlibpath_overrides_runpath=yes
3451         ;;
3452       esac
3453   else
3454     shlibpath_overrides_runpath=yes
3455   fi
3456   ;;
3457
3458 os2*)
3459   libname_spec='$name'
3460   shrext_cmds=".dll"
3461   need_lib_prefix=no
3462   library_names_spec='$libname${shared_ext} $libname.a'
3463   dynamic_linker='OS/2 ld.exe'
3464   shlibpath_var=LIBPATH
3465   ;;
3466
3467 osf3* | osf4* | osf5*)
3468   version_type=osf
3469   need_lib_prefix=no
3470   need_version=no
3471   soname_spec='${libname}${release}${shared_ext}$major'
3472   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3473   shlibpath_var=LD_LIBRARY_PATH
3474   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3475   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3476   ;;
3477
3478 rdos*)
3479   dynamic_linker=no
3480   ;;
3481
3482 solaris*)
3483   version_type=linux # correct to gnu/linux during the next big refactor
3484   need_lib_prefix=no
3485   need_version=no
3486   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3487   soname_spec='${libname}${release}${shared_ext}$major'
3488   shlibpath_var=LD_LIBRARY_PATH
3489   shlibpath_overrides_runpath=yes
3490   hardcode_into_libs=yes
3491   # ldd complains unless libraries are executable
3492   postinstall_cmds='chmod +x $lib'
3493   ;;
3494
3495 sunos4*)
3496   version_type=sunos
3497   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3498   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3499   shlibpath_var=LD_LIBRARY_PATH
3500   shlibpath_overrides_runpath=yes
3501   if test "$with_gnu_ld" = yes; then
3502     need_lib_prefix=no
3503   fi
3504   need_version=yes
3505   ;;
3506
3507 sysv4 | sysv4.3*)
3508   version_type=linux # correct to gnu/linux during the next big refactor
3509   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3510   soname_spec='${libname}${release}${shared_ext}$major'
3511   shlibpath_var=LD_LIBRARY_PATH
3512   case $host_vendor in
3513     sni)
3514       shlibpath_overrides_runpath=no
3515       need_lib_prefix=no
3516       runpath_var=LD_RUN_PATH
3517       ;;
3518     siemens)
3519       need_lib_prefix=no
3520       ;;
3521     motorola)
3522       need_lib_prefix=no
3523       need_version=no
3524       shlibpath_overrides_runpath=no
3525       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3526       ;;
3527   esac
3528   ;;
3529
3530 sysv4*MP*)
3531   if test -d /usr/nec ;then
3532     version_type=linux # correct to gnu/linux during the next big refactor
3533     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3534     soname_spec='$libname${shared_ext}.$major'
3535     shlibpath_var=LD_LIBRARY_PATH
3536   fi
3537   ;;
3538
3539 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3540   version_type=freebsd-elf
3541   need_lib_prefix=no
3542   need_version=no
3543   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3544   soname_spec='${libname}${release}${shared_ext}$major'
3545   shlibpath_var=LD_LIBRARY_PATH
3546   shlibpath_overrides_runpath=yes
3547   hardcode_into_libs=yes
3548   if test "$with_gnu_ld" = yes; then
3549     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3550   else
3551     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3552     case $host_os in
3553       sco3.2v5*)
3554         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3555         ;;
3556     esac
3557   fi
3558   sys_lib_dlsearch_path_spec='/usr/lib'
3559   ;;
3560
3561 tpf*)
3562   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3563   version_type=linux # correct to gnu/linux during the next big refactor
3564   need_lib_prefix=no
3565   need_version=no
3566   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3567   shlibpath_var=LD_LIBRARY_PATH
3568   shlibpath_overrides_runpath=no
3569   hardcode_into_libs=yes
3570   ;;
3571
3572 uts4*)
3573   version_type=linux # correct to gnu/linux during the next big refactor
3574   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3575   soname_spec='${libname}${release}${shared_ext}$major'
3576   shlibpath_var=LD_LIBRARY_PATH
3577   ;;
3578
3579 *)
3580   dynamic_linker=no
3581   ;;
3582 esac
3583 AC_MSG_RESULT([$dynamic_linker])
3584 test "$dynamic_linker" = no && can_build_shared=no
3585
3586 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3587 if test "$GCC" = yes; then
3588   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3589 fi
3590
3591 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3592   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3593 fi
3594 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3595   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3596 fi
3597
3598 _LT_DECL([], [variables_saved_for_relink], [1],
3599     [Variables whose values should be saved in libtool wrapper scripts and
3600     restored at link time])
3601 _LT_DECL([], [need_lib_prefix], [0],
3602     [Do we need the "lib" prefix for modules?])
3603 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3604 _LT_DECL([], [version_type], [0], [Library versioning type])
3605 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3606 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3607 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3608     [Is shlibpath searched before the hard-coded library search path?])
3609 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3610 _LT_DECL([], [library_names_spec], [1],
3611     [[List of archive names.  First name is the real one, the rest are links.
3612     The last name is the one that the linker finds with -lNAME]])
3613 _LT_DECL([], [soname_spec], [1],
3614     [[The coded name of the library, if different from the real name]])
3615 _LT_DECL([], [install_override_mode], [1],
3616     [Permission mode override for installation of shared libraries])
3617 _LT_DECL([], [postinstall_cmds], [2],
3618     [Command to use after installation of a shared archive])
3619 _LT_DECL([], [postuninstall_cmds], [2],
3620     [Command to use after uninstallation of a shared archive])
3621 _LT_DECL([], [finish_cmds], [2],
3622     [Commands used to finish a libtool library installation in a directory])
3623 _LT_DECL([], [finish_eval], [1],
3624     [[As "finish_cmds", except a single script fragment to be evaled but
3625     not shown]])
3626 _LT_DECL([], [hardcode_into_libs], [0],
3627     [Whether we should hardcode library paths into libraries])
3628 _LT_DECL([], [sys_lib_search_path_spec], [2],
3629     [Compile-time system search path for libraries])
3630 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3631     [Run-time system search path for libraries])
3632 ])# _LT_SYS_DYNAMIC_LINKER
3633
3634
3635 # _LT_PATH_TOOL_PREFIX(TOOL)
3636 # --------------------------
3637 # find a file program which can recognize shared library
3638 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3639 [m4_require([_LT_DECL_EGREP])dnl
3640 AC_MSG_CHECKING([for $1])
3641 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3642 [case $MAGIC_CMD in
3643 [[\\/*] |  ?:[\\/]*])
3644   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3645   ;;
3646 *)
3647   lt_save_MAGIC_CMD="$MAGIC_CMD"
3648   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3649 dnl $ac_dummy forces splitting on constant user-supplied paths.
3650 dnl POSIX.2 word splitting is done only on the output of word expansions,
3651 dnl not every word.  This closes a longstanding sh security hole.
3652   ac_dummy="m4_if([$2], , $PATH, [$2])"
3653   for ac_dir in $ac_dummy; do
3654     IFS="$lt_save_ifs"
3655     test -z "$ac_dir" && ac_dir=.
3656     if test -f $ac_dir/$1; then
3657       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3658       if test -n "$file_magic_test_file"; then
3659         case $deplibs_check_method in
3660         "file_magic "*)
3661           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3662           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3663           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3664             $EGREP "$file_magic_regex" > /dev/null; then
3665             :
3666           else
3667             cat <<_LT_EOF 1>&2
3668
3669 *** Warning: the command libtool uses to detect shared libraries,
3670 *** $file_magic_cmd, produces output that libtool cannot recognize.
3671 *** The result is that libtool may fail to recognize shared libraries
3672 *** as such.  This will affect the creation of libtool libraries that
3673 *** depend on shared libraries, but programs linked with such libtool
3674 *** libraries will work regardless of this problem.  Nevertheless, you
3675 *** may want to report the problem to your system manager and/or to
3676 *** bug-libtool@gnu.org
3677
3678 _LT_EOF
3679           fi ;;
3680         esac
3681       fi
3682       break
3683     fi
3684   done
3685   IFS="$lt_save_ifs"
3686   MAGIC_CMD="$lt_save_MAGIC_CMD"
3687   ;;
3688 esac])
3689 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3690 if test -n "$MAGIC_CMD"; then
3691   AC_MSG_RESULT($MAGIC_CMD)
3692 else
3693   AC_MSG_RESULT(no)
3694 fi
3695 _LT_DECL([], [MAGIC_CMD], [0],
3696          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3697 ])# _LT_PATH_TOOL_PREFIX
3698
3699 # Old name:
3700 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3701 dnl aclocal-1.4 backwards compatibility:
3702 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3703
3704
3705 # _LT_PATH_MAGIC
3706 # --------------
3707 # find a file program which can recognize a shared library
3708 m4_defun([_LT_PATH_MAGIC],
3709 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3710 if test -z "$lt_cv_path_MAGIC_CMD"; then
3711   if test -n "$ac_tool_prefix"; then
3712     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3713   else
3714     MAGIC_CMD=:
3715   fi
3716 fi
3717 ])# _LT_PATH_MAGIC
3718
3719
3720 # LT_PATH_LD
3721 # ----------
3722 # find the pathname to the GNU or non-GNU linker
3723 AC_DEFUN([LT_PATH_LD],
3724 [AC_REQUIRE([AC_PROG_CC])dnl
3725 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3726 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3727 m4_require([_LT_DECL_SED])dnl
3728 m4_require([_LT_DECL_EGREP])dnl
3729 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3730
3731 AC_ARG_WITH([gnu-ld],
3732     [AS_HELP_STRING([--with-gnu-ld],
3733         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3734     [test "$withval" = no || with_gnu_ld=yes],
3735     [with_gnu_ld=no])dnl
3736
3737 ac_prog=ld
3738 if test "$GCC" = yes; then
3739   # Check if gcc -print-prog-name=ld gives a path.
3740   AC_MSG_CHECKING([for ld used by $CC])
3741   case $host in
3742   *-*-mingw*)
3743     # gcc leaves a trailing carriage return which upsets mingw
3744     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3745   *)
3746     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3747   esac
3748   case $ac_prog in
3749     # Accept absolute paths.
3750     [[\\/]]* | ?:[[\\/]]*)
3751       re_direlt='/[[^/]][[^/]]*/\.\./'
3752       # Canonicalize the pathname of ld
3753       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3754       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3755         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3756       done
3757       test -z "$LD" && LD="$ac_prog"
3758       ;;
3759   "")
3760     # If it fails, then pretend we aren't using GCC.
3761     ac_prog=ld
3762     ;;
3763   *)
3764     # If it is relative, then search for the first ld in PATH.
3765     with_gnu_ld=unknown
3766     ;;
3767   esac
3768 elif test "$with_gnu_ld" = yes; then
3769   AC_MSG_CHECKING([for GNU ld])
3770 else
3771   AC_MSG_CHECKING([for non-GNU ld])
3772 fi
3773 AC_CACHE_VAL(lt_cv_path_LD,
3774 [if test -z "$LD"; then
3775   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3776   for ac_dir in $PATH; do
3777     IFS="$lt_save_ifs"
3778     test -z "$ac_dir" && ac_dir=.
3779     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3780       lt_cv_path_LD="$ac_dir/$ac_prog"
3781       # Check to see if the program is GNU ld.  I'd rather use --version,
3782       # but apparently some variants of GNU ld only accept -v.
3783       # Break only if it was the GNU/non-GNU ld that we prefer.
3784       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3785       *GNU* | *'with BFD'*)
3786         test "$with_gnu_ld" != no && break
3787         ;;
3788       *)
3789         test "$with_gnu_ld" != yes && break
3790         ;;
3791       esac
3792     fi
3793   done
3794   IFS="$lt_save_ifs"
3795 else
3796   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3797 fi])
3798 LD="$lt_cv_path_LD"
3799 if test -n "$LD"; then
3800   AC_MSG_RESULT($LD)
3801 else
3802   AC_MSG_RESULT(no)
3803 fi
3804 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3805 _LT_PATH_LD_GNU
3806 AC_SUBST([LD])
3807
3808 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3809 ])# LT_PATH_LD
3810
3811 # Old names:
3812 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3813 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3814 dnl aclocal-1.4 backwards compatibility:
3815 dnl AC_DEFUN([AM_PROG_LD], [])
3816 dnl AC_DEFUN([AC_PROG_LD], [])
3817
3818
3819 # _LT_PATH_LD_GNU
3820 #- --------------
3821 m4_defun([_LT_PATH_LD_GNU],
3822 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3823 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3824 case `$LD -v 2>&1 </dev/null` in
3825 *GNU* | *'with BFD'*)
3826   lt_cv_prog_gnu_ld=yes
3827   ;;
3828 *)
3829   lt_cv_prog_gnu_ld=no
3830   ;;
3831 esac])
3832 with_gnu_ld=$lt_cv_prog_gnu_ld
3833 ])# _LT_PATH_LD_GNU
3834
3835
3836 # _LT_CMD_RELOAD
3837 # --------------
3838 # find reload flag for linker
3839 #   -- PORTME Some linkers may need a different reload flag.
3840 m4_defun([_LT_CMD_RELOAD],
3841 [AC_CACHE_CHECK([for $LD option to reload object files],
3842   lt_cv_ld_reload_flag,
3843   [lt_cv_ld_reload_flag='-r'])
3844 reload_flag=$lt_cv_ld_reload_flag
3845 case $reload_flag in
3846 "" | " "*) ;;
3847 *) reload_flag=" $reload_flag" ;;
3848 esac
3849 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3850 case $host_os in
3851   cygwin* | mingw* | pw32* | cegcc*)
3852     if test "$GCC" != yes; then
3853       reload_cmds=false
3854     fi
3855     ;;
3856   darwin*)
3857     if test "$GCC" = yes; then
3858       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3859     else
3860       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3861     fi
3862     ;;
3863 esac
3864 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3865 _LT_TAGDECL([], [reload_cmds], [2])dnl
3866 ])# _LT_CMD_RELOAD
3867
3868
3869 # _LT_CHECK_MAGIC_METHOD
3870 # ----------------------
3871 # how to check for library dependencies
3872 #  -- PORTME fill in with the dynamic library characteristics
3873 m4_defun([_LT_CHECK_MAGIC_METHOD],
3874 [m4_require([_LT_DECL_EGREP])
3875 m4_require([_LT_DECL_OBJDUMP])
3876 AC_CACHE_CHECK([how to recognize dependent libraries],
3877 lt_cv_deplibs_check_method,
3878 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3879 lt_cv_file_magic_test_file=
3880 lt_cv_deplibs_check_method='unknown'
3881 # Need to set the preceding variable on all platforms that support
3882 # interlibrary dependencies.
3883 # 'none' -- dependencies not supported.
3884 # `unknown' -- same as none, but documents that we really don't know.
3885 # 'pass_all' -- all dependencies passed with no checks.
3886 # 'test_compile' -- check by making test program.
3887 # 'file_magic [[regex]]' -- check by looking for files in library path
3888 # which responds to the $file_magic_cmd with a given extended regex.
3889 # If you have `file' or equivalent on your system and you're not sure
3890 # whether `pass_all' will *always* work, you probably want this one.
3891
3892 case $host_os in
3893 aix[[4-9]]*)
3894   lt_cv_deplibs_check_method=pass_all
3895   ;;
3896
3897 beos*)
3898   lt_cv_deplibs_check_method=pass_all
3899   ;;
3900
3901 bsdi[[45]]*)
3902   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3903   lt_cv_file_magic_cmd='/usr/bin/file -L'
3904   lt_cv_file_magic_test_file=/shlib/libc.so
3905   ;;
3906
3907 cygwin*)
3908   # func_win32_libid is a shell function defined in ltmain.sh
3909   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3910   lt_cv_file_magic_cmd='func_win32_libid'
3911   lt_cv_deplibs_check_method=pass_all
3912   ;;
3913
3914 mingw* | pw32*)
3915   # Base MSYS/MinGW do not provide the 'file' command needed by
3916   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3917   # unless we find 'file', for example because we are cross-compiling.
3918   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3919   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3920     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3921     lt_cv_file_magic_cmd='func_win32_libid'
3922   else
3923     # Keep this pattern in sync with the one in func_win32_libid.
3924     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3925     lt_cv_file_magic_cmd='$OBJDUMP -f'
3926   fi
3927   lt_cv_deplibs_check_method=pass_all
3928   ;;
3929
3930 cegcc*)
3931   # use the weaker test based on 'objdump'. See mingw*.
3932   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3933   lt_cv_file_magic_cmd='$OBJDUMP -f'
3934   ;;
3935
3936 darwin* | rhapsody*)
3937   lt_cv_deplibs_check_method=pass_all
3938   ;;
3939
3940 freebsd* | dragonfly*)
3941   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3942     case $host_cpu in
3943     i*86 )
3944       # Not sure whether the presence of OpenBSD here was a mistake.
3945       # Let's accept both of them until this is cleared up.
3946       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3947       lt_cv_file_magic_cmd=/usr/bin/file
3948       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3949       ;;
3950     esac
3951   else
3952     lt_cv_deplibs_check_method=pass_all
3953   fi
3954   ;;
3955
3956 gnu*)
3957   lt_cv_deplibs_check_method=pass_all
3958   ;;
3959
3960 haiku*)
3961   lt_cv_deplibs_check_method=pass_all
3962   ;;
3963
3964 hpux10.20* | hpux11*)
3965   lt_cv_file_magic_cmd=/usr/bin/file
3966   case $host_cpu in
3967   ia64*)
3968     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3969     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3970     ;;
3971   hppa*64*)
3972     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3973     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3974     ;;
3975   *)
3976     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3977     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3978     ;;
3979   esac
3980   ;;
3981
3982 interix[[3-9]]*)
3983   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3984   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3985   ;;
3986
3987 irix5* | irix6* | nonstopux*)
3988   case $LD in
3989   *-32|*"-32 ") libmagic=32-bit;;
3990   *-n32|*"-n32 ") libmagic=N32;;
3991   *-64|*"-64 ") libmagic=64-bit;;
3992   *) libmagic=never-match;;
3993   esac
3994   lt_cv_deplibs_check_method=pass_all
3995   ;;
3996
3997 # This must be glibc/ELF.
3998 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3999   lt_cv_deplibs_check_method=pass_all
4000   ;;
4001
4002 netbsd*)
4003   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4004     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4005   else
4006     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4007   fi
4008   ;;
4009
4010 newos6*)
4011   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4012   lt_cv_file_magic_cmd=/usr/bin/file
4013   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4014   ;;
4015
4016 *nto* | *qnx*)
4017   lt_cv_deplibs_check_method=pass_all
4018   ;;
4019
4020 openbsd*)
4021   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4022     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4023   else
4024     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4025   fi
4026   ;;
4027
4028 osf3* | osf4* | osf5*)
4029   lt_cv_deplibs_check_method=pass_all
4030   ;;
4031
4032 rdos*)
4033   lt_cv_deplibs_check_method=pass_all
4034   ;;
4035
4036 solaris*)
4037   lt_cv_deplibs_check_method=pass_all
4038   ;;
4039
4040 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4041   lt_cv_deplibs_check_method=pass_all
4042   ;;
4043
4044 sysv4 | sysv4.3*)
4045   case $host_vendor in
4046   motorola)
4047     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]]'
4048     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4049     ;;
4050   ncr)
4051     lt_cv_deplibs_check_method=pass_all
4052     ;;
4053   sequent)
4054     lt_cv_file_magic_cmd='/bin/file'
4055     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4056     ;;
4057   sni)
4058     lt_cv_file_magic_cmd='/bin/file'
4059     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4060     lt_cv_file_magic_test_file=/lib/libc.so
4061     ;;
4062   siemens)
4063     lt_cv_deplibs_check_method=pass_all
4064     ;;
4065   pc)
4066     lt_cv_deplibs_check_method=pass_all
4067     ;;
4068   esac
4069   ;;
4070
4071 tpf*)
4072   lt_cv_deplibs_check_method=pass_all
4073   ;;
4074 esac
4075 ])
4076
4077 file_magic_glob=
4078 want_nocaseglob=no
4079 if test "$build" = "$host"; then
4080   case $host_os in
4081   mingw* | pw32*)
4082     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4083       want_nocaseglob=yes
4084     else
4085       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4086     fi
4087     ;;
4088   esac
4089 fi
4090
4091 file_magic_cmd=$lt_cv_file_magic_cmd
4092 deplibs_check_method=$lt_cv_deplibs_check_method
4093 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4094
4095 _LT_DECL([], [deplibs_check_method], [1],
4096     [Method to check whether dependent libraries are shared objects])
4097 _LT_DECL([], [file_magic_cmd], [1],
4098     [Command to use when deplibs_check_method = "file_magic"])
4099 _LT_DECL([], [file_magic_glob], [1],
4100     [How to find potential files when deplibs_check_method = "file_magic"])
4101 _LT_DECL([], [want_nocaseglob], [1],
4102     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4103 ])# _LT_CHECK_MAGIC_METHOD
4104
4105
4106 # LT_PATH_NM
4107 # ----------
4108 # find the pathname to a BSD- or MS-compatible name lister
4109 AC_DEFUN([LT_PATH_NM],
4110 [AC_REQUIRE([AC_PROG_CC])dnl
4111 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4112 [if test -n "$NM"; then
4113   # Let the user override the test.
4114   lt_cv_path_NM="$NM"
4115 else
4116   lt_nm_to_check="${ac_tool_prefix}nm"
4117   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4118     lt_nm_to_check="$lt_nm_to_check nm"
4119   fi
4120   for lt_tmp_nm in $lt_nm_to_check; do
4121     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4122     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4123       IFS="$lt_save_ifs"
4124       test -z "$ac_dir" && ac_dir=.
4125       tmp_nm="$ac_dir/$lt_tmp_nm"
4126       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4127         # Check to see if the nm accepts a BSD-compat flag.
4128         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4129         #   nm: unknown option "B" ignored
4130         # Tru64's nm complains that /dev/null is an invalid object file
4131         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4132         */dev/null* | *'Invalid file or object type'*)
4133           lt_cv_path_NM="$tmp_nm -B"
4134           break
4135           ;;
4136         *)
4137           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4138           */dev/null*)
4139             lt_cv_path_NM="$tmp_nm -p"
4140             break
4141             ;;
4142           *)
4143             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4144             continue # so that we can try to find one that supports BSD flags
4145             ;;
4146           esac
4147           ;;
4148         esac
4149       fi
4150     done
4151     IFS="$lt_save_ifs"
4152   done
4153   : ${lt_cv_path_NM=no}
4154 fi])
4155 if test "$lt_cv_path_NM" != "no"; then
4156   NM="$lt_cv_path_NM"
4157 else
4158   # Didn't find any BSD compatible name lister, look for dumpbin.
4159   if test -n "$DUMPBIN"; then :
4160     # Let the user override the test.
4161   else
4162     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4163     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4164     *COFF*)
4165       DUMPBIN="$DUMPBIN -symbols"
4166       ;;
4167     *)
4168       DUMPBIN=:
4169       ;;
4170     esac
4171   fi
4172   AC_SUBST([DUMPBIN])
4173   if test "$DUMPBIN" != ":"; then
4174     NM="$DUMPBIN"
4175   fi
4176 fi
4177 test -z "$NM" && NM=nm
4178 AC_SUBST([NM])
4179 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4180
4181 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4182   [lt_cv_nm_interface="BSD nm"
4183   echo "int some_variable = 0;" > conftest.$ac_ext
4184   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4185   (eval "$ac_compile" 2>conftest.err)
4186   cat conftest.err >&AS_MESSAGE_LOG_FD
4187   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4188   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4189   cat conftest.err >&AS_MESSAGE_LOG_FD
4190   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4191   cat conftest.out >&AS_MESSAGE_LOG_FD
4192   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4193     lt_cv_nm_interface="MS dumpbin"
4194   fi
4195   rm -f conftest*])
4196 ])# LT_PATH_NM
4197
4198 # Old names:
4199 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4200 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4201 dnl aclocal-1.4 backwards compatibility:
4202 dnl AC_DEFUN([AM_PROG_NM], [])
4203 dnl AC_DEFUN([AC_PROG_NM], [])
4204
4205 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4206 # --------------------------------
4207 # how to determine the name of the shared library
4208 # associated with a specific link library.
4209 #  -- PORTME fill in with the dynamic library characteristics
4210 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4211 [m4_require([_LT_DECL_EGREP])
4212 m4_require([_LT_DECL_OBJDUMP])
4213 m4_require([_LT_DECL_DLLTOOL])
4214 AC_CACHE_CHECK([how to associate runtime and link libraries],
4215 lt_cv_sharedlib_from_linklib_cmd,
4216 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4217
4218 case $host_os in
4219 cygwin* | mingw* | pw32* | cegcc*)
4220   # two different shell functions defined in ltmain.sh
4221   # decide which to use based on capabilities of $DLLTOOL
4222   case `$DLLTOOL --help 2>&1` in
4223   *--identify-strict*)
4224     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4225     ;;
4226   *)
4227     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4228     ;;
4229   esac
4230   ;;
4231 *)
4232   # fallback: assume linklib IS sharedlib
4233   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4234   ;;
4235 esac
4236 ])
4237 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4238 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4239
4240 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4241     [Command to associate shared and link libraries])
4242 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4243
4244
4245 # _LT_PATH_MANIFEST_TOOL
4246 # ----------------------
4247 # locate the manifest tool
4248 m4_defun([_LT_PATH_MANIFEST_TOOL],
4249 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4250 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4251 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4252   [lt_cv_path_mainfest_tool=no
4253   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4254   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4255   cat conftest.err >&AS_MESSAGE_LOG_FD
4256   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4257     lt_cv_path_mainfest_tool=yes
4258   fi
4259   rm -f conftest*])
4260 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4261   MANIFEST_TOOL=:
4262 fi
4263 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4264 ])# _LT_PATH_MANIFEST_TOOL
4265
4266
4267 # LT_LIB_M
4268 # --------
4269 # check for math library
4270 AC_DEFUN([LT_LIB_M],
4271 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4272 LIBM=
4273 case $host in
4274 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4275   # These system don't have libm, or don't need it
4276   ;;
4277 *-ncr-sysv4.3*)
4278   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4279   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4280   ;;
4281 *)
4282   AC_CHECK_LIB(m, cos, LIBM="-lm")
4283   ;;
4284 esac
4285 AC_SUBST([LIBM])
4286 ])# LT_LIB_M
4287
4288 # Old name:
4289 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4290 dnl aclocal-1.4 backwards compatibility:
4291 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4292
4293
4294 # _LT_COMPILER_NO_RTTI([TAGNAME])
4295 # -------------------------------
4296 m4_defun([_LT_COMPILER_NO_RTTI],
4297 [m4_require([_LT_TAG_COMPILER])dnl
4298
4299 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4300
4301 if test "$GCC" = yes; then
4302   case $cc_basename in
4303   nvcc*)
4304     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4305   *)
4306     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4307   esac
4308
4309   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4310     lt_cv_prog_compiler_rtti_exceptions,
4311     [-fno-rtti -fno-exceptions], [],
4312     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4313 fi
4314 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4315         [Compiler flag to turn off builtin functions])
4316 ])# _LT_COMPILER_NO_RTTI
4317
4318
4319 # _LT_CMD_GLOBAL_SYMBOLS
4320 # ----------------------
4321 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4322 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4323 AC_REQUIRE([AC_PROG_CC])dnl
4324 AC_REQUIRE([AC_PROG_AWK])dnl
4325 AC_REQUIRE([LT_PATH_NM])dnl
4326 AC_REQUIRE([LT_PATH_LD])dnl
4327 m4_require([_LT_DECL_SED])dnl
4328 m4_require([_LT_DECL_EGREP])dnl
4329 m4_require([_LT_TAG_COMPILER])dnl
4330
4331 # Check for command to grab the raw symbol name followed by C symbol from nm.
4332 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4333 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4334 [
4335 # These are sane defaults that work on at least a few old systems.
4336 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4337
4338 # Character class describing NM global symbol codes.
4339 symcode='[[BCDEGRST]]'
4340
4341 # Regexp to match symbols that can be accessed directly from C.
4342 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4343
4344 # Define system-specific variables.
4345 case $host_os in
4346 aix*)
4347   symcode='[[BCDT]]'
4348   ;;
4349 cygwin* | mingw* | pw32* | cegcc*)
4350   symcode='[[ABCDGISTW]]'
4351   ;;
4352 hpux*)
4353   if test "$host_cpu" = ia64; then
4354     symcode='[[ABCDEGRST]]'
4355   fi
4356   ;;
4357 irix* | nonstopux*)
4358   symcode='[[BCDEGRST]]'
4359   ;;
4360 osf*)
4361   symcode='[[BCDEGQRST]]'
4362   ;;
4363 solaris*)
4364   symcode='[[BDRT]]'
4365   ;;
4366 sco3.2v5*)
4367   symcode='[[DT]]'
4368   ;;
4369 sysv4.2uw2*)
4370   symcode='[[DT]]'
4371   ;;
4372 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4373   symcode='[[ABDT]]'
4374   ;;
4375 sysv4)
4376   symcode='[[DFNSTU]]'
4377   ;;
4378 esac
4379
4380 # If we're using GNU nm, then use its standard symbol codes.
4381 case `$NM -V 2>&1` in
4382 *GNU* | *'with BFD'*)
4383   symcode='[[ABCDGIRSTW]]' ;;
4384 esac
4385
4386 # Transform an extracted symbol line into a proper C declaration.
4387 # Some systems (esp. on ia64) link data and code symbols differently,
4388 # so use this general approach.
4389 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4390
4391 # Transform an extracted symbol line into symbol name and symbol address
4392 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4393 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4394
4395 # Handle CRLF in mingw tool chain
4396 opt_cr=
4397 case $build_os in
4398 mingw*)
4399   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4400   ;;
4401 esac
4402
4403 # Try without a prefix underscore, then with it.
4404 for ac_symprfx in "" "_"; do
4405
4406   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4407   symxfrm="\\1 $ac_symprfx\\2 \\2"
4408
4409   # Write the raw and C identifiers.
4410   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4411     # Fake it for dumpbin and say T for any non-static function
4412     # and D for any global variable.
4413     # Also find C++ and __fastcall symbols from MSVC++,
4414     # which start with @ or ?.
4415     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4416 "     {last_section=section; section=\$ 3};"\
4417 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4418 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4419 "     \$ 0!~/External *\|/{next};"\
4420 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4421 "     {if(hide[section]) next};"\
4422 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4423 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4424 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4425 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4426 "     ' prfx=^$ac_symprfx]"
4427   else
4428     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4429   fi
4430   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4431
4432   # Check to see that the pipe works correctly.
4433   pipe_works=no
4434
4435   rm -f conftest*
4436   cat > conftest.$ac_ext <<_LT_EOF
4437 #ifdef __cplusplus
4438 extern "C" {
4439 #endif
4440 char nm_test_var;
4441 void nm_test_func(void);
4442 void nm_test_func(void){}
4443 #ifdef __cplusplus
4444 }
4445 #endif
4446 int main(){nm_test_var='a';nm_test_func();return(0);}
4447 _LT_EOF
4448
4449   if AC_TRY_EVAL(ac_compile); then
4450     # Now try to grab the symbols.
4451     nlist=conftest.nm
4452     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4453       # Try sorting and uniquifying the output.
4454       if sort "$nlist" | uniq > "$nlist"T; then
4455         mv -f "$nlist"T "$nlist"
4456       else
4457         rm -f "$nlist"T
4458       fi
4459
4460       # Make sure that we snagged all the symbols we need.
4461       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4462         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4463           cat <<_LT_EOF > conftest.$ac_ext
4464 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4465 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4466 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4467    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4468 # define LT@&t@_DLSYM_CONST
4469 #elif defined(__osf__)
4470 /* This system does not cope well with relocations in const data.  */
4471 # define LT@&t@_DLSYM_CONST
4472 #else
4473 # define LT@&t@_DLSYM_CONST const
4474 #endif
4475
4476 #ifdef __cplusplus
4477 extern "C" {
4478 #endif
4479
4480 _LT_EOF
4481           # Now generate the symbol file.
4482           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4483
4484           cat <<_LT_EOF >> conftest.$ac_ext
4485
4486 /* The mapping between symbol names and symbols.  */
4487 LT@&t@_DLSYM_CONST struct {
4488   const char *name;
4489   void       *address;
4490 }
4491 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4492 {
4493   { "@PROGRAM@", (void *) 0 },
4494 _LT_EOF
4495           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4496           cat <<\_LT_EOF >> conftest.$ac_ext
4497   {0, (void *) 0}
4498 };
4499
4500 /* This works around a problem in FreeBSD linker */
4501 #ifdef FREEBSD_WORKAROUND
4502 static const void *lt_preloaded_setup() {
4503   return lt__PROGRAM__LTX_preloaded_symbols;
4504 }
4505 #endif
4506
4507 #ifdef __cplusplus
4508 }
4509 #endif
4510 _LT_EOF
4511           # Now try linking the two files.
4512           mv conftest.$ac_objext conftstm.$ac_objext
4513           lt_globsym_save_LIBS=$LIBS
4514           lt_globsym_save_CFLAGS=$CFLAGS
4515           LIBS="conftstm.$ac_objext"
4516           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4517           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4518             pipe_works=yes
4519           fi
4520           LIBS=$lt_globsym_save_LIBS
4521           CFLAGS=$lt_globsym_save_CFLAGS
4522         else
4523           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4524         fi
4525       else
4526         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4527       fi
4528     else
4529       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4530     fi
4531   else
4532     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4533     cat conftest.$ac_ext >&5
4534   fi
4535   rm -rf conftest* conftst*
4536
4537   # Do not use the global_symbol_pipe unless it works.
4538   if test "$pipe_works" = yes; then
4539     break
4540   else
4541     lt_cv_sys_global_symbol_pipe=
4542   fi
4543 done
4544 ])
4545 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4546   lt_cv_sys_global_symbol_to_cdecl=
4547 fi
4548 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4549   AC_MSG_RESULT(failed)
4550 else
4551   AC_MSG_RESULT(ok)
4552 fi
4553
4554 # Response file support.
4555 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4556   nm_file_list_spec='@'
4557 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4558   nm_file_list_spec='@'
4559 fi
4560
4561 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4562     [Take the output of nm and produce a listing of raw symbols and C names])
4563 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4564     [Transform the output of nm in a proper C declaration])
4565 _LT_DECL([global_symbol_to_c_name_address],
4566     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4567     [Transform the output of nm in a C name address pair])
4568 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4569     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4570     [Transform the output of nm in a C name address pair when lib prefix is needed])
4571 _LT_DECL([], [nm_file_list_spec], [1],
4572     [Specify filename containing input files for $NM])
4573 ]) # _LT_CMD_GLOBAL_SYMBOLS
4574
4575
4576 # _LT_COMPILER_PIC([TAGNAME])
4577 # ---------------------------
4578 m4_defun([_LT_COMPILER_PIC],
4579 [m4_require([_LT_TAG_COMPILER])dnl
4580 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4581 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4582 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4583
4584 m4_if([$1], [CXX], [
4585   # C++ specific cases for pic, static, wl, etc.
4586   if test "$GXX" = yes; then
4587     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4588     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4589
4590     case $host_os in
4591     aix*)
4592       # All AIX code is PIC.
4593       if test "$host_cpu" = ia64; then
4594         # AIX 5 now supports IA64 processor
4595         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4596       fi
4597       ;;
4598
4599     amigaos*)
4600       case $host_cpu in
4601       powerpc)
4602             # see comment about AmigaOS4 .so support
4603             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4604         ;;
4605       m68k)
4606             # FIXME: we need at least 68020 code to build shared libraries, but
4607             # adding the `-m68020' flag to GCC prevents building anything better,
4608             # like `-m68040'.
4609             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4610         ;;
4611       esac
4612       ;;
4613
4614     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4615       # PIC is the default for these OSes.
4616       ;;
4617     mingw* | cygwin* | os2* | pw32* | cegcc*)
4618       # This hack is so that the source file can tell whether it is being
4619       # built for inclusion in a dll (and should export symbols for example).
4620       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4621       # (--disable-auto-import) libraries
4622       m4_if([$1], [GCJ], [],
4623         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4624       ;;
4625     darwin* | rhapsody*)
4626       # PIC is the default on this platform
4627       # Common symbols not allowed in MH_DYLIB files
4628       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4629       ;;
4630     *djgpp*)
4631       # DJGPP does not support shared libraries at all
4632       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4633       ;;
4634     haiku*)
4635       # PIC is the default for Haiku.
4636       # The "-static" flag exists, but is broken.
4637       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4638       ;;
4639     interix[[3-9]]*)
4640       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4641       # Instead, we relocate shared libraries at runtime.
4642       ;;
4643     sysv4*MP*)
4644       if test -d /usr/nec; then
4645         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4646       fi
4647       ;;
4648     hpux*)
4649       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4650       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4651       # sets the default TLS model and affects inlining.
4652       case $host_cpu in
4653       hppa*64*)
4654         ;;
4655       *)
4656         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4657         ;;
4658       esac
4659       ;;
4660     *qnx* | *nto*)
4661       # QNX uses GNU C++, but need to define -shared option too, otherwise
4662       # it will coredump.
4663       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4664       ;;
4665     *)
4666       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4667       ;;
4668     esac
4669   else
4670     case $host_os in
4671       aix[[4-9]]*)
4672         # All AIX code is PIC.
4673         if test "$host_cpu" = ia64; then
4674           # AIX 5 now supports IA64 processor
4675           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4676         else
4677           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4678         fi
4679         ;;
4680       chorus*)
4681         case $cc_basename in
4682         cxch68*)
4683           # Green Hills C++ Compiler
4684           # _LT_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"
4685           ;;
4686         esac
4687         ;;
4688       mingw* | cygwin* | os2* | pw32* | cegcc*)
4689         # This hack is so that the source file can tell whether it is being
4690         # built for inclusion in a dll (and should export symbols for example).
4691         m4_if([$1], [GCJ], [],
4692           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4693         ;;
4694       dgux*)
4695         case $cc_basename in
4696           ec++*)
4697             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4698             ;;
4699           ghcx*)
4700             # Green Hills C++ Compiler
4701             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4702             ;;
4703           *)
4704             ;;
4705         esac
4706         ;;
4707       freebsd* | dragonfly*)
4708         # FreeBSD uses GNU C++
4709         ;;
4710       hpux9* | hpux10* | hpux11*)
4711         case $cc_basename in
4712           CC*)
4713             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4714             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4715             if test "$host_cpu" != ia64; then
4716               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4717             fi
4718             ;;
4719           aCC*)
4720             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4721             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4722             case $host_cpu in
4723             hppa*64*|ia64*)
4724               # +Z the default
4725               ;;
4726             *)
4727               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4728               ;;
4729             esac
4730             ;;
4731           *)
4732             ;;
4733         esac
4734         ;;
4735       interix*)
4736         # This is c89, which is MS Visual C++ (no shared libs)
4737         # Anyone wants to do a port?
4738         ;;
4739       irix5* | irix6* | nonstopux*)
4740         case $cc_basename in
4741           CC*)
4742             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4743             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4744             # CC pic flag -KPIC is the default.
4745             ;;
4746           *)
4747             ;;
4748         esac
4749         ;;
4750       linux* | k*bsd*-gnu | kopensolaris*-gnu)
4751         case $cc_basename in
4752           KCC*)
4753             # KAI C++ Compiler
4754             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4755             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4756             ;;
4757           ecpc* )
4758             # old Intel C++ for x86_64 which still supported -KPIC.
4759             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4760             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4761             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4762             ;;
4763           icpc* )
4764             # Intel C++, used to be incompatible with GCC.
4765             # ICC 10 doesn't accept -KPIC any more.
4766             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4767             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4768             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4769             ;;
4770           pgCC* | pgcpp*)
4771             # Portland Group C++ compiler
4772             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4774             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4775             ;;
4776           cxx*)
4777             # Compaq C++
4778             # Make sure the PIC flag is empty.  It appears that all Alpha
4779             # Linux and Compaq Tru64 Unix objects are PIC.
4780             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4781             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4782             ;;
4783           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4784             # IBM XL 8.0, 9.0 on PPC and BlueGene
4785             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4786             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4787             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4788             ;;
4789           *)
4790             case `$CC -V 2>&1 | sed 5q` in
4791             *Sun\ C*)
4792               # Sun C++ 5.9
4793               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4794               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4795               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4796               ;;
4797             esac
4798             ;;
4799         esac
4800         ;;
4801       lynxos*)
4802         ;;
4803       m88k*)
4804         ;;
4805       mvs*)
4806         case $cc_basename in
4807           cxx*)
4808             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4809             ;;
4810           *)
4811             ;;
4812         esac
4813         ;;
4814       netbsd*)
4815         ;;
4816       *qnx* | *nto*)
4817         # QNX uses GNU C++, but need to define -shared option too, otherwise
4818         # it will coredump.
4819         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4820         ;;
4821       osf3* | osf4* | osf5*)
4822         case $cc_basename in
4823           KCC*)
4824             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4825             ;;
4826           RCC*)
4827             # Rational C++ 2.4.1
4828             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4829             ;;
4830           cxx*)
4831             # Digital/Compaq C++
4832             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4833             # Make sure the PIC flag is empty.  It appears that all Alpha
4834             # Linux and Compaq Tru64 Unix objects are PIC.
4835             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4836             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4837             ;;
4838           *)
4839             ;;
4840         esac
4841         ;;
4842       psos*)
4843         ;;
4844       solaris*)
4845         case $cc_basename in
4846           CC* | sunCC*)
4847             # Sun C++ 4.2, 5.x and Centerline C++
4848             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4849             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4850             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4851             ;;
4852           gcx*)
4853             # Green Hills C++ Compiler
4854             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4855             ;;
4856           *)
4857             ;;
4858         esac
4859         ;;
4860       sunos4*)
4861         case $cc_basename in
4862           CC*)
4863             # Sun C++ 4.x
4864             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4865             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4866             ;;
4867           lcc*)
4868             # Lucid
4869             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4870             ;;
4871           *)
4872             ;;
4873         esac
4874         ;;
4875       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4876         case $cc_basename in
4877           CC*)
4878             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4879             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4880             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4881             ;;
4882         esac
4883         ;;
4884       tandem*)
4885         case $cc_basename in
4886           NCC*)
4887             # NonStop-UX NCC 3.20
4888             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4889             ;;
4890           *)
4891             ;;
4892         esac
4893         ;;
4894       vxworks*)
4895         ;;
4896       *)
4897         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4898         ;;
4899     esac
4900   fi
4901 ],
4902 [
4903   if test "$GCC" = yes; then
4904     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4905     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4906
4907     case $host_os in
4908       aix*)
4909       # All AIX code is PIC.
4910       if test "$host_cpu" = ia64; then
4911         # AIX 5 now supports IA64 processor
4912         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4913       fi
4914       ;;
4915
4916     amigaos*)
4917       case $host_cpu in
4918       powerpc)
4919             # see comment about AmigaOS4 .so support
4920             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4921         ;;
4922       m68k)
4923             # FIXME: we need at least 68020 code to build shared libraries, but
4924             # adding the `-m68020' flag to GCC prevents building anything better,
4925             # like `-m68040'.
4926             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4927         ;;
4928       esac
4929       ;;
4930
4931     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4932       # PIC is the default for these OSes.
4933       ;;
4934
4935     mingw* | cygwin* | pw32* | os2* | cegcc*)
4936       # This hack is so that the source file can tell whether it is being
4937       # built for inclusion in a dll (and should export symbols for example).
4938       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4939       # (--disable-auto-import) libraries
4940       m4_if([$1], [GCJ], [],
4941         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4942       ;;
4943
4944     darwin* | rhapsody*)
4945       # PIC is the default on this platform
4946       # Common symbols not allowed in MH_DYLIB files
4947       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4948       ;;
4949
4950     haiku*)
4951       # PIC is the default for Haiku.
4952       # The "-static" flag exists, but is broken.
4953       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4954       ;;
4955
4956     hpux*)
4957       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4958       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4959       # sets the default TLS model and affects inlining.
4960       case $host_cpu in
4961       hppa*64*)
4962         # +Z the default
4963         ;;
4964       *)
4965         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4966         ;;
4967       esac
4968       ;;
4969
4970     interix[[3-9]]*)
4971       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4972       # Instead, we relocate shared libraries at runtime.
4973       ;;
4974
4975     msdosdjgpp*)
4976       # Just because we use GCC doesn't mean we suddenly get shared libraries
4977       # on systems that don't support them.
4978       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4979       enable_shared=no
4980       ;;
4981
4982     *nto* | *qnx*)
4983       # QNX uses GNU C++, but need to define -shared option too, otherwise
4984       # it will coredump.
4985       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4986       ;;
4987
4988     sysv4*MP*)
4989       if test -d /usr/nec; then
4990         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4991       fi
4992       ;;
4993
4994     *)
4995       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4996       ;;
4997     esac
4998
4999     case $cc_basename in
5000     nvcc*) # Cuda Compiler Driver 2.2
5001       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5002       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5003         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5004       fi
5005       ;;
5006     esac
5007   else
5008     # PORTME Check for flag to pass linker flags through the system compiler.
5009     case $host_os in
5010     aix*)
5011       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5012       if test "$host_cpu" = ia64; then
5013         # AIX 5 now supports IA64 processor
5014         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5015       else
5016         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5017       fi
5018       ;;
5019
5020     mingw* | cygwin* | pw32* | os2* | cegcc*)
5021       # This hack is so that the source file can tell whether it is being
5022       # built for inclusion in a dll (and should export symbols for example).
5023       m4_if([$1], [GCJ], [],
5024         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5025       ;;
5026
5027     hpux9* | hpux10* | hpux11*)
5028       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5029       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5030       # not for PA HP-UX.
5031       case $host_cpu in
5032       hppa*64*|ia64*)
5033         # +Z the default
5034         ;;
5035       *)
5036         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5037         ;;
5038       esac
5039       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5040       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5041       ;;
5042
5043     irix5* | irix6* | nonstopux*)
5044       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5045       # PIC (with -KPIC) is the default.
5046       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5047       ;;
5048
5049     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5050       case $cc_basename in
5051       # old Intel for x86_64 which still supported -KPIC.
5052       ecc*)
5053         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5054         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5055         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5056         ;;
5057       # icc used to be incompatible with GCC.
5058       # ICC 10 doesn't accept -KPIC any more.
5059       icc* | ifort*)
5060         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5061         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5062         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5063         ;;
5064       # Lahey Fortran 8.1.
5065       lf95*)
5066         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5067         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5068         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5069         ;;
5070       nagfor*)
5071         # NAG Fortran compiler
5072         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5073         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5074         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5075         ;;
5076       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5077         # Portland Group compilers (*not* the Pentium gcc compiler,
5078         # which looks to be a dead project)
5079         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5080         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5081         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5082         ;;
5083       ccc*)
5084         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085         # All Alpha code is PIC.
5086         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5087         ;;
5088       xl* | bgxl* | bgf* | mpixl*)
5089         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5090         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5092         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5093         ;;
5094       *)
5095         case `$CC -V 2>&1 | sed 5q` in
5096         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5097           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5098           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5099           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5100           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5101           ;;
5102         *Sun\ F* | *Sun*Fortran*)
5103           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5104           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5105           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5106           ;;
5107         *Sun\ C*)
5108           # Sun C 5.9
5109           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5110           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5111           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112           ;;
5113         *Intel*\ [[CF]]*Compiler*)
5114           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5115           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5116           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5117           ;;
5118         *Portland\ Group*)
5119           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5120           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5121           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5122           ;;
5123         esac
5124         ;;
5125       esac
5126       ;;
5127
5128     newsos6)
5129       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5130       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5131       ;;
5132
5133     *nto* | *qnx*)
5134       # QNX uses GNU C++, but need to define -shared option too, otherwise
5135       # it will coredump.
5136       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5137       ;;
5138
5139     osf3* | osf4* | osf5*)
5140       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5141       # All OSF/1 code is PIC.
5142       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5143       ;;
5144
5145     rdos*)
5146       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5147       ;;
5148
5149     solaris*)
5150       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5151       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5152       case $cc_basename in
5153       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5154         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5155       *)
5156         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5157       esac
5158       ;;
5159
5160     sunos4*)
5161       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5162       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5163       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5164       ;;
5165
5166     sysv4 | sysv4.2uw2* | sysv4.3*)
5167       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5168       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5169       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5170       ;;
5171
5172     sysv4*MP*)
5173       if test -d /usr/nec ;then
5174         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5175         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176       fi
5177       ;;
5178
5179     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5180       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5181       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5182       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5183       ;;
5184
5185     unicos*)
5186       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5187       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5188       ;;
5189
5190     uts4*)
5191       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5192       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5193       ;;
5194
5195     *)
5196       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5197       ;;
5198     esac
5199   fi
5200 ])
5201 case $host_os in
5202   # For platforms which do not support PIC, -DPIC is meaningless:
5203   *djgpp*)
5204     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5205     ;;
5206   *)
5207     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5208     ;;
5209 esac
5210
5211 AC_CACHE_CHECK([for $compiler option to produce PIC],
5212   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5213   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5214 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5215
5216 #
5217 # Check to make sure the PIC flag actually works.
5218 #
5219 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5220   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5221     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5222     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5223     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5224      "" | " "*) ;;
5225      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5226      esac],
5227     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5228      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5229 fi
5230 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5231         [Additional compiler flags for building library objects])
5232
5233 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5234         [How to pass a linker flag through the compiler])
5235 #
5236 # Check to make sure the static flag actually works.
5237 #
5238 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5239 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5240   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5241   $lt_tmp_static_flag,
5242   [],
5243   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5244 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5245         [Compiler flag to prevent dynamic linking])
5246 ])# _LT_COMPILER_PIC
5247
5248
5249 # _LT_LINKER_SHLIBS([TAGNAME])
5250 # ----------------------------
5251 # See if the linker supports building shared libraries.
5252 m4_defun([_LT_LINKER_SHLIBS],
5253 [AC_REQUIRE([LT_PATH_LD])dnl
5254 AC_REQUIRE([LT_PATH_NM])dnl
5255 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5256 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5257 m4_require([_LT_DECL_EGREP])dnl
5258 m4_require([_LT_DECL_SED])dnl
5259 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5260 m4_require([_LT_TAG_COMPILER])dnl
5261 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5262 m4_if([$1], [CXX], [
5263   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5264   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5265   case $host_os in
5266   aix[[4-9]]*)
5267     # If we're using GNU nm, then we don't want the "-C" option.
5268     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5269     # Also, AIX nm treats weak defined symbols like other global defined
5270     # symbols, whereas GNU nm marks them as "W".
5271     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5272       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5273     else
5274       _LT_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'
5275     fi
5276     ;;
5277   pw32*)
5278     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5279     ;;
5280   cygwin* | mingw* | cegcc*)
5281     case $cc_basename in
5282     cl*)
5283       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5284       ;;
5285     *)
5286       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5287       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5288       ;;
5289     esac
5290     ;;
5291   *)
5292     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5293     ;;
5294   esac
5295 ], [
5296   runpath_var=
5297   _LT_TAGVAR(allow_undefined_flag, $1)=
5298   _LT_TAGVAR(always_export_symbols, $1)=no
5299   _LT_TAGVAR(archive_cmds, $1)=
5300   _LT_TAGVAR(archive_expsym_cmds, $1)=
5301   _LT_TAGVAR(compiler_needs_object, $1)=no
5302   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5303   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5304   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5305   _LT_TAGVAR(hardcode_automatic, $1)=no
5306   _LT_TAGVAR(hardcode_direct, $1)=no
5307   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5308   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5309   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5310   _LT_TAGVAR(hardcode_minus_L, $1)=no
5311   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5312   _LT_TAGVAR(inherit_rpath, $1)=no
5313   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5314   _LT_TAGVAR(module_cmds, $1)=
5315   _LT_TAGVAR(module_expsym_cmds, $1)=
5316   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5317   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5318   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5319   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5320   # include_expsyms should be a list of space-separated symbols to be *always*
5321   # included in the symbol list
5322   _LT_TAGVAR(include_expsyms, $1)=
5323   # exclude_expsyms can be an extended regexp of symbols to exclude
5324   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5325   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5326   # as well as any symbol that contains `d'.
5327   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5328   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5329   # platforms (ab)use it in PIC code, but their linkers get confused if
5330   # the symbol is explicitly referenced.  Since portable code cannot
5331   # rely on this symbol name, it's probably fine to never include it in
5332   # preloaded symbol tables.
5333   # Exclude shared library initialization/finalization symbols.
5334 dnl Note also adjust exclude_expsyms for C++ above.
5335   extract_expsyms_cmds=
5336
5337   case $host_os in
5338   cygwin* | mingw* | pw32* | cegcc*)
5339     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5340     # When not using gcc, we currently assume that we are using
5341     # Microsoft Visual C++.
5342     if test "$GCC" != yes; then
5343       with_gnu_ld=no
5344     fi
5345     ;;
5346   interix*)
5347     # we just hope/assume this is gcc and not c89 (= MSVC++)
5348     with_gnu_ld=yes
5349     ;;
5350   openbsd*)
5351     with_gnu_ld=no
5352     ;;
5353   esac
5354
5355   _LT_TAGVAR(ld_shlibs, $1)=yes
5356
5357   # On some targets, GNU ld is compatible enough with the native linker
5358   # that we're better off using the native interface for both.
5359   lt_use_gnu_ld_interface=no
5360   if test "$with_gnu_ld" = yes; then
5361     case $host_os in
5362       aix*)
5363         # The AIX port of GNU ld has always aspired to compatibility
5364         # with the native linker.  However, as the warning in the GNU ld
5365         # block says, versions before 2.19.5* couldn't really create working
5366         # shared libraries, regardless of the interface used.
5367         case `$LD -v 2>&1` in
5368           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5369           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5370           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5371           *)
5372             lt_use_gnu_ld_interface=yes
5373             ;;
5374         esac
5375         ;;
5376       *)
5377         lt_use_gnu_ld_interface=yes
5378         ;;
5379     esac
5380   fi
5381
5382   if test "$lt_use_gnu_ld_interface" = yes; then
5383     # If archive_cmds runs LD, not CC, wlarc should be empty
5384     wlarc='${wl}'
5385
5386     # Set some defaults for GNU ld with shared library support. These
5387     # are reset later if shared libraries are not supported. Putting them
5388     # here allows them to be overridden if necessary.
5389     runpath_var=LD_RUN_PATH
5390     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5391     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5392     # ancient GNU ld didn't support --whole-archive et. al.
5393     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5394       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5395     else
5396       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5397     fi
5398     supports_anon_versioning=no
5399     case `$LD -v 2>&1` in
5400       *GNU\ gold*) supports_anon_versioning=yes ;;
5401       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5402       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5403       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5404       *\ 2.11.*) ;; # other 2.11 versions
5405       *) supports_anon_versioning=yes ;;
5406     esac
5407
5408     # See if GNU ld supports shared libraries.
5409     case $host_os in
5410     aix[[3-9]]*)
5411       # On AIX/PPC, the GNU linker is very broken
5412       if test "$host_cpu" != ia64; then
5413         _LT_TAGVAR(ld_shlibs, $1)=no
5414         cat <<_LT_EOF 1>&2
5415
5416 *** Warning: the GNU linker, at least up to release 2.19, is reported
5417 *** to be unable to reliably create shared libraries on AIX.
5418 *** Therefore, libtool is disabling shared libraries support.  If you
5419 *** really care for shared libraries, you may want to install binutils
5420 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5421 *** You will then need to restart the configuration process.
5422
5423 _LT_EOF
5424       fi
5425       ;;
5426
5427     amigaos*)
5428       case $host_cpu in
5429       powerpc)
5430             # see comment about AmigaOS4 .so support
5431             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5432             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5433         ;;
5434       m68k)
5435             _LT_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)'
5436             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5437             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5438         ;;
5439       esac
5440       ;;
5441
5442     beos*)
5443       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5444         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5445         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5446         # support --undefined.  This deserves some investigation.  FIXME
5447         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5448       else
5449         _LT_TAGVAR(ld_shlibs, $1)=no
5450       fi
5451       ;;
5452
5453     cygwin* | mingw* | pw32* | cegcc*)
5454       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5455       # as there is no search path for DLLs.
5456       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5457       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5458       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5459       _LT_TAGVAR(always_export_symbols, $1)=no
5460       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5461       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5462       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5463
5464       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5465         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5466         # If the export-symbols file already is a .def file (1st line
5467         # is EXPORTS), use it as is; otherwise, prepend...
5468         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5469           cp $export_symbols $output_objdir/$soname.def;
5470         else
5471           echo EXPORTS > $output_objdir/$soname.def;
5472           cat $export_symbols >> $output_objdir/$soname.def;
5473         fi~
5474         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5475       else
5476         _LT_TAGVAR(ld_shlibs, $1)=no
5477       fi
5478       ;;
5479
5480     haiku*)
5481       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5482       _LT_TAGVAR(link_all_deplibs, $1)=yes
5483       ;;
5484
5485     interix[[3-9]]*)
5486       _LT_TAGVAR(hardcode_direct, $1)=no
5487       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5488       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5489       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5490       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5491       # Instead, shared libraries are loaded at an image base (0x10000000 by
5492       # default) and relocated if they conflict, which is a slow very memory
5493       # consuming and fragmenting process.  To avoid this, we pick a random,
5494       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5495       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5496       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5497       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5498       ;;
5499
5500     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5501       tmp_diet=no
5502       if test "$host_os" = linux-dietlibc; then
5503         case $cc_basename in
5504           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5505         esac
5506       fi
5507       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5508          && test "$tmp_diet" = no
5509       then
5510         tmp_addflag=' $pic_flag'
5511         tmp_sharedflag='-shared'
5512         case $cc_basename,$host_cpu in
5513         pgcc*)                          # Portland Group C compiler
5514           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5515           tmp_addflag=' $pic_flag'
5516           ;;
5517         pgf77* | pgf90* | pgf95* | pgfortran*)
5518                                         # Portland Group f77 and f90 compilers
5519           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5520           tmp_addflag=' $pic_flag -Mnomain' ;;
5521         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5522           tmp_addflag=' -i_dynamic' ;;
5523         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5524           tmp_addflag=' -i_dynamic -nofor_main' ;;
5525         ifc* | ifort*)                  # Intel Fortran compiler
5526           tmp_addflag=' -nofor_main' ;;
5527         lf95*)                          # Lahey Fortran 8.1
5528           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5529           tmp_sharedflag='--shared' ;;
5530         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5531           tmp_sharedflag='-qmkshrobj'
5532           tmp_addflag= ;;
5533         nvcc*)  # Cuda Compiler Driver 2.2
5534           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5535           _LT_TAGVAR(compiler_needs_object, $1)=yes
5536           ;;
5537         esac
5538         case `$CC -V 2>&1 | sed 5q` in
5539         *Sun\ C*)                       # Sun C 5.9
5540           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5541           _LT_TAGVAR(compiler_needs_object, $1)=yes
5542           tmp_sharedflag='-G' ;;
5543         *Sun\ F*)                       # Sun Fortran 8.3
5544           tmp_sharedflag='-G' ;;
5545         esac
5546         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5547
5548         if test "x$supports_anon_versioning" = xyes; then
5549           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5550             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5551             echo "local: *; };" >> $output_objdir/$libname.ver~
5552             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5553         fi
5554
5555         case $cc_basename in
5556         xlf* | bgf* | bgxlf* | mpixlf*)
5557           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5558           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5559           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5560           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5561           if test "x$supports_anon_versioning" = xyes; then
5562             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5563               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5564               echo "local: *; };" >> $output_objdir/$libname.ver~
5565               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5566           fi
5567           ;;
5568         esac
5569       else
5570         _LT_TAGVAR(ld_shlibs, $1)=no
5571       fi
5572       ;;
5573
5574     netbsd*)
5575       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5576         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5577         wlarc=
5578       else
5579         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5580         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5581       fi
5582       ;;
5583
5584     solaris*)
5585       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5586         _LT_TAGVAR(ld_shlibs, $1)=no
5587         cat <<_LT_EOF 1>&2
5588
5589 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5590 *** create shared libraries on Solaris systems.  Therefore, libtool
5591 *** is disabling shared libraries support.  We urge you to upgrade GNU
5592 *** binutils to release 2.9.1 or newer.  Another option is to modify
5593 *** your PATH or compiler configuration so that the native linker is
5594 *** used, and then restart.
5595
5596 _LT_EOF
5597       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5598         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5599         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5600       else
5601         _LT_TAGVAR(ld_shlibs, $1)=no
5602       fi
5603       ;;
5604
5605     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5606       case `$LD -v 2>&1` in
5607         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5608         _LT_TAGVAR(ld_shlibs, $1)=no
5609         cat <<_LT_EOF 1>&2
5610
5611 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5612 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5613 *** is disabling shared libraries support.  We urge you to upgrade GNU
5614 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5615 *** your PATH or compiler configuration so that the native linker is
5616 *** used, and then restart.
5617
5618 _LT_EOF
5619         ;;
5620         *)
5621           # For security reasons, it is highly recommended that you always
5622           # use absolute paths for naming shared libraries, and exclude the
5623           # DT_RUNPATH tag from executables and libraries.  But doing so
5624           # requires that you compile everything twice, which is a pain.
5625           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5626             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5627             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5628             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5629           else
5630             _LT_TAGVAR(ld_shlibs, $1)=no
5631           fi
5632         ;;
5633       esac
5634       ;;
5635
5636     sunos4*)
5637       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5638       wlarc=
5639       _LT_TAGVAR(hardcode_direct, $1)=yes
5640       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5641       ;;
5642
5643     *)
5644       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5645         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5646         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5647       else
5648         _LT_TAGVAR(ld_shlibs, $1)=no
5649       fi
5650       ;;
5651     esac
5652
5653     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5654       runpath_var=
5655       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5656       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5657       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5658     fi
5659   else
5660     # PORTME fill in a description of your system's linker (not GNU ld)
5661     case $host_os in
5662     aix3*)
5663       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5664       _LT_TAGVAR(always_export_symbols, $1)=yes
5665       _LT_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'
5666       # Note: this linker hardcodes the directories in LIBPATH if there
5667       # are no directories specified by -L.
5668       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5669       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5670         # Neither direct hardcoding nor static linking is supported with a
5671         # broken collect2.
5672         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5673       fi
5674       ;;
5675
5676     aix[[4-9]]*)
5677       if test "$host_cpu" = ia64; then
5678         # On IA64, the linker does run time linking by default, so we don't
5679         # have to do anything special.
5680         aix_use_runtimelinking=no
5681         exp_sym_flag='-Bexport'
5682         no_entry_flag=""
5683       else
5684         # If we're using GNU nm, then we don't want the "-C" option.
5685         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5686         # Also, AIX nm treats weak defined symbols like other global
5687         # defined symbols, whereas GNU nm marks them as "W".
5688         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5689           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5690         else
5691           _LT_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'
5692         fi
5693         aix_use_runtimelinking=no
5694
5695         # Test if we are trying to use run time linking or normal
5696         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5697         # need to do runtime linking.
5698         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5699           for ld_flag in $LDFLAGS; do
5700           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5701             aix_use_runtimelinking=yes
5702             break
5703           fi
5704           done
5705           ;;
5706         esac
5707
5708         exp_sym_flag='-bexport'
5709         no_entry_flag='-bnoentry'
5710       fi
5711
5712       # When large executables or shared objects are built, AIX ld can
5713       # have problems creating the table of contents.  If linking a library
5714       # or program results in "error TOC overflow" add -mminimal-toc to
5715       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5716       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5717
5718       _LT_TAGVAR(archive_cmds, $1)=''
5719       _LT_TAGVAR(hardcode_direct, $1)=yes
5720       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5721       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5722       _LT_TAGVAR(link_all_deplibs, $1)=yes
5723       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5724
5725       if test "$GCC" = yes; then
5726         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5727         # We only want to do this on AIX 4.2 and lower, the check
5728         # below for broken collect2 doesn't work under 4.3+
5729           collect2name=`${CC} -print-prog-name=collect2`
5730           if test -f "$collect2name" &&
5731            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5732           then
5733           # We have reworked collect2
5734           :
5735           else
5736           # We have old collect2
5737           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5738           # It fails to find uninstalled libraries when the uninstalled
5739           # path is not listed in the libpath.  Setting hardcode_minus_L
5740           # to unsupported forces relinking
5741           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5742           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5743           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5744           fi
5745           ;;
5746         esac
5747         shared_flag='-shared'
5748         if test "$aix_use_runtimelinking" = yes; then
5749           shared_flag="$shared_flag "'${wl}-G'
5750         fi
5751       else
5752         # not using gcc
5753         if test "$host_cpu" = ia64; then
5754         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5755         # chokes on -Wl,-G. The following line is correct:
5756           shared_flag='-G'
5757         else
5758           if test "$aix_use_runtimelinking" = yes; then
5759             shared_flag='${wl}-G'
5760           else
5761             shared_flag='${wl}-bM:SRE'
5762           fi
5763         fi
5764       fi
5765
5766       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5767       # It seems that -bexpall does not export symbols beginning with
5768       # underscore (_), so it is better to generate a list of symbols to export.
5769       _LT_TAGVAR(always_export_symbols, $1)=yes
5770       if test "$aix_use_runtimelinking" = yes; then
5771         # Warning - without using the other runtime loading flags (-brtl),
5772         # -berok will link without error, but may produce a broken library.
5773         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5774         # Determine the default libpath from the value encoded in an
5775         # empty executable.
5776         _LT_SYS_MODULE_PATH_AIX([$1])
5777         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5778         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5779       else
5780         if test "$host_cpu" = ia64; then
5781           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5782           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5783           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5784         else
5785          # Determine the default libpath from the value encoded in an
5786          # empty executable.
5787          _LT_SYS_MODULE_PATH_AIX([$1])
5788          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5789           # Warning - without using the other run time loading flags,
5790           # -berok will link without error, but may produce a broken library.
5791           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5792           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5793           if test "$with_gnu_ld" = yes; then
5794             # We only use this code for GNU lds that support --whole-archive.
5795             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5796           else
5797             # Exported symbols can be pulled into shared objects from archives
5798             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5799           fi
5800           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5801           # This is similar to how AIX traditionally builds its shared libraries.
5802           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5803         fi
5804       fi
5805       ;;
5806
5807     amigaos*)
5808       case $host_cpu in
5809       powerpc)
5810             # see comment about AmigaOS4 .so support
5811             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5812             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5813         ;;
5814       m68k)
5815             _LT_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)'
5816             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5817             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5818         ;;
5819       esac
5820       ;;
5821
5822     bsdi[[45]]*)
5823       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5824       ;;
5825
5826     cygwin* | mingw* | pw32* | cegcc*)
5827       # When not using gcc, we currently assume that we are using
5828       # Microsoft Visual C++.
5829       # hardcode_libdir_flag_spec is actually meaningless, as there is
5830       # no search path for DLLs.
5831       case $cc_basename in
5832       cl*)
5833         # Native MSVC
5834         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5835         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5836         _LT_TAGVAR(always_export_symbols, $1)=yes
5837         _LT_TAGVAR(file_list_spec, $1)='@'
5838         # Tell ltmain to make .lib files, not .a files.
5839         libext=lib
5840         # Tell ltmain to make .dll files, not .so files.
5841         shrext_cmds=".dll"
5842         # FIXME: Setting linknames here is a bad hack.
5843         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5844         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5845             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5846           else
5847             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5848           fi~
5849           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5850           linknames='
5851         # The linker will not automatically build a static lib if we build a DLL.
5852         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5853         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5854         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5855         _LT_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'
5856         # Don't use ranlib
5857         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5858         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5859           lt_tool_outputfile="@TOOL_OUTPUT@"~
5860           case $lt_outputfile in
5861             *.exe|*.EXE) ;;
5862             *)
5863               lt_outputfile="$lt_outputfile.exe"
5864               lt_tool_outputfile="$lt_tool_outputfile.exe"
5865               ;;
5866           esac~
5867           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5868             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5869             $RM "$lt_outputfile.manifest";
5870           fi'
5871         ;;
5872       *)
5873         # Assume MSVC wrapper
5874         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5875         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5876         # Tell ltmain to make .lib files, not .a files.
5877         libext=lib
5878         # Tell ltmain to make .dll files, not .so files.
5879         shrext_cmds=".dll"
5880         # FIXME: Setting linknames here is a bad hack.
5881         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5882         # The linker will automatically build a .lib file if we build a DLL.
5883         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5884         # FIXME: Should let the user specify the lib program.
5885         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5886         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5887         ;;
5888       esac
5889       ;;
5890
5891     darwin* | rhapsody*)
5892       _LT_DARWIN_LINKER_FEATURES($1)
5893       ;;
5894
5895     dgux*)
5896       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5897       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5898       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5899       ;;
5900
5901     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5902     # support.  Future versions do this automatically, but an explicit c++rt0.o
5903     # does not break anything, and helps significantly (at the cost of a little
5904     # extra space).
5905     freebsd2.2*)
5906       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5907       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5908       _LT_TAGVAR(hardcode_direct, $1)=yes
5909       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5910       ;;
5911
5912     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5913     freebsd2.*)
5914       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5915       _LT_TAGVAR(hardcode_direct, $1)=yes
5916       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5917       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5918       ;;
5919
5920     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5921     freebsd* | dragonfly*)
5922       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5923       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5924       _LT_TAGVAR(hardcode_direct, $1)=yes
5925       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5926       ;;
5927
5928     hpux9*)
5929       if test "$GCC" = yes; then
5930         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5931       else
5932         _LT_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'
5933       fi
5934       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5935       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5936       _LT_TAGVAR(hardcode_direct, $1)=yes
5937
5938       # hardcode_minus_L: Not really in the search PATH,
5939       # but as the default location of the library.
5940       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5941       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5942       ;;
5943
5944     hpux10*)
5945       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5946         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5947       else
5948         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5949       fi
5950       if test "$with_gnu_ld" = no; then
5951         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5952         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5953         _LT_TAGVAR(hardcode_direct, $1)=yes
5954         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5955         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5956         # hardcode_minus_L: Not really in the search PATH,
5957         # but as the default location of the library.
5958         _LT_TAGVAR(hardcode_minus_L, $1)=yes
5959       fi
5960       ;;
5961
5962     hpux11*)
5963       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5964         case $host_cpu in
5965         hppa*64*)
5966           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5967           ;;
5968         ia64*)
5969           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5970           ;;
5971         *)
5972           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5973           ;;
5974         esac
5975       else
5976         case $host_cpu in
5977         hppa*64*)
5978           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5979           ;;
5980         ia64*)
5981           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5982           ;;
5983         *)
5984         m4_if($1, [], [
5985           # Older versions of the 11.00 compiler do not understand -b yet
5986           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5987           _LT_LINKER_OPTION([if $CC understands -b],
5988             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5989             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5990             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5991           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5992           ;;
5993         esac
5994       fi
5995       if test "$with_gnu_ld" = no; then
5996         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5997         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5998
5999         case $host_cpu in
6000         hppa*64*|ia64*)
6001           _LT_TAGVAR(hardcode_direct, $1)=no
6002           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6003           ;;
6004         *)
6005           _LT_TAGVAR(hardcode_direct, $1)=yes
6006           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6007           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6008
6009           # hardcode_minus_L: Not really in the search PATH,
6010           # but as the default location of the library.
6011           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6012           ;;
6013         esac
6014       fi
6015       ;;
6016
6017     irix5* | irix6* | nonstopux*)
6018       if test "$GCC" = yes; then
6019         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6020         # Try to use the -exported_symbol ld option, if it does not
6021         # work, assume that -exports_file does not work either and
6022         # implicitly export all symbols.
6023         # This should be the same for all languages, so no per-tag cache variable.
6024         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6025           [lt_cv_irix_exported_symbol],
6026           [save_LDFLAGS="$LDFLAGS"
6027            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6028            AC_LINK_IFELSE(
6029              [AC_LANG_SOURCE(
6030                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6031                               [C++], [[int foo (void) { return 0; }]],
6032                               [Fortran 77], [[
6033       subroutine foo
6034       end]],
6035                               [Fortran], [[
6036       subroutine foo
6037       end]])])],
6038               [lt_cv_irix_exported_symbol=yes],
6039               [lt_cv_irix_exported_symbol=no])
6040            LDFLAGS="$save_LDFLAGS"])
6041         if test "$lt_cv_irix_exported_symbol" = yes; then
6042           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6043         fi
6044       else
6045         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6046         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6047       fi
6048       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6049       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6050       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6051       _LT_TAGVAR(inherit_rpath, $1)=yes
6052       _LT_TAGVAR(link_all_deplibs, $1)=yes
6053       ;;
6054
6055     netbsd*)
6056       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6057         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6058       else
6059         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6060       fi
6061       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6062       _LT_TAGVAR(hardcode_direct, $1)=yes
6063       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6064       ;;
6065
6066     newsos6)
6067       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068       _LT_TAGVAR(hardcode_direct, $1)=yes
6069       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6070       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6071       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6072       ;;
6073
6074     *nto* | *qnx*)
6075       ;;
6076
6077     openbsd*)
6078       if test -f /usr/libexec/ld.so; then
6079         _LT_TAGVAR(hardcode_direct, $1)=yes
6080         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6081         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6082         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6083           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6084           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6085           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6086           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6087         else
6088           case $host_os in
6089            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6090              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6091              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6092              ;;
6093            *)
6094              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6095              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6096              ;;
6097           esac
6098         fi
6099       else
6100         _LT_TAGVAR(ld_shlibs, $1)=no
6101       fi
6102       ;;
6103
6104     os2*)
6105       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6106       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6107       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6108       _LT_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'
6109       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6110       ;;
6111
6112     osf3*)
6113       if test "$GCC" = yes; then
6114         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6115         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6116       else
6117         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6118         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6119       fi
6120       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6121       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6122       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6123       ;;
6124
6125     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6126       if test "$GCC" = yes; then
6127         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6128         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6129         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130       else
6131         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6132         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6133         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6134         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6135
6136         # Both c and cxx compiler support -rpath directly
6137         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6138       fi
6139       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6140       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6141       ;;
6142
6143     solaris*)
6144       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6145       if test "$GCC" = yes; then
6146         wlarc='${wl}'
6147         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6148         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6149           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6150       else
6151         case `$CC -V 2>&1` in
6152         *"Compilers 5.0"*)
6153           wlarc=''
6154           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6155           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6156           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6157           ;;
6158         *)
6159           wlarc='${wl}'
6160           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6161           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6162           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6163           ;;
6164         esac
6165       fi
6166       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6167       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6168       case $host_os in
6169       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6170       *)
6171         # The compiler driver will combine and reorder linker options,
6172         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6173         # but is careful enough not to reorder.
6174         # Supported since Solaris 2.6 (maybe 2.5.1?)
6175         if test "$GCC" = yes; then
6176           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6177         else
6178           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6179         fi
6180         ;;
6181       esac
6182       _LT_TAGVAR(link_all_deplibs, $1)=yes
6183       ;;
6184
6185     sunos4*)
6186       if test "x$host_vendor" = xsequent; then
6187         # Use $CC to link under sequent, because it throws in some extra .o
6188         # files that make .init and .fini sections work.
6189         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6190       else
6191         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6192       fi
6193       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6194       _LT_TAGVAR(hardcode_direct, $1)=yes
6195       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6196       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6197       ;;
6198
6199     sysv4)
6200       case $host_vendor in
6201         sni)
6202           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6203           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6204         ;;
6205         siemens)
6206           ## LD is ld it makes a PLAMLIB
6207           ## CC just makes a GrossModule.
6208           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6209           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6210           _LT_TAGVAR(hardcode_direct, $1)=no
6211         ;;
6212         motorola)
6213           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6214           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6215         ;;
6216       esac
6217       runpath_var='LD_RUN_PATH'
6218       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6219       ;;
6220
6221     sysv4.3*)
6222       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6223       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6224       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6225       ;;
6226
6227     sysv4*MP*)
6228       if test -d /usr/nec; then
6229         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6230         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6231         runpath_var=LD_RUN_PATH
6232         hardcode_runpath_var=yes
6233         _LT_TAGVAR(ld_shlibs, $1)=yes
6234       fi
6235       ;;
6236
6237     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6238       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6239       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6240       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6241       runpath_var='LD_RUN_PATH'
6242
6243       if test "$GCC" = yes; then
6244         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6245         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6246       else
6247         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6248         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6249       fi
6250       ;;
6251
6252     sysv5* | sco3.2v5* | sco5v6*)
6253       # Note: We can NOT use -z defs as we might desire, because we do not
6254       # link with -lc, and that would cause any symbols used from libc to
6255       # always be unresolved, which means just about no library would
6256       # ever link correctly.  If we're not using GNU ld we use -z text
6257       # though, which does catch some bad symbols but isn't as heavy-handed
6258       # as -z defs.
6259       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6260       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6261       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6262       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6263       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6264       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6265       _LT_TAGVAR(link_all_deplibs, $1)=yes
6266       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6267       runpath_var='LD_RUN_PATH'
6268
6269       if test "$GCC" = yes; then
6270         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6271         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6272       else
6273         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6274         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6275       fi
6276       ;;
6277
6278     uts4*)
6279       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6280       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6281       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6282       ;;
6283
6284     *)
6285       _LT_TAGVAR(ld_shlibs, $1)=no
6286       ;;
6287     esac
6288
6289     if test x$host_vendor = xsni; then
6290       case $host in
6291       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6292         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6293         ;;
6294       esac
6295     fi
6296   fi
6297 ])
6298 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6299 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6300
6301 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6302
6303 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6304 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6305 _LT_DECL([], [extract_expsyms_cmds], [2],
6306     [The commands to extract the exported symbol list from a shared archive])
6307
6308 #
6309 # Do we need to explicitly link libc?
6310 #
6311 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6312 x|xyes)
6313   # Assume -lc should be added
6314   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6315
6316   if test "$enable_shared" = yes && test "$GCC" = yes; then
6317     case $_LT_TAGVAR(archive_cmds, $1) in
6318     *'~'*)
6319       # FIXME: we may have to deal with multi-command sequences.
6320       ;;
6321     '$CC '*)
6322       # Test whether the compiler implicitly links with -lc since on some
6323       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6324       # to ld, don't add -lc before -lgcc.
6325       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6326         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6327         [$RM conftest*
6328         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6329
6330         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6331           soname=conftest
6332           lib=conftest
6333           libobjs=conftest.$ac_objext
6334           deplibs=
6335           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6336           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6337           compiler_flags=-v
6338           linker_flags=-v
6339           verstring=
6340           output_objdir=.
6341           libname=conftest
6342           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6343           _LT_TAGVAR(allow_undefined_flag, $1)=
6344           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6345           then
6346             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6347           else
6348             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6349           fi
6350           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6351         else
6352           cat conftest.err 1>&5
6353         fi
6354         $RM conftest*
6355         ])
6356       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6357       ;;
6358     esac
6359   fi
6360   ;;
6361 esac
6362
6363 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6364     [Whether or not to add -lc for building shared libraries])
6365 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6366     [enable_shared_with_static_runtimes], [0],
6367     [Whether or not to disallow shared libs when runtime libs are static])
6368 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6369     [Compiler flag to allow reflexive dlopens])
6370 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6371     [Compiler flag to generate shared objects directly from archives])
6372 _LT_TAGDECL([], [compiler_needs_object], [1],
6373     [Whether the compiler copes with passing no objects directly])
6374 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6375     [Create an old-style archive from a shared archive])
6376 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6377     [Create a temporary old-style archive to link instead of a shared archive])
6378 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6379 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6380 _LT_TAGDECL([], [module_cmds], [2],
6381     [Commands used to build a loadable module if different from building
6382     a shared archive.])
6383 _LT_TAGDECL([], [module_expsym_cmds], [2])
6384 _LT_TAGDECL([], [with_gnu_ld], [1],
6385     [Whether we are building with GNU ld or not])
6386 _LT_TAGDECL([], [allow_undefined_flag], [1],
6387     [Flag that allows shared libraries with undefined symbols to be built])
6388 _LT_TAGDECL([], [no_undefined_flag], [1],
6389     [Flag that enforces no undefined symbols])
6390 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6391     [Flag to hardcode $libdir into a binary during linking.
6392     This must work even if $libdir does not exist])
6393 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6394     [Whether we need a single "-rpath" flag with a separated argument])
6395 _LT_TAGDECL([], [hardcode_direct], [0],
6396     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6397     DIR into the resulting binary])
6398 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6399     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6400     DIR into the resulting binary and the resulting library dependency is
6401     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6402     library is relocated])
6403 _LT_TAGDECL([], [hardcode_minus_L], [0],
6404     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6405     into the resulting binary])
6406 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6407     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6408     into the resulting binary])
6409 _LT_TAGDECL([], [hardcode_automatic], [0],
6410     [Set to "yes" if building a shared library automatically hardcodes DIR
6411     into the library and all subsequent libraries and executables linked
6412     against it])
6413 _LT_TAGDECL([], [inherit_rpath], [0],
6414     [Set to yes if linker adds runtime paths of dependent libraries
6415     to runtime path list])
6416 _LT_TAGDECL([], [link_all_deplibs], [0],
6417     [Whether libtool must link a program against all its dependency libraries])
6418 _LT_TAGDECL([], [always_export_symbols], [0],
6419     [Set to "yes" if exported symbols are required])
6420 _LT_TAGDECL([], [export_symbols_cmds], [2],
6421     [The commands to list exported symbols])
6422 _LT_TAGDECL([], [exclude_expsyms], [1],
6423     [Symbols that should not be listed in the preloaded symbols])
6424 _LT_TAGDECL([], [include_expsyms], [1],
6425     [Symbols that must always be exported])
6426 _LT_TAGDECL([], [prelink_cmds], [2],
6427     [Commands necessary for linking programs (against libraries) with templates])
6428 _LT_TAGDECL([], [postlink_cmds], [2],
6429     [Commands necessary for finishing linking programs])
6430 _LT_TAGDECL([], [file_list_spec], [1],
6431     [Specify filename containing input files])
6432 dnl FIXME: Not yet implemented
6433 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6434 dnl    [Compiler flag to generate thread safe objects])
6435 ])# _LT_LINKER_SHLIBS
6436
6437
6438 # _LT_LANG_C_CONFIG([TAG])
6439 # ------------------------
6440 # Ensure that the configuration variables for a C compiler are suitably
6441 # defined.  These variables are subsequently used by _LT_CONFIG to write
6442 # the compiler configuration to `libtool'.
6443 m4_defun([_LT_LANG_C_CONFIG],
6444 [m4_require([_LT_DECL_EGREP])dnl
6445 lt_save_CC="$CC"
6446 AC_LANG_PUSH(C)
6447
6448 # Source file extension for C test sources.
6449 ac_ext=c
6450
6451 # Object file extension for compiled C test sources.
6452 objext=o
6453 _LT_TAGVAR(objext, $1)=$objext
6454
6455 # Code to be used in simple compile tests
6456 lt_simple_compile_test_code="int some_variable = 0;"
6457
6458 # Code to be used in simple link tests
6459 lt_simple_link_test_code='int main(){return(0);}'
6460
6461 _LT_TAG_COMPILER
6462 # Save the default compiler, since it gets overwritten when the other
6463 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6464 compiler_DEFAULT=$CC
6465
6466 # save warnings/boilerplate of simple test code
6467 _LT_COMPILER_BOILERPLATE
6468 _LT_LINKER_BOILERPLATE
6469
6470 ## CAVEAT EMPTOR:
6471 ## There is no encapsulation within the following macros, do not change
6472 ## the running order or otherwise move them around unless you know exactly
6473 ## what you are doing...
6474 if test -n "$compiler"; then
6475   _LT_COMPILER_NO_RTTI($1)
6476   _LT_COMPILER_PIC($1)
6477   _LT_COMPILER_C_O($1)
6478   _LT_COMPILER_FILE_LOCKS($1)
6479   _LT_LINKER_SHLIBS($1)
6480   _LT_SYS_DYNAMIC_LINKER($1)
6481   _LT_LINKER_HARDCODE_LIBPATH($1)
6482   LT_SYS_DLOPEN_SELF
6483   _LT_CMD_STRIPLIB
6484
6485   # Report which library types will actually be built
6486   AC_MSG_CHECKING([if libtool supports shared libraries])
6487   AC_MSG_RESULT([$can_build_shared])
6488
6489   AC_MSG_CHECKING([whether to build shared libraries])
6490   test "$can_build_shared" = "no" && enable_shared=no
6491
6492   # On AIX, shared libraries and static libraries use the same namespace, and
6493   # are all built from PIC.
6494   case $host_os in
6495   aix3*)
6496     test "$enable_shared" = yes && enable_static=no
6497     if test -n "$RANLIB"; then
6498       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6499       postinstall_cmds='$RANLIB $lib'
6500     fi
6501     ;;
6502
6503   aix[[4-9]]*)
6504     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6505       test "$enable_shared" = yes && enable_static=no
6506     fi
6507     ;;
6508   esac
6509   AC_MSG_RESULT([$enable_shared])
6510
6511   AC_MSG_CHECKING([whether to build static libraries])
6512   # Make sure either enable_shared or enable_static is yes.
6513   test "$enable_shared" = yes || enable_static=yes
6514   AC_MSG_RESULT([$enable_static])
6515
6516   _LT_CONFIG($1)
6517 fi
6518 AC_LANG_POP
6519 CC="$lt_save_CC"
6520 ])# _LT_LANG_C_CONFIG
6521
6522
6523 # _LT_LANG_CXX_CONFIG([TAG])
6524 # --------------------------
6525 # Ensure that the configuration variables for a C++ compiler are suitably
6526 # defined.  These variables are subsequently used by _LT_CONFIG to write
6527 # the compiler configuration to `libtool'.
6528 m4_defun([_LT_LANG_CXX_CONFIG],
6529 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6530 m4_require([_LT_DECL_EGREP])dnl
6531 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6532 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6533     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6534     (test "X$CXX" != "Xg++"))) ; then
6535   AC_PROG_CXXCPP
6536 else
6537   _lt_caught_CXX_error=yes
6538 fi
6539
6540 AC_LANG_PUSH(C++)
6541 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6542 _LT_TAGVAR(allow_undefined_flag, $1)=
6543 _LT_TAGVAR(always_export_symbols, $1)=no
6544 _LT_TAGVAR(archive_expsym_cmds, $1)=
6545 _LT_TAGVAR(compiler_needs_object, $1)=no
6546 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6547 _LT_TAGVAR(hardcode_direct, $1)=no
6548 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6549 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6550 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6551 _LT_TAGVAR(hardcode_minus_L, $1)=no
6552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6553 _LT_TAGVAR(hardcode_automatic, $1)=no
6554 _LT_TAGVAR(inherit_rpath, $1)=no
6555 _LT_TAGVAR(module_cmds, $1)=
6556 _LT_TAGVAR(module_expsym_cmds, $1)=
6557 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6558 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6559 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6560 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6561 _LT_TAGVAR(no_undefined_flag, $1)=
6562 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6563 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6564
6565 # Source file extension for C++ test sources.
6566 ac_ext=cpp
6567
6568 # Object file extension for compiled C++ test sources.
6569 objext=o
6570 _LT_TAGVAR(objext, $1)=$objext
6571
6572 # No sense in running all these tests if we already determined that
6573 # the CXX compiler isn't working.  Some variables (like enable_shared)
6574 # are currently assumed to apply to all compilers on this platform,
6575 # and will be corrupted by setting them based on a non-working compiler.
6576 if test "$_lt_caught_CXX_error" != yes; then
6577   # Code to be used in simple compile tests
6578   lt_simple_compile_test_code="int some_variable = 0;"
6579
6580   # Code to be used in simple link tests
6581   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6582
6583   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6584   _LT_TAG_COMPILER
6585
6586   # save warnings/boilerplate of simple test code
6587   _LT_COMPILER_BOILERPLATE
6588   _LT_LINKER_BOILERPLATE
6589
6590   # Allow CC to be a program name with arguments.
6591   lt_save_CC=$CC
6592   lt_save_CFLAGS=$CFLAGS
6593   lt_save_LD=$LD
6594   lt_save_GCC=$GCC
6595   GCC=$GXX
6596   lt_save_with_gnu_ld=$with_gnu_ld
6597   lt_save_path_LD=$lt_cv_path_LD
6598   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6599     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6600   else
6601     $as_unset lt_cv_prog_gnu_ld
6602   fi
6603   if test -n "${lt_cv_path_LDCXX+set}"; then
6604     lt_cv_path_LD=$lt_cv_path_LDCXX
6605   else
6606     $as_unset lt_cv_path_LD
6607   fi
6608   test -z "${LDCXX+set}" || LD=$LDCXX
6609   CC=${CXX-"c++"}
6610   CFLAGS=$CXXFLAGS
6611   compiler=$CC
6612   _LT_TAGVAR(compiler, $1)=$CC
6613   _LT_CC_BASENAME([$compiler])
6614
6615   if test -n "$compiler"; then
6616     # We don't want -fno-exception when compiling C++ code, so set the
6617     # no_builtin_flag separately
6618     if test "$GXX" = yes; then
6619       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6620     else
6621       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6622     fi
6623
6624     if test "$GXX" = yes; then
6625       # Set up default GNU C++ configuration
6626
6627       LT_PATH_LD
6628
6629       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6630       # archiving commands below assume that GNU ld is being used.
6631       if test "$with_gnu_ld" = yes; then
6632         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6633         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6634
6635         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6636         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6637
6638         # If archive_cmds runs LD, not CC, wlarc should be empty
6639         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6640         #     investigate it a little bit more. (MM)
6641         wlarc='${wl}'
6642
6643         # ancient GNU ld didn't support --whole-archive et. al.
6644         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6645           $GREP 'no-whole-archive' > /dev/null; then
6646           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6647         else
6648           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6649         fi
6650       else
6651         with_gnu_ld=no
6652         wlarc=
6653
6654         # A generic and very simple default shared library creation
6655         # command for GNU C++ for the case where it uses the native
6656         # linker, instead of GNU ld.  If possible, this setting should
6657         # overridden to take advantage of the native linker features on
6658         # the platform it is being used on.
6659         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6660       fi
6661
6662       # Commands to make compiler produce verbose output that lists
6663       # what "hidden" libraries, object files and flags are used when
6664       # linking a shared library.
6665       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6666
6667     else
6668       GXX=no
6669       with_gnu_ld=no
6670       wlarc=
6671     fi
6672
6673     # PORTME: fill in a description of your system's C++ link characteristics
6674     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6675     _LT_TAGVAR(ld_shlibs, $1)=yes
6676     case $host_os in
6677       aix3*)
6678         # FIXME: insert proper C++ library support
6679         _LT_TAGVAR(ld_shlibs, $1)=no
6680         ;;
6681       aix[[4-9]]*)
6682         if test "$host_cpu" = ia64; then
6683           # On IA64, the linker does run time linking by default, so we don't
6684           # have to do anything special.
6685           aix_use_runtimelinking=no
6686           exp_sym_flag='-Bexport'
6687           no_entry_flag=""
6688         else
6689           aix_use_runtimelinking=no
6690
6691           # Test if we are trying to use run time linking or normal
6692           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6693           # need to do runtime linking.
6694           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6695             for ld_flag in $LDFLAGS; do
6696               case $ld_flag in
6697               *-brtl*)
6698                 aix_use_runtimelinking=yes
6699                 break
6700                 ;;
6701               esac
6702             done
6703             ;;
6704           esac
6705
6706           exp_sym_flag='-bexport'
6707           no_entry_flag='-bnoentry'
6708         fi
6709
6710         # When large executables or shared objects are built, AIX ld can
6711         # have problems creating the table of contents.  If linking a library
6712         # or program results in "error TOC overflow" add -mminimal-toc to
6713         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6714         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6715
6716         _LT_TAGVAR(archive_cmds, $1)=''
6717         _LT_TAGVAR(hardcode_direct, $1)=yes
6718         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6719         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6720         _LT_TAGVAR(link_all_deplibs, $1)=yes
6721         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6722
6723         if test "$GXX" = yes; then
6724           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6725           # We only want to do this on AIX 4.2 and lower, the check
6726           # below for broken collect2 doesn't work under 4.3+
6727           collect2name=`${CC} -print-prog-name=collect2`
6728           if test -f "$collect2name" &&
6729              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6730           then
6731             # We have reworked collect2
6732             :
6733           else
6734             # We have old collect2
6735             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6736             # It fails to find uninstalled libraries when the uninstalled
6737             # path is not listed in the libpath.  Setting hardcode_minus_L
6738             # to unsupported forces relinking
6739             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6740             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6741             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6742           fi
6743           esac
6744           shared_flag='-shared'
6745           if test "$aix_use_runtimelinking" = yes; then
6746             shared_flag="$shared_flag "'${wl}-G'
6747           fi
6748         else
6749           # not using gcc
6750           if test "$host_cpu" = ia64; then
6751           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6752           # chokes on -Wl,-G. The following line is correct:
6753           shared_flag='-G'
6754           else
6755             if test "$aix_use_runtimelinking" = yes; then
6756               shared_flag='${wl}-G'
6757             else
6758               shared_flag='${wl}-bM:SRE'
6759             fi
6760           fi
6761         fi
6762
6763         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6764         # It seems that -bexpall does not export symbols beginning with
6765         # underscore (_), so it is better to generate a list of symbols to
6766         # export.
6767         _LT_TAGVAR(always_export_symbols, $1)=yes
6768         if test "$aix_use_runtimelinking" = yes; then
6769           # Warning - without using the other runtime loading flags (-brtl),
6770           # -berok will link without error, but may produce a broken library.
6771           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6772           # Determine the default libpath from the value encoded in an empty
6773           # executable.
6774           _LT_SYS_MODULE_PATH_AIX([$1])
6775           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6776
6777           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6778         else
6779           if test "$host_cpu" = ia64; then
6780             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6781             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6782             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6783           else
6784             # Determine the default libpath from the value encoded in an
6785             # empty executable.
6786             _LT_SYS_MODULE_PATH_AIX([$1])
6787             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6788             # Warning - without using the other run time loading flags,
6789             # -berok will link without error, but may produce a broken library.
6790             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6791             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6792             if test "$with_gnu_ld" = yes; then
6793               # We only use this code for GNU lds that support --whole-archive.
6794               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6795             else
6796               # Exported symbols can be pulled into shared objects from archives
6797               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6798             fi
6799             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6800             # This is similar to how AIX traditionally builds its shared
6801             # libraries.
6802             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6803           fi
6804         fi
6805         ;;
6806
6807       beos*)
6808         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6809           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6810           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6811           # support --undefined.  This deserves some investigation.  FIXME
6812           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6813         else
6814           _LT_TAGVAR(ld_shlibs, $1)=no
6815         fi
6816         ;;
6817
6818       chorus*)
6819         case $cc_basename in
6820           *)
6821           # FIXME: insert proper C++ library support
6822           _LT_TAGVAR(ld_shlibs, $1)=no
6823           ;;
6824         esac
6825         ;;
6826
6827       cygwin* | mingw* | pw32* | cegcc*)
6828         case $GXX,$cc_basename in
6829         ,cl* | no,cl*)
6830           # Native MSVC
6831           # hardcode_libdir_flag_spec is actually meaningless, as there is
6832           # no search path for DLLs.
6833           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6834           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6835           _LT_TAGVAR(always_export_symbols, $1)=yes
6836           _LT_TAGVAR(file_list_spec, $1)='@'
6837           # Tell ltmain to make .lib files, not .a files.
6838           libext=lib
6839           # Tell ltmain to make .dll files, not .so files.
6840           shrext_cmds=".dll"
6841           # FIXME: Setting linknames here is a bad hack.
6842           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6843           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6844               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6845             else
6846               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6847             fi~
6848             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6849             linknames='
6850           # The linker will not automatically build a static lib if we build a DLL.
6851           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6852           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6853           # Don't use ranlib
6854           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6855           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6856             lt_tool_outputfile="@TOOL_OUTPUT@"~
6857             case $lt_outputfile in
6858               *.exe|*.EXE) ;;
6859               *)
6860                 lt_outputfile="$lt_outputfile.exe"
6861                 lt_tool_outputfile="$lt_tool_outputfile.exe"
6862                 ;;
6863             esac~
6864             func_to_tool_file "$lt_outputfile"~
6865             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6866               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6867               $RM "$lt_outputfile.manifest";
6868             fi'
6869           ;;
6870         *)
6871           # g++
6872           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6873           # as there is no search path for DLLs.
6874           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6875           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6876           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6877           _LT_TAGVAR(always_export_symbols, $1)=no
6878           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6879
6880           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6881             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6882             # If the export-symbols file already is a .def file (1st line
6883             # is EXPORTS), use it as is; otherwise, prepend...
6884             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6885               cp $export_symbols $output_objdir/$soname.def;
6886             else
6887               echo EXPORTS > $output_objdir/$soname.def;
6888               cat $export_symbols >> $output_objdir/$soname.def;
6889             fi~
6890             $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6891           else
6892             _LT_TAGVAR(ld_shlibs, $1)=no
6893           fi
6894           ;;
6895         esac
6896         ;;
6897       darwin* | rhapsody*)
6898         _LT_DARWIN_LINKER_FEATURES($1)
6899         ;;
6900
6901       dgux*)
6902         case $cc_basename in
6903           ec++*)
6904             # FIXME: insert proper C++ library support
6905             _LT_TAGVAR(ld_shlibs, $1)=no
6906             ;;
6907           ghcx*)
6908             # Green Hills C++ Compiler
6909             # FIXME: insert proper C++ library support
6910             _LT_TAGVAR(ld_shlibs, $1)=no
6911             ;;
6912           *)
6913             # FIXME: insert proper C++ library support
6914             _LT_TAGVAR(ld_shlibs, $1)=no
6915             ;;
6916         esac
6917         ;;
6918
6919       freebsd2.*)
6920         # C++ shared libraries reported to be fairly broken before
6921         # switch to ELF
6922         _LT_TAGVAR(ld_shlibs, $1)=no
6923         ;;
6924
6925       freebsd-elf*)
6926         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6927         ;;
6928
6929       freebsd* | dragonfly*)
6930         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6931         # conventions
6932         _LT_TAGVAR(ld_shlibs, $1)=yes
6933         ;;
6934
6935       gnu*)
6936         ;;
6937
6938       haiku*)
6939         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6940         _LT_TAGVAR(link_all_deplibs, $1)=yes
6941         ;;
6942
6943       hpux9*)
6944         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6945         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6946         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6947         _LT_TAGVAR(hardcode_direct, $1)=yes
6948         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6949                                              # but as the default
6950                                              # location of the library.
6951
6952         case $cc_basename in
6953           CC*)
6954             # FIXME: insert proper C++ library support
6955             _LT_TAGVAR(ld_shlibs, $1)=no
6956             ;;
6957           aCC*)
6958             _LT_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'
6959             # Commands to make compiler produce verbose output that lists
6960             # what "hidden" libraries, object files and flags are used when
6961             # linking a shared library.
6962             #
6963             # There doesn't appear to be a way to prevent this compiler from
6964             # explicitly linking system object files so we need to strip them
6965             # from the output so that they don't get included in the library
6966             # dependencies.
6967             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6968             ;;
6969           *)
6970             if test "$GXX" = yes; then
6971               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
6972             else
6973               # FIXME: insert proper C++ library support
6974               _LT_TAGVAR(ld_shlibs, $1)=no
6975             fi
6976             ;;
6977         esac
6978         ;;
6979
6980       hpux10*|hpux11*)
6981         if test $with_gnu_ld = no; then
6982           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6983           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6984
6985           case $host_cpu in
6986             hppa*64*|ia64*)
6987               ;;
6988             *)
6989               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6990               ;;
6991           esac
6992         fi
6993         case $host_cpu in
6994           hppa*64*|ia64*)
6995             _LT_TAGVAR(hardcode_direct, $1)=no
6996             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6997             ;;
6998           *)
6999             _LT_TAGVAR(hardcode_direct, $1)=yes
7000             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7001             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7002                                                  # but as the default
7003                                                  # location of the library.
7004             ;;
7005         esac
7006
7007         case $cc_basename in
7008           CC*)
7009             # FIXME: insert proper C++ library support
7010             _LT_TAGVAR(ld_shlibs, $1)=no
7011             ;;
7012           aCC*)
7013             case $host_cpu in
7014               hppa*64*)
7015                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7016                 ;;
7017               ia64*)
7018                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7019                 ;;
7020               *)
7021                 _LT_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'
7022                 ;;
7023             esac
7024             # Commands to make compiler produce verbose output that lists
7025             # what "hidden" libraries, object files and flags are used when
7026             # linking a shared library.
7027             #
7028             # There doesn't appear to be a way to prevent this compiler from
7029             # explicitly linking system object files so we need to strip them
7030             # from the output so that they don't get included in the library
7031             # dependencies.
7032             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; func_echo_all "$list"'
7033             ;;
7034           *)
7035             if test "$GXX" = yes; then
7036               if test $with_gnu_ld = no; then
7037                 case $host_cpu in
7038                   hppa*64*)
7039                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7040                     ;;
7041                   ia64*)
7042                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7043                     ;;
7044                   *)
7045                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7046                     ;;
7047                 esac
7048               fi
7049             else
7050               # FIXME: insert proper C++ library support
7051               _LT_TAGVAR(ld_shlibs, $1)=no
7052             fi
7053             ;;
7054         esac
7055         ;;
7056
7057       interix[[3-9]]*)
7058         _LT_TAGVAR(hardcode_direct, $1)=no
7059         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7060         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7061         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7062         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7063         # Instead, shared libraries are loaded at an image base (0x10000000 by
7064         # default) and relocated if they conflict, which is a slow very memory
7065         # consuming and fragmenting process.  To avoid this, we pick a random,
7066         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7067         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7068         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7069         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7070         ;;
7071       irix5* | irix6*)
7072         case $cc_basename in
7073           CC*)
7074             # SGI C++
7075             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7076
7077             # Archives containing C++ object files must be created using
7078             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7079             # necessary to make sure instantiated templates are included
7080             # in the archive.
7081             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7082             ;;
7083           *)
7084             if test "$GXX" = yes; then
7085               if test "$with_gnu_ld" = no; then
7086                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7087               else
7088                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7089               fi
7090             fi
7091             _LT_TAGVAR(link_all_deplibs, $1)=yes
7092             ;;
7093         esac
7094         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7095         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7096         _LT_TAGVAR(inherit_rpath, $1)=yes
7097         ;;
7098
7099       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7100         case $cc_basename in
7101           KCC*)
7102             # Kuck and Associates, Inc. (KAI) C++ Compiler
7103
7104             # KCC will only create a shared library if the output file
7105             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7106             # to its proper name (with version) after linking.
7107             _LT_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'
7108             _LT_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'
7109             # Commands to make compiler produce verbose output that lists
7110             # what "hidden" libraries, object files and flags are used when
7111             # linking a shared library.
7112             #
7113             # There doesn't appear to be a way to prevent this compiler from
7114             # explicitly linking system object files so we need to strip them
7115             # from the output so that they don't get included in the library
7116             # dependencies.
7117             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; func_echo_all "$list"'
7118
7119             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7120             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7121
7122             # Archives containing C++ object files must be created using
7123             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7124             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7125             ;;
7126           icpc* | ecpc* )
7127             # Intel C++
7128             with_gnu_ld=yes
7129             # version 8.0 and above of icpc choke on multiply defined symbols
7130             # if we add $predep_objects and $postdep_objects, however 7.1 and
7131             # earlier do not add the objects themselves.
7132             case `$CC -V 2>&1` in
7133               *"Version 7."*)
7134                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7135                 _LT_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'
7136                 ;;
7137               *)  # Version 8.0 or newer
7138                 tmp_idyn=
7139                 case $host_cpu in
7140                   ia64*) tmp_idyn=' -i_dynamic';;
7141                 esac
7142                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7143                 _LT_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'
7144                 ;;
7145             esac
7146             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7147             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7148             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7149             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7150             ;;
7151           pgCC* | pgcpp*)
7152             # Portland Group C++ compiler
7153             case `$CC -V` in
7154             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7155               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7156                 rm -rf $tpldir~
7157                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7158                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7159               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7160                 rm -rf $tpldir~
7161                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7162                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7163                 $RANLIB $oldlib'
7164               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7165                 rm -rf $tpldir~
7166                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7167                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7168               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7169                 rm -rf $tpldir~
7170                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7171                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7172               ;;
7173             *) # Version 6 and above use weak symbols
7174               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7175               _LT_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'
7176               ;;
7177             esac
7178
7179             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7180             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7181             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7182             ;;
7183           cxx*)
7184             # Compaq C++
7185             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7186             _LT_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'
7187
7188             runpath_var=LD_RUN_PATH
7189             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7190             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7191
7192             # Commands to make compiler produce verbose output that lists
7193             # what "hidden" libraries, object files and flags are used when
7194             # linking a shared library.
7195             #
7196             # There doesn't appear to be a way to prevent this compiler from
7197             # explicitly linking system object files so we need to strip them
7198             # from the output so that they don't get included in the library
7199             # dependencies.
7200             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7201             ;;
7202           xl* | mpixl* | bgxl*)
7203             # IBM XL 8.0 on PPC, with GNU ld
7204             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7205             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7206             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7207             if test "x$supports_anon_versioning" = xyes; then
7208               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7209                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7210                 echo "local: *; };" >> $output_objdir/$libname.ver~
7211                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7212             fi
7213             ;;
7214           *)
7215             case `$CC -V 2>&1 | sed 5q` in
7216             *Sun\ C*)
7217               # Sun C++ 5.9
7218               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7219               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7220               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7221               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7222               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7223               _LT_TAGVAR(compiler_needs_object, $1)=yes
7224
7225               # Not sure whether something based on
7226               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7227               # would be better.
7228               output_verbose_link_cmd='func_echo_all'
7229
7230               # Archives containing C++ object files must be created using
7231               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7232               # necessary to make sure instantiated templates are included
7233               # in the archive.
7234               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7235               ;;
7236             esac
7237             ;;
7238         esac
7239         ;;
7240
7241       lynxos*)
7242         # FIXME: insert proper C++ library support
7243         _LT_TAGVAR(ld_shlibs, $1)=no
7244         ;;
7245
7246       m88k*)
7247         # FIXME: insert proper C++ library support
7248         _LT_TAGVAR(ld_shlibs, $1)=no
7249         ;;
7250
7251       mvs*)
7252         case $cc_basename in
7253           cxx*)
7254             # FIXME: insert proper C++ library support
7255             _LT_TAGVAR(ld_shlibs, $1)=no
7256             ;;
7257           *)
7258             # FIXME: insert proper C++ library support
7259             _LT_TAGVAR(ld_shlibs, $1)=no
7260             ;;
7261         esac
7262         ;;
7263
7264       netbsd*)
7265         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7266           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7267           wlarc=
7268           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7269           _LT_TAGVAR(hardcode_direct, $1)=yes
7270           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7271         fi
7272         # Workaround some broken pre-1.5 toolchains
7273         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7274         ;;
7275
7276       *nto* | *qnx*)
7277         _LT_TAGVAR(ld_shlibs, $1)=yes
7278         ;;
7279
7280       openbsd2*)
7281         # C++ shared libraries are fairly broken
7282         _LT_TAGVAR(ld_shlibs, $1)=no
7283         ;;
7284
7285       openbsd*)
7286         if test -f /usr/libexec/ld.so; then
7287           _LT_TAGVAR(hardcode_direct, $1)=yes
7288           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7289           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7290           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7291           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7292           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7293             _LT_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'
7294             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7295             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7296           fi
7297           output_verbose_link_cmd=func_echo_all
7298         else
7299           _LT_TAGVAR(ld_shlibs, $1)=no
7300         fi
7301         ;;
7302
7303       osf3* | osf4* | osf5*)
7304         case $cc_basename in
7305           KCC*)
7306             # Kuck and Associates, Inc. (KAI) C++ Compiler
7307
7308             # KCC will only create a shared library if the output file
7309             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7310             # to its proper name (with version) after linking.
7311             _LT_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'
7312
7313             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7314             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7315
7316             # Archives containing C++ object files must be created using
7317             # the KAI C++ compiler.
7318             case $host in
7319               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7320               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7321             esac
7322             ;;
7323           RCC*)
7324             # Rational C++ 2.4.1
7325             # FIXME: insert proper C++ library support
7326             _LT_TAGVAR(ld_shlibs, $1)=no
7327             ;;
7328           cxx*)
7329             case $host in
7330               osf3*)
7331                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7332                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7333                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7334                 ;;
7335               *)
7336                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7337                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7338                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7339                   echo "-hidden">> $lib.exp~
7340                   $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~
7341                   $RM $lib.exp'
7342                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7343                 ;;
7344             esac
7345
7346             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7347
7348             # Commands to make compiler produce verbose output that lists
7349             # what "hidden" libraries, object files and flags are used when
7350             # linking a shared library.
7351             #
7352             # There doesn't appear to be a way to prevent this compiler from
7353             # explicitly linking system object files so we need to strip them
7354             # from the output so that they don't get included in the library
7355             # dependencies.
7356             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7357             ;;
7358           *)
7359             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7360               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7361               case $host in
7362                 osf3*)
7363                   _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7364                   ;;
7365                 *)
7366                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7367                   ;;
7368               esac
7369
7370               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7371               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7372
7373               # Commands to make compiler produce verbose output that lists
7374               # what "hidden" libraries, object files and flags are used when
7375               # linking a shared library.
7376               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7377
7378             else
7379               # FIXME: insert proper C++ library support
7380               _LT_TAGVAR(ld_shlibs, $1)=no
7381             fi
7382             ;;
7383         esac
7384         ;;
7385
7386       psos*)
7387         # FIXME: insert proper C++ library support
7388         _LT_TAGVAR(ld_shlibs, $1)=no
7389         ;;
7390
7391       sunos4*)
7392         case $cc_basename in
7393           CC*)
7394             # Sun C++ 4.x
7395             # FIXME: insert proper C++ library support
7396             _LT_TAGVAR(ld_shlibs, $1)=no
7397             ;;
7398           lcc*)
7399             # Lucid
7400             # FIXME: insert proper C++ library support
7401             _LT_TAGVAR(ld_shlibs, $1)=no
7402             ;;
7403           *)
7404             # FIXME: insert proper C++ library support
7405             _LT_TAGVAR(ld_shlibs, $1)=no
7406             ;;
7407         esac
7408         ;;
7409
7410       solaris*)
7411         case $cc_basename in
7412           CC* | sunCC*)
7413             # Sun C++ 4.2, 5.x and Centerline C++
7414             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7415             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7416             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7417             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7418               $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'
7419
7420             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7421             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7422             case $host_os in
7423               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7424               *)
7425                 # The compiler driver will combine and reorder linker options,
7426                 # but understands `-z linker_flag'.
7427                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7428                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7429                 ;;
7430             esac
7431             _LT_TAGVAR(link_all_deplibs, $1)=yes
7432
7433             output_verbose_link_cmd='func_echo_all'
7434
7435             # Archives containing C++ object files must be created using
7436             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7437             # necessary to make sure instantiated templates are included
7438             # in the archive.
7439             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7440             ;;
7441           gcx*)
7442             # Green Hills C++ Compiler
7443             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7444
7445             # The C++ compiler must be used to create the archive.
7446             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7447             ;;
7448           *)
7449             # GNU C++ compiler with Solaris linker
7450             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7451               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7452               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7453                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7454                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7455                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7456
7457                 # Commands to make compiler produce verbose output that lists
7458                 # what "hidden" libraries, object files and flags are used when
7459                 # linking a shared library.
7460                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7461               else
7462                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7463                 # platform.
7464                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7465                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7466                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7467
7468                 # Commands to make compiler produce verbose output that lists
7469                 # what "hidden" libraries, object files and flags are used when
7470                 # linking a shared library.
7471                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7472               fi
7473
7474               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7475               case $host_os in
7476                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7477                 *)
7478                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7479                   ;;
7480               esac
7481             fi
7482             ;;
7483         esac
7484         ;;
7485
7486     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7487       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7488       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7489       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7490       runpath_var='LD_RUN_PATH'
7491
7492       case $cc_basename in
7493         CC*)
7494           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7495           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7496           ;;
7497         *)
7498           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7499           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7500           ;;
7501       esac
7502       ;;
7503
7504       sysv5* | sco3.2v5* | sco5v6*)
7505         # Note: We can NOT use -z defs as we might desire, because we do not
7506         # link with -lc, and that would cause any symbols used from libc to
7507         # always be unresolved, which means just about no library would
7508         # ever link correctly.  If we're not using GNU ld we use -z text
7509         # though, which does catch some bad symbols but isn't as heavy-handed
7510         # as -z defs.
7511         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7512         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7513         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7514         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7515         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7516         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7517         _LT_TAGVAR(link_all_deplibs, $1)=yes
7518         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7519         runpath_var='LD_RUN_PATH'
7520
7521         case $cc_basename in
7522           CC*)
7523             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7524             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7525             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7526               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7527             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7528               '"$_LT_TAGVAR(reload_cmds, $1)"
7529             ;;
7530           *)
7531             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7532             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7533             ;;
7534         esac
7535       ;;
7536
7537       tandem*)
7538         case $cc_basename in
7539           NCC*)
7540             # NonStop-UX NCC 3.20
7541             # FIXME: insert proper C++ library support
7542             _LT_TAGVAR(ld_shlibs, $1)=no
7543             ;;
7544           *)
7545             # FIXME: insert proper C++ library support
7546             _LT_TAGVAR(ld_shlibs, $1)=no
7547             ;;
7548         esac
7549         ;;
7550
7551       vxworks*)
7552         # FIXME: insert proper C++ library support
7553         _LT_TAGVAR(ld_shlibs, $1)=no
7554         ;;
7555
7556       *)
7557         # FIXME: insert proper C++ library support
7558         _LT_TAGVAR(ld_shlibs, $1)=no
7559         ;;
7560     esac
7561
7562     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7563     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7564
7565     _LT_TAGVAR(GCC, $1)="$GXX"
7566     _LT_TAGVAR(LD, $1)="$LD"
7567
7568     ## CAVEAT EMPTOR:
7569     ## There is no encapsulation within the following macros, do not change
7570     ## the running order or otherwise move them around unless you know exactly
7571     ## what you are doing...
7572     _LT_SYS_HIDDEN_LIBDEPS($1)
7573     _LT_COMPILER_PIC($1)
7574     _LT_COMPILER_C_O($1)
7575     _LT_COMPILER_FILE_LOCKS($1)
7576     _LT_LINKER_SHLIBS($1)
7577     _LT_SYS_DYNAMIC_LINKER($1)
7578     _LT_LINKER_HARDCODE_LIBPATH($1)
7579
7580     _LT_CONFIG($1)
7581   fi # test -n "$compiler"
7582
7583   CC=$lt_save_CC
7584   CFLAGS=$lt_save_CFLAGS
7585   LDCXX=$LD
7586   LD=$lt_save_LD
7587   GCC=$lt_save_GCC
7588   with_gnu_ld=$lt_save_with_gnu_ld
7589   lt_cv_path_LDCXX=$lt_cv_path_LD
7590   lt_cv_path_LD=$lt_save_path_LD
7591   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7592   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7593 fi # test "$_lt_caught_CXX_error" != yes
7594
7595 AC_LANG_POP
7596 ])# _LT_LANG_CXX_CONFIG
7597
7598
7599 # _LT_FUNC_STRIPNAME_CNF
7600 # ----------------------
7601 # func_stripname_cnf prefix suffix name
7602 # strip PREFIX and SUFFIX off of NAME.
7603 # PREFIX and SUFFIX must not contain globbing or regex special
7604 # characters, hashes, percent signs, but SUFFIX may contain a leading
7605 # dot (in which case that matches only a dot).
7606 #
7607 # This function is identical to the (non-XSI) version of func_stripname,
7608 # except this one can be used by m4 code that may be executed by configure,
7609 # rather than the libtool script.
7610 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7611 AC_REQUIRE([_LT_DECL_SED])
7612 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7613 func_stripname_cnf ()
7614 {
7615   case ${2} in
7616   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7617   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7618   esac
7619 } # func_stripname_cnf
7620 ])# _LT_FUNC_STRIPNAME_CNF
7621
7622 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7623 # ---------------------------------
7624 # Figure out "hidden" library dependencies from verbose
7625 # compiler output when linking a shared library.
7626 # Parse the compiler output and extract the necessary
7627 # objects, libraries and library flags.
7628 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7630 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7631 # Dependencies to place before and after the object being linked:
7632 _LT_TAGVAR(predep_objects, $1)=
7633 _LT_TAGVAR(postdep_objects, $1)=
7634 _LT_TAGVAR(predeps, $1)=
7635 _LT_TAGVAR(postdeps, $1)=
7636 _LT_TAGVAR(compiler_lib_search_path, $1)=
7637
7638 dnl we can't use the lt_simple_compile_test_code here,
7639 dnl because it contains code intended for an executable,
7640 dnl not a library.  It's possible we should let each
7641 dnl tag define a new lt_????_link_test_code variable,
7642 dnl but it's only used here...
7643 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7644 int a;
7645 void foo (void) { a = 0; }
7646 _LT_EOF
7647 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7648 class Foo
7649 {
7650 public:
7651   Foo (void) { a = 0; }
7652 private:
7653   int a;
7654 };
7655 _LT_EOF
7656 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7657       subroutine foo
7658       implicit none
7659       integer*4 a
7660       a=0
7661       return
7662       end
7663 _LT_EOF
7664 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7665       subroutine foo
7666       implicit none
7667       integer a
7668       a=0
7669       return
7670       end
7671 _LT_EOF
7672 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7673 public class foo {
7674   private int a;
7675   public void bar (void) {
7676     a = 0;
7677   }
7678 };
7679 _LT_EOF
7680 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7681 package foo
7682 func foo() {
7683 }
7684 _LT_EOF
7685 ])
7686
7687 _lt_libdeps_save_CFLAGS=$CFLAGS
7688 case "$CC $CFLAGS " in #(
7689 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7690 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7691 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7692 esac
7693
7694 dnl Parse the compiler output and extract the necessary
7695 dnl objects, libraries and library flags.
7696 if AC_TRY_EVAL(ac_compile); then
7697   # Parse the compiler output and extract the necessary
7698   # objects, libraries and library flags.
7699
7700   # Sentinel used to keep track of whether or not we are before
7701   # the conftest object file.
7702   pre_test_object_deps_done=no
7703
7704   for p in `eval "$output_verbose_link_cmd"`; do
7705     case ${prev}${p} in
7706
7707     -L* | -R* | -l*)
7708        # Some compilers place space between "-{L,R}" and the path.
7709        # Remove the space.
7710        if test $p = "-L" ||
7711           test $p = "-R"; then
7712          prev=$p
7713          continue
7714        fi
7715
7716        # Expand the sysroot to ease extracting the directories later.
7717        if test -z "$prev"; then
7718          case $p in
7719          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7720          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7721          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7722          esac
7723        fi
7724        case $p in
7725        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7726        esac
7727        if test "$pre_test_object_deps_done" = no; then
7728          case ${prev} in
7729          -L | -R)
7730            # Internal compiler library paths should come after those
7731            # provided the user.  The postdeps already come after the
7732            # user supplied libs so there is no need to process them.
7733            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7734              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7735            else
7736              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7737            fi
7738            ;;
7739          # The "-l" case would never come before the object being
7740          # linked, so don't bother handling this case.
7741          esac
7742        else
7743          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7744            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7745          else
7746            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7747          fi
7748        fi
7749        prev=
7750        ;;
7751
7752     *.lto.$objext) ;; # Ignore GCC LTO objects
7753     *.$objext)
7754        # This assumes that the test object file only shows up
7755        # once in the compiler output.
7756        if test "$p" = "conftest.$objext"; then
7757          pre_test_object_deps_done=yes
7758          continue
7759        fi
7760
7761        if test "$pre_test_object_deps_done" = no; then
7762          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7763            _LT_TAGVAR(predep_objects, $1)="$p"
7764          else
7765            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7766          fi
7767        else
7768          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7769            _LT_TAGVAR(postdep_objects, $1)="$p"
7770          else
7771            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7772          fi
7773        fi
7774        ;;
7775
7776     *) ;; # Ignore the rest.
7777
7778     esac
7779   done
7780
7781   # Clean up.
7782   rm -f a.out a.exe
7783 else
7784   echo "libtool.m4: error: problem compiling $1 test program"
7785 fi
7786
7787 $RM -f confest.$objext
7788 CFLAGS=$_lt_libdeps_save_CFLAGS
7789
7790 # PORTME: override above test on systems where it is broken
7791 m4_if([$1], [CXX],
7792 [case $host_os in
7793 interix[[3-9]]*)
7794   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7795   # hack all around it, let's just trust "g++" to DTRT.
7796   _LT_TAGVAR(predep_objects,$1)=
7797   _LT_TAGVAR(postdep_objects,$1)=
7798   _LT_TAGVAR(postdeps,$1)=
7799   ;;
7800
7801 linux*)
7802   case `$CC -V 2>&1 | sed 5q` in
7803   *Sun\ C*)
7804     # Sun C++ 5.9
7805
7806     # The more standards-conforming stlport4 library is
7807     # incompatible with the Cstd library. Avoid specifying
7808     # it if it's in CXXFLAGS. Ignore libCrun as
7809     # -library=stlport4 depends on it.
7810     case " $CXX $CXXFLAGS " in
7811     *" -library=stlport4 "*)
7812       solaris_use_stlport4=yes
7813       ;;
7814     esac
7815
7816     if test "$solaris_use_stlport4" != yes; then
7817       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7818     fi
7819     ;;
7820   esac
7821   ;;
7822
7823 solaris*)
7824   case $cc_basename in
7825   CC* | sunCC*)
7826     # The more standards-conforming stlport4 library is
7827     # incompatible with the Cstd library. Avoid specifying
7828     # it if it's in CXXFLAGS. Ignore libCrun as
7829     # -library=stlport4 depends on it.
7830     case " $CXX $CXXFLAGS " in
7831     *" -library=stlport4 "*)
7832       solaris_use_stlport4=yes
7833       ;;
7834     esac
7835
7836     # Adding this requires a known-good setup of shared libraries for
7837     # Sun compiler versions before 5.6, else PIC objects from an old
7838     # archive will be linked into the output, leading to subtle bugs.
7839     if test "$solaris_use_stlport4" != yes; then
7840       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7841     fi
7842     ;;
7843   esac
7844   ;;
7845 esac
7846 ])
7847
7848 case " $_LT_TAGVAR(postdeps, $1) " in
7849 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7850 esac
7851  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7852 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7853  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7854 fi
7855 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7856     [The directories searched by this compiler when creating a shared library])
7857 _LT_TAGDECL([], [predep_objects], [1],
7858     [Dependencies to place before and after the objects being linked to
7859     create a shared library])
7860 _LT_TAGDECL([], [postdep_objects], [1])
7861 _LT_TAGDECL([], [predeps], [1])
7862 _LT_TAGDECL([], [postdeps], [1])
7863 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7864     [The library search path used internally by the compiler when linking
7865     a shared library])
7866 ])# _LT_SYS_HIDDEN_LIBDEPS
7867
7868
7869 # _LT_LANG_F77_CONFIG([TAG])
7870 # --------------------------
7871 # Ensure that the configuration variables for a Fortran 77 compiler are
7872 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7873 # to write the compiler configuration to `libtool'.
7874 m4_defun([_LT_LANG_F77_CONFIG],
7875 [AC_LANG_PUSH(Fortran 77)
7876 if test -z "$F77" || test "X$F77" = "Xno"; then
7877   _lt_disable_F77=yes
7878 fi
7879
7880 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7881 _LT_TAGVAR(allow_undefined_flag, $1)=
7882 _LT_TAGVAR(always_export_symbols, $1)=no
7883 _LT_TAGVAR(archive_expsym_cmds, $1)=
7884 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7885 _LT_TAGVAR(hardcode_direct, $1)=no
7886 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7888 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7889 _LT_TAGVAR(hardcode_minus_L, $1)=no
7890 _LT_TAGVAR(hardcode_automatic, $1)=no
7891 _LT_TAGVAR(inherit_rpath, $1)=no
7892 _LT_TAGVAR(module_cmds, $1)=
7893 _LT_TAGVAR(module_expsym_cmds, $1)=
7894 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7895 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7896 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7897 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7898 _LT_TAGVAR(no_undefined_flag, $1)=
7899 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7900 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7901
7902 # Source file extension for f77 test sources.
7903 ac_ext=f
7904
7905 # Object file extension for compiled f77 test sources.
7906 objext=o
7907 _LT_TAGVAR(objext, $1)=$objext
7908
7909 # No sense in running all these tests if we already determined that
7910 # the F77 compiler isn't working.  Some variables (like enable_shared)
7911 # are currently assumed to apply to all compilers on this platform,
7912 # and will be corrupted by setting them based on a non-working compiler.
7913 if test "$_lt_disable_F77" != yes; then
7914   # Code to be used in simple compile tests
7915   lt_simple_compile_test_code="\
7916       subroutine t
7917       return
7918       end
7919 "
7920
7921   # Code to be used in simple link tests
7922   lt_simple_link_test_code="\
7923       program t
7924       end
7925 "
7926
7927   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7928   _LT_TAG_COMPILER
7929
7930   # save warnings/boilerplate of simple test code
7931   _LT_COMPILER_BOILERPLATE
7932   _LT_LINKER_BOILERPLATE
7933
7934   # Allow CC to be a program name with arguments.
7935   lt_save_CC="$CC"
7936   lt_save_GCC=$GCC
7937   lt_save_CFLAGS=$CFLAGS
7938   CC=${F77-"f77"}
7939   CFLAGS=$FFLAGS
7940   compiler=$CC
7941   _LT_TAGVAR(compiler, $1)=$CC
7942   _LT_CC_BASENAME([$compiler])
7943   GCC=$G77
7944   if test -n "$compiler"; then
7945     AC_MSG_CHECKING([if libtool supports shared libraries])
7946     AC_MSG_RESULT([$can_build_shared])
7947
7948     AC_MSG_CHECKING([whether to build shared libraries])
7949     test "$can_build_shared" = "no" && enable_shared=no
7950
7951     # On AIX, shared libraries and static libraries use the same namespace, and
7952     # are all built from PIC.
7953     case $host_os in
7954       aix3*)
7955         test "$enable_shared" = yes && enable_static=no
7956         if test -n "$RANLIB"; then
7957           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7958           postinstall_cmds='$RANLIB $lib'
7959         fi
7960         ;;
7961       aix[[4-9]]*)
7962         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7963           test "$enable_shared" = yes && enable_static=no
7964         fi
7965         ;;
7966     esac
7967     AC_MSG_RESULT([$enable_shared])
7968
7969     AC_MSG_CHECKING([whether to build static libraries])
7970     # Make sure either enable_shared or enable_static is yes.
7971     test "$enable_shared" = yes || enable_static=yes
7972     AC_MSG_RESULT([$enable_static])
7973
7974     _LT_TAGVAR(GCC, $1)="$G77"
7975     _LT_TAGVAR(LD, $1)="$LD"
7976
7977     ## CAVEAT EMPTOR:
7978     ## There is no encapsulation within the following macros, do not change
7979     ## the running order or otherwise move them around unless you know exactly
7980     ## what you are doing...
7981     _LT_COMPILER_PIC($1)
7982     _LT_COMPILER_C_O($1)
7983     _LT_COMPILER_FILE_LOCKS($1)
7984     _LT_LINKER_SHLIBS($1)
7985     _LT_SYS_DYNAMIC_LINKER($1)
7986     _LT_LINKER_HARDCODE_LIBPATH($1)
7987
7988     _LT_CONFIG($1)
7989   fi # test -n "$compiler"
7990
7991   GCC=$lt_save_GCC
7992   CC="$lt_save_CC"
7993   CFLAGS="$lt_save_CFLAGS"
7994 fi # test "$_lt_disable_F77" != yes
7995
7996 AC_LANG_POP
7997 ])# _LT_LANG_F77_CONFIG
7998
7999
8000 # _LT_LANG_FC_CONFIG([TAG])
8001 # -------------------------
8002 # Ensure that the configuration variables for a Fortran compiler are
8003 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8004 # to write the compiler configuration to `libtool'.
8005 m4_defun([_LT_LANG_FC_CONFIG],
8006 [AC_LANG_PUSH(Fortran)
8007
8008 if test -z "$FC" || test "X$FC" = "Xno"; then
8009   _lt_disable_FC=yes
8010 fi
8011
8012 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8013 _LT_TAGVAR(allow_undefined_flag, $1)=
8014 _LT_TAGVAR(always_export_symbols, $1)=no
8015 _LT_TAGVAR(archive_expsym_cmds, $1)=
8016 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8017 _LT_TAGVAR(hardcode_direct, $1)=no
8018 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8019 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8020 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8021 _LT_TAGVAR(hardcode_minus_L, $1)=no
8022 _LT_TAGVAR(hardcode_automatic, $1)=no
8023 _LT_TAGVAR(inherit_rpath, $1)=no
8024 _LT_TAGVAR(module_cmds, $1)=
8025 _LT_TAGVAR(module_expsym_cmds, $1)=
8026 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8027 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8028 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8029 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8030 _LT_TAGVAR(no_undefined_flag, $1)=
8031 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8032 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8033
8034 # Source file extension for fc test sources.
8035 ac_ext=${ac_fc_srcext-f}
8036
8037 # Object file extension for compiled fc test sources.
8038 objext=o
8039 _LT_TAGVAR(objext, $1)=$objext
8040
8041 # No sense in running all these tests if we already determined that
8042 # the FC compiler isn't working.  Some variables (like enable_shared)
8043 # are currently assumed to apply to all compilers on this platform,
8044 # and will be corrupted by setting them based on a non-working compiler.
8045 if test "$_lt_disable_FC" != yes; then
8046   # Code to be used in simple compile tests
8047   lt_simple_compile_test_code="\
8048       subroutine t
8049       return
8050       end
8051 "
8052
8053   # Code to be used in simple link tests
8054   lt_simple_link_test_code="\
8055       program t
8056       end
8057 "
8058
8059   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8060   _LT_TAG_COMPILER
8061
8062   # save warnings/boilerplate of simple test code
8063   _LT_COMPILER_BOILERPLATE
8064   _LT_LINKER_BOILERPLATE
8065
8066   # Allow CC to be a program name with arguments.
8067   lt_save_CC="$CC"
8068   lt_save_GCC=$GCC
8069   lt_save_CFLAGS=$CFLAGS
8070   CC=${FC-"f95"}
8071   CFLAGS=$FCFLAGS
8072   compiler=$CC
8073   GCC=$ac_cv_fc_compiler_gnu
8074
8075   _LT_TAGVAR(compiler, $1)=$CC
8076   _LT_CC_BASENAME([$compiler])
8077
8078   if test -n "$compiler"; then
8079     AC_MSG_CHECKING([if libtool supports shared libraries])
8080     AC_MSG_RESULT([$can_build_shared])
8081
8082     AC_MSG_CHECKING([whether to build shared libraries])
8083     test "$can_build_shared" = "no" && enable_shared=no
8084
8085     # On AIX, shared libraries and static libraries use the same namespace, and
8086     # are all built from PIC.
8087     case $host_os in
8088       aix3*)
8089         test "$enable_shared" = yes && enable_static=no
8090         if test -n "$RANLIB"; then
8091           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8092           postinstall_cmds='$RANLIB $lib'
8093         fi
8094         ;;
8095       aix[[4-9]]*)
8096         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8097           test "$enable_shared" = yes && enable_static=no
8098         fi
8099         ;;
8100     esac
8101     AC_MSG_RESULT([$enable_shared])
8102
8103     AC_MSG_CHECKING([whether to build static libraries])
8104     # Make sure either enable_shared or enable_static is yes.
8105     test "$enable_shared" = yes || enable_static=yes
8106     AC_MSG_RESULT([$enable_static])
8107
8108     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8109     _LT_TAGVAR(LD, $1)="$LD"
8110
8111     ## CAVEAT EMPTOR:
8112     ## There is no encapsulation within the following macros, do not change
8113     ## the running order or otherwise move them around unless you know exactly
8114     ## what you are doing...
8115     _LT_SYS_HIDDEN_LIBDEPS($1)
8116     _LT_COMPILER_PIC($1)
8117     _LT_COMPILER_C_O($1)
8118     _LT_COMPILER_FILE_LOCKS($1)
8119     _LT_LINKER_SHLIBS($1)
8120     _LT_SYS_DYNAMIC_LINKER($1)
8121     _LT_LINKER_HARDCODE_LIBPATH($1)
8122
8123     _LT_CONFIG($1)
8124   fi # test -n "$compiler"
8125
8126   GCC=$lt_save_GCC
8127   CC=$lt_save_CC
8128   CFLAGS=$lt_save_CFLAGS
8129 fi # test "$_lt_disable_FC" != yes
8130
8131 AC_LANG_POP
8132 ])# _LT_LANG_FC_CONFIG
8133
8134
8135 # _LT_LANG_GCJ_CONFIG([TAG])
8136 # --------------------------
8137 # Ensure that the configuration variables for the GNU Java Compiler compiler
8138 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8139 # to write the compiler configuration to `libtool'.
8140 m4_defun([_LT_LANG_GCJ_CONFIG],
8141 [AC_REQUIRE([LT_PROG_GCJ])dnl
8142 AC_LANG_SAVE
8143
8144 # Source file extension for Java test sources.
8145 ac_ext=java
8146
8147 # Object file extension for compiled Java test sources.
8148 objext=o
8149 _LT_TAGVAR(objext, $1)=$objext
8150
8151 # Code to be used in simple compile tests
8152 lt_simple_compile_test_code="class foo {}"
8153
8154 # Code to be used in simple link tests
8155 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8156
8157 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8158 _LT_TAG_COMPILER
8159
8160 # save warnings/boilerplate of simple test code
8161 _LT_COMPILER_BOILERPLATE
8162 _LT_LINKER_BOILERPLATE
8163
8164 # Allow CC to be a program name with arguments.
8165 lt_save_CC=$CC
8166 lt_save_CFLAGS=$CFLAGS
8167 lt_save_GCC=$GCC
8168 GCC=yes
8169 CC=${GCJ-"gcj"}
8170 CFLAGS=$GCJFLAGS
8171 compiler=$CC
8172 _LT_TAGVAR(compiler, $1)=$CC
8173 _LT_TAGVAR(LD, $1)="$LD"
8174 _LT_CC_BASENAME([$compiler])
8175
8176 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8177 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8178
8179 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8180 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8181 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8182
8183 ## CAVEAT EMPTOR:
8184 ## There is no encapsulation within the following macros, do not change
8185 ## the running order or otherwise move them around unless you know exactly
8186 ## what you are doing...
8187 if test -n "$compiler"; then
8188   _LT_COMPILER_NO_RTTI($1)
8189   _LT_COMPILER_PIC($1)
8190   _LT_COMPILER_C_O($1)
8191   _LT_COMPILER_FILE_LOCKS($1)
8192   _LT_LINKER_SHLIBS($1)
8193   _LT_LINKER_HARDCODE_LIBPATH($1)
8194
8195   _LT_CONFIG($1)
8196 fi
8197
8198 AC_LANG_RESTORE
8199
8200 GCC=$lt_save_GCC
8201 CC=$lt_save_CC
8202 CFLAGS=$lt_save_CFLAGS
8203 ])# _LT_LANG_GCJ_CONFIG
8204
8205
8206 # _LT_LANG_GO_CONFIG([TAG])
8207 # --------------------------
8208 # Ensure that the configuration variables for the GNU Go compiler
8209 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8210 # to write the compiler configuration to `libtool'.
8211 m4_defun([_LT_LANG_GO_CONFIG],
8212 [AC_REQUIRE([LT_PROG_GO])dnl
8213 AC_LANG_SAVE
8214
8215 # Source file extension for Go test sources.
8216 ac_ext=go
8217
8218 # Object file extension for compiled Go test sources.
8219 objext=o
8220 _LT_TAGVAR(objext, $1)=$objext
8221
8222 # Code to be used in simple compile tests
8223 lt_simple_compile_test_code="package main; func main() { }"
8224
8225 # Code to be used in simple link tests
8226 lt_simple_link_test_code='package main; func main() { }'
8227
8228 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8229 _LT_TAG_COMPILER
8230
8231 # save warnings/boilerplate of simple test code
8232 _LT_COMPILER_BOILERPLATE
8233 _LT_LINKER_BOILERPLATE
8234
8235 # Allow CC to be a program name with arguments.
8236 lt_save_CC=$CC
8237 lt_save_CFLAGS=$CFLAGS
8238 lt_save_GCC=$GCC
8239 GCC=yes
8240 CC=${GOC-"gccgo"}
8241 CFLAGS=$GOFLAGS
8242 compiler=$CC
8243 _LT_TAGVAR(compiler, $1)=$CC
8244 _LT_TAGVAR(LD, $1)="$LD"
8245 _LT_CC_BASENAME([$compiler])
8246
8247 # Go did not exist at the time GCC didn't implicitly link libc in.
8248 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8249
8250 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8251 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8252 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8253
8254 ## CAVEAT EMPTOR:
8255 ## There is no encapsulation within the following macros, do not change
8256 ## the running order or otherwise move them around unless you know exactly
8257 ## what you are doing...
8258 if test -n "$compiler"; then
8259   _LT_COMPILER_NO_RTTI($1)
8260   _LT_COMPILER_PIC($1)
8261   _LT_COMPILER_C_O($1)
8262   _LT_COMPILER_FILE_LOCKS($1)
8263   _LT_LINKER_SHLIBS($1)
8264   _LT_LINKER_HARDCODE_LIBPATH($1)
8265
8266   _LT_CONFIG($1)
8267 fi
8268
8269 AC_LANG_RESTORE
8270
8271 GCC=$lt_save_GCC
8272 CC=$lt_save_CC
8273 CFLAGS=$lt_save_CFLAGS
8274 ])# _LT_LANG_GO_CONFIG
8275
8276
8277 # _LT_LANG_RC_CONFIG([TAG])
8278 # -------------------------
8279 # Ensure that the configuration variables for the Windows resource compiler
8280 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8281 # to write the compiler configuration to `libtool'.
8282 m4_defun([_LT_LANG_RC_CONFIG],
8283 [AC_REQUIRE([LT_PROG_RC])dnl
8284 AC_LANG_SAVE
8285
8286 # Source file extension for RC test sources.
8287 ac_ext=rc
8288
8289 # Object file extension for compiled RC test sources.
8290 objext=o
8291 _LT_TAGVAR(objext, $1)=$objext
8292
8293 # Code to be used in simple compile tests
8294 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8295
8296 # Code to be used in simple link tests
8297 lt_simple_link_test_code="$lt_simple_compile_test_code"
8298
8299 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8300 _LT_TAG_COMPILER
8301
8302 # save warnings/boilerplate of simple test code
8303 _LT_COMPILER_BOILERPLATE
8304 _LT_LINKER_BOILERPLATE
8305
8306 # Allow CC to be a program name with arguments.
8307 lt_save_CC="$CC"
8308 lt_save_CFLAGS=$CFLAGS
8309 lt_save_GCC=$GCC
8310 GCC=
8311 CC=${RC-"windres"}
8312 CFLAGS=
8313 compiler=$CC
8314 _LT_TAGVAR(compiler, $1)=$CC
8315 _LT_CC_BASENAME([$compiler])
8316 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8317
8318 if test -n "$compiler"; then
8319   :
8320   _LT_CONFIG($1)
8321 fi
8322
8323 GCC=$lt_save_GCC
8324 AC_LANG_RESTORE
8325 CC=$lt_save_CC
8326 CFLAGS=$lt_save_CFLAGS
8327 ])# _LT_LANG_RC_CONFIG
8328
8329
8330 # LT_PROG_GCJ
8331 # -----------
8332 AC_DEFUN([LT_PROG_GCJ],
8333 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8334   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8335     [AC_CHECK_TOOL(GCJ, gcj,)
8336       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8337       AC_SUBST(GCJFLAGS)])])[]dnl
8338 ])
8339
8340 # Old name:
8341 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8342 dnl aclocal-1.4 backwards compatibility:
8343 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8344
8345
8346 # LT_PROG_GO
8347 # ----------
8348 AC_DEFUN([LT_PROG_GO],
8349 [AC_CHECK_TOOL(GOC, gccgo,)
8350 ])
8351
8352
8353 # LT_PROG_RC
8354 # ----------
8355 AC_DEFUN([LT_PROG_RC],
8356 [AC_CHECK_TOOL(RC, windres,)
8357 ])
8358
8359 # Old name:
8360 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8361 dnl aclocal-1.4 backwards compatibility:
8362 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8363
8364
8365 # _LT_DECL_EGREP
8366 # --------------
8367 # If we don't have a new enough Autoconf to choose the best grep
8368 # available, choose the one first in the user's PATH.
8369 m4_defun([_LT_DECL_EGREP],
8370 [AC_REQUIRE([AC_PROG_EGREP])dnl
8371 AC_REQUIRE([AC_PROG_FGREP])dnl
8372 test -z "$GREP" && GREP=grep
8373 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8374 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8375 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8376 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8377 AC_SUBST([GREP])
8378 ])
8379
8380
8381 # _LT_DECL_OBJDUMP
8382 # --------------
8383 # If we don't have a new enough Autoconf to choose the best objdump
8384 # available, choose the one first in the user's PATH.
8385 m4_defun([_LT_DECL_OBJDUMP],
8386 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8387 test -z "$OBJDUMP" && OBJDUMP=objdump
8388 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8389 AC_SUBST([OBJDUMP])
8390 ])
8391
8392 # _LT_DECL_DLLTOOL
8393 # ----------------
8394 # Ensure DLLTOOL variable is set.
8395 m4_defun([_LT_DECL_DLLTOOL],
8396 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8397 test -z "$DLLTOOL" && DLLTOOL=dlltool
8398 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8399 AC_SUBST([DLLTOOL])
8400 ])
8401
8402 # _LT_DECL_SED
8403 # ------------
8404 # Check for a fully-functional sed program, that truncates
8405 # as few characters as possible.  Prefer GNU sed if found.
8406 m4_defun([_LT_DECL_SED],
8407 [AC_PROG_SED
8408 test -z "$SED" && SED=sed
8409 Xsed="$SED -e 1s/^X//"
8410 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8411 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8412     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8413 ])# _LT_DECL_SED
8414
8415 m4_ifndef([AC_PROG_SED], [
8416 ############################################################
8417 # NOTE: This macro has been submitted for inclusion into   #
8418 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8419 #  a released version of Autoconf we should remove this    #
8420 #  macro and use it instead.                               #
8421 ############################################################
8422
8423 m4_defun([AC_PROG_SED],
8424 [AC_MSG_CHECKING([for a sed that does not truncate output])
8425 AC_CACHE_VAL(lt_cv_path_SED,
8426 [# Loop through the user's path and test for sed and gsed.
8427 # Then use that list of sed's as ones to test for truncation.
8428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8429 for as_dir in $PATH
8430 do
8431   IFS=$as_save_IFS
8432   test -z "$as_dir" && as_dir=.
8433   for lt_ac_prog in sed gsed; do
8434     for ac_exec_ext in '' $ac_executable_extensions; do
8435       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8436         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8437       fi
8438     done
8439   done
8440 done
8441 IFS=$as_save_IFS
8442 lt_ac_max=0
8443 lt_ac_count=0
8444 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8445 # along with /bin/sed that truncates output.
8446 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8447   test ! -f $lt_ac_sed && continue
8448   cat /dev/null > conftest.in
8449   lt_ac_count=0
8450   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8451   # Check for GNU sed and select it if it is found.
8452   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8453     lt_cv_path_SED=$lt_ac_sed
8454     break
8455   fi
8456   while true; do
8457     cat conftest.in conftest.in >conftest.tmp
8458     mv conftest.tmp conftest.in
8459     cp conftest.in conftest.nl
8460     echo >>conftest.nl
8461     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8462     cmp -s conftest.out conftest.nl || break
8463     # 10000 chars as input seems more than enough
8464     test $lt_ac_count -gt 10 && break
8465     lt_ac_count=`expr $lt_ac_count + 1`
8466     if test $lt_ac_count -gt $lt_ac_max; then
8467       lt_ac_max=$lt_ac_count
8468       lt_cv_path_SED=$lt_ac_sed
8469     fi
8470   done
8471 done
8472 ])
8473 SED=$lt_cv_path_SED
8474 AC_SUBST([SED])
8475 AC_MSG_RESULT([$SED])
8476 ])#AC_PROG_SED
8477 ])#m4_ifndef
8478
8479 # Old name:
8480 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8481 dnl aclocal-1.4 backwards compatibility:
8482 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8483
8484
8485 # _LT_CHECK_SHELL_FEATURES
8486 # ------------------------
8487 # Find out whether the shell is Bourne or XSI compatible,
8488 # or has some other useful features.
8489 m4_defun([_LT_CHECK_SHELL_FEATURES],
8490 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8491 # Try some XSI features
8492 xsi_shell=no
8493 ( _lt_dummy="a/b/c"
8494   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8495       = c,a/b,b/c, \
8496     && eval 'test $(( 1 + 1 )) -eq 2 \
8497     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8498   && xsi_shell=yes
8499 AC_MSG_RESULT([$xsi_shell])
8500 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8501
8502 AC_MSG_CHECKING([whether the shell understands "+="])
8503 lt_shell_append=no
8504 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8505     >/dev/null 2>&1 \
8506   && lt_shell_append=yes
8507 AC_MSG_RESULT([$lt_shell_append])
8508 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8509
8510 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8511   lt_unset=unset
8512 else
8513   lt_unset=false
8514 fi
8515 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8516
8517 # test EBCDIC or ASCII
8518 case `echo X|tr X '\101'` in
8519  A) # ASCII based system
8520     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8521   lt_SP2NL='tr \040 \012'
8522   lt_NL2SP='tr \015\012 \040\040'
8523   ;;
8524  *) # EBCDIC based system
8525   lt_SP2NL='tr \100 \n'
8526   lt_NL2SP='tr \r\n \100\100'
8527   ;;
8528 esac
8529 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8530 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8531 ])# _LT_CHECK_SHELL_FEATURES
8532
8533
8534 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8535 # ------------------------------------------------------
8536 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8537 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8538 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8539 [dnl {
8540 sed -e '/^$1 ()$/,/^} # $1 /c\
8541 $1 ()\
8542 {\
8543 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8544 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8545   && mv -f "$cfgfile.tmp" "$cfgfile" \
8546     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8547 test 0 -eq $? || _lt_function_replace_fail=:
8548 ])
8549
8550
8551 # _LT_PROG_REPLACE_SHELLFNS
8552 # -------------------------
8553 # Replace existing portable implementations of several shell functions with
8554 # equivalent extended shell implementations where those features are available..
8555 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8556 [if test x"$xsi_shell" = xyes; then
8557   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8558     case ${1} in
8559       */*) func_dirname_result="${1%/*}${2}" ;;
8560       *  ) func_dirname_result="${3}" ;;
8561     esac])
8562
8563   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8564     func_basename_result="${1##*/}"])
8565
8566   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8567     case ${1} in
8568       */*) func_dirname_result="${1%/*}${2}" ;;
8569       *  ) func_dirname_result="${3}" ;;
8570     esac
8571     func_basename_result="${1##*/}"])
8572
8573   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8574     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8575     # positional parameters, so assign one to ordinary parameter first.
8576     func_stripname_result=${3}
8577     func_stripname_result=${func_stripname_result#"${1}"}
8578     func_stripname_result=${func_stripname_result%"${2}"}])
8579
8580   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8581     func_split_long_opt_name=${1%%=*}
8582     func_split_long_opt_arg=${1#*=}])
8583
8584   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8585     func_split_short_opt_arg=${1#??}
8586     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8587
8588   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8589     case ${1} in
8590       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8591       *)    func_lo2o_result=${1} ;;
8592     esac])
8593
8594   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8595
8596   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8597
8598   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8599 fi
8600
8601 if test x"$lt_shell_append" = xyes; then
8602   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8603
8604   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8605     func_quote_for_eval "${2}"
8606 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8607     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8608
8609   # Save a `func_append' function call where possible by direct use of '+='
8610   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8611     && mv -f "$cfgfile.tmp" "$cfgfile" \
8612       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8613   test 0 -eq $? || _lt_function_replace_fail=:
8614 else
8615   # Save a `func_append' function call even when '+=' is not available
8616   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8617     && mv -f "$cfgfile.tmp" "$cfgfile" \
8618       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8619   test 0 -eq $? || _lt_function_replace_fail=:
8620 fi
8621
8622 if test x"$_lt_function_replace_fail" = x":"; then
8623   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8624 fi
8625 ])
8626
8627 # _LT_PATH_CONVERSION_FUNCTIONS
8628 # -----------------------------
8629 # Determine which file name conversion functions should be used by
8630 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8631 # for certain cross-compile configurations and native mingw.
8632 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8633 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8634 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8635 AC_MSG_CHECKING([how to convert $build file names to $host format])
8636 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8637 [case $host in
8638   *-*-mingw* )
8639     case $build in
8640       *-*-mingw* ) # actually msys
8641         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8642         ;;
8643       *-*-cygwin* )
8644         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8645         ;;
8646       * ) # otherwise, assume *nix
8647         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8648         ;;
8649     esac
8650     ;;
8651   *-*-cygwin* )
8652     case $build in
8653       *-*-mingw* ) # actually msys
8654         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8655         ;;
8656       *-*-cygwin* )
8657         lt_cv_to_host_file_cmd=func_convert_file_noop
8658         ;;
8659       * ) # otherwise, assume *nix
8660         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8661         ;;
8662     esac
8663     ;;
8664   * ) # unhandled hosts (and "normal" native builds)
8665     lt_cv_to_host_file_cmd=func_convert_file_noop
8666     ;;
8667 esac
8668 ])
8669 to_host_file_cmd=$lt_cv_to_host_file_cmd
8670 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8671 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8672          [0], [convert $build file names to $host format])dnl
8673
8674 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8675 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8676 [#assume ordinary cross tools, or native build.
8677 lt_cv_to_tool_file_cmd=func_convert_file_noop
8678 case $host in
8679   *-*-mingw* )
8680     case $build in
8681       *-*-mingw* ) # actually msys
8682         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8683         ;;
8684     esac
8685     ;;
8686 esac
8687 ])
8688 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8689 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8690 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8691          [0], [convert $build files to toolchain format])dnl
8692 ])# _LT_PATH_CONVERSION_FUNCTIONS
8693 # Helper functions for option handling.                    -*- Autoconf -*-
8694 #
8695 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8696 #   Inc.
8697 #   Written by Gary V. Vaughan, 2004
8698 #
8699 # This file is free software; the Free Software Foundation gives
8700 # unlimited permission to copy and/or distribute it, with or without
8701 # modifications, as long as this notice is preserved.
8702
8703 # serial 7 ltoptions.m4
8704
8705 # This is to help aclocal find these macros, as it can't see m4_define.
8706 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8707
8708
8709 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8710 # ------------------------------------------
8711 m4_define([_LT_MANGLE_OPTION],
8712 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8713
8714
8715 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8716 # ---------------------------------------
8717 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8718 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8719 # saved as a flag.
8720 m4_define([_LT_SET_OPTION],
8721 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8722 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8723         _LT_MANGLE_DEFUN([$1], [$2]),
8724     [m4_warning([Unknown $1 option `$2'])])[]dnl
8725 ])
8726
8727
8728 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8729 # ------------------------------------------------------------
8730 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8731 m4_define([_LT_IF_OPTION],
8732 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8733
8734
8735 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8736 # -------------------------------------------------------
8737 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8738 # are set.
8739 m4_define([_LT_UNLESS_OPTIONS],
8740 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8741             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8742                       [m4_define([$0_found])])])[]dnl
8743 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8744 ])[]dnl
8745 ])
8746
8747
8748 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8749 # ----------------------------------------
8750 # OPTION-LIST is a space-separated list of Libtool options associated
8751 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8752 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8753 # the unknown option and exit.
8754 m4_defun([_LT_SET_OPTIONS],
8755 [# Set options
8756 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8757     [_LT_SET_OPTION([$1], _LT_Option)])
8758
8759 m4_if([$1],[LT_INIT],[
8760   dnl
8761   dnl Simply set some default values (i.e off) if boolean options were not
8762   dnl specified:
8763   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8764   ])
8765   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8766   ])
8767   dnl
8768   dnl If no reference was made to various pairs of opposing options, then
8769   dnl we run the default mode handler for the pair.  For example, if neither
8770   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8771   dnl archives by default:
8772   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8773   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8774   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8775   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8776                    [_LT_ENABLE_FAST_INSTALL])
8777   ])
8778 ])# _LT_SET_OPTIONS
8779
8780
8781 ## --------------------------------- ##
8782 ## Macros to handle LT_INIT options. ##
8783 ## --------------------------------- ##
8784
8785 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8786 # -----------------------------------------
8787 m4_define([_LT_MANGLE_DEFUN],
8788 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8789
8790
8791 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8792 # -----------------------------------------------
8793 m4_define([LT_OPTION_DEFINE],
8794 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8795 ])# LT_OPTION_DEFINE
8796
8797
8798 # dlopen
8799 # ------
8800 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8801 ])
8802
8803 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8804 [_LT_SET_OPTION([LT_INIT], [dlopen])
8805 AC_DIAGNOSE([obsolete],
8806 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8807 put the `dlopen' option into LT_INIT's first parameter.])
8808 ])
8809
8810 dnl aclocal-1.4 backwards compatibility:
8811 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8812
8813
8814 # win32-dll
8815 # ---------
8816 # Declare package support for building win32 dll's.
8817 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8818 [enable_win32_dll=yes
8819
8820 case $host in
8821 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8822   AC_CHECK_TOOL(AS, as, false)
8823   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8824   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8825   ;;
8826 esac
8827
8828 test -z "$AS" && AS=as
8829 _LT_DECL([], [AS],      [1], [Assembler program])dnl
8830
8831 test -z "$DLLTOOL" && DLLTOOL=dlltool
8832 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8833
8834 test -z "$OBJDUMP" && OBJDUMP=objdump
8835 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8836 ])# win32-dll
8837
8838 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8839 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8840 _LT_SET_OPTION([LT_INIT], [win32-dll])
8841 AC_DIAGNOSE([obsolete],
8842 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8843 put the `win32-dll' option into LT_INIT's first parameter.])
8844 ])
8845
8846 dnl aclocal-1.4 backwards compatibility:
8847 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8848
8849
8850 # _LT_ENABLE_SHARED([DEFAULT])
8851 # ----------------------------
8852 # implement the --enable-shared flag, and supports the `shared' and
8853 # `disable-shared' LT_INIT options.
8854 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8855 m4_define([_LT_ENABLE_SHARED],
8856 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8857 AC_ARG_ENABLE([shared],
8858     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8859         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8860     [p=${PACKAGE-default}
8861     case $enableval in
8862     yes) enable_shared=yes ;;
8863     no) enable_shared=no ;;
8864     *)
8865       enable_shared=no
8866       # Look at the argument we got.  We use all the common list separators.
8867       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8868       for pkg in $enableval; do
8869         IFS="$lt_save_ifs"
8870         if test "X$pkg" = "X$p"; then
8871           enable_shared=yes
8872         fi
8873       done
8874       IFS="$lt_save_ifs"
8875       ;;
8876     esac],
8877     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8878
8879     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8880         [Whether or not to build shared libraries])
8881 ])# _LT_ENABLE_SHARED
8882
8883 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8884 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8885
8886 # Old names:
8887 AC_DEFUN([AC_ENABLE_SHARED],
8888 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8889 ])
8890
8891 AC_DEFUN([AC_DISABLE_SHARED],
8892 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8893 ])
8894
8895 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8896 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8897
8898 dnl aclocal-1.4 backwards compatibility:
8899 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8900 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8901
8902
8903
8904 # _LT_ENABLE_STATIC([DEFAULT])
8905 # ----------------------------
8906 # implement the --enable-static flag, and support the `static' and
8907 # `disable-static' LT_INIT options.
8908 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8909 m4_define([_LT_ENABLE_STATIC],
8910 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8911 AC_ARG_ENABLE([static],
8912     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8913         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8914     [p=${PACKAGE-default}
8915     case $enableval in
8916     yes) enable_static=yes ;;
8917     no) enable_static=no ;;
8918     *)
8919      enable_static=no
8920       # Look at the argument we got.  We use all the common list separators.
8921       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8922       for pkg in $enableval; do
8923         IFS="$lt_save_ifs"
8924         if test "X$pkg" = "X$p"; then
8925           enable_static=yes
8926         fi
8927       done
8928       IFS="$lt_save_ifs"
8929       ;;
8930     esac],
8931     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8932
8933     _LT_DECL([build_old_libs], [enable_static], [0],
8934         [Whether or not to build static libraries])
8935 ])# _LT_ENABLE_STATIC
8936
8937 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8938 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8939
8940 # Old names:
8941 AC_DEFUN([AC_ENABLE_STATIC],
8942 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8943 ])
8944
8945 AC_DEFUN([AC_DISABLE_STATIC],
8946 [_LT_SET_OPTION([LT_INIT], [disable-static])
8947 ])
8948
8949 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8950 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8951
8952 dnl aclocal-1.4 backwards compatibility:
8953 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8954 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8955
8956
8957
8958 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8959 # ----------------------------------
8960 # implement the --enable-fast-install flag, and support the `fast-install'
8961 # and `disable-fast-install' LT_INIT options.
8962 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8963 m4_define([_LT_ENABLE_FAST_INSTALL],
8964 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8965 AC_ARG_ENABLE([fast-install],
8966     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8967     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8968     [p=${PACKAGE-default}
8969     case $enableval in
8970     yes) enable_fast_install=yes ;;
8971     no) enable_fast_install=no ;;
8972     *)
8973       enable_fast_install=no
8974       # Look at the argument we got.  We use all the common list separators.
8975       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8976       for pkg in $enableval; do
8977         IFS="$lt_save_ifs"
8978         if test "X$pkg" = "X$p"; then
8979           enable_fast_install=yes
8980         fi
8981       done
8982       IFS="$lt_save_ifs"
8983       ;;
8984     esac],
8985     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8986
8987 _LT_DECL([fast_install], [enable_fast_install], [0],
8988          [Whether or not to optimize for fast installation])dnl
8989 ])# _LT_ENABLE_FAST_INSTALL
8990
8991 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8992 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8993
8994 # Old names:
8995 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8996 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8997 AC_DIAGNOSE([obsolete],
8998 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8999 the `fast-install' option into LT_INIT's first parameter.])
9000 ])
9001
9002 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9003 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9004 AC_DIAGNOSE([obsolete],
9005 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9006 the `disable-fast-install' option into LT_INIT's first parameter.])
9007 ])
9008
9009 dnl aclocal-1.4 backwards compatibility:
9010 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9011 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9012
9013
9014 # _LT_WITH_PIC([MODE])
9015 # --------------------
9016 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9017 # LT_INIT options.
9018 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9019 m4_define([_LT_WITH_PIC],
9020 [AC_ARG_WITH([pic],
9021     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9022         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9023     [lt_p=${PACKAGE-default}
9024     case $withval in
9025     yes|no) pic_mode=$withval ;;
9026     *)
9027       pic_mode=default
9028       # Look at the argument we got.  We use all the common list separators.
9029       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9030       for lt_pkg in $withval; do
9031         IFS="$lt_save_ifs"
9032         if test "X$lt_pkg" = "X$lt_p"; then
9033           pic_mode=yes
9034         fi
9035       done
9036       IFS="$lt_save_ifs"
9037       ;;
9038     esac],
9039     [pic_mode=default])
9040
9041 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9042
9043 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9044 ])# _LT_WITH_PIC
9045
9046 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9047 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9048
9049 # Old name:
9050 AU_DEFUN([AC_LIBTOOL_PICMODE],
9051 [_LT_SET_OPTION([LT_INIT], [pic-only])
9052 AC_DIAGNOSE([obsolete],
9053 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9054 put the `pic-only' option into LT_INIT's first parameter.])
9055 ])
9056
9057 dnl aclocal-1.4 backwards compatibility:
9058 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9059
9060 ## ----------------- ##
9061 ## LTDL_INIT Options ##
9062 ## ----------------- ##
9063
9064 m4_define([_LTDL_MODE], [])
9065 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9066                  [m4_define([_LTDL_MODE], [nonrecursive])])
9067 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9068                  [m4_define([_LTDL_MODE], [recursive])])
9069 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9070                  [m4_define([_LTDL_MODE], [subproject])])
9071
9072 m4_define([_LTDL_TYPE], [])
9073 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9074                  [m4_define([_LTDL_TYPE], [installable])])
9075 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9076                  [m4_define([_LTDL_TYPE], [convenience])])
9077 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9078 #
9079 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9080 # Written by Gary V. Vaughan, 2004
9081 #
9082 # This file is free software; the Free Software Foundation gives
9083 # unlimited permission to copy and/or distribute it, with or without
9084 # modifications, as long as this notice is preserved.
9085
9086 # serial 6 ltsugar.m4
9087
9088 # This is to help aclocal find these macros, as it can't see m4_define.
9089 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9090
9091
9092 # lt_join(SEP, ARG1, [ARG2...])
9093 # -----------------------------
9094 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9095 # associated separator.
9096 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9097 # versions in m4sugar had bugs.
9098 m4_define([lt_join],
9099 [m4_if([$#], [1], [],
9100        [$#], [2], [[$2]],
9101        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9102 m4_define([_lt_join],
9103 [m4_if([$#$2], [2], [],
9104        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9105
9106
9107 # lt_car(LIST)
9108 # lt_cdr(LIST)
9109 # ------------
9110 # Manipulate m4 lists.
9111 # These macros are necessary as long as will still need to support
9112 # Autoconf-2.59 which quotes differently.
9113 m4_define([lt_car], [[$1]])
9114 m4_define([lt_cdr],
9115 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9116        [$#], 1, [],
9117        [m4_dquote(m4_shift($@))])])
9118 m4_define([lt_unquote], $1)
9119
9120
9121 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9122 # ------------------------------------------
9123 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9124 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9125 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9126 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9127 # than defined and empty).
9128 #
9129 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9130 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9131 m4_define([lt_append],
9132 [m4_define([$1],
9133            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9134
9135
9136
9137 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9138 # ----------------------------------------------------------
9139 # Produce a SEP delimited list of all paired combinations of elements of
9140 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9141 # has the form PREFIXmINFIXSUFFIXn.
9142 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9143 m4_define([lt_combine],
9144 [m4_if(m4_eval([$# > 3]), [1],
9145        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9146 [[m4_foreach([_Lt_prefix], [$2],
9147              [m4_foreach([_Lt_suffix],
9148                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9149         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9150
9151
9152 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9153 # -----------------------------------------------------------------------
9154 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9155 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9156 m4_define([lt_if_append_uniq],
9157 [m4_ifdef([$1],
9158           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9159                  [lt_append([$1], [$2], [$3])$4],
9160                  [$5])],
9161           [lt_append([$1], [$2], [$3])$4])])
9162
9163
9164 # lt_dict_add(DICT, KEY, VALUE)
9165 # -----------------------------
9166 m4_define([lt_dict_add],
9167 [m4_define([$1($2)], [$3])])
9168
9169
9170 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9171 # --------------------------------------------
9172 m4_define([lt_dict_add_subkey],
9173 [m4_define([$1($2:$3)], [$4])])
9174
9175
9176 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9177 # ----------------------------------
9178 m4_define([lt_dict_fetch],
9179 [m4_ifval([$3],
9180         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9181     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9182
9183
9184 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9185 # -----------------------------------------------------------------
9186 m4_define([lt_if_dict_fetch],
9187 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9188         [$5],
9189     [$6])])
9190
9191
9192 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9193 # --------------------------------------------------------------
9194 m4_define([lt_dict_filter],
9195 [m4_if([$5], [], [],
9196   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9197            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9198                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9199 ])
9200 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9201 #
9202 #   Copyright (C) 2004 Free Software Foundation, Inc.
9203 #   Written by Scott James Remnant, 2004
9204 #
9205 # This file is free software; the Free Software Foundation gives
9206 # unlimited permission to copy and/or distribute it, with or without
9207 # modifications, as long as this notice is preserved.
9208
9209 # @configure_input@
9210
9211 # serial 3337 ltversion.m4
9212 # This file is part of GNU Libtool
9213
9214 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9215 m4_define([LT_PACKAGE_REVISION], [1.3337])
9216
9217 AC_DEFUN([LTVERSION_VERSION],
9218 [macro_version='2.4.2'
9219 macro_revision='1.3337'
9220 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9221 _LT_DECL(, macro_revision, 0)
9222 ])
9223 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9224 #
9225 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9226 #   Written by Scott James Remnant, 2004.
9227 #
9228 # This file is free software; the Free Software Foundation gives
9229 # unlimited permission to copy and/or distribute it, with or without
9230 # modifications, as long as this notice is preserved.
9231
9232 # serial 5 lt~obsolete.m4
9233
9234 # These exist entirely to fool aclocal when bootstrapping libtool.
9235 #
9236 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9237 # which have later been changed to m4_define as they aren't part of the
9238 # exported API, or moved to Autoconf or Automake where they belong.
9239 #
9240 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9241 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9242 # using a macro with the same name in our local m4/libtool.m4 it'll
9243 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9244 # and doesn't know about Autoconf macros at all.)
9245 #
9246 # So we provide this file, which has a silly filename so it's always
9247 # included after everything else.  This provides aclocal with the
9248 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9249 # because those macros already exist, or will be overwritten later.
9250 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9251 #
9252 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9253 # Yes, that means every name once taken will need to remain here until
9254 # we give up compatibility with versions before 1.7, at which point
9255 # we need to keep only those names which we still refer to.
9256
9257 # This is to help aclocal find these macros, as it can't see m4_define.
9258 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9259
9260 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9261 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9262 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9263 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9264 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9265 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9266 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9267 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9268 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9269 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9270 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9271 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9272 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9273 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9274 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9275 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9276 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9277 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9278 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9279 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9280 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9281 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9282 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9283 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9284 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9285 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9286 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9287 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9288 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9289 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9290 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9291 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9292 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9293 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9294 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9295 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9296 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9297 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9298 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9299 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9300 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9301 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9302 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9303 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9304 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9305 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9306 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9307 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9308 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9309 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9310 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9311 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9312 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9313 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9314 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9315 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9316 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9317 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9318 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9319 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9320 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])