3 # This macro checks for fftw header files and libraries,
4 # including the possible prefixing with s or d to determine precision.
5 # Arg 1 is the fftw header/library name to check for, without
6 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
7 # Arg 2 is the size of the real variable used.
8 AC_DEFUN(ACX_CHECK_FFTW,
10 if test -z "$ac_fftw_firstname"; then
13 if test $sizeof_real = 8; then
23 # check header doesn't work, since we must use mpicc to get includes,
25 AC_MSG_CHECKING([for $1.h])
26 AC_TRY_COMPILE([#include <$1.h>],,
34 if test -n "$fftwname"; then
35 # we cannot run the code since an MPI program might not be allowed
36 # on a login node of a supercomputer
37 AC_TRY_COMPILE([#include <$fftwname.h>],
38 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
44 if test "$ok" != "yes"; then
45 xfftwname=${fftwcheckprefix}${fftwname}
46 AC_MSG_CHECKING([for $xfftwname.h])
47 AC_TRY_COMPILE([#include <$xfftwname.h>],,AC_MSG_RESULT(yes),
50 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
51 [Do you have $prec precision FFTW installed? If you are using packages,]
52 [note that you also need fftw-devel to compile GROMACS. You can find the ]
53 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
54 [If you compiled FFTW yourself: ]
55 [Note that the default FFTW setup is double precision. Change the FFTW]
56 [configuration to single with --enable-float. If you want MPI support,]
57 [use --enable-mpi. It is a good idea to install both single & double.]
58 [If your sysadm doesn't want to install it you can do it to a location]
59 [in your home directory and provide the correct paths in the CPPFLAGS]
60 [and LDFLAGS environment variables before running configure.]
61 [That is also necessary to do if your compiler doesn't search]
62 [/usr/local/include and /usr/local/lib by default.]
63 [You can find information at www.gromacs.org, or in the INSTALL file.])
65 AC_TRY_COMPILE([#include <$xfftwname.h>],
66 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
69 usedprefix=$fftwcheckprefix
72 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
73 [Do you have $prec precision FFTW installed? If you are using packages,]
74 [note that you also need fftw-devel to compile GROMACS. You can find the ]
75 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
76 [If you compiled FFTW yourself: ]
77 [Note that the default FFTW setup is double precision. Change the FFTW]
78 [configuration to single with --enable-float. If you want MPI support,]
79 [use --enable-mpi. It is a good idea to install both single & double.]
80 [If your sysadm doesn't want to install it you can do it to a location]
81 [in your home directory and provide the correct paths in the CPPFLAGS]
82 [and LDFLAGS environment variables before running configure.]
83 [That is also necessary to do if your compiler doesn't search]
84 [/usr/local/include and /usr/local/lib by default.]
85 [You can find information at www.gromacs.org, or in the INSTALL file.])])
88 AC_CHECK_LIB($fftwname,main,,
89 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
90 ac_fftw_savedprefix=$usedprefix
91 ac_fftw_firstname=$fftwname
95 fftwname=${ac_fftw_savedprefix}$1
96 AC_MSG_CHECKING([for $fftwname.h])
98 [#include <$fftwname.h>],,
100 LIBS="-l$fftwname $LIBS"
101 AC_TRY_LINK_FUNC([main],,,
102 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
105 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your
106 fftw prefixes match - we already use $ac_fftw_firstname.h])
118 dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
119 dnl to easily use them in a Makefile.
121 dnl Adapted from a macro by Andreas Zeller.
123 dnl The variables provided are :
124 dnl link_motif (e.g. -L/usr/lesstif/lib -lXm -lXt)
125 dnl include_motif (e.g. -I/usr/lesstif/lib)
126 dnl motif_libraries (e.g. /usr/lesstif/lib)
127 dnl motif_includes (e.g. /usr/lesstif/include)
129 dnl The link_motif and include_motif variables should be fit to put on
130 dnl your application's link line in your Makefile.
132 AC_DEFUN(AC_FIND_MOTIF,
134 AC_REQUIRE([AC_PATH_XTRA])
139 dnl AC_ARG_WITH(motif,
140 dnl [ --without-motif do not use Motif widgets])
141 dnl Treat --without-motif like
142 dnl --without-motif-includes --without-motif-libraries.
144 if test "$no_x" = "yes"
150 AC_ARG_WITH(motif-includes,
151 [ --with-motif-includes=DIR Motif include files are in DIR],
152 motif_includes="$withval")
154 AC_ARG_WITH(motif-libraries,
155 [ --with-motif-libraries=DIR Motif libraries are in DIR],
156 motif_libraries="$withval")
159 AC_MSG_CHECKING(for Motif)
163 # Search the include files.
165 if test "$motif_includes" = ""; then
166 AC_CACHE_VAL(ac_cv_motif_includes,
168 ac_motif_save_LIBS="$LIBS"
169 ac_motif_save_INCLUDES="$INCLUDES"
170 ac_motif_save_CPPFLAGS="$CPPFLAGS"
171 ac_motif_save_LDFLAGS="$LDFLAGS"
173 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
174 INCLUDES="$X_CFLAGS $INCLUDES"
175 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
176 LDFLAGS="$X_LIBS $LDFLAGS"
178 ac_cv_motif_includes="no"
179 AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
181 # Xm/Xm.h is in the standard search path.
182 ac_cv_motif_includes=
185 # Xm/Xm.h is not in the standard search path.
186 # Locate it and put its directory in `motif_includes'
188 # /usr/include/Motif* are used on HP-UX (Motif).
189 # /usr/include/X11* are used on HP-UX (X and Athena).
190 # /usr/dt is used on Solaris (Motif).
191 # /usr/openwin is used on Solaris (X and Athena).
192 # Other directories are just guesses.
193 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
194 /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
195 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
196 /usr/dt/include /usr/openwin/include \
197 /usr/dt/*/include /opt/*/include /usr/include/Motif* \
198 "${prefix}"/*/include /usr/*/include /usr/local/*/include \
199 "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
200 if test -f "$dir/Xm/Xm.h"; then
201 ac_cv_motif_includes="$dir"
207 LIBS="$ac_motif_save_LIBS"
208 INCLUDES="$ac_motif_save_INCLUDES"
209 CPPFLAGS="$ac_motif_save_CPPFLAGS"
210 LDFLAGS="$ac_motif_save_LDFLAGS"
212 motif_includes="$ac_cv_motif_includes"
216 # Now for the libraries.
218 if test "$motif_libraries" = ""; then
219 AC_CACHE_VAL(ac_cv_motif_libraries,
221 ac_motif_save_LIBS="$LIBS"
222 ac_motif_save_INCLUDES="$INCLUDES"
223 ac_motif_save_CPPFLAGS="$CPPFLAGS"
224 ac_motif_save_LDFLAGS="$LDFLAGS"
226 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
227 INCLUDES="$X_CFLAGS $INCLUDES"
228 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
229 LDFLAGS="$X_LIBS $LDFLAGS"
231 ac_cv_motif_libraries="no"
232 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
234 # libXm.a is in the standard search path.
235 ac_cv_motif_libraries=
238 # libXm.a is not in the standard search path.
239 # Locate it and put its directory in `motif_libraries'
241 # /usr/lib/Motif* are used on HP-UX (Motif).
242 # /usr/lib/X11* are used on HP-UX (X and Athena).
243 # /usr/dt is used on Solaris (Motif).
244 # /usr/lesstif is used on Linux (Lesstif).
245 # /usr/openwin is used on Solaris (X and Athena).
246 # Other directories are just guesses.
247 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
248 /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
249 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
250 /usr/dt/lib /usr/openwin/lib \
251 /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
252 /usr/lesstif*/lib /usr/lib/Lesstif* \
253 "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
254 "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
255 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
256 ac_cv_motif_libraries="$dir"
262 LIBS="$ac_motif_save_LIBS"
263 INCLUDES="$ac_motif_save_INCLUDES"
264 CPPFLAGS="$ac_motif_save_CPPFLAGS"
265 LDFLAGS="$ac_motif_save_LDFLAGS"
268 motif_libraries="$ac_cv_motif_libraries"
271 # Provide an easier way to link
273 if test "$motif_includes" = "no" -o "$motif_libraries" = "no"; then
279 if test "$with_motif" != "no"; then
280 if test "$motif_libraries" = ""; then
281 link_motif="-lXm -lXt"
282 MOTIF_LIBS="-lXm -lXt"
284 link_motif="-L$motif_libraries -lXm -lXt"
285 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
287 if test "$motif_includes" != ""; then
288 include_motif="-I$motif_includes"
289 MOTIF_INCLUDES="-I$motif_includes"
291 LIBS="$LIBS $MOTIF_LIBS"
292 INCLUDES="$INCLUDES $MOTIF_INCLUDES"
293 AC_DEFINE(HAVE_MOTIF,,[Use motif/lesstif libraries])
301 motif_libraries_result="$motif_libraries"
302 motif_includes_result="$motif_includes"
303 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
304 test "$motif_includes_result" = "" && motif_includes_result="in default path"
305 test "$motif_libraries_result" = "no" && motif_libraries_result="(none)"
306 test "$motif_includes_result" = "no" && motif_includes_result="(none)"
308 [libraries $motif_libraries_result, headers $motif_includes_result])
312 dnl macro modified from the fftw distribution (www.fftw.org)
313 AC_DEFUN(ACX_CHECK_CC_FLAGS,
315 AC_REQUIRE([AC_PROG_CC])
316 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
317 [echo 'void f(){}' > conftest.c
318 if test -z "`$CC $1 -c conftest.c 2>&1`"; then
325 if test "$ac_$2" = yes; then
334 dnl macro modified from the fftw distribution (www.fftw.org)
335 AC_DEFUN(ACX_CHECK_F77_FLAGS,
337 AC_REQUIRE([AC_PROG_F77])
338 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
339 [cat > conftest.f << EOF
344 if test -z "`$F77 $1 -c conftest.f `"; then
351 if test "$ac_$2" = yes; then
362 # ---------------------------
363 # Macro to extend the exact CPU for some hosts
364 AC_DEFUN(ACX_DETECT_GMXCPU,
366 AC_REQUIRE([AC_CANONICAL_HOST])
369 # Determine the exact cpu type on some common systems where it is
370 # not visible from the host triplet.
371 # (on e.g. intel and dec/tru64 the host type is enough)
373 case "${host_cpu}-${host_os}" in
376 # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
377 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
378 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
380 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
382 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
390 if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
392 elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
394 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
396 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
398 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
406 if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
408 elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
410 elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
412 elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
420 if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
422 elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
424 elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
426 elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
441 ###############################################################
442 # Macro modified from the fftw distribution (www.fftw.org)
443 # to determine optimization flags.
444 # Note that we have modified config.guess and config.sub
445 # to provide extended information on the detailed type of CPU.
446 # In general we assume you have recent versions of the compilers
447 # that support the highest optimization we know of. If not, you
448 # can always override these flags, but it's better to upgrade :-)
449 ###############################################################
450 AC_DEFUN(ACX_COMPILER_MAXOPT,
452 AC_REQUIRE([AC_PROG_CC])
453 AC_REQUIRE([AC_PROG_F77])
454 AC_REQUIRE([AC_CANONICAL_HOST])
456 # Try to determine "good" native compiler flags if none specified on command
457 # line. To avoid repeating the entire procedure for fortran flags, we first
458 # determine our suggested choices for both C and fortran, and then possibly
459 # override them with user choices.
463 case "${host_cpu}-${host_os}" in
468 xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
472 xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
476 xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
480 xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
484 xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
491 xCFLAGS="-Ae +O3 +Oall"
493 # If you haven't noticed, we don't like hp very much...
494 # but perhaps that will change if they make something nice out of ia64.
498 # The GNU compilers are checked outside this case statement.
499 # 1. Check for the SGI compilers. Actually, they report the are GNU C,
500 # so this check isn't used right now, but we want to identify them
501 # even if they change this later.
502 if ($CC -v 2>&1 | grep SGI > /dev/null); then
506 if ($F77 -v 2>&1 | grep SGI > /dev/null); then
509 # PORTME 2. Check for intel compilers when we get our hands on one!
512 # dont use inter-procedure analysis for the innerloops - they take
513 # forever to compile with it, and it doesnt help at all.
516 xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
517 xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
520 xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
521 xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
524 xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
525 xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
528 xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
529 xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
532 # I don't think people are using anything older than power2, so we tune for
533 # pwr, but dont set the arch since it is nice to have common binaries
534 # that run also on powerpc.
535 xCFLAGS="-O3 -qtune=pwr -qmaxmem=16384"
536 xFFLAGS="-O3 -Q -qtune=pwr -qmaxmem=16384 -qhot"
544 xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
545 xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
548 xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
549 xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
552 xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
553 xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
556 xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
557 xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
560 xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
561 xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
564 xCFLAGS="-O3 -qmaxmem=16384"
565 xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
571 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"
572 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"
574 if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
575 xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
576 xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
579 if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
580 xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms"
581 xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms"
583 LDFLAGS="$LDFLAGS -woff 84"
587 xCFLAGS="-n32 -r12000 -mips4 $xCFLAGS"
588 xFFLAGS="-n32 -r12000 -mips4 $xFFLAGS"
589 xLDFLAGS="-n32 -r12000 -mips4"
592 xCFLAGS="-n32 -r10000 -mips4 $xCFLAGS"
593 xFFLAGS="-n32 -r10000 -mips4 $xFFLAGS"
594 xLDFLAGS="-n32 -r10000 -mips4"
597 xCFLAGS="-n32 -r8000 -mips4 $xCFLAGS"
598 xFFLAGS="-n32 -r8000 -mips4 $xFFLAGS"
599 xLDFLAGS="-n32 -r8000 -mips4"
602 xCFLAGS="-n32 -r5000 -mips4 $xCFLAGS"
603 xFFLAGS="-n32 -r5000 -mips4 $xFFLAGS"
604 xLDFLAGS="-n32 -r5000 -mips4"
607 xCFLAGS="-n32 $xCFLAGS"
608 xFFLAGS="-n32 $xFFLAGS"
615 # NB: -arch implies -tune according to the cc manual.
616 # We dont use -ifo since it conflicts with dependency
617 # generation on old versions of the compiler.
618 case "${host_cpu}" in
620 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
621 evtype=`echo ${host_cpu} | sed 's/alpha//'`
622 xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
623 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
624 xASFLAGS="-O4 -no_ifo -arch $evtype"
628 xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
629 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
630 xASFLAGS="-O4 -no_ifo -arch host"
637 case "${host_cpu}" in
639 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
640 evtype=`echo ${host_cpu} | sed 's/alpha//'`
641 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
642 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
643 tmpASFLAGS="-O4 -no_ifo -arch $evtype"
647 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
648 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
649 tmpASFLAGS="-O4 -no_ifo -arch host"
653 # Compaq sometimes uses -version and sometimes -V
654 # Not 100% sure if ccc always has -V and F77 -version, so
655 # we check both alternatives to be sure.
656 if (($CC -V 2>&1 | grep ompaq > /dev/null) ||
657 ($CC -version 2>&1 | grep ompaq > /dev/null)); then
659 xASFLAGS="$tmpASFLAGS"
662 if test "$enable_fortran" = "yes"; then
663 if (($F77 -V 2>&1 | grep ompaq > /dev/null) ||
664 ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
671 # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
672 # further down, but we can at least check if the Portland compilers are used:
673 if $CC -V 2> /dev/null | grep ortland > /dev/null 2>&1; then
674 case "${host_cpu}" in
682 xCFLAGS="$pgiopt -fast -pc 32"
685 if test "$enable_fortran" = "yes"; then
686 if $F77 -version 2> /dev/null | grep Portland > /dev/null 2>&1; then
692 # Phew, end of all those operating systems and processors!
694 # use default flags for gcc/g77 on all systems, but catch the SGI/ia64 sgicc
695 if test $ac_cv_prog_gcc = yes; then
696 if ($CC -v 2>&1 | grep SGI > /dev/null); then
700 xCFLAGS="-O6 -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
701 # the portland compiler only knows .s files, and always runs them
702 # through cpp. We support this by telling gcc to preprocess .s files.
703 xASFLAGS="$xCFLAGS -x assembler-with-cpp"
704 # -malign-double for x86 systems
705 ACX_CHECK_CC_FLAGS(-malign-double,align_double,xCFLAGS="$xCFLAGS -malign-double")
709 if test $enable_fortran = yes; then
710 if test $ac_cv_prog_g77 = yes; then
711 if ($F77 -v 2>&1 | grep SGI > /dev/null); then
714 xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
715 # -malign-double for f77 on x86 systems - haven't checked that this works yet.
716 #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
723 if test "$GCC" = "yes"; then
724 # try to guess correct CPU flags, at least for powerpc linux
725 case "${host_cpu}" in
726 # i586/i686 cpu flags don't improve speed, thus no need to use them.
727 # don't check f77 separately - we assume f77 and gcc are similar
729 cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
730 is60x=`echo $cputype | egrep "^60[0-9]e?$"`
731 if test -n "$is60x"; then
732 ACX_CHECK_CC_FLAGS(-mcpu=$cputype,m_cpu_60x,CPU_FLAGS=-mcpu=$cputype)
733 elif test "$cputype" = 750; then
734 ACX_CHECK_CC_FLAGS(-mcpu=750,m_cpu_750,CPU_FLAGS=-mcpu=750)
736 if test -z "$CPU_FLAGS"; then
737 ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS=-mcpu=powerpc)
739 if test -z "$CPU_FLAGS"; then
740 ACX_CHECK_CC_FLAGS(-mpowerpc,m_powerpc,CPU_FLAGS=-mpowerpc)
744 AM_CONDITIONAL(GNU_CC,false)
747 if test -n "$CPU_FLAGS"; then
748 xCFLAGS="$xCFLAGS $CPU_FLAGS"
749 xFFLAGS="$xFFLAGS $CPU_FLAGS"
750 xASFLAGS="$xASFLAGS $CPU_FLAGS"
753 # Now check if the user provided anything special for C or fortran...
754 # Not nice to have checked everything then, but otherwise we would have
755 # to use entirely separate checks for C and fortran flags, doubling the code.
756 if test "$ac_test_CFLAGS" != "set"; then
758 # Use the extra link optimization flags on e.g. irix only when
759 # we are using our own C compiler flags
760 LDFLAGS="$LDFLAGS $xLDFLAGS"
762 if test -z "$CFLAGS"; then
763 echo "********************************************************************"
764 echo "* Note: We have not optimized the C compiler flags on your target *"
765 echo "* yet, but the default CFLAGS=-O3 should be OK in most cases. *"
766 echo "* You can override this by setting the CFLAGS environment variable.*"
767 echo "*******************************************************************"
770 ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
771 echo "*******************************************************************"
772 echo "* Sorry, these optimization settings don't seem to work for *"
773 echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
774 echo "*******************************************************************"
778 echo "******************************************"
779 echo "* Using CFLAGS from environment variable *"
780 echo "******************************************"
783 if test "$enable_fortran" = "yes"; then
784 if test "$ac_test_FFLAGS" != "set"; then
786 if test -z "$FFLAGS"; then
787 echo "********************************************************************"
788 echo "* Note: We have not optimized the Fortran compiler flags on your *"
789 echo "* target, but the default FFLAGS=-O3 should be OK in most cases. *"
790 echo "* You can override this by setting the CFLAGS environment variable.*"
791 echo "********************************************************************"
794 ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
795 echo "*******************************************************************"
796 echo "* Sorry, these optimization settings don't seem to work for *"
797 echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
798 echo "*******************************************************************"
802 echo "******************************************"
803 echo "* Using FFLAGS from environment variable *"
804 echo "******************************************"
807 # Be silent for assembly flags, they are usually not important anyway
808 if test "${ASFLAGS+set}" != set; then
809 if test "${xASFLAGS+set}" != set; then
820 # Below, we include our patched version of libtool.m4, from
821 # the libtool-1.4b beta distribution.
822 # See admin/README.patches for a list of changes!
823 ##################################################################
824 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
825 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
826 ## Free Software Foundation, Inc.
827 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
829 ## This program is free software; you can redistribute it and/or modify
830 ## it under the terms of the GNU General Public License as published by
831 ## the Free Software Foundation; either version 2 of the License, or
832 ## (at your option) any later version.
834 ## This program is distributed in the hope that it will be useful, but
835 ## WITHOUT ANY WARRANTY; without even the implied warranty of
836 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
837 ## General Public License for more details.
839 ## You should have received a copy of the GNU General Public License
840 ## along with this program; if not, write to the Free Software
841 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
843 ## As a special exception to the GNU General Public License, if you
844 ## distribute this file as part of a program that contains a
845 ## configuration script generated by Autoconf, you may include it under
846 ## the same distribution terms that you use for the rest of that program.
848 # serial 47 AC_PROG_LIBTOOL
850 builtin([undefine],[symbols])
854 AC_DEFUN([AC_PROG_LIBTOOL],
855 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
856 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
857 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
858 AC_PROVIDE_IFELSE([AC_PROG_CXX],
860 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
862 dnl And a similar setup for Fortran 77 support
863 AC_PROVIDE_IFELSE([AC_PROG_F77],
865 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
869 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
870 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
871 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
872 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
874 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
876 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
878 [ifdef([AC_PROG_GCJ],
879 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880 ifdef([A][M_PROG_GCJ],
881 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
882 ifdef([LT_AC_PROG_GCJ],
883 [define([LT_AC_PROG_GCJ],
884 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
885 ])])# AC_PROG_LIBTOOL
890 AC_DEFUN([_AC_PROG_LIBTOOL],
891 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
892 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
893 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
894 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
896 # This can be used to rebuild libtool when needed
897 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
899 # Always use our own libtool.
900 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
903 # Prevent multiple expansion
904 define([AC_PROG_LIBTOOL], [])
910 AC_DEFUN([AC_LIBTOOL_SETUP],
912 AC_REQUIRE([AC_ENABLE_SHARED])dnl
913 AC_REQUIRE([AC_ENABLE_STATIC])dnl
914 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
915 AC_REQUIRE([AC_CANONICAL_HOST])dnl
916 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
917 AC_REQUIRE([AC_PROG_CC])dnl
918 AC_REQUIRE([AC_PROG_LD])dnl
919 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
920 AC_REQUIRE([AC_PROG_NM])dnl
921 AC_REQUIRE([AC_PROG_LN_S])dnl
922 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
923 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
924 AC_REQUIRE([AC_OBJEXT])dnl
925 AC_REQUIRE([AC_EXEEXT])dnl
928 AC_LIBTOOL_SYS_MAX_CMD_LEN
929 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
932 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
933 _LT_AC_PROG_ECHO_BACKSLASH
937 # AIX sometimes has problems with the GCC collect2 program. For some
938 # reason, if we set the COLLECT_NAMES environment variable, the problems
939 # vanish in a puff of smoke.
940 if test "X${COLLECT_NAMES+set}" != Xset; then
947 # Sed substitution that helps us do robust quoting. It backslashifies
948 # metacharacters that are still active within double-quoted strings.
950 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
952 # Same as above, but do not quote variable references.
953 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
955 # Sed substitution to delay expansion of an escaped shell variable in a
956 # double_quote_subst'ed string.
957 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
959 # Sed substitution to avoid accidental globbing in evaled expressions
960 no_glob_subst='s/\*/\\\*/g'
966 default_ofile=libtool
969 # All known linkers require a `.a' archive for static linking (except M$VC,
970 # which needs '.lib').
972 ltmain="$ac_aux_dir/ltmain.sh"
973 ofile="$default_ofile"
974 with_gnu_ld="$lt_cv_prog_gnu_ld"
976 AC_CHECK_TOOL(RANLIB, ranlib, :)
977 AC_CHECK_TOOL(STRIP, strip, :)
982 # Set sane defaults for various variables
983 test -z "$AR" && AR=ar
984 test -z "$AR_FLAGS" && AR_FLAGS=cru
985 test -z "$AS" && AS=as
986 test -z "$CC" && CC=cc
987 test -z "$LTCC" && LTCC=$CC
988 test -z "$DLLTOOL" && DLLTOOL=dlltool
989 test -z "$LD" && LD=ld
990 test -z "$LN_S" && LN_S="ln -s"
991 test -z "$MAGIC_CMD" && MAGIC_CMD=file
992 test -z "$NM" && NM=nm
993 test -z "$OBJDUMP" && OBJDUMP=objdump
994 test -z "$RANLIB" && RANLIB=:
995 test -z "$STRIP" && STRIP=:
996 test -z "$ac_objext" && ac_objext=o
998 # Determine commands to create old-style static archives.
999 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1000 old_postinstall_cmds='chmod 644 $oldlib'
1001 old_postuninstall_cmds=
1003 if test -n "$RANLIB"; then
1004 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1005 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1008 # Only perform the check for file, if the check method requires it
1009 case $deplibs_check_method in
1011 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1017 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1018 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1019 enable_win32_dll=yes, enable_win32_dll=no)
1021 AC_ARG_ENABLE(libtool-lock,
1022 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1023 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1026 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1027 pic_mode="$withval", pic_mode=default)
1028 test -z "$pic_mode" && pic_mode=default
1030 # Use C for the default configuration in the libtool script
1032 AC_LIBTOOL_LANG_C_CONFIG
1034 ])# AC_LIBTOOL_SETUP
1037 # _LT_AC_SYS_COMPILER
1038 # -------------------
1039 AC_DEFUN([_LT_AC_SYS_COMPILER],
1040 [AC_REQUIRE([AC_PROG_CC])dnl
1042 # If no C compiler was specified, use CC.
1045 # Allow CC to be a program name with arguments.
1048 ])# _LT_AC_SYS_COMPILER
1051 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1052 # ---------------------------------
1053 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1054 [# Find the correct PATH separator. Usually this is `:', but
1055 # DJGPP uses `;' like DOS.
1056 if test "X${PATH_SEPARATOR+set}" != Xset; then
1057 UNAME=${UNAME-`uname 2>/dev/null`}
1059 *-DOS) PATH_SEPARATOR=';' ;;
1060 *) PATH_SEPARATOR=':' ;;
1063 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1066 # _LT_AC_PROG_ECHO_BACKSLASH
1067 # --------------------------
1068 # Add some code to the start of the generated configure script which
1069 # will find an echo command which doesn't interpret backslashes.
1070 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1071 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1072 [AC_DIVERT_PUSH(NOTICE)])
1073 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1075 # Check that we are running under the correct shell.
1076 SHELL=${CONFIG_SHELL-/bin/sh}
1080 # Remove one level of quotation (which was required for Make).
1081 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1086 if test "X[$]1" = X--no-reexec; then
1087 # Discard the --no-reexec flag, and continue.
1089 elif test "X[$]1" = X--fallback-echo; then
1090 # Avoid inline document here, it may be left over
1092 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1093 # Yippee, $echo works!
1096 # Restart under the correct shell.
1097 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1100 if test "X[$]1" = X--fallback-echo; then
1101 # used as fallback echo
1109 # The HP-UX ksh and POSIX shell print the target directory to stdout
1111 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1113 if test -z "$ECHO"; then
1114 if test "X${echo_test_string+set}" != Xset; then
1115 # find a string as large as possible, as long as the shell can cope with it
1116 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1117 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1118 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1119 echo_test_string="`eval $cmd`" &&
1120 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1127 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1128 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1129 test "X$echo_testing_string" = "X$echo_test_string"; then
1132 # The Solaris, AIX, and Digital Unix default echo programs unquote
1133 # backslashes. This makes it impossible to quote backslashes using
1134 # echo "$something" | sed 's/\\/\\\\/g'
1136 # So, first we look for a working echo in the user's PATH.
1138 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1139 for dir in $PATH /usr/ucb; do
1141 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1142 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1143 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1144 test "X$echo_testing_string" = "X$echo_test_string"; then
1151 if test "X$echo" = Xecho; then
1152 # We didn't find a better echo, so look for alternatives.
1153 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1154 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1155 test "X$echo_testing_string" = "X$echo_test_string"; then
1156 # This shell has a builtin print -r that does the trick.
1158 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1159 test "X$CONFIG_SHELL" != X/bin/ksh; then
1160 # If we have ksh, try running configure again with it.
1161 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1162 export ORIGINAL_CONFIG_SHELL
1163 CONFIG_SHELL=/bin/ksh
1165 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1169 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1170 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1171 test "X$echo_testing_string" = "X$echo_test_string"; then
1172 # Cool, printf works
1174 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1175 test "X$echo_testing_string" = 'X\t' &&
1176 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1177 test "X$echo_testing_string" = "X$echo_test_string"; then
1178 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1180 SHELL="$CONFIG_SHELL"
1182 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1183 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1184 test "X$echo_testing_string" = 'X\t' &&
1185 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1186 test "X$echo_testing_string" = "X$echo_test_string"; then
1187 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1189 # maybe with a smaller string...
1192 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1193 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1200 if test "$prev" != 'sed 50q "[$]0"'; then
1201 echo_test_string=`eval $prev`
1202 export echo_test_string
1203 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1205 # Oops. We lost completely, so just stick with echo.
1214 # Copy echo and quote the copy suitably for passing to libtool from
1215 # the Makefile, instead of quoting the original, which is used later.
1217 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1218 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1223 ])# _LT_AC_PROG_ECHO_BACKSLASH
1228 AC_DEFUN([_LT_AC_LOCK],
1229 [AC_ARG_ENABLE(libtool-lock,
1230 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1231 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233 # Some flags need to be propagated to the compiler or linker for good
1237 # Find out which ABI we are using.
1238 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1239 if AC_TRY_EVAL(ac_compile); then
1240 case `/usr/bin/file conftest.$ac_objext` in
1256 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1257 SAVE_CFLAGS="$CFLAGS"
1258 CFLAGS="$CFLAGS -belf"
1259 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1261 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1263 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1264 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1265 CFLAGS="$SAVE_CFLAGS"
1268 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1269 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1270 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1271 AC_CHECK_TOOL(AS, as, false)
1272 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1274 # recent cygwin and mingw systems supply a stub DllMain which the user
1275 # can override, but on older systems we have to supply one
1276 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1278 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1279 DllMain (0, 0, 0);],
1280 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1283 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1284 # old mingw systems require "-dll" to link a DLL, while more recent ones
1286 SAVE_CFLAGS="$CFLAGS"
1287 CFLAGS="$CFLAGS -mdll"
1288 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1289 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1290 CFLAGS="$SAVE_CFLAGS" ;;
1291 *-*-cygwin* | *-*-pw32*)
1292 # cygwin systems need to pass --dll to the linker, and not link
1293 # crt.o which will require a WinMain@16 definition.
1294 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1300 need_locks="$enable_libtool_lock"
1305 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1306 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1307 # ----------------------------------------------------------------
1308 # Check whether the given compiler option works
1309 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1310 [AC_CACHE_CHECK([$1], [$2],
1312 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1313 save_CFLAGS="$CFLAGS"
1315 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1316 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
1317 # The compiler can only warn and ignore the option if not recognized
1318 # So say no if there are warnings
1319 if test -s conftest.err; then
1320 # Append any errors to the config.log.
1321 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1327 CFLAGS="$save_CFLAGS"
1330 if test x"[$]$2" = xyes; then
1331 ifelse([$5], , :, [$5])
1333 ifelse([$6], , :, [$6])
1335 ])# AC_LIBTOOL_COMPILER_OPTION
1338 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1339 # [ACTION-SUCCESS], [ACTION-FAILURE])
1340 # ------------------------------------------------------------
1341 # Check whether the given compiler option works
1342 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1343 [AC_CACHE_CHECK([$1], [$2],
1345 save_LDFLAGS="$LDFLAGS"
1346 LDFLAGS="$LDFLAGS $3"
1347 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1348 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1349 # The compiler can only warn and ignore the option if not recognized
1350 # So say no if there are warnings
1351 if test -s conftest.err; then
1352 # Append any errors to the config.log.
1353 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1359 LDFLAGS="$save_LDFLAGS"
1362 if test x"[$]$2" = xyes; then
1363 ifelse([$4], , :, [$4])
1365 ifelse([$5], , :, [$5])
1367 ])# AC_LIBTOOL_LINKER_OPTION
1370 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1371 # --------------------------
1372 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1373 [# find the maximum length of command line arguments
1374 AC_MSG_CHECKING([the maximum length of command line arguments])
1375 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1381 # On DJGPP, this test can blow up pretty badly due to problems in libc
1382 # (any single argument exceeding 2000 bytes causes a buffer overrun
1383 # during glob expansion). Even if it were fixed, the result of this
1384 # check would be larger than it should be.
1385 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1389 # Under GNU Hurd, this test is not required because there is
1390 # no limit to the length of command line arguments.
1391 # Libtool will interpret -1 as no limit whatsoever
1392 lt_cv_sys_max_cmd_len=-1; # 12K is about right
1397 # If test is not a shell built-in, we'll probably end up computing a
1398 # maximum length that is only half of the actual maximum length, but
1400 while test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1402 new_result=`expr "X$testring" : ".*" 2>&1` &&
1403 lt_cv_sys_max_cmd_len=$new_result &&
1404 test $i != 17 # 1/2 MB should be enough
1407 testring=$testring$testring
1410 # add a significant safety factor because C++ compilers can tack on massive
1411 # amounts of additional arguments before passing them to the linker. 1/4
1413 len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1414 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
1418 if test -n $lt_cv_sys_max_cmd_len ; then
1419 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1423 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1426 # _LT_AC_CHECK_DLFCN
1427 # --------------------
1428 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1429 [AC_CHECK_HEADERS(dlfcn.h)dnl
1430 ])# _LT_AC_CHECK_DLFCN
1433 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1434 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1435 # ------------------------------------------------------------------
1436 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1437 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1438 if test "$cross_compiling" = yes; then :
1441 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1442 lt_status=$lt_dlunknown
1443 cat > conftest.$ac_ext <<EOF
1444 [#line __oline__ "configure"
1445 #include "confdefs.h"
1454 # define LT_DLGLOBAL RTLD_GLOBAL
1457 # define LT_DLGLOBAL DL_GLOBAL
1459 # define LT_DLGLOBAL 0
1463 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1464 find out it does not work in some platform. */
1465 #ifndef LT_DLLAZY_OR_NOW
1467 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1470 # define LT_DLLAZY_OR_NOW DL_LAZY
1473 # define LT_DLLAZY_OR_NOW RTLD_NOW
1476 # define LT_DLLAZY_OR_NOW DL_NOW
1478 # define LT_DLLAZY_OR_NOW 0
1486 extern "C" void exit (int);
1489 void fnord() { int i=42;}
1492 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1493 int status = $lt_dlunknown;
1497 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1498 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1499 /* dlclose (self); */
1505 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1506 (./conftest; exit; ) 2>/dev/null
1509 x$lt_dlno_uscore) $1 ;;
1510 x$lt_dlneed_uscore) $2 ;;
1511 x$lt_unknown|x*) $3 ;;
1514 # compilation failed
1519 ])# _LT_AC_TRY_DLOPEN_SELF
1522 # AC_LIBTOOL_DLOPEN_SELF
1523 # -------------------
1524 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1525 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1526 if test "x$enable_dlopen" != xyes; then
1527 enable_dlopen=unknown
1528 enable_dlopen_self=unknown
1529 enable_dlopen_self_static=unknown
1536 lt_cv_dlopen="load_add_on"
1538 lt_cv_dlopen_self=yes
1541 cygwin* | mingw* | pw32*)
1542 lt_cv_dlopen="LoadLibrary"
1547 AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
1548 [AC_CHECK_LIB(dld, shl_load,
1549 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"],
1550 [AC_CHECK_LIB(dl, dlopen,
1551 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1552 [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
1553 [AC_CHECK_LIB(svld, dlopen,
1554 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
1562 if test "x$lt_cv_dlopen" != xno; then
1568 case $lt_cv_dlopen in
1570 save_CPPFLAGS="$CPPFLAGS"
1571 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1573 save_LDFLAGS="$LDFLAGS"
1574 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1577 LIBS="$lt_cv_dlopen_libs $LIBS"
1579 AC_CACHE_CHECK([whether a program can dlopen itself],
1580 lt_cv_dlopen_self, [dnl
1581 _LT_AC_TRY_DLOPEN_SELF(
1582 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1583 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1586 if test "x$lt_cv_dlopen_self" = xyes; then
1587 LDFLAGS="$LDFLAGS $link_static_flag"
1588 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1589 lt_cv_dlopen_self_static, [dnl
1590 _LT_AC_TRY_DLOPEN_SELF(
1591 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1592 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1596 CPPFLAGS="$save_CPPFLAGS"
1597 LDFLAGS="$save_LDFLAGS"
1602 case $lt_cv_dlopen_self in
1603 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1604 *) enable_dlopen_self=unknown ;;
1607 case $lt_cv_dlopen_self_static in
1608 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1609 *) enable_dlopen_self_static=unknown ;;
1612 ])# AC_LIBTOOL_DLOPEN_SELF
1615 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1616 # ---------------------------------
1617 # Check to see if options -c and -o are simultaneously supported by compiler
1618 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1619 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1621 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1622 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1623 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1624 $rm -r conftest 2>/dev/null
1628 save_CFLAGS="$CFLAGS"
1629 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1630 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1632 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1633 # that will create temporary files in the current directory regardless of
1634 # the output directory. Thus, making CWD read-only will cause this test
1635 # to fail, enabling locking or at least warning the user not to do parallel
1639 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1641 # The compiler can only warn and ignore the option if not recognized
1642 # So say no if there are warnings
1643 if test -s out/conftest.err; then
1644 # Append any errors to the config.log.
1645 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1647 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1650 CFLAGS="$save_CFLAGS"
1659 ])# AC_LIBTOOL_PROG_CC_C_O
1662 # AC_LIBTOOL_PROG_F77_C_O([TAGNAME])
1663 # ---------------------------------
1664 # Check to see if options -c and -o are simultaneously supported by compiler
1665 AC_DEFUN([AC_LIBTOOL_PROG_F77_C_O],
1666 [AC_REQUIRE([AC_PROG_F77])dnl
1668 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1669 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1670 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1671 $rm -r conftest 2>/dev/null
1675 save_FFLAGS="$FFLAGS"
1676 FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"
1677 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1679 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1680 # that will create temporary files in the current directory regardless of
1681 # the output directory. Thus, making CWD read-only will cause this test
1682 # to fail, enabling locking or at least warning the user not to do parallel
1686 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1688 # The compiler can only warn and ignore the option if not recognized
1689 # So say no if there are warnings
1690 if test -s out/conftest.err; then
1691 # Append any errors to the config.log.
1692 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1694 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1697 FFLAGS="$save_FFLAGS"
1706 ])# AC_LIBTOOL_PROG_F77_C_O
1709 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1710 # -----------------------------------------
1711 # Check to see if we can do hard links to lock some files if needed
1712 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1713 [AC_REQUIRE([_LT_AC_LOCK])dnl
1715 hard_links="nottested"
1716 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1717 # do not overwrite the value of need_locks provided by the user
1718 AC_MSG_CHECKING([if we can lock with hard links])
1721 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1723 ln conftest.a conftest.b 2>&5 || hard_links=no
1724 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1725 AC_MSG_RESULT([$hard_links])
1726 if test "$hard_links" = no; then
1727 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1733 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1738 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1739 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1740 [rm -f .libs 2>/dev/null
1741 mkdir .libs 2>/dev/null
1742 if test -d .libs; then
1745 # MS-DOS does not allow filenames that begin with a dot.
1748 rmdir .libs 2>/dev/null])
1749 objdir=$lt_cv_objdir
1750 ])# AC_LIBTOOL_OBJDIR
1753 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1754 # ----------------------------------------------
1755 # Check hardcoding attributes.
1756 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1757 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1758 _LT_AC_TAGVAR(hardcode_action, $1)=
1759 if test -n "$hardcode_libdir_flag_spec" || \
1760 test -n "$runpath_var"; then
1762 # We can hardcode non-existant directories.
1763 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1764 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1765 # have to relink, otherwise we might link with an installed library
1766 # when we should be linking with a yet-to-be-installed one
1767 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1768 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1769 # Linking always hardcodes the temporary library directory.
1770 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1772 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1773 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1776 # We cannot hardcode anything, or else we can only hardcode existing
1778 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1780 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1782 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1783 # Fast installation is not supported
1784 enable_fast_install=no
1785 elif test "$shlibpath_overrides_runpath" = yes ||
1786 test "$enable_shared" = no; then
1787 # Fast installation is not necessary
1788 enable_fast_install=needless
1790 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1793 # AC_LIBTOOL_SYS_LIB_STRIP
1794 # ------------------------
1795 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1798 AC_MSG_CHECKING([whether stripping libraries is possible])
1799 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1800 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1801 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1802 AC_MSG_RESULT([yes])
1806 ])# AC_LIBTOOL_SYS_LIB_STRIP
1809 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1810 # -----------------------------
1811 # PORTME Fill in your ld.so characteristics
1812 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1813 [AC_MSG_CHECKING([dynamic linker characteristics])
1815 libname_spec='lib$name'
1822 shlibpath_overrides_runpath=unknown
1824 dynamic_linker="$host_os ld.so"
1825 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1826 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1827 need_lib_prefix=unknown
1828 hardcode_into_libs=no
1830 # when you set need_version to no, make sure it does not cause -set_version
1831 # flags to be left without arguments
1832 need_version=unknown
1837 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1838 shlibpath_var=LIBPATH
1840 # AIX 3 has no versioning support, so we append a major version to the name.
1841 soname_spec='${libname}${release}.so$major'
1846 if test "$host_cpu" = ia64; then
1847 # AIX 5 supports IA64
1848 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1849 shlibpath_var=LD_LIBRARY_PATH
1851 # With GCC up to 2.95.x, collect2 would create an import file
1852 # for dependence libraries. The import file would start with
1853 # the line `#! .'. This would cause the generated library to
1854 # depend on `.', always an invalid library. This was fixed in
1855 # development snapshots of GCC prior to 3.0.
1857 [ aix4 | aix4.[01] | aix4.[01].*)]
1858 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1860 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1867 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1868 # soname into executable. Probably we can add versioning support to
1869 # collect2, so additional links can be useful in future.
1870 if test "$aix_use_runtimelinking" = yes; then
1871 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1872 # instead of lib<name>.a to let people know that these are not
1873 # typical AIX shared libraries.
1874 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1876 # We preserve .a as extension for shared libraries through AIX4.2
1877 # and later when we are not doing run time linking.
1878 library_names_spec='${libname}${release}.a $libname.a'
1879 soname_spec='${libname}${release}.so$major'
1881 shlibpath_var=LIBPATH
1882 deplibs_check_method=pass_all
1887 library_names_spec='$libname.ixlibrary $libname.a'
1888 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1889 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'
1893 library_names_spec='${libname}.so'
1894 dynamic_linker="$host_os ld.so"
1895 shlibpath_var=LIBRARY_PATH
1901 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1902 soname_spec='${libname}${release}.so$major'
1903 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1904 shlibpath_var=LD_LIBRARY_PATH
1905 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1906 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1907 # the default ld.so.conf also contains /usr/contrib/lib and
1908 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1909 # libtool to hard-code these into programs
1912 cygwin* | mingw* | pw32*)
1913 version_type=windows
1916 case $GCC,$host_os in
1918 library_names_spec='$libname.dll.a'
1919 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1920 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1921 dldir=$destdir/`dirname \$dlpath`~
1922 test -d \$dldir || mkdir -p \$dldir~
1923 $install_prog .libs/$dlname \$dldir/$dlname'
1924 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1925 dlpath=$dir/\$dldll~
1929 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1930 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
1933 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1936 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
1939 dynamic_linker='Win32 ld.exe'
1940 # FIXME: first we should search . and the directory the executable is in
1944 darwin* | rhapsody*)
1945 dynamic_linker="$host_os dyld"
1949 # FIXME: Relying on posixy $() will cause problems for
1950 # cross-compilation, but unfortunately the echo tests do not
1951 # yet detect zsh echo's removal of \ escapes.
1952 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)'
1953 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1954 shlibpath_overrides_runpath=yes
1955 shlibpath_var=DYLD_LIBRARY_PATH
1962 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1963 soname_spec='${libname}${release}.so$major'
1964 shlibpath_var=LD_LIBRARY_PATH
1972 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1973 version_type=freebsd-$objformat
1974 case $version_type in
1976 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1981 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1985 shlibpath_var=LD_LIBRARY_PATH
1988 shlibpath_overrides_runpath=yes
1990 freebsd3.[01]* | freebsdelf3.[01]*)
1991 shlibpath_overrides_runpath=yes
1992 hardcode_into_libs=yes
1995 shlibpath_overrides_runpath=no
1996 hardcode_into_libs=yes
2005 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2006 soname_spec='${libname}${release}.so$major'
2007 shlibpath_var=LD_LIBRARY_PATH
2008 hardcode_into_libs=yes
2011 hpux9* | hpux10* | hpux11*)
2012 # Give a soname corresponding to the major version so that dld.sl refuses to
2013 # link against other versions.
2014 dynamic_linker="$host_os dld.sl"
2018 shlibpath_var=SHLIB_PATH
2019 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2020 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2021 soname_spec='${libname}${release}.sl$major'
2022 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2023 postinstall_cmds='chmod 555 $lib'
2030 soname_spec='${libname}${release}.so.$major'
2031 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2037 case $LD in # libtool.m4 will add one of these switches to LD
2038 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2039 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2040 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2041 *) libsuff= shlibsuff= libmagic=never-match;;
2045 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2046 shlibpath_overrides_runpath=no
2047 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2048 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2051 # No shared lib support for Linux oldld, aout, or coff.
2052 linux*oldld* | linux*aout* | linux*coff*)
2056 # This must be Linux ELF.
2061 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2062 soname_spec='${libname}${release}.so$major'
2063 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2064 shlibpath_var=LD_LIBRARY_PATH
2065 shlibpath_overrides_runpath=no
2066 # This implies no fast_install, which is unacceptable.
2067 # Some rework will be needed to allow for fast_install
2068 # before this can be enabled.
2069 hardcode_into_libs=yes
2071 # We used to test for /lib/ld.so.1 and disable shared libraries on
2072 # powerpc, because MkLinux only supported shared libraries with the
2073 # GNU dynamic linker. Since this was broken with cross compilers,
2074 # most powerpc-linux boxes support dynamic linking these days and
2075 # people can always --disable-shared, the test was removed, and we
2076 # assume the GNU/Linux dynamic linker is in use.
2077 dynamic_linker='GNU/Linux ld.so'
2084 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2085 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2086 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2087 dynamic_linker='NetBSD (a.out) ld.so'
2089 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2090 soname_spec='${libname}${release}.so$major'
2091 dynamic_linker='NetBSD ld.elf_so'
2093 shlibpath_var=LD_LIBRARY_PATH
2094 shlibpath_overrides_runpath=yes
2095 hardcode_into_libs=yes
2100 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2101 shlibpath_var=LD_LIBRARY_PATH
2102 shlibpath_overrides_runpath=yes
2107 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2108 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2109 shlibpath_var=LD_LIBRARY_PATH
2110 file_magic_cmd=/usr/bin/file
2111 file_magic_test_file=`echo /usr/lib/libc.so.*`
2112 if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
2113 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
2115 deplibs_check_method='file_magic OpenBSD.* shared library'
2120 libname_spec='$name'
2122 library_names_spec='$libname.dll $libname.a'
2123 dynamic_linker='OS/2 ld.exe'
2124 shlibpath_var=LIBPATH
2127 osf3* | osf4* | osf5*)
2130 soname_spec='${libname}${release}.so'
2131 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2132 shlibpath_var=LD_LIBRARY_PATH
2133 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2134 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2139 soname_spec='${libname}${release}.so$major'
2140 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2141 shlibpath_var=LD_LIBRARY_PATH
2148 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2149 soname_spec='${libname}${release}.so$major'
2150 shlibpath_var=LD_LIBRARY_PATH
2151 shlibpath_overrides_runpath=yes
2152 hardcode_into_libs=yes
2153 # ldd complains unless libraries are executable
2154 postinstall_cmds='chmod +x $lib'
2159 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2160 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2161 shlibpath_var=LD_LIBRARY_PATH
2162 shlibpath_overrides_runpath=yes
2163 if test "$with_gnu_ld" = yes; then
2169 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2171 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2172 soname_spec='${libname}${release}.so$major'
2173 shlibpath_var=LD_LIBRARY_PATH
2174 case $host_vendor in
2176 shlibpath_overrides_runpath=no
2181 shlibpath_overrides_runpath=no
2182 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2188 if test -d /usr/nec ;then
2190 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2191 soname_spec='$libname.so.$major'
2192 shlibpath_var=LD_LIBRARY_PATH
2198 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2199 soname_spec='${libname}${release}.so$major'
2200 shlibpath_var=LD_LIBRARY_PATH
2207 AC_MSG_RESULT([$dynamic_linker])
2208 test "$dynamic_linker" = no && can_build_shared=no
2209 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2214 AC_DEFUN([_LT_AC_TAGCONFIG],
2215 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2216 # Determine the tags from the languages used - this is another
2217 # hack by Erik L - if the flag for -g is set, then AC_PROG_*** has
2218 # probably been called. NB: I removed the GCJ support...
2220 if test "${ac_cv_prog_cxx_g+set}" = set; then
2223 if test "${ac_cv_prog_f77_g+set}" = set; then
2224 if test -n "$tagnames"; then
2231 if test -f "$ltmain" && test -n "$tagnames"; then
2232 if test ! -f "${ofile}"; then
2233 AC_MSG_WARN([output file `$ofile' does not exist])
2236 if test -z "$LTCC"; then
2237 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2238 if test -z "$LTCC"; then
2239 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2241 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2245 # Extract list of available tagged configurations in $ofile.
2246 # Note that this assumes the entire list is on one line.
2247 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2249 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2250 for tagname in $tagnames; do
2252 # Check whether tagname contains only valid characters
2253 [case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in]
2255 *) AC_MSG_ERROR([invalid tag name: $tagname])
2259 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2261 AC_MSG_ERROR([tag name $tagname already exists])
2264 # Update the list of available tags.
2265 if test -n "$tagname"; then
2266 echo appending configuration tag \"$tagname\" to $ofile
2270 AC_LIBTOOL_LANG_CXX_CONFIG
2274 AC_LIBTOOL_LANG_F77_CONFIG
2278 AC_LIBTOOL_LANG_GCJ_CONFIG
2282 AC_MSG_ERROR([Unsupported tag name: $tagname])
2286 # Append the new tag name to the list of available tags.
2287 available_tags="$available_tags $tagname"
2292 # Now substitute the updated list of available tags.
2293 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2294 mv "${ofile}T" "$ofile"
2298 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2301 ])# _LT_AC_TAGCONFIG
2306 # enable checks for dlopen support
2307 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2308 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2309 ])# AC_LIBTOOL_DLOPEN
2312 # AC_LIBTOOL_WIN32_DLL
2313 # --------------------
2314 # declare package support for building win32 dll's
2315 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2316 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2317 ])# AC_LIBTOOL_WIN32_DLL
2320 # AC_ENABLE_SHARED([DEFAULT])
2321 # ---------------------------
2322 # implement the --enable-shared flag
2323 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2324 AC_DEFUN([AC_ENABLE_SHARED],
2325 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2326 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2327 AC_ARG_ENABLE(shared,
2328 changequote(<<, >>)dnl
2329 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2330 changequote([, ])dnl
2331 [p=${PACKAGE-default}
2333 yes) enable_shared=yes ;;
2334 no) enable_shared=no ;;
2337 # Look at the argument we got. We use all the common list separators.
2338 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2339 for pkg in $enableval; do
2341 if test "X$pkg" = "X$p"; then
2348 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
2349 ])# AC_ENABLE_SHARED
2354 #- set the default shared flag to --disable-shared
2355 AC_DEFUN([AC_DISABLE_SHARED],
2356 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2357 AC_ENABLE_SHARED(no)
2358 ])# AC_DISABLE_SHARED
2361 # AC_ENABLE_STATIC([DEFAULT])
2362 # ---------------------------
2363 # implement the --enable-static flag
2364 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2365 AC_DEFUN([AC_ENABLE_STATIC],
2366 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2367 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2368 AC_ARG_ENABLE(static,
2369 changequote(<<, >>)dnl
2370 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2371 changequote([, ])dnl
2372 [p=${PACKAGE-default}
2374 yes) enable_static=yes ;;
2375 no) enable_static=no ;;
2378 # Look at the argument we got. We use all the common list separators.
2379 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2380 for pkg in $enableval; do
2382 if test "X$pkg" = "X$p"; then
2389 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
2390 ])# AC_ENABLE_STATIC
2395 # set the default static flag to --disable-static
2396 AC_DEFUN([AC_DISABLE_STATIC],
2397 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2398 AC_ENABLE_STATIC(no)
2399 ])# AC_DISABLE_STATIC
2402 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2403 # ---------------------------------
2404 # implement the --enable-fast-install flag
2405 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2406 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2407 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2408 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2409 AC_ARG_ENABLE(fast-install,
2410 changequote(<<, >>)dnl
2411 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2412 changequote([, ])dnl
2413 [p=${PACKAGE-default}
2415 yes) enable_fast_install=yes ;;
2416 no) enable_fast_install=no ;;
2418 enable_fast_install=no
2419 # Look at the argument we got. We use all the common list separators.
2420 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2421 for pkg in $enableval; do
2423 if test "X$pkg" = "X$p"; then
2424 enable_fast_install=yes
2430 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
2431 ])# AC_ENABLE_FAST_INSTALL
2434 # AC_DISABLE_FAST_INSTALL
2435 # -----------------------
2436 # set the default to --disable-fast-install
2437 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2438 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2439 AC_ENABLE_FAST_INSTALL(no)
2440 ])# AC_DISABLE_FAST_INSTALL
2443 # AC_LIBTOOL_PICMODE([MODE])
2444 # --------------------------
2445 # implement the --with-pic flag
2446 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2447 AC_DEFUN([AC_LIBTOOL_PICMODE],
2448 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2449 pic_mode=ifelse($#,1,$1,default)
2450 ])# AC_LIBTOOL_PICMODE
2453 # AC_PATH_TOOL_PREFIX
2454 # -------------------
2455 # find a file program which can recognise shared library
2456 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2457 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2458 AC_MSG_CHECKING([for $1])
2459 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2462 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2465 lt_save_MAGIC_CMD="$MAGIC_CMD"
2466 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${PATH_SEPARATOR-:}"
2467 dnl $ac_dummy forces splitting on constant user-supplied paths.
2468 dnl POSIX.2 word splitting is done only on the output of word expansions,
2469 dnl not every word. This closes a longstanding sh security hole.
2470 ac_dummy="ifelse([$2], , $PATH, [$2])"
2471 for ac_dir in $ac_dummy; do
2473 test -z "$ac_dir" && ac_dir=.
2474 if test -f $ac_dir/$1; then
2475 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2476 if test -n "$file_magic_test_file"; then
2477 case $deplibs_check_method in
2479 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2480 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2481 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2482 egrep "$file_magic_regex" > /dev/null; then
2487 *** Warning: the command libtool uses to detect shared libraries,
2488 *** $file_magic_cmd, produces output that libtool cannot recognize.
2489 *** The result is that libtool may fail to recognize shared libraries
2490 *** as such. This will affect the creation of libtool libraries that
2491 *** depend on shared libraries, but programs linked with such libtool
2492 *** libraries will work regardless of this problem. Nevertheless, you
2493 *** may want to report the problem to your system manager and/or to
2494 *** bug-libtool@gnu.org
2504 MAGIC_CMD="$lt_save_MAGIC_CMD"
2507 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2508 if test -n "$MAGIC_CMD"; then
2509 AC_MSG_RESULT($MAGIC_CMD)
2513 ])# AC_PATH_TOOL_PREFIX
2518 # find a file program which can recognise a shared library
2519 AC_DEFUN([AC_PATH_MAGIC],
2520 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2521 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2522 if test -z "$lt_cv_path_MAGIC_CMD"; then
2523 if test -n "$ac_tool_prefix"; then
2524 AC_PATH_TOOL_PREFIX(file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2534 # find the path to the GNU or non-GNU linker
2535 AC_DEFUN([AC_PROG_LD],
2536 [AC_ARG_WITH(gnu-ld,
2537 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2538 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2539 AC_REQUIRE([AC_PROG_CC])dnl
2540 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2541 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2542 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2544 if test "$GCC" = yes; then
2545 # Check if gcc -print-prog-name=ld gives a path.
2546 AC_MSG_CHECKING([for ld used by GCC])
2549 # gcc leaves a trailing carriage return which upsets mingw
2550 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2552 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2555 # Accept absolute paths.
2556 [[\\/]]* | ?:[[\\/]]*)
2557 [re_direlt='/[^/][^/]*/\.\./']
2558 # Canonicalize the path of ld
2559 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2560 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2561 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2563 test -z "$LD" && LD="$ac_prog"
2566 # If it fails, then pretend we aren't using GCC.
2570 # If it is relative, then search for the first ld in PATH.
2574 elif test "$with_gnu_ld" = yes; then
2575 AC_MSG_CHECKING([for GNU ld])
2577 AC_MSG_CHECKING([for non-GNU ld])
2579 AC_CACHE_VAL(lt_cv_path_LD,
2580 [if test -z "$LD"; then
2581 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2582 for ac_dir in $PATH; do
2584 test -z "$ac_dir" && ac_dir=.
2585 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2586 lt_cv_path_LD="$ac_dir/$ac_prog"
2587 # Check to see if the program is GNU ld. I'd rather use --version,
2588 # but apparently some GNU ld's only accept -v.
2589 # Break only if it was the GNU/non-GNU ld that we prefer.
2590 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2591 test "$with_gnu_ld" != no && break
2593 test "$with_gnu_ld" != yes && break
2599 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2602 if test -n "$LD"; then
2607 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2614 AC_DEFUN([AC_PROG_LD_GNU],
2615 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2616 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2617 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2618 lt_cv_prog_gnu_ld=yes
2620 lt_cv_prog_gnu_ld=no
2622 with_gnu_ld=$lt_cv_prog_gnu_ld
2626 # AC_PROG_LD_RELOAD_FLAG
2627 # ----------------------
2628 # find reload flag for linker
2629 # -- PORTME Some linkers may need a different reload flag.
2630 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2631 [AC_CACHE_CHECK([for $LD option to reload object files],
2632 lt_cv_ld_reload_flag,
2633 [lt_cv_ld_reload_flag='-r'])
2634 reload_flag=$lt_cv_ld_reload_flag
2635 case $reload_flag in
2637 *) reload_flag=" $reload_flag" ;;
2639 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2640 ])# AC_PROG_LD_RELOAD_FLAG
2643 # AC_DEPLIBS_CHECK_METHOD
2644 # -----------------------
2645 # how to check for library dependencies
2646 # -- PORTME fill in with the dynamic library characteristics
2647 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2648 [AC_CACHE_CHECK([how to recognise dependant libraries],
2649 lt_cv_deplibs_check_method,
2650 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2651 lt_cv_file_magic_test_file=
2652 lt_cv_deplibs_check_method='unknown'
2653 # Need to set the preceding variable on all platforms that support
2654 # interlibrary dependencies.
2655 # 'none' -- dependencies not supported.
2656 # `unknown' -- same as none, but documents that we really don't know.
2657 # 'pass_all' -- all dependencies passed with no checks.
2658 # 'test_compile' -- check by making test program.
2659 # ['file_magic [regex]'] -- check by looking for files in library path
2660 # which responds to the $file_magic_cmd with a given egrep regex.
2661 # If you have `file' or equivalent on your system and you're not sure
2662 # whether `pass_all' will *always* work, you probably want this one.
2666 lt_cv_deplibs_check_method=pass_all
2670 lt_cv_deplibs_check_method=pass_all
2674 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
2675 lt_cv_file_magic_cmd='/usr/bin/file -L'
2676 lt_cv_file_magic_test_file=/shlib/libc.so
2679 cygwin* | mingw* | pw32*)
2680 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2681 lt_cv_file_magic_cmd='$OBJDUMP -f'
2684 darwin* | rhapsody*)
2685 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2686 lt_cv_file_magic_cmd='/usr/bin/file -L'
2688 rhapsody* | darwin1.[012])
2689 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2692 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2698 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2701 # Not sure whether the presence of OpenBSD here was a mistake.
2702 # Let's accept both of them until this is cleared up.
2703 [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
2704 lt_cv_file_magic_cmd=/usr/bin/file
2705 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2709 lt_cv_deplibs_check_method=pass_all
2714 lt_cv_deplibs_check_method=pass_all
2717 hpux10.20* | hpux11*)
2718 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
2719 lt_cv_file_magic_cmd=/usr/bin/file
2720 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2726 # this will be overridden with pass_all, but let us keep it just in case
2727 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2731 *-32|*"-32 ") libmagic=32-bit;;
2732 *-n32|*"-n32 ") libmagic=N32;;
2733 *-64|*"-64 ") libmagic=64-bit;;
2734 *) libmagic=never-match;;
2736 # this will be overridden with pass_all, but let us keep it just in case
2737 [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
2740 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2741 lt_cv_deplibs_check_method=pass_all
2744 # This must be Linux ELF.
2747 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* )
2748 lt_cv_deplibs_check_method=pass_all ;;
2750 # glibc up to 2.1.1 does not perform some relocations on ARM
2751 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
2753 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2757 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2758 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
2760 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
2765 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
2766 lt_cv_file_magic_cmd=/usr/bin/file
2767 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2770 osf3* | osf4* | osf5*)
2771 # this will be overridden with pass_all, but let us keep it just in case
2772 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2773 lt_cv_file_magic_test_file=/shlib/libc.so
2774 lt_cv_deplibs_check_method=pass_all
2778 lt_cv_deplibs_check_method=pass_all
2782 lt_cv_deplibs_check_method=pass_all
2783 lt_cv_file_magic_test_file=/lib/libc.so
2786 [sysv5uw[78]* | sysv4*uw2*)]
2787 lt_cv_deplibs_check_method=pass_all
2790 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2791 case $host_vendor in
2793 [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]']
2794 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2797 lt_cv_deplibs_check_method=pass_all
2800 lt_cv_file_magic_cmd='/bin/file'
2801 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
2804 lt_cv_file_magic_cmd='/bin/file'
2805 [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
2806 lt_cv_file_magic_test_file=/lib/libc.so
2812 file_magic_cmd=$lt_cv_file_magic_cmd
2813 deplibs_check_method=$lt_cv_deplibs_check_method
2814 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2815 ])# AC_DEPLIBS_CHECK_METHOD
2820 # find the path to a BSD-compatible name lister
2821 AC_DEFUN([AC_PROG_NM],
2822 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2823 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2824 if test -n "$NM"; then
2825 # Let the user override the test.
2828 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2829 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2831 test -z "$ac_dir" && ac_dir=.
2832 tmp_nm=$ac_dir/${ac_tool_prefix}nm
2833 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2834 # Check to see if the nm accepts a BSD-compat flag.
2835 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2836 # nm: unknown option "B" ignored
2837 # Tru64's nm complains that /dev/null is an invalid object file
2838 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2839 lt_cv_path_NM="$tmp_nm -B"
2841 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2842 lt_cv_path_NM="$tmp_nm -p"
2845 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2846 continue # so that we can try to find one that supports BSD flags
2851 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2859 # check for math library
2860 AC_DEFUN([AC_CHECK_LIBM],
2861 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2864 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2865 # These system don't have libm
2868 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2869 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2872 AC_CHECK_LIB(m, main, LIBM="-lm")
2878 # AC_CHECK_AIX_LIBPATH()
2879 # Links a minimal program and checks the executable
2880 # for the system default hardcoded library path. In most cases,
2881 # this is /usr/lib:/lib, but when the MPI compilers are used
2882 # the location of the communication and MPI libs are included too.
2883 # If we don't find anything, use the default library path according
2884 # to the aix ld manual.
2885 AC_DEFUN([AC_CHECK_AIX_LIBPATH],
2886 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2887 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`
2888 # Check for a 64-bit object if we didn't find anything.
2889 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],[])
2890 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2894 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2895 # -----------------------------------
2896 # sets LIBLTDL to the link flags for the libltdl convenience library and
2897 # INCLTDL to the include flags for the libltdl header and adds
2898 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2899 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2900 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2901 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed with
2902 # '${top_srcdir}/' (note the single quotes!). If your package is not
2903 # flat and you're not using automake, define top_builddir and
2904 # top_srcdir appropriately in the Makefiles.
2905 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2906 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2907 case $enable_ltdl_convenience in
2908 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2909 "") enable_ltdl_convenience=yes
2910 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2912 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2913 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2914 ])# AC_LIBLTDL_CONVENIENCE
2917 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2918 # -----------------------------------
2919 # sets LIBLTDL to the link flags for the libltdl installable library and
2920 # INCLTDL to the include flags for the libltdl header and adds
2921 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2922 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2923 # DIRECTORY is not provided and an installed libltdl is not found, it is
2924 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2925 # and INCLTDL will be prefixed with '${top_srcdir}/' (note the single
2926 # quotes!). If your package is not flat and you're not using automake,
2927 # define top_builddir and top_srcdir appropriately in the Makefiles.
2928 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2929 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2930 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2931 AC_CHECK_LIB(ltdl, main,
2932 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2933 [if test x"$enable_ltdl_install" = xno; then
2934 AC_MSG_WARN([libltdl not installed, but installation disabled])
2936 enable_ltdl_install=yes
2939 if test x"$enable_ltdl_install" = x"yes"; then
2940 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2941 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2942 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2944 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2948 ])# AC_LIBLTDL_INSTALLABLE
2951 # If this macro is not defined by Autoconf, define it here.
2952 ifdef([AC_PROVIDE_IFELSE],
2954 [define([AC_PROVIDE_IFELSE],
2955 [ifdef([AC_PROVIDE_$1],
2964 # enable support for C++ libraries
2965 AC_DEFUN([AC_LIBTOOL_CXX],
2966 [AC_REQUIRE([_LT_AC_LANG_CXX])
2972 AC_DEFUN([_LT_AC_LANG_CXX],
2973 [AC_REQUIRE([AC_PROG_CXX])
2974 AC_REQUIRE([AC_PROG_CXXCPP])
2980 # enable support for Fortran 77 libraries
2981 AC_DEFUN([AC_LIBTOOL_F77],
2982 [AC_REQUIRE([_LT_AC_LANG_F77])
2988 AC_DEFUN([_LT_AC_LANG_F77],
2989 [AC_REQUIRE([AC_PROG_F77])
2995 # enable support for GCJ libraries
2996 AC_DEFUN([AC_LIBTOOL_GCJ],
2997 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3003 AC_DEFUN([_LT_AC_LANG_GCJ],
3004 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3005 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3006 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3007 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3008 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3009 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3013 # AC_LIBTOOL_LANG_C_CONFIG
3014 # ------------------------
3015 # Ensure that the configuration vars for the C compiler are
3016 # suitably defined. Those variables are subsequently used by
3017 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3018 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3019 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3023 # Source file extension for C test sources.
3026 # Object file extension for compiled C test sources.
3028 _LT_AC_TAGVAR(objext, $1)=$objext
3030 # Code to be used in simple compile tests
3031 lt_simple_compile_test_code="int some_variable = 0;\n"
3033 # Code to be used in simple link tests
3034 lt_simple_link_test_code='main(){return(0);}\n'
3039 # Check for any special shared library compilation flags.
3041 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3042 if test "$GCC" = no; then
3045 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3049 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3050 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3051 if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]"] >/dev/null; then :
3053 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3054 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3060 # Check to make sure the static flag actually works.
3062 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3063 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3064 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3066 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3070 ## There is no encapsulation within the following macros, do not change
3071 ## the running order or otherwise move them around unless you know exactly
3072 ## what you are doing...
3073 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3074 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3075 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3076 AC_LIBTOOL_PROG_CC_C_O($1)
3077 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3078 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3079 AC_LIBTOOL_SYS_LIB_STRIP
3080 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3081 AC_LIBTOOL_DLOPEN_SELF($1)
3083 # Report which librarie types wil actually be built
3084 AC_MSG_CHECKING([if libtool supports shared libraries])
3085 AC_MSG_RESULT([$can_build_shared])
3087 AC_MSG_CHECKING([whether to build shared libraries])
3088 test "$can_build_shared" = "no" && enable_shared=no
3090 # On AIX, shared libraries and static libraries use the same namespace, and
3091 # are all built from PIC.
3094 test "$enable_shared" = yes && enable_static=no
3095 if test -n "$RANLIB"; then
3096 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3097 postinstall_cmds='$RANLIB $lib'
3102 test "$enable_shared" = yes && enable_static=no
3105 AC_MSG_RESULT([$enable_shared])
3107 AC_MSG_CHECKING([whether to build static libraries])
3108 # Make sure either enable_shared or enable_static is yes.
3109 test "$enable_shared" = yes || enable_static=yes
3110 AC_MSG_RESULT([$enable_static])
3112 AC_LIBTOOL_CONFIG($1)
3116 ])# AC_LIBTOOL_LANG_C_CONFIG
3119 # AC_LIBTOOL_LANG_CXX_CONFIG
3120 # --------------------------
3121 # Ensure that the configuration vars for the C compiler are
3122 # suitably defined. Those variables are subsequently used by
3123 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3124 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3125 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3127 AC_REQUIRE([AC_PROG_CXX])
3128 AC_REQUIRE([AC_PROG_CXXCPP])
3130 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3131 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3132 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3133 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3134 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3135 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3137 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3138 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3139 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3140 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3141 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3142 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3144 # Dependencies to place before and after the object being linked:
3145 _LT_AC_TAGVAR(predep_objects, $1)=
3146 _LT_AC_TAGVAR(postdep_objects, $1)=
3147 _LT_AC_TAGVAR(predeps, $1)=
3148 _LT_AC_TAGVAR(postdeps, $1)=
3149 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3151 # Source file extension for C test sources.
3154 # Object file extension for compiled C test sources.
3156 _LT_AC_TAGVAR(objext, $1)=$objext
3158 # Code to be used in simple compile tests
3159 lt_simple_compile_test_code="int some_variable = 0;\n"
3161 # Code to be used in simple link tests
3162 lt_simple_link_test_code='int main(int char *[]) { return(0); }\n'
3164 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3167 # Allow CC to be a program name with arguments.
3172 _LT_AC_TAGVAR(compiler, $1)=$CC
3173 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3175 # We don't want -fno-exception wen compiling C++ code, so set the
3176 # no_builtin_flag separately
3177 if test "$GXX" = yes; then
3178 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3180 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3183 if test "$GXX" = yes; then
3184 # Set up default GNU C++ configuration
3186 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3187 # archiving commands below assume that GNU ld is being used.
3188 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
3189 egrep 'GNU ld' > /dev/null; then
3192 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3193 _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'
3195 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3196 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3198 # If archive_cmds runs LD, not CC, wlarc should be empty
3199 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3200 # investigate it a little bit more. (MM)
3203 # ancient GNU ld didn't support --whole-archive et. al.
3204 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3205 egrep 'no-whole-archive' > /dev/null; then
3206 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3208 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3214 # A generic and very simple default shared library creation
3215 # command for GNU C++ for the case where it uses the native
3216 # linker, instead of GNU ld. If possible, this setting should
3217 # overridden to take advantage of the native linker features on
3218 # the platform it is being used on.
3219 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3222 # Commands to make compiler produce verbose output that lists
3223 # what "hidden" libraries, object files and flags are used when
3224 # linking a shared library.
3225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3233 # PORTME: fill in a description of your system's C++ link characteristics
3234 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3235 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3238 # FIXME: insert proper C++ library support
3239 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3242 _LT_AC_TAGVAR(archive_cmds, $1)=''
3243 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3244 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3245 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3246 # When large executables or shared objects are built, AIX ld can
3247 # have problems creating the table of contents. If linking a library
3248 # or program results in "error TOC overflow" add -mminimal-toc to
3249 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3250 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3251 if test "$GXX" = yes; then
3252 case $host_os in aix4.[012]|aix4.[012].*)
3253 # We only want to do this on AIX 4.2 and lower, the check
3254 # below for broken collect2 doesn't work under 4.3+
3255 collect2name=`${CC} -print-prog-name=collect2`
3256 if test -f "$collect2name" && \
3257 strings "$collect2name" | grep resolve_lib_name >/dev/null
3259 # We have reworked collect2
3260 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3262 # We have old collect2
3263 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3264 # It fails to find uninstalled libraries when the uninstalled
3265 # path is not listed in the libpath. Setting hardcode_minus_L
3266 # to unsupported forces relinking
3267 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3268 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3269 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3272 shared_flag='-shared'
3275 if test "$host_cpu" = ia64; then
3276 shared_flag='${wl}-G'
3278 shared_flag='${wl}-bM:SRE'
3282 if test "$host_cpu" = ia64; then
3283 # On IA64, the linker does run time linking by default, so we don't
3284 # have to do anything special.
3285 aix_use_runtimelinking=no
3286 exp_sym_flag='-Bexport'
3289 # Test if we are trying to use run time linking, or normal AIX style linking.
3290 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
3291 aix_use_runtimelinking=no
3292 for ld_flag in $LDFLAGS; do
3293 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
3294 aix_use_runtimelinking=yes
3298 exp_sym_flag='-bexport'
3299 no_entry_flag='-bnoentry'
3301 # It seems that -bexpall does not export symbols beginning with
3302 # underscore (_), so it is better to generate a list of symbols to export.
3303 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3304 if test "$aix_use_runtimelinking" = yes; then
3305 # Determine the default libpath from the value encoded in an empty executable.
3306 AC_CHECK_AIX_LIBPATH
3307 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3309 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -Wl,-G'
3310 _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"
3312 if test "$host_cpu" = ia64; then
3313 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3314 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3315 _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"
3317 # Determine the default libpath from the value encoded in an empty executable.
3318 AC_CHECK_AIX_LIBPATH
3319 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3321 # Warning - without using the other run time loading flags, -berok will
3322 # link without error, but may produce a broken library.
3323 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bnoerok'
3324 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3325 # -bexpall does not export symbols beginning with underscore (_)
3326 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3327 # Exported symbols can be pulled into shared objects from archives
3328 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3329 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3330 # This is similar to how AIX traditionally builds it's shared libraries.
3331 _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'
3336 case $cc_basename in
3338 # FIXME: insert proper C++ library support
3339 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3344 case $cc_basename in
3346 # FIXME: insert proper C++ library support
3347 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3350 # Green Hills C++ Compiler
3351 # FIXME: insert proper C++ library support
3352 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3355 # FIXME: insert proper C++ library support
3356 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3361 # C++ shared libraries reported to be fairly broken before switch to ELF
3362 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3365 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3368 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3370 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3373 if test $with_gnu_ld = no; then
3374 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3375 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3376 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3378 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3379 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
3380 # location of the library.
3382 case $cc_basename in
3384 # FIXME: insert proper C++ library support
3385 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3389 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' ;;
3390 *) _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' ;;
3392 # Commands to make compiler produce verbose output that lists
3393 # what "hidden" libraries, object files and flags are used when
3394 # linking a shared library.
3396 # There doesn't appear to be a way to prevent this compiler from
3397 # explicitly linking system object files so we need to strip them
3398 # from the output so that they don't get included in the library
3400 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'
3403 if test $GXX = yes; then
3404 if test $with_gnu_ld = no; then
3406 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' ;;
3407 *) _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' ;;
3411 # FIXME: insert proper C++ library support
3412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3418 case $cc_basename in
3421 _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'
3423 # Archives containing C++ object files must be created using
3424 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3425 # necessary to make sure instantiated templates are included
3427 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3430 if test "$GXX" = yes; then
3431 if test "$with_gnu_ld" = no; then
3432 _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'
3434 _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'
3437 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3438 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3439 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3444 case $cc_basename in
3446 # Kuck and Associates, Inc. (KAI) C++ Compiler
3448 # KCC will only create a shared library if the output file
3449 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3450 # to its proper name (with version) after linking.
3451 _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'
3452 _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'
3454 # Commands to make compiler produce verbose output that lists
3455 # what "hidden" libraries, object files and flags are used when
3456 # linking a shared library.
3458 # There doesn't appear to be a way to prevent this compiler from
3459 # explicitly linking system object files so we need to strip them
3460 # from the output so that they don't get included in the library
3462 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'
3464 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3465 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3467 # Archives containing C++ object files must be created using
3468 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3469 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3473 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3474 _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'
3476 runpath_var=LD_RUN_PATH
3477 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3478 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3480 # Commands to make compiler produce verbose output that lists
3481 # what "hidden" libraries, object files and flags are used when
3482 # linking a shared library.
3484 # There doesn't appear to be a way to prevent this compiler from
3485 # explicitly linking system object files so we need to strip them
3486 # from the output so that they don't get included in the library
3488 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'
3493 # FIXME: insert proper C++ library support
3494 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3497 # FIXME: insert proper C++ library support
3498 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3501 case $cc_basename in
3503 # FIXME: insert proper C++ library support
3504 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3507 # FIXME: insert proper C++ library support
3508 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3513 # NetBSD uses g++ - do we need to do anything?
3516 case $cc_basename in
3518 # Kuck and Associates, Inc. (KAI) C++ Compiler
3520 # KCC will only create a shared library if the output file
3521 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3522 # to its proper name (with version) after linking.
3523 _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'
3525 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3526 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3528 # Archives containing C++ object files must be created using
3529 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3530 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3534 # Rational C++ 2.4.1
3535 # FIXME: insert proper C++ library support
3536 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3539 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3540 _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'
3542 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3543 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3545 # Commands to make compiler produce verbose output that lists
3546 # what "hidden" libraries, object files and flags are used when
3547 # linking a shared library.
3549 # There doesn't appear to be a way to prevent this compiler from
3550 # explicitly linking system object files so we need to strip them
3551 # from the output so that they don't get included in the library
3553 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'
3556 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3557 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3558 _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'
3560 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3561 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3563 # Commands to make compiler produce verbose output that lists
3564 # what "hidden" libraries, object files and flags are used when
3565 # linking a shared library.
3566 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3569 # FIXME: insert proper C++ library support
3570 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3576 case $cc_basename in
3578 # Kuck and Associates, Inc. (KAI) C++ Compiler
3580 # KCC will only create a shared library if the output file
3581 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3582 # to its proper name (with version) after linking.
3583 _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'
3585 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3586 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3588 # Archives containing C++ object files must be created using
3589 # the KAI C++ compiler.
3590 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3593 # Rational C++ 2.4.1
3594 # FIXME: insert proper C++ library support
3595 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3598 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3599 _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'
3600 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
3601 echo "-hidden">> $lib.exp~
3602 $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~
3605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3606 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3608 # Commands to make compiler produce verbose output that lists
3609 # what "hidden" libraries, object files and flags are used when
3610 # linking a shared library.
3612 # There doesn't appear to be a way to prevent this compiler from
3613 # explicitly linking system object files so we need to strip them
3614 # from the output so that they don't get included in the library
3616 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'
3619 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3620 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3621 _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'
3623 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3624 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3626 # Commands to make compiler produce verbose output that lists
3627 # what "hidden" libraries, object files and flags are used when
3628 # linking a shared library.
3629 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3632 # FIXME: insert proper C++ library support
3633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3639 # FIXME: insert proper C++ library support
3640 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3643 case $cc_basename in
3645 # FIXME: insert proper C++ library support
3646 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3649 # FIXME: insert proper C++ library support
3650 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3655 case $cc_basename in
3658 # FIXME: insert proper C++ library support
3659 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3663 # FIXME: insert proper C++ library support
3664 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3667 # FIXME: insert proper C++ library support
3668 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3673 case $cc_basename in
3675 # Sun C++ 4.2, 5.x and Centerline C++
3676 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3677 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3678 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3679 $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'
3681 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3682 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3684 solaris2.[0-5] | solaris2.[0-5].*) ;;
3686 # The C++ compiler is used as linker so we must use $wl
3687 # flag to pass the commands to the underlying system
3689 # Supported since Solaris 2.6 (maybe 2.5.1?)
3690 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3693 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3695 # Commands to make compiler produce verbose output that lists
3696 # what "hidden" libraries, object files and flags are used when
3697 # linking a shared library.
3699 # There doesn't appear to be a way to prevent this compiler from
3700 # explicitly linking system object files so we need to strip them
3701 # from the output so that they don't get included in the library
3703 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'
3705 # Archives containing C++ object files must be created using
3706 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3707 # necessary to make sure instantiated templates are included
3709 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3712 # Green Hills C++ Compiler
3713 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3715 # The C++ compiler must be used to create the archive.
3716 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3719 # GNU C++ compiler with Solaris linker
3720 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3721 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3722 if $CC --version | egrep -v '^2\.7' > /dev/null; then
3723 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3724 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3725 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3727 # Commands to make compiler produce verbose output that lists
3728 # what "hidden" libraries, object files and flags are used when
3729 # linking a shared library.
3730 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3732 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3734 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3735 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3736 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3738 # Commands to make compiler produce verbose output that lists
3739 # what "hidden" libraries, object files and flags are used when
3740 # linking a shared library.
3741 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3744 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3750 case $cc_basename in
3752 # NonStop-UX NCC 3.20
3753 # FIXME: insert proper C++ library support
3754 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3757 # FIXME: insert proper C++ library support
3758 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3763 # FIXME: insert proper C++ library support
3764 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3767 # FIXME: insert proper C++ library support
3768 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3771 # FIXME: insert proper C++ library support
3772 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3775 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3776 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3778 # Figure out "hidden" C++ library dependencies from verbose
3779 # compiler output whening linking a shared library.
3780 cat > conftest.$ac_ext <<EOF
3784 Foo (void) { a = 0; }
3791 if AC_TRY_EVAL(ac_compile); then
3792 # Parse the compiler output and extract the necessary
3793 # objects, libraries and library flags.
3795 # Sentinel used to keep track of whether or not we are before
3796 # the conftest object file.
3797 pre_test_object_deps_done=no
3799 # The `*' in the case matches for architectures that use `case' in
3800 # $output_verbose_cmd can trigger glob expansion during the loop
3801 # eval without this substitution.
3802 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3804 for p in `eval $output_verbose_link_cmd`; do
3809 # Some compilers place space between "-{L,R}" and the path.
3812 || test $p = "-R"; then
3819 if test "$pre_test_object_deps_done" = no; then
3822 # Internal compiler library paths should come after those
3823 # provided the user. The postdeps already come after the
3824 # user supplied libs so there is no need to process them.
3825 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3826 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3828 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3831 # The "-l" case would never come before the object being
3832 # linked, so don't bother handling this case.
3835 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3836 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3838 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3844 # This assumes that the test object file only shows up
3845 # once in the compiler output.
3846 if test "$p" = "conftest.$objext"; then
3847 pre_test_object_deps_done=yes
3851 if test "$pre_test_object_deps_done" = no; then
3852 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3853 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3855 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3858 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3859 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3861 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3866 *) ;; # Ignore the rest.
3874 echo "ltcf-cxx.sh: error: problem compiling test program"
3877 $rm -f confest.$objext
3879 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3880 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3881 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3884 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3885 _LT_AC_TAGVAR(LD, $1)="$LD"
3888 ## There is no encapsulation within the following macros, do not change
3889 ## the running order or otherwise move them around unless you know exactly
3890 ## what you are doing...
3891 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3892 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3893 AC_LIBTOOL_PROG_CC_C_O($1)
3894 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3895 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3896 AC_LIBTOOL_SYS_LIB_STRIP
3897 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3898 AC_LIBTOOL_DLOPEN_SELF($1)
3900 AC_LIBTOOL_CONFIG($1)
3904 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3909 # AC_LIBTOOL_LANG_F77_CONFIG
3910 # ------------------------
3911 # Ensure that the configuration vars for the C compiler are
3912 # suitably defined. Those variables are subsequently used by
3913 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3914 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3915 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3916 [AC_LANG_PUSH(Fortran 77)
3917 AC_REQUIRE([AC_PROG_F77])
3919 # Source file extension for f77 test sources.
3922 # Object file extension for compiled f77 test sources.
3924 _LT_AC_TAGVAR(objext, $1)=$objext
3926 # Code to be used in simple compile tests
3927 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3929 # Code to be used in simple link tests
3930 lt_simple_link_test_code=" program t\n end\n"
3932 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3935 # Allow CC to be a program name with arguments.
3940 _LT_AC_TAGVAR(compiler, $1)=$CC
3941 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3943 # Report which library types wil actually be built
3944 AC_MSG_CHECKING([if libtool supports shared libraries])
3945 AC_MSG_RESULT([$can_build_shared])
3947 AC_MSG_CHECKING([whether to build shared libraries])
3948 test "$can_build_shared" = "no" && enable_shared=no
3950 # We never build shared libraries with the fortran linker;
3951 # this support is only meant for including fortran objects
3952 # in C libraries. You should normally always be able to
3953 # perform the linking stage with the C compiler, anyway...
3955 # On AIX, shared libraries and static libraries use the same namespace, and
3956 # are all built from PIC.
3959 test "$enable_shared" = yes && enable_static=no
3960 if test -n "$RANLIB"; then
3961 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3962 postinstall_cmds='$RANLIB $lib'
3967 test "$enable_shared" = yes && enable_static=no
3970 AC_MSG_RESULT([$enable_shared])
3972 AC_MSG_CHECKING([whether to build static libraries])
3973 # Make sure either enable_shared or enable_static is yes.
3974 test "$enable_shared" = yes || enable_static=yes
3975 AC_MSG_RESULT([$enable_static])
3977 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3978 AC_LIBTOOL_PROG_F77_C_O($1)
3979 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3980 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3981 AC_LIBTOOL_SYS_LIB_STRIP
3982 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3985 AC_LIBTOOL_CONFIG($1)
3989 ])# AC_LIBTOOL_LANG_F77_CONFIG
3994 # AC_LIBTOOL_LANG_GCJ_CONFIG
3995 # --------------------------
3996 # Ensure that the configuration vars for the C compiler are
3997 # suitably defined. Those variables are subsequently used by
3998 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3999 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4000 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4003 # Source file extension for C test sources.
4006 # Object file extension for compiled C test sources.
4008 _LT_AC_TAGVAR(objext, $1)=$objext
4010 # Code to be used in simple compile tests
4011 lt_simple_compile_test_code="class foo {}\n"
4013 # Code to be used in simple link tests
4014 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4017 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4020 # Allow CC to be a program name with arguments.
4025 _LT_AC_TAGVAR(compiler, $1)=$CC
4027 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4028 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4031 ## There is no encapsulation within the following macros, do not change
4032 ## the running order or otherwise move them around unless you know exactly
4033 ## what you are doing...
4034 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4035 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4036 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4037 AC_LIBTOOL_PROG_CC_C_O($1)
4038 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4039 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4040 AC_LIBTOOL_SYS_LIB_STRIP
4041 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4042 AC_LIBTOOL_DLOPEN_SELF($1)
4044 AC_LIBTOOL_CONFIG($1)
4048 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4051 # AC_LIBTOOL_CONFIG([TAGNAME])
4052 # ----------------------------
4053 # If TAGNAME is not passed, then create an initial libtool script
4054 # with a default configuration from the untagged config vars. Otherwise
4055 # add code to config.status for appending the configuration named by
4056 # TAGNAME from the matching tagged config vars.
4057 AC_DEFUN([AC_LIBTOOL_CONFIG],
4058 [# The else clause should only fire when bootstrapping the
4059 # libtool distribution, otherwise you forgot to ship ltmain.sh
4060 # with your package, and you will get complaints that there are
4061 # no rules to generate ltmain.sh.
4062 if test -f "$ltmain"; then
4063 # Now quote all the things that may contain metacharacters while being
4064 # careful not to overquote the AC_SUBSTed values. We take copies of the
4065 # variables and quote the copies for generation of the libtool script.
4066 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S NM SHELL \
4067 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4068 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4069 deplibs_check_method reload_flag reload_cmds need_locks \
4070 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4071 lt_cv_sys_global_symbol_to_c_name_address \
4072 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4073 old_postinstall_cmds old_postuninstall_cmds \
4074 _LT_AC_TAGVAR(compiler, $1) \
4075 _LT_AC_TAGVAR(CC, $1) \
4076 _LT_AC_TAGVAR(LD, $1) \
4077 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4078 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4079 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4080 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4081 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4082 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4083 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4084 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4085 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4086 _LT_AC_TAGVAR(predep_objects, $1) \
4087 _LT_AC_TAGVAR(postdep_objects, $1) \
4088 _LT_AC_TAGVAR(predeps, $1) \
4089 _LT_AC_TAGVAR(postdeps, $1) \
4090 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4091 _LT_AC_TAGVAR(archive_cmds, $1) \
4092 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4093 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4094 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4095 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4096 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4097 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4098 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4100 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4101 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4102 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4103 _LT_AC_TAGVAR(include_expsyms, $1); do
4106 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4107 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4108 _LT_AC_TAGVAR(archive_cmds, $1) | \
4109 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4110 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4111 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4112 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4113 postinstall_cmds | postuninstall_cmds | \
4114 old_postinstall_cmds | old_postuninstall_cmds | \
4115 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4116 # Double-quote double-evaled strings.
4117 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4120 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4126 *'\[$]0 --fallback-echo"')
4127 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4132 [cfgfile="${ofile}T"
4133 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4135 AC_MSG_NOTICE([creating $ofile])],
4138 cat <<__EOF__ >> "$cfgfile"
4142 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4143 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4144 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4146 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4147 # Free Software Foundation, Inc.
4149 # This file is part of GNU Libtool:
4150 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4152 # This program is free software; you can redistribute it and/or modify
4153 # it under the terms of the GNU General Public License as published by
4154 # the Free Software Foundation; either version 2 of the License, or
4155 # (at your option) any later version.
4157 # This program is distributed in the hope that it will be useful, but
4158 # WITHOUT ANY WARRANTY; without even the implied warranty of
4159 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4160 # General Public License for more details.
4162 # You should have received a copy of the GNU General Public License
4163 # along with this program; if not, write to the Free Software
4164 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4166 # As a special exception to the GNU General Public License, if you
4167 # distribute this file as part of a program that contains a
4168 # configuration script generated by Autoconf, you may include it under
4169 # the same distribution terms that you use for the rest of that program.
4171 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4172 Xsed="sed -e s/^X//"
4174 # The HP-UX ksh and POSIX shell print the target directory to stdout
4176 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4178 # The names of the tagged configurations supported by this script.
4181 # ### BEGIN LIBTOOL CONFIG],
4182 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4184 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4186 # Shell to use when invoking shell scripts.
4189 # Whether or not to build shared libraries.
4190 build_libtool_libs=$enable_shared
4192 # Whether or not to build static libraries.
4193 build_old_libs=$enable_static
4195 # Whether or not to add -lc for building shared libraries.
4196 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4198 # Whether or not to optimize for fast installation.
4199 fast_install=$enable_fast_install
4202 host_alias=$host_alias
4205 # An echo program that does not interpret backslashes.
4210 AR_FLAGS=$lt_AR_FLAGS
4215 # A language-specific compiler.
4216 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4218 # Is the compiler the GNU C compiler?
4219 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4221 # The linker used to build libraries.
4222 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4224 # Whether we need hard or soft links.
4227 # A BSD-compatible nm program.
4230 # A symbol stripping program
4233 # Used to examine libraries when file_magic_cmd begins "file"
4234 MAGIC_CMD=$MAGIC_CMD
4236 # Used on cygwin: DLL creation program.
4239 # Used on cygwin: object dumper.
4242 # Used on cygwin: assembler.
4245 # The name of the directory that contains temporary libtool files.
4248 # How to create reloadable object files.
4249 reload_flag=$lt_reload_flag
4250 reload_cmds=$lt_reload_cmds
4252 # How to pass a linker flag through the compiler.
4253 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4255 # Object file suffix (normally "o").
4258 # Old archive suffix (normally "a").
4261 # Executable file suffix (normally "").
4264 # Additional compiler flags for building library objects.
4265 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4268 # What is the maximum length of a command?
4269 max_cmd_len=$lt_cv_sys_max_cmd_len
4271 # Does compiler simultaneously support -c and -o options?
4272 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4274 # Must we lock files when doing compilation ?
4275 need_locks=$lt_need_locks
4277 # Do we need the lib prefix for modules?
4278 need_lib_prefix=$need_lib_prefix
4280 # Do we need a version for libraries?
4281 need_version=$need_version
4283 # Whether dlopen is supported.
4284 dlopen_support=$enable_dlopen
4286 # Whether dlopen of programs is supported.
4287 dlopen_self=$enable_dlopen_self
4289 # Whether dlopen of statically linked programs is supported.
4290 dlopen_self_static=$enable_dlopen_self_static
4292 # Compiler flag to prevent dynamic linking.
4293 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4295 # Compiler flag to turn off builtin functions.
4296 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4298 # Compiler flag to allow reflexive dlopens.
4299 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4301 # Compiler flag to generate shared objects directly from archives.
4302 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4304 # Compiler flag to generate thread-safe objects.
4305 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4307 # Library versioning type.
4308 version_type=$version_type
4310 # Format of library name prefix.
4311 libname_spec=$lt_libname_spec
4313 # List of archive names. First name is the real one, the rest are links.
4314 # The last name is the one that the linker finds with -lNAME.
4315 library_names_spec=$lt_library_names_spec
4317 # The coded name of the library, if different from the real name.
4318 soname_spec=$lt_soname_spec
4320 # Commands used to build and install an old-style archive.
4322 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4323 old_postinstall_cmds=$lt_old_postinstall_cmds
4324 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4326 # Create an old-style archive from a shared archive.
4327 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4329 # Create a temporary old-style archive to link instead of a shared archive.
4330 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4332 # Commands used to build and install a shared archive.
4333 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4334 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4335 postinstall_cmds=$lt_postinstall_cmds
4336 postuninstall_cmds=$lt_postuninstall_cmds
4338 # Commands to strip libraries.
4339 old_striplib=$lt_old_striplib
4340 striplib=$lt_striplib
4342 # Dependencies to place before the objects being linked to create a
4344 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4346 # Dependencies to place after the objects being linked to create a
4348 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4350 # Dependencies to place before the objects being linked to create a
4352 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4354 # Dependencies to place after the objects being linked to create a
4356 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4358 # The library search path used internally by the compiler when linking
4360 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4362 # Method to check whether dependent libraries are shared objects.
4363 deplibs_check_method=$lt_deplibs_check_method
4365 # Command to use when deplibs_check_method == file_magic.
4366 file_magic_cmd=$lt_file_magic_cmd
4368 # Flag that allows shared libraries with undefined symbols to be built.
4369 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4371 # Flag that forces no undefined symbols.
4372 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4374 # Commands used to finish a libtool library installation in a directory.
4375 finish_cmds=$lt_finish_cmds
4377 # Same as above, but a single script fragment to be evaled but not shown.
4378 finish_eval=$lt_finish_eval
4380 # Take the output of nm and produce a listing of raw symbols and C names.
4381 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4383 # Transform the output of nm in a proper C declaration
4384 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4386 # Transform the output of nm in a C name address pair
4387 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4389 # This is the shared library runtime path variable.
4390 runpath_var=$runpath_var
4392 # This is the shared library path variable.
4393 shlibpath_var=$shlibpath_var
4395 # Is shlibpath searched before the hard-coded library search path?
4396 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4398 # How to hardcode a shared library path into an executable.
4399 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4401 # Whether we should hardcode library paths into libraries.
4402 hardcode_into_libs=$hardcode_into_libs
4404 # Flag to hardcode \$libdir into a binary during linking.
4405 # This must work even if \$libdir does not exist.
4406 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4408 # Whether we need a single -rpath flag with a separated argument.
4409 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4411 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4413 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4415 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4417 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4419 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4420 # the resulting binary.
4421 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4423 # Variables whose values should be saved in libtool wrapper scripts and
4424 # restored at relink time.
4425 variables_saved_for_relink="$variables_saved_for_relink"
4427 # Whether libtool must link a program against all its dependency libraries.
4428 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4430 # Compile-time system search path for libraries
4431 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4433 # Run-time system search path for libraries
4434 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4436 # Fix the shell variable \$srcfile for the compiler.
4437 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4439 # Set to yes if exported symbols are required.
4440 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4442 # The commands to list exported symbols.
4443 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4445 # The commands to extract the exported symbol list from a shared archive.
4446 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4448 # Symbols that should not be listed in the preloaded symbols.
4449 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4451 # Symbols that must always be exported.
4452 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4455 [# ### END LIBTOOL CONFIG],
4456 [# ### END LIBTOOL TAG CONFIG: $tagname])
4463 cat <<\EOF >> "$cfgfile"
4465 # AIX sometimes has problems with the GCC collect2 program. For some
4466 # reason, if we set the COLLECT_NAMES environment variable, the problems
4467 # vanish in a puff of smoke.
4468 if test "X${COLLECT_NAMES+set}" != Xset; then
4470 export COLLECT_NAMES
4475 cygwin* | mingw* | pw32* | os2*)
4476 cat <<'EOF' >> "$cfgfile"
4477 # This is a source program that is used to create dlls on Windows
4478 # Don't remove nor modify the starting and closing comments
4480 # This is a source program that is used to create import libraries
4481 # on Windows for dlls which lack them. Don't remove nor modify the
4482 # starting and closing comments
4483 _LT_AC_FILE_IMPGEN_C
4488 # We use sed instead of cat because bash on DJGPP gets confused if
4489 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4490 # text mode, it properly converts lines to CR/LF. This bash problem
4491 # is reportedly fixed, but why not run on old versions too?
4492 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4494 mv -f "$cfgfile" "$ofile" || \
4495 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4499 # If there is no Makefile yet, we rely on a make rule to execute
4500 # `config.status --recheck' to rerun these tests and create the
4501 # libtool script then.
4502 test -f Makefile && make "$ltmain"
4504 ])# AC_LIBTOOL_CONFIG
4507 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4508 # -------------------------------------------
4509 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4510 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4512 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4514 if test "$GCC" = yes; then
4515 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4517 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4518 lt_cv_prog_compiler_rtti_exceptions,
4519 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
4520 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4522 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4525 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4526 # ---------------------------------
4527 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4528 [AC_REQUIRE([AC_CANONICAL_HOST])
4529 AC_REQUIRE([AC_PROG_NM])
4530 AC_REQUIRE([AC_OBJEXT])
4531 # Check for command to grab the raw symbol name followed by C symbol from nm.
4532 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4533 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4535 # These are sane defaults that work on at least a few old systems.
4536 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4538 # Character class describing NM global symbol codes.
4539 [symcode='[BCDEGRST]']
4541 # Regexp to match symbols that can be accessed directly from C.
4542 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
4544 # Transform the above into a raw symbol and a C symbol.
4545 symxfrm='\1 \2\3 \3'
4547 # Transform an extracted symbol line into a proper C declaration
4548 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4550 # Transform an extracted symbol line into symbol name and symbol address
4551 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'"
4553 # Define system-specific variables.
4558 cygwin* | mingw* | pw32*)
4559 [symcode='[ABCDGISTW]']
4561 hpux*) # Its linker distinguishes data from code symbols
4562 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4563 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'"
4566 [symcode='[BCDEGRST]']
4572 [symcode='[DFNSTU]']
4576 # Handle CRLF in mingw tool chain
4580 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4584 # If we're using GNU nm, then use its standard symbol codes.
4585 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4586 [symcode='[ABCDGISTW]']
4589 # Try without a prefix undercore, then with it.
4590 for ac_symprfx in "" "_"; do
4592 # Write the raw and C identifiers.
4593 lt_cv_sys_global_symbol_pipe=["sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
4595 # Check to see that the pipe works correctly.
4599 cat > conftest.$ac_ext <<EOF
4604 void nm_test_func(){}
4608 int main(){nm_test_var='a';nm_test_func();return(0);}
4611 if AC_TRY_EVAL(ac_compile); then
4612 # Now try to grab the symbols.
4614 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4615 # Try sorting and uniquifying the output.
4616 if sort "$nlist" | uniq > "$nlist"T; then
4617 mv -f "$nlist"T "$nlist"
4622 # Make sure that we snagged all the symbols we need.
4623 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4624 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4625 cat <<EOF > conftest.$ac_ext
4631 # Now generate the symbol file.
4632 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4634 cat <<EOF >> conftest.$ac_ext
4635 #if defined (__STDC__) && __STDC__
4636 # define lt_ptr_t void *
4638 # define lt_ptr_t char *
4642 /* The mapping between symbol names and symbols. */
4647 [lt_preloaded_symbols[] =]
4650 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
4651 cat <<\EOF >> conftest.$ac_ext
4659 # Now try linking the two files.
4660 mv conftest.$ac_objext conftstm.$ac_objext
4661 lt_save_LIBS="$LIBS"
4662 lt_save_CFLAGS="$CFLAGS"
4663 LIBS="conftstm.$ac_objext"
4664 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4665 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4668 LIBS="$lt_save_LIBS"
4669 CFLAGS="$lt_save_CFLAGS"
4671 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4674 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4677 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4680 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4681 cat conftest.$ac_ext >&5
4683 rm -f conftest* conftst*
4685 # Do not use the global_symbol_pipe unless it works.
4686 if test "$pipe_works" = yes; then
4689 lt_cv_sys_global_symbol_pipe=
4693 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4694 lt_cv_sys_global_symbol_to_cdecl=
4696 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4697 AC_MSG_RESULT(failed)
4701 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4704 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4705 # ---------------------------------------
4706 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4707 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4708 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4709 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4711 AC_MSG_CHECKING([for $compiler option to produce PIC])
4712 if test "$GCC" = yes; then
4713 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4714 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4718 # All AIX code is PIC.
4719 if test "$host_cpu" = ia64; then
4720 # AIX 5 now supports IA64 processor
4721 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4723 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4728 # FIXME: we need at least 68020 code to build shared libraries, but
4729 # adding the `-m68020' flag to GCC prevents building anything better,
4731 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4734 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4735 # PIC is the default for these OSes.
4738 cygwin* | mingw* | pw32* | os2*)
4739 # This hack is so that the source file can tell whether it is being
4740 # built for inclusion in a dll (and should export symbols for example).
4741 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4744 darwin* | rhapsody*)
4745 # PIC is the default on this platform
4746 # Common symbols not allowed in MH_DYLIB files
4747 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4751 # Just because we use GCC doesn't mean we suddenly get shared libraries
4752 # on systems that don't support them.
4753 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4758 if test -d /usr/nec; then
4759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4764 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4768 # PORTME Check for flag to pass linker flags through the system compiler.
4771 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4772 if test "$host_cpu" = ia64; then
4773 # AIX 5 now supports IA64 processor
4774 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4776 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4780 cygwin* | mingw* | pw32* | os2*)
4781 # This hack is so that the source file can tell whether it is being
4782 # built for inclusion in a dll (and should export symbols for example).
4783 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4786 hpux9* | hpux10* | hpux11*)
4787 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4788 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4789 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4790 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4794 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4795 # PIC (with -KPIC) is the default.
4796 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4800 # Check flags for non-gnu compilers on Linux
4803 # The only non-gnu compiler on Linux/Alpha is the Compaq one:
4804 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4805 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4808 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4813 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4814 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4817 osf3* | osf4* | osf5*)
4818 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819 # All OSF/1 code is PIC.
4820 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4824 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4825 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4829 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4830 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4831 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4835 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4836 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4837 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4840 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4841 if test "x$host_vendor" = xsni; then
4842 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4844 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4846 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4847 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4851 if test -d /usr/nec ;then
4852 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4853 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4858 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4859 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4863 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4867 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4870 # Check to make sure the PIC flag actually works.
4872 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4873 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4874 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4875 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)], [],
4876 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4878 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4881 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4882 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4885 # For platforms which do not support PIC, -DPIC is meaningless:
4887 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4890 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC define -DPIC works],
4891 _LT_AC_TAGVAR(lt_prog_compiler_picdef_works, $1),
4892 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4893 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"],
4894 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"])
4900 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4901 # ------------------------------------
4902 # See if the linker supports building shared libraries.
4903 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4904 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4907 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4909 _LT_AC_TAGVAR(archive_cmds, $1)=
4910 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4911 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4912 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4913 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4914 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4915 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4916 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4917 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4918 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4919 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4920 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4921 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4922 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4923 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4924 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4925 # include_expsyms should be a list of space-separated symbols to be *always*
4926 # included in the symbol list
4927 _LT_AC_TAGVAR(include_expsyms, $1)=
4928 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4929 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4930 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4931 # as well as any symbol that contains `d'.
4932 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4933 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4934 # platforms (ab)use it in PIC code, but their linkers get confused if
4935 # the symbol is explicitly referenced. Since portable code cannot
4936 # rely on this symbol name, it's probably fine to never include it in
4937 # preloaded symbol tables.
4938 extract_expsyms_cmds=
4941 cygwin* | mingw* | pw32*)
4942 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4943 # When not using gcc, we currently assume that we are using
4944 # Microsoft Visual C++.
4945 if test "$GCC" != yes; then
4954 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4955 if test "$with_gnu_ld" = yes; then
4956 # If archive_cmds runs LD, not CC, wlarc should be empty
4959 # See if GNU ld supports shared libraries.
4961 aix3* | aix4* | aix5*)
4962 # On AIX/PPC, the GNU linker is very broken
4963 if test "$host_cpu" != ia64; then
4964 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4967 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4968 *** to be unable to reliably create shared libraries on AIX.
4969 *** Therefore, libtool is disabling shared libraries support. If you
4970 *** really care for shared libraries, you may want to modify your PATH
4971 *** so that a non-GNU linker is found, and then restart.
4978 _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)'
4979 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4980 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4982 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4983 # that the semantics of dynamic libraries on AmigaOS, at least up
4984 # to version 4, is to share data among multiple programs linked
4985 # with the same dynamic library. Since this doesn't match the
4986 # behavior of shared libraries on other platforms, we can't use
4988 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4992 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4993 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4994 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4995 # support --undefined. This deserves some investigation. FIXME
4996 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4998 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5002 cygwin* | mingw* | pw32*)
5003 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
5004 # no search path for DLLs.
5005 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5006 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5007 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5009 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5010 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5011 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5012 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5013 else $CC -o impgen impgen.c ; fi)~
5014 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5016 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5018 # cygwin and mingw dlls have different entry points and sets of symbols
5020 # FIXME: what about values for MSVC?
5021 dll_entry=__cygwin_dll_entry@12
5022 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5026 dll_entry=_DllMainCRTStartup@12
5027 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5031 # mingw and cygwin differ, and it's simplest to just exclude the union
5032 # of the two symbol sets.
5033 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5035 # recent cygwin and mingw systems supply a stub DllMain which the user
5036 # can override, but on older systems we have to supply one (in ltdll.c)
5037 if test "x$lt_cv_need_dllmain" = "xyes"; then
5038 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5039 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~
5040 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5046 # Extract the symbol export list from an `--export-all' def file,
5047 # then regenerate the def file from the symbol export list, so that
5048 # the compiled dll only exports the symbol export list.
5049 # Be careful not to strip the DATA tag left by newer dlltools.
5050 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
5051 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5052 [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
5054 # If the export-symbols file already is a .def file (1st line
5055 # is EXPORTS), use it as is.
5056 # If DATA tags from a recent dlltool are present, honour them!
5057 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5058 cp $export_symbols $output_objdir/$soname-def;
5060 echo EXPORTS > $output_objdir/$soname-def;
5062 cat $export_symbols | while read symbol; do
5065 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5066 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
5068 _lt_hint=`expr 1 + \$_lt_hint`;
5072 $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~
5073 $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~
5074 $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~
5075 $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~
5076 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5079 darwin* | rhapsody*)
5080 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5081 # FIXME: Relying on posixy $() will cause problems for
5082 # cross-compilation, but unfortunately the echo tests do not
5083 # yet detect zsh echo's removal of \ escapes.
5084 _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)'
5085 # We need to add '_' to the symbols in $export_symbols first
5086 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
5087 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5088 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5089 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5093 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5094 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5097 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5098 _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'
5103 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5104 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5107 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5108 *** create shared libraries on Solaris systems. Therefore, libtool
5109 *** is disabling shared libraries support. We urge you to upgrade GNU
5110 *** binutils to release 2.9.1 or newer. Another option is to modify
5111 *** your PATH or compiler configuration so that the native linker is
5112 *** used, and then restart.
5115 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5116 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5117 _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'
5119 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5124 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5126 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5127 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5131 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5132 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5133 _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'
5135 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5140 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5141 runpath_var=LD_RUN_PATH
5142 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5143 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5145 cygwin* | mingw* | pw32*)
5146 # dlltool doesn't understand --whole-archive et. al.
5147 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5150 # ancient GNU ld didn't support --whole-archive et. al.
5151 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5152 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5154 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5160 # PORTME fill in a description of your system's linker (not GNU ld)
5163 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5164 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5165 _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'
5166 # Note: this linker hardcodes the directories in LIBPATH if there
5167 # are no directories specified by -L.
5168 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5169 if test "$GCC" = yes && test -z "$link_static_flag"; then
5170 # Neither direct hardcoding nor static linking is supported with a
5172 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5177 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5178 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5179 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5180 # When large executables or shared objects are built, AIX ld can
5181 # have problems creating the table of contents. If linking a library
5182 # or program results in "error TOC overflow" add -mminimal-toc to
5183 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5184 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5185 if test "$GCC" = yes; then
5186 case $host_os in aix4.[012]|aix4.[-12].*)
5187 # We only want to do this on AIX 4.2 and lower, the check
5188 # below for broken collect2 doesn't work under 4.3+
5189 collect2name=`${CC} -print-prog-name=collect2`
5190 if test -f "$collect2name" && \
5191 strings "$collect2name" | grep resolve_lib_name >/dev/null
5193 # We have reworked collect2
5194 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5196 # We have old collect2
5197 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5198 # It fails to find uninstalled libraries when the uninstalled
5199 # path is not listed in the libpath. Setting hardcode_minus_L
5200 # to unsupported forces relinking
5201 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5202 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5203 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5206 shared_flag='-shared'
5209 if test "$host_cpu" = ia64; then
5210 shared_flag='${wl}-G'
5212 shared_flag='${wl}-bM:SRE'
5216 if test "$host_cpu" = ia64; then
5217 # On IA64, the linker does run time linking by default, so we don't
5218 # have to do anything special.
5219 aix_use_runtimelinking=no
5220 if test $with_gnu_ld = no; then
5221 exp_sym_flag='-Bexport'
5225 # Test if we are trying to use run time linking, or normal AIX style
5226 # linking. If -brtl is somewhere in LDFLAGS, we need to do run time
5228 aix_use_runtimelinking=no
5229 for ld_flag in $LDFLAGS; do
5230 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
5231 aix_use_runtimelinking=yes
5235 exp_sym_flag='-bexport'
5236 no_entry_flag='-bnoentry'
5238 # -bexpall does not export symbols beginning with underscore (_)
5239 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5240 if test "$aix_use_runtimelinking" = yes; then
5241 # Warning - without using the other run time loading flags (-brtl),
5242 # -berok will link without error, but may produce a broken
5244 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' $wl}-berok'
5245 # Determine the default libpath from the value encoded in an empty executable.
5246 # If we don't find anything, use the default library path according to the cc manual.
5247 AC_CHECK_AIX_LIBPATH
5248 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5249 _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"
5251 if test "$host_cpu" = ia64; then
5252 if test $with_gnu_ld = no; then
5253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5254 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5255 _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"
5258 # Determine the default libpath from the value encoded in an empty executable.
5259 AC_CHECK_AIX_LIBPATH
5260 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5261 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5262 # -bexpall does not export symbols beginning with underscore (_)
5263 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5264 # Exported symbols can be pulled into shared objects from archives
5265 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5266 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5267 # This is similar to how AIX traditionally builds it's shared
5269 _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'
5275 _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)'
5276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5277 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5278 # see comment about different semantics on the GNU ld section
5279 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5283 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5286 cygwin* | mingw* | pw32*)
5287 # When not using gcc, we currently assume that we are using
5288 # Microsoft Visual C++.
5289 # hardcode_libdir_flag_spec is actually meaningless, as there is
5290 # no search path for DLLs.
5291 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5292 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5293 # Tell ltmain to make .lib files, not .a files.
5295 # FIXME: Setting linknames here is a bad hack.
5296 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5297 # The linker will automatically build a .lib file if we build a DLL.
5298 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5299 # FIXME: Should let the user specify the lib program.
5300 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5301 fix_srcfile_path='`cygpath -w "$srcfile"`'
5305 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5307 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5314 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5315 # support. Future versions do this automatically, but an explicit c++rt0.o
5316 # does not break anything, and helps significantly (at the cost of a little
5319 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5320 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5321 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5322 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5325 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5327 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5328 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5329 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5330 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5333 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5335 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5337 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5338 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5341 hpux9* | hpux10* | hpux11*)
5342 if test $with_gcc = yes; then
5344 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' ;;
5345 *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
5349 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' ;;
5350 *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5353 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5354 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5355 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5356 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
5357 # location of the library.
5358 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5362 if test "$GCC" = yes; then
5363 _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'
5365 _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'
5367 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5368 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5369 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5373 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5374 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5376 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5378 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5379 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5380 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5384 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5385 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5387 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5388 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5392 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5393 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5396 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5397 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5398 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5401 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5402 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5403 if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
5404 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5411 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5412 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5413 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5414 _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'
5415 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5419 if test "$GCC" = yes; then
5420 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5421 _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'
5423 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5424 _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'
5426 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5427 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5430 osf4* | osf5*) # as osf3* with the addition of -msym flag
5431 if test "$GCC" = yes; then
5432 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5433 _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'
5434 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5436 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5437 _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'
5438 _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~
5439 $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'
5441 # Both c and cxx compiler support -rpath directly
5442 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5444 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5448 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5449 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5450 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5451 runpath_var=LD_RUN_PATH
5452 hardcode_runpath_var=yes
5456 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
5457 if test "$with_gcc" = yes; then
5458 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5459 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5460 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5462 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5463 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5464 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5466 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5467 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5469 [solaris2.[0-5] | solaris2.[0-5].*]) ;;
5470 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5471 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5473 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5477 if test "x$host_vendor" = xsequent; then
5478 # Use $CC to link under sequent, because it throws in some extra .o
5479 # files that make .init and .fini sections work.
5480 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5482 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5484 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5485 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5486 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5487 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5491 if test "x$host_vendor" = xsni; then
5492 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
5493 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5495 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5496 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5498 runpath_var='LD_RUN_PATH'
5499 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5503 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5504 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5505 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5509 if test -d /usr/nec; then
5510 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5511 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5512 runpath_var=LD_RUN_PATH
5513 hardcode_runpath_var=yes
5514 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5519 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5520 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5521 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5522 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5523 hardcode_runpath_var=yes
5524 runpath_var=LD_RUN_PATH
5527 sysv5uw7* | unixware7*)
5528 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5529 if test "$GCC" = yes; then
5530 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5532 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5534 runpath_var='LD_RUN_PATH'
5535 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5539 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5540 # $CC -shared without GNU ld will not create a library from C++
5541 # object files and a static libstdc++, better avoid it by now
5542 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5543 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5544 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5545 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5546 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5547 runpath_var='LD_RUN_PATH'
5551 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5552 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5553 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5557 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5561 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5562 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5564 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5565 if test "$GCC" = yes; then
5566 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5570 # Do we need to explicitly link libc?
5572 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5573 if test "$enable_shared" = yes && test "$GCC" = yes; then
5574 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5576 # FIXME: we may have to deal with multi-command sequences.
5579 # Test whether the compiler implicitly links with -lc since on some
5580 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5581 # to ld, don't add -lc before -lgcc.
5582 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5584 echo 'static int dummy;' > conftest.$ac_ext
5586 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5589 libobjs=conftest.$ac_objext
5591 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5597 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5598 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5599 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5601 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5603 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5605 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5607 cat conftest.err 1>&5
5610 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5614 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5617 # _LT_AC_FILE_LTDLL_C
5618 # -------------------
5619 AC_DEFUN([_LT_AC_FILE_LTDLL_C],
5620 [# /* ltdll.c starts here */
5621 # #define WIN32_LEAN_AND_MEAN
5622 # #include <windows.h>
5623 # #undef WIN32_LEAN_AND_MEAN
5624 # #include <stdio.h>
5626 # #ifndef __CYGWIN__
5627 # # ifdef __CYGWIN32__
5628 # # define __CYGWIN__ __CYGWIN32__
5632 # #ifdef __cplusplus
5635 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5636 # #ifdef __cplusplus
5641 # #include <cygwin/cygwin_dll.h>
5642 # DECLARE_CYGWIN_DLL( DllMain );
5644 # HINSTANCE __hDllInstance_base;
5647 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5649 # __hDllInstance_base = hInst;
5652 # /* ltdll.c ends here */
5653 ])# _LT_AC_FILE_LTDLL_C
5656 # _LT_AC_FILE_IMPGEN_C
5657 # --------------------
5658 AC_DEFUN([_LT_AC_FILE_IMPGEN_C],
5659 [# /* impgen.c starts here */
5660 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5662 # This file is part of GNU libtool.
5664 # This program is free software; you can redistribute it and/or modify
5665 # it under the terms of the GNU General Public License as published by
5666 # the Free Software Foundation; either version 2 of the License, or
5667 # (at your option) any later version.
5669 # This program is distributed in the hope that it will be useful,
5670 # but WITHOUT ANY WARRANTY; without even the implied warranty of
5671 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5672 # GNU General Public License for more details.
5674 # You should have received a copy of the GNU General Public License
5675 # along with this program; if not, write to the Free Software
5676 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5679 # #include <stdio.h> /* for printf() */
5680 # #include <unistd.h> /* for open(), lseek(), read() */
5681 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5682 # #include <string.h> /* for strdup() */
5684 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5686 # #define O_BINARY 0
5689 # static unsigned int
5690 # pe_get16 (fd, offset)
5694 # unsigned char b[2];
5695 # lseek (fd, offset, SEEK_SET);
5697 # return b[0] + (b[1]<<8);
5700 # static unsigned int
5701 # pe_get32 (fd, offset)
5705 # unsigned char b[4];
5706 # lseek (fd, offset, SEEK_SET);
5708 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5711 # static unsigned int
5715 # unsigned char *b = ptr;
5716 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5725 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5726 # unsigned long export_rva, export_size, nsections, secptr, expptr;
5727 # unsigned long name_rvas, nexp;
5728 # unsigned char *expdata, *erva;
5729 # char *filename, *dll_name;
5731 # filename = argv[1];
5733 # dll = open(filename, O_RDONLY|O_BINARY);
5737 # dll_name = filename;
5739 # for (i=0; filename[i]; i++)
5740 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5741 # dll_name = filename + i +1;
5743 # pe_header_offset = pe_get32 (dll, 0x3c);
5744 # opthdr_ofs = pe_header_offset + 4 + 20;
5745 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
5747 # if (num_entries < 1) /* no exports */
5750 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
5751 # export_size = pe_get32 (dll, opthdr_ofs + 100);
5752 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5753 # secptr = (pe_header_offset + 4 + 20 +
5754 # pe_get16 (dll, pe_header_offset + 4 + 16));
5757 # for (i = 0; i < nsections; i++)
5760 # unsigned long secptr1 = secptr + 40 * i;
5761 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5762 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5763 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5764 # lseek(dll, secptr1, SEEK_SET);
5765 # read(dll, sname, 8);
5766 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
5768 # expptr = fptr + (export_rva - vaddr);
5769 # if (export_rva + export_size > vaddr + vsize)
5770 # export_size = vsize - (export_rva - vaddr);
5775 # expdata = (unsigned char*)malloc(export_size);
5776 # lseek (dll, expptr, SEEK_SET);
5777 # read (dll, expdata, export_size);
5778 # erva = expdata - export_rva;
5780 # nexp = pe_as32 (expdata+24);
5781 # name_rvas = pe_as32 (expdata+32);
5783 # printf ("EXPORTS\n");
5784 # for (i = 0; i<nexp; i++)
5786 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5787 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5792 # /* impgen.c ends here */
5793 ])# _LT_AC_FILE_IMPGEN_C
5795 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5796 # ---------------------------------
5797 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5801 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5802 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5803 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5804 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5805 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5806 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5807 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5809 # This is just to silence aclocal about the macro not being used
5810 ifelse([AC_DISABLE_FAST_INSTALL])
5812 AC_DEFUN([LT_AC_PROG_GCJ],
5813 [AC_CHECK_TOOL(GCJ, gcj, no)
5814 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"