1 # aclocal.m4 generated automatically by aclocal 1.4h
3 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 # This macro checks for fftw header files and libraries,
17 # including the possible prefixing with s or d to determine precision.
18 # Arg 1 is the fftw header/library name to check for, without
19 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
20 # Arg 2 is the size of the real variable used.
21 AC_DEFUN(ACX_CHECK_FFTW,
23 if test -z "$ac_fftw_firstname"; then
26 if test $sizeof_real = 8; then
36 # check header doesn't work, since we must use mpicc to get includes,
38 AC_MSG_CHECKING([for $1.h])
39 AC_TRY_COMPILE([#include <$1.h>],,
47 if test -n "$fftwname"; then
48 # we cannot run the code since an MPI program might not be allowed
49 # on a login node of a supercomputer
50 AC_TRY_COMPILE([#include <$fftwname.h>],
51 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
57 if test "$ok" != "yes"; then
58 xfftwname=${fftwcheckprefix}${fftwname}
59 AC_MSG_CHECKING([for $xfftwname.h])
60 AC_TRY_COMPILE([#include <$xfftwname.h>],,AC_MSG_RESULT(yes),
63 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
64 [Do you have $prec precision FFTW installed? If you are using packages,]
65 [note that you also need fftw-devel to compile GROMACS. You can find the ]
66 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
67 [If you compiled FFTW yourself: ]
68 [Note that the default FFTW setup is double precision. Change the FFTW]
69 [configuration to single with --enable-float. If you want MPI support,]
70 [use --enable-mpi. It is a good idea to install both single & double.]
71 [If your sysadm doesn't want to install it you can do it to a location]
72 [in your home directory and provide the correct paths in the CPPFLAGS]
73 [and LDFLAGS environment variables before running configure.]
74 [That is also necessary to do if your compiler doesn't search]
75 [/usr/local/include and /usr/local/lib by default.]
76 [You can find information at www.gromacs.org, or in the INSTALL file.])
78 AC_TRY_COMPILE([#include <$xfftwname.h>],
79 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
82 usedprefix=$fftwcheckprefix
85 AC_MSG_ERROR([Cannot find any $prec precision $fftwname.h or $xfftwname.h]
86 [Do you have $prec precision FFTW installed? If you are using packages,]
87 [note that you also need fftw-devel to compile GROMACS. You can find the ]
88 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
89 [If you compiled FFTW yourself: ]
90 [Note that the default FFTW setup is double precision. Change the FFTW]
91 [configuration to single with --enable-float. If you want MPI support,]
92 [use --enable-mpi. It is a good idea to install both single & double.]
93 [If your sysadm doesn't want to install it you can do it to a location]
94 [in your home directory and provide the correct paths in the CPPFLAGS]
95 [and LDFLAGS environment variables before running configure.]
96 [That is also necessary to do if your compiler doesn't search]
97 [/usr/local/include and /usr/local/lib by default.]
98 [You can find information at www.gromacs.org, or in the INSTALL file.])])
101 AC_CHECK_LIB($fftwname,main,,
102 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
103 ac_fftw_savedprefix=$usedprefix
104 ac_fftw_firstname=$fftwname
108 fftwname=${ac_fftw_savedprefix}$1
109 AC_MSG_CHECKING([for $fftwname.h])
111 [#include <$fftwname.h>],,
113 LIBS="-l$fftwname $LIBS"
114 AC_TRY_LINK_FUNC([main],,,
115 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
118 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your
119 fftw prefixes match - we already use $ac_fftw_firstname.h])
131 dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
132 dnl to easily use them in a Makefile.
134 dnl Adapted from a macro by Andreas Zeller.
136 dnl The variables provided are :
137 dnl link_motif (e.g. -L/usr/lesstif/lib -lXm -lXt)
138 dnl include_motif (e.g. -I/usr/lesstif/lib)
139 dnl motif_libraries (e.g. /usr/lesstif/lib)
140 dnl motif_includes (e.g. /usr/lesstif/include)
142 dnl The link_motif and include_motif variables should be fit to put on
143 dnl your application's link line in your Makefile.
145 AC_DEFUN(AC_FIND_MOTIF,
147 AC_REQUIRE([AC_PATH_XTRA])
152 dnl AC_ARG_WITH(motif,
153 dnl [ --without-motif do not use Motif widgets])
154 dnl Treat --without-motif like
155 dnl --without-motif-includes --without-motif-libraries.
157 if test "$no_x" = "yes"
163 AC_ARG_WITH(motif-includes,
164 [ --with-motif-includes=DIR Motif include files are in DIR],
165 motif_includes="$withval")
167 AC_ARG_WITH(motif-libraries,
168 [ --with-motif-libraries=DIR Motif libraries are in DIR],
169 motif_libraries="$withval")
172 AC_MSG_CHECKING(for Motif)
176 # Search the include files.
178 if test "$motif_includes" = ""; then
179 AC_CACHE_VAL(ac_cv_motif_includes,
181 ac_motif_save_LIBS="$LIBS"
182 ac_motif_save_INCLUDES="$INCLUDES"
183 ac_motif_save_CPPFLAGS="$CPPFLAGS"
184 ac_motif_save_LDFLAGS="$LDFLAGS"
186 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
187 INCLUDES="$X_CFLAGS $INCLUDES"
188 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
189 LDFLAGS="$X_LIBS $LDFLAGS"
191 ac_cv_motif_includes="no"
192 AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
194 # Xm/Xm.h is in the standard search path.
195 ac_cv_motif_includes=
198 # Xm/Xm.h is not in the standard search path.
199 # Locate it and put its directory in `motif_includes'
201 # /usr/include/Motif* are used on HP-UX (Motif).
202 # /usr/include/X11* are used on HP-UX (X and Athena).
203 # /usr/dt is used on Solaris (Motif).
204 # /usr/openwin is used on Solaris (X and Athena).
205 # Other directories are just guesses.
206 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
207 /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
208 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
209 /usr/dt/include /usr/openwin/include \
210 /usr/dt/*/include /opt/*/include /usr/include/Motif* \
211 "${prefix}"/*/include /usr/*/include /usr/local/*/include \
212 "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
213 if test -f "$dir/Xm/Xm.h"; then
214 ac_cv_motif_includes="$dir"
220 LIBS="$ac_motif_save_LIBS"
221 INCLUDES="$ac_motif_save_INCLUDES"
222 CPPFLAGS="$ac_motif_save_CPPFLAGS"
223 LDFLAGS="$ac_motif_save_LDFLAGS"
225 motif_includes="$ac_cv_motif_includes"
229 # Now for the libraries.
231 if test "$motif_libraries" = ""; then
232 AC_CACHE_VAL(ac_cv_motif_libraries,
234 ac_motif_save_LIBS="$LIBS"
235 ac_motif_save_INCLUDES="$INCLUDES"
236 ac_motif_save_CPPFLAGS="$CPPFLAGS"
237 ac_motif_save_LDFLAGS="$LDFLAGS"
239 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
240 INCLUDES="$X_CFLAGS $INCLUDES"
241 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
242 LDFLAGS="$X_LIBS $LDFLAGS"
244 ac_cv_motif_libraries="no"
245 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
247 # libXm.a is in the standard search path.
248 ac_cv_motif_libraries=
251 # libXm.a is not in the standard search path.
252 # Locate it and put its directory in `motif_libraries'
254 # /usr/lib/Motif* are used on HP-UX (Motif).
255 # /usr/lib/X11* are used on HP-UX (X and Athena).
256 # /usr/dt is used on Solaris (Motif).
257 # /usr/lesstif is used on Linux (Lesstif).
258 # /usr/openwin is used on Solaris (X and Athena).
259 # Other directories are just guesses.
260 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
261 /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
262 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
263 /usr/dt/lib /usr/openwin/lib \
264 /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
265 /usr/lesstif*/lib /usr/lib/Lesstif* \
266 "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
267 "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
268 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
269 ac_cv_motif_libraries="$dir"
275 LIBS="$ac_motif_save_LIBS"
276 INCLUDES="$ac_motif_save_INCLUDES"
277 CPPFLAGS="$ac_motif_save_CPPFLAGS"
278 LDFLAGS="$ac_motif_save_LDFLAGS"
281 motif_libraries="$ac_cv_motif_libraries"
284 # Provide an easier way to link
286 if test "$motif_includes" = "no" -o "$motif_libraries" = "no"; then
292 if test "$with_motif" != "no"; then
293 if test "$motif_libraries" = ""; then
294 link_motif="-lXm -lXt"
295 MOTIF_LIBS="-lXm -lXt"
297 link_motif="-L$motif_libraries -lXm -lXt"
298 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
300 if test "$motif_includes" != ""; then
301 include_motif="-I$motif_includes"
302 MOTIF_INCLUDES="-I$motif_includes"
304 LIBS="$LIBS $MOTIF_LIBS"
305 INCLUDES="$INCLUDES $MOTIF_INCLUDES"
306 AC_DEFINE(HAVE_MOTIF,,[Use motif/lesstif libraries])
314 motif_libraries_result="$motif_libraries"
315 motif_includes_result="$motif_includes"
316 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
317 test "$motif_includes_result" = "" && motif_includes_result="in default path"
318 test "$motif_libraries_result" = "no" && motif_libraries_result="(none)"
319 test "$motif_includes_result" = "no" && motif_includes_result="(none)"
321 [libraries $motif_libraries_result, headers $motif_includes_result])
325 dnl macro modified from the fftw distribution (www.fftw.org)
326 AC_DEFUN(ACX_CHECK_CC_FLAGS,
328 AC_REQUIRE([AC_PROG_CC])
329 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
330 [echo 'void f(){}' > conftest.c
331 if test -z "`$CC $1 -c conftest.c 2>&1`"; then
338 if test "$ac_$2" = yes; then
347 dnl macro modified from the fftw distribution (www.fftw.org)
348 AC_DEFUN(ACX_CHECK_F77_FLAGS,
350 AC_REQUIRE([AC_PROG_F77])
351 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
352 [cat > conftest.f << EOF
357 if test -z "`$F77 $1 -c conftest.f `"; then
364 if test "$ac_$2" = yes; then
375 # ---------------------------
376 # Macro to extend the exact CPU for some hosts
377 AC_DEFUN(ACX_DETECT_GMXCPU,
379 AC_REQUIRE([AC_CANONICAL_HOST])
382 # Determine the exact cpu type on some common systems where it is
383 # not visible from the host triplet.
384 # (on e.g. intel and dec/tru64 the host type is enough)
386 case "${host_cpu}-${host_os}" in
389 # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
390 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
391 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
393 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
395 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
403 if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
405 elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
407 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
409 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
411 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
419 if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
421 elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
423 elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
425 elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
433 if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
435 elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
437 elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
439 elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
454 # Macro modified from the fftw distribution (www.fftw.org)
455 # to determine optimization flags.
456 # Note that we have modified config.guess and config.sub
457 # to provide extended information on the detailed type of CPU.
458 # In general we assume you have recent versions of the compilers
459 # that support the highest optimization we know of. If not, you
460 # can always override these flags, but it's better to upgrade :-)
461 AC_DEFUN(ACX_COMPILER_MAXOPT,
463 AC_REQUIRE([AC_PROG_CC])
464 AC_REQUIRE([AC_PROG_F77])
465 AC_REQUIRE([AC_CANONICAL_HOST])
467 # Try to determine "good" native compiler flags if none specified on command
468 # line. To avoid repeating the entire procedure for fortran flags, we first
469 # determine our suggested choices for both C and fortran, and then possibly
470 # override them with user choices.
474 case "${host_cpu}-${host_os}" in
479 xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
483 xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
487 xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
491 xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
495 xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
502 xCFLAGS="-Ae +O3 +Oall"
504 # If you haven't noticed, we don't like hp very much...
505 # but perhaps that will change if they make something nice out of ia64.
509 # The GNU compilers are checked outside this case statement.
510 # 1. Check for the SGI compilers. Actually, they report the are GNU C,
511 # so this check isn't used right now, but we want to identify them
512 # even if they change this later.
513 if ($CC -v 2>&1 | grep SGI > /dev/null); then
517 if ($F77 -v 2>&1 | grep SGI > /dev/null); then
520 # PORTME 2. Check for intel compilers when we get our hands on one!
523 # dont use inter-procedure analysis for the innerloops - they take
524 # forever to compile with it, and it doesnt help at all.
527 xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
528 xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
531 xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
532 xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
535 xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
536 xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
539 xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
540 xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
543 # I don't think people are using anything older than power2, so we tune for
544 # pwr, but dont set the arch since it is nice to have common binaries
545 # that run also on powerpc.
546 xCFLAGS="-O3 -qtune=pwr -qmaxmem=16384"
547 xFFLAGS="-O3 -Q -qtune=pwr -qmaxmem=16384 -qhot"
555 xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
556 xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
559 xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
560 xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
563 xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
564 xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
567 xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
568 xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
571 xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
572 xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
575 xCFLAGS="-O3 -qmaxmem=16384"
576 xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
582 xCFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -woff 1174 -D__INLINE_INTRINSICS"
583 xFFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -OPT:cray_ivdep=TRUE"
585 if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
586 xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
587 xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
590 if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
591 xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms"
592 xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms"
594 LDFLAGS="$LDFLAGS -woff 84"
598 xCFLAGS="-n32 -r12000 -mips4 $xCFLAGS"
599 xFFLAGS="-n32 -r12000 -mips4 $xFFLAGS"
600 xLDFLAGS="-n32 -r12000 -mips4"
603 xCFLAGS="-n32 -r10000 -mips4 $xCFLAGS"
604 xFFLAGS="-n32 -r10000 -mips4 $xFFLAGS"
605 xLDFLAGS="-n32 -r10000 -mips4"
608 xCFLAGS="-n32 -r8000 -mips4 $xCFLAGS"
609 xFFLAGS="-n32 -r8000 -mips4 $xFFLAGS"
610 xLDFLAGS="-n32 -r8000 -mips4"
613 xCFLAGS="-n32 -r5000 -mips4 $xCFLAGS"
614 xFFLAGS="-n32 -r5000 -mips4 $xFFLAGS"
615 xLDFLAGS="-n32 -r5000 -mips4"
618 xCFLAGS="-n32 $xCFLAGS"
619 xFFLAGS="-n32 $xFFLAGS"
626 # NB: -arch implies -tune according to the cc manual.
627 # We dont use -ifo since it conflicts with dependency
628 # generation on old versions of the compiler.
629 case "${host_cpu}" in
631 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
632 evtype=`echo ${host_cpu} | sed 's/alpha//'`
633 xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
634 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
635 xASFLAGS="-O4 -no_ifo -arch $evtype"
639 xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
640 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
641 xASFLAGS="-O4 -no_ifo -arch host"
648 case "${host_cpu}" in
650 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
651 evtype=`echo ${host_cpu} | sed 's/alpha//'`
652 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
653 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
654 tmpASFLAGS="-O4 -no_ifo -arch $evtype"
658 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
659 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
660 tmpASFLAGS="-O4 -no_ifo -arch host"
664 # Compaq sometimes uses -version and sometimes -V
665 # Not 100% sure if ccc always has -V and F77 -version, so
666 # we check both alternatives to be sure.
667 if (($CC -V 2>&1 | grep ompaq > /dev/null) ||
668 ($CC -version 2>&1 | grep ompaq > /dev/null)); then
670 xASFLAGS="$tmpASFLAGS"
673 if test "$enable_fortran" = "yes"; then
674 if (($F77 -V 2>&1 | grep ompaq > /dev/null) ||
675 ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
682 # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
683 # further down, but we can at least check if the Portland compilers are used:
684 if $CC -V 2> /dev/null | grep ortland > /dev/null 2>&1; then
685 case "${host_cpu}" in
693 xCFLAGS="$pgiopt -fast -pc 32"
696 if test "$enable_fortran" = "yes"; then
697 if $F77 -version 2> /dev/null | grep Portland > /dev/null 2>&1; then
703 # Phew, end of all those operating systems and processors!
705 # use default flags for gcc/g77 on all systems, but catch the SGI/ia64 sgicc
706 if test $ac_cv_prog_gcc = yes; then
707 if ($CC -v 2>&1 | grep SGI > /dev/null); then
711 xCFLAGS="-O6 -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
712 # the portland compiler only knows .s files, and always runs them
713 # through cpp. We support this by telling gcc to preprocess .s files.
714 xASFLAGS="$xCFLAGS -x assembler-with-cpp"
715 # -malign-double for x86 systems
716 ACX_CHECK_CC_FLAGS(-malign-double,align_double,xCFLAGS="$xCFLAGS -malign-double")
720 if test $enable_fortran = yes; then
721 if test $ac_cv_prog_g77 = yes; then
722 if ($F77 -v 2>&1 | grep SGI > /dev/null); then
725 xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
726 # -malign-double for f77 on x86 systems - haven't checked that this works yet.
727 #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
734 if test "$GCC" = "yes"; then
735 # try to guess correct CPU flags, at least for powerpc linux
736 case "${host_cpu}" in
737 # i586/i686 cpu flags don't improve speed, thus no need to use them.
738 # don't check f77 separately - we assume f77 and gcc are similar
740 cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
741 is60x=`echo $cputype | egrep "^60[0-9]e?$"`
742 if test -n "$is60x"; then
743 ACX_CHECK_CC_FLAGS(-mcpu=$cputype,m_cpu_60x,CPU_FLAGS=-mcpu=$cputype)
744 elif test "$cputype" = 750; then
745 ACX_CHECK_CC_FLAGS(-mcpu=750,m_cpu_750,CPU_FLAGS=-mcpu=750)
747 if test -z "$CPU_FLAGS"; then
748 ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS=-mcpu=powerpc)
750 if test -z "$CPU_FLAGS"; then
751 ACX_CHECK_CC_FLAGS(-mpowerpc,m_powerpc,CPU_FLAGS=-mpowerpc)
755 AM_CONDITIONAL(GNU_CC,false)
758 if test -n "$CPU_FLAGS"; then
759 xCFLAGS="$xCFLAGS $CPU_FLAGS"
760 xFFLAGS="$xFFLAGS $CPU_FLAGS"
761 xASFLAGS="$xASFLAGS $CPU_FLAGS"
764 # Now check if the user provided anything special for C or fortran...
765 # Not nice to have checked everything then, but otherwise we would have
766 # to use entirely separate checks for C and fortran flags, doubling the code.
767 if test "$ac_test_CFLAGS" != "set"; then
769 # Use the extra link optimization flags on e.g. irix only when
770 # we are using our own C compiler flags
771 LDFLAGS="$LDFLAGS $xLDFLAGS"
773 if test -z "$CFLAGS"; then
774 echo "********************************************************************"
775 echo "* Note: We have not optimized the C compiler flags on your target *"
776 echo "* yet, but the default CFLAGS=-O3 should be OK in most cases. *"
777 echo "* You can override this by setting the CFLAGS environment variable.*"
778 echo "*******************************************************************"
781 ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
782 echo "*******************************************************************"
783 echo "* Sorry, these optimization settings don't seem to work for *"
784 echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
785 echo "*******************************************************************"
789 echo "******************************************"
790 echo "* Using CFLAGS from environment variable *"
791 echo "******************************************"
794 if test "$enable_fortran" = "yes"; then
795 if test "$ac_test_FFLAGS" != "set"; then
797 if test -z "$FFLAGS"; then
798 echo "********************************************************************"
799 echo "* Note: We have not optimized the Fortran compiler flags on your *"
800 echo "* target, but the default FFLAGS=-O3 should be OK in most cases. *"
801 echo "* You can override this by setting the CFLAGS environment variable.*"
802 echo "********************************************************************"
805 ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
806 echo "*******************************************************************"
807 echo "* Sorry, these optimization settings don't seem to work for *"
808 echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
809 echo "*******************************************************************"
813 echo "******************************************"
814 echo "* Using FFLAGS from environment variable *"
815 echo "******************************************"
818 # Be silent for assembly flags, they are usually not important anyway
819 if test "${ASFLAGS+set}" != set; then
820 if test "${xASFLAGS+set}" != set; then
831 # Below, we include our patched version of libtool.m4, from
832 # the libtool-1.4b beta distribution.
833 # See admin/README.patches for a list of changes!
834 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
836 # serial 47 AC_PROG_LIBTOOL
838 builtin([undefine],[symbols])
842 AC_DEFUN([AC_PROG_LIBTOOL],
843 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
844 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
845 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
846 AC_PROVIDE_IFELSE([AC_PROG_CXX],
848 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
850 dnl And a similar setup for Fortran 77 support
851 AC_PROVIDE_IFELSE([AC_PROG_F77],
853 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
857 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
858 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
859 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
860 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
862 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
864 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
866 [ifdef([AC_PROG_GCJ],
867 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
868 ifdef([A][M_PROG_GCJ],
869 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
870 ifdef([LT_AC_PROG_GCJ],
871 [define([LT_AC_PROG_GCJ],
872 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
873 ])])# AC_PROG_LIBTOOL
878 AC_DEFUN([_AC_PROG_LIBTOOL],
879 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
880 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
881 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
882 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
884 # This can be used to rebuild libtool when needed
885 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
887 # Always use our own libtool.
888 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
891 # Prevent multiple expansion
892 define([AC_PROG_LIBTOOL], [])
898 AC_DEFUN([AC_LIBTOOL_SETUP],
900 AC_REQUIRE([AC_ENABLE_SHARED])dnl
901 AC_REQUIRE([AC_ENABLE_STATIC])dnl
902 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
903 AC_REQUIRE([AC_CANONICAL_HOST])dnl
904 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
905 AC_REQUIRE([AC_PROG_CC])dnl
906 AC_REQUIRE([AC_PROG_LD])dnl
907 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
908 AC_REQUIRE([AC_PROG_NM])dnl
909 AC_REQUIRE([AC_PROG_LN_S])dnl
910 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
911 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
912 AC_REQUIRE([AC_OBJEXT])dnl
913 AC_REQUIRE([AC_EXEEXT])dnl
916 AC_LIBTOOL_SYS_MAX_CMD_LEN
917 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
920 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
921 _LT_AC_PROG_ECHO_BACKSLASH
925 # AIX sometimes has problems with the GCC collect2 program. For some
926 # reason, if we set the COLLECT_NAMES environment variable, the problems
927 # vanish in a puff of smoke.
928 if test "X${COLLECT_NAMES+set}" != Xset; then
935 # Sed substitution that helps us do robust quoting. It backslashifies
936 # metacharacters that are still active within double-quoted strings.
938 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
940 # Same as above, but do not quote variable references.
941 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
943 # Sed substitution to delay expansion of an escaped shell variable in a
944 # double_quote_subst'ed string.
945 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
947 # Sed substitution to avoid accidental globbing in evaled expressions
948 no_glob_subst='s/\*/\\\*/g'
954 default_ofile=libtool
957 # All known linkers require a `.a' archive for static linking (except M$VC,
958 # which needs '.lib').
960 ltmain="$ac_aux_dir/ltmain.sh"
961 ofile="$default_ofile"
962 with_gnu_ld="$lt_cv_prog_gnu_ld"
964 AC_CHECK_TOOL(RANLIB, ranlib, :)
965 AC_CHECK_TOOL(STRIP, strip, :)
970 # Set sane defaults for various variables
971 test -z "$AR" && AR=ar
972 test -z "$AR_FLAGS" && AR_FLAGS=cru
973 test -z "$AS" && AS=as
974 test -z "$CC" && CC=cc
975 test -z "$LTCC" && LTCC=$CC
976 test -z "$DLLTOOL" && DLLTOOL=dlltool
977 test -z "$LD" && LD=ld
978 test -z "$LN_S" && LN_S="ln -s"
979 test -z "$MAGIC_CMD" && MAGIC_CMD=file
980 test -z "$NM" && NM=nm
981 test -z "$OBJDUMP" && OBJDUMP=objdump
982 test -z "$RANLIB" && RANLIB=:
983 test -z "$STRIP" && STRIP=:
984 test -z "$ac_objext" && ac_objext=o
986 # Determine commands to create old-style static archives.
987 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
988 old_postinstall_cmds='chmod 644 $oldlib'
989 old_postuninstall_cmds=
991 if test -n "$RANLIB"; then
992 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
993 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
996 # Only perform the check for file, if the check method requires it
997 case $deplibs_check_method in
999 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1005 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1006 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1007 enable_win32_dll=yes, enable_win32_dll=no)
1009 AC_ARG_ENABLE(libtool-lock,
1010 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1011 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1014 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1015 pic_mode="$withval", pic_mode=default)
1016 test -z "$pic_mode" && pic_mode=default
1018 # Use C for the default configuration in the libtool script
1020 AC_LIBTOOL_LANG_C_CONFIG
1022 ])# AC_LIBTOOL_SETUP
1025 # _LT_AC_SYS_COMPILER
1026 # -------------------
1027 AC_DEFUN([_LT_AC_SYS_COMPILER],
1028 [AC_REQUIRE([AC_PROG_CC])dnl
1030 # If no C compiler was specified, use CC.
1033 # Allow CC to be a program name with arguments.
1036 ])# _LT_AC_SYS_COMPILER
1039 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1040 # ---------------------------------
1041 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1042 [# Find the correct PATH separator. Usually this is `:', but
1043 # DJGPP uses `;' like DOS.
1044 if test "X${PATH_SEPARATOR+set}" != Xset; then
1045 UNAME=${UNAME-`uname 2>/dev/null`}
1047 *-DOS) PATH_SEPARATOR=';' ;;
1048 *) PATH_SEPARATOR=':' ;;
1051 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1054 # _LT_AC_PROG_ECHO_BACKSLASH
1055 # --------------------------
1056 # Add some code to the start of the generated configure script which
1057 # will find an echo command which doesn't interpret backslashes.
1058 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1059 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060 [AC_DIVERT_PUSH(NOTICE)])
1061 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1063 # Check that we are running under the correct shell.
1064 SHELL=${CONFIG_SHELL-/bin/sh}
1068 # Remove one level of quotation (which was required for Make).
1069 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1074 if test "X[$]1" = X--no-reexec; then
1075 # Discard the --no-reexec flag, and continue.
1077 elif test "X[$]1" = X--fallback-echo; then
1078 # Avoid inline document here, it may be left over
1080 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1081 # Yippee, $echo works!
1084 # Restart under the correct shell.
1085 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1088 if test "X[$]1" = X--fallback-echo; then
1089 # used as fallback echo
1097 # The HP-UX ksh and POSIX shell print the target directory to stdout
1099 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1101 if test -z "$ECHO"; then
1102 if test "X${echo_test_string+set}" != Xset; then
1103 # find a string as large as possible, as long as the shell can cope with it
1104 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1105 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1106 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1107 echo_test_string="`eval $cmd`" &&
1108 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1115 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1116 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1117 test "X$echo_testing_string" = "X$echo_test_string"; then
1120 # The Solaris, AIX, and Digital Unix default echo programs unquote
1121 # backslashes. This makes it impossible to quote backslashes using
1122 # echo "$something" | sed 's/\\/\\\\/g'
1124 # So, first we look for a working echo in the user's PATH.
1126 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1127 for dir in $PATH /usr/ucb; do
1129 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1130 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1131 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1132 test "X$echo_testing_string" = "X$echo_test_string"; then
1139 if test "X$echo" = Xecho; then
1140 # We didn't find a better echo, so look for alternatives.
1141 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1142 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1143 test "X$echo_testing_string" = "X$echo_test_string"; then
1144 # This shell has a builtin print -r that does the trick.
1146 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1147 test "X$CONFIG_SHELL" != X/bin/ksh; then
1148 # If we have ksh, try running configure again with it.
1149 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1150 export ORIGINAL_CONFIG_SHELL
1151 CONFIG_SHELL=/bin/ksh
1153 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1157 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1158 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1159 test "X$echo_testing_string" = "X$echo_test_string"; then
1160 # Cool, printf works
1162 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1163 test "X$echo_testing_string" = 'X\t' &&
1164 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1165 test "X$echo_testing_string" = "X$echo_test_string"; then
1166 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1168 SHELL="$CONFIG_SHELL"
1170 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1171 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172 test "X$echo_testing_string" = 'X\t' &&
1173 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174 test "X$echo_testing_string" = "X$echo_test_string"; then
1175 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1177 # maybe with a smaller string...
1180 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1181 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1188 if test "$prev" != 'sed 50q "[$]0"'; then
1189 echo_test_string=`eval $prev`
1190 export echo_test_string
1191 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1193 # Oops. We lost completely, so just stick with echo.
1202 # Copy echo and quote the copy suitably for passing to libtool from
1203 # the Makefile, instead of quoting the original, which is used later.
1205 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1206 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1211 ])# _LT_AC_PROG_ECHO_BACKSLASH
1216 AC_DEFUN([_LT_AC_LOCK],
1217 [AC_ARG_ENABLE(libtool-lock,
1218 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1219 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1221 # Some flags need to be propagated to the compiler or linker for good
1225 # Find out which ABI we are using.
1226 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1227 if AC_TRY_EVAL(ac_compile); then
1228 case `/usr/bin/file conftest.$ac_objext` in
1244 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1245 SAVE_CFLAGS="$CFLAGS"
1246 CFLAGS="$CFLAGS -belf"
1247 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1249 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1251 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1252 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1253 CFLAGS="$SAVE_CFLAGS"
1256 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1257 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1258 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1259 AC_CHECK_TOOL(AS, as, false)
1260 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1262 # recent cygwin and mingw systems supply a stub DllMain which the user
1263 # can override, but on older systems we have to supply one
1264 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1266 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1267 DllMain (0, 0, 0);],
1268 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1271 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1272 # old mingw systems require "-dll" to link a DLL, while more recent ones
1274 SAVE_CFLAGS="$CFLAGS"
1275 CFLAGS="$CFLAGS -mdll"
1276 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1277 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1278 CFLAGS="$SAVE_CFLAGS" ;;
1279 *-*-cygwin* | *-*-pw32*)
1280 # cygwin systems need to pass --dll to the linker, and not link
1281 # crt.o which will require a WinMain@16 definition.
1282 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1288 need_locks="$enable_libtool_lock"
1293 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1294 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1295 # ----------------------------------------------------------------
1296 # Check whether the given compiler option works
1297 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1298 [AC_CACHE_CHECK([$1], [$2],
1300 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1301 save_CFLAGS="$CFLAGS"
1303 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1304 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
1305 # The compiler can only warn and ignore the option if not recognized
1306 # So say no if there are warnings
1307 if test -s conftest.err; then
1308 # Append any errors to the config.log.
1309 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1315 CFLAGS="$save_CFLAGS"
1318 if test x"[$]$2" = xyes; then
1319 ifelse([$5], , :, [$5])
1321 ifelse([$6], , :, [$6])
1323 ])# AC_LIBTOOL_COMPILER_OPTION
1326 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1327 # [ACTION-SUCCESS], [ACTION-FAILURE])
1328 # ------------------------------------------------------------
1329 # Check whether the given compiler option works
1330 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1331 [AC_CACHE_CHECK([$1], [$2],
1333 save_LDFLAGS="$LDFLAGS"
1334 LDFLAGS="$LDFLAGS $3"
1335 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1336 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1337 # The compiler can only warn and ignore the option if not recognized
1338 # So say no if there are warnings
1339 if test -s conftest.err; then
1340 # Append any errors to the config.log.
1341 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1347 LDFLAGS="$save_LDFLAGS"
1350 if test x"[$]$2" = xyes; then
1351 ifelse([$4], , :, [$4])
1353 ifelse([$5], , :, [$5])
1355 ])# AC_LIBTOOL_LINKER_OPTION
1358 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1359 # --------------------------
1360 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1361 [# find the maximum length of command line arguments
1362 AC_MSG_CHECKING([the maximum length of command line arguments])
1363 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1369 # On DJGPP, this test can blow up pretty badly due to problems in libc
1370 # (any single argument exceeding 2000 bytes causes a buffer overrun
1371 # during glob expansion). Even if it were fixed, the result of this
1372 # check would be larger than it should be.
1373 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1377 # Under GNU Hurd, this test is not required because there is
1378 # no limit to the length of command line arguments.
1379 # Libtool will interpret -1 as no limit whatsoever
1380 lt_cv_sys_max_cmd_len=-1; # 12K is about right
1385 # If test is not a shell built-in, we'll probably end up computing a
1386 # maximum length that is only half of the actual maximum length, but
1388 while test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1390 new_result=`expr "X$testring" : ".*" 2>&1` &&
1391 lt_cv_sys_max_cmd_len=$new_result &&
1392 test $i != 17 # 1/2 MB should be enough
1395 testring=$testring$testring
1398 # add a significant safety factor because C++ compilers can tack on massive
1399 # amounts of additional arguments before passing them to the linker. 1/4
1401 len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1402 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
1406 if test -n $lt_cv_sys_max_cmd_len ; then
1407 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1411 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1414 # _LT_AC_CHECK_DLFCN
1415 # --------------------
1416 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1417 [AC_CHECK_HEADERS(dlfcn.h)dnl
1418 ])# _LT_AC_CHECK_DLFCN
1421 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1422 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1423 # ------------------------------------------------------------------
1424 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1425 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1426 if test "$cross_compiling" = yes; then :
1429 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1430 lt_status=$lt_dlunknown
1431 cat > conftest.$ac_ext <<EOF
1432 [#line __oline__ "configure"
1433 #include "confdefs.h"
1442 # define LT_DLGLOBAL RTLD_GLOBAL
1445 # define LT_DLGLOBAL DL_GLOBAL
1447 # define LT_DLGLOBAL 0
1451 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1452 find out it does not work in some platform. */
1453 #ifndef LT_DLLAZY_OR_NOW
1455 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1458 # define LT_DLLAZY_OR_NOW DL_LAZY
1461 # define LT_DLLAZY_OR_NOW RTLD_NOW
1464 # define LT_DLLAZY_OR_NOW DL_NOW
1466 # define LT_DLLAZY_OR_NOW 0
1474 extern "C" void exit (int);
1477 void fnord() { int i=42;}
1480 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1481 int status = $lt_dlunknown;
1485 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1486 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1487 /* dlclose (self); */
1493 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1494 (./conftest; exit; ) 2>/dev/null
1497 x$lt_dlno_uscore) $1 ;;
1498 x$lt_dlneed_uscore) $2 ;;
1499 x$lt_unknown|x*) $3 ;;
1502 # compilation failed
1507 ])# _LT_AC_TRY_DLOPEN_SELF
1510 # AC_LIBTOOL_DLOPEN_SELF
1511 # -------------------
1512 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1513 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1514 if test "x$enable_dlopen" != xyes; then
1515 enable_dlopen=unknown
1516 enable_dlopen_self=unknown
1517 enable_dlopen_self_static=unknown
1524 lt_cv_dlopen="load_add_on"
1526 lt_cv_dlopen_self=yes
1529 cygwin* | mingw* | pw32*)
1530 lt_cv_dlopen="LoadLibrary"
1535 AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
1536 [AC_CHECK_LIB(dld, shl_load,
1537 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"],
1538 [AC_CHECK_LIB(dl, dlopen,
1539 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1540 [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
1541 [AC_CHECK_LIB(svld, dlopen,
1542 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
1550 if test "x$lt_cv_dlopen" != xno; then
1556 case $lt_cv_dlopen in
1558 save_CPPFLAGS="$CPPFLAGS"
1559 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1561 save_LDFLAGS="$LDFLAGS"
1562 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1565 LIBS="$lt_cv_dlopen_libs $LIBS"
1567 AC_CACHE_CHECK([whether a program can dlopen itself],
1568 lt_cv_dlopen_self, [dnl
1569 _LT_AC_TRY_DLOPEN_SELF(
1570 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1571 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1574 if test "x$lt_cv_dlopen_self" = xyes; then
1575 LDFLAGS="$LDFLAGS $link_static_flag"
1576 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1577 lt_cv_dlopen_self_static, [dnl
1578 _LT_AC_TRY_DLOPEN_SELF(
1579 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1580 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1584 CPPFLAGS="$save_CPPFLAGS"
1585 LDFLAGS="$save_LDFLAGS"
1590 case $lt_cv_dlopen_self in
1591 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1592 *) enable_dlopen_self=unknown ;;
1595 case $lt_cv_dlopen_self_static in
1596 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1597 *) enable_dlopen_self_static=unknown ;;
1600 ])# AC_LIBTOOL_DLOPEN_SELF
1603 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1604 # ---------------------------------
1605 # Check to see if options -c and -o are simultaneously supported by compiler
1606 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1607 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1609 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1610 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1611 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1612 $rm -r conftest 2>/dev/null
1616 save_CFLAGS="$CFLAGS"
1617 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1618 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1620 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1621 # that will create temporary files in the current directory regardless of
1622 # the output directory. Thus, making CWD read-only will cause this test
1623 # to fail, enabling locking or at least warning the user not to do parallel
1627 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1629 # The compiler can only warn and ignore the option if not recognized
1630 # So say no if there are warnings
1631 if test -s out/conftest.err; then
1632 # Append any errors to the config.log.
1633 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1635 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1638 CFLAGS="$save_CFLAGS"
1647 ])# AC_LIBTOOL_PROG_CC_C_O
1650 # AC_LIBTOOL_PROG_F77_C_O([TAGNAME])
1651 # ---------------------------------
1652 # Check to see if options -c and -o are simultaneously supported by compiler
1653 AC_DEFUN([AC_LIBTOOL_PROG_F77_C_O],
1654 [AC_REQUIRE([AC_PROG_F77])dnl
1656 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1657 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1658 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1659 $rm -r conftest 2>/dev/null
1663 save_FFLAGS="$FFLAGS"
1664 FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"
1665 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1667 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1668 # that will create temporary files in the current directory regardless of
1669 # the output directory. Thus, making CWD read-only will cause this test
1670 # to fail, enabling locking or at least warning the user not to do parallel
1674 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1676 # The compiler can only warn and ignore the option if not recognized
1677 # So say no if there are warnings
1678 if test -s out/conftest.err; then
1679 # Append any errors to the config.log.
1680 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1682 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1685 FFLAGS="$save_FFLAGS"
1694 ])# AC_LIBTOOL_PROG_F77_C_O
1697 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1698 # -----------------------------------------
1699 # Check to see if we can do hard links to lock some files if needed
1700 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1701 [AC_REQUIRE([_LT_AC_LOCK])dnl
1703 hard_links="nottested"
1704 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1705 # do not overwrite the value of need_locks provided by the user
1706 AC_MSG_CHECKING([if we can lock with hard links])
1709 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1711 ln conftest.a conftest.b 2>&5 || hard_links=no
1712 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1713 AC_MSG_RESULT([$hard_links])
1714 if test "$hard_links" = no; then
1715 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1721 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1726 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1727 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1728 [rm -f .libs 2>/dev/null
1729 mkdir .libs 2>/dev/null
1730 if test -d .libs; then
1733 # MS-DOS does not allow filenames that begin with a dot.
1736 rmdir .libs 2>/dev/null])
1737 objdir=$lt_cv_objdir
1738 ])# AC_LIBTOOL_OBJDIR
1741 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1742 # ----------------------------------------------
1743 # Check hardcoding attributes.
1744 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1745 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1746 _LT_AC_TAGVAR(hardcode_action, $1)=
1747 if test -n "$hardcode_libdir_flag_spec" || \
1748 test -n "$runpath_var"; then
1750 # We can hardcode non-existant directories.
1751 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1752 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1753 # have to relink, otherwise we might link with an installed library
1754 # when we should be linking with a yet-to-be-installed one
1755 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1756 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1757 # Linking always hardcodes the temporary library directory.
1758 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1760 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1761 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1764 # We cannot hardcode anything, or else we can only hardcode existing
1766 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1768 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1770 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1771 # Fast installation is not supported
1772 enable_fast_install=no
1773 elif test "$shlibpath_overrides_runpath" = yes ||
1774 test "$enable_shared" = no; then
1775 # Fast installation is not necessary
1776 enable_fast_install=needless
1778 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1781 # AC_LIBTOOL_SYS_LIB_STRIP
1782 # ------------------------
1783 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1786 AC_MSG_CHECKING([whether stripping libraries is possible])
1787 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1788 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1789 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1790 AC_MSG_RESULT([yes])
1794 ])# AC_LIBTOOL_SYS_LIB_STRIP
1797 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1798 # -----------------------------
1799 # PORTME Fill in your ld.so characteristics
1800 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1801 [AC_MSG_CHECKING([dynamic linker characteristics])
1803 libname_spec='lib$name'
1810 shlibpath_overrides_runpath=unknown
1812 dynamic_linker="$host_os ld.so"
1813 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1814 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1815 need_lib_prefix=unknown
1816 hardcode_into_libs=no
1818 # when you set need_version to no, make sure it does not cause -set_version
1819 # flags to be left without arguments
1820 need_version=unknown
1825 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1826 shlibpath_var=LIBPATH
1828 # AIX 3 has no versioning support, so we append a major version to the name.
1829 soname_spec='${libname}${release}.so$major'
1834 if test "$host_cpu" = ia64; then
1835 # AIX 5 supports IA64
1836 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1837 shlibpath_var=LD_LIBRARY_PATH
1839 # With GCC up to 2.95.x, collect2 would create an import file
1840 # for dependence libraries. The import file would start with
1841 # the line `#! .'. This would cause the generated library to
1842 # depend on `.', always an invalid library. This was fixed in
1843 # development snapshots of GCC prior to 3.0.
1845 [ aix4 | aix4.[01] | aix4.[01].*)]
1846 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1848 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1855 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1856 # soname into executable. Probably we can add versioning support to
1857 # collect2, so additional links can be useful in future.
1858 if test "$aix_use_runtimelinking" = yes; then
1859 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1860 # instead of lib<name>.a to let people know that these are not
1861 # typical AIX shared libraries.
1862 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1864 # We preserve .a as extension for shared libraries through AIX4.2
1865 # and later when we are not doing run time linking.
1866 library_names_spec='${libname}${release}.a $libname.a'
1867 soname_spec='${libname}${release}.so$major'
1869 shlibpath_var=LIBPATH
1870 deplibs_check_method=pass_all
1875 library_names_spec='$libname.ixlibrary $libname.a'
1876 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1877 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | [$Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\'']`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1881 library_names_spec='${libname}.so'
1882 dynamic_linker="$host_os ld.so"
1883 shlibpath_var=LIBRARY_PATH
1889 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1890 soname_spec='${libname}${release}.so$major'
1891 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1892 shlibpath_var=LD_LIBRARY_PATH
1893 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1894 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1895 # the default ld.so.conf also contains /usr/contrib/lib and
1896 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1897 # libtool to hard-code these into programs
1900 cygwin* | mingw* | pw32*)
1901 version_type=windows
1904 case $GCC,$host_os in
1906 library_names_spec='$libname.dll.a'
1907 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1908 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1909 dldir=$destdir/`dirname \$dlpath`~
1910 test -d \$dldir || mkdir -p \$dldir~
1911 $install_prog .libs/$dlname \$dldir/$dlname'
1912 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1913 dlpath=$dir/\$dldll~
1917 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1918 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
1921 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1924 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
1927 dynamic_linker='Win32 ld.exe'
1928 # FIXME: first we should search . and the directory the executable is in
1932 darwin* | rhapsody*)
1933 dynamic_linker="$host_os dyld"
1937 # FIXME: Relying on posixy $() will cause problems for
1938 # cross-compilation, but unfortunately the echo tests do not
1939 # yet detect zsh echo's removal of \ escapes.
1940 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1941 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1942 shlibpath_overrides_runpath=yes
1943 shlibpath_var=DYLD_LIBRARY_PATH
1950 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1951 soname_spec='${libname}${release}.so$major'
1952 shlibpath_var=LD_LIBRARY_PATH
1960 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1961 version_type=freebsd-$objformat
1962 case $version_type in
1964 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1969 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1973 shlibpath_var=LD_LIBRARY_PATH
1976 shlibpath_overrides_runpath=yes
1978 freebsd3.[01]* | freebsdelf3.[01]*)
1979 shlibpath_overrides_runpath=yes
1980 hardcode_into_libs=yes
1983 shlibpath_overrides_runpath=no
1984 hardcode_into_libs=yes
1993 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1994 soname_spec='${libname}${release}.so$major'
1995 shlibpath_var=LD_LIBRARY_PATH
1996 hardcode_into_libs=yes
1999 hpux9* | hpux10* | hpux11*)
2000 # Give a soname corresponding to the major version so that dld.sl refuses to
2001 # link against other versions.
2002 dynamic_linker="$host_os dld.sl"
2006 shlibpath_var=SHLIB_PATH
2007 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2008 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2009 soname_spec='${libname}${release}.sl$major'
2010 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2011 postinstall_cmds='chmod 555 $lib'
2018 soname_spec='${libname}${release}.so.$major'
2019 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2025 case $LD in # libtool.m4 will add one of these switches to LD
2026 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2027 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2028 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2029 *) libsuff= shlibsuff= libmagic=never-match;;
2033 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2034 shlibpath_overrides_runpath=no
2035 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2036 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2039 # No shared lib support for Linux oldld, aout, or coff.
2040 linux*oldld* | linux*aout* | linux*coff*)
2044 # This must be Linux ELF.
2049 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2050 soname_spec='${libname}${release}.so$major'
2051 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2052 shlibpath_var=LD_LIBRARY_PATH
2053 shlibpath_overrides_runpath=no
2054 # This implies no fast_install, which is unacceptable.
2055 # Some rework will be needed to allow for fast_install
2056 # before this can be enabled.
2057 hardcode_into_libs=yes
2059 # We used to test for /lib/ld.so.1 and disable shared libraries on
2060 # powerpc, because MkLinux only supported shared libraries with the
2061 # GNU dynamic linker. Since this was broken with cross compilers,
2062 # most powerpc-linux boxes support dynamic linking these days and
2063 # people can always --disable-shared, the test was removed, and we
2064 # assume the GNU/Linux dynamic linker is in use.
2065 dynamic_linker='GNU/Linux ld.so'
2072 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2073 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2074 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2075 dynamic_linker='NetBSD (a.out) ld.so'
2077 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2078 soname_spec='${libname}${release}.so$major'
2079 dynamic_linker='NetBSD ld.elf_so'
2081 shlibpath_var=LD_LIBRARY_PATH
2082 shlibpath_overrides_runpath=yes
2083 hardcode_into_libs=yes
2088 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2089 shlibpath_var=LD_LIBRARY_PATH
2090 shlibpath_overrides_runpath=yes
2095 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2096 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2097 shlibpath_var=LD_LIBRARY_PATH
2098 file_magic_cmd=/usr/bin/file
2099 file_magic_test_file=`echo /usr/lib/libc.so.*`
2100 if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
2101 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
2103 deplibs_check_method='file_magic OpenBSD.* shared library'
2108 libname_spec='$name'
2110 library_names_spec='$libname.dll $libname.a'
2111 dynamic_linker='OS/2 ld.exe'
2112 shlibpath_var=LIBPATH
2115 osf3* | osf4* | osf5*)
2118 soname_spec='${libname}${release}.so'
2119 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2120 shlibpath_var=LD_LIBRARY_PATH
2121 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2122 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2127 soname_spec='${libname}${release}.so$major'
2128 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2129 shlibpath_var=LD_LIBRARY_PATH
2136 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2137 soname_spec='${libname}${release}.so$major'
2138 shlibpath_var=LD_LIBRARY_PATH
2139 shlibpath_overrides_runpath=yes
2140 hardcode_into_libs=yes
2141 # ldd complains unless libraries are executable
2142 postinstall_cmds='chmod +x $lib'
2147 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2148 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2149 shlibpath_var=LD_LIBRARY_PATH
2150 shlibpath_overrides_runpath=yes
2151 if test "$with_gnu_ld" = yes; then
2157 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2159 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2160 soname_spec='${libname}${release}.so$major'
2161 shlibpath_var=LD_LIBRARY_PATH
2162 case $host_vendor in
2164 shlibpath_overrides_runpath=no
2169 shlibpath_overrides_runpath=no
2170 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2176 if test -d /usr/nec ;then
2178 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2179 soname_spec='$libname.so.$major'
2180 shlibpath_var=LD_LIBRARY_PATH
2186 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2187 soname_spec='${libname}${release}.so$major'
2188 shlibpath_var=LD_LIBRARY_PATH
2195 AC_MSG_RESULT([$dynamic_linker])
2196 test "$dynamic_linker" = no && can_build_shared=no
2197 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2202 AC_DEFUN([_LT_AC_TAGCONFIG],
2203 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2204 # Determine the tags from the languages used - this is another
2205 # hack by Erik L - if the flag for -g is set, then AC_PROG_*** has
2206 # probably been called. NB: I removed the GCJ support...
2208 if test "${ac_cv_prog_cxx_g+set}" = set; then
2211 if test "${ac_cv_prog_f77_g+set}" = set; then
2212 if test -n "$tagnames"; then
2219 if test -f "$ltmain" && test -n "$tagnames"; then
2220 if test ! -f "${ofile}"; then
2221 AC_MSG_WARN([output file `$ofile' does not exist])
2224 if test -z "$LTCC"; then
2225 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2226 if test -z "$LTCC"; then
2227 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2229 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2233 # Extract list of available tagged configurations in $ofile.
2234 # Note that this assumes the entire list is on one line.
2235 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2237 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2238 for tagname in $tagnames; do
2240 # Check whether tagname contains only valid characters
2241 [case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in]
2243 *) AC_MSG_ERROR([invalid tag name: $tagname])
2247 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2249 AC_MSG_ERROR([tag name $tagname already exists])
2252 # Update the list of available tags.
2253 if test -n "$tagname"; then
2254 echo appending configuration tag \"$tagname\" to $ofile
2258 AC_LIBTOOL_LANG_CXX_CONFIG
2262 AC_LIBTOOL_LANG_F77_CONFIG
2266 AC_LIBTOOL_LANG_GCJ_CONFIG
2270 AC_MSG_ERROR([Unsupported tag name: $tagname])
2274 # Append the new tag name to the list of available tags.
2275 available_tags="$available_tags $tagname"
2280 # Now substitute the updated list of available tags.
2281 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2282 mv "${ofile}T" "$ofile"
2286 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2289 ])# _LT_AC_TAGCONFIG
2294 # enable checks for dlopen support
2295 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2296 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2297 ])# AC_LIBTOOL_DLOPEN
2300 # AC_LIBTOOL_WIN32_DLL
2301 # --------------------
2302 # declare package support for building win32 dll's
2303 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2304 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2305 ])# AC_LIBTOOL_WIN32_DLL
2308 # AC_ENABLE_SHARED([DEFAULT])
2309 # ---------------------------
2310 # implement the --enable-shared flag
2311 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2312 AC_DEFUN([AC_ENABLE_SHARED],
2313 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2314 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2315 AC_ARG_ENABLE(shared,
2316 changequote(<<, >>)dnl
2317 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2318 changequote([, ])dnl
2319 [p=${PACKAGE-default}
2321 yes) enable_shared=yes ;;
2322 no) enable_shared=no ;;
2325 # Look at the argument we got. We use all the common list separators.
2326 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2327 for pkg in $enableval; do
2329 if test "X$pkg" = "X$p"; then
2336 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
2337 ])# AC_ENABLE_SHARED
2342 #- set the default shared flag to --disable-shared
2343 AC_DEFUN([AC_DISABLE_SHARED],
2344 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2345 AC_ENABLE_SHARED(no)
2346 ])# AC_DISABLE_SHARED
2349 # AC_ENABLE_STATIC([DEFAULT])
2350 # ---------------------------
2351 # implement the --enable-static flag
2352 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2353 AC_DEFUN([AC_ENABLE_STATIC],
2354 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2355 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2356 AC_ARG_ENABLE(static,
2357 changequote(<<, >>)dnl
2358 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2359 changequote([, ])dnl
2360 [p=${PACKAGE-default}
2362 yes) enable_static=yes ;;
2363 no) enable_static=no ;;
2366 # Look at the argument we got. We use all the common list separators.
2367 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2368 for pkg in $enableval; do
2370 if test "X$pkg" = "X$p"; then
2377 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
2378 ])# AC_ENABLE_STATIC
2383 # set the default static flag to --disable-static
2384 AC_DEFUN([AC_DISABLE_STATIC],
2385 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2386 AC_ENABLE_STATIC(no)
2387 ])# AC_DISABLE_STATIC
2390 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2391 # ---------------------------------
2392 # implement the --enable-fast-install flag
2393 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2394 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2395 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2396 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2397 AC_ARG_ENABLE(fast-install,
2398 changequote(<<, >>)dnl
2399 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2400 changequote([, ])dnl
2401 [p=${PACKAGE-default}
2403 yes) enable_fast_install=yes ;;
2404 no) enable_fast_install=no ;;
2406 enable_fast_install=no
2407 # Look at the argument we got. We use all the common list separators.
2408 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
2409 for pkg in $enableval; do
2411 if test "X$pkg" = "X$p"; then
2412 enable_fast_install=yes
2418 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
2419 ])# AC_ENABLE_FAST_INSTALL
2422 # AC_DISABLE_FAST_INSTALL
2423 # -----------------------
2424 # set the default to --disable-fast-install
2425 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2426 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2427 AC_ENABLE_FAST_INSTALL(no)
2428 ])# AC_DISABLE_FAST_INSTALL
2431 # AC_LIBTOOL_PICMODE([MODE])
2432 # --------------------------
2433 # implement the --with-pic flag
2434 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2435 AC_DEFUN([AC_LIBTOOL_PICMODE],
2436 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2437 pic_mode=ifelse($#,1,$1,default)
2438 ])# AC_LIBTOOL_PICMODE
2441 # AC_PATH_TOOL_PREFIX
2442 # -------------------
2443 # find a file program which can recognise shared library
2444 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2445 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2446 AC_MSG_CHECKING([for $1])
2447 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2450 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2453 lt_save_MAGIC_CMD="$MAGIC_CMD"
2454 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${PATH_SEPARATOR-:}"
2455 dnl $ac_dummy forces splitting on constant user-supplied paths.
2456 dnl POSIX.2 word splitting is done only on the output of word expansions,
2457 dnl not every word. This closes a longstanding sh security hole.
2458 ac_dummy="ifelse([$2], , $PATH, [$2])"
2459 for ac_dir in $ac_dummy; do
2461 test -z "$ac_dir" && ac_dir=.
2462 if test -f $ac_dir/$1; then
2463 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2464 if test -n "$file_magic_test_file"; then
2465 case $deplibs_check_method in
2467 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2468 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2469 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2470 egrep "$file_magic_regex" > /dev/null; then
2475 *** Warning: the command libtool uses to detect shared libraries,
2476 *** $file_magic_cmd, produces output that libtool cannot recognize.
2477 *** The result is that libtool may fail to recognize shared libraries
2478 *** as such. This will affect the creation of libtool libraries that
2479 *** depend on shared libraries, but programs linked with such libtool
2480 *** libraries will work regardless of this problem. Nevertheless, you
2481 *** may want to report the problem to your system manager and/or to
2482 *** bug-libtool@gnu.org
2492 MAGIC_CMD="$lt_save_MAGIC_CMD"
2495 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2496 if test -n "$MAGIC_CMD"; then
2497 AC_MSG_RESULT($MAGIC_CMD)
2501 ])# AC_PATH_TOOL_PREFIX
2506 # find a file program which can recognise a shared library
2507 AC_DEFUN([AC_PATH_MAGIC],
2508 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2509 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2510 if test -z "$lt_cv_path_MAGIC_CMD"; then
2511 if test -n "$ac_tool_prefix"; then
2512 AC_PATH_TOOL_PREFIX(file, /usr/bin${PATH_SEPARATOR-:}$PATH)
2522 # find the path to the GNU or non-GNU linker
2523 AC_DEFUN([AC_PROG_LD],
2524 [AC_ARG_WITH(gnu-ld,
2525 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2526 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2527 AC_REQUIRE([AC_PROG_CC])dnl
2528 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2529 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2530 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2532 if test "$GCC" = yes; then
2533 # Check if gcc -print-prog-name=ld gives a path.
2534 AC_MSG_CHECKING([for ld used by GCC])
2537 # gcc leaves a trailing carriage return which upsets mingw
2538 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2540 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2543 # Accept absolute paths.
2544 [[\\/]]* | ?:[[\\/]]*)
2545 [re_direlt='/[^/][^/]*/\.\./']
2546 # Canonicalize the path of ld
2547 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2548 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2549 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2551 test -z "$LD" && LD="$ac_prog"
2554 # If it fails, then pretend we aren't using GCC.
2558 # If it is relative, then search for the first ld in PATH.
2562 elif test "$with_gnu_ld" = yes; then
2563 AC_MSG_CHECKING([for GNU ld])
2565 AC_MSG_CHECKING([for non-GNU ld])
2567 AC_CACHE_VAL(lt_cv_path_LD,
2568 [if test -z "$LD"; then
2569 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2570 for ac_dir in $PATH; do
2572 test -z "$ac_dir" && ac_dir=.
2573 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2574 lt_cv_path_LD="$ac_dir/$ac_prog"
2575 # Check to see if the program is GNU ld. I'd rather use --version,
2576 # but apparently some GNU ld's only accept -v.
2577 # Break only if it was the GNU/non-GNU ld that we prefer.
2578 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2579 test "$with_gnu_ld" != no && break
2581 test "$with_gnu_ld" != yes && break
2587 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2590 if test -n "$LD"; then
2595 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2602 AC_DEFUN([AC_PROG_LD_GNU],
2603 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2604 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2605 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2606 lt_cv_prog_gnu_ld=yes
2608 lt_cv_prog_gnu_ld=no
2610 with_gnu_ld=$lt_cv_prog_gnu_ld
2614 # AC_PROG_LD_RELOAD_FLAG
2615 # ----------------------
2616 # find reload flag for linker
2617 # -- PORTME Some linkers may need a different reload flag.
2618 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2619 [AC_CACHE_CHECK([for $LD option to reload object files],
2620 lt_cv_ld_reload_flag,
2621 [lt_cv_ld_reload_flag='-r'])
2622 reload_flag=$lt_cv_ld_reload_flag
2623 case $reload_flag in
2625 *) reload_flag=" $reload_flag" ;;
2627 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2628 ])# AC_PROG_LD_RELOAD_FLAG
2631 # AC_DEPLIBS_CHECK_METHOD
2632 # -----------------------
2633 # how to check for library dependencies
2634 # -- PORTME fill in with the dynamic library characteristics
2635 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2636 [AC_CACHE_CHECK([how to recognise dependant libraries],
2637 lt_cv_deplibs_check_method,
2638 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2639 lt_cv_file_magic_test_file=
2640 lt_cv_deplibs_check_method='unknown'
2641 # Need to set the preceding variable on all platforms that support
2642 # interlibrary dependencies.
2643 # 'none' -- dependencies not supported.
2644 # `unknown' -- same as none, but documents that we really don't know.
2645 # 'pass_all' -- all dependencies passed with no checks.
2646 # 'test_compile' -- check by making test program.
2647 # ['file_magic [regex]'] -- check by looking for files in library path
2648 # which responds to the $file_magic_cmd with a given egrep regex.
2649 # If you have `file' or equivalent on your system and you're not sure
2650 # whether `pass_all' will *always* work, you probably want this one.
2654 lt_cv_deplibs_check_method=pass_all
2658 lt_cv_deplibs_check_method=pass_all
2662 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
2663 lt_cv_file_magic_cmd='/usr/bin/file -L'
2664 lt_cv_file_magic_test_file=/shlib/libc.so
2667 cygwin* | mingw* | pw32*)
2668 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2669 lt_cv_file_magic_cmd='$OBJDUMP -f'
2672 darwin* | rhapsody*)
2673 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2674 lt_cv_file_magic_cmd='/usr/bin/file -L'
2676 rhapsody* | darwin1.[012])
2677 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2680 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2686 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2689 # Not sure whether the presence of OpenBSD here was a mistake.
2690 # Let's accept both of them until this is cleared up.
2691 [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
2692 lt_cv_file_magic_cmd=/usr/bin/file
2693 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2697 lt_cv_deplibs_check_method=pass_all
2702 lt_cv_deplibs_check_method=pass_all
2705 hpux10.20* | hpux11*)
2706 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
2707 lt_cv_file_magic_cmd=/usr/bin/file
2708 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2714 # this will be overridden with pass_all, but let us keep it just in case
2715 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2719 *-32|*"-32 ") libmagic=32-bit;;
2720 *-n32|*"-n32 ") libmagic=N32;;
2721 *-64|*"-64 ") libmagic=64-bit;;
2722 *) libmagic=never-match;;
2724 # this will be overridden with pass_all, but let us keep it just in case
2725 [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
2728 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2729 lt_cv_deplibs_check_method=pass_all
2732 # This must be Linux ELF.
2735 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* )
2736 lt_cv_deplibs_check_method=pass_all ;;
2738 # glibc up to 2.1.1 does not perform some relocations on ARM
2739 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
2741 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2745 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2746 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
2748 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
2753 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
2754 lt_cv_file_magic_cmd=/usr/bin/file
2755 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2758 osf3* | osf4* | osf5*)
2759 # this will be overridden with pass_all, but let us keep it just in case
2760 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2761 lt_cv_file_magic_test_file=/shlib/libc.so
2762 lt_cv_deplibs_check_method=pass_all
2766 lt_cv_deplibs_check_method=pass_all
2770 lt_cv_deplibs_check_method=pass_all
2771 lt_cv_file_magic_test_file=/lib/libc.so
2774 [sysv5uw[78]* | sysv4*uw2*)]
2775 lt_cv_deplibs_check_method=pass_all
2778 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2779 case $host_vendor in
2781 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
2782 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2785 lt_cv_deplibs_check_method=pass_all
2788 lt_cv_file_magic_cmd='/bin/file'
2789 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
2792 lt_cv_file_magic_cmd='/bin/file'
2793 [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
2794 lt_cv_file_magic_test_file=/lib/libc.so
2800 file_magic_cmd=$lt_cv_file_magic_cmd
2801 deplibs_check_method=$lt_cv_deplibs_check_method
2802 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2803 ])# AC_DEPLIBS_CHECK_METHOD
2808 # find the path to a BSD-compatible name lister
2809 AC_DEFUN([AC_PROG_NM],
2810 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2811 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2812 if test -n "$NM"; then
2813 # Let the user override the test.
2816 IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2817 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2819 test -z "$ac_dir" && ac_dir=.
2820 tmp_nm=$ac_dir/${ac_tool_prefix}nm
2821 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2822 # Check to see if the nm accepts a BSD-compat flag.
2823 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2824 # nm: unknown option "B" ignored
2825 # Tru64's nm complains that /dev/null is an invalid object file
2826 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2827 lt_cv_path_NM="$tmp_nm -B"
2829 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2830 lt_cv_path_NM="$tmp_nm -p"
2833 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2834 continue # so that we can try to find one that supports BSD flags
2839 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2847 # check for math library
2848 AC_DEFUN([AC_CHECK_LIBM],
2849 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2852 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2853 # These system don't have libm
2856 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2857 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2860 AC_CHECK_LIB(m, main, LIBM="-lm")
2866 # AC_CHECK_AIX_LIBPATH()
2867 # Links a minimal program and checks the executable
2868 # for the system default hardcoded library path. In most cases,
2869 # this is /usr/lib:/lib, but when the MPI compilers are used
2870 # the location of the communication and MPI libs are included too.
2871 # If we don't find anything, use the default library path according
2872 # to the aix ld manual.
2873 AC_DEFUN([AC_CHECK_AIX_LIBPATH],
2874 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2875 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`
2876 # Check for a 64-bit object if we didn't find anything.
2877 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`; fi],[])
2878 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2882 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2883 # -----------------------------------
2884 # sets LIBLTDL to the link flags for the libltdl convenience library and
2885 # INCLTDL to the include flags for the libltdl header and adds
2886 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2887 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2888 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2889 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed with
2890 # '${top_srcdir}/' (note the single quotes!). If your package is not
2891 # flat and you're not using automake, define top_builddir and
2892 # top_srcdir appropriately in the Makefiles.
2893 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2894 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2895 case $enable_ltdl_convenience in
2896 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2897 "") enable_ltdl_convenience=yes
2898 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2900 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2901 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2902 ])# AC_LIBLTDL_CONVENIENCE
2905 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2906 # -----------------------------------
2907 # sets LIBLTDL to the link flags for the libltdl installable library and
2908 # INCLTDL to the include flags for the libltdl header and adds
2909 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2910 # and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2911 # DIRECTORY is not provided and an installed libltdl is not found, it is
2912 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2913 # and INCLTDL will be prefixed with '${top_srcdir}/' (note the single
2914 # quotes!). If your package is not flat and you're not using automake,
2915 # define top_builddir and top_srcdir appropriately in the Makefiles.
2916 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2917 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2918 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2919 AC_CHECK_LIB(ltdl, main,
2920 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2921 [if test x"$enable_ltdl_install" = xno; then
2922 AC_MSG_WARN([libltdl not installed, but installation disabled])
2924 enable_ltdl_install=yes
2927 if test x"$enable_ltdl_install" = x"yes"; then
2928 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2929 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2930 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2932 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2936 ])# AC_LIBLTDL_INSTALLABLE
2939 # If this macro is not defined by Autoconf, define it here.
2940 ifdef([AC_PROVIDE_IFELSE],
2942 [define([AC_PROVIDE_IFELSE],
2943 [ifdef([AC_PROVIDE_$1],
2952 # enable support for C++ libraries
2953 AC_DEFUN([AC_LIBTOOL_CXX],
2954 [AC_REQUIRE([_LT_AC_LANG_CXX])
2960 AC_DEFUN([_LT_AC_LANG_CXX],
2961 [AC_REQUIRE([AC_PROG_CXX])
2962 AC_REQUIRE([AC_PROG_CXXCPP])
2968 # enable support for Fortran 77 libraries
2969 AC_DEFUN([AC_LIBTOOL_F77],
2970 [AC_REQUIRE([_LT_AC_LANG_F77])
2976 AC_DEFUN([_LT_AC_LANG_F77],
2977 [AC_REQUIRE([AC_PROG_F77])
2983 # enable support for GCJ libraries
2984 AC_DEFUN([AC_LIBTOOL_GCJ],
2985 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2991 AC_DEFUN([_LT_AC_LANG_GCJ],
2992 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2993 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2994 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2995 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2996 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2997 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3001 # AC_LIBTOOL_LANG_C_CONFIG
3002 # ------------------------
3003 # Ensure that the configuration vars for the C compiler are
3004 # suitably defined. Those variables are subsequently used by
3005 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3006 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3007 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3011 # Source file extension for C test sources.
3014 # Object file extension for compiled C test sources.
3016 _LT_AC_TAGVAR(objext, $1)=$objext
3018 # Code to be used in simple compile tests
3019 lt_simple_compile_test_code="int some_variable = 0;\n"
3021 # Code to be used in simple link tests
3022 lt_simple_link_test_code='main(){return(0);}\n'
3027 # Check for any special shared library compilation flags.
3029 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3030 if test "$GCC" = no; then
3033 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3037 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3038 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3039 if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]"] >/dev/null; then :
3041 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3042 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3048 # Check to make sure the static flag actually works.
3050 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3051 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3052 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3054 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3057 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3058 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3059 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3060 AC_LIBTOOL_PROG_CC_C_O($1)
3061 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3062 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3063 AC_LIBTOOL_SYS_LIB_STRIP
3064 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3065 AC_LIBTOOL_DLOPEN_SELF($1)
3067 # Report which librarie types wil actually be built
3068 AC_MSG_CHECKING([if libtool supports shared libraries])
3069 AC_MSG_RESULT([$can_build_shared])
3071 AC_MSG_CHECKING([whether to build shared libraries])
3072 test "$can_build_shared" = "no" && enable_shared=no
3074 # On AIX, shared libraries and static libraries use the same namespace, and
3075 # are all built from PIC.
3078 test "$enable_shared" = yes && enable_static=no
3079 if test -n "$RANLIB"; then
3080 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3081 postinstall_cmds='$RANLIB $lib'
3086 test "$enable_shared" = yes && enable_static=no
3089 AC_MSG_RESULT([$enable_shared])
3091 AC_MSG_CHECKING([whether to build static libraries])
3092 # Make sure either enable_shared or enable_static is yes.
3093 test "$enable_shared" = yes || enable_static=yes
3094 AC_MSG_RESULT([$enable_static])
3096 AC_LIBTOOL_CONFIG($1)
3100 ])# AC_LIBTOOL_LANG_C_CONFIG
3103 # AC_LIBTOOL_LANG_CXX_CONFIG
3104 # --------------------------
3105 # Ensure that the configuration vars for the C compiler are
3106 # suitably defined. Those variables are subsequently used by
3107 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3108 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3109 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3111 AC_REQUIRE([AC_PROG_CXX])
3112 AC_REQUIRE([AC_PROG_CXXCPP])
3114 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3115 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3116 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3117 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3118 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3119 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3120 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3121 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3122 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3123 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3124 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3125 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3126 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3128 # Dependencies to place before and after the object being linked:
3129 _LT_AC_TAGVAR(predep_objects, $1)=
3130 _LT_AC_TAGVAR(postdep_objects, $1)=
3131 _LT_AC_TAGVAR(predeps, $1)=
3132 _LT_AC_TAGVAR(postdeps, $1)=
3133 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3135 # Source file extension for C test sources.
3138 # Object file extension for compiled C test sources.
3140 _LT_AC_TAGVAR(objext, $1)=$objext
3142 # Code to be used in simple compile tests
3143 lt_simple_compile_test_code="int some_variable = 0;\n"
3145 # Code to be used in simple link tests
3146 lt_simple_link_test_code='int main(int char *[]) { return(0); }\n'
3148 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3151 # Allow CC to be a program name with arguments.
3156 _LT_AC_TAGVAR(compiler, $1)=$CC
3157 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3159 # We don't want -fno-exception wen compiling C++ code, so set the
3160 # no_builtin_flag separately
3161 if test "$GXX" = yes; then
3162 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3164 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3167 if test "$GXX" = yes; then
3168 # Set up default GNU C++ configuration
3170 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3171 # archiving commands below assume that GNU ld is being used.
3172 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
3173 egrep 'GNU ld' > /dev/null; then
3176 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3177 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3179 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3180 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3182 # If archive_cmds runs LD, not CC, wlarc should be empty
3183 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3184 # investigate it a little bit more. (MM)
3187 # ancient GNU ld didn't support --whole-archive et. al.
3188 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3189 egrep 'no-whole-archive' > /dev/null; then
3190 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3192 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3198 # A generic and very simple default shared library creation
3199 # command for GNU C++ for the case where it uses the native
3200 # linker, instead of GNU ld. If possible, this setting should
3201 # overridden to take advantage of the native linker features on
3202 # the platform it is being used on.
3203 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3206 # Commands to make compiler produce verbose output that lists
3207 # what "hidden" libraries, object files and flags are used when
3208 # linking a shared library.
3209 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3217 # PORTME: fill in a description of your system's C++ link characteristics
3218 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3219 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3222 # FIXME: insert proper C++ library support
3223 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3226 _LT_AC_TAGVAR(archive_cmds, $1)=''
3227 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3228 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3229 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3230 # When large executables or shared objects are built, AIX ld can
3231 # have problems creating the table of contents. If linking a library
3232 # or program results in "error TOC overflow" add -mminimal-toc to
3233 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3234 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3235 if test "$GXX" = yes; then
3236 case $host_os in aix4.[012]|aix4.[012].*)
3237 # We only want to do this on AIX 4.2 and lower, the check
3238 # below for broken collect2 doesn't work under 4.3+
3239 collect2name=`${CC} -print-prog-name=collect2`
3240 if test -f "$collect2name" && \
3241 strings "$collect2name" | grep resolve_lib_name >/dev/null
3243 # We have reworked collect2
3244 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3246 # We have old collect2
3247 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3248 # It fails to find uninstalled libraries when the uninstalled
3249 # path is not listed in the libpath. Setting hardcode_minus_L
3250 # to unsupported forces relinking
3251 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3252 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3253 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3256 shared_flag='-shared'
3259 if test "$host_cpu" = ia64; then
3260 shared_flag='${wl}-G'
3262 shared_flag='${wl}-bM:SRE'
3266 if test "$host_cpu" = ia64; then
3267 # On IA64, the linker does run time linking by default, so we don't
3268 # have to do anything special.
3269 aix_use_runtimelinking=no
3270 exp_sym_flag='-Bexport'
3273 # Test if we are trying to use run time linking, or normal AIX style linking.
3274 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
3275 aix_use_runtimelinking=no
3276 for ld_flag in $LDFLAGS; do
3277 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
3278 aix_use_runtimelinking=yes
3282 exp_sym_flag='-bexport'
3283 no_entry_flag='-bnoentry'
3285 # It seems that -bexpall does not export symbols beginning with
3286 # underscore (_), so it is better to generate a list of symbols to export.
3287 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3288 if test "$aix_use_runtimelinking" = yes; then
3289 # Determine the default libpath from the value encoded in an empty executable.
3290 AC_CHECK_AIX_LIBPATH
3291 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3293 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -Wl,-G'
3294 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols"
3296 if test "$host_cpu" = ia64; then
3297 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3298 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3299 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3301 # Determine the default libpath from the value encoded in an empty executable.
3302 AC_CHECK_AIX_LIBPATH
3303 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3305 # Warning - without using the other run time loading flags, -berok will
3306 # link without error, but may produce a broken library.
3307 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bnoerok'
3308 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3309 # -bexpall does not export symbols beginning with underscore (_)
3310 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3311 # Exported symbols can be pulled into shared objects from archives
3312 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3313 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3314 # This is similar to how AIX traditionally builds it's shared libraries.
3315 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3320 case $cc_basename in
3322 # FIXME: insert proper C++ library support
3323 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3328 case $cc_basename in
3330 # FIXME: insert proper C++ library support
3331 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3334 # Green Hills C++ Compiler
3335 # FIXME: insert proper C++ library support
3336 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3339 # FIXME: insert proper C++ library support
3340 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3345 # C++ shared libraries reported to be fairly broken before switch to ELF
3346 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3349 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3352 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3354 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3357 if test $with_gnu_ld = no; then
3358 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3359 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3360 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3362 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3363 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
3364 # location of the library.
3366 case $cc_basename in
3368 # FIXME: insert proper C++ library support
3369 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3373 hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
3374 *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
3376 # Commands to make compiler produce verbose output that lists
3377 # what "hidden" libraries, object files and flags are used when
3378 # linking a shared library.
3380 # There doesn't appear to be a way to prevent this compiler from
3381 # explicitly linking system object files so we need to strip them
3382 # from the output so that they don't get included in the library
3384 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3387 if test $GXX = yes; then
3388 if test $with_gnu_ld = no; then
3390 hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
3391 *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
3395 # FIXME: insert proper C++ library support
3396 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3402 case $cc_basename in
3405 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3407 # Archives containing C++ object files must be created using
3408 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3409 # necessary to make sure instantiated templates are included
3411 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3414 if test "$GXX" = yes; then
3415 if test "$with_gnu_ld" = no; then
3416 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3418 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
3421 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3422 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3423 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3428 case $cc_basename in
3430 # Kuck and Associates, Inc. (KAI) C++ Compiler
3432 # KCC will only create a shared library if the output file
3433 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3434 # to its proper name (with version) after linking.
3435 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3436 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3438 # Commands to make compiler produce verbose output that lists
3439 # what "hidden" libraries, object files and flags are used when
3440 # linking a shared library.
3442 # There doesn't appear to be a way to prevent this compiler from
3443 # explicitly linking system object files so we need to strip them
3444 # from the output so that they don't get included in the library
3446 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3449 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3451 # Archives containing C++ object files must be created using
3452 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3453 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3457 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3458 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3460 runpath_var=LD_RUN_PATH
3461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3464 # Commands to make compiler produce verbose output that lists
3465 # what "hidden" libraries, object files and flags are used when
3466 # linking a shared library.
3468 # There doesn't appear to be a way to prevent this compiler from
3469 # explicitly linking system object files so we need to strip them
3470 # from the output so that they don't get included in the library
3472 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3477 # FIXME: insert proper C++ library support
3478 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3481 # FIXME: insert proper C++ library support
3482 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3485 case $cc_basename in
3487 # FIXME: insert proper C++ library support
3488 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3491 # FIXME: insert proper C++ library support
3492 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3497 # NetBSD uses g++ - do we need to do anything?
3500 case $cc_basename in
3502 # Kuck and Associates, Inc. (KAI) C++ Compiler
3504 # KCC will only create a shared library if the output file
3505 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3506 # to its proper name (with version) after linking.
3507 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3509 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3510 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3512 # Archives containing C++ object files must be created using
3513 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3514 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3518 # Rational C++ 2.4.1
3519 # FIXME: insert proper C++ library support
3520 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3523 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3524 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3527 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3529 # Commands to make compiler produce verbose output that lists
3530 # what "hidden" libraries, object files and flags are used when
3531 # linking a shared library.
3533 # There doesn't appear to be a way to prevent this compiler from
3534 # explicitly linking system object files so we need to strip them
3535 # from the output so that they don't get included in the library
3537 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3540 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3541 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3542 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3544 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3545 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3547 # Commands to make compiler produce verbose output that lists
3548 # what "hidden" libraries, object files and flags are used when
3549 # linking a shared library.
3550 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3553 # FIXME: insert proper C++ library support
3554 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3560 case $cc_basename in
3562 # Kuck and Associates, Inc. (KAI) C++ Compiler
3564 # KCC will only create a shared library if the output file
3565 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3566 # to its proper name (with version) after linking.
3567 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3569 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3570 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3572 # Archives containing C++ object files must be created using
3573 # the KAI C++ compiler.
3574 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3577 # Rational C++ 2.4.1
3578 # FIXME: insert proper C++ library support
3579 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3582 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3583 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3584 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
3585 echo "-hidden">> $lib.exp~
3586 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
3589 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3590 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3592 # Commands to make compiler produce verbose output that lists
3593 # what "hidden" libraries, object files and flags are used when
3594 # linking a shared library.
3596 # There doesn't appear to be a way to prevent this compiler from
3597 # explicitly linking system object files so we need to strip them
3598 # from the output so that they don't get included in the library
3600 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3603 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3604 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3605 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3607 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3608 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3610 # Commands to make compiler produce verbose output that lists
3611 # what "hidden" libraries, object files and flags are used when
3612 # linking a shared library.
3613 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3616 # FIXME: insert proper C++ library support
3617 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3623 # FIXME: insert proper C++ library support
3624 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3627 case $cc_basename in
3629 # FIXME: insert proper C++ library support
3630 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3633 # FIXME: insert proper C++ library support
3634 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3639 case $cc_basename in
3642 # FIXME: insert proper C++ library support
3643 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3647 # FIXME: insert proper C++ library support
3648 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3651 # FIXME: insert proper C++ library support
3652 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3657 case $cc_basename in
3659 # Sun C++ 4.2, 5.x and Centerline C++
3660 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3661 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3662 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3663 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3665 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3666 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3668 solaris2.[0-5] | solaris2.[0-5].*) ;;
3670 # The C++ compiler is used as linker so we must use $wl
3671 # flag to pass the commands to the underlying system
3673 # Supported since Solaris 2.6 (maybe 2.5.1?)
3674 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3677 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3679 # Commands to make compiler produce verbose output that lists
3680 # what "hidden" libraries, object files and flags are used when
3681 # linking a shared library.
3683 # There doesn't appear to be a way to prevent this compiler from
3684 # explicitly linking system object files so we need to strip them
3685 # from the output so that they don't get included in the library
3687 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3689 # Archives containing C++ object files must be created using
3690 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3691 # necessary to make sure instantiated templates are included
3693 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3696 # Green Hills C++ Compiler
3697 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3699 # The C++ compiler must be used to create the archive.
3700 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3703 # GNU C++ compiler with Solaris linker
3704 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3705 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3706 if $CC --version | egrep -v '^2\.7' > /dev/null; then
3707 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3708 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3709 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3711 # Commands to make compiler produce verbose output that lists
3712 # what "hidden" libraries, object files and flags are used when
3713 # linking a shared library.
3714 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3716 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3719 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3720 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3722 # Commands to make compiler produce verbose output that lists
3723 # what "hidden" libraries, object files and flags are used when
3724 # linking a shared library.
3725 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3728 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3734 case $cc_basename in
3736 # NonStop-UX NCC 3.20
3737 # FIXME: insert proper C++ library support
3738 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3741 # FIXME: insert proper C++ library support
3742 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3747 # FIXME: insert proper C++ library support
3748 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3751 # FIXME: insert proper C++ library support
3752 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3755 # FIXME: insert proper C++ library support
3756 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3759 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3760 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3762 # Figure out "hidden" C++ library dependencies from verbose
3763 # compiler output whening linking a shared library.
3764 cat > conftest.$ac_ext <<EOF
3768 Foo (void) { a = 0; }
3775 if AC_TRY_EVAL(ac_compile); then
3776 # Parse the compiler output and extract the necessary
3777 # objects, libraries and library flags.
3779 # Sentinel used to keep track of whether or not we are before
3780 # the conftest object file.
3781 pre_test_object_deps_done=no
3783 # The `*' in the case matches for architectures that use `case' in
3784 # $output_verbose_cmd can trigger glob expansion during the loop
3785 # eval without this substitution.
3786 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3788 for p in `eval $output_verbose_link_cmd`; do
3793 # Some compilers place space between "-{L,R}" and the path.
3796 || test $p = "-R"; then
3803 if test "$pre_test_object_deps_done" = no; then
3806 # Internal compiler library paths should come after those
3807 # provided the user. The postdeps already come after the
3808 # user supplied libs so there is no need to process them.
3809 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3810 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3812 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3815 # The "-l" case would never come before the object being
3816 # linked, so don't bother handling this case.
3819 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3820 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3822 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3828 # This assumes that the test object file only shows up
3829 # once in the compiler output.
3830 if test "$p" = "conftest.$objext"; then
3831 pre_test_object_deps_done=yes
3835 if test "$pre_test_object_deps_done" = no; then
3836 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3837 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3839 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3842 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3843 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3845 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3850 *) ;; # Ignore the rest.
3858 echo "ltcf-cxx.sh: error: problem compiling test program"
3861 $rm -f confest.$objext
3863 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3864 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3865 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3868 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3869 _LT_AC_TAGVAR(LD, $1)="$LD"
3871 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3872 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3873 AC_LIBTOOL_PROG_CC_C_O($1)
3874 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3875 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3876 AC_LIBTOOL_SYS_LIB_STRIP
3877 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3878 AC_LIBTOOL_DLOPEN_SELF($1)
3880 AC_LIBTOOL_CONFIG($1)
3884 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3889 # AC_LIBTOOL_LANG_F77_CONFIG
3890 # ------------------------
3891 # Ensure that the configuration vars for the C compiler are
3892 # suitably defined. Those variables are subsequently used by
3893 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3894 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3895 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3896 [AC_LANG_PUSH(Fortran 77)
3897 AC_REQUIRE([AC_PROG_F77])
3899 # Source file extension for f77 test sources.
3902 # Object file extension for compiled f77 test sources.
3904 _LT_AC_TAGVAR(objext, $1)=$objext
3906 # Code to be used in simple compile tests
3907 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3909 # Code to be used in simple link tests
3910 lt_simple_link_test_code=" program t\n end\n"
3912 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3915 # Allow CC to be a program name with arguments.
3920 _LT_AC_TAGVAR(compiler, $1)=$CC
3921 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3923 # Report which library types wil actually be built
3924 AC_MSG_CHECKING([if libtool supports shared libraries])
3925 AC_MSG_RESULT([$can_build_shared])
3927 AC_MSG_CHECKING([whether to build shared libraries])
3928 test "$can_build_shared" = "no" && enable_shared=no
3930 # We never build shared libraries with the fortran linker;
3931 # this support is only meant for including fortran objects
3932 # in C libraries. You should normally always be able to
3933 # perform the linking stage with the C compiler, anyway...
3935 # On AIX, shared libraries and static libraries use the same namespace, and
3936 # are all built from PIC.
3939 test "$enable_shared" = yes && enable_static=no
3940 if test -n "$RANLIB"; then
3941 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3942 postinstall_cmds='$RANLIB $lib'
3947 test "$enable_shared" = yes && enable_static=no
3950 AC_MSG_RESULT([$enable_shared])
3952 AC_MSG_CHECKING([whether to build static libraries])
3953 # Make sure either enable_shared or enable_static is yes.
3954 test "$enable_shared" = yes || enable_static=yes
3955 AC_MSG_RESULT([$enable_static])
3957 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3958 AC_LIBTOOL_PROG_F77_C_O($1)
3959 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3960 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3961 AC_LIBTOOL_SYS_LIB_STRIP
3962 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3965 AC_LIBTOOL_CONFIG($1)
3969 ])# AC_LIBTOOL_LANG_F77_CONFIG
3974 # AC_LIBTOOL_LANG_GCJ_CONFIG
3975 # --------------------------
3976 # Ensure that the configuration vars for the C compiler are
3977 # suitably defined. Those variables are subsequently used by
3978 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3979 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3980 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3983 # Source file extension for C test sources.
3986 # Object file extension for compiled C test sources.
3988 _LT_AC_TAGVAR(objext, $1)=$objext
3990 # Code to be used in simple compile tests
3991 lt_simple_compile_test_code="class foo {}\n"
3993 # Code to be used in simple link tests
3994 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3997 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4000 # Allow CC to be a program name with arguments.
4005 _LT_AC_TAGVAR(compiler, $1)=$CC
4007 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4008 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4010 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4011 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4012 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4013 AC_LIBTOOL_PROG_CC_C_O($1)
4014 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4015 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4016 AC_LIBTOOL_SYS_LIB_STRIP
4017 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4018 AC_LIBTOOL_DLOPEN_SELF($1)
4020 AC_LIBTOOL_CONFIG($1)
4024 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4027 # AC_LIBTOOL_CONFIG([TAGNAME])
4028 # ----------------------------
4029 # If TAGNAME is not passed, then create an initial libtool script
4030 # with a default configuration from the untagged config vars. Otherwise
4031 # add code to config.status for appending the configuration named by
4032 # TAGNAME from the matching tagged config vars.
4033 AC_DEFUN([AC_LIBTOOL_CONFIG],
4034 [# The else clause should only fire when bootstrapping the
4035 # libtool distribution, otherwise you forgot to ship ltmain.sh
4036 # with your package, and you will get complaints that there are
4037 # no rules to generate ltmain.sh.
4038 if test -f "$ltmain"; then
4039 # Now quote all the things that may contain metacharacters while being
4040 # careful not to overquote the AC_SUBSTed values. We take copies of the
4041 # variables and quote the copies for generation of the libtool script.
4042 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S NM SHELL \
4043 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4044 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4045 deplibs_check_method reload_flag reload_cmds need_locks \
4046 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4047 lt_cv_sys_global_symbol_to_c_name_address \
4048 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4049 old_postinstall_cmds old_postuninstall_cmds \
4050 _LT_AC_TAGVAR(compiler, $1) \
4051 _LT_AC_TAGVAR(CC, $1) \
4052 _LT_AC_TAGVAR(LD, $1) \
4053 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4054 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4055 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4056 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4057 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4058 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4059 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4060 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4061 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4062 _LT_AC_TAGVAR(predep_objects, $1) \
4063 _LT_AC_TAGVAR(postdep_objects, $1) \
4064 _LT_AC_TAGVAR(predeps, $1) \
4065 _LT_AC_TAGVAR(postdeps, $1) \
4066 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4067 _LT_AC_TAGVAR(archive_cmds, $1) \
4068 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4069 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4070 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4071 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4072 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4073 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4074 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4076 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4077 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4078 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4079 _LT_AC_TAGVAR(include_expsyms, $1); do
4082 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4083 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4084 _LT_AC_TAGVAR(archive_cmds, $1) | \
4085 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4086 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4087 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4088 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4089 postinstall_cmds | postuninstall_cmds | \
4090 old_postinstall_cmds | old_postuninstall_cmds | \
4091 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4092 # Double-quote double-evaled strings.
4093 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4096 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4102 *'\[$]0 --fallback-echo"')
4103 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4108 [cfgfile="${ofile}T"
4109 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4111 AC_MSG_NOTICE([creating $ofile])],
4114 cat <<__EOF__ >> "$cfgfile"
4118 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4119 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4120 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4122 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4123 # Free Software Foundation, Inc.
4125 # This file is part of GNU Libtool:
4126 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4128 # This program is free software; you can redistribute it and/or modify
4129 # it under the terms of the GNU General Public License as published by
4130 # the Free Software Foundation; either version 2 of the License, or
4131 # (at your option) any later version.
4133 # This program is distributed in the hope that it will be useful, but
4134 # WITHOUT ANY WARRANTY; without even the implied warranty of
4135 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4136 # General Public License for more details.
4138 # You should have received a copy of the GNU General Public License
4139 # along with this program; if not, write to the Free Software
4140 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4142 # As a special exception to the GNU General Public License, if you
4143 # distribute this file as part of a program that contains a
4144 # configuration script generated by Autoconf, you may include it under
4145 # the same distribution terms that you use for the rest of that program.
4147 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4148 Xsed="sed -e s/^X//"
4150 # The HP-UX ksh and POSIX shell print the target directory to stdout
4152 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4154 # The names of the tagged configurations supported by this script.
4157 # ### BEGIN LIBTOOL CONFIG],
4158 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4160 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4162 # Shell to use when invoking shell scripts.
4165 # Whether or not to build shared libraries.
4166 build_libtool_libs=$enable_shared
4168 # Whether or not to build static libraries.
4169 build_old_libs=$enable_static
4171 # Whether or not to add -lc for building shared libraries.
4172 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4174 # Whether or not to optimize for fast installation.
4175 fast_install=$enable_fast_install
4178 host_alias=$host_alias
4181 # An echo program that does not interpret backslashes.
4186 AR_FLAGS=$lt_AR_FLAGS
4191 # A language-specific compiler.
4192 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4194 # Is the compiler the GNU C compiler?
4195 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4197 # The linker used to build libraries.
4198 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4200 # Whether we need hard or soft links.
4203 # A BSD-compatible nm program.
4206 # A symbol stripping program
4209 # Used to examine libraries when file_magic_cmd begins "file"
4210 MAGIC_CMD=$MAGIC_CMD
4212 # Used on cygwin: DLL creation program.
4215 # Used on cygwin: object dumper.
4218 # Used on cygwin: assembler.
4221 # The name of the directory that contains temporary libtool files.
4224 # How to create reloadable object files.
4225 reload_flag=$lt_reload_flag
4226 reload_cmds=$lt_reload_cmds
4228 # How to pass a linker flag through the compiler.
4229 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4231 # Object file suffix (normally "o").
4234 # Old archive suffix (normally "a").
4237 # Executable file suffix (normally "").
4240 # Additional compiler flags for building library objects.
4241 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4244 # What is the maximum length of a command?
4245 max_cmd_len=$lt_cv_sys_max_cmd_len
4247 # Does compiler simultaneously support -c and -o options?
4248 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4250 # Must we lock files when doing compilation ?
4251 need_locks=$lt_need_locks
4253 # Do we need the lib prefix for modules?
4254 need_lib_prefix=$need_lib_prefix
4256 # Do we need a version for libraries?
4257 need_version=$need_version
4259 # Whether dlopen is supported.
4260 dlopen_support=$enable_dlopen
4262 # Whether dlopen of programs is supported.
4263 dlopen_self=$enable_dlopen_self
4265 # Whether dlopen of statically linked programs is supported.
4266 dlopen_self_static=$enable_dlopen_self_static
4268 # Compiler flag to prevent dynamic linking.
4269 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4271 # Compiler flag to turn off builtin functions.
4272 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4274 # Compiler flag to allow reflexive dlopens.
4275 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4277 # Compiler flag to generate shared objects directly from archives.
4278 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4280 # Compiler flag to generate thread-safe objects.
4281 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4283 # Library versioning type.
4284 version_type=$version_type
4286 # Format of library name prefix.
4287 libname_spec=$lt_libname_spec
4289 # List of archive names. First name is the real one, the rest are links.
4290 # The last name is the one that the linker finds with -lNAME.
4291 library_names_spec=$lt_library_names_spec
4293 # The coded name of the library, if different from the real name.
4294 soname_spec=$lt_soname_spec
4296 # Commands used to build and install an old-style archive.
4298 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4299 old_postinstall_cmds=$lt_old_postinstall_cmds
4300 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4302 # Create an old-style archive from a shared archive.
4303 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4305 # Create a temporary old-style archive to link instead of a shared archive.
4306 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4308 # Commands used to build and install a shared archive.
4309 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4310 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4311 postinstall_cmds=$lt_postinstall_cmds
4312 postuninstall_cmds=$lt_postuninstall_cmds
4314 # Commands to strip libraries.
4315 old_striplib=$lt_old_striplib
4316 striplib=$lt_striplib
4318 # Dependencies to place before the objects being linked to create a
4320 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4322 # Dependencies to place after the objects being linked to create a
4324 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4326 # Dependencies to place before the objects being linked to create a
4328 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4330 # Dependencies to place after the objects being linked to create a
4332 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4334 # The library search path used internally by the compiler when linking
4336 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4338 # Method to check whether dependent libraries are shared objects.
4339 deplibs_check_method=$lt_deplibs_check_method
4341 # Command to use when deplibs_check_method == file_magic.
4342 file_magic_cmd=$lt_file_magic_cmd
4344 # Flag that allows shared libraries with undefined symbols to be built.
4345 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4347 # Flag that forces no undefined symbols.
4348 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4350 # Commands used to finish a libtool library installation in a directory.
4351 finish_cmds=$lt_finish_cmds
4353 # Same as above, but a single script fragment to be evaled but not shown.
4354 finish_eval=$lt_finish_eval
4356 # Take the output of nm and produce a listing of raw symbols and C names.
4357 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4359 # Transform the output of nm in a proper C declaration
4360 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4362 # Transform the output of nm in a C name address pair
4363 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4365 # This is the shared library runtime path variable.
4366 runpath_var=$runpath_var
4368 # This is the shared library path variable.
4369 shlibpath_var=$shlibpath_var
4371 # Is shlibpath searched before the hard-coded library search path?
4372 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4374 # How to hardcode a shared library path into an executable.
4375 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4377 # Whether we should hardcode library paths into libraries.
4378 hardcode_into_libs=$hardcode_into_libs
4380 # Flag to hardcode \$libdir into a binary during linking.
4381 # This must work even if \$libdir does not exist.
4382 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4384 # Whether we need a single -rpath flag with a separated argument.
4385 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4387 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4389 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4391 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4393 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4395 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4396 # the resulting binary.
4397 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4399 # Variables whose values should be saved in libtool wrapper scripts and
4400 # restored at relink time.
4401 variables_saved_for_relink="$variables_saved_for_relink"
4403 # Whether libtool must link a program against all its dependency libraries.
4404 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4406 # Compile-time system search path for libraries
4407 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4409 # Run-time system search path for libraries
4410 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4412 # Fix the shell variable \$srcfile for the compiler.
4413 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4415 # Set to yes if exported symbols are required.
4416 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4418 # The commands to list exported symbols.
4419 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4421 # The commands to extract the exported symbol list from a shared archive.
4422 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4424 # Symbols that should not be listed in the preloaded symbols.
4425 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4427 # Symbols that must always be exported.
4428 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4431 [# ### END LIBTOOL CONFIG],
4432 [# ### END LIBTOOL TAG CONFIG: $tagname])
4439 cat <<\EOF >> "$cfgfile"
4441 # AIX sometimes has problems with the GCC collect2 program. For some
4442 # reason, if we set the COLLECT_NAMES environment variable, the problems
4443 # vanish in a puff of smoke.
4444 if test "X${COLLECT_NAMES+set}" != Xset; then
4446 export COLLECT_NAMES
4451 cygwin* | mingw* | pw32* | os2*)
4452 cat <<'EOF' >> "$cfgfile"
4453 # This is a source program that is used to create dlls on Windows
4454 # Don't remove nor modify the starting and closing comments
4456 # This is a source program that is used to create import libraries
4457 # on Windows for dlls which lack them. Don't remove nor modify the
4458 # starting and closing comments
4459 _LT_AC_FILE_IMPGEN_C
4464 # We use sed instead of cat because bash on DJGPP gets confused if
4465 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4466 # text mode, it properly converts lines to CR/LF. This bash problem
4467 # is reportedly fixed, but why not run on old versions too?
4468 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4470 mv -f "$cfgfile" "$ofile" || \
4471 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4475 # If there is no Makefile yet, we rely on a make rule to execute
4476 # `config.status --recheck' to rerun these tests and create the
4477 # libtool script then.
4478 test -f Makefile && make "$ltmain"
4480 ])# AC_LIBTOOL_CONFIG
4483 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4484 # -------------------------------------------
4485 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4486 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4488 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4490 if test "$GCC" = yes; then
4491 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4493 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4494 lt_cv_prog_compiler_rtti_exceptions,
4495 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
4496 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4498 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4501 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4502 # ---------------------------------
4503 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4504 [AC_REQUIRE([AC_CANONICAL_HOST])
4505 AC_REQUIRE([AC_PROG_NM])
4506 AC_REQUIRE([AC_OBJEXT])
4507 # Check for command to grab the raw symbol name followed by C symbol from nm.
4508 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4509 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4511 # These are sane defaults that work on at least a few old systems.
4512 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4514 # Character class describing NM global symbol codes.
4515 [symcode='[BCDEGRST]']
4517 # Regexp to match symbols that can be accessed directly from C.
4518 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
4520 # Transform the above into a raw symbol and a C symbol.
4521 symxfrm='\1 \2\3 \3'
4523 # Transform an extracted symbol line into a proper C declaration
4524 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4526 # Transform an extracted symbol line into symbol name and symbol address
4527 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4529 # Define system-specific variables.
4534 cygwin* | mingw* | pw32*)
4535 [symcode='[ABCDGISTW]']
4537 hpux*) # Its linker distinguishes data from code symbols
4538 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4539 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4542 [symcode='[BCDEGRST]']
4548 [symcode='[DFNSTU]']
4552 # Handle CRLF in mingw tool chain
4556 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4560 # If we're using GNU nm, then use its standard symbol codes.
4561 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4562 [symcode='[ABCDGISTW]']
4565 # Try without a prefix undercore, then with it.
4566 for ac_symprfx in "" "_"; do
4568 # Write the raw and C identifiers.
4569 lt_cv_sys_global_symbol_pipe=["sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
4571 # Check to see that the pipe works correctly.
4575 cat > conftest.$ac_ext <<EOF
4580 void nm_test_func(){}
4584 int main(){nm_test_var='a';nm_test_func();return(0);}
4587 if AC_TRY_EVAL(ac_compile); then
4588 # Now try to grab the symbols.
4590 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4591 # Try sorting and uniquifying the output.
4592 if sort "$nlist" | uniq > "$nlist"T; then
4593 mv -f "$nlist"T "$nlist"
4598 # Make sure that we snagged all the symbols we need.
4599 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4600 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4601 cat <<EOF > conftest.$ac_ext
4607 # Now generate the symbol file.
4608 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4610 cat <<EOF >> conftest.$ac_ext
4611 #if defined (__STDC__) && __STDC__
4612 # define lt_ptr_t void *
4614 # define lt_ptr_t char *
4618 /* The mapping between symbol names and symbols. */
4623 [lt_preloaded_symbols[] =]
4626 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
4627 cat <<\EOF >> conftest.$ac_ext
4635 # Now try linking the two files.
4636 mv conftest.$ac_objext conftstm.$ac_objext
4637 lt_save_LIBS="$LIBS"
4638 lt_save_CFLAGS="$CFLAGS"
4639 LIBS="conftstm.$ac_objext"
4640 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4641 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4644 LIBS="$lt_save_LIBS"
4645 CFLAGS="$lt_save_CFLAGS"
4647 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4650 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4653 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4656 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4657 cat conftest.$ac_ext >&5
4659 rm -f conftest* conftst*
4661 # Do not use the global_symbol_pipe unless it works.
4662 if test "$pipe_works" = yes; then
4665 lt_cv_sys_global_symbol_pipe=
4669 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4670 lt_cv_sys_global_symbol_to_cdecl=
4672 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4673 AC_MSG_RESULT(failed)
4677 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4680 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4681 # ---------------------------------------
4682 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4683 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4685 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4687 AC_MSG_CHECKING([for $compiler option to produce PIC])
4688 if test "$GCC" = yes; then
4689 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4690 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4694 # All AIX code is PIC.
4695 if test "$host_cpu" = ia64; then
4696 # AIX 5 now supports IA64 processor
4697 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4699 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4704 # FIXME: we need at least 68020 code to build shared libraries, but
4705 # adding the `-m68020' flag to GCC prevents building anything better,
4707 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4710 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4711 # PIC is the default for these OSes.
4714 cygwin* | mingw* | pw32* | os2*)
4715 # This hack is so that the source file can tell whether it is being
4716 # built for inclusion in a dll (and should export symbols for example).
4717 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4720 darwin* | rhapsody*)
4721 # PIC is the default on this platform
4722 # Common symbols not allowed in MH_DYLIB files
4723 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4727 # Just because we use GCC doesn't mean we suddenly get shared libraries
4728 # on systems that don't support them.
4729 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4734 if test -d /usr/nec; then
4735 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4744 # PORTME Check for flag to pass linker flags through the system compiler.
4747 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4748 if test "$host_cpu" = ia64; then
4749 # AIX 5 now supports IA64 processor
4750 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4752 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4756 cygwin* | mingw* | pw32* | os2*)
4757 # This hack is so that the source file can tell whether it is being
4758 # built for inclusion in a dll (and should export symbols for example).
4759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4762 hpux9* | hpux10* | hpux11*)
4763 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4764 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4765 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4766 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4770 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4771 # PIC (with -KPIC) is the default.
4772 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4776 # Check flags for non-gnu compilers on Linux
4779 # The only non-gnu compiler on Linux/Alpha is the Compaq one:
4780 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4784 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4789 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4790 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4793 osf3* | osf4* | osf5*)
4794 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4795 # All OSF/1 code is PIC.
4796 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4800 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4801 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4805 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4806 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4807 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4811 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4812 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4813 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4816 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4817 if test "x$host_vendor" = xsni; then
4818 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4820 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4822 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4823 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827 if test -d /usr/nec ;then
4828 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4829 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4835 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4839 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4843 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4846 # Check to make sure the PIC flag actually works.
4848 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4849 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4850 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4851 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)], [],
4852 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4854 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4857 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4858 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4861 # For platforms which do not support PIC, -DPIC is meaningless:
4863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4866 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC define -DPIC works],
4867 _LT_AC_TAGVAR(lt_prog_compiler_picdef_works, $1),
4868 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4869 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"],
4870 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"])
4876 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4877 # ------------------------------------
4878 # See if the linker supports building shared libraries.
4879 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4880 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4883 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4885 _LT_AC_TAGVAR(archive_cmds, $1)=
4886 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4887 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4888 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4889 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4890 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4891 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4892 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4894 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4895 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4896 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4897 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4898 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4899 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4900 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4901 # include_expsyms should be a list of space-separated symbols to be *always*
4902 # included in the symbol list
4903 _LT_AC_TAGVAR(include_expsyms, $1)=
4904 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4905 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4906 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4907 # as well as any symbol that contains `d'.
4908 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4909 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4910 # platforms (ab)use it in PIC code, but their linkers get confused if
4911 # the symbol is explicitly referenced. Since portable code cannot
4912 # rely on this symbol name, it's probably fine to never include it in
4913 # preloaded symbol tables.
4914 extract_expsyms_cmds=
4917 cygwin* | mingw* | pw32*)
4918 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4919 # When not using gcc, we currently assume that we are using
4920 # Microsoft Visual C++.
4921 if test "$GCC" != yes; then
4930 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4931 if test "$with_gnu_ld" = yes; then
4932 # If archive_cmds runs LD, not CC, wlarc should be empty
4935 # See if GNU ld supports shared libraries.
4937 aix3* | aix4* | aix5*)
4938 # On AIX/PPC, the GNU linker is very broken
4939 if test "$host_cpu" != ia64; then
4940 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4943 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4944 *** to be unable to reliably create shared libraries on AIX.
4945 *** Therefore, libtool is disabling shared libraries support. If you
4946 *** really care for shared libraries, you may want to modify your PATH
4947 *** so that a non-GNU linker is found, and then restart.
4954 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4955 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4956 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4958 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4959 # that the semantics of dynamic libraries on AmigaOS, at least up
4960 # to version 4, is to share data among multiple programs linked
4961 # with the same dynamic library. Since this doesn't match the
4962 # behavior of shared libraries on other platforms, we can't use
4964 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4968 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4969 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4970 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4971 # support --undefined. This deserves some investigation. FIXME
4972 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4974 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4978 cygwin* | mingw* | pw32*)
4979 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4980 # no search path for DLLs.
4981 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4982 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4983 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4985 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4986 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4987 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4988 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4989 else $CC -o impgen impgen.c ; fi)~
4990 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4992 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4994 # cygwin and mingw dlls have different entry points and sets of symbols
4996 # FIXME: what about values for MSVC?
4997 dll_entry=__cygwin_dll_entry@12
4998 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5002 dll_entry=_DllMainCRTStartup@12
5003 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5007 # mingw and cygwin differ, and it's simplest to just exclude the union
5008 # of the two symbol sets.
5009 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5011 # recent cygwin and mingw systems supply a stub DllMain which the user
5012 # can override, but on older systems we have to supply one (in ltdll.c)
5013 if test "x$lt_cv_need_dllmain" = "xyes"; then
5014 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5015 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5016 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5022 # Extract the symbol export list from an `--export-all' def file,
5023 # then regenerate the def file from the symbol export list, so that
5024 # the compiled dll only exports the symbol export list.
5025 # Be careful not to strip the DATA tag left by newer dlltools.
5026 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
5027 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5028 [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
5030 # If the export-symbols file already is a .def file (1st line
5031 # is EXPORTS), use it as is.
5032 # If DATA tags from a recent dlltool are present, honour them!
5033 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5034 cp $export_symbols $output_objdir/$soname-def;
5036 echo EXPORTS > $output_objdir/$soname-def;
5038 cat $export_symbols | while read symbol; do
5041 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5042 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
5044 _lt_hint=`expr 1 + \$_lt_hint`;
5048 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5049 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5050 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5051 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5052 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5055 darwin* | rhapsody*)
5056 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5057 # FIXME: Relying on posixy $() will cause problems for
5058 # cross-compilation, but unfortunately the echo tests do not
5059 # yet detect zsh echo's removal of \ escapes.
5060 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
5061 # We need to add '_' to the symbols in $export_symbols first
5062 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
5063 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5064 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5065 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5069 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5070 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5073 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5074 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5079 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5080 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5083 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5084 *** create shared libraries on Solaris systems. Therefore, libtool
5085 *** is disabling shared libraries support. We urge you to upgrade GNU
5086 *** binutils to release 2.9.1 or newer. Another option is to modify
5087 *** your PATH or compiler configuration so that the native linker is
5088 *** used, and then restart.
5091 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5092 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5093 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5095 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5100 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5102 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5103 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5107 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5109 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5111 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5116 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5117 runpath_var=LD_RUN_PATH
5118 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5119 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5121 cygwin* | mingw* | pw32*)
5122 # dlltool doesn't understand --whole-archive et. al.
5123 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5126 # ancient GNU ld didn't support --whole-archive et. al.
5127 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5128 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5130 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5136 # PORTME fill in a description of your system's linker (not GNU ld)
5139 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5140 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5141 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5142 # Note: this linker hardcodes the directories in LIBPATH if there
5143 # are no directories specified by -L.
5144 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5145 if test "$GCC" = yes && test -z "$link_static_flag"; then
5146 # Neither direct hardcoding nor static linking is supported with a
5148 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5153 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5154 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5155 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5156 # When large executables or shared objects are built, AIX ld can
5157 # have problems creating the table of contents. If linking a library
5158 # or program results in "error TOC overflow" add -mminimal-toc to
5159 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5160 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5161 if test "$GCC" = yes; then
5162 case $host_os in aix4.[012]|aix4.[-12].*)
5163 # We only want to do this on AIX 4.2 and lower, the check
5164 # below for broken collect2 doesn't work under 4.3+
5165 collect2name=`${CC} -print-prog-name=collect2`
5166 if test -f "$collect2name" && \
5167 strings "$collect2name" | grep resolve_lib_name >/dev/null
5169 # We have reworked collect2
5170 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5172 # We have old collect2
5173 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5174 # It fails to find uninstalled libraries when the uninstalled
5175 # path is not listed in the libpath. Setting hardcode_minus_L
5176 # to unsupported forces relinking
5177 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5179 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5182 shared_flag='-shared'
5185 if test "$host_cpu" = ia64; then
5186 shared_flag='${wl}-G'
5188 shared_flag='${wl}-bM:SRE'
5192 if test "$host_cpu" = ia64; then
5193 # On IA64, the linker does run time linking by default, so we don't
5194 # have to do anything special.
5195 aix_use_runtimelinking=no
5196 if test $with_gnu_ld = no; then
5197 exp_sym_flag='-Bexport'
5201 # Test if we are trying to use run time linking, or normal AIX style
5202 # linking. If -brtl is somewhere in LDFLAGS, we need to do run time
5204 aix_use_runtimelinking=no
5205 for ld_flag in $LDFLAGS; do
5206 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
5207 aix_use_runtimelinking=yes
5211 exp_sym_flag='-bexport'
5212 no_entry_flag='-bnoentry'
5214 # -bexpall does not export symbols beginning with underscore (_)
5215 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5216 if test "$aix_use_runtimelinking" = yes; then
5217 # Warning - without using the other run time loading flags (-brtl),
5218 # -berok will link without error, but may produce a broken
5220 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' $wl}-berok'
5221 # Determine the default libpath from the value encoded in an empty executable.
5222 # If we don't find anything, use the default library path according to the cc manual.
5223 AC_CHECK_AIX_LIBPATH
5224 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5225 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5227 if test "$host_cpu" = ia64; then
5228 if test $with_gnu_ld = no; then
5229 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5230 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5231 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5234 # Determine the default libpath from the value encoded in an empty executable.
5235 AC_CHECK_AIX_LIBPATH
5236 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5237 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5238 # -bexpall does not export symbols beginning with underscore (_)
5239 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5240 # Exported symbols can be pulled into shared objects from archives
5241 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5242 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5243 # This is similar to how AIX traditionally builds it's shared
5245 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5251 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5252 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5253 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5254 # see comment about different semantics on the GNU ld section
5255 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5259 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5262 cygwin* | mingw* | pw32*)
5263 # When not using gcc, we currently assume that we are using
5264 # Microsoft Visual C++.
5265 # hardcode_libdir_flag_spec is actually meaningless, as there is
5266 # no search path for DLLs.
5267 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5268 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5269 # Tell ltmain to make .lib files, not .a files.
5271 # FIXME: Setting linknames here is a bad hack.
5272 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5273 # The linker will automatically build a .lib file if we build a DLL.
5274 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5275 # FIXME: Should let the user specify the lib program.
5276 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5277 fix_srcfile_path='`cygpath -w "$srcfile"`'
5281 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5282 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5283 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5287 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5290 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5291 # support. Future versions do this automatically, but an explicit c++rt0.o
5292 # does not break anything, and helps significantly (at the cost of a little
5295 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5296 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5297 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5298 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5301 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5303 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5304 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5305 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5306 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5309 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5311 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5312 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5313 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5314 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5317 hpux9* | hpux10* | hpux11*)
5318 if test $with_gcc = yes; then
5320 hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5321 *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
5325 hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5326 *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5329 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5330 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5331 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5332 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
5333 # location of the library.
5334 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5338 if test "$GCC" = yes; then
5339 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5341 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5343 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5344 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5345 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5349 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5350 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5352 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5355 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5356 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5360 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5361 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5364 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5368 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5369 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5372 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5373 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5374 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5377 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5378 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5379 if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
5380 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5387 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5388 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5389 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5390 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5391 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5395 if test "$GCC" = yes; then
5396 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5397 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5399 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5400 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5402 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5403 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5406 osf4* | osf5*) # as osf3* with the addition of -msym flag
5407 if test "$GCC" = yes; then
5408 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5409 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5410 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5412 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5413 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5414 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5415 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5417 # Both c and cxx compiler support -rpath directly
5418 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5420 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5424 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5425 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5426 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5427 runpath_var=LD_RUN_PATH
5428 hardcode_runpath_var=yes
5432 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
5433 if test "$with_gcc" = yes; then
5434 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5435 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5436 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5438 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5439 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5440 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5442 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5443 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5445 [solaris2.[0-5] | solaris2.[0-5].*]) ;;
5446 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5447 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5449 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5453 if test "x$host_vendor" = xsequent; then
5454 # Use $CC to link under sequent, because it throws in some extra .o
5455 # files that make .init and .fini sections work.
5456 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5458 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5460 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5461 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5462 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5463 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5467 if test "x$host_vendor" = xsni; then
5468 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
5469 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5471 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5472 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5474 runpath_var='LD_RUN_PATH'
5475 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5479 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5480 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5481 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5485 if test -d /usr/nec; then
5486 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5487 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5488 runpath_var=LD_RUN_PATH
5489 hardcode_runpath_var=yes
5490 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5495 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5496 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5497 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5498 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5499 hardcode_runpath_var=yes
5500 runpath_var=LD_RUN_PATH
5503 sysv5uw7* | unixware7*)
5504 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5505 if test "$GCC" = yes; then
5506 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5508 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5510 runpath_var='LD_RUN_PATH'
5511 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5515 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5516 # $CC -shared without GNU ld will not create a library from C++
5517 # object files and a static libstdc++, better avoid it by now
5518 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5519 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5520 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5521 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5522 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5523 runpath_var='LD_RUN_PATH'
5527 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5528 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5529 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5533 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5537 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5538 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5540 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5541 if test "$GCC" = yes; then
5542 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5546 # Do we need to explicitly link libc?
5548 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5549 if test "$enable_shared" = yes && test "$GCC" = yes; then
5550 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5552 # FIXME: we may have to deal with multi-command sequences.
5555 # Test whether the compiler implicitly links with -lc since on some
5556 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5557 # to ld, don't add -lc before -lgcc.
5558 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5560 echo 'static int dummy;' > conftest.$ac_ext
5562 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5565 libobjs=conftest.$ac_objext
5567 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5573 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5574 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5575 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5577 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5579 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5581 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5583 cat conftest.err 1>&5
5586 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5590 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5593 # _LT_AC_FILE_LTDLL_C
5594 # -------------------
5595 AC_DEFUN([_LT_AC_FILE_LTDLL_C],
5596 [# /* ltdll.c starts here */
5597 # #define WIN32_LEAN_AND_MEAN
5598 # #include <windows.h>
5599 # #undef WIN32_LEAN_AND_MEAN
5600 # #include <stdio.h>
5602 # #ifndef __CYGWIN__
5603 # # ifdef __CYGWIN32__
5604 # # define __CYGWIN__ __CYGWIN32__
5608 # #ifdef __cplusplus
5611 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5612 # #ifdef __cplusplus
5617 # #include <cygwin/cygwin_dll.h>
5618 # DECLARE_CYGWIN_DLL( DllMain );
5620 # HINSTANCE __hDllInstance_base;
5623 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5625 # __hDllInstance_base = hInst;
5628 # /* ltdll.c ends here */
5629 ])# _LT_AC_FILE_LTDLL_C
5632 # _LT_AC_FILE_IMPGEN_C
5633 # --------------------
5634 AC_DEFUN([_LT_AC_FILE_IMPGEN_C],
5635 [# /* impgen.c starts here */
5636 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5638 # This file is part of GNU libtool.
5640 # This program is free software; you can redistribute it and/or modify
5641 # it under the terms of the GNU General Public License as published by
5642 # the Free Software Foundation; either version 2 of the License, or
5643 # (at your option) any later version.
5645 # This program is distributed in the hope that it will be useful,
5646 # but WITHOUT ANY WARRANTY; without even the implied warranty of
5647 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5648 # GNU General Public License for more details.
5650 # You should have received a copy of the GNU General Public License
5651 # along with this program; if not, write to the Free Software
5652 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5655 # #include <stdio.h> /* for printf() */
5656 # #include <unistd.h> /* for open(), lseek(), read() */
5657 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5658 # #include <string.h> /* for strdup() */
5660 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5662 # #define O_BINARY 0
5665 # static unsigned int
5666 # pe_get16 (fd, offset)
5670 # unsigned char b[2];
5671 # lseek (fd, offset, SEEK_SET);
5673 # return b[0] + (b[1]<<8);
5676 # static unsigned int
5677 # pe_get32 (fd, offset)
5681 # unsigned char b[4];
5682 # lseek (fd, offset, SEEK_SET);
5684 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5687 # static unsigned int
5691 # unsigned char *b = ptr;
5692 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5701 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5702 # unsigned long export_rva, export_size, nsections, secptr, expptr;
5703 # unsigned long name_rvas, nexp;
5704 # unsigned char *expdata, *erva;
5705 # char *filename, *dll_name;
5707 # filename = argv[1];
5709 # dll = open(filename, O_RDONLY|O_BINARY);
5713 # dll_name = filename;
5715 # for (i=0; filename[i]; i++)
5716 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5717 # dll_name = filename + i +1;
5719 # pe_header_offset = pe_get32 (dll, 0x3c);
5720 # opthdr_ofs = pe_header_offset + 4 + 20;
5721 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
5723 # if (num_entries < 1) /* no exports */
5726 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
5727 # export_size = pe_get32 (dll, opthdr_ofs + 100);
5728 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5729 # secptr = (pe_header_offset + 4 + 20 +
5730 # pe_get16 (dll, pe_header_offset + 4 + 16));
5733 # for (i = 0; i < nsections; i++)
5736 # unsigned long secptr1 = secptr + 40 * i;
5737 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5738 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5739 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5740 # lseek(dll, secptr1, SEEK_SET);
5741 # read(dll, sname, 8);
5742 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
5744 # expptr = fptr + (export_rva - vaddr);
5745 # if (export_rva + export_size > vaddr + vsize)
5746 # export_size = vsize - (export_rva - vaddr);
5751 # expdata = (unsigned char*)malloc(export_size);
5752 # lseek (dll, expptr, SEEK_SET);
5753 # read (dll, expdata, export_size);
5754 # erva = expdata - export_rva;
5756 # nexp = pe_as32 (expdata+24);
5757 # name_rvas = pe_as32 (expdata+32);
5759 # printf ("EXPORTS\n");
5760 # for (i = 0; i<nexp; i++)
5762 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5763 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5768 # /* impgen.c ends here */
5769 ])# _LT_AC_FILE_IMPGEN_C
5771 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5772 # ---------------------------------
5773 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5777 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5778 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5779 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5780 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5781 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5782 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5783 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5785 # This is just to silence aclocal about the macro not being used
5786 ifelse([AC_DISABLE_FAST_INSTALL])
5788 AC_DEFUN([LT_AC_PROG_GCJ],
5789 [AC_CHECK_TOOL(GCJ, gcj, no)
5790 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5796 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
5797 # -------------------------------------
5798 # Define a conditional.
5800 # FIXME: Once using 2.50, use this:
5801 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
5802 AC_DEFUN([AM_CONDITIONAL],
5803 [ifelse([$1], [TRUE],
5804 [errprint(__file__:__line__: [$0: invalid condition: $1
5807 ifelse([$1], [FALSE],
5808 [errprint(__file__:__line__: [$0: invalid condition: $1
5812 AC_SUBST([$1_FALSE])
5821 # Do all the work for Automake. This macro actually does too much --
5822 # some checks are only needed if your package does certain things.
5823 # But this isn't really a big deal.
5827 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5828 # written in clear, in which case automake, when reading aclocal.m4,
5829 # will think it sees a *use*, and therefore will trigger all it's
5830 # C support machinery. Also note that it means that autoscan, seeing
5831 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5834 # We require 2.13 because we rely on SHELL being computed by configure.
5837 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5838 # -----------------------------------------------------------
5839 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
5840 # The purpose of this macro is to provide the user with a means to
5841 # check macros which are provided without letting her know how the
5842 # information is coded.
5843 # If this macro is not defined by Autoconf, define it here.
5844 ifdef([AC_PROVIDE_IFELSE],
5846 [define([AC_PROVIDE_IFELSE],
5847 [ifdef([AC_PROVIDE_$1],
5851 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
5852 # ----------------------------------------------
5853 AC_DEFUN([AM_INIT_AUTOMAKE],
5854 [AC_REQUIRE([AC_PROG_INSTALL])dnl
5855 # test to see if srcdir already configured
5856 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
5857 test -f $srcdir/config.status; then
5858 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
5861 # Define the identity of the package.
5863 AC_SUBST(PACKAGE)dnl
5865 AC_SUBST(VERSION)dnl
5867 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
5868 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
5870 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
5871 # the ones we care about.
5872 ifdef([m4_pattern_allow],
5873 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
5875 # Some tools Automake needs.
5876 AC_REQUIRE([AM_SANITY_CHECK])dnl
5877 AC_REQUIRE([AC_ARG_PROGRAM])dnl
5878 AM_MISSING_PROG(ACLOCAL, aclocal)
5879 AM_MISSING_PROG(AUTOCONF, autoconf)
5880 AM_MISSING_PROG(AUTOMAKE, automake)
5881 AM_MISSING_PROG(AUTOHEADER, autoheader)
5882 AM_MISSING_PROG(MAKEINFO, makeinfo)
5883 AM_MISSING_PROG(AMTAR, tar)
5884 AM_MISSING_INSTALL_SH
5885 AM_PROG_INSTALL_STRIP
5886 # We need awk for the "check" target. The system "awk" is bad on
5888 AC_REQUIRE([AC_PROG_AWK])dnl
5889 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5890 AC_REQUIRE([AM_DEP_TRACK])dnl
5891 AC_REQUIRE([AM_SET_DEPDIR])dnl
5892 AC_PROVIDE_IFELSE([AC_PROG_][CC],
5893 [AM_DEPENDENCIES(CC)],
5894 [define([AC_PROG_][CC],
5895 defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
5896 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
5897 [AM_DEPENDENCIES(CXX)],
5898 [define([AC_PROG_][CXX],
5899 defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
5903 # Check to make sure that the build environment is sane.
5910 AC_DEFUN([AM_SANITY_CHECK],
5911 [AC_MSG_CHECKING([whether build environment is sane])
5914 echo timestamp > conftest.file
5915 # Do `set' in a subshell so we don't clobber the current shell's
5916 # arguments. Must try -L first in case configure is actually a
5917 # symlink; some systems play weird games with the mod time of symlinks
5918 # (eg FreeBSD returns the mod time of the symlink's containing
5921 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
5922 if test "$[*]" = "X"; then
5924 set X `ls -t $srcdir/configure conftest.file`
5927 if test "$[*]" != "X $srcdir/configure conftest.file" \
5928 && test "$[*]" != "X conftest.file $srcdir/configure"; then
5930 # If neither matched, then we have a broken ls. This can happen
5931 # if, for instance, CONFIG_SHELL is bash and it inherits a
5932 # broken ls alias from the environment. This has actually
5933 # happened. Such a system could not be considered "sane".
5934 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
5935 alias in your environment])
5938 test "$[2]" = conftest.file
5944 AC_MSG_ERROR([newly created file is older than distributed files!
5945 Check your system clock])
5947 AC_MSG_RESULT(yes)])
5952 # AM_MISSING_PROG(NAME, PROGRAM)
5953 # ------------------------------
5954 AC_DEFUN([AM_MISSING_PROG],
5955 [AC_REQUIRE([AM_MISSING_HAS_RUN])
5956 $1=${$1-"${am_missing_run}$2"}
5960 # AM_MISSING_INSTALL_SH
5961 # ---------------------
5962 # Like AM_MISSING_PROG, but only looks for install-sh.
5963 AC_DEFUN([AM_MISSING_INSTALL_SH],
5964 [AC_REQUIRE([AM_MISSING_HAS_RUN])
5965 if test -z "$install_sh"; then
5966 for install_sh in "$ac_aux_dir/install-sh" \
5967 "$ac_aux_dir/install.sh" \
5968 "${am_missing_run}${ac_auxdir}/install-sh";
5970 test -f "$install_sh" && break
5972 # FIXME: an evil hack: we remove the SHELL invocation from
5973 # install_sh because automake adds it back in. Sigh.
5974 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
5976 AC_SUBST(install_sh)])
5979 # AM_MISSING_HAS_RUN
5980 # ------------------
5981 # Define MISSING if not defined so far and test if it supports --run.
5982 # If it does, set am_missing_run to use it, otherwise, to nothing.
5983 AC_DEFUN([AM_MISSING_HAS_RUN],
5984 [test x"${MISSING+set}" = xset ||
5985 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
5986 # Use eval to expand $SHELL
5987 if eval "$MISSING --run true"; then
5988 am_missing_run="$MISSING --run "
5992 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
5998 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
5999 # $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'.
6000 # Of course, Automake must honor this variable whenever it call a tool
6001 # from the auxiliary directory. The problem is that $srcdir (hence
6002 # $ac_aux_dir) can be either an absolute path or a path relative to
6003 # $top_srcdir or absolute, this depends on how configure is run. This
6004 # is pretty anoying since it makes $ac_aux_dir quite unusable in
6005 # subdirectories: on the top source directory, any form will work
6006 # fine, but in subdirectories relative pat needs to be adapted.
6007 # - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
6008 # relative, but fail if $srcdir is absolute
6009 # - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
6010 # absolute, and success on relative paths.
6012 # Consequently, we define and use $am_aux_dir, the "always absolute"
6013 # version of $ac_aux_dir.
6015 AC_DEFUN([AM_AUX_DIR_EXPAND], [
6016 # expand $ac_aux_dir to an absolute path
6017 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
6020 # One issue with vendor `install' (even GNU) is that you can't
6021 # specify the program used to strip binaries. This is especially
6022 # annoying in cross-compiling environments, where the build's strip
6023 # is unlikely to handle the host's binaries.
6024 # Fortunately install-sh will honor a STRIPPROG variable, so we
6025 # always use install-sh in `make install-strip', and initialize
6026 # STRIPPROG with the value of the STRIP variable (set by the user).
6027 AC_DEFUN([AM_PROG_INSTALL_STRIP],
6028 [AC_REQUIRE([AM_MISSING_INSTALL_SH])dnl
6029 _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
6030 INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
6031 AC_SUBST([INSTALL_STRIP_PROGRAM])])
6033 # serial 4 -*- Autoconf -*-
6037 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6038 # written in clear, in which case automake, when reading aclocal.m4,
6039 # will think it sees a *use*, and therefore will trigger all it's
6040 # C support machinery. Also note that it means that autoscan, seeing
6041 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6045 # AM_DEPENDENCIES(NAME)
6046 # ---------------------
6047 # See how the compiler implements dependency checking.
6048 # NAME is "CC", "CXX" or "OBJC".
6049 # We try a few techniques and use that to set a single cache variable.
6051 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6052 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6053 # dependency, and given that the user is not expected to run this macro,
6054 # just rely on AC_PROG_CC.
6055 AC_DEFUN([AM_DEPENDENCIES],
6056 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6057 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6058 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6059 AC_REQUIRE([AM_DEP_TRACK])dnl
6061 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6062 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6063 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
6064 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6065 [depcc="$$1" am_compiler_list=])
6067 AC_CACHE_CHECK([dependency style of $depcc],
6068 [am_cv_$1_dependencies_compiler_type],
6069 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6070 # We make a subdir and do the tests there. Otherwise we can end up
6071 # making bogus files that we don't know about and never remove. For
6072 # instance it was reported that on HP-UX the gcc test will end up
6073 # making a dummy file named `D' -- because `-MD' means `put the output
6076 # Copy depcomp to subdir because otherwise we won't find it if we're
6077 # using a relative directory.
6078 cp "$am_depcomp" conftest.dir
6081 am_cv_$1_dependencies_compiler_type=none
6082 if test "$am_compiler_list" = ""; then
6083 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6085 for depmode in $am_compiler_list; do
6086 # We need to recreate these files for each test, as the compiler may
6087 # overwrite some of them when testing with obscure command lines.
6088 # This happens at least with the AIX C compiler.
6089 echo '#include "conftest.h"' > conftest.c
6090 echo 'int i;' > conftest.h
6091 echo 'include conftest.Po' > Makefile
6095 # after this tag, mechanisms are not by side-effect, so they'll
6096 # only be used when explicitly requested
6097 if test "x$enable_dependency_tracking" = xyes; then
6105 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6106 # mode. It turns out that the SunPro C++ compiler does not properly
6107 # handle `-M -o', and we need to detect this.
6108 if depmode=$depmode \
6109 source=conftest.c object=conftest.o \
6110 depfile=conftest.Po tmpdepfile=conftest.TPo \
6111 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
6112 grep conftest.h conftest.Po > /dev/null 2>&1 &&
6113 ${MAKE-make} > /dev/null 2>&1; then
6114 am_cv_$1_dependencies_compiler_type=$depmode
6122 am_cv_$1_dependencies_compiler_type=none
6125 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
6126 AC_SUBST([$1DEPMODE])
6132 # Choose a directory name for dependency files.
6133 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
6134 AC_DEFUN([AM_SET_DEPDIR],
6135 [if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
6137 # We redirect because .deps might already exist and be populated.
6138 # In this situation we don't want to see an error.
6139 rmdir .deps > /dev/null 2>&1
6149 AC_DEFUN([AM_DEP_TRACK],
6150 [AC_ARG_ENABLE(dependency-tracking,
6151 [ --disable-dependency-tracking Speeds up one-time builds
6152 --enable-dependency-tracking Do not reject slow dependency extractors])
6153 if test "x$enable_dependency_tracking" != xno; then
6154 am_depcomp="$ac_aux_dir/depcomp"
6157 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6158 pushdef([subst], defn([AC_SUBST]))
6159 subst(AMDEPBACKSLASH)
6163 # Generate code to set up dependency tracking.
6164 # This macro should only be invoked once -- use via AC_REQUIRE.
6166 # AM_OUTPUT_DEPENDENCY_COMMANDS
6169 # This code is only required when automatic dependency tracking
6170 # is enabled. FIXME. This creates each `.P' file that we will
6171 # need in order to bootstrap the dependency handling code.
6172 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
6173 AC_OUTPUT_COMMANDS([
6174 test x"$AMDEP_TRUE" != x"" ||
6175 for mf in $CONFIG_FILES; do
6177 Makefile) dirpart=.;;
6178 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
6181 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
6182 # Extract the definition of DEP_FILES from the Makefile without
6184 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6185 test -z "$DEPDIR" && continue
6186 # When using ansi2knr, U may be empty or an underscore; expand it
6187 U=`sed -n -e '/^U = / s///p' < "$mf"`
6188 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6189 # We invoke sed twice because it is the simplest approach to
6190 # changing $(DEPDIR) to its actual value in the expansion.
6191 for file in `sed -n -e '
6192 /^DEP_FILES = .*\\\\$/ {
6201 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
6202 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6203 # Make sure the directory exists.
6204 test -f "$dirpart/$file" && continue
6205 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
6206 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
6207 # echo "creating $dirpart/$file"
6208 echo '# dummy' > "$dirpart/$file"
6211 ], [AMDEP_TRUE="$AMDEP_TRUE"
6212 ac_aux_dir="$ac_aux_dir"])])
6216 # Check to see how make treats includes.
6217 AC_DEFUN([AM_MAKE_INCLUDE],
6218 [am_make=${MAKE-make}
6219 cat > confinc << 'END'
6223 # If we don't find an include directive, just comment out the code.
6224 AC_MSG_CHECKING([for style of include used by $am_make])
6228 # First try GNU make style include.
6229 echo "include confinc" > confmf
6230 # We grep out `Entering directory' and `Leaving directory'
6231 # messages which can occur if `w' ends up in MAKEFLAGS.
6232 # In particular we don't look at `^make:' because GNU make might
6233 # be invoked under some other name (usually "gmake"), in which
6234 # case it prints its new name instead of `make'.
6235 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
6240 # Now try BSD make style include.
6241 if test "$_am_include" = "#"; then
6242 echo '.include "confinc"' > confmf
6243 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6244 _am_include=.include
6249 AC_SUBST(_am_include)
6251 AC_MSG_RESULT($_am_result)
6252 rm -f confinc confmf
6255 # Like AC_CONFIG_HEADER, but automatically create stamp file.
6259 # When config.status generates a header, we must update the stamp-h file.
6260 # This file resides in the same directory as the config header
6261 # that is generated. We must strip everything past the first ":",
6262 # and everything past the last "/".
6266 AC_DEFUN([AM_CONFIG_HEADER],
6267 [AC_CONFIG_HEADER([$1])
6269 ifelse(patsubst([$1], [[^ ]], []),
6271 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
6272 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),
6274 for am_file in $1; do
6275 case " $CONFIG_HEADERS " in
6277 echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
6280 am_indx=\`expr \$am_indx + 1\`
6287 AC_DEFUN([AM_WITH_DMALLOC],
6288 [AC_MSG_CHECKING([if malloc debugging is wanted])
6289 AC_ARG_WITH(dmalloc,
6290 [ --with-dmalloc use dmalloc, as in
6291 http://www.dmalloc.com/dmalloc.tar.gz],
6292 [if test "$withval" = yes; then
6294 AC_DEFINE(WITH_DMALLOC,1,
6295 [Define if using the dmalloc debugging malloc package])
6296 LIBS="$LIBS -ldmalloc"
6297 LDFLAGS="$LDFLAGS -g"
6300 fi], [AC_MSG_RESULT(no)])