Migrated to the latest automake & libtool releases/prereleases, with all
[alexxy/gromacs.git] / aclocal.m4
1 # aclocal.m4 generated automatically by aclocal 1.4h
2
3 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 # ACX_CHECK_FFTW()
15 # ----------------
16 # This macro checks for fftw header files and libraries,
17 # including the possible prefixing with s or d to determine precision.
18 # Arg 1 is the fftw header/library name to check for, without 
19 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
20 # Arg 2 is the size of the real variable used.
21 AC_DEFUN(ACX_CHECK_FFTW,
22 [
23 if test -z "$ac_fftw_firstname"; then
24
25 sizeof_real=$2
26 if test $sizeof_real = 8; then
27   prec="double"
28   fftwcheckprefix=d
29 else
30   prec="single"
31   fftwcheckprefix=s
32 fi
33
34 usedprefix=""
35 ok="no"
36 # check header doesn't work, since we must use mpicc to get includes, 
37 # we cant trust cpp.
38 AC_MSG_CHECKING([for $1.h])
39 AC_TRY_COMPILE([#include <$1.h>],,
40 [
41 fftwname=$1 
42 AC_MSG_RESULT(yes)
43 ],
44 AC_MSG_RESULT(no))
45
46
47 if test -n "$fftwname"; then
48 # we cannot run the code since an MPI program might not be allowed 
49 # on a login node of a supercomputer
50 AC_TRY_COMPILE([#include <$fftwname.h>],
51 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
52 [ok=yes],[ok=no])
53 fi
54
55 fftwname=$1
56
57 if test "$ok" != "yes"; then
58   xfftwname=${fftwcheckprefix}${fftwname}
59   AC_MSG_CHECKING([for $xfftwname.h])
60   AC_TRY_COMPILE([#include <$xfftwname.h>],,AC_MSG_RESULT(yes),
61 [
62 AC_MSG_RESULT(no)
63 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
64 [Do you have $prec precision FFTW installed? If you are using packages,]
65 [note that you also need fftw-devel to compile GROMACS. You can find the ]
66 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
67 [If you compiled FFTW yourself:                                        ]
68 [Note that the default FFTW setup is double precision. Change the FFTW]
69 [configuration to single with --enable-float. If you want MPI support,]
70 [use --enable-mpi. It is a good idea to install both single & double.] 
71 [If your sysadm doesn't want to install it you can do it to a location]
72 [in your home directory and provide the correct paths in the CPPFLAGS]
73 [and LDFLAGS environment variables before running configure.]
74 [That is also necessary to do if your compiler doesn't search]
75 [/usr/local/include and /usr/local/lib by default.]
76 [You can find information at www.gromacs.org, or in the INSTALL file.])
77 ])
78 AC_TRY_COMPILE([#include <$xfftwname.h>],
79 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
80 [
81 fftwname=$xfftwname 
82 usedprefix=$fftwcheckprefix
83 ],
84 [
85 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
86 [Do you have $prec precision FFTW installed? If you are using packages,]
87 [note that you also need fftw-devel to compile GROMACS. You can find the ]
88 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
89 [If you compiled FFTW yourself:                                       ]
90 [Note that the default FFTW setup is double precision. Change the FFTW]
91 [configuration to single with --enable-float. If you want MPI support,]
92 [use --enable-mpi. It is a good idea to install both single & double.] 
93 [If your sysadm doesn't want to install it you can do it to a location]
94 [in your home directory and provide the correct paths in the CPPFLAGS]
95 [and LDFLAGS environment variables before running configure.]
96 [That is also necessary to do if your compiler doesn't search]
97 [/usr/local/include and /usr/local/lib by default.]
98 [You can find information at www.gromacs.org, or in the INSTALL file.])])
99 fi
100
101 AC_CHECK_LIB($fftwname,main,,
102 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
103 ac_fftw_savedprefix=$usedprefix
104 ac_fftw_firstname=$fftwname
105
106 else
107
108 fftwname=${ac_fftw_savedprefix}$1
109 AC_MSG_CHECKING([for $fftwname.h])
110 AC_TRY_COMPILE(
111 [#include <$fftwname.h>],,
112 [AC_MSG_RESULT(yes)
113 LIBS="-l$fftwname $LIBS"
114 AC_TRY_LINK_FUNC([main],,,
115 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
116 [
117 AC_MSG_RESULT(no)
118 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your 
119 fftw prefixes match - we already use $ac_fftw_firstname.h])
120 ])
121
122 fi
123
124 ])
125
126
127
128
129 dnl
130 dnl
131 dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
132 dnl     to easily use them in a Makefile.
133 dnl
134 dnl Adapted from a macro by Andreas Zeller.
135 dnl
136 dnl The variables provided are :
137 dnl     link_motif              (e.g. -L/usr/lesstif/lib -lXm -lXt)
138 dnl     include_motif           (e.g. -I/usr/lesstif/lib)
139 dnl     motif_libraries         (e.g. /usr/lesstif/lib)
140 dnl     motif_includes          (e.g. /usr/lesstif/include)
141 dnl
142 dnl The link_motif and include_motif variables should be fit to put on
143 dnl your application's link line in your Makefile.
144 dnl
145 AC_DEFUN(AC_FIND_MOTIF,
146 [
147 AC_REQUIRE([AC_PATH_XTRA])
148
149 motif_includes=
150 motif_libraries=
151
152 dnl AC_ARG_WITH(motif,
153 dnl [  --without-motif         do not use Motif widgets])
154 dnl Treat --without-motif like
155 dnl --without-motif-includes --without-motif-libraries.
156
157 if test "$no_x" = "yes"
158 then
159   motif_includes=no
160   motif_libraries=no
161 fi
162
163 AC_ARG_WITH(motif-includes,
164 [  --with-motif-includes=DIR     Motif include files are in DIR],
165 motif_includes="$withval")
166
167 AC_ARG_WITH(motif-libraries,
168 [  --with-motif-libraries=DIR    Motif libraries are in DIR],
169 motif_libraries="$withval")
170
171
172 AC_MSG_CHECKING(for Motif)
173
174 #
175 #
176 # Search the include files.
177 #
178 if test "$motif_includes" = ""; then
179 AC_CACHE_VAL(ac_cv_motif_includes,
180 [
181 ac_motif_save_LIBS="$LIBS"
182 ac_motif_save_INCLUDES="$INCLUDES"
183 ac_motif_save_CPPFLAGS="$CPPFLAGS"
184 ac_motif_save_LDFLAGS="$LDFLAGS"
185 #
186 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
187 INCLUDES="$X_CFLAGS $INCLUDES"
188 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
189 LDFLAGS="$X_LIBS $LDFLAGS"
190 #
191 ac_cv_motif_includes="no"
192 AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
193 [
194 # Xm/Xm.h is in the standard search path.
195 ac_cv_motif_includes=
196 ],
197 [
198 # Xm/Xm.h is not in the standard search path.
199 # Locate it and put its directory in `motif_includes'
200 #
201 # /usr/include/Motif* are used on HP-UX (Motif).
202 # /usr/include/X11* are used on HP-UX (X and Athena).
203 # /usr/dt is used on Solaris (Motif).
204 # /usr/openwin is used on Solaris (X and Athena).
205 # Other directories are just guesses.
206 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
207            /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
208            /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
209            /usr/dt/include /usr/openwin/include \
210            /usr/dt/*/include /opt/*/include /usr/include/Motif* \
211            "${prefix}"/*/include /usr/*/include /usr/local/*/include \
212            "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
213 if test -f "$dir/Xm/Xm.h"; then
214 ac_cv_motif_includes="$dir"
215 break
216 fi
217 done
218 ])
219 #
220 LIBS="$ac_motif_save_LIBS"
221 INCLUDES="$ac_motif_save_INCLUDES"
222 CPPFLAGS="$ac_motif_save_CPPFLAGS"
223 LDFLAGS="$ac_motif_save_LDFLAGS"
224 ])
225 motif_includes="$ac_cv_motif_includes"
226 fi
227 #
228 #
229 # Now for the libraries.
230 #
231 if test "$motif_libraries" = ""; then
232 AC_CACHE_VAL(ac_cv_motif_libraries,
233 [
234 ac_motif_save_LIBS="$LIBS"
235 ac_motif_save_INCLUDES="$INCLUDES"
236 ac_motif_save_CPPFLAGS="$CPPFLAGS"
237 ac_motif_save_LDFLAGS="$LDFLAGS"
238 #
239 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
240 INCLUDES="$X_CFLAGS $INCLUDES"
241 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
242 LDFLAGS="$X_LIBS $LDFLAGS"
243 #
244 ac_cv_motif_libraries="no"
245 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
246 [
247 # libXm.a is in the standard search path.
248 ac_cv_motif_libraries=
249 ],
250 [
251 # libXm.a is not in the standard search path.
252 # Locate it and put its directory in `motif_libraries'
253 #
254 # /usr/lib/Motif* are used on HP-UX (Motif).
255 # /usr/lib/X11* are used on HP-UX (X and Athena).
256 # /usr/dt is used on Solaris (Motif).
257 # /usr/lesstif is used on Linux (Lesstif).
258 # /usr/openwin is used on Solaris (X and Athena).
259 # Other directories are just guesses.
260 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
261            /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
262            /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
263            /usr/dt/lib /usr/openwin/lib \
264            /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
265            /usr/lesstif*/lib /usr/lib/Lesstif* \
266            "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
267            "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
268 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
269 ac_cv_motif_libraries="$dir"
270 break
271 fi
272 done
273 ])
274 #
275 LIBS="$ac_motif_save_LIBS"
276 INCLUDES="$ac_motif_save_INCLUDES"
277 CPPFLAGS="$ac_motif_save_CPPFLAGS"
278 LDFLAGS="$ac_motif_save_LDFLAGS"
279 ])
280 #
281 motif_libraries="$ac_cv_motif_libraries"
282 fi
283 #
284 # Provide an easier way to link
285 #
286 if test "$motif_includes" = "no" -o "$motif_libraries" = "no"; then
287         with_motif="no"
288 else
289         with_motif="yes"
290 fi
291
292 if test "$with_motif" != "no"; then
293         if test "$motif_libraries" = ""; then
294                 link_motif="-lXm -lXt"
295                 MOTIF_LIBS="-lXm -lXt"
296         else
297                 link_motif="-L$motif_libraries -lXm -lXt"
298                 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
299         fi
300         if test "$motif_includes" != ""; then
301                 include_motif="-I$motif_includes"
302                 MOTIF_INCLUDES="-I$motif_includes"
303         fi
304         LIBS="$LIBS $MOTIF_LIBS"
305         INCLUDES="$INCLUDES $MOTIF_INCLUDES"
306         AC_DEFINE(HAVE_MOTIF,,[Use motif/lesstif libraries])
307 else
308         with_motif="no"
309 fi
310 #
311 #
312 #
313 #
314 motif_libraries_result="$motif_libraries"
315 motif_includes_result="$motif_includes"
316 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
317 test "$motif_includes_result" = "" && motif_includes_result="in default path"
318 test "$motif_libraries_result" = "no" && motif_libraries_result="(none)"
319 test "$motif_includes_result" = "no" && motif_includes_result="(none)"
320 AC_MSG_RESULT(
321   [libraries $motif_libraries_result, headers $motif_includes_result])
322 ])dnl
323
324
325 dnl macro modified from the fftw distribution (www.fftw.org)
326 AC_DEFUN(ACX_CHECK_CC_FLAGS,
327 [
328 AC_REQUIRE([AC_PROG_CC])
329 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
330 [echo 'void f(){}' > conftest.c
331 if test -z "`$CC $1 -c conftest.c 2>&1`"; then
332         ac_$2=yes
333 else
334         ac_$2=no
335 fi
336 rm -f conftest*
337 ])
338 if test "$ac_$2" = yes; then
339         :
340         $3
341 else
342         :
343         $4
344 fi
345 ])
346
347 dnl macro modified from the fftw distribution (www.fftw.org)
348 AC_DEFUN(ACX_CHECK_F77_FLAGS,
349 [
350 AC_REQUIRE([AC_PROG_F77])
351 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
352 [cat > conftest.f << EOF
353       subroutine f
354       return 
355       end
356 EOF
357 if test -z "`$F77 $1 -c conftest.f `"; then
358         ac_$2=yes
359 else
360         ac_$2=no
361 fi
362 rm -f conftest*
363 ])
364 if test "$ac_$2" = yes; then
365         :
366         $3
367 else
368         :
369         $4
370 fi
371 ])
372
373
374 # ACX_DETECT_GMXCPU
375 # ---------------------------
376 # Macro to extend the exact CPU for some hosts
377 AC_DEFUN(ACX_DETECT_GMXCPU,
378 [
379 AC_REQUIRE([AC_CANONICAL_HOST])
380
381 #
382 # Determine the exact cpu type on some common systems where it is 
383 # not visible from the host triplet.
384 # (on e.g. intel and dec/tru64 the host type is enough)
385
386 case "${host_cpu}-${host_os}" in
387
388 rs6000*-aix*)
389   # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
390   IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
391   if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
392     gmxcpu=power4
393   elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
394     gmxcpu=power3
395   elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
396     gmxcpu=power2
397   else
398     gmxcpu=""
399   fi
400   ;;
401
402 powerpc*-aix*)
403   if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
404     gmxcpu=ppc604
405   elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
406     gmxcpu=ppc603
407   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
408     gmxcpu=rs64a
409   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
410     gmxcpu=rs64b
411   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
412     gmxcpu=rs64c
413   else
414     gmxcpu=""
415   fi
416   ;;
417
418 mips*-irix*)
419   if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
420     gmxcpu=r12000
421   elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
422     gmxcpu=r10000
423   elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
424     gmxcpu=r8000
425   elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
426     gmxcpu=r5000
427   else
428     gmxcpu=""
429   fi
430   ;;
431
432 sparc*-solaris*)
433   if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
434     gmxcpu=ultrasparc3
435   elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
436     gmxcpu=ultrasparc2i
437   elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
438     gmxcpu=ultrasparc2
439   elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
440     gmxcpu=ultrasparc
441   else
442     gmxcpu=""
443   fi
444   ;;
445 *)
446   gmxcpu=""
447   ;;
448
449 esac
450 ])
451
452
453
454 # Macro modified from the fftw distribution (www.fftw.org)
455 # to determine optimization flags.
456 # Note that we have modified config.guess and config.sub
457 # to provide extended information on the detailed type of CPU.
458 # In general we assume you have recent versions of the compilers
459 # that support the highest optimization we know of. If not, you 
460 # can always override these flags, but it's better to upgrade :-)
461 AC_DEFUN(ACX_COMPILER_MAXOPT,
462 [
463 AC_REQUIRE([AC_PROG_CC])
464 AC_REQUIRE([AC_PROG_F77])
465 AC_REQUIRE([AC_CANONICAL_HOST])
466
467 # Try to determine "good" native compiler flags if none specified on command
468 # line. To avoid repeating the entire procedure for fortran flags, we first
469 # determine our suggested choices for both C and fortran, and then possibly
470 # override them with user choices.
471
472 cc_vendor="unknown"
473
474 case "${host_cpu}-${host_os}" in
475
476   *-solaris2*) 
477     case "${gmxcpu}" in
478       ultrasparc3*)
479         xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
480         xFFLAGS=$xCFLAGS
481         ;;
482       ultrasparc2i*)
483         xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
484         xFFLAGS=$xCFLAGS
485         ;;
486       ultrasparc2*)
487         xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
488         xFFLAGS=$xCFLAGS
489         ;;
490       ultrasparc*)
491         xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
492         xFFLAGS=$xCFLAGS
493         ;;
494       *)
495         xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
496         xFFLAGS=$xCFLAGS
497         ;;
498     esac
499     ;;
500
501   *-hpux*)  
502     xCFLAGS="-Ae +O3 +Oall"
503     xFFLAGS=$xCFLAGS
504     # If you haven't noticed, we don't like hp very much...
505     # but perhaps that will change if they make something nice out of ia64.
506     ;;
507
508   ia64*-*)
509     # The GNU compilers are checked outside this case statement.
510     # 1. Check for the SGI compilers. Actually, they report the are GNU C,
511     #    so this check isn't used right now, but we want to identify them
512     #    even if they change this later.
513    if ($CC -v 2>&1 | grep SGI > /dev/null); then
514      xCFLAGS="-O3 -Ofast"
515      xASFLAGS=$xCFLAGS
516    fi  
517    if ($F77 -v 2>&1 | grep SGI > /dev/null); then
518      xFFLAGS="-O3 -Ofast"
519    fi  
520    # PORTME 2. Check for intel compilers when we get our hands on one!
521    ;;   
522   rs6000*-aix*)
523     # dont use inter-procedure analysis for the innerloops - they take
524     # forever to compile with it, and it doesnt help at all.
525     case "${gmxcpu}" in
526       power4*)
527         xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
528         xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
529         ;;
530       power3*)
531         xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
532         xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
533         ;;
534       power2*)
535         xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
536         xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
537         ;;
538       power)
539         xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
540         xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
541         ;;
542       *)
543         # I don't think people are using anything older than power2, so we tune for
544         # pwr, but dont set the arch since it is nice to have common binaries 
545         # that run also on powerpc.
546         xCFLAGS="-O3 -qtune=pwr -qmaxmem=16384"
547         xFFLAGS="-O3 -Q -qtune=pwr -qmaxmem=16384 -qhot"
548         ;;
549     esac
550     ;;
551
552   powerpc*-aix*)
553     case "${gmxcpu}" in
554       ppc604)
555         xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
556         xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
557         ;;
558       ppc603)
559         xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
560         xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
561         ;;
562       rs64a)
563         xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
564         xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
565         ;;
566       rs64b)
567         xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
568         xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
569         ;;
570       rs64c)
571         xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
572         xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
573         ;;
574       *)
575         xCFLAGS="-O3 -qmaxmem=16384"
576         xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
577         ;;
578     esac
579     ;;
580
581   mips*-irix*)
582     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"
583     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"
584     
585     if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
586       xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
587       xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
588     fi
589
590     if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
591       xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms" 
592       xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms" 
593     fi
594     LDFLAGS="$LDFLAGS -woff 84"
595
596     case "${gmxcpu}" in
597       r12000*)
598         xCFLAGS="-n32 -r12000 -mips4 $xCFLAGS"
599         xFFLAGS="-n32 -r12000 -mips4 $xFFLAGS"
600         xLDFLAGS="-n32 -r12000 -mips4"
601         ;;
602       r10000*)
603         xCFLAGS="-n32 -r10000 -mips4 $xCFLAGS"
604         xFFLAGS="-n32 -r10000 -mips4 $xFFLAGS"
605         xLDFLAGS="-n32 -r10000 -mips4"
606         ;;
607       r8000*)
608         xCFLAGS="-n32 -r8000 -mips4 $xCFLAGS"
609         xFFLAGS="-n32 -r8000 -mips4 $xFFLAGS"
610         xLDFLAGS="-n32 -r8000 -mips4"
611         ;;
612       r5000*)
613         xCFLAGS="-n32 -r5000 -mips4 $xCFLAGS"
614         xFFLAGS="-n32 -r5000 -mips4 $xFFLAGS"
615         xLDFLAGS="-n32 -r5000 -mips4"
616         ;;
617       *)                
618         xCFLAGS="-n32 $xCFLAGS"
619         xFFLAGS="-n32 $xFFLAGS"
620         xLDFLAGS="-n32"
621         ;;
622     esac
623     ;;
624
625   alpha*-osf*) 
626      # NB: -arch implies -tune according to the cc manual.
627      # We dont use -ifo since it conflicts with dependency
628      # generation on old versions of the compiler.
629     case "${host_cpu}" in
630       alphaev*)
631         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
632         evtype=`echo ${host_cpu} | sed 's/alpha//'`
633         xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
634         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
635         xASFLAGS="-O4 -no_ifo -arch $evtype"
636         xLDFLAGS="-O4"
637         ;;
638       *)
639         xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
640         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
641         xASFLAGS="-O4 -no_ifo -arch host"
642         xLDFLAGS="-O4"
643         ;;
644     esac
645     ;;
646
647   alpha*-linux*)
648     case "${host_cpu}" in
649       alphaev*)
650         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
651         evtype=`echo ${host_cpu} | sed 's/alpha//'`
652         tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
653         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
654         tmpASFLAGS="-O4 -no_ifo -arch $evtype"
655         tmpLDFLAGS="-O4"
656         ;;
657       *)
658         tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
659         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
660         tmpASFLAGS="-O4 -no_ifo -arch host"
661         tmpLDFLAGS="-O4"
662         ;;
663     esac
664         # Compaq sometimes uses -version and sometimes -V
665         # Not 100% sure if ccc always has -V and F77 -version, so 
666         # we check both alternatives to be sure.
667     if (($CC -V 2>&1 | grep ompaq > /dev/null) || 
668         ($CC -version 2>&1 | grep ompaq > /dev/null)); then
669       xCFLAGS="$tmpCFLAGS"
670       xASFLAGS="$tmpASFLAGS"
671       cc_vendor="Compaq"
672     fi
673     if test "$enable_fortran" = "yes"; then
674       if (($F77 -V 2>&1 | grep ompaq > /dev/null) || 
675           ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
676         xFFLAGS="$tmpFFLAGS"
677       fi
678     fi
679     ;;
680
681   *-*)
682     # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
683     # further down, but we can at least check if the Portland compilers are used:
684     if $CC -V 2>  /dev/null | grep ortland > /dev/null 2>&1; then
685       case "${host_cpu}" in
686         i586)
687           pgiopt="-tp p5" 
688           ;;
689         i686)
690           pgiopt="-tp p6" 
691           ;;
692       esac
693       xCFLAGS="$pgiopt -fast -pc 32"
694       xASFLAGS="$xCFLAGS"
695     fi
696     if test "$enable_fortran" = "yes"; then
697       if $F77 -version 2>  /dev/null | grep Portland > /dev/null 2>&1; then
698         xFFLAGS="$xCFLAGS"
699       fi        
700     fi
701     ;;
702 esac    
703 # Phew, end of all those operating systems and processors!                      
704
705 # use default flags for gcc/g77 on all systems, but catch the SGI/ia64 sgicc
706 if test $ac_cv_prog_gcc = yes; then
707   if ($CC -v 2>&1 | grep SGI > /dev/null); then
708     xCFLAGS="-O3 -Ofast"
709     xASFLAGS="$xCFLAGS"
710   else  
711     xCFLAGS="-O6 -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
712     # the portland compiler only knows .s files, and always runs them
713     # through cpp. We support this by telling gcc to preprocess .s files.
714     xASFLAGS="$xCFLAGS -x assembler-with-cpp"
715     # -malign-double for x86 systems
716     ACX_CHECK_CC_FLAGS(-malign-double,align_double,xCFLAGS="$xCFLAGS -malign-double")
717   fi
718 fi
719   
720 if test $enable_fortran = yes; then
721   if test $ac_cv_prog_g77 = yes; then
722     if ($F77 -v 2>&1 | grep SGI > /dev/null); then
723       xFFLAGS="-O3 -Ofast"
724     else
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
729   fi
730 fi
731
732 CPU_FLAGS=""
733
734 if test "$GCC" = "yes"; then
735   # try to guess correct CPU flags, at least for powerpc linux
736   case "${host_cpu}" in
737     # i586/i686 cpu flags don't improve speed, thus no need to use them.
738     # don't check f77 separately - we assume f77 and gcc are similar      
739     powerpc*)
740       cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
741       is60x=`echo $cputype | egrep "^60[0-9]e?$"`
742       if test -n "$is60x"; then
743         ACX_CHECK_CC_FLAGS(-mcpu=$cputype,m_cpu_60x,CPU_FLAGS=-mcpu=$cputype)
744       elif test "$cputype" = 750; then
745         ACX_CHECK_CC_FLAGS(-mcpu=750,m_cpu_750,CPU_FLAGS=-mcpu=750)
746       fi
747       if test -z "$CPU_FLAGS"; then
748         ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS=-mcpu=powerpc)
749       fi
750       if test -z "$CPU_FLAGS"; then
751         ACX_CHECK_CC_FLAGS(-mpowerpc,m_powerpc,CPU_FLAGS=-mpowerpc)
752       fi
753    esac
754 else
755   AM_CONDITIONAL(GNU_CC,false)
756 fi
757
758 if test -n "$CPU_FLAGS"; then
759   xCFLAGS="$xCFLAGS $CPU_FLAGS"
760   xFFLAGS="$xFFLAGS $CPU_FLAGS"
761   xASFLAGS="$xASFLAGS $CPU_FLAGS"
762 fi
763
764 # Now check if the user provided anything special for C or fortran...
765 # Not nice to have checked everything then, but otherwise we would have
766 # to use entirely separate checks for C and fortran flags, doubling the code.
767 if test "$ac_test_CFLAGS" != "set"; then
768   CFLAGS="$xCFLAGS"
769   # Use the extra link optimization flags on e.g. irix only when
770   # we are using our own C compiler flags
771   LDFLAGS="$LDFLAGS $xLDFLAGS"
772   
773   if test -z "$CFLAGS"; then
774     echo "********************************************************************"
775     echo "* Note: We have not optimized the C compiler flags on your target  *"
776     echo "* yet, but the default CFLAGS=-O3 should be OK in most cases.      *"
777     echo "* You can override this by setting the CFLAGS environment variable.*"
778     echo "*******************************************************************"
779     CFLAGS="-O3"
780   fi
781   ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
782     echo "*******************************************************************"
783     echo "* Sorry, these optimization settings don't seem to work for       *"
784     echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
785     echo "*******************************************************************"
786     CFLAGS=""
787   ])
788 else
789   echo "******************************************"
790   echo "* Using CFLAGS from environment variable *"
791   echo "******************************************"
792 fi
793
794 if test "$enable_fortran" = "yes"; then 
795   if test "$ac_test_FFLAGS" != "set"; then
796     FFLAGS="$xFFLAGS"
797     if test -z "$FFLAGS"; then
798     echo "********************************************************************"
799     echo "* Note: We have not optimized the Fortran compiler flags on your   *"
800     echo "* target, but the default FFLAGS=-O3 should be OK in most cases.   *"
801     echo "* You can override this by setting the CFLAGS environment variable.*"
802     echo "********************************************************************"
803       FFLAGS="-O3"
804     fi
805     ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
806       echo "*******************************************************************"
807       echo "* Sorry, these optimization settings don't seem to work for       *"
808       echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
809       echo "*******************************************************************"
810       FFLAGS=""
811     ])
812   else
813     echo "******************************************"
814     echo "* Using FFLAGS from environment variable *"
815     echo "******************************************"
816   fi
817 fi
818 # Be silent for assembly flags, they are usually not important anyway
819 if test "${ASFLAGS+set}" != set; then
820   if test "${xASFLAGS+set}" != set; then
821     xASFLAGS="$CFLAGS"
822   fi
823   ASFLAGS="$xASFLAGS"
824 fi
825
826 ])
827
828
829
830 #
831 # Below, we include our patched version of libtool.m4, from 
832 # the libtool-1.4b beta distribution.
833 # See admin/README.patches for a list of changes!
834 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
835
836 # serial 47 AC_PROG_LIBTOOL
837
838 builtin([undefine],[symbols])
839
840 # AC_PROG_LIBTOOL
841 # ---------------
842 AC_DEFUN([AC_PROG_LIBTOOL],
843 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
844 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
845 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
846   AC_PROVIDE_IFELSE([AC_PROG_CXX],
847     [AC_LIBTOOL_CXX],
848     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
849   ])])
850 dnl And a similar setup for Fortran 77 support
851   AC_PROVIDE_IFELSE([AC_PROG_F77],
852     [AC_LIBTOOL_F77],
853     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
854 ])])
855
856
857 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
858 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
859 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
860   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
861     [AC_LIBTOOL_GCJ],
862     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
863       [AC_LIBTOOL_GCJ],
864       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
865         [AC_LIBTOOL_GCJ],
866       [ifdef([AC_PROG_GCJ],
867              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
868        ifdef([A][M_PROG_GCJ],
869              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
870        ifdef([LT_AC_PROG_GCJ],
871              [define([LT_AC_PROG_GCJ],
872                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
873 ])])# AC_PROG_LIBTOOL
874
875
876 # _AC_PROG_LIBTOOL
877 # ----------------
878 AC_DEFUN([_AC_PROG_LIBTOOL],
879 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
880 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
881 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
882 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
883
884 # This can be used to rebuild libtool when needed
885 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
886
887 # Always use our own libtool.
888 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
889 AC_SUBST(LIBTOOL)dnl
890
891 # Prevent multiple expansion
892 define([AC_PROG_LIBTOOL], [])
893 ])# _AC_PROG_LIBTOOL
894
895
896 # AC_LIBTOOL_SETUP
897 # ----------------
898 AC_DEFUN([AC_LIBTOOL_SETUP],
899 [AC_PREREQ(2.13)dnl
900 AC_REQUIRE([AC_ENABLE_SHARED])dnl
901 AC_REQUIRE([AC_ENABLE_STATIC])dnl
902 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
903 AC_REQUIRE([AC_CANONICAL_HOST])dnl
904 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
905 AC_REQUIRE([AC_PROG_CC])dnl
906 AC_REQUIRE([AC_PROG_LD])dnl
907 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
908 AC_REQUIRE([AC_PROG_NM])dnl
909 AC_REQUIRE([AC_PROG_LN_S])dnl
910 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
911 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
912 AC_REQUIRE([AC_OBJEXT])dnl
913 AC_REQUIRE([AC_EXEEXT])dnl
914 dnl
915
916 AC_LIBTOOL_SYS_MAX_CMD_LEN
917 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
918 AC_LIBTOOL_OBJDIR
919
920 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
921 _LT_AC_PROG_ECHO_BACKSLASH
922
923 case $host_os in
924 aix3*)
925   # AIX sometimes has problems with the GCC collect2 program.  For some
926   # reason, if we set the COLLECT_NAMES environment variable, the problems
927   # vanish in a puff of smoke.
928   if test "X${COLLECT_NAMES+set}" != Xset; then
929     COLLECT_NAMES=
930     export COLLECT_NAMES
931   fi
932   ;;
933 esac
934
935 # Sed substitution that helps us do robust quoting.  It backslashifies
936 # metacharacters that are still active within double-quoted strings.
937 Xsed='sed -e s/^X//'
938 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
939
940 # Same as above, but do not quote variable references.
941 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
942
943 # Sed substitution to delay expansion of an escaped shell variable in a
944 # double_quote_subst'ed string.
945 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
946
947 # Sed substitution to avoid accidental globbing in evaled expressions
948 no_glob_subst='s/\*/\\\*/g'
949
950 # Constants:
951 rm="rm -f"
952
953 # Global variables:
954 default_ofile=libtool
955 can_build_shared=yes
956
957 # All known linkers require a `.a' archive for static linking (except M$VC,
958 # which needs '.lib').
959 libext=a
960 ltmain="$ac_aux_dir/ltmain.sh"
961 ofile="$default_ofile"
962 with_gnu_ld="$lt_cv_prog_gnu_ld"
963
964 AC_CHECK_TOOL(RANLIB, ranlib, :)
965 AC_CHECK_TOOL(STRIP, strip, :)
966
967 old_CC="$CC"
968 old_CFLAGS="$CFLAGS"
969
970 # Set sane defaults for various variables
971 test -z "$AR" && AR=ar
972 test -z "$AR_FLAGS" && AR_FLAGS=cru
973 test -z "$AS" && AS=as
974 test -z "$CC" && CC=cc
975 test -z "$LTCC" && LTCC=$CC
976 test -z "$DLLTOOL" && DLLTOOL=dlltool
977 test -z "$LD" && LD=ld
978 test -z "$LN_S" && LN_S="ln -s"
979 test -z "$MAGIC_CMD" && MAGIC_CMD=file
980 test -z "$NM" && NM=nm
981 test -z "$OBJDUMP" && OBJDUMP=objdump
982 test -z "$RANLIB" && RANLIB=:
983 test -z "$STRIP" && STRIP=:
984 test -z "$ac_objext" && ac_objext=o
985
986 # Determine commands to create old-style static archives.
987 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
988 old_postinstall_cmds='chmod 644 $oldlib'
989 old_postuninstall_cmds=
990
991 if test -n "$RANLIB"; then
992   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
993   old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
994 fi
995
996 # Only perform the check for file, if the check method requires it
997 case $deplibs_check_method in
998 file_magic*)
999   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1000     AC_PATH_MAGIC
1001   fi
1002   ;;
1003 esac
1004
1005 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1006 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1007 enable_win32_dll=yes, enable_win32_dll=no)
1008
1009 AC_ARG_ENABLE(libtool-lock,
1010   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
1011 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1012
1013 AC_ARG_WITH(pic,
1014   [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1015 pic_mode="$withval", pic_mode=default)
1016 test -z "$pic_mode" && pic_mode=default
1017
1018 # Use C for the default configuration in the libtool script
1019 tagname=
1020 AC_LIBTOOL_LANG_C_CONFIG
1021 _LT_AC_TAGCONFIG
1022 ])# AC_LIBTOOL_SETUP
1023
1024
1025 # _LT_AC_SYS_COMPILER
1026 # -------------------
1027 AC_DEFUN([_LT_AC_SYS_COMPILER],
1028 [AC_REQUIRE([AC_PROG_CC])dnl
1029
1030 # If no C compiler was specified, use CC.
1031 LTCC=${LTCC-"$CC"}
1032
1033 # Allow CC to be a program name with arguments.
1034 set dummy $CC
1035 compiler="[$]2"
1036 ])# _LT_AC_SYS_COMPILER
1037
1038
1039 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1040 # ---------------------------------
1041 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1042 [# Find the correct PATH separator.  Usually this is `:', but
1043 # DJGPP uses `;' like DOS.
1044 if test "X${PATH_SEPARATOR+set}" != Xset; then
1045   UNAME=${UNAME-`uname 2>/dev/null`}
1046   case X$UNAME in
1047     *-DOS) PATH_SEPARATOR=';' ;;
1048     *)     PATH_SEPARATOR=':' ;;
1049   esac
1050 fi
1051 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1052
1053
1054 # _LT_AC_PROG_ECHO_BACKSLASH
1055 # --------------------------
1056 # Add some code to the start of the generated configure script which
1057 # will find an echo command which doesn't interpret backslashes.
1058 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1059 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060                               [AC_DIVERT_PUSH(NOTICE)])
1061 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1062
1063 # Check that we are running under the correct shell.
1064 SHELL=${CONFIG_SHELL-/bin/sh}
1065
1066 case X$ECHO in
1067 X*--fallback-echo)
1068   # Remove one level of quotation (which was required for Make).
1069   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1070   ;;
1071 esac
1072
1073 echo=${ECHO-echo}
1074 if test "X[$]1" = X--no-reexec; then
1075   # Discard the --no-reexec flag, and continue.
1076   shift
1077 elif test "X[$]1" = X--fallback-echo; then
1078   # Avoid inline document here, it may be left over
1079   :
1080 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1081   # Yippee, $echo works!
1082   :
1083 else
1084   # Restart under the correct shell.
1085   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1086 fi
1087
1088 if test "X[$]1" = X--fallback-echo; then
1089   # used as fallback echo
1090   shift
1091   cat <<EOF
1092 [$]*
1093 EOF
1094   exit 0
1095 fi
1096
1097 # The HP-UX ksh and POSIX shell print the target directory to stdout
1098 # if CDPATH is set.
1099 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1100
1101 if test -z "$ECHO"; then
1102 if test "X${echo_test_string+set}" != Xset; then
1103 # find a string as large as possible, as long as the shell can cope with it
1104   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1105     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1106     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1107        echo_test_string="`eval $cmd`" &&
1108        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1109     then
1110       break
1111     fi
1112   done
1113 fi
1114
1115 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1116    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1117    test "X$echo_testing_string" = "X$echo_test_string"; then
1118   :
1119 else
1120   # The Solaris, AIX, and Digital Unix default echo programs unquote
1121   # backslashes.  This makes it impossible to quote backslashes using
1122   #   echo "$something" | sed 's/\\/\\\\/g'
1123   #
1124   # So, first we look for a working echo in the user's PATH.
1125
1126   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1127   for dir in $PATH /usr/ucb; do
1128     IFS="$lt_save_ifs"
1129     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1130        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1131        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1132        test "X$echo_testing_string" = "X$echo_test_string"; then
1133       echo="$dir/echo"
1134       break
1135     fi
1136   done
1137   IFS="$lt_save_ifs"
1138
1139   if test "X$echo" = Xecho; then
1140     # We didn't find a better echo, so look for alternatives.
1141     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1142        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1143        test "X$echo_testing_string" = "X$echo_test_string"; then
1144       # This shell has a builtin print -r that does the trick.
1145       echo='print -r'
1146     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1147          test "X$CONFIG_SHELL" != X/bin/ksh; then
1148       # If we have ksh, try running configure again with it.
1149       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1150       export ORIGINAL_CONFIG_SHELL
1151       CONFIG_SHELL=/bin/ksh
1152       export CONFIG_SHELL
1153       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1154     else
1155       # Try using printf.
1156       echo='printf %s\n'
1157       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1158          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1159          test "X$echo_testing_string" = "X$echo_test_string"; then
1160         # Cool, printf works
1161         :
1162       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1163            test "X$echo_testing_string" = 'X\t' &&
1164            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1165            test "X$echo_testing_string" = "X$echo_test_string"; then
1166         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1167         export CONFIG_SHELL
1168         SHELL="$CONFIG_SHELL"
1169         export SHELL
1170         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1171       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172            test "X$echo_testing_string" = 'X\t' &&
1173            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174            test "X$echo_testing_string" = "X$echo_test_string"; then
1175         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1176       else
1177         # maybe with a smaller string...
1178         prev=:
1179
1180         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1181           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1182           then
1183             break
1184           fi
1185           prev="$cmd"
1186         done
1187
1188         if test "$prev" != 'sed 50q "[$]0"'; then
1189           echo_test_string=`eval $prev`
1190           export echo_test_string
1191           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1192         else
1193           # Oops.  We lost completely, so just stick with echo.
1194           echo=echo
1195         fi
1196       fi
1197     fi
1198   fi
1199 fi
1200 fi
1201
1202 # Copy echo and quote the copy suitably for passing to libtool from
1203 # the Makefile, instead of quoting the original, which is used later.
1204 ECHO=$echo
1205 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1206    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1207 fi
1208
1209 AC_SUBST(ECHO)
1210 AC_DIVERT_POP
1211 ])# _LT_AC_PROG_ECHO_BACKSLASH
1212
1213
1214 # _LT_AC_LOCK
1215 # -----------
1216 AC_DEFUN([_LT_AC_LOCK],
1217 [AC_ARG_ENABLE(libtool-lock,
1218   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
1219 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1220
1221 # Some flags need to be propagated to the compiler or linker for good
1222 # libtool support.
1223 case $host in
1224 *-*-irix6*)
1225   # Find out which ABI we are using.
1226   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1227   if AC_TRY_EVAL(ac_compile); then
1228     case `/usr/bin/file conftest.$ac_objext` in
1229     *32-bit*)
1230       LD="${LD-ld} -32"
1231       ;;
1232     *N32*)
1233       LD="${LD-ld} -n32"
1234       ;;
1235     *64-bit*)
1236       LD="${LD-ld} -64"
1237       ;;
1238     esac
1239   fi
1240   rm -rf conftest*
1241   ;;
1242
1243 *-*-sco3.2v5*)
1244   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1245   SAVE_CFLAGS="$CFLAGS"
1246   CFLAGS="$CFLAGS -belf"
1247   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1248     [AC_LANG_PUSH(C)
1249      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1250      AC_LANG_POP])
1251   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1252     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1253     CFLAGS="$SAVE_CFLAGS"
1254   fi
1255   ;;
1256 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1257 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1258   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1259   AC_CHECK_TOOL(AS, as, false)
1260   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1261
1262   # recent cygwin and mingw systems supply a stub DllMain which the user
1263   # can override, but on older systems we have to supply one
1264   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1265     [AC_TRY_LINK([],
1266       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1267       DllMain (0, 0, 0);],
1268       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1269
1270   case $host/$CC in
1271   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1272     # old mingw systems require "-dll" to link a DLL, while more recent ones
1273     # require "-mdll"
1274     SAVE_CFLAGS="$CFLAGS"
1275     CFLAGS="$CFLAGS -mdll"
1276     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1277       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1278     CFLAGS="$SAVE_CFLAGS" ;;
1279   *-*-cygwin* | *-*-pw32*)
1280     # cygwin systems need to pass --dll to the linker, and not link
1281     # crt.o which will require a WinMain@16 definition.
1282     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1283   esac
1284   ;;
1285   ])
1286 esac
1287
1288 need_locks="$enable_libtool_lock"
1289
1290 ])# _LT_AC_LOCK
1291
1292
1293 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1294 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1295 # ----------------------------------------------------------------
1296 # Check whether the given compiler option works
1297 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1298 [AC_CACHE_CHECK([$1], [$2],
1299   [$2=no
1300   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1301    save_CFLAGS="$CFLAGS"
1302    CFLAGS="$CFLAGS $3"
1303    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1304    if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
1305      # The compiler can only warn and ignore the option if not recognized
1306      # So say no if there are warnings
1307      if test -s conftest.err; then
1308        # Append any errors to the config.log.
1309        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1310      else
1311        $2=yes
1312      fi
1313    fi
1314    $rm conftest*
1315    CFLAGS="$save_CFLAGS"
1316 ])
1317
1318 if test x"[$]$2" = xyes; then
1319     ifelse([$5], , :, [$5])
1320 else
1321     ifelse([$6], , :, [$6])
1322 fi
1323 ])# AC_LIBTOOL_COMPILER_OPTION
1324
1325
1326 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1327 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1328 # ------------------------------------------------------------
1329 # Check whether the given compiler option works
1330 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1331 [AC_CACHE_CHECK([$1], [$2],
1332   [$2=no
1333    save_LDFLAGS="$LDFLAGS"
1334    LDFLAGS="$LDFLAGS $3"
1335    printf "$lt_simple_link_test_code" > conftest.$ac_ext
1336    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1337      # The compiler can only warn and ignore the option if not recognized
1338      # So say no if there are warnings
1339      if test -s conftest.err; then
1340        # Append any errors to the config.log.
1341        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1342      else
1343        $2=yes
1344      fi
1345    fi
1346    $rm conftest* 
1347    LDFLAGS="$save_LDFLAGS"
1348 ])
1349
1350 if test x"[$]$2" = xyes; then
1351     ifelse([$4], , :, [$4])
1352 else
1353     ifelse([$5], , :, [$5])
1354 fi
1355 ])# AC_LIBTOOL_LINKER_OPTION
1356
1357
1358 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1359 # --------------------------
1360 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1361 [# find the maximum length of command line arguments
1362 AC_MSG_CHECKING([the maximum length of command line arguments])
1363 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1364   i=0
1365   testring="ABCD"
1366
1367   case $host_os in
1368   msdosdjgpp*) 
1369     # On DJGPP, this test can blow up pretty badly due to problems in libc
1370     # (any single argument exceeding 2000 bytes causes a buffer overrun
1371     # during glob expansion).  Even if it were fixed, the result of this
1372     # check would be larger than it should be.
1373     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1374     ;;
1375     
1376   gnu*) 
1377     # Under GNU Hurd, this test is not required because there is
1378     # no limit to the length of command line arguments.
1379     # Libtool will interpret -1 as no limit whatsoever
1380     lt_cv_sys_max_cmd_len=-1;    # 12K is about right
1381     break
1382     ;;
1383     
1384   *)
1385     # If test is not a shell built-in, we'll probably end up computing a
1386     # maximum length that is only half of the actual maximum length, but
1387     # we can't tell.
1388     while test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1389                = "XX$testring" &&
1390             new_result=`expr "X$testring" : ".*" 2>&1` &&
1391             lt_cv_sys_max_cmd_len=$new_result &&
1392             test $i != 17 # 1/2 MB should be enough
1393     do
1394       i=`expr $i + 1`
1395       testring=$testring$testring
1396     done
1397     testring=
1398     # add a significant safety factor because C++ compilers can tack on massive
1399     # amounts of additional arguments before passing them to the linker.  1/4
1400     # should be good.
1401     len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1402     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
1403     ;;
1404   esac
1405 ])
1406 if test -n $lt_cv_sys_max_cmd_len ; then
1407   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1408 else
1409   AC_MSG_RESULT(none)
1410 fi
1411 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1412
1413
1414 # _LT_AC_CHECK_DLFCN
1415 # --------------------
1416 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1417 [AC_CHECK_HEADERS(dlfcn.h)dnl
1418 ])# _LT_AC_CHECK_DLFCN
1419
1420
1421 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1422 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1423 # ------------------------------------------------------------------
1424 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1425 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1426 if test "$cross_compiling" = yes; then :
1427   [$4]
1428 else
1429   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1430   lt_status=$lt_dlunknown
1431   cat > conftest.$ac_ext <<EOF
1432 [#line __oline__ "configure"
1433 #include "confdefs.h"
1434
1435 #if HAVE_DLFCN_H
1436 #include <dlfcn.h>
1437 #endif
1438
1439 #include <stdio.h>
1440
1441 #ifdef RTLD_GLOBAL
1442 #  define LT_DLGLOBAL           RTLD_GLOBAL
1443 #else
1444 #  ifdef DL_GLOBAL
1445 #    define LT_DLGLOBAL         DL_GLOBAL
1446 #  else
1447 #    define LT_DLGLOBAL         0
1448 #  endif
1449 #endif
1450
1451 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1452    find out it does not work in some platform. */
1453 #ifndef LT_DLLAZY_OR_NOW
1454 #  ifdef RTLD_LAZY
1455 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1456 #  else
1457 #    ifdef DL_LAZY
1458 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1459 #    else
1460 #      ifdef RTLD_NOW
1461 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1462 #      else
1463 #        ifdef DL_NOW
1464 #          define LT_DLLAZY_OR_NOW      DL_NOW
1465 #        else
1466 #          define LT_DLLAZY_OR_NOW      0
1467 #        endif
1468 #      endif
1469 #    endif
1470 #  endif
1471 #endif
1472
1473 #ifdef __cplusplus
1474 extern "C" void exit (int);
1475 #endif
1476
1477 void fnord() { int i=42;}
1478 int main ()
1479 {
1480   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1481   int status = $lt_dlunknown;
1482
1483   if (self)
1484     {
1485       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1486       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1487       /* dlclose (self); */
1488     }
1489
1490     exit (status);
1491 }]
1492 EOF
1493   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1494     (./conftest; exit; ) 2>/dev/null
1495     lt_status=$?
1496     case x$lt_status in
1497       x$lt_dlno_uscore) $1 ;;
1498       x$lt_dlneed_uscore) $2 ;;
1499       x$lt_unknown|x*) $3 ;;
1500     esac
1501   else :
1502     # compilation failed
1503     $3
1504   fi
1505 fi
1506 rm -fr conftest*
1507 ])# _LT_AC_TRY_DLOPEN_SELF
1508
1509
1510 # AC_LIBTOOL_DLOPEN_SELF
1511 # -------------------
1512 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1513 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1514 if test "x$enable_dlopen" != xyes; then
1515   enable_dlopen=unknown
1516   enable_dlopen_self=unknown
1517   enable_dlopen_self_static=unknown
1518 else
1519   lt_cv_dlopen=no
1520   lt_cv_dlopen_libs=
1521
1522   case $host_os in
1523   beos*)
1524     lt_cv_dlopen="load_add_on"
1525     lt_cv_dlopen_libs=
1526     lt_cv_dlopen_self=yes
1527     ;;
1528
1529   cygwin* | mingw* | pw32*)
1530     lt_cv_dlopen="LoadLibrary"
1531     lt_cv_dlopen_libs=
1532    ;;
1533
1534   *)
1535     AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
1536       [AC_CHECK_LIB(dld, shl_load,
1537         [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"],
1538         [AC_CHECK_LIB(dl, dlopen,
1539           [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1540           [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
1541             [AC_CHECK_LIB(svld, dlopen,
1542              [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
1543             ])
1544           ])
1545         ])
1546       ])
1547     ;;
1548   esac
1549
1550   if test "x$lt_cv_dlopen" != xno; then
1551     enable_dlopen=yes
1552   else
1553     enable_dlopen=no
1554   fi
1555
1556   case $lt_cv_dlopen in
1557   dlopen)
1558     save_CPPFLAGS="$CPPFLAGS"
1559     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1560
1561     save_LDFLAGS="$LDFLAGS"
1562     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1563
1564     save_LIBS="$LIBS"
1565     LIBS="$lt_cv_dlopen_libs $LIBS"
1566
1567     AC_CACHE_CHECK([whether a program can dlopen itself],
1568           lt_cv_dlopen_self, [dnl
1569           _LT_AC_TRY_DLOPEN_SELF(
1570             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1571             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1572     ])
1573
1574     if test "x$lt_cv_dlopen_self" = xyes; then
1575       LDFLAGS="$LDFLAGS $link_static_flag"
1576       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1577           lt_cv_dlopen_self_static, [dnl
1578           _LT_AC_TRY_DLOPEN_SELF(
1579             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1580             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1581       ])
1582     fi
1583
1584     CPPFLAGS="$save_CPPFLAGS"
1585     LDFLAGS="$save_LDFLAGS"
1586     LIBS="$save_LIBS"
1587     ;;
1588   esac
1589
1590   case $lt_cv_dlopen_self in
1591   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1592   *) enable_dlopen_self=unknown ;;
1593   esac
1594
1595   case $lt_cv_dlopen_self_static in
1596   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1597   *) enable_dlopen_self_static=unknown ;;
1598   esac
1599 fi
1600 ])# AC_LIBTOOL_DLOPEN_SELF
1601
1602
1603 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1604 # ---------------------------------
1605 # Check to see if options -c and -o are simultaneously supported by compiler
1606 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1607 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1608
1609 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1610   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1611   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1612    $rm -r conftest 2>/dev/null
1613    mkdir conftest
1614    cd conftest
1615    mkdir out
1616    save_CFLAGS="$CFLAGS"
1617    CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1618    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1619
1620    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1621    # that will create temporary files in the current directory regardless of
1622    # the output directory.  Thus, making CWD read-only will cause this test
1623    # to fail, enabling locking or at least warning the user not to do parallel
1624    # builds.
1625    chmod -w .
1626
1627    if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1628    then
1629      # The compiler can only warn and ignore the option if not recognized
1630      # So say no if there are warnings
1631      if test -s out/conftest.err; then
1632        # Append any errors to the config.log.
1633        cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1634      else
1635        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1636      fi
1637    fi
1638    CFLAGS="$save_CFLAGS"
1639
1640    chmod u+w .
1641    $rm conftest* out/*
1642    rmdir out
1643    cd ..
1644    rmdir conftest
1645    $rm conftest*
1646 ])
1647 ])# AC_LIBTOOL_PROG_CC_C_O
1648
1649
1650 # AC_LIBTOOL_PROG_F77_C_O([TAGNAME])
1651 # ---------------------------------
1652 # Check to see if options -c and -o are simultaneously supported by compiler
1653 AC_DEFUN([AC_LIBTOOL_PROG_F77_C_O],
1654 [AC_REQUIRE([AC_PROG_F77])dnl
1655
1656 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1657   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1658   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1659    $rm -r conftest 2>/dev/null
1660    mkdir conftest
1661    cd conftest
1662    mkdir out
1663    save_FFLAGS="$FFLAGS"
1664    FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"
1665    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1666
1667    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1668    # that will create temporary files in the current directory regardless of
1669    # the output directory.  Thus, making CWD read-only will cause this test
1670    # to fail, enabling locking or at least warning the user not to do parallel
1671    # builds.
1672    chmod -w .
1673
1674    if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1675    then
1676      # The compiler can only warn and ignore the option if not recognized
1677      # So say no if there are warnings
1678      if test -s out/conftest.err; then
1679        # Append any errors to the config.log.
1680        cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1681      else
1682        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1683      fi
1684    fi
1685    FFLAGS="$save_FFLAGS"
1686
1687    chmod u+w .
1688    $rm conftest* out/*
1689    rmdir out
1690    cd ..
1691    rmdir conftest
1692    $rm conftest*
1693 ])
1694 ])# AC_LIBTOOL_PROG_F77_C_O
1695
1696
1697 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1698 # -----------------------------------------
1699 # Check to see if we can do hard links to lock some files if needed
1700 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1701 [AC_REQUIRE([_LT_AC_LOCK])dnl
1702
1703 hard_links="nottested"
1704 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1705   # do not overwrite the value of need_locks provided by the user
1706   AC_MSG_CHECKING([if we can lock with hard links])
1707   hard_links=yes
1708   $rm conftest*
1709   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1710   touch conftest.a
1711   ln conftest.a conftest.b 2>&5 || hard_links=no
1712   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1713   AC_MSG_RESULT([$hard_links])
1714   if test "$hard_links" = no; then
1715     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1716     need_locks=warn
1717   fi
1718 else
1719   need_locks=no
1720 fi
1721 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1722
1723
1724 # AC_LIBTOOL_OBJDIR
1725 # -----------------
1726 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1727 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1728 [rm -f .libs 2>/dev/null
1729 mkdir .libs 2>/dev/null
1730 if test -d .libs; then
1731   lt_cv_objdir=.libs
1732 else
1733   # MS-DOS does not allow filenames that begin with a dot.
1734   lt_cv_objdir=_libs
1735 fi
1736 rmdir .libs 2>/dev/null])
1737 objdir=$lt_cv_objdir
1738 ])# AC_LIBTOOL_OBJDIR
1739
1740
1741 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1742 # ----------------------------------------------
1743 # Check hardcoding attributes.
1744 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1745 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1746 _LT_AC_TAGVAR(hardcode_action, $1)=
1747 if test -n "$hardcode_libdir_flag_spec" || \
1748    test -n "$runpath_var"; then
1749
1750   # We can hardcode non-existant directories.
1751   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1752      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1753      # have to relink, otherwise we might link with an installed library
1754      # when we should be linking with a yet-to-be-installed one
1755      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1756      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1757     # Linking always hardcodes the temporary library directory.
1758     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1759   else
1760     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1761     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1762   fi
1763 else
1764   # We cannot hardcode anything, or else we can only hardcode existing
1765   # directories.
1766   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1767 fi
1768 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1769
1770 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1771   # Fast installation is not supported
1772   enable_fast_install=no
1773 elif test "$shlibpath_overrides_runpath" = yes ||
1774      test "$enable_shared" = no; then
1775   # Fast installation is not necessary
1776   enable_fast_install=needless
1777 fi
1778 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1779
1780
1781 # AC_LIBTOOL_SYS_LIB_STRIP
1782 # ------------------------
1783 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1784 [striplib=
1785 old_striplib=
1786 AC_MSG_CHECKING([whether stripping libraries is possible])
1787 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1788   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1789   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1790   AC_MSG_RESULT([yes])
1791 else
1792   AC_MSG_RESULT([no])
1793 fi
1794 ])# AC_LIBTOOL_SYS_LIB_STRIP
1795
1796
1797 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1798 # -----------------------------
1799 # PORTME Fill in your ld.so characteristics
1800 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1801 [AC_MSG_CHECKING([dynamic linker characteristics])
1802 library_names_spec=
1803 libname_spec='lib$name'
1804 soname_spec=
1805 postinstall_cmds=
1806 postuninstall_cmds=
1807 finish_cmds=
1808 finish_eval=
1809 shlibpath_var=
1810 shlibpath_overrides_runpath=unknown
1811 version_type=none
1812 dynamic_linker="$host_os ld.so"
1813 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1814 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1815 need_lib_prefix=unknown
1816 hardcode_into_libs=no
1817
1818 # when you set need_version to no, make sure it does not cause -set_version
1819 # flags to be left without arguments
1820 need_version=unknown
1821
1822 case $host_os in
1823 aix3*)
1824   version_type=linux
1825   library_names_spec='${libname}${release}.so$versuffix $libname.a'
1826   shlibpath_var=LIBPATH
1827
1828   # AIX 3 has no versioning support, so we append a major version to the name.
1829   soname_spec='${libname}${release}.so$major'
1830   ;;
1831
1832 aix4* | aix5*)
1833   version_type=linux
1834   if test "$host_cpu" = ia64; then
1835     # AIX 5 supports IA64
1836     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1837     shlibpath_var=LD_LIBRARY_PATH
1838   else
1839     # With GCC up to 2.95.x, collect2 would create an import file
1840     # for dependence libraries.  The import file would start with
1841     # the line `#! .'.  This would cause the generated library to
1842     # depend on `.', always an invalid library.  This was fixed in
1843     # development snapshots of GCC prior to 3.0.
1844     case $host_os in
1845       [ aix4 | aix4.[01] | aix4.[01].*)]
1846       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1847            echo ' yes '
1848            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1849         :
1850       else
1851         can_build_shared=no
1852       fi
1853       ;;
1854     esac
1855     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1856     # soname into executable. Probably we can add versioning support to
1857     # collect2, so additional links can be useful in future.
1858     if test "$aix_use_runtimelinking" = yes; then
1859       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1860       # instead of lib<name>.a to let people know that these are not
1861       # typical AIX shared libraries.
1862       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1863     else
1864       # We preserve .a as extension for shared libraries through AIX4.2
1865       # and later when we are not doing run time linking.
1866       library_names_spec='${libname}${release}.a $libname.a'
1867       soname_spec='${libname}${release}.so$major'
1868     fi
1869     shlibpath_var=LIBPATH
1870     deplibs_check_method=pass_all
1871   fi
1872   ;;
1873
1874 amigaos*)
1875   library_names_spec='$libname.ixlibrary $libname.a'
1876   # Create ${libname}_ixlibrary.a entries in /sys/libs.
1877   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'
1878   ;;
1879
1880 beos*)
1881   library_names_spec='${libname}.so'
1882   dynamic_linker="$host_os ld.so"
1883   shlibpath_var=LIBRARY_PATH
1884   ;;
1885
1886 bsdi4*)
1887   version_type=linux
1888   need_version=no
1889   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1890   soname_spec='${libname}${release}.so$major'
1891   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1892   shlibpath_var=LD_LIBRARY_PATH
1893   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1894   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1895   # the default ld.so.conf also contains /usr/contrib/lib and
1896   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1897   # libtool to hard-code these into programs
1898   ;;
1899
1900 cygwin* | mingw* | pw32*)
1901   version_type=windows
1902   need_version=no
1903   need_lib_prefix=no
1904   case $GCC,$host_os in
1905   yes,cygwin*)
1906     library_names_spec='$libname.dll.a'
1907     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1908     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1909       dldir=$destdir/`dirname \$dlpath`~
1910       test -d \$dldir || mkdir -p \$dldir~
1911       $install_prog .libs/$dlname \$dldir/$dlname'
1912     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1913       dlpath=$dir/\$dldll~
1914        $rm \$dlpath'
1915     ;;
1916   yes,mingw*)
1917     library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1918     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
1919     ;;
1920   yes,pw32*)
1921     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1922     ;;
1923   *)
1924     library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
1925     ;;
1926   esac
1927   dynamic_linker='Win32 ld.exe'
1928   # FIXME: first we should search . and the directory the executable is in
1929   shlibpath_var=PATH
1930   ;;
1931
1932 darwin* | rhapsody*)
1933   dynamic_linker="$host_os dyld"
1934   version_type=darwin
1935   need_lib_prefix=no
1936   need_version=no
1937   # FIXME: Relying on posixy $() will cause problems for
1938   #        cross-compilation, but unfortunately the echo tests do not
1939   #        yet detect zsh echo's removal of \ escapes.
1940   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1941   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1942   shlibpath_overrides_runpath=yes
1943   shlibpath_var=DYLD_LIBRARY_PATH
1944   ;;
1945
1946 dgux*)
1947   version_type=linux
1948   need_lib_prefix=no
1949   need_version=no
1950   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1951   soname_spec='${libname}${release}.so$major'
1952   shlibpath_var=LD_LIBRARY_PATH
1953   ;;
1954
1955 freebsd1*)
1956   dynamic_linker=no
1957   ;;
1958
1959 freebsd*)
1960   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1961   version_type=freebsd-$objformat
1962   case $version_type in
1963     freebsd-elf*)
1964       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1965       need_version=no
1966       need_lib_prefix=no
1967       ;;
1968     freebsd-*)
1969       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1970       need_version=yes
1971       ;;
1972   esac
1973   shlibpath_var=LD_LIBRARY_PATH
1974   case $host_os in
1975   freebsd2*)
1976     shlibpath_overrides_runpath=yes
1977     ;;
1978   freebsd3.[01]* | freebsdelf3.[01]*)
1979     shlibpath_overrides_runpath=yes
1980     hardcode_into_libs=yes
1981     ;;
1982   *) # from 3.2 on
1983     shlibpath_overrides_runpath=no
1984     hardcode_into_libs=yes
1985     ;;
1986   esac
1987   ;;
1988
1989 gnu*)
1990   version_type=linux
1991   need_lib_prefix=no
1992   need_version=no
1993   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1994   soname_spec='${libname}${release}.so$major'
1995   shlibpath_var=LD_LIBRARY_PATH
1996   hardcode_into_libs=yes
1997   ;;
1998
1999 hpux9* | hpux10* | hpux11*)
2000   # Give a soname corresponding to the major version so that dld.sl refuses to
2001   # link against other versions.
2002   dynamic_linker="$host_os dld.sl"
2003   version_type=sunos
2004   need_lib_prefix=no
2005   need_version=no
2006   shlibpath_var=SHLIB_PATH
2007   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2008   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2009   soname_spec='${libname}${release}.sl$major'
2010   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2011   postinstall_cmds='chmod 555 $lib'
2012   ;;
2013
2014 irix5* | irix6*)
2015   version_type=irix
2016   need_lib_prefix=no
2017   need_version=no
2018   soname_spec='${libname}${release}.so.$major'
2019   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2020   case $host_os in
2021   irix5*)
2022     libsuff= shlibsuff=
2023     ;;
2024   *)
2025     case $LD in # libtool.m4 will add one of these switches to LD
2026     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2027     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2028     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2029     *) libsuff= shlibsuff= libmagic=never-match;;
2030     esac
2031     ;;
2032   esac
2033   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2034   shlibpath_overrides_runpath=no
2035   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2036   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2037   ;;
2038
2039 # No shared lib support for Linux oldld, aout, or coff.
2040 linux*oldld* | linux*aout* | linux*coff*)
2041   dynamic_linker=no
2042   ;;
2043
2044 # This must be Linux ELF.
2045 linux*)
2046   version_type=linux
2047   need_lib_prefix=no
2048   need_version=no
2049   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2050   soname_spec='${libname}${release}.so$major'
2051   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2052   shlibpath_var=LD_LIBRARY_PATH
2053   shlibpath_overrides_runpath=no
2054   # This implies no fast_install, which is unacceptable.
2055   # Some rework will be needed to allow for fast_install
2056   # before this can be enabled.
2057   hardcode_into_libs=yes
2058
2059   # We used to test for /lib/ld.so.1 and disable shared libraries on
2060   # powerpc, because MkLinux only supported shared libraries with the
2061   # GNU dynamic linker.  Since this was broken with cross compilers,
2062   # most powerpc-linux boxes support dynamic linking these days and
2063   # people can always --disable-shared, the test was removed, and we
2064   # assume the GNU/Linux dynamic linker is in use.
2065   dynamic_linker='GNU/Linux ld.so'
2066   ;;
2067
2068 netbsd*)
2069   version_type=sunos
2070   need_lib_prefix=no
2071   need_version=no
2072   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2073     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2074     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2075     dynamic_linker='NetBSD (a.out) ld.so'
2076   else
2077     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2078     soname_spec='${libname}${release}.so$major'
2079     dynamic_linker='NetBSD ld.elf_so'
2080   fi
2081   shlibpath_var=LD_LIBRARY_PATH
2082   shlibpath_overrides_runpath=yes
2083   hardcode_into_libs=yes
2084   ;;
2085
2086 newsos6)
2087   version_type=linux
2088   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2089   shlibpath_var=LD_LIBRARY_PATH
2090   shlibpath_overrides_runpath=yes
2091   ;;
2092
2093 openbsd*)
2094   version_type=sunos
2095   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2096   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2097   shlibpath_var=LD_LIBRARY_PATH
2098   file_magic_cmd=/usr/bin/file
2099   file_magic_test_file=`echo /usr/lib/libc.so.*`
2100   if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
2101     deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
2102   else
2103     deplibs_check_method='file_magic OpenBSD.* shared library'
2104   fi
2105   ;;
2106
2107 os2*)
2108   libname_spec='$name'
2109   need_lib_prefix=no
2110   library_names_spec='$libname.dll $libname.a'
2111   dynamic_linker='OS/2 ld.exe'
2112   shlibpath_var=LIBPATH
2113   ;;
2114
2115 osf3* | osf4* | osf5*)
2116   version_type=osf
2117   need_version=no
2118   soname_spec='${libname}${release}.so'
2119   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2120   shlibpath_var=LD_LIBRARY_PATH
2121   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2122   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2123   ;;
2124
2125 sco3.2v5*)
2126   version_type=osf
2127   soname_spec='${libname}${release}.so$major'
2128   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2129   shlibpath_var=LD_LIBRARY_PATH
2130   ;;
2131
2132 solaris*)
2133   version_type=linux
2134   need_lib_prefix=no
2135   need_version=no
2136   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2137   soname_spec='${libname}${release}.so$major'
2138   shlibpath_var=LD_LIBRARY_PATH
2139   shlibpath_overrides_runpath=yes
2140   hardcode_into_libs=yes
2141   # ldd complains unless libraries are executable
2142   postinstall_cmds='chmod +x $lib'
2143   ;;
2144
2145 sunos4*)
2146   version_type=sunos
2147   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2148   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2149   shlibpath_var=LD_LIBRARY_PATH
2150   shlibpath_overrides_runpath=yes
2151   if test "$with_gnu_ld" = yes; then
2152     need_lib_prefix=no
2153   fi
2154   need_version=yes
2155   ;;
2156
2157 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2158   version_type=linux
2159   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2160   soname_spec='${libname}${release}.so$major'
2161   shlibpath_var=LD_LIBRARY_PATH
2162   case $host_vendor in
2163     sni)
2164       shlibpath_overrides_runpath=no
2165       ;;
2166     motorola)
2167       need_lib_prefix=no
2168       need_version=no
2169       shlibpath_overrides_runpath=no
2170       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2171       ;;
2172   esac
2173   ;;
2174
2175 sysv4*MP*)
2176   if test -d /usr/nec ;then
2177     version_type=linux
2178     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2179     soname_spec='$libname.so.$major'
2180     shlibpath_var=LD_LIBRARY_PATH
2181   fi
2182   ;;
2183
2184 uts4*)
2185   version_type=linux
2186   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2187   soname_spec='${libname}${release}.so$major'
2188   shlibpath_var=LD_LIBRARY_PATH
2189   ;;
2190
2191 *)
2192   dynamic_linker=no
2193   ;;
2194 esac
2195 AC_MSG_RESULT([$dynamic_linker])
2196 test "$dynamic_linker" = no && can_build_shared=no
2197 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2198
2199
2200 # _LT_AC_TAGCONFIG
2201 # ----------------
2202 AC_DEFUN([_LT_AC_TAGCONFIG],
2203 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2204 # Determine the tags from the languages used - this is another
2205 # hack by Erik L - if the flag for -g is set, then AC_PROG_*** has
2206 # probably been called. NB: I removed the GCJ support...
2207 tagnames=
2208 if test "${ac_cv_prog_cxx_g+set}" = set; then
2209   tagnames="CXX"
2210 fi
2211 if test "${ac_cv_prog_f77_g+set}" = set; then
2212   if test -n "$tagnames"; then
2213     tagnames=",F77"
2214   else
2215     tagnames="F77"
2216   fi
2217 fi
2218
2219 if test -f "$ltmain" && test -n "$tagnames"; then
2220   if test ! -f "${ofile}"; then
2221     AC_MSG_WARN([output file `$ofile' does not exist])
2222   fi
2223
2224   if test -z "$LTCC"; then
2225     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2226     if test -z "$LTCC"; then
2227       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2228     else
2229       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2230     fi
2231   fi
2232
2233   # Extract list of available tagged configurations in $ofile.
2234   # Note that this assumes the entire list is on one line.
2235   available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2236
2237   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2238   for tagname in $tagnames; do
2239     IFS="$lt_save_ifs"
2240     # Check whether tagname contains only valid characters
2241     [case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in]
2242     "") ;;
2243     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2244         ;;
2245     esac
2246
2247     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2248     then
2249       AC_MSG_ERROR([tag name $tagname already exists])
2250     fi
2251
2252     # Update the list of available tags.
2253     if test -n "$tagname"; then
2254       echo appending configuration tag \"$tagname\" to $ofile
2255
2256       case $tagname in
2257       CXX) 
2258         AC_LIBTOOL_LANG_CXX_CONFIG
2259         ;;
2260
2261       F77) 
2262         AC_LIBTOOL_LANG_F77_CONFIG
2263         ;;
2264
2265       GCJ)
2266         AC_LIBTOOL_LANG_GCJ_CONFIG
2267         ;;
2268
2269       *)
2270         AC_MSG_ERROR([Unsupported tag name: $tagname])
2271         ;;
2272       esac
2273
2274       # Append the new tag name to the list of available tags.
2275       available_tags="$available_tags $tagname"
2276     fi
2277   done
2278   IFS="$lt_save_ifs"
2279
2280   # Now substitute the updated list of available tags.
2281   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2282     mv "${ofile}T" "$ofile"
2283     chmod +x "$ofile"
2284   else
2285     rm -f "${ofile}T"
2286     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2287   fi
2288 fi
2289 ])# _LT_AC_TAGCONFIG
2290
2291
2292 # AC_LIBTOOL_DLOPEN
2293 # -----------------
2294 # enable checks for dlopen support
2295 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2296  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2297 ])# AC_LIBTOOL_DLOPEN
2298
2299
2300 # AC_LIBTOOL_WIN32_DLL
2301 # --------------------
2302 # declare package support for building win32 dll's
2303 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2304 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2305 ])# AC_LIBTOOL_WIN32_DLL
2306
2307
2308 # AC_ENABLE_SHARED([DEFAULT])
2309 # ---------------------------
2310 # implement the --enable-shared flag
2311 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2312 AC_DEFUN([AC_ENABLE_SHARED],
2313 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2314 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2315 AC_ARG_ENABLE(shared,
2316 changequote(<<, >>)dnl
2317 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2318 changequote([, ])dnl
2319 [p=${PACKAGE-default}
2320 case $enableval in
2321 yes) enable_shared=yes ;;
2322 no) enable_shared=no ;;
2323 *)
2324   enable_shared=no
2325   # Look at the argument we got.  We use all the common list separators.
2326   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2327   for pkg in $enableval; do
2328     IFS="$lt_save_ifs"
2329     if test "X$pkg" = "X$p"; then
2330       enable_shared=yes
2331     fi
2332   done
2333   IFS="$lt_save_ifs"
2334   ;;
2335 esac],
2336 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
2337 ])# AC_ENABLE_SHARED
2338
2339
2340 # AC_DISABLE_SHARED
2341 # -----------------
2342 #- set the default shared flag to --disable-shared
2343 AC_DEFUN([AC_DISABLE_SHARED],
2344 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2345 AC_ENABLE_SHARED(no)
2346 ])# AC_DISABLE_SHARED
2347
2348
2349 # AC_ENABLE_STATIC([DEFAULT])
2350 # ---------------------------
2351 # implement the --enable-static flag
2352 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2353 AC_DEFUN([AC_ENABLE_STATIC],
2354 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2355 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2356 AC_ARG_ENABLE(static,
2357 changequote(<<, >>)dnl
2358 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2359 changequote([, ])dnl
2360 [p=${PACKAGE-default}
2361 case $enableval in
2362 yes) enable_static=yes ;;
2363 no) enable_static=no ;;
2364 *)
2365   enable_static=no
2366   # Look at the argument we got.  We use all the common list separators.
2367   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2368   for pkg in $enableval; do
2369     IFS="$lt_save_ifs"
2370     if test "X$pkg" = "X$p"; then
2371       enable_static=yes
2372     fi
2373   done
2374   IFS="$lt_save_ifs"
2375   ;;
2376 esac],
2377 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
2378 ])# AC_ENABLE_STATIC
2379
2380
2381 # AC_DISABLE_STATIC
2382 # -----------------
2383 # set the default static flag to --disable-static
2384 AC_DEFUN([AC_DISABLE_STATIC],
2385 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2386 AC_ENABLE_STATIC(no)
2387 ])# AC_DISABLE_STATIC
2388
2389
2390 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2391 # ---------------------------------
2392 # implement the --enable-fast-install flag
2393 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2394 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2395 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2396 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2397 AC_ARG_ENABLE(fast-install,
2398 changequote(<<, >>)dnl
2399 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2400 changequote([, ])dnl
2401 [p=${PACKAGE-default}
2402 case $enableval in
2403 yes) enable_fast_install=yes ;;
2404 no) enable_fast_install=no ;;
2405 *)
2406   enable_fast_install=no
2407   # Look at the argument we got.  We use all the common list separators.
2408   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2409   for pkg in $enableval; do
2410     IFS="$lt_save_ifs"
2411     if test "X$pkg" = "X$p"; then
2412       enable_fast_install=yes
2413     fi
2414   done
2415   IFS="$lt_save_ifs"
2416   ;;
2417 esac],
2418 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
2419 ])# AC_ENABLE_FAST_INSTALL
2420
2421
2422 # AC_DISABLE_FAST_INSTALL
2423 # -----------------------
2424 # set the default to --disable-fast-install
2425 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2426 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2427 AC_ENABLE_FAST_INSTALL(no)
2428 ])# AC_DISABLE_FAST_INSTALL
2429
2430
2431 # AC_LIBTOOL_PICMODE([MODE])
2432 # --------------------------
2433 # implement the --with-pic flag
2434 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2435 AC_DEFUN([AC_LIBTOOL_PICMODE],
2436 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2437 pic_mode=ifelse($#,1,$1,default)
2438 ])# AC_LIBTOOL_PICMODE
2439
2440
2441 # AC_PATH_TOOL_PREFIX
2442 # -------------------
2443 # find a file program which can recognise shared library
2444 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2445 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2446 AC_MSG_CHECKING([for $1])
2447 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2448 [case $MAGIC_CMD in
2449 [\\/*] |  ?:[\\/]*)
2450   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2451   ;;
2452 *)
2453   lt_save_MAGIC_CMD="$MAGIC_CMD"
2454   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${PATH_SEPARATOR-:}"
2455 dnl $ac_dummy forces splitting on constant user-supplied paths.
2456 dnl POSIX.2 word splitting is done only on the output of word expansions,
2457 dnl not every word.  This closes a longstanding sh security hole.
2458   ac_dummy="ifelse([$2], , $PATH, [$2])"
2459   for ac_dir in $ac_dummy; do
2460     IFS="$lt_save_ifs"
2461     test -z "$ac_dir" && ac_dir=.
2462     if test -f $ac_dir/$1; then
2463       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2464       if test -n "$file_magic_test_file"; then
2465         case $deplibs_check_method in
2466         "file_magic "*)
2467           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2468           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2469           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2470             egrep "$file_magic_regex" > /dev/null; then
2471             :
2472           else
2473             cat <<EOF 1>&2
2474
2475 *** Warning: the command libtool uses to detect shared libraries,
2476 *** $file_magic_cmd, produces output that libtool cannot recognize.
2477 *** The result is that libtool may fail to recognize shared libraries
2478 *** as such.  This will affect the creation of libtool libraries that
2479 *** depend on shared libraries, but programs linked with such libtool
2480 *** libraries will work regardless of this problem.  Nevertheless, you
2481 *** may want to report the problem to your system manager and/or to
2482 *** bug-libtool@gnu.org
2483
2484 EOF
2485           fi ;;
2486         esac
2487       fi
2488       break
2489     fi
2490   done
2491   IFS="$lt_save_ifs"
2492   MAGIC_CMD="$lt_save_MAGIC_CMD"
2493   ;;
2494 esac])
2495 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2496 if test -n "$MAGIC_CMD"; then
2497   AC_MSG_RESULT($MAGIC_CMD)
2498 else
2499   AC_MSG_RESULT(no)
2500 fi
2501 ])# AC_PATH_TOOL_PREFIX
2502
2503
2504 # AC_PATH_MAGIC
2505 # -------------
2506 # find a file program which can recognise a shared library
2507 AC_DEFUN([AC_PATH_MAGIC],
2508 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2509 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2510 if test -z "$lt_cv_path_MAGIC_CMD"; then
2511   if test -n "$ac_tool_prefix"; then
2512     AC_PATH_TOOL_PREFIX(file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2513   else
2514     MAGIC_CMD=:
2515   fi
2516 fi
2517 ])# AC_PATH_MAGIC
2518
2519
2520 # AC_PROG_LD
2521 # ----------
2522 # find the path to the GNU or non-GNU linker
2523 AC_DEFUN([AC_PROG_LD],
2524 [AC_ARG_WITH(gnu-ld,
2525   [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
2526   test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2527 AC_REQUIRE([AC_PROG_CC])dnl
2528 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2529 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2530 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2531 ac_prog=ld
2532 if test "$GCC" = yes; then
2533   # Check if gcc -print-prog-name=ld gives a path.
2534   AC_MSG_CHECKING([for ld used by GCC])
2535   case $host in
2536   *-*-mingw*)
2537     # gcc leaves a trailing carriage return which upsets mingw
2538     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2539   *)
2540     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2541   esac
2542   case $ac_prog in
2543     # Accept absolute paths.
2544     [[\\/]]* | ?:[[\\/]]*)
2545       [re_direlt='/[^/][^/]*/\.\./']
2546       # Canonicalize the path of ld
2547       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2548       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2549         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2550       done
2551       test -z "$LD" && LD="$ac_prog"
2552       ;;
2553   "")
2554     # If it fails, then pretend we aren't using GCC.
2555     ac_prog=ld
2556     ;;
2557   *)
2558     # If it is relative, then search for the first ld in PATH.
2559     with_gnu_ld=unknown
2560     ;;
2561   esac
2562 elif test "$with_gnu_ld" = yes; then
2563   AC_MSG_CHECKING([for GNU ld])
2564 else
2565   AC_MSG_CHECKING([for non-GNU ld])
2566 fi
2567 AC_CACHE_VAL(lt_cv_path_LD,
2568 [if test -z "$LD"; then
2569   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2570   for ac_dir in $PATH; do
2571     IFS="$lt_save_ifs"
2572     test -z "$ac_dir" && ac_dir=.
2573     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2574       lt_cv_path_LD="$ac_dir/$ac_prog"
2575       # Check to see if the program is GNU ld.  I'd rather use --version,
2576       # but apparently some GNU ld's only accept -v.
2577       # Break only if it was the GNU/non-GNU ld that we prefer.
2578       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2579         test "$with_gnu_ld" != no && break
2580       else
2581         test "$with_gnu_ld" != yes && break
2582       fi
2583     fi
2584   done
2585   IFS="$lt_save_ifs"
2586 else
2587   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2588 fi])
2589 LD="$lt_cv_path_LD"
2590 if test -n "$LD"; then
2591   AC_MSG_RESULT($LD)
2592 else
2593   AC_MSG_RESULT(no)
2594 fi
2595 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2596 AC_PROG_LD_GNU
2597 ])# AC_PROG_LD
2598
2599
2600 # AC_PROG_LD_GNU
2601 # --------------
2602 AC_DEFUN([AC_PROG_LD_GNU],
2603 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2604 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2605 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2606   lt_cv_prog_gnu_ld=yes
2607 else
2608   lt_cv_prog_gnu_ld=no
2609 fi])
2610 with_gnu_ld=$lt_cv_prog_gnu_ld
2611 ])# AC_PROG_LD_GNU
2612
2613
2614 # AC_PROG_LD_RELOAD_FLAG
2615 # ----------------------
2616 # find reload flag for linker
2617 #   -- PORTME Some linkers may need a different reload flag.
2618 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2619 [AC_CACHE_CHECK([for $LD option to reload object files],
2620   lt_cv_ld_reload_flag,
2621   [lt_cv_ld_reload_flag='-r'])
2622 reload_flag=$lt_cv_ld_reload_flag
2623 case $reload_flag in
2624 "" | " "*) ;;
2625 *) reload_flag=" $reload_flag" ;;
2626 esac
2627 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2628 ])# AC_PROG_LD_RELOAD_FLAG
2629
2630
2631 # AC_DEPLIBS_CHECK_METHOD
2632 # -----------------------
2633 # how to check for library dependencies
2634 #  -- PORTME fill in with the dynamic library characteristics
2635 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2636 [AC_CACHE_CHECK([how to recognise dependant libraries],
2637 lt_cv_deplibs_check_method,
2638 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2639 lt_cv_file_magic_test_file=
2640 lt_cv_deplibs_check_method='unknown'
2641 # Need to set the preceding variable on all platforms that support
2642 # interlibrary dependencies.
2643 # 'none' -- dependencies not supported.
2644 # `unknown' -- same as none, but documents that we really don't know.
2645 # 'pass_all' -- all dependencies passed with no checks.
2646 # 'test_compile' -- check by making test program.
2647 # ['file_magic [regex]'] -- check by looking for files in library path
2648 # which responds to the $file_magic_cmd with a given egrep regex.
2649 # If you have `file' or equivalent on your system and you're not sure
2650 # whether `pass_all' will *always* work, you probably want this one.
2651
2652 case $host_os in
2653 aix4* | aix5*)
2654   lt_cv_deplibs_check_method=pass_all
2655   ;;
2656
2657 beos*)
2658   lt_cv_deplibs_check_method=pass_all
2659   ;;
2660
2661 bsdi4*)
2662   [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
2663   lt_cv_file_magic_cmd='/usr/bin/file -L'
2664   lt_cv_file_magic_test_file=/shlib/libc.so
2665   ;;
2666
2667 cygwin* | mingw* | pw32*)
2668   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2669   lt_cv_file_magic_cmd='$OBJDUMP -f'
2670   ;;
2671
2672 darwin* | rhapsody*)
2673   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2674   lt_cv_file_magic_cmd='/usr/bin/file -L'
2675   case "$host_os" in
2676   rhapsody* | darwin1.[012])
2677     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2678     ;;
2679   *) # Darwin 1.3 on
2680     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2681     ;;
2682   esac
2683   ;;
2684
2685 freebsd*)
2686   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2687     case $host_cpu in
2688     i*86 )
2689       # Not sure whether the presence of OpenBSD here was a mistake.
2690       # Let's accept both of them until this is cleared up.
2691       [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
2692       lt_cv_file_magic_cmd=/usr/bin/file
2693       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2694       ;;
2695     esac
2696   else
2697     lt_cv_deplibs_check_method=pass_all
2698   fi
2699   ;;
2700
2701 gnu*)
2702   lt_cv_deplibs_check_method=pass_all
2703   ;;
2704
2705 hpux10.20* | hpux11*)
2706   [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
2707   lt_cv_file_magic_cmd=/usr/bin/file
2708   lt_cv_file_magic_test_file=/usr/lib/libc.sl
2709   ;;
2710
2711 irix5* | irix6*)
2712   case $host_os in
2713   irix5*)
2714     # this will be overridden with pass_all, but let us keep it just in case
2715     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2716     ;;
2717   *)
2718     case $LD in
2719     *-32|*"-32 ") libmagic=32-bit;;
2720     *-n32|*"-n32 ") libmagic=N32;;
2721     *-64|*"-64 ") libmagic=64-bit;;
2722     *) libmagic=never-match;;
2723     esac
2724     # this will be overridden with pass_all, but let us keep it just in case
2725     [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
2726     ;;
2727   esac
2728   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2729   lt_cv_deplibs_check_method=pass_all
2730   ;;
2731
2732 # This must be Linux ELF.
2733 linux*)
2734   case $host_cpu in
2735   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* )
2736     lt_cv_deplibs_check_method=pass_all ;;
2737   *)
2738     # glibc up to 2.1.1 does not perform some relocations on ARM
2739     [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
2740   esac
2741   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2742   ;;
2743
2744 netbsd*)
2745   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2746     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
2747   else
2748     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
2749   fi
2750   ;;
2751
2752 newos6*)
2753   [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
2754   lt_cv_file_magic_cmd=/usr/bin/file
2755   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2756   ;;
2757
2758 osf3* | osf4* | osf5*)
2759   # this will be overridden with pass_all, but let us keep it just in case
2760   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2761   lt_cv_file_magic_test_file=/shlib/libc.so
2762   lt_cv_deplibs_check_method=pass_all
2763   ;;
2764
2765 sco3.2v5*)
2766   lt_cv_deplibs_check_method=pass_all
2767   ;;
2768
2769 solaris*)
2770   lt_cv_deplibs_check_method=pass_all
2771   lt_cv_file_magic_test_file=/lib/libc.so
2772   ;;
2773
2774 [sysv5uw[78]* | sysv4*uw2*)]
2775   lt_cv_deplibs_check_method=pass_all
2776   ;;
2777
2778 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2779   case $host_vendor in
2780   motorola)
2781     [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]']
2782     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2783     ;;
2784   ncr)
2785     lt_cv_deplibs_check_method=pass_all
2786     ;;
2787   sequent)
2788     lt_cv_file_magic_cmd='/bin/file'
2789     [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
2790     ;;
2791   sni)
2792     lt_cv_file_magic_cmd='/bin/file'
2793     [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
2794     lt_cv_file_magic_test_file=/lib/libc.so
2795     ;;
2796   esac
2797   ;;
2798 esac
2799 ])
2800 file_magic_cmd=$lt_cv_file_magic_cmd
2801 deplibs_check_method=$lt_cv_deplibs_check_method
2802 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2803 ])# AC_DEPLIBS_CHECK_METHOD
2804
2805
2806 # AC_PROG_NM
2807 # ----------
2808 # find the path to a BSD-compatible name lister
2809 AC_DEFUN([AC_PROG_NM],
2810 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2811 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2812 if test -n "$NM"; then
2813   # Let the user override the test.
2814   lt_cv_path_NM="$NM"
2815 else
2816   IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2817   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2818     IFS="$lt_save_ifs"
2819     test -z "$ac_dir" && ac_dir=.
2820     tmp_nm=$ac_dir/${ac_tool_prefix}nm
2821     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2822       # Check to see if the nm accepts a BSD-compat flag.
2823       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2824       #   nm: unknown option "B" ignored
2825       # Tru64's nm complains that /dev/null is an invalid object file
2826       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2827         lt_cv_path_NM="$tmp_nm -B"
2828         break
2829       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2830         lt_cv_path_NM="$tmp_nm -p"
2831         break
2832       else
2833         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2834         continue # so that we can try to find one that supports BSD flags
2835       fi
2836     fi
2837   done
2838   IFS="$lt_save_ifs"
2839   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2840 fi])
2841 NM="$lt_cv_path_NM"
2842 ])# AC_PROG_NM
2843
2844
2845 # AC_CHECK_LIBM
2846 # -------------
2847 # check for math library
2848 AC_DEFUN([AC_CHECK_LIBM],
2849 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2850 LIBM=
2851 case $host in
2852 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2853   # These system don't have libm
2854   ;;
2855 *-ncr-sysv4.3*)
2856   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2857   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2858   ;;
2859 *)
2860   AC_CHECK_LIB(m, main, LIBM="-lm")
2861   ;;
2862 esac
2863 ])# AC_CHECK_LIBM
2864
2865
2866 # AC_CHECK_AIX_LIBPATH()
2867 # Links a minimal program and checks the executable
2868 # for the system default hardcoded library path. In most cases,
2869 # this is /usr/lib:/lib, but when the MPI compilers are used
2870 # the location of the communication and MPI libs are included too.
2871 # If we don't find anything, use the default library path according 
2872 # to the aix ld manual.
2873 AC_DEFUN([AC_CHECK_AIX_LIBPATH],
2874 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2875 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`
2876 # Check for a 64-bit object if we didn't find anything.
2877 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`; fi],[])
2878 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2879 ])
2880
2881 #
2882 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2883 # -----------------------------------
2884 # sets LIBLTDL to the link flags for the libltdl convenience library and 
2885 # INCLTDL to the include flags for the libltdl header and adds
2886 # --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2887 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2888 # DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2889 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed with
2890 # '${top_srcdir}/' (note the single quotes!).  If your package is not
2891 # flat and you're not using automake, define top_builddir and
2892 # top_srcdir appropriately in the Makefiles.
2893 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2894 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2895   case $enable_ltdl_convenience in
2896   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2897   "") enable_ltdl_convenience=yes
2898       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2899   esac
2900   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2901   INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2902 ])# AC_LIBLTDL_CONVENIENCE
2903
2904
2905 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2906 # -----------------------------------
2907 # sets LIBLTDL to the link flags for the libltdl installable library and
2908 # INCLTDL to the include flags for the libltdl header and adds
2909 # --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2910 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2911 # DIRECTORY is not provided and an installed libltdl is not found, it is
2912 # assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2913 # and INCLTDL will be prefixed with '${top_srcdir}/' (note the single
2914 # quotes!).  If your package is not flat and you're not using automake,
2915 # define top_builddir and top_srcdir appropriately in the Makefiles.
2916 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2917 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2918 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2919   AC_CHECK_LIB(ltdl, main,
2920   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2921   [if test x"$enable_ltdl_install" = xno; then
2922      AC_MSG_WARN([libltdl not installed, but installation disabled])
2923    else
2924      enable_ltdl_install=yes
2925    fi
2926   ])
2927   if test x"$enable_ltdl_install" = x"yes"; then
2928     ac_configure_args="$ac_configure_args --enable-ltdl-install"
2929     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2930     INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2931   else
2932     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2933     LIBLTDL="-lltdl"
2934     INCLTDL=
2935   fi
2936 ])# AC_LIBLTDL_INSTALLABLE
2937
2938
2939 # If this macro is not defined by Autoconf, define it here.
2940 ifdef([AC_PROVIDE_IFELSE],
2941       [],
2942       [define([AC_PROVIDE_IFELSE],
2943               [ifdef([AC_PROVIDE_$1],
2944                      [$2], [$3])])])
2945
2946
2947
2948
2949
2950 # AC_LIBTOOL_CXX
2951 # --------------
2952 # enable support for C++ libraries
2953 AC_DEFUN([AC_LIBTOOL_CXX],
2954 [AC_REQUIRE([_LT_AC_LANG_CXX])
2955 ])# AC_LIBTOOL_CXX
2956
2957
2958 # _LT_AC_LANG_CXX
2959 # ---------------
2960 AC_DEFUN([_LT_AC_LANG_CXX],
2961 [AC_REQUIRE([AC_PROG_CXX])
2962 AC_REQUIRE([AC_PROG_CXXCPP])
2963 ])# _LT_AC_LANG_CXX
2964
2965
2966 # AC_LIBTOOL_F77
2967 # --------------
2968 # enable support for Fortran 77 libraries
2969 AC_DEFUN([AC_LIBTOOL_F77],
2970 [AC_REQUIRE([_LT_AC_LANG_F77])
2971 ])# AC_LIBTOOL_F77
2972
2973
2974 # _LT_AC_LANG_F77
2975 # ---------------
2976 AC_DEFUN([_LT_AC_LANG_F77],
2977 [AC_REQUIRE([AC_PROG_F77])
2978 ])# _LT_AC_LANG_F77
2979
2980
2981 # AC_LIBTOOL_GCJ
2982 # --------------
2983 # enable support for GCJ libraries
2984 AC_DEFUN([AC_LIBTOOL_GCJ],
2985 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2986 ])# AC_LIBTOOL_GCJ
2987
2988
2989 # _LT_AC_LANG_GCJ
2990 # ---------------
2991 AC_DEFUN([_LT_AC_LANG_GCJ],
2992 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2993   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2994     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2995       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2996          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2997            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2998 ])# _LT_AC_LANG_GCJ
2999
3000
3001 # AC_LIBTOOL_LANG_C_CONFIG
3002 # ------------------------
3003 # Ensure that the configuration vars for the C compiler are
3004 # suitably defined.  Those variables are subsequently used by
3005 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3006 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3007 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3008 [lt_save_CC="$CC"
3009 AC_LANG_PUSH(C)
3010
3011 # Source file extension for C test sources.
3012 ac_ext=c
3013
3014 # Object file extension for compiled C test sources.
3015 objext=o
3016 _LT_AC_TAGVAR(objext, $1)=$objext
3017
3018 # Code to be used in simple compile tests
3019 lt_simple_compile_test_code="int some_variable = 0;\n"
3020
3021 # Code to be used in simple link tests
3022 lt_simple_link_test_code='main(){return(0);}\n'
3023
3024 _LT_AC_SYS_COMPILER
3025
3026 #
3027 # Check for any special shared library compilation flags.
3028 #
3029 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3030 if test "$GCC" = no; then
3031   case $host_os in
3032   sco3.2v5*)
3033     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3034     ;;
3035   esac
3036 fi
3037 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3038   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3039   if echo "$old_CC $old_CFLAGS " | [egrep -e "[         ]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]"] >/dev/null; then :
3040   else
3041     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3042     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3043   fi
3044 fi
3045
3046
3047 #
3048 # Check to make sure the static flag actually works.
3049 #
3050 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3051   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3052   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3053   [],
3054   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3055
3056
3057 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3058 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3059 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3060 AC_LIBTOOL_PROG_CC_C_O($1)
3061 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3062 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3063 AC_LIBTOOL_SYS_LIB_STRIP
3064 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3065 AC_LIBTOOL_DLOPEN_SELF($1)
3066
3067 # Report which librarie types wil actually be built
3068 AC_MSG_CHECKING([if libtool supports shared libraries])
3069 AC_MSG_RESULT([$can_build_shared])
3070
3071 AC_MSG_CHECKING([whether to build shared libraries])
3072 test "$can_build_shared" = "no" && enable_shared=no
3073
3074 # On AIX, shared libraries and static libraries use the same namespace, and
3075 # are all built from PIC.
3076 case "$host_os" in
3077 aix3*)
3078   test "$enable_shared" = yes && enable_static=no
3079   if test -n "$RANLIB"; then
3080     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3081     postinstall_cmds='$RANLIB $lib'
3082   fi
3083   ;;
3084
3085 aix4*)
3086   test "$enable_shared" = yes && enable_static=no
3087   ;;
3088 esac
3089 AC_MSG_RESULT([$enable_shared])
3090
3091 AC_MSG_CHECKING([whether to build static libraries])
3092 # Make sure either enable_shared or enable_static is yes.
3093 test "$enable_shared" = yes || enable_static=yes
3094 AC_MSG_RESULT([$enable_static])
3095
3096 AC_LIBTOOL_CONFIG($1)
3097
3098 AC_LANG_POP
3099 CC="$lt_save_CC"
3100 ])# AC_LIBTOOL_LANG_C_CONFIG
3101
3102
3103 # AC_LIBTOOL_LANG_CXX_CONFIG
3104 # --------------------------
3105 # Ensure that the configuration vars for the C compiler are
3106 # suitably defined.  Those variables are subsequently used by
3107 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3108 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3109 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3110 [AC_LANG_PUSH(C++)
3111 AC_REQUIRE([AC_PROG_CXX])
3112 AC_REQUIRE([AC_PROG_CXXCPP])
3113
3114 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3115 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3116 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3117 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3118 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3119 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3120 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3121 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3122 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3123 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3124 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3125 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3126 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3127
3128 # Dependencies to place before and after the object being linked:
3129 _LT_AC_TAGVAR(predep_objects, $1)=
3130 _LT_AC_TAGVAR(postdep_objects, $1)=
3131 _LT_AC_TAGVAR(predeps, $1)=
3132 _LT_AC_TAGVAR(postdeps, $1)=
3133 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3134
3135 # Source file extension for C test sources.
3136 ac_ext=cc
3137
3138 # Object file extension for compiled C test sources.
3139 objext=o
3140 _LT_AC_TAGVAR(objext, $1)=$objext
3141
3142 # Code to be used in simple compile tests
3143 lt_simple_compile_test_code="int some_variable = 0;\n"
3144
3145 # Code to be used in simple link tests
3146 lt_simple_link_test_code='int main(int char *[]) { return(0); }\n'
3147
3148 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3149 _LT_AC_SYS_COMPILER
3150
3151 # Allow CC to be a program name with arguments.
3152 lt_save_CC="$CC"
3153 CC=${CXX-"c++"}
3154 set dummy $CC
3155 compiler="[$]2"
3156 _LT_AC_TAGVAR(compiler, $1)=$CC
3157 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3158
3159 # We don't want -fno-exception wen compiling C++ code, so set the
3160 # no_builtin_flag separately
3161 if test "$GXX" = yes; then
3162   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3163 else
3164   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3165 fi
3166
3167 if test "$GXX" = yes; then
3168   # Set up default GNU C++ configuration
3169
3170   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3171   # archiving commands below assume that GNU ld is being used.
3172   if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
3173       egrep 'GNU ld' > /dev/null; then
3174     with_gnu_ld=yes
3175
3176     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3177     _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'
3178
3179     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3180     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3181
3182     # If archive_cmds runs LD, not CC, wlarc should be empty
3183     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3184     #     investigate it a little bit more. (MM)
3185     wlarc='${wl}'
3186
3187     # ancient GNU ld didn't support --whole-archive et. al.
3188     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3189         egrep 'no-whole-archive' > /dev/null; then
3190       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3191     else
3192       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3193     fi
3194   else
3195     with_gnu_ld=no
3196     wlarc=
3197
3198     # A generic and very simple default shared library creation
3199     # command for GNU C++ for the case where it uses the native
3200     # linker, instead of GNU ld.  If possible, this setting should
3201     # overridden to take advantage of the native linker features on
3202     # the platform it is being used on.
3203     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3204   fi
3205
3206   # Commands to make compiler produce verbose output that lists
3207   # what "hidden" libraries, object files and flags are used when
3208   # linking a shared library.
3209   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3210
3211 else
3212   GXX=no
3213   with_gnu_ld=no
3214   wlarc=
3215 fi
3216
3217 # PORTME: fill in a description of your system's C++ link characteristics
3218 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3219 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3220 case $host_os in
3221   aix3*)
3222     # FIXME: insert proper C++ library support
3223     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3224     ;;
3225   aix4* | aix5*)
3226     _LT_AC_TAGVAR(archive_cmds, $1)=''
3227     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3228     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3229     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3230     # When large executables or shared objects are built, AIX ld can
3231     # have problems creating the table of contents.  If linking a library
3232     # or program results in "error TOC overflow" add -mminimal-toc to
3233     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3234     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3235     if test "$GXX" = yes; then
3236       case $host_os in aix4.[012]|aix4.[012].*)
3237       # We only want to do this on AIX 4.2 and lower, the check
3238       # below for broken collect2 doesn't work under 4.3+
3239         collect2name=`${CC} -print-prog-name=collect2`
3240         if test -f "$collect2name" && \
3241            strings "$collect2name" | grep resolve_lib_name >/dev/null
3242         then
3243           # We have reworked collect2
3244           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3245         else
3246           # We have old collect2
3247           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3248           # It fails to find uninstalled libraries when the uninstalled
3249           # path is not listed in the libpath.  Setting hardcode_minus_L
3250           # to unsupported forces relinking
3251           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3252           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3253           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3254         fi
3255       esac
3256       shared_flag='-shared'
3257     else
3258       # not using gcc
3259       if test "$host_cpu" = ia64; then
3260         shared_flag='${wl}-G'
3261       else
3262         shared_flag='${wl}-bM:SRE'
3263       fi
3264     fi
3265
3266     if test "$host_cpu" = ia64; then
3267       # On IA64, the linker does run time linking by default, so we don't
3268       # have to do anything special.
3269       aix_use_runtimelinking=no
3270       exp_sym_flag='-Bexport'
3271       no_entry_flag=""
3272     else
3273       # Test if we are trying to use run time linking, or normal AIX style linking.
3274       # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
3275       aix_use_runtimelinking=no
3276       for ld_flag in $LDFLAGS; do
3277         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
3278           aix_use_runtimelinking=yes
3279           break
3280         fi
3281       done
3282       exp_sym_flag='-bexport'
3283       no_entry_flag='-bnoentry'
3284     fi
3285     # It seems that -bexpall does not export symbols beginning with
3286     # underscore (_), so it is better to generate a list of symbols to export.
3287     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3288     if test "$aix_use_runtimelinking" = yes; then
3289       # Determine the default libpath from the value encoded in an empty executable.
3290       AC_CHECK_AIX_LIBPATH
3291       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3292      
3293       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -Wl,-G'
3294       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols"
3295      else
3296       if test "$host_cpu" = ia64; then
3297         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3298         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3299         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3300       else
3301         # Determine the default libpath from the value encoded in an empty executable.
3302         AC_CHECK_AIX_LIBPATH
3303         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3304
3305         # Warning - without using the other run time loading flags, -berok will
3306         #           link without error, but may produce a broken library.
3307         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bnoerok'
3308         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3309         # -bexpall does not export symbols beginning with underscore (_)
3310         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3311         # Exported symbols can be pulled into shared objects from archives
3312         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3313         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3314         # This is similar to how AIX traditionally builds it's shared libraries.
3315         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3316       fi
3317     fi
3318     ;;
3319   chorus*)
3320     case $cc_basename in
3321       *)
3322         # FIXME: insert proper C++ library support
3323         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3324         ;;
3325     esac
3326     ;;
3327   dgux*)
3328     case $cc_basename in
3329       ec++)
3330         # FIXME: insert proper C++ library support
3331         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3332         ;;
3333       ghcx)
3334         # Green Hills C++ Compiler
3335         # FIXME: insert proper C++ library support
3336         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3337         ;;
3338       *)
3339         # FIXME: insert proper C++ library support
3340         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3341         ;;
3342     esac
3343     ;;
3344   freebsd[12]*)
3345     # C++ shared libraries reported to be fairly broken before switch to ELF
3346     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3347     ;;
3348   freebsd-elf*)
3349     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3350     ;;
3351   freebsd*)
3352     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3353     # conventions
3354     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3355     ;;
3356   hpux*)
3357     if test $with_gnu_ld = no; then
3358       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3359       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3360       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3361     fi
3362     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3363     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
3364                          # location of the library.
3365
3366     case $cc_basename in
3367       CC)
3368         # FIXME: insert proper C++ library support
3369         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3370         ;;
3371       aCC)
3372         case $host_os in
3373         hpux9*) _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' ;;
3374         *) _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' ;;
3375         esac
3376         # Commands to make compiler produce verbose output that lists
3377         # what "hidden" libraries, object files and flags are used when
3378         # linking a shared library.
3379         #
3380         # There doesn't appear to be a way to prevent this compiler from
3381         # explicitly linking system object files so we need to strip them
3382         # from the output so that they don't get included in the library
3383         # dependencies.
3384         output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3385         ;;
3386       *)
3387         if test $GXX = yes; then
3388           if test $with_gnu_ld = no; then
3389             case "$host_os" in
3390             hpux9*) _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' ;;
3391             *) _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' ;;
3392             esac
3393           fi
3394         else
3395           # FIXME: insert proper C++ library support
3396           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3397         fi
3398         ;;
3399     esac
3400     ;;
3401   irix5* | irix6*)
3402     case $cc_basename in
3403       CC)
3404         # SGI C++
3405         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3406
3407         # Archives containing C++ object files must be created using
3408         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3409         # necessary to make sure instantiated templates are included
3410         # in the archive.
3411         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3412         ;;
3413       *)
3414         if test "$GXX" = yes; then
3415           if test "$with_gnu_ld" = no; then
3416             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3417           else
3418             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
3419           fi
3420         fi
3421         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3422         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3423         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3424         ;;
3425     esac
3426     ;;
3427   linux*)
3428     case $cc_basename in
3429       KCC)
3430         # Kuck and Associates, Inc. (KAI) C++ Compiler
3431
3432         # KCC will only create a shared library if the output file
3433         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3434         # to its proper name (with version) after linking.
3435         _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3436         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3437
3438         # Commands to make compiler produce verbose output that lists
3439         # what "hidden" libraries, object files and flags are used when
3440         # linking a shared library.
3441         #
3442         # There doesn't appear to be a way to prevent this compiler from
3443         # explicitly linking system object files so we need to strip them
3444         # from the output so that they don't get included in the library
3445         # dependencies.
3446         output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3447
3448         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3449         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3450
3451         # Archives containing C++ object files must be created using
3452         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3453         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3454         ;;
3455       cxx)
3456         # Compaq C++
3457         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3458         _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'
3459
3460         runpath_var=LD_RUN_PATH
3461         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3462         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3463
3464         # Commands to make compiler produce verbose output that lists
3465         # what "hidden" libraries, object files and flags are used when
3466         # linking a shared library.
3467         #
3468         # There doesn't appear to be a way to prevent this compiler from
3469         # explicitly linking system object files so we need to strip them
3470         # from the output so that they don't get included in the library
3471         # dependencies.
3472         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'
3473         ;;
3474     esac
3475     ;;
3476   lynxos*)
3477     # FIXME: insert proper C++ library support
3478     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3479     ;;
3480   m88k*)
3481     # FIXME: insert proper C++ library support
3482     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3483     ;;
3484   mvs*)
3485     case $cc_basename in
3486       cxx)
3487         # FIXME: insert proper C++ library support
3488         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3489         ;;
3490       *)
3491         # FIXME: insert proper C++ library support
3492         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3493         ;;
3494     esac
3495     ;;
3496   netbsd*)
3497     # NetBSD uses g++ - do we need to do anything?
3498     ;;
3499   osf3*)
3500     case $cc_basename in
3501       KCC)
3502         # Kuck and Associates, Inc. (KAI) C++ Compiler
3503
3504         # KCC will only create a shared library if the output file
3505         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3506         # to its proper name (with version) after linking.
3507         _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3508
3509         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3510         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3511
3512         # Archives containing C++ object files must be created using
3513         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3514         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3515
3516         ;;
3517       RCC)
3518         # Rational C++ 2.4.1
3519         # FIXME: insert proper C++ library support
3520         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3521         ;;
3522       cxx)
3523         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3524         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3525
3526         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3527         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3528
3529         # Commands to make compiler produce verbose output that lists
3530         # what "hidden" libraries, object files and flags are used when
3531         # linking a shared library.
3532         #
3533         # There doesn't appear to be a way to prevent this compiler from
3534         # explicitly linking system object files so we need to strip them
3535         # from the output so that they don't get included in the library
3536         # dependencies.
3537         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'
3538         ;;
3539       *)
3540         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3541           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3542           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3543
3544           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3545           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3546
3547           # Commands to make compiler produce verbose output that lists
3548           # what "hidden" libraries, object files and flags are used when
3549           # linking a shared library.
3550           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3551
3552         else
3553           # FIXME: insert proper C++ library support
3554           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3555         fi
3556         ;;
3557     esac
3558     ;;
3559   osf4* | osf5*)
3560     case $cc_basename in
3561       KCC)
3562         # Kuck and Associates, Inc. (KAI) C++ Compiler
3563
3564         # KCC will only create a shared library if the output file
3565         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3566         # to its proper name (with version) after linking.
3567         _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3568
3569         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3570         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3571
3572         # Archives containing C++ object files must be created using
3573         # the KAI C++ compiler.
3574         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3575         ;;
3576       RCC)
3577         # Rational C++ 2.4.1
3578         # FIXME: insert proper C++ library support
3579         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3580         ;;
3581       cxx)
3582         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3583         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3584         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
3585           echo "-hidden">> $lib.exp~
3586           $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
3587           $rm $lib.exp'
3588
3589         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3590         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3591
3592         # Commands to make compiler produce verbose output that lists
3593         # what "hidden" libraries, object files and flags are used when
3594         # linking a shared library.
3595         #
3596         # There doesn't appear to be a way to prevent this compiler from
3597         # explicitly linking system object files so we need to strip them
3598         # from the output so that they don't get included in the library
3599         # dependencies.
3600         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'
3601         ;;
3602       *)
3603         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3604           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3605          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3606
3607           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3608           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3609
3610           # Commands to make compiler produce verbose output that lists
3611           # what "hidden" libraries, object files and flags are used when
3612           # linking a shared library.
3613           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3614
3615         else
3616           # FIXME: insert proper C++ library support
3617           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3618         fi
3619         ;;
3620     esac
3621     ;;
3622   psos*)
3623     # FIXME: insert proper C++ library support
3624     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3625     ;;
3626   sco*)
3627     case $cc_basename in
3628       CC)
3629         # FIXME: insert proper C++ library support
3630         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3631         ;;
3632       *)
3633         # FIXME: insert proper C++ library support
3634         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3635         ;;
3636     esac
3637     ;;
3638   sunos4*)
3639     case $cc_basename in
3640       CC)
3641         # Sun C++ 4.x
3642         # FIXME: insert proper C++ library support
3643         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3644         ;;
3645       lcc)
3646         # Lucid
3647         # FIXME: insert proper C++ library support
3648         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3649         ;;
3650       *)
3651         # FIXME: insert proper C++ library support
3652         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3653         ;;
3654     esac
3655     ;;
3656   solaris*)
3657     case $cc_basename in
3658       CC)
3659         # Sun C++ 4.2, 5.x and Centerline C++
3660         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3661         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3662         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3663         $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3664
3665         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3666         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3667         case $host_os in
3668           solaris2.[0-5] | solaris2.[0-5].*) ;;
3669           *)
3670             # The C++ compiler is used as linker so we must use $wl
3671             # flag to pass the commands to the underlying system
3672             # linker.
3673             # Supported since Solaris 2.6 (maybe 2.5.1?)
3674             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3675             ;;
3676         esac
3677         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3678
3679         # Commands to make compiler produce verbose output that lists
3680         # what "hidden" libraries, object files and flags are used when
3681         # linking a shared library.
3682         #
3683         # There doesn't appear to be a way to prevent this compiler from
3684         # explicitly linking system object files so we need to strip them
3685         # from the output so that they don't get included in the library
3686         # dependencies.
3687         output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3688
3689         # Archives containing C++ object files must be created using
3690         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3691         # necessary to make sure instantiated templates are included
3692         # in the archive.
3693         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3694         ;;
3695       gcx)
3696         # Green Hills C++ Compiler
3697         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3698
3699         # The C++ compiler must be used to create the archive.
3700         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3701         ;;
3702       *)
3703         # GNU C++ compiler with Solaris linker
3704         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3705           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3706           if $CC --version | egrep -v '^2\.7' > /dev/null; then
3707             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3708             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3709                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3710
3711             # Commands to make compiler produce verbose output that lists
3712             # what "hidden" libraries, object files and flags are used when
3713             # linking a shared library.
3714             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3715           else
3716             # g++ 2.7 appears to require `-G' NOT `-shared' on this
3717             # platform.
3718             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3719             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3720                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3721
3722             # Commands to make compiler produce verbose output that lists
3723             # what "hidden" libraries, object files and flags are used when
3724             # linking a shared library.
3725             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3726           fi
3727
3728           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3729         fi
3730         ;;
3731     esac
3732     ;;
3733   tandem*)
3734     case $cc_basename in
3735       NCC)
3736         # NonStop-UX NCC 3.20
3737         # FIXME: insert proper C++ library support
3738         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3739         ;;
3740       *)
3741         # FIXME: insert proper C++ library support
3742         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3743         ;;
3744     esac
3745     ;;
3746   unixware*)
3747     # FIXME: insert proper C++ library support
3748     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3749     ;;
3750   vxworks*)
3751     # FIXME: insert proper C++ library support
3752     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3753     ;;
3754   *)
3755     # FIXME: insert proper C++ library support
3756     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3757     ;;
3758 esac
3759 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3760 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3761
3762 # Figure out "hidden" C++ library dependencies from verbose
3763 # compiler output whening linking a shared library.
3764 cat > conftest.$ac_ext <<EOF
3765 class Foo
3766 {
3767 public:
3768   Foo (void) { a = 0; }
3769 private:
3770   int a;
3771 };
3772 EOF
3773
3774
3775 if AC_TRY_EVAL(ac_compile); then
3776   # Parse the compiler output and extract the necessary
3777   # objects, libraries and library flags.
3778
3779   # Sentinel used to keep track of whether or not we are before
3780   # the conftest object file.
3781   pre_test_object_deps_done=no
3782
3783   # The `*' in the case matches for architectures that use `case' in
3784   # $output_verbose_cmd can trigger glob expansion during the loop
3785   # eval without this substitution.
3786   output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3787
3788   for p in `eval $output_verbose_link_cmd`; do
3789
3790     case $p in
3791
3792     -L* | -R* | -l*)
3793        # Some compilers place space between "-{L,R}" and the path.
3794        # Remove the space.
3795        if test $p = "-L" \
3796           || test $p = "-R"; then
3797          prev=$p
3798          continue
3799        else
3800          prev=
3801        fi
3802
3803        if test "$pre_test_object_deps_done" = no; then
3804          case $p in
3805          -L* | -R*)
3806            # Internal compiler library paths should come after those
3807            # provided the user.  The postdeps already come after the
3808            # user supplied libs so there is no need to process them.
3809            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3810              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3811            else
3812              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3813            fi
3814            ;;
3815          # The "-l" case would never come before the object being
3816          # linked, so don't bother handling this case.
3817          esac
3818        else
3819          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3820            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3821          else
3822            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3823          fi
3824        fi
3825        ;;
3826
3827     *.$objext)
3828        # This assumes that the test object file only shows up
3829        # once in the compiler output.
3830        if test "$p" = "conftest.$objext"; then
3831          pre_test_object_deps_done=yes
3832          continue
3833        fi
3834
3835        if test "$pre_test_object_deps_done" = no; then
3836          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3837            _LT_AC_TAGVAR(predep_objects, $1)="$p"
3838          else
3839            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3840          fi
3841        else
3842          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3843            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3844          else
3845            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3846          fi
3847        fi
3848        ;;
3849
3850     *) ;; # Ignore the rest.
3851
3852     esac
3853   done
3854
3855   # Clean up.
3856   rm -f a.out
3857 else
3858   echo "ltcf-cxx.sh: error: problem compiling test program"
3859 fi
3860
3861 $rm -f confest.$objext
3862
3863 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3864 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3865 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3866 esac
3867
3868 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3869 _LT_AC_TAGVAR(LD, $1)="$LD"
3870
3871 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3872 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3873 AC_LIBTOOL_PROG_CC_C_O($1)
3874 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3875 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3876 AC_LIBTOOL_SYS_LIB_STRIP
3877 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3878 AC_LIBTOOL_DLOPEN_SELF($1)
3879
3880 AC_LIBTOOL_CONFIG($1)
3881
3882 AC_LANG_POP
3883 CC="$lt_save_CC"
3884 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3885
3886
3887
3888
3889 # AC_LIBTOOL_LANG_F77_CONFIG
3890 # ------------------------
3891 # Ensure that the configuration vars for the C compiler are
3892 # suitably defined.  Those variables are subsequently used by
3893 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3894 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3895 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3896 [AC_LANG_PUSH(Fortran 77)
3897 AC_REQUIRE([AC_PROG_F77])
3898
3899 # Source file extension for f77 test sources.
3900 ac_ext=f
3901
3902 # Object file extension for compiled f77 test sources.
3903 objext=o
3904 _LT_AC_TAGVAR(objext, $1)=$objext
3905
3906 # Code to be used in simple compile tests
3907 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"    
3908
3909 # Code to be used in simple link tests
3910 lt_simple_link_test_code="      program t\n      end\n"
3911
3912 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3913 _LT_AC_SYS_COMPILER
3914
3915 # Allow CC to be a program name with arguments.
3916 lt_save_CC="$CC"
3917 CC=${F77-"f77"}
3918 set dummy $CC
3919 compiler="[$]2"
3920 _LT_AC_TAGVAR(compiler, $1)=$CC
3921 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3922
3923 # Report which library types wil actually be built
3924 AC_MSG_CHECKING([if libtool supports shared libraries])
3925 AC_MSG_RESULT([$can_build_shared])
3926
3927 AC_MSG_CHECKING([whether to build shared libraries])
3928 test "$can_build_shared" = "no" && enable_shared=no
3929
3930 # We never build shared libraries with the fortran linker;
3931 # this support is only meant for including fortran objects
3932 # in C libraries. You should normally always be able to
3933 # perform the linking stage with the C compiler, anyway...
3934
3935 # On AIX, shared libraries and static libraries use the same namespace, and
3936 # are all built from PIC.
3937 case "$host_os" in
3938 aix3*)
3939   test "$enable_shared" = yes && enable_static=no
3940   if test -n "$RANLIB"; then
3941     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3942     postinstall_cmds='$RANLIB $lib'
3943   fi
3944   ;;
3945
3946 aix4*)
3947   test "$enable_shared" = yes && enable_static=no
3948   ;;
3949 esac
3950 AC_MSG_RESULT([$enable_shared])
3951
3952 AC_MSG_CHECKING([whether to build static libraries])
3953 # Make sure either enable_shared or enable_static is yes.
3954 test "$enable_shared" = yes || enable_static=yes
3955 AC_MSG_RESULT([$enable_static])
3956
3957 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3958 AC_LIBTOOL_PROG_F77_C_O($1)
3959 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3960 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3961 AC_LIBTOOL_SYS_LIB_STRIP
3962 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3963
3964
3965 AC_LIBTOOL_CONFIG($1)
3966
3967 AC_LANG_POP
3968 CC="$lt_save_CC"
3969 ])# AC_LIBTOOL_LANG_F77_CONFIG
3970
3971
3972
3973
3974 # AC_LIBTOOL_LANG_GCJ_CONFIG
3975 # --------------------------
3976 # Ensure that the configuration vars for the C compiler are
3977 # suitably defined.  Those variables are subsequently used by
3978 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3979 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3980 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3981 [AC_LANG_SAVE
3982
3983 # Source file extension for C test sources.
3984 ac_ext=java
3985
3986 # Object file extension for compiled C test sources.
3987 objext=o
3988 _LT_AC_TAGVAR(objext, $1)=$objext
3989
3990 # Code to be used in simple compile tests
3991 lt_simple_compile_test_code="class foo {}\n"
3992
3993 # Code to be used in simple link tests
3994 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3995 echo "ARG1=$1"
3996
3997 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3998 _LT_AC_SYS_COMPILER
3999
4000 # Allow CC to be a program name with arguments.
4001 lt_save_CC="$CC"
4002 CC=${GCJ-"gcj"}
4003 set dummy $CC
4004 compiler="[$]2"
4005 _LT_AC_TAGVAR(compiler, $1)=$CC
4006
4007 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4008 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4009
4010 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4011 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4012 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4013 AC_LIBTOOL_PROG_CC_C_O($1)
4014 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4015 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4016 AC_LIBTOOL_SYS_LIB_STRIP
4017 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4018 AC_LIBTOOL_DLOPEN_SELF($1)
4019
4020 AC_LIBTOOL_CONFIG($1)
4021
4022 AC_LANG_RESTORE
4023 CC="$lt_save_CC"
4024 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4025
4026
4027 # AC_LIBTOOL_CONFIG([TAGNAME])
4028 # ----------------------------
4029 # If TAGNAME is not passed, then create an initial libtool script
4030 # with a default configuration from the untagged config vars.  Otherwise
4031 # add code to config.status for appending the configuration named by
4032 # TAGNAME from the matching tagged config vars.
4033 AC_DEFUN([AC_LIBTOOL_CONFIG], 
4034 [# The else clause should only fire when bootstrapping the
4035 # libtool distribution, otherwise you forgot to ship ltmain.sh
4036 # with your package, and you will get complaints that there are
4037 # no rules to generate ltmain.sh.
4038 if test -f "$ltmain"; then
4039   # Now quote all the things that may contain metacharacters while being
4040   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4041   # variables and quote the copies for generation of the libtool script.
4042   for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S NM SHELL \
4043     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4044     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4045     deplibs_check_method reload_flag reload_cmds need_locks \
4046     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4047     lt_cv_sys_global_symbol_to_c_name_address \
4048     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4049     old_postinstall_cmds old_postuninstall_cmds \
4050     _LT_AC_TAGVAR(compiler, $1) \
4051     _LT_AC_TAGVAR(CC, $1) \
4052     _LT_AC_TAGVAR(LD, $1) \
4053     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4054     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4055     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4056     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4057     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4058     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4059     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4060     _LT_AC_TAGVAR(old_archive_cmds, $1) \
4061     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4062     _LT_AC_TAGVAR(predep_objects, $1) \
4063     _LT_AC_TAGVAR(postdep_objects, $1) \
4064     _LT_AC_TAGVAR(predeps, $1) \
4065     _LT_AC_TAGVAR(postdeps, $1) \
4066     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4067     _LT_AC_TAGVAR(archive_cmds, $1) \
4068     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4069     _LT_AC_TAGVAR(postinstall_cmds, $1) \
4070     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4071     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4072     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4073     _LT_AC_TAGVAR(no_undefined_flag, $1) \
4074     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4075     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4076     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4077     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4078     _LT_AC_TAGVAR(exclude_expsyms, $1) \
4079     _LT_AC_TAGVAR(include_expsyms, $1); do
4080
4081     case $var in
4082     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4083     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4084     _LT_AC_TAGVAR(archive_cmds, $1) | \
4085     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4086     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4087     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4088     extract_expsyms_cmds | reload_cmds | finish_cmds | \
4089     postinstall_cmds | postuninstall_cmds | \
4090     old_postinstall_cmds | old_postuninstall_cmds | \
4091     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4092       # Double-quote double-evaled strings.
4093       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4094       ;;
4095     *)
4096       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4097       ;;
4098     esac
4099   done
4100
4101   case $lt_echo in
4102   *'\[$]0 --fallback-echo"')
4103     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4104     ;;
4105   esac
4106
4107 ifelse([$1], [],
4108   [cfgfile="${ofile}T"
4109   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4110   $rm -f "$cfgfile"
4111   AC_MSG_NOTICE([creating $ofile])],
4112   [cfgfile="$ofile"])
4113
4114   cat <<__EOF__ >> "$cfgfile"
4115 ifelse([$1], [], 
4116 [#! $SHELL
4117
4118 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4119 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4120 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4121 #
4122 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4123 # Free Software Foundation, Inc.
4124 #
4125 # This file is part of GNU Libtool:
4126 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4127 #
4128 # This program is free software; you can redistribute it and/or modify
4129 # it under the terms of the GNU General Public License as published by
4130 # the Free Software Foundation; either version 2 of the License, or
4131 # (at your option) any later version.
4132 #
4133 # This program is distributed in the hope that it will be useful, but
4134 # WITHOUT ANY WARRANTY; without even the implied warranty of
4135 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4136 # General Public License for more details.
4137 #
4138 # You should have received a copy of the GNU General Public License
4139 # along with this program; if not, write to the Free Software
4140 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4141 #
4142 # As a special exception to the GNU General Public License, if you
4143 # distribute this file as part of a program that contains a
4144 # configuration script generated by Autoconf, you may include it under
4145 # the same distribution terms that you use for the rest of that program.
4146
4147 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4148 Xsed="sed -e s/^X//"
4149
4150 # The HP-UX ksh and POSIX shell print the target directory to stdout
4151 # if CDPATH is set.
4152 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4153
4154 # The names of the tagged configurations supported by this script.
4155 available_tags=
4156
4157 # ### BEGIN LIBTOOL CONFIG],
4158 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4159
4160 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4161
4162 # Shell to use when invoking shell scripts.
4163 SHELL=$lt_SHELL
4164
4165 # Whether or not to build shared libraries.
4166 build_libtool_libs=$enable_shared
4167
4168 # Whether or not to build static libraries.
4169 build_old_libs=$enable_static
4170
4171 # Whether or not to add -lc for building shared libraries.
4172 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4173
4174 # Whether or not to optimize for fast installation.
4175 fast_install=$enable_fast_install
4176
4177 # The host system.
4178 host_alias=$host_alias
4179 host=$host
4180
4181 # An echo program that does not interpret backslashes.
4182 echo=$lt_echo
4183
4184 # The archiver.
4185 AR=$lt_AR
4186 AR_FLAGS=$lt_AR_FLAGS
4187
4188 # A C compiler.
4189 LTCC=$LTCC
4190
4191 # A language-specific compiler.
4192 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4193
4194 # Is the compiler the GNU C compiler?
4195 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4196
4197 # The linker used to build libraries.
4198 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4199
4200 # Whether we need hard or soft links.
4201 LN_S=$lt_LN_S
4202
4203 # A BSD-compatible nm program.
4204 NM=$lt_NM
4205
4206 # A symbol stripping program
4207 STRIP=$STRIP
4208
4209 # Used to examine libraries when file_magic_cmd begins "file"
4210 MAGIC_CMD=$MAGIC_CMD
4211
4212 # Used on cygwin: DLL creation program.
4213 DLLTOOL="$DLLTOOL"
4214
4215 # Used on cygwin: object dumper.
4216 OBJDUMP="$OBJDUMP"
4217
4218 # Used on cygwin: assembler.
4219 AS="$AS"
4220
4221 # The name of the directory that contains temporary libtool files.
4222 objdir=$objdir
4223
4224 # How to create reloadable object files.
4225 reload_flag=$lt_reload_flag
4226 reload_cmds=$lt_reload_cmds
4227
4228 # How to pass a linker flag through the compiler.
4229 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4230
4231 # Object file suffix (normally "o").
4232 objext="$ac_objext"
4233
4234 # Old archive suffix (normally "a").
4235 libext="$libext"
4236
4237 # Executable file suffix (normally "").
4238 exeext="$exeext"
4239
4240 # Additional compiler flags for building library objects.
4241 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4242 pic_mode=$pic_mode
4243
4244 # What is the maximum length of a command?
4245 max_cmd_len=$lt_cv_sys_max_cmd_len
4246
4247 # Does compiler simultaneously support -c and -o options?
4248 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4249
4250 # Must we lock files when doing compilation ?
4251 need_locks=$lt_need_locks
4252
4253 # Do we need the lib prefix for modules?
4254 need_lib_prefix=$need_lib_prefix
4255
4256 # Do we need a version for libraries?
4257 need_version=$need_version
4258
4259 # Whether dlopen is supported.
4260 dlopen_support=$enable_dlopen
4261
4262 # Whether dlopen of programs is supported.
4263 dlopen_self=$enable_dlopen_self
4264
4265 # Whether dlopen of statically linked programs is supported.
4266 dlopen_self_static=$enable_dlopen_self_static
4267
4268 # Compiler flag to prevent dynamic linking.
4269 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4270
4271 # Compiler flag to turn off builtin functions.
4272 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4273
4274 # Compiler flag to allow reflexive dlopens.
4275 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4276
4277 # Compiler flag to generate shared objects directly from archives.
4278 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4279
4280 # Compiler flag to generate thread-safe objects.
4281 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4282
4283 # Library versioning type.
4284 version_type=$version_type
4285
4286 # Format of library name prefix.
4287 libname_spec=$lt_libname_spec
4288
4289 # List of archive names.  First name is the real one, the rest are links.
4290 # The last name is the one that the linker finds with -lNAME.
4291 library_names_spec=$lt_library_names_spec
4292
4293 # The coded name of the library, if different from the real name.
4294 soname_spec=$lt_soname_spec
4295
4296 # Commands used to build and install an old-style archive.
4297 RANLIB=$lt_RANLIB
4298 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4299 old_postinstall_cmds=$lt_old_postinstall_cmds
4300 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4301
4302 # Create an old-style archive from a shared archive.
4303 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4304
4305 # Create a temporary old-style archive to link instead of a shared archive.
4306 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4307
4308 # Commands used to build and install a shared archive.
4309 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4310 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4311 postinstall_cmds=$lt_postinstall_cmds
4312 postuninstall_cmds=$lt_postuninstall_cmds
4313
4314 # Commands to strip libraries.
4315 old_striplib=$lt_old_striplib
4316 striplib=$lt_striplib
4317
4318 # Dependencies to place before the objects being linked to create a
4319 # shared library.
4320 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4321
4322 # Dependencies to place after the objects being linked to create a
4323 # shared library.
4324 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4325
4326 # Dependencies to place before the objects being linked to create a
4327 # shared library.
4328 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4329
4330 # Dependencies to place after the objects being linked to create a
4331 # shared library.
4332 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4333
4334 # The library search path used internally by the compiler when linking
4335 # a shared library.
4336 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4337
4338 # Method to check whether dependent libraries are shared objects.
4339 deplibs_check_method=$lt_deplibs_check_method
4340
4341 # Command to use when deplibs_check_method == file_magic.
4342 file_magic_cmd=$lt_file_magic_cmd
4343
4344 # Flag that allows shared libraries with undefined symbols to be built.
4345 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4346
4347 # Flag that forces no undefined symbols.
4348 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4349
4350 # Commands used to finish a libtool library installation in a directory.
4351 finish_cmds=$lt_finish_cmds
4352
4353 # Same as above, but a single script fragment to be evaled but not shown.
4354 finish_eval=$lt_finish_eval
4355
4356 # Take the output of nm and produce a listing of raw symbols and C names.
4357 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4358
4359 # Transform the output of nm in a proper C declaration
4360 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4361
4362 # Transform the output of nm in a C name address pair
4363 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4364
4365 # This is the shared library runtime path variable.
4366 runpath_var=$runpath_var
4367
4368 # This is the shared library path variable.
4369 shlibpath_var=$shlibpath_var
4370
4371 # Is shlibpath searched before the hard-coded library search path?
4372 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4373
4374 # How to hardcode a shared library path into an executable.
4375 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4376
4377 # Whether we should hardcode library paths into libraries.
4378 hardcode_into_libs=$hardcode_into_libs
4379
4380 # Flag to hardcode \$libdir into a binary during linking.
4381 # This must work even if \$libdir does not exist.
4382 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4383
4384 # Whether we need a single -rpath flag with a separated argument.
4385 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4386
4387 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4388 # resulting binary.
4389 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4390
4391 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4392 # resulting binary.
4393 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4394
4395 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4396 # the resulting binary.
4397 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4398
4399 # Variables whose values should be saved in libtool wrapper scripts and
4400 # restored at relink time.
4401 variables_saved_for_relink="$variables_saved_for_relink"
4402
4403 # Whether libtool must link a program against all its dependency libraries.
4404 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4405
4406 # Compile-time system search path for libraries
4407 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4408
4409 # Run-time system search path for libraries
4410 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4411
4412 # Fix the shell variable \$srcfile for the compiler.
4413 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4414
4415 # Set to yes if exported symbols are required.
4416 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4417
4418 # The commands to list exported symbols.
4419 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4420
4421 # The commands to extract the exported symbol list from a shared archive.
4422 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4423
4424 # Symbols that should not be listed in the preloaded symbols.
4425 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4426
4427 # Symbols that must always be exported.
4428 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4429
4430 ifelse([$1],[],
4431 [# ### END LIBTOOL CONFIG], 
4432 [# ### END LIBTOOL TAG CONFIG: $tagname])
4433
4434 __EOF__
4435
4436 ifelse([$1],[], [
4437   case $host_os in
4438   aix3*)
4439     cat <<\EOF >> "$cfgfile"
4440
4441 # AIX sometimes has problems with the GCC collect2 program.  For some
4442 # reason, if we set the COLLECT_NAMES environment variable, the problems
4443 # vanish in a puff of smoke.
4444 if test "X${COLLECT_NAMES+set}" != Xset; then
4445   COLLECT_NAMES=
4446   export COLLECT_NAMES
4447 fi
4448 EOF
4449     ;;
4450
4451   cygwin* | mingw* | pw32* | os2*)
4452     cat <<'EOF' >> "$cfgfile"
4453     # This is a source program that is used to create dlls on Windows
4454     # Don't remove nor modify the starting and closing comments
4455     _LT_AC_FILE_LTDLL_C
4456     # This is a source program that is used to create import libraries
4457     # on Windows for dlls which lack them. Don't remove nor modify the
4458     # starting and closing comments
4459     _LT_AC_FILE_IMPGEN_C
4460 EOF
4461     ;;
4462   esac
4463
4464   # We use sed instead of cat because bash on DJGPP gets confused if
4465   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4466   # text mode, it properly converts lines to CR/LF.  This bash problem
4467   # is reportedly fixed, but why not run on old versions too?
4468   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4469
4470   mv -f "$cfgfile" "$ofile" || \
4471     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4472   chmod +x "$ofile"
4473 ])
4474 else
4475   # If there is no Makefile yet, we rely on a make rule to execute
4476   # `config.status --recheck' to rerun these tests and create the
4477   # libtool script then.
4478   test -f Makefile && make "$ltmain"
4479 fi
4480 ])# AC_LIBTOOL_CONFIG
4481
4482
4483 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4484 # -------------------------------------------
4485 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4486 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4487
4488 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4489
4490 if test "$GCC" = yes; then
4491   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4492
4493   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4494     lt_cv_prog_compiler_rtti_exceptions,
4495     [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
4496     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4497 fi
4498 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4499
4500
4501 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4502 # ---------------------------------
4503 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4504 [AC_REQUIRE([AC_CANONICAL_HOST])
4505 AC_REQUIRE([AC_PROG_NM])
4506 AC_REQUIRE([AC_OBJEXT])
4507 # Check for command to grab the raw symbol name followed by C symbol from nm.
4508 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4509 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4510 [
4511 # These are sane defaults that work on at least a few old systems.
4512 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4513
4514 # Character class describing NM global symbol codes.
4515 [symcode='[BCDEGRST]']
4516
4517 # Regexp to match symbols that can be accessed directly from C.
4518 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
4519
4520 # Transform the above into a raw symbol and a C symbol.
4521 symxfrm='\1 \2\3 \3'
4522
4523 # Transform an extracted symbol line into a proper C declaration
4524 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4525
4526 # Transform an extracted symbol line into symbol name and symbol address
4527 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'"
4528
4529 # Define system-specific variables.
4530 case $host_os in
4531 aix*)
4532   [symcode='[BCDT]']
4533   ;;
4534 cygwin* | mingw* | pw32*)
4535   [symcode='[ABCDGISTW]']
4536   ;;
4537 hpux*) # Its linker distinguishes data from code symbols
4538   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4539   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'"
4540   ;;
4541 irix*)
4542   [symcode='[BCDEGRST]']
4543   ;;
4544 solaris* | sysv5*)
4545   [symcode='[BDT]']
4546   ;;
4547 sysv4)
4548   [symcode='[DFNSTU]']
4549   ;;
4550 esac
4551
4552 # Handle CRLF in mingw tool chain
4553 opt_cr=
4554 case $host_os in
4555 mingw*)
4556   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4557   ;;
4558 esac
4559
4560 # If we're using GNU nm, then use its standard symbol codes.
4561 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4562   [symcode='[ABCDGISTW]']
4563 fi
4564
4565 # Try without a prefix undercore, then with it.
4566 for ac_symprfx in "" "_"; do
4567
4568   # Write the raw and C identifiers.
4569 lt_cv_sys_global_symbol_pipe=["sed -n -e 's/^.*[        ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
4570
4571   # Check to see that the pipe works correctly.
4572   pipe_works=no
4573
4574   rm -f conftest*
4575   cat > conftest.$ac_ext <<EOF
4576 #ifdef __cplusplus
4577 extern "C" {
4578 #endif
4579 char nm_test_var;
4580 void nm_test_func(){}
4581 #ifdef __cplusplus
4582 }
4583 #endif
4584 int main(){nm_test_var='a';nm_test_func();return(0);}
4585 EOF
4586
4587   if AC_TRY_EVAL(ac_compile); then
4588     # Now try to grab the symbols.
4589     nlist=conftest.nm
4590     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4591       # Try sorting and uniquifying the output.
4592       if sort "$nlist" | uniq > "$nlist"T; then
4593         mv -f "$nlist"T "$nlist"
4594       else
4595         rm -f "$nlist"T
4596       fi
4597
4598       # Make sure that we snagged all the symbols we need.
4599       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4600         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4601           cat <<EOF > conftest.$ac_ext
4602 #ifdef __cplusplus
4603 extern "C" {
4604 #endif
4605
4606 EOF
4607           # Now generate the symbol file.
4608           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4609
4610           cat <<EOF >> conftest.$ac_ext
4611 #if defined (__STDC__) && __STDC__
4612 # define lt_ptr_t void *
4613 #else
4614 # define lt_ptr_t char *
4615 # define const
4616 #endif
4617
4618 /* The mapping between symbol names and symbols. */
4619 const struct {
4620   const char *name;
4621   lt_ptr_t address;
4622 }
4623 [lt_preloaded_symbols[] =]
4624 {
4625 EOF
4626           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
4627           cat <<\EOF >> conftest.$ac_ext
4628   {0, (lt_ptr_t) 0}
4629 };
4630
4631 #ifdef __cplusplus
4632 }
4633 #endif
4634 EOF
4635           # Now try linking the two files.
4636           mv conftest.$ac_objext conftstm.$ac_objext
4637           lt_save_LIBS="$LIBS"
4638           lt_save_CFLAGS="$CFLAGS"
4639           LIBS="conftstm.$ac_objext"
4640           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4641           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4642             pipe_works=yes
4643           fi
4644           LIBS="$lt_save_LIBS"
4645           CFLAGS="$lt_save_CFLAGS"
4646         else
4647           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4648         fi
4649       else
4650         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4651       fi
4652     else
4653       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4654     fi
4655   else
4656     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4657     cat conftest.$ac_ext >&5
4658   fi
4659   rm -f conftest* conftst*
4660
4661   # Do not use the global_symbol_pipe unless it works.
4662   if test "$pipe_works" = yes; then
4663     break
4664   else
4665     lt_cv_sys_global_symbol_pipe=
4666   fi
4667 done
4668 ])
4669 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4670   lt_cv_sys_global_symbol_to_cdecl=
4671 fi
4672 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4673   AC_MSG_RESULT(failed)
4674 else
4675   AC_MSG_RESULT(ok)
4676 fi
4677 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4678
4679
4680 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4681 # ---------------------------------------
4682 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4683 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4685 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4686
4687 AC_MSG_CHECKING([for $compiler option to produce PIC])
4688 if test "$GCC" = yes; then
4689   _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4690   _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4691
4692   case $host_os in
4693     aix*)
4694     # All AIX code is PIC.
4695     if test "$host_cpu" = ia64; then
4696       # AIX 5 now supports IA64 processor
4697       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4698     else
4699       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4700     fi
4701     ;;
4702
4703   amigaos*)
4704     # FIXME: we need at least 68020 code to build shared libraries, but
4705     # adding the `-m68020' flag to GCC prevents building anything better,
4706     # like `-m68040'.
4707     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4708     ;;
4709
4710   beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4711     # PIC is the default for these OSes.
4712     ;;
4713
4714   cygwin* | mingw* | pw32* | os2*)
4715     # This hack is so that the source file can tell whether it is being
4716     # built for inclusion in a dll (and should export symbols for example).
4717     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4718     ;;
4719
4720   darwin* | rhapsody*)
4721     # PIC is the default on this platform
4722     # Common symbols not allowed in MH_DYLIB files
4723     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4724     ;;
4725
4726   msdosdjgpp*)
4727     # Just because we use GCC doesn't mean we suddenly get shared libraries
4728     # on systems that don't support them.
4729     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4730     enable_shared=no
4731     ;;
4732
4733   sysv4*MP*)
4734     if test -d /usr/nec; then
4735       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4736     fi
4737     ;;
4738
4739   *)
4740     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4741     ;;
4742   esac
4743 else
4744   # PORTME Check for flag to pass linker flags through the system compiler.
4745   case $host_os in
4746   aix*)
4747     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4748     if test "$host_cpu" = ia64; then
4749       # AIX 5 now supports IA64 processor
4750       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4751     else
4752       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4753     fi
4754     ;;
4755
4756   cygwin* | mingw* | pw32* | os2*)
4757     # This hack is so that the source file can tell whether it is being
4758     # built for inclusion in a dll (and should export symbols for example).
4759     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4760     ;;
4761
4762   hpux9* | hpux10* | hpux11*)
4763     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4764     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4765     # Is there a better lt_prog_compiler_static that works with the bundled CC?
4766     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4767     ;;
4768
4769   irix5* | irix6*)
4770     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4771     # PIC (with -KPIC) is the default.
4772     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4773     ;;
4774
4775   linux*)
4776     # Check flags for non-gnu compilers on Linux 
4777     case "$host_cpu" in
4778     alpha*)
4779       # The only non-gnu compiler on Linux/Alpha is the Compaq one:
4780       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4782       ;;
4783     *)
4784       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4785       ;;
4786     esac
4787     ;;
4788   newsos6)
4789     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4790     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4791     ;;
4792
4793   osf3* | osf4* | osf5*)
4794     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4795     # All OSF/1 code is PIC.
4796     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4797     ;;
4798
4799   sco3.2v5*)
4800     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4801     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4802     ;;
4803
4804   solaris*)
4805     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4806     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4807     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4808     ;;
4809
4810   sunos4*)
4811     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4812     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4813     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4814     ;;
4815
4816   sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4817     if test "x$host_vendor" = xsni; then
4818       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4819     else
4820       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4821     fi
4822     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4823     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4824     ;;
4825
4826   sysv4*MP*)
4827     if test -d /usr/nec ;then
4828       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4829       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830     fi
4831     ;;
4832
4833   uts4*)
4834     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4835     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4836     ;;
4837
4838   *)
4839     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4840     ;;
4841   esac
4842 fi
4843 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4844
4845 #
4846 # Check to make sure the PIC flag actually works.
4847 #
4848 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4849   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4850     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4851     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)], [],
4852     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4853      "" | " "*) ;;
4854      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4855      esac
4856     ],
4857     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4858      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4859 fi
4860 case "$host_os" in
4861   # For platforms which do not support PIC, -DPIC is meaningless:
4862   *djgpp*)
4863     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4864     ;;
4865   *)
4866     AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC define -DPIC works],
4867     _LT_AC_TAGVAR(lt_prog_compiler_picdef_works, $1),
4868     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4869     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"],
4870     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"])
4871     ;;
4872 esac
4873 ])
4874
4875
4876 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4877 # ------------------------------------
4878 # See if the linker supports building shared libraries.
4879 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4880 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4881
4882 runpath_var=
4883 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4884
4885 _LT_AC_TAGVAR(archive_cmds, $1)=
4886 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4887 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4888 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4889 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4890 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4891 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4892 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4894 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4895 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4896 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4897 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4898 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4899 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4900 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4901 # include_expsyms should be a list of space-separated symbols to be *always*
4902 # included in the symbol list
4903 _LT_AC_TAGVAR(include_expsyms, $1)=
4904 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4905 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4906 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4907 # as well as any symbol that contains `d'.
4908 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4909 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4910 # platforms (ab)use it in PIC code, but their linkers get confused if
4911 # the symbol is explicitly referenced.  Since portable code cannot
4912 # rely on this symbol name, it's probably fine to never include it in
4913 # preloaded symbol tables.
4914 extract_expsyms_cmds=
4915
4916 case $host_os in
4917 cygwin* | mingw* | pw32*)
4918   # FIXME: the MSVC++ port hasn't been tested in a loooong time
4919   # When not using gcc, we currently assume that we are using
4920   # Microsoft Visual C++.
4921   if test "$GCC" != yes; then
4922     with_gnu_ld=no
4923   fi
4924   ;;
4925 openbsd*)
4926   with_gnu_ld=no
4927   ;;
4928 esac
4929
4930 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4931 if test "$with_gnu_ld" = yes; then
4932   # If archive_cmds runs LD, not CC, wlarc should be empty
4933   wlarc='${wl}'
4934
4935   # See if GNU ld supports shared libraries.
4936   case $host_os in
4937   aix3* | aix4* | aix5*)
4938     # On AIX/PPC, the GNU linker is very broken
4939     if test "$host_cpu" != ia64; then
4940       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4941       cat <<EOF 1>&2
4942
4943 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4944 *** to be unable to reliably create shared libraries on AIX.
4945 *** Therefore, libtool is disabling shared libraries support.  If you
4946 *** really care for shared libraries, you may want to modify your PATH
4947 *** so that a non-GNU linker is found, and then restart.
4948
4949 EOF
4950     fi
4951     ;;
4952
4953   amigaos*)
4954     _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)'
4955     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4956     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4957
4958     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4959     # that the semantics of dynamic libraries on AmigaOS, at least up
4960     # to version 4, is to share data among multiple programs linked
4961     # with the same dynamic library.  Since this doesn't match the
4962     # behavior of shared libraries on other platforms, we can't use
4963     # them.
4964     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4965     ;;
4966
4967   beos*)
4968     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4969       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4970       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4971       # support --undefined.  This deserves some investigation.  FIXME
4972       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4973     else
4974       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4975     fi
4976     ;;
4977
4978   cygwin* | mingw* | pw32*)
4979     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4980     # no search path for DLLs.
4981     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4982     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4983     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4984
4985     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4986       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4987       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4988       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4989       else $CC -o impgen impgen.c ; fi)~
4990       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4991
4992     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4993
4994     # cygwin and mingw dlls have different entry points and sets of symbols
4995     # to exclude.
4996     # FIXME: what about values for MSVC?
4997     dll_entry=__cygwin_dll_entry@12
4998     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4999     case $host_os in
5000     mingw*)
5001       # mingw values
5002       dll_entry=_DllMainCRTStartup@12
5003       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5004       ;;
5005     esac
5006
5007     # mingw and cygwin differ, and it's simplest to just exclude the union
5008     # of the two symbol sets.
5009     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5010
5011     # recent cygwin and mingw systems supply a stub DllMain which the user
5012     # can override, but on older systems we have to supply one (in ltdll.c)
5013     if test "x$lt_cv_need_dllmain" = "xyes"; then
5014       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5015       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5016         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5017     else
5018       ltdll_obj=
5019       ltdll_cmds=
5020     fi
5021
5022     # Extract the symbol export list from an `--export-all' def file,
5023     # then regenerate the def file from the symbol export list, so that
5024     # the compiled dll only exports the symbol export list.
5025     # Be careful not to strip the DATA tag left by newer dlltools.
5026     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
5027       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5028       [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
5029
5030     # If the export-symbols file already is a .def file (1st line
5031     # is EXPORTS), use it as is.
5032     # If DATA tags from a recent dlltool are present, honour them!
5033     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5034         cp $export_symbols $output_objdir/$soname-def;
5035       else
5036         echo EXPORTS > $output_objdir/$soname-def;
5037         _lt_hint=1;
5038         cat $export_symbols | while read symbol; do
5039          set dummy \$symbol;
5040          case \[$]# in
5041            2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5042            *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
5043          esac;
5044          _lt_hint=`expr 1 + \$_lt_hint`;
5045         done;
5046       fi~
5047       '"$ltdll_cmds"'
5048       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5049       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5050       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5051       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5052       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5053     ;;
5054
5055   darwin* | rhapsody*)
5056     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5057     # FIXME: Relying on posixy $() will cause problems for
5058     #        cross-compilation, but unfortunately the echo tests do not
5059     #        yet detect zsh echo's removal of \ escapes.
5060     _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
5061     # We need to add '_' to the symbols in $export_symbols first
5062     #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
5063     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5064     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5065     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5066     ;;
5067
5068   netbsd*)
5069     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5070       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5071       wlarc=
5072     else
5073       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5074       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5075     fi
5076     ;;
5077
5078   solaris* | sysv5*)
5079     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5080       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5081       cat <<EOF 1>&2
5082
5083 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5084 *** create shared libraries on Solaris systems.  Therefore, libtool
5085 *** is disabling shared libraries support.  We urge you to upgrade GNU
5086 *** binutils to release 2.9.1 or newer.  Another option is to modify
5087 *** your PATH or compiler configuration so that the native linker is
5088 *** used, and then restart.
5089
5090 EOF
5091     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5092       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5093       _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'
5094     else
5095       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5096     fi
5097     ;;
5098
5099   sunos4*)
5100     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5101     wlarc=
5102     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5103     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5104     ;;
5105
5106   *)
5107     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5108       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5109       _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'
5110     else
5111       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5112     fi
5113     ;;
5114   esac
5115
5116   if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5117     runpath_var=LD_RUN_PATH
5118     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5119     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5120     case $host_os in
5121     cygwin* | mingw* | pw32*)
5122       # dlltool doesn't understand --whole-archive et. al.
5123       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5124       ;;
5125     *)
5126       # ancient GNU ld didn't support --whole-archive et. al.
5127       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5128         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5129       else
5130         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5131       fi
5132       ;;
5133     esac
5134   fi
5135 else
5136   # PORTME fill in a description of your system's linker (not GNU ld)
5137   case $host_os in
5138   aix3*)
5139     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5140     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5141     _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'
5142     # Note: this linker hardcodes the directories in LIBPATH if there
5143     # are no directories specified by -L.
5144     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5145     if test "$GCC" = yes && test -z "$link_static_flag"; then
5146       # Neither direct hardcoding nor static linking is supported with a
5147       # broken collect2.
5148       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5149     fi
5150     ;;
5151
5152   aix4* | aix5*)
5153     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5154     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5155     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5156     # When large executables or shared objects are built, AIX ld can
5157     # have problems creating the table of contents.  If linking a library
5158     # or program results in "error TOC overflow" add -mminimal-toc to
5159     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5160     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5161     if test "$GCC" = yes; then
5162       case $host_os in aix4.[012]|aix4.[-12].*)
5163         # We only want to do this on AIX 4.2 and lower, the check
5164         # below for broken collect2 doesn't work under 4.3+
5165         collect2name=`${CC} -print-prog-name=collect2`
5166         if test -f "$collect2name" && \
5167            strings "$collect2name" | grep resolve_lib_name >/dev/null
5168         then
5169           # We have reworked collect2
5170           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5171         else
5172           # We have old collect2
5173           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5174           # It fails to find uninstalled libraries when the uninstalled
5175           # path is not listed in the libpath.  Setting hardcode_minus_L
5176           # to unsupported forces relinking
5177           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5178           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5179           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5180         fi
5181       esac
5182       shared_flag='-shared'
5183     else
5184       # not using gcc
5185       if test "$host_cpu" = ia64; then
5186         shared_flag='${wl}-G'
5187       else
5188         shared_flag='${wl}-bM:SRE'
5189       fi
5190     fi
5191
5192     if test "$host_cpu" = ia64; then
5193       # On IA64, the linker does run time linking by default, so we don't
5194       # have to do anything special.
5195       aix_use_runtimelinking=no
5196         if test $with_gnu_ld = no; then
5197           exp_sym_flag='-Bexport'
5198         fi
5199       no_entry_flag=""
5200     else
5201       # Test if we are trying to use run time linking, or normal AIX style
5202       # linking.  If -brtl is somewhere in LDFLAGS, we need to do run time
5203       # linking.
5204       aix_use_runtimelinking=no
5205       for ld_flag in $LDFLAGS; do
5206         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
5207           aix_use_runtimelinking=yes
5208           break
5209         fi
5210       done
5211       exp_sym_flag='-bexport'
5212       no_entry_flag='-bnoentry'
5213     fi
5214     # -bexpall does not export symbols beginning with underscore (_)
5215     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5216     if test "$aix_use_runtimelinking" = yes; then
5217       # Warning - without using the other run time loading flags (-brtl),
5218       #           -berok will link without error, but may produce a broken
5219       #           library.
5220       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' $wl}-berok'
5221       # Determine the default libpath from the value encoded in an empty executable.
5222       # If we don't find anything, use the default library path according to the cc manual.
5223       AC_CHECK_AIX_LIBPATH
5224       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5225       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5226     else
5227       if test "$host_cpu" = ia64; then
5228         if test $with_gnu_ld = no; then
5229           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5230           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5231           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5232         fi
5233       else
5234         # Determine the default libpath from the value encoded in an empty executable.
5235         AC_CHECK_AIX_LIBPATH
5236         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5237         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5238         # -bexpall does not export symbols beginning with underscore (_)
5239         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5240         # Exported symbols can be pulled into shared objects from archives
5241         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5242         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5243         # This is similar to how AIX traditionally builds it's shared
5244         # libraries.
5245         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5246       fi
5247     fi
5248     ;;
5249
5250   amigaos*)
5251     _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)'
5252     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5253     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5254     # see comment about different semantics on the GNU ld section
5255     _LT_AC_TAGVAR(ld_shlibs, $1)=no
5256     ;;
5257
5258   bsdi4*)
5259     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5260     ;;
5261
5262   cygwin* | mingw* | pw32*)
5263     # When not using gcc, we currently assume that we are using
5264     # Microsoft Visual C++.
5265     # hardcode_libdir_flag_spec is actually meaningless, as there is
5266     # no search path for DLLs.
5267     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5268     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5269     # Tell ltmain to make .lib files, not .a files.
5270     libext=lib
5271     # FIXME: Setting linknames here is a bad hack.
5272     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5273     # The linker will automatically build a .lib file if we build a DLL.
5274     _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5275     # FIXME: Should let the user specify the lib program.
5276     _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5277     fix_srcfile_path='`cygpath -w "$srcfile"`'
5278     ;;
5279
5280   dgux*)
5281     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5282     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5283     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5284     ;;
5285
5286   freebsd1*)
5287     _LT_AC_TAGVAR(ld_shlibs, $1)=no
5288     ;;
5289
5290   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5291   # support.  Future versions do this automatically, but an explicit c++rt0.o
5292   # does not break anything, and helps significantly (at the cost of a little
5293   # extra space).
5294   freebsd2.2*)
5295     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5296     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5297     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5298     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5299     ;;
5300
5301   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5302   freebsd2*)
5303     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5304     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5305     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5306     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5307     ;;
5308
5309   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5310   freebsd*)
5311     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5312     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5313     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5314     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5315     ;;
5316
5317   hpux9* | hpux10* | hpux11*)
5318     if test $with_gcc = yes; then
5319       case $host_os in
5320       hpux9*) _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' ;;
5321       *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
5322       esac
5323     else
5324       case $host_os in
5325       hpux9*) _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' ;;
5326       *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5327       esac
5328     fi
5329     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5330     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5331     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5332     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
5333                          # location of the library.
5334     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5335     ;;
5336
5337   irix5* | irix6*)
5338     if test "$GCC" = yes; then
5339       _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'
5340     else
5341       _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'
5342     fi
5343     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5344     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5345     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5346     ;;
5347
5348   netbsd*)
5349     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5350       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5351     else
5352       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5353     fi
5354     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5355     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5356     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5357     ;;
5358
5359   newsos6)
5360     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5361     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5362     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5363     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5364     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5365     ;;
5366
5367   openbsd*)
5368     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5369     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5370   
5371     case "$host_os" in
5372       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5373         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5374         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5375       ;;
5376       *)
5377         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5378         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5379         if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
5380          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5381         fi
5382       ;;
5383     esac
5384     ;;
5385
5386   os2*)
5387     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5388     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5389     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5390     _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'
5391     _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5392     ;;
5393
5394   osf3*)
5395     if test "$GCC" = yes; then
5396       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5397       _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'
5398     else
5399       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5400       _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'
5401     fi
5402     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5403     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5404     ;;
5405
5406   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5407     if test "$GCC" = yes; then
5408       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5409       _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'
5410       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5411     else
5412       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5413       _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'
5414       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5415       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5416
5417       # Both c and cxx compiler support -rpath directly
5418       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5419     fi
5420     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5421     ;;
5422
5423   sco3.2v5*)
5424     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5425     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5426     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5427     runpath_var=LD_RUN_PATH
5428     hardcode_runpath_var=yes
5429     ;;
5430
5431   solaris*)
5432     _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
5433     if test "$with_gcc" = yes; then
5434       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5435       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5436         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5437     else
5438       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5439       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5440         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5441     fi
5442     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5443     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5444     case $host_os in
5445     [solaris2.[0-5] | solaris2.[0-5].*]) ;;
5446     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5447       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5448     esac
5449     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5450     ;;
5451
5452   sunos4*)
5453     if test "x$host_vendor" = xsequent; then
5454       # Use $CC to link under sequent, because it throws in some extra .o
5455       # files that make .init and .fini sections work.
5456       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5457     else
5458       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5459     fi
5460     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5461     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5462     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5463     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5464     ;;
5465
5466   sysv4)
5467     if test "x$host_vendor" = xsni; then
5468       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
5469       _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5470     else
5471       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5472       _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5473     fi
5474     runpath_var='LD_RUN_PATH'
5475     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5476     ;;
5477
5478   sysv4.3*)
5479     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5480     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5481     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5482     ;;
5483
5484   sysv4*MP*)
5485     if test -d /usr/nec; then
5486       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5487       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5488       runpath_var=LD_RUN_PATH
5489       hardcode_runpath_var=yes
5490       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5491     fi
5492     ;;
5493
5494   sysv4.2uw2*)
5495     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5496     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5497     _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5498     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5499     hardcode_runpath_var=yes
5500     runpath_var=LD_RUN_PATH
5501     ;;
5502
5503   sysv5uw7* | unixware7*)
5504     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5505     if test "$GCC" = yes; then
5506       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5507     else
5508       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5509     fi
5510     runpath_var='LD_RUN_PATH'
5511     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5512     ;;
5513
5514   sysv5*)
5515     _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5516     # $CC -shared without GNU ld will not create a library from C++
5517     # object files and a static libstdc++, better avoid it by now
5518     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5519     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5520                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5521     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5522     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5523     runpath_var='LD_RUN_PATH'
5524     ;;
5525
5526   uts4*)
5527     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5528     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5529     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5530     ;;
5531
5532   *)
5533     _LT_AC_TAGVAR(ld_shlibs, $1)=no
5534     ;;
5535   esac
5536 fi
5537 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5538 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5539
5540 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5541 if test "$GCC" = yes; then
5542   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5543 fi
5544
5545 #
5546 # Do we need to explicitly link libc?
5547 #
5548 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5549 if test "$enable_shared" = yes && test "$GCC" = yes; then
5550   case $_LT_AC_TAGVAR(archive_cmds, $1) in
5551   *'~'*)
5552     # FIXME: we may have to deal with multi-command sequences.
5553     ;;
5554   '$CC '*)
5555     # Test whether the compiler implicitly links with -lc since on some
5556     # systems, -lgcc has to come before -lc. If gcc already passes -lc
5557     # to ld, don't add -lc before -lgcc.
5558     AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5559     $rm conftest*
5560     echo 'static int dummy;' > conftest.$ac_ext
5561
5562     if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5563       soname=conftest
5564       lib=conftest
5565       libobjs=conftest.$ac_objext
5566       deplibs=
5567       wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5568       compiler_flags=-v
5569       linker_flags=-v
5570       verstring=
5571       output_objdir=.
5572       libname=conftest
5573       lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5574       _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5575       if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5576       then
5577         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5578       else
5579         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5580       fi
5581       _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5582     else
5583       cat conftest.err 1>&5
5584     fi
5585     $rm conftest*
5586     AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5587     ;;
5588   esac
5589 fi
5590 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5591
5592
5593 # _LT_AC_FILE_LTDLL_C
5594 # -------------------
5595 AC_DEFUN([_LT_AC_FILE_LTDLL_C],
5596 [# /* ltdll.c starts here */
5597 # #define WIN32_LEAN_AND_MEAN
5598 # #include <windows.h>
5599 # #undef WIN32_LEAN_AND_MEAN
5600 # #include <stdio.h>
5601 #
5602 # #ifndef __CYGWIN__
5603 # #  ifdef __CYGWIN32__
5604 # #    define __CYGWIN__ __CYGWIN32__
5605 # #  endif
5606 # #endif
5607 #
5608 # #ifdef __cplusplus
5609 # extern "C" {
5610 # #endif
5611 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5612 # #ifdef __cplusplus
5613 # }
5614 # #endif
5615 #
5616 # #ifdef __CYGWIN__
5617 # #include <cygwin/cygwin_dll.h>
5618 # DECLARE_CYGWIN_DLL( DllMain );
5619 # #endif
5620 # HINSTANCE __hDllInstance_base;
5621 #
5622 # BOOL APIENTRY
5623 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5624 # {
5625 #   __hDllInstance_base = hInst;
5626 #   return TRUE;
5627 # }
5628 # /* ltdll.c ends here */
5629 ])# _LT_AC_FILE_LTDLL_C
5630
5631
5632 # _LT_AC_FILE_IMPGEN_C
5633 # --------------------
5634 AC_DEFUN([_LT_AC_FILE_IMPGEN_C],
5635 [# /* impgen.c starts here */
5636 # /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5637 #
5638 #  This file is part of GNU libtool.
5639 #
5640 #  This program is free software; you can redistribute it and/or modify
5641 #  it under the terms of the GNU General Public License as published by
5642 #  the Free Software Foundation; either version 2 of the License, or
5643 #  (at your option) any later version.
5644 #
5645 #  This program is distributed in the hope that it will be useful,
5646 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
5647 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5648 #  GNU General Public License for more details.
5649 #
5650 #  You should have received a copy of the GNU General Public License
5651 #  along with this program; if not, write to the Free Software
5652 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5653 #  */
5654 #
5655 # #include <stdio.h>            /* for printf() */
5656 # #include <unistd.h>           /* for open(), lseek(), read() */
5657 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
5658 # #include <string.h>           /* for strdup() */
5659 #
5660 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5661 # #ifndef O_BINARY
5662 # #define O_BINARY 0
5663 # #endif
5664 #
5665 # static unsigned int
5666 # pe_get16 (fd, offset)
5667 #      int fd;
5668 #      int offset;
5669 # {
5670 #   unsigned char b[2];
5671 #   lseek (fd, offset, SEEK_SET);
5672 #   read (fd, b, 2);
5673 #   return b[0] + (b[1]<<8);
5674 # }
5675 #
5676 # static unsigned int
5677 # pe_get32 (fd, offset)
5678 #     int fd;
5679 #     int offset;
5680 # {
5681 #   unsigned char b[4];
5682 #   lseek (fd, offset, SEEK_SET);
5683 #   read (fd, b, 4);
5684 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5685 # }
5686 #
5687 # static unsigned int
5688 # pe_as32 (ptr)
5689 #      void *ptr;
5690 # {
5691 #   unsigned char *b = ptr;
5692 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5693 # }
5694 #
5695 # int
5696 # main (argc, argv)
5697 #     int argc;
5698 #     char *argv[];
5699 # {
5700 #     int dll;
5701 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5702 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
5703 #     unsigned long name_rvas, nexp;
5704 #     unsigned char *expdata, *erva;
5705 #     char *filename, *dll_name;
5706 #
5707 #     filename = argv[1];
5708 #
5709 #     dll = open(filename, O_RDONLY|O_BINARY);
5710 #     if (dll < 1)
5711 #       return 1;
5712 #
5713 #     dll_name = filename;
5714 #
5715 #     for (i=0; filename[i]; i++)
5716 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5717 #           dll_name = filename + i +1;
5718 #
5719 #     pe_header_offset = pe_get32 (dll, 0x3c);
5720 #     opthdr_ofs = pe_header_offset + 4 + 20;
5721 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5722 #
5723 #     if (num_entries < 1) /* no exports */
5724 #       return 1;
5725 #
5726 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5727 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
5728 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5729 #     secptr = (pe_header_offset + 4 + 20 +
5730 #             pe_get16 (dll, pe_header_offset + 4 + 16));
5731 #
5732 #     expptr = 0;
5733 #     for (i = 0; i < nsections; i++)
5734 #     {
5735 #       char sname[8];
5736 #       unsigned long secptr1 = secptr + 40 * i;
5737 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5738 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5739 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5740 #       lseek(dll, secptr1, SEEK_SET);
5741 #       read(dll, sname, 8);
5742 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
5743 #       {
5744 #           expptr = fptr + (export_rva - vaddr);
5745 #           if (export_rva + export_size > vaddr + vsize)
5746 #               export_size = vsize - (export_rva - vaddr);
5747 #           break;
5748 #       }
5749 #     }
5750 #
5751 #     expdata = (unsigned char*)malloc(export_size);
5752 #     lseek (dll, expptr, SEEK_SET);
5753 #     read (dll, expdata, export_size);
5754 #     erva = expdata - export_rva;
5755 #
5756 #     nexp = pe_as32 (expdata+24);
5757 #     name_rvas = pe_as32 (expdata+32);
5758 #
5759 #     printf ("EXPORTS\n");
5760 #     for (i = 0; i<nexp; i++)
5761 #     {
5762 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5763 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5764 #     }
5765 #
5766 #     return 0;
5767 # }
5768 # /* impgen.c ends here */
5769 ])# _LT_AC_FILE_IMPGEN_C
5770
5771 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5772 # ---------------------------------
5773 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5774
5775
5776 # old names
5777 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
5778 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
5779 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
5780 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5781 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5782 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
5783 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
5784
5785 # This is just to silence aclocal about the macro not being used
5786 ifelse([AC_DISABLE_FAST_INSTALL])
5787
5788 AC_DEFUN([LT_AC_PROG_GCJ],
5789 [AC_CHECK_TOOL(GCJ, gcj, no)
5790   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5791   AC_SUBST(GCJFLAGS)
5792 ])
5793
5794 # serial 3
5795
5796 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
5797 # -------------------------------------
5798 # Define a conditional.
5799 #
5800 # FIXME: Once using 2.50, use this:
5801 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
5802 AC_DEFUN([AM_CONDITIONAL],
5803 [ifelse([$1], [TRUE],
5804         [errprint(__file__:__line__: [$0: invalid condition: $1
5805 ])dnl
5806 m4exit(1)])dnl
5807 ifelse([$1], [FALSE],
5808        [errprint(__file__:__line__: [$0: invalid condition: $1
5809 ])dnl
5810 m4exit(1)])dnl
5811 AC_SUBST([$1_TRUE])
5812 AC_SUBST([$1_FALSE])
5813 if $2; then
5814   $1_TRUE=
5815   $1_FALSE='#'
5816 else
5817   $1_TRUE='#'
5818   $1_FALSE=
5819 fi])
5820
5821 # Do all the work for Automake.  This macro actually does too much --
5822 # some checks are only needed if your package does certain things.
5823 # But this isn't really a big deal.
5824
5825 # serial 5
5826
5827 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5828 # written in clear, in which case automake, when reading aclocal.m4,
5829 # will think it sees a *use*, and therefore will trigger all it's
5830 # C support machinery.  Also note that it means that autoscan, seeing
5831 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5832
5833
5834 # We require 2.13 because we rely on SHELL being computed by configure.
5835 AC_PREREQ([2.13])
5836
5837 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5838 # -----------------------------------------------------------
5839 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
5840 # The purpose of this macro is to provide the user with a means to
5841 # check macros which are provided without letting her know how the
5842 # information is coded.
5843 # If this macro is not defined by Autoconf, define it here.
5844 ifdef([AC_PROVIDE_IFELSE],
5845       [],
5846       [define([AC_PROVIDE_IFELSE],
5847               [ifdef([AC_PROVIDE_$1],
5848                      [$2], [$3])])])
5849
5850
5851 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
5852 # ----------------------------------------------
5853 AC_DEFUN([AM_INIT_AUTOMAKE],
5854 [AC_REQUIRE([AC_PROG_INSTALL])dnl
5855 # test to see if srcdir already configured
5856 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
5857    test -f $srcdir/config.status; then
5858   AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
5859 fi
5860
5861 # Define the identity of the package.
5862 PACKAGE=$1
5863 AC_SUBST(PACKAGE)dnl
5864 VERSION=$2
5865 AC_SUBST(VERSION)dnl
5866 ifelse([$3],,
5867 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
5868 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
5869
5870 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
5871 # the ones we care about.
5872 ifdef([m4_pattern_allow],
5873       [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
5874
5875 # Some tools Automake needs.
5876 AC_REQUIRE([AM_SANITY_CHECK])dnl
5877 AC_REQUIRE([AC_ARG_PROGRAM])dnl
5878 AM_MISSING_PROG(ACLOCAL, aclocal)
5879 AM_MISSING_PROG(AUTOCONF, autoconf)
5880 AM_MISSING_PROG(AUTOMAKE, automake)
5881 AM_MISSING_PROG(AUTOHEADER, autoheader)
5882 AM_MISSING_PROG(MAKEINFO, makeinfo)
5883 AM_MISSING_PROG(AMTAR, tar)
5884 AM_MISSING_INSTALL_SH
5885 AM_PROG_INSTALL_STRIP
5886 # We need awk for the "check" target.  The system "awk" is bad on
5887 # some platforms.
5888 AC_REQUIRE([AC_PROG_AWK])dnl
5889 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5890 AC_REQUIRE([AM_DEP_TRACK])dnl
5891 AC_REQUIRE([AM_SET_DEPDIR])dnl
5892 AC_PROVIDE_IFELSE([AC_PROG_][CC],
5893                   [AM_DEPENDENCIES(CC)],
5894                   [define([AC_PROG_][CC],
5895                           defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
5896 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
5897                   [AM_DEPENDENCIES(CXX)],
5898                   [define([AC_PROG_][CXX],
5899                           defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
5900 ])
5901
5902 #
5903 # Check to make sure that the build environment is sane.
5904 #
5905
5906 # serial 3
5907
5908 # AM_SANITY_CHECK
5909 # ---------------
5910 AC_DEFUN([AM_SANITY_CHECK],
5911 [AC_MSG_CHECKING([whether build environment is sane])
5912 # Just in case
5913 sleep 1
5914 echo timestamp > conftest.file
5915 # Do `set' in a subshell so we don't clobber the current shell's
5916 # arguments.  Must try -L first in case configure is actually a
5917 # symlink; some systems play weird games with the mod time of symlinks
5918 # (eg FreeBSD returns the mod time of the symlink's containing
5919 # directory).
5920 if (
5921    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
5922    if test "$[*]" = "X"; then
5923       # -L didn't work.
5924       set X `ls -t $srcdir/configure conftest.file`
5925    fi
5926    rm -f conftest.file
5927    if test "$[*]" != "X $srcdir/configure conftest.file" \
5928       && test "$[*]" != "X conftest.file $srcdir/configure"; then
5929
5930       # If neither matched, then we have a broken ls.  This can happen
5931       # if, for instance, CONFIG_SHELL is bash and it inherits a
5932       # broken ls alias from the environment.  This has actually
5933       # happened.  Such a system could not be considered "sane".
5934       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
5935 alias in your environment])
5936    fi
5937
5938    test "$[2]" = conftest.file
5939    )
5940 then
5941    # Ok.
5942    :
5943 else
5944    AC_MSG_ERROR([newly created file is older than distributed files!
5945 Check your system clock])
5946 fi
5947 AC_MSG_RESULT(yes)])
5948
5949
5950 # serial 2
5951
5952 # AM_MISSING_PROG(NAME, PROGRAM)
5953 # ------------------------------
5954 AC_DEFUN([AM_MISSING_PROG],
5955 [AC_REQUIRE([AM_MISSING_HAS_RUN])
5956 $1=${$1-"${am_missing_run}$2"}
5957 AC_SUBST($1)])
5958
5959
5960 # AM_MISSING_INSTALL_SH
5961 # ---------------------
5962 # Like AM_MISSING_PROG, but only looks for install-sh.
5963 AC_DEFUN([AM_MISSING_INSTALL_SH],
5964 [AC_REQUIRE([AM_MISSING_HAS_RUN])
5965 if test -z "$install_sh"; then
5966    for install_sh in "$ac_aux_dir/install-sh" \
5967                      "$ac_aux_dir/install.sh" \
5968                      "${am_missing_run}${ac_auxdir}/install-sh";
5969    do
5970      test -f "$install_sh" && break
5971    done
5972    # FIXME: an evil hack: we remove the SHELL invocation from
5973    # install_sh because automake adds it back in.  Sigh.
5974    install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
5975 fi
5976 AC_SUBST(install_sh)])
5977
5978
5979 # AM_MISSING_HAS_RUN
5980 # ------------------
5981 # Define MISSING if not defined so far and test if it supports --run.
5982 # If it does, set am_missing_run to use it, otherwise, to nothing.
5983 AC_DEFUN([AM_MISSING_HAS_RUN],
5984 [test x"${MISSING+set}" = xset ||
5985   MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
5986 # Use eval to expand $SHELL
5987 if eval "$MISSING --run true"; then
5988   am_missing_run="$MISSING --run "
5989 else
5990   am_missing_run=
5991   am_backtick='`'
5992   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
5993 fi
5994 ])
5995
5996 # AM_AUX_DIR_EXPAND
5997
5998 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
5999 # $ac_aux_dir to ${srcdir}/foo.  In other projects, it is set to `.'.
6000 # Of course, Automake must honor this variable whenever it call a tool
6001 # from the auxiliary directory.  The problem is that $srcdir (hence
6002 # $ac_aux_dir) can be either an absolute path or a path relative to
6003 # $top_srcdir or absolute, this depends on how configure is run.  This
6004 # is pretty anoying since it makes $ac_aux_dir quite unusable in
6005 # subdirectories: on the top source directory, any form will work
6006 # fine, but in subdirectories relative pat needs to be adapted.
6007 # - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
6008 #   relative, but fail if $srcdir is absolute
6009 # - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
6010 #   absolute, and success on relative paths.
6011 #
6012 # Consequently, we define and use $am_aux_dir, the "always absolute"
6013 # version of $ac_aux_dir.
6014
6015 AC_DEFUN([AM_AUX_DIR_EXPAND], [
6016 # expand $ac_aux_dir to an absolute path
6017 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
6018 ])
6019
6020 # One issue with vendor `install' (even GNU) is that you can't
6021 # specify the program used to strip binaries.  This is especially
6022 # annoying in cross-compiling environments, where the build's strip
6023 # is unlikely to handle the host's binaries.
6024 # Fortunately install-sh will honor a STRIPPROG variable, so we
6025 # always use install-sh in `make install-strip', and initialize
6026 # STRIPPROG with the value of the STRIP variable (set by the user).
6027 AC_DEFUN([AM_PROG_INSTALL_STRIP],
6028 [AC_REQUIRE([AM_MISSING_INSTALL_SH])dnl
6029 _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
6030 INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
6031 AC_SUBST([INSTALL_STRIP_PROGRAM])])
6032
6033 # serial 4                                              -*- Autoconf -*-
6034
6035
6036
6037 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6038 # written in clear, in which case automake, when reading aclocal.m4,
6039 # will think it sees a *use*, and therefore will trigger all it's
6040 # C support machinery.  Also note that it means that autoscan, seeing
6041 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6042
6043
6044
6045 # AM_DEPENDENCIES(NAME)
6046 # ---------------------
6047 # See how the compiler implements dependency checking.
6048 # NAME is "CC", "CXX" or "OBJC".
6049 # We try a few techniques and use that to set a single cache variable.
6050 #
6051 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6052 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6053 # dependency, and given that the user is not expected to run this macro,
6054 # just rely on AC_PROG_CC.
6055 AC_DEFUN([AM_DEPENDENCIES],
6056 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6057 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6058 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6059 AC_REQUIRE([AM_DEP_TRACK])dnl
6060
6061 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6062        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6063        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
6064        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6065                    [depcc="$$1"   am_compiler_list=])
6066
6067 AC_CACHE_CHECK([dependency style of $depcc],
6068                [am_cv_$1_dependencies_compiler_type],
6069 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6070   # We make a subdir and do the tests there.  Otherwise we can end up
6071   # making bogus files that we don't know about and never remove.  For
6072   # instance it was reported that on HP-UX the gcc test will end up
6073   # making a dummy file named `D' -- because `-MD' means `put the output
6074   # in D'.
6075   mkdir conftest.dir
6076   # Copy depcomp to subdir because otherwise we won't find it if we're
6077   # using a relative directory.
6078   cp "$am_depcomp" conftest.dir
6079   cd conftest.dir
6080
6081   am_cv_$1_dependencies_compiler_type=none
6082   if test "$am_compiler_list" = ""; then
6083      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6084   fi
6085   for depmode in $am_compiler_list; do
6086     # We need to recreate these files for each test, as the compiler may
6087     # overwrite some of them when testing with obscure command lines.
6088     # This happens at least with the AIX C compiler.
6089     echo '#include "conftest.h"' > conftest.c
6090     echo 'int i;' > conftest.h
6091     echo 'include conftest.Po' > Makefile
6092
6093     case $depmode in
6094     nosideeffect)
6095       # after this tag, mechanisms are not by side-effect, so they'll
6096       # only be used when explicitly requested
6097       if test "x$enable_dependency_tracking" = xyes; then
6098         continue
6099       else
6100         break
6101       fi
6102       ;;
6103     none) break ;;
6104     esac
6105     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6106     # mode.  It turns out that the SunPro C++ compiler does not properly
6107     # handle `-M -o', and we need to detect this.
6108     if depmode=$depmode \
6109        source=conftest.c object=conftest.o \
6110        depfile=conftest.Po tmpdepfile=conftest.TPo \
6111        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
6112        grep conftest.h conftest.Po > /dev/null 2>&1 &&
6113        ${MAKE-make} > /dev/null 2>&1; then
6114       am_cv_$1_dependencies_compiler_type=$depmode
6115       break
6116     fi
6117   done
6118
6119   cd ..
6120   rm -rf conftest.dir
6121 else
6122   am_cv_$1_dependencies_compiler_type=none
6123 fi
6124 ])
6125 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
6126 AC_SUBST([$1DEPMODE])
6127 ])
6128
6129
6130 # AM_SET_DEPDIR
6131 # -------------
6132 # Choose a directory name for dependency files.
6133 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
6134 AC_DEFUN([AM_SET_DEPDIR],
6135 [if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
6136   DEPDIR=.deps
6137   # We redirect because .deps might already exist and be populated.
6138   # In this situation we don't want to see an error.
6139   rmdir .deps > /dev/null 2>&1
6140 else
6141   DEPDIR=_deps
6142 fi
6143 AC_SUBST(DEPDIR)
6144 ])
6145
6146
6147 # AM_DEP_TRACK
6148 # ------------
6149 AC_DEFUN([AM_DEP_TRACK],
6150 [AC_ARG_ENABLE(dependency-tracking,
6151 [  --disable-dependency-tracking Speeds up one-time builds
6152   --enable-dependency-tracking  Do not reject slow dependency extractors])
6153 if test "x$enable_dependency_tracking" != xno; then
6154   am_depcomp="$ac_aux_dir/depcomp"
6155   AMDEPBACKSLASH='\'
6156 fi
6157 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6158 pushdef([subst], defn([AC_SUBST]))
6159 subst(AMDEPBACKSLASH)
6160 popdef([subst])
6161 ])
6162
6163 # Generate code to set up dependency tracking.
6164 # This macro should only be invoked once -- use via AC_REQUIRE.
6165 # Usage:
6166 # AM_OUTPUT_DEPENDENCY_COMMANDS
6167
6168 #
6169 # This code is only required when automatic dependency tracking
6170 # is enabled.  FIXME.  This creates each `.P' file that we will
6171 # need in order to bootstrap the dependency handling code.
6172 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
6173 AC_OUTPUT_COMMANDS([
6174 test x"$AMDEP_TRUE" != x"" ||
6175 for mf in $CONFIG_FILES; do
6176   case "$mf" in
6177   Makefile) dirpart=.;;
6178   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
6179   *) continue;;
6180   esac
6181   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
6182   # Extract the definition of DEP_FILES from the Makefile without
6183   # running `make'.
6184   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6185   test -z "$DEPDIR" && continue
6186   # When using ansi2knr, U may be empty or an underscore; expand it
6187   U=`sed -n -e '/^U = / s///p' < "$mf"`
6188   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6189   # We invoke sed twice because it is the simplest approach to
6190   # changing $(DEPDIR) to its actual value in the expansion.
6191   for file in `sed -n -e '
6192     /^DEP_FILES = .*\\\\$/ {
6193       s/^DEP_FILES = //
6194       :loop
6195         s/\\\\$//
6196         p
6197         n
6198         /\\\\$/ b loop
6199       p
6200     }
6201     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
6202        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6203     # Make sure the directory exists.
6204     test -f "$dirpart/$file" && continue
6205     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
6206     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
6207     # echo "creating $dirpart/$file"
6208     echo '# dummy' > "$dirpart/$file"
6209   done
6210 done
6211 ], [AMDEP_TRUE="$AMDEP_TRUE"
6212 ac_aux_dir="$ac_aux_dir"])])
6213
6214 # AM_MAKE_INCLUDE()
6215 # -----------------
6216 # Check to see how make treats includes.
6217 AC_DEFUN([AM_MAKE_INCLUDE],
6218 [am_make=${MAKE-make}
6219 cat > confinc << 'END'
6220 doit:
6221         @echo done
6222 END
6223 # If we don't find an include directive, just comment out the code.
6224 AC_MSG_CHECKING([for style of include used by $am_make])
6225 _am_include='#'
6226 _am_quote=
6227 _am_result=none
6228 # First try GNU make style include.
6229 echo "include confinc" > confmf
6230 # We grep out `Entering directory' and `Leaving directory'
6231 # messages which can occur if `w' ends up in MAKEFLAGS.
6232 # In particular we don't look at `^make:' because GNU make might
6233 # be invoked under some other name (usually "gmake"), in which
6234 # case it prints its new name instead of `make'.
6235 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
6236    _am_include=include
6237    _am_quote=
6238    _am_result=GNU
6239 fi
6240 # Now try BSD make style include.
6241 if test "$_am_include" = "#"; then
6242    echo '.include "confinc"' > confmf
6243    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6244       _am_include=.include
6245       _am_quote='"'
6246       _am_result=BSD
6247    fi
6248 fi
6249 AC_SUBST(_am_include)
6250 AC_SUBST(_am_quote)
6251 AC_MSG_RESULT($_am_result)
6252 rm -f confinc confmf
6253 ])
6254
6255 # Like AC_CONFIG_HEADER, but automatically create stamp file.
6256
6257 # serial 3
6258
6259 # When config.status generates a header, we must update the stamp-h file.
6260 # This file resides in the same directory as the config header
6261 # that is generated.  We must strip everything past the first ":",
6262 # and everything past the last "/".
6263
6264 AC_PREREQ([2.12])
6265
6266 AC_DEFUN([AM_CONFIG_HEADER],
6267 [AC_CONFIG_HEADER([$1])
6268   AC_OUTPUT_COMMANDS(
6269    ifelse(patsubst([$1], [[^ ]], []),
6270           [],
6271           [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
6272            patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),
6273   [am_indx=1
6274   for am_file in $1; do
6275     case " $CONFIG_HEADERS " in
6276     *" $am_file "*)
6277       echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
6278       ;;
6279     esac
6280     am_indx=\`expr \$am_indx + 1\`
6281   done])
6282 ])
6283
6284
6285 # serial 1
6286
6287 AC_DEFUN([AM_WITH_DMALLOC],
6288 [AC_MSG_CHECKING([if malloc debugging is wanted])
6289 AC_ARG_WITH(dmalloc,
6290 [  --with-dmalloc          use dmalloc, as in
6291                           http://www.dmalloc.com/dmalloc.tar.gz],
6292 [if test "$withval" = yes; then
6293   AC_MSG_RESULT(yes)
6294   AC_DEFINE(WITH_DMALLOC,1,
6295             [Define if using the dmalloc debugging malloc package])
6296   LIBS="$LIBS -ldmalloc"
6297   LDFLAGS="$LDFLAGS -g"
6298 else
6299   AC_MSG_RESULT(no)
6300 fi], [AC_MSG_RESULT(no)])
6301 ])
6302