3 # This macro checks for fftw header files and libraries,
4 # including the possible prefixing with s or d to determine precision.
5 # Arg 1 is the fftw header/library name to check for, without
6 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
7 # Arg 2 is the size of the real variable used.
8 AC_DEFUN(ACX_CHECK_FFTW,
10 if test -z "$ac_fftw_firstname"; then
13 if test $sizeof_real = 8; then
21 xfftwname=${fftwcheckprefix}$1
24 # check header doesn't work, since we must use mpicc to get includes,
26 AC_MSG_CHECKING([for $xfftwname.h])
27 AC_TRY_COMPILE([#include <$xfftwname.h>],,
34 # fftwname was set if we found a header
36 if test -n "$fftwname"; then
37 # we cannot run the code since an MPI program might not be allowed
38 # on a login node of a supercomputer
39 AC_TRY_COMPILE([#include <$fftwname.h>],
40 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
43 usedprefix=$fftwcheckprefix
47 if test "$ok" != "yes"; then
48 AC_MSG_CHECKING([for $1.h])
49 AC_TRY_COMPILE([#include <$1.h>],,AC_MSG_RESULT(yes),
52 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
53 [Do you have $prec precision FFTW installed? If you are using packages,]
54 [note that you also need fftw-devel to compile GROMACS. You can find the ]
55 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
56 [If you compiled FFTW yourself: ]
57 [Note that the default FFTW setup is double precision. Change the FFTW]
58 [configuration to single with --enable-float. If you want MPI support,]
59 [use --enable-mpi. It is a good idea to install both single & double.]
60 [If your sysadm doesn't want to install it you can do it to a location]
61 [in your home directory and provide the correct paths in the CPPFLAGS]
62 [and LDFLAGS environment variables before running configure.]
63 [That is also necessary to do if your compiler doesn't search]
64 [/usr/local/include and /usr/local/lib by default.]
65 [You can find information at www.gromacs.org, or in the INSTALL file.])
67 AC_TRY_COMPILE([#include <$1.h>],
68 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
74 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
75 [Do you have $prec precision FFTW installed? If you are using packages,]
76 [note that you also need fftw-devel to compile GROMACS. You can find the ]
77 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
78 [If you compiled FFTW yourself: ]
79 [Note that the default FFTW setup is double precision. Change the FFTW]
80 [configuration to single with --enable-float. If you want MPI support,]
81 [use --enable-mpi. It is a good idea to install both single & double.]
82 [If your sysadm doesn't want to install it you can do it to a location]
83 [in your home directory and provide the correct paths in the CPPFLAGS]
84 [and LDFLAGS environment variables before running configure.]
85 [That is also necessary to do if your compiler doesn't search]
86 [/usr/local/include and /usr/local/lib by default.]
87 [You can find information at www.gromacs.org, or in the INSTALL file.])])
90 AC_CHECK_LIB($fftwname,main,,
91 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
92 ac_fftw_savedprefix=$usedprefix
93 ac_fftw_firstname=$fftwname
97 fftwname=${ac_fftw_savedprefix}$1
98 AC_MSG_CHECKING([for $fftwname.h])
100 [#include <$fftwname.h>],,
102 LIBS="-l$fftwname $LIBS"
103 AC_TRY_LINK_FUNC([main],,,
104 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
107 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your
108 fftw prefixes match - we already use $ac_fftw_firstname.h])
120 dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
121 dnl to easily use them in a Makefile.
123 dnl Adapted from a macro by Andreas Zeller.
125 dnl The variables provided are :
126 dnl link_motif (e.g. -L/usr/lesstif/lib -lXm -lXt)
127 dnl include_motif (e.g. -I/usr/lesstif/lib)
128 dnl motif_libraries (e.g. /usr/lesstif/lib)
129 dnl motif_includes (e.g. /usr/lesstif/include)
131 dnl The link_motif and include_motif variables should be fit to put on
132 dnl your application's link line in your Makefile.
134 AC_DEFUN(AC_FIND_MOTIF,
136 AC_REQUIRE([AC_PATH_XTRA])
141 dnl AC_ARG_WITH(motif,
142 dnl [ --without-motif do not use Motif widgets])
143 dnl Treat --without-motif like
144 dnl --without-motif-includes --without-motif-libraries.
146 if test "$no_x" = "yes"
152 AC_ARG_WITH(motif-includes,
153 [ --with-motif-includes=DIR Motif include files are in DIR],
154 motif_includes="$withval")
156 AC_ARG_WITH(motif-libraries,
157 [ --with-motif-libraries=DIR Motif libraries are in DIR],
158 motif_libraries="$withval")
161 AC_MSG_CHECKING(for Motif)
165 # Search the include files.
167 if test "$motif_includes" = ""; then
168 AC_CACHE_VAL(ac_cv_motif_includes,
170 ac_motif_save_LIBS="$LIBS"
171 ac_motif_save_INCLUDES="$INCLUDES"
172 ac_motif_save_CPPFLAGS="$CPPFLAGS"
173 ac_motif_save_LDFLAGS="$LDFLAGS"
175 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
176 INCLUDES="$X_CFLAGS $INCLUDES"
177 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
178 LDFLAGS="$X_LIBS $LDFLAGS"
180 ac_cv_motif_includes="no"
181 AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
183 # Xm/Xm.h is in the standard search path.
184 ac_cv_motif_includes=
187 # Xm/Xm.h is not in the standard search path.
188 # Locate it and put its directory in `motif_includes'
190 # /usr/include/Motif* are used on HP-UX (Motif).
191 # /usr/include/X11* are used on HP-UX (X and Athena).
192 # /usr/dt is used on Solaris (Motif).
193 # /usr/openwin is used on Solaris (X and Athena).
194 # Other directories are just guesses.
195 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
196 /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
197 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
198 /usr/dt/include /usr/openwin/include \
199 /usr/dt/*/include /opt/*/include /usr/include/Motif* \
200 "${prefix}"/*/include /usr/*/include /usr/local/*/include \
201 "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
202 if test -f "$dir/Xm/Xm.h"; then
203 ac_cv_motif_includes="$dir"
209 LIBS="$ac_motif_save_LIBS"
210 INCLUDES="$ac_motif_save_INCLUDES"
211 CPPFLAGS="$ac_motif_save_CPPFLAGS"
212 LDFLAGS="$ac_motif_save_LDFLAGS"
214 motif_includes="$ac_cv_motif_includes"
218 # Now for the libraries.
220 if test "$motif_libraries" = ""; then
221 AC_CACHE_VAL(ac_cv_motif_libraries,
223 ac_motif_save_LIBS="$LIBS"
224 ac_motif_save_INCLUDES="$INCLUDES"
225 ac_motif_save_CPPFLAGS="$CPPFLAGS"
226 ac_motif_save_LDFLAGS="$LDFLAGS"
228 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
229 INCLUDES="$X_CFLAGS $INCLUDES"
230 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
231 LDFLAGS="$X_LIBS $LDFLAGS"
233 ac_cv_motif_libraries="no"
234 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
236 # libXm.a is in the standard search path.
237 ac_cv_motif_libraries=
240 # libXm.a is not in the standard search path.
241 # Locate it and put its directory in `motif_libraries'
243 # /usr/lib/Motif* are used on HP-UX (Motif).
244 # /usr/lib/X11* are used on HP-UX (X and Athena).
245 # /usr/dt is used on Solaris (Motif).
246 # /usr/lesstif is used on Linux (Lesstif).
247 # /usr/openwin is used on Solaris (X and Athena).
248 # Other directories are just guesses.
249 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
250 /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
251 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
252 /usr/dt/lib /usr/openwin/lib \
253 /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
254 /usr/lesstif*/lib /usr/lib/Lesstif* \
255 "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
256 "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
257 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
258 ac_cv_motif_libraries="$dir"
264 LIBS="$ac_motif_save_LIBS"
265 INCLUDES="$ac_motif_save_INCLUDES"
266 CPPFLAGS="$ac_motif_save_CPPFLAGS"
267 LDFLAGS="$ac_motif_save_LDFLAGS"
270 motif_libraries="$ac_cv_motif_libraries"
273 # Provide an easier way to link
275 if test "$motif_includes" = "no" -o "$motif_libraries" = "no"; then
281 if test "$with_motif" != "no"; then
282 if test "$motif_libraries" = ""; then
283 link_motif="-lXm -lXt"
284 MOTIF_LIBS="-lXm -lXt"
286 link_motif="-L$motif_libraries -lXm -lXt"
287 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
289 if test "$motif_includes" != ""; then
290 include_motif="-I$motif_includes"
291 MOTIF_INCLUDES="-I$motif_includes"
293 LIBS="$LIBS $MOTIF_LIBS"
294 INCLUDES="$INCLUDES $MOTIF_INCLUDES"
295 AC_DEFINE(HAVE_MOTIF,,[Use motif/lesstif libraries])
303 motif_libraries_result="$motif_libraries"
304 motif_includes_result="$motif_includes"
305 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
306 test "$motif_includes_result" = "" && motif_includes_result="in default path"
307 test "$motif_libraries_result" = "no" && motif_libraries_result="(none)"
308 test "$motif_includes_result" = "no" && motif_includes_result="(none)"
309 AC_MSG_RESULT([libraries $motif_libraries_result, headers $motif_includes_result])
311 # seems as if Xm depends on -lXext and/or -lXp on old redhat and OS X.
312 ac_motif_save_LIBS="$LIBS"
313 ac_motif_save_INCLUDES="$INCLUDES"
314 ac_motif_save_CPPFLAGS="$CPPFLAGS"
315 ac_motif_save_LDFLAGS="$LDFLAGS"
316 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
317 INCLUDE="$INCLUDE $X_CFLAGS"
318 LDFLAGS="$X_LIBS $LDFLAGS"
319 # first try both - they are crossdependent! urk...
320 LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS $ac_motif_save_LIBS -lXext -lXp"
321 AC_MSG_CHECKING(for libXext and libXp)
322 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
324 X_PRE_LIBS="$X_PRE_LIBS -lXext -lXp"],[
326 # both libs didnt work, try libXext separately
327 LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS $ac_motif_save_LIBS -lXext"
328 AC_MSG_CHECKING(for only libXext)
329 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
331 X_PRE_LIBS="$X_PRE_LIBS -lXext"],[AC_MSG_RESULT(no)])
333 LIBS=$ac_motif_save_LIBS
334 INCLUDES="$ac_motif_save_INCLUDES"
335 CPPFLAGS=$ac_motif_save_CPPFLAGS
336 LDFLAGS="$ac_motif_save_LDFLAGS"
340 dnl macro modified from the fftw distribution (www.fftw.org)
341 AC_DEFUN(ACX_CHECK_CC_FLAGS,
343 AC_REQUIRE([AC_PROG_CC])
344 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
345 [echo 'void f(){}' > conftest.c
346 res=`$CC $1 -c conftest.c 2>&1`
348 # The stupid intel compiler echos the filename on stderr...
350 if test -z "$res" -o "$res" = "conftest.c:"; then
357 if test "$ac_$2" = yes; then
366 dnl macro modified from the fftw distribution (www.fftw.org)
367 AC_DEFUN(ACX_CHECK_F77_FLAGS,
369 AC_REQUIRE([AC_PROG_F77])
370 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
371 [cat > conftest.f << EOF
376 if test -z "`$F77 $1 -c conftest.f `"; then
383 if test "$ac_$2" = yes; then
394 # ---------------------------
395 # Macro to extend the exact CPU for some hosts
396 AC_DEFUN(ACX_DETECT_GMXCPU,
398 AC_REQUIRE([AC_CANONICAL_HOST])
401 # Determine the exact cpu type on some common systems where it is
402 # not visible from the host triplet.
403 # (on e.g. intel and dec/tru64 the host type is enough)
407 case "${host_cpu}-${host_os}" in
410 # some versions of config.status says these systems are PowerPC even
411 # when they have Power3 CPUs (they used to be recognized as rs6000),
412 # so we need to work around that.
414 # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
415 if test -f /usr/sbin/lsdev && test -f /usr/sbin/lsattr; then
416 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
417 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
419 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
421 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
425 if test -z "${gmxcpu}" && test -f /usr/sbin/lscfg; then
426 if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
428 elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
430 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
432 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
434 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
436 elif /usr/sbin/lscfg -vp | grep POWER2 >/dev/null 2>&1; then
438 elif /usr/sbin/lscfg -vp | grep POWER3 >/dev/null 2>&1; then
440 elif /usr/sbin/lscfg -vp | grep POWER4 >/dev/null 2>&1; then
447 if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
449 elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
451 elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
453 elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
461 if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
463 elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
465 elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
467 elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
482 ###############################################################
483 # Macro modified from the fftw distribution (www.fftw.org)
484 # to determine optimization flags.
485 # Note that we have modified config.guess and config.sub
486 # to provide extended information on the detailed type of CPU.
487 # In general we assume you have recent versions of the compilers
488 # that support the highest optimization we know of. If not, you
489 # can always override these flags, but it's better to upgrade :-)
490 ###############################################################
491 AC_DEFUN(ACX_COMPILER_MAXOPT,
493 AC_REQUIRE([AC_PROG_CC])
494 AC_REQUIRE([AC_PROG_F77])
495 AC_REQUIRE([AC_CANONICAL_HOST])
497 # Try to determine "good" native compiler flags if none specified on command
498 # line. To avoid repeating the entire procedure for fortran flags, we first
499 # determine our suggested choices for both C and fortran, and then possibly
500 # override them with user choices.
504 case "${host_cpu}-${host_os}" in
509 xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
513 xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
517 xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
521 xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
525 xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
532 xCFLAGS="-Ae +O3 +Oall"
534 # If you haven't noticed, we don't like hp very much...
535 # but perhaps that will change if they make something nice out of ia64.
539 # The GNU compilers are checked outside this case statement.
540 # Check for Intel Compilers. The SGI one was killed before
541 # it went final, so I cant imagine anyone is using it...
542 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
546 if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
547 xFFLAGS="-O3 -w90 -w95"
549 # PORTME 2. Check for intel compilers when we get our hands on one!
552 # dont use inter-procedure analysis for the innerloops - they take
553 # forever to compile with it, and it doesnt help at all.
556 xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
557 xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
560 xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
561 xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
564 xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
565 xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
568 xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
569 xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
572 xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
573 xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
576 xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
577 xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
580 xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
581 xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
584 xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
585 xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
588 xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
589 xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
592 xCFLAGS="-O3 -qmaxmem=16384"
593 xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
599 # Check for IBM compilers on OS X
600 if $CC 2>&1 | grep 'IBM' > /dev/null 2>&1; then
601 xCFLAGS="-O3 -Q=1000 -qtune=ppc970 -qarch=ppcv -qaltivec"
603 if $F77 -V 2>&1 | grep 'IBM' > /dev/null 2>&1; then
604 xFFLAGS="-O3 -Q=1000 -qtune=ppc970 -qarch=ppcv"
609 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"
610 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"
612 if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
613 xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
614 xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
617 if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
618 xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms"
619 xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms"
623 # I have removed -n32 from the flags since it causes too many problems.
624 # New SGIs should use the right objects automatically, and it's not
625 # worth the hassle for 5-10 year old machines...
629 xCFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xCFLAGS"
630 xFFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xFFLAGS"
631 xLDFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xLDFLAGS"
634 xCFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xCFLAGS"
635 xFFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xFFLAGS"
636 xLDFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xLDFLAGS"
639 xCFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xCFLAGS"
640 xFFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xFFLAGS"
641 xLDFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xLDFLAGS"
644 xCFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xCFLAGS"
645 xFFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xFFLAGS"
646 xLDFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xLDFLAGS"
649 xCFLAGS="$IRIXOBJFLAG $xCFLAGS"
650 xFFLAGS="$IRIXOBJFLAG $xFFLAGS"
651 xLDFLAGS="$IRIXOBJFLAG $xLDFLAGS"
657 # NB: -arch implies -tune according to the cc manual.
658 # We dont use -ifo since it conflicts with dependency
659 # generation on old versions of the compiler.
660 case "${host_cpu}" in
662 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
663 evtype=`echo ${host_cpu} | sed 's/alpha//'`
664 xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
665 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
666 xASFLAGS="-O4 -no_ifo -arch $evtype"
670 xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
671 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
672 xASFLAGS="-O4 -no_ifo -arch host"
679 case "${host_cpu}" in
681 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
682 evtype=`echo ${host_cpu} | sed 's/alpha//'`
683 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
684 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
685 tmpASFLAGS="-O4 -no_ifo -arch $evtype"
689 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
690 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
691 tmpASFLAGS="-O4 -no_ifo -arch host"
695 # Compaq sometimes uses -version and sometimes -V
696 # Not 100% sure if ccc always has -V and F77 -version, so
697 # we check both alternatives to be sure.
698 if (($CC -V 2>&1 | grep ompaq > /dev/null) ||
699 ($CC -version 2>&1 | grep ompaq > /dev/null)); then
701 xASFLAGS="$tmpASFLAGS"
704 if test "$enable_fortran" = "yes"; then
705 if (($F77 -V 2>&1 | grep ompaq > /dev/null) ||
706 ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
713 # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
714 # further down, but check for some specific compilers.
715 # Portland group compilers:
716 if $CC -V 2> /dev/null | grep ortland > /dev/null 2>&1; then
717 case "${host_cpu}" in
725 xCFLAGS="$pgiopt -fast -pc 32"
728 if test "$enable_fortran" = "yes"; then
729 if $F77 -version 2> /dev/null | grep Portland > /dev/null 2>&1; then
735 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
736 case "${host_cpu}" in
738 xCFLAGS="-O3 -tpp6 -axK -ip"
745 # search in /usr/local/include too, just as gcc does. (handy for fftw)
746 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
748 if test "$enable_fortran" = "yes"; then
749 if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
750 xFFLAGS="$xCFLAGS -w90 -w95"
756 # Phew, end of all those operating systems and processors!
758 # use default flags for gcc/g77 on all systems
759 if test $ac_cv_prog_gcc = yes; then
760 # mac os x only goes to -O4, so check -O6 first, then -O4 and finally -O3.
761 ACX_CHECK_CC_FLAGS(-O6,o6,xCFLAGS="$xCFLAGS -O6",[
762 ACX_CHECK_CC_FLAGS(-O4,o4,xCFLAGS="$xCFLAGS -O4",[
763 ACX_CHECK_CC_FLAGS(-O3,o3,xCFLAGS="$xCFLAGS -O3")])])
764 xCFLAGS="$xCFLAGS -fomit-frame-pointer -finline-functions -Wall -Wno-unused"
765 # For alpha axp assembly we need the preprocessor to tell elf from ecoff.
766 # The compaq ccc compiler only knows .s files, and always runs them
767 # through cpp. We support this by telling gcc to preprocess .s files.
768 case "${host_cpu}" in
770 xASFLAGS="$xCFLAGS -x assembler-with-cpp"
775 # -malign-double for x86 systems
776 ACX_CHECK_CC_FLAGS(-malign-double,align_double,xCFLAGS="$xCFLAGS -malign-double")
779 if test $enable_fortran = yes; then
780 if test $ac_cv_prog_g77 = yes; then
781 xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
782 # -malign-double for f77 on x86 systems - haven't checked that this works yet.
783 #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
789 if test "$GCC" = "yes"; then
790 # try to guess correct CPU flags, at least for powerpc linux
791 case "${host_cpu}" in
792 # i586/i686 cpu flags don't improve speed, thus no need to use them.
793 # don't check f77 separately - we assume f77 and gcc are similar
795 # don't use the separate apple cpp on OS X
796 ACX_CHECK_CC_FLAGS(-no-cpp-precomp,no_cpp_precomp,xCFLAGS="$xCFLAGS -no-cpp-precomp")
797 ACX_CHECK_CC_FLAGS(-finline-limit=1000,finline_limit_1000,xCFLAGS="$xCFLAGS -finline-limit=1000")
798 if test "$enable_ppc_altivec" = "yes"; then
799 # And try to add -fvec or -faltivec to get altivec extensions!
800 ACX_CHECK_CC_FLAGS(-fvec,fvec,xCFLAGS="$xCFLAGS -fvec",
801 ACX_CHECK_CC_FLAGS(-faltivec,faltivec,xCFLAGS="$xCFLAGS -faltivec"))
803 # -funroll-all-loops exposes a bug in altivec-enabled gcc-2.95.3
804 # on powerpc, so we only enable it on other platforms or gcc3.
805 # The gcc 2.95 instruction scheduler also destroys our handcoded altivec,
806 # so disable instruction scheduling on 2.95
807 if $CC --version 2>&1 | grep '2.95' > /dev/null 2>&1; then
808 echo "*****************************************************************************"
809 echo "* IMPORTANT INFO: You are using gcc-2.95.x on PowerPC. This compiler works, *"
810 echo "* but you will get better performance with gcc-3.3 or later. If you are *"
811 echo "* running OS X, download the latest devtools from http://developer.apple.com*"
812 echo "*****************************************************************************"
813 ACX_CHECK_CC_FLAGS(-fno-schedule-insns,fno_schedule_insns,xCFLAGS="$xCFLAGS -fno-schedule-insns")
815 ACX_CHECK_CC_FLAGS(-funroll-all-loops,funroll_all_loops,xCFLAGS="$xCFLAGS -funroll-all-loops")
817 ACX_CHECK_CC_FLAGS(-mcpu=7450,m_cpu_7450,CPU_FLAGS="-mcpu=7450")
818 ACX_CHECK_CC_FLAGS(-mtune=970,m_tune_970,CPU_FLAGS="$CPU_FLAGS -mtune=970")
819 if test -z "$CPU_FLAGS"; then
820 ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS="-mcpu=powerpc")
824 ACX_CHECK_CC_FLAGS(-funroll-all-loops,funroll_all_loops,xCFLAGS="$xCFLAGS -funroll-all-loops")
829 if test -n "$CPU_FLAGS"; then
830 xCFLAGS="$xCFLAGS $CPU_FLAGS"
831 xFFLAGS="$xFFLAGS $CPU_FLAGS"
832 xASFLAGS="$xASFLAGS $CPU_FLAGS"
835 # Now check if the user provided anything special for C or fortran...
836 # Not nice to have checked everything then, but otherwise we would have
837 # to use entirely separate checks for C and fortran flags, doubling the code.
838 if test "$ac_test_CFLAGS" != "set"; then
840 # Use the extra link optimization flags on e.g. irix only when
841 # we are using our own C compiler flags
842 LDFLAGS="$LDFLAGS $xLDFLAGS"
844 if test -z "$CFLAGS"; then
845 echo "********************************************************************"
846 echo "* Note: We have not optimized the C compiler flags on your target *"
847 echo "* yet, but the default CFLAGS=-O3 should be OK in most cases. *"
848 echo "* You can override this by setting the CFLAGS environment variable.*"
849 echo "*******************************************************************"
852 ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
853 echo "*******************************************************************"
854 echo "* Sorry, these optimization settings don't seem to work for *"
855 echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
856 echo "*******************************************************************"
860 echo "******************************************"
861 echo "* Using CFLAGS from environment variable *"
862 echo "******************************************"
865 if test "$enable_fortran" = "yes"; then
866 if test "$ac_test_FFLAGS" != "set"; then
868 if test -z "$FFLAGS"; then
869 echo "********************************************************************"
870 echo "* Note: We have not optimized the Fortran compiler flags on your *"
871 echo "* target, but the default FFLAGS=-O3 should be OK in most cases. *"
872 echo "* You can override this by setting the CFLAGS environment variable.*"
873 echo "********************************************************************"
876 ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
877 echo "*******************************************************************"
878 echo "* Sorry, these optimization settings don't seem to work for *"
879 echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
880 echo "*******************************************************************"
884 echo "******************************************"
885 echo "* Using FFLAGS from environment variable *"
886 echo "******************************************"
889 # Be silent for assembly flags, they are usually not important anyway
890 if test "${ASFLAGS+set}" != set; then
891 if test "${xASFLAGS+set}" != set; then
900 dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
902 dnl This macro figures out how to build C programs using POSIX
903 dnl threads. It sets the PTHREAD_LIBS output variable to the threads
904 dnl library and linker flags, and the PTHREAD_CFLAGS output variable
905 dnl to any special C compiler flags that are needed. (The user can also
906 dnl force certain compiler flags/libs to be tested by setting these
907 dnl environment variables.)
909 dnl Also sets PTHREAD_CC to any special C compiler that is needed for
910 dnl multi-threaded programs (defaults to the value of CC otherwise).
911 dnl (This is necessary on AIX to use the special cc_r compiler alias.)
913 dnl If you are only building threads programs, you may wish to
914 dnl use these variables in your default LIBS, CFLAGS, and CC:
916 dnl LIBS="$PTHREAD_LIBS $LIBS"
917 dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
920 dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
921 dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
922 dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
924 dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
925 dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
926 dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
927 dnl the default action will define HAVE_PTHREAD.
929 dnl Please let the authors know if this macro fails on any platform,
930 dnl or if you have any other suggestions or comments. This macro was
931 dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
932 dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
933 dnl macros posted by AFC to the autoconf macro repository. We are also
934 dnl grateful for the helpful feedback of numerous users.
937 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
939 AC_DEFUN([ACX_PTHREAD], [
940 AC_REQUIRE([AC_CANONICAL_HOST])
945 # We used to check for pthread.h first, but this fails if pthread.h
946 # requires special compiler flags (e.g. on True64 or Sequent).
947 # It gets checked for in the link test anyway.
949 # First of all, check if the user has set any of the PTHREAD_LIBS,
950 # etcetera environment variables, and if threads linking works using
952 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
953 save_CFLAGS="$CFLAGS"
954 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
956 LIBS="$PTHREAD_LIBS $LIBS"
957 AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
958 AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
959 AC_MSG_RESULT($acx_pthread_ok)
960 if test x"$acx_pthread_ok" = xno; then
965 CFLAGS="$save_CFLAGS"
968 # We must check for the threads library under a number of different
969 # names; the ordering is very important because some systems
970 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
971 # libraries is broken (non-POSIX).
973 # Create a list of thread flags to try. Items starting with a "-" are
974 # C compiler flags, and other items are library names, except for "none"
975 # which indicates that we try without any flags at all.
977 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
979 # The ordering *is* (sometimes) important. Some notes on the
980 # individual items follow:
982 # pthreads: AIX (must check this before -lpthread)
983 # none: in case threads are in libc; should be tried before -Kthread and
984 # other compiler flags to prevent continual compiler warnings
985 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
986 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
987 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
988 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
989 # -pthreads: Solaris/gcc
990 # -mthreads: Mingw32/gcc, Lynx/gcc
991 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
992 # doesn't hurt to check since this sometimes defines pthreads too;
993 # also defines -D_REENTRANT)
994 # pthread: Linux, etcetera
995 # --thread-safe: KAI C++
997 case "${host_cpu}-${host_os}" in
1000 # On Solaris (at least, for some versions), libc contains stubbed
1001 # (non-functional) versions of the pthreads routines, so link-based
1002 # tests will erroneously succeed. (We need to link with -pthread or
1003 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
1004 # a function called by this macro, so we could check for that, but
1005 # who knows whether they'll stub that too in a future libc.) So,
1006 # we'll just look for -pthreads and -lpthread first:
1008 acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
1012 if test x"$acx_pthread_ok" = xno; then
1013 for flag in $acx_pthread_flags; do
1017 AC_MSG_CHECKING([whether pthreads work without any flags])
1021 AC_MSG_CHECKING([whether pthreads work with $flag])
1022 PTHREAD_CFLAGS="$flag"
1026 AC_MSG_CHECKING([for the pthreads library -l$flag])
1027 PTHREAD_LIBS="-l$flag"
1032 save_CFLAGS="$CFLAGS"
1033 LIBS="$PTHREAD_LIBS $LIBS"
1034 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1036 # Check for various functions. We must include pthread.h,
1037 # since some functions may be macros. (On the Sequent, we
1038 # need a special flag -Kthread to make this header compile.)
1039 # We check for pthread_join because it is in -lpthread on IRIX
1040 # while pthread_create is in libc. We check for pthread_attr_init
1041 # due to DEC craziness with -lpthreads. We check for
1042 # pthread_cleanup_push because it is one of the few pthread
1043 # functions on Solaris that doesn't have a non-functional libc stub.
1044 # We try pthread_create on general principles.
1045 AC_TRY_LINK([#include <pthread.h>],
1046 [pthread_t th; pthread_join(th, 0);
1047 pthread_attr_init(0); pthread_cleanup_push(0, 0);
1048 pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
1049 [acx_pthread_ok=yes])
1052 CFLAGS="$save_CFLAGS"
1054 AC_MSG_RESULT($acx_pthread_ok)
1055 if test "x$acx_pthread_ok" = xyes; then
1064 # Various other checks:
1065 if test "x$acx_pthread_ok" = xyes; then
1067 LIBS="$PTHREAD_LIBS $LIBS"
1068 save_CFLAGS="$CFLAGS"
1069 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1071 # Detect AIX lossage: threads are created detached by default
1072 # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
1073 AC_MSG_CHECKING([for joinable pthread attribute])
1074 AC_TRY_LINK([#include <pthread.h>],
1075 [int attr=PTHREAD_CREATE_JOINABLE;],
1076 ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
1077 if test x"$ok" = xunknown; then
1078 AC_TRY_LINK([#include <pthread.h>],
1079 [int attr=PTHREAD_CREATE_UNDETACHED;],
1080 ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
1082 if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
1083 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
1084 [Define to the necessary symbol if this constant
1085 uses a non-standard name on your system.])
1087 AC_MSG_RESULT(${ok})
1088 if test x"$ok" = xunknown; then
1089 AC_MSG_WARN([we do not know how to create joinable pthreads])
1092 AC_MSG_CHECKING([if more special flags are required for pthreads])
1094 case "${host_cpu}-${host_os}" in
1095 *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
1096 *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
1098 AC_MSG_RESULT(${flag})
1099 if test "x$flag" != xno; then
1100 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
1104 CFLAGS="$save_CFLAGS"
1106 # More AIX lossage: must compile with cc_r
1107 AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
1112 AC_SUBST(PTHREAD_LIBS)
1113 AC_SUBST(PTHREAD_CFLAGS)
1114 AC_SUBST(PTHREAD_CC)
1116 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
1117 if test x"$acx_pthread_ok" = xyes; then
1118 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
1130 # Below, we include our patched version of libtool.m4, from
1131 # the libtool-1.4e beta distribution.
1132 # See admin/README.patches for a list of changes!
1134 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1135 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
1136 ## Free Software Foundation, Inc.
1137 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1139 ## This program is free software; you can redistribute it and/or modify
1140 ## it under the terms of the GNU General Public License as published by
1141 ## the Free Software Foundation; either version 2 of the License, or
1142 ## (at your option) any later version.
1144 ## This program is distributed in the hope that it will be useful, but
1145 ## WITHOUT ANY WARRANTY; without even the implied warranty of
1146 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1147 ## General Public License for more details.
1149 ## You should have received a copy of the GNU General Public License
1150 ## along with this program; if not, write to the Free Software
1151 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1153 ## As a special exception to the GNU General Public License, if you
1154 ## distribute this file as part of a program that contains a
1155 ## configuration script generated by Autoconf, you may include it under
1156 ## the same distribution terms that you use for the rest of that program.
1158 # serial 47 AC_PROG_LIBTOOL
1162 AC_DEFUN([AC_PROG_LIBTOOL],
1163 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1164 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1165 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1166 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1168 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1170 dnl And a similar setup for Fortran 77 support
1171 AC_PROVIDE_IFELSE([AC_PROG_F77],
1173 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1176 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1177 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1178 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1179 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1181 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1183 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1185 [ifdef([AC_PROG_GCJ],
1186 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1187 ifdef([A][M_PROG_GCJ],
1188 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1189 ifdef([LT_AC_PROG_GCJ],
1190 [define([LT_AC_PROG_GCJ],
1191 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1192 ])])# AC_PROG_LIBTOOL
1197 AC_DEFUN([_AC_PROG_LIBTOOL],
1198 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1199 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1200 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1201 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1203 # This can be used to rebuild libtool when needed
1204 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1206 # Always use our own libtool.
1207 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1208 AC_SUBST(LIBTOOL)dnl
1210 # Prevent multiple expansion
1211 define([AC_PROG_LIBTOOL], [])
1212 ])# _AC_PROG_LIBTOOL
1217 AC_DEFUN([AC_LIBTOOL_SETUP],
1219 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1220 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1221 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1222 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1223 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1224 AC_REQUIRE([AC_PROG_CC])dnl
1225 AC_REQUIRE([AC_PROG_LD])dnl
1226 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1227 AC_REQUIRE([AC_PROG_NM])dnl
1228 AC_REQUIRE([AC_PROG_LN_S])dnl
1229 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1230 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1231 AC_REQUIRE([AC_OBJEXT])dnl
1232 AC_REQUIRE([AC_EXEEXT])dnl
1235 AC_LIBTOOL_SYS_MAX_CMD_LEN
1236 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1239 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1240 _LT_AC_PROG_ECHO_BACKSLASH
1244 # AIX sometimes has problems with the GCC collect2 program. For some
1245 # reason, if we set the COLLECT_NAMES environment variable, the problems
1246 # vanish in a puff of smoke.
1247 if test "X${COLLECT_NAMES+set}" != Xset; then
1249 export COLLECT_NAMES
1254 # Sed substitution that helps us do robust quoting. It backslashifies
1255 # metacharacters that are still active within double-quoted strings.
1256 Xsed='sed -e s/^X//'
1257 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1259 # Same as above, but do not quote variable references.
1260 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1262 # Sed substitution to delay expansion of an escaped shell variable in a
1263 # double_quote_subst'ed string.
1264 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1266 # Sed substitution to avoid accidental globbing in evaled expressions
1267 no_glob_subst='s/\*/\\\*/g'
1273 default_ofile=libtool
1274 can_build_shared=yes
1276 # All known linkers require a `.a' archive for static linking (except M$VC,
1277 # which needs '.lib').
1279 ltmain="$ac_aux_dir/ltmain.sh"
1280 ofile="$default_ofile"
1281 with_gnu_ld="$lt_cv_prog_gnu_ld"
1283 AC_CHECK_TOOL(RANLIB, ranlib, :)
1284 AC_CHECK_TOOL(STRIP, strip, :)
1287 old_CFLAGS="$CFLAGS"
1289 # Set sane defaults for various variables
1290 test -z "$AR" && AR=ar
1291 test -z "$AR_FLAGS" && AR_FLAGS=cru
1292 test -z "$AS" && AS=as
1293 test -z "$CC" && CC=cc
1294 test -z "$LTCC" && LTCC=$CC
1295 test -z "$DLLTOOL" && DLLTOOL=dlltool
1296 test -z "$LD" && LD=ld
1297 test -z "$LN_S" && LN_S="ln -s"
1298 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1299 test -z "$NM" && NM=nm
1300 test -z "$OBJDUMP" && OBJDUMP=objdump
1301 test -z "$RANLIB" && RANLIB=:
1302 test -z "$STRIP" && STRIP=:
1303 test -z "$ac_objext" && ac_objext=o
1305 # Determine commands to create old-style static archives.
1306 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1307 old_postinstall_cmds='chmod 644 $oldlib'
1308 old_postuninstall_cmds=
1310 if test -n "$RANLIB"; then
1313 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1316 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1319 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1322 # Only perform the check for file, if the check method requires it
1323 case $deplibs_check_method in
1325 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1331 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1332 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1333 enable_win32_dll=yes, enable_win32_dll=no)
1335 AC_ARG_ENABLE([libtool-lock],
1336 [AC_HELP_STRING([--disable-libtool-lock],
1337 [avoid locking (might break parallel builds)])])
1338 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1341 [AC_HELP_STRING([--with-pic],
1342 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1343 [pic_mode="$withval"],
1345 test -z "$pic_mode" && pic_mode=default
1347 # Use C for the default configuration in the libtool script
1349 AC_LIBTOOL_LANG_C_CONFIG
1351 ])# AC_LIBTOOL_SETUP
1354 # _LT_AC_SYS_COMPILER
1355 # -------------------
1356 AC_DEFUN([_LT_AC_SYS_COMPILER],
1357 [AC_REQUIRE([AC_PROG_CC])dnl
1359 # If no C compiler was specified, use CC.
1362 # Allow CC to be a program name with arguments.
1365 ])# _LT_AC_SYS_COMPILER
1368 # _LT_AC_SYS_LIBPATH_AIX
1369 # ----------------------
1370 # Links a minimal program and checks the executable
1371 # for the system default hardcoded library path. In most cases,
1372 # this is /usr/lib:/lib, but when the MPI compilers are used
1373 # the location of the communication and MPI libs are included too.
1374 # If we don't find anything, use the default library path according
1375 # to the aix ld manual.
1376 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1377 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1378 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1380 # Check for a 64-bit object if we didn't find anything.
1381 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1383 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1384 ])# _LT_AC_SYS_LIBPATH_AIX
1387 # _LT_AC_PROG_ECHO_BACKSLASH
1388 # --------------------------
1389 # Add some code to the start of the generated configure script which
1390 # will find an echo command which doesn't interpret backslashes.
1391 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1392 [ifdef([AC_DIVERSION_NOTICE],
1393 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1394 [AC_DIVERT_PUSH(NOTICE)])
1396 # Check that we are running under the correct shell.
1397 SHELL=${CONFIG_SHELL-/bin/sh}
1401 # Remove one level of quotation (which was required for Make).
1402 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1407 if test "X[$]1" = X--no-reexec; then
1408 # Discard the --no-reexec flag, and continue.
1410 elif test "X[$]1" = X--fallback-echo; then
1411 # Avoid inline document here, it may be left over
1413 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1414 # Yippee, $echo works!
1417 # Restart under the correct shell.
1418 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1421 if test "X[$]1" = X--fallback-echo; then
1422 # used as fallback echo
1430 # The HP-UX ksh and POSIX shell print the target directory to stdout
1432 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1434 if test -z "$ECHO"; then
1435 if test "X${echo_test_string+set}" != Xset; then
1436 # find a string as large as possible, as long as the shell can cope with it
1437 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1438 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1439 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1440 echo_test_string="`eval $cmd`" &&
1441 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1448 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1449 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1450 test "X$echo_testing_string" = "X$echo_test_string"; then
1453 # The Solaris, AIX, and Digital Unix default echo programs unquote
1454 # backslashes. This makes it impossible to quote backslashes using
1455 # echo "$something" | sed 's/\\/\\\\/g'
1457 # So, first we look for a working echo in the user's PATH.
1459 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1460 for dir in $PATH /usr/ucb; do
1462 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1463 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1464 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1465 test "X$echo_testing_string" = "X$echo_test_string"; then
1472 if test "X$echo" = Xecho; then
1473 # We didn't find a better echo, so look for alternatives.
1474 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1475 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1476 test "X$echo_testing_string" = "X$echo_test_string"; then
1477 # This shell has a builtin print -r that does the trick.
1479 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1480 test "X$CONFIG_SHELL" != X/bin/ksh; then
1481 # If we have ksh, try running configure again with it.
1482 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1483 export ORIGINAL_CONFIG_SHELL
1484 CONFIG_SHELL=/bin/ksh
1486 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1490 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1491 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1492 test "X$echo_testing_string" = "X$echo_test_string"; then
1493 # Cool, printf works
1495 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1496 test "X$echo_testing_string" = 'X\t' &&
1497 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1498 test "X$echo_testing_string" = "X$echo_test_string"; then
1499 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1501 SHELL="$CONFIG_SHELL"
1503 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1504 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1505 test "X$echo_testing_string" = 'X\t' &&
1506 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1507 test "X$echo_testing_string" = "X$echo_test_string"; then
1508 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1510 # maybe with a smaller string...
1513 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1514 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1521 if test "$prev" != 'sed 50q "[$]0"'; then
1522 echo_test_string=`eval $prev`
1523 export echo_test_string
1524 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1526 # Oops. We lost completely, so just stick with echo.
1535 # Copy echo and quote the copy suitably for passing to libtool from
1536 # the Makefile, instead of quoting the original, which is used later.
1538 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1539 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1544 ])# _LT_AC_PROG_ECHO_BACKSLASH
1549 AC_DEFUN([_LT_AC_LOCK],
1550 [AC_ARG_ENABLE([libtool-lock],
1551 [AC_HELP_STRING([--disable-libtool-lock],
1552 [avoid locking (might break parallel builds)])])
1553 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1555 # Some flags need to be propagated to the compiler or linker for good
1559 # Find out which ABI we are using.
1560 echo 'int i;' > conftest.$ac_ext
1561 if AC_TRY_EVAL(ac_compile); then
1562 case `/usr/bin/file conftest.$ac_objext` in
1574 # Find out which ABI we are using.
1575 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1576 if AC_TRY_EVAL(ac_compile); then
1577 case `/usr/bin/file conftest.$ac_objext` in
1593 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1594 SAVE_CFLAGS="$CFLAGS"
1595 CFLAGS="$CFLAGS -belf"
1596 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1598 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1600 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1601 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1602 CFLAGS="$SAVE_CFLAGS"
1605 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1606 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1607 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1608 AC_CHECK_TOOL(AS, as, false)
1609 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1611 # recent cygwin and mingw systems supply a stub DllMain which the user
1612 # can override, but on older systems we have to supply one
1613 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1615 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1616 DllMain (0, 0, 0);],
1617 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1620 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1621 # old mingw systems require "-dll" to link a DLL, while more recent ones
1623 SAVE_CFLAGS="$CFLAGS"
1624 CFLAGS="$CFLAGS -mdll"
1625 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1626 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1627 CFLAGS="$SAVE_CFLAGS" ;;
1628 *-*-cygwin* | *-*-pw32*)
1629 # cygwin systems need to pass --dll to the linker, and not link
1630 # crt.o which will require a WinMain@16 definition.
1631 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1637 need_locks="$enable_libtool_lock"
1642 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1643 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1644 # ----------------------------------------------------------------
1645 # Check whether the given compiler option works
1646 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1647 [AC_CACHE_CHECK([$1], [$2],
1649 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1650 save_CFLAGS="$CFLAGS"
1652 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1653 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
1654 # Modified by Erik Lindahl:
1655 # Some compilers (icc, pgcc) echo stupid stuff to stderr.
1656 # To avoid this being interpreted as errors we check the output
1657 # and only fail the test if the option is present, or one of the
1658 # words 'option' or 'flag'.
1659 if test -n "$3" && grep "$3" conftest.err > /dev/null 2>&1 || grep "option" conftest.err > /dev/null 2>&1 || grep "flag" conftest.err > /dev/null 2>&1 ; then
1660 # Append any errors to the config.log.
1661 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1667 CFLAGS="$save_CFLAGS"
1670 if test x"[$]$2" = xyes; then
1671 ifelse([$5], , :, [$5])
1673 ifelse([$6], , :, [$6])
1675 ])# AC_LIBTOOL_COMPILER_OPTION
1678 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1679 # [ACTION-SUCCESS], [ACTION-FAILURE])
1680 # ------------------------------------------------------------
1681 # Check whether the given compiler option works
1682 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1683 [AC_CACHE_CHECK([$1], [$2],
1685 save_LDFLAGS="$LDFLAGS"
1686 LDFLAGS="$LDFLAGS $3"
1687 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1688 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1689 # The compiler can only warn and ignore the option if not recognized
1690 # So say no if there are warnings
1691 if test -n "$3" && grep "$3" conftest.err > /dev/null 2>&1 || grep "option" conftest.err > /dev/null 2>&1 || grep "flag" conftest.err > /dev/null 2>&1 ; then
1692 # Append any errors to the config.log.
1693 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1699 LDFLAGS="$save_LDFLAGS"
1702 if test x"[$]$2" = xyes; then
1703 ifelse([$4], , :, [$4])
1705 ifelse([$5], , :, [$5])
1707 ])# AC_LIBTOOL_LINKER_OPTION
1710 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1711 # --------------------------
1712 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1713 [# find the maximum length of command line arguments
1714 AC_MSG_CHECKING([the maximum length of command line arguments])
1715 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1721 # On DJGPP, this test can blow up pretty badly due to problems in libc
1722 # (any single argument exceeding 2000 bytes causes a buffer overrun
1723 # during glob expansion). Even if it were fixed, the result of this
1724 # check would be larger than it should be.
1725 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1729 # Under GNU Hurd, this test is not required because there is
1730 # no limit to the length of command line arguments.
1731 # Libtool will interpret -1 as no limit whatsoever
1732 lt_cv_sys_max_cmd_len=-1;
1736 # If test is not a shell built-in, we'll probably end up computing a
1737 # maximum length that is only half of the actual maximum length, but
1739 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1740 = "XX$testring") >/dev/null 2>&1 &&
1741 new_result=`expr "X$testring" : ".*" 2>&1` &&
1742 lt_cv_sys_max_cmd_len=$new_result &&
1743 test $i != 17 # 1/2 MB should be enough
1746 testring=$testring$testring
1749 # Add a significant safety factor because C++ compilers can tack on massive
1750 # amounts of additional arguments before passing them to the linker.
1751 # It appears as though 1/2 is a usable value.
1752 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1756 if test -n $lt_cv_sys_max_cmd_len ; then
1757 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1761 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1764 # _LT_AC_CHECK_DLFCN
1765 # --------------------
1766 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1767 [AC_CHECK_HEADERS(dlfcn.h)dnl
1768 ])# _LT_AC_CHECK_DLFCN
1771 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1772 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1773 # ------------------------------------------------------------------
1774 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1775 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1776 if test "$cross_compiling" = yes; then :
1779 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1780 lt_status=$lt_dlunknown
1781 cat > conftest.$ac_ext <<EOF
1782 [#line __oline__ "configure"
1783 #include "confdefs.h"
1792 # define LT_DLGLOBAL RTLD_GLOBAL
1795 # define LT_DLGLOBAL DL_GLOBAL
1797 # define LT_DLGLOBAL 0
1801 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1802 find out it does not work in some platform. */
1803 #ifndef LT_DLLAZY_OR_NOW
1805 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1808 # define LT_DLLAZY_OR_NOW DL_LAZY
1811 # define LT_DLLAZY_OR_NOW RTLD_NOW
1814 # define LT_DLLAZY_OR_NOW DL_NOW
1816 # define LT_DLLAZY_OR_NOW 0
1824 extern "C" void exit (int);
1827 void fnord() { int i=42;}
1830 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1831 int status = $lt_dlunknown;
1835 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1836 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1837 /* dlclose (self); */
1843 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1844 (./conftest; exit; ) 2>/dev/null
1847 x$lt_dlno_uscore) $1 ;;
1848 x$lt_dlneed_uscore) $2 ;;
1849 x$lt_unknown|x*) $3 ;;
1852 # compilation failed
1857 ])# _LT_AC_TRY_DLOPEN_SELF
1860 # AC_LIBTOOL_DLOPEN_SELF
1861 # -------------------
1862 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1863 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1864 if test "x$enable_dlopen" != xyes; then
1865 enable_dlopen=unknown
1866 enable_dlopen_self=unknown
1867 enable_dlopen_self_static=unknown
1874 lt_cv_dlopen="load_add_on"
1876 lt_cv_dlopen_self=yes
1879 cygwin* | mingw* | pw32*)
1880 lt_cv_dlopen="LoadLibrary"
1885 AC_CHECK_FUNC([shl_load],
1886 [lt_cv_dlopen="shl_load"],
1887 [AC_CHECK_LIB([dld], [shl_load],
1888 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1889 [AC_CHECK_FUNC([dlopen],
1890 [lt_cv_dlopen="dlopen"],
1891 [AC_CHECK_LIB([dl], [dlopen],
1892 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1893 [AC_CHECK_LIB([svld], [dlopen],
1894 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1895 [AC_CHECK_LIB([dld], [dld_link],
1896 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1905 if test "x$lt_cv_dlopen" != xno; then
1911 case $lt_cv_dlopen in
1913 save_CPPFLAGS="$CPPFLAGS"
1914 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1916 save_LDFLAGS="$LDFLAGS"
1917 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1920 LIBS="$lt_cv_dlopen_libs $LIBS"
1922 AC_CACHE_CHECK([whether a program can dlopen itself],
1923 lt_cv_dlopen_self, [dnl
1924 _LT_AC_TRY_DLOPEN_SELF(
1925 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1926 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1929 if test "x$lt_cv_dlopen_self" = xyes; then
1930 LDFLAGS="$LDFLAGS $link_static_flag"
1931 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1932 lt_cv_dlopen_self_static, [dnl
1933 _LT_AC_TRY_DLOPEN_SELF(
1934 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1935 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1939 CPPFLAGS="$save_CPPFLAGS"
1940 LDFLAGS="$save_LDFLAGS"
1945 case $lt_cv_dlopen_self in
1946 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1947 *) enable_dlopen_self=unknown ;;
1950 case $lt_cv_dlopen_self_static in
1951 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1952 *) enable_dlopen_self_static=unknown ;;
1955 ])# AC_LIBTOOL_DLOPEN_SELF
1958 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1959 # ---------------------------------
1960 # Check to see if options -c and -o are simultaneously supported by compiler
1961 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1962 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1963 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1964 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1965 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1966 $rm -r conftest 2>/dev/null
1970 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
1971 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
1972 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
1973 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
1974 [$1],[F77],[save_FFLAGS="$FFLAGS"
1975 FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"],
1976 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
1977 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
1978 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1980 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1981 # that will create temporary files in the current directory regardless of
1982 # the output directory. Thus, making CWD read-only will cause this test
1983 # to fail, enabling locking or at least warning the user not to do parallel
1987 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
1989 # The compiler can only warn and ignore the option if not recognized
1990 # So say no if there are warnings
1991 if test -s out/conftest.err; then
1992 # Append any errors to the config.log.
1993 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
1995 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1998 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
1999 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
2000 [$1],[F77],[FFLAGS="$save_FFLAGS"],
2001 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
2009 ])# AC_LIBTOOL_PROG_CC_C_O
2012 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2013 # -----------------------------------------
2014 # Check to see if we can do hard links to lock some files if needed
2015 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2016 [AC_REQUIRE([_LT_AC_LOCK])dnl
2018 hard_links="nottested"
2019 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2020 # do not overwrite the value of need_locks provided by the user
2021 AC_MSG_CHECKING([if we can lock with hard links])
2024 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2026 ln conftest.a conftest.b 2>&5 || hard_links=no
2027 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2028 AC_MSG_RESULT([$hard_links])
2029 if test "$hard_links" = no; then
2030 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2036 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2041 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2042 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2043 [rm -f .libs 2>/dev/null
2044 mkdir .libs 2>/dev/null
2045 if test -d .libs; then
2048 # MS-DOS does not allow filenames that begin with a dot.
2051 rmdir .libs 2>/dev/null])
2052 objdir=$lt_cv_objdir
2053 ])# AC_LIBTOOL_OBJDIR
2056 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2057 # ----------------------------------------------
2058 # Check hardcoding attributes.
2059 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2060 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2061 _LT_AC_TAGVAR(hardcode_action, $1)=
2062 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2063 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
2065 # We can hardcode non-existant directories.
2066 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2067 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2068 # have to relink, otherwise we might link with an installed library
2069 # when we should be linking with a yet-to-be-installed one
2070 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2071 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2072 # Linking always hardcodes the temporary library directory.
2073 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2075 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2076 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2079 # We cannot hardcode anything, or else we can only hardcode existing
2081 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2083 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2085 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2086 # Fast installation is not supported
2087 enable_fast_install=no
2088 elif test "$shlibpath_overrides_runpath" = yes ||
2089 test "$enable_shared" = no; then
2090 # Fast installation is not necessary
2091 enable_fast_install=needless
2093 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2096 # AC_LIBTOOL_SYS_LIB_STRIP
2097 # ------------------------
2098 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2101 AC_MSG_CHECKING([whether stripping libraries is possible])
2102 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2103 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2104 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2105 AC_MSG_RESULT([yes])
2109 ])# AC_LIBTOOL_SYS_LIB_STRIP
2112 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2113 # -----------------------------
2114 # PORTME Fill in your ld.so characteristics
2115 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2116 [AC_MSG_CHECKING([dynamic linker characteristics])
2118 libname_spec='lib$name'
2125 shlibpath_overrides_runpath=unknown
2127 dynamic_linker="$host_os ld.so"
2128 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2129 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2130 need_lib_prefix=unknown
2131 hardcode_into_libs=no
2133 # when you set need_version to no, make sure it does not cause -set_version
2134 # flags to be left without arguments
2135 need_version=unknown
2140 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2141 shlibpath_var=LIBPATH
2143 # AIX 3 has no versioning support, so we append a major version to the name.
2144 soname_spec='${libname}${release}.so$major'
2149 if test "$host_cpu" = ia64; then
2150 # AIX 5 supports IA64
2151 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2152 shlibpath_var=LD_LIBRARY_PATH
2154 # With GCC up to 2.95.x, collect2 would create an import file
2155 # for dependence libraries. The import file would start with
2156 # the line `#! .'. This would cause the generated library to
2157 # depend on `.', always an invalid library. This was fixed in
2158 # development snapshots of GCC prior to 3.0.
2160 aix4 | aix4.[[01]] | aix4.[[01]].*)
2161 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2163 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2170 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2171 # soname into executable. Probably we can add versioning support to
2172 # collect2, so additional links can be useful in future.
2173 if test "$aix_use_runtimelinking" = yes; then
2174 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2175 # instead of lib<name>.a to let people know that these are not
2176 # typical AIX shared libraries.
2177 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2179 # We preserve .a as extension for shared libraries through AIX4.2
2180 # and later when we are not doing run time linking.
2181 library_names_spec='${libname}${release}.a $libname.a'
2182 soname_spec='${libname}${release}.so$major'
2184 shlibpath_var=LIBPATH
2189 library_names_spec='$libname.ixlibrary $libname.a'
2190 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2191 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'
2195 library_names_spec='${libname}.so'
2196 dynamic_linker="$host_os ld.so"
2197 shlibpath_var=LIBRARY_PATH
2203 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2204 soname_spec='${libname}${release}.so$major'
2205 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2206 shlibpath_var=LD_LIBRARY_PATH
2207 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2208 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2209 # the default ld.so.conf also contains /usr/contrib/lib and
2210 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2211 # libtool to hard-code these into programs
2214 cygwin* | mingw* | pw32*)
2215 version_type=windows
2218 case $GCC,$host_os in
2220 library_names_spec='$libname.dll.a'
2221 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
2222 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2223 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2224 dldir=$destdir/`dirname \$dlpath`~
2225 test -d \$dldir || mkdir -p \$dldir~
2226 $install_prog .libs/$dlname \$dldir/$dlname'
2227 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2228 dlpath=$dir/\$dldll~
2232 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2233 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
2234 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
2235 # It is most probably a Windows format PATH printed by
2236 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2237 # path with ; separators, and with drive letters. We can handle the
2238 # drive letters (cygwin fileutils understands them), so leave them,
2239 # especially as we might pass files found there to a mingw objdump,
2240 # which wouldn't understand a cygwinified path. Ahh.
2241 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
2243 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
2247 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2250 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2253 dynamic_linker='Win32 ld.exe'
2254 # FIXME: first we should search . and the directory the executable is in
2258 darwin* | rhapsody*)
2259 dynamic_linker="$host_os dyld"
2263 # FIXME: Relying on posixy $() will cause problems for
2264 # cross-compilation, but unfortunately the echo tests do not
2265 # yet detect zsh echo's removal of \ escapes.
2266 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)'
2267 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2268 shlibpath_overrides_runpath=yes
2269 shlibpath_var=DYLD_LIBRARY_PATH
2276 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2277 soname_spec='${libname}${release}.so$major'
2278 shlibpath_var=LD_LIBRARY_PATH
2286 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2287 version_type=freebsd-$objformat
2288 case $version_type in
2290 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2295 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2299 shlibpath_var=LD_LIBRARY_PATH
2302 shlibpath_overrides_runpath=yes
2304 freebsd3.[01]* | freebsdelf3.[01]*)
2305 shlibpath_overrides_runpath=yes
2306 hardcode_into_libs=yes
2309 shlibpath_overrides_runpath=no
2310 hardcode_into_libs=yes
2319 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2320 soname_spec='${libname}${release}.so$major'
2321 shlibpath_var=LD_LIBRARY_PATH
2322 hardcode_into_libs=yes
2325 hpux9* | hpux10* | hpux11*)
2326 # Give a soname corresponding to the major version so that dld.sl refuses to
2327 # link against other versions.
2331 if test "$host_cpu" = ia64; then
2332 hardcode_into_libs=yes
2333 dynamic_linker="$host_os dld.so"
2334 shlibpath_var=LD_LIBRARY_PATH
2335 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2336 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2337 soname_spec='${libname}${release}.so$major'
2338 if test "X$HPUX_IA64_MODE" = X32; then
2339 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2341 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2343 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2345 dynamic_linker="$host_os dld.sl"
2346 shlibpath_var=SHLIB_PATH
2347 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2348 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2349 soname_spec='${libname}${release}.sl$major'
2351 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2352 postinstall_cmds='chmod 555 $lib'
2355 irix5* | irix6* | nonstopux*)
2357 nonstopux*) version_type=nonstopux ;;
2358 *) version_type=irix ;;
2362 soname_spec='${libname}${release}.so$major'
2363 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2365 irix5* | nonstopux*)
2369 case $LD in # libtool.m4 will add one of these switches to LD
2370 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2371 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2372 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2373 *) libsuff= shlibsuff= libmagic=never-match;;
2377 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2378 shlibpath_overrides_runpath=no
2379 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2380 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2383 # No shared lib support for Linux oldld, aout, or coff.
2384 linux*oldld* | linux*aout* | linux*coff*)
2388 # This must be Linux ELF.
2393 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2394 soname_spec='${libname}${release}.so$major'
2395 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2396 shlibpath_var=LD_LIBRARY_PATH
2397 shlibpath_overrides_runpath=no
2398 # This implies no fast_install, which is unacceptable.
2399 # Some rework will be needed to allow for fast_install
2400 # before this can be enabled.
2401 hardcode_into_libs=yes
2403 # We used to test for /lib/ld.so.1 and disable shared libraries on
2404 # powerpc, because MkLinux only supported shared libraries with the
2405 # GNU dynamic linker. Since this was broken with cross compilers,
2406 # most powerpc-linux boxes support dynamic linking these days and
2407 # people can always --disable-shared, the test was removed, and we
2408 # assume the GNU/Linux dynamic linker is in use.
2409 dynamic_linker='GNU/Linux ld.so'
2416 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2417 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2418 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2419 dynamic_linker='NetBSD (a.out) ld.so'
2421 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2422 soname_spec='${libname}${release}.so$major'
2423 dynamic_linker='NetBSD ld.elf_so'
2425 shlibpath_var=LD_LIBRARY_PATH
2426 shlibpath_overrides_runpath=yes
2427 hardcode_into_libs=yes
2432 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2433 shlibpath_var=LD_LIBRARY_PATH
2434 shlibpath_overrides_runpath=yes
2441 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2442 soname_spec='${libname}${release}.so$major'
2443 shlibpath_var=LD_LIBRARY_PATH
2444 shlibpath_overrides_runpath=yes
2451 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2452 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2453 shlibpath_var=LD_LIBRARY_PATH
2454 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2456 openbsd2.[[89]] | openbsd2.[[89]].*)
2457 shlibpath_overrides_runpath=no
2460 shlibpath_overrides_runpath=yes
2464 shlibpath_overrides_runpath=yes
2469 libname_spec='$name'
2471 library_names_spec='$libname.dll $libname.a'
2472 dynamic_linker='OS/2 ld.exe'
2473 shlibpath_var=LIBPATH
2476 osf3* | osf4* | osf5*)
2480 soname_spec='${libname}${release}.so'
2481 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2482 shlibpath_var=LD_LIBRARY_PATH
2483 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2484 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2489 soname_spec='${libname}${release}.so$major'
2490 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2491 shlibpath_var=LD_LIBRARY_PATH
2498 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2499 soname_spec='${libname}${release}.so$major'
2500 shlibpath_var=LD_LIBRARY_PATH
2501 shlibpath_overrides_runpath=yes
2502 hardcode_into_libs=yes
2503 # ldd complains unless libraries are executable
2504 postinstall_cmds='chmod +x $lib'
2509 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2510 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2511 shlibpath_var=LD_LIBRARY_PATH
2512 shlibpath_overrides_runpath=yes
2513 if test "$with_gnu_ld" = yes; then
2519 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2521 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2522 soname_spec='${libname}${release}.so$major'
2523 shlibpath_var=LD_LIBRARY_PATH
2524 case $host_vendor in
2526 shlibpath_overrides_runpath=no
2531 shlibpath_overrides_runpath=no
2532 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2538 if test -d /usr/nec ;then
2540 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2541 soname_spec='$libname.so.$major'
2542 shlibpath_var=LD_LIBRARY_PATH
2548 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2549 soname_spec='${libname}${release}.so$major'
2550 shlibpath_var=LD_LIBRARY_PATH
2557 AC_MSG_RESULT([$dynamic_linker])
2558 test "$dynamic_linker" = no && can_build_shared=no
2559 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2566 AC_DEFUN([_LT_AC_TAGCONFIG],
2569 if test "${ac_cv_prog_cxx_g+set}" = set; then
2572 if test "${ac_cv_prog_f77_g+set}" = set; then
2573 if test -n "$tagnames"; then
2574 tagnames="$tagnames,F77"
2581 if test -f "$ltmain" && test -n "$tagnames"; then
2582 if test ! -f "${ofile}"; then
2583 AC_MSG_WARN([output file `$ofile' does not exist])
2586 if test -z "$LTCC"; then
2587 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2588 if test -z "$LTCC"; then
2589 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2591 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2595 # Extract list of available tagged configurations in $ofile.
2596 # Note that this assumes the entire list is on one line.
2597 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2599 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2600 for tagname in $tagnames; do
2602 # Check whether tagname contains only valid characters
2603 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2605 *) AC_MSG_ERROR([invalid tag name: $tagname])
2609 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2611 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2614 # Update the list of available tags.
2615 if test -n "$tagname"; then
2616 echo appending configuration tag \"$tagname\" to $ofile
2620 AC_LIBTOOL_LANG_CXX_CONFIG
2624 AC_LIBTOOL_LANG_F77_CONFIG
2628 AC_LIBTOOL_LANG_GCJ_CONFIG
2632 AC_LIBTOOL_LANG_RC_CONFIG
2636 AC_MSG_ERROR([Unsupported tag name: $tagname])
2640 # Append the new tag name to the list of available tags.
2641 available_tags="$available_tags $tagname"
2646 # Now substitute the updated list of available tags.
2647 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2648 mv "${ofile}T" "$ofile"
2652 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2655 ])# _LT_AC_TAGCONFIG
2660 # enable checks for dlopen support
2661 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2662 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2663 ])# AC_LIBTOOL_DLOPEN
2666 # AC_LIBTOOL_WIN32_DLL
2667 # --------------------
2668 # declare package support for building win32 dll's
2669 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2670 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2671 ])# AC_LIBTOOL_WIN32_DLL
2674 # AC_ENABLE_SHARED([DEFAULT])
2675 # ---------------------------
2676 # implement the --enable-shared flag
2677 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2678 AC_DEFUN([AC_ENABLE_SHARED],
2679 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2680 AC_ARG_ENABLE([shared],
2681 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2682 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2683 [p=${PACKAGE-default}
2685 yes) enable_shared=yes ;;
2686 no) enable_shared=no ;;
2689 # Look at the argument we got. We use all the common list separators.
2690 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2691 for pkg in $enableval; do
2693 if test "X$pkg" = "X$p"; then
2700 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2701 ])# AC_ENABLE_SHARED
2706 #- set the default shared flag to --disable-shared
2707 AC_DEFUN([AC_DISABLE_SHARED],
2708 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2709 AC_ENABLE_SHARED(no)
2710 ])# AC_DISABLE_SHARED
2713 # AC_ENABLE_STATIC([DEFAULT])
2714 # ---------------------------
2715 # implement the --enable-static flag
2716 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2717 AC_DEFUN([AC_ENABLE_STATIC],
2718 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2719 AC_ARG_ENABLE([static],
2720 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2721 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2722 [p=${PACKAGE-default}
2724 yes) enable_static=yes ;;
2725 no) enable_static=no ;;
2728 # Look at the argument we got. We use all the common list separators.
2729 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2730 for pkg in $enableval; do
2732 if test "X$pkg" = "X$p"; then
2739 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2740 ])# AC_ENABLE_STATIC
2745 # set the default static flag to --disable-static
2746 AC_DEFUN([AC_DISABLE_STATIC],
2747 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2748 AC_ENABLE_STATIC(no)
2749 ])# AC_DISABLE_STATIC
2752 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2753 # ---------------------------------
2754 # implement the --enable-fast-install flag
2755 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2756 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2757 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2758 AC_ARG_ENABLE([fast-install],
2759 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2760 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2761 [p=${PACKAGE-default}
2763 yes) enable_fast_install=yes ;;
2764 no) enable_fast_install=no ;;
2766 enable_fast_install=no
2767 # Look at the argument we got. We use all the common list separators.
2768 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2769 for pkg in $enableval; do
2771 if test "X$pkg" = "X$p"; then
2772 enable_fast_install=yes
2778 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2779 ])# AC_ENABLE_FAST_INSTALL
2782 # AC_DISABLE_FAST_INSTALL
2783 # -----------------------
2784 # set the default to --disable-fast-install
2785 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2786 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2787 AC_ENABLE_FAST_INSTALL(no)
2788 ])# AC_DISABLE_FAST_INSTALL
2791 # AC_LIBTOOL_PICMODE([MODE])
2792 # --------------------------
2793 # implement the --with-pic flag
2794 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2795 AC_DEFUN([AC_LIBTOOL_PICMODE],
2796 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2797 pic_mode=ifelse($#,1,$1,default)
2798 ])# AC_LIBTOOL_PICMODE
2801 # AC_PATH_TOOL_PREFIX
2802 # -------------------
2803 # find a file program which can recognise shared library
2804 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2805 [AC_MSG_CHECKING([for $1])
2806 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2808 [[\\/*] | ?:[\\/]*])
2809 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2812 lt_save_MAGIC_CMD="$MAGIC_CMD"
2813 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2814 dnl $ac_dummy forces splitting on constant user-supplied paths.
2815 dnl POSIX.2 word splitting is done only on the output of word expansions,
2816 dnl not every word. This closes a longstanding sh security hole.
2817 ac_dummy="ifelse([$2], , $PATH, [$2])"
2818 for ac_dir in $ac_dummy; do
2820 test -z "$ac_dir" && ac_dir=.
2821 if test -f $ac_dir/$1; then
2822 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2823 if test -n "$file_magic_test_file"; then
2824 case $deplibs_check_method in
2826 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2827 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2828 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2829 egrep "$file_magic_regex" > /dev/null; then
2834 *** Warning: the command libtool uses to detect shared libraries,
2835 *** $file_magic_cmd, produces output that libtool cannot recognize.
2836 *** The result is that libtool may fail to recognize shared libraries
2837 *** as such. This will affect the creation of libtool libraries that
2838 *** depend on shared libraries, but programs linked with such libtool
2839 *** libraries will work regardless of this problem. Nevertheless, you
2840 *** may want to report the problem to your system manager and/or to
2841 *** bug-libtool@gnu.org
2851 MAGIC_CMD="$lt_save_MAGIC_CMD"
2854 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2855 if test -n "$MAGIC_CMD"; then
2856 AC_MSG_RESULT($MAGIC_CMD)
2860 ])# AC_PATH_TOOL_PREFIX
2865 # find a file program which can recognise a shared library
2866 AC_DEFUN([AC_PATH_MAGIC],
2867 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2868 if test -z "$lt_cv_path_MAGIC_CMD"; then
2869 if test -n "$ac_tool_prefix"; then
2870 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2880 # find the path to the GNU or non-GNU linker
2881 AC_DEFUN([AC_PROG_LD],
2882 [AC_ARG_WITH([gnu-ld],
2883 [AC_HELP_STRING([--with-gnu-ld],
2884 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2885 [test "$withval" = no || with_gnu_ld=yes],
2887 AC_REQUIRE([AC_PROG_CC])dnl
2888 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2889 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2891 if test "$GCC" = yes; then
2892 # Check if gcc -print-prog-name=ld gives a path.
2893 AC_MSG_CHECKING([for ld used by GCC])
2896 # gcc leaves a trailing carriage return which upsets mingw
2897 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2899 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2902 # Accept absolute paths.
2903 [[\\/]]* | ?:[[\\/]]*)
2904 re_direlt='/[[^/]][[^/]]*/\.\./'
2905 # Canonicalize the path of ld
2906 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2907 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2908 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2910 test -z "$LD" && LD="$ac_prog"
2913 # If it fails, then pretend we aren't using GCC.
2917 # If it is relative, then search for the first ld in PATH.
2921 elif test "$with_gnu_ld" = yes; then
2922 AC_MSG_CHECKING([for GNU ld])
2924 AC_MSG_CHECKING([for non-GNU ld])
2926 AC_CACHE_VAL(lt_cv_path_LD,
2927 [if test -z "$LD"; then
2928 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2929 for ac_dir in $PATH; do
2931 test -z "$ac_dir" && ac_dir=.
2932 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2933 lt_cv_path_LD="$ac_dir/$ac_prog"
2934 # Check to see if the program is GNU ld. I'd rather use --version,
2935 # but apparently some GNU ld's only accept -v.
2936 # Break only if it was the GNU/non-GNU ld that we prefer.
2937 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2938 test "$with_gnu_ld" != no && break
2940 test "$with_gnu_ld" != yes && break
2946 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2949 if test -n "$LD"; then
2954 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2961 AC_DEFUN([AC_PROG_LD_GNU],
2962 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2963 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2964 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2965 lt_cv_prog_gnu_ld=yes
2967 lt_cv_prog_gnu_ld=no
2969 with_gnu_ld=$lt_cv_prog_gnu_ld
2973 # AC_PROG_LD_RELOAD_FLAG
2974 # ----------------------
2975 # find reload flag for linker
2976 # -- PORTME Some linkers may need a different reload flag.
2977 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2978 [AC_CACHE_CHECK([for $LD option to reload object files],
2979 lt_cv_ld_reload_flag,
2980 [lt_cv_ld_reload_flag='-r'])
2981 reload_flag=$lt_cv_ld_reload_flag
2982 case $reload_flag in
2984 *) reload_flag=" $reload_flag" ;;
2986 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2987 ])# AC_PROG_LD_RELOAD_FLAG
2990 # AC_DEPLIBS_CHECK_METHOD
2991 # -----------------------
2992 # how to check for library dependencies
2993 # -- PORTME fill in with the dynamic library characteristics
2994 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2995 [AC_CACHE_CHECK([how to recognise dependant libraries],
2996 lt_cv_deplibs_check_method,
2997 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2998 lt_cv_file_magic_test_file=
2999 lt_cv_deplibs_check_method='unknown'
3000 # Need to set the preceding variable on all platforms that support
3001 # interlibrary dependencies.
3002 # 'none' -- dependencies not supported.
3003 # `unknown' -- same as none, but documents that we really don't know.
3004 # 'pass_all' -- all dependencies passed with no checks.
3005 # 'test_compile' -- check by making test program.
3006 # 'file_magic [[regex]]' -- check by looking for files in library path
3007 # which responds to the $file_magic_cmd with a given egrep regex.
3008 # If you have `file' or equivalent on your system and you're not sure
3009 # whether `pass_all' will *always* work, you probably want this one.
3013 lt_cv_deplibs_check_method=pass_all
3017 lt_cv_deplibs_check_method=pass_all
3021 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3022 lt_cv_file_magic_cmd='/usr/bin/file -L'
3023 lt_cv_file_magic_test_file=/shlib/libc.so
3026 cygwin* | mingw* | pw32*)
3027 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3028 lt_cv_file_magic_cmd='$OBJDUMP -f'
3031 darwin* | rhapsody*)
3032 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3033 lt_cv_file_magic_cmd='/usr/bin/file -L'
3035 rhapsody* | darwin1.[[012]])
3036 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
3039 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3045 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3048 # Not sure whether the presence of OpenBSD here was a mistake.
3049 # Let's accept both of them until this is cleared up.
3050 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3051 lt_cv_file_magic_cmd=/usr/bin/file
3052 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3056 lt_cv_deplibs_check_method=pass_all
3061 lt_cv_deplibs_check_method=pass_all
3064 hpux10.20* | hpux11*)
3065 lt_cv_file_magic_cmd=/usr/bin/file
3066 if test "$host_cpu" = ia64; then
3067 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3068 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3070 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3071 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3075 irix5* | irix6* | nonstopux*)
3077 irix5* | nonstopux*)
3078 # this will be overridden with pass_all, but let us keep it just in case
3079 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3083 *-32|*"-32 ") libmagic=32-bit;;
3084 *-n32|*"-n32 ") libmagic=N32;;
3085 *-64|*"-64 ") libmagic=64-bit;;
3086 *) libmagic=never-match;;
3088 # this will be overridden with pass_all, but let us keep it just in case
3089 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3092 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3093 lt_cv_deplibs_check_method=pass_all
3096 # This must be Linux ELF.
3099 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
3100 lt_cv_deplibs_check_method=pass_all ;;
3102 # glibc up to 2.1.1 does not perform some relocations on ARM
3103 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3105 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3106 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3110 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3111 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3113 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3118 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3119 lt_cv_file_magic_cmd=/usr/bin/file
3120 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3124 lt_cv_deplibs_check_method=unknown
3128 lt_cv_file_magic_cmd=/usr/bin/file
3129 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3130 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3131 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3133 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3137 osf3* | osf4* | osf5*)
3138 # this will be overridden with pass_all, but let us keep it just in case
3139 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3140 lt_cv_file_magic_test_file=/shlib/libc.so
3141 lt_cv_deplibs_check_method=pass_all
3145 lt_cv_deplibs_check_method=pass_all
3149 lt_cv_deplibs_check_method=pass_all
3150 lt_cv_file_magic_test_file=/lib/libc.so
3153 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3154 case $host_vendor in
3156 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]]'
3157 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3160 lt_cv_deplibs_check_method=pass_all
3163 lt_cv_file_magic_cmd='/bin/file'
3164 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3167 lt_cv_file_magic_cmd='/bin/file'
3168 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3169 lt_cv_file_magic_test_file=/lib/libc.so
3174 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3175 lt_cv_deplibs_check_method=pass_all
3179 file_magic_cmd=$lt_cv_file_magic_cmd
3180 deplibs_check_method=$lt_cv_deplibs_check_method
3181 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3182 ])# AC_DEPLIBS_CHECK_METHOD
3187 # find the path to a BSD-compatible name lister
3188 AC_DEFUN([AC_PROG_NM],
3189 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3190 [if test -n "$NM"; then
3191 # Let the user override the test.
3194 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3195 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3197 test -z "$ac_dir" && ac_dir=.
3198 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3199 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3200 # Check to see if the nm accepts a BSD-compat flag.
3201 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3202 # nm: unknown option "B" ignored
3203 # Tru64's nm complains that /dev/null is an invalid object file
3204 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3205 lt_cv_path_NM="$tmp_nm -B"
3207 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3208 lt_cv_path_NM="$tmp_nm -p"
3211 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3212 continue # so that we can try to find one that supports BSD flags
3217 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3225 # check for math library
3226 AC_DEFUN([AC_CHECK_LIBM],
3227 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3230 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3231 # These system don't have libm
3234 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3235 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3238 AC_CHECK_LIB(m, main, LIBM="-lm")
3244 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3245 # -----------------------------------
3246 # sets LIBLTDL to the link flags for the libltdl convenience library and
3247 # LTDLINCL to the include flags for the libltdl header and adds
3248 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3249 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3250 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3251 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3252 # '${top_srcdir}/' (note the single quotes!). If your package is not
3253 # flat and you're not using automake, define top_builddir and
3254 # top_srcdir appropriately in the Makefiles.
3255 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3256 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3257 case $enable_ltdl_convenience in
3258 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3259 "") enable_ltdl_convenience=yes
3260 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3262 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3263 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3264 # For backwards non-gettext consistent compatibility...
3266 ])# AC_LIBLTDL_CONVENIENCE
3269 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3270 # -----------------------------------
3271 # sets LIBLTDL to the link flags for the libltdl installable library and
3272 # LTDLINCL to the include flags for the libltdl header and adds
3273 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3274 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3275 # DIRECTORY is not provided and an installed libltdl is not found, it is
3276 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3277 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3278 # quotes!). If your package is not flat and you're not using automake,
3279 # define top_builddir and top_srcdir appropriately in the Makefiles.
3280 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3281 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3282 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3283 AC_CHECK_LIB(ltdl, main,
3284 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3285 [if test x"$enable_ltdl_install" = xno; then
3286 AC_MSG_WARN([libltdl not installed, but installation disabled])
3288 enable_ltdl_install=yes
3291 if test x"$enable_ltdl_install" = x"yes"; then
3292 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3293 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3294 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3296 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3300 # For backwards non-gettext consistent compatibility...
3302 ])# AC_LIBLTDL_INSTALLABLE
3305 # If this macro is not defined by Autoconf, define it here.
3306 ifdef([AC_PROVIDE_IFELSE],
3308 [define([AC_PROVIDE_IFELSE],
3309 [ifdef([AC_PROVIDE_$1],
3315 # enable support for C++ libraries
3316 AC_DEFUN([AC_LIBTOOL_CXX],
3317 [AC_REQUIRE([_LT_AC_LANG_CXX])
3323 AC_DEFUN([_LT_AC_LANG_CXX],
3324 [AC_REQUIRE([AC_PROG_CXX])
3325 AC_REQUIRE([AC_PROG_CXXCPP])
3331 # enable support for Fortran 77 libraries
3332 AC_DEFUN([AC_LIBTOOL_F77],
3333 [AC_REQUIRE([_LT_AC_LANG_F77])
3339 AC_DEFUN([_LT_AC_LANG_F77],
3340 [AC_REQUIRE([AC_PROG_F77])
3346 # enable support for GCJ libraries
3347 AC_DEFUN([AC_LIBTOOL_GCJ],
3348 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3354 AC_DEFUN([_LT_AC_LANG_GCJ],
3355 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3356 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3357 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3358 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3359 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3360 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3366 # enable support for Windows resource files
3367 AC_DEFUN([AC_LIBTOOL_RC],
3368 [AC_REQUIRE([AC_PROG_RC])
3372 # AC_LIBTOOL_LANG_C_CONFIG
3373 # ------------------------
3374 # Ensure that the configuration vars for the C compiler are
3375 # suitably defined. Those variables are subsequently used by
3376 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3377 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3378 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3382 # Source file extension for C test sources.
3385 # Object file extension for compiled C test sources.
3387 _LT_AC_TAGVAR(objext, $1)=$objext
3389 # Code to be used in simple compile tests
3390 lt_simple_compile_test_code="int some_variable = 0;\n"
3392 # Code to be used in simple link tests
3393 lt_simple_link_test_code='main(){return(0);}\n'
3398 # Check for any special shared library compilation flags.
3400 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3401 if test "$GCC" = no; then
3404 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3408 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3409 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3410 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3412 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3413 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3419 # Check to make sure the static flag actually works.
3421 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3422 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3423 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3425 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3429 ## There is no encapsulation within the following macros, do not change
3430 ## the running order or otherwise move them around unless you know exactly
3431 ## what you are doing...
3432 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3433 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3434 AC_LIBTOOL_PROG_CC_C_O($1)
3435 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3436 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3437 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3438 AC_LIBTOOL_SYS_LIB_STRIP
3439 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3440 AC_LIBTOOL_DLOPEN_SELF($1)
3442 # Report which librarie types wil actually be built
3443 AC_MSG_CHECKING([if libtool supports shared libraries])
3444 AC_MSG_RESULT([$can_build_shared])
3446 AC_MSG_CHECKING([whether to build shared libraries])
3447 test "$can_build_shared" = "no" && enable_shared=no
3449 # On AIX, shared libraries and static libraries use the same namespace, and
3450 # are all built from PIC.
3453 test "$enable_shared" = yes && enable_static=no
3454 if test -n "$RANLIB"; then
3455 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3456 postinstall_cmds='$RANLIB $lib'
3461 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3462 test "$enable_shared" = yes && enable_static=no
3466 AC_MSG_RESULT([$enable_shared])
3468 AC_MSG_CHECKING([whether to build static libraries])
3469 # Make sure either enable_shared or enable_static is yes.
3470 test "$enable_shared" = yes || enable_static=yes
3471 AC_MSG_RESULT([$enable_static])
3473 AC_LIBTOOL_CONFIG($1)
3477 ])# AC_LIBTOOL_LANG_C_CONFIG
3480 # AC_LIBTOOL_LANG_CXX_CONFIG
3481 # --------------------------
3482 # Ensure that the configuration vars for the C compiler are
3483 # suitably defined. Those variables are subsequently used by
3484 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3485 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3486 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3488 AC_REQUIRE([AC_PROG_CXX])
3489 AC_REQUIRE([AC_PROG_CXXCPP])
3491 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3492 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3493 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3494 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3495 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3496 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3497 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3498 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3499 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3500 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3501 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3502 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3503 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3505 # Dependencies to place before and after the object being linked:
3506 _LT_AC_TAGVAR(predep_objects, $1)=
3507 _LT_AC_TAGVAR(postdep_objects, $1)=
3508 _LT_AC_TAGVAR(predeps, $1)=
3509 _LT_AC_TAGVAR(postdeps, $1)=
3510 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3512 # Source file extension for C test sources.
3515 # Object file extension for compiled C test sources.
3517 _LT_AC_TAGVAR(objext, $1)=$objext
3519 # Code to be used in simple compile tests
3520 lt_simple_compile_test_code="int some_variable = 0;\n"
3522 # Code to be used in simple link tests
3523 lt_simple_link_test_code='int main(int char *[]) { return(0); }\n'
3525 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3528 # Allow CC to be a program name with arguments.
3533 _LT_AC_TAGVAR(compiler, $1)=$CC
3534 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3536 # We don't want -fno-exception wen compiling C++ code, so set the
3537 # no_builtin_flag separately
3538 if test "$GXX" = yes; then
3539 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3541 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3544 if test "$GXX" = yes; then
3545 # Set up default GNU C++ configuration
3547 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3548 # archiving commands below assume that GNU ld is being used.
3549 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
3550 egrep 'GNU ld' > /dev/null; then
3553 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3554 _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'
3556 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3557 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3559 # If archive_cmds runs LD, not CC, wlarc should be empty
3560 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3561 # investigate it a little bit more. (MM)
3564 # ancient GNU ld didn't support --whole-archive et. al.
3565 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3566 egrep 'no-whole-archive' > /dev/null; then
3567 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3569 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3575 # A generic and very simple default shared library creation
3576 # command for GNU C++ for the case where it uses the native
3577 # linker, instead of GNU ld. If possible, this setting should
3578 # overridden to take advantage of the native linker features on
3579 # the platform it is being used on.
3580 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3583 # Commands to make compiler produce verbose output that lists
3584 # what "hidden" libraries, object files and flags are used when
3585 # linking a shared library.
3586 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3594 # PORTME: fill in a description of your system's C++ link characteristics
3595 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3596 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3599 # FIXME: insert proper C++ library support
3600 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3603 if test "$host_cpu" = ia64; then
3604 # On IA64, the linker does run time linking by default, so we don't
3605 # have to do anything special.
3606 aix_use_runtimelinking=no
3607 exp_sym_flag='-Bexport'
3610 aix_use_runtimelinking=no
3612 # Test if we are trying to use run time linking or normal
3613 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3614 # need to do runtime linking.
3615 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3616 for ld_flag in $LDFLAGS; do
3617 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3618 aix_use_runtimelinking=yes
3624 exp_sym_flag='-bexport'
3625 no_entry_flag='-bnoentry'
3628 # When large executables or shared objects are built, AIX ld can
3629 # have problems creating the table of contents. If linking a library
3630 # or program results in "error TOC overflow" add -mminimal-toc to
3631 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3632 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3634 _LT_AC_TAGVAR(archive_cmds, $1)=''
3635 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3636 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3637 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3639 if test "$GXX" = yes; then
3640 case $host_os in aix4.[012]|aix4.[012].*)
3641 # We only want to do this on AIX 4.2 and lower, the check
3642 # below for broken collect2 doesn't work under 4.3+
3643 collect2name=`${CC} -print-prog-name=collect2`
3644 if test -f "$collect2name" && \
3645 strings "$collect2name" | grep resolve_lib_name >/dev/null
3647 # We have reworked collect2
3648 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3650 # We have old collect2
3651 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3652 # It fails to find uninstalled libraries when the uninstalled
3653 # path is not listed in the libpath. Setting hardcode_minus_L
3654 # to unsupported forces relinking
3655 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3656 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3657 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3660 shared_flag='-shared'
3663 if test "$host_cpu" = ia64; then
3664 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3665 # chokes on -Wl,-G. The following line is correct:
3668 if test "$aix_use_runtimelinking" = yes; then
3669 shared_flag='${wl}-G'
3671 shared_flag='${wl}-bM:SRE'
3676 # It seems that -bexpall does not export symbols beginning with
3677 # underscore (_), so it is better to generate a list of symbols to export.
3678 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3679 if test "$aix_use_runtimelinking" = yes; then
3680 # Warning - without using the other runtime loading flags (-brtl),
3681 # -berok will link without error, but may produce a broken library.
3682 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3683 # Determine the default libpath from the value encoded in an empty executable.
3684 _LT_AC_SYS_LIBPATH_AIX
3685 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3687 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3689 if test "$host_cpu" = ia64; then
3690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3691 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3692 _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"
3694 # Determine the default libpath from the value encoded in an empty executable.
3695 _LT_AC_SYS_LIBPATH_AIX
3696 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3697 # Warning - without using the other run time loading flags,
3698 # -berok will link without error, but may produce a broken library.
3699 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3700 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3701 # -bexpall does not export symbols beginning with underscore (_)
3702 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3703 # Exported symbols can be pulled into shared objects from archives
3704 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3705 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3706 # This is similar to how AIX traditionally builds it's shared libraries.
3707 _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'
3712 case $cc_basename in
3714 # FIXME: insert proper C++ library support
3715 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3720 case $cc_basename in
3722 # FIXME: insert proper C++ library support
3723 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3726 # Green Hills C++ Compiler
3727 # FIXME: insert proper C++ library support
3728 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3731 # FIXME: insert proper C++ library support
3732 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3737 # C++ shared libraries reported to be fairly broken before switch to ELF
3738 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3741 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3744 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3746 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3751 if test $with_gnu_ld = no; then
3752 if test "$host_cpu" = ia64; then
3753 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3755 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3756 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3757 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3760 if test "$host_cpu" = ia64; then
3761 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3762 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3764 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3766 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3767 # but as the default
3768 # location of the library.
3770 case $cc_basename in
3772 # FIXME: insert proper C++ library support
3773 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3778 _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'
3781 if test "$host_cpu" = ia64; then
3782 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3784 _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'
3788 # Commands to make compiler produce verbose output that lists
3789 # what "hidden" libraries, object files and flags are used when
3790 # linking a shared library.
3792 # There doesn't appear to be a way to prevent this compiler from
3793 # explicitly linking system object files so we need to strip them
3794 # from the output so that they don't get included in the library
3796 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'
3799 if test "$GXX" = yes; then
3800 if test $with_gnu_ld = no; then
3803 _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'
3806 if test "$host_cpu" = ia64; then
3807 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3809 _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'
3815 # FIXME: insert proper C++ library support
3816 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3822 case $cc_basename in
3825 _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'
3827 # Archives containing C++ object files must be created using
3828 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3829 # necessary to make sure instantiated templates are included
3831 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3834 if test "$GXX" = yes; then
3835 if test "$with_gnu_ld" = no; then
3836 _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'
3838 _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'
3841 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3844 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3845 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3848 case $cc_basename in
3850 # Kuck and Associates, Inc. (KAI) C++ Compiler
3852 # KCC will only create a shared library if the output file
3853 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3854 # to its proper name (with version) after linking.
3855 _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'
3856 _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'
3858 # Commands to make compiler produce verbose output that lists
3859 # what "hidden" libraries, object files and flags are used when
3860 # linking a shared library.
3862 # There doesn't appear to be a way to prevent this compiler from
3863 # explicitly linking system object files so we need to strip them
3864 # from the output so that they don't get included in the library
3866 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'
3868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3869 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3871 # Archives containing C++ object files must be created using
3872 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3873 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3877 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3878 _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'
3880 runpath_var=LD_RUN_PATH
3881 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3882 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3884 # Commands to make compiler produce verbose output that lists
3885 # what "hidden" libraries, object files and flags are used when
3886 # linking a shared library.
3888 # There doesn't appear to be a way to prevent this compiler from
3889 # explicitly linking system object files so we need to strip them
3890 # from the output so that they don't get included in the library
3892 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'
3897 # FIXME: insert proper C++ library support
3898 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3901 # FIXME: insert proper C++ library support
3902 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3905 case $cc_basename in
3907 # FIXME: insert proper C++ library support
3908 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3911 # FIXME: insert proper C++ library support
3912 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3917 # NetBSD uses g++ - do we need to do anything?
3920 case $cc_basename in
3922 # Kuck and Associates, Inc. (KAI) C++ Compiler
3924 # KCC will only create a shared library if the output file
3925 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3926 # to its proper name (with version) after linking.
3927 _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'
3929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3930 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3932 # Archives containing C++ object files must be created using
3933 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3934 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3938 # Rational C++ 2.4.1
3939 # FIXME: insert proper C++ library support
3940 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3943 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3944 _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'
3946 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3947 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3949 # Commands to make compiler produce verbose output that lists
3950 # what "hidden" libraries, object files and flags are used when
3951 # linking a shared library.
3953 # There doesn't appear to be a way to prevent this compiler from
3954 # explicitly linking system object files so we need to strip them
3955 # from the output so that they don't get included in the library
3957 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'
3960 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3961 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3962 _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'
3964 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3965 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3967 # Commands to make compiler produce verbose output that lists
3968 # what "hidden" libraries, object files and flags are used when
3969 # linking a shared library.
3970 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
3973 # FIXME: insert proper C++ library support
3974 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3980 case $cc_basename in
3982 # Kuck and Associates, Inc. (KAI) C++ Compiler
3984 # KCC will only create a shared library if the output file
3985 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3986 # to its proper name (with version) after linking.
3987 _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'
3989 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3990 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3992 # Archives containing C++ object files must be created using
3993 # the KAI C++ compiler.
3994 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3997 # Rational C++ 2.4.1
3998 # FIXME: insert proper C++ library support
3999 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4002 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4003 _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'
4004 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
4005 echo "-hidden">> $lib.exp~
4006 $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~
4009 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4010 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4012 # Commands to make compiler produce verbose output that lists
4013 # what "hidden" libraries, object files and flags are used when
4014 # linking a shared library.
4016 # There doesn't appear to be a way to prevent this compiler from
4017 # explicitly linking system object files so we need to strip them
4018 # from the output so that they don't get included in the library
4020 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'
4023 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4024 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4025 _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'
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4028 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4030 # Commands to make compiler produce verbose output that lists
4031 # what "hidden" libraries, object files and flags are used when
4032 # linking a shared library.
4033 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
4036 # FIXME: insert proper C++ library support
4037 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4043 # FIXME: insert proper C++ library support
4044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4047 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4048 case $cc_basename in
4050 # FIXME: insert proper C++ library support
4051 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4054 # FIXME: insert proper C++ library support
4055 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4060 case $cc_basename in
4063 # FIXME: insert proper C++ library support
4064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4068 # FIXME: insert proper C++ library support
4069 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4072 # FIXME: insert proper C++ library support
4073 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4078 case $cc_basename in
4080 # Sun C++ 4.2, 5.x and Centerline C++
4081 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4083 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4084 $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'
4086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4087 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4089 solaris2.[0-5] | solaris2.[0-5].*) ;;
4091 # The C++ compiler is used as linker so we must use $wl
4092 # flag to pass the commands to the underlying system
4094 # Supported since Solaris 2.6 (maybe 2.5.1?)
4095 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4098 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4100 # Commands to make compiler produce verbose output that lists
4101 # what "hidden" libraries, object files and flags are used when
4102 # linking a shared library.
4104 # There doesn't appear to be a way to prevent this compiler from
4105 # explicitly linking system object files so we need to strip them
4106 # from the output so that they don't get included in the library
4108 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'
4110 # Archives containing C++ object files must be created using
4111 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4112 # necessary to make sure instantiated templates are included
4114 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4117 # Green Hills C++ Compiler
4118 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4120 # The C++ compiler must be used to create the archive.
4121 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4124 # GNU C++ compiler with Solaris linker
4125 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4126 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4127 if $CC --version | egrep -v '^2\.7' > /dev/null; then
4128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
4129 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4130 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
4132 # Commands to make compiler produce verbose output that lists
4133 # what "hidden" libraries, object files and flags are used when
4134 # linking a shared library.
4135 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
4137 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4139 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
4140 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4141 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
4143 # Commands to make compiler produce verbose output that lists
4144 # what "hidden" libraries, object files and flags are used when
4145 # linking a shared library.
4146 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
4149 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4154 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4155 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4158 case $cc_basename in
4160 # NonStop-UX NCC 3.20
4161 # FIXME: insert proper C++ library support
4162 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4165 # FIXME: insert proper C++ library support
4166 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4171 # FIXME: insert proper C++ library support
4172 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4175 # FIXME: insert proper C++ library support
4176 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4179 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4180 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4182 # Figure out "hidden" C++ library dependencies from verbose
4183 # compiler output whening linking a shared library.
4184 cat > conftest.$ac_ext <<EOF
4188 Foo (void) { a = 0; }
4195 if AC_TRY_EVAL(ac_compile); then
4196 # Parse the compiler output and extract the necessary
4197 # objects, libraries and library flags.
4199 # Sentinel used to keep track of whether or not we are before
4200 # the conftest object file.
4201 pre_test_object_deps_done=no
4203 # The `*' in the case matches for architectures that use `case' in
4204 # $output_verbose_cmd can trigger glob expansion during the loop
4205 # eval without this substitution.
4206 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4208 for p in `eval $output_verbose_link_cmd`; do
4212 # Some compilers place space between "-{L,R}" and the path.
4215 || test $p = "-R"; then
4222 if test "$pre_test_object_deps_done" = no; then
4225 # Internal compiler library paths should come after those
4226 # provided the user. The postdeps already come after the
4227 # user supplied libs so there is no need to process them.
4228 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4229 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4231 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4234 # The "-l" case would never come before the object being
4235 # linked, so don't bother handling this case.
4238 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4239 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4241 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4247 # This assumes that the test object file only shows up
4248 # once in the compiler output.
4249 if test "$p" = "conftest.$objext"; then
4250 pre_test_object_deps_done=yes
4254 if test "$pre_test_object_deps_done" = no; then
4255 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4256 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4258 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4261 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4262 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4264 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4269 *) ;; # Ignore the rest.
4277 echo "libtool.m4: error: problem compiling C++ test program"
4280 $rm -f confest.$objext
4282 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4283 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4284 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
4287 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4288 _LT_AC_TAGVAR(LD, $1)="$LD"
4291 ## There is no encapsulation within the following macros, do not change
4292 ## the running order or otherwise move them around unless you know exactly
4293 ## what you are doing...
4294 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4295 AC_LIBTOOL_PROG_CC_C_O($1)
4296 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4297 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4298 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4299 AC_LIBTOOL_SYS_LIB_STRIP
4300 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4301 AC_LIBTOOL_DLOPEN_SELF($1)
4303 AC_LIBTOOL_CONFIG($1)
4307 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4310 # AC_LIBTOOL_LANG_F77_CONFIG
4311 # ------------------------
4312 # Ensure that the configuration vars for the C compiler are
4313 # suitably defined. Those variables are subsequently used by
4314 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4315 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4316 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4317 [AC_REQUIRE([AC_PROG_F77])
4318 AC_LANG_PUSH(Fortran 77)
4320 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4321 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4322 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4323 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4324 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4325 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4326 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4327 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4328 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4329 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4330 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4331 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4332 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4334 # Source file extension for f77 test sources.
4337 # Object file extension for compiled f77 test sources.
4339 _LT_AC_TAGVAR(objext, $1)=$objext
4341 # Code to be used in simple compile tests
4342 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4344 # Code to be used in simple link tests
4345 lt_simple_link_test_code=" program t\n end\n"
4347 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4350 # Allow CC to be a program name with arguments.
4355 _LT_AC_TAGVAR(compiler, $1)=$CC
4356 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4358 AC_MSG_CHECKING([if libtool supports shared libraries])
4359 AC_MSG_RESULT([$can_build_shared])
4361 AC_MSG_CHECKING([whether to build shared libraries])
4362 test "$can_build_shared" = "no" && enable_shared=no
4364 # On AIX, shared libraries and static libraries use the same namespace, and
4365 # are all built from PIC.
4368 test "$enable_shared" = yes && enable_static=no
4369 if test -n "$RANLIB"; then
4370 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4371 postinstall_cmds='$RANLIB $lib'
4375 test "$enable_shared" = yes && enable_static=no
4378 AC_MSG_RESULT([$enable_shared])
4380 AC_MSG_CHECKING([whether to build static libraries])
4381 # Make sure either enable_shared or enable_static is yes.
4382 test "$enable_shared" = yes || enable_static=yes
4383 AC_MSG_RESULT([$enable_static])
4385 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4387 _LT_AC_TAGVAR(GCC, $1)="$G77"
4388 _LT_AC_TAGVAR(LD, $1)="$LD"
4390 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4391 AC_LIBTOOL_PROG_CC_C_O($1)
4392 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4393 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4394 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4395 AC_LIBTOOL_SYS_LIB_STRIP
4396 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4398 AC_LIBTOOL_CONFIG($1)
4402 ])# AC_LIBTOOL_LANG_F77_CONFIG
4405 # AC_LIBTOOL_LANG_GCJ_CONFIG
4406 # --------------------------
4407 # Ensure that the configuration vars for the C compiler are
4408 # suitably defined. Those variables are subsequently used by
4409 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4410 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4411 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4414 # Source file extension for C test sources.
4417 # Object file extension for compiled C test sources.
4419 _LT_AC_TAGVAR(objext, $1)=$objext
4421 # Code to be used in simple compile tests
4422 lt_simple_compile_test_code="class foo {}\n"
4424 # Code to be used in simple link tests
4425 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4427 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4430 # Allow CC to be a program name with arguments.
4435 _LT_AC_TAGVAR(compiler, $1)=$CC
4437 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4438 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4441 ## There is no encapsulation within the following macros, do not change
4442 ## the running order or otherwise move them around unless you know exactly
4443 ## what you are doing...
4444 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4445 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4446 AC_LIBTOOL_PROG_CC_C_O($1)
4447 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4448 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4449 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4450 AC_LIBTOOL_SYS_LIB_STRIP
4451 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4452 AC_LIBTOOL_DLOPEN_SELF($1)
4454 AC_LIBTOOL_CONFIG($1)
4458 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4461 # AC_LIBTOOL_LANG_RC_CONFIG
4462 # --------------------------
4463 # Ensure that the configuration vars for the Windows resource compiler are
4464 # suitably defined. Those variables are subsequently used by
4465 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4466 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4467 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4470 # Source file extension for RC test sources.
4473 # Object file extension for compiled RC test sources.
4475 _LT_AC_TAGVAR(objext, $1)=$objext
4477 # Code to be used in simple compile tests
4478 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4480 # Code to be used in simple link tests
4481 lt_simple_link_test_code="$lt_simple_compile_test_code"
4483 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4486 # Allow CC to be a program name with arguments.
4491 _LT_AC_TAGVAR(compiler, $1)=$CC
4492 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4494 AC_LIBTOOL_CONFIG($1)
4498 ])# AC_LIBTOOL_LANG_RC_CONFIG
4501 # AC_LIBTOOL_CONFIG([TAGNAME])
4502 # ----------------------------
4503 # If TAGNAME is not passed, then create an initial libtool script
4504 # with a default configuration from the untagged config vars. Otherwise
4505 # add code to config.status for appending the configuration named by
4506 # TAGNAME from the matching tagged config vars.
4507 AC_DEFUN([AC_LIBTOOL_CONFIG],
4508 [# The else clause should only fire when bootstrapping the
4509 # libtool distribution, otherwise you forgot to ship ltmain.sh
4510 # with your package, and you will get complaints that there are
4511 # no rules to generate ltmain.sh.
4512 if test -f "$ltmain"; then
4513 # Now quote all the things that may contain metacharacters while being
4514 # careful not to overquote the AC_SUBSTed values. We take copies of the
4515 # variables and quote the copies for generation of the libtool script.
4516 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SHELL \
4517 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4518 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4519 deplibs_check_method reload_flag reload_cmds need_locks \
4520 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4521 lt_cv_sys_global_symbol_to_c_name_address \
4522 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4523 old_postinstall_cmds old_postuninstall_cmds \
4524 _LT_AC_TAGVAR(compiler, $1) \
4525 _LT_AC_TAGVAR(CC, $1) \
4526 _LT_AC_TAGVAR(LD, $1) \
4527 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4528 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4529 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4530 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4531 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4532 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4533 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4534 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4535 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4536 _LT_AC_TAGVAR(predep_objects, $1) \
4537 _LT_AC_TAGVAR(postdep_objects, $1) \
4538 _LT_AC_TAGVAR(predeps, $1) \
4539 _LT_AC_TAGVAR(postdeps, $1) \
4540 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4541 _LT_AC_TAGVAR(archive_cmds, $1) \
4542 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4543 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4544 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4545 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4546 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4547 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4548 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4549 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4550 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4551 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4552 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4553 _LT_AC_TAGVAR(include_expsyms, $1); do
4556 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4557 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4558 _LT_AC_TAGVAR(archive_cmds, $1) | \
4559 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4560 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4561 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4562 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4563 postinstall_cmds | postuninstall_cmds | \
4564 old_postinstall_cmds | old_postuninstall_cmds | \
4565 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4566 # Double-quote double-evaled strings.
4567 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4570 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4576 *'\[$]0 --fallback-echo"')
4577 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4582 [cfgfile="${ofile}T"
4583 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4585 AC_MSG_NOTICE([creating $ofile])],
4588 cat <<__EOF__ >> "$cfgfile"
4592 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4593 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4594 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4596 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4597 # Free Software Foundation, Inc.
4599 # This file is part of GNU Libtool:
4600 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4602 # This program is free software; you can redistribute it and/or modify
4603 # it under the terms of the GNU General Public License as published by
4604 # the Free Software Foundation; either version 2 of the License, or
4605 # (at your option) any later version.
4607 # This program is distributed in the hope that it will be useful, but
4608 # WITHOUT ANY WARRANTY; without even the implied warranty of
4609 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4610 # General Public License for more details.
4612 # You should have received a copy of the GNU General Public License
4613 # along with this program; if not, write to the Free Software
4614 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4616 # As a special exception to the GNU General Public License, if you
4617 # distribute this file as part of a program that contains a
4618 # configuration script generated by Autoconf, you may include it under
4619 # the same distribution terms that you use for the rest of that program.
4621 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4622 Xsed="sed -e s/^X//"
4624 # The HP-UX ksh and POSIX shell print the target directory to stdout
4626 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4628 # The names of the tagged configurations supported by this script.
4631 # ### BEGIN LIBTOOL CONFIG],
4632 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4634 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4636 # Shell to use when invoking shell scripts.
4639 # Whether or not to build shared libraries.
4640 build_libtool_libs=$enable_shared
4642 # Whether or not to build static libraries.
4643 build_old_libs=$enable_static
4645 # Whether or not to add -lc for building shared libraries.
4646 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4648 # Whether or not to optimize for fast installation.
4649 fast_install=$enable_fast_install
4652 host_alias=$host_alias
4655 # An echo program that does not interpret backslashes.
4660 AR_FLAGS=$lt_AR_FLAGS
4665 # A language-specific compiler.
4666 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4668 # Is the compiler the GNU C compiler?
4669 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4671 # The linker used to build libraries.
4672 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4674 # Whether we need hard or soft links.
4677 # A BSD-compatible nm program.
4680 # A symbol stripping program
4683 # Used to examine libraries when file_magic_cmd begins "file"
4684 MAGIC_CMD=$MAGIC_CMD
4686 # Used on cygwin: DLL creation program.
4689 # Used on cygwin: object dumper.
4692 # Used on cygwin: assembler.
4695 # The name of the directory that contains temporary libtool files.
4698 # How to create reloadable object files.
4699 reload_flag=$lt_reload_flag
4700 reload_cmds=$lt_reload_cmds
4702 # How to pass a linker flag through the compiler.
4703 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4705 # Object file suffix (normally "o").
4708 # Old archive suffix (normally "a").
4711 # Executable file suffix (normally "").
4714 # Additional compiler flags for building library objects.
4715 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4718 # What is the maximum length of a command?
4719 max_cmd_len=$lt_cv_sys_max_cmd_len
4721 # Does compiler simultaneously support -c and -o options?
4722 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4724 # Must we lock files when doing compilation ?
4725 need_locks=$lt_need_locks
4727 # Do we need the lib prefix for modules?
4728 need_lib_prefix=$need_lib_prefix
4730 # Do we need a version for libraries?
4731 need_version=$need_version
4733 # Whether dlopen is supported.
4734 dlopen_support=$enable_dlopen
4736 # Whether dlopen of programs is supported.
4737 dlopen_self=$enable_dlopen_self
4739 # Whether dlopen of statically linked programs is supported.
4740 dlopen_self_static=$enable_dlopen_self_static
4742 # Compiler flag to prevent dynamic linking.
4743 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4745 # Compiler flag to turn off builtin functions.
4746 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4748 # Compiler flag to allow reflexive dlopens.
4749 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4751 # Compiler flag to generate shared objects directly from archives.
4752 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4754 # Compiler flag to generate thread-safe objects.
4755 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4757 # Library versioning type.
4758 version_type=$version_type
4760 # Format of library name prefix.
4761 libname_spec=$lt_libname_spec
4763 # List of archive names. First name is the real one, the rest are links.
4764 # The last name is the one that the linker finds with -lNAME.
4765 library_names_spec=$lt_library_names_spec
4767 # The coded name of the library, if different from the real name.
4768 soname_spec=$lt_soname_spec
4770 # Commands used to build and install an old-style archive.
4772 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4773 old_postinstall_cmds=$lt_old_postinstall_cmds
4774 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4776 # Create an old-style archive from a shared archive.
4777 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4779 # Create a temporary old-style archive to link instead of a shared archive.
4780 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4782 # Commands used to build and install a shared archive.
4783 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4784 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4785 postinstall_cmds=$lt_postinstall_cmds
4786 postuninstall_cmds=$lt_postuninstall_cmds
4788 # Commands to strip libraries.
4789 old_striplib=$lt_old_striplib
4790 striplib=$lt_striplib
4792 # Dependencies to place before the objects being linked to create a
4794 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4796 # Dependencies to place after the objects being linked to create a
4798 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4800 # Dependencies to place before the objects being linked to create a
4802 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4804 # Dependencies to place after the objects being linked to create a
4806 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4808 # The library search path used internally by the compiler when linking
4810 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4812 # Method to check whether dependent libraries are shared objects.
4813 deplibs_check_method=$lt_deplibs_check_method
4815 # Command to use when deplibs_check_method == file_magic.
4816 file_magic_cmd=$lt_file_magic_cmd
4818 # Flag that allows shared libraries with undefined symbols to be built.
4819 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4821 # Flag that forces no undefined symbols.
4822 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4824 # Commands used to finish a libtool library installation in a directory.
4825 finish_cmds=$lt_finish_cmds
4827 # Same as above, but a single script fragment to be evaled but not shown.
4828 finish_eval=$lt_finish_eval
4830 # Take the output of nm and produce a listing of raw symbols and C names.
4831 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4833 # Transform the output of nm in a proper C declaration
4834 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4836 # Transform the output of nm in a C name address pair
4837 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4839 # This is the shared library runtime path variable.
4840 runpath_var=$runpath_var
4842 # This is the shared library path variable.
4843 shlibpath_var=$shlibpath_var
4845 # Is shlibpath searched before the hard-coded library search path?
4846 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4848 # How to hardcode a shared library path into an executable.
4849 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4851 # Whether we should hardcode library paths into libraries.
4852 hardcode_into_libs=$hardcode_into_libs
4854 # Flag to hardcode \$libdir into a binary during linking.
4855 # This must work even if \$libdir does not exist.
4856 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4858 # Whether we need a single -rpath flag with a separated argument.
4859 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4861 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
4863 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4865 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4867 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4869 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4870 # the resulting binary.
4871 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4873 # Variables whose values should be saved in libtool wrapper scripts and
4874 # restored at relink time.
4875 variables_saved_for_relink="$variables_saved_for_relink"
4877 # Whether libtool must link a program against all its dependency libraries.
4878 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4880 # Compile-time system search path for libraries
4881 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4883 # Run-time system search path for libraries
4884 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4886 # Fix the shell variable \$srcfile for the compiler.
4887 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4889 # Set to yes if exported symbols are required.
4890 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4892 # The commands to list exported symbols.
4893 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4895 # The commands to extract the exported symbol list from a shared archive.
4896 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4898 # Symbols that should not be listed in the preloaded symbols.
4899 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4901 # Symbols that must always be exported.
4902 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4905 [# ### END LIBTOOL CONFIG],
4906 [# ### END LIBTOOL TAG CONFIG: $tagname])
4913 cat <<\EOF >> "$cfgfile"
4915 # AIX sometimes has problems with the GCC collect2 program. For some
4916 # reason, if we set the COLLECT_NAMES environment variable, the problems
4917 # vanish in a puff of smoke.
4918 if test "X${COLLECT_NAMES+set}" != Xset; then
4920 export COLLECT_NAMES
4925 cygwin* | mingw* | pw32* | os2*)
4926 cat <<'EOF' >> "$cfgfile"
4927 # This is a source program that is used to create dlls on Windows
4928 # Don't remove nor modify the starting and closing comments
4930 # This is a source program that is used to create import libraries
4931 # on Windows for dlls which lack them. Don't remove nor modify the
4932 # starting and closing comments
4933 _LT_AC_FILE_IMPGEN_C
4938 # We use sed instead of cat because bash on DJGPP gets confused if
4939 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4940 # text mode, it properly converts lines to CR/LF. This bash problem
4941 # is reportedly fixed, but why not run on old versions too?
4942 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4944 mv -f "$cfgfile" "$ofile" || \
4945 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4949 # If there is no Makefile yet, we rely on a make rule to execute
4950 # `config.status --recheck' to rerun these tests and create the
4951 # libtool script then.
4952 test -f Makefile && make "$ltmain"
4954 ])# AC_LIBTOOL_CONFIG
4957 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4958 # -------------------------------------------
4959 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4960 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4962 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4964 if test "$GCC" = yes; then
4965 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4967 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4968 lt_cv_prog_compiler_rtti_exceptions,
4969 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
4970 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4972 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4975 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4976 # ---------------------------------
4977 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4978 [AC_REQUIRE([AC_CANONICAL_HOST])
4979 AC_REQUIRE([AC_PROG_NM])
4980 AC_REQUIRE([AC_OBJEXT])
4981 # Check for command to grab the raw symbol name followed by C symbol from nm.
4982 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4983 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4985 # These are sane defaults that work on at least a few old systems.
4986 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4988 # Character class describing NM global symbol codes.
4989 symcode='[[BCDEGRST]]'
4991 # Regexp to match symbols that can be accessed directly from C.
4992 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4994 # Transform the above into a raw symbol and a C symbol.
4995 symxfrm='\1 \2\3 \3'
4997 # Transform an extracted symbol line into a proper C declaration
4998 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5000 # Transform an extracted symbol line into symbol name and symbol address
5001 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'"
5003 # Define system-specific variables.
5008 cygwin* | mingw* | pw32*)
5009 symcode='[[ABCDGISTW]]'
5011 hpux*) # Its linker distinguishes data from code symbols
5012 if test "$host_cpu" = ia64; then
5013 symcode='[[ABCDEGRST]]'
5015 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5016 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'"
5019 symcode='[[BCDEGRST]]'
5025 symcode='[[DFNSTU]]'
5029 # Handle CRLF in mingw tool chain
5033 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5037 # If we're using GNU nm, then use its standard symbol codes.
5038 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
5039 symcode='[[ABCDGISTW]]'
5042 # Try without a prefix undercore, then with it.
5043 for ac_symprfx in "" "_"; do
5045 # Write the raw and C identifiers.
5046 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5048 # Check to see that the pipe works correctly.
5052 cat > conftest.$ac_ext <<EOF
5057 void nm_test_func(){}
5061 int main(){nm_test_var='a';nm_test_func();return(0);}
5064 if AC_TRY_EVAL(ac_compile); then
5065 # Now try to grab the symbols.
5067 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5068 # Try sorting and uniquifying the output.
5069 if sort "$nlist" | uniq > "$nlist"T; then
5070 mv -f "$nlist"T "$nlist"
5075 # Make sure that we snagged all the symbols we need.
5076 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
5077 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
5078 cat <<EOF > conftest.$ac_ext
5084 # Now generate the symbol file.
5085 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5087 cat <<EOF >> conftest.$ac_ext
5088 #if defined (__STDC__) && __STDC__
5089 # define lt_ptr_t void *
5091 # define lt_ptr_t char *
5095 /* The mapping between symbol names and symbols. */
5100 lt_preloaded_symbols[[]] =
5103 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5104 cat <<\EOF >> conftest.$ac_ext
5112 # Now try linking the two files.
5113 mv conftest.$ac_objext conftstm.$ac_objext
5114 lt_save_LIBS="$LIBS"
5115 lt_save_CFLAGS="$CFLAGS"
5116 LIBS="conftstm.$ac_objext"
5117 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5118 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5121 LIBS="$lt_save_LIBS"
5122 CFLAGS="$lt_save_CFLAGS"
5124 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5127 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5130 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5133 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5134 cat conftest.$ac_ext >&5
5136 rm -f conftest* conftst*
5138 # Do not use the global_symbol_pipe unless it works.
5139 if test "$pipe_works" = yes; then
5142 lt_cv_sys_global_symbol_pipe=
5146 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5147 lt_cv_sys_global_symbol_to_cdecl=
5149 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5150 AC_MSG_RESULT(failed)
5154 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5157 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5158 # ---------------------------------------
5159 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5160 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5161 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5162 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5164 AC_MSG_CHECKING([for $compiler option to produce PIC])
5166 # C++ specific cases for pic, static, wl, etc.
5167 if test "$GXX" = yes; then
5168 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5169 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5173 # All AIX code is PIC.
5174 if test "$host_cpu" = ia64; then
5175 # AIX 5 now supports IA64 processor
5176 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5180 # FIXME: we need at least 68020 code to build shared libraries, but
5181 # adding the `-m68020' flag to GCC prevents building anything better,
5183 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5185 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5186 # PIC is the default for these OSes.
5188 cygwin* | mingw* | os2*)
5189 # This hack is so that the source file can tell whether it is being
5190 # built for inclusion in a dll (and should export symbols for example).
5191 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5193 darwin* | rhapsody*)
5194 # PIC is the default on this platform
5195 # Common symbols not allowed in MH_DYLIB files
5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5199 # DJGPP does not support shared libraries at all
5200 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5203 if test -d /usr/nec; then
5204 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5208 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
5209 if test "$host_cpu" != ia64; then
5210 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5214 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5220 # All AIX code is PIC.
5221 if test "$host_cpu" = ia64; then
5222 # AIX 5 now supports IA64 processor
5223 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5225 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5229 case $cc_basename in
5231 # Green Hills C++ Compiler
5232 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5237 case $cc_basename in
5239 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5242 # Green Hills C++ Compiler
5243 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5250 # FreeBSD uses GNU C++
5252 hpux9* | hpux10* | hpux11*)
5253 case $cc_basename in
5255 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5256 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5257 if test "$host_cpu" != ia64; then
5258 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5262 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5264 if test "$host_cpu" != ia64; then
5265 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5272 irix5* | irix6* | nonstopux*)
5273 case $cc_basename in
5275 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5276 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5277 # CC pic flag -KPIC is the default.
5284 case $cc_basename in
5287 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5288 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5292 # Make sure the PIC flag is empty. It appears that all Alpha
5293 # Linux and Compaq Tru64 Unix objects are PIC.
5294 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5295 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5306 case $cc_basename in
5308 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5316 osf3* | osf4* | osf5*)
5317 case $cc_basename in
5319 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5322 # Rational C++ 2.4.1
5323 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5326 # Digital/Compaq C++
5327 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5328 # Make sure the PIC flag is empty. It appears that all Alpha
5329 # Linux and Compaq Tru64 Unix objects are PIC.
5330 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5331 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5340 case $cc_basename in
5342 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5349 case $cc_basename in
5351 # Sun C++ 4.2, 5.x and Centerline C++
5352 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5353 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5354 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5357 # Green Hills C++ Compiler
5358 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5365 case $cc_basename in
5368 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5369 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5373 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5380 case $cc_basename in
5382 # NonStop-UX NCC 3.20
5383 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5394 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5400 if test "$GCC" = yes; then
5401 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5402 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5406 # All AIX code is PIC.
5407 if test "$host_cpu" = ia64; then
5408 # AIX 5 now supports IA64 processor
5409 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5414 # FIXME: we need at least 68020 code to build shared libraries, but
5415 # adding the `-m68020' flag to GCC prevents building anything better,
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5420 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5421 # PIC is the default for these OSes.
5424 cygwin* | mingw* | pw32* | os2*)
5425 # This hack is so that the source file can tell whether it is being
5426 # built for inclusion in a dll (and should export symbols for example).
5427 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5430 darwin* | rhapsody*)
5431 # PIC is the default on this platform
5432 # Common symbols not allowed in MH_DYLIB files
5433 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5437 # Just because we use GCC doesn't mean we suddenly get shared libraries
5438 # on systems that don't support them.
5439 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5444 if test -d /usr/nec; then
5445 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5450 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
5451 if test "$host_cpu" != ia64; then
5452 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5457 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5461 # PORTME Check for flag to pass linker flags through the system compiler.
5464 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5465 if test "$host_cpu" = ia64; then
5466 # AIX 5 now supports IA64 processor
5467 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5469 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5473 cygwin* | mingw* | pw32* | os2*)
5474 # This hack is so that the source file can tell whether it is being
5475 # built for inclusion in a dll (and should export symbols for example).
5476 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5479 hpux9* | hpux10* | hpux11*)
5480 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5481 if test "$host_cpu" != ia64; then
5482 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5484 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5485 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5488 irix5* | irix6* | nonstopux*)
5489 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5490 # PIC (with -KPIC) is the default.
5491 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5495 # Check flags for non-gnu compilers on Linux. We check
5496 # the architectures too and not only the compiler names,
5497 # since they are often linked to cc.
5500 # The only non-gnu compiler on Linux/Alpha is the Compaq one:
5501 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5502 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5506 # Intel icc compiler
5507 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
5508 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption,link,'
5509 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5511 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5516 # Intel icc compiler
5517 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
5518 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption,link,'
5519 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5521 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5526 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5533 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5534 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5537 osf3* | osf4* | osf5*)
5538 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5539 # All OSF/1 code is PIC.
5540 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5544 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5545 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5549 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5550 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5551 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5555 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5556 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5557 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5560 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5561 if test "x$host_vendor" = xsni; then
5562 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
5564 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5566 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5567 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5571 if test -d /usr/nec ;then
5572 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5573 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5578 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5579 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5583 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5588 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5591 # Check to make sure the PIC flag actually works.
5593 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5594 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5595 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5596 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)], [],
5597 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5599 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5601 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5602 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5605 # For platforms which do not support PIC, -DPIC is meaningless:
5607 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5610 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC define -DPIC works],
5611 _LT_AC_TAGVAR(lt_prog_compiler_picdef_works, $1),
5612 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
5613 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"],
5614 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"])
5620 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5621 # ------------------------------------
5622 # See if the linker supports building shared libraries.
5623 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5624 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5626 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5629 # If we're using GNU nm, then we don't want the "-C" option.
5630 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5631 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
5632 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5634 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5637 cygwin* | mingw* | pw32*)
5638 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5641 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5646 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5648 _LT_AC_TAGVAR(archive_cmds, $1)=
5649 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
5650 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5651 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5652 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5653 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5654 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5655 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5656 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5657 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5658 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5659 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5660 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5661 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5662 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5663 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5664 # include_expsyms should be a list of space-separated symbols to be *always*
5665 # included in the symbol list
5666 _LT_AC_TAGVAR(include_expsyms, $1)=
5667 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5668 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5669 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5670 # as well as any symbol that contains `d'.
5671 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5672 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5673 # platforms (ab)use it in PIC code, but their linkers get confused if
5674 # the symbol is explicitly referenced. Since portable code cannot
5675 # rely on this symbol name, it's probably fine to never include it in
5676 # preloaded symbol tables.
5677 extract_expsyms_cmds=
5680 cygwin* | mingw* | pw32*)
5681 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5682 # When not using gcc, we currently assume that we are using
5683 # Microsoft Visual C++.
5684 if test "$GCC" != yes; then
5693 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5694 if test "$with_gnu_ld" = yes; then
5695 # If archive_cmds runs LD, not CC, wlarc should be empty
5698 # See if GNU ld supports shared libraries.
5700 aix3* | aix4* | aix5*)
5701 # On AIX/PPC, the GNU linker is very broken
5702 if test "$host_cpu" != ia64; then
5703 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5706 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5707 *** to be unable to reliably create shared libraries on AIX.
5708 *** Therefore, libtool is disabling shared libraries support. If you
5709 *** really care for shared libraries, you may want to modify your PATH
5710 *** so that a non-GNU linker is found, and then restart.
5717 _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)'
5718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5719 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5721 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5722 # that the semantics of dynamic libraries on AmigaOS, at least up
5723 # to version 4, is to share data among multiple programs linked
5724 # with the same dynamic library. Since this doesn't match the
5725 # behavior of shared libraries on other platforms, we can't use
5727 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5731 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5732 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5733 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5734 # support --undefined. This deserves some investigation. FIXME
5735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5737 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5741 cygwin* | mingw* | pw32*)
5742 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
5743 # no search path for DLLs.
5744 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5745 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5746 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5748 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5749 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5750 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5751 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5752 else $CC -o impgen impgen.c ; fi)~
5753 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5755 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5757 # cygwin and mingw dlls have different entry points and sets of symbols
5759 # FIXME: what about values for MSVC?
5760 dll_entry=__cygwin_dll_entry@12
5761 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5765 dll_entry=_DllMainCRTStartup@12
5766 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5770 # mingw and cygwin differ, and it's simplest to just exclude the union
5771 # of the two symbol sets.
5772 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5774 # recent cygwin and mingw systems supply a stub DllMain which the user
5775 # can override, but on older systems we have to supply one (in ltdll.c)
5776 if test "x$lt_cv_need_dllmain" = "xyes"; then
5777 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5778 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~
5779 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5785 # Extract the symbol export list from an `--export-all' def file,
5786 # then regenerate the def file from the symbol export list, so that
5787 # the compiled dll only exports the symbol export list.
5788 # Be careful not to strip the DATA tag left by newer dlltools.
5789 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
5790 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5791 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5793 # If the export-symbols file already is a .def file (1st line
5794 # is EXPORTS), use it as is.
5795 # If DATA tags from a recent dlltool are present, honour them!
5796 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5797 cp $export_symbols $output_objdir/$soname-def;
5799 echo EXPORTS > $output_objdir/$soname-def;
5801 cat $export_symbols | while read symbol; do
5804 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5805 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
5807 _lt_hint=`expr 1 + \$_lt_hint`;
5811 $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~
5812 $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~
5813 $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~
5814 $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~
5815 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5819 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5820 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5823 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5824 _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'
5829 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5830 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5833 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5834 *** create shared libraries on Solaris systems. Therefore, libtool
5835 *** is disabling shared libraries support. We urge you to upgrade GNU
5836 *** binutils to release 2.9.1 or newer. Another option is to modify
5837 *** your PATH or compiler configuration so that the native linker is
5838 *** used, and then restart.
5841 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5842 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5843 _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'
5845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5850 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5852 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5853 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5857 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5858 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5859 _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'
5861 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5866 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5867 runpath_var=LD_RUN_PATH
5868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5869 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5871 cygwin* | mingw* | pw32*)
5872 # dlltool doesn't understand --whole-archive et. al.
5873 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5876 # ancient GNU ld didn't support --whole-archive et. al.
5877 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5878 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5880 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5886 # PORTME fill in a description of your system's linker (not GNU ld)
5889 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5890 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5891 _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'
5892 # Note: this linker hardcodes the directories in LIBPATH if there
5893 # are no directories specified by -L.
5894 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5895 if test "$GCC" = yes && test -z "$link_static_flag"; then
5896 # Neither direct hardcoding nor static linking is supported with a
5898 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5903 if test "$host_cpu" = ia64; then
5904 # On IA64, the linker does run time linking by default, so we don't
5905 # have to do anything special.
5906 aix_use_runtimelinking=no
5907 exp_sym_flag='-Bexport'
5910 # If we're using GNU nm, then we don't want the "-C" option.
5911 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5912 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
5913 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5915 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5917 aix_use_runtimelinking=no
5919 # Test if we are trying to use run time linking or normal
5920 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5921 # need to do runtime linking.
5922 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5923 for ld_flag in $LDFLAGS; do
5924 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5925 aix_use_runtimelinking=yes
5931 exp_sym_flag='-bexport'
5932 no_entry_flag='-bnoentry'
5935 # When large executables or shared objects are built, AIX ld can
5936 # have problems creating the table of contents. If linking a library
5937 # or program results in "error TOC overflow" add -mminimal-toc to
5938 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5939 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5941 _LT_AC_TAGVAR(archive_cmds, $1)=''
5942 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5943 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5944 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5946 if test "$GCC" = yes; then
5947 case $host_os in aix4.[012]|aix4.[012].*)
5948 # We only want to do this on AIX 4.2 and lower, the check
5949 # below for broken collect2 doesn't work under 4.3+
5950 collect2name=`${CC} -print-prog-name=collect2`
5951 if test -f "$collect2name" && \
5952 strings "$collect2name" | grep resolve_lib_name >/dev/null
5954 # We have reworked collect2
5955 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5957 # We have old collect2
5958 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5959 # It fails to find uninstalled libraries when the uninstalled
5960 # path is not listed in the libpath. Setting hardcode_minus_L
5961 # to unsupported forces relinking
5962 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5963 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5964 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5967 shared_flag='-shared'
5970 if test "$host_cpu" = ia64; then
5971 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5972 # chokes on -Wl,-G. The following line is correct:
5975 if test "$aix_use_runtimelinking" = yes; then
5976 shared_flag='${wl}-G'
5978 shared_flag='${wl}-bM:SRE'
5983 # It seems that -bexpall does not export symbols beginning with
5984 # underscore (_), so it is better to generate a list of symbols to export.
5985 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5986 if test "$aix_use_runtimelinking" = yes; then
5987 # Warning - without using the other runtime loading flags (-brtl),
5988 # -berok will link without error, but may produce a broken library.
5989 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5990 # Determine the default libpath from the value encoded in an empty executable.
5991 _LT_AC_SYS_LIBPATH_AIX
5992 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5993 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5995 if test "$host_cpu" = ia64; then
5996 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5997 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5998 _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"
6000 # Determine the default libpath from the value encoded in an empty executable.
6001 _LT_AC_SYS_LIBPATH_AIX
6002 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6003 # Warning - without using the other run time loading flags,
6004 # -berok will link without error, but may produce a broken library.
6005 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6006 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6007 # -bexpall does not export symbols beginning with underscore (_)
6008 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6009 # Exported symbols can be pulled into shared objects from archives
6010 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6011 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6012 # This is similar to how AIX traditionally builds it's shared libraries.
6013 _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'
6019 _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)'
6020 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6021 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6022 # see comment about different semantics on the GNU ld section
6023 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6027 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6030 cygwin* | mingw* | pw32*)
6031 # When not using gcc, we currently assume that we are using
6032 # Microsoft Visual C++.
6033 # hardcode_libdir_flag_spec is actually meaningless, as there is
6034 # no search path for DLLs.
6035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6036 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6037 # Tell ltmain to make .lib files, not .a files.
6039 # FIXME: Setting linknames here is a bad hack.
6040 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6041 # The linker will automatically build a .lib file if we build a DLL.
6042 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6043 # FIXME: Should let the user specify the lib program.
6044 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6045 fix_srcfile_path='`cygpath -w "$srcfile"`'
6048 darwin* | rhapsody*)
6050 rhapsody* | darwin1.[[012]])
6051 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6054 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6058 # FIXME: Relying on posixy $() will cause problems for
6059 # cross-compilation, but unfortunately the echo tests do not
6060 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
6061 # `"' quotes if we put them in here... so don't!
6062 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
6063 # We need to add '_' to the symbols in $export_symbols first
6064 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
6065 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6066 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6067 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6071 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6073 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6077 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6080 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6081 # support. Future versions do this automatically, but an explicit c++rt0.o
6082 # does not break anything, and helps significantly (at the cost of a little
6085 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6087 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6088 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6091 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6093 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6094 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6095 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6096 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6099 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6101 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6102 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6103 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6104 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6107 hpux9* | hpux10* | hpux11*)
6108 if test "$GCC" = yes; then
6111 _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'
6114 if test "$host_cpu" = ia64; then
6115 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6117 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6124 _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'
6127 if test "$host_cpu" = ia64; then
6128 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6130 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6135 if test "$host_cpu" = ia64; then
6136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6137 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6138 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6140 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6141 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6142 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6144 # hardcode_minus_L: Not really in the search PATH,
6145 # but as the default location of the library.
6146 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6147 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6150 irix5* | irix6* | nonstopux*)
6151 if test "$GCC" = yes; then
6152 _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'
6154 _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'
6156 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6157 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6158 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6162 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6163 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6165 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6167 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6168 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6169 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6173 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6174 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6175 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6176 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6177 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6181 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6182 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6185 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6186 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6187 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6190 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6191 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6192 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6195 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6203 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6204 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6205 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6206 _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'
6207 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6211 if test "$GCC" = yes; then
6212 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6213 _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'
6215 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6216 _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'
6218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6222 osf4* | osf5*) # as osf3* with the addition of -msym flag
6223 if test "$GCC" = yes; then
6224 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6225 _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'
6226 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6228 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6229 _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'
6230 _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~
6231 $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'
6233 # Both c and cxx compiler support -rpath directly
6234 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6236 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6240 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6241 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6242 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6243 runpath_var=LD_RUN_PATH
6244 hardcode_runpath_var=yes
6248 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6249 if test "$GCC" = yes; then
6250 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6251 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6252 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6254 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6255 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6256 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6258 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6259 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6261 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6262 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6263 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6265 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6269 if test "x$host_vendor" = xsequent; then
6270 # Use $CC to link under sequent, because it throws in some extra .o
6271 # files that make .init and .fini sections work.
6272 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6274 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6277 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6278 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6279 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6283 if test "x$host_vendor" = xsni; then
6284 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6285 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6287 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6288 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6290 runpath_var='LD_RUN_PATH'
6291 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6295 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6296 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6297 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6301 if test -d /usr/nec; then
6302 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6303 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6304 runpath_var=LD_RUN_PATH
6305 hardcode_runpath_var=yes
6306 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6311 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6312 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6313 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6314 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6315 hardcode_runpath_var=yes
6316 runpath_var=LD_RUN_PATH
6319 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6320 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6321 if test "$GCC" = yes; then
6322 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6326 runpath_var='LD_RUN_PATH'
6327 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6331 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6332 # $CC -shared without GNU ld will not create a library from C++
6333 # object files and a static libstdc++, better avoid it by now
6334 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6335 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6336 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6337 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6338 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6339 runpath_var='LD_RUN_PATH'
6343 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6345 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6349 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6354 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6355 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6357 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6358 if test "$GCC" = yes; then
6359 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6363 # Do we need to explicitly link libc?
6365 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6366 if test "$enable_shared" = yes && test "$GCC" = yes; then
6367 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6369 # FIXME: we may have to deal with multi-command sequences.
6372 # Test whether the compiler implicitly links with -lc since on some
6373 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6374 # to ld, don't add -lc before -lgcc.
6375 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6377 echo 'static int dummy;' > conftest.$ac_ext
6379 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6382 libobjs=conftest.$ac_objext
6384 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6390 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6391 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6392 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6394 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6396 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6398 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6400 cat conftest.err 1>&5
6403 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6407 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6410 # _LT_AC_FILE_LTDLL_C
6411 # -------------------
6412 # Be careful that the start marker always follows a newline.
6413 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6414 # /* ltdll.c starts here */
6415 # #define WIN32_LEAN_AND_MEAN
6416 # #include <windows.h>
6417 # #undef WIN32_LEAN_AND_MEAN
6418 # #include <stdio.h>
6420 # #ifndef __CYGWIN__
6421 # # ifdef __CYGWIN32__
6422 # # define __CYGWIN__ __CYGWIN32__
6426 # #ifdef __cplusplus
6429 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6430 # #ifdef __cplusplus
6435 # #include <cygwin/cygwin_dll.h>
6436 # DECLARE_CYGWIN_DLL( DllMain );
6438 # HINSTANCE __hDllInstance_base;
6441 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6443 # __hDllInstance_base = hInst;
6446 # /* ltdll.c ends here */
6447 ])# _LT_AC_FILE_LTDLL_C
6450 # _LT_AC_FILE_IMPGEN_C
6451 # --------------------
6452 # Be careful that the start marker always follows a newline.
6453 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
6454 # /* impgen.c starts here */
6455 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
6457 # This file is part of GNU libtool.
6459 # This program is free software; you can redistribute it and/or modify
6460 # it under the terms of the GNU General Public License as published by
6461 # the Free Software Foundation; either version 2 of the License, or
6462 # (at your option) any later version.
6464 # This program is distributed in the hope that it will be useful,
6465 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6466 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6467 # GNU General Public License for more details.
6469 # You should have received a copy of the GNU General Public License
6470 # along with this program; if not, write to the Free Software
6471 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6474 # #include <stdio.h> /* for printf() */
6475 # #include <unistd.h> /* for open(), lseek(), read() */
6476 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
6477 # #include <string.h> /* for strdup() */
6479 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
6481 # #define O_BINARY 0
6484 # static unsigned int
6485 # pe_get16 (fd, offset)
6489 # unsigned char b[2];
6490 # lseek (fd, offset, SEEK_SET);
6492 # return b[0] + (b[1]<<8);
6495 # static unsigned int
6496 # pe_get32 (fd, offset)
6500 # unsigned char b[4];
6501 # lseek (fd, offset, SEEK_SET);
6503 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6506 # static unsigned int
6510 # unsigned char *b = ptr;
6511 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6520 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
6521 # unsigned long export_rva, export_size, nsections, secptr, expptr;
6522 # unsigned long name_rvas, nexp;
6523 # unsigned char *expdata, *erva;
6524 # char *filename, *dll_name;
6526 # filename = argv[1];
6528 # dll = open(filename, O_RDONLY|O_BINARY);
6532 # dll_name = filename;
6534 # for (i=0; filename[i]; i++)
6535 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
6536 # dll_name = filename + i +1;
6538 # pe_header_offset = pe_get32 (dll, 0x3c);
6539 # opthdr_ofs = pe_header_offset + 4 + 20;
6540 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
6542 # if (num_entries < 1) /* no exports */
6545 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
6546 # export_size = pe_get32 (dll, opthdr_ofs + 100);
6547 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
6548 # secptr = (pe_header_offset + 4 + 20 +
6549 # pe_get16 (dll, pe_header_offset + 4 + 16));
6552 # for (i = 0; i < nsections; i++)
6555 # unsigned long secptr1 = secptr + 40 * i;
6556 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
6557 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
6558 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
6559 # lseek(dll, secptr1, SEEK_SET);
6560 # read(dll, sname, 8);
6561 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
6563 # expptr = fptr + (export_rva - vaddr);
6564 # if (export_rva + export_size > vaddr + vsize)
6565 # export_size = vsize - (export_rva - vaddr);
6570 # expdata = (unsigned char*)malloc(export_size);
6571 # lseek (dll, expptr, SEEK_SET);
6572 # read (dll, expdata, export_size);
6573 # erva = expdata - export_rva;
6575 # nexp = pe_as32 (expdata+24);
6576 # name_rvas = pe_as32 (expdata+32);
6578 # printf ("EXPORTS\n");
6579 # for (i = 0; i<nexp; i++)
6581 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
6582 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
6587 # /* impgen.c ends here */
6588 ])# _LT_AC_FILE_IMPGEN_C
6590 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6591 # ---------------------------------
6592 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6596 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6597 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6598 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6599 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6600 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6601 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6602 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6604 # This is just to silence aclocal about the macro not being used
6605 ifelse([AC_DISABLE_FAST_INSTALL])
6607 AC_DEFUN([LT_AC_PROG_GCJ],
6608 [AC_CHECK_TOOL(GCJ, gcj, no)
6609 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6613 AC_DEFUN([LT_AC_PROG_RC],
6614 [AC_CHECK_TOOL(RC, windres, no)