2 # AC_FUNC_FSEEKO is horribly broken in autoconf 2.61 and can
3 # cause silent corruption with largefiles. It is fixed in 2.62, but to
4 # prevent stupid mistakes we use our own version taken from the 2.63 tree.
7 # ACX_FUNC_FSEEKO_FIXED
9 AN_FUNCTION([ftello], [ACX_FUNC_FSEEKO_FIXED])
10 AN_FUNCTION([fseeko], [ACX_FUNC_FSEEKO_FIXED])
11 AC_DEFUN([ACX_FUNC_FSEEKO_FIXED],
12 [_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
13 [ac_cv_sys_largefile_source],
14 [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).],
15 [[#include <sys/types.h> /* for off_t */
17 [[int (*fp) (FILE *, off_t, int) = fseeko;
18 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]])
20 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
21 # in glibc 2.1.3, but that breaks too many other things.
22 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
24 if test $ac_cv_sys_largefile_source != unknown; then
25 AC_DEFINE(HAVE_FSEEKO, 1,
26 [Define to 1 if fseeko (and presumably ftello) exists and is declared.])
28 ])# ACX_FUNC_FSEEKO_FIXED
33 # This macro checks for fftw-2.x header files and libraries,
34 # including the possible prefixing with s or d to determine precision.
35 # Arg 1 is the fftw header/library name to check for, without
36 # prefix or anything else (e.g. rfftw_mpi for real MPI transforms)
37 # Arg 2 is the size of the real variable used.
38 AC_DEFUN([ACX_CHECK_FFTW2],
40 if test -z "$ac_fftw_firstname"; then
43 if test $sizeof_real = 8; then
51 xfftwname=${fftwcheckprefix}$1
54 # check header doesn't work, since we must use mpicc to get includes,
56 AC_MSG_CHECKING([for $xfftwname.h])
57 AC_TRY_COMPILE([#include <$xfftwname.h>],,
64 # fftwname was set if we found a header
66 if test -n "$fftwname"; then
67 # we cannot run the code since an MPI program might not be allowed
68 # on a login node of a supercomputer
69 AC_TRY_COMPILE([#include <$fftwname.h>],
70 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)]; ],
73 usedprefix=$fftwcheckprefix
77 if test "$ok" != "yes"; then
78 AC_MSG_CHECKING([for $1.h])
79 AC_TRY_COMPILE([#include <$1.h>],,AC_MSG_RESULT(yes),
82 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
83 [Do you have $prec precision FFTW-2.x installed? If you are using packages,]
84 [note that you also need fftw-devel to compile GROMACS. You can find the ]
85 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
86 [If you compiled FFTW-2.x yourself: ]
87 [Note that the default FFTW-2.x setup is double precision. Change the FFTW]
88 [configuration to single with --enable-float. If you want MPI support,]
89 [use --enable-mpi. It is a good idea to install both single & double.]
90 [If your sysadm doesn't want to install it you can do it to a location]
91 [in your home directory and provide the correct paths in the CPPFLAGS]
92 [and LDFLAGS environment variables before running configure.]
93 [That is also necessary to do if your compiler doesn't search]
94 [/usr/local/include and /usr/local/lib by default.]
95 [You can find information at www.gromacs.org, or in the INSTALL file.])
97 AC_TRY_COMPILE([#include <$1.h>],
98 [int _array_ [1 - 2 * !((sizeof(fftw_real)) == $sizeof_real)];],
104 AC_MSG_ERROR([Cannot find any $prec precision $xfftwname.h or $1.h]
105 [Do you have $prec precision FFTW-2.x installed? If you are using packages,]
106 [note that you also need fftw-devel to compile GROMACS. You can find the ]
107 [software at www.fftw.org, and detailed instructions at www.gromacs.org.]
108 [If you compiled FFTW-2.x yourself: ]
109 [Note that the default FFTW-2.x setup is double precision. Change the FFTW]
110 [configuration to single with --enable-float. If you want MPI support,]
111 [use --enable-mpi. It is a good idea to install both single & double.]
112 [If your sysadm doesn't want to install it you can do it to a location]
113 [in your home directory and provide the correct paths in the CPPFLAGS]
114 [and LDFLAGS environment variables before running configure.]
115 [That is also necessary to do if your compiler doesn't search]
116 [/usr/local/include and /usr/local/lib by default.]
117 [You can find information at www.gromacs.org, or in the INSTALL file.])])
120 AC_CHECK_LIB($fftwname,main,,
121 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))
122 ac_fftw_savedprefix=$usedprefix
123 ac_fftw_firstname=$fftwname
127 fftwname=${ac_fftw_savedprefix}$1
128 AC_MSG_CHECKING([for $fftwname.h])
130 [#include <$fftwname.h>],,
132 LIBS="-l$fftwname $LIBS"
133 AC_TRY_LINK_FUNC([main],,,
134 AC_MSG_ERROR([Can't find a library to match the $fftwname header]))],
137 AC_MSG_ERROR([Cant find $fftwname.h header. Make sure all your
138 fftw prefixes match - we already use $ac_fftw_firstname.h])
150 dnl Check for floating-point format and double precision word order.
151 dnl We dont require IEEE, but there are optimizations we can only do with it.
152 dnl Just as for integers, the bytes in a word can be small of big endian.
153 dnl There is already a standard autoconf macro (AC_C_BIGENDIAN) that you
154 dnl should use to check this for integers - I have never heard of a machine
155 dnl where it is not the same for integer and fp variables, but we still check
156 dnl it separately for fp variables here to be sure.
158 dnl However, in double precision there are also two ways to arrange the words
159 dnl forming a double (8-byte=2-word) variable.
160 dnl Normally this order is the same as the endian, but there are
161 dnl exceptions (e.g. ARM)
162 dnl We detect it by compiling a small test program and grepping into it.
164 AC_DEFUN([ACX_FLOAT_FORMAT],
165 [AC_CACHE_CHECK(floating-point format, acx_float_format,
166 [cat >conftest.$ac_ext <<EOF
167 [/* Check that a double is 8 bytes - die if it isnt */
168 extern char xyz [sizeof(double) == 8 ? 1 : -1];
170 /* "GROMACSX" in ascii */
171 (double) 3.80279098314984902657e+35 ,
172 /* "GROMACSX" in ebcdic */
173 (double) -1.37384666579378297437e+38 ,
174 /* "D__float" (vax) */
175 (double) 3.53802595280598432000e+18 ,
176 /* "IBMHEXFP" s390/ascii */
177 (double) 1.77977764695171661377e+10 ,
178 /* "IBMHEXFP" s390/ebcdic */
179 (double) -5.22995989424860458374e+10 };
182 if AC_TRY_EVAL(ac_compile); then
183 # dont match first and last letter because of rounding errors.
184 # next: big-endian - string is GROMACSX
185 if grep 'ROMACS' conftest.o >/dev/null 2>&1; then
186 acx_float_format='IEEE754 (big-endian byte and word order)'
187 # next: big-endian byte order, but little-endian word order - ACSXGROM
188 elif grep 'CSXGRO' conftest.o >/dev/null 2>&1; then
189 acx_float_format='IEEE754 (big-endian byte, little-endian word order)'
190 # next: little-endian - XSCAMORG
191 elif grep 'SCAMOR' conftest.o >/dev/null 2>&1; then
192 acx_float_format='IEEE754 (little-endian byte and word order)'
193 # next: little-endian byte order, but big-endian word order - MORGXSCA
194 elif grep 'ORGXSC' conftest.o >/dev/null 2>&1; then
195 acx_float_format='IEEE754 (big-endian byte, little-endian word order)'
196 elif grep '__floa' conftest.o >/dev/null 2>&1; then
197 acx_float_format='VAX D-float'
198 elif grep 'BMHEXF' conftest.o >/dev/null 2>&1; then
199 acx_float_format='IBM 370 hex'
201 AC_MSG_WARN([Unknown floating-point format])
204 AC_MSG_ERROR(compile failed)
207 case $acx_float_format in
208 'IEEE754 (big-endian byte and word order)' )
213 'IEEE754 (little-endian byte and word order)' )
218 'IEEE754 (big-endian byte, little-endian word order)' )
223 'IEEE754 (litte-endian byte, big-endian word order)' )
229 AC_DEFINE(FLOAT_FORMAT_VAX,,[VAX floating-point format if set])
232 AC_DEFINE(FLOAT_FORMAT_IBM_HEX,,[IBM HEX floating-point format if set (s390?)])
238 if test "$format" = "IEEE754"; then
239 AC_DEFINE(FLOAT_FORMAT_IEEE754,,[IEEE754 floating-point format. Memory layout is defined by
240 macros IEEE754_BIG_ENDIAN_BYTE_ORDER and IEEE754_BIG_ENDIAN_WORD_ORDER.])
242 if test "$byteorder" = "big"; then
243 AC_DEFINE(IEEE754_BIG_ENDIAN_BYTE_ORDER,,[Bytes in IEEE fp word are in big-endian order if set,
244 little-endian if not. Only relevant when FLOAT_FORMAT_IEEE754 is defined.])
246 if test "$wordorder" = "big"; then
247 AC_DEFINE(IEEE754_BIG_ENDIAN_WORD_ORDER,,[The two words in a double precision variable are in b
248 ig-endian order if set, little-endian if not. Do NOT assume this is the same as the byte order!
249 Only relevant when FLOAT_FORMAT_IEEE754 is defined.])
260 dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
261 dnl to easily use them in a Makefile.
263 dnl Adapted from a macro by Andreas Zeller.
265 dnl The variables provided are :
266 dnl link_motif (e.g. -L/usr/lesstif/lib -lXm -lXt)
267 dnl include_motif (e.g. -I/usr/lesstif/lib)
268 dnl motif_libraries (e.g. /usr/lesstif/lib)
269 dnl motif_includes (e.g. /usr/lesstif/include)
271 dnl The link_motif and include_motif variables should be fit to put on
272 dnl your application's link line in your Makefile.
274 AC_DEFUN([AC_FIND_MOTIF],
276 AC_REQUIRE([AC_PATH_XTRA])
281 dnl AC_ARG_WITH(motif,
282 dnl [ --without-motif do not use Motif widgets])
283 dnl Treat --without-motif like
284 dnl --without-motif-includes --without-motif-libraries.
286 if test "$no_x" = "yes"
292 AC_ARG_WITH(motif-includes,
293 [ --with-motif-includes=DIR Motif include files are in DIR],
294 motif_includes="$withval")
296 AC_ARG_WITH(motif-libraries,
297 [ --with-motif-libraries=DIR Motif libraries are in DIR],
298 motif_libraries="$withval")
301 AC_MSG_CHECKING(for Motif)
305 # Search the include files.
307 if test "$motif_includes" = ""; then
308 AC_CACHE_VAL(ac_cv_motif_includes,
310 ac_motif_save_LIBS="$LIBS"
311 ac_motif_save_INCLUDES="$INCLUDES"
312 ac_motif_save_CPPFLAGS="$CPPFLAGS"
313 ac_motif_save_LDFLAGS="$LDFLAGS"
315 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
316 INCLUDES="$X_CFLAGS $INCLUDES"
317 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
318 LDFLAGS="$X_LIBS $LDFLAGS"
320 ac_cv_motif_includes="no"
321 AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
323 # Xm/Xm.h is in the standard search path.
324 ac_cv_motif_includes=
327 # Xm/Xm.h is not in the standard search path.
328 # Locate it and put its directory in `motif_includes'
330 # /usr/include/Motif* are used on HP-UX (Motif).
331 # /usr/include/X11* are used on HP-UX (X and Athena).
332 # /usr/dt is used on Solaris (Motif).
333 # /usr/openwin is used on Solaris (X and Athena).
334 # Other directories are just guesses.
335 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
336 /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
337 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
338 /usr/dt/include /usr/openwin/include \
339 /usr/dt/*/include /opt/*/include /usr/include/Motif* \
340 "${prefix}"/*/include /usr/*/include /usr/local/*/include \
341 "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
342 if test -f "$dir/Xm/Xm.h"; then
343 ac_cv_motif_includes="$dir"
349 LIBS="$ac_motif_save_LIBS"
350 INCLUDES="$ac_motif_save_INCLUDES"
351 CPPFLAGS="$ac_motif_save_CPPFLAGS"
352 LDFLAGS="$ac_motif_save_LDFLAGS"
354 motif_includes="$ac_cv_motif_includes"
358 # Now for the libraries.
360 if test "$motif_libraries" = ""; then
361 AC_CACHE_VAL(ac_cv_motif_libraries,
363 ac_motif_save_LIBS="$LIBS"
364 ac_motif_save_INCLUDES="$INCLUDES"
365 ac_motif_save_CPPFLAGS="$CPPFLAGS"
366 ac_motif_save_LDFLAGS="$LDFLAGS"
368 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
369 INCLUDES="$X_CFLAGS $INCLUDES"
370 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
371 LDFLAGS="$X_LIBS $LDFLAGS"
373 ac_cv_motif_libraries="no"
374 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
376 # libXm.a is in the standard search path.
377 ac_cv_motif_libraries=
380 # libXm.a is not in the standard search path.
381 # Locate it and put its directory in `motif_libraries'
383 # /usr/lib/Motif* are used on HP-UX (Motif).
384 # /usr/lib/X11* are used on HP-UX (X and Athena).
385 # /usr/dt is used on Solaris (Motif).
386 # /usr/lesstif is used on Linux (Lesstif).
387 # /usr/openwin is used on Solaris (X and Athena).
388 # Other directories are just guesses.
389 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
390 /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
391 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
392 /usr/dt/lib /usr/openwin/lib \
393 /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
394 /usr/lesstif*/lib /usr/lib/Lesstif* \
395 "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
396 "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
397 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
398 ac_cv_motif_libraries="$dir"
404 LIBS="$ac_motif_save_LIBS"
405 INCLUDES="$ac_motif_save_INCLUDES"
406 CPPFLAGS="$ac_motif_save_CPPFLAGS"
407 LDFLAGS="$ac_motif_save_LDFLAGS"
410 motif_libraries="$ac_cv_motif_libraries"
413 # Provide an easier way to link
415 if test "$motif_includes" = "no" -o "$motif_libraries" = "no"; then
421 if test "$with_motif" != "no"; then
422 if test "$motif_libraries" = ""; then
423 link_motif="-lXm -lXt"
424 MOTIF_LIBS="-lXm -lXt"
426 link_motif="-L$motif_libraries -lXm -lXt"
427 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
429 if test "$motif_includes" != ""; then
430 include_motif="-I$motif_includes"
431 MOTIF_INCLUDES="-I$motif_includes"
433 LIBS="$LIBS $MOTIF_LIBS"
434 INCLUDES="$INCLUDES $MOTIF_INCLUDES"
435 AC_DEFINE(HAVE_MOTIF,,[Use motif/lesstif libraries])
443 motif_libraries_result="$motif_libraries"
444 motif_includes_result="$motif_includes"
445 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
446 test "$motif_includes_result" = "" && motif_includes_result="in default path"
447 test "$motif_libraries_result" = "no" && motif_libraries_result="(none)"
448 test "$motif_includes_result" = "no" && motif_includes_result="(none)"
449 AC_MSG_RESULT([libraries $motif_libraries_result, headers $motif_includes_result])
451 # seems as if Xm depends on -lXext and/or -lXp on old redhat and OS X.
452 ac_motif_save_LIBS="$LIBS"
453 ac_motif_save_INCLUDES="$INCLUDES"
454 ac_motif_save_CPPFLAGS="$CPPFLAGS"
455 ac_motif_save_LDFLAGS="$LDFLAGS"
456 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
457 INCLUDE="$INCLUDE $X_CFLAGS"
458 LDFLAGS="$X_LIBS $LDFLAGS"
459 # first try both - they are crossdependent! urk...
460 LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS $ac_motif_save_LIBS -lXext -lXp"
461 AC_MSG_CHECKING(for libXext and libXp)
462 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
464 X_PRE_LIBS="$X_PRE_LIBS -lXext -lXp"],[
466 # both libs didnt work, try libXext separately
467 LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS $ac_motif_save_LIBS -lXext"
468 AC_MSG_CHECKING(for only libXext)
469 AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
471 X_PRE_LIBS="$X_PRE_LIBS -lXext"],[AC_MSG_RESULT(no)])
473 LIBS=$ac_motif_save_LIBS
474 INCLUDES="$ac_motif_save_INCLUDES"
475 CPPFLAGS=$ac_motif_save_CPPFLAGS
476 LDFLAGS="$ac_motif_save_LDFLAGS"
480 dnl macro modified from the fftw distribution (www.fftw.org)
481 AC_DEFUN([ACX_CHECK_CC_FLAGS],
483 AC_REQUIRE([AC_PROG_CC])
484 AC_CACHE_CHECK(whether $CC accepts $1, ac_$2,
485 [echo 'void f(){}' > conftest.c
486 res=`$CC $1 -c conftest.c 2>&1`
488 # The stupid intel compiler echos the filename on stderr...
490 if test -z "$res" -o "$res" = "conftest.c:"; then
497 if test "$ac_$2" = yes; then
506 dnl macro modified from the fftw distribution (www.fftw.org)
507 AC_DEFUN([ACX_CHECK_F77_FLAGS],
509 AC_REQUIRE([AC_PROG_F77])
510 AC_CACHE_CHECK(whether $F77 accepts $1, ac_$2,
511 [cat > conftest.f << EOF
516 if test -z "`$F77 $1 -c conftest.f `"; then
523 if test "$ac_$2" = yes; then
534 # ---------------------------
535 # Macro to extend the exact CPU for some hosts
536 AC_DEFUN([ACX_DETECT_GMXCPU],
538 AC_REQUIRE([AC_CANONICAL_HOST])
541 # Determine the exact cpu type on some common systems where it is
542 # not visible from the host triplet.
543 # (on e.g. intel and dec/tru64 the host type is enough)
547 case "${host_cpu}-${host_os}" in
550 # some versions of config.status says these systems are PowerPC even
551 # when they have Power3 CPUs (they used to be recognized as rs6000),
552 # so we need to work around that.
554 # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
555 if test -f /usr/sbin/lsdev && test -f /usr/sbin/lsattr; then
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
557 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER5 >/dev/null 2>&1; then
559 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
561 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
563 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
567 if test -z "${gmxcpu}" && test -f /usr/sbin/lscfg; then
568 if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
570 elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
572 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
574 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
576 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
578 elif /usr/sbin/lscfg -vp | grep POWER2 >/dev/null 2>&1; then
580 elif /usr/sbin/lscfg -vp | grep POWER3 >/dev/null 2>&1; then
582 elif /usr/sbin/lscfg -vp | grep POWER4 >/dev/null 2>&1; then
589 if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
591 elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
593 elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
595 elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
603 if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
605 elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
607 elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
609 elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
624 ###############################################################
625 # Macro modified from the fftw distribution (www.fftw.org)
626 # to determine optimization flags.
627 # Note that we have modified config.guess and config.sub
628 # to provide extended information on the detailed type of CPU.
629 # In general we assume you have recent versions of the compilers
630 # that support the highest optimization we know of. If not, you
631 # can always override these flags, but it's better to upgrade :-)
632 ###############################################################
633 AC_DEFUN([ACX_COMPILER_MAXOPT],
635 AC_REQUIRE([AC_PROG_CC])
636 AC_REQUIRE([AC_PROG_F77])
637 AC_REQUIRE([AC_CANONICAL_HOST])
639 # Try to determine "good" native compiler flags if none specified on command
640 # line. To avoid repeating the entire procedure for fortran flags, we first
641 # determine our suggested choices for both C and fortran, and then possibly
642 # override them with user choices.
646 case "${host_cpu}-${host_os}" in
651 xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
655 xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
659 xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
663 xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
667 xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
674 xCFLAGS="-Ae +O3 +Oall"
676 # If you haven't noticed, we don't like hp very much...
677 # but perhaps that will change if they make something nice out of ia64.
681 # The GNU compilers are checked outside this case statement.
682 # Check for Intel Compilers. The SGI one was killed before
683 # it went final, so I cant imagine anyone is using it...
685 # Apparently, -O2 is better than -O3 for villin at least,
686 # but I have not yet had time to test all the other benchmarks
687 # on both optimization levels. Might need further tweaking.
689 # The Intel compilers are _really_ chatty when it comes to
690 # warnings, and also echo a lot of incomprehensible internal
691 # stuff (not gromacs-related) when we are using ia64 assembly.
692 # For this reason we disable warnings...
694 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
699 if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
700 xFFLAGS="-O3 -w90 -w95 -w"
703 # PORTME 2. Check for intel compilers when we get our hands on one!
706 # dont use inter-procedure analysis for the innerloops - they take
707 # forever to compile with it, and it doesnt help at all.
709 # use 8 segments (max 2Gb) instead of 1 (max 256Meg) by default.
710 xLDFLAGS="$xLDFLAGS -bmaxdata:0x80000000"
713 xCFLAGS="-O3 -qarch=pwr5 -qtune=pwr5 -qmaxmem=16384"
714 xFFLAGS="-O3 -Q -qarch=pwr5 -qtune=pwr5 -qmaxmem=16384 -qhot -qnoipa"
717 xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384"
718 xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
721 xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384"
722 xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
725 xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384"
726 xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
729 xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qmaxmem=16384"
730 xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
733 xCFLAGS="-O3 -qarch=604 -qtune=604 -qmaxmem=16384"
734 xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
737 xCFLAGS="-O3 -qarch=603 -qtune=603 -qmaxmem=16384"
738 xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
741 xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qmaxmem=16384"
742 xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
745 xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qmaxmem=16384"
746 xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
749 xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qmaxmem=16384"
750 xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
753 xCFLAGS="-O3 -qmaxmem=16384"
754 xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
759 powerpc*-darwin* | powerpc*-linux* )
760 # Check for IBM compilers on OS X
761 if $CC 2>&1 | grep 'IBM' > /dev/null 2>&1; then
762 xCFLAGS="-O4 -Q=500 -qaltivec -qnoipa"
764 if $F77 -V 2>&1 | grep 'IBM' > /dev/null 2>&1; then
765 xFFLAGS="-O4 -Q=500 -qnoipa"
770 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"
771 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"
773 if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
774 xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
775 xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
778 if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
779 xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms"
780 xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms"
784 # I have removed -n32 from the flags since it causes too many problems.
785 # New SGIs should use the right objects automatically, and it's not
786 # worth the hassle for 5-10 year old machines...
790 xCFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xCFLAGS"
791 xFFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xFFLAGS"
792 xLDFLAGS="$IRIXOBJFLAG -r12000 -mips4 $xLDFLAGS"
795 xCFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xCFLAGS"
796 xFFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xFFLAGS"
797 xLDFLAGS="$IRIXOBJFLAG -r10000 -mips4 $xLDFLAGS"
800 xCFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xCFLAGS"
801 xFFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xFFLAGS"
802 xLDFLAGS="$IRIXOBJFLAG -r8000 -mips4 $xLDFLAGS"
805 xCFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xCFLAGS"
806 xFFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xFFLAGS"
807 xLDFLAGS="$IRIXOBJFLAG -r5000 -mips4 $xLDFLAGS"
810 xCFLAGS="$IRIXOBJFLAG $xCFLAGS"
811 xFFLAGS="$IRIXOBJFLAG $xFFLAGS"
812 xLDFLAGS="$IRIXOBJFLAG $xLDFLAGS"
818 # NB: -arch implies -tune according to the cc manual.
819 # We dont use -ifo since it conflicts with dependency
820 # generation on old versions of the compiler.
821 case "${host_cpu}" in
823 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
824 evtype=`echo ${host_cpu} | sed 's/alpha//'`
825 xCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
826 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
827 xASFLAGS="-O4 -no_ifo -arch $evtype"
831 xCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
832 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
833 xASFLAGS="-O4 -no_ifo -arch host"
840 case "${host_cpu}" in
842 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
843 evtype=`echo ${host_cpu} | sed 's/alpha//'`
844 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch $evtype -unroll 2 -fp_reorder"
845 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
846 tmpASFLAGS="-O4 -no_ifo -arch $evtype"
850 tmpCFLAGS="-std1 -fast -O4 -no_ifo -arch host -unroll 2 -fp_reorder"
851 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
852 tmpASFLAGS="-O4 -no_ifo -arch host"
856 # Compaq sometimes uses -version and sometimes -V
857 # Not 100% sure if ccc always has -V and F77 -version, so
858 # we check both alternatives to be sure.
859 if (($CC -V 2>&1 | grep ompaq > /dev/null) ||
860 ($CC -version 2>&1 | grep ompaq > /dev/null)); then
862 xASFLAGS="$tmpASFLAGS"
865 if test "$enable_fortran" = "yes"; then
866 if (($F77 -V 2>&1 | grep ompaq > /dev/null) ||
867 ($F77 -version 2>&1 | grep ompaq > /dev/null)); then
874 # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
875 # further down, but check for some specific compilers.
876 # Portland group compilers:
877 if $CC -V 2> /dev/null | grep ortland > /dev/null 2>&1; then
878 case "${host_cpu}" in
886 xCFLAGS="$pgiopt -fast -pc 32"
889 if test "$enable_fortran" = "yes"; then
890 if $F77 -version 2> /dev/null | grep Portland > /dev/null 2>&1; then
896 # The Intel compilers are _really_ chatty when it comes to
897 # warnings, and also echo a lot of incomprehensible internal
898 # stuff (not gromacs-related) when we are using assembly.
899 # For this reason we disable warnings...
901 if $CC -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
903 case "${host_cpu}" in
905 xCFLAGS="-O3 -tpp7 -axW -ip -w"
908 xCFLAGS="-O3 -tpp6 -axK -ip -w"
915 # search in /usr/local/include too, just as gcc does. (handy for fftw)
916 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
918 if test "$enable_fortran" = "yes"; then
919 if $F77 -V 2>&1 | grep 'Intel' > /dev/null 2>&1; then
921 xFFLAGS="$xCFLAGS -w90 -w95"
927 # Phew, end of all those operating systems and processors!
929 # use default flags for gcc/g77 on all systems
930 if test $ac_cv_prog_gcc = yes; then
931 ACX_CHECK_CC_FLAGS(-O3,o3,xCFLAGS="$xCFLAGS -O3")
932 xCFLAGS="$xCFLAGS -fomit-frame-pointer -finline-functions -Wall -Wno-unused"
933 # For alpha axp assembly we need the preprocessor to tell elf from ecoff.
934 # The compaq ccc compiler only knows .s files, and always runs them
935 # through cpp. We support this by telling gcc to preprocess .s files.
936 case "${host_cpu}" in
938 xASFLAGS="$xCFLAGS -x assembler-with-cpp"
945 if test $enable_fortran = yes; then
946 if test $ac_cv_prog_g77 = yes; then
947 xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
948 # -malign-double for f77 on x86 systems - haven't checked that this works yet.
949 #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
955 if test "$GCC" = "yes"; then
956 # try to guess correct CPU flags, at least for powerpc linux
957 case "${host_cpu}" in
958 # i586/i686 cpu flags don't improve speed, thus no need to use them.
959 # don't check f77 separately - we assume f77 and gcc are similar
961 # don't use the separate apple cpp on OS X
962 # ACX_CHECK_CC_FLAGS(-no-cpp-precomp,no_cpp_precomp,xCFLAGS="$xCFLAGS -no-cpp-precomp")
963 if test "$enable_ppc_altivec" = "yes"; then
964 # Apple (darwin) uses a hacked version of gcc with special flags
967 ACX_CHECK_CC_FLAGS(-faltivec,faltivec,xCFLAGS="$xCFLAGS -faltivec")
970 # Need to update CPPFLAGS too, since we later call
971 # AC_CHECK_HEADER for altivec.h, and then autoconf complains
972 # if it cannot process it with the preprocessor.
973 ACX_CHECK_CC_FLAGS(-maltivec,maltivec,xCFLAGS="$xCFLAGS -maltivec" CPPFLAGS="$CPPFLAGS -maltivec")
974 ACX_CHECK_CC_FLAGS(-mabi=altivec,mabialtivec,xCFLAGS="$xCFLAGS -mabi=altivec" CPPFLAGS="$CPPFLAGS -mabi=altivec")
978 # -funroll-all-loops exposes a bug in altivec-enabled gcc-2.95.3
979 # on powerpc, so we only enable it on other platforms or gcc3.
980 # The gcc 2.95 instruction scheduler also destroys our handcoded altivec,
981 # so disable instruction scheduling on 2.95
982 if $CC --version 2>&1 | grep '2.95' > /dev/null 2>&1; then
983 echo "*****************************************************************************"
984 echo "* IMPORTANT INFO: You are using gcc-2.95.x on PowerPC. This compiler works, *"
985 echo "* but you will get better performance with gcc-3.3 or later. If you are *"
986 echo "* running OS X, download the latest devtools from http://developer.apple.com*"
987 echo "*****************************************************************************"
988 ACX_CHECK_CC_FLAGS(-fno-schedule-insns,fno_schedule_insns,xCFLAGS="$xCFLAGS -fno-schedule-insns")
990 ACX_CHECK_CC_FLAGS(-mcpu=7450,m_cpu_7450,CPU_FLAGS="-mcpu=7450")
991 ACX_CHECK_CC_FLAGS(-mtune=970,m_tune_970,CPU_FLAGS="$CPU_FLAGS -mtune=970")
992 if test -z "$CPU_FLAGS"; then
993 ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc,CPU_FLAGS="-mcpu=powerpc")
997 ACX_CHECK_CC_FLAGS(-funroll-all-loops,funroll_all_loops,xCFLAGS="$xCFLAGS -funroll-all-loops")
1002 if test -n "$CPU_FLAGS"; then
1003 xCFLAGS="$xCFLAGS $CPU_FLAGS"
1004 xFFLAGS="$xFFLAGS $CPU_FLAGS"
1005 xASFLAGS="$xASFLAGS $CPU_FLAGS"
1008 # Now check if the user provided anything special for C or fortran...
1009 # Not nice to have checked everything then, but otherwise we would have
1010 # to use entirely separate checks for C and fortran flags, doubling the code.
1011 if test "$ac_test_CFLAGS" != "set"; then
1013 # Use the extra link optimization flags on e.g. irix only when
1014 # we are using our own C compiler flags
1015 LDFLAGS="$LDFLAGS $xLDFLAGS"
1017 if test -z "$CFLAGS"; then
1018 echo "********************************************************************"
1019 echo "* Note: We have not optimized the C compiler flags on your target *"
1020 echo "* yet, but the default CFLAGS=-O3 should be OK in most cases. *"
1021 echo "* You can override this by setting the CFLAGS environment variable.*"
1022 echo "*******************************************************************"
1025 ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [
1026 echo "*******************************************************************"
1027 echo "* Sorry, these optimization settings don't seem to work for *"
1028 echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
1029 echo "*******************************************************************"
1033 echo "******************************************"
1034 echo "* Using CFLAGS from environment variable *"
1035 echo "******************************************"
1038 if test "$enable_fortran" = "yes"; then
1039 if test "$ac_test_FFLAGS" != "set"; then
1041 if test -z "$FFLAGS"; then
1042 echo "********************************************************************"
1043 echo "* Note: We have not optimized the Fortran compiler flags on your *"
1044 echo "* target, but the default FFLAGS=-O3 should be OK in most cases. *"
1045 echo "* You can override this by setting the CFLAGS environment variable.*"
1046 echo "********************************************************************"
1049 ACX_CHECK_F77_FLAGS(${FFLAGS}, guessed_fflags, , [
1050 echo "*******************************************************************"
1051 echo "* Sorry, these optimization settings don't seem to work for *"
1052 echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
1053 echo "*******************************************************************"
1057 echo "******************************************"
1058 echo "* Using FFLAGS from environment variable *"
1059 echo "******************************************"
1062 # Be silent for assembly flags, they are usually not important anyway
1063 if test "${ASFLAGS+set}" != set; then
1064 if test "${xASFLAGS+set}" != set; then
1073 dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
1075 dnl This macro figures out how to build C programs using POSIX
1076 dnl threads. It sets the PTHREAD_LIBS output variable to the threads
1077 dnl library and linker flags, and the PTHREAD_CFLAGS output variable
1078 dnl to any special C compiler flags that are needed. (The user can also
1079 dnl force certain compiler flags/libs to be tested by setting these
1080 dnl environment variables.)
1082 dnl Also sets PTHREAD_CC to any special C compiler that is needed for
1083 dnl multi-threaded programs (defaults to the value of CC otherwise).
1084 dnl (This is necessary on AIX to use the special cc_r compiler alias.)
1086 dnl If you are only building threads programs, you may wish to
1087 dnl use these variables in your default LIBS, CFLAGS, and CC:
1089 dnl LIBS="$PTHREAD_LIBS $LIBS"
1090 dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1091 dnl CC="$PTHREAD_CC"
1093 dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
1094 dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
1095 dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
1097 dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
1098 dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
1099 dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
1100 dnl the default action will define HAVE_PTHREAD.
1102 dnl Please let the authors know if this macro fails on any platform,
1103 dnl or if you have any other suggestions or comments. This macro was
1104 dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
1105 dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
1106 dnl macros posted by AFC to the autoconf macro repository. We are also
1107 dnl grateful for the helpful feedback of numerous users.
1110 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
1112 AC_DEFUN([ACX_PTHREAD], [
1113 AC_REQUIRE([AC_CANONICAL_HOST])
1118 # We used to check for pthread.h first, but this fails if pthread.h
1119 # requires special compiler flags (e.g. on True64 or Sequent).
1120 # It gets checked for in the link test anyway.
1122 # First of all, check if the user has set any of the PTHREAD_LIBS,
1123 # etcetera environment variables, and if threads linking works using
1125 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
1126 save_CFLAGS="$CFLAGS"
1127 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1129 LIBS="$PTHREAD_LIBS $LIBS"
1130 AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
1131 AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
1132 AC_MSG_RESULT($acx_pthread_ok)
1133 if test x"$acx_pthread_ok" = xno; then
1138 CFLAGS="$save_CFLAGS"
1141 # We must check for the threads library under a number of different
1142 # names; the ordering is very important because some systems
1143 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
1144 # libraries is broken (non-POSIX).
1146 # Create a list of thread flags to try. Items starting with a "-" are
1147 # C compiler flags, and other items are library names, except for "none"
1148 # which indicates that we try without any flags at all.
1150 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
1152 # The ordering *is* (sometimes) important. Some notes on the
1153 # individual items follow:
1155 # pthreads: AIX (must check this before -lpthread)
1156 # none: in case threads are in libc; should be tried before -Kthread and
1157 # other compiler flags to prevent continual compiler warnings
1158 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
1159 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
1160 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
1161 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
1162 # -pthreads: Solaris/gcc
1163 # -mthreads: Mingw32/gcc, Lynx/gcc
1164 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
1165 # doesn't hurt to check since this sometimes defines pthreads too;
1166 # also defines -D_REENTRANT)
1167 # pthread: Linux, etcetera
1168 # --thread-safe: KAI C++
1170 case "${host_cpu}-${host_os}" in
1173 # On Solaris (at least, for some versions), libc contains stubbed
1174 # (non-functional) versions of the pthreads routines, so link-based
1175 # tests will erroneously succeed. (We need to link with -pthread or
1176 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
1177 # a function called by this macro, so we could check for that, but
1178 # who knows whether they'll stub that too in a future libc.) So,
1179 # we'll just look for -pthreads and -lpthread first:
1181 acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
1185 if test x"$acx_pthread_ok" = xno; then
1186 for flag in $acx_pthread_flags; do
1190 AC_MSG_CHECKING([whether pthreads work without any flags])
1194 AC_MSG_CHECKING([whether pthreads work with $flag])
1195 PTHREAD_CFLAGS="$flag"
1199 AC_MSG_CHECKING([for the pthreads library -l$flag])
1200 PTHREAD_LIBS="-l$flag"
1205 save_CFLAGS="$CFLAGS"
1206 LIBS="$PTHREAD_LIBS $LIBS"
1207 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1209 # Check for various functions. We must include pthread.h,
1210 # since some functions may be macros. (On the Sequent, we
1211 # need a special flag -Kthread to make this header compile.)
1212 # We check for pthread_join because it is in -lpthread on IRIX
1213 # while pthread_create is in libc. We check for pthread_attr_init
1214 # due to DEC craziness with -lpthreads. We check for
1215 # pthread_cleanup_push because it is one of the few pthread
1216 # functions on Solaris that doesn't have a non-functional libc stub.
1217 # We try pthread_create on general principles.
1218 AC_TRY_LINK([#include <pthread.h>],
1219 [pthread_t th; pthread_join(th, 0);
1220 pthread_attr_init(0); pthread_cleanup_push(0, 0);
1221 pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
1222 [acx_pthread_ok=yes])
1225 CFLAGS="$save_CFLAGS"
1227 AC_MSG_RESULT($acx_pthread_ok)
1228 if test "x$acx_pthread_ok" = xyes; then
1237 # Various other checks:
1238 if test "x$acx_pthread_ok" = xyes; then
1240 LIBS="$PTHREAD_LIBS $LIBS"
1241 save_CFLAGS="$CFLAGS"
1242 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1244 # Detect AIX lossage: threads are created detached by default
1245 # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
1246 AC_MSG_CHECKING([for joinable pthread attribute])
1247 AC_TRY_LINK([#include <pthread.h>],
1248 [int attr=PTHREAD_CREATE_JOINABLE;],
1249 ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
1250 if test x"$ok" = xunknown; then
1251 AC_TRY_LINK([#include <pthread.h>],
1252 [int attr=PTHREAD_CREATE_UNDETACHED;],
1253 ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
1255 if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
1256 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
1257 [Define to the necessary symbol if this constant
1258 uses a non-standard name on your system.])
1260 AC_MSG_RESULT(${ok})
1261 if test x"$ok" = xunknown; then
1262 AC_MSG_WARN([we do not know how to create joinable pthreads])
1265 AC_MSG_CHECKING([if more special flags are required for pthreads])
1267 case "${host_cpu}-${host_os}" in
1268 *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
1269 *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
1271 AC_MSG_RESULT(${flag})
1272 if test "x$flag" != xno; then
1273 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
1277 CFLAGS="$save_CFLAGS"
1279 # More AIX lossage: must compile with cc_r
1280 AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
1285 AC_SUBST(PTHREAD_LIBS)
1286 AC_SUBST(PTHREAD_CFLAGS)
1287 AC_SUBST(PTHREAD_CC)
1289 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
1290 if test x"$acx_pthread_ok" = xyes; then
1291 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
1304 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1305 # -----------------------------------------------------------
1306 # If this macro is not defined by Autoconf, define it here.
1307 m4_ifdef([AC_PROVIDE_IFELSE],
1309 [m4_define([AC_PROVIDE_IFELSE],
1310 [m4_ifdef([AC_PROVIDE_$1],
1316 AC_DEFUN([AC_PROG_LIBTOOL],
1317 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1318 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1319 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1320 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1322 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1324 dnl And a similar setup for Fortran 77 support
1325 AC_PROVIDE_IFELSE([AC_PROG_F77],
1327 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1330 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1331 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1332 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1333 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1335 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1337 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1339 [ifdef([AC_PROG_GCJ],
1340 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1341 ifdef([A][M_PROG_GCJ],
1342 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1343 ifdef([LT_AC_PROG_GCJ],
1344 [define([LT_AC_PROG_GCJ],
1345 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1346 ])])# AC_PROG_LIBTOOL
1351 AC_DEFUN([_AC_PROG_LIBTOOL],
1352 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1353 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1354 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1355 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1357 # This can be used to rebuild libtool when needed
1358 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1360 # Always use our own libtool.
1361 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1362 AC_SUBST(LIBTOOL)dnl
1364 # Prevent multiple expansion
1365 define([AC_PROG_LIBTOOL], [])
1366 ])# _AC_PROG_LIBTOOL
1371 AC_DEFUN([AC_LIBTOOL_SETUP],
1373 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1374 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1375 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1376 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1377 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1378 AC_REQUIRE([AC_PROG_CC])dnl
1379 AC_REQUIRE([AC_PROG_LD])dnl
1380 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1381 AC_REQUIRE([AC_PROG_NM])dnl
1383 AC_REQUIRE([AC_PROG_LN_S])dnl
1384 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1385 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1386 AC_REQUIRE([AC_OBJEXT])dnl
1387 AC_REQUIRE([AC_EXEEXT])dnl
1390 AC_LIBTOOL_SYS_MAX_CMD_LEN
1391 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1394 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1395 _LT_AC_PROG_ECHO_BACKSLASH
1399 # AIX sometimes has problems with the GCC collect2 program. For some
1400 # reason, if we set the COLLECT_NAMES environment variable, the problems
1401 # vanish in a puff of smoke.
1402 if test "X${COLLECT_NAMES+set}" != Xset; then
1404 export COLLECT_NAMES
1409 # Sed substitution that helps us do robust quoting. It backslashifies
1410 # metacharacters that are still active within double-quoted strings.
1411 Xsed='sed -e 1s/^X//'
1412 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1414 # Same as above, but do not quote variable references.
1415 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1417 # Sed substitution to delay expansion of an escaped shell variable in a
1418 # double_quote_subst'ed string.
1419 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1421 # Sed substitution to avoid accidental globbing in evaled expressions
1422 no_glob_subst='s/\*/\\\*/g'
1428 default_ofile=libtool
1429 can_build_shared=yes
1431 # All known linkers require a `.a' archive for static linking (except MSVC,
1432 # which needs '.lib').
1434 ltmain="$ac_aux_dir/ltmain.sh"
1435 ofile="$default_ofile"
1436 with_gnu_ld="$lt_cv_prog_gnu_ld"
1438 AC_CHECK_TOOL(AR, ar, false)
1439 AC_CHECK_TOOL(RANLIB, ranlib, :)
1440 AC_CHECK_TOOL(STRIP, strip, :)
1443 old_CFLAGS="$CFLAGS"
1445 # Set sane defaults for various variables
1446 test -z "$AR" && AR=ar
1447 test -z "$AR_FLAGS" && AR_FLAGS=cru
1448 test -z "$AS" && AS=as
1449 test -z "$CC" && CC=cc
1450 test -z "$LTCC" && LTCC=$CC
1451 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1452 test -z "$DLLTOOL" && DLLTOOL=dlltool
1453 test -z "$LD" && LD=ld
1454 test -z "$LN_S" && LN_S="ln -s"
1455 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1456 test -z "$NM" && NM=nm
1457 test -z "$SED" && SED=sed
1458 test -z "$OBJDUMP" && OBJDUMP=objdump
1459 test -z "$RANLIB" && RANLIB=:
1460 test -z "$STRIP" && STRIP=:
1461 test -z "$ac_objext" && ac_objext=o
1463 # Determine commands to create old-style static archives.
1464 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1465 old_postinstall_cmds='chmod 644 $oldlib'
1466 old_postuninstall_cmds=
1468 if test -n "$RANLIB"; then
1471 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1474 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1477 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1480 _LT_CC_BASENAME([$compiler])
1482 # Only perform the check for file, if the check method requires it
1483 case $deplibs_check_method in
1485 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1491 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1492 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1493 enable_win32_dll=yes, enable_win32_dll=no)
1495 AC_ARG_ENABLE([libtool-lock],
1496 [AC_HELP_STRING([--disable-libtool-lock],
1497 [avoid locking (might break parallel builds)])])
1498 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1501 [AC_HELP_STRING([--with-pic],
1502 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1503 [pic_mode="$withval"],
1505 test -z "$pic_mode" && pic_mode=default
1507 # Use C for the default configuration in the libtool script
1509 AC_LIBTOOL_LANG_C_CONFIG
1511 ])# AC_LIBTOOL_SETUP
1514 # _LT_AC_SYS_COMPILER
1515 # -------------------
1516 AC_DEFUN([_LT_AC_SYS_COMPILER],
1517 [AC_REQUIRE([AC_PROG_CC])dnl
1519 # If no C compiler was specified, use CC.
1522 # If no C compiler flags were specified, use CFLAGS.
1523 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1525 # Allow CC to be a program name with arguments.
1527 ])# _LT_AC_SYS_COMPILER
1530 # _LT_CC_BASENAME(CC)
1531 # -------------------
1532 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1533 AC_DEFUN([_LT_CC_BASENAME],
1534 [for cc_temp in $1""; do
1536 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1537 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1542 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1546 # _LT_COMPILER_BOILERPLATE
1547 # ------------------------
1548 # Check for compiler boilerplate output or warnings with
1549 # the simple compiler test code.
1550 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1551 [ac_outfile=conftest.$ac_objext
1552 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1553 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1554 _lt_compiler_boilerplate=`cat conftest.err`
1556 ])# _LT_COMPILER_BOILERPLATE
1559 # _LT_LINKER_BOILERPLATE
1560 # ----------------------
1561 # Check for linker boilerplate output or warnings with
1562 # the simple link test code.
1563 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1564 [ac_outfile=conftest.$ac_objext
1565 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1566 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1567 _lt_linker_boilerplate=`cat conftest.err`
1569 ])# _LT_LINKER_BOILERPLATE
1572 # _LT_AC_SYS_LIBPATH_AIX
1573 # ----------------------
1574 # Links a minimal program and checks the executable
1575 # for the system default hardcoded library path. In most cases,
1576 # this is /usr/lib:/lib, but when the MPI compilers are used
1577 # the location of the communication and MPI libs are included too.
1578 # If we don't find anything, use the default library path according
1579 # to the aix ld manual.
1580 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1581 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1582 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1584 # Check for a 64-bit object if we didn't find anything.
1585 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; }
1587 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1588 ])# _LT_AC_SYS_LIBPATH_AIX
1591 # _LT_AC_SHELL_INIT(ARG)
1592 # ----------------------
1593 AC_DEFUN([_LT_AC_SHELL_INIT],
1594 [ifdef([AC_DIVERSION_NOTICE],
1595 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1596 [AC_DIVERT_PUSH(NOTICE)])
1599 ])# _LT_AC_SHELL_INIT
1602 # _LT_AC_PROG_ECHO_BACKSLASH
1603 # --------------------------
1604 # Add some code to the start of the generated configure script which
1605 # will find an echo command which doesn't interpret backslashes.
1606 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1607 [_LT_AC_SHELL_INIT([
1608 # Check that we are running under the correct shell.
1609 SHELL=${CONFIG_SHELL-/bin/sh}
1613 # Remove one level of quotation (which was required for Make).
1614 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1619 if test "X[$]1" = X--no-reexec; then
1620 # Discard the --no-reexec flag, and continue.
1622 elif test "X[$]1" = X--fallback-echo; then
1623 # Avoid inline document here, it may be left over
1625 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1626 # Yippee, $echo works!
1629 # Restart under the correct shell.
1630 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1633 if test "X[$]1" = X--fallback-echo; then
1634 # used as fallback echo
1642 # The HP-UX ksh and POSIX shell print the target directory to stdout
1644 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1646 if test -z "$ECHO"; then
1647 if test "X${echo_test_string+set}" != Xset; then
1648 # find a string as large as possible, as long as the shell can cope with it
1649 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1650 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1651 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1652 echo_test_string=`eval $cmd` &&
1653 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1660 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1661 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1662 test "X$echo_testing_string" = "X$echo_test_string"; then
1665 # The Solaris, AIX, and Digital Unix default echo programs unquote
1666 # backslashes. This makes it impossible to quote backslashes using
1667 # echo "$something" | sed 's/\\/\\\\/g'
1669 # So, first we look for a working echo in the user's PATH.
1671 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1672 for dir in $PATH /usr/ucb; do
1674 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1675 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1676 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1677 test "X$echo_testing_string" = "X$echo_test_string"; then
1684 if test "X$echo" = Xecho; then
1685 # We didn't find a better echo, so look for alternatives.
1686 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1687 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1688 test "X$echo_testing_string" = "X$echo_test_string"; then
1689 # This shell has a builtin print -r that does the trick.
1691 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1692 test "X$CONFIG_SHELL" != X/bin/ksh; then
1693 # If we have ksh, try running configure again with it.
1694 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1695 export ORIGINAL_CONFIG_SHELL
1696 CONFIG_SHELL=/bin/ksh
1698 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1702 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1703 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1704 test "X$echo_testing_string" = "X$echo_test_string"; then
1705 # Cool, printf works
1707 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1708 test "X$echo_testing_string" = 'X\t' &&
1709 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1710 test "X$echo_testing_string" = "X$echo_test_string"; then
1711 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1713 SHELL="$CONFIG_SHELL"
1715 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1716 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1717 test "X$echo_testing_string" = 'X\t' &&
1718 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1719 test "X$echo_testing_string" = "X$echo_test_string"; then
1720 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1722 # maybe with a smaller string...
1725 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1726 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1733 if test "$prev" != 'sed 50q "[$]0"'; then
1734 echo_test_string=`eval $prev`
1735 export echo_test_string
1736 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1738 # Oops. We lost completely, so just stick with echo.
1747 # Copy echo and quote the copy suitably for passing to libtool from
1748 # the Makefile, instead of quoting the original, which is used later.
1750 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1751 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1755 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1760 AC_DEFUN([_LT_AC_LOCK],
1761 [AC_ARG_ENABLE([libtool-lock],
1762 [AC_HELP_STRING([--disable-libtool-lock],
1763 [avoid locking (might break parallel builds)])])
1764 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1766 # Some flags need to be propagated to the compiler or linker for good
1770 # Find out which ABI we are using.
1771 echo 'int i;' > conftest.$ac_ext
1772 if AC_TRY_EVAL(ac_compile); then
1773 case `/usr/bin/file conftest.$ac_objext` in
1785 # Find out which ABI we are using.
1786 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1787 if AC_TRY_EVAL(ac_compile); then
1788 if test "$lt_cv_prog_gnu_ld" = yes; then
1789 case `/usr/bin/file conftest.$ac_objext` in
1791 LD="${LD-ld} -melf32bsmip"
1794 LD="${LD-ld} -melf32bmipn32"
1797 LD="${LD-ld} -melf64bmip"
1801 case `/usr/bin/file conftest.$ac_objext` in
1817 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1818 # Find out which ABI we are using.
1819 echo 'int i;' > conftest.$ac_ext
1820 if AC_TRY_EVAL(ac_compile); then
1821 case `/usr/bin/file conftest.o` in
1825 LD="${LD-ld} -m elf_i386"
1827 ppc64-*linux*|powerpc64-*linux*)
1828 LD="${LD-ld} -m elf32ppclinux"
1831 LD="${LD-ld} -m elf_s390"
1834 LD="${LD-ld} -m elf32_sparc"
1841 LD="${LD-ld} -m elf_x86_64"
1843 ppc*-*linux*|powerpc*-*linux*)
1844 LD="${LD-ld} -m elf64ppc"
1847 LD="${LD-ld} -m elf64_s390"
1850 LD="${LD-ld} -m elf64_sparc"
1860 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1861 SAVE_CFLAGS="$CFLAGS"
1862 CFLAGS="$CFLAGS -belf"
1863 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1865 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1867 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1868 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1869 CFLAGS="$SAVE_CFLAGS"
1873 # Find out which ABI we are using.
1874 echo 'int i;' > conftest.$ac_ext
1875 if AC_TRY_EVAL(ac_compile); then
1876 case `/usr/bin/file conftest.o` in
1878 case $lt_cv_prog_gnu_ld in
1879 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1880 *) LD="${LD-ld} -64" ;;
1888 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1889 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1890 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1891 AC_CHECK_TOOL(AS, as, false)
1892 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1897 need_locks="$enable_libtool_lock"
1902 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1903 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1904 # ----------------------------------------------------------------
1905 # Check whether the given compiler option works
1906 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1907 [AC_REQUIRE([LT_AC_PROG_SED])
1908 AC_CACHE_CHECK([$1], [$2],
1910 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1911 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1912 lt_compiler_flag="$3"
1913 # Insert the option either (1) after the last *FLAGS variable, or
1914 # (2) before a word containing "conftest.", or (3) at the end.
1915 # Note that $ac_compile itself does not contain backslashes and begins
1916 # with a dollar sign (not a hyphen), so the echo should work correctly.
1917 # The option is referenced via a variable to avoid confusing sed.
1918 lt_compile=`echo "$ac_compile" | $SED \
1919 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1920 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1921 -e 's:$: $lt_compiler_flag:'`
1922 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1923 (eval "$lt_compile" 2>conftest.err)
1925 cat conftest.err >&AS_MESSAGE_LOG_FD
1926 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1927 if (exit $ac_status) && test -s "$ac_outfile"; then
1928 # The compiler can only warn and ignore the option if not recognized
1929 # So say no if there are warnings other than the usual output.
1930 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1931 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1932 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1939 if test x"[$]$2" = xyes; then
1940 ifelse([$5], , :, [$5])
1942 ifelse([$6], , :, [$6])
1944 ])# AC_LIBTOOL_COMPILER_OPTION
1947 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1948 # [ACTION-SUCCESS], [ACTION-FAILURE])
1949 # ------------------------------------------------------------
1950 # Check whether the given compiler option works
1951 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1952 [AC_CACHE_CHECK([$1], [$2],
1954 save_LDFLAGS="$LDFLAGS"
1955 LDFLAGS="$LDFLAGS $3"
1956 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1957 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1958 # The linker can only warn and ignore the option if not recognized
1959 # So say no if there are warnings
1960 if test -s conftest.err; then
1961 # Append any errors to the config.log.
1962 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1963 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1964 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1965 if diff conftest.exp conftest.er2 >/dev/null; then
1973 LDFLAGS="$save_LDFLAGS"
1976 if test x"[$]$2" = xyes; then
1977 ifelse([$4], , :, [$4])
1979 ifelse([$5], , :, [$5])
1981 ])# AC_LIBTOOL_LINKER_OPTION
1984 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1985 # --------------------------
1986 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1987 [# find the maximum length of command line arguments
1988 AC_MSG_CHECKING([the maximum length of command line arguments])
1989 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1995 # On DJGPP, this test can blow up pretty badly due to problems in libc
1996 # (any single argument exceeding 2000 bytes causes a buffer overrun
1997 # during glob expansion). Even if it were fixed, the result of this
1998 # check would be larger than it should be.
1999 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2003 # Under GNU Hurd, this test is not required because there is
2004 # no limit to the length of command line arguments.
2005 # Libtool will interpret -1 as no limit whatsoever
2006 lt_cv_sys_max_cmd_len=-1;
2010 # On Win9x/ME, this test blows up -- it succeeds, but takes
2011 # about 5 minutes as the teststring grows exponentially.
2012 # Worse, since 9x/ME are not pre-emptively multitasking,
2013 # you end up with a "frozen" computer, even though with patience
2014 # the test eventually succeeds (with a max line length of 256k).
2015 # Instead, let's just punt: use the minimum linelength reported by
2016 # all of the supported platforms: 8192 (on NT/2K/XP).
2017 lt_cv_sys_max_cmd_len=8192;
2021 # On AmigaOS with pdksh, this test takes hours, literally.
2022 # So we just punt and use a minimum line length of 8192.
2023 lt_cv_sys_max_cmd_len=8192;
2026 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2027 # This has been around since 386BSD, at least. Likely further.
2028 if test -x /sbin/sysctl; then
2029 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2030 elif test -x /usr/sbin/sysctl; then
2031 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2033 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2035 # And add a safety zone
2036 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2037 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2041 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2042 lt_cv_sys_max_cmd_len=196608
2046 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2047 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2048 # nice to cause kernel panics so lets avoid the loop below.
2049 # First set a reasonable default.
2050 lt_cv_sys_max_cmd_len=16384
2052 if test -x /sbin/sysconfig; then
2053 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2054 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2059 lt_cv_sys_max_cmd_len=102400
2061 sysv5* | sco5v6* | sysv4.2uw2*)
2062 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2063 if test -n "$kargmax"; then
2064 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2066 lt_cv_sys_max_cmd_len=32768
2070 # If test is not a shell built-in, we'll probably end up computing a
2071 # maximum length that is only half of the actual maximum length, but
2073 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2074 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2075 = "XX$teststring") >/dev/null 2>&1 &&
2076 new_result=`expr "X$teststring" : ".*" 2>&1` &&
2077 lt_cv_sys_max_cmd_len=$new_result &&
2078 test $i != 17 # 1/2 MB should be enough
2081 teststring=$teststring$teststring
2084 # Add a significant safety factor because C++ compilers can tack on massive
2085 # amounts of additional arguments before passing them to the linker.
2086 # It appears as though 1/2 is a usable value.
2087 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2091 if test -n $lt_cv_sys_max_cmd_len ; then
2092 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2096 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2099 # _LT_AC_CHECK_DLFCN
2100 # ------------------
2101 AC_DEFUN([_LT_AC_CHECK_DLFCN],
2102 [AC_CHECK_HEADERS(dlfcn.h)dnl
2103 ])# _LT_AC_CHECK_DLFCN
2106 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2107 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2108 # ---------------------------------------------------------------------
2109 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2110 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2111 if test "$cross_compiling" = yes; then :
2114 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2115 lt_status=$lt_dlunknown
2116 cat > conftest.$ac_ext <<EOF
2117 [#line __oline__ "configure"
2118 #include "confdefs.h"
2127 # define LT_DLGLOBAL RTLD_GLOBAL
2130 # define LT_DLGLOBAL DL_GLOBAL
2132 # define LT_DLGLOBAL 0
2136 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2137 find out it does not work in some platform. */
2138 #ifndef LT_DLLAZY_OR_NOW
2140 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2143 # define LT_DLLAZY_OR_NOW DL_LAZY
2146 # define LT_DLLAZY_OR_NOW RTLD_NOW
2149 # define LT_DLLAZY_OR_NOW DL_NOW
2151 # define LT_DLLAZY_OR_NOW 0
2159 extern "C" void exit (int);
2162 void fnord() { int i=42;}
2165 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2166 int status = $lt_dlunknown;
2170 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2171 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2172 /* dlclose (self); */
2180 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2181 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2184 x$lt_dlno_uscore) $1 ;;
2185 x$lt_dlneed_uscore) $2 ;;
2186 x$lt_dlunknown|x*) $3 ;;
2189 # compilation failed
2194 ])# _LT_AC_TRY_DLOPEN_SELF
2197 # AC_LIBTOOL_DLOPEN_SELF
2198 # ----------------------
2199 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2200 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2201 if test "x$enable_dlopen" != xyes; then
2202 enable_dlopen=unknown
2203 enable_dlopen_self=unknown
2204 enable_dlopen_self_static=unknown
2211 lt_cv_dlopen="load_add_on"
2213 lt_cv_dlopen_self=yes
2217 lt_cv_dlopen="LoadLibrary"
2222 lt_cv_dlopen="dlopen"
2227 # if libdl is installed we need to link against it
2228 AC_CHECK_LIB([dl], [dlopen],
2229 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2232 lt_cv_dlopen_self=yes
2237 AC_CHECK_FUNC([shl_load],
2238 [lt_cv_dlopen="shl_load"],
2239 [AC_CHECK_LIB([dld], [shl_load],
2240 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2241 [AC_CHECK_FUNC([dlopen],
2242 [lt_cv_dlopen="dlopen"],
2243 [AC_CHECK_LIB([dl], [dlopen],
2244 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2245 [AC_CHECK_LIB([svld], [dlopen],
2246 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2247 [AC_CHECK_LIB([dld], [dld_link],
2248 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2257 if test "x$lt_cv_dlopen" != xno; then
2263 case $lt_cv_dlopen in
2265 save_CPPFLAGS="$CPPFLAGS"
2266 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2268 save_LDFLAGS="$LDFLAGS"
2269 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2272 LIBS="$lt_cv_dlopen_libs $LIBS"
2274 AC_CACHE_CHECK([whether a program can dlopen itself],
2275 lt_cv_dlopen_self, [dnl
2276 _LT_AC_TRY_DLOPEN_SELF(
2277 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2278 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2281 if test "x$lt_cv_dlopen_self" = xyes; then
2282 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2283 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2284 lt_cv_dlopen_self_static, [dnl
2285 _LT_AC_TRY_DLOPEN_SELF(
2286 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2287 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2291 CPPFLAGS="$save_CPPFLAGS"
2292 LDFLAGS="$save_LDFLAGS"
2297 case $lt_cv_dlopen_self in
2298 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2299 *) enable_dlopen_self=unknown ;;
2302 case $lt_cv_dlopen_self_static in
2303 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2304 *) enable_dlopen_self_static=unknown ;;
2307 ])# AC_LIBTOOL_DLOPEN_SELF
2310 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2311 # ---------------------------------
2312 # Check to see if options -c and -o are simultaneously supported by compiler
2313 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2314 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2315 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2316 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2317 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2318 $rm -r conftest 2>/dev/null
2322 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2324 lt_compiler_flag="-o out/conftest2.$ac_objext"
2325 # Insert the option either (1) after the last *FLAGS variable, or
2326 # (2) before a word containing "conftest.", or (3) at the end.
2327 # Note that $ac_compile itself does not contain backslashes and begins
2328 # with a dollar sign (not a hyphen), so the echo should work correctly.
2329 lt_compile=`echo "$ac_compile" | $SED \
2330 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2331 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2332 -e 's:$: $lt_compiler_flag:'`
2333 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2334 (eval "$lt_compile" 2>out/conftest.err)
2336 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2337 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2338 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2340 # The compiler can only warn and ignore the option if not recognized
2341 # So say no if there are warnings
2342 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2343 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2344 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2345 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2348 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2350 # SGI C++ compiler will create directory out/ii_files/ for
2351 # template instantiation
2352 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2353 $rm out/* && rmdir out
2358 ])# AC_LIBTOOL_PROG_CC_C_O
2361 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2362 # -----------------------------------------
2363 # Check to see if we can do hard links to lock some files if needed
2364 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2365 [AC_REQUIRE([_LT_AC_LOCK])dnl
2367 hard_links="nottested"
2368 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2369 # do not overwrite the value of need_locks provided by the user
2370 AC_MSG_CHECKING([if we can lock with hard links])
2373 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2375 ln conftest.a conftest.b 2>&5 || hard_links=no
2376 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2377 AC_MSG_RESULT([$hard_links])
2378 if test "$hard_links" = no; then
2379 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2385 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2390 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2391 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2392 [rm -f .libs 2>/dev/null
2393 mkdir .libs 2>/dev/null
2394 if test -d .libs; then
2397 # MS-DOS does not allow filenames that begin with a dot.
2400 rmdir .libs 2>/dev/null])
2401 objdir=$lt_cv_objdir
2402 ])# AC_LIBTOOL_OBJDIR
2405 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2406 # ----------------------------------------------
2407 # Check hardcoding attributes.
2408 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2409 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2410 _LT_AC_TAGVAR(hardcode_action, $1)=
2411 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2412 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2413 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2415 # We can hardcode non-existant directories.
2416 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2417 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2418 # have to relink, otherwise we might link with an installed library
2419 # when we should be linking with a yet-to-be-installed one
2420 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2421 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2422 # Linking always hardcodes the temporary library directory.
2423 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2425 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2426 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2429 # We cannot hardcode anything, or else we can only hardcode existing
2431 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2433 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2435 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2436 # Fast installation is not supported
2437 enable_fast_install=no
2438 elif test "$shlibpath_overrides_runpath" = yes ||
2439 test "$enable_shared" = no; then
2440 # Fast installation is not necessary
2441 enable_fast_install=needless
2443 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2446 # AC_LIBTOOL_SYS_LIB_STRIP
2447 # ------------------------
2448 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2451 AC_MSG_CHECKING([whether stripping libraries is possible])
2452 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2453 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2454 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2455 AC_MSG_RESULT([yes])
2457 # FIXME - insert some real tests, host_os isn't really good enough
2460 if test -n "$STRIP" ; then
2461 striplib="$STRIP -x"
2462 AC_MSG_RESULT([yes])
2472 ])# AC_LIBTOOL_SYS_LIB_STRIP
2475 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2476 # -----------------------------
2477 # PORTME Fill in your ld.so characteristics
2478 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2479 [AC_MSG_CHECKING([dynamic linker characteristics])
2481 libname_spec='lib$name'
2489 shlibpath_overrides_runpath=unknown
2491 dynamic_linker="$host_os ld.so"
2492 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2493 if test "$GCC" = yes; then
2494 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2495 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2496 # if the path contains ";" then we assume it to be the separator
2497 # otherwise default to the standard path separator (i.e. ":") - it is
2498 # assumed that no part of a normal pathname contains ";" but that should
2499 # okay in the real world where ";" in dirpaths is itself problematic.
2500 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2502 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2505 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2507 need_lib_prefix=unknown
2508 hardcode_into_libs=no
2510 # when you set need_version to no, make sure it does not cause -set_version
2511 # flags to be left without arguments
2512 need_version=unknown
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2518 shlibpath_var=LIBPATH
2520 # AIX 3 has no versioning support, so we append a major version to the name.
2521 soname_spec='${libname}${release}${shared_ext}$major'
2528 hardcode_into_libs=yes
2529 if test "$host_cpu" = ia64; then
2530 # AIX 5 supports IA64
2531 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2532 shlibpath_var=LD_LIBRARY_PATH
2534 # With GCC up to 2.95.x, collect2 would create an import file
2535 # for dependence libraries. The import file would start with
2536 # the line `#! .'. This would cause the generated library to
2537 # depend on `.', always an invalid library. This was fixed in
2538 # development snapshots of GCC prior to 3.0.
2540 aix4 | aix4.[[01]] | aix4.[[01]].*)
2541 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2543 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2550 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2551 # soname into executable. Probably we can add versioning support to
2552 # collect2, so additional links can be useful in future.
2553 if test "$aix_use_runtimelinking" = yes; then
2554 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2555 # instead of lib<name>.a to let people know that these are not
2556 # typical AIX shared libraries.
2557 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2559 # We preserve .a as extension for shared libraries through AIX4.2
2560 # and later when we are not doing run time linking.
2561 library_names_spec='${libname}${release}.a $libname.a'
2562 soname_spec='${libname}${release}${shared_ext}$major'
2564 shlibpath_var=LIBPATH
2569 library_names_spec='$libname.ixlibrary $libname.a'
2570 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2571 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'
2575 library_names_spec='${libname}${shared_ext}'
2576 dynamic_linker="$host_os ld.so"
2577 shlibpath_var=LIBRARY_PATH
2583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584 soname_spec='${libname}${release}${shared_ext}$major'
2585 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2586 shlibpath_var=LD_LIBRARY_PATH
2587 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2588 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2589 # the default ld.so.conf also contains /usr/contrib/lib and
2590 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2591 # libtool to hard-code these into programs
2594 cygwin* | mingw* | pw32*)
2595 version_type=windows
2600 case $GCC,$host_os in
2601 yes,cygwin* | yes,mingw* | yes,pw32*)
2602 library_names_spec='$libname.dll.a'
2603 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2604 postinstall_cmds='base_file=`basename \${file}`~
2605 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2606 dldir=$destdir/`dirname \$dlpath`~
2607 test -d \$dldir || mkdir -p \$dldir~
2608 $install_prog $dir/$dlname \$dldir/$dlname~
2609 chmod a+x \$dldir/$dlname'
2610 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2611 dlpath=$dir/\$dldll~
2613 shlibpath_overrides_runpath=yes
2617 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2618 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2619 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2622 # MinGW DLLs use traditional 'lib' prefix
2623 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2624 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2625 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2626 # It is most probably a Windows format PATH printed by
2627 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2628 # path with ; separators, and with drive letters. We can handle the
2629 # drive letters (cygwin fileutils understands them), so leave them,
2630 # especially as we might pass files found there to a mingw objdump,
2631 # which wouldn't understand a cygwinified path. Ahh.
2632 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2634 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2638 # pw32 DLLs use 'pw' prefix rather than 'lib'
2639 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2645 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2648 dynamic_linker='Win32 ld.exe'
2649 # FIXME: first we should search . and the directory the executable is in
2653 darwin* | rhapsody*)
2654 dynamic_linker="$host_os dyld"
2658 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
2659 soname_spec='${libname}${release}${major}$shared_ext'
2660 shlibpath_overrides_runpath=yes
2661 shlibpath_var=DYLD_LIBRARY_PATH
2662 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2663 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2664 if test "$GCC" = yes; then
2665 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2667 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2669 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2677 soname_spec='${libname}${release}${shared_ext}$major'
2678 shlibpath_var=LD_LIBRARY_PATH
2689 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2690 soname_spec='${libname}${release}${shared_ext}$major'
2691 shlibpath_var=LD_LIBRARY_PATH
2692 shlibpath_overrides_runpath=no
2693 hardcode_into_libs=yes
2694 dynamic_linker='GNU ld.so'
2697 freebsd* | dragonfly*)
2698 # DragonFly does not have aout. When/if they implement a new
2699 # versioning mechanism, adjust this.
2700 if test -x /usr/bin/objformat; then
2701 objformat=`/usr/bin/objformat`
2704 freebsd[[123]]*) objformat=aout ;;
2708 version_type=freebsd-$objformat
2709 case $version_type in
2711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2716 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2720 shlibpath_var=LD_LIBRARY_PATH
2723 shlibpath_overrides_runpath=yes
2725 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2726 shlibpath_overrides_runpath=yes
2727 hardcode_into_libs=yes
2729 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2730 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2731 shlibpath_overrides_runpath=no
2732 hardcode_into_libs=yes
2734 freebsd*) # from 4.6 on
2735 shlibpath_overrides_runpath=yes
2736 hardcode_into_libs=yes
2745 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2746 soname_spec='${libname}${release}${shared_ext}$major'
2747 shlibpath_var=LD_LIBRARY_PATH
2748 hardcode_into_libs=yes
2751 hpux9* | hpux10* | hpux11*)
2752 # Give a soname corresponding to the major version so that dld.sl refuses to
2753 # link against other versions.
2760 hardcode_into_libs=yes
2761 dynamic_linker="$host_os dld.so"
2762 shlibpath_var=LD_LIBRARY_PATH
2763 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2764 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2765 soname_spec='${libname}${release}${shared_ext}$major'
2766 if test "X$HPUX_IA64_MODE" = X32; then
2767 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2769 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2771 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2775 hardcode_into_libs=yes
2776 dynamic_linker="$host_os dld.sl"
2777 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2778 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2779 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2780 soname_spec='${libname}${release}${shared_ext}$major'
2781 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2782 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2786 dynamic_linker="$host_os dld.sl"
2787 shlibpath_var=SHLIB_PATH
2788 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2790 soname_spec='${libname}${release}${shared_ext}$major'
2793 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2794 postinstall_cmds='chmod 555 $lib'
2801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2802 soname_spec='${libname}${release}${shared_ext}$major'
2803 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2804 shlibpath_var=LD_LIBRARY_PATH
2805 shlibpath_overrides_runpath=no
2806 hardcode_into_libs=yes
2809 irix5* | irix6* | nonstopux*)
2811 nonstopux*) version_type=nonstopux ;;
2813 if test "$lt_cv_prog_gnu_ld" = yes; then
2821 soname_spec='${libname}${release}${shared_ext}$major'
2822 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2824 irix5* | nonstopux*)
2828 case $LD in # libtool.m4 will add one of these switches to LD
2829 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2830 libsuff= shlibsuff= libmagic=32-bit;;
2831 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2832 libsuff=32 shlibsuff=N32 libmagic=N32;;
2833 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2834 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2835 *) libsuff= shlibsuff= libmagic=never-match;;
2839 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2840 shlibpath_overrides_runpath=no
2841 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2842 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2843 hardcode_into_libs=yes
2846 # No shared lib support for Linux oldld, aout, or coff.
2847 linux*oldld* | linux*aout* | linux*coff*)
2851 # This must be Linux ELF.
2856 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2857 soname_spec='${libname}${release}${shared_ext}$major'
2858 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2859 shlibpath_var=LD_LIBRARY_PATH
2860 shlibpath_overrides_runpath=no
2861 # This implies no fast_install, which is unacceptable.
2862 # Some rework will be needed to allow for fast_install
2863 # before this can be enabled.
2864 hardcode_into_libs=yes
2866 # Append ld.so.conf contents to the search path
2867 if test -f /etc/ld.so.conf; then
2868 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2869 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2872 # We used to test for /lib/ld.so.1 and disable shared libraries on
2873 # powerpc, because MkLinux only supported shared libraries with the
2874 # GNU dynamic linker. Since this was broken with cross compilers,
2875 # most powerpc-linux boxes support dynamic linking these days and
2876 # people can always --disable-shared, the test was removed, and we
2877 # assume the GNU/Linux dynamic linker is in use.
2878 dynamic_linker='GNU/Linux ld.so'
2885 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2886 soname_spec='${libname}${release}${shared_ext}$major'
2887 shlibpath_var=LD_LIBRARY_PATH
2888 shlibpath_overrides_runpath=no
2889 hardcode_into_libs=yes
2890 dynamic_linker='GNU ld.so'
2897 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2899 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2900 dynamic_linker='NetBSD (a.out) ld.so'
2902 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2903 soname_spec='${libname}${release}${shared_ext}$major'
2904 dynamic_linker='NetBSD ld.elf_so'
2906 shlibpath_var=LD_LIBRARY_PATH
2907 shlibpath_overrides_runpath=yes
2908 hardcode_into_libs=yes
2913 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2914 shlibpath_var=LD_LIBRARY_PATH
2915 shlibpath_overrides_runpath=yes
2922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2923 soname_spec='${libname}${release}${shared_ext}$major'
2924 shlibpath_var=LD_LIBRARY_PATH
2925 shlibpath_overrides_runpath=yes
2930 sys_lib_dlsearch_path_spec="/usr/lib"
2932 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2934 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2935 *) need_version=no ;;
2937 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2938 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2939 shlibpath_var=LD_LIBRARY_PATH
2940 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2942 openbsd2.[[89]] | openbsd2.[[89]].*)
2943 shlibpath_overrides_runpath=no
2946 shlibpath_overrides_runpath=yes
2950 shlibpath_overrides_runpath=yes
2955 libname_spec='$name'
2958 library_names_spec='$libname${shared_ext} $libname.a'
2959 dynamic_linker='OS/2 ld.exe'
2960 shlibpath_var=LIBPATH
2963 osf3* | osf4* | osf5*)
2967 soname_spec='${libname}${release}${shared_ext}$major'
2968 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2969 shlibpath_var=LD_LIBRARY_PATH
2970 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2971 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2978 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2979 soname_spec='${libname}${release}${shared_ext}$major'
2980 shlibpath_var=LD_LIBRARY_PATH
2981 shlibpath_overrides_runpath=yes
2982 hardcode_into_libs=yes
2983 # ldd complains unless libraries are executable
2984 postinstall_cmds='chmod +x $lib'
2989 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2990 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2991 shlibpath_var=LD_LIBRARY_PATH
2992 shlibpath_overrides_runpath=yes
2993 if test "$with_gnu_ld" = yes; then
3001 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3002 soname_spec='${libname}${release}${shared_ext}$major'
3003 shlibpath_var=LD_LIBRARY_PATH
3004 case $host_vendor in
3006 shlibpath_overrides_runpath=no
3008 export_dynamic_flag_spec='${wl}-Blargedynsym'
3009 runpath_var=LD_RUN_PATH
3017 shlibpath_overrides_runpath=no
3018 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3024 if test -d /usr/nec ;then
3026 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3027 soname_spec='$libname${shared_ext}.$major'
3028 shlibpath_var=LD_LIBRARY_PATH
3032 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3033 version_type=freebsd-elf
3036 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3037 soname_spec='${libname}${release}${shared_ext}$major'
3038 shlibpath_var=LD_LIBRARY_PATH
3039 hardcode_into_libs=yes
3040 if test "$with_gnu_ld" = yes; then
3041 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3042 shlibpath_overrides_runpath=no
3044 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3045 shlibpath_overrides_runpath=yes
3048 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3052 sys_lib_dlsearch_path_spec='/usr/lib'
3057 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3058 soname_spec='${libname}${release}${shared_ext}$major'
3059 shlibpath_var=LD_LIBRARY_PATH
3066 AC_MSG_RESULT([$dynamic_linker])
3067 test "$dynamic_linker" = no && can_build_shared=no
3069 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3070 if test "$GCC" = yes; then
3071 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3073 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3078 AC_DEFUN([_LT_AC_TAGCONFIG],
3079 [AC_ARG_WITH([tags],
3080 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3081 [include additional configurations @<:@automatic@:>@])],
3082 [tagnames="$withval"])
3084 if test -f "$ltmain" && test -n "$tagnames"; then
3085 if test ! -f "${ofile}"; then
3086 AC_MSG_WARN([output file `$ofile' does not exist])
3089 if test -z "$LTCC"; then
3090 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3091 if test -z "$LTCC"; then
3092 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3094 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3097 if test -z "$LTCFLAGS"; then
3098 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3101 # Extract list of available tagged configurations in $ofile.
3102 # Note that this assumes the entire list is on one line.
3103 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3105 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3106 for tagname in $tagnames; do
3108 # Check whether tagname contains only valid characters
3109 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3111 *) AC_MSG_ERROR([invalid tag name: $tagname])
3115 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3117 AC_MSG_ERROR([tag name \"$tagname\" already exists])
3120 # Update the list of available tags.
3121 if test -n "$tagname"; then
3122 echo appending configuration tag \"$tagname\" to $ofile
3126 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3127 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3128 (test "X$CXX" != "Xg++"))) ; then
3129 AC_LIBTOOL_LANG_CXX_CONFIG
3136 if test -n "$F77" && test "X$F77" != "Xno"; then
3137 AC_LIBTOOL_LANG_F77_CONFIG
3144 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3145 AC_LIBTOOL_LANG_GCJ_CONFIG
3152 AC_LIBTOOL_LANG_RC_CONFIG
3156 AC_MSG_ERROR([Unsupported tag name: $tagname])
3160 # Append the new tag name to the list of available tags.
3161 if test -n "$tagname" ; then
3162 available_tags="$available_tags $tagname"
3168 # Now substitute the updated list of available tags.
3169 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3170 mv "${ofile}T" "$ofile"
3174 AC_MSG_ERROR([unable to update list of available tagged configurations.])
3177 ])# _LT_AC_TAGCONFIG
3182 # enable checks for dlopen support
3183 AC_DEFUN([AC_LIBTOOL_DLOPEN],
3184 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3185 ])# AC_LIBTOOL_DLOPEN
3188 # AC_LIBTOOL_WIN32_DLL
3189 # --------------------
3190 # declare package support for building win32 DLLs
3191 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3192 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3193 ])# AC_LIBTOOL_WIN32_DLL
3196 # AC_ENABLE_SHARED([DEFAULT])
3197 # ---------------------------
3198 # implement the --enable-shared flag
3199 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3200 AC_DEFUN([AC_ENABLE_SHARED],
3201 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3202 AC_ARG_ENABLE([shared],
3203 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3204 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3205 [p=${PACKAGE-default}
3207 yes) enable_shared=yes ;;
3208 no) enable_shared=no ;;
3211 # Look at the argument we got. We use all the common list separators.
3212 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3213 for pkg in $enableval; do
3215 if test "X$pkg" = "X$p"; then
3222 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3223 ])# AC_ENABLE_SHARED
3228 # set the default shared flag to --disable-shared
3229 AC_DEFUN([AC_DISABLE_SHARED],
3230 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3231 AC_ENABLE_SHARED(no)
3232 ])# AC_DISABLE_SHARED
3235 # AC_ENABLE_STATIC([DEFAULT])
3236 # ---------------------------
3237 # implement the --enable-static flag
3238 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3239 AC_DEFUN([AC_ENABLE_STATIC],
3240 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3241 AC_ARG_ENABLE([static],
3242 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3243 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3244 [p=${PACKAGE-default}
3246 yes) enable_static=yes ;;
3247 no) enable_static=no ;;
3250 # Look at the argument we got. We use all the common list separators.
3251 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3252 for pkg in $enableval; do
3254 if test "X$pkg" = "X$p"; then
3261 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3262 ])# AC_ENABLE_STATIC
3267 # set the default static flag to --disable-static
3268 AC_DEFUN([AC_DISABLE_STATIC],
3269 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3270 AC_ENABLE_STATIC(no)
3271 ])# AC_DISABLE_STATIC
3274 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3275 # ---------------------------------
3276 # implement the --enable-fast-install flag
3277 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3278 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3279 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3280 AC_ARG_ENABLE([fast-install],
3281 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3282 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3283 [p=${PACKAGE-default}
3285 yes) enable_fast_install=yes ;;
3286 no) enable_fast_install=no ;;
3288 enable_fast_install=no
3289 # Look at the argument we got. We use all the common list separators.
3290 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3291 for pkg in $enableval; do
3293 if test "X$pkg" = "X$p"; then
3294 enable_fast_install=yes
3300 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3301 ])# AC_ENABLE_FAST_INSTALL
3304 # AC_DISABLE_FAST_INSTALL
3305 # -----------------------
3306 # set the default to --disable-fast-install
3307 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3308 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3309 AC_ENABLE_FAST_INSTALL(no)
3310 ])# AC_DISABLE_FAST_INSTALL
3313 # AC_LIBTOOL_PICMODE([MODE])
3314 # --------------------------
3315 # implement the --with-pic flag
3316 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3317 AC_DEFUN([AC_LIBTOOL_PICMODE],
3318 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3319 pic_mode=ifelse($#,1,$1,default)
3320 ])# AC_LIBTOOL_PICMODE
3325 # This is predefined starting with Autoconf 2.54, so this conditional
3326 # definition can be removed once we require Autoconf 2.54 or later.
3327 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3328 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3329 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3330 then ac_cv_prog_egrep='grep -E'
3331 else ac_cv_prog_egrep='egrep'
3333 EGREP=$ac_cv_prog_egrep
3338 # AC_PATH_TOOL_PREFIX
3339 # -------------------
3340 # find a file program which can recognise shared library
3341 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3342 [AC_REQUIRE([AC_PROG_EGREP])dnl
3343 AC_MSG_CHECKING([for $1])
3344 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3346 [[\\/*] | ?:[\\/]*])
3347 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3350 lt_save_MAGIC_CMD="$MAGIC_CMD"
3351 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3352 dnl $ac_dummy forces splitting on constant user-supplied paths.
3353 dnl POSIX.2 word splitting is done only on the output of word expansions,
3354 dnl not every word. This closes a longstanding sh security hole.
3355 ac_dummy="ifelse([$2], , $PATH, [$2])"
3356 for ac_dir in $ac_dummy; do
3358 test -z "$ac_dir" && ac_dir=.
3359 if test -f $ac_dir/$1; then
3360 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3361 if test -n "$file_magic_test_file"; then
3362 case $deplibs_check_method in
3364 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3365 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3366 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3367 $EGREP "$file_magic_regex" > /dev/null; then
3372 *** Warning: the command libtool uses to detect shared libraries,
3373 *** $file_magic_cmd, produces output that libtool cannot recognize.
3374 *** The result is that libtool may fail to recognize shared libraries
3375 *** as such. This will affect the creation of libtool libraries that
3376 *** depend on shared libraries, but programs linked with such libtool
3377 *** libraries will work regardless of this problem. Nevertheless, you
3378 *** may want to report the problem to your system manager and/or to
3379 *** bug-libtool@gnu.org
3389 MAGIC_CMD="$lt_save_MAGIC_CMD"
3392 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3393 if test -n "$MAGIC_CMD"; then
3394 AC_MSG_RESULT($MAGIC_CMD)
3398 ])# AC_PATH_TOOL_PREFIX
3403 # find a file program which can recognise a shared library
3404 AC_DEFUN([AC_PATH_MAGIC],
3405 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3406 if test -z "$lt_cv_path_MAGIC_CMD"; then
3407 if test -n "$ac_tool_prefix"; then
3408 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3418 # find the pathname to the GNU or non-GNU linker
3419 AC_DEFUN([AC_PROG_LD],
3420 [AC_ARG_WITH([gnu-ld],
3421 [AC_HELP_STRING([--with-gnu-ld],
3422 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3423 [test "$withval" = no || with_gnu_ld=yes],
3425 AC_REQUIRE([LT_AC_PROG_SED])dnl
3426 AC_REQUIRE([AC_PROG_CC])dnl
3427 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3428 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3430 if test "$GCC" = yes; then
3431 # Check if gcc -print-prog-name=ld gives a path.
3432 AC_MSG_CHECKING([for ld used by $CC])
3435 # gcc leaves a trailing carriage return which upsets mingw
3436 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3438 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3441 # Accept absolute paths.
3442 [[\\/]]* | ?:[[\\/]]*)
3443 re_direlt='/[[^/]][[^/]]*/\.\./'
3444 # Canonicalize the pathname of ld
3445 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3446 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3447 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3449 test -z "$LD" && LD="$ac_prog"
3452 # If it fails, then pretend we aren't using GCC.
3456 # If it is relative, then search for the first ld in PATH.
3460 elif test "$with_gnu_ld" = yes; then
3461 AC_MSG_CHECKING([for GNU ld])
3463 AC_MSG_CHECKING([for non-GNU ld])
3465 AC_CACHE_VAL(lt_cv_path_LD,
3466 [if test -z "$LD"; then
3467 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3468 for ac_dir in $PATH; do
3470 test -z "$ac_dir" && ac_dir=.
3471 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3472 lt_cv_path_LD="$ac_dir/$ac_prog"
3473 # Check to see if the program is GNU ld. I'd rather use --version,
3474 # but apparently some variants of GNU ld only accept -v.
3475 # Break only if it was the GNU/non-GNU ld that we prefer.
3476 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3477 *GNU* | *'with BFD'*)
3478 test "$with_gnu_ld" != no && break
3481 test "$with_gnu_ld" != yes && break
3488 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3491 if test -n "$LD"; then
3496 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3503 AC_DEFUN([AC_PROG_LD_GNU],
3504 [AC_REQUIRE([AC_PROG_EGREP])dnl
3505 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3506 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3507 case `$LD -v 2>&1 </dev/null` in
3508 *GNU* | *'with BFD'*)
3509 lt_cv_prog_gnu_ld=yes
3512 lt_cv_prog_gnu_ld=no
3515 with_gnu_ld=$lt_cv_prog_gnu_ld
3519 # AC_PROG_LD_RELOAD_FLAG
3520 # ----------------------
3521 # find reload flag for linker
3522 # -- PORTME Some linkers may need a different reload flag.
3523 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3524 [AC_CACHE_CHECK([for $LD option to reload object files],
3525 lt_cv_ld_reload_flag,
3526 [lt_cv_ld_reload_flag='-r'])
3527 reload_flag=$lt_cv_ld_reload_flag
3528 case $reload_flag in
3530 *) reload_flag=" $reload_flag" ;;
3532 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3535 if test "$GCC" = yes; then
3536 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3538 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3542 ])# AC_PROG_LD_RELOAD_FLAG
3545 # AC_DEPLIBS_CHECK_METHOD
3546 # -----------------------
3547 # how to check for library dependencies
3548 # -- PORTME fill in with the dynamic library characteristics
3549 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3550 [AC_CACHE_CHECK([how to recognise dependent libraries],
3551 lt_cv_deplibs_check_method,
3552 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3553 lt_cv_file_magic_test_file=
3554 lt_cv_deplibs_check_method='unknown'
3555 # Need to set the preceding variable on all platforms that support
3556 # interlibrary dependencies.
3557 # 'none' -- dependencies not supported.
3558 # `unknown' -- same as none, but documents that we really don't know.
3559 # 'pass_all' -- all dependencies passed with no checks.
3560 # 'test_compile' -- check by making test program.
3561 # 'file_magic [[regex]]' -- check by looking for files in library path
3562 # which responds to the $file_magic_cmd with a given extended regex.
3563 # If you have `file' or equivalent on your system and you're not sure
3564 # whether `pass_all' will *always* work, you probably want this one.
3568 lt_cv_deplibs_check_method=pass_all
3572 lt_cv_deplibs_check_method=pass_all
3576 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3577 lt_cv_file_magic_cmd='/usr/bin/file -L'
3578 lt_cv_file_magic_test_file=/shlib/libc.so
3582 # func_win32_libid is a shell function defined in ltmain.sh
3583 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3584 lt_cv_file_magic_cmd='func_win32_libid'
3588 # Base MSYS/MinGW do not provide the 'file' command needed by
3589 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3590 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3591 lt_cv_file_magic_cmd='$OBJDUMP -f'
3594 darwin* | rhapsody*)
3595 lt_cv_deplibs_check_method=pass_all
3598 freebsd* | kfreebsd*-gnu | dragonfly*)
3599 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3602 # Not sure whether the presence of OpenBSD here was a mistake.
3603 # Let's accept both of them until this is cleared up.
3604 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3605 lt_cv_file_magic_cmd=/usr/bin/file
3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3610 lt_cv_deplibs_check_method=pass_all
3615 lt_cv_deplibs_check_method=pass_all
3618 hpux10.20* | hpux11*)
3619 lt_cv_file_magic_cmd=/usr/bin/file
3622 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3623 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3626 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3627 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3630 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3631 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3637 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3638 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3641 irix5* | irix6* | nonstopux*)
3643 *-32|*"-32 ") libmagic=32-bit;;
3644 *-n32|*"-n32 ") libmagic=N32;;
3645 *-64|*"-64 ") libmagic=64-bit;;
3646 *) libmagic=never-match;;
3648 lt_cv_deplibs_check_method=pass_all
3651 # This must be Linux ELF.
3653 lt_cv_deplibs_check_method=pass_all
3657 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3658 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3660 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3665 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3666 lt_cv_file_magic_cmd=/usr/bin/file
3667 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3671 lt_cv_deplibs_check_method=unknown
3675 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3676 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3678 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3682 osf3* | osf4* | osf5*)
3683 lt_cv_deplibs_check_method=pass_all
3687 lt_cv_deplibs_check_method=pass_all
3691 case $host_vendor in
3693 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]]'
3694 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3697 lt_cv_deplibs_check_method=pass_all
3700 lt_cv_file_magic_cmd='/bin/file'
3701 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3704 lt_cv_file_magic_cmd='/bin/file'
3705 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3706 lt_cv_file_magic_test_file=/lib/libc.so
3709 lt_cv_deplibs_check_method=pass_all
3712 lt_cv_deplibs_check_method=pass_all
3717 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3718 lt_cv_deplibs_check_method=pass_all
3722 file_magic_cmd=$lt_cv_file_magic_cmd
3723 deplibs_check_method=$lt_cv_deplibs_check_method
3724 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3725 ])# AC_DEPLIBS_CHECK_METHOD
3730 # find the pathname to a BSD-compatible name lister
3731 AC_DEFUN([AC_PROG_NM],
3732 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3733 [if test -n "$NM"; then
3734 # Let the user override the test.
3737 lt_nm_to_check="${ac_tool_prefix}nm"
3738 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3739 lt_nm_to_check="$lt_nm_to_check nm"
3741 for lt_tmp_nm in $lt_nm_to_check; do
3742 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3743 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3745 test -z "$ac_dir" && ac_dir=.
3746 tmp_nm="$ac_dir/$lt_tmp_nm"
3747 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3748 # Check to see if the nm accepts a BSD-compat flag.
3749 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3750 # nm: unknown option "B" ignored
3751 # Tru64's nm complains that /dev/null is an invalid object file
3752 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3753 */dev/null* | *'Invalid file or object type'*)
3754 lt_cv_path_NM="$tmp_nm -B"
3758 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3760 lt_cv_path_NM="$tmp_nm -p"
3764 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3765 continue # so that we can try to find one that supports BSD flags
3774 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3782 # check for math library
3783 AC_DEFUN([AC_CHECK_LIBM],
3784 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3787 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3788 # These system don't have libm, or don't need it
3791 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3792 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3795 AC_CHECK_LIB(m, cos, LIBM="-lm")
3801 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3802 # -----------------------------------
3803 # sets LIBLTDL to the link flags for the libltdl convenience library and
3804 # LTDLINCL to the include flags for the libltdl header and adds
3805 # --enable-ltdl-convenience to the configure arguments. Note that
3806 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3807 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3808 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3809 # (note the single quotes!). If your package is not flat and you're not
3810 # using automake, define top_builddir and top_srcdir appropriately in
3812 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3813 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3814 case $enable_ltdl_convenience in
3815 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3816 "") enable_ltdl_convenience=yes
3817 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3819 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3820 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3821 # For backwards non-gettext consistent compatibility...
3823 ])# AC_LIBLTDL_CONVENIENCE
3826 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3827 # -----------------------------------
3828 # sets LIBLTDL to the link flags for the libltdl installable library and
3829 # LTDLINCL to the include flags for the libltdl header and adds
3830 # --enable-ltdl-install to the configure arguments. Note that
3831 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3832 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3833 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3834 # '${top_srcdir}/' (note the single quotes!). If your package is not
3835 # flat and you're not using automake, define top_builddir and top_srcdir
3836 # appropriately in the Makefiles.
3837 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3838 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3839 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3840 AC_CHECK_LIB(ltdl, lt_dlinit,
3841 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3842 [if test x"$enable_ltdl_install" = xno; then
3843 AC_MSG_WARN([libltdl not installed, but installation disabled])
3845 enable_ltdl_install=yes
3848 if test x"$enable_ltdl_install" = x"yes"; then
3849 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3850 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3851 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3853 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3857 # For backwards non-gettext consistent compatibility...
3859 ])# AC_LIBLTDL_INSTALLABLE
3864 # enable support for C++ libraries
3865 AC_DEFUN([AC_LIBTOOL_CXX],
3866 [AC_REQUIRE([_LT_AC_LANG_CXX])
3872 AC_DEFUN([_LT_AC_LANG_CXX],
3873 [AC_REQUIRE([AC_PROG_CXX])
3874 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3875 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3878 # _LT_AC_PROG_CXXCPP
3879 # ------------------
3880 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3882 AC_REQUIRE([AC_PROG_CXX])
3883 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3884 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3885 (test "X$CXX" != "Xg++"))) ; then
3888 ])# _LT_AC_PROG_CXXCPP
3892 # enable support for Fortran 77 libraries
3893 AC_DEFUN([AC_LIBTOOL_F77],
3894 [AC_REQUIRE([_LT_AC_LANG_F77])
3900 AC_DEFUN([_LT_AC_LANG_F77],
3901 [AC_REQUIRE([AC_PROG_F77])
3902 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3908 # enable support for GCJ libraries
3909 AC_DEFUN([AC_LIBTOOL_GCJ],
3910 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3916 AC_DEFUN([_LT_AC_LANG_GCJ],
3917 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3918 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3919 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3920 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3921 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3922 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3923 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3929 # enable support for Windows resource files
3930 AC_DEFUN([AC_LIBTOOL_RC],
3931 [AC_REQUIRE([LT_AC_PROG_RC])
3932 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3936 # AC_LIBTOOL_LANG_C_CONFIG
3937 # ------------------------
3938 # Ensure that the configuration vars for the C compiler are
3939 # suitably defined. Those variables are subsequently used by
3940 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3941 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3942 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3946 # Source file extension for C test sources.
3949 # Object file extension for compiled C test sources.
3951 _LT_AC_TAGVAR(objext, $1)=$objext
3953 # Code to be used in simple compile tests
3954 lt_simple_compile_test_code="int some_variable = 0;\n"
3956 # Code to be used in simple link tests
3957 lt_simple_link_test_code='int main(){return(0);}\n'
3961 # save warnings/boilerplate of simple test code
3962 _LT_COMPILER_BOILERPLATE
3963 _LT_LINKER_BOILERPLATE
3966 ## There is no encapsulation within the following macros, do not change
3967 ## the running order or otherwise move them around unless you know exactly
3968 ## what you are doing...
3969 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3970 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3971 AC_LIBTOOL_PROG_CC_C_O($1)
3972 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3973 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3974 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3975 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3976 AC_LIBTOOL_SYS_LIB_STRIP
3977 AC_LIBTOOL_DLOPEN_SELF
3979 # Report which library types will actually be built
3980 AC_MSG_CHECKING([if libtool supports shared libraries])
3981 AC_MSG_RESULT([$can_build_shared])
3983 AC_MSG_CHECKING([whether to build shared libraries])
3984 test "$can_build_shared" = "no" && enable_shared=no
3986 # On AIX, shared libraries and static libraries use the same namespace, and
3987 # are all built from PIC.
3990 test "$enable_shared" = yes && enable_static=no
3991 if test -n "$RANLIB"; then
3992 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3993 postinstall_cmds='$RANLIB $lib'
3998 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3999 test "$enable_shared" = yes && enable_static=no
4003 AC_MSG_RESULT([$enable_shared])
4005 AC_MSG_CHECKING([whether to build static libraries])
4006 # Make sure either enable_shared or enable_static is yes.
4007 test "$enable_shared" = yes || enable_static=yes
4008 AC_MSG_RESULT([$enable_static])
4010 AC_LIBTOOL_CONFIG($1)
4014 ])# AC_LIBTOOL_LANG_C_CONFIG
4017 # AC_LIBTOOL_LANG_CXX_CONFIG
4018 # --------------------------
4019 # Ensure that the configuration vars for the C compiler are
4020 # suitably defined. Those variables are subsequently used by
4021 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4022 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4023 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4025 AC_REQUIRE([AC_PROG_CXX])
4026 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4028 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4029 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4030 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4031 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4032 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4033 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4034 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4036 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4037 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4038 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4039 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4040 _LT_AC_TAGVAR(module_cmds, $1)=
4041 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4042 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4043 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4044 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4045 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4046 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4048 # Dependencies to place before and after the object being linked:
4049 _LT_AC_TAGVAR(predep_objects, $1)=
4050 _LT_AC_TAGVAR(postdep_objects, $1)=
4051 _LT_AC_TAGVAR(predeps, $1)=
4052 _LT_AC_TAGVAR(postdeps, $1)=
4053 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4055 # Source file extension for C++ test sources.
4058 # Object file extension for compiled C++ test sources.
4060 _LT_AC_TAGVAR(objext, $1)=$objext
4062 # Code to be used in simple compile tests
4063 lt_simple_compile_test_code="int some_variable = 0;\n"
4065 # Code to be used in simple link tests
4066 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
4068 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4071 # save warnings/boilerplate of simple test code
4072 _LT_COMPILER_BOILERPLATE
4073 _LT_LINKER_BOILERPLATE
4075 # Allow CC to be a program name with arguments.
4080 lt_save_with_gnu_ld=$with_gnu_ld
4081 lt_save_path_LD=$lt_cv_path_LD
4082 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4083 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4085 $as_unset lt_cv_prog_gnu_ld
4087 if test -n "${lt_cv_path_LDCXX+set}"; then
4088 lt_cv_path_LD=$lt_cv_path_LDCXX
4090 $as_unset lt_cv_path_LD
4092 test -z "${LDCXX+set}" || LD=$LDCXX
4095 _LT_AC_TAGVAR(compiler, $1)=$CC
4096 _LT_CC_BASENAME([$compiler])
4098 # We don't want -fno-exception wen compiling C++ code, so set the
4099 # no_builtin_flag separately
4100 if test "$GXX" = yes; then
4101 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4103 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4106 if test "$GXX" = yes; then
4107 # Set up default GNU C++ configuration
4111 # Check if GNU C++ uses GNU ld as the underlying linker, since the
4112 # archiving commands below assume that GNU ld is being used.
4113 if test "$with_gnu_ld" = yes; then
4114 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4115 _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'
4117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4118 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4120 # If archive_cmds runs LD, not CC, wlarc should be empty
4121 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4122 # investigate it a little bit more. (MM)
4125 # ancient GNU ld didn't support --whole-archive et. al.
4126 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4127 grep 'no-whole-archive' > /dev/null; then
4128 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4130 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4136 # A generic and very simple default shared library creation
4137 # command for GNU C++ for the case where it uses the native
4138 # linker, instead of GNU ld. If possible, this setting should
4139 # overridden to take advantage of the native linker features on
4140 # the platform it is being used on.
4141 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4144 # Commands to make compiler produce verbose output that lists
4145 # what "hidden" libraries, object files and flags are used when
4146 # linking a shared library.
4147 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4155 # PORTME: fill in a description of your system's C++ link characteristics
4156 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4157 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4160 # FIXME: insert proper C++ library support
4161 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4164 if test "$host_cpu" = ia64; then
4165 # On IA64, the linker does run time linking by default, so we don't
4166 # have to do anything special.
4167 aix_use_runtimelinking=no
4168 exp_sym_flag='-Bexport'
4171 aix_use_runtimelinking=no
4173 # Test if we are trying to use run time linking or normal
4174 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4175 # need to do runtime linking.
4176 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4177 for ld_flag in $LDFLAGS; do
4180 aix_use_runtimelinking=yes
4188 exp_sym_flag='-bexport'
4189 no_entry_flag='-bnoentry'
4192 # When large executables or shared objects are built, AIX ld can
4193 # have problems creating the table of contents. If linking a library
4194 # or program results in "error TOC overflow" add -mminimal-toc to
4195 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4196 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4198 _LT_AC_TAGVAR(archive_cmds, $1)=''
4199 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4200 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4201 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4203 if test "$GXX" = yes; then
4204 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4205 # We only want to do this on AIX 4.2 and lower, the check
4206 # below for broken collect2 doesn't work under 4.3+
4207 collect2name=`${CC} -print-prog-name=collect2`
4208 if test -f "$collect2name" && \
4209 strings "$collect2name" | grep resolve_lib_name >/dev/null
4211 # We have reworked collect2
4212 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4214 # We have old collect2
4215 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4216 # It fails to find uninstalled libraries when the uninstalled
4217 # path is not listed in the libpath. Setting hardcode_minus_L
4218 # to unsupported forces relinking
4219 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4220 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4221 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4225 shared_flag='-shared'
4226 if test "$aix_use_runtimelinking" = yes; then
4227 shared_flag="$shared_flag "'${wl}-G'
4231 if test "$host_cpu" = ia64; then
4232 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4233 # chokes on -Wl,-G. The following line is correct:
4236 if test "$aix_use_runtimelinking" = yes; then
4237 shared_flag='${wl}-G'
4239 shared_flag='${wl}-bM:SRE'
4244 # It seems that -bexpall does not export symbols beginning with
4245 # underscore (_), so it is better to generate a list of symbols to export.
4246 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4247 if test "$aix_use_runtimelinking" = yes; then
4248 # Warning - without using the other runtime loading flags (-brtl),
4249 # -berok will link without error, but may produce a broken library.
4250 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4251 # Determine the default libpath from the value encoded in an empty executable.
4252 _LT_AC_SYS_LIBPATH_AIX
4253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4255 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4257 if test "$host_cpu" = ia64; then
4258 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4259 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4260 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4262 # Determine the default libpath from the value encoded in an empty executable.
4263 _LT_AC_SYS_LIBPATH_AIX
4264 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4265 # Warning - without using the other run time loading flags,
4266 # -berok will link without error, but may produce a broken library.
4267 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4268 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4269 # Exported symbols can be pulled into shared objects from archives
4270 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4271 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4272 # This is similar to how AIX traditionally builds its shared libraries.
4273 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4279 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4280 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4281 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4282 # support --undefined. This deserves some investigation. FIXME
4283 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4285 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4290 case $cc_basename in
4292 # FIXME: insert proper C++ library support
4293 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4298 cygwin* | mingw* | pw32*)
4299 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4300 # as there is no search path for DLLs.
4301 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4302 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4303 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4304 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4306 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4307 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4308 # If the export-symbols file already is a .def file (1st line
4309 # is EXPORTS), use it as is; otherwise, prepend...
4310 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4311 cp $export_symbols $output_objdir/$soname.def;
4313 echo EXPORTS > $output_objdir/$soname.def;
4314 cat $export_symbols >> $output_objdir/$soname.def;
4316 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4318 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4321 darwin* | rhapsody*)
4323 rhapsody* | darwin1.[[012]])
4324 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4327 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4328 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4330 case ${MACOSX_DEPLOYMENT_TARGET} in
4332 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4335 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4341 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4342 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4343 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4344 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4345 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4346 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4348 if test "$GXX" = yes ; then
4349 lt_int_apple_cc_single_mod=no
4350 output_verbose_link_cmd='echo'
4351 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4352 lt_int_apple_cc_single_mod=yes
4354 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4355 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4357 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4359 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4360 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4361 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4362 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4366 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4368 case $cc_basename in
4370 output_verbose_link_cmd='echo'
4371 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4372 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4373 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4374 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4375 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4385 case $cc_basename in
4387 # FIXME: insert proper C++ library support
4388 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4391 # Green Hills C++ Compiler
4392 # FIXME: insert proper C++ library support
4393 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4396 # FIXME: insert proper C++ library support
4397 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4402 # C++ shared libraries reported to be fairly broken before switch to ELF
4403 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4406 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4408 freebsd* | kfreebsd*-gnu | dragonfly*)
4409 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4411 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4417 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4418 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4419 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4420 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4421 # but as the default
4422 # location of the library.
4424 case $cc_basename in
4426 # FIXME: insert proper C++ library support
4427 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4430 _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'
4431 # Commands to make compiler produce verbose output that lists
4432 # what "hidden" libraries, object files and flags are used when
4433 # linking a shared library.
4435 # There doesn't appear to be a way to prevent this compiler from
4436 # explicitly linking system object files so we need to strip them
4437 # from the output so that they don't get included in the library
4439 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4442 if test "$GXX" = yes; then
4443 _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'
4445 # FIXME: insert proper C++ library support
4446 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4452 if test $with_gnu_ld = no; then
4453 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4454 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4458 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4461 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4467 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4468 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4471 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4472 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4473 # but as the default
4474 # location of the library.
4478 case $cc_basename in
4480 # FIXME: insert proper C++ library support
4481 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4486 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4489 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4492 _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'
4495 # Commands to make compiler produce verbose output that lists
4496 # what "hidden" libraries, object files and flags are used when
4497 # linking a shared library.
4499 # There doesn't appear to be a way to prevent this compiler from
4500 # explicitly linking system object files so we need to strip them
4501 # from the output so that they don't get included in the library
4503 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4506 if test "$GXX" = yes; then
4507 if test $with_gnu_ld = no; then
4510 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4513 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4516 _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'
4521 # FIXME: insert proper C++ library support
4522 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4528 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4529 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4530 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4531 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4532 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4533 # Instead, shared libraries are loaded at an image base (0x10000000 by
4534 # default) and relocated if they conflict, which is a slow very memory
4535 # consuming and fragmenting process. To avoid this, we pick a random,
4536 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4537 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4538 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4539 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4542 case $cc_basename in
4545 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4547 # Archives containing C++ object files must be created using
4548 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4549 # necessary to make sure instantiated templates are included
4551 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4554 if test "$GXX" = yes; then
4555 if test "$with_gnu_ld" = no; then
4556 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4558 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4561 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4564 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4565 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4568 case $cc_basename in
4570 # Kuck and Associates, Inc. (KAI) C++ Compiler
4572 # KCC will only create a shared library if the output file
4573 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4574 # to its proper name (with version) after linking.
4575 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4576 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4577 # Commands to make compiler produce verbose output that lists
4578 # what "hidden" libraries, object files and flags are used when
4579 # linking a shared library.
4581 # There doesn't appear to be a way to prevent this compiler from
4582 # explicitly linking system object files so we need to strip them
4583 # from the output so that they don't get included in the library
4585 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4587 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4588 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4590 # Archives containing C++ object files must be created using
4591 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4592 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4597 # version 8.0 and above of icpc choke on multiply defined symbols
4598 # if we add $predep_objects and $postdep_objects, however 7.1 and
4599 # earlier do not add the objects themselves.
4600 case `$CC -V 2>&1` in
4602 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4603 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4605 *) # Version 8.0 or newer
4608 ia64*) tmp_idyn=' -i_dynamic';;
4610 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4611 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4614 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4615 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4616 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4617 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4620 # Portland Group C++ compiler
4621 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4622 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4624 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4625 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4626 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4630 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4631 _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'
4633 runpath_var=LD_RUN_PATH
4634 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4635 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4637 # Commands to make compiler produce verbose output that lists
4638 # what "hidden" libraries, object files and flags are used when
4639 # linking a shared library.
4641 # There doesn't appear to be a way to prevent this compiler from
4642 # explicitly linking system object files so we need to strip them
4643 # from the output so that they don't get included in the library
4645 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'
4650 # FIXME: insert proper C++ library support
4651 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4654 # FIXME: insert proper C++ library support
4655 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4658 case $cc_basename in
4660 # FIXME: insert proper C++ library support
4661 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4664 # FIXME: insert proper C++ library support
4665 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4670 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4671 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4673 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4674 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4675 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4677 # Workaround some broken pre-1.5 toolchains
4678 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4681 # C++ shared libraries are fairly broken
4682 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4685 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4686 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4687 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4688 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4689 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4690 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4691 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4692 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4694 output_verbose_link_cmd='echo'
4697 case $cc_basename in
4699 # Kuck and Associates, Inc. (KAI) C++ Compiler
4701 # KCC will only create a shared library if the output file
4702 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4703 # to its proper name (with version) after linking.
4704 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4706 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4707 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4709 # Archives containing C++ object files must be created using
4710 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4711 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4715 # Rational C++ 2.4.1
4716 # FIXME: insert proper C++ library support
4717 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4720 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4721 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4724 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4726 # Commands to make compiler produce verbose output that lists
4727 # what "hidden" libraries, object files and flags are used when
4728 # linking a shared library.
4730 # There doesn't appear to be a way to prevent this compiler from
4731 # explicitly linking system object files so we need to strip them
4732 # from the output so that they don't get included in the library
4734 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'
4737 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4738 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4739 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4741 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4742 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4744 # Commands to make compiler produce verbose output that lists
4745 # what "hidden" libraries, object files and flags are used when
4746 # linking a shared library.
4747 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4750 # FIXME: insert proper C++ library support
4751 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4757 case $cc_basename in
4759 # Kuck and Associates, Inc. (KAI) C++ Compiler
4761 # KCC will only create a shared library if the output file
4762 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4763 # to its proper name (with version) after linking.
4764 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4767 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4769 # Archives containing C++ object files must be created using
4770 # the KAI C++ compiler.
4771 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4774 # Rational C++ 2.4.1
4775 # FIXME: insert proper C++ library support
4776 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4779 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4780 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4781 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4782 echo "-hidden">> $lib.exp~
4783 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4786 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4787 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4789 # Commands to make compiler produce verbose output that lists
4790 # what "hidden" libraries, object files and flags are used when
4791 # linking a shared library.
4793 # There doesn't appear to be a way to prevent this compiler from
4794 # explicitly linking system object files so we need to strip them
4795 # from the output so that they don't get included in the library
4797 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'
4800 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4801 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4802 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4804 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4805 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4807 # Commands to make compiler produce verbose output that lists
4808 # what "hidden" libraries, object files and flags are used when
4809 # linking a shared library.
4810 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4813 # FIXME: insert proper C++ library support
4814 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4820 # FIXME: insert proper C++ library support
4821 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4824 case $cc_basename in
4827 # FIXME: insert proper C++ library support
4828 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4832 # FIXME: insert proper C++ library support
4833 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4836 # FIXME: insert proper C++ library support
4837 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4842 case $cc_basename in
4844 # Sun C++ 4.2, 5.x and Centerline C++
4845 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4846 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4847 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4848 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4849 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4852 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4854 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4856 # The C++ compiler is used as linker so we must use $wl
4857 # flag to pass the commands to the underlying system
4858 # linker. We must also pass each convience library through
4859 # to the system linker between allextract/defaultextract.
4860 # The C++ compiler will combine linker options so we
4861 # cannot just pass the convience library names through
4863 # Supported since Solaris 2.6 (maybe 2.5.1?)
4864 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4867 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4869 output_verbose_link_cmd='echo'
4871 # Archives containing C++ object files must be created using
4872 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4873 # necessary to make sure instantiated templates are included
4875 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4878 # Green Hills C++ Compiler
4879 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4881 # The C++ compiler must be used to create the archive.
4882 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4885 # GNU C++ compiler with Solaris linker
4886 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4887 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4888 if $CC --version | grep -v '^2\.7' > /dev/null; then
4889 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4890 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4891 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4893 # Commands to make compiler produce verbose output that lists
4894 # what "hidden" libraries, object files and flags are used when
4895 # linking a shared library.
4896 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4898 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4900 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4901 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4902 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4904 # Commands to make compiler produce verbose output that lists
4905 # what "hidden" libraries, object files and flags are used when
4906 # linking a shared library.
4907 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4910 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4915 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4916 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4917 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4918 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4919 runpath_var='LD_RUN_PATH'
4921 case $cc_basename in
4923 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4924 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4927 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4928 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4932 sysv5* | sco3.2v5* | sco5v6*)
4933 # Note: We can NOT use -z defs as we might desire, because we do not
4934 # link with -lc, and that would cause any symbols used from libc to
4935 # always be unresolved, which means just about no library would
4936 # ever link correctly. If we're not using GNU ld we use -z text
4937 # though, which does catch some bad symbols but isn't as heavy-handed
4939 # For security reasons, it is highly recommended that you always
4940 # use absolute paths for naming shared libraries, and exclude the
4941 # DT_RUNPATH tag from executables and libraries. But doing so
4942 # requires that you compile everything twice, which is a pain.
4943 # So that behaviour is only enabled if SCOABSPATH is set to a
4944 # non-empty value in the environment. Most likely only useful for
4945 # creating official distributions of packages.
4946 # This is a hack until libtool officially supports absolute path
4947 # names for shared libraries.
4948 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4949 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4950 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4951 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4952 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4953 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4954 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4955 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4956 runpath_var='LD_RUN_PATH'
4958 case $cc_basename in
4960 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4961 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4965 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4970 case $cc_basename in
4972 # NonStop-UX NCC 3.20
4973 # FIXME: insert proper C++ library support
4974 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4977 # FIXME: insert proper C++ library support
4978 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4983 # FIXME: insert proper C++ library support
4984 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4987 # FIXME: insert proper C++ library support
4988 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4991 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4992 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4994 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4995 _LT_AC_TAGVAR(LD, $1)="$LD"
4998 ## There is no encapsulation within the following macros, do not change
4999 ## the running order or otherwise move them around unless you know exactly
5000 ## what you are doing...
5001 AC_LIBTOOL_POSTDEP_PREDEP($1)
5002 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5003 AC_LIBTOOL_PROG_CC_C_O($1)
5004 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5005 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5006 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5007 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5009 AC_LIBTOOL_CONFIG($1)
5016 with_gnu_ldcxx=$with_gnu_ld
5017 with_gnu_ld=$lt_save_with_gnu_ld
5018 lt_cv_path_LDCXX=$lt_cv_path_LD
5019 lt_cv_path_LD=$lt_save_path_LD
5020 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5021 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5022 ])# AC_LIBTOOL_LANG_CXX_CONFIG
5024 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5025 # ------------------------------------
5026 # Figure out "hidden" library dependencies from verbose
5027 # compiler output when linking a shared library.
5028 # Parse the compiler output and extract the necessary
5029 # objects, libraries and library flags.
5030 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5031 dnl we can't use the lt_simple_compile_test_code here,
5032 dnl because it contains code intended for an executable,
5033 dnl not a library. It's possible we should let each
5034 dnl tag define a new lt_????_link_test_code variable,
5035 dnl but it's only used here...
5036 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5038 void foo (void) { a = 0; }
5040 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5044 Foo (void) { a = 0; }
5049 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5057 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5060 public void bar (void) {
5066 dnl Parse the compiler output and extract the necessary
5067 dnl objects, libraries and library flags.
5068 if AC_TRY_EVAL(ac_compile); then
5069 # Parse the compiler output and extract the necessary
5070 # objects, libraries and library flags.
5072 # Sentinel used to keep track of whether or not we are before
5073 # the conftest object file.
5074 pre_test_object_deps_done=no
5076 # The `*' in the case matches for architectures that use `case' in
5077 # $output_verbose_cmd can trigger glob expansion during the loop
5078 # eval without this substitution.
5079 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5081 for p in `eval $output_verbose_link_cmd`; do
5085 # Some compilers place space between "-{L,R}" and the path.
5088 || test $p = "-R"; then
5095 if test "$pre_test_object_deps_done" = no; then
5098 # Internal compiler library paths should come after those
5099 # provided the user. The postdeps already come after the
5100 # user supplied libs so there is no need to process them.
5101 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5102 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5104 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5107 # The "-l" case would never come before the object being
5108 # linked, so don't bother handling this case.
5111 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5112 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5114 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5120 # This assumes that the test object file only shows up
5121 # once in the compiler output.
5122 if test "$p" = "conftest.$objext"; then
5123 pre_test_object_deps_done=yes
5127 if test "$pre_test_object_deps_done" = no; then
5128 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5129 _LT_AC_TAGVAR(predep_objects, $1)="$p"
5131 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5134 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5135 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5137 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5142 *) ;; # Ignore the rest.
5150 echo "libtool.m4: error: problem compiling $1 test program"
5153 $rm -f confest.$objext
5155 # PORTME: override above test on systems where it is broken
5159 # Interix 3.5 installs completely hosed .la files for C++, so rather than
5160 # hack all around it, let's just trust "g++" to DTRT.
5161 _LT_AC_TAGVAR(predep_objects,$1)=
5162 _LT_AC_TAGVAR(postdep_objects,$1)=
5163 _LT_AC_TAGVAR(postdeps,$1)=
5167 case $cc_basename in
5169 # Adding this requires a known-good setup of shared libraries for
5170 # Sun compiler versions before 5.6, else PIC objects from an old
5171 # archive will be linked into the output, leading to subtle bugs.
5172 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5179 case " $_LT_AC_TAGVAR(postdeps, $1) " in
5180 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5182 ])# AC_LIBTOOL_POSTDEP_PREDEP
5184 # AC_LIBTOOL_LANG_F77_CONFIG
5185 # --------------------------
5186 # Ensure that the configuration vars for the C compiler are
5187 # suitably defined. Those variables are subsequently used by
5188 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5189 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5190 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5191 [AC_REQUIRE([AC_PROG_F77])
5192 AC_LANG_PUSH(Fortran 77)
5194 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5195 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5196 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5197 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5198 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5199 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5200 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5201 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5202 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5203 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5204 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5205 _LT_AC_TAGVAR(module_cmds, $1)=
5206 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5207 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5208 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5209 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5210 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5211 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5213 # Source file extension for f77 test sources.
5216 # Object file extension for compiled f77 test sources.
5218 _LT_AC_TAGVAR(objext, $1)=$objext
5220 # Code to be used in simple compile tests
5221 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5223 # Code to be used in simple link tests
5224 lt_simple_link_test_code=" program t\n end\n"
5226 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5229 # save warnings/boilerplate of simple test code
5230 _LT_COMPILER_BOILERPLATE
5231 _LT_LINKER_BOILERPLATE
5233 # Allow CC to be a program name with arguments.
5237 _LT_AC_TAGVAR(compiler, $1)=$CC
5238 _LT_CC_BASENAME([$compiler])
5240 AC_MSG_CHECKING([if libtool supports shared libraries])
5241 AC_MSG_RESULT([$can_build_shared])
5243 AC_MSG_CHECKING([whether to build shared libraries])
5244 test "$can_build_shared" = "no" && enable_shared=no
5246 # On AIX, shared libraries and static libraries use the same namespace, and
5247 # are all built from PIC.
5250 test "$enable_shared" = yes && enable_static=no
5251 if test -n "$RANLIB"; then
5252 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5253 postinstall_cmds='$RANLIB $lib'
5257 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5258 test "$enable_shared" = yes && enable_static=no
5262 AC_MSG_RESULT([$enable_shared])
5264 AC_MSG_CHECKING([whether to build static libraries])
5265 # Make sure either enable_shared or enable_static is yes.
5266 test "$enable_shared" = yes || enable_static=yes
5267 AC_MSG_RESULT([$enable_static])
5269 _LT_AC_TAGVAR(GCC, $1)="$G77"
5270 _LT_AC_TAGVAR(LD, $1)="$LD"
5272 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5273 AC_LIBTOOL_PROG_CC_C_O($1)
5274 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5275 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5276 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5277 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5279 AC_LIBTOOL_CONFIG($1)
5283 ])# AC_LIBTOOL_LANG_F77_CONFIG
5286 # AC_LIBTOOL_LANG_GCJ_CONFIG
5287 # --------------------------
5288 # Ensure that the configuration vars for the C compiler are
5289 # suitably defined. Those variables are subsequently used by
5290 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5291 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5292 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5295 # Source file extension for Java test sources.
5298 # Object file extension for compiled Java test sources.
5300 _LT_AC_TAGVAR(objext, $1)=$objext
5302 # Code to be used in simple compile tests
5303 lt_simple_compile_test_code="class foo {}\n"
5305 # Code to be used in simple link tests
5306 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5308 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5311 # save warnings/boilerplate of simple test code
5312 _LT_COMPILER_BOILERPLATE
5313 _LT_LINKER_BOILERPLATE
5315 # Allow CC to be a program name with arguments.
5319 _LT_AC_TAGVAR(compiler, $1)=$CC
5320 _LT_CC_BASENAME([$compiler])
5322 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5323 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5325 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5328 ## There is no encapsulation within the following macros, do not change
5329 ## the running order or otherwise move them around unless you know exactly
5330 ## what you are doing...
5331 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5332 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5333 AC_LIBTOOL_PROG_CC_C_O($1)
5334 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5335 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5336 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5337 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5339 AC_LIBTOOL_CONFIG($1)
5343 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5346 # AC_LIBTOOL_LANG_RC_CONFIG
5347 # -------------------------
5348 # Ensure that the configuration vars for the Windows resource compiler are
5349 # suitably defined. Those variables are subsequently used by
5350 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5351 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5352 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5355 # Source file extension for RC test sources.
5358 # Object file extension for compiled RC test sources.
5360 _LT_AC_TAGVAR(objext, $1)=$objext
5362 # Code to be used in simple compile tests
5363 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5365 # Code to be used in simple link tests
5366 lt_simple_link_test_code="$lt_simple_compile_test_code"
5368 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5371 # save warnings/boilerplate of simple test code
5372 _LT_COMPILER_BOILERPLATE
5373 _LT_LINKER_BOILERPLATE
5375 # Allow CC to be a program name with arguments.
5379 _LT_AC_TAGVAR(compiler, $1)=$CC
5380 _LT_CC_BASENAME([$compiler])
5381 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5383 AC_LIBTOOL_CONFIG($1)
5387 ])# AC_LIBTOOL_LANG_RC_CONFIG
5390 # AC_LIBTOOL_CONFIG([TAGNAME])
5391 # ----------------------------
5392 # If TAGNAME is not passed, then create an initial libtool script
5393 # with a default configuration from the untagged config vars. Otherwise
5394 # add code to config.status for appending the configuration named by
5395 # TAGNAME from the matching tagged config vars.
5396 AC_DEFUN([AC_LIBTOOL_CONFIG],
5397 [# The else clause should only fire when bootstrapping the
5398 # libtool distribution, otherwise you forgot to ship ltmain.sh
5399 # with your package, and you will get complaints that there are
5400 # no rules to generate ltmain.sh.
5401 if test -f "$ltmain"; then
5402 # See if we are running on zsh, and set the options which allow our commands through
5403 # without removal of \ escapes.
5404 if test -n "${ZSH_VERSION+set}" ; then
5405 setopt NO_GLOB_SUBST
5407 # Now quote all the things that may contain metacharacters while being
5408 # careful not to overquote the AC_SUBSTed values. We take copies of the
5409 # variables and quote the copies for generation of the libtool script.
5410 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5412 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5413 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5414 deplibs_check_method reload_flag reload_cmds need_locks \
5415 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5416 lt_cv_sys_global_symbol_to_c_name_address \
5417 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5418 old_postinstall_cmds old_postuninstall_cmds \
5419 _LT_AC_TAGVAR(compiler, $1) \
5420 _LT_AC_TAGVAR(CC, $1) \
5421 _LT_AC_TAGVAR(LD, $1) \
5422 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5423 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5424 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5425 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5426 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5427 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5428 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5429 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5430 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5431 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5432 _LT_AC_TAGVAR(predep_objects, $1) \
5433 _LT_AC_TAGVAR(postdep_objects, $1) \
5434 _LT_AC_TAGVAR(predeps, $1) \
5435 _LT_AC_TAGVAR(postdeps, $1) \
5436 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5437 _LT_AC_TAGVAR(archive_cmds, $1) \
5438 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5439 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5440 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5441 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5442 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5443 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5444 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5445 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5446 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5447 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5448 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5449 _LT_AC_TAGVAR(module_cmds, $1) \
5450 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5451 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5452 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5453 _LT_AC_TAGVAR(include_expsyms, $1); do
5456 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5457 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5458 _LT_AC_TAGVAR(archive_cmds, $1) | \
5459 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5460 _LT_AC_TAGVAR(module_cmds, $1) | \
5461 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5462 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5463 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5464 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5465 postinstall_cmds | postuninstall_cmds | \
5466 old_postinstall_cmds | old_postuninstall_cmds | \
5467 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5468 # Double-quote double-evaled strings.
5469 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5472 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5478 *'\[$]0 --fallback-echo"')
5479 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5484 [cfgfile="${ofile}T"
5485 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5487 AC_MSG_NOTICE([creating $ofile])],
5490 cat <<__EOF__ >> "$cfgfile"
5494 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5495 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5496 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5498 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5499 # Free Software Foundation, Inc.
5501 # This file is part of GNU Libtool:
5502 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5504 # This program is free software; you can redistribute it and/or modify
5505 # it under the terms of the GNU General Public License as published by
5506 # the Free Software Foundation; either version 2 of the License, or
5507 # (at your option) any later version.
5509 # This program is distributed in the hope that it will be useful, but
5510 # WITHOUT ANY WARRANTY; without even the implied warranty of
5511 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5512 # General Public License for more details.
5514 # You should have received a copy of the GNU General Public License
5515 # along with this program; if not, write to the Free Software
5516 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5518 # As a special exception to the GNU General Public License, if you
5519 # distribute this file as part of a program that contains a
5520 # configuration script generated by Autoconf, you may include it under
5521 # the same distribution terms that you use for the rest of that program.
5523 # A sed program that does not truncate output.
5526 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5527 Xsed="$SED -e 1s/^X//"
5529 # The HP-UX ksh and POSIX shell print the target directory to stdout
5531 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5533 # The names of the tagged configurations supported by this script.
5536 # ### BEGIN LIBTOOL CONFIG],
5537 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5539 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5541 # Shell to use when invoking shell scripts.
5544 # Whether or not to build shared libraries.
5545 build_libtool_libs=$enable_shared
5547 # Whether or not to build static libraries.
5548 build_old_libs=$enable_static
5550 # Whether or not to add -lc for building shared libraries.
5551 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5553 # Whether or not to disallow shared libs when runtime libs are static
5554 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5556 # Whether or not to optimize for fast installation.
5557 fast_install=$enable_fast_install
5560 host_alias=$host_alias
5565 build_alias=$build_alias
5569 # An echo program that does not interpret backslashes.
5574 AR_FLAGS=$lt_AR_FLAGS
5579 # LTCC compiler flags.
5580 LTCFLAGS=$lt_LTCFLAGS
5582 # A language-specific compiler.
5583 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5585 # Is the compiler the GNU C compiler?
5586 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5591 # The linker used to build libraries.
5592 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5594 # Whether we need hard or soft links.
5597 # A BSD-compatible nm program.
5600 # A symbol stripping program
5603 # Used to examine libraries when file_magic_cmd begins "file"
5604 MAGIC_CMD=$MAGIC_CMD
5606 # Used on cygwin: DLL creation program.
5609 # Used on cygwin: object dumper.
5612 # Used on cygwin: assembler.
5615 # The name of the directory that contains temporary libtool files.
5618 # How to create reloadable object files.
5619 reload_flag=$lt_reload_flag
5620 reload_cmds=$lt_reload_cmds
5622 # How to pass a linker flag through the compiler.
5623 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5625 # Object file suffix (normally "o").
5628 # Old archive suffix (normally "a").
5631 # Shared library suffix (normally ".so").
5632 shrext_cmds='$shrext_cmds'
5634 # Executable file suffix (normally "").
5637 # Additional compiler flags for building library objects.
5638 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5641 # What is the maximum length of a command?
5642 max_cmd_len=$lt_cv_sys_max_cmd_len
5644 # Does compiler simultaneously support -c and -o options?
5645 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5647 # Must we lock files when doing compilation?
5648 need_locks=$lt_need_locks
5650 # Do we need the lib prefix for modules?
5651 need_lib_prefix=$need_lib_prefix
5653 # Do we need a version for libraries?
5654 need_version=$need_version
5656 # Whether dlopen is supported.
5657 dlopen_support=$enable_dlopen
5659 # Whether dlopen of programs is supported.
5660 dlopen_self=$enable_dlopen_self
5662 # Whether dlopen of statically linked programs is supported.
5663 dlopen_self_static=$enable_dlopen_self_static
5665 # Compiler flag to prevent dynamic linking.
5666 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5668 # Compiler flag to turn off builtin functions.
5669 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5671 # Compiler flag to allow reflexive dlopens.
5672 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5674 # Compiler flag to generate shared objects directly from archives.
5675 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5677 # Compiler flag to generate thread-safe objects.
5678 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5680 # Library versioning type.
5681 version_type=$version_type
5683 # Format of library name prefix.
5684 libname_spec=$lt_libname_spec
5686 # List of archive names. First name is the real one, the rest are links.
5687 # The last name is the one that the linker finds with -lNAME.
5688 library_names_spec=$lt_library_names_spec
5690 # The coded name of the library, if different from the real name.
5691 soname_spec=$lt_soname_spec
5693 # Commands used to build and install an old-style archive.
5695 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5696 old_postinstall_cmds=$lt_old_postinstall_cmds
5697 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5699 # Create an old-style archive from a shared archive.
5700 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5702 # Create a temporary old-style archive to link instead of a shared archive.
5703 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5705 # Commands used to build and install a shared archive.
5706 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5707 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5708 postinstall_cmds=$lt_postinstall_cmds
5709 postuninstall_cmds=$lt_postuninstall_cmds
5711 # Commands used to build a loadable module (assumed same as above if empty)
5712 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5713 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5715 # Commands to strip libraries.
5716 old_striplib=$lt_old_striplib
5717 striplib=$lt_striplib
5719 # Dependencies to place before the objects being linked to create a
5721 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5723 # Dependencies to place after the objects being linked to create a
5725 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5727 # Dependencies to place before the objects being linked to create a
5729 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5731 # Dependencies to place after the objects being linked to create a
5733 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5735 # The library search path used internally by the compiler when linking
5737 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5739 # Method to check whether dependent libraries are shared objects.
5740 deplibs_check_method=$lt_deplibs_check_method
5742 # Command to use when deplibs_check_method == file_magic.
5743 file_magic_cmd=$lt_file_magic_cmd
5745 # Flag that allows shared libraries with undefined symbols to be built.
5746 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5748 # Flag that forces no undefined symbols.
5749 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5751 # Commands used to finish a libtool library installation in a directory.
5752 finish_cmds=$lt_finish_cmds
5754 # Same as above, but a single script fragment to be evaled but not shown.
5755 finish_eval=$lt_finish_eval
5757 # Take the output of nm and produce a listing of raw symbols and C names.
5758 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5760 # Transform the output of nm in a proper C declaration
5761 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5763 # Transform the output of nm in a C name address pair
5764 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5766 # This is the shared library runtime path variable.
5767 runpath_var=$runpath_var
5769 # This is the shared library path variable.
5770 shlibpath_var=$shlibpath_var
5772 # Is shlibpath searched before the hard-coded library search path?
5773 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5775 # How to hardcode a shared library path into an executable.
5776 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5778 # Whether we should hardcode library paths into libraries.
5779 hardcode_into_libs=$hardcode_into_libs
5781 # Flag to hardcode \$libdir into a binary during linking.
5782 # This must work even if \$libdir does not exist.
5783 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5785 # If ld is used when linking, flag to hardcode \$libdir into
5786 # a binary during linking. This must work even if \$libdir does
5788 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5790 # Whether we need a single -rpath flag with a separated argument.
5791 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5793 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5795 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5797 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5799 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5801 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5802 # the resulting binary.
5803 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5805 # Set to yes if building a shared library automatically hardcodes DIR into the library
5806 # and all subsequent libraries and executables linked against it.
5807 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5809 # Variables whose values should be saved in libtool wrapper scripts and
5810 # restored at relink time.
5811 variables_saved_for_relink="$variables_saved_for_relink"
5813 # Whether libtool must link a program against all its dependency libraries.
5814 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5816 # Compile-time system search path for libraries
5817 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5819 # Run-time system search path for libraries
5820 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5822 # Fix the shell variable \$srcfile for the compiler.
5823 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5825 # Set to yes if exported symbols are required.
5826 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5828 # The commands to list exported symbols.
5829 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5831 # The commands to extract the exported symbol list from a shared archive.
5832 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5834 # Symbols that should not be listed in the preloaded symbols.
5835 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5837 # Symbols that must always be exported.
5838 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5841 [# ### END LIBTOOL CONFIG],
5842 [# ### END LIBTOOL TAG CONFIG: $tagname])
5849 cat <<\EOF >> "$cfgfile"
5851 # AIX sometimes has problems with the GCC collect2 program. For some
5852 # reason, if we set the COLLECT_NAMES environment variable, the problems
5853 # vanish in a puff of smoke.
5854 if test "X${COLLECT_NAMES+set}" != Xset; then
5856 export COLLECT_NAMES
5862 # We use sed instead of cat because bash on DJGPP gets confused if
5863 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5864 # text mode, it properly converts lines to CR/LF. This bash problem
5865 # is reportedly fixed, but why not run on old versions too?
5866 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5868 mv -f "$cfgfile" "$ofile" || \
5869 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5873 # If there is no Makefile yet, we rely on a make rule to execute
5874 # `config.status --recheck' to rerun these tests and create the
5875 # libtool script then.
5876 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5877 if test -f "$ltmain_in"; then
5878 test -f Makefile && make "$ltmain"
5881 ])# AC_LIBTOOL_CONFIG
5884 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5885 # -------------------------------------------
5886 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5887 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5889 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5891 if test "$GCC" = yes; then
5892 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5894 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5895 lt_cv_prog_compiler_rtti_exceptions,
5896 [-fno-rtti -fno-exceptions], [],
5897 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5899 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5902 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5903 # ---------------------------------
5904 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5905 [AC_REQUIRE([AC_CANONICAL_HOST])
5906 AC_REQUIRE([AC_PROG_NM])
5907 AC_REQUIRE([AC_OBJEXT])
5908 # Check for command to grab the raw symbol name followed by C symbol from nm.
5909 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5910 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5912 # These are sane defaults that work on at least a few old systems.
5913 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5915 # Character class describing NM global symbol codes.
5916 symcode='[[BCDEGRST]]'
5918 # Regexp to match symbols that can be accessed directly from C.
5919 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5921 # Transform an extracted symbol line into a proper C declaration
5922 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5924 # Transform an extracted symbol line into symbol name and symbol address
5925 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'"
5927 # Define system-specific variables.
5932 cygwin* | mingw* | pw32*)
5933 symcode='[[ABCDGISTW]]'
5935 hpux*) # Its linker distinguishes data from code symbols
5936 if test "$host_cpu" = ia64; then
5937 symcode='[[ABCDEGRST]]'
5939 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5940 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'"
5943 if test "$host_cpu" = ia64; then
5944 symcode='[[ABCDGIRSTW]]'
5945 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5946 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'"
5950 symcode='[[BCDEGRST]]'
5953 symcode='[[BCDEGQRST]]'
5964 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5968 symcode='[[DFNSTU]]'
5972 # Handle CRLF in mingw tool chain
5976 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5980 # If we're using GNU nm, then use its standard symbol codes.
5981 case `$NM -V 2>&1` in
5982 *GNU* | *'with BFD'*)
5983 symcode='[[ABCDGIRSTW]]' ;;
5986 # Try without a prefix undercore, then with it.
5987 for ac_symprfx in "" "_"; do
5989 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5990 symxfrm="\\1 $ac_symprfx\\2 \\2"
5992 # Write the raw and C identifiers.
5993 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5995 # Check to see that the pipe works correctly.
5999 cat > conftest.$ac_ext <<EOF
6004 void nm_test_func(){}
6008 int main(){nm_test_var='a';nm_test_func();return(0);}
6011 if AC_TRY_EVAL(ac_compile); then
6012 # Now try to grab the symbols.
6014 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6015 # Try sorting and uniquifying the output.
6016 if sort "$nlist" | uniq > "$nlist"T; then
6017 mv -f "$nlist"T "$nlist"
6022 # Make sure that we snagged all the symbols we need.
6023 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6024 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6025 cat <<EOF > conftest.$ac_ext
6031 # Now generate the symbol file.
6032 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6034 cat <<EOF >> conftest.$ac_ext
6035 #if defined (__STDC__) && __STDC__
6036 # define lt_ptr_t void *
6038 # define lt_ptr_t char *
6042 /* The mapping between symbol names and symbols. */
6047 lt_preloaded_symbols[[]] =
6050 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6051 cat <<\EOF >> conftest.$ac_ext
6059 # Now try linking the two files.
6060 mv conftest.$ac_objext conftstm.$ac_objext
6061 lt_save_LIBS="$LIBS"
6062 lt_save_CFLAGS="$CFLAGS"
6063 LIBS="conftstm.$ac_objext"
6064 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6065 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6068 LIBS="$lt_save_LIBS"
6069 CFLAGS="$lt_save_CFLAGS"
6071 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6074 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6077 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6080 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6081 cat conftest.$ac_ext >&5
6083 rm -f conftest* conftst*
6085 # Do not use the global_symbol_pipe unless it works.
6086 if test "$pipe_works" = yes; then
6089 lt_cv_sys_global_symbol_pipe=
6093 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6094 lt_cv_sys_global_symbol_to_cdecl=
6096 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6097 AC_MSG_RESULT(failed)
6101 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6104 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6105 # ---------------------------------------
6106 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6107 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6108 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6109 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6111 AC_MSG_CHECKING([for $compiler option to produce PIC])
6113 # C++ specific cases for pic, static, wl, etc.
6114 if test "$GXX" = yes; then
6115 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6116 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6120 # All AIX code is PIC.
6121 if test "$host_cpu" = ia64; then
6122 # AIX 5 now supports IA64 processor
6123 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6127 # FIXME: we need at least 68020 code to build shared libraries, but
6128 # adding the `-m68020' flag to GCC prevents building anything better,
6130 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6132 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6133 # PIC is the default for these OSes.
6135 mingw* | os2* | pw32*)
6136 # This hack is so that the source file can tell whether it is being
6137 # built for inclusion in a dll (and should export symbols for example).
6138 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6140 darwin* | rhapsody*)
6141 # PIC is the default on this platform
6142 # Common symbols not allowed in MH_DYLIB files
6143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6146 # DJGPP does not support shared libraries at all
6147 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6150 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6151 # Instead, we relocate shared libraries at runtime.
6154 if test -d /usr/nec; then
6155 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6159 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6165 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6170 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6176 # All AIX code is PIC.
6177 if test "$host_cpu" = ia64; then
6178 # AIX 5 now supports IA64 processor
6179 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6181 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6185 case $cc_basename in
6187 # Green Hills C++ Compiler
6188 # _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"
6193 # PIC is the default on this platform
6194 # Common symbols not allowed in MH_DYLIB files
6195 case $cc_basename in
6197 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6198 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6203 case $cc_basename in
6205 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6208 # Green Hills C++ Compiler
6209 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6215 freebsd* | kfreebsd*-gnu | dragonfly*)
6216 # FreeBSD uses GNU C++
6218 hpux9* | hpux10* | hpux11*)
6219 case $cc_basename in
6221 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6222 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6223 if test "$host_cpu" != ia64; then
6224 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6228 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6229 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6235 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6244 # This is c89, which is MS Visual C++ (no shared libs)
6245 # Anyone wants to do a port?
6247 irix5* | irix6* | nonstopux*)
6248 case $cc_basename in
6250 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6251 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6252 # CC pic flag -KPIC is the default.
6259 case $cc_basename in
6262 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6263 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6267 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6268 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6269 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6272 # Portland Group C++ compiler.
6273 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6274 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6275 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6279 # Make sure the PIC flag is empty. It appears that all Alpha
6280 # Linux and Compaq Tru64 Unix objects are PIC.
6281 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6282 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6293 case $cc_basename in
6295 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6303 osf3* | osf4* | osf5*)
6304 case $cc_basename in
6306 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6309 # Rational C++ 2.4.1
6310 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6313 # Digital/Compaq C++
6314 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6315 # Make sure the PIC flag is empty. It appears that all Alpha
6316 # Linux and Compaq Tru64 Unix objects are PIC.
6317 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6318 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6327 case $cc_basename in
6329 # Sun C++ 4.2, 5.x and Centerline C++
6330 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6331 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6332 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6335 # Green Hills C++ Compiler
6336 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6343 case $cc_basename in
6346 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6347 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6351 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6358 case $cc_basename in
6360 # NonStop-UX NCC 3.20
6361 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6367 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6368 case $cc_basename in
6370 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6371 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6372 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6379 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6385 if test "$GCC" = yes; then
6386 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6387 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6391 # All AIX code is PIC.
6392 if test "$host_cpu" = ia64; then
6393 # AIX 5 now supports IA64 processor
6394 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6399 # FIXME: we need at least 68020 code to build shared libraries, but
6400 # adding the `-m68020' flag to GCC prevents building anything better,
6402 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6405 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6406 # PIC is the default for these OSes.
6409 mingw* | pw32* | os2*)
6410 # This hack is so that the source file can tell whether it is being
6411 # built for inclusion in a dll (and should export symbols for example).
6412 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6415 darwin* | rhapsody*)
6416 # PIC is the default on this platform
6417 # Common symbols not allowed in MH_DYLIB files
6418 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6422 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6423 # Instead, we relocate shared libraries at runtime.
6427 # Just because we use GCC doesn't mean we suddenly get shared libraries
6428 # on systems that don't support them.
6429 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6434 if test -d /usr/nec; then
6435 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6440 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6447 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6453 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6457 # PORTME Check for flag to pass linker flags through the system compiler.
6460 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6461 if test "$host_cpu" = ia64; then
6462 # AIX 5 now supports IA64 processor
6463 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6465 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6469 # PIC is the default on this platform
6470 # Common symbols not allowed in MH_DYLIB files
6471 case $cc_basename in
6473 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6474 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6479 mingw* | pw32* | os2*)
6480 # This hack is so that the source file can tell whether it is being
6481 # built for inclusion in a dll (and should export symbols for example).
6482 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6485 hpux9* | hpux10* | hpux11*)
6486 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6487 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6494 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6497 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6498 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6501 irix5* | irix6* | nonstopux*)
6502 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6503 # PIC (with -KPIC) is the default.
6504 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6508 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6509 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6513 case $cc_basename in
6515 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6516 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6517 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6519 pgcc* | pgf77* | pgf90* | pgf95*)
6520 # Portland Group compilers (*not* the Pentium gcc compiler,
6521 # which looks to be a dead project)
6522 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6523 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6524 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6527 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6528 # All Alpha code is PIC.
6529 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6534 osf3* | osf4* | osf5*)
6535 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6536 # All OSF/1 code is PIC.
6537 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6541 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6542 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6543 case $cc_basename in
6545 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6547 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6552 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6553 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6554 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6557 sysv4 | sysv4.2uw2* | sysv4.3*)
6558 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6559 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6560 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6564 if test -d /usr/nec ;then
6565 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6566 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6570 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6571 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6572 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6573 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6577 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6578 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6582 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6583 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6587 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6592 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6595 # Check to make sure the PIC flag actually works.
6597 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6598 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6599 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6600 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6601 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6603 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6605 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6606 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6609 # For platforms which do not support PIC, -DPIC is meaningless:
6611 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6619 # Check to make sure the static flag actually works.
6621 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6622 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6623 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6624 $lt_tmp_static_flag,
6626 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6630 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6631 # ------------------------------------
6632 # See if the linker supports building shared libraries.
6633 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6634 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6636 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6639 # If we're using GNU nm, then we don't want the "-C" option.
6640 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6641 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6642 _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'
6644 _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'
6648 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6651 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6654 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6659 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6660 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6661 _LT_AC_TAGVAR(archive_cmds, $1)=
6662 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6663 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6664 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6665 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6666 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6667 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6668 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6669 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6670 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6671 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6672 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6673 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6674 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6675 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6676 _LT_AC_TAGVAR(module_cmds, $1)=
6677 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6678 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6679 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6680 # include_expsyms should be a list of space-separated symbols to be *always*
6681 # included in the symbol list
6682 _LT_AC_TAGVAR(include_expsyms, $1)=
6683 # exclude_expsyms can be an extended regexp of symbols to exclude
6684 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6685 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6686 # as well as any symbol that contains `d'.
6687 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6688 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6689 # platforms (ab)use it in PIC code, but their linkers get confused if
6690 # the symbol is explicitly referenced. Since portable code cannot
6691 # rely on this symbol name, it's probably fine to never include it in
6692 # preloaded symbol tables.
6693 extract_expsyms_cmds=
6694 # Just being paranoid about ensuring that cc_basename is set.
6695 _LT_CC_BASENAME([$compiler])
6697 cygwin* | mingw* | pw32*)
6698 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6699 # When not using gcc, we currently assume that we are using
6700 # Microsoft Visual C++.
6701 if test "$GCC" != yes; then
6706 # we just hope/assume this is gcc and not c89 (= MSVC++)
6714 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6715 if test "$with_gnu_ld" = yes; then
6716 # If archive_cmds runs LD, not CC, wlarc should be empty
6719 # Set some defaults for GNU ld with shared library support. These
6720 # are reset later if shared libraries are not supported. Putting them
6721 # here allows them to be overridden if necessary.
6722 runpath_var=LD_RUN_PATH
6723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6724 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6725 # ancient GNU ld didn't support --whole-archive et. al.
6726 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6727 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6729 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6731 supports_anon_versioning=no
6732 case `$LD -v 2>/dev/null` in
6733 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6734 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6735 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6736 *\ 2.11.*) ;; # other 2.11 versions
6737 *) supports_anon_versioning=yes ;;
6740 # See if GNU ld supports shared libraries.
6742 aix3* | aix4* | aix5*)
6743 # On AIX/PPC, the GNU linker is very broken
6744 if test "$host_cpu" != ia64; then
6745 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6748 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6749 *** to be unable to reliably create shared libraries on AIX.
6750 *** Therefore, libtool is disabling shared libraries support. If you
6751 *** really care for shared libraries, you may want to modify your PATH
6752 *** so that a non-GNU linker is found, and then restart.
6759 _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)'
6760 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6761 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6763 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6764 # that the semantics of dynamic libraries on AmigaOS, at least up
6765 # to version 4, is to share data among multiple programs linked
6766 # with the same dynamic library. Since this doesn't match the
6767 # behavior of shared libraries on other platforms, we can't use
6769 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6773 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6774 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6775 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6776 # support --undefined. This deserves some investigation. FIXME
6777 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6779 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6783 cygwin* | mingw* | pw32*)
6784 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6785 # as there is no search path for DLLs.
6786 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6787 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6788 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6789 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6790 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6792 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6793 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6794 # If the export-symbols file already is a .def file (1st line
6795 # is EXPORTS), use it as is; otherwise, prepend...
6796 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6797 cp $export_symbols $output_objdir/$soname.def;
6799 echo EXPORTS > $output_objdir/$soname.def;
6800 cat $export_symbols >> $output_objdir/$soname.def;
6802 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6804 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6809 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6810 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6811 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6812 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6813 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6814 # Instead, shared libraries are loaded at an image base (0x10000000 by
6815 # default) and relocated if they conflict, which is a slow very memory
6816 # consuming and fragmenting process. To avoid this, we pick a random,
6817 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6818 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6819 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6820 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6824 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6826 case $cc_basename,$host_cpu in
6827 pgcc*) # Portland Group C compiler
6828 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6829 tmp_addflag=' $pic_flag'
6831 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6832 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6833 tmp_addflag=' $pic_flag -Mnomain' ;;
6834 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6835 tmp_addflag=' -i_dynamic' ;;
6836 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6837 tmp_addflag=' -i_dynamic -nofor_main' ;;
6838 ifc* | ifort*) # Intel Fortran compiler
6839 tmp_addflag=' -nofor_main' ;;
6841 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6843 if test $supports_anon_versioning = yes; then
6844 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6845 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6846 $echo "local: *; };" >> $output_objdir/$libname.ver~
6847 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6850 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6855 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6856 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6859 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6860 _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'
6865 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6866 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6869 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6870 *** create shared libraries on Solaris systems. Therefore, libtool
6871 *** is disabling shared libraries support. We urge you to upgrade GNU
6872 *** binutils to release 2.9.1 or newer. Another option is to modify
6873 *** your PATH or compiler configuration so that the native linker is
6874 *** used, and then restart.
6877 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6878 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6879 _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'
6881 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6885 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6886 case `$LD -v 2>&1` in
6887 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6888 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6891 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6892 *** reliably create shared libraries on SCO systems. Therefore, libtool
6893 *** is disabling shared libraries support. We urge you to upgrade GNU
6894 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6895 *** your PATH or compiler configuration so that the native linker is
6896 *** used, and then restart.
6901 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6902 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6903 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6904 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6906 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6913 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6915 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6916 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6920 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6921 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6922 _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'
6924 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6929 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6931 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6932 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6933 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6936 # PORTME fill in a description of your system's linker (not GNU ld)
6939 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6940 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6941 _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'
6942 # Note: this linker hardcodes the directories in LIBPATH if there
6943 # are no directories specified by -L.
6944 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6945 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6946 # Neither direct hardcoding nor static linking is supported with a
6948 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6953 if test "$host_cpu" = ia64; then
6954 # On IA64, the linker does run time linking by default, so we don't
6955 # have to do anything special.
6956 aix_use_runtimelinking=no
6957 exp_sym_flag='-Bexport'
6960 # If we're using GNU nm, then we don't want the "-C" option.
6961 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6962 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6963 _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'
6965 _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'
6967 aix_use_runtimelinking=no
6969 # Test if we are trying to use run time linking or normal
6970 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6971 # need to do runtime linking.
6972 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6973 for ld_flag in $LDFLAGS; do
6974 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6975 aix_use_runtimelinking=yes
6982 exp_sym_flag='-bexport'
6983 no_entry_flag='-bnoentry'
6986 # When large executables or shared objects are built, AIX ld can
6987 # have problems creating the table of contents. If linking a library
6988 # or program results in "error TOC overflow" add -mminimal-toc to
6989 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6990 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6992 _LT_AC_TAGVAR(archive_cmds, $1)=''
6993 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6994 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6995 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6997 if test "$GCC" = yes; then
6998 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6999 # We only want to do this on AIX 4.2 and lower, the check
7000 # below for broken collect2 doesn't work under 4.3+
7001 collect2name=`${CC} -print-prog-name=collect2`
7002 if test -f "$collect2name" && \
7003 strings "$collect2name" | grep resolve_lib_name >/dev/null
7005 # We have reworked collect2
7006 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7008 # We have old collect2
7009 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7010 # It fails to find uninstalled libraries when the uninstalled
7011 # path is not listed in the libpath. Setting hardcode_minus_L
7012 # to unsupported forces relinking
7013 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7014 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7015 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7019 shared_flag='-shared'
7020 if test "$aix_use_runtimelinking" = yes; then
7021 shared_flag="$shared_flag "'${wl}-G'
7025 if test "$host_cpu" = ia64; then
7026 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7027 # chokes on -Wl,-G. The following line is correct:
7030 if test "$aix_use_runtimelinking" = yes; then
7031 shared_flag='${wl}-G'
7033 shared_flag='${wl}-bM:SRE'
7038 # It seems that -bexpall does not export symbols beginning with
7039 # underscore (_), so it is better to generate a list of symbols to export.
7040 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7041 if test "$aix_use_runtimelinking" = yes; then
7042 # Warning - without using the other runtime loading flags (-brtl),
7043 # -berok will link without error, but may produce a broken library.
7044 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7045 # Determine the default libpath from the value encoded in an empty executable.
7046 _LT_AC_SYS_LIBPATH_AIX
7047 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7048 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7050 if test "$host_cpu" = ia64; then
7051 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7052 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7053 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7055 # Determine the default libpath from the value encoded in an empty executable.
7056 _LT_AC_SYS_LIBPATH_AIX
7057 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7058 # Warning - without using the other run time loading flags,
7059 # -berok will link without error, but may produce a broken library.
7060 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7061 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7062 # Exported symbols can be pulled into shared objects from archives
7063 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7064 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7065 # This is similar to how AIX traditionally builds its shared libraries.
7066 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7072 _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)'
7073 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7074 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7075 # see comment about different semantics on the GNU ld section
7076 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7080 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7083 cygwin* | mingw* | pw32*)
7084 # When not using gcc, we currently assume that we are using
7085 # Microsoft Visual C++.
7086 # hardcode_libdir_flag_spec is actually meaningless, as there is
7087 # no search path for DLLs.
7088 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7089 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7090 # Tell ltmain to make .lib files, not .a files.
7092 # Tell ltmain to make .dll files, not .so files.
7094 # FIXME: Setting linknames here is a bad hack.
7095 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7096 # The linker will automatically build a .lib file if we build a DLL.
7097 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7098 # FIXME: Should let the user specify the lib program.
7099 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7100 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7101 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7104 darwin* | rhapsody*)
7106 rhapsody* | darwin1.[[012]])
7107 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7110 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7111 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7113 case ${MACOSX_DEPLOYMENT_TARGET} in
7115 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7118 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7124 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7125 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7126 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7127 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7128 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7129 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7130 if test "$GCC" = yes ; then
7131 output_verbose_link_cmd='echo'
7132 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7133 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7134 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7135 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7136 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7138 case $cc_basename in
7140 output_verbose_link_cmd='echo'
7141 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7142 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7143 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7144 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7145 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7148 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7155 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7156 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7157 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7161 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7164 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7165 # support. Future versions do this automatically, but an explicit c++rt0.o
7166 # does not break anything, and helps significantly (at the cost of a little
7169 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7171 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7172 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7175 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7177 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7178 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7179 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7180 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7183 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7184 freebsd* | kfreebsd*-gnu | dragonfly*)
7185 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7186 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7187 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7188 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7192 if test "$GCC" = yes; then
7193 _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'
7195 _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'
7197 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7198 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7199 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7201 # hardcode_minus_L: Not really in the search PATH,
7202 # but as the default location of the library.
7203 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7204 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7208 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7209 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7211 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7213 if test "$with_gnu_ld" = no; then
7214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7217 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7218 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7220 # hardcode_minus_L: Not really in the search PATH,
7221 # but as the default location of the library.
7222 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7227 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7230 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7233 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7242 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7245 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7248 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7252 if test "$with_gnu_ld" = no; then
7253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7254 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7258 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7259 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7260 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7263 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7264 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7266 # hardcode_minus_L: Not really in the search PATH,
7267 # but as the default location of the library.
7268 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7274 irix5* | irix6* | nonstopux*)
7275 if test "$GCC" = yes; then
7276 _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'
7278 _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'
7279 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7281 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7282 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7283 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7287 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7288 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7290 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7292 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7293 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7294 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7298 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7299 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7301 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7302 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7306 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7307 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7308 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7309 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7310 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7311 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7312 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7315 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7316 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7317 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7320 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7321 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7328 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7329 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7330 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7331 _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'
7332 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7336 if test "$GCC" = yes; then
7337 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7338 _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'
7340 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7341 _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'
7343 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7344 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7347 osf4* | osf5*) # as osf3* with the addition of -msym flag
7348 if test "$GCC" = yes; then
7349 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7350 _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'
7351 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7353 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7354 _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'
7355 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7356 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7358 # Both c and cxx compiler support -rpath directly
7359 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7361 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7365 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7366 if test "$GCC" = yes; then
7368 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7369 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7370 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7373 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7374 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7375 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7377 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7378 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7380 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7382 # The compiler driver will combine linker options so we
7383 # cannot just pass the convience library names through
7384 # without $wl, iff we do not link with $LD.
7385 # Luckily, gcc supports the same syntax we need for Sun Studio.
7386 # Supported since Solaris 2.6 (maybe 2.5.1?)
7389 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7391 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7394 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7398 if test "x$host_vendor" = xsequent; then
7399 # Use $CC to link under sequent, because it throws in some extra .o
7400 # files that make .init and .fini sections work.
7401 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7403 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7405 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7406 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7407 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7408 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7412 case $host_vendor in
7414 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7415 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7418 ## LD is ld it makes a PLAMLIB
7419 ## CC just makes a GrossModule.
7420 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7421 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7422 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7425 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7426 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7429 runpath_var='LD_RUN_PATH'
7430 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7434 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7435 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7436 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7440 if test -d /usr/nec; then
7441 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7442 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7443 runpath_var=LD_RUN_PATH
7444 hardcode_runpath_var=yes
7445 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7449 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7450 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7451 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7452 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7453 runpath_var='LD_RUN_PATH'
7455 if test "$GCC" = yes; then
7456 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7457 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7459 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7460 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7464 sysv5* | sco3.2v5* | sco5v6*)
7465 # Note: We can NOT use -z defs as we might desire, because we do not
7466 # link with -lc, and that would cause any symbols used from libc to
7467 # always be unresolved, which means just about no library would
7468 # ever link correctly. If we're not using GNU ld we use -z text
7469 # though, which does catch some bad symbols but isn't as heavy-handed
7471 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7472 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7473 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7474 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7475 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7476 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7477 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7478 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7479 runpath_var='LD_RUN_PATH'
7481 if test "$GCC" = yes; then
7482 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7483 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7485 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7486 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7491 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7492 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7493 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7497 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7502 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7503 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7506 # Do we need to explicitly link libc?
7508 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7510 # Assume -lc should be added
7511 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7513 if test "$enable_shared" = yes && test "$GCC" = yes; then
7514 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7516 # FIXME: we may have to deal with multi-command sequences.
7519 # Test whether the compiler implicitly links with -lc since on some
7520 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7521 # to ld, don't add -lc before -lgcc.
7522 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7524 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7526 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7529 libobjs=conftest.$ac_objext
7531 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7532 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7538 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7539 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7540 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7542 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7544 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7546 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7548 cat conftest.err 1>&5
7551 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7557 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7560 # _LT_AC_FILE_LTDLL_C
7561 # -------------------
7562 # Be careful that the start marker always follows a newline.
7563 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7564 # /* ltdll.c starts here */
7565 # #define WIN32_LEAN_AND_MEAN
7566 # #include <windows.h>
7567 # #undef WIN32_LEAN_AND_MEAN
7568 # #include <stdio.h>
7570 # #ifndef __CYGWIN__
7571 # # ifdef __CYGWIN32__
7572 # # define __CYGWIN__ __CYGWIN32__
7576 # #ifdef __cplusplus
7579 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7580 # #ifdef __cplusplus
7585 # #include <cygwin/cygwin_dll.h>
7586 # DECLARE_CYGWIN_DLL( DllMain );
7588 # HINSTANCE __hDllInstance_base;
7591 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7593 # __hDllInstance_base = hInst;
7596 # /* ltdll.c ends here */
7597 ])# _LT_AC_FILE_LTDLL_C
7600 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7601 # ---------------------------------
7602 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7606 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7607 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7608 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7609 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7610 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7611 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7612 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7614 # This is just to silence aclocal about the macro not being used
7615 ifelse([AC_DISABLE_FAST_INSTALL])
7617 AC_DEFUN([LT_AC_PROG_GCJ],
7618 [AC_CHECK_TOOL(GCJ, gcj, no)
7619 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7623 AC_DEFUN([LT_AC_PROG_RC],
7624 [AC_CHECK_TOOL(RC, windres, no)
7627 ############################################################
7628 # NOTE: This macro has been submitted for inclusion into #
7629 # GNU Autoconf as AC_PROG_SED. When it is available in #
7630 # a released version of Autoconf we should remove this #
7631 # macro and use it instead. #
7632 ############################################################
7635 # Check for a fully-functional sed program, that truncates
7636 # as few characters as possible. Prefer GNU sed if found.
7637 AC_DEFUN([LT_AC_PROG_SED],
7638 [AC_MSG_CHECKING([for a sed that does not truncate output])
7639 AC_CACHE_VAL(lt_cv_path_SED,
7640 [# Loop through the user's path and test for sed and gsed.
7641 # Then use that list of sed's as ones to test for truncation.
7642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646 test -z "$as_dir" && as_dir=.
7647 for lt_ac_prog in sed gsed; do
7648 for ac_exec_ext in '' $ac_executable_extensions; do
7649 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7650 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7657 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7658 # along with /bin/sed that truncates output.
7659 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7660 test ! -f $lt_ac_sed && continue
7661 cat /dev/null > conftest.in
7663 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7664 # Check for GNU sed and select it if it is found.
7665 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7666 lt_cv_path_SED=$lt_ac_sed
7670 cat conftest.in conftest.in >conftest.tmp
7671 mv conftest.tmp conftest.in
7672 cp conftest.in conftest.nl
7674 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7675 cmp -s conftest.out conftest.nl || break
7676 # 10000 chars as input seems more than enough
7677 test $lt_ac_count -gt 10 && break
7678 lt_ac_count=`expr $lt_ac_count + 1`
7679 if test $lt_ac_count -gt $lt_ac_max; then
7680 lt_ac_max=$lt_ac_count
7681 lt_cv_path_SED=$lt_ac_sed
7687 AC_MSG_RESULT([$SED])