A freeze group can now be allowed to move rigidly in some dimension by using "freezed...
[gromacs/rigid-bodies.git] / acinclude.m4
blobf54eb9726c8da338601d26a306b3b91721a4da9d
2 # AC_FUNC_FSEEKO is horribly broken in autoconf 2.61 and can
3 # cause silent corruption with largefiles. It is fixed in 2.62, but to
4 # prevent stupid mistakes we use our own version taken from the 2.63 tree.
7 # ACX_FUNC_FSEEKO_FIXED
8 # --------------
9 AN_FUNCTION([ftello], [ACX_FUNC_FSEEKO_FIXED])
10 AN_FUNCTION([fseeko], [ACX_FUNC_FSEEKO_FIXED])
11 AC_DEFUN([ACX_FUNC_FSEEKO_FIXED],
12 [_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
13    [ac_cv_sys_largefile_source],
14    [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).],
15    [[#include <sys/types.h> /* for off_t */
16      #include <stdio.h>]],
17    [[int (*fp) (FILE *, off_t, int) = fseeko;
18      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]])
20 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
21 # in glibc 2.1.3, but that breaks too many other things.
22 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
24 if test $ac_cv_sys_largefile_source != unknown; then
25   AC_DEFINE(HAVE_FSEEKO, 1,
26     [Define to 1 if fseeko (and presumably ftello) exists and is declared.])
28 ])# ACX_FUNC_FSEEKO_FIXED
31 # ACX_CHECK_FFTW2()
32 # ----------------
33 # This macro checks for fftw-2.x header files and libraries,
34 # including the possible prefixing with s or d to determine precision.
35 # Arg 1 is the fftw header/library name to check for, without
36 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
37 # Arg 2 is the size of the real variable used.
38 AC_DEFUN([ACX_CHECK_FFTW2],
40 if test -z "$ac_fftw_firstname"; then
42 sizeof_real=$2
43 if test $sizeof_real = 8; then
44   prec="double"
45   fftwcheckprefix=d
46 else
47   prec="single"
48   fftwcheckprefix=s
51 xfftwname=${fftwcheckprefix}$1
53 ok="no"
54 # check header doesn't work, since we must use mpicc to get includes,
55 # we cant trust cpp.
56 AC_MSG_CHECKING([for $xfftwname.h])
57 AC_TRY_COMPILE([#include <$xfftwname.h>],,
59 fftwname=$xfftwname
60 AC_MSG_RESULT(yes)
62 AC_MSG_RESULT(no))
64 # fftwname was set if we found a header
66 if test -n "$fftwname"; then
67 # we cannot run the code since an MPI program might not be allowed
68 # on a login node of a supercomputer
69 AC_TRY_COMPILE([#include <$fftwname.h>],
70 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
72 ok=yes
73 usedprefix=$fftwcheckprefix
74 ],[ok=no])
77 if test "$ok" != "yes"; then
78   AC_MSG_CHECKING([for $1.h])
79   AC_TRY_COMPILE([#include <$1.h>],,AC_MSG_RESULT(yes),
81 AC_MSG_RESULT(no)
82 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
83 [Do you have $prec precision FFTW-2.x installed? If you are using packages,]
84 [note that you also need fftw-devel to compile GROMACS. You can find the ]
85 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
86 [If you compiled FFTW-2.x yourself:                                    ]
87 [Note that the default FFTW-2.x setup is double precision. Change the FFTW]
88 [configuration to single with --enable-float. If you want MPI support,]
89 [use --enable-mpi. It is a good idea to install both single & double.]
90 [If your sysadm doesn't want to install it you can do it to a location]
91 [in your home directory and provide the correct paths in the CPPFLAGS]
92 [and LDFLAGS environment variables before running configure.]
93 [That is also necessary to do if your compiler doesn't search]
94 [/usr/local/include and /usr/local/lib by default.]
95 [You can find information at www.gromacs.org, or in the INSTALL file.])
97 AC_TRY_COMPILE([#include <$1.h>],
98 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
100 usedprefix=""
101 fftwname=$1
104 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
105 [Do you have $prec precision FFTW-2.x installed? If you are using packages,]
106 [note that you also need fftw-devel to compile GROMACS. You can find the ]
107 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
108 [If you compiled FFTW-2.x yourself:                                   ]
109 [Note that the default FFTW-2.x setup is double precision. Change the FFTW]
110 [configuration to single with --enable-float. If you want MPI support,]
111 [use --enable-mpi. It is a good idea to install both single & double.]
112 [If your sysadm doesn't want to install it you can do it to a location]
113 [in your home directory and provide the correct paths in the CPPFLAGS]
114 [and LDFLAGS environment variables before running configure.]
115 [That is also necessary to do if your compiler doesn't search]
116 [/usr/local/include and /usr/local/lib by default.]
117 [You can find information at www.gromacs.org, or in the INSTALL file.])])
120 AC_CHECK_LIB($fftwname,main,,
121 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
122 ac_fftw_savedprefix=$usedprefix
123 ac_fftw_firstname=$fftwname
125 else
127 fftwname=${ac_fftw_savedprefix}$1
128 AC_MSG_CHECKING([for $fftwname.h])
129 AC_TRY_COMPILE(
130 [#include <$fftwname.h>],,
131 [AC_MSG_RESULT(yes)
132 LIBS="-l$fftwname $LIBS"
133 AC_TRY_LINK_FUNC([main],,,
134 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
136 AC_MSG_RESULT(no)
137 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your
138 fftw prefixes match - we already use $ac_fftw_firstname.h])
150 dnl Check for floating-point format and double precision word order.
151 dnl We dont require IEEE, but there are optimizations we can only do with it.
152 dnl Just as for integers, the bytes in a word can be small of big endian.
153 dnl There is already a standard autoconf macro (AC_C_BIGENDIAN) that you 
154 dnl should use to check this for integers - I have never heard of a machine
155 dnl where it is not the same for integer and fp variables, but we still check
156 dnl it separately for fp variables here to be sure.
158 dnl However, in double precision there are also two ways to arrange the words
159 dnl forming a double (8-byte=2-word) variable.
160 dnl Normally this order is the same as the endian, but there are 
161 dnl exceptions (e.g. ARM)
162 dnl We detect it by compiling a small test program and grepping into it.
164 AC_DEFUN([ACX_FLOAT_FORMAT],
165 [AC_CACHE_CHECK(floating-point format, acx_float_format,
166 [cat >conftest.$ac_ext <<EOF
167 [/* Check that a double is 8 bytes - die if it isnt */
168 extern char xyz [sizeof(double) == 8 ? 1 : -1];
169 double abc [] = {
170   /* "GROMACSX" in ascii    */
171   (double)  3.80279098314984902657e+35 , 
172   /* "GROMACSX" in ebcdic   */
173   (double) -1.37384666579378297437e+38 , 
174   /* "D__float" (vax)       */
175   (double)  3.53802595280598432000e+18 , 
176   /* "IBMHEXFP" s390/ascii  */
177   (double)  1.77977764695171661377e+10 , 
178   /* "IBMHEXFP" s390/ebcdic */
179   (double) -5.22995989424860458374e+10 };
182 if AC_TRY_EVAL(ac_compile); then
183 # dont match first and last letter because of rounding errors.
184 # next: big-endian - string is GROMACSX 
185   if   grep 'ROMACS' conftest.o >/dev/null 2>&1; then
186     acx_float_format='IEEE754 (big-endian byte and word order)'
187 # next: big-endian byte order, but little-endian word order - ACSXGROM
188   elif grep 'CSXGRO' conftest.o >/dev/null 2>&1; then
189     acx_float_format='IEEE754 (big-endian byte, little-endian word order)'
190 # next: little-endian - XSCAMORG
191   elif grep 'SCAMOR' conftest.o >/dev/null 2>&1; then
192     acx_float_format='IEEE754 (little-endian byte and word order)'
193 # next: little-endian byte order, but big-endian word order - MORGXSCA
194   elif grep 'ORGXSC' conftest.o >/dev/null 2>&1; then
195     acx_float_format='IEEE754 (litte-endian byte, little-endian word order)'
196   elif grep '__floa' conftest.o >/dev/null 2>&1; then
197     acx_float_format='VAX D-float'
198   elif grep 'BMHEXF' conftest.o >/dev/null 2>&1; then
199     acx_float_format='IBM 370 hex'
200   else
201     AC_MSG_WARN([Unknown floating-point format])
202   fi
203 else
204   AC_MSG_ERROR(compile failed)
206 rm -rf conftest*])
207 case $acx_float_format in
208     'IEEE754 (big-endian byte and word order)' )
209        format=IEEE754
210        byteorder=big
211        wordorder=big            
212        ;;
213     'IEEE754 (little-endian byte and word order)' )
214        format=IEEE754
215        byteorder=little
216        wordorder=little
217        ;;
218     'IEEE754 (big-endian byte, little-endian word order)' )
219        format=IEEE754
220        byteorder=big
221        wordorder=little
222        ;;
223     'IEEE754 (litte-endian byte, big-endian word order)' )
224        format=IEEE754
225        byteorder=little
226        wordorder=big            
227        ;;
228     'VAX D-float' )
229        AC_DEFINE(FLOAT_FORMAT_VAX,,[VAX floating-point format if set])
230        ;;
231     'IBM 370 hex' )
232        AC_DEFINE(FLOAT_FORMAT_IBM_HEX,,[IBM HEX floating-point format if set (s390?)])
233        ;;   
234      * )
235        format=Unknown   
236        ;;
237 esac
238 if test "$format" = "IEEE754"; then
239        AC_DEFINE(FLOAT_FORMAT_IEEE754,,[IEEE754 floating-point format. Memory layout is defined by
240 macros IEEE754_BIG_ENDIAN_BYTE_ORDER and IEEE754_BIG_ENDIAN_WORD_ORDER.])
242 if test "$byteorder" = "big"; then
243   AC_DEFINE(IEEE754_BIG_ENDIAN_BYTE_ORDER,,[Bytes in IEEE fp word are in big-endian order if set,
244  little-endian if not. Only relevant when FLOAT_FORMAT_IEEE754 is defined.])
246 if test "$wordorder" = "big"; then
247   AC_DEFINE(IEEE754_BIG_ENDIAN_WORD_ORDER,,[The two words in a double precision variable are in b
248 ig-endian order if set, little-endian if not. Do NOT assume this is the same as the byte order! 
249 Only relevant when FLOAT_FORMAT_IEEE754 is defined.])
254 dnl macro modified from the fftw distribution (www.fftw.org)
255 AC_DEFUN([ACX_CHECK_CC_FLAGS],
257 AC_REQUIRE([AC_PROG_CC])
258 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
259 [echo 'void f(){}' > conftest.c
260 res=`$CC $1 -c conftest.c 2>&1`
262 # The stupid intel compiler echos the filename on stderr...
264 if test -z "$res" -o "$res" = "conftest.c:"; then
265         ac_$2=yes
266 else
267         ac_$2=no
269 rm -rf conftest*
271 if test "$ac_$2" = yes; then
272         :
273         $3
274 else
275         :
276         $4
280 dnl macro modified from the fftw distribution (www.fftw.org)
281 AC_DEFUN([ACX_CHECK_F77_FLAGS],
283 AC_REQUIRE([AC_PROG_F77])
284 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
285 [cat > conftest.f << EOF
286       subroutine f
287       return 
288       end
290 if test -z "`$F77 $1 -c conftest.f `"; then
291         ac_$2=yes
292 else
293         ac_$2=no
295 rm -rf conftest*
297 if test "$ac_$2" = yes; then
298         :
299         $3
300 else
301         :
302         $4
307 # ACX_DETECT_GMXCPU
308 # ---------------------------
309 # Macro to extend the exact CPU for some hosts
310 AC_DEFUN([ACX_DETECT_GMXCPU],
312 AC_REQUIRE([AC_CANONICAL_HOST])
315 # Determine the exact cpu type on some common systems where it is 
316 # not visible from the host triplet.
317 # (on e.g. intel and dec/tru64 the host type is enough)
319 gmxcpu="";
321 case "${host_cpu}-${host_os}" in
323 *-aix*)
324   # some versions of config.status says these systems are PowerPC even
325   # when they have Power3 CPUs (they used to be recognized as rs6000), 
326   # so we need to work around that.
327   # 
328   # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
329   if test -f /usr/sbin/lsdev && test -f /usr/sbin/lsattr; then
330     IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
331     if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER5 >/dev/null 2>&1; then
332       gmxcpu=power5
333     elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
334       gmxcpu=power4
335     elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
336       gmxcpu=power3
337     elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
338       gmxcpu=power2
339     fi
340   fi
341   if test -z "${gmxcpu}" && test -f /usr/sbin/lscfg; then
342     if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
343       gmxcpu=ppc604
344     elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
345       gmxcpu=ppc603
346     elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
347       gmxcpu=rs64a
348     elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
349       gmxcpu=rs64b
350     elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
351       gmxcpu=rs64c
352     elif /usr/sbin/lscfg -vp | grep POWER2 >/dev/null 2>&1; then
353       gmxcpu=power2
354     elif /usr/sbin/lscfg -vp | grep POWER3 >/dev/null 2>&1; then
355       gmxcpu=power3
356     elif /usr/sbin/lscfg -vp | grep POWER4 >/dev/null 2>&1; then
357       gmxcpu=power4
358     fi
359   fi
360   ;;
362 mips*-irix*)
363   if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
364     gmxcpu=r12000
365   elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
366     gmxcpu=r10000
367   elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
368     gmxcpu=r8000
369   elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
370     gmxcpu=r5000
371   else
372     gmxcpu=""
373   fi
374   ;;
376 sparc*-solaris*)
377   if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
378     gmxcpu=ultrasparc3
379   elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
380     gmxcpu=ultrasparc2i
381   elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
382     gmxcpu=ultrasparc2
383   elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
384     gmxcpu=ultrasparc
385   else
386     gmxcpu=""
387   fi
388   ;;
390   gmxcpu=""
391   ;;
393 esac
398 ###############################################################
399 # Macro modified from the fftw distribution (www.fftw.org)
400 # to determine optimization flags.
401 # Note that we have modified config.guess and config.sub
402 # to provide extended information on the detailed type of CPU.
403 # In general we assume you have recent versions of the compilers
404 # that support the highest optimization we know of. If not, you 
405 # can always override these flags, but it's better to upgrade :-)
406 ###############################################################
407 AC_DEFUN([ACX_COMPILER_MAXOPT],
409 AC_REQUIRE([AC_PROG_CC])
410 AC_REQUIRE([AC_PROG_F77])
411 AC_REQUIRE([AC_CANONICAL_HOST])
413 # Try to determine "good" native compiler flags if none specified on command
414 # line. To avoid repeating the entire procedure for fortran flags, we first
415 # determine our suggested choices for both C and fortran, and then possibly
416 # override them with user choices.
418 cc_vendor="unknown"
420 case "${host_cpu}-${host_os}" in
422   *-solaris2*) 
423     case "${gmxcpu}" in
424       ultrasparc3*)
425         xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
426         xFFLAGS=$xCFLAGS
427         ;;
428       ultrasparc2i*)
429         xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
430         xFFLAGS=$xCFLAGS
431         ;;
432       ultrasparc2*)
433         xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
434         xFFLAGS=$xCFLAGS
435         ;;
436       ultrasparc*)
437         xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
438         xFFLAGS=$xCFLAGS
439         ;;
440       *)
441         xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
442         xFFLAGS=$xCFLAGS
443         ;;
444     esac
445     ;;
447   *-hpux*)  
448     xCFLAGS="-Ae +O3 +Oall"
449     xFFLAGS=$xCFLAGS
450     # If you haven't noticed, we don't like hp very much...
451     # but perhaps that will change if they make something nice out of ia64.
452     ;;
454   ia64*-*)
455     # The GNU compilers are checked outside this case statement.
456     # Check for Intel Compilers. The SGI one was killed before
457     # it went final, so I cant imagine anyone is using it...
459     # Apparently, -O2 is better than -O3 for villin at least,
460     # but I have not yet had time to test all the other benchmarks
461     # on both optimization levels. Might need further tweaking.
463     # The Intel compilers are _really_ chatty when it comes to
464     # warnings, and also echo a lot of incomprehensible internal
465     # stuff (not gromacs-related) when we are using ia64 assembly.
466     # For this reason we disable warnings...
468    if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
469      xCFLAGS="-O3 -w"
470      xASFLAGS=$xCFLAGS
471      ac_cv_prog_gcc="no"        
472    fi  
473    if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
474      xFFLAGS="-O3 -w90 -w95 -w"
475      ac_cv_prog_g77="no"
476    fi  
477    # PORTME 2. Check for intel compilers when we get our hands on one!
478    ;;   
479   *-aix*)
480     # dont use inter-procedure analysis for the innerloops - they take
481     # forever to compile with it, and it doesnt help at all.
483     # use 8 segments (max 2Gb) instead of 1 (max 256Meg) by default.
484     xLDFLAGS="$xLDFLAGS -bmaxdata:0x80000000"
485     case "${gmxcpu}" in
486       power6*)
487         xCFLAGS="-O3 -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qstrict -qaltivec -qenablevmx -qvecnvol"
488         xFFLAGS="-O3 -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qhot -qstrict -qaltivec -qenablevmx -qvecnvol"
489         ;;
490       power5*)
491         xCFLAGS="-O3 -qarch=pwr5 -qtune=pwr5 -qmaxmem=16384"
492         xFFLAGS="-O3 -Q -qarch=pwr5 -qtune=pwr5 -qmaxmem=16384 -qhot -qnoipa"
493         ;;
494       power4*)
495         xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
496         xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
497         ;;
498       power3*)
499         xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
500         xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
501         ;;
502       power2*)
503         xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
504         xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
505         ;;
506       power)
507         xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
508         xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
509         ;;
510       ppc604)
511         xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
512         xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
513         ;;
514       ppc603)
515         xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
516         xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
517         ;;
518       rs64a)
519         xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
520         xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
521         ;;
522       rs64b)
523         xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
524         xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
525         ;;
526       rs64c)
527         xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
528         xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
529         ;;
530       *)
531         xCFLAGS="-O3 -qmaxmem=16384"
532         xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
533         ;;
534     esac
535     ;;
537   powerpc*-darwin* | powerpc*-linux* )
538     # Check for IBM compilers on OS X     
539     if $CC 2>&1 | grep 'IBM' > /dev/null 2>&1; then
540        xCFLAGS="-O4 -Q=500 -qaltivec -qnoipa"
541     fi
542     if $F77 -V 2>&1 | grep 'IBM' > /dev/null 2>&1; then
543       xFFLAGS="-O4 -Q=500 -qnoipa"
544     fi
545     ;;
547   mips*-irix*)
548     xCFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -woff 1174 -D__INLINE_INTRINSICS"
549     xFFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -OPT:cray_ivdep=TRUE"
550     
551     if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
552       xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
553       xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
554     fi
556     if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
557       xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms" 
558       xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms" 
559     fi
560     xLDFLAGS="-woff 84"
562     # I have removed -n32 from the flags since it causes too many problems.
563     # New SGIs should use the right objects automatically, and it's not
564     # worth the hassle for 5-10 year old machines...  
566     case "${gmxcpu}" in
567       r12000*)
568         xCFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xCFLAGS"
569         xFFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xFFLAGS"
570         xLDFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xLDFLAGS"
571         ;;
572       r10000*)
573         xCFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xCFLAGS"
574         xFFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xFFLAGS"
575         xLDFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xLDFLAGS"
576         ;;
577       r8000*)
578         xCFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xCFLAGS"
579         xFFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xFFLAGS"
580         xLDFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xLDFLAGS"
581         ;;
582       r5000*)
583         xCFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xCFLAGS"
584         xFFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xFFLAGS"
585         xLDFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xLDFLAGS"
586         ;;
587       *)                
588         xCFLAGS="$IRIXOBJFLAG $xCFLAGS"
589         xFFLAGS="$IRIXOBJFLAG $xFFLAGS"
590         xLDFLAGS="$IRIXOBJFLAG $xLDFLAGS"
591         ;;
592     esac
593     ;;
595   alpha*-osf*) 
596      # NB: -arch implies -tune according to the cc manual.
597      # We dont use -ifo since it conflicts with dependency
598      # generation on old versions of the compiler.
599     case "${host_cpu}" in
600       alphaev*)
601         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
602         evtype=`echo ${host_cpu} | sed 's/alpha//'`
603         xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
604         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
605         xASFLAGS="-O4 -no_ifo -arch $evtype"
606         xLDFLAGS="-O4"
607         ;;
608       *)
609         xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
610         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
611         xASFLAGS="-O4 -no_ifo -arch host"
612         xLDFLAGS="-O4"
613         ;;
614     esac
615     ;;
617   alpha*-linux*)
618     case "${host_cpu}" in
619       alphaev*)
620         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
621         evtype=`echo ${host_cpu} | sed 's/alpha//'`
622         tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
623         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
624         tmpASFLAGS="-O4 -no_ifo -arch $evtype"
625         tmpLDFLAGS="-O4"
626         ;;
627       *)
628         tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
629         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
630         tmpASFLAGS="-O4 -no_ifo -arch host"
631         tmpLDFLAGS="-O4"
632         ;;
633     esac
634         # Compaq sometimes uses -version and sometimes -V
635         # Not 100% sure if ccc always has -V and F77 -version, so 
636         # we check both alternatives to be sure.
637     if (($CC -V 2>&1 | grep ompaq > /dev/null) || 
638         ($CC -version 2>&1 | grep ompaq > /dev/null)); then
639       xCFLAGS="$tmpCFLAGS"
640       xASFLAGS="$tmpASFLAGS"
641       cc_vendor="Compaq"
642     fi
643     if test "$enable_fortran" = "yes"; then
644       if (($F77 -V 2>&1 | grep ompaq > /dev/null) || 
645           ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
646         xFFLAGS="$tmpFFLAGS"
647       fi
648     fi
649     ;;
651   *-*)
652     # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
653     # further down, but check for some specific compilers.
654     # Portland group compilers:
655     if $CC -V 2>  /dev/null | grep ortland > /dev/null 2>&1; then
656       case "${host_cpu}" in
657         i586)
658           pgiopt="-tp p5" 
659           ;;
660         i686)
661           pgiopt="-tp p6" 
662           ;;
663       esac
664       xCFLAGS="$pgiopt -fast -pc 32"
665       xASFLAGS="$xCFLAGS"
666     fi
667     if test "$enable_fortran" = "yes"; then
668       if $F77 -version 2>  /dev/null | grep Portland > /dev/null 2>&1; then
669         xFFLAGS="$xCFLAGS"
670       fi        
671     fi
673     # Intel compilers
674     # The Intel compilers are _really_ chatty when it comes to
675     # warnings, and also echo a lot of incomprehensible internal
676     # stuff (not gromacs-related) when we are using assembly.
677     # For this reason we disable warnings...
679     if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
680       ac_cv_prog_gcc="no"       
681       case "${host_cpu}" in
682         x86_64)
683           xCFLAGS="-O3 -tpp7 -axW -ip -w"
684           ;;
685         i686)
686           xCFLAGS="-O3 -tpp6 -axK -ip -w" 
687           ;;
688         ia64)
689           xCFLAGS="-O3 -ip -w" 
690           ;;
691       esac
692       xASFLAGS="$xCFLAGS"
693       # search in /usr/local/include too, just as gcc does. (handy for fftw)
694       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
695     fi
696     if test "$enable_fortran" = "yes"; then
697       if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
698         ac_cv_prog_g77="no"
699         xFFLAGS="$xCFLAGS -w90 -w95"
700       fi        
701     fi
702         
703     ;;
704 esac    
705 # Phew, end of all those operating systems and processors!                      
707 # use default flags for gcc/g77 on all systems
708 if test $ac_cv_prog_gcc = yes; then
709   ACX_CHECK_CC_FLAGS(-O3,o3,xCFLAGS="$xCFLAGS -O3")
710   xCFLAGS="$xCFLAGS -fomit-frame-pointer -finline-functions -Wall -Wno-unused"
711   # For alpha axp assembly we need the preprocessor to tell elf from ecoff.
712   # The compaq ccc compiler only knows .s files, and always runs them
713   # through cpp. We support this by telling gcc to preprocess .s files.
714   case "${host_cpu}" in
715     alphaev*)
716       xASFLAGS="$xCFLAGS -x assembler-with-cpp"
717       ;;
718     *)
719       ;;
720   esac
722   
723 if test $enable_fortran = yes; then
724   if test $ac_cv_prog_g77 = yes; then
725     xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
726     # -malign-double for f77 on x86 systems - haven't checked that this works yet.
727     #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
728   fi
731 CPU_FLAGS=""
733 if test "$GCC" = "yes"; then
734   # try to guess correct CPU flags, at least for powerpc linux
735   case "${host_cpu}" in
736     # i586/i686 cpu flags don't improve speed, thus no need to use them.
737     # don't check f77 separately - we assume f77 and gcc are similar      
738     powerpc*)
739         # don't use the separate apple cpp on OS X
740 #        ACX_CHECK_CC_FLAGS(-no-cpp-precomp,no_cpp_precomp,xCFLAGS="$xCFLAGS -no-cpp-precomp")
741         if test "$enable_ppc_altivec" = "yes"; then
742             # Apple (darwin) uses a hacked version of gcc with special flags 
743             case "${host_os}" in
744             darwin*)                            
745                 ACX_CHECK_CC_FLAGS(-faltivec,faltivec,xCFLAGS="$xCFLAGS -faltivec")
746                 ;;
747             *)
748                 # Need to update CPPFLAGS too, since we later call 
749                 # AC_CHECK_HEADER for altivec.h, and then autoconf complains
750                 # if it cannot process it with the preprocessor.
751                 ACX_CHECK_CC_FLAGS(-maltivec,maltivec,xCFLAGS="$xCFLAGS -maltivec" CPPFLAGS="$CPPFLAGS -maltivec")
752                 ACX_CHECK_CC_FLAGS(-mabi=altivec,mabialtivec,xCFLAGS="$xCFLAGS -mabi=altivec" CPPFLAGS="$CPPFLAGS -mabi=altivec")
753                 ;;
754             esac 
755         fi
756         # -funroll-all-loops exposes a bug in altivec-enabled gcc-2.95.3
757         # on powerpc, so we only enable it on other platforms or gcc3.    
758         # The gcc 2.95 instruction scheduler also destroys our handcoded altivec,
759         # so disable instruction scheduling on 2.95
760         if $CC --version 2>&1 | grep '2.95' > /dev/null 2>&1; then
761           echo "*****************************************************************************"
762           echo "* IMPORTANT INFO: You are using gcc-2.95.x on PowerPC. This compiler works, *"
763           echo "* but you will get better performance with gcc-3.3 or later. If you are     *"
764           echo "* running OS X, download the latest devtools from http://developer.apple.com*"
765           echo "*****************************************************************************"
766           ACX_CHECK_CC_FLAGS(-fno-schedule-insns,fno_schedule_insns,xCFLAGS="$xCFLAGS -fno-schedule-insns")
767         fi
768         ACX_CHECK_CC_FLAGS(-mcpu=7450,m_cpu_7450,CPU_FLAGS="-mcpu=7450")
769         ACX_CHECK_CC_FLAGS(-mtune=970,m_tune_970,CPU_FLAGS="$CPU_FLAGS -mtune=970")
770         if test -z "$CPU_FLAGS"; then
771           ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS="-mcpu=powerpc")
772         fi      
773       ;;
774    x86_64 | i?86)
775         ACX_CHECK_CC_FLAGS(-msse2,msse2,xCFLAGS="$xCFLAGS -msse2")
776       ;;
777    esac
778    ACX_CHECK_CC_FLAGS(-funroll-all-loops,funroll_all_loops,xCFLAGS="$xCFLAGS -funroll-all-loops")
779    ACX_CHECK_CC_FLAGS(-std=gnu99,stdgnu99,xCFLAGS="$xCFLAGS -std=gnu99")
780    # C99 requires strict IEEE 754 floating point compliance. Since gcc>=4.5.0 
781    # this is on when asking for c99, potentially impacting floating point 
782    # performance, so we turn it off here.
783    ACX_CHECK_CC_FLAGS(-fexcess-precision=fast, fexcess_precision_fast, 
784                       xCFLAGS="$xCFLAGS -fexcess-precision=fast")
787 if test "$enable_debug" = "yes"; then
788   xCFLAGS="$xCFLAGS -g"
791 if test -n "$CPU_FLAGS"; then
792   xCFLAGS="$xCFLAGS $CPU_FLAGS"
793   xFFLAGS="$xFFLAGS $CPU_FLAGS"
794   xASFLAGS="$xASFLAGS $CPU_FLAGS"
797 # Now check if the user provided anything special for C or fortran...
798 # Not nice to have checked everything then, but otherwise we would have
799 # to use entirely separate checks for C and fortran flags, doubling the code.
800 if test "$ac_test_CFLAGS" != "set"; then
801   CFLAGS="$xCFLAGS"
802   # Use the extra link optimization flags on e.g. irix only when
803   # we are using our own C compiler flags
804   LDFLAGS="$LDFLAGS $xLDFLAGS"
805   
806   if test -z "$CFLAGS"; then
807     echo "********************************************************************"
808     echo "* Note: We have not optimized the C compiler flags on your target  *"
809     echo "* yet, but the default CFLAGS=-O3 should be OK in most cases.      *"
810     echo "* You can override this by setting the CFLAGS environment variable.*"
811     echo "*******************************************************************"
812     CFLAGS="-O3"
813   fi
814   ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
815     echo "*******************************************************************"
816     echo "* Sorry, these optimization settings don't seem to work for       *"
817     echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
818     echo "*******************************************************************"
819     CFLAGS=""
820   ])
821 else
822   echo "******************************************"
823   echo "* Using CFLAGS from environment variable *"
824   echo "******************************************"
827 if test "$enable_fortran" = "yes"; then 
828   if test "$ac_test_FFLAGS" != "set"; then
829     FFLAGS="$xFFLAGS"
830     if test -z "$FFLAGS"; then
831     echo "********************************************************************"
832     echo "* Note: We have not optimized the Fortran compiler flags on your   *"
833     echo "* target, but the default FFLAGS=-O3 should be OK in most cases.   *"
834     echo "* You can override this by setting the CFLAGS environment variable.*"
835     echo "********************************************************************"
836       FFLAGS="-O3"
837     fi
838     ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
839       echo "*******************************************************************"
840       echo "* Sorry, these optimization settings don't seem to work for       *"
841       echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
842       echo "*******************************************************************"
843       FFLAGS=""
844     ])
845   else
846     echo "******************************************"
847     echo "* Using FFLAGS from environment variable *"
848     echo "******************************************"
849   fi
851 # Be silent for assembly flags, they are usually not important anyway
852 if test "${ASFLAGS+set}" != set; then
853   if test "${xASFLAGS+set}" != set; then
854     xASFLAGS="$CFLAGS"
855   fi
856   ASFLAGS="$xASFLAGS"
862 dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
864 dnl This macro figures out how to build C programs using POSIX
865 dnl threads. It sets the PTHREAD_LIBS output variable to the threads
866 dnl library and linker flags, and the PTHREAD_CFLAGS output variable
867 dnl to any special C compiler flags that are needed. (The user can also
868 dnl force certain compiler flags/libs to be tested by setting these
869 dnl environment variables.)
871 dnl Also sets PTHREAD_CC to any special C compiler that is needed for
872 dnl multi-threaded programs (defaults to the value of CC otherwise).
873 dnl (This is necessary on AIX to use the special cc_r compiler alias.)
875 dnl If you are only building threads programs, you may wish to
876 dnl use these variables in your default LIBS, CFLAGS, and CC:
878 dnl LIBS="$PTHREAD_LIBS $LIBS"
879 dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
880 dnl CC="$PTHREAD_CC"
882 dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
883 dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
884 dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
886 dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
887 dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
888 dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
889 dnl the default action will define HAVE_PTHREAD.
891 dnl Please let the authors know if this macro fails on any platform,
892 dnl or if you have any other suggestions or comments. This macro was
893 dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
894 dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
895 dnl macros posted by AFC to the autoconf macro repository. We are also
896 dnl grateful for the helpful feedback of numerous users.
898 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
900 AC_DEFUN([ACX_PTHREAD], [
901 AC_REQUIRE([AC_CANONICAL_HOST])
902 AC_LANG_SAVE
903 AC_LANG_C
904 acx_pthread_ok=no
906 # We used to check for pthread.h first, but this fails if pthread.h
907 # requires special compiler flags (e.g. on True64 or Sequent).
908 # It gets checked for in the link test anyway.
910 # First of all, check if the user has set any of the PTHREAD_LIBS,
911 # etcetera environment variables, and if threads linking works using
912 # them:
913 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
914         save_CFLAGS="$CFLAGS"
915         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
916         save_LIBS="$LIBS"
917         LIBS="$PTHREAD_LIBS $LIBS"
918         AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
919         AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
920         AC_MSG_RESULT($acx_pthread_ok)
921         if test x"$acx_pthread_ok" = xno; then
922                 PTHREAD_LIBS=""
923                 PTHREAD_CFLAGS=""
924         fi
925         LIBS="$save_LIBS"
926         CFLAGS="$save_CFLAGS"
929 # We must check for the threads library under a number of different
930 # names; the ordering is very important because some systems
931 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
932 # libraries is broken (non-POSIX).
934 # Create a list of thread flags to try. Items starting with a "-" are
935 # C compiler flags, and other items are library names, except for "none"
936 # which indicates that we try without any flags at all.
938 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
940 # The ordering *is* (sometimes) important. Some notes on the
941 # individual items follow:
943 # pthreads: AIX (must check this before -lpthread)
944 # none: in case threads are in libc; should be tried before -Kthread and
945 # other compiler flags to prevent continual compiler warnings
946 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
947 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
948 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
949 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
950 # -pthreads: Solaris/gcc
951 # -mthreads: Mingw32/gcc, Lynx/gcc
952 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
953 # doesn't hurt to check since this sometimes defines pthreads too;
954 # also defines -D_REENTRANT)
955 # pthread: Linux, etcetera
956 # --thread-safe: KAI C++
958 case "${host_cpu}-${host_os}" in
959         *solaris*)
961         # On Solaris (at least, for some versions), libc contains stubbed
962         # (non-functional) versions of the pthreads routines, so link-based
963         # tests will erroneously succeed. (We need to link with -pthread or
964         # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
965         # a function called by this macro, so we could check for that, but
966         # who knows whether they'll stub that too in a future libc.) So,
967         # we'll just look for -pthreads and -lpthread first:
969         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
970         ;;
971 esac
973 if test x"$acx_pthread_ok" = xno; then
974 for flag in $acx_pthread_flags; do
976         case $flag in
977                 none)
978                 AC_MSG_CHECKING([whether pthreads work without any flags])
979                 ;;
981                 -*)
982                 AC_MSG_CHECKING([whether pthreads work with $flag])
983                 PTHREAD_CFLAGS="$flag"
984                 ;;
986                 *)
987                 AC_MSG_CHECKING([for the pthreads library -l$flag])
988                 PTHREAD_LIBS="-l$flag"
989                 ;;
990         esac
992         save_LIBS="$LIBS"
993         save_CFLAGS="$CFLAGS"
994         LIBS="$PTHREAD_LIBS $LIBS"
995         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
997         # Check for various functions. We must include pthread.h,
998         # since some functions may be macros. (On the Sequent, we
999         # need a special flag -Kthread to make this header compile.)
1000         # We check for pthread_join because it is in -lpthread on IRIX
1001         # while pthread_create is in libc. We check for pthread_attr_init
1002         # due to DEC craziness with -lpthreads. We check for
1003         # pthread_cleanup_push because it is one of the few pthread
1004         # functions on Solaris that doesn't have a non-functional libc stub.
1005         # We try pthread_create on general principles.
1006         AC_TRY_LINK([#include <pthread.h>],
1007                     [pthread_t th; pthread_join(th, 0);
1008                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
1009                      pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
1010                     [acx_pthread_ok=yes])
1012         LIBS="$save_LIBS"
1013         CFLAGS="$save_CFLAGS"
1015         AC_MSG_RESULT($acx_pthread_ok)
1016         if test "x$acx_pthread_ok" = xyes; then
1017                 break;
1018         fi
1020         PTHREAD_LIBS=""
1021         PTHREAD_CFLAGS=""
1022 done
1025 # Various other checks:
1026 if test "x$acx_pthread_ok" = xyes; then
1027         save_LIBS="$LIBS"
1028         LIBS="$PTHREAD_LIBS $LIBS"
1029         save_CFLAGS="$CFLAGS"
1030         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1032         # Detect AIX lossage: threads are created detached by default
1033         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
1034         AC_MSG_CHECKING([for joinable pthread attribute])
1035         AC_TRY_LINK([#include <pthread.h>],
1036                     [int attr=PTHREAD_CREATE_JOINABLE;],
1037                     ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
1038         if test x"$ok" = xunknown; then
1039                 AC_TRY_LINK([#include <pthread.h>],
1040                             [int attr=PTHREAD_CREATE_UNDETACHED;],
1041                             ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
1042         fi
1043         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
1044                 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
1045                           [Define to the necessary symbol if this constant
1046                            uses a non-standard name on your system.])
1047         fi
1048         AC_MSG_RESULT(${ok})
1049         if test x"$ok" = xunknown; then
1050                 AC_MSG_WARN([we do not know how to create joinable pthreads])
1051         fi
1053         AC_MSG_CHECKING([if more special flags are required for pthreads])
1054         flag=no
1055         case "${host_cpu}-${host_os}" in
1056                 *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
1057                 *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
1058         esac
1059         AC_MSG_RESULT(${flag})
1060         if test "x$flag" != xno; then
1061                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
1062         fi
1064         LIBS="$save_LIBS"
1065         CFLAGS="$save_CFLAGS"
1067         # More AIX lossage: must compile with cc_r
1068         AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
1069 else
1070         PTHREAD_CC="$CC"
1073 AC_SUBST(PTHREAD_LIBS)
1074 AC_SUBST(PTHREAD_CFLAGS)
1075 AC_SUBST(PTHREAD_CC)
1077 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
1078 if test x"$acx_pthread_ok" = xyes; then
1079         ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
1080         :
1081 else
1082         acx_pthread_ok=no
1083         $2
1085 AC_LANG_RESTORE
1086 ])dnl ACX_PTHREAD 
1092 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1093 # -----------------------------------------------------------
1094 # If this macro is not defined by Autoconf, define it here.
1095 m4_ifdef([AC_PROVIDE_IFELSE],
1096          [],
1097          [m4_define([AC_PROVIDE_IFELSE],
1098                  [m4_ifdef([AC_PROVIDE_$1],
1099                            [$2], [$3])])])
1102 # AC_PROG_LIBTOOL
1103 # ---------------
1104 AC_DEFUN([AC_PROG_LIBTOOL],
1105 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1106 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1107 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1108   AC_PROVIDE_IFELSE([AC_PROG_CXX],
1109     [AC_LIBTOOL_CXX],
1110     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1111   ])])
1112 dnl And a similar setup for Fortran 77 support
1113   AC_PROVIDE_IFELSE([AC_PROG_F77],
1114     [AC_LIBTOOL_F77],
1115     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1116 ])])
1118 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1119 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1120 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1121   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1122     [AC_LIBTOOL_GCJ],
1123     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1124       [AC_LIBTOOL_GCJ],
1125       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1126         [AC_LIBTOOL_GCJ],
1127       [ifdef([AC_PROG_GCJ],
1128              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1129        ifdef([A][M_PROG_GCJ],
1130              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1131        ifdef([LT_AC_PROG_GCJ],
1132              [define([LT_AC_PROG_GCJ],
1133                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1134 ])])# AC_PROG_LIBTOOL
1137 # _AC_PROG_LIBTOOL
1138 # ----------------
1139 AC_DEFUN([_AC_PROG_LIBTOOL],
1140 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1141 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1142 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1143 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1145 # This can be used to rebuild libtool when needed
1146 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1148 # Always use our own libtool.
1149 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1150 AC_SUBST(LIBTOOL)dnl
1152 # Prevent multiple expansion
1153 define([AC_PROG_LIBTOOL], [])
1154 ])# _AC_PROG_LIBTOOL
1157 # AC_LIBTOOL_SETUP
1158 # ----------------
1159 AC_DEFUN([AC_LIBTOOL_SETUP],
1160 [AC_PREREQ(2.50)dnl
1161 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1162 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1163 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1164 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1165 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1166 AC_REQUIRE([AC_PROG_CC])dnl
1167 AC_REQUIRE([AC_PROG_LD])dnl
1168 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1169 AC_REQUIRE([AC_PROG_NM])dnl
1171 AC_REQUIRE([AC_PROG_LN_S])dnl
1172 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1173 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1174 AC_REQUIRE([AC_OBJEXT])dnl
1175 AC_REQUIRE([AC_EXEEXT])dnl
1178 AC_LIBTOOL_SYS_MAX_CMD_LEN
1179 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1180 AC_LIBTOOL_OBJDIR
1182 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1183 _LT_AC_PROG_ECHO_BACKSLASH
1185 case $host_os in
1186 aix3*)
1187   # AIX sometimes has problems with the GCC collect2 program.  For some
1188   # reason, if we set the COLLECT_NAMES environment variable, the problems
1189   # vanish in a puff of smoke.
1190   if test "X${COLLECT_NAMES+set}" != Xset; then
1191     COLLECT_NAMES=
1192     export COLLECT_NAMES
1193   fi
1194   ;;
1195 esac
1197 # Sed substitution that helps us do robust quoting.  It backslashifies
1198 # metacharacters that are still active within double-quoted strings.
1199 Xsed='sed -e 1s/^X//'
1200 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1202 # Same as above, but do not quote variable references.
1203 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1205 # Sed substitution to delay expansion of an escaped shell variable in a
1206 # double_quote_subst'ed string.
1207 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1209 # Sed substitution to avoid accidental globbing in evaled expressions
1210 no_glob_subst='s/\*/\\\*/g'
1212 # Constants:
1213 rm="rm -f"
1215 # Global variables:
1216 default_ofile=libtool
1217 can_build_shared=yes
1219 # All known linkers require a `.a' archive for static linking (except MSVC,
1220 # which needs '.lib').
1221 libext=a
1222 ltmain="$ac_aux_dir/ltmain.sh"
1223 ofile="$default_ofile"
1224 with_gnu_ld="$lt_cv_prog_gnu_ld"
1226 AC_CHECK_TOOL(AR, ar, false)
1227 AC_CHECK_TOOL(RANLIB, ranlib, :)
1228 AC_CHECK_TOOL(STRIP, strip, :)
1230 old_CC="$CC"
1231 old_CFLAGS="$CFLAGS"
1233 # Set sane defaults for various variables
1234 test -z "$AR" && AR=ar
1235 test -z "$AR_FLAGS" && AR_FLAGS=cru
1236 test -z "$AS" && AS=as
1237 test -z "$CC" && CC=cc
1238 test -z "$LTCC" && LTCC=$CC
1239 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1240 test -z "$DLLTOOL" && DLLTOOL=dlltool
1241 test -z "$LD" && LD=ld
1242 test -z "$LN_S" && LN_S="ln -s"
1243 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1244 test -z "$NM" && NM=nm
1245 test -z "$SED" && SED=sed
1246 test -z "$OBJDUMP" && OBJDUMP=objdump
1247 test -z "$RANLIB" && RANLIB=:
1248 test -z "$STRIP" && STRIP=:
1249 test -z "$ac_objext" && ac_objext=o
1251 # Determine commands to create old-style static archives.
1252 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1253 old_postinstall_cmds='chmod 644 $oldlib'
1254 old_postuninstall_cmds=
1256 if test -n "$RANLIB"; then
1257   case $host_os in
1258   openbsd*)
1259     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1260     ;;
1261   *)
1262     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1263     ;;
1264   esac
1265   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1268 _LT_CC_BASENAME([$compiler])
1270 # Only perform the check for file, if the check method requires it
1271 case $deplibs_check_method in
1272 file_magic*)
1273   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1274     AC_PATH_MAGIC
1275   fi
1276   ;;
1277 esac
1279 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1280 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1281 enable_win32_dll=yes, enable_win32_dll=no)
1283 AC_ARG_ENABLE([libtool-lock],
1284     [AC_HELP_STRING([--disable-libtool-lock],
1285         [avoid locking (might break parallel builds)])])
1286 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1288 AC_ARG_WITH([pic],
1289     [AC_HELP_STRING([--with-pic],
1290         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1291     [pic_mode="$withval"],
1292     [pic_mode=default])
1293 test -z "$pic_mode" && pic_mode=default
1295 # Use C for the default configuration in the libtool script
1296 tagname=
1297 AC_LIBTOOL_LANG_C_CONFIG
1298 _LT_AC_TAGCONFIG
1299 ])# AC_LIBTOOL_SETUP
1302 # _LT_AC_SYS_COMPILER
1303 # -------------------
1304 AC_DEFUN([_LT_AC_SYS_COMPILER],
1305 [AC_REQUIRE([AC_PROG_CC])dnl
1307 # If no C compiler was specified, use CC.
1308 LTCC=${LTCC-"$CC"}
1310 # If no C compiler flags were specified, use CFLAGS.
1311 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1313 # Allow CC to be a program name with arguments.
1314 compiler=$CC
1315 ])# _LT_AC_SYS_COMPILER
1318 # _LT_CC_BASENAME(CC)
1319 # -------------------
1320 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1321 AC_DEFUN([_LT_CC_BASENAME],
1322 [for cc_temp in $1""; do
1323   case $cc_temp in
1324     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1325     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1326     \-*) ;;
1327     *) break;;
1328   esac
1329 done
1330 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1334 # _LT_COMPILER_BOILERPLATE
1335 # ------------------------
1336 # Check for compiler boilerplate output or warnings with
1337 # the simple compiler test code.
1338 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1339 [ac_outfile=conftest.$ac_objext
1340 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1341 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1342 _lt_compiler_boilerplate=`cat conftest.err`
1343 $rm conftest*
1344 ])# _LT_COMPILER_BOILERPLATE
1347 # _LT_LINKER_BOILERPLATE
1348 # ----------------------
1349 # Check for linker boilerplate output or warnings with
1350 # the simple link test code.
1351 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1352 [ac_outfile=conftest.$ac_objext
1353 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1354 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1355 _lt_linker_boilerplate=`cat conftest.err`
1356 $rm conftest*
1357 ])# _LT_LINKER_BOILERPLATE
1360 # _LT_AC_SYS_LIBPATH_AIX
1361 # ----------------------
1362 # Links a minimal program and checks the executable
1363 # for the system default hardcoded library path. In most cases,
1364 # this is /usr/lib:/lib, but when the MPI compilers are used
1365 # the location of the communication and MPI libs are included too.
1366 # If we don't find anything, use the default library path according
1367 # to the aix ld manual.
1368 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1369 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1370 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1372 # Check for a 64-bit object if we didn't find anything.
1373 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1374 }'`; fi],[])
1375 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1376 ])# _LT_AC_SYS_LIBPATH_AIX
1379 # _LT_AC_SHELL_INIT(ARG)
1380 # ----------------------
1381 AC_DEFUN([_LT_AC_SHELL_INIT],
1382 [ifdef([AC_DIVERSION_NOTICE],
1383              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1384          [AC_DIVERT_PUSH(NOTICE)])
1386 AC_DIVERT_POP
1387 ])# _LT_AC_SHELL_INIT
1390 # _LT_AC_PROG_ECHO_BACKSLASH
1391 # --------------------------
1392 # Add some code to the start of the generated configure script which
1393 # will find an echo command which doesn't interpret backslashes.
1394 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1395 [_LT_AC_SHELL_INIT([
1396 # Check that we are running under the correct shell.
1397 SHELL=${CONFIG_SHELL-/bin/sh}
1399 case X$ECHO in
1400 X*--fallback-echo)
1401   # Remove one level of quotation (which was required for Make).
1402   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1403   ;;
1404 esac
1406 echo=${ECHO-echo}
1407 if test "X[$]1" = X--no-reexec; then
1408   # Discard the --no-reexec flag, and continue.
1409   shift
1410 elif test "X[$]1" = X--fallback-echo; then
1411   # Avoid inline document here, it may be left over
1412   :
1413 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1414   # Yippee, $echo works!
1415   :
1416 else
1417   # Restart under the correct shell.
1418   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1421 if test "X[$]1" = X--fallback-echo; then
1422   # used as fallback echo
1423   shift
1424   cat <<EOF
1425 [$]*
1427   exit 0
1430 # The HP-UX ksh and POSIX shell print the target directory to stdout
1431 # if CDPATH is set.
1432 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1434 if test -z "$ECHO"; then
1435 if test "X${echo_test_string+set}" != Xset; then
1436 # find a string as large as possible, as long as the shell can cope with it
1437   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1438     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1439     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1440        echo_test_string=`eval $cmd` &&
1441        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1442     then
1443       break
1444     fi
1445   done
1448 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1449    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1450    test "X$echo_testing_string" = "X$echo_test_string"; then
1451   :
1452 else
1453   # The Solaris, AIX, and Digital Unix default echo programs unquote
1454   # backslashes.  This makes it impossible to quote backslashes using
1455   #   echo "$something" | sed 's/\\/\\\\/g'
1456   #
1457   # So, first we look for a working echo in the user's PATH.
1459   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1460   for dir in $PATH /usr/ucb; do
1461     IFS="$lt_save_ifs"
1462     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1463        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1464        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1465        test "X$echo_testing_string" = "X$echo_test_string"; then
1466       echo="$dir/echo"
1467       break
1468     fi
1469   done
1470   IFS="$lt_save_ifs"
1472   if test "X$echo" = Xecho; then
1473     # We didn't find a better echo, so look for alternatives.
1474     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1475        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1476        test "X$echo_testing_string" = "X$echo_test_string"; then
1477       # This shell has a builtin print -r that does the trick.
1478       echo='print -r'
1479     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1480          test "X$CONFIG_SHELL" != X/bin/ksh; then
1481       # If we have ksh, try running configure again with it.
1482       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1483       export ORIGINAL_CONFIG_SHELL
1484       CONFIG_SHELL=/bin/ksh
1485       export CONFIG_SHELL
1486       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1487     else
1488       # Try using printf.
1489       echo='printf %s\n'
1490       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1491          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1492          test "X$echo_testing_string" = "X$echo_test_string"; then
1493         # Cool, printf works
1494         :
1495       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1496            test "X$echo_testing_string" = 'X\t' &&
1497            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1498            test "X$echo_testing_string" = "X$echo_test_string"; then
1499         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1500         export CONFIG_SHELL
1501         SHELL="$CONFIG_SHELL"
1502         export SHELL
1503         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1504       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1505            test "X$echo_testing_string" = 'X\t' &&
1506            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1507            test "X$echo_testing_string" = "X$echo_test_string"; then
1508         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1509       else
1510         # maybe with a smaller string...
1511         prev=:
1513         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1514           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1515           then
1516             break
1517           fi
1518           prev="$cmd"
1519         done
1521         if test "$prev" != 'sed 50q "[$]0"'; then
1522           echo_test_string=`eval $prev`
1523           export echo_test_string
1524           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1525         else
1526           # Oops.  We lost completely, so just stick with echo.
1527           echo=echo
1528         fi
1529       fi
1530     fi
1531   fi
1535 # Copy echo and quote the copy suitably for passing to libtool from
1536 # the Makefile, instead of quoting the original, which is used later.
1537 ECHO=$echo
1538 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1539    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1542 AC_SUBST(ECHO)
1543 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1546 # _LT_AC_LOCK
1547 # -----------
1548 AC_DEFUN([_LT_AC_LOCK],
1549 [AC_ARG_ENABLE([libtool-lock],
1550     [AC_HELP_STRING([--disable-libtool-lock],
1551         [avoid locking (might break parallel builds)])])
1552 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1554 # Some flags need to be propagated to the compiler or linker for good
1555 # libtool support.
1556 case $host in
1557 ia64-*-hpux*)
1558   # Find out which ABI we are using.
1559   echo 'int i;' > conftest.$ac_ext
1560   if AC_TRY_EVAL(ac_compile); then
1561     case `/usr/bin/file conftest.$ac_objext` in
1562     *ELF-32*)
1563       HPUX_IA64_MODE="32"
1564       ;;
1565     *ELF-64*)
1566       HPUX_IA64_MODE="64"
1567       ;;
1568     esac
1569   fi
1570   rm -rf conftest*
1571   ;;
1572 *-*-irix6*)
1573   # Find out which ABI we are using.
1574   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1575   if AC_TRY_EVAL(ac_compile); then
1576    if test "$lt_cv_prog_gnu_ld" = yes; then
1577     case `/usr/bin/file conftest.$ac_objext` in
1578     *32-bit*)
1579       LD="${LD-ld} -melf32bsmip"
1580       ;;
1581     *N32*)
1582       LD="${LD-ld} -melf32bmipn32"
1583       ;;
1584     *64-bit*)
1585       LD="${LD-ld} -melf64bmip"
1586       ;;
1587     esac
1588    else
1589     case `/usr/bin/file conftest.$ac_objext` in
1590     *32-bit*)
1591       LD="${LD-ld} -32"
1592       ;;
1593     *N32*)
1594       LD="${LD-ld} -n32"
1595       ;;
1596     *64-bit*)
1597       LD="${LD-ld} -64"
1598       ;;
1599     esac
1600    fi
1601   fi
1602   rm -rf conftest*
1603   ;;
1605 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1606   # Find out which ABI we are using.
1607   echo 'int i;' > conftest.$ac_ext
1608   if AC_TRY_EVAL(ac_compile); then
1609     case `/usr/bin/file conftest.o` in
1610     *32-bit*)
1611       case $host in
1612         x86_64-*linux*)
1613           LD="${LD-ld} -m elf_i386"
1614           ;;
1615         ppc64-*linux*|powerpc64-*linux*)
1616           LD="${LD-ld} -m elf32ppclinux"
1617           ;;
1618         s390x-*linux*)
1619           LD="${LD-ld} -m elf_s390"
1620           ;;
1621         sparc64-*linux*)
1622           LD="${LD-ld} -m elf32_sparc"
1623           ;;
1624       esac
1625       ;;
1626     *64-bit*)
1627       case $host in
1628         x86_64-*linux*)
1629           LD="${LD-ld} -m elf_x86_64"
1630           ;;
1631         ppc*-*linux*|powerpc*-*linux*)
1632           LD="${LD-ld} -m elf64ppc"
1633           ;;
1634         s390*-*linux*)
1635           LD="${LD-ld} -m elf64_s390"
1636           ;;
1637         sparc*-*linux*)
1638           LD="${LD-ld} -m elf64_sparc"
1639           ;;
1640       esac
1641       ;;
1642     esac
1643   fi
1644   rm -rf conftest*
1645   ;;
1647 *-*-sco3.2v5*)
1648   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1649   SAVE_CFLAGS="$CFLAGS"
1650   CFLAGS="$CFLAGS -belf"
1651   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1652     [AC_LANG_PUSH(C)
1653      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1654      AC_LANG_POP])
1655   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1656     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1657     CFLAGS="$SAVE_CFLAGS"
1658   fi
1659   ;;
1660 sparc*-*solaris*)
1661   # Find out which ABI we are using.
1662   echo 'int i;' > conftest.$ac_ext
1663   if AC_TRY_EVAL(ac_compile); then
1664     case `/usr/bin/file conftest.o` in
1665     *64-bit*)
1666       case $lt_cv_prog_gnu_ld in
1667       yes*) LD="${LD-ld} -m elf64_sparc" ;;
1668       *)    LD="${LD-ld} -64" ;;
1669       esac
1670       ;;
1671     esac
1672   fi
1673   rm -rf conftest*
1674   ;;
1676 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1677 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1678   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1679   AC_CHECK_TOOL(AS, as, false)
1680   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1681   ;;
1682   ])
1683 esac
1685 need_locks="$enable_libtool_lock"
1687 ])# _LT_AC_LOCK
1690 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1691 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1692 # ----------------------------------------------------------------
1693 # Check whether the given compiler option works
1694 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1695 [AC_REQUIRE([LT_AC_PROG_SED])
1696 AC_CACHE_CHECK([$1], [$2],
1697   [$2=no
1698   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1699    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1700    lt_compiler_flag="$3"
1701    # Insert the option either (1) after the last *FLAGS variable, or
1702    # (2) before a word containing "conftest.", or (3) at the end.
1703    # Note that $ac_compile itself does not contain backslashes and begins
1704    # with a dollar sign (not a hyphen), so the echo should work correctly.
1705    # The option is referenced via a variable to avoid confusing sed.
1706    lt_compile=`echo "$ac_compile" | $SED \
1707    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1708    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1709    -e 's:$: $lt_compiler_flag:'`
1710    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1711    (eval "$lt_compile" 2>conftest.err)
1712    ac_status=$?
1713    cat conftest.err >&AS_MESSAGE_LOG_FD
1714    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1715    if (exit $ac_status) && test -s "$ac_outfile"; then
1716      # The compiler can only warn and ignore the option if not recognized
1717      # So say no if there are warnings other than the usual output.
1718      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1719      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1720      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1721        $2=yes
1722      fi
1723    fi
1724    $rm conftest*
1727 if test x"[$]$2" = xyes; then
1728     ifelse([$5], , :, [$5])
1729 else
1730     ifelse([$6], , :, [$6])
1732 ])# AC_LIBTOOL_COMPILER_OPTION
1735 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1736 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1737 # ------------------------------------------------------------
1738 # Check whether the given compiler option works
1739 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1740 [AC_CACHE_CHECK([$1], [$2],
1741   [$2=no
1742    save_LDFLAGS="$LDFLAGS"
1743    LDFLAGS="$LDFLAGS $3"
1744    printf "$lt_simple_link_test_code" > conftest.$ac_ext
1745    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1746      # The linker can only warn and ignore the option if not recognized
1747      # So say no if there are warnings
1748      if test -s conftest.err; then
1749        # Append any errors to the config.log.
1750        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1751        $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1752        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1753        if diff conftest.exp conftest.er2 >/dev/null; then
1754          $2=yes
1755        fi
1756      else
1757        $2=yes
1758      fi
1759    fi
1760    $rm conftest*
1761    LDFLAGS="$save_LDFLAGS"
1764 if test x"[$]$2" = xyes; then
1765     ifelse([$4], , :, [$4])
1766 else
1767     ifelse([$5], , :, [$5])
1769 ])# AC_LIBTOOL_LINKER_OPTION
1772 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1773 # --------------------------
1774 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1775 [# find the maximum length of command line arguments
1776 AC_MSG_CHECKING([the maximum length of command line arguments])
1777 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1778   i=0
1779   teststring="ABCD"
1781   case $build_os in
1782   msdosdjgpp*)
1783     # On DJGPP, this test can blow up pretty badly due to problems in libc
1784     # (any single argument exceeding 2000 bytes causes a buffer overrun
1785     # during glob expansion).  Even if it were fixed, the result of this
1786     # check would be larger than it should be.
1787     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1788     ;;
1790   gnu*)
1791     # Under GNU Hurd, this test is not required because there is
1792     # no limit to the length of command line arguments.
1793     # Libtool will interpret -1 as no limit whatsoever
1794     lt_cv_sys_max_cmd_len=-1;
1795     ;;
1797   cygwin* | mingw*)
1798     # On Win9x/ME, this test blows up -- it succeeds, but takes
1799     # about 5 minutes as the teststring grows exponentially.
1800     # Worse, since 9x/ME are not pre-emptively multitasking,
1801     # you end up with a "frozen" computer, even though with patience
1802     # the test eventually succeeds (with a max line length of 256k).
1803     # Instead, let's just punt: use the minimum linelength reported by
1804     # all of the supported platforms: 8192 (on NT/2K/XP).
1805     lt_cv_sys_max_cmd_len=8192;
1806     ;;
1808   amigaos*)
1809     # On AmigaOS with pdksh, this test takes hours, literally.
1810     # So we just punt and use a minimum line length of 8192.
1811     lt_cv_sys_max_cmd_len=8192;
1812     ;;
1814   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1815     # This has been around since 386BSD, at least.  Likely further.
1816     if test -x /sbin/sysctl; then
1817       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1818     elif test -x /usr/sbin/sysctl; then
1819       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1820     else
1821       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
1822     fi
1823     # And add a safety zone
1824     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1825     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1826     ;;
1828   interix*)
1829     # We know the value 262144 and hardcode it with a safety zone (like BSD)
1830     lt_cv_sys_max_cmd_len=196608
1831     ;;
1833   osf*)
1834     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1835     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1836     # nice to cause kernel panics so lets avoid the loop below.
1837     # First set a reasonable default.
1838     lt_cv_sys_max_cmd_len=16384
1839     #
1840     if test -x /sbin/sysconfig; then
1841       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1842         *1*) lt_cv_sys_max_cmd_len=-1 ;;
1843       esac
1844     fi
1845     ;;
1846   sco3.2v5*)
1847     lt_cv_sys_max_cmd_len=102400
1848     ;;
1849   sysv5* | sco5v6* | sysv4.2uw2*)
1850     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1851     if test -n "$kargmax"; then
1852       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
1853     else
1854       lt_cv_sys_max_cmd_len=32768
1855     fi
1856     ;;
1857   *)
1858     # If test is not a shell built-in, we'll probably end up computing a
1859     # maximum length that is only half of the actual maximum length, but
1860     # we can't tell.
1861     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1862     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1863                = "XX$teststring") >/dev/null 2>&1 &&
1864             new_result=`expr "X$teststring" : ".*" 2>&1` &&
1865             lt_cv_sys_max_cmd_len=$new_result &&
1866             test $i != 17 # 1/2 MB should be enough
1867     do
1868       i=`expr $i + 1`
1869       teststring=$teststring$teststring
1870     done
1871     teststring=
1872     # Add a significant safety factor because C++ compilers can tack on massive
1873     # amounts of additional arguments before passing them to the linker.
1874     # It appears as though 1/2 is a usable value.
1875     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1876     ;;
1877   esac
1879 if test -n $lt_cv_sys_max_cmd_len ; then
1880   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1881 else
1882   AC_MSG_RESULT(none)
1884 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1887 # _LT_AC_CHECK_DLFCN
1888 # ------------------
1889 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1890 [AC_CHECK_HEADERS(dlfcn.h)dnl
1891 ])# _LT_AC_CHECK_DLFCN
1894 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1895 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1896 # ---------------------------------------------------------------------
1897 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1898 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1899 if test "$cross_compiling" = yes; then :
1900   [$4]
1901 else
1902   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1903   lt_status=$lt_dlunknown
1904   cat > conftest.$ac_ext <<EOF
1905 [#line __oline__ "configure"
1906 #include "confdefs.h"
1908 #if HAVE_DLFCN_H
1909 #include <dlfcn.h>
1910 #endif
1912 #include <stdio.h>
1914 #ifdef RTLD_GLOBAL
1915 #  define LT_DLGLOBAL           RTLD_GLOBAL
1916 #else
1917 #  ifdef DL_GLOBAL
1918 #    define LT_DLGLOBAL         DL_GLOBAL
1919 #  else
1920 #    define LT_DLGLOBAL         0
1921 #  endif
1922 #endif
1924 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1925    find out it does not work in some platform. */
1926 #ifndef LT_DLLAZY_OR_NOW
1927 #  ifdef RTLD_LAZY
1928 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1929 #  else
1930 #    ifdef DL_LAZY
1931 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1932 #    else
1933 #      ifdef RTLD_NOW
1934 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1935 #      else
1936 #        ifdef DL_NOW
1937 #          define LT_DLLAZY_OR_NOW      DL_NOW
1938 #        else
1939 #          define LT_DLLAZY_OR_NOW      0
1940 #        endif
1941 #      endif
1942 #    endif
1943 #  endif
1944 #endif
1946 #ifdef __cplusplus
1947 extern "C" void exit (int);
1948 #endif
1950 void fnord() { int i=42;}
1951 int main ()
1953   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1954   int status = $lt_dlunknown;
1956   if (self)
1957     {
1958       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1959       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1960       /* dlclose (self); */
1961     }
1962   else
1963     puts (dlerror ());
1965     exit (status);
1968   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1969     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1970     lt_status=$?
1971     case x$lt_status in
1972       x$lt_dlno_uscore) $1 ;;
1973       x$lt_dlneed_uscore) $2 ;;
1974       x$lt_dlunknown|x*) $3 ;;
1975     esac
1976   else :
1977     # compilation failed
1978     $3
1979   fi
1981 rm -fr conftest*
1982 ])# _LT_AC_TRY_DLOPEN_SELF
1985 # AC_LIBTOOL_DLOPEN_SELF
1986 # ----------------------
1987 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1988 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1989 if test "x$enable_dlopen" != xyes; then
1990   enable_dlopen=unknown
1991   enable_dlopen_self=unknown
1992   enable_dlopen_self_static=unknown
1993 else
1994   lt_cv_dlopen=no
1995   lt_cv_dlopen_libs=
1997   case $host_os in
1998   beos*)
1999     lt_cv_dlopen="load_add_on"
2000     lt_cv_dlopen_libs=
2001     lt_cv_dlopen_self=yes
2002     ;;
2004   mingw* | pw32*)
2005     lt_cv_dlopen="LoadLibrary"
2006     lt_cv_dlopen_libs=
2007    ;;
2009   cygwin*)
2010     lt_cv_dlopen="dlopen"
2011     lt_cv_dlopen_libs=
2012    ;;
2014   darwin*)
2015   # if libdl is installed we need to link against it
2016     AC_CHECK_LIB([dl], [dlopen],
2017                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2018     lt_cv_dlopen="dyld"
2019     lt_cv_dlopen_libs=
2020     lt_cv_dlopen_self=yes
2021     ])
2022    ;;
2024   *)
2025     AC_CHECK_FUNC([shl_load],
2026           [lt_cv_dlopen="shl_load"],
2027       [AC_CHECK_LIB([dld], [shl_load],
2028             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2029         [AC_CHECK_FUNC([dlopen],
2030               [lt_cv_dlopen="dlopen"],
2031           [AC_CHECK_LIB([dl], [dlopen],
2032                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2033             [AC_CHECK_LIB([svld], [dlopen],
2034                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2035               [AC_CHECK_LIB([dld], [dld_link],
2036                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2037               ])
2038             ])
2039           ])
2040         ])
2041       ])
2042     ;;
2043   esac
2045   if test "x$lt_cv_dlopen" != xno; then
2046     enable_dlopen=yes
2047   else
2048     enable_dlopen=no
2049   fi
2051   case $lt_cv_dlopen in
2052   dlopen)
2053     save_CPPFLAGS="$CPPFLAGS"
2054     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2056     save_LDFLAGS="$LDFLAGS"
2057     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2059     save_LIBS="$LIBS"
2060     LIBS="$lt_cv_dlopen_libs $LIBS"
2062     AC_CACHE_CHECK([whether a program can dlopen itself],
2063           lt_cv_dlopen_self, [dnl
2064           _LT_AC_TRY_DLOPEN_SELF(
2065             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2066             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2067     ])
2069     if test "x$lt_cv_dlopen_self" = xyes; then
2070       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2071       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2072           lt_cv_dlopen_self_static, [dnl
2073           _LT_AC_TRY_DLOPEN_SELF(
2074             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2075             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2076       ])
2077     fi
2079     CPPFLAGS="$save_CPPFLAGS"
2080     LDFLAGS="$save_LDFLAGS"
2081     LIBS="$save_LIBS"
2082     DLOPEN_LIBS="$lt_cv_dlopen_libs"
2083     ;;
2084   esac
2086   case $lt_cv_dlopen_self in
2087   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2088   *) enable_dlopen_self=unknown ;;
2089   esac
2091   case $lt_cv_dlopen_self_static in
2092   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2093   *) enable_dlopen_self_static=unknown ;;
2094   esac
2096 ])# AC_LIBTOOL_DLOPEN_SELF
2099 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2100 # ---------------------------------
2101 # Check to see if options -c and -o are simultaneously supported by compiler
2102 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2103 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2104 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2105   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2106   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2107    $rm -r conftest 2>/dev/null
2108    mkdir conftest
2109    cd conftest
2110    mkdir out
2111    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2113    lt_compiler_flag="-o out/conftest2.$ac_objext"
2114    # Insert the option either (1) after the last *FLAGS variable, or
2115    # (2) before a word containing "conftest.", or (3) at the end.
2116    # Note that $ac_compile itself does not contain backslashes and begins
2117    # with a dollar sign (not a hyphen), so the echo should work correctly.
2118    lt_compile=`echo "$ac_compile" | $SED \
2119    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2120    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2121    -e 's:$: $lt_compiler_flag:'`
2122    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2123    (eval "$lt_compile" 2>out/conftest.err)
2124    ac_status=$?
2125    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2126    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2127    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2128    then
2129      # The compiler can only warn and ignore the option if not recognized
2130      # So say no if there are warnings
2131      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2132      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2133      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2134        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2135      fi
2136    fi
2137    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2138    $rm conftest*
2139    # SGI C++ compiler will create directory out/ii_files/ for
2140    # template instantiation
2141    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2142    $rm out/* && rmdir out
2143    cd ..
2144    rmdir conftest
2145    $rm conftest*
2147 ])# AC_LIBTOOL_PROG_CC_C_O
2150 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2151 # -----------------------------------------
2152 # Check to see if we can do hard links to lock some files if needed
2153 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2154 [AC_REQUIRE([_LT_AC_LOCK])dnl
2156 hard_links="nottested"
2157 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2158   # do not overwrite the value of need_locks provided by the user
2159   AC_MSG_CHECKING([if we can lock with hard links])
2160   hard_links=yes
2161   $rm conftest*
2162   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2163   touch conftest.a
2164   ln conftest.a conftest.b 2>&5 || hard_links=no
2165   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2166   AC_MSG_RESULT([$hard_links])
2167   if test "$hard_links" = no; then
2168     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2169     need_locks=warn
2170   fi
2171 else
2172   need_locks=no
2174 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2177 # AC_LIBTOOL_OBJDIR
2178 # -----------------
2179 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2180 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2181 [rm -f .libs 2>/dev/null
2182 mkdir .libs 2>/dev/null
2183 if test -d .libs; then
2184   lt_cv_objdir=.libs
2185 else
2186   # MS-DOS does not allow filenames that begin with a dot.
2187   lt_cv_objdir=_libs
2189 rmdir .libs 2>/dev/null])
2190 objdir=$lt_cv_objdir
2191 ])# AC_LIBTOOL_OBJDIR
2194 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2195 # ----------------------------------------------
2196 # Check hardcoding attributes.
2197 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2198 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2199 _LT_AC_TAGVAR(hardcode_action, $1)=
2200 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2201    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2202    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2204   # We can hardcode non-existant directories.
2205   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2206      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2207      # have to relink, otherwise we might link with an installed library
2208      # when we should be linking with a yet-to-be-installed one
2209      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2210      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2211     # Linking always hardcodes the temporary library directory.
2212     _LT_AC_TAGVAR(hardcode_action, $1)=relink
2213   else
2214     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2215     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2216   fi
2217 else
2218   # We cannot hardcode anything, or else we can only hardcode existing
2219   # directories.
2220   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2222 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2224 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2225   # Fast installation is not supported
2226   enable_fast_install=no
2227 elif test "$shlibpath_overrides_runpath" = yes ||
2228      test "$enable_shared" = no; then
2229   # Fast installation is not necessary
2230   enable_fast_install=needless
2232 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2235 # AC_LIBTOOL_SYS_LIB_STRIP
2236 # ------------------------
2237 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2238 [striplib=
2239 old_striplib=
2240 AC_MSG_CHECKING([whether stripping libraries is possible])
2241 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2242   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2243   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2244   AC_MSG_RESULT([yes])
2245 else
2246 # FIXME - insert some real tests, host_os isn't really good enough
2247   case $host_os in
2248    darwin*)
2249        if test -n "$STRIP" ; then
2250          striplib="$STRIP -x"
2251          AC_MSG_RESULT([yes])
2252        else
2253   AC_MSG_RESULT([no])
2255        ;;
2256    *)
2257   AC_MSG_RESULT([no])
2258     ;;
2259   esac
2261 ])# AC_LIBTOOL_SYS_LIB_STRIP
2264 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2265 # -----------------------------
2266 # PORTME Fill in your ld.so characteristics
2267 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2268 [AC_MSG_CHECKING([dynamic linker characteristics])
2269 library_names_spec=
2270 libname_spec='lib$name'
2271 soname_spec=
2272 shrext_cmds=".so"
2273 postinstall_cmds=
2274 postuninstall_cmds=
2275 finish_cmds=
2276 finish_eval=
2277 shlibpath_var=
2278 shlibpath_overrides_runpath=unknown
2279 version_type=none
2280 dynamic_linker="$host_os ld.so"
2281 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2282 if test "$GCC" = yes; then
2283   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2284   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2285     # if the path contains ";" then we assume it to be the separator
2286     # otherwise default to the standard path separator (i.e. ":") - it is
2287     # assumed that no part of a normal pathname contains ";" but that should
2288     # okay in the real world where ";" in dirpaths is itself problematic.
2289     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2290   else
2291     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2292   fi
2293 else
2294   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2296 need_lib_prefix=unknown
2297 hardcode_into_libs=no
2299 # when you set need_version to no, make sure it does not cause -set_version
2300 # flags to be left without arguments
2301 need_version=unknown
2303 case $host_os in
2304 aix3*)
2305   version_type=linux
2306   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2307   shlibpath_var=LIBPATH
2309   # AIX 3 has no versioning support, so we append a major version to the name.
2310   soname_spec='${libname}${release}${shared_ext}$major'
2311   ;;
2313 aix4* | aix5*)
2314   version_type=linux
2315   need_lib_prefix=no
2316   need_version=no
2317   hardcode_into_libs=yes
2318   if test "$host_cpu" = ia64; then
2319     # AIX 5 supports IA64
2320     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2321     shlibpath_var=LD_LIBRARY_PATH
2322   else
2323     # With GCC up to 2.95.x, collect2 would create an import file
2324     # for dependence libraries.  The import file would start with
2325     # the line `#! .'.  This would cause the generated library to
2326     # depend on `.', always an invalid library.  This was fixed in
2327     # development snapshots of GCC prior to 3.0.
2328     case $host_os in
2329       aix4 | aix4.[[01]] | aix4.[[01]].*)
2330       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2331            echo ' yes '
2332            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2333         :
2334       else
2335         can_build_shared=no
2336       fi
2337       ;;
2338     esac
2339     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2340     # soname into executable. Probably we can add versioning support to
2341     # collect2, so additional links can be useful in future.
2342     if test "$aix_use_runtimelinking" = yes; then
2343       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2344       # instead of lib<name>.a to let people know that these are not
2345       # typical AIX shared libraries.
2346       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2347     else
2348       # We preserve .a as extension for shared libraries through AIX4.2
2349       # and later when we are not doing run time linking.
2350       library_names_spec='${libname}${release}.a $libname.a'
2351       soname_spec='${libname}${release}${shared_ext}$major'
2352     fi
2353     shlibpath_var=LIBPATH
2354   fi
2355   ;;
2357 amigaos*)
2358   library_names_spec='$libname.ixlibrary $libname.a'
2359   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2360   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2361   ;;
2363 beos*)
2364   library_names_spec='${libname}${shared_ext}'
2365   dynamic_linker="$host_os ld.so"
2366   shlibpath_var=LIBRARY_PATH
2367   ;;
2369 bsdi[[45]]*)
2370   version_type=linux
2371   need_version=no
2372   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2373   soname_spec='${libname}${release}${shared_ext}$major'
2374   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2375   shlibpath_var=LD_LIBRARY_PATH
2376   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2377   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2378   # the default ld.so.conf also contains /usr/contrib/lib and
2379   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2380   # libtool to hard-code these into programs
2381   ;;
2383 cygwin* | mingw* | pw32*)
2384   version_type=windows
2385   shrext_cmds=".dll"
2386   need_version=no
2387   need_lib_prefix=no
2389   case $GCC,$host_os in
2390   yes,cygwin* | yes,mingw* | yes,pw32*)
2391     library_names_spec='$libname.dll.a'
2392     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2393     postinstall_cmds='base_file=`basename \${file}`~
2394       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2395       dldir=$destdir/`dirname \$dlpath`~
2396       test -d \$dldir || mkdir -p \$dldir~
2397       $install_prog $dir/$dlname \$dldir/$dlname~
2398       chmod a+x \$dldir/$dlname'
2399     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2400       dlpath=$dir/\$dldll~
2401        $rm \$dlpath'
2402     shlibpath_overrides_runpath=yes
2404     case $host_os in
2405     cygwin*)
2406       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2407       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2408       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2409       ;;
2410     mingw*)
2411       # MinGW DLLs use traditional 'lib' prefix
2412       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2413       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2414       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2415         # It is most probably a Windows format PATH printed by
2416         # mingw gcc, but we are running on Cygwin. Gcc prints its search
2417         # path with ; separators, and with drive letters. We can handle the
2418         # drive letters (cygwin fileutils understands them), so leave them,
2419         # especially as we might pass files found there to a mingw objdump,
2420         # which wouldn't understand a cygwinified path. Ahh.
2421         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2422       else
2423         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2424       fi
2425       ;;
2426     pw32*)
2427       # pw32 DLLs use 'pw' prefix rather than 'lib'
2428       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2429       ;;
2430     esac
2431     ;;
2433   *)
2434     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2435     ;;
2436   esac
2437   dynamic_linker='Win32 ld.exe'
2438   # FIXME: first we should search . and the directory the executable is in
2439   shlibpath_var=PATH
2440   ;;
2442 darwin* | rhapsody*)
2443   dynamic_linker="$host_os dyld"
2444   version_type=darwin
2445   need_lib_prefix=no
2446   need_version=no
2447   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
2448   soname_spec='${libname}${release}${major}$shared_ext'
2449   shlibpath_overrides_runpath=yes
2450   shlibpath_var=DYLD_LIBRARY_PATH
2451   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2452   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2453   if test "$GCC" = yes; then
2454     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2455   else
2456     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2457   fi
2458   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2459   ;;
2461 dgux*)
2462   version_type=linux
2463   need_lib_prefix=no
2464   need_version=no
2465   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2466   soname_spec='${libname}${release}${shared_ext}$major'
2467   shlibpath_var=LD_LIBRARY_PATH
2468   ;;
2470 freebsd1*)
2471   dynamic_linker=no
2472   ;;
2474 kfreebsd*-gnu)
2475   version_type=linux
2476   need_lib_prefix=no
2477   need_version=no
2478   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2479   soname_spec='${libname}${release}${shared_ext}$major'
2480   shlibpath_var=LD_LIBRARY_PATH
2481   shlibpath_overrides_runpath=no
2482   hardcode_into_libs=yes
2483   dynamic_linker='GNU ld.so'
2484   ;;
2486 freebsd* | dragonfly*)
2487   # DragonFly does not have aout.  When/if they implement a new
2488   # versioning mechanism, adjust this.
2489   if test -x /usr/bin/objformat; then
2490     objformat=`/usr/bin/objformat`
2491   else
2492     case $host_os in
2493     freebsd[[123]]*) objformat=aout ;;
2494     *) objformat=elf ;;
2495     esac
2496   fi
2497   version_type=freebsd-$objformat
2498   case $version_type in
2499     freebsd-elf*)
2500       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2501       need_version=no
2502       need_lib_prefix=no
2503       ;;
2504     freebsd-*)
2505       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2506       need_version=yes
2507       ;;
2508   esac
2509   shlibpath_var=LD_LIBRARY_PATH
2510   case $host_os in
2511   freebsd2*)
2512     shlibpath_overrides_runpath=yes
2513     ;;
2514   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2515     shlibpath_overrides_runpath=yes
2516     hardcode_into_libs=yes
2517     ;;
2518   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2519   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2520     shlibpath_overrides_runpath=no
2521     hardcode_into_libs=yes
2522     ;;
2523   freebsd*) # from 4.6 on
2524     shlibpath_overrides_runpath=yes
2525     hardcode_into_libs=yes
2526     ;;
2527   esac
2528   ;;
2530 gnu*)
2531   version_type=linux
2532   need_lib_prefix=no
2533   need_version=no
2534   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2535   soname_spec='${libname}${release}${shared_ext}$major'
2536   shlibpath_var=LD_LIBRARY_PATH
2537   hardcode_into_libs=yes
2538   ;;
2540 hpux9* | hpux10* | hpux11*)
2541   # Give a soname corresponding to the major version so that dld.sl refuses to
2542   # link against other versions.
2543   version_type=sunos
2544   need_lib_prefix=no
2545   need_version=no
2546   case $host_cpu in
2547   ia64*)
2548     shrext_cmds='.so'
2549     hardcode_into_libs=yes
2550     dynamic_linker="$host_os dld.so"
2551     shlibpath_var=LD_LIBRARY_PATH
2552     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2553     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2554     soname_spec='${libname}${release}${shared_ext}$major'
2555     if test "X$HPUX_IA64_MODE" = X32; then
2556       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2557     else
2558       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2559     fi
2560     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2561     ;;
2562    hppa*64*)
2563      shrext_cmds='.sl'
2564      hardcode_into_libs=yes
2565      dynamic_linker="$host_os dld.sl"
2566      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2567      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2568      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2569      soname_spec='${libname}${release}${shared_ext}$major'
2570      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2571      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2572      ;;
2573    *)
2574     shrext_cmds='.sl'
2575     dynamic_linker="$host_os dld.sl"
2576     shlibpath_var=SHLIB_PATH
2577     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2578     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2579     soname_spec='${libname}${release}${shared_ext}$major'
2580     ;;
2581   esac
2582   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2583   postinstall_cmds='chmod 555 $lib'
2584   ;;
2586 interix3*)
2587   version_type=linux
2588   need_lib_prefix=no
2589   need_version=no
2590   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2591   soname_spec='${libname}${release}${shared_ext}$major'
2592   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2593   shlibpath_var=LD_LIBRARY_PATH
2594   shlibpath_overrides_runpath=no
2595   hardcode_into_libs=yes
2596   ;;
2598 irix5* | irix6* | nonstopux*)
2599   case $host_os in
2600     nonstopux*) version_type=nonstopux ;;
2601     *)
2602         if test "$lt_cv_prog_gnu_ld" = yes; then
2603                 version_type=linux
2604         else
2605                 version_type=irix
2606         fi ;;
2607   esac
2608   need_lib_prefix=no
2609   need_version=no
2610   soname_spec='${libname}${release}${shared_ext}$major'
2611   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2612   case $host_os in
2613   irix5* | nonstopux*)
2614     libsuff= shlibsuff=
2615     ;;
2616   *)
2617     case $LD in # libtool.m4 will add one of these switches to LD
2618     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2619       libsuff= shlibsuff= libmagic=32-bit;;
2620     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2621       libsuff=32 shlibsuff=N32 libmagic=N32;;
2622     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2623       libsuff=64 shlibsuff=64 libmagic=64-bit;;
2624     *) libsuff= shlibsuff= libmagic=never-match;;
2625     esac
2626     ;;
2627   esac
2628   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2629   shlibpath_overrides_runpath=no
2630   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2631   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2632   hardcode_into_libs=yes
2633   ;;
2635 # No shared lib support for Linux oldld, aout, or coff.
2636 linux*oldld* | linux*aout* | linux*coff*)
2637   dynamic_linker=no
2638   ;;
2640 # This must be Linux ELF.
2641 linux*)
2642   version_type=linux
2643   need_lib_prefix=no
2644   need_version=no
2645   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2646   soname_spec='${libname}${release}${shared_ext}$major'
2647   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2648   shlibpath_var=LD_LIBRARY_PATH
2649   shlibpath_overrides_runpath=no
2650   # This implies no fast_install, which is unacceptable.
2651   # Some rework will be needed to allow for fast_install
2652   # before this can be enabled.
2653   hardcode_into_libs=yes
2655   # Append ld.so.conf contents to the search path
2656   if test -f /etc/ld.so.conf; then
2657     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2658     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2659   fi
2661   # We used to test for /lib/ld.so.1 and disable shared libraries on
2662   # powerpc, because MkLinux only supported shared libraries with the
2663   # GNU dynamic linker.  Since this was broken with cross compilers,
2664   # most powerpc-linux boxes support dynamic linking these days and
2665   # people can always --disable-shared, the test was removed, and we
2666   # assume the GNU/Linux dynamic linker is in use.
2667   dynamic_linker='GNU/Linux ld.so'
2668   ;;
2670 knetbsd*-gnu)
2671   version_type=linux
2672   need_lib_prefix=no
2673   need_version=no
2674   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2675   soname_spec='${libname}${release}${shared_ext}$major'
2676   shlibpath_var=LD_LIBRARY_PATH
2677   shlibpath_overrides_runpath=no
2678   hardcode_into_libs=yes
2679   dynamic_linker='GNU ld.so'
2680   ;;
2682 netbsd*)
2683   version_type=sunos
2684   need_lib_prefix=no
2685   need_version=no
2686   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2687     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2688     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2689     dynamic_linker='NetBSD (a.out) ld.so'
2690   else
2691     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2692     soname_spec='${libname}${release}${shared_ext}$major'
2693     dynamic_linker='NetBSD ld.elf_so'
2694   fi
2695   shlibpath_var=LD_LIBRARY_PATH
2696   shlibpath_overrides_runpath=yes
2697   hardcode_into_libs=yes
2698   ;;
2700 newsos6)
2701   version_type=linux
2702   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2703   shlibpath_var=LD_LIBRARY_PATH
2704   shlibpath_overrides_runpath=yes
2705   ;;
2707 nto-qnx*)
2708   version_type=linux
2709   need_lib_prefix=no
2710   need_version=no
2711   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2712   soname_spec='${libname}${release}${shared_ext}$major'
2713   shlibpath_var=LD_LIBRARY_PATH
2714   shlibpath_overrides_runpath=yes
2715   ;;
2717 openbsd*)
2718   version_type=sunos
2719   sys_lib_dlsearch_path_spec="/usr/lib"
2720   need_lib_prefix=no
2721   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2722   case $host_os in
2723     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2724     *)                         need_version=no  ;;
2725   esac
2726   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2727   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2728   shlibpath_var=LD_LIBRARY_PATH
2729   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2730     case $host_os in
2731       openbsd2.[[89]] | openbsd2.[[89]].*)
2732         shlibpath_overrides_runpath=no
2733         ;;
2734       *)
2735         shlibpath_overrides_runpath=yes
2736         ;;
2737       esac
2738   else
2739     shlibpath_overrides_runpath=yes
2740   fi
2741   ;;
2743 os2*)
2744   libname_spec='$name'
2745   shrext_cmds=".dll"
2746   need_lib_prefix=no
2747   library_names_spec='$libname${shared_ext} $libname.a'
2748   dynamic_linker='OS/2 ld.exe'
2749   shlibpath_var=LIBPATH
2750   ;;
2752 osf3* | osf4* | osf5*)
2753   version_type=osf
2754   need_lib_prefix=no
2755   need_version=no
2756   soname_spec='${libname}${release}${shared_ext}$major'
2757   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2758   shlibpath_var=LD_LIBRARY_PATH
2759   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2760   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2761   ;;
2763 solaris*)
2764   version_type=linux
2765   need_lib_prefix=no
2766   need_version=no
2767   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2768   soname_spec='${libname}${release}${shared_ext}$major'
2769   shlibpath_var=LD_LIBRARY_PATH
2770   shlibpath_overrides_runpath=yes
2771   hardcode_into_libs=yes
2772   # ldd complains unless libraries are executable
2773   postinstall_cmds='chmod +x $lib'
2774   ;;
2776 sunos4*)
2777   version_type=sunos
2778   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2779   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2780   shlibpath_var=LD_LIBRARY_PATH
2781   shlibpath_overrides_runpath=yes
2782   if test "$with_gnu_ld" = yes; then
2783     need_lib_prefix=no
2784   fi
2785   need_version=yes
2786   ;;
2788 sysv4 | sysv4.3*)
2789   version_type=linux
2790   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2791   soname_spec='${libname}${release}${shared_ext}$major'
2792   shlibpath_var=LD_LIBRARY_PATH
2793   case $host_vendor in
2794     sni)
2795       shlibpath_overrides_runpath=no
2796       need_lib_prefix=no
2797       export_dynamic_flag_spec='${wl}-Blargedynsym'
2798       runpath_var=LD_RUN_PATH
2799       ;;
2800     siemens)
2801       need_lib_prefix=no
2802       ;;
2803     motorola)
2804       need_lib_prefix=no
2805       need_version=no
2806       shlibpath_overrides_runpath=no
2807       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2808       ;;
2809   esac
2810   ;;
2812 sysv4*MP*)
2813   if test -d /usr/nec ;then
2814     version_type=linux
2815     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2816     soname_spec='$libname${shared_ext}.$major'
2817     shlibpath_var=LD_LIBRARY_PATH
2818   fi
2819   ;;
2821 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2822   version_type=freebsd-elf
2823   need_lib_prefix=no
2824   need_version=no
2825   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2826   soname_spec='${libname}${release}${shared_ext}$major'
2827   shlibpath_var=LD_LIBRARY_PATH
2828   hardcode_into_libs=yes
2829   if test "$with_gnu_ld" = yes; then
2830     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2831     shlibpath_overrides_runpath=no
2832   else
2833     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2834     shlibpath_overrides_runpath=yes
2835     case $host_os in
2836       sco3.2v5*)
2837         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2838         ;;
2839     esac
2840   fi
2841   sys_lib_dlsearch_path_spec='/usr/lib'
2842   ;;
2844 uts4*)
2845   version_type=linux
2846   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2847   soname_spec='${libname}${release}${shared_ext}$major'
2848   shlibpath_var=LD_LIBRARY_PATH
2849   ;;
2852   dynamic_linker=no
2853   ;;
2854 esac
2855 AC_MSG_RESULT([$dynamic_linker])
2856 test "$dynamic_linker" = no && can_build_shared=no
2858 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2859 if test "$GCC" = yes; then
2860   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2862 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2865 # _LT_AC_TAGCONFIG
2866 # ----------------
2867 AC_DEFUN([_LT_AC_TAGCONFIG],
2868 [AC_ARG_WITH([tags],
2869     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2870         [include additional configurations @<:@automatic@:>@])],
2871     [tagnames="$withval"])
2873 if test -f "$ltmain" && test -n "$tagnames"; then
2874   if test ! -f "${ofile}"; then
2875     AC_MSG_WARN([output file `$ofile' does not exist])
2876   fi
2878   if test -z "$LTCC"; then
2879     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2880     if test -z "$LTCC"; then
2881       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2882     else
2883       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2884     fi
2885   fi
2886   if test -z "$LTCFLAGS"; then
2887     eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2888   fi
2890   # Extract list of available tagged configurations in $ofile.
2891   # Note that this assumes the entire list is on one line.
2892   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2894   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2895   for tagname in $tagnames; do
2896     IFS="$lt_save_ifs"
2897     # Check whether tagname contains only valid characters
2898     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2899     "") ;;
2900     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2901         ;;
2902     esac
2904     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2905     then
2906       AC_MSG_ERROR([tag name \"$tagname\" already exists])
2907     fi
2909     # Update the list of available tags.
2910     if test -n "$tagname"; then
2911       echo appending configuration tag \"$tagname\" to $ofile
2913       case $tagname in
2914       CXX)
2915         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2916             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2917             (test "X$CXX" != "Xg++"))) ; then
2918           AC_LIBTOOL_LANG_CXX_CONFIG
2919         else
2920           tagname=""
2921         fi
2922         ;;
2924       F77)
2925         if test -n "$F77" && test "X$F77" != "Xno"; then
2926           AC_LIBTOOL_LANG_F77_CONFIG
2927         else
2928           tagname=""
2929         fi
2930         ;;
2932       GCJ)
2933         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2934           AC_LIBTOOL_LANG_GCJ_CONFIG
2935         else
2936           tagname=""
2937         fi
2938         ;;
2940       RC)
2941         AC_LIBTOOL_LANG_RC_CONFIG
2942         ;;
2944       *)
2945         AC_MSG_ERROR([Unsupported tag name: $tagname])
2946         ;;
2947       esac
2949       # Append the new tag name to the list of available tags.
2950       if test -n "$tagname" ; then
2951       available_tags="$available_tags $tagname"
2952     fi
2953     fi
2954   done
2955   IFS="$lt_save_ifs"
2957   # Now substitute the updated list of available tags.
2958   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2959     mv "${ofile}T" "$ofile"
2960     chmod +x "$ofile"
2961   else
2962     rm -f "${ofile}T"
2963     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2964   fi
2966 ])# _LT_AC_TAGCONFIG
2969 # AC_LIBTOOL_DLOPEN
2970 # -----------------
2971 # enable checks for dlopen support
2972 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2973  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2974 ])# AC_LIBTOOL_DLOPEN
2977 # AC_LIBTOOL_WIN32_DLL
2978 # --------------------
2979 # declare package support for building win32 DLLs
2980 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2981 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2982 ])# AC_LIBTOOL_WIN32_DLL
2985 # AC_ENABLE_SHARED([DEFAULT])
2986 # ---------------------------
2987 # implement the --enable-shared flag
2988 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2989 AC_DEFUN([AC_ENABLE_SHARED],
2990 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2991 AC_ARG_ENABLE([shared],
2992     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2993         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2994     [p=${PACKAGE-default}
2995     case $enableval in
2996     yes) enable_shared=yes ;;
2997     no) enable_shared=no ;;
2998     *)
2999       enable_shared=no
3000       # Look at the argument we got.  We use all the common list separators.
3001       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3002       for pkg in $enableval; do
3003         IFS="$lt_save_ifs"
3004         if test "X$pkg" = "X$p"; then
3005           enable_shared=yes
3006         fi
3007       done
3008       IFS="$lt_save_ifs"
3009       ;;
3010     esac],
3011     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3012 ])# AC_ENABLE_SHARED
3015 # AC_DISABLE_SHARED
3016 # -----------------
3017 # set the default shared flag to --disable-shared
3018 AC_DEFUN([AC_DISABLE_SHARED],
3019 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3020 AC_ENABLE_SHARED(no)
3021 ])# AC_DISABLE_SHARED
3024 # AC_ENABLE_STATIC([DEFAULT])
3025 # ---------------------------
3026 # implement the --enable-static flag
3027 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3028 AC_DEFUN([AC_ENABLE_STATIC],
3029 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3030 AC_ARG_ENABLE([static],
3031     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3032         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3033     [p=${PACKAGE-default}
3034     case $enableval in
3035     yes) enable_static=yes ;;
3036     no) enable_static=no ;;
3037     *)
3038      enable_static=no
3039       # Look at the argument we got.  We use all the common list separators.
3040       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3041       for pkg in $enableval; do
3042         IFS="$lt_save_ifs"
3043         if test "X$pkg" = "X$p"; then
3044           enable_static=yes
3045         fi
3046       done
3047       IFS="$lt_save_ifs"
3048       ;;
3049     esac],
3050     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3051 ])# AC_ENABLE_STATIC
3054 # AC_DISABLE_STATIC
3055 # -----------------
3056 # set the default static flag to --disable-static
3057 AC_DEFUN([AC_DISABLE_STATIC],
3058 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3059 AC_ENABLE_STATIC(no)
3060 ])# AC_DISABLE_STATIC
3063 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3064 # ---------------------------------
3065 # implement the --enable-fast-install flag
3066 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3067 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3068 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3069 AC_ARG_ENABLE([fast-install],
3070     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3071     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3072     [p=${PACKAGE-default}
3073     case $enableval in
3074     yes) enable_fast_install=yes ;;
3075     no) enable_fast_install=no ;;
3076     *)
3077       enable_fast_install=no
3078       # Look at the argument we got.  We use all the common list separators.
3079       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3080       for pkg in $enableval; do
3081         IFS="$lt_save_ifs"
3082         if test "X$pkg" = "X$p"; then
3083           enable_fast_install=yes
3084         fi
3085       done
3086       IFS="$lt_save_ifs"
3087       ;;
3088     esac],
3089     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3090 ])# AC_ENABLE_FAST_INSTALL
3093 # AC_DISABLE_FAST_INSTALL
3094 # -----------------------
3095 # set the default to --disable-fast-install
3096 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3097 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3098 AC_ENABLE_FAST_INSTALL(no)
3099 ])# AC_DISABLE_FAST_INSTALL
3102 # AC_LIBTOOL_PICMODE([MODE])
3103 # --------------------------
3104 # implement the --with-pic flag
3105 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3106 AC_DEFUN([AC_LIBTOOL_PICMODE],
3107 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3108 pic_mode=ifelse($#,1,$1,default)
3109 ])# AC_LIBTOOL_PICMODE
3112 # AC_PROG_EGREP
3113 # -------------
3114 # This is predefined starting with Autoconf 2.54, so this conditional
3115 # definition can be removed once we require Autoconf 2.54 or later.
3116 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3117 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3118    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3119     then ac_cv_prog_egrep='grep -E'
3120     else ac_cv_prog_egrep='egrep'
3121     fi])
3122  EGREP=$ac_cv_prog_egrep
3123  AC_SUBST([EGREP])
3124 ])])
3127 # AC_PATH_TOOL_PREFIX
3128 # -------------------
3129 # find a file program which can recognise shared library
3130 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3131 [AC_REQUIRE([AC_PROG_EGREP])dnl
3132 AC_MSG_CHECKING([for $1])
3133 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3134 [case $MAGIC_CMD in
3135 [[\\/*] |  ?:[\\/]*])
3136   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3137   ;;
3139   lt_save_MAGIC_CMD="$MAGIC_CMD"
3140   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3141 dnl $ac_dummy forces splitting on constant user-supplied paths.
3142 dnl POSIX.2 word splitting is done only on the output of word expansions,
3143 dnl not every word.  This closes a longstanding sh security hole.
3144   ac_dummy="ifelse([$2], , $PATH, [$2])"
3145   for ac_dir in $ac_dummy; do
3146     IFS="$lt_save_ifs"
3147     test -z "$ac_dir" && ac_dir=.
3148     if test -f $ac_dir/$1; then
3149       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3150       if test -n "$file_magic_test_file"; then
3151         case $deplibs_check_method in
3152         "file_magic "*)
3153           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3154           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3155           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3156             $EGREP "$file_magic_regex" > /dev/null; then
3157             :
3158           else
3159             cat <<EOF 1>&2
3161 *** Warning: the command libtool uses to detect shared libraries,
3162 *** $file_magic_cmd, produces output that libtool cannot recognize.
3163 *** The result is that libtool may fail to recognize shared libraries
3164 *** as such.  This will affect the creation of libtool libraries that
3165 *** depend on shared libraries, but programs linked with such libtool
3166 *** libraries will work regardless of this problem.  Nevertheless, you
3167 *** may want to report the problem to your system manager and/or to
3168 *** bug-libtool@gnu.org
3171           fi ;;
3172         esac
3173       fi
3174       break
3175     fi
3176   done
3177   IFS="$lt_save_ifs"
3178   MAGIC_CMD="$lt_save_MAGIC_CMD"
3179   ;;
3180 esac])
3181 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3182 if test -n "$MAGIC_CMD"; then
3183   AC_MSG_RESULT($MAGIC_CMD)
3184 else
3185   AC_MSG_RESULT(no)
3187 ])# AC_PATH_TOOL_PREFIX
3190 # AC_PATH_MAGIC
3191 # -------------
3192 # find a file program which can recognise a shared library
3193 AC_DEFUN([AC_PATH_MAGIC],
3194 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3195 if test -z "$lt_cv_path_MAGIC_CMD"; then
3196   if test -n "$ac_tool_prefix"; then
3197     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3198   else
3199     MAGIC_CMD=:
3200   fi
3202 ])# AC_PATH_MAGIC
3205 # AC_PROG_LD
3206 # ----------
3207 # find the pathname to the GNU or non-GNU linker
3208 AC_DEFUN([AC_PROG_LD],
3209 [AC_ARG_WITH([gnu-ld],
3210     [AC_HELP_STRING([--with-gnu-ld],
3211         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3212     [test "$withval" = no || with_gnu_ld=yes],
3213     [with_gnu_ld=no])
3214 AC_REQUIRE([LT_AC_PROG_SED])dnl
3215 AC_REQUIRE([AC_PROG_CC])dnl
3216 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3217 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3218 ac_prog=ld
3219 if test "$GCC" = yes; then
3220   # Check if gcc -print-prog-name=ld gives a path.
3221   AC_MSG_CHECKING([for ld used by $CC])
3222   case $host in
3223   *-*-mingw*)
3224     # gcc leaves a trailing carriage return which upsets mingw
3225     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3226   *)
3227     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3228   esac
3229   case $ac_prog in
3230     # Accept absolute paths.
3231     [[\\/]]* | ?:[[\\/]]*)
3232       re_direlt='/[[^/]][[^/]]*/\.\./'
3233       # Canonicalize the pathname of ld
3234       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3235       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3236         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3237       done
3238       test -z "$LD" && LD="$ac_prog"
3239       ;;
3240   "")
3241     # If it fails, then pretend we aren't using GCC.
3242     ac_prog=ld
3243     ;;
3244   *)
3245     # If it is relative, then search for the first ld in PATH.
3246     with_gnu_ld=unknown
3247     ;;
3248   esac
3249 elif test "$with_gnu_ld" = yes; then
3250   AC_MSG_CHECKING([for GNU ld])
3251 else
3252   AC_MSG_CHECKING([for non-GNU ld])
3254 AC_CACHE_VAL(lt_cv_path_LD,
3255 [if test -z "$LD"; then
3256   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3257   for ac_dir in $PATH; do
3258     IFS="$lt_save_ifs"
3259     test -z "$ac_dir" && ac_dir=.
3260     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3261       lt_cv_path_LD="$ac_dir/$ac_prog"
3262       # Check to see if the program is GNU ld.  I'd rather use --version,
3263       # but apparently some variants of GNU ld only accept -v.
3264       # Break only if it was the GNU/non-GNU ld that we prefer.
3265       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3266       *GNU* | *'with BFD'*)
3267         test "$with_gnu_ld" != no && break
3268         ;;
3269       *)
3270         test "$with_gnu_ld" != yes && break
3271         ;;
3272       esac
3273     fi
3274   done
3275   IFS="$lt_save_ifs"
3276 else
3277   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3278 fi])
3279 LD="$lt_cv_path_LD"
3280 if test -n "$LD"; then
3281   AC_MSG_RESULT($LD)
3282 else
3283   AC_MSG_RESULT(no)
3285 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3286 AC_PROG_LD_GNU
3287 ])# AC_PROG_LD
3290 # AC_PROG_LD_GNU
3291 # --------------
3292 AC_DEFUN([AC_PROG_LD_GNU],
3293 [AC_REQUIRE([AC_PROG_EGREP])dnl
3294 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3295 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3296 case `$LD -v 2>&1 </dev/null` in
3297 *GNU* | *'with BFD'*)
3298   lt_cv_prog_gnu_ld=yes
3299   ;;
3301   lt_cv_prog_gnu_ld=no
3302   ;;
3303 esac])
3304 with_gnu_ld=$lt_cv_prog_gnu_ld
3305 ])# AC_PROG_LD_GNU
3308 # AC_PROG_LD_RELOAD_FLAG
3309 # ----------------------
3310 # find reload flag for linker
3311 #   -- PORTME Some linkers may need a different reload flag.
3312 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3313 [AC_CACHE_CHECK([for $LD option to reload object files],
3314   lt_cv_ld_reload_flag,
3315   [lt_cv_ld_reload_flag='-r'])
3316 reload_flag=$lt_cv_ld_reload_flag
3317 case $reload_flag in
3318 "" | " "*) ;;
3319 *) reload_flag=" $reload_flag" ;;
3320 esac
3321 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3322 case $host_os in
3323   darwin*)
3324     if test "$GCC" = yes; then
3325       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3326     else
3327       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3328     fi
3329     ;;
3330 esac
3331 ])# AC_PROG_LD_RELOAD_FLAG
3334 # AC_DEPLIBS_CHECK_METHOD
3335 # -----------------------
3336 # how to check for library dependencies
3337 #  -- PORTME fill in with the dynamic library characteristics
3338 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3339 [AC_CACHE_CHECK([how to recognise dependent libraries],
3340 lt_cv_deplibs_check_method,
3341 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3342 lt_cv_file_magic_test_file=
3343 lt_cv_deplibs_check_method='unknown'
3344 # Need to set the preceding variable on all platforms that support
3345 # interlibrary dependencies.
3346 # 'none' -- dependencies not supported.
3347 # `unknown' -- same as none, but documents that we really don't know.
3348 # 'pass_all' -- all dependencies passed with no checks.
3349 # 'test_compile' -- check by making test program.
3350 # 'file_magic [[regex]]' -- check by looking for files in library path
3351 # which responds to the $file_magic_cmd with a given extended regex.
3352 # If you have `file' or equivalent on your system and you're not sure
3353 # whether `pass_all' will *always* work, you probably want this one.
3355 case $host_os in
3356 aix4* | aix5*)
3357   lt_cv_deplibs_check_method=pass_all
3358   ;;
3360 beos*)
3361   lt_cv_deplibs_check_method=pass_all
3362   ;;
3364 bsdi[[45]]*)
3365   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3366   lt_cv_file_magic_cmd='/usr/bin/file -L'
3367   lt_cv_file_magic_test_file=/shlib/libc.so
3368   ;;
3370 cygwin*)
3371   # func_win32_libid is a shell function defined in ltmain.sh
3372   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3373   lt_cv_file_magic_cmd='func_win32_libid'
3374   ;;
3376 mingw* | pw32*)
3377   # Base MSYS/MinGW do not provide the 'file' command needed by
3378   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3379   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3380   lt_cv_file_magic_cmd='$OBJDUMP -f'
3381   ;;
3383 darwin* | rhapsody*)
3384   lt_cv_deplibs_check_method=pass_all
3385   ;;
3387 freebsd* | kfreebsd*-gnu | dragonfly*)
3388   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3389     case $host_cpu in
3390     i*86 )
3391       # Not sure whether the presence of OpenBSD here was a mistake.
3392       # Let's accept both of them until this is cleared up.
3393       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3394       lt_cv_file_magic_cmd=/usr/bin/file
3395       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3396       ;;
3397     esac
3398   else
3399     lt_cv_deplibs_check_method=pass_all
3400   fi
3401   ;;
3403 gnu*)
3404   lt_cv_deplibs_check_method=pass_all
3405   ;;
3407 hpux10.20* | hpux11*)
3408   lt_cv_file_magic_cmd=/usr/bin/file
3409   case $host_cpu in
3410   ia64*)
3411     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3412     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3413     ;;
3414   hppa*64*)
3415     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3416     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3417     ;;
3418   *)
3419     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3420     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3421     ;;
3422   esac
3423   ;;
3425 interix3*)
3426   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3427   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3428   ;;
3430 irix5* | irix6* | nonstopux*)
3431   case $LD in
3432   *-32|*"-32 ") libmagic=32-bit;;
3433   *-n32|*"-n32 ") libmagic=N32;;
3434   *-64|*"-64 ") libmagic=64-bit;;
3435   *) libmagic=never-match;;
3436   esac
3437   lt_cv_deplibs_check_method=pass_all
3438   ;;
3440 # This must be Linux ELF.
3441 linux*)
3442   lt_cv_deplibs_check_method=pass_all
3443   ;;
3445 netbsd*)
3446   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3447     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3448   else
3449     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3450   fi
3451   ;;
3453 newos6*)
3454   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3455   lt_cv_file_magic_cmd=/usr/bin/file
3456   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3457   ;;
3459 nto-qnx*)
3460   lt_cv_deplibs_check_method=unknown
3461   ;;
3463 openbsd*)
3464   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3465     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3466   else
3467     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3468   fi
3469   ;;
3471 osf3* | osf4* | osf5*)
3472   lt_cv_deplibs_check_method=pass_all
3473   ;;
3475 solaris*)
3476   lt_cv_deplibs_check_method=pass_all
3477   ;;
3479 sysv4 | sysv4.3*)
3480   case $host_vendor in
3481   motorola)
3482     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]]'
3483     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3484     ;;
3485   ncr)
3486     lt_cv_deplibs_check_method=pass_all
3487     ;;
3488   sequent)
3489     lt_cv_file_magic_cmd='/bin/file'
3490     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3491     ;;
3492   sni)
3493     lt_cv_file_magic_cmd='/bin/file'
3494     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3495     lt_cv_file_magic_test_file=/lib/libc.so
3496     ;;
3497   siemens)
3498     lt_cv_deplibs_check_method=pass_all
3499     ;;
3500   pc)
3501     lt_cv_deplibs_check_method=pass_all
3502     ;;
3503   esac
3504   ;;
3506 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3507   lt_cv_deplibs_check_method=pass_all
3508   ;;
3509 esac
3511 file_magic_cmd=$lt_cv_file_magic_cmd
3512 deplibs_check_method=$lt_cv_deplibs_check_method
3513 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3514 ])# AC_DEPLIBS_CHECK_METHOD
3517 # AC_PROG_NM
3518 # ----------
3519 # find the pathname to a BSD-compatible name lister
3520 AC_DEFUN([AC_PROG_NM],
3521 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3522 [if test -n "$NM"; then
3523   # Let the user override the test.
3524   lt_cv_path_NM="$NM"
3525 else
3526   lt_nm_to_check="${ac_tool_prefix}nm"
3527   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3528     lt_nm_to_check="$lt_nm_to_check nm"
3529   fi
3530   for lt_tmp_nm in $lt_nm_to_check; do
3531     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3532     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3533       IFS="$lt_save_ifs"
3534       test -z "$ac_dir" && ac_dir=.
3535       tmp_nm="$ac_dir/$lt_tmp_nm"
3536       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3537         # Check to see if the nm accepts a BSD-compat flag.
3538         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3539         #   nm: unknown option "B" ignored
3540         # Tru64's nm complains that /dev/null is an invalid object file
3541         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3542         */dev/null* | *'Invalid file or object type'*)
3543           lt_cv_path_NM="$tmp_nm -B"
3544           break
3545           ;;
3546         *)
3547           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3548           */dev/null*)
3549             lt_cv_path_NM="$tmp_nm -p"
3550             break
3551             ;;
3552           *)
3553             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3554             continue # so that we can try to find one that supports BSD flags
3555             ;;
3556           esac
3557           ;;
3558         esac
3559       fi
3560     done
3561     IFS="$lt_save_ifs"
3562   done
3563   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3564 fi])
3565 NM="$lt_cv_path_NM"
3566 ])# AC_PROG_NM
3569 # AC_CHECK_LIBM
3570 # -------------
3571 # check for math library
3572 AC_DEFUN([AC_CHECK_LIBM],
3573 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3574 LIBM=
3575 case $host in
3576 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3577   # These system don't have libm, or don't need it
3578   ;;
3579 *-ncr-sysv4.3*)
3580   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3581   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3582   ;;
3584   AC_CHECK_LIB(m, cos, LIBM="-lm")
3585   ;;
3586 esac
3587 ])# AC_CHECK_LIBM
3590 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3591 # -----------------------------------
3592 # sets LIBLTDL to the link flags for the libltdl convenience library and
3593 # LTDLINCL to the include flags for the libltdl header and adds
3594 # --enable-ltdl-convenience to the configure arguments.  Note that
3595 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3596 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3597 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3598 # (note the single quotes!).  If your package is not flat and you're not
3599 # using automake, define top_builddir and top_srcdir appropriately in
3600 # the Makefiles.
3601 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3602 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3603   case $enable_ltdl_convenience in
3604   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3605   "") enable_ltdl_convenience=yes
3606       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3607   esac
3608   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3609   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3610   # For backwards non-gettext consistent compatibility...
3611   INCLTDL="$LTDLINCL"
3612 ])# AC_LIBLTDL_CONVENIENCE
3615 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3616 # -----------------------------------
3617 # sets LIBLTDL to the link flags for the libltdl installable library and
3618 # LTDLINCL to the include flags for the libltdl header and adds
3619 # --enable-ltdl-install to the configure arguments.  Note that
3620 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3621 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3622 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3623 # '${top_srcdir}/' (note the single quotes!).  If your package is not
3624 # flat and you're not using automake, define top_builddir and top_srcdir
3625 # appropriately in the Makefiles.
3626 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3627 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3628 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3629   AC_CHECK_LIB(ltdl, lt_dlinit,
3630   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3631   [if test x"$enable_ltdl_install" = xno; then
3632      AC_MSG_WARN([libltdl not installed, but installation disabled])
3633    else
3634      enable_ltdl_install=yes
3635    fi
3636   ])
3637   if test x"$enable_ltdl_install" = x"yes"; then
3638     ac_configure_args="$ac_configure_args --enable-ltdl-install"
3639     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3640     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3641   else
3642     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3643     LIBLTDL="-lltdl"
3644     LTDLINCL=
3645   fi
3646   # For backwards non-gettext consistent compatibility...
3647   INCLTDL="$LTDLINCL"
3648 ])# AC_LIBLTDL_INSTALLABLE
3651 # AC_LIBTOOL_CXX
3652 # --------------
3653 # enable support for C++ libraries
3654 AC_DEFUN([AC_LIBTOOL_CXX],
3655 [AC_REQUIRE([_LT_AC_LANG_CXX])
3656 ])# AC_LIBTOOL_CXX
3659 # _LT_AC_LANG_CXX
3660 # ---------------
3661 AC_DEFUN([_LT_AC_LANG_CXX],
3662 [AC_REQUIRE([AC_PROG_CXX])
3663 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3664 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3665 ])# _LT_AC_LANG_CXX
3667 # _LT_AC_PROG_CXXCPP
3668 # ------------------
3669 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3671 AC_REQUIRE([AC_PROG_CXX])
3672 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3673     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3674     (test "X$CXX" != "Xg++"))) ; then
3675   AC_PROG_CXXCPP
3677 ])# _LT_AC_PROG_CXXCPP
3679 # AC_LIBTOOL_F77
3680 # --------------
3681 # enable support for Fortran 77 libraries
3682 AC_DEFUN([AC_LIBTOOL_F77],
3683 [AC_REQUIRE([_LT_AC_LANG_F77])
3684 ])# AC_LIBTOOL_F77
3687 # _LT_AC_LANG_F77
3688 # ---------------
3689 AC_DEFUN([_LT_AC_LANG_F77],
3690 [AC_REQUIRE([AC_PROG_F77])
3691 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3692 ])# _LT_AC_LANG_F77
3695 # AC_LIBTOOL_GCJ
3696 # --------------
3697 # enable support for GCJ libraries
3698 AC_DEFUN([AC_LIBTOOL_GCJ],
3699 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3700 ])# AC_LIBTOOL_GCJ
3703 # _LT_AC_LANG_GCJ
3704 # ---------------
3705 AC_DEFUN([_LT_AC_LANG_GCJ],
3706 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3707   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3708     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3709       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3710          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3711            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3712 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3713 ])# _LT_AC_LANG_GCJ
3716 # AC_LIBTOOL_RC
3717 # -------------
3718 # enable support for Windows resource files
3719 AC_DEFUN([AC_LIBTOOL_RC],
3720 [AC_REQUIRE([LT_AC_PROG_RC])
3721 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3722 ])# AC_LIBTOOL_RC
3725 # AC_LIBTOOL_LANG_C_CONFIG
3726 # ------------------------
3727 # Ensure that the configuration vars for the C compiler are
3728 # suitably defined.  Those variables are subsequently used by
3729 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3730 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3731 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3732 [lt_save_CC="$CC"
3733 AC_LANG_PUSH(C)
3735 # Source file extension for C test sources.
3736 ac_ext=c
3738 # Object file extension for compiled C test sources.
3739 objext=o
3740 _LT_AC_TAGVAR(objext, $1)=$objext
3742 # Code to be used in simple compile tests
3743 lt_simple_compile_test_code="int some_variable = 0;\n"
3745 # Code to be used in simple link tests
3746 lt_simple_link_test_code='int main(){return(0);}\n'
3748 _LT_AC_SYS_COMPILER
3750 # save warnings/boilerplate of simple test code
3751 _LT_COMPILER_BOILERPLATE
3752 _LT_LINKER_BOILERPLATE
3754 ## CAVEAT EMPTOR:
3755 ## There is no encapsulation within the following macros, do not change
3756 ## the running order or otherwise move them around unless you know exactly
3757 ## what you are doing...
3758 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3759 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3760 AC_LIBTOOL_PROG_CC_C_O($1)
3761 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3762 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3763 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3764 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3765 AC_LIBTOOL_SYS_LIB_STRIP
3766 AC_LIBTOOL_DLOPEN_SELF
3768 # Report which library types will actually be built
3769 AC_MSG_CHECKING([if libtool supports shared libraries])
3770 AC_MSG_RESULT([$can_build_shared])
3772 AC_MSG_CHECKING([whether to build shared libraries])
3773 test "$can_build_shared" = "no" && enable_shared=no
3775 # On AIX, shared libraries and static libraries use the same namespace, and
3776 # are all built from PIC.
3777 case $host_os in
3778 aix3*)
3779   test "$enable_shared" = yes && enable_static=no
3780   if test -n "$RANLIB"; then
3781     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3782     postinstall_cmds='$RANLIB $lib'
3783   fi
3784   ;;
3786 aix4* | aix5*)
3787   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3788     test "$enable_shared" = yes && enable_static=no
3789   fi
3790     ;;
3791 esac
3792 AC_MSG_RESULT([$enable_shared])
3794 AC_MSG_CHECKING([whether to build static libraries])
3795 # Make sure either enable_shared or enable_static is yes.
3796 test "$enable_shared" = yes || enable_static=yes
3797 AC_MSG_RESULT([$enable_static])
3799 AC_LIBTOOL_CONFIG($1)
3801 AC_LANG_POP
3802 CC="$lt_save_CC"
3803 ])# AC_LIBTOOL_LANG_C_CONFIG
3806 # AC_LIBTOOL_LANG_CXX_CONFIG
3807 # --------------------------
3808 # Ensure that the configuration vars for the C compiler are
3809 # suitably defined.  Those variables are subsequently used by
3810 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3811 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3812 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3813 [AC_LANG_PUSH(C++)
3814 AC_REQUIRE([AC_PROG_CXX])
3815 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3817 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3818 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3819 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3820 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3821 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3822 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3823 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3824 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3825 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3826 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3827 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3828 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3829 _LT_AC_TAGVAR(module_cmds, $1)=
3830 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3831 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3832 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3833 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3834 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3835 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3837 # Dependencies to place before and after the object being linked:
3838 _LT_AC_TAGVAR(predep_objects, $1)=
3839 _LT_AC_TAGVAR(postdep_objects, $1)=
3840 _LT_AC_TAGVAR(predeps, $1)=
3841 _LT_AC_TAGVAR(postdeps, $1)=
3842 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3844 # Source file extension for C++ test sources.
3845 ac_ext=cpp
3847 # Object file extension for compiled C++ test sources.
3848 objext=o
3849 _LT_AC_TAGVAR(objext, $1)=$objext
3851 # Code to be used in simple compile tests
3852 lt_simple_compile_test_code="int some_variable = 0;\n"
3854 # Code to be used in simple link tests
3855 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3857 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3858 _LT_AC_SYS_COMPILER
3860 # save warnings/boilerplate of simple test code
3861 _LT_COMPILER_BOILERPLATE
3862 _LT_LINKER_BOILERPLATE
3864 # Allow CC to be a program name with arguments.
3865 lt_save_CC=$CC
3866 lt_save_LD=$LD
3867 lt_save_GCC=$GCC
3868 GCC=$GXX
3869 lt_save_with_gnu_ld=$with_gnu_ld
3870 lt_save_path_LD=$lt_cv_path_LD
3871 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3872   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3873 else
3874   $as_unset lt_cv_prog_gnu_ld
3876 if test -n "${lt_cv_path_LDCXX+set}"; then
3877   lt_cv_path_LD=$lt_cv_path_LDCXX
3878 else
3879   $as_unset lt_cv_path_LD
3881 test -z "${LDCXX+set}" || LD=$LDCXX
3882 CC=${CXX-"c++"}
3883 compiler=$CC
3884 _LT_AC_TAGVAR(compiler, $1)=$CC
3885 _LT_CC_BASENAME([$compiler])
3887 # We don't want -fno-exception wen compiling C++ code, so set the
3888 # no_builtin_flag separately
3889 if test "$GXX" = yes; then
3890   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3891 else
3892   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3895 if test "$GXX" = yes; then
3896   # Set up default GNU C++ configuration
3898   AC_PROG_LD
3900   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3901   # archiving commands below assume that GNU ld is being used.
3902   if test "$with_gnu_ld" = yes; then
3903     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3904     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3906     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3907     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3909     # If archive_cmds runs LD, not CC, wlarc should be empty
3910     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3911     #     investigate it a little bit more. (MM)
3912     wlarc='${wl}'
3914     # ancient GNU ld didn't support --whole-archive et. al.
3915     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3916         grep 'no-whole-archive' > /dev/null; then
3917       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3918     else
3919       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3920     fi
3921   else
3922     with_gnu_ld=no
3923     wlarc=
3925     # A generic and very simple default shared library creation
3926     # command for GNU C++ for the case where it uses the native
3927     # linker, instead of GNU ld.  If possible, this setting should
3928     # overridden to take advantage of the native linker features on
3929     # the platform it is being used on.
3930     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3931   fi
3933   # Commands to make compiler produce verbose output that lists
3934   # what "hidden" libraries, object files and flags are used when
3935   # linking a shared library.
3936   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3938 else
3939   GXX=no
3940   with_gnu_ld=no
3941   wlarc=
3944 # PORTME: fill in a description of your system's C++ link characteristics
3945 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3946 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3947 case $host_os in
3948   aix3*)
3949     # FIXME: insert proper C++ library support
3950     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3951     ;;
3952   aix4* | aix5*)
3953     if test "$host_cpu" = ia64; then
3954       # On IA64, the linker does run time linking by default, so we don't
3955       # have to do anything special.
3956       aix_use_runtimelinking=no
3957       exp_sym_flag='-Bexport'
3958       no_entry_flag=""
3959     else
3960       aix_use_runtimelinking=no
3962       # Test if we are trying to use run time linking or normal
3963       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3964       # need to do runtime linking.
3965       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3966         for ld_flag in $LDFLAGS; do
3967           case $ld_flag in
3968           *-brtl*)
3969             aix_use_runtimelinking=yes
3970             break
3971             ;;
3972           esac
3973         done
3974         ;;
3975       esac
3977       exp_sym_flag='-bexport'
3978       no_entry_flag='-bnoentry'
3979     fi
3981     # When large executables or shared objects are built, AIX ld can
3982     # have problems creating the table of contents.  If linking a library
3983     # or program results in "error TOC overflow" add -mminimal-toc to
3984     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3985     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3987     _LT_AC_TAGVAR(archive_cmds, $1)=''
3988     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3989     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3990     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3992     if test "$GXX" = yes; then
3993       case $host_os in aix4.[[012]]|aix4.[[012]].*)
3994       # We only want to do this on AIX 4.2 and lower, the check
3995       # below for broken collect2 doesn't work under 4.3+
3996         collect2name=`${CC} -print-prog-name=collect2`
3997         if test -f "$collect2name" && \
3998            strings "$collect2name" | grep resolve_lib_name >/dev/null
3999         then
4000           # We have reworked collect2
4001           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4002         else
4003           # We have old collect2
4004           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4005           # It fails to find uninstalled libraries when the uninstalled
4006           # path is not listed in the libpath.  Setting hardcode_minus_L
4007           # to unsupported forces relinking
4008           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4009           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4010           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4011         fi
4012         ;;
4013       esac
4014       shared_flag='-shared'
4015       if test "$aix_use_runtimelinking" = yes; then
4016         shared_flag="$shared_flag "'${wl}-G'
4017       fi
4018     else
4019       # not using gcc
4020       if test "$host_cpu" = ia64; then
4021         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4022         # chokes on -Wl,-G. The following line is correct:
4023         shared_flag='-G'
4024       else
4025         if test "$aix_use_runtimelinking" = yes; then
4026           shared_flag='${wl}-G'
4027         else
4028           shared_flag='${wl}-bM:SRE'
4029         fi
4030       fi
4031     fi
4033     # It seems that -bexpall does not export symbols beginning with
4034     # underscore (_), so it is better to generate a list of symbols to export.
4035     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4036     if test "$aix_use_runtimelinking" = yes; then
4037       # Warning - without using the other runtime loading flags (-brtl),
4038       # -berok will link without error, but may produce a broken library.
4039       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4040       # Determine the default libpath from the value encoded in an empty executable.
4041       _LT_AC_SYS_LIBPATH_AIX
4042       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4044       _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4045      else
4046       if test "$host_cpu" = ia64; then
4047         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4048         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4049         _LT_AC_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"
4050       else
4051         # Determine the default libpath from the value encoded in an empty executable.
4052         _LT_AC_SYS_LIBPATH_AIX
4053         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4054         # Warning - without using the other run time loading flags,
4055         # -berok will link without error, but may produce a broken library.
4056         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4057         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4058         # Exported symbols can be pulled into shared objects from archives
4059         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4060         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4061         # This is similar to how AIX traditionally builds its shared libraries.
4062         _LT_AC_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'
4063       fi
4064     fi
4065     ;;
4067   beos*)
4068     if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4069       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4070       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4071       # support --undefined.  This deserves some investigation.  FIXME
4072       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4073     else
4074       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4075     fi
4076     ;;
4078   chorus*)
4079     case $cc_basename in
4080       *)
4081         # FIXME: insert proper C++ library support
4082         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4083         ;;
4084     esac
4085     ;;
4087   cygwin* | mingw* | pw32*)
4088     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4089     # as there is no search path for DLLs.
4090     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4091     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4092     _LT_AC_TAGVAR(always_export_symbols, $1)=no
4093     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4095     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4096       _LT_AC_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'
4097       # If the export-symbols file already is a .def file (1st line
4098       # is EXPORTS), use it as is; otherwise, prepend...
4099       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4100         cp $export_symbols $output_objdir/$soname.def;
4101       else
4102         echo EXPORTS > $output_objdir/$soname.def;
4103         cat $export_symbols >> $output_objdir/$soname.def;
4104       fi~
4105       $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'
4106     else
4107       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4108     fi
4109   ;;
4110       darwin* | rhapsody*)
4111         case $host_os in
4112         rhapsody* | darwin1.[[012]])
4113          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4114          ;;
4115        *) # Darwin 1.3 on
4116          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4117            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4118          else
4119            case ${MACOSX_DEPLOYMENT_TARGET} in
4120              10.[[012]])
4121                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4122                ;;
4123              10.*)
4124                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4125                ;;
4126            esac
4127          fi
4128          ;;
4129         esac
4130       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4131       _LT_AC_TAGVAR(hardcode_direct, $1)=no
4132       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4133       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4134       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4135       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4137     if test "$GXX" = yes ; then
4138       lt_int_apple_cc_single_mod=no
4139       output_verbose_link_cmd='echo'
4140       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4141        lt_int_apple_cc_single_mod=yes
4142       fi
4143       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4144        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4145       else
4146           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4147         fi
4148         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4149         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4150           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4151             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4152           else
4153             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4154           fi
4155             _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4156       else
4157       case $cc_basename in
4158         xlc*)
4159          output_verbose_link_cmd='echo'
4160           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4161           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4162           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4163           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4164           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4165           ;;
4166        *)
4167          _LT_AC_TAGVAR(ld_shlibs, $1)=no
4168           ;;
4169       esac
4170       fi
4171         ;;
4173   dgux*)
4174     case $cc_basename in
4175       ec++*)
4176         # FIXME: insert proper C++ library support
4177         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4178         ;;
4179       ghcx*)
4180         # Green Hills C++ Compiler
4181         # FIXME: insert proper C++ library support
4182         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4183         ;;
4184       *)
4185         # FIXME: insert proper C++ library support
4186         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4187         ;;
4188     esac
4189     ;;
4190   freebsd[[12]]*)
4191     # C++ shared libraries reported to be fairly broken before switch to ELF
4192     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4193     ;;
4194   freebsd-elf*)
4195     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4196     ;;
4197   freebsd* | kfreebsd*-gnu | dragonfly*)
4198     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4199     # conventions
4200     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4201     ;;
4202   gnu*)
4203     ;;
4204   hpux9*)
4205     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4206     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4207     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4208     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4209     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4210                                 # but as the default
4211                                 # location of the library.
4213     case $cc_basename in
4214     CC*)
4215       # FIXME: insert proper C++ library support
4216       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4217       ;;
4218     aCC*)
4219       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4220       # Commands to make compiler produce verbose output that lists
4221       # what "hidden" libraries, object files and flags are used when
4222       # linking a shared library.
4223       #
4224       # There doesn't appear to be a way to prevent this compiler from
4225       # explicitly linking system object files so we need to strip them
4226       # from the output so that they don't get included in the library
4227       # dependencies.
4228       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4229       ;;
4230     *)
4231       if test "$GXX" = yes; then
4232         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4233       else
4234         # FIXME: insert proper C++ library support
4235         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4236       fi
4237       ;;
4238     esac
4239     ;;
4240   hpux10*|hpux11*)
4241     if test $with_gnu_ld = no; then
4242       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4243       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4245       case $host_cpu in
4246       hppa*64*|ia64*)
4247         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4248         ;;
4249       *)
4250         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4251         ;;
4252       esac
4253     fi
4254     case $host_cpu in
4255     hppa*64*|ia64*)
4256       _LT_AC_TAGVAR(hardcode_direct, $1)=no
4257       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4258       ;;
4259     *)
4260       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4261       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4262                                               # but as the default
4263                                               # location of the library.
4264       ;;
4265     esac
4267     case $cc_basename in
4268       CC*)
4269         # FIXME: insert proper C++ library support
4270         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4271         ;;
4272       aCC*)
4273         case $host_cpu in
4274         hppa*64*)
4275           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4276           ;;
4277         ia64*)
4278           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4279           ;;
4280         *)
4281           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4282           ;;
4283         esac
4284         # Commands to make compiler produce verbose output that lists
4285         # what "hidden" libraries, object files and flags are used when
4286         # linking a shared library.
4287         #
4288         # There doesn't appear to be a way to prevent this compiler from
4289         # explicitly linking system object files so we need to strip them
4290         # from the output so that they don't get included in the library
4291         # dependencies.
4292         output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4293         ;;
4294       *)
4295         if test "$GXX" = yes; then
4296           if test $with_gnu_ld = no; then
4297             case $host_cpu in
4298             hppa*64*)
4299               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4300               ;;
4301             ia64*)
4302               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4303               ;;
4304             *)
4305               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4306               ;;
4307             esac
4308           fi
4309         else
4310           # FIXME: insert proper C++ library support
4311           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312         fi
4313         ;;
4314     esac
4315     ;;
4316   interix3*)
4317     _LT_AC_TAGVAR(hardcode_direct, $1)=no
4318     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4319     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4320     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4321     # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4322     # Instead, shared libraries are loaded at an image base (0x10000000 by
4323     # default) and relocated if they conflict, which is a slow very memory
4324     # consuming and fragmenting process.  To avoid this, we pick a random,
4325     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4326     # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4327     _LT_AC_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'
4328     _LT_AC_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'
4329     ;;
4330   irix5* | irix6*)
4331     case $cc_basename in
4332       CC*)
4333         # SGI C++
4334         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4336         # Archives containing C++ object files must be created using
4337         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4338         # necessary to make sure instantiated templates are included
4339         # in the archive.
4340         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4341         ;;
4342       *)
4343         if test "$GXX" = yes; then
4344           if test "$with_gnu_ld" = no; then
4345             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4346           else
4347             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4348           fi
4349         fi
4350         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4351         ;;
4352     esac
4353     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4354     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4355     ;;
4356   linux*)
4357     case $cc_basename in
4358       KCC*)
4359         # Kuck and Associates, Inc. (KAI) C++ Compiler
4361         # KCC will only create a shared library if the output file
4362         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4363         # to its proper name (with version) after linking.
4364         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4365         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4366         # Commands to make compiler produce verbose output that lists
4367         # what "hidden" libraries, object files and flags are used when
4368         # linking a shared library.
4369         #
4370         # There doesn't appear to be a way to prevent this compiler from
4371         # explicitly linking system object files so we need to strip them
4372         # from the output so that they don't get included in the library
4373         # dependencies.
4374         output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4376         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4377         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4379         # Archives containing C++ object files must be created using
4380         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4381         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4382         ;;
4383       icpc*)
4384         # Intel C++
4385         with_gnu_ld=yes
4386         # version 8.0 and above of icpc choke on multiply defined symbols
4387         # if we add $predep_objects and $postdep_objects, however 7.1 and
4388         # earlier do not add the objects themselves.
4389         case `$CC -V 2>&1` in
4390         *"Version 7."*)
4391           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4392           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4393           ;;
4394         *)  # Version 8.0 or newer
4395           tmp_idyn=
4396           case $host_cpu in
4397             ia64*) tmp_idyn=' -i_dynamic';;
4398           esac
4399           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4400           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4401           ;;
4402         esac
4403         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4404         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4405         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4406         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4407         ;;
4408       pgCC*)
4409         # Portland Group C++ compiler
4410         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4411         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4413         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4414         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4415         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4416         ;;
4417       cxx*)
4418         # Compaq C++
4419         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4420         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4422         runpath_var=LD_RUN_PATH
4423         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4424         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4426         # Commands to make compiler produce verbose output that lists
4427         # what "hidden" libraries, object files and flags are used when
4428         # linking a shared library.
4429         #
4430         # There doesn't appear to be a way to prevent this compiler from
4431         # explicitly linking system object files so we need to strip them
4432         # from the output so that they don't get included in the library
4433         # dependencies.
4434         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4435         ;;
4436     esac
4437     ;;
4438   lynxos*)
4439     # FIXME: insert proper C++ library support
4440     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4441     ;;
4442   m88k*)
4443     # FIXME: insert proper C++ library support
4444     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4445     ;;
4446   mvs*)
4447     case $cc_basename in
4448       cxx*)
4449         # FIXME: insert proper C++ library support
4450         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4451         ;;
4452       *)
4453         # FIXME: insert proper C++ library support
4454         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4455         ;;
4456     esac
4457     ;;
4458   netbsd*)
4459     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4460       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4461       wlarc=
4462       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4463       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4464       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4465     fi
4466     # Workaround some broken pre-1.5 toolchains
4467     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4468     ;;
4469   openbsd2*)
4470     # C++ shared libraries are fairly broken
4471     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4472     ;;
4473   openbsd*)
4474     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4475     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4476     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4477     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4478     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4479       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4480       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4481       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4482     fi
4483     output_verbose_link_cmd='echo'
4484     ;;
4485   osf3*)
4486     case $cc_basename in
4487       KCC*)
4488         # Kuck and Associates, Inc. (KAI) C++ Compiler
4490         # KCC will only create a shared library if the output file
4491         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4492         # to its proper name (with version) after linking.
4493         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4495         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4496         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4498         # Archives containing C++ object files must be created using
4499         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4500         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4502         ;;
4503       RCC*)
4504         # Rational C++ 2.4.1
4505         # FIXME: insert proper C++ library support
4506         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4507         ;;
4508       cxx*)
4509         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4510         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4512         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4513         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4515         # Commands to make compiler produce verbose output that lists
4516         # what "hidden" libraries, object files and flags are used when
4517         # linking a shared library.
4518         #
4519         # There doesn't appear to be a way to prevent this compiler from
4520         # explicitly linking system object files so we need to strip them
4521         # from the output so that they don't get included in the library
4522         # dependencies.
4523         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4524         ;;
4525       *)
4526         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4527           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4528           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4530           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4531           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4533           # Commands to make compiler produce verbose output that lists
4534           # what "hidden" libraries, object files and flags are used when
4535           # linking a shared library.
4536           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4538         else
4539           # FIXME: insert proper C++ library support
4540           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4541         fi
4542         ;;
4543     esac
4544     ;;
4545   osf4* | osf5*)
4546     case $cc_basename in
4547       KCC*)
4548         # Kuck and Associates, Inc. (KAI) C++ Compiler
4550         # KCC will only create a shared library if the output file
4551         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4552         # to its proper name (with version) after linking.
4553         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4555         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4556         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4558         # Archives containing C++ object files must be created using
4559         # the KAI C++ compiler.
4560         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4561         ;;
4562       RCC*)
4563         # Rational C++ 2.4.1
4564         # FIXME: insert proper C++ library support
4565         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4566         ;;
4567       cxx*)
4568         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4569         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4570         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4571           echo "-hidden">> $lib.exp~
4572           $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~
4573           $rm $lib.exp'
4575         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4576         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4578         # Commands to make compiler produce verbose output that lists
4579         # what "hidden" libraries, object files and flags are used when
4580         # linking a shared library.
4581         #
4582         # There doesn't appear to be a way to prevent this compiler from
4583         # explicitly linking system object files so we need to strip them
4584         # from the output so that they don't get included in the library
4585         # dependencies.
4586         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4587         ;;
4588       *)
4589         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4590           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4591          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4593           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4594           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4596           # Commands to make compiler produce verbose output that lists
4597           # what "hidden" libraries, object files and flags are used when
4598           # linking a shared library.
4599           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4601         else
4602           # FIXME: insert proper C++ library support
4603           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4604         fi
4605         ;;
4606     esac
4607     ;;
4608   psos*)
4609     # FIXME: insert proper C++ library support
4610     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4611     ;;
4612   sunos4*)
4613     case $cc_basename in
4614       CC*)
4615         # Sun C++ 4.x
4616         # FIXME: insert proper C++ library support
4617         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4618         ;;
4619       lcc*)
4620         # Lucid
4621         # FIXME: insert proper C++ library support
4622         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4623         ;;
4624       *)
4625         # FIXME: insert proper C++ library support
4626         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4627         ;;
4628     esac
4629     ;;
4630   solaris*)
4631     case $cc_basename in
4632       CC*)
4633         # Sun C++ 4.2, 5.x and Centerline C++
4634         _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4635         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4636         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4637         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4638         $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'
4640         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4641         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4642         case $host_os in
4643           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4644           *)
4645             # The C++ compiler is used as linker so we must use $wl
4646             # flag to pass the commands to the underlying system
4647             # linker. We must also pass each convience library through
4648             # to the system linker between allextract/defaultextract.
4649             # The C++ compiler will combine linker options so we
4650             # cannot just pass the convience library names through
4651             # without $wl.
4652             # Supported since Solaris 2.6 (maybe 2.5.1?)
4653             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4654             ;;
4655         esac
4656         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4658         output_verbose_link_cmd='echo'
4660         # Archives containing C++ object files must be created using
4661         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4662         # necessary to make sure instantiated templates are included
4663         # in the archive.
4664         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4665         ;;
4666       gcx*)
4667         # Green Hills C++ Compiler
4668         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4670         # The C++ compiler must be used to create the archive.
4671         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4672         ;;
4673       *)
4674         # GNU C++ compiler with Solaris linker
4675         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4676           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4677           if $CC --version | grep -v '^2\.7' > /dev/null; then
4678             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4679             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4680                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4682             # Commands to make compiler produce verbose output that lists
4683             # what "hidden" libraries, object files and flags are used when
4684             # linking a shared library.
4685             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4686           else
4687             # g++ 2.7 appears to require `-G' NOT `-shared' on this
4688             # platform.
4689             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4690             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4691                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4693             # Commands to make compiler produce verbose output that lists
4694             # what "hidden" libraries, object files and flags are used when
4695             # linking a shared library.
4696             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4697           fi
4699           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4700         fi
4701         ;;
4702     esac
4703     ;;
4704   sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4705     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4706     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4707     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4708     runpath_var='LD_RUN_PATH'
4710     case $cc_basename in
4711       CC*)
4712         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4713         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4714         ;;
4715       *)
4716         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4717         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4718         ;;
4719     esac
4720     ;;
4721   sysv5* | sco3.2v5* | sco5v6*)
4722     # Note: We can NOT use -z defs as we might desire, because we do not
4723     # link with -lc, and that would cause any symbols used from libc to
4724     # always be unresolved, which means just about no library would
4725     # ever link correctly.  If we're not using GNU ld we use -z text
4726     # though, which does catch some bad symbols but isn't as heavy-handed
4727     # as -z defs.
4728     # For security reasons, it is highly recommended that you always
4729     # use absolute paths for naming shared libraries, and exclude the
4730     # DT_RUNPATH tag from executables and libraries.  But doing so
4731     # requires that you compile everything twice, which is a pain.
4732     # So that behaviour is only enabled if SCOABSPATH is set to a
4733     # non-empty value in the environment.  Most likely only useful for
4734     # creating official distributions of packages.
4735     # This is a hack until libtool officially supports absolute path
4736     # names for shared libraries.
4737     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4738     _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4739     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4740     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4741     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4742     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4743     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4744     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4745     runpath_var='LD_RUN_PATH'
4747     case $cc_basename in
4748       CC*)
4749         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4750         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4751         ;;
4752       *)
4753         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4754         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4755         ;;
4756     esac
4757     ;;
4758   tandem*)
4759     case $cc_basename in
4760       NCC*)
4761         # NonStop-UX NCC 3.20
4762         # FIXME: insert proper C++ library support
4763         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4764         ;;
4765       *)
4766         # FIXME: insert proper C++ library support
4767         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4768         ;;
4769     esac
4770     ;;
4771   vxworks*)
4772     # FIXME: insert proper C++ library support
4773     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4774     ;;
4775   *)
4776     # FIXME: insert proper C++ library support
4777     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4778     ;;
4779 esac
4780 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4781 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4783 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4784 _LT_AC_TAGVAR(LD, $1)="$LD"
4786 ## CAVEAT EMPTOR:
4787 ## There is no encapsulation within the following macros, do not change
4788 ## the running order or otherwise move them around unless you know exactly
4789 ## what you are doing...
4790 AC_LIBTOOL_POSTDEP_PREDEP($1)
4791 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4792 AC_LIBTOOL_PROG_CC_C_O($1)
4793 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4794 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4795 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4796 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4798 AC_LIBTOOL_CONFIG($1)
4800 AC_LANG_POP
4801 CC=$lt_save_CC
4802 LDCXX=$LD
4803 LD=$lt_save_LD
4804 GCC=$lt_save_GCC
4805 with_gnu_ldcxx=$with_gnu_ld
4806 with_gnu_ld=$lt_save_with_gnu_ld
4807 lt_cv_path_LDCXX=$lt_cv_path_LD
4808 lt_cv_path_LD=$lt_save_path_LD
4809 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4810 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4811 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4813 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4814 # ------------------------------------
4815 # Figure out "hidden" library dependencies from verbose
4816 # compiler output when linking a shared library.
4817 # Parse the compiler output and extract the necessary
4818 # objects, libraries and library flags.
4819 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4820 dnl we can't use the lt_simple_compile_test_code here,
4821 dnl because it contains code intended for an executable,
4822 dnl not a library.  It's possible we should let each
4823 dnl tag define a new lt_????_link_test_code variable,
4824 dnl but it's only used here...
4825 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4826 int a;
4827 void foo (void) { a = 0; }
4829 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4830 class Foo
4832 public:
4833   Foo (void) { a = 0; }
4834 private:
4835   int a;
4838 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4839       subroutine foo
4840       implicit none
4841       integer*4 a
4842       a=0
4843       return
4844       end
4846 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4847 public class foo {
4848   private int a;
4849   public void bar (void) {
4850     a = 0;
4851   }
4855 dnl Parse the compiler output and extract the necessary
4856 dnl objects, libraries and library flags.
4857 if AC_TRY_EVAL(ac_compile); then
4858   # Parse the compiler output and extract the necessary
4859   # objects, libraries and library flags.
4861   # Sentinel used to keep track of whether or not we are before
4862   # the conftest object file.
4863   pre_test_object_deps_done=no
4865   # The `*' in the case matches for architectures that use `case' in
4866   # $output_verbose_cmd can trigger glob expansion during the loop
4867   # eval without this substitution.
4868   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4870   for p in `eval $output_verbose_link_cmd`; do
4871     case $p in
4873     -L* | -R* | -l*)
4874        # Some compilers place space between "-{L,R}" and the path.
4875        # Remove the space.
4876        if test $p = "-L" \
4877           || test $p = "-R"; then
4878          prev=$p
4879          continue
4880        else
4881          prev=
4882        fi
4884        if test "$pre_test_object_deps_done" = no; then
4885          case $p in
4886          -L* | -R*)
4887            # Internal compiler library paths should come after those
4888            # provided the user.  The postdeps already come after the
4889            # user supplied libs so there is no need to process them.
4890            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4891              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4892            else
4893              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4894            fi
4895            ;;
4896          # The "-l" case would never come before the object being
4897          # linked, so don't bother handling this case.
4898          esac
4899        else
4900          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4901            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4902          else
4903            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4904          fi
4905        fi
4906        ;;
4908     *.$objext)
4909        # This assumes that the test object file only shows up
4910        # once in the compiler output.
4911        if test "$p" = "conftest.$objext"; then
4912          pre_test_object_deps_done=yes
4913          continue
4914        fi
4916        if test "$pre_test_object_deps_done" = no; then
4917          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4918            _LT_AC_TAGVAR(predep_objects, $1)="$p"
4919          else
4920            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4921          fi
4922        else
4923          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4924            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4925          else
4926            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4927          fi
4928        fi
4929        ;;
4931     *) ;; # Ignore the rest.
4933     esac
4934   done
4936   # Clean up.
4937   rm -f a.out a.exe
4938 else
4939   echo "libtool.m4: error: problem compiling $1 test program"
4942 $rm -f confest.$objext
4944 # PORTME: override above test on systems where it is broken
4945 ifelse([$1],[CXX],
4946 [case $host_os in
4947 interix3*)
4948   # Interix 3.5 installs completely hosed .la files for C++, so rather than
4949   # hack all around it, let's just trust "g++" to DTRT.
4950   _LT_AC_TAGVAR(predep_objects,$1)=
4951   _LT_AC_TAGVAR(postdep_objects,$1)=
4952   _LT_AC_TAGVAR(postdeps,$1)=
4953   ;;
4955 solaris*)
4956   case $cc_basename in
4957   CC*)
4958     # Adding this requires a known-good setup of shared libraries for
4959     # Sun compiler versions before 5.6, else PIC objects from an old
4960     # archive will be linked into the output, leading to subtle bugs.
4961     _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4962     ;;
4963   esac
4964   ;;
4965 esac
4968 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4969 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4970 esac
4971 ])# AC_LIBTOOL_POSTDEP_PREDEP
4973 # AC_LIBTOOL_LANG_F77_CONFIG
4974 # --------------------------
4975 # Ensure that the configuration vars for the C compiler are
4976 # suitably defined.  Those variables are subsequently used by
4977 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4978 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4979 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4980 [AC_REQUIRE([AC_PROG_F77])
4981 AC_LANG_PUSH(Fortran 77)
4983 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4984 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4985 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4986 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4987 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4988 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4989 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4990 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4991 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4992 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4993 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4994 _LT_AC_TAGVAR(module_cmds, $1)=
4995 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4996 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4997 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4998 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4999 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5000 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5002 # Source file extension for f77 test sources.
5003 ac_ext=f
5005 # Object file extension for compiled f77 test sources.
5006 objext=o
5007 _LT_AC_TAGVAR(objext, $1)=$objext
5009 # Code to be used in simple compile tests
5010 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
5012 # Code to be used in simple link tests
5013 lt_simple_link_test_code="      program t\n      end\n"
5015 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5016 _LT_AC_SYS_COMPILER
5018 # save warnings/boilerplate of simple test code
5019 _LT_COMPILER_BOILERPLATE
5020 _LT_LINKER_BOILERPLATE
5022 # Allow CC to be a program name with arguments.
5023 lt_save_CC="$CC"
5024 CC=${F77-"f77"}
5025 compiler=$CC
5026 _LT_AC_TAGVAR(compiler, $1)=$CC
5027 _LT_CC_BASENAME([$compiler])
5029 AC_MSG_CHECKING([if libtool supports shared libraries])
5030 AC_MSG_RESULT([$can_build_shared])
5032 AC_MSG_CHECKING([whether to build shared libraries])
5033 test "$can_build_shared" = "no" && enable_shared=no
5035 # On AIX, shared libraries and static libraries use the same namespace, and
5036 # are all built from PIC.
5037 case $host_os in
5038 aix3*)
5039   test "$enable_shared" = yes && enable_static=no
5040   if test -n "$RANLIB"; then
5041     archive_cmds="$archive_cmds~\$RANLIB \$lib"
5042     postinstall_cmds='$RANLIB $lib'
5043   fi
5044   ;;
5045 aix4* | aix5*)
5046   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5047     test "$enable_shared" = yes && enable_static=no
5048   fi
5049   ;;
5050 esac
5051 AC_MSG_RESULT([$enable_shared])
5053 AC_MSG_CHECKING([whether to build static libraries])
5054 # Make sure either enable_shared or enable_static is yes.
5055 test "$enable_shared" = yes || enable_static=yes
5056 AC_MSG_RESULT([$enable_static])
5058 _LT_AC_TAGVAR(GCC, $1)="$G77"
5059 _LT_AC_TAGVAR(LD, $1)="$LD"
5061 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5062 AC_LIBTOOL_PROG_CC_C_O($1)
5063 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5064 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5065 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5066 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5068 AC_LIBTOOL_CONFIG($1)
5070 AC_LANG_POP
5071 CC="$lt_save_CC"
5072 ])# AC_LIBTOOL_LANG_F77_CONFIG
5075 # AC_LIBTOOL_LANG_GCJ_CONFIG
5076 # --------------------------
5077 # Ensure that the configuration vars for the C compiler are
5078 # suitably defined.  Those variables are subsequently used by
5079 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5080 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5081 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5082 [AC_LANG_SAVE
5084 # Source file extension for Java test sources.
5085 ac_ext=java
5087 # Object file extension for compiled Java test sources.
5088 objext=o
5089 _LT_AC_TAGVAR(objext, $1)=$objext
5091 # Code to be used in simple compile tests
5092 lt_simple_compile_test_code="class foo {}\n"
5094 # Code to be used in simple link tests
5095 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5097 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5098 _LT_AC_SYS_COMPILER
5100 # save warnings/boilerplate of simple test code
5101 _LT_COMPILER_BOILERPLATE
5102 _LT_LINKER_BOILERPLATE
5104 # Allow CC to be a program name with arguments.
5105 lt_save_CC="$CC"
5106 CC=${GCJ-"gcj"}
5107 compiler=$CC
5108 _LT_AC_TAGVAR(compiler, $1)=$CC
5109 _LT_CC_BASENAME([$compiler])
5111 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5112 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5114 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5116 ## CAVEAT EMPTOR:
5117 ## There is no encapsulation within the following macros, do not change
5118 ## the running order or otherwise move them around unless you know exactly
5119 ## what you are doing...
5120 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5121 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5122 AC_LIBTOOL_PROG_CC_C_O($1)
5123 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5124 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5125 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5126 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5128 AC_LIBTOOL_CONFIG($1)
5130 AC_LANG_RESTORE
5131 CC="$lt_save_CC"
5132 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5135 # AC_LIBTOOL_LANG_RC_CONFIG
5136 # -------------------------
5137 # Ensure that the configuration vars for the Windows resource compiler are
5138 # suitably defined.  Those variables are subsequently used by
5139 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5140 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5141 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5142 [AC_LANG_SAVE
5144 # Source file extension for RC test sources.
5145 ac_ext=rc
5147 # Object file extension for compiled RC test sources.
5148 objext=o
5149 _LT_AC_TAGVAR(objext, $1)=$objext
5151 # Code to be used in simple compile tests
5152 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5154 # Code to be used in simple link tests
5155 lt_simple_link_test_code="$lt_simple_compile_test_code"
5157 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5158 _LT_AC_SYS_COMPILER
5160 # save warnings/boilerplate of simple test code
5161 _LT_COMPILER_BOILERPLATE
5162 _LT_LINKER_BOILERPLATE
5164 # Allow CC to be a program name with arguments.
5165 lt_save_CC="$CC"
5166 CC=${RC-"windres"}
5167 compiler=$CC
5168 _LT_AC_TAGVAR(compiler, $1)=$CC
5169 _LT_CC_BASENAME([$compiler])
5170 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5172 AC_LIBTOOL_CONFIG($1)
5174 AC_LANG_RESTORE
5175 CC="$lt_save_CC"
5176 ])# AC_LIBTOOL_LANG_RC_CONFIG
5179 # AC_LIBTOOL_CONFIG([TAGNAME])
5180 # ----------------------------
5181 # If TAGNAME is not passed, then create an initial libtool script
5182 # with a default configuration from the untagged config vars.  Otherwise
5183 # add code to config.status for appending the configuration named by
5184 # TAGNAME from the matching tagged config vars.
5185 AC_DEFUN([AC_LIBTOOL_CONFIG],
5186 [# The else clause should only fire when bootstrapping the
5187 # libtool distribution, otherwise you forgot to ship ltmain.sh
5188 # with your package, and you will get complaints that there are
5189 # no rules to generate ltmain.sh.
5190 if test -f "$ltmain"; then
5191   # See if we are running on zsh, and set the options which allow our commands through
5192   # without removal of \ escapes.
5193   if test -n "${ZSH_VERSION+set}" ; then
5194     setopt NO_GLOB_SUBST
5195   fi
5196   # Now quote all the things that may contain metacharacters while being
5197   # careful not to overquote the AC_SUBSTed values.  We take copies of the
5198   # variables and quote the copies for generation of the libtool script.
5199   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5200     SED SHELL STRIP \
5201     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5202     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5203     deplibs_check_method reload_flag reload_cmds need_locks \
5204     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5205     lt_cv_sys_global_symbol_to_c_name_address \
5206     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5207     old_postinstall_cmds old_postuninstall_cmds \
5208     _LT_AC_TAGVAR(compiler, $1) \
5209     _LT_AC_TAGVAR(CC, $1) \
5210     _LT_AC_TAGVAR(LD, $1) \
5211     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5212     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5213     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5214     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5215     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5216     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5217     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5218     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5219     _LT_AC_TAGVAR(old_archive_cmds, $1) \
5220     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5221     _LT_AC_TAGVAR(predep_objects, $1) \
5222     _LT_AC_TAGVAR(postdep_objects, $1) \
5223     _LT_AC_TAGVAR(predeps, $1) \
5224     _LT_AC_TAGVAR(postdeps, $1) \
5225     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5226     _LT_AC_TAGVAR(archive_cmds, $1) \
5227     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5228     _LT_AC_TAGVAR(postinstall_cmds, $1) \
5229     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5230     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5231     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5232     _LT_AC_TAGVAR(no_undefined_flag, $1) \
5233     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5234     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5235     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5236     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5237     _LT_AC_TAGVAR(hardcode_automatic, $1) \
5238     _LT_AC_TAGVAR(module_cmds, $1) \
5239     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5240     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5241     _LT_AC_TAGVAR(exclude_expsyms, $1) \
5242     _LT_AC_TAGVAR(include_expsyms, $1); do
5244     case $var in
5245     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5246     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5247     _LT_AC_TAGVAR(archive_cmds, $1) | \
5248     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5249     _LT_AC_TAGVAR(module_cmds, $1) | \
5250     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5251     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5252     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5253     extract_expsyms_cmds | reload_cmds | finish_cmds | \
5254     postinstall_cmds | postuninstall_cmds | \
5255     old_postinstall_cmds | old_postuninstall_cmds | \
5256     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5257       # Double-quote double-evaled strings.
5258       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5259       ;;
5260     *)
5261       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5262       ;;
5263     esac
5264   done
5266   case $lt_echo in
5267   *'\[$]0 --fallback-echo"')
5268     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5269     ;;
5270   esac
5272 ifelse([$1], [],
5273   [cfgfile="${ofile}T"
5274   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5275   $rm -f "$cfgfile"
5276   AC_MSG_NOTICE([creating $ofile])],
5277   [cfgfile="$ofile"])
5279   cat <<__EOF__ >> "$cfgfile"
5280 ifelse([$1], [],
5281 [#! $SHELL
5283 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5284 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5285 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5287 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5288 # Free Software Foundation, Inc.
5290 # This file is part of GNU Libtool:
5291 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5293 # This program is free software; you can redistribute it and/or modify
5294 # it under the terms of the GNU General Public License as published by
5295 # the Free Software Foundation; either version 2 of the License, or
5296 # (at your option) any later version.
5298 # This program is distributed in the hope that it will be useful, but
5299 # WITHOUT ANY WARRANTY; without even the implied warranty of
5300 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5301 # General Public License for more details.
5303 # You should have received a copy of the GNU General Public License
5304 # along with this program; if not, write to the Free Software
5305 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5307 # As a special exception to the GNU General Public License, if you
5308 # distribute this file as part of a program that contains a
5309 # configuration script generated by Autoconf, you may include it under
5310 # the same distribution terms that you use for the rest of that program.
5312 # A sed program that does not truncate output.
5313 SED=$lt_SED
5315 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5316 Xsed="$SED -e 1s/^X//"
5318 # The HP-UX ksh and POSIX shell print the target directory to stdout
5319 # if CDPATH is set.
5320 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5322 # The names of the tagged configurations supported by this script.
5323 available_tags=
5325 # ### BEGIN LIBTOOL CONFIG],
5326 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5328 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5330 # Shell to use when invoking shell scripts.
5331 SHELL=$lt_SHELL
5333 # Whether or not to build shared libraries.
5334 build_libtool_libs=$enable_shared
5336 # Whether or not to build static libraries.
5337 build_old_libs=$enable_static
5339 # Whether or not to add -lc for building shared libraries.
5340 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5342 # Whether or not to disallow shared libs when runtime libs are static
5343 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5345 # Whether or not to optimize for fast installation.
5346 fast_install=$enable_fast_install
5348 # The host system.
5349 host_alias=$host_alias
5350 host=$host
5351 host_os=$host_os
5353 # The build system.
5354 build_alias=$build_alias
5355 build=$build
5356 build_os=$build_os
5358 # An echo program that does not interpret backslashes.
5359 echo=$lt_echo
5361 # The archiver.
5362 AR=$lt_AR
5363 AR_FLAGS=$lt_AR_FLAGS
5365 # A C compiler.
5366 LTCC=$lt_LTCC
5368 # LTCC compiler flags.
5369 LTCFLAGS=$lt_LTCFLAGS
5371 # A language-specific compiler.
5372 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5374 # Is the compiler the GNU C compiler?
5375 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5377 # An ERE matcher.
5378 EGREP=$lt_EGREP
5380 # The linker used to build libraries.
5381 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5383 # Whether we need hard or soft links.
5384 LN_S=$lt_LN_S
5386 # A BSD-compatible nm program.
5387 NM=$lt_NM
5389 # A symbol stripping program
5390 STRIP=$lt_STRIP
5392 # Used to examine libraries when file_magic_cmd begins "file"
5393 MAGIC_CMD=$MAGIC_CMD
5395 # Used on cygwin: DLL creation program.
5396 DLLTOOL="$DLLTOOL"
5398 # Used on cygwin: object dumper.
5399 OBJDUMP="$OBJDUMP"
5401 # Used on cygwin: assembler.
5402 AS="$AS"
5404 # The name of the directory that contains temporary libtool files.
5405 objdir=$objdir
5407 # How to create reloadable object files.
5408 reload_flag=$lt_reload_flag
5409 reload_cmds=$lt_reload_cmds
5411 # How to pass a linker flag through the compiler.
5412 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5414 # Object file suffix (normally "o").
5415 objext="$ac_objext"
5417 # Old archive suffix (normally "a").
5418 libext="$libext"
5420 # Shared library suffix (normally ".so").
5421 shrext_cmds='$shrext_cmds'
5423 # Executable file suffix (normally "").
5424 exeext="$exeext"
5426 # Additional compiler flags for building library objects.
5427 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5428 pic_mode=$pic_mode
5430 # What is the maximum length of a command?
5431 max_cmd_len=$lt_cv_sys_max_cmd_len
5433 # Does compiler simultaneously support -c and -o options?
5434 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5436 # Must we lock files when doing compilation?
5437 need_locks=$lt_need_locks
5439 # Do we need the lib prefix for modules?
5440 need_lib_prefix=$need_lib_prefix
5442 # Do we need a version for libraries?
5443 need_version=$need_version
5445 # Whether dlopen is supported.
5446 dlopen_support=$enable_dlopen
5448 # Whether dlopen of programs is supported.
5449 dlopen_self=$enable_dlopen_self
5451 # Whether dlopen of statically linked programs is supported.
5452 dlopen_self_static=$enable_dlopen_self_static
5454 # Compiler flag to prevent dynamic linking.
5455 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5457 # Compiler flag to turn off builtin functions.
5458 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5460 # Compiler flag to allow reflexive dlopens.
5461 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5463 # Compiler flag to generate shared objects directly from archives.
5464 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5466 # Compiler flag to generate thread-safe objects.
5467 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5469 # Library versioning type.
5470 version_type=$version_type
5472 # Format of library name prefix.
5473 libname_spec=$lt_libname_spec
5475 # List of archive names.  First name is the real one, the rest are links.
5476 # The last name is the one that the linker finds with -lNAME.
5477 library_names_spec=$lt_library_names_spec
5479 # The coded name of the library, if different from the real name.
5480 soname_spec=$lt_soname_spec
5482 # Commands used to build and install an old-style archive.
5483 RANLIB=$lt_RANLIB
5484 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5485 old_postinstall_cmds=$lt_old_postinstall_cmds
5486 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5488 # Create an old-style archive from a shared archive.
5489 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5491 # Create a temporary old-style archive to link instead of a shared archive.
5492 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5494 # Commands used to build and install a shared archive.
5495 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5496 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5497 postinstall_cmds=$lt_postinstall_cmds
5498 postuninstall_cmds=$lt_postuninstall_cmds
5500 # Commands used to build a loadable module (assumed same as above if empty)
5501 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5502 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5504 # Commands to strip libraries.
5505 old_striplib=$lt_old_striplib
5506 striplib=$lt_striplib
5508 # Dependencies to place before the objects being linked to create a
5509 # shared library.
5510 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5512 # Dependencies to place after the objects being linked to create a
5513 # shared library.
5514 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5516 # Dependencies to place before the objects being linked to create a
5517 # shared library.
5518 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5520 # Dependencies to place after the objects being linked to create a
5521 # shared library.
5522 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5524 # The library search path used internally by the compiler when linking
5525 # a shared library.
5526 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5528 # Method to check whether dependent libraries are shared objects.
5529 deplibs_check_method=$lt_deplibs_check_method
5531 # Command to use when deplibs_check_method == file_magic.
5532 file_magic_cmd=$lt_file_magic_cmd
5534 # Flag that allows shared libraries with undefined symbols to be built.
5535 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5537 # Flag that forces no undefined symbols.
5538 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5540 # Commands used to finish a libtool library installation in a directory.
5541 finish_cmds=$lt_finish_cmds
5543 # Same as above, but a single script fragment to be evaled but not shown.
5544 finish_eval=$lt_finish_eval
5546 # Take the output of nm and produce a listing of raw symbols and C names.
5547 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5549 # Transform the output of nm in a proper C declaration
5550 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5552 # Transform the output of nm in a C name address pair
5553 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5555 # This is the shared library runtime path variable.
5556 runpath_var=$runpath_var
5558 # This is the shared library path variable.
5559 shlibpath_var=$shlibpath_var
5561 # Is shlibpath searched before the hard-coded library search path?
5562 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5564 # How to hardcode a shared library path into an executable.
5565 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5567 # Whether we should hardcode library paths into libraries.
5568 hardcode_into_libs=$hardcode_into_libs
5570 # Flag to hardcode \$libdir into a binary during linking.
5571 # This must work even if \$libdir does not exist.
5572 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5574 # If ld is used when linking, flag to hardcode \$libdir into
5575 # a binary during linking. This must work even if \$libdir does
5576 # not exist.
5577 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5579 # Whether we need a single -rpath flag with a separated argument.
5580 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5582 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5583 # resulting binary.
5584 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5586 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5587 # resulting binary.
5588 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5590 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5591 # the resulting binary.
5592 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5594 # Set to yes if building a shared library automatically hardcodes DIR into the library
5595 # and all subsequent libraries and executables linked against it.
5596 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5598 # Variables whose values should be saved in libtool wrapper scripts and
5599 # restored at relink time.
5600 variables_saved_for_relink="$variables_saved_for_relink"
5602 # Whether libtool must link a program against all its dependency libraries.
5603 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5605 # Compile-time system search path for libraries
5606 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5608 # Run-time system search path for libraries
5609 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5611 # Fix the shell variable \$srcfile for the compiler.
5612 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5614 # Set to yes if exported symbols are required.
5615 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5617 # The commands to list exported symbols.
5618 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5620 # The commands to extract the exported symbol list from a shared archive.
5621 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5623 # Symbols that should not be listed in the preloaded symbols.
5624 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5626 # Symbols that must always be exported.
5627 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5629 ifelse([$1],[],
5630 [# ### END LIBTOOL CONFIG],
5631 [# ### END LIBTOOL TAG CONFIG: $tagname])
5633 __EOF__
5635 ifelse([$1],[], [
5636   case $host_os in
5637   aix3*)
5638     cat <<\EOF >> "$cfgfile"
5640 # AIX sometimes has problems with the GCC collect2 program.  For some
5641 # reason, if we set the COLLECT_NAMES environment variable, the problems
5642 # vanish in a puff of smoke.
5643 if test "X${COLLECT_NAMES+set}" != Xset; then
5644   COLLECT_NAMES=
5645   export COLLECT_NAMES
5648     ;;
5649   esac
5651   # We use sed instead of cat because bash on DJGPP gets confused if
5652   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5653   # text mode, it properly converts lines to CR/LF.  This bash problem
5654   # is reportedly fixed, but why not run on old versions too?
5655   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5657   mv -f "$cfgfile" "$ofile" || \
5658     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5659   chmod +x "$ofile"
5661 else
5662   # If there is no Makefile yet, we rely on a make rule to execute
5663   # `config.status --recheck' to rerun these tests and create the
5664   # libtool script then.
5665   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5666   if test -f "$ltmain_in"; then
5667     test -f Makefile && make "$ltmain"
5668   fi
5670 ])# AC_LIBTOOL_CONFIG
5673 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5674 # -------------------------------------------
5675 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5676 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5678 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5680 if test "$GCC" = yes; then
5681   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5683   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5684     lt_cv_prog_compiler_rtti_exceptions,
5685     [-fno-rtti -fno-exceptions], [],
5686     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5688 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5691 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5692 # ---------------------------------
5693 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5694 [AC_REQUIRE([AC_CANONICAL_HOST])
5695 AC_REQUIRE([AC_PROG_NM])
5696 AC_REQUIRE([AC_OBJEXT])
5697 # Check for command to grab the raw symbol name followed by C symbol from nm.
5698 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5699 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5701 # These are sane defaults that work on at least a few old systems.
5702 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5704 # Character class describing NM global symbol codes.
5705 symcode='[[BCDEGRST]]'
5707 # Regexp to match symbols that can be accessed directly from C.
5708 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5710 # Transform an extracted symbol line into a proper C declaration
5711 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5713 # Transform an extracted symbol line into symbol name and symbol address
5714 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5716 # Define system-specific variables.
5717 case $host_os in
5718 aix*)
5719   symcode='[[BCDT]]'
5720   ;;
5721 cygwin* | mingw* | pw32*)
5722   symcode='[[ABCDGISTW]]'
5723   ;;
5724 hpux*) # Its linker distinguishes data from code symbols
5725   if test "$host_cpu" = ia64; then
5726     symcode='[[ABCDEGRST]]'
5727   fi
5728   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5729   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5730   ;;
5731 linux*)
5732   if test "$host_cpu" = ia64; then
5733     symcode='[[ABCDGIRSTW]]'
5734     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5735     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5736   fi
5737   ;;
5738 irix* | nonstopux*)
5739   symcode='[[BCDEGRST]]'
5740   ;;
5741 osf*)
5742   symcode='[[BCDEGQRST]]'
5743   ;;
5744 solaris*)
5745   symcode='[[BDRT]]'
5746   ;;
5747 sco3.2v5*)
5748   symcode='[[DT]]'
5749   ;;
5750 sysv4.2uw2*)
5751   symcode='[[DT]]'
5752   ;;
5753 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5754   symcode='[[ABDT]]'
5755   ;;
5756 sysv4)
5757   symcode='[[DFNSTU]]'
5758   ;;
5759 esac
5761 # Handle CRLF in mingw tool chain
5762 opt_cr=
5763 case $build_os in
5764 mingw*)
5765   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5766   ;;
5767 esac
5769 # If we're using GNU nm, then use its standard symbol codes.
5770 case `$NM -V 2>&1` in
5771 *GNU* | *'with BFD'*)
5772   symcode='[[ABCDGIRSTW]]' ;;
5773 esac
5775 # Try without a prefix undercore, then with it.
5776 for ac_symprfx in "" "_"; do
5778   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5779   symxfrm="\\1 $ac_symprfx\\2 \\2"
5781   # Write the raw and C identifiers.
5782   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5784   # Check to see that the pipe works correctly.
5785   pipe_works=no
5787   rm -f conftest*
5788   cat > conftest.$ac_ext <<EOF
5789 #ifdef __cplusplus
5790 extern "C" {
5791 #endif
5792 char nm_test_var;
5793 void nm_test_func(){}
5794 #ifdef __cplusplus
5796 #endif
5797 int main(){nm_test_var='a';nm_test_func();return(0);}
5800   if AC_TRY_EVAL(ac_compile); then
5801     # Now try to grab the symbols.
5802     nlist=conftest.nm
5803     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5804       # Try sorting and uniquifying the output.
5805       if sort "$nlist" | uniq > "$nlist"T; then
5806         mv -f "$nlist"T "$nlist"
5807       else
5808         rm -f "$nlist"T
5809       fi
5811       # Make sure that we snagged all the symbols we need.
5812       if grep ' nm_test_var$' "$nlist" >/dev/null; then
5813         if grep ' nm_test_func$' "$nlist" >/dev/null; then
5814           cat <<EOF > conftest.$ac_ext
5815 #ifdef __cplusplus
5816 extern "C" {
5817 #endif
5820           # Now generate the symbol file.
5821           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5823           cat <<EOF >> conftest.$ac_ext
5824 #if defined (__STDC__) && __STDC__
5825 # define lt_ptr_t void *
5826 #else
5827 # define lt_ptr_t char *
5828 # define const
5829 #endif
5831 /* The mapping between symbol names and symbols. */
5832 const struct {
5833   const char *name;
5834   lt_ptr_t address;
5836 lt_preloaded_symbols[[]] =
5839           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5840           cat <<\EOF >> conftest.$ac_ext
5841   {0, (lt_ptr_t) 0}
5844 #ifdef __cplusplus
5846 #endif
5848           # Now try linking the two files.
5849           mv conftest.$ac_objext conftstm.$ac_objext
5850           lt_save_LIBS="$LIBS"
5851           lt_save_CFLAGS="$CFLAGS"
5852           LIBS="conftstm.$ac_objext"
5853           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5854           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5855             pipe_works=yes
5856           fi
5857           LIBS="$lt_save_LIBS"
5858           CFLAGS="$lt_save_CFLAGS"
5859         else
5860           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5861         fi
5862       else
5863         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5864       fi
5865     else
5866       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5867     fi
5868   else
5869     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5870     cat conftest.$ac_ext >&5
5871   fi
5872   rm -f conftest* conftst*
5874   # Do not use the global_symbol_pipe unless it works.
5875   if test "$pipe_works" = yes; then
5876     break
5877   else
5878     lt_cv_sys_global_symbol_pipe=
5879   fi
5880 done
5882 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5883   lt_cv_sys_global_symbol_to_cdecl=
5885 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5886   AC_MSG_RESULT(failed)
5887 else
5888   AC_MSG_RESULT(ok)
5890 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5893 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5894 # ---------------------------------------
5895 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5896 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5897 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5898 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5900 AC_MSG_CHECKING([for $compiler option to produce PIC])
5901  ifelse([$1],[CXX],[
5902   # C++ specific cases for pic, static, wl, etc.
5903   if test "$GXX" = yes; then
5904     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5905     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5907     case $host_os in
5908     aix*)
5909       # All AIX code is PIC.
5910       if test "$host_cpu" = ia64; then
5911         # AIX 5 now supports IA64 processor
5912         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5913       fi
5914       ;;
5915     amigaos*)
5916       # FIXME: we need at least 68020 code to build shared libraries, but
5917       # adding the `-m68020' flag to GCC prevents building anything better,
5918       # like `-m68040'.
5919       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5920       ;;
5921     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5922       # PIC is the default for these OSes.
5923       ;;
5924     mingw* | os2* | pw32*)
5925       # This hack is so that the source file can tell whether it is being
5926       # built for inclusion in a dll (and should export symbols for example).
5927       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5928       ;;
5929     darwin* | rhapsody*)
5930       # PIC is the default on this platform
5931       # Common symbols not allowed in MH_DYLIB files
5932       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5933       ;;
5934     *djgpp*)
5935       # DJGPP does not support shared libraries at all
5936       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5937       ;;
5938     interix3*)
5939       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5940       # Instead, we relocate shared libraries at runtime.
5941       ;;
5942     sysv4*MP*)
5943       if test -d /usr/nec; then
5944         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5945       fi
5946       ;;
5947     hpux*)
5948       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5949       # not for PA HP-UX.
5950       case $host_cpu in
5951       hppa*64*|ia64*)
5952         ;;
5953       *)
5954         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5955         ;;
5956       esac
5957       ;;
5958     *)
5959       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5960       ;;
5961     esac
5962   else
5963     case $host_os in
5964       aix4* | aix5*)
5965         # All AIX code is PIC.
5966         if test "$host_cpu" = ia64; then
5967           # AIX 5 now supports IA64 processor
5968           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5969         else
5970           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5971         fi
5972         ;;
5973       chorus*)
5974         case $cc_basename in
5975         cxch68*)
5976           # Green Hills C++ Compiler
5977           # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5978           ;;
5979         esac
5980         ;;
5981        darwin*)
5982          # PIC is the default on this platform
5983          # Common symbols not allowed in MH_DYLIB files
5984          case $cc_basename in
5985            xlc*)
5986            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5987            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988            ;;
5989          esac
5990        ;;
5991       dgux*)
5992         case $cc_basename in
5993           ec++*)
5994             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5995             ;;
5996           ghcx*)
5997             # Green Hills C++ Compiler
5998             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5999             ;;
6000           *)
6001             ;;
6002         esac
6003         ;;
6004       freebsd* | kfreebsd*-gnu | dragonfly*)
6005         # FreeBSD uses GNU C++
6006         ;;
6007       hpux9* | hpux10* | hpux11*)
6008         case $cc_basename in
6009           CC*)
6010             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6011             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6012             if test "$host_cpu" != ia64; then
6013               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6014             fi
6015             ;;
6016           aCC*)
6017             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6018             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6019             case $host_cpu in
6020             hppa*64*|ia64*)
6021               # +Z the default
6022               ;;
6023             *)
6024               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6025               ;;
6026             esac
6027             ;;
6028           *)
6029             ;;
6030         esac
6031         ;;
6032       interix*)
6033         # This is c89, which is MS Visual C++ (no shared libs)
6034         # Anyone wants to do a port?
6035         ;;
6036       irix5* | irix6* | nonstopux*)
6037         case $cc_basename in
6038           CC*)
6039             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6040             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6041             # CC pic flag -KPIC is the default.
6042             ;;
6043           *)
6044             ;;
6045         esac
6046         ;;
6047       linux*)
6048         case $cc_basename in
6049           KCC*)
6050             # KAI C++ Compiler
6051             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6052             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6053             ;;
6054           icpc* | ecpc*)
6055             # Intel C++
6056             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6057             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6058             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6059             ;;
6060           pgCC*)
6061             # Portland Group C++ compiler.
6062             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6063             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6064             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6065             ;;
6066           cxx*)
6067             # Compaq C++
6068             # Make sure the PIC flag is empty.  It appears that all Alpha
6069             # Linux and Compaq Tru64 Unix objects are PIC.
6070             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6071             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6072             ;;
6073           *)
6074             ;;
6075         esac
6076         ;;
6077       lynxos*)
6078         ;;
6079       m88k*)
6080         ;;
6081       mvs*)
6082         case $cc_basename in
6083           cxx*)
6084             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6085             ;;
6086           *)
6087             ;;
6088         esac
6089         ;;
6090       netbsd*)
6091         ;;
6092       osf3* | osf4* | osf5*)
6093         case $cc_basename in
6094           KCC*)
6095             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6096             ;;
6097           RCC*)
6098             # Rational C++ 2.4.1
6099             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6100             ;;
6101           cxx*)
6102             # Digital/Compaq C++
6103             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6104             # Make sure the PIC flag is empty.  It appears that all Alpha
6105             # Linux and Compaq Tru64 Unix objects are PIC.
6106             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6107             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6108             ;;
6109           *)
6110             ;;
6111         esac
6112         ;;
6113       psos*)
6114         ;;
6115       solaris*)
6116         case $cc_basename in
6117           CC*)
6118             # Sun C++ 4.2, 5.x and Centerline C++
6119             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6120             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6121             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6122             ;;
6123           gcx*)
6124             # Green Hills C++ Compiler
6125             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6126             ;;
6127           *)
6128             ;;
6129         esac
6130         ;;
6131       sunos4*)
6132         case $cc_basename in
6133           CC*)
6134             # Sun C++ 4.x
6135             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6136             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6137             ;;
6138           lcc*)
6139             # Lucid
6140             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6141             ;;
6142           *)
6143             ;;
6144         esac
6145         ;;
6146       tandem*)
6147         case $cc_basename in
6148           NCC*)
6149             # NonStop-UX NCC 3.20
6150             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6151             ;;
6152           *)
6153             ;;
6154         esac
6155         ;;
6156       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6157         case $cc_basename in
6158           CC*)
6159             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6160             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6161             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6162             ;;
6163         esac
6164         ;;
6165       vxworks*)
6166         ;;
6167       *)
6168         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6169         ;;
6170     esac
6171   fi
6174   if test "$GCC" = yes; then
6175     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6176     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6178     case $host_os in
6179       aix*)
6180       # All AIX code is PIC.
6181       if test "$host_cpu" = ia64; then
6182         # AIX 5 now supports IA64 processor
6183         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6184       fi
6185       ;;
6187     amigaos*)
6188       # FIXME: we need at least 68020 code to build shared libraries, but
6189       # adding the `-m68020' flag to GCC prevents building anything better,
6190       # like `-m68040'.
6191       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6192       ;;
6194     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6195       # PIC is the default for these OSes.
6196       ;;
6198     mingw* | pw32* | os2*)
6199       # This hack is so that the source file can tell whether it is being
6200       # built for inclusion in a dll (and should export symbols for example).
6201       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6202       ;;
6204     darwin* | rhapsody*)
6205       # PIC is the default on this platform
6206       # Common symbols not allowed in MH_DYLIB files
6207       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6208       ;;
6210     interix3*)
6211       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6212       # Instead, we relocate shared libraries at runtime.
6213       ;;
6215     msdosdjgpp*)
6216       # Just because we use GCC doesn't mean we suddenly get shared libraries
6217       # on systems that don't support them.
6218       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6219       enable_shared=no
6220       ;;
6222     sysv4*MP*)
6223       if test -d /usr/nec; then
6224         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6225       fi
6226       ;;
6228     hpux*)
6229       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6230       # not for PA HP-UX.
6231       case $host_cpu in
6232       hppa*64*|ia64*)
6233         # +Z the default
6234         ;;
6235       *)
6236         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6237         ;;
6238       esac
6239       ;;
6241     *)
6242       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6243       ;;
6244     esac
6245   else
6246     # PORTME Check for flag to pass linker flags through the system compiler.
6247     case $host_os in
6248     aix*)
6249       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6250       if test "$host_cpu" = ia64; then
6251         # AIX 5 now supports IA64 processor
6252         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6253       else
6254         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6255       fi
6256       ;;
6257       darwin*)
6258         # PIC is the default on this platform
6259         # Common symbols not allowed in MH_DYLIB files
6260        case $cc_basename in
6261          xlc*)
6262          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6263          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6264          ;;
6265        esac
6266        ;;
6268     mingw* | pw32* | os2*)
6269       # This hack is so that the source file can tell whether it is being
6270       # built for inclusion in a dll (and should export symbols for example).
6271       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6272       ;;
6274     hpux9* | hpux10* | hpux11*)
6275       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6276       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6277       # not for PA HP-UX.
6278       case $host_cpu in
6279       hppa*64*|ia64*)
6280         # +Z the default
6281         ;;
6282       *)
6283         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6284         ;;
6285       esac
6286       # Is there a better lt_prog_compiler_static that works with the bundled CC?
6287       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6288       ;;
6290     irix5* | irix6* | nonstopux*)
6291       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6292       # PIC (with -KPIC) is the default.
6293       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6294       ;;
6296     newsos6)
6297       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6298       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6299       ;;
6301     linux*)
6302       case $cc_basename in
6303       icc* | ecc*)
6304         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6305         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6306         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6307         ;;
6308       pgcc* | pgf77* | pgf90* | pgf95*)
6309         # Portland Group compilers (*not* the Pentium gcc compiler,
6310         # which looks to be a dead project)
6311         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6312         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6313         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6314         ;;
6315       ccc*)
6316         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6317         # All Alpha code is PIC.
6318         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6319         ;;
6320       esac
6321       ;;
6323     osf3* | osf4* | osf5*)
6324       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6325       # All OSF/1 code is PIC.
6326       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6327       ;;
6329     solaris*)
6330       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6331       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6332       case $cc_basename in
6333       f77* | f90* | f95*)
6334         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6335       *)
6336         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6337       esac
6338       ;;
6340     sunos4*)
6341       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6342       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6343       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6344       ;;
6346     sysv4 | sysv4.2uw2* | sysv4.3*)
6347       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6348       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6349       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6350       ;;
6352     sysv4*MP*)
6353       if test -d /usr/nec ;then
6354         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6355         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6356       fi
6357       ;;
6359     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6360       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6361       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6362       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6363       ;;
6365     unicos*)
6366       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6367       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6368       ;;
6370     uts4*)
6371       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6372       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6373       ;;
6375     *)
6376       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6377       ;;
6378     esac
6379   fi
6381 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6384 # Check to make sure the PIC flag actually works.
6386 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6387   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6388     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6389     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6390     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6391      "" | " "*) ;;
6392      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6393      esac],
6394     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6395      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6397 case $host_os in
6398   # For platforms which do not support PIC, -DPIC is meaningless:
6399   *djgpp*)
6400     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6401     ;;
6402   *)
6403     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6404     ;;
6405 esac
6408 # Check to make sure the static flag actually works.
6410 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6411 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6412   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6413   $lt_tmp_static_flag,
6414   [],
6415   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6419 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6420 # ------------------------------------
6421 # See if the linker supports building shared libraries.
6422 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6423 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6424 ifelse([$1],[CXX],[
6425   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6426   case $host_os in
6427   aix4* | aix5*)
6428     # If we're using GNU nm, then we don't want the "-C" option.
6429     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6430     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6431       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6432     else
6433       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6434     fi
6435     ;;
6436   pw32*)
6437     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6438   ;;
6439   cygwin* | mingw*)
6440     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6441   ;;
6442   *)
6443     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6444   ;;
6445   esac
6447   runpath_var=
6448   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6449   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6450   _LT_AC_TAGVAR(archive_cmds, $1)=
6451   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6452   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6453   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6454   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6455   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6456   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6457   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6458   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6459   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6460   _LT_AC_TAGVAR(hardcode_direct, $1)=no
6461   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6462   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6463   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6464   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6465   _LT_AC_TAGVAR(module_cmds, $1)=
6466   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6467   _LT_AC_TAGVAR(always_export_symbols, $1)=no
6468   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6469   # include_expsyms should be a list of space-separated symbols to be *always*
6470   # included in the symbol list
6471   _LT_AC_TAGVAR(include_expsyms, $1)=
6472   # exclude_expsyms can be an extended regexp of symbols to exclude
6473   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6474   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6475   # as well as any symbol that contains `d'.
6476   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6477   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6478   # platforms (ab)use it in PIC code, but their linkers get confused if
6479   # the symbol is explicitly referenced.  Since portable code cannot
6480   # rely on this symbol name, it's probably fine to never include it in
6481   # preloaded symbol tables.
6482   extract_expsyms_cmds=
6483   # Just being paranoid about ensuring that cc_basename is set.
6484   _LT_CC_BASENAME([$compiler])
6485   case $host_os in
6486   cygwin* | mingw* | pw32*)
6487     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6488     # When not using gcc, we currently assume that we are using
6489     # Microsoft Visual C++.
6490     if test "$GCC" != yes; then
6491       with_gnu_ld=no
6492     fi
6493     ;;
6494   interix*)
6495     # we just hope/assume this is gcc and not c89 (= MSVC++)
6496     with_gnu_ld=yes
6497     ;;
6498   openbsd*)
6499     with_gnu_ld=no
6500     ;;
6501   esac
6503   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6504   if test "$with_gnu_ld" = yes; then
6505     # If archive_cmds runs LD, not CC, wlarc should be empty
6506     wlarc='${wl}'
6508     # Set some defaults for GNU ld with shared library support. These
6509     # are reset later if shared libraries are not supported. Putting them
6510     # here allows them to be overridden if necessary.
6511     runpath_var=LD_RUN_PATH
6512     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6513     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6514     # ancient GNU ld didn't support --whole-archive et. al.
6515     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6516         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6517       else
6518         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6519     fi
6520     supports_anon_versioning=no
6521     case `$LD -v 2>/dev/null` in
6522       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6523       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6524       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6525       *\ 2.11.*) ;; # other 2.11 versions
6526       *) supports_anon_versioning=yes ;;
6527     esac
6529     # See if GNU ld supports shared libraries.
6530     case $host_os in
6531     aix3* | aix4* | aix5*)
6532       # On AIX/PPC, the GNU linker is very broken
6533       if test "$host_cpu" != ia64; then
6534         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6535         cat <<EOF 1>&2
6537 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6538 *** to be unable to reliably create shared libraries on AIX.
6539 *** Therefore, libtool is disabling shared libraries support.  If you
6540 *** really care for shared libraries, you may want to modify your PATH
6541 *** so that a non-GNU linker is found, and then restart.
6544       fi
6545       ;;
6547     amigaos*)
6548       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6549       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6550       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6552       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6553       # that the semantics of dynamic libraries on AmigaOS, at least up
6554       # to version 4, is to share data among multiple programs linked
6555       # with the same dynamic library.  Since this doesn't match the
6556       # behavior of shared libraries on other platforms, we can't use
6557       # them.
6558       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6559       ;;
6561     beos*)
6562       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6563         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6564         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6565         # support --undefined.  This deserves some investigation.  FIXME
6566         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6567       else
6568         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6569       fi
6570       ;;
6572     cygwin* | mingw* | pw32*)
6573       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6574       # as there is no search path for DLLs.
6575       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6576       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6577       _LT_AC_TAGVAR(always_export_symbols, $1)=no
6578       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6579       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6581       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6582         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6583         # If the export-symbols file already is a .def file (1st line
6584         # is EXPORTS), use it as is; otherwise, prepend...
6585         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6586           cp $export_symbols $output_objdir/$soname.def;
6587         else
6588           echo EXPORTS > $output_objdir/$soname.def;
6589           cat $export_symbols >> $output_objdir/$soname.def;
6590         fi~
6591         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6592       else
6593         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6594       fi
6595       ;;
6597     interix3*)
6598       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6599       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6600       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6601       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6602       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6603       # Instead, shared libraries are loaded at an image base (0x10000000 by
6604       # default) and relocated if they conflict, which is a slow very memory
6605       # consuming and fragmenting process.  To avoid this, we pick a random,
6606       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6607       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6608       _LT_AC_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'
6609       _LT_AC_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'
6610       ;;
6612     linux*)
6613       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6614         tmp_addflag=
6615         case $cc_basename,$host_cpu in
6616         pgcc*)                          # Portland Group C compiler
6617           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6618           tmp_addflag=' $pic_flag'
6619           ;;
6620         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
6621           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6622           tmp_addflag=' $pic_flag -Mnomain' ;;
6623         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
6624           tmp_addflag=' -i_dynamic' ;;
6625         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6626           tmp_addflag=' -i_dynamic -nofor_main' ;;
6627         ifc* | ifort*)                  # Intel Fortran compiler
6628           tmp_addflag=' -nofor_main' ;;
6629         esac
6630         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6632         if test $supports_anon_versioning = yes; then
6633           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6634   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6635   $echo "local: *; };" >> $output_objdir/$libname.ver~
6636           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6637         fi
6638       else
6639         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6640       fi
6641       ;;
6643     netbsd*)
6644       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6645         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6646         wlarc=
6647       else
6648         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6649         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6650       fi
6651       ;;
6653     solaris*)
6654       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6655         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6656         cat <<EOF 1>&2
6658 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6659 *** create shared libraries on Solaris systems.  Therefore, libtool
6660 *** is disabling shared libraries support.  We urge you to upgrade GNU
6661 *** binutils to release 2.9.1 or newer.  Another option is to modify
6662 *** your PATH or compiler configuration so that the native linker is
6663 *** used, and then restart.
6666       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6667         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6668         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6669       else
6670         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6671       fi
6672       ;;
6674     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6675       case `$LD -v 2>&1` in
6676         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
6677         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6678         cat <<_LT_EOF 1>&2
6680 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6681 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6682 *** is disabling shared libraries support.  We urge you to upgrade GNU
6683 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6684 *** your PATH or compiler configuration so that the native linker is
6685 *** used, and then restart.
6687 _LT_EOF
6688         ;;
6689         *)
6690           if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6691             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6692             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6693             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6694           else
6695             _LT_AC_TAGVAR(ld_shlibs, $1)=no
6696           fi
6697         ;;
6698       esac
6699       ;;
6701     sunos4*)
6702       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6703       wlarc=
6704       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6705       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6706       ;;
6708     *)
6709       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6710         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6711         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6712       else
6713         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6714       fi
6715       ;;
6716     esac
6718     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6719       runpath_var=
6720       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6721       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6722       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6723     fi
6724   else
6725     # PORTME fill in a description of your system's linker (not GNU ld)
6726     case $host_os in
6727     aix3*)
6728       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6729       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6730       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6731       # Note: this linker hardcodes the directories in LIBPATH if there
6732       # are no directories specified by -L.
6733       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6734       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6735         # Neither direct hardcoding nor static linking is supported with a
6736         # broken collect2.
6737         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6738       fi
6739       ;;
6741     aix4* | aix5*)
6742       if test "$host_cpu" = ia64; then
6743         # On IA64, the linker does run time linking by default, so we don't
6744         # have to do anything special.
6745         aix_use_runtimelinking=no
6746         exp_sym_flag='-Bexport'
6747         no_entry_flag=""
6748       else
6749         # If we're using GNU nm, then we don't want the "-C" option.
6750         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6751         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6752           _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6753         else
6754           _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6755         fi
6756         aix_use_runtimelinking=no
6758         # Test if we are trying to use run time linking or normal
6759         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6760         # need to do runtime linking.
6761         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6762           for ld_flag in $LDFLAGS; do
6763           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6764             aix_use_runtimelinking=yes
6765             break
6766           fi
6767           done
6768           ;;
6769         esac
6771         exp_sym_flag='-bexport'
6772         no_entry_flag='-bnoentry'
6773       fi
6775       # When large executables or shared objects are built, AIX ld can
6776       # have problems creating the table of contents.  If linking a library
6777       # or program results in "error TOC overflow" add -mminimal-toc to
6778       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6779       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6781       _LT_AC_TAGVAR(archive_cmds, $1)=''
6782       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6783       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6784       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6786       if test "$GCC" = yes; then
6787         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6788         # We only want to do this on AIX 4.2 and lower, the check
6789         # below for broken collect2 doesn't work under 4.3+
6790           collect2name=`${CC} -print-prog-name=collect2`
6791           if test -f "$collect2name" && \
6792            strings "$collect2name" | grep resolve_lib_name >/dev/null
6793           then
6794           # We have reworked collect2
6795           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6796           else
6797           # We have old collect2
6798           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6799           # It fails to find uninstalled libraries when the uninstalled
6800           # path is not listed in the libpath.  Setting hardcode_minus_L
6801           # to unsupported forces relinking
6802           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6803           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6804           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6805           fi
6806           ;;
6807         esac
6808         shared_flag='-shared'
6809         if test "$aix_use_runtimelinking" = yes; then
6810           shared_flag="$shared_flag "'${wl}-G'
6811         fi
6812       else
6813         # not using gcc
6814         if test "$host_cpu" = ia64; then
6815         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6816         # chokes on -Wl,-G. The following line is correct:
6817           shared_flag='-G'
6818         else
6819           if test "$aix_use_runtimelinking" = yes; then
6820             shared_flag='${wl}-G'
6821           else
6822             shared_flag='${wl}-bM:SRE'
6823           fi
6824         fi
6825       fi
6827       # It seems that -bexpall does not export symbols beginning with
6828       # underscore (_), so it is better to generate a list of symbols to export.
6829       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6830       if test "$aix_use_runtimelinking" = yes; then
6831         # Warning - without using the other runtime loading flags (-brtl),
6832         # -berok will link without error, but may produce a broken library.
6833         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6834        # Determine the default libpath from the value encoded in an empty executable.
6835        _LT_AC_SYS_LIBPATH_AIX
6836        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6837         _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6838        else
6839         if test "$host_cpu" = ia64; then
6840           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6841           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6842           _LT_AC_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"
6843         else
6844          # Determine the default libpath from the value encoded in an empty executable.
6845          _LT_AC_SYS_LIBPATH_AIX
6846          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6847           # Warning - without using the other run time loading flags,
6848           # -berok will link without error, but may produce a broken library.
6849           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6850           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6851           # Exported symbols can be pulled into shared objects from archives
6852           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6853           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6854           # This is similar to how AIX traditionally builds its shared libraries.
6855           _LT_AC_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'
6856         fi
6857       fi
6858       ;;
6860     amigaos*)
6861       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6862       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6863       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6864       # see comment about different semantics on the GNU ld section
6865       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6866       ;;
6868     bsdi[[45]]*)
6869       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6870       ;;
6872     cygwin* | mingw* | pw32*)
6873       # When not using gcc, we currently assume that we are using
6874       # Microsoft Visual C++.
6875       # hardcode_libdir_flag_spec is actually meaningless, as there is
6876       # no search path for DLLs.
6877       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6878       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6879       # Tell ltmain to make .lib files, not .a files.
6880       libext=lib
6881       # Tell ltmain to make .dll files, not .so files.
6882       shrext_cmds=".dll"
6883       # FIXME: Setting linknames here is a bad hack.
6884       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6885       # The linker will automatically build a .lib file if we build a DLL.
6886       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6887       # FIXME: Should let the user specify the lib program.
6888       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6889       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6890       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6891       ;;
6893     darwin* | rhapsody*)
6894       case $host_os in
6895         rhapsody* | darwin1.[[012]])
6896          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6897          ;;
6898        *) # Darwin 1.3 on
6899          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6900            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6901          else
6902            case ${MACOSX_DEPLOYMENT_TARGET} in
6903              10.[[012]])
6904                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6905                ;;
6906              10.*)
6907                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6908                ;;
6909            esac
6910          fi
6911          ;;
6912       esac
6913       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6914       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6915       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6916       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6917       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6918       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6919     if test "$GCC" = yes ; then
6920         output_verbose_link_cmd='echo'
6921         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6922       _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6923       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6924       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6925       _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6926     else
6927       case $cc_basename in
6928         xlc*)
6929          output_verbose_link_cmd='echo'
6930          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6931          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6932           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6933          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6934           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6935           ;;
6936        *)
6937          _LT_AC_TAGVAR(ld_shlibs, $1)=no
6938           ;;
6939       esac
6940     fi
6941       ;;
6943     dgux*)
6944       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6945       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6946       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6947       ;;
6949     freebsd1*)
6950       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6951       ;;
6953     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6954     # support.  Future versions do this automatically, but an explicit c++rt0.o
6955     # does not break anything, and helps significantly (at the cost of a little
6956     # extra space).
6957     freebsd2.2*)
6958       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6959       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6960       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6961       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6962       ;;
6964     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6965     freebsd2*)
6966       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6967       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6968       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6969       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6970       ;;
6972     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6973     freebsd* | kfreebsd*-gnu | dragonfly*)
6974       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6975       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6976       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6977       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6978       ;;
6980     hpux9*)
6981       if test "$GCC" = yes; then
6982         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6983       else
6984         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6985       fi
6986       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6987       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6988       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6990       # hardcode_minus_L: Not really in the search PATH,
6991       # but as the default location of the library.
6992       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6993       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6994       ;;
6996     hpux10*)
6997       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6998         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6999       else
7000         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7001       fi
7002       if test "$with_gnu_ld" = no; then
7003         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7004         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7006         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7007         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7009         # hardcode_minus_L: Not really in the search PATH,
7010         # but as the default location of the library.
7011         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7012       fi
7013       ;;
7015     hpux11*)
7016       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7017         case $host_cpu in
7018         hppa*64*)
7019           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7020           ;;
7021         ia64*)
7022           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7023           ;;
7024         *)
7025           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7026           ;;
7027         esac
7028       else
7029         case $host_cpu in
7030         hppa*64*)
7031           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7032           ;;
7033         ia64*)
7034           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7035           ;;
7036         *)
7037           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7038           ;;
7039         esac
7040       fi
7041       if test "$with_gnu_ld" = no; then
7042         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7043         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7045         case $host_cpu in
7046         hppa*64*|ia64*)
7047           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7048           _LT_AC_TAGVAR(hardcode_direct, $1)=no
7049           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7050           ;;
7051         *)
7052           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7053           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7055           # hardcode_minus_L: Not really in the search PATH,
7056           # but as the default location of the library.
7057           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7058           ;;
7059         esac
7060       fi
7061       ;;
7063     irix5* | irix6* | nonstopux*)
7064       if test "$GCC" = yes; then
7065         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7066       else
7067         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7068         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7069       fi
7070       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7071       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7072       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7073       ;;
7075     netbsd*)
7076       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7077         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7078       else
7079         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7080       fi
7081       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7082       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7083       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7084       ;;
7086     newsos6)
7087       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7088       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7089       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7090       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7091       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7092       ;;
7094     openbsd*)
7095       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7096       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7097       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7098         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7099         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7100         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7101         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7102       else
7103        case $host_os in
7104          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7105            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7106            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7107            ;;
7108          *)
7109            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7110            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7111            ;;
7112        esac
7113       fi
7114       ;;
7116     os2*)
7117       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7118       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7119       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7120       _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7121       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7122       ;;
7124     osf3*)
7125       if test "$GCC" = yes; then
7126         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7127         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7128       else
7129         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7130         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7131       fi
7132       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7133       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7134       ;;
7136     osf4* | osf5*)      # as osf3* with the addition of -msym flag
7137       if test "$GCC" = yes; then
7138         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7139         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7140         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7141       else
7142         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7143         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7144         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7145         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7147         # Both c and cxx compiler support -rpath directly
7148         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7149       fi
7150       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7151       ;;
7153     solaris*)
7154       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7155       if test "$GCC" = yes; then
7156         wlarc='${wl}'
7157         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7158         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7159           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7160       else
7161         wlarc=''
7162         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7163         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7164         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7165       fi
7166       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7167       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7168       case $host_os in
7169       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7170       *)
7171         # The compiler driver will combine linker options so we
7172         # cannot just pass the convience library names through
7173         # without $wl, iff we do not link with $LD.
7174         # Luckily, gcc supports the same syntax we need for Sun Studio.
7175         # Supported since Solaris 2.6 (maybe 2.5.1?)
7176         case $wlarc in
7177         '')
7178           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7179         *)
7180           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7181         esac ;;
7182       esac
7183       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7184       ;;
7186     sunos4*)
7187       if test "x$host_vendor" = xsequent; then
7188         # Use $CC to link under sequent, because it throws in some extra .o
7189         # files that make .init and .fini sections work.
7190         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7191       else
7192         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7193       fi
7194       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7195       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7196       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7197       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7198       ;;
7200     sysv4)
7201       case $host_vendor in
7202         sni)
7203           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7204           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7205         ;;
7206         siemens)
7207           ## LD is ld it makes a PLAMLIB
7208           ## CC just makes a GrossModule.
7209           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7210           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7211           _LT_AC_TAGVAR(hardcode_direct, $1)=no
7212         ;;
7213         motorola)
7214           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7215           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7216         ;;
7217       esac
7218       runpath_var='LD_RUN_PATH'
7219       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7220       ;;
7222     sysv4.3*)
7223       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7224       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7225       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7226       ;;
7228     sysv4*MP*)
7229       if test -d /usr/nec; then
7230         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7231         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7232         runpath_var=LD_RUN_PATH
7233         hardcode_runpath_var=yes
7234         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7235       fi
7236       ;;
7238     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7239       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7240       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7241       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7242       runpath_var='LD_RUN_PATH'
7244       if test "$GCC" = yes; then
7245         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7246         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7247       else
7248         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7249         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7250       fi
7251       ;;
7253     sysv5* | sco3.2v5* | sco5v6*)
7254       # Note: We can NOT use -z defs as we might desire, because we do not
7255       # link with -lc, and that would cause any symbols used from libc to
7256       # always be unresolved, which means just about no library would
7257       # ever link correctly.  If we're not using GNU ld we use -z text
7258       # though, which does catch some bad symbols but isn't as heavy-handed
7259       # as -z defs.
7260       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7261       _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7262       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7263       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7264       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7265       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7266       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7267       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7268       runpath_var='LD_RUN_PATH'
7270       if test "$GCC" = yes; then
7271         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7272         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7273       else
7274         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7275         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7276       fi
7277       ;;
7279     uts4*)
7280       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7281       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7282       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7283       ;;
7285     *)
7286       _LT_AC_TAGVAR(ld_shlibs, $1)=no
7287       ;;
7288     esac
7289   fi
7291 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7292 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7295 # Do we need to explicitly link libc?
7297 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7298 x|xyes)
7299   # Assume -lc should be added
7300   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7302   if test "$enable_shared" = yes && test "$GCC" = yes; then
7303     case $_LT_AC_TAGVAR(archive_cmds, $1) in
7304     *'~'*)
7305       # FIXME: we may have to deal with multi-command sequences.
7306       ;;
7307     '$CC '*)
7308       # Test whether the compiler implicitly links with -lc since on some
7309       # systems, -lgcc has to come before -lc. If gcc already passes -lc
7310       # to ld, don't add -lc before -lgcc.
7311       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7312       $rm conftest*
7313       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7315       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7316         soname=conftest
7317         lib=conftest
7318         libobjs=conftest.$ac_objext
7319         deplibs=
7320         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7321         pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7322         compiler_flags=-v
7323         linker_flags=-v
7324         verstring=
7325         output_objdir=.
7326         libname=conftest
7327         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7328         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7329         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7330         then
7331           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7332         else
7333           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7334         fi
7335         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7336       else
7337         cat conftest.err 1>&5
7338       fi
7339       $rm conftest*
7340       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7341       ;;
7342     esac
7343   fi
7344   ;;
7345 esac
7346 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7349 # _LT_AC_FILE_LTDLL_C
7350 # -------------------
7351 # Be careful that the start marker always follows a newline.
7352 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7353 # /* ltdll.c starts here */
7354 # #define WIN32_LEAN_AND_MEAN
7355 # #include <windows.h>
7356 # #undef WIN32_LEAN_AND_MEAN
7357 # #include <stdio.h>
7359 # #ifndef __CYGWIN__
7360 # #  ifdef __CYGWIN32__
7361 # #    define __CYGWIN__ __CYGWIN32__
7362 # #  endif
7363 # #endif
7365 # #ifdef __cplusplus
7366 # extern "C" {
7367 # #endif
7368 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7369 # #ifdef __cplusplus
7370 # }
7371 # #endif
7373 # #ifdef __CYGWIN__
7374 # #include <cygwin/cygwin_dll.h>
7375 # DECLARE_CYGWIN_DLL( DllMain );
7376 # #endif
7377 # HINSTANCE __hDllInstance_base;
7379 # BOOL APIENTRY
7380 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7381 # {
7382 #   __hDllInstance_base = hInst;
7383 #   return TRUE;
7384 # }
7385 # /* ltdll.c ends here */
7386 ])# _LT_AC_FILE_LTDLL_C
7389 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7390 # ---------------------------------
7391 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7394 # old names
7395 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7396 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7397 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7398 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7399 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7400 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7401 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7403 # This is just to silence aclocal about the macro not being used
7404 ifelse([AC_DISABLE_FAST_INSTALL])
7406 AC_DEFUN([LT_AC_PROG_GCJ],
7407 [AC_CHECK_TOOL(GCJ, gcj, no)
7408   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7409   AC_SUBST(GCJFLAGS)
7412 AC_DEFUN([LT_AC_PROG_RC],
7413 [AC_CHECK_TOOL(RC, windres, no)
7416 ############################################################
7417 # NOTE: This macro has been submitted for inclusion into   #
7418 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7419 #  a released version of Autoconf we should remove this    #
7420 #  macro and use it instead.                               #
7421 ############################################################
7422 # LT_AC_PROG_SED
7423 # --------------
7424 # Check for a fully-functional sed program, that truncates
7425 # as few characters as possible.  Prefer GNU sed if found.
7426 AC_DEFUN([LT_AC_PROG_SED],
7427 [AC_MSG_CHECKING([for a sed that does not truncate output])
7428 AC_CACHE_VAL(lt_cv_path_SED,
7429 [# Loop through the user's path and test for sed and gsed.
7430 # Then use that list of sed's as ones to test for truncation.
7431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7432 for as_dir in $PATH
7434   IFS=$as_save_IFS
7435   test -z "$as_dir" && as_dir=.
7436   for lt_ac_prog in sed gsed; do
7437     for ac_exec_ext in '' $ac_executable_extensions; do
7438       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7439         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7440       fi
7441     done
7442   done
7443 done
7444 lt_ac_max=0
7445 lt_ac_count=0
7446 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7447 # along with /bin/sed that truncates output.
7448 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7449   test ! -f $lt_ac_sed && continue
7450   cat /dev/null > conftest.in
7451   lt_ac_count=0
7452   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7453   # Check for GNU sed and select it if it is found.
7454   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7455     lt_cv_path_SED=$lt_ac_sed
7456     break
7457   fi
7458   while true; do
7459     cat conftest.in conftest.in >conftest.tmp
7460     mv conftest.tmp conftest.in
7461     cp conftest.in conftest.nl
7462     echo >>conftest.nl
7463     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7464     cmp -s conftest.out conftest.nl || break
7465     # 10000 chars as input seems more than enough
7466     test $lt_ac_count -gt 10 && break
7467     lt_ac_count=`expr $lt_ac_count + 1`
7468     if test $lt_ac_count -gt $lt_ac_max; then
7469       lt_ac_max=$lt_ac_count
7470       lt_cv_path_SED=$lt_ac_sed
7471     fi
7472   done
7473 done
7475 SED=$lt_cv_path_SED
7476 AC_MSG_RESULT([$SED])