Codebase list libatasmart / 3c427b0
Merge commit 'upstream/0.18' Michael Biebl 12 years ago
25 changed file(s) with 15601 addition(s) and 16372 deletion(s). Raw diff Collapse all Expand all
1818 dist_doc_DATA = README
1919
2020 EXTRA_DIST = \
21 bootstrap.sh \
21 autogen.sh \
2222 LGPL \
2323 README \
2424 atasmart.c \
4343 blob-examples/WDC_WD5000AAKS--00TMA0-12.01C01 \
4444 vala/atasmart.vapi
4545
46 SUBDIRS =
46 # build the strpool tool first
47 SUBDIRS = strpool .
4748
4849 CLEANFILES = atasmart.strpool.c
4950
6263 sbin_PROGRAMS = \
6364 skdump \
6465 sktest
65
66 noinst_PROGRAMS = \
67 strpool
6866
6967 lib_LTLIBRARIES = \
7068 libatasmart.la
8987 libatasmart_la_CFLAGS = \
9088 $(LIBUDEV_CFLAGS)
9189
92 strpool_SOURCES = \
93 strpool.c
94
9590 BUILT_SOURCES = \
9691 atasmart.strpool.c
9792
98 atasmart.strpool.c: atasmart.c strpool
99 $(top_builddir)/strpool $< $@
93 strpool/strpool:
94 $(MAKE) -C strpool strpool
95
96 atasmart.strpool.c: atasmart.c strpool/strpool
97 $(top_builddir)/strpool/strpool $< $@
10098
10199 ACLOCAL_AMFLAGS = -I m4
5555 build_triplet = @build@
5656 host_triplet = @host@
5757 sbin_PROGRAMS = skdump$(EXEEXT) sktest$(EXEEXT)
58 noinst_PROGRAMS = strpool$(EXEEXT)
5958 subdir = .
6059 DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
6160 $(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
6362 $(top_srcdir)/configure compile config.guess config.rpath \
6463 config.sub depcomp install-sh ltmain.sh missing
6564 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
66 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
65 am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
66 $(top_srcdir)/m4/ax_cc_for_build.m4 \
67 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
68 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
69 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
6770 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6871 $(ACLOCAL_M4)
6972 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
108111 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
109112 $(libatasmart_la_CFLAGS) $(CFLAGS) $(libatasmart_la_LDFLAGS) \
110113 $(LDFLAGS) -o $@
111 PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
114 PROGRAMS = $(sbin_PROGRAMS)
112115 am_skdump_OBJECTS = skdump.$(OBJEXT)
113116 skdump_OBJECTS = $(am_skdump_OBJECTS)
114117 skdump_DEPENDENCIES = libatasmart.la
115118 sktest_SOURCES = sktest.c
116119 sktest_OBJECTS = sktest.$(OBJEXT)
117120 sktest_DEPENDENCIES = libatasmart.la
118 am_strpool_OBJECTS = strpool.$(OBJEXT)
119 strpool_OBJECTS = $(am_strpool_OBJECTS)
120 strpool_LDADD = $(LDADD)
121121 DEFAULT_INCLUDES = -I.@am__isrc@
122122 depcomp = $(SHELL) $(top_srcdir)/depcomp
123123 am__depfiles_maybe = depfiles
144144 AM_V_GEN = $(am__v_GEN_$(V))
145145 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
146146 am__v_GEN_0 = @echo " GEN " $@;
147 SOURCES = $(libatasmart_la_SOURCES) $(skdump_SOURCES) sktest.c \
148 $(strpool_SOURCES)
149 DIST_SOURCES = $(libatasmart_la_SOURCES) $(skdump_SOURCES) sktest.c \
150 $(strpool_SOURCES)
147 SOURCES = $(libatasmart_la_SOURCES) $(skdump_SOURCES) sktest.c
148 DIST_SOURCES = $(libatasmart_la_SOURCES) $(skdump_SOURCES) sktest.c
151149 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
152150 html-recursive info-recursive install-data-recursive \
153151 install-dvi-recursive install-exec-recursive \
209207 AUTOHEADER = @AUTOHEADER@
210208 AUTOMAKE = @AUTOMAKE@
211209 AWK = @AWK@
210 BUILD_CFLAGS = @BUILD_CFLAGS@
211 BUILD_LDFLAGS = @BUILD_LDFLAGS@
212212 CC = @CC@
213213 CCDEPMODE = @CCDEPMODE@
214 CC_FOR_BUILD = @CC_FOR_BUILD@
214215 CFLAGS = @CFLAGS@
215216 CPP = @CPP@
216217 CPPFLAGS = @CPPFLAGS@
217 CXX = @CXX@
218 CXXCPP = @CXXCPP@
219 CXXDEPMODE = @CXXDEPMODE@
220 CXXFLAGS = @CXXFLAGS@
221218 CYGPATH_W = @CYGPATH_W@
222219 DEFS = @DEFS@
223220 DEPDIR = @DEPDIR@
221 DLLTOOL = @DLLTOOL@
224222 DSYMUTIL = @DSYMUTIL@
225223 DUMPBIN = @DUMPBIN@
226224 ECHO_C = @ECHO_C@
228226 ECHO_T = @ECHO_T@
229227 EGREP = @EGREP@
230228 EXEEXT = @EXEEXT@
229 EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
231230 FGREP = @FGREP@
232231 GREP = @GREP@
233232 INSTALL = @INSTALL@
247246 LN_S = @LN_S@
248247 LTLIBOBJS = @LTLIBOBJS@
249248 MAKEINFO = @MAKEINFO@
249 MANIFEST_TOOL = @MANIFEST_TOOL@
250250 MKDIR_P = @MKDIR_P@
251251 NM = @NM@
252252 NMEDIT = @NMEDIT@
263263 PACKAGE_VERSION = @PACKAGE_VERSION@
264264 PATH_SEPARATOR = @PATH_SEPARATOR@
265265 PKG_CONFIG = @PKG_CONFIG@
266 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
267 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
266268 RANLIB = @RANLIB@
267269 SED = @SED@
268270 SET_MAKE = @SET_MAKE@
273275 abs_srcdir = @abs_srcdir@
274276 abs_top_builddir = @abs_top_builddir@
275277 abs_top_srcdir = @abs_top_srcdir@
278 ac_ct_AR = @ac_ct_AR@
276279 ac_ct_CC = @ac_ct_CC@
277 ac_ct_CXX = @ac_ct_CXX@
278280 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
279281 am__include = @am__include@
280282 am__leading_dot = @am__leading_dot@
306308 libexecdir = @libexecdir@
307309 localedir = @localedir@
308310 localstatedir = @localstatedir@
309 lt_ECHO = @lt_ECHO@
310311 mandir = @mandir@
311312 mkdir_p = @mkdir_p@
312313 oldincludedir = @oldincludedir@
324325 top_srcdir = @top_srcdir@
325326 dist_doc_DATA = README
326327 EXTRA_DIST = \
327 bootstrap.sh \
328 autogen.sh \
328329 LGPL \
329330 README \
330331 atasmart.c \
349350 blob-examples/WDC_WD5000AAKS--00TMA0-12.01C01 \
350351 vala/atasmart.vapi
351352
352 SUBDIRS =
353
354 # build the strpool tool first
355 SUBDIRS = strpool .
353356 CLEANFILES = atasmart.strpool.c
354357 MAINTAINERCLEANFILES =
355358 noinst_DATA =
387390
388391 libatasmart_la_CFLAGS = \
389392 $(LIBUDEV_CFLAGS)
390
391 strpool_SOURCES = \
392 strpool.c
393393
394394 BUILT_SOURCES = \
395395 atasmart.strpool.c
486486 done
487487 libatasmart.la: $(libatasmart_la_OBJECTS) $(libatasmart_la_DEPENDENCIES)
488488 $(AM_V_CCLD)$(libatasmart_la_LINK) -rpath $(libdir) $(libatasmart_la_OBJECTS) $(libatasmart_la_LIBADD) $(LIBS)
489
490 clean-noinstPROGRAMS:
491 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
492 echo " rm -f" $$list; \
493 rm -f $$list || exit $$?; \
494 test -n "$(EXEEXT)" || exit 0; \
495 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
496 echo " rm -f" $$list; \
497 rm -f $$list
498489 install-sbinPROGRAMS: $(sbin_PROGRAMS)
499490 @$(NORMAL_INSTALL)
500491 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
544535 sktest$(EXEEXT): $(sktest_OBJECTS) $(sktest_DEPENDENCIES)
545536 @rm -f sktest$(EXEEXT)
546537 $(AM_V_CCLD)$(LINK) $(sktest_OBJECTS) $(sktest_LDADD) $(LIBS)
547 strpool$(EXEEXT): $(strpool_OBJECTS) $(strpool_DEPENDENCIES)
548 @rm -f strpool$(EXEEXT)
549 $(AM_V_CCLD)$(LINK) $(strpool_OBJECTS) $(strpool_LDADD) $(LIBS)
550538
551539 mostlyclean-compile:
552540 -rm -f *.$(OBJEXT)
557545 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libatasmart_la-atasmart.strpool.Plo@am__quote@
558546 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skdump.Po@am__quote@
559547 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sktest.Po@am__quote@
560 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strpool.Po@am__quote@
561548
562549 .c.o:
563550 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
10321019 clean: clean-recursive
10331020
10341021 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
1035 clean-noinstPROGRAMS clean-sbinPROGRAMS mostlyclean-am
1022 clean-sbinPROGRAMS mostlyclean-am
10361023
10371024 distclean: distclean-recursive
10381025 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
11121099
11131100 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
11141101 all all-am am--refresh check check-am clean clean-generic \
1115 clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
1116 clean-sbinPROGRAMS ctags ctags-recursive dist dist-all \
1117 dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
1118 dist-zip distcheck distclean distclean-compile \
1119 distclean-generic distclean-hdr distclean-libtool \
1120 distclean-tags distcleancheck distdir distuninstallcheck dvi \
1121 dvi-am html html-am info info-am install install-am \
1122 install-data install-data-am install-dist_docDATA install-dvi \
1123 install-dvi-am install-exec install-exec-am install-html \
1124 install-html-am install-includeHEADERS install-info \
1125 install-info-am install-libLTLIBRARIES install-man install-pdf \
1126 install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
1102 clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS ctags \
1103 ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \
1104 dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
1105 distclean-compile distclean-generic distclean-hdr \
1106 distclean-libtool distclean-tags distcleancheck distdir \
1107 distuninstallcheck dvi dvi-am html html-am info info-am \
1108 install install-am install-data install-data-am \
1109 install-dist_docDATA install-dvi install-dvi-am install-exec \
1110 install-exec-am install-html install-html-am \
1111 install-includeHEADERS install-info install-info-am \
1112 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
1113 install-pkgconfigDATA install-ps install-ps-am \
11271114 install-sbinPROGRAMS install-strip install-vapiDATA \
11281115 installcheck installcheck-am installdirs installdirs-am \
11291116 maintainer-clean maintainer-clean-generic mostlyclean \
11341121 uninstall-sbinPROGRAMS uninstall-vapiDATA
11351122
11361123
1137 atasmart.strpool.c: atasmart.c strpool
1138 $(top_builddir)/strpool $< $@
1124 strpool/strpool:
1125 $(MAKE) -C strpool strpool
1126
1127 atasmart.strpool.c: atasmart.c strpool/strpool
1128 $(top_builddir)/strpool/strpool $< $@
11391129
11401130 # Tell versions [3.59,3.63) of GNU make to not export all variables.
11411131 # Otherwise a system limit (for SysV at least) may be exceeded.
1212
1313 m4_ifndef([AC_AUTOCONF_VERSION],
1414 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
16 [m4_warning([this file was generated for autoconf 2.65.
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
16 [m4_warning([this file was generated for autoconf 2.68.
1717 You have another version of autoconf. It may work, but is not guaranteed to.
1818 If you have problems, you may need to regenerate the build system entirely.
1919 To do so, use the procedure documented by the package, typically `autoreconf'.])])
2020
21 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
22 #
23 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
24 # 2006, 2007, 2008 Free Software Foundation, Inc.
25 # Written by Gordon Matzigkeit, 1996
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 m4_define([_LT_COPYING], [dnl
32 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
33 # 2006, 2007, 2008 Free Software Foundation, Inc.
34 # Written by Gordon Matzigkeit, 1996
35 #
36 # This file is part of GNU Libtool.
37 #
38 # GNU Libtool is free software; you can redistribute it and/or
39 # modify it under the terms of the GNU General Public License as
40 # published by the Free Software Foundation; either version 2 of
41 # the License, or (at your option) any later version.
42 #
43 # As a special exception to the GNU General Public License,
44 # if you distribute this file as part of a program or library that
45 # is built using GNU Libtool, you may include this file under the
46 # same distribution terms that you use for the rest of that program.
47 #
48 # GNU Libtool is distributed in the hope that it will be useful,
49 # but WITHOUT ANY WARRANTY; without even the implied warranty of
50 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 # GNU General Public License for more details.
52 #
53 # You should have received a copy of the GNU General Public License
54 # along with GNU Libtool; see the file COPYING. If not, a copy
55 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
56 # obtained by writing to the Free Software Foundation, Inc.,
57 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
58 ])
59
60 # serial 56 LT_INIT
61
62
63 # LT_PREREQ(VERSION)
64 # ------------------
65 # Complain and exit if this libtool version is less that VERSION.
66 m4_defun([LT_PREREQ],
67 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
68 [m4_default([$3],
69 [m4_fatal([Libtool version $1 or higher is required],
70 63)])],
71 [$2])])
72
73
74 # _LT_CHECK_BUILDDIR
75 # ------------------
76 # Complain if the absolute build directory name contains unusual characters
77 m4_defun([_LT_CHECK_BUILDDIR],
78 [case `pwd` in
79 *\ * | *\ *)
80 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
81 esac
82 ])
83
84
85 # LT_INIT([OPTIONS])
86 # ------------------
87 AC_DEFUN([LT_INIT],
88 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
89 AC_BEFORE([$0], [LT_LANG])dnl
90 AC_BEFORE([$0], [LT_OUTPUT])dnl
91 AC_BEFORE([$0], [LTDL_INIT])dnl
92 m4_require([_LT_CHECK_BUILDDIR])dnl
93
94 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
95 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
96 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
97 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
98 dnl unless we require an AC_DEFUNed macro:
99 AC_REQUIRE([LTOPTIONS_VERSION])dnl
100 AC_REQUIRE([LTSUGAR_VERSION])dnl
101 AC_REQUIRE([LTVERSION_VERSION])dnl
102 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
103 m4_require([_LT_PROG_LTMAIN])dnl
104
105 dnl Parse OPTIONS
106 _LT_SET_OPTIONS([$0], [$1])
107
108 # This can be used to rebuild libtool when needed
109 LIBTOOL_DEPS="$ltmain"
110
111 # Always use our own libtool.
112 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
113 AC_SUBST(LIBTOOL)dnl
114
115 _LT_SETUP
116
117 # Only expand once:
118 m4_define([LT_INIT])
119 ])# LT_INIT
120
121 # Old names:
122 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
123 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
124 dnl aclocal-1.4 backwards compatibility:
125 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
126 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
127
128
129 # _LT_CC_BASENAME(CC)
130 # -------------------
131 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
132 m4_defun([_LT_CC_BASENAME],
133 [for cc_temp in $1""; do
134 case $cc_temp in
135 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
136 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
137 \-*) ;;
138 *) break;;
139 esac
140 done
141 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
142 ])
143
144
145 # _LT_FILEUTILS_DEFAULTS
146 # ----------------------
147 # It is okay to use these file commands and assume they have been set
148 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
149 m4_defun([_LT_FILEUTILS_DEFAULTS],
150 [: ${CP="cp -f"}
151 : ${MV="mv -f"}
152 : ${RM="rm -f"}
153 ])# _LT_FILEUTILS_DEFAULTS
154
155
156 # _LT_SETUP
157 # ---------
158 m4_defun([_LT_SETUP],
159 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
160 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
161 _LT_DECL([], [host_alias], [0], [The host system])dnl
162 _LT_DECL([], [host], [0])dnl
163 _LT_DECL([], [host_os], [0])dnl
164 dnl
165 _LT_DECL([], [build_alias], [0], [The build system])dnl
166 _LT_DECL([], [build], [0])dnl
167 _LT_DECL([], [build_os], [0])dnl
168 dnl
169 AC_REQUIRE([AC_PROG_CC])dnl
170 AC_REQUIRE([LT_PATH_LD])dnl
171 AC_REQUIRE([LT_PATH_NM])dnl
172 dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
174 test -z "$LN_S" && LN_S="ln -s"
175 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176 dnl
177 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
178 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180 dnl
181 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187
188 _LT_CONFIG_LIBTOOL_INIT([
189 # See if we are running on zsh, and set the options which allow our
190 # commands through without removal of \ escapes INIT.
191 if test -n "\${ZSH_VERSION+set}" ; then
192 setopt NO_GLOB_SUBST
193 fi
194 ])
195 if test -n "${ZSH_VERSION+set}" ; then
196 setopt NO_GLOB_SUBST
197 fi
198
199 _LT_CHECK_OBJDIR
200
201 m4_require([_LT_TAG_COMPILER])dnl
202 _LT_PROG_ECHO_BACKSLASH
203
204 case $host_os in
205 aix3*)
206 # AIX sometimes has problems with the GCC collect2 program. For some
207 # reason, if we set the COLLECT_NAMES environment variable, the problems
208 # vanish in a puff of smoke.
209 if test "X${COLLECT_NAMES+set}" != Xset; then
210 COLLECT_NAMES=
211 export COLLECT_NAMES
212 fi
213 ;;
214 esac
215
216 # Sed substitution that helps us do robust quoting. It backslashifies
217 # metacharacters that are still active within double-quoted strings.
218 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
219
220 # Same as above, but do not quote variable references.
221 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
222
223 # Sed substitution to delay expansion of an escaped shell variable in a
224 # double_quote_subst'ed string.
225 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
226
227 # Sed substitution to delay expansion of an escaped single quote.
228 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
229
230 # Sed substitution to avoid accidental globbing in evaled expressions
231 no_glob_subst='s/\*/\\\*/g'
232
233 # Global variables:
234 ofile=libtool
235 can_build_shared=yes
236
237 # All known linkers require a `.a' archive for static linking (except MSVC,
238 # which needs '.lib').
239 libext=a
240
241 with_gnu_ld="$lt_cv_prog_gnu_ld"
242
243 old_CC="$CC"
244 old_CFLAGS="$CFLAGS"
245
246 # Set sane defaults for various variables
247 test -z "$CC" && CC=cc
248 test -z "$LTCC" && LTCC=$CC
249 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
250 test -z "$LD" && LD=ld
251 test -z "$ac_objext" && ac_objext=o
252
253 _LT_CC_BASENAME([$compiler])
254
255 # Only perform the check for file, if the check method requires it
256 test -z "$MAGIC_CMD" && MAGIC_CMD=file
257 case $deplibs_check_method in
258 file_magic*)
259 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
260 _LT_PATH_MAGIC
261 fi
262 ;;
263 esac
264
265 # Use C for the default configuration in the libtool script
266 LT_SUPPORTED_TAG([CC])
267 _LT_LANG_C_CONFIG
268 _LT_LANG_DEFAULT_CONFIG
269 _LT_CONFIG_COMMANDS
270 ])# _LT_SETUP
271
272
273 # _LT_PROG_LTMAIN
274 # ---------------
275 # Note that this code is called both from `configure', and `config.status'
276 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
277 # `config.status' has no value for ac_aux_dir unless we are using Automake,
278 # so we pass a copy along to make sure it has a sensible value anyway.
279 m4_defun([_LT_PROG_LTMAIN],
280 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
281 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
282 ltmain="$ac_aux_dir/ltmain.sh"
283 ])# _LT_PROG_LTMAIN
284
285
286
287 # So that we can recreate a full libtool script including additional
288 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
289 # in macros and then make a single call at the end using the `libtool'
290 # label.
291
292
293 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
294 # ----------------------------------------
295 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
296 m4_define([_LT_CONFIG_LIBTOOL_INIT],
297 [m4_ifval([$1],
298 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
299 [$1
300 ])])])
301
302 # Initialize.
303 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
304
305
306 # _LT_CONFIG_LIBTOOL([COMMANDS])
307 # ------------------------------
308 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
309 m4_define([_LT_CONFIG_LIBTOOL],
310 [m4_ifval([$1],
311 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
312 [$1
313 ])])])
314
315 # Initialize.
316 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
317
318
319 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
320 # -----------------------------------------------------
321 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
322 [_LT_CONFIG_LIBTOOL([$1])
323 _LT_CONFIG_LIBTOOL_INIT([$2])
324 ])
325
326
327 # _LT_FORMAT_COMMENT([COMMENT])
328 # -----------------------------
329 # Add leading comment marks to the start of each line, and a trailing
330 # full-stop to the whole comment if one is not present already.
331 m4_define([_LT_FORMAT_COMMENT],
332 [m4_ifval([$1], [
333 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
334 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
335 )])
336
337
338
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # Quote evaled strings.
535 for var in lt_decl_all_varnames([[ \
536 ]], lt_decl_quote_varnames); do
537 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
538 *[[\\\\\\\`\\"\\\$]]*)
539 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
540 ;;
541 *)
542 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
543 ;;
544 esac
545 done
546
547 # Double-quote double-evaled strings.
548 for var in lt_decl_all_varnames([[ \
549 ]], lt_decl_dquote_varnames); do
550 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
551 *[[\\\\\\\`\\"\\\$]]*)
552 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
553 ;;
554 *)
555 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
556 ;;
557 esac
558 done
559
560 # Fix-up fallback echo if it was mangled by the above quoting rules.
561 case \$lt_ECHO in
562 *'\\\[$]0 --fallback-echo"')dnl "
563 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
564 ;;
565 esac
566
567 _LT_OUTPUT_LIBTOOL_INIT
568 ])
569
570
571 # LT_OUTPUT
572 # ---------
573 # This macro allows early generation of the libtool script (before
574 # AC_OUTPUT is called), incase it is used in configure for compilation
575 # tests.
576 AC_DEFUN([LT_OUTPUT],
577 [: ${CONFIG_LT=./config.lt}
578 AC_MSG_NOTICE([creating $CONFIG_LT])
579 cat >"$CONFIG_LT" <<_LTEOF
580 #! $SHELL
581 # Generated by $as_me.
582 # Run this file to recreate a libtool stub with the current configuration.
583
584 lt_cl_silent=false
585 SHELL=\${CONFIG_SHELL-$SHELL}
586 _LTEOF
587
588 cat >>"$CONFIG_LT" <<\_LTEOF
589 AS_SHELL_SANITIZE
590 _AS_PREPARE
591
592 exec AS_MESSAGE_FD>&1
593 exec AS_MESSAGE_LOG_FD>>config.log
594 {
595 echo
596 AS_BOX([Running $as_me.])
597 } >&AS_MESSAGE_LOG_FD
598
599 lt_cl_help="\
600 \`$as_me' creates a local libtool stub from the current configuration,
601 for use in further configure time tests before the real libtool is
602 generated.
603
604 Usage: $[0] [[OPTIONS]]
605
606 -h, --help print this help, then exit
607 -V, --version print version number, then exit
608 -q, --quiet do not print progress messages
609 -d, --debug don't remove temporary files
610
611 Report bugs to <bug-libtool@gnu.org>."
612
613 lt_cl_version="\
614 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
615 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
616 configured by $[0], generated by m4_PACKAGE_STRING.
617
618 Copyright (C) 2008 Free Software Foundation, Inc.
619 This config.lt script is free software; the Free Software Foundation
620 gives unlimited permision to copy, distribute and modify it."
621
622 while test $[#] != 0
623 do
624 case $[1] in
625 --version | --v* | -V )
626 echo "$lt_cl_version"; exit 0 ;;
627 --help | --h* | -h )
628 echo "$lt_cl_help"; exit 0 ;;
629 --debug | --d* | -d )
630 debug=: ;;
631 --quiet | --q* | --silent | --s* | -q )
632 lt_cl_silent=: ;;
633
634 -*) AC_MSG_ERROR([unrecognized option: $[1]
635 Try \`$[0] --help' for more information.]) ;;
636
637 *) AC_MSG_ERROR([unrecognized argument: $[1]
638 Try \`$[0] --help' for more information.]) ;;
639 esac
640 shift
641 done
642
643 if $lt_cl_silent; then
644 exec AS_MESSAGE_FD>/dev/null
645 fi
646 _LTEOF
647
648 cat >>"$CONFIG_LT" <<_LTEOF
649 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
650 _LTEOF
651
652 cat >>"$CONFIG_LT" <<\_LTEOF
653 AC_MSG_NOTICE([creating $ofile])
654 _LT_OUTPUT_LIBTOOL_COMMANDS
655 AS_EXIT(0)
656 _LTEOF
657 chmod +x "$CONFIG_LT"
658
659 # configure is writing to config.log, but config.lt does its own redirection,
660 # appending to config.log, which fails on DOS, as config.log is still kept
661 # open by configure. Here we exec the FD to /dev/null, effectively closing
662 # config.log, so it can be properly (re)opened and appended to by config.lt.
663 if test "$no_create" != yes; then
664 lt_cl_success=:
665 test "$silent" = yes &&
666 lt_config_lt_args="$lt_config_lt_args --quiet"
667 exec AS_MESSAGE_LOG_FD>/dev/null
668 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
669 exec AS_MESSAGE_LOG_FD>>config.log
670 $lt_cl_success || AS_EXIT(1)
671 fi
672 ])# LT_OUTPUT
673
674
675 # _LT_CONFIG(TAG)
676 # ---------------
677 # If TAG is the built-in tag, create an initial libtool script with a
678 # default configuration from the untagged config vars. Otherwise add code
679 # to config.status for appending the configuration named by TAG from the
680 # matching tagged config vars.
681 m4_defun([_LT_CONFIG],
682 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
683 _LT_CONFIG_SAVE_COMMANDS([
684 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
685 m4_if(_LT_TAG, [C], [
686 # See if we are running on zsh, and set the options which allow our
687 # commands through without removal of \ escapes.
688 if test -n "${ZSH_VERSION+set}" ; then
689 setopt NO_GLOB_SUBST
690 fi
691
692 cfgfile="${ofile}T"
693 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
694 $RM "$cfgfile"
695
696 cat <<_LT_EOF >> "$cfgfile"
697 #! $SHELL
698
699 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
700 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
701 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
702 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
703 #
704 _LT_COPYING
705 _LT_LIBTOOL_TAGS
706
707 # ### BEGIN LIBTOOL CONFIG
708 _LT_LIBTOOL_CONFIG_VARS
709 _LT_LIBTOOL_TAG_VARS
710 # ### END LIBTOOL CONFIG
711
712 _LT_EOF
713
714 case $host_os in
715 aix3*)
716 cat <<\_LT_EOF >> "$cfgfile"
717 # AIX sometimes has problems with the GCC collect2 program. For some
718 # reason, if we set the COLLECT_NAMES environment variable, the problems
719 # vanish in a puff of smoke.
720 if test "X${COLLECT_NAMES+set}" != Xset; then
721 COLLECT_NAMES=
722 export COLLECT_NAMES
723 fi
724 _LT_EOF
725 ;;
726 esac
727
728 _LT_PROG_LTMAIN
729
730 # We use sed instead of cat because bash on DJGPP gets confused if
731 # if finds mixed CR/LF and LF-only lines. Since sed operates in
732 # text mode, it properly converts lines to CR/LF. This bash problem
733 # is reportedly fixed, but why not run on old versions too?
734 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
735 || (rm -f "$cfgfile"; exit 1)
736
737 _LT_PROG_XSI_SHELLFNS
738
739 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
740 || (rm -f "$cfgfile"; exit 1)
741
742 mv -f "$cfgfile" "$ofile" ||
743 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
744 chmod +x "$ofile"
745 ],
746 [cat <<_LT_EOF >> "$ofile"
747
748 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
749 dnl in a comment (ie after a #).
750 # ### BEGIN LIBTOOL TAG CONFIG: $1
751 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
752 # ### END LIBTOOL TAG CONFIG: $1
753 _LT_EOF
754 ])dnl /m4_if
755 ],
756 [m4_if([$1], [], [
757 PACKAGE='$PACKAGE'
758 VERSION='$VERSION'
759 TIMESTAMP='$TIMESTAMP'
760 RM='$RM'
761 ofile='$ofile'], [])
762 ])dnl /_LT_CONFIG_SAVE_COMMANDS
763 ])# _LT_CONFIG
764
765
766 # LT_SUPPORTED_TAG(TAG)
767 # ---------------------
768 # Trace this macro to discover what tags are supported by the libtool
769 # --tag option, using:
770 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
771 AC_DEFUN([LT_SUPPORTED_TAG], [])
772
773
774 # C support is built-in for now
775 m4_define([_LT_LANG_C_enabled], [])
776 m4_define([_LT_TAGS], [])
777
778
779 # LT_LANG(LANG)
780 # -------------
781 # Enable libtool support for the given language if not already enabled.
782 AC_DEFUN([LT_LANG],
783 [AC_BEFORE([$0], [LT_OUTPUT])dnl
784 m4_case([$1],
785 [C], [_LT_LANG(C)],
786 [C++], [_LT_LANG(CXX)],
787 [Java], [_LT_LANG(GCJ)],
788 [Fortran 77], [_LT_LANG(F77)],
789 [Fortran], [_LT_LANG(FC)],
790 [Windows Resource], [_LT_LANG(RC)],
791 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
792 [_LT_LANG($1)],
793 [m4_fatal([$0: unsupported language: "$1"])])])dnl
794 ])# LT_LANG
795
796
797 # _LT_LANG(LANGNAME)
798 # ------------------
799 m4_defun([_LT_LANG],
800 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
801 [LT_SUPPORTED_TAG([$1])dnl
802 m4_append([_LT_TAGS], [$1 ])dnl
803 m4_define([_LT_LANG_]$1[_enabled], [])dnl
804 _LT_LANG_$1_CONFIG($1)])dnl
805 ])# _LT_LANG
806
807
808 # _LT_LANG_DEFAULT_CONFIG
809 # -----------------------
810 m4_defun([_LT_LANG_DEFAULT_CONFIG],
811 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
812 [LT_LANG(CXX)],
813 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
814
815 AC_PROVIDE_IFELSE([AC_PROG_F77],
816 [LT_LANG(F77)],
817 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
818
819 AC_PROVIDE_IFELSE([AC_PROG_FC],
820 [LT_LANG(FC)],
821 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
822
823 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
824 dnl pulling things in needlessly.
825 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
826 [LT_LANG(GCJ)],
827 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
828 [LT_LANG(GCJ)],
829 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
830 [LT_LANG(GCJ)],
831 [m4_ifdef([AC_PROG_GCJ],
832 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
833 m4_ifdef([A][M_PROG_GCJ],
834 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
835 m4_ifdef([LT_PROG_GCJ],
836 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
837
838 AC_PROVIDE_IFELSE([LT_PROG_RC],
839 [LT_LANG(RC)],
840 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
841 ])# _LT_LANG_DEFAULT_CONFIG
842
843 # Obsolete macros:
844 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
845 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
846 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
847 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
848 dnl aclocal-1.4 backwards compatibility:
849 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
850 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
851 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
852 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
853
854
855 # _LT_TAG_COMPILER
856 # ----------------
857 m4_defun([_LT_TAG_COMPILER],
858 [AC_REQUIRE([AC_PROG_CC])dnl
859
860 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
861 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
862 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
863 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
864
865 # If no C compiler was specified, use CC.
866 LTCC=${LTCC-"$CC"}
867
868 # If no C compiler flags were specified, use CFLAGS.
869 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
870
871 # Allow CC to be a program name with arguments.
872 compiler=$CC
873 ])# _LT_TAG_COMPILER
874
875
876 # _LT_COMPILER_BOILERPLATE
877 # ------------------------
878 # Check for compiler boilerplate output or warnings with
879 # the simple compiler test code.
880 m4_defun([_LT_COMPILER_BOILERPLATE],
881 [m4_require([_LT_DECL_SED])dnl
882 ac_outfile=conftest.$ac_objext
883 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
884 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885 _lt_compiler_boilerplate=`cat conftest.err`
886 $RM conftest*
887 ])# _LT_COMPILER_BOILERPLATE
888
889
890 # _LT_LINKER_BOILERPLATE
891 # ----------------------
892 # Check for linker boilerplate output or warnings with
893 # the simple link test code.
894 m4_defun([_LT_LINKER_BOILERPLATE],
895 [m4_require([_LT_DECL_SED])dnl
896 ac_outfile=conftest.$ac_objext
897 echo "$lt_simple_link_test_code" >conftest.$ac_ext
898 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
899 _lt_linker_boilerplate=`cat conftest.err`
900 $RM -r conftest*
901 ])# _LT_LINKER_BOILERPLATE
902
903 # _LT_REQUIRED_DARWIN_CHECKS
904 # -------------------------
905 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
906 case $host_os in
907 rhapsody* | darwin*)
908 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
909 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
910 AC_CHECK_TOOL([LIPO], [lipo], [:])
911 AC_CHECK_TOOL([OTOOL], [otool], [:])
912 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
913 _LT_DECL([], [DSYMUTIL], [1],
914 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
915 _LT_DECL([], [NMEDIT], [1],
916 [Tool to change global to local symbols on Mac OS X])
917 _LT_DECL([], [LIPO], [1],
918 [Tool to manipulate fat objects and archives on Mac OS X])
919 _LT_DECL([], [OTOOL], [1],
920 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
921 _LT_DECL([], [OTOOL64], [1],
922 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
923
924 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
925 [lt_cv_apple_cc_single_mod=no
926 if test -z "${LT_MULTI_MODULE}"; then
927 # By default we will add the -single_module flag. You can override
928 # by either setting the environment variable LT_MULTI_MODULE
929 # non-empty at configure time, or by adding -multi_module to the
930 # link flags.
931 rm -rf libconftest.dylib*
932 echo "int foo(void){return 1;}" > conftest.c
933 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
934 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
935 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
936 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
937 _lt_result=$?
938 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
939 lt_cv_apple_cc_single_mod=yes
940 else
941 cat conftest.err >&AS_MESSAGE_LOG_FD
942 fi
943 rm -rf libconftest.dylib*
944 rm -f conftest.*
945 fi])
946 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
947 [lt_cv_ld_exported_symbols_list],
948 [lt_cv_ld_exported_symbols_list=no
949 save_LDFLAGS=$LDFLAGS
950 echo "_main" > conftest.sym
951 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
952 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
953 [lt_cv_ld_exported_symbols_list=yes],
954 [lt_cv_ld_exported_symbols_list=no])
955 LDFLAGS="$save_LDFLAGS"
956 ])
957 case $host_os in
958 rhapsody* | darwin1.[[012]])
959 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
960 darwin1.*)
961 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
962 darwin*) # darwin 5.x on
963 # if running on 10.5 or later, the deployment target defaults
964 # to the OS version, if on x86, and 10.4, the deployment
965 # target defaults to 10.4. Don't you love it?
966 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
967 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
968 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
969 10.[[012]]*)
970 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
971 10.*)
972 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
973 esac
974 ;;
975 esac
976 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
977 _lt_dar_single_mod='$single_module'
978 fi
979 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
980 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
981 else
982 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
983 fi
984 if test "$DSYMUTIL" != ":"; then
985 _lt_dsymutil='~$DSYMUTIL $lib || :'
986 else
987 _lt_dsymutil=
988 fi
989 ;;
990 esac
991 ])
992
993
994 # _LT_DARWIN_LINKER_FEATURES
995 # --------------------------
996 # Checks for linker and compiler features on darwin
997 m4_defun([_LT_DARWIN_LINKER_FEATURES],
998 [
999 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1001 _LT_TAGVAR(hardcode_direct, $1)=no
1002 _LT_TAGVAR(hardcode_automatic, $1)=yes
1003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1004 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1005 _LT_TAGVAR(link_all_deplibs, $1)=yes
1006 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1007 case $cc_basename in
1008 ifort*) _lt_dar_can_shared=yes ;;
1009 *) _lt_dar_can_shared=$GCC ;;
1010 esac
1011 if test "$_lt_dar_can_shared" = "yes"; then
1012 output_verbose_link_cmd=echo
1013 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1014 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1015 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1016 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1017 m4_if([$1], [CXX],
1018 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1019 _LT_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${_lt_dsymutil}"
1020 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
1021 fi
1022 ],[])
1023 else
1024 _LT_TAGVAR(ld_shlibs, $1)=no
1025 fi
1026 ])
1027
1028 # _LT_SYS_MODULE_PATH_AIX
1029 # -----------------------
1030 # Links a minimal program and checks the executable
1031 # for the system default hardcoded library path. In most cases,
1032 # this is /usr/lib:/lib, but when the MPI compilers are used
1033 # the location of the communication and MPI libs are included too.
1034 # If we don't find anything, use the default library path according
1035 # to the aix ld manual.
1036 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1037 [m4_require([_LT_DECL_SED])dnl
1038 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1039 lt_aix_libpath_sed='
1040 /Import File Strings/,/^$/ {
1041 /^0/ {
1042 s/^0 *\(.*\)$/\1/
1043 p
1044 }
1045 }'
1046 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1047 # Check for a 64-bit object if we didn't find anything.
1048 if test -z "$aix_libpath"; then
1049 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1050 fi],[])
1051 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1052 ])# _LT_SYS_MODULE_PATH_AIX
1053
1054
1055 # _LT_SHELL_INIT(ARG)
1056 # -------------------
1057 m4_define([_LT_SHELL_INIT],
1058 [ifdef([AC_DIVERSION_NOTICE],
1059 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060 [AC_DIVERT_PUSH(NOTICE)])
1061 $1
1062 AC_DIVERT_POP
1063 ])# _LT_SHELL_INIT
1064
1065
1066 # _LT_PROG_ECHO_BACKSLASH
1067 # -----------------------
1068 # Add some code to the start of the generated configure script which
1069 # will find an echo command which doesn't interpret backslashes.
1070 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1071 [_LT_SHELL_INIT([
1072 # Check that we are running under the correct shell.
1073 SHELL=${CONFIG_SHELL-/bin/sh}
1074
1075 case X$lt_ECHO in
1076 X*--fallback-echo)
1077 # Remove one level of quotation (which was required for Make).
1078 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1079 ;;
1080 esac
1081
1082 ECHO=${lt_ECHO-echo}
1083 if test "X[$]1" = X--no-reexec; then
1084 # Discard the --no-reexec flag, and continue.
1085 shift
1086 elif test "X[$]1" = X--fallback-echo; then
1087 # Avoid inline document here, it may be left over
1088 :
1089 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1090 # Yippee, $ECHO works!
1091 :
1092 else
1093 # Restart under the correct shell.
1094 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1095 fi
1096
1097 if test "X[$]1" = X--fallback-echo; then
1098 # used as fallback echo
1099 shift
1100 cat <<_LT_EOF
1101 [$]*
1102 _LT_EOF
1103 exit 0
1104 fi
1105
1106 # The HP-UX ksh and POSIX shell print the target directory to stdout
1107 # if CDPATH is set.
1108 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1109
1110 if test -z "$lt_ECHO"; then
1111 if test "X${echo_test_string+set}" != Xset; then
1112 # find a string as large as possible, as long as the shell can cope with it
1113 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1114 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1115 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1116 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1117 then
1118 break
1119 fi
1120 done
1121 fi
1122
1123 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1124 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1125 test "X$echo_testing_string" = "X$echo_test_string"; then
1126 :
1127 else
1128 # The Solaris, AIX, and Digital Unix default echo programs unquote
1129 # backslashes. This makes it impossible to quote backslashes using
1130 # echo "$something" | sed 's/\\/\\\\/g'
1131 #
1132 # So, first we look for a working echo in the user's PATH.
1133
1134 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1135 for dir in $PATH /usr/ucb; do
1136 IFS="$lt_save_ifs"
1137 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1138 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1139 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1140 test "X$echo_testing_string" = "X$echo_test_string"; then
1141 ECHO="$dir/echo"
1142 break
1143 fi
1144 done
1145 IFS="$lt_save_ifs"
1146
1147 if test "X$ECHO" = Xecho; then
1148 # We didn't find a better echo, so look for alternatives.
1149 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1150 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1151 test "X$echo_testing_string" = "X$echo_test_string"; then
1152 # This shell has a builtin print -r that does the trick.
1153 ECHO='print -r'
1154 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1155 test "X$CONFIG_SHELL" != X/bin/ksh; then
1156 # If we have ksh, try running configure again with it.
1157 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1158 export ORIGINAL_CONFIG_SHELL
1159 CONFIG_SHELL=/bin/ksh
1160 export CONFIG_SHELL
1161 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1162 else
1163 # Try using printf.
1164 ECHO='printf %s\n'
1165 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1166 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1167 test "X$echo_testing_string" = "X$echo_test_string"; then
1168 # Cool, printf works
1169 :
1170 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1171 test "X$echo_testing_string" = 'X\t' &&
1172 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1173 test "X$echo_testing_string" = "X$echo_test_string"; then
1174 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1175 export CONFIG_SHELL
1176 SHELL="$CONFIG_SHELL"
1177 export SHELL
1178 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1179 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1180 test "X$echo_testing_string" = 'X\t' &&
1181 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1182 test "X$echo_testing_string" = "X$echo_test_string"; then
1183 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1184 else
1185 # maybe with a smaller string...
1186 prev=:
1187
1188 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1189 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1190 then
1191 break
1192 fi
1193 prev="$cmd"
1194 done
1195
1196 if test "$prev" != 'sed 50q "[$]0"'; then
1197 echo_test_string=`eval $prev`
1198 export echo_test_string
1199 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1200 else
1201 # Oops. We lost completely, so just stick with echo.
1202 ECHO=echo
1203 fi
1204 fi
1205 fi
1206 fi
1207 fi
1208 fi
1209
1210 # Copy echo and quote the copy suitably for passing to libtool from
1211 # the Makefile, instead of quoting the original, which is used later.
1212 lt_ECHO=$ECHO
1213 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1214 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1215 fi
1216
1217 AC_SUBST(lt_ECHO)
1218 ])
1219 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1220 _LT_DECL([], [ECHO], [1],
1221 [An echo program that does not interpret backslashes])
1222 ])# _LT_PROG_ECHO_BACKSLASH
1223
1224
1225 # _LT_ENABLE_LOCK
1226 # ---------------
1227 m4_defun([_LT_ENABLE_LOCK],
1228 [AC_ARG_ENABLE([libtool-lock],
1229 [AS_HELP_STRING([--disable-libtool-lock],
1230 [avoid locking (might break parallel builds)])])
1231 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1232
1233 # Some flags need to be propagated to the compiler or linker for good
1234 # libtool support.
1235 case $host in
1236 ia64-*-hpux*)
1237 # Find out which ABI we are using.
1238 echo 'int i;' > conftest.$ac_ext
1239 if AC_TRY_EVAL(ac_compile); then
1240 case `/usr/bin/file conftest.$ac_objext` in
1241 *ELF-32*)
1242 HPUX_IA64_MODE="32"
1243 ;;
1244 *ELF-64*)
1245 HPUX_IA64_MODE="64"
1246 ;;
1247 esac
1248 fi
1249 rm -rf conftest*
1250 ;;
1251 *-*-irix6*)
1252 # Find out which ABI we are using.
1253 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1254 if AC_TRY_EVAL(ac_compile); then
1255 if test "$lt_cv_prog_gnu_ld" = yes; then
1256 case `/usr/bin/file conftest.$ac_objext` in
1257 *32-bit*)
1258 LD="${LD-ld} -melf32bsmip"
1259 ;;
1260 *N32*)
1261 LD="${LD-ld} -melf32bmipn32"
1262 ;;
1263 *64-bit*)
1264 LD="${LD-ld} -melf64bmip"
1265 ;;
1266 esac
1267 else
1268 case `/usr/bin/file conftest.$ac_objext` in
1269 *32-bit*)
1270 LD="${LD-ld} -32"
1271 ;;
1272 *N32*)
1273 LD="${LD-ld} -n32"
1274 ;;
1275 *64-bit*)
1276 LD="${LD-ld} -64"
1277 ;;
1278 esac
1279 fi
1280 fi
1281 rm -rf conftest*
1282 ;;
1283
1284 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1285 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1286 # Find out which ABI we are using.
1287 echo 'int i;' > conftest.$ac_ext
1288 if AC_TRY_EVAL(ac_compile); then
1289 case `/usr/bin/file conftest.o` in
1290 *32-bit*)
1291 case $host in
1292 x86_64-*kfreebsd*-gnu)
1293 LD="${LD-ld} -m elf_i386_fbsd"
1294 ;;
1295 x86_64-*linux*)
1296 LD="${LD-ld} -m elf_i386"
1297 ;;
1298 ppc64-*linux*|powerpc64-*linux*)
1299 LD="${LD-ld} -m elf32ppclinux"
1300 ;;
1301 s390x-*linux*)
1302 LD="${LD-ld} -m elf_s390"
1303 ;;
1304 sparc64-*linux*)
1305 LD="${LD-ld} -m elf32_sparc"
1306 ;;
1307 esac
1308 ;;
1309 *64-bit*)
1310 case $host in
1311 x86_64-*kfreebsd*-gnu)
1312 LD="${LD-ld} -m elf_x86_64_fbsd"
1313 ;;
1314 x86_64-*linux*)
1315 LD="${LD-ld} -m elf_x86_64"
1316 ;;
1317 ppc*-*linux*|powerpc*-*linux*)
1318 LD="${LD-ld} -m elf64ppc"
1319 ;;
1320 s390*-*linux*|s390*-*tpf*)
1321 LD="${LD-ld} -m elf64_s390"
1322 ;;
1323 sparc*-*linux*)
1324 LD="${LD-ld} -m elf64_sparc"
1325 ;;
1326 esac
1327 ;;
1328 esac
1329 fi
1330 rm -rf conftest*
1331 ;;
1332
1333 *-*-sco3.2v5*)
1334 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1335 SAVE_CFLAGS="$CFLAGS"
1336 CFLAGS="$CFLAGS -belf"
1337 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1338 [AC_LANG_PUSH(C)
1339 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1340 AC_LANG_POP])
1341 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1342 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1343 CFLAGS="$SAVE_CFLAGS"
1344 fi
1345 ;;
1346 sparc*-*solaris*)
1347 # Find out which ABI we are using.
1348 echo 'int i;' > conftest.$ac_ext
1349 if AC_TRY_EVAL(ac_compile); then
1350 case `/usr/bin/file conftest.o` in
1351 *64-bit*)
1352 case $lt_cv_prog_gnu_ld in
1353 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1354 *)
1355 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1356 LD="${LD-ld} -64"
1357 fi
1358 ;;
1359 esac
1360 ;;
1361 esac
1362 fi
1363 rm -rf conftest*
1364 ;;
1365 esac
1366
1367 need_locks="$enable_libtool_lock"
1368 ])# _LT_ENABLE_LOCK
1369
1370
1371 # _LT_CMD_OLD_ARCHIVE
1372 # -------------------
1373 m4_defun([_LT_CMD_OLD_ARCHIVE],
1374 [AC_CHECK_TOOL(AR, ar, false)
1375 test -z "$AR" && AR=ar
1376 test -z "$AR_FLAGS" && AR_FLAGS=cru
1377 _LT_DECL([], [AR], [1], [The archiver])
1378 _LT_DECL([], [AR_FLAGS], [1])
1379
1380 AC_CHECK_TOOL(STRIP, strip, :)
1381 test -z "$STRIP" && STRIP=:
1382 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1383
1384 AC_CHECK_TOOL(RANLIB, ranlib, :)
1385 test -z "$RANLIB" && RANLIB=:
1386 _LT_DECL([], [RANLIB], [1],
1387 [Commands used to install an old-style archive])
1388
1389 # Determine commands to create old-style static archives.
1390 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1391 old_postinstall_cmds='chmod 644 $oldlib'
1392 old_postuninstall_cmds=
1393
1394 if test -n "$RANLIB"; then
1395 case $host_os in
1396 openbsd*)
1397 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1398 ;;
1399 *)
1400 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1401 ;;
1402 esac
1403 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1404 fi
1405 _LT_DECL([], [old_postinstall_cmds], [2])
1406 _LT_DECL([], [old_postuninstall_cmds], [2])
1407 _LT_TAGDECL([], [old_archive_cmds], [2],
1408 [Commands used to build an old-style archive])
1409 ])# _LT_CMD_OLD_ARCHIVE
1410
1411
1412 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1413 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1414 # ----------------------------------------------------------------
1415 # Check whether the given compiler option works
1416 AC_DEFUN([_LT_COMPILER_OPTION],
1417 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1418 m4_require([_LT_DECL_SED])dnl
1419 AC_CACHE_CHECK([$1], [$2],
1420 [$2=no
1421 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1422 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1423 lt_compiler_flag="$3"
1424 # Insert the option either (1) after the last *FLAGS variable, or
1425 # (2) before a word containing "conftest.", or (3) at the end.
1426 # Note that $ac_compile itself does not contain backslashes and begins
1427 # with a dollar sign (not a hyphen), so the echo should work correctly.
1428 # The option is referenced via a variable to avoid confusing sed.
1429 lt_compile=`echo "$ac_compile" | $SED \
1430 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1431 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1432 -e 's:$: $lt_compiler_flag:'`
1433 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1434 (eval "$lt_compile" 2>conftest.err)
1435 ac_status=$?
1436 cat conftest.err >&AS_MESSAGE_LOG_FD
1437 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1438 if (exit $ac_status) && test -s "$ac_outfile"; then
1439 # The compiler can only warn and ignore the option if not recognized
1440 # So say no if there are warnings other than the usual output.
1441 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1442 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1443 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1444 $2=yes
1445 fi
1446 fi
1447 $RM conftest*
1448 ])
1449
1450 if test x"[$]$2" = xyes; then
1451 m4_if([$5], , :, [$5])
1452 else
1453 m4_if([$6], , :, [$6])
1454 fi
1455 ])# _LT_COMPILER_OPTION
1456
1457 # Old name:
1458 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1459 dnl aclocal-1.4 backwards compatibility:
1460 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1461
1462
1463 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1464 # [ACTION-SUCCESS], [ACTION-FAILURE])
1465 # ----------------------------------------------------
1466 # Check whether the given linker option works
1467 AC_DEFUN([_LT_LINKER_OPTION],
1468 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1469 m4_require([_LT_DECL_SED])dnl
1470 AC_CACHE_CHECK([$1], [$2],
1471 [$2=no
1472 save_LDFLAGS="$LDFLAGS"
1473 LDFLAGS="$LDFLAGS $3"
1474 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1475 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1476 # The linker can only warn and ignore the option if not recognized
1477 # So say no if there are warnings
1478 if test -s conftest.err; then
1479 # Append any errors to the config.log.
1480 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1481 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1482 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1483 if diff conftest.exp conftest.er2 >/dev/null; then
1484 $2=yes
1485 fi
1486 else
1487 $2=yes
1488 fi
1489 fi
1490 $RM -r conftest*
1491 LDFLAGS="$save_LDFLAGS"
1492 ])
1493
1494 if test x"[$]$2" = xyes; then
1495 m4_if([$4], , :, [$4])
1496 else
1497 m4_if([$5], , :, [$5])
1498 fi
1499 ])# _LT_LINKER_OPTION
1500
1501 # Old name:
1502 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1503 dnl aclocal-1.4 backwards compatibility:
1504 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1505
1506
1507 # LT_CMD_MAX_LEN
1508 #---------------
1509 AC_DEFUN([LT_CMD_MAX_LEN],
1510 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1511 # find the maximum length of command line arguments
1512 AC_MSG_CHECKING([the maximum length of command line arguments])
1513 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1514 i=0
1515 teststring="ABCD"
1516
1517 case $build_os in
1518 msdosdjgpp*)
1519 # On DJGPP, this test can blow up pretty badly due to problems in libc
1520 # (any single argument exceeding 2000 bytes causes a buffer overrun
1521 # during glob expansion). Even if it were fixed, the result of this
1522 # check would be larger than it should be.
1523 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1524 ;;
1525
1526 gnu*)
1527 # Under GNU Hurd, this test is not required because there is
1528 # no limit to the length of command line arguments.
1529 # Libtool will interpret -1 as no limit whatsoever
1530 lt_cv_sys_max_cmd_len=-1;
1531 ;;
1532
1533 cygwin* | mingw* | cegcc*)
1534 # On Win9x/ME, this test blows up -- it succeeds, but takes
1535 # about 5 minutes as the teststring grows exponentially.
1536 # Worse, since 9x/ME are not pre-emptively multitasking,
1537 # you end up with a "frozen" computer, even though with patience
1538 # the test eventually succeeds (with a max line length of 256k).
1539 # Instead, let's just punt: use the minimum linelength reported by
1540 # all of the supported platforms: 8192 (on NT/2K/XP).
1541 lt_cv_sys_max_cmd_len=8192;
1542 ;;
1543
1544 amigaos*)
1545 # On AmigaOS with pdksh, this test takes hours, literally.
1546 # So we just punt and use a minimum line length of 8192.
1547 lt_cv_sys_max_cmd_len=8192;
1548 ;;
1549
1550 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1551 # This has been around since 386BSD, at least. Likely further.
1552 if test -x /sbin/sysctl; then
1553 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1554 elif test -x /usr/sbin/sysctl; then
1555 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1556 else
1557 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1558 fi
1559 # And add a safety zone
1560 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1561 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1562 ;;
1563
1564 interix*)
1565 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1566 lt_cv_sys_max_cmd_len=196608
1567 ;;
1568
1569 osf*)
1570 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1571 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1572 # nice to cause kernel panics so lets avoid the loop below.
1573 # First set a reasonable default.
1574 lt_cv_sys_max_cmd_len=16384
1575 #
1576 if test -x /sbin/sysconfig; then
1577 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1578 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1579 esac
1580 fi
1581 ;;
1582 sco3.2v5*)
1583 lt_cv_sys_max_cmd_len=102400
1584 ;;
1585 sysv5* | sco5v6* | sysv4.2uw2*)
1586 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1587 if test -n "$kargmax"; then
1588 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1589 else
1590 lt_cv_sys_max_cmd_len=32768
1591 fi
1592 ;;
1593 *)
1594 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1595 if test -n "$lt_cv_sys_max_cmd_len"; then
1596 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1598 else
1599 # Make teststring a little bigger before we do anything with it.
1600 # a 1K string should be a reasonable start.
1601 for i in 1 2 3 4 5 6 7 8 ; do
1602 teststring=$teststring$teststring
1603 done
1604 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1605 # If test is not a shell built-in, we'll probably end up computing a
1606 # maximum length that is only half of the actual maximum length, but
1607 # we can't tell.
1608 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1609 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1610 test $i != 17 # 1/2 MB should be enough
1611 do
1612 i=`expr $i + 1`
1613 teststring=$teststring$teststring
1614 done
1615 # Only check the string length outside the loop.
1616 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1617 teststring=
1618 # Add a significant safety factor because C++ compilers can tack on
1619 # massive amounts of additional arguments before passing them to the
1620 # linker. It appears as though 1/2 is a usable value.
1621 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1622 fi
1623 ;;
1624 esac
1625 ])
1626 if test -n $lt_cv_sys_max_cmd_len ; then
1627 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1628 else
1629 AC_MSG_RESULT(none)
1630 fi
1631 max_cmd_len=$lt_cv_sys_max_cmd_len
1632 _LT_DECL([], [max_cmd_len], [0],
1633 [What is the maximum length of a command?])
1634 ])# LT_CMD_MAX_LEN
1635
1636 # Old name:
1637 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1638 dnl aclocal-1.4 backwards compatibility:
1639 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1640
1641
1642 # _LT_HEADER_DLFCN
1643 # ----------------
1644 m4_defun([_LT_HEADER_DLFCN],
1645 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1646 ])# _LT_HEADER_DLFCN
1647
1648
1649 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1650 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1651 # ----------------------------------------------------------------
1652 m4_defun([_LT_TRY_DLOPEN_SELF],
1653 [m4_require([_LT_HEADER_DLFCN])dnl
1654 if test "$cross_compiling" = yes; then :
1655 [$4]
1656 else
1657 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1658 lt_status=$lt_dlunknown
1659 cat > conftest.$ac_ext <<_LT_EOF
1660 [#line __oline__ "configure"
1661 #include "confdefs.h"
1662
1663 #if HAVE_DLFCN_H
1664 #include <dlfcn.h>
1665 #endif
1666
1667 #include <stdio.h>
1668
1669 #ifdef RTLD_GLOBAL
1670 # define LT_DLGLOBAL RTLD_GLOBAL
1671 #else
1672 # ifdef DL_GLOBAL
1673 # define LT_DLGLOBAL DL_GLOBAL
1674 # else
1675 # define LT_DLGLOBAL 0
1676 # endif
1677 #endif
1678
1679 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1680 find out it does not work in some platform. */
1681 #ifndef LT_DLLAZY_OR_NOW
1682 # ifdef RTLD_LAZY
1683 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1684 # else
1685 # ifdef DL_LAZY
1686 # define LT_DLLAZY_OR_NOW DL_LAZY
1687 # else
1688 # ifdef RTLD_NOW
1689 # define LT_DLLAZY_OR_NOW RTLD_NOW
1690 # else
1691 # ifdef DL_NOW
1692 # define LT_DLLAZY_OR_NOW DL_NOW
1693 # else
1694 # define LT_DLLAZY_OR_NOW 0
1695 # endif
1696 # endif
1697 # endif
1698 # endif
1699 #endif
1700
1701 void fnord() { int i=42;}
1702 int main ()
1703 {
1704 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1705 int status = $lt_dlunknown;
1706
1707 if (self)
1708 {
1709 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1710 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1711 /* dlclose (self); */
1712 }
1713 else
1714 puts (dlerror ());
1715
1716 return status;
1717 }]
1718 _LT_EOF
1719 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1720 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1721 lt_status=$?
1722 case x$lt_status in
1723 x$lt_dlno_uscore) $1 ;;
1724 x$lt_dlneed_uscore) $2 ;;
1725 x$lt_dlunknown|x*) $3 ;;
1726 esac
1727 else :
1728 # compilation failed
1729 $3
1730 fi
1731 fi
1732 rm -fr conftest*
1733 ])# _LT_TRY_DLOPEN_SELF
1734
1735
1736 # LT_SYS_DLOPEN_SELF
1737 # ------------------
1738 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1739 [m4_require([_LT_HEADER_DLFCN])dnl
1740 if test "x$enable_dlopen" != xyes; then
1741 enable_dlopen=unknown
1742 enable_dlopen_self=unknown
1743 enable_dlopen_self_static=unknown
1744 else
1745 lt_cv_dlopen=no
1746 lt_cv_dlopen_libs=
1747
1748 case $host_os in
1749 beos*)
1750 lt_cv_dlopen="load_add_on"
1751 lt_cv_dlopen_libs=
1752 lt_cv_dlopen_self=yes
1753 ;;
1754
1755 mingw* | pw32* | cegcc*)
1756 lt_cv_dlopen="LoadLibrary"
1757 lt_cv_dlopen_libs=
1758 ;;
1759
1760 cygwin*)
1761 lt_cv_dlopen="dlopen"
1762 lt_cv_dlopen_libs=
1763 ;;
1764
1765 darwin*)
1766 # if libdl is installed we need to link against it
1767 AC_CHECK_LIB([dl], [dlopen],
1768 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1769 lt_cv_dlopen="dyld"
1770 lt_cv_dlopen_libs=
1771 lt_cv_dlopen_self=yes
1772 ])
1773 ;;
1774
1775 *)
1776 AC_CHECK_FUNC([shl_load],
1777 [lt_cv_dlopen="shl_load"],
1778 [AC_CHECK_LIB([dld], [shl_load],
1779 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1780 [AC_CHECK_FUNC([dlopen],
1781 [lt_cv_dlopen="dlopen"],
1782 [AC_CHECK_LIB([dl], [dlopen],
1783 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1784 [AC_CHECK_LIB([svld], [dlopen],
1785 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1786 [AC_CHECK_LIB([dld], [dld_link],
1787 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1788 ])
1789 ])
1790 ])
1791 ])
1792 ])
1793 ;;
1794 esac
1795
1796 if test "x$lt_cv_dlopen" != xno; then
1797 enable_dlopen=yes
1798 else
1799 enable_dlopen=no
1800 fi
1801
1802 case $lt_cv_dlopen in
1803 dlopen)
1804 save_CPPFLAGS="$CPPFLAGS"
1805 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1806
1807 save_LDFLAGS="$LDFLAGS"
1808 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1809
1810 save_LIBS="$LIBS"
1811 LIBS="$lt_cv_dlopen_libs $LIBS"
1812
1813 AC_CACHE_CHECK([whether a program can dlopen itself],
1814 lt_cv_dlopen_self, [dnl
1815 _LT_TRY_DLOPEN_SELF(
1816 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1817 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1818 ])
1819
1820 if test "x$lt_cv_dlopen_self" = xyes; then
1821 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1822 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1823 lt_cv_dlopen_self_static, [dnl
1824 _LT_TRY_DLOPEN_SELF(
1825 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1826 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1827 ])
1828 fi
1829
1830 CPPFLAGS="$save_CPPFLAGS"
1831 LDFLAGS="$save_LDFLAGS"
1832 LIBS="$save_LIBS"
1833 ;;
1834 esac
1835
1836 case $lt_cv_dlopen_self in
1837 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1838 *) enable_dlopen_self=unknown ;;
1839 esac
1840
1841 case $lt_cv_dlopen_self_static in
1842 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1843 *) enable_dlopen_self_static=unknown ;;
1844 esac
1845 fi
1846 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1847 [Whether dlopen is supported])
1848 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1849 [Whether dlopen of programs is supported])
1850 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1851 [Whether dlopen of statically linked programs is supported])
1852 ])# LT_SYS_DLOPEN_SELF
1853
1854 # Old name:
1855 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1856 dnl aclocal-1.4 backwards compatibility:
1857 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1858
1859
1860 # _LT_COMPILER_C_O([TAGNAME])
1861 # ---------------------------
1862 # Check to see if options -c and -o are simultaneously supported by compiler.
1863 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1864 m4_defun([_LT_COMPILER_C_O],
1865 [m4_require([_LT_DECL_SED])dnl
1866 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1867 m4_require([_LT_TAG_COMPILER])dnl
1868 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1869 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1870 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1871 $RM -r conftest 2>/dev/null
1872 mkdir conftest
1873 cd conftest
1874 mkdir out
1875 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1876
1877 lt_compiler_flag="-o out/conftest2.$ac_objext"
1878 # Insert the option either (1) after the last *FLAGS variable, or
1879 # (2) before a word containing "conftest.", or (3) at the end.
1880 # Note that $ac_compile itself does not contain backslashes and begins
1881 # with a dollar sign (not a hyphen), so the echo should work correctly.
1882 lt_compile=`echo "$ac_compile" | $SED \
1883 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1884 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1885 -e 's:$: $lt_compiler_flag:'`
1886 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1887 (eval "$lt_compile" 2>out/conftest.err)
1888 ac_status=$?
1889 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1890 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1891 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1892 then
1893 # The compiler can only warn and ignore the option if not recognized
1894 # So say no if there are warnings
1895 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1896 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1897 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1898 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1899 fi
1900 fi
1901 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1902 $RM conftest*
1903 # SGI C++ compiler will create directory out/ii_files/ for
1904 # template instantiation
1905 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1906 $RM out/* && rmdir out
1907 cd ..
1908 $RM -r conftest
1909 $RM conftest*
1910 ])
1911 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1912 [Does compiler simultaneously support -c and -o options?])
1913 ])# _LT_COMPILER_C_O
1914
1915
1916 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1917 # ----------------------------------
1918 # Check to see if we can do hard links to lock some files if needed
1919 m4_defun([_LT_COMPILER_FILE_LOCKS],
1920 [m4_require([_LT_ENABLE_LOCK])dnl
1921 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1922 _LT_COMPILER_C_O([$1])
1923
1924 hard_links="nottested"
1925 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1926 # do not overwrite the value of need_locks provided by the user
1927 AC_MSG_CHECKING([if we can lock with hard links])
1928 hard_links=yes
1929 $RM conftest*
1930 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1931 touch conftest.a
1932 ln conftest.a conftest.b 2>&5 || hard_links=no
1933 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1934 AC_MSG_RESULT([$hard_links])
1935 if test "$hard_links" = no; then
1936 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1937 need_locks=warn
1938 fi
1939 else
1940 need_locks=no
1941 fi
1942 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1943 ])# _LT_COMPILER_FILE_LOCKS
1944
1945
1946 # _LT_CHECK_OBJDIR
1947 # ----------------
1948 m4_defun([_LT_CHECK_OBJDIR],
1949 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1950 [rm -f .libs 2>/dev/null
1951 mkdir .libs 2>/dev/null
1952 if test -d .libs; then
1953 lt_cv_objdir=.libs
1954 else
1955 # MS-DOS does not allow filenames that begin with a dot.
1956 lt_cv_objdir=_libs
1957 fi
1958 rmdir .libs 2>/dev/null])
1959 objdir=$lt_cv_objdir
1960 _LT_DECL([], [objdir], [0],
1961 [The name of the directory that contains temporary libtool files])dnl
1962 m4_pattern_allow([LT_OBJDIR])dnl
1963 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1964 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1965 ])# _LT_CHECK_OBJDIR
1966
1967
1968 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1969 # --------------------------------------
1970 # Check hardcoding attributes.
1971 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1972 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1973 _LT_TAGVAR(hardcode_action, $1)=
1974 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1975 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1976 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1977
1978 # We can hardcode non-existent directories.
1979 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1980 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1981 # have to relink, otherwise we might link with an installed library
1982 # when we should be linking with a yet-to-be-installed one
1983 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1984 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1985 # Linking always hardcodes the temporary library directory.
1986 _LT_TAGVAR(hardcode_action, $1)=relink
1987 else
1988 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1989 _LT_TAGVAR(hardcode_action, $1)=immediate
1990 fi
1991 else
1992 # We cannot hardcode anything, or else we can only hardcode existing
1993 # directories.
1994 _LT_TAGVAR(hardcode_action, $1)=unsupported
1995 fi
1996 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1997
1998 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1999 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2000 # Fast installation is not supported
2001 enable_fast_install=no
2002 elif test "$shlibpath_overrides_runpath" = yes ||
2003 test "$enable_shared" = no; then
2004 # Fast installation is not necessary
2005 enable_fast_install=needless
2006 fi
2007 _LT_TAGDECL([], [hardcode_action], [0],
2008 [How to hardcode a shared library path into an executable])
2009 ])# _LT_LINKER_HARDCODE_LIBPATH
2010
2011
2012 # _LT_CMD_STRIPLIB
2013 # ----------------
2014 m4_defun([_LT_CMD_STRIPLIB],
2015 [m4_require([_LT_DECL_EGREP])
2016 striplib=
2017 old_striplib=
2018 AC_MSG_CHECKING([whether stripping libraries is possible])
2019 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2020 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2021 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2022 AC_MSG_RESULT([yes])
2023 else
2024 # FIXME - insert some real tests, host_os isn't really good enough
2025 case $host_os in
2026 darwin*)
2027 if test -n "$STRIP" ; then
2028 striplib="$STRIP -x"
2029 old_striplib="$STRIP -S"
2030 AC_MSG_RESULT([yes])
2031 else
2032 AC_MSG_RESULT([no])
2033 fi
2034 ;;
2035 *)
2036 AC_MSG_RESULT([no])
2037 ;;
2038 esac
2039 fi
2040 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2041 _LT_DECL([], [striplib], [1])
2042 ])# _LT_CMD_STRIPLIB
2043
2044
2045 # _LT_SYS_DYNAMIC_LINKER([TAG])
2046 # -----------------------------
2047 # PORTME Fill in your ld.so characteristics
2048 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2049 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2050 m4_require([_LT_DECL_EGREP])dnl
2051 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2052 m4_require([_LT_DECL_OBJDUMP])dnl
2053 m4_require([_LT_DECL_SED])dnl
2054 AC_MSG_CHECKING([dynamic linker characteristics])
2055 m4_if([$1],
2056 [], [
2057 if test "$GCC" = yes; then
2058 case $host_os in
2059 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2060 *) lt_awk_arg="/^libraries:/" ;;
2061 esac
2062 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2063 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2064 # if the path contains ";" then we assume it to be the separator
2065 # otherwise default to the standard path separator (i.e. ":") - it is
2066 # assumed that no part of a normal pathname contains ";" but that should
2067 # okay in the real world where ";" in dirpaths is itself problematic.
2068 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2069 else
2070 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2071 fi
2072 # Ok, now we have the path, separated by spaces, we can step through it
2073 # and add multilib dir if necessary.
2074 lt_tmp_lt_search_path_spec=
2075 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2076 for lt_sys_path in $lt_search_path_spec; do
2077 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2078 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2079 else
2080 test -d "$lt_sys_path" && \
2081 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2082 fi
2083 done
2084 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2085 BEGIN {RS=" "; FS="/|\n";} {
2086 lt_foo="";
2087 lt_count=0;
2088 for (lt_i = NF; lt_i > 0; lt_i--) {
2089 if ($lt_i != "" && $lt_i != ".") {
2090 if ($lt_i == "..") {
2091 lt_count++;
2092 } else {
2093 if (lt_count == 0) {
2094 lt_foo="/" $lt_i lt_foo;
2095 } else {
2096 lt_count--;
2097 }
2098 }
2099 }
2100 }
2101 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2102 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2103 }'`
2104 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2105 else
2106 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2107 fi])
2108 library_names_spec=
2109 libname_spec='lib$name'
2110 soname_spec=
2111 shrext_cmds=".so"
2112 postinstall_cmds=
2113 postuninstall_cmds=
2114 finish_cmds=
2115 finish_eval=
2116 shlibpath_var=
2117 shlibpath_overrides_runpath=unknown
2118 version_type=none
2119 dynamic_linker="$host_os ld.so"
2120 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2121 need_lib_prefix=unknown
2122 hardcode_into_libs=no
2123
2124 # when you set need_version to no, make sure it does not cause -set_version
2125 # flags to be left without arguments
2126 need_version=unknown
2127
2128 case $host_os in
2129 aix3*)
2130 version_type=linux
2131 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2132 shlibpath_var=LIBPATH
2133
2134 # AIX 3 has no versioning support, so we append a major version to the name.
2135 soname_spec='${libname}${release}${shared_ext}$major'
2136 ;;
2137
2138 aix[[4-9]]*)
2139 version_type=linux
2140 need_lib_prefix=no
2141 need_version=no
2142 hardcode_into_libs=yes
2143 if test "$host_cpu" = ia64; then
2144 # AIX 5 supports IA64
2145 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2146 shlibpath_var=LD_LIBRARY_PATH
2147 else
2148 # With GCC up to 2.95.x, collect2 would create an import file
2149 # for dependence libraries. The import file would start with
2150 # the line `#! .'. This would cause the generated library to
2151 # depend on `.', always an invalid library. This was fixed in
2152 # development snapshots of GCC prior to 3.0.
2153 case $host_os in
2154 aix4 | aix4.[[01]] | aix4.[[01]].*)
2155 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2156 echo ' yes '
2157 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2158 :
2159 else
2160 can_build_shared=no
2161 fi
2162 ;;
2163 esac
2164 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2165 # soname into executable. Probably we can add versioning support to
2166 # collect2, so additional links can be useful in future.
2167 if test "$aix_use_runtimelinking" = yes; then
2168 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2169 # instead of lib<name>.a to let people know that these are not
2170 # typical AIX shared libraries.
2171 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2172 else
2173 # We preserve .a as extension for shared libraries through AIX4.2
2174 # and later when we are not doing run time linking.
2175 library_names_spec='${libname}${release}.a $libname.a'
2176 soname_spec='${libname}${release}${shared_ext}$major'
2177 fi
2178 shlibpath_var=LIBPATH
2179 fi
2180 ;;
2181
2182 amigaos*)
2183 case $host_cpu in
2184 powerpc)
2185 # Since July 2007 AmigaOS4 officially supports .so libraries.
2186 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2187 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2188 ;;
2189 m68k)
2190 library_names_spec='$libname.ixlibrary $libname.a'
2191 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2192 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'
2193 ;;
2194 esac
2195 ;;
2196
2197 beos*)
2198 library_names_spec='${libname}${shared_ext}'
2199 dynamic_linker="$host_os ld.so"
2200 shlibpath_var=LIBRARY_PATH
2201 ;;
2202
2203 bsdi[[45]]*)
2204 version_type=linux
2205 need_version=no
2206 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2207 soname_spec='${libname}${release}${shared_ext}$major'
2208 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2209 shlibpath_var=LD_LIBRARY_PATH
2210 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2211 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2212 # the default ld.so.conf also contains /usr/contrib/lib and
2213 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2214 # libtool to hard-code these into programs
2215 ;;
2216
2217 cygwin* | mingw* | pw32* | cegcc*)
2218 version_type=windows
2219 shrext_cmds=".dll"
2220 need_version=no
2221 need_lib_prefix=no
2222
2223 case $GCC,$host_os in
2224 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2225 library_names_spec='$libname.dll.a'
2226 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2227 postinstall_cmds='base_file=`basename \${file}`~
2228 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2229 dldir=$destdir/`dirname \$dlpath`~
2230 test -d \$dldir || mkdir -p \$dldir~
2231 $install_prog $dir/$dlname \$dldir/$dlname~
2232 chmod a+x \$dldir/$dlname~
2233 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2234 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2235 fi'
2236 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2237 dlpath=$dir/\$dldll~
2238 $RM \$dlpath'
2239 shlibpath_overrides_runpath=yes
2240
2241 case $host_os in
2242 cygwin*)
2243 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2244 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2245 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2246 ;;
2247 mingw* | cegcc*)
2248 # MinGW DLLs use traditional 'lib' prefix
2249 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2250 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2251 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2252 # It is most probably a Windows format PATH printed by
2253 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2254 # path with ; separators, and with drive letters. We can handle the
2255 # drive letters (cygwin fileutils understands them), so leave them,
2256 # especially as we might pass files found there to a mingw objdump,
2257 # which wouldn't understand a cygwinified path. Ahh.
2258 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2259 else
2260 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2261 fi
2262 ;;
2263 pw32*)
2264 # pw32 DLLs use 'pw' prefix rather than 'lib'
2265 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2266 ;;
2267 esac
2268 ;;
2269
2270 *)
2271 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2272 ;;
2273 esac
2274 dynamic_linker='Win32 ld.exe'
2275 # FIXME: first we should search . and the directory the executable is in
2276 shlibpath_var=PATH
2277 ;;
2278
2279 darwin* | rhapsody*)
2280 dynamic_linker="$host_os dyld"
2281 version_type=darwin
2282 need_lib_prefix=no
2283 need_version=no
2284 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2285 soname_spec='${libname}${release}${major}$shared_ext'
2286 shlibpath_overrides_runpath=yes
2287 shlibpath_var=DYLD_LIBRARY_PATH
2288 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2289 m4_if([$1], [],[
2290 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2291 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2292 ;;
2293
2294 dgux*)
2295 version_type=linux
2296 need_lib_prefix=no
2297 need_version=no
2298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2299 soname_spec='${libname}${release}${shared_ext}$major'
2300 shlibpath_var=LD_LIBRARY_PATH
2301 ;;
2302
2303 freebsd1*)
2304 dynamic_linker=no
2305 ;;
2306
2307 freebsd* | dragonfly*)
2308 # DragonFly does not have aout. When/if they implement a new
2309 # versioning mechanism, adjust this.
2310 if test -x /usr/bin/objformat; then
2311 objformat=`/usr/bin/objformat`
2312 else
2313 case $host_os in
2314 freebsd[[123]]*) objformat=aout ;;
2315 *) objformat=elf ;;
2316 esac
2317 fi
2318 version_type=freebsd-$objformat
2319 case $version_type in
2320 freebsd-elf*)
2321 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2322 need_version=no
2323 need_lib_prefix=no
2324 ;;
2325 freebsd-*)
2326 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2327 need_version=yes
2328 ;;
2329 esac
2330 shlibpath_var=LD_LIBRARY_PATH
2331 case $host_os in
2332 freebsd2*)
2333 shlibpath_overrides_runpath=yes
2334 ;;
2335 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2336 shlibpath_overrides_runpath=yes
2337 hardcode_into_libs=yes
2338 ;;
2339 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2340 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2341 shlibpath_overrides_runpath=no
2342 hardcode_into_libs=yes
2343 ;;
2344 *) # from 4.6 on, and DragonFly
2345 shlibpath_overrides_runpath=yes
2346 hardcode_into_libs=yes
2347 ;;
2348 esac
2349 ;;
2350
2351 gnu*)
2352 version_type=linux
2353 need_lib_prefix=no
2354 need_version=no
2355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2356 soname_spec='${libname}${release}${shared_ext}$major'
2357 shlibpath_var=LD_LIBRARY_PATH
2358 hardcode_into_libs=yes
2359 ;;
2360
2361 hpux9* | hpux10* | hpux11*)
2362 # Give a soname corresponding to the major version so that dld.sl refuses to
2363 # link against other versions.
2364 version_type=sunos
2365 need_lib_prefix=no
2366 need_version=no
2367 case $host_cpu in
2368 ia64*)
2369 shrext_cmds='.so'
2370 hardcode_into_libs=yes
2371 dynamic_linker="$host_os dld.so"
2372 shlibpath_var=LD_LIBRARY_PATH
2373 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2374 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2375 soname_spec='${libname}${release}${shared_ext}$major'
2376 if test "X$HPUX_IA64_MODE" = X32; then
2377 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2378 else
2379 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2380 fi
2381 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2382 ;;
2383 hppa*64*)
2384 shrext_cmds='.sl'
2385 hardcode_into_libs=yes
2386 dynamic_linker="$host_os dld.sl"
2387 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2388 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2389 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2390 soname_spec='${libname}${release}${shared_ext}$major'
2391 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2392 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2393 ;;
2394 *)
2395 shrext_cmds='.sl'
2396 dynamic_linker="$host_os dld.sl"
2397 shlibpath_var=SHLIB_PATH
2398 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2399 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2400 soname_spec='${libname}${release}${shared_ext}$major'
2401 ;;
2402 esac
2403 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2404 postinstall_cmds='chmod 555 $lib'
2405 ;;
2406
2407 interix[[3-9]]*)
2408 version_type=linux
2409 need_lib_prefix=no
2410 need_version=no
2411 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2412 soname_spec='${libname}${release}${shared_ext}$major'
2413 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2414 shlibpath_var=LD_LIBRARY_PATH
2415 shlibpath_overrides_runpath=no
2416 hardcode_into_libs=yes
2417 ;;
2418
2419 irix5* | irix6* | nonstopux*)
2420 case $host_os in
2421 nonstopux*) version_type=nonstopux ;;
2422 *)
2423 if test "$lt_cv_prog_gnu_ld" = yes; then
2424 version_type=linux
2425 else
2426 version_type=irix
2427 fi ;;
2428 esac
2429 need_lib_prefix=no
2430 need_version=no
2431 soname_spec='${libname}${release}${shared_ext}$major'
2432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2433 case $host_os in
2434 irix5* | nonstopux*)
2435 libsuff= shlibsuff=
2436 ;;
2437 *)
2438 case $LD in # libtool.m4 will add one of these switches to LD
2439 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2440 libsuff= shlibsuff= libmagic=32-bit;;
2441 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2442 libsuff=32 shlibsuff=N32 libmagic=N32;;
2443 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2444 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2445 *) libsuff= shlibsuff= libmagic=never-match;;
2446 esac
2447 ;;
2448 esac
2449 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2450 shlibpath_overrides_runpath=no
2451 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2452 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2453 hardcode_into_libs=yes
2454 ;;
2455
2456 # No shared lib support for Linux oldld, aout, or coff.
2457 linux*oldld* | linux*aout* | linux*coff*)
2458 dynamic_linker=no
2459 ;;
2460
2461 # This must be Linux ELF.
2462 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2463 version_type=linux
2464 need_lib_prefix=no
2465 need_version=no
2466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2467 soname_spec='${libname}${release}${shared_ext}$major'
2468 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2469 shlibpath_var=LD_LIBRARY_PATH
2470 shlibpath_overrides_runpath=no
2471 # Some binutils ld are patched to set DT_RUNPATH
2472 save_LDFLAGS=$LDFLAGS
2473 save_libdir=$libdir
2474 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2475 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2476 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2477 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2478 [shlibpath_overrides_runpath=yes])])
2479 LDFLAGS=$save_LDFLAGS
2480 libdir=$save_libdir
2481
2482 # This implies no fast_install, which is unacceptable.
2483 # Some rework will be needed to allow for fast_install
2484 # before this can be enabled.
2485 hardcode_into_libs=yes
2486
2487 # Append ld.so.conf contents to the search path
2488 if test -f /etc/ld.so.conf; then
2489 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2490 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2491 fi
2492
2493 # We used to test for /lib/ld.so.1 and disable shared libraries on
2494 # powerpc, because MkLinux only supported shared libraries with the
2495 # GNU dynamic linker. Since this was broken with cross compilers,
2496 # most powerpc-linux boxes support dynamic linking these days and
2497 # people can always --disable-shared, the test was removed, and we
2498 # assume the GNU/Linux dynamic linker is in use.
2499 dynamic_linker='GNU/Linux ld.so'
2500 ;;
2501
2502 netbsdelf*-gnu)
2503 version_type=linux
2504 need_lib_prefix=no
2505 need_version=no
2506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2507 soname_spec='${libname}${release}${shared_ext}$major'
2508 shlibpath_var=LD_LIBRARY_PATH
2509 shlibpath_overrides_runpath=no
2510 hardcode_into_libs=yes
2511 dynamic_linker='NetBSD ld.elf_so'
2512 ;;
2513
2514 netbsd*)
2515 version_type=sunos
2516 need_lib_prefix=no
2517 need_version=no
2518 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2520 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2521 dynamic_linker='NetBSD (a.out) ld.so'
2522 else
2523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2524 soname_spec='${libname}${release}${shared_ext}$major'
2525 dynamic_linker='NetBSD ld.elf_so'
2526 fi
2527 shlibpath_var=LD_LIBRARY_PATH
2528 shlibpath_overrides_runpath=yes
2529 hardcode_into_libs=yes
2530 ;;
2531
2532 newsos6)
2533 version_type=linux
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2535 shlibpath_var=LD_LIBRARY_PATH
2536 shlibpath_overrides_runpath=yes
2537 ;;
2538
2539 *nto* | *qnx*)
2540 version_type=qnx
2541 need_lib_prefix=no
2542 need_version=no
2543 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2544 soname_spec='${libname}${release}${shared_ext}$major'
2545 shlibpath_var=LD_LIBRARY_PATH
2546 shlibpath_overrides_runpath=no
2547 hardcode_into_libs=yes
2548 dynamic_linker='ldqnx.so'
2549 ;;
2550
2551 openbsd*)
2552 version_type=sunos
2553 sys_lib_dlsearch_path_spec="/usr/lib"
2554 need_lib_prefix=no
2555 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2556 case $host_os in
2557 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2558 *) need_version=no ;;
2559 esac
2560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2561 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2562 shlibpath_var=LD_LIBRARY_PATH
2563 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2564 case $host_os in
2565 openbsd2.[[89]] | openbsd2.[[89]].*)
2566 shlibpath_overrides_runpath=no
2567 ;;
2568 *)
2569 shlibpath_overrides_runpath=yes
2570 ;;
2571 esac
2572 else
2573 shlibpath_overrides_runpath=yes
2574 fi
2575 ;;
2576
2577 os2*)
2578 libname_spec='$name'
2579 shrext_cmds=".dll"
2580 need_lib_prefix=no
2581 library_names_spec='$libname${shared_ext} $libname.a'
2582 dynamic_linker='OS/2 ld.exe'
2583 shlibpath_var=LIBPATH
2584 ;;
2585
2586 osf3* | osf4* | osf5*)
2587 version_type=osf
2588 need_lib_prefix=no
2589 need_version=no
2590 soname_spec='${libname}${release}${shared_ext}$major'
2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2592 shlibpath_var=LD_LIBRARY_PATH
2593 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2594 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2595 ;;
2596
2597 rdos*)
2598 dynamic_linker=no
2599 ;;
2600
2601 solaris*)
2602 version_type=linux
2603 need_lib_prefix=no
2604 need_version=no
2605 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2606 soname_spec='${libname}${release}${shared_ext}$major'
2607 shlibpath_var=LD_LIBRARY_PATH
2608 shlibpath_overrides_runpath=yes
2609 hardcode_into_libs=yes
2610 # ldd complains unless libraries are executable
2611 postinstall_cmds='chmod +x $lib'
2612 ;;
2613
2614 sunos4*)
2615 version_type=sunos
2616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2617 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2618 shlibpath_var=LD_LIBRARY_PATH
2619 shlibpath_overrides_runpath=yes
2620 if test "$with_gnu_ld" = yes; then
2621 need_lib_prefix=no
2622 fi
2623 need_version=yes
2624 ;;
2625
2626 sysv4 | sysv4.3*)
2627 version_type=linux
2628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2629 soname_spec='${libname}${release}${shared_ext}$major'
2630 shlibpath_var=LD_LIBRARY_PATH
2631 case $host_vendor in
2632 sni)
2633 shlibpath_overrides_runpath=no
2634 need_lib_prefix=no
2635 runpath_var=LD_RUN_PATH
2636 ;;
2637 siemens)
2638 need_lib_prefix=no
2639 ;;
2640 motorola)
2641 need_lib_prefix=no
2642 need_version=no
2643 shlibpath_overrides_runpath=no
2644 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2645 ;;
2646 esac
2647 ;;
2648
2649 sysv4*MP*)
2650 if test -d /usr/nec ;then
2651 version_type=linux
2652 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2653 soname_spec='$libname${shared_ext}.$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 fi
2656 ;;
2657
2658 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2659 version_type=freebsd-elf
2660 need_lib_prefix=no
2661 need_version=no
2662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2663 soname_spec='${libname}${release}${shared_ext}$major'
2664 shlibpath_var=LD_LIBRARY_PATH
2665 shlibpath_overrides_runpath=yes
2666 hardcode_into_libs=yes
2667 if test "$with_gnu_ld" = yes; then
2668 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2669 else
2670 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2671 case $host_os in
2672 sco3.2v5*)
2673 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2674 ;;
2675 esac
2676 fi
2677 sys_lib_dlsearch_path_spec='/usr/lib'
2678 ;;
2679
2680 tpf*)
2681 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2682 version_type=linux
2683 need_lib_prefix=no
2684 need_version=no
2685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686 shlibpath_var=LD_LIBRARY_PATH
2687 shlibpath_overrides_runpath=no
2688 hardcode_into_libs=yes
2689 ;;
2690
2691 uts4*)
2692 version_type=linux
2693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2694 soname_spec='${libname}${release}${shared_ext}$major'
2695 shlibpath_var=LD_LIBRARY_PATH
2696 ;;
2697
2698 *)
2699 dynamic_linker=no
2700 ;;
2701 esac
2702 AC_MSG_RESULT([$dynamic_linker])
2703 test "$dynamic_linker" = no && can_build_shared=no
2704
2705 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2706 if test "$GCC" = yes; then
2707 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2708 fi
2709
2710 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2711 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2712 fi
2713 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2714 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2715 fi
2716
2717 _LT_DECL([], [variables_saved_for_relink], [1],
2718 [Variables whose values should be saved in libtool wrapper scripts and
2719 restored at link time])
2720 _LT_DECL([], [need_lib_prefix], [0],
2721 [Do we need the "lib" prefix for modules?])
2722 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2723 _LT_DECL([], [version_type], [0], [Library versioning type])
2724 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2725 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2726 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2727 [Is shlibpath searched before the hard-coded library search path?])
2728 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2729 _LT_DECL([], [library_names_spec], [1],
2730 [[List of archive names. First name is the real one, the rest are links.
2731 The last name is the one that the linker finds with -lNAME]])
2732 _LT_DECL([], [soname_spec], [1],
2733 [[The coded name of the library, if different from the real name]])
2734 _LT_DECL([], [postinstall_cmds], [2],
2735 [Command to use after installation of a shared archive])
2736 _LT_DECL([], [postuninstall_cmds], [2],
2737 [Command to use after uninstallation of a shared archive])
2738 _LT_DECL([], [finish_cmds], [2],
2739 [Commands used to finish a libtool library installation in a directory])
2740 _LT_DECL([], [finish_eval], [1],
2741 [[As "finish_cmds", except a single script fragment to be evaled but
2742 not shown]])
2743 _LT_DECL([], [hardcode_into_libs], [0],
2744 [Whether we should hardcode library paths into libraries])
2745 _LT_DECL([], [sys_lib_search_path_spec], [2],
2746 [Compile-time system search path for libraries])
2747 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2748 [Run-time system search path for libraries])
2749 ])# _LT_SYS_DYNAMIC_LINKER
2750
2751
2752 # _LT_PATH_TOOL_PREFIX(TOOL)
2753 # --------------------------
2754 # find a file program which can recognize shared library
2755 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2756 [m4_require([_LT_DECL_EGREP])dnl
2757 AC_MSG_CHECKING([for $1])
2758 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2759 [case $MAGIC_CMD in
2760 [[\\/*] | ?:[\\/]*])
2761 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2762 ;;
2763 *)
2764 lt_save_MAGIC_CMD="$MAGIC_CMD"
2765 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2766 dnl $ac_dummy forces splitting on constant user-supplied paths.
2767 dnl POSIX.2 word splitting is done only on the output of word expansions,
2768 dnl not every word. This closes a longstanding sh security hole.
2769 ac_dummy="m4_if([$2], , $PATH, [$2])"
2770 for ac_dir in $ac_dummy; do
2771 IFS="$lt_save_ifs"
2772 test -z "$ac_dir" && ac_dir=.
2773 if test -f $ac_dir/$1; then
2774 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2775 if test -n "$file_magic_test_file"; then
2776 case $deplibs_check_method in
2777 "file_magic "*)
2778 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2779 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2780 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2781 $EGREP "$file_magic_regex" > /dev/null; then
2782 :
2783 else
2784 cat <<_LT_EOF 1>&2
2785
2786 *** Warning: the command libtool uses to detect shared libraries,
2787 *** $file_magic_cmd, produces output that libtool cannot recognize.
2788 *** The result is that libtool may fail to recognize shared libraries
2789 *** as such. This will affect the creation of libtool libraries that
2790 *** depend on shared libraries, but programs linked with such libtool
2791 *** libraries will work regardless of this problem. Nevertheless, you
2792 *** may want to report the problem to your system manager and/or to
2793 *** bug-libtool@gnu.org
2794
2795 _LT_EOF
2796 fi ;;
2797 esac
2798 fi
2799 break
2800 fi
2801 done
2802 IFS="$lt_save_ifs"
2803 MAGIC_CMD="$lt_save_MAGIC_CMD"
2804 ;;
2805 esac])
2806 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2807 if test -n "$MAGIC_CMD"; then
2808 AC_MSG_RESULT($MAGIC_CMD)
2809 else
2810 AC_MSG_RESULT(no)
2811 fi
2812 _LT_DECL([], [MAGIC_CMD], [0],
2813 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2814 ])# _LT_PATH_TOOL_PREFIX
2815
2816 # Old name:
2817 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2818 dnl aclocal-1.4 backwards compatibility:
2819 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2820
2821
2822 # _LT_PATH_MAGIC
2823 # --------------
2824 # find a file program which can recognize a shared library
2825 m4_defun([_LT_PATH_MAGIC],
2826 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2827 if test -z "$lt_cv_path_MAGIC_CMD"; then
2828 if test -n "$ac_tool_prefix"; then
2829 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2830 else
2831 MAGIC_CMD=:
2832 fi
2833 fi
2834 ])# _LT_PATH_MAGIC
2835
2836
2837 # LT_PATH_LD
2838 # ----------
2839 # find the pathname to the GNU or non-GNU linker
2840 AC_DEFUN([LT_PATH_LD],
2841 [AC_REQUIRE([AC_PROG_CC])dnl
2842 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2843 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2844 m4_require([_LT_DECL_SED])dnl
2845 m4_require([_LT_DECL_EGREP])dnl
2846
2847 AC_ARG_WITH([gnu-ld],
2848 [AS_HELP_STRING([--with-gnu-ld],
2849 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2850 [test "$withval" = no || with_gnu_ld=yes],
2851 [with_gnu_ld=no])dnl
2852
2853 ac_prog=ld
2854 if test "$GCC" = yes; then
2855 # Check if gcc -print-prog-name=ld gives a path.
2856 AC_MSG_CHECKING([for ld used by $CC])
2857 case $host in
2858 *-*-mingw*)
2859 # gcc leaves a trailing carriage return which upsets mingw
2860 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2861 *)
2862 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2863 esac
2864 case $ac_prog in
2865 # Accept absolute paths.
2866 [[\\/]]* | ?:[[\\/]]*)
2867 re_direlt='/[[^/]][[^/]]*/\.\./'
2868 # Canonicalize the pathname of ld
2869 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2870 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2871 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2872 done
2873 test -z "$LD" && LD="$ac_prog"
2874 ;;
2875 "")
2876 # If it fails, then pretend we aren't using GCC.
2877 ac_prog=ld
2878 ;;
2879 *)
2880 # If it is relative, then search for the first ld in PATH.
2881 with_gnu_ld=unknown
2882 ;;
2883 esac
2884 elif test "$with_gnu_ld" = yes; then
2885 AC_MSG_CHECKING([for GNU ld])
2886 else
2887 AC_MSG_CHECKING([for non-GNU ld])
2888 fi
2889 AC_CACHE_VAL(lt_cv_path_LD,
2890 [if test -z "$LD"; then
2891 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2892 for ac_dir in $PATH; do
2893 IFS="$lt_save_ifs"
2894 test -z "$ac_dir" && ac_dir=.
2895 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2896 lt_cv_path_LD="$ac_dir/$ac_prog"
2897 # Check to see if the program is GNU ld. I'd rather use --version,
2898 # but apparently some variants of GNU ld only accept -v.
2899 # Break only if it was the GNU/non-GNU ld that we prefer.
2900 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2901 *GNU* | *'with BFD'*)
2902 test "$with_gnu_ld" != no && break
2903 ;;
2904 *)
2905 test "$with_gnu_ld" != yes && break
2906 ;;
2907 esac
2908 fi
2909 done
2910 IFS="$lt_save_ifs"
2911 else
2912 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2913 fi])
2914 LD="$lt_cv_path_LD"
2915 if test -n "$LD"; then
2916 AC_MSG_RESULT($LD)
2917 else
2918 AC_MSG_RESULT(no)
2919 fi
2920 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2921 _LT_PATH_LD_GNU
2922 AC_SUBST([LD])
2923
2924 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2925 ])# LT_PATH_LD
2926
2927 # Old names:
2928 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2929 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2930 dnl aclocal-1.4 backwards compatibility:
2931 dnl AC_DEFUN([AM_PROG_LD], [])
2932 dnl AC_DEFUN([AC_PROG_LD], [])
2933
2934
2935 # _LT_PATH_LD_GNU
2936 #- --------------
2937 m4_defun([_LT_PATH_LD_GNU],
2938 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2939 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2940 case `$LD -v 2>&1 </dev/null` in
2941 *GNU* | *'with BFD'*)
2942 lt_cv_prog_gnu_ld=yes
2943 ;;
2944 *)
2945 lt_cv_prog_gnu_ld=no
2946 ;;
2947 esac])
2948 with_gnu_ld=$lt_cv_prog_gnu_ld
2949 ])# _LT_PATH_LD_GNU
2950
2951
2952 # _LT_CMD_RELOAD
2953 # --------------
2954 # find reload flag for linker
2955 # -- PORTME Some linkers may need a different reload flag.
2956 m4_defun([_LT_CMD_RELOAD],
2957 [AC_CACHE_CHECK([for $LD option to reload object files],
2958 lt_cv_ld_reload_flag,
2959 [lt_cv_ld_reload_flag='-r'])
2960 reload_flag=$lt_cv_ld_reload_flag
2961 case $reload_flag in
2962 "" | " "*) ;;
2963 *) reload_flag=" $reload_flag" ;;
2964 esac
2965 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2966 case $host_os in
2967 darwin*)
2968 if test "$GCC" = yes; then
2969 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2970 else
2971 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2972 fi
2973 ;;
2974 esac
2975 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2976 _LT_DECL([], [reload_cmds], [2])dnl
2977 ])# _LT_CMD_RELOAD
2978
2979
2980 # _LT_CHECK_MAGIC_METHOD
2981 # ----------------------
2982 # how to check for library dependencies
2983 # -- PORTME fill in with the dynamic library characteristics
2984 m4_defun([_LT_CHECK_MAGIC_METHOD],
2985 [m4_require([_LT_DECL_EGREP])
2986 m4_require([_LT_DECL_OBJDUMP])
2987 AC_CACHE_CHECK([how to recognize dependent libraries],
2988 lt_cv_deplibs_check_method,
2989 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2990 lt_cv_file_magic_test_file=
2991 lt_cv_deplibs_check_method='unknown'
2992 # Need to set the preceding variable on all platforms that support
2993 # interlibrary dependencies.
2994 # 'none' -- dependencies not supported.
2995 # `unknown' -- same as none, but documents that we really don't know.
2996 # 'pass_all' -- all dependencies passed with no checks.
2997 # 'test_compile' -- check by making test program.
2998 # 'file_magic [[regex]]' -- check by looking for files in library path
2999 # which responds to the $file_magic_cmd with a given extended regex.
3000 # If you have `file' or equivalent on your system and you're not sure
3001 # whether `pass_all' will *always* work, you probably want this one.
3002
3003 case $host_os in
3004 aix[[4-9]]*)
3005 lt_cv_deplibs_check_method=pass_all
3006 ;;
3007
3008 beos*)
3009 lt_cv_deplibs_check_method=pass_all
3010 ;;
3011
3012 bsdi[[45]]*)
3013 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3014 lt_cv_file_magic_cmd='/usr/bin/file -L'
3015 lt_cv_file_magic_test_file=/shlib/libc.so
3016 ;;
3017
3018 cygwin*)
3019 # func_win32_libid is a shell function defined in ltmain.sh
3020 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3021 lt_cv_file_magic_cmd='func_win32_libid'
3022 ;;
3023
3024 mingw* | pw32*)
3025 # Base MSYS/MinGW do not provide the 'file' command needed by
3026 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3027 # unless we find 'file', for example because we are cross-compiling.
3028 if ( file / ) >/dev/null 2>&1; then
3029 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3030 lt_cv_file_magic_cmd='func_win32_libid'
3031 else
3032 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3033 lt_cv_file_magic_cmd='$OBJDUMP -f'
3034 fi
3035 ;;
3036
3037 cegcc)
3038 # use the weaker test based on 'objdump'. See mingw*.
3039 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3040 lt_cv_file_magic_cmd='$OBJDUMP -f'
3041 ;;
3042
3043 darwin* | rhapsody*)
3044 lt_cv_deplibs_check_method=pass_all
3045 ;;
3046
3047 freebsd* | dragonfly*)
3048 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3049 case $host_cpu in
3050 i*86 )
3051 # Not sure whether the presence of OpenBSD here was a mistake.
3052 # Let's accept both of them until this is cleared up.
3053 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3054 lt_cv_file_magic_cmd=/usr/bin/file
3055 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3056 ;;
3057 esac
3058 else
3059 lt_cv_deplibs_check_method=pass_all
3060 fi
3061 ;;
3062
3063 gnu*)
3064 lt_cv_deplibs_check_method=pass_all
3065 ;;
3066
3067 hpux10.20* | hpux11*)
3068 lt_cv_file_magic_cmd=/usr/bin/file
3069 case $host_cpu in
3070 ia64*)
3071 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3072 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3073 ;;
3074 hppa*64*)
3075 [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]']
3076 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3077 ;;
3078 *)
3079 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3080 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3081 ;;
3082 esac
3083 ;;
3084
3085 interix[[3-9]]*)
3086 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3087 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3088 ;;
3089
3090 irix5* | irix6* | nonstopux*)
3091 case $LD in
3092 *-32|*"-32 ") libmagic=32-bit;;
3093 *-n32|*"-n32 ") libmagic=N32;;
3094 *-64|*"-64 ") libmagic=64-bit;;
3095 *) libmagic=never-match;;
3096 esac
3097 lt_cv_deplibs_check_method=pass_all
3098 ;;
3099
3100 # This must be Linux ELF.
3101 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3102 lt_cv_deplibs_check_method=pass_all
3103 ;;
3104
3105 netbsd* | netbsdelf*-gnu)
3106 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3107 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3108 else
3109 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3110 fi
3111 ;;
3112
3113 newos6*)
3114 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3115 lt_cv_file_magic_cmd=/usr/bin/file
3116 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3117 ;;
3118
3119 *nto* | *qnx*)
3120 lt_cv_deplibs_check_method=pass_all
3121 ;;
3122
3123 openbsd*)
3124 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3125 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3126 else
3127 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3128 fi
3129 ;;
3130
3131 osf3* | osf4* | osf5*)
3132 lt_cv_deplibs_check_method=pass_all
3133 ;;
3134
3135 rdos*)
3136 lt_cv_deplibs_check_method=pass_all
3137 ;;
3138
3139 solaris*)
3140 lt_cv_deplibs_check_method=pass_all
3141 ;;
3142
3143 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3144 lt_cv_deplibs_check_method=pass_all
3145 ;;
3146
3147 sysv4 | sysv4.3*)
3148 case $host_vendor in
3149 motorola)
3150 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]]'
3151 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3152 ;;
3153 ncr)
3154 lt_cv_deplibs_check_method=pass_all
3155 ;;
3156 sequent)
3157 lt_cv_file_magic_cmd='/bin/file'
3158 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3159 ;;
3160 sni)
3161 lt_cv_file_magic_cmd='/bin/file'
3162 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3163 lt_cv_file_magic_test_file=/lib/libc.so
3164 ;;
3165 siemens)
3166 lt_cv_deplibs_check_method=pass_all
3167 ;;
3168 pc)
3169 lt_cv_deplibs_check_method=pass_all
3170 ;;
3171 esac
3172 ;;
3173
3174 tpf*)
3175 lt_cv_deplibs_check_method=pass_all
3176 ;;
3177 esac
3178 ])
3179 file_magic_cmd=$lt_cv_file_magic_cmd
3180 deplibs_check_method=$lt_cv_deplibs_check_method
3181 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3182
3183 _LT_DECL([], [deplibs_check_method], [1],
3184 [Method to check whether dependent libraries are shared objects])
3185 _LT_DECL([], [file_magic_cmd], [1],
3186 [Command to use when deplibs_check_method == "file_magic"])
3187 ])# _LT_CHECK_MAGIC_METHOD
3188
3189
3190 # LT_PATH_NM
3191 # ----------
3192 # find the pathname to a BSD- or MS-compatible name lister
3193 AC_DEFUN([LT_PATH_NM],
3194 [AC_REQUIRE([AC_PROG_CC])dnl
3195 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3196 [if test -n "$NM"; then
3197 # Let the user override the test.
3198 lt_cv_path_NM="$NM"
3199 else
3200 lt_nm_to_check="${ac_tool_prefix}nm"
3201 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3202 lt_nm_to_check="$lt_nm_to_check nm"
3203 fi
3204 for lt_tmp_nm in $lt_nm_to_check; do
3205 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3206 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3207 IFS="$lt_save_ifs"
3208 test -z "$ac_dir" && ac_dir=.
3209 tmp_nm="$ac_dir/$lt_tmp_nm"
3210 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3211 # Check to see if the nm accepts a BSD-compat flag.
3212 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3213 # nm: unknown option "B" ignored
3214 # Tru64's nm complains that /dev/null is an invalid object file
3215 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3216 */dev/null* | *'Invalid file or object type'*)
3217 lt_cv_path_NM="$tmp_nm -B"
3218 break
3219 ;;
3220 *)
3221 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3222 */dev/null*)
3223 lt_cv_path_NM="$tmp_nm -p"
3224 break
3225 ;;
3226 *)
3227 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3228 continue # so that we can try to find one that supports BSD flags
3229 ;;
3230 esac
3231 ;;
3232 esac
3233 fi
3234 done
3235 IFS="$lt_save_ifs"
3236 done
3237 : ${lt_cv_path_NM=no}
3238 fi])
3239 if test "$lt_cv_path_NM" != "no"; then
3240 NM="$lt_cv_path_NM"
3241 else
3242 # Didn't find any BSD compatible name lister, look for dumpbin.
3243 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3244 AC_SUBST([DUMPBIN])
3245 if test "$DUMPBIN" != ":"; then
3246 NM="$DUMPBIN"
3247 fi
3248 fi
3249 test -z "$NM" && NM=nm
3250 AC_SUBST([NM])
3251 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3252
3253 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3254 [lt_cv_nm_interface="BSD nm"
3255 echo "int some_variable = 0;" > conftest.$ac_ext
3256 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3257 (eval "$ac_compile" 2>conftest.err)
3258 cat conftest.err >&AS_MESSAGE_LOG_FD
3259 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3260 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3261 cat conftest.err >&AS_MESSAGE_LOG_FD
3262 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3263 cat conftest.out >&AS_MESSAGE_LOG_FD
3264 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3265 lt_cv_nm_interface="MS dumpbin"
3266 fi
3267 rm -f conftest*])
3268 ])# LT_PATH_NM
3269
3270 # Old names:
3271 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3272 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3273 dnl aclocal-1.4 backwards compatibility:
3274 dnl AC_DEFUN([AM_PROG_NM], [])
3275 dnl AC_DEFUN([AC_PROG_NM], [])
3276
3277
3278 # LT_LIB_M
3279 # --------
3280 # check for math library
3281 AC_DEFUN([LT_LIB_M],
3282 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3283 LIBM=
3284 case $host in
3285 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3286 # These system don't have libm, or don't need it
3287 ;;
3288 *-ncr-sysv4.3*)
3289 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3290 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3291 ;;
3292 *)
3293 AC_CHECK_LIB(m, cos, LIBM="-lm")
3294 ;;
3295 esac
3296 AC_SUBST([LIBM])
3297 ])# LT_LIB_M
3298
3299 # Old name:
3300 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3301 dnl aclocal-1.4 backwards compatibility:
3302 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3303
3304
3305 # _LT_COMPILER_NO_RTTI([TAGNAME])
3306 # -------------------------------
3307 m4_defun([_LT_COMPILER_NO_RTTI],
3308 [m4_require([_LT_TAG_COMPILER])dnl
3309
3310 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3311
3312 if test "$GCC" = yes; then
3313 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3314
3315 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3316 lt_cv_prog_compiler_rtti_exceptions,
3317 [-fno-rtti -fno-exceptions], [],
3318 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3319 fi
3320 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3321 [Compiler flag to turn off builtin functions])
3322 ])# _LT_COMPILER_NO_RTTI
3323
3324
3325 # _LT_CMD_GLOBAL_SYMBOLS
3326 # ----------------------
3327 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3329 AC_REQUIRE([AC_PROG_CC])dnl
3330 AC_REQUIRE([LT_PATH_NM])dnl
3331 AC_REQUIRE([LT_PATH_LD])dnl
3332 m4_require([_LT_DECL_SED])dnl
3333 m4_require([_LT_DECL_EGREP])dnl
3334 m4_require([_LT_TAG_COMPILER])dnl
3335
3336 # Check for command to grab the raw symbol name followed by C symbol from nm.
3337 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3338 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3339 [
3340 # These are sane defaults that work on at least a few old systems.
3341 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3342
3343 # Character class describing NM global symbol codes.
3344 symcode='[[BCDEGRST]]'
3345
3346 # Regexp to match symbols that can be accessed directly from C.
3347 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3348
3349 # Define system-specific variables.
3350 case $host_os in
3351 aix*)
3352 symcode='[[BCDT]]'
3353 ;;
3354 cygwin* | mingw* | pw32* | cegcc*)
3355 symcode='[[ABCDGISTW]]'
3356 ;;
3357 hpux*)
3358 if test "$host_cpu" = ia64; then
3359 symcode='[[ABCDEGRST]]'
3360 fi
3361 ;;
3362 irix* | nonstopux*)
3363 symcode='[[BCDEGRST]]'
3364 ;;
3365 osf*)
3366 symcode='[[BCDEGQRST]]'
3367 ;;
3368 solaris*)
3369 symcode='[[BDRT]]'
3370 ;;
3371 sco3.2v5*)
3372 symcode='[[DT]]'
3373 ;;
3374 sysv4.2uw2*)
3375 symcode='[[DT]]'
3376 ;;
3377 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3378 symcode='[[ABDT]]'
3379 ;;
3380 sysv4)
3381 symcode='[[DFNSTU]]'
3382 ;;
3383 esac
3384
3385 # If we're using GNU nm, then use its standard symbol codes.
3386 case `$NM -V 2>&1` in
3387 *GNU* | *'with BFD'*)
3388 symcode='[[ABCDGIRSTW]]' ;;
3389 esac
3390
3391 # Transform an extracted symbol line into a proper C declaration.
3392 # Some systems (esp. on ia64) link data and code symbols differently,
3393 # so use this general approach.
3394 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3395
3396 # Transform an extracted symbol line into symbol name and symbol address
3397 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3398 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3399
3400 # Handle CRLF in mingw tool chain
3401 opt_cr=
3402 case $build_os in
3403 mingw*)
3404 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3405 ;;
3406 esac
3407
3408 # Try without a prefix underscore, then with it.
3409 for ac_symprfx in "" "_"; do
3410
3411 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3412 symxfrm="\\1 $ac_symprfx\\2 \\2"
3413
3414 # Write the raw and C identifiers.
3415 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3416 # Fake it for dumpbin and say T for any non-static function
3417 # and D for any global variable.
3418 # Also find C++ and __fastcall symbols from MSVC++,
3419 # which start with @ or ?.
3420 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3421 " {last_section=section; section=\$ 3};"\
3422 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3423 " \$ 0!~/External *\|/{next};"\
3424 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3425 " {if(hide[section]) next};"\
3426 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3427 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3428 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3429 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3430 " ' prfx=^$ac_symprfx]"
3431 else
3432 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3433 fi
3434
3435 # Check to see that the pipe works correctly.
3436 pipe_works=no
3437
3438 rm -f conftest*
3439 cat > conftest.$ac_ext <<_LT_EOF
3440 #ifdef __cplusplus
3441 extern "C" {
3442 #endif
3443 char nm_test_var;
3444 void nm_test_func(void);
3445 void nm_test_func(void){}
3446 #ifdef __cplusplus
3447 }
3448 #endif
3449 int main(){nm_test_var='a';nm_test_func();return(0);}
3450 _LT_EOF
3451
3452 if AC_TRY_EVAL(ac_compile); then
3453 # Now try to grab the symbols.
3454 nlist=conftest.nm
3455 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3456 # Try sorting and uniquifying the output.
3457 if sort "$nlist" | uniq > "$nlist"T; then
3458 mv -f "$nlist"T "$nlist"
3459 else
3460 rm -f "$nlist"T
3461 fi
3462
3463 # Make sure that we snagged all the symbols we need.
3464 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3465 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3466 cat <<_LT_EOF > conftest.$ac_ext
3467 #ifdef __cplusplus
3468 extern "C" {
3469 #endif
3470
3471 _LT_EOF
3472 # Now generate the symbol file.
3473 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3474
3475 cat <<_LT_EOF >> conftest.$ac_ext
3476
3477 /* The mapping between symbol names and symbols. */
3478 const struct {
3479 const char *name;
3480 void *address;
3481 }
3482 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3483 {
3484 { "@PROGRAM@", (void *) 0 },
3485 _LT_EOF
3486 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3487 cat <<\_LT_EOF >> conftest.$ac_ext
3488 {0, (void *) 0}
3489 };
3490
3491 /* This works around a problem in FreeBSD linker */
3492 #ifdef FREEBSD_WORKAROUND
3493 static const void *lt_preloaded_setup() {
3494 return lt__PROGRAM__LTX_preloaded_symbols;
3495 }
3496 #endif
3497
3498 #ifdef __cplusplus
3499 }
3500 #endif
3501 _LT_EOF
3502 # Now try linking the two files.
3503 mv conftest.$ac_objext conftstm.$ac_objext
3504 lt_save_LIBS="$LIBS"
3505 lt_save_CFLAGS="$CFLAGS"
3506 LIBS="conftstm.$ac_objext"
3507 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3508 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3509 pipe_works=yes
3510 fi
3511 LIBS="$lt_save_LIBS"
3512 CFLAGS="$lt_save_CFLAGS"
3513 else
3514 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3515 fi
3516 else
3517 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3518 fi
3519 else
3520 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3521 fi
3522 else
3523 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3524 cat conftest.$ac_ext >&5
3525 fi
3526 rm -rf conftest* conftst*
3527
3528 # Do not use the global_symbol_pipe unless it works.
3529 if test "$pipe_works" = yes; then
3530 break
3531 else
3532 lt_cv_sys_global_symbol_pipe=
3533 fi
3534 done
3535 ])
3536 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3537 lt_cv_sys_global_symbol_to_cdecl=
3538 fi
3539 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3540 AC_MSG_RESULT(failed)
3541 else
3542 AC_MSG_RESULT(ok)
3543 fi
3544
3545 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3546 [Take the output of nm and produce a listing of raw symbols and C names])
3547 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3548 [Transform the output of nm in a proper C declaration])
3549 _LT_DECL([global_symbol_to_c_name_address],
3550 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3551 [Transform the output of nm in a C name address pair])
3552 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3553 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3554 [Transform the output of nm in a C name address pair when lib prefix is needed])
3555 ]) # _LT_CMD_GLOBAL_SYMBOLS
3556
3557
3558 # _LT_COMPILER_PIC([TAGNAME])
3559 # ---------------------------
3560 m4_defun([_LT_COMPILER_PIC],
3561 [m4_require([_LT_TAG_COMPILER])dnl
3562 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3563 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3564 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3565
3566 AC_MSG_CHECKING([for $compiler option to produce PIC])
3567 m4_if([$1], [CXX], [
3568 # C++ specific cases for pic, static, wl, etc.
3569 if test "$GXX" = yes; then
3570 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3571 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3572
3573 case $host_os in
3574 aix*)
3575 # All AIX code is PIC.
3576 if test "$host_cpu" = ia64; then
3577 # AIX 5 now supports IA64 processor
3578 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3579 fi
3580 ;;
3581
3582 amigaos*)
3583 case $host_cpu in
3584 powerpc)
3585 # see comment about AmigaOS4 .so support
3586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3587 ;;
3588 m68k)
3589 # FIXME: we need at least 68020 code to build shared libraries, but
3590 # adding the `-m68020' flag to GCC prevents building anything better,
3591 # like `-m68040'.
3592 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3593 ;;
3594 esac
3595 ;;
3596
3597 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3598 # PIC is the default for these OSes.
3599 ;;
3600 mingw* | cygwin* | os2* | pw32* | cegcc*)
3601 # This hack is so that the source file can tell whether it is being
3602 # built for inclusion in a dll (and should export symbols for example).
3603 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3604 # (--disable-auto-import) libraries
3605 m4_if([$1], [GCJ], [],
3606 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3607 ;;
3608 darwin* | rhapsody*)
3609 # PIC is the default on this platform
3610 # Common symbols not allowed in MH_DYLIB files
3611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3612 ;;
3613 *djgpp*)
3614 # DJGPP does not support shared libraries at all
3615 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3616 ;;
3617 interix[[3-9]]*)
3618 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3619 # Instead, we relocate shared libraries at runtime.
3620 ;;
3621 sysv4*MP*)
3622 if test -d /usr/nec; then
3623 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3624 fi
3625 ;;
3626 hpux*)
3627 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3628 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3629 # sets the default TLS model and affects inlining.
3630 case $host_cpu in
3631 hppa*64*)
3632 ;;
3633 *)
3634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3635 ;;
3636 esac
3637 ;;
3638 *qnx* | *nto*)
3639 # QNX uses GNU C++, but need to define -shared option too, otherwise
3640 # it will coredump.
3641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3642 ;;
3643 *)
3644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3645 ;;
3646 esac
3647 else
3648 case $host_os in
3649 aix[[4-9]]*)
3650 # All AIX code is PIC.
3651 if test "$host_cpu" = ia64; then
3652 # AIX 5 now supports IA64 processor
3653 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3654 else
3655 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3656 fi
3657 ;;
3658 chorus*)
3659 case $cc_basename in
3660 cxch68*)
3661 # Green Hills C++ Compiler
3662 # _LT_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"
3663 ;;
3664 esac
3665 ;;
3666 dgux*)
3667 case $cc_basename in
3668 ec++*)
3669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3670 ;;
3671 ghcx*)
3672 # Green Hills C++ Compiler
3673 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3674 ;;
3675 *)
3676 ;;
3677 esac
3678 ;;
3679 freebsd* | dragonfly*)
3680 # FreeBSD uses GNU C++
3681 ;;
3682 hpux9* | hpux10* | hpux11*)
3683 case $cc_basename in
3684 CC*)
3685 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3686 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3687 if test "$host_cpu" != ia64; then
3688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3689 fi
3690 ;;
3691 aCC*)
3692 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3693 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3694 case $host_cpu in
3695 hppa*64*|ia64*)
3696 # +Z the default
3697 ;;
3698 *)
3699 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3700 ;;
3701 esac
3702 ;;
3703 *)
3704 ;;
3705 esac
3706 ;;
3707 interix*)
3708 # This is c89, which is MS Visual C++ (no shared libs)
3709 # Anyone wants to do a port?
3710 ;;
3711 irix5* | irix6* | nonstopux*)
3712 case $cc_basename in
3713 CC*)
3714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3716 # CC pic flag -KPIC is the default.
3717 ;;
3718 *)
3719 ;;
3720 esac
3721 ;;
3722 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3723 case $cc_basename in
3724 KCC*)
3725 # KAI C++ Compiler
3726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3728 ;;
3729 ecpc* )
3730 # old Intel C++ for x86_64 which still supported -KPIC.
3731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3733 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3734 ;;
3735 icpc* )
3736 # Intel C++, used to be incompatible with GCC.
3737 # ICC 10 doesn't accept -KPIC any more.
3738 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3739 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3740 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3741 ;;
3742 pgCC* | pgcpp*)
3743 # Portland Group C++ compiler
3744 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3747 ;;
3748 cxx*)
3749 # Compaq C++
3750 # Make sure the PIC flag is empty. It appears that all Alpha
3751 # Linux and Compaq Tru64 Unix objects are PIC.
3752 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3754 ;;
3755 xlc* | xlC*)
3756 # IBM XL 8.0 on PPC
3757 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3760 ;;
3761 *)
3762 case `$CC -V 2>&1 | sed 5q` in
3763 *Sun\ C*)
3764 # Sun C++ 5.9
3765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3767 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3768 ;;
3769 esac
3770 ;;
3771 esac
3772 ;;
3773 lynxos*)
3774 ;;
3775 m88k*)
3776 ;;
3777 mvs*)
3778 case $cc_basename in
3779 cxx*)
3780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3781 ;;
3782 *)
3783 ;;
3784 esac
3785 ;;
3786 netbsd* | netbsdelf*-gnu)
3787 ;;
3788 *qnx* | *nto*)
3789 # QNX uses GNU C++, but need to define -shared option too, otherwise
3790 # it will coredump.
3791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3792 ;;
3793 osf3* | osf4* | osf5*)
3794 case $cc_basename in
3795 KCC*)
3796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3797 ;;
3798 RCC*)
3799 # Rational C++ 2.4.1
3800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3801 ;;
3802 cxx*)
3803 # Digital/Compaq C++
3804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3805 # Make sure the PIC flag is empty. It appears that all Alpha
3806 # Linux and Compaq Tru64 Unix objects are PIC.
3807 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3809 ;;
3810 *)
3811 ;;
3812 esac
3813 ;;
3814 psos*)
3815 ;;
3816 solaris*)
3817 case $cc_basename in
3818 CC*)
3819 # Sun C++ 4.2, 5.x and Centerline C++
3820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3823 ;;
3824 gcx*)
3825 # Green Hills C++ Compiler
3826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3827 ;;
3828 *)
3829 ;;
3830 esac
3831 ;;
3832 sunos4*)
3833 case $cc_basename in
3834 CC*)
3835 # Sun C++ 4.x
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3838 ;;
3839 lcc*)
3840 # Lucid
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3842 ;;
3843 *)
3844 ;;
3845 esac
3846 ;;
3847 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3848 case $cc_basename in
3849 CC*)
3850 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3851 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3852 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3853 ;;
3854 esac
3855 ;;
3856 tandem*)
3857 case $cc_basename in
3858 NCC*)
3859 # NonStop-UX NCC 3.20
3860 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3861 ;;
3862 *)
3863 ;;
3864 esac
3865 ;;
3866 vxworks*)
3867 ;;
3868 *)
3869 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3870 ;;
3871 esac
3872 fi
3873 ],
3874 [
3875 if test "$GCC" = yes; then
3876 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3877 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3878
3879 case $host_os in
3880 aix*)
3881 # All AIX code is PIC.
3882 if test "$host_cpu" = ia64; then
3883 # AIX 5 now supports IA64 processor
3884 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3885 fi
3886 ;;
3887
3888 amigaos*)
3889 case $host_cpu in
3890 powerpc)
3891 # see comment about AmigaOS4 .so support
3892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3893 ;;
3894 m68k)
3895 # FIXME: we need at least 68020 code to build shared libraries, but
3896 # adding the `-m68020' flag to GCC prevents building anything better,
3897 # like `-m68040'.
3898 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3899 ;;
3900 esac
3901 ;;
3902
3903 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3904 # PIC is the default for these OSes.
3905 ;;
3906
3907 mingw* | cygwin* | pw32* | os2* | cegcc*)
3908 # This hack is so that the source file can tell whether it is being
3909 # built for inclusion in a dll (and should export symbols for example).
3910 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3911 # (--disable-auto-import) libraries
3912 m4_if([$1], [GCJ], [],
3913 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3914 ;;
3915
3916 darwin* | rhapsody*)
3917 # PIC is the default on this platform
3918 # Common symbols not allowed in MH_DYLIB files
3919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3920 ;;
3921
3922 hpux*)
3923 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3924 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3925 # sets the default TLS model and affects inlining.
3926 case $host_cpu in
3927 hppa*64*)
3928 # +Z the default
3929 ;;
3930 *)
3931 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3932 ;;
3933 esac
3934 ;;
3935
3936 interix[[3-9]]*)
3937 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3938 # Instead, we relocate shared libraries at runtime.
3939 ;;
3940
3941 msdosdjgpp*)
3942 # Just because we use GCC doesn't mean we suddenly get shared libraries
3943 # on systems that don't support them.
3944 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3945 enable_shared=no
3946 ;;
3947
3948 *nto* | *qnx*)
3949 # QNX uses GNU C++, but need to define -shared option too, otherwise
3950 # it will coredump.
3951 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3952 ;;
3953
3954 sysv4*MP*)
3955 if test -d /usr/nec; then
3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3957 fi
3958 ;;
3959
3960 *)
3961 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3962 ;;
3963 esac
3964 else
3965 # PORTME Check for flag to pass linker flags through the system compiler.
3966 case $host_os in
3967 aix*)
3968 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3969 if test "$host_cpu" = ia64; then
3970 # AIX 5 now supports IA64 processor
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3972 else
3973 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3974 fi
3975 ;;
3976
3977 mingw* | cygwin* | pw32* | os2* | cegcc*)
3978 # This hack is so that the source file can tell whether it is being
3979 # built for inclusion in a dll (and should export symbols for example).
3980 m4_if([$1], [GCJ], [],
3981 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3982 ;;
3983
3984 hpux9* | hpux10* | hpux11*)
3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3986 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3987 # not for PA HP-UX.
3988 case $host_cpu in
3989 hppa*64*|ia64*)
3990 # +Z the default
3991 ;;
3992 *)
3993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3994 ;;
3995 esac
3996 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3997 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3998 ;;
3999
4000 irix5* | irix6* | nonstopux*)
4001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4002 # PIC (with -KPIC) is the default.
4003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4004 ;;
4005
4006 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4007 case $cc_basename in
4008 # old Intel for x86_64 which still supported -KPIC.
4009 ecc*)
4010 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4012 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4013 ;;
4014 # icc used to be incompatible with GCC.
4015 # ICC 10 doesn't accept -KPIC any more.
4016 icc* | ifort*)
4017 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4018 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4019 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4020 ;;
4021 # Lahey Fortran 8.1.
4022 lf95*)
4023 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4024 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4025 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4026 ;;
4027 pgcc* | pgf77* | pgf90* | pgf95*)
4028 # Portland Group compilers (*not* the Pentium gcc compiler,
4029 # which looks to be a dead project)
4030 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4032 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4033 ;;
4034 ccc*)
4035 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4036 # All Alpha code is PIC.
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4038 ;;
4039 xl*)
4040 # IBM XL C 8.0/Fortran 10.1 on PPC
4041 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4042 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4043 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4044 ;;
4045 *)
4046 case `$CC -V 2>&1 | sed 5q` in
4047 *Sun\ C*)
4048 # Sun C 5.9
4049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4050 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4051 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4052 ;;
4053 *Sun\ F*)
4054 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4056 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4058 ;;
4059 esac
4060 ;;
4061 esac
4062 ;;
4063
4064 newsos6)
4065 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4066 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4067 ;;
4068
4069 *nto* | *qnx*)
4070 # QNX uses GNU C++, but need to define -shared option too, otherwise
4071 # it will coredump.
4072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4073 ;;
4074
4075 osf3* | osf4* | osf5*)
4076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4077 # All OSF/1 code is PIC.
4078 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4079 ;;
4080
4081 rdos*)
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4083 ;;
4084
4085 solaris*)
4086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4088 case $cc_basename in
4089 f77* | f90* | f95*)
4090 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4091 *)
4092 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4093 esac
4094 ;;
4095
4096 sunos4*)
4097 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4099 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4100 ;;
4101
4102 sysv4 | sysv4.2uw2* | sysv4.3*)
4103 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4104 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4105 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4106 ;;
4107
4108 sysv4*MP*)
4109 if test -d /usr/nec ;then
4110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4112 fi
4113 ;;
4114
4115 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4116 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4117 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4118 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4119 ;;
4120
4121 unicos*)
4122 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4123 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4124 ;;
4125
4126 uts4*)
4127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4128 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4129 ;;
4130
4131 *)
4132 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4133 ;;
4134 esac
4135 fi
4136 ])
4137 case $host_os in
4138 # For platforms which do not support PIC, -DPIC is meaningless:
4139 *djgpp*)
4140 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4141 ;;
4142 *)
4143 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4144 ;;
4145 esac
4146 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4147 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4148 [How to pass a linker flag through the compiler])
4149
4150 #
4151 # Check to make sure the PIC flag actually works.
4152 #
4153 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4154 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4155 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4156 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4157 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4158 "" | " "*) ;;
4159 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4160 esac],
4161 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4162 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4163 fi
4164 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4165 [Additional compiler flags for building library objects])
4166
4167 #
4168 # Check to make sure the static flag actually works.
4169 #
4170 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4171 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4172 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4173 $lt_tmp_static_flag,
4174 [],
4175 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4176 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4177 [Compiler flag to prevent dynamic linking])
4178 ])# _LT_COMPILER_PIC
4179
4180
4181 # _LT_LINKER_SHLIBS([TAGNAME])
4182 # ----------------------------
4183 # See if the linker supports building shared libraries.
4184 m4_defun([_LT_LINKER_SHLIBS],
4185 [AC_REQUIRE([LT_PATH_LD])dnl
4186 AC_REQUIRE([LT_PATH_NM])dnl
4187 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4188 m4_require([_LT_DECL_EGREP])dnl
4189 m4_require([_LT_DECL_SED])dnl
4190 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4191 m4_require([_LT_TAG_COMPILER])dnl
4192 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4193 m4_if([$1], [CXX], [
4194 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4195 case $host_os in
4196 aix[[4-9]]*)
4197 # If we're using GNU nm, then we don't want the "-C" option.
4198 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4199 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4200 _LT_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'
4201 else
4202 _LT_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'
4203 fi
4204 ;;
4205 pw32*)
4206 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4207 ;;
4208 cygwin* | mingw* | cegcc*)
4209 _LT_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'
4210 ;;
4211 linux* | k*bsd*-gnu)
4212 _LT_TAGVAR(link_all_deplibs, $1)=no
4213 ;;
4214 *)
4215 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4216 ;;
4217 esac
4218 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4219 ], [
4220 runpath_var=
4221 _LT_TAGVAR(allow_undefined_flag, $1)=
4222 _LT_TAGVAR(always_export_symbols, $1)=no
4223 _LT_TAGVAR(archive_cmds, $1)=
4224 _LT_TAGVAR(archive_expsym_cmds, $1)=
4225 _LT_TAGVAR(compiler_needs_object, $1)=no
4226 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4227 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4228 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4229 _LT_TAGVAR(hardcode_automatic, $1)=no
4230 _LT_TAGVAR(hardcode_direct, $1)=no
4231 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4233 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4234 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4235 _LT_TAGVAR(hardcode_minus_L, $1)=no
4236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4237 _LT_TAGVAR(inherit_rpath, $1)=no
4238 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4239 _LT_TAGVAR(module_cmds, $1)=
4240 _LT_TAGVAR(module_expsym_cmds, $1)=
4241 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4242 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4243 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4244 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4245 # include_expsyms should be a list of space-separated symbols to be *always*
4246 # included in the symbol list
4247 _LT_TAGVAR(include_expsyms, $1)=
4248 # exclude_expsyms can be an extended regexp of symbols to exclude
4249 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4250 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4251 # as well as any symbol that contains `d'.
4252 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4253 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4254 # platforms (ab)use it in PIC code, but their linkers get confused if
4255 # the symbol is explicitly referenced. Since portable code cannot
4256 # rely on this symbol name, it's probably fine to never include it in
4257 # preloaded symbol tables.
4258 # Exclude shared library initialization/finalization symbols.
4259 dnl Note also adjust exclude_expsyms for C++ above.
4260 extract_expsyms_cmds=
4261
4262 case $host_os in
4263 cygwin* | mingw* | pw32* | cegcc*)
4264 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4265 # When not using gcc, we currently assume that we are using
4266 # Microsoft Visual C++.
4267 if test "$GCC" != yes; then
4268 with_gnu_ld=no
4269 fi
4270 ;;
4271 interix*)
4272 # we just hope/assume this is gcc and not c89 (= MSVC++)
4273 with_gnu_ld=yes
4274 ;;
4275 openbsd*)
4276 with_gnu_ld=no
4277 ;;
4278 linux* | k*bsd*-gnu)
4279 _LT_TAGVAR(link_all_deplibs, $1)=no
4280 ;;
4281 esac
4282
4283 _LT_TAGVAR(ld_shlibs, $1)=yes
4284 if test "$with_gnu_ld" = yes; then
4285 # If archive_cmds runs LD, not CC, wlarc should be empty
4286 wlarc='${wl}'
4287
4288 # Set some defaults for GNU ld with shared library support. These
4289 # are reset later if shared libraries are not supported. Putting them
4290 # here allows them to be overridden if necessary.
4291 runpath_var=LD_RUN_PATH
4292 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4294 # ancient GNU ld didn't support --whole-archive et. al.
4295 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4296 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4297 else
4298 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4299 fi
4300 supports_anon_versioning=no
4301 case `$LD -v 2>&1` in
4302 *GNU\ gold*) supports_anon_versioning=yes ;;
4303 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4304 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4305 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4306 *\ 2.11.*) ;; # other 2.11 versions
4307 *) supports_anon_versioning=yes ;;
4308 esac
4309
4310 # See if GNU ld supports shared libraries.
4311 case $host_os in
4312 aix[[3-9]]*)
4313 # On AIX/PPC, the GNU linker is very broken
4314 if test "$host_cpu" != ia64; then
4315 _LT_TAGVAR(ld_shlibs, $1)=no
4316 cat <<_LT_EOF 1>&2
4317
4318 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4319 *** to be unable to reliably create shared libraries on AIX.
4320 *** Therefore, libtool is disabling shared libraries support. If you
4321 *** really care for shared libraries, you may want to modify your PATH
4322 *** so that a non-GNU linker is found, and then restart.
4323
4324 _LT_EOF
4325 fi
4326 ;;
4327
4328 amigaos*)
4329 case $host_cpu in
4330 powerpc)
4331 # see comment about AmigaOS4 .so support
4332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4333 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4334 ;;
4335 m68k)
4336 _LT_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)'
4337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4338 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4339 ;;
4340 esac
4341 ;;
4342
4343 beos*)
4344 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4345 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4346 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4347 # support --undefined. This deserves some investigation. FIXME
4348 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4349 else
4350 _LT_TAGVAR(ld_shlibs, $1)=no
4351 fi
4352 ;;
4353
4354 cygwin* | mingw* | pw32* | cegcc*)
4355 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4356 # as there is no search path for DLLs.
4357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4358 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4359 _LT_TAGVAR(always_export_symbols, $1)=no
4360 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4361 _LT_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'
4362
4363 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4364 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4365 # If the export-symbols file already is a .def file (1st line
4366 # is EXPORTS), use it as is; otherwise, prepend...
4367 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4368 cp $export_symbols $output_objdir/$soname.def;
4369 else
4370 echo EXPORTS > $output_objdir/$soname.def;
4371 cat $export_symbols >> $output_objdir/$soname.def;
4372 fi~
4373 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4374 else
4375 _LT_TAGVAR(ld_shlibs, $1)=no
4376 fi
4377 ;;
4378
4379 interix[[3-9]]*)
4380 _LT_TAGVAR(hardcode_direct, $1)=no
4381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4384 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4385 # Instead, shared libraries are loaded at an image base (0x10000000 by
4386 # default) and relocated if they conflict, which is a slow very memory
4387 # consuming and fragmenting process. To avoid this, we pick a random,
4388 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4389 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4390 _LT_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'
4391 _LT_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'
4392 ;;
4393
4394 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4395 tmp_diet=no
4396 if test "$host_os" = linux-dietlibc; then
4397 case $cc_basename in
4398 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4399 esac
4400 fi
4401 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4402 && test "$tmp_diet" = no
4403 then
4404 tmp_addflag=
4405 tmp_sharedflag='-shared'
4406 case $cc_basename,$host_cpu in
4407 pgcc*) # Portland Group C compiler
4408 _LT_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'
4409 tmp_addflag=' $pic_flag'
4410 ;;
4411 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4412 _LT_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'
4413 tmp_addflag=' $pic_flag -Mnomain' ;;
4414 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4415 tmp_addflag=' -i_dynamic' ;;
4416 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4417 tmp_addflag=' -i_dynamic -nofor_main' ;;
4418 ifc* | ifort*) # Intel Fortran compiler
4419 tmp_addflag=' -nofor_main' ;;
4420 lf95*) # Lahey Fortran 8.1
4421 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4422 tmp_sharedflag='--shared' ;;
4423 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4424 tmp_sharedflag='-qmkshrobj'
4425 tmp_addflag= ;;
4426 esac
4427 case `$CC -V 2>&1 | sed 5q` in
4428 *Sun\ C*) # Sun C 5.9
4429 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4430 _LT_TAGVAR(compiler_needs_object, $1)=yes
4431 tmp_sharedflag='-G' ;;
4432 *Sun\ F*) # Sun Fortran 8.3
4433 tmp_sharedflag='-G' ;;
4434 esac
4435 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4436
4437 if test "x$supports_anon_versioning" = xyes; then
4438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440 echo "local: *; };" >> $output_objdir/$libname.ver~
4441 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4442 fi
4443
4444 case $cc_basename in
4445 xlf*)
4446 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4447 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4449 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4450 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4451 if test "x$supports_anon_versioning" = xyes; then
4452 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4453 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4454 echo "local: *; };" >> $output_objdir/$libname.ver~
4455 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4456 fi
4457 ;;
4458 esac
4459 else
4460 _LT_TAGVAR(ld_shlibs, $1)=no
4461 fi
4462 ;;
4463
4464 netbsd* | netbsdelf*-gnu)
4465 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4466 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4467 wlarc=
4468 else
4469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4471 fi
4472 ;;
4473
4474 solaris*)
4475 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4476 _LT_TAGVAR(ld_shlibs, $1)=no
4477 cat <<_LT_EOF 1>&2
4478
4479 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4480 *** create shared libraries on Solaris systems. Therefore, libtool
4481 *** is disabling shared libraries support. We urge you to upgrade GNU
4482 *** binutils to release 2.9.1 or newer. Another option is to modify
4483 *** your PATH or compiler configuration so that the native linker is
4484 *** used, and then restart.
4485
4486 _LT_EOF
4487 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4489 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4490 else
4491 _LT_TAGVAR(ld_shlibs, $1)=no
4492 fi
4493 ;;
4494
4495 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4496 case `$LD -v 2>&1` in
4497 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4498 _LT_TAGVAR(ld_shlibs, $1)=no
4499 cat <<_LT_EOF 1>&2
4500
4501 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4502 *** reliably create shared libraries on SCO systems. Therefore, libtool
4503 *** is disabling shared libraries support. We urge you to upgrade GNU
4504 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4505 *** your PATH or compiler configuration so that the native linker is
4506 *** used, and then restart.
4507
4508 _LT_EOF
4509 ;;
4510 *)
4511 # For security reasons, it is highly recommended that you always
4512 # use absolute paths for naming shared libraries, and exclude the
4513 # DT_RUNPATH tag from executables and libraries. But doing so
4514 # requires that you compile everything twice, which is a pain.
4515 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4517 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4519 else
4520 _LT_TAGVAR(ld_shlibs, $1)=no
4521 fi
4522 ;;
4523 esac
4524 ;;
4525
4526 sunos4*)
4527 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4528 wlarc=
4529 _LT_TAGVAR(hardcode_direct, $1)=yes
4530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4531 ;;
4532
4533 *)
4534 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4537 else
4538 _LT_TAGVAR(ld_shlibs, $1)=no
4539 fi
4540 ;;
4541 esac
4542
4543 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4544 runpath_var=
4545 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4546 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4547 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4548 fi
4549 else
4550 # PORTME fill in a description of your system's linker (not GNU ld)
4551 case $host_os in
4552 aix3*)
4553 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4554 _LT_TAGVAR(always_export_symbols, $1)=yes
4555 _LT_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'
4556 # Note: this linker hardcodes the directories in LIBPATH if there
4557 # are no directories specified by -L.
4558 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4559 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4560 # Neither direct hardcoding nor static linking is supported with a
4561 # broken collect2.
4562 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4563 fi
4564 ;;
4565
4566 aix[[4-9]]*)
4567 if test "$host_cpu" = ia64; then
4568 # On IA64, the linker does run time linking by default, so we don't
4569 # have to do anything special.
4570 aix_use_runtimelinking=no
4571 exp_sym_flag='-Bexport'
4572 no_entry_flag=""
4573 else
4574 # If we're using GNU nm, then we don't want the "-C" option.
4575 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4576 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4577 _LT_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'
4578 else
4579 _LT_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'
4580 fi
4581 aix_use_runtimelinking=no
4582
4583 # Test if we are trying to use run time linking or normal
4584 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4585 # need to do runtime linking.
4586 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4587 for ld_flag in $LDFLAGS; do
4588 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4589 aix_use_runtimelinking=yes
4590 break
4591 fi
4592 done
4593 ;;
4594 esac
4595
4596 exp_sym_flag='-bexport'
4597 no_entry_flag='-bnoentry'
4598 fi
4599
4600 # When large executables or shared objects are built, AIX ld can
4601 # have problems creating the table of contents. If linking a library
4602 # or program results in "error TOC overflow" add -mminimal-toc to
4603 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4604 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4605
4606 _LT_TAGVAR(archive_cmds, $1)=''
4607 _LT_TAGVAR(hardcode_direct, $1)=yes
4608 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4609 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4610 _LT_TAGVAR(link_all_deplibs, $1)=yes
4611 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4612
4613 if test "$GCC" = yes; then
4614 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4615 # We only want to do this on AIX 4.2 and lower, the check
4616 # below for broken collect2 doesn't work under 4.3+
4617 collect2name=`${CC} -print-prog-name=collect2`
4618 if test -f "$collect2name" &&
4619 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4620 then
4621 # We have reworked collect2
4622 :
4623 else
4624 # We have old collect2
4625 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4626 # It fails to find uninstalled libraries when the uninstalled
4627 # path is not listed in the libpath. Setting hardcode_minus_L
4628 # to unsupported forces relinking
4629 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4630 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4631 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4632 fi
4633 ;;
4634 esac
4635 shared_flag='-shared'
4636 if test "$aix_use_runtimelinking" = yes; then
4637 shared_flag="$shared_flag "'${wl}-G'
4638 fi
4639 _LT_TAGVAR(link_all_deplibs, $1)=no
4640 else
4641 # not using gcc
4642 if test "$host_cpu" = ia64; then
4643 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4644 # chokes on -Wl,-G. The following line is correct:
4645 shared_flag='-G'
4646 else
4647 if test "$aix_use_runtimelinking" = yes; then
4648 shared_flag='${wl}-G'
4649 else
4650 shared_flag='${wl}-bM:SRE'
4651 fi
4652 fi
4653 fi
4654
4655 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4656 # It seems that -bexpall does not export symbols beginning with
4657 # underscore (_), so it is better to generate a list of symbols to export.
4658 _LT_TAGVAR(always_export_symbols, $1)=yes
4659 if test "$aix_use_runtimelinking" = yes; then
4660 # Warning - without using the other runtime loading flags (-brtl),
4661 # -berok will link without error, but may produce a broken library.
4662 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4663 # Determine the default libpath from the value encoded in an
4664 # empty executable.
4665 _LT_SYS_MODULE_PATH_AIX
4666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4667 _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4668 else
4669 if test "$host_cpu" = ia64; then
4670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4671 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4672 _LT_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"
4673 else
4674 # Determine the default libpath from the value encoded in an
4675 # empty executable.
4676 _LT_SYS_MODULE_PATH_AIX
4677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4678 # Warning - without using the other run time loading flags,
4679 # -berok will link without error, but may produce a broken library.
4680 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4681 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4682 # Exported symbols can be pulled into shared objects from archives
4683 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4684 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4685 # This is similar to how AIX traditionally builds its shared libraries.
4686 _LT_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'
4687 fi
4688 fi
4689 ;;
4690
4691 amigaos*)
4692 case $host_cpu in
4693 powerpc)
4694 # see comment about AmigaOS4 .so support
4695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4696 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4697 ;;
4698 m68k)
4699 _LT_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)'
4700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4701 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4702 ;;
4703 esac
4704 ;;
4705
4706 bsdi[[45]]*)
4707 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4708 ;;
4709
4710 cygwin* | mingw* | pw32* | cegcc*)
4711 # When not using gcc, we currently assume that we are using
4712 # Microsoft Visual C++.
4713 # hardcode_libdir_flag_spec is actually meaningless, as there is
4714 # no search path for DLLs.
4715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4716 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4717 # Tell ltmain to make .lib files, not .a files.
4718 libext=lib
4719 # Tell ltmain to make .dll files, not .so files.
4720 shrext_cmds=".dll"
4721 # FIXME: Setting linknames here is a bad hack.
4722 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4723 # The linker will automatically build a .lib file if we build a DLL.
4724 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4725 # FIXME: Should let the user specify the lib program.
4726 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4727 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4728 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4729 ;;
4730
4731 darwin* | rhapsody*)
4732 _LT_DARWIN_LINKER_FEATURES($1)
4733 ;;
4734
4735 dgux*)
4736 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739 ;;
4740
4741 freebsd1*)
4742 _LT_TAGVAR(ld_shlibs, $1)=no
4743 ;;
4744
4745 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4746 # support. Future versions do this automatically, but an explicit c++rt0.o
4747 # does not break anything, and helps significantly (at the cost of a little
4748 # extra space).
4749 freebsd2.2*)
4750 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752 _LT_TAGVAR(hardcode_direct, $1)=yes
4753 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754 ;;
4755
4756 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4757 freebsd2*)
4758 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4759 _LT_TAGVAR(hardcode_direct, $1)=yes
4760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4762 ;;
4763
4764 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4765 freebsd* | dragonfly*)
4766 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4768 _LT_TAGVAR(hardcode_direct, $1)=yes
4769 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4770 ;;
4771
4772 hpux9*)
4773 if test "$GCC" = yes; then
4774 _LT_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'
4775 else
4776 _LT_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'
4777 fi
4778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4779 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4780 _LT_TAGVAR(hardcode_direct, $1)=yes
4781
4782 # hardcode_minus_L: Not really in the search PATH,
4783 # but as the default location of the library.
4784 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4786 ;;
4787
4788 hpux10*)
4789 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4791 else
4792 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4793 fi
4794 if test "$with_gnu_ld" = no; then
4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4796 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4797 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4798 _LT_TAGVAR(hardcode_direct, $1)=yes
4799 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4801 # hardcode_minus_L: Not really in the search PATH,
4802 # but as the default location of the library.
4803 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4804 fi
4805 ;;
4806
4807 hpux11*)
4808 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4809 case $host_cpu in
4810 hppa*64*)
4811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4812 ;;
4813 ia64*)
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4815 ;;
4816 *)
4817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4818 ;;
4819 esac
4820 else
4821 case $host_cpu in
4822 hppa*64*)
4823 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4824 ;;
4825 ia64*)
4826 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4827 ;;
4828 *)
4829 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4830 ;;
4831 esac
4832 fi
4833 if test "$with_gnu_ld" = no; then
4834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4835 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4836
4837 case $host_cpu in
4838 hppa*64*|ia64*)
4839 _LT_TAGVAR(hardcode_direct, $1)=no
4840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4841 ;;
4842 *)
4843 _LT_TAGVAR(hardcode_direct, $1)=yes
4844 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4845 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4846
4847 # hardcode_minus_L: Not really in the search PATH,
4848 # but as the default location of the library.
4849 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4850 ;;
4851 esac
4852 fi
4853 ;;
4854
4855 irix5* | irix6* | nonstopux*)
4856 if test "$GCC" = yes; then
4857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4858 # Try to use the -exported_symbol ld option, if it does not
4859 # work, assume that -exports_file does not work either and
4860 # implicitly export all symbols.
4861 save_LDFLAGS="$LDFLAGS"
4862 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4863 AC_LINK_IFELSE(int foo(void) {},
4864 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4865 )
4866 LDFLAGS="$save_LDFLAGS"
4867 else
4868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4870 fi
4871 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4873 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4874 _LT_TAGVAR(inherit_rpath, $1)=yes
4875 _LT_TAGVAR(link_all_deplibs, $1)=yes
4876 ;;
4877
4878 netbsd* | netbsdelf*-gnu)
4879 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4880 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4881 else
4882 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4883 fi
4884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4885 _LT_TAGVAR(hardcode_direct, $1)=yes
4886 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4887 ;;
4888
4889 newsos6)
4890 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4891 _LT_TAGVAR(hardcode_direct, $1)=yes
4892 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4893 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4894 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4895 ;;
4896
4897 *nto* | *qnx*)
4898 ;;
4899
4900 openbsd*)
4901 if test -f /usr/libexec/ld.so; then
4902 _LT_TAGVAR(hardcode_direct, $1)=yes
4903 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4904 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4905 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4907 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4909 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910 else
4911 case $host_os in
4912 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4913 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4915 ;;
4916 *)
4917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4919 ;;
4920 esac
4921 fi
4922 else
4923 _LT_TAGVAR(ld_shlibs, $1)=no
4924 fi
4925 ;;
4926
4927 os2*)
4928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4929 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4930 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4931 _LT_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'
4932 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4933 ;;
4934
4935 osf3*)
4936 if test "$GCC" = yes; then
4937 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4939 else
4940 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4942 fi
4943 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4945 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4946 ;;
4947
4948 osf4* | osf5*) # as osf3* with the addition of -msym flag
4949 if test "$GCC" = yes; then
4950 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4953 else
4954 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4957 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4958
4959 # Both c and cxx compiler support -rpath directly
4960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4961 fi
4962 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4963 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4964 ;;
4965
4966 solaris*)
4967 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4968 if test "$GCC" = yes; then
4969 wlarc='${wl}'
4970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4971 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4972 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4973 else
4974 case `$CC -V 2>&1` in
4975 *"Compilers 5.0"*)
4976 wlarc=''
4977 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4978 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4979 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4980 ;;
4981 *)
4982 wlarc='${wl}'
4983 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4984 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4985 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4986 ;;
4987 esac
4988 fi
4989 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4991 case $host_os in
4992 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4993 *)
4994 # The compiler driver will combine and reorder linker options,
4995 # but understands `-z linker_flag'. GCC discards it without `$wl',
4996 # but is careful enough not to reorder.
4997 # Supported since Solaris 2.6 (maybe 2.5.1?)
4998 if test "$GCC" = yes; then
4999 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5000 else
5001 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5002 fi
5003 ;;
5004 esac
5005 _LT_TAGVAR(link_all_deplibs, $1)=yes
5006 ;;
5007
5008 sunos4*)
5009 if test "x$host_vendor" = xsequent; then
5010 # Use $CC to link under sequent, because it throws in some extra .o
5011 # files that make .init and .fini sections work.
5012 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5013 else
5014 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5015 fi
5016 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5017 _LT_TAGVAR(hardcode_direct, $1)=yes
5018 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5019 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5020 ;;
5021
5022 sysv4)
5023 case $host_vendor in
5024 sni)
5025 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5026 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5027 ;;
5028 siemens)
5029 ## LD is ld it makes a PLAMLIB
5030 ## CC just makes a GrossModule.
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5032 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5033 _LT_TAGVAR(hardcode_direct, $1)=no
5034 ;;
5035 motorola)
5036 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5038 ;;
5039 esac
5040 runpath_var='LD_RUN_PATH'
5041 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5042 ;;
5043
5044 sysv4.3*)
5045 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5048 ;;
5049
5050 sysv4*MP*)
5051 if test -d /usr/nec; then
5052 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5054 runpath_var=LD_RUN_PATH
5055 hardcode_runpath_var=yes
5056 _LT_TAGVAR(ld_shlibs, $1)=yes
5057 fi
5058 ;;
5059
5060 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5061 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5062 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5064 runpath_var='LD_RUN_PATH'
5065
5066 if test "$GCC" = yes; then
5067 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5069 else
5070 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5071 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5072 fi
5073 ;;
5074
5075 sysv5* | sco3.2v5* | sco5v6*)
5076 # Note: We can NOT use -z defs as we might desire, because we do not
5077 # link with -lc, and that would cause any symbols used from libc to
5078 # always be unresolved, which means just about no library would
5079 # ever link correctly. If we're not using GNU ld we use -z text
5080 # though, which does catch some bad symbols but isn't as heavy-handed
5081 # as -z defs.
5082 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5083 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5084 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5085 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5087 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5088 _LT_TAGVAR(link_all_deplibs, $1)=yes
5089 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5090 runpath_var='LD_RUN_PATH'
5091
5092 if test "$GCC" = yes; then
5093 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5094 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5095 else
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5097 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5098 fi
5099 ;;
5100
5101 uts4*)
5102 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5104 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5105 ;;
5106
5107 *)
5108 _LT_TAGVAR(ld_shlibs, $1)=no
5109 ;;
5110 esac
5111
5112 if test x$host_vendor = xsni; then
5113 case $host in
5114 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5115 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5116 ;;
5117 esac
5118 fi
5119 fi
5120 ])
5121 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5122 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5123
5124 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5125
5126 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5127 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5128 _LT_DECL([], [extract_expsyms_cmds], [2],
5129 [The commands to extract the exported symbol list from a shared archive])
5130
5131 #
5132 # Do we need to explicitly link libc?
5133 #
5134 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5135 x|xyes)
5136 # Assume -lc should be added
5137 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5138
5139 if test "$enable_shared" = yes && test "$GCC" = yes; then
5140 case $_LT_TAGVAR(archive_cmds, $1) in
5141 *'~'*)
5142 # FIXME: we may have to deal with multi-command sequences.
5143 ;;
5144 '$CC '*)
5145 # Test whether the compiler implicitly links with -lc since on some
5146 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5147 # to ld, don't add -lc before -lgcc.
5148 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5149 $RM conftest*
5150 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5151
5152 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5153 soname=conftest
5154 lib=conftest
5155 libobjs=conftest.$ac_objext
5156 deplibs=
5157 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5158 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5159 compiler_flags=-v
5160 linker_flags=-v
5161 verstring=
5162 output_objdir=.
5163 libname=conftest
5164 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5165 _LT_TAGVAR(allow_undefined_flag, $1)=
5166 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5167 then
5168 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5169 else
5170 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5171 fi
5172 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5173 else
5174 cat conftest.err 1>&5
5175 fi
5176 $RM conftest*
5177 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5178 ;;
5179 esac
5180 fi
5181 ;;
5182 esac
5183
5184 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5185 [Whether or not to add -lc for building shared libraries])
5186 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5187 [enable_shared_with_static_runtimes], [0],
5188 [Whether or not to disallow shared libs when runtime libs are static])
5189 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5190 [Compiler flag to allow reflexive dlopens])
5191 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5192 [Compiler flag to generate shared objects directly from archives])
5193 _LT_TAGDECL([], [compiler_needs_object], [1],
5194 [Whether the compiler copes with passing no objects directly])
5195 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5196 [Create an old-style archive from a shared archive])
5197 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5198 [Create a temporary old-style archive to link instead of a shared archive])
5199 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5200 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5201 _LT_TAGDECL([], [module_cmds], [2],
5202 [Commands used to build a loadable module if different from building
5203 a shared archive.])
5204 _LT_TAGDECL([], [module_expsym_cmds], [2])
5205 _LT_TAGDECL([], [with_gnu_ld], [1],
5206 [Whether we are building with GNU ld or not])
5207 _LT_TAGDECL([], [allow_undefined_flag], [1],
5208 [Flag that allows shared libraries with undefined symbols to be built])
5209 _LT_TAGDECL([], [no_undefined_flag], [1],
5210 [Flag that enforces no undefined symbols])
5211 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5212 [Flag to hardcode $libdir into a binary during linking.
5213 This must work even if $libdir does not exist])
5214 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5215 [[If ld is used when linking, flag to hardcode $libdir into a binary
5216 during linking. This must work even if $libdir does not exist]])
5217 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5218 [Whether we need a single "-rpath" flag with a separated argument])
5219 _LT_TAGDECL([], [hardcode_direct], [0],
5220 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5221 DIR into the resulting binary])
5222 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5223 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5224 DIR into the resulting binary and the resulting library dependency is
5225 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5226 library is relocated])
5227 _LT_TAGDECL([], [hardcode_minus_L], [0],
5228 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5229 into the resulting binary])
5230 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5231 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5232 into the resulting binary])
5233 _LT_TAGDECL([], [hardcode_automatic], [0],
5234 [Set to "yes" if building a shared library automatically hardcodes DIR
5235 into the library and all subsequent libraries and executables linked
5236 against it])
5237 _LT_TAGDECL([], [inherit_rpath], [0],
5238 [Set to yes if linker adds runtime paths of dependent libraries
5239 to runtime path list])
5240 _LT_TAGDECL([], [link_all_deplibs], [0],
5241 [Whether libtool must link a program against all its dependency libraries])
5242 _LT_TAGDECL([], [fix_srcfile_path], [1],
5243 [Fix the shell variable $srcfile for the compiler])
5244 _LT_TAGDECL([], [always_export_symbols], [0],
5245 [Set to "yes" if exported symbols are required])
5246 _LT_TAGDECL([], [export_symbols_cmds], [2],
5247 [The commands to list exported symbols])
5248 _LT_TAGDECL([], [exclude_expsyms], [1],
5249 [Symbols that should not be listed in the preloaded symbols])
5250 _LT_TAGDECL([], [include_expsyms], [1],
5251 [Symbols that must always be exported])
5252 _LT_TAGDECL([], [prelink_cmds], [2],
5253 [Commands necessary for linking programs (against libraries) with templates])
5254 _LT_TAGDECL([], [file_list_spec], [1],
5255 [Specify filename containing input files])
5256 dnl FIXME: Not yet implemented
5257 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5258 dnl [Compiler flag to generate thread safe objects])
5259 ])# _LT_LINKER_SHLIBS
5260
5261
5262 # _LT_LANG_C_CONFIG([TAG])
5263 # ------------------------
5264 # Ensure that the configuration variables for a C compiler are suitably
5265 # defined. These variables are subsequently used by _LT_CONFIG to write
5266 # the compiler configuration to `libtool'.
5267 m4_defun([_LT_LANG_C_CONFIG],
5268 [m4_require([_LT_DECL_EGREP])dnl
5269 lt_save_CC="$CC"
5270 AC_LANG_PUSH(C)
5271
5272 # Source file extension for C test sources.
5273 ac_ext=c
5274
5275 # Object file extension for compiled C test sources.
5276 objext=o
5277 _LT_TAGVAR(objext, $1)=$objext
5278
5279 # Code to be used in simple compile tests
5280 lt_simple_compile_test_code="int some_variable = 0;"
5281
5282 # Code to be used in simple link tests
5283 lt_simple_link_test_code='int main(){return(0);}'
5284
5285 _LT_TAG_COMPILER
5286 # Save the default compiler, since it gets overwritten when the other
5287 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5288 compiler_DEFAULT=$CC
5289
5290 # save warnings/boilerplate of simple test code
5291 _LT_COMPILER_BOILERPLATE
5292 _LT_LINKER_BOILERPLATE
5293
5294 if test -n "$compiler"; then
5295 _LT_COMPILER_NO_RTTI($1)
5296 _LT_COMPILER_PIC($1)
5297 _LT_COMPILER_C_O($1)
5298 _LT_COMPILER_FILE_LOCKS($1)
5299 _LT_LINKER_SHLIBS($1)
5300 _LT_SYS_DYNAMIC_LINKER($1)
5301 _LT_LINKER_HARDCODE_LIBPATH($1)
5302 LT_SYS_DLOPEN_SELF
5303 _LT_CMD_STRIPLIB
5304
5305 # Report which library types will actually be built
5306 AC_MSG_CHECKING([if libtool supports shared libraries])
5307 AC_MSG_RESULT([$can_build_shared])
5308
5309 AC_MSG_CHECKING([whether to build shared libraries])
5310 test "$can_build_shared" = "no" && enable_shared=no
5311
5312 # On AIX, shared libraries and static libraries use the same namespace, and
5313 # are all built from PIC.
5314 case $host_os in
5315 aix3*)
5316 test "$enable_shared" = yes && enable_static=no
5317 if test -n "$RANLIB"; then
5318 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5319 postinstall_cmds='$RANLIB $lib'
5320 fi
5321 ;;
5322
5323 aix[[4-9]]*)
5324 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5325 test "$enable_shared" = yes && enable_static=no
5326 fi
5327 ;;
5328 esac
5329 AC_MSG_RESULT([$enable_shared])
5330
5331 AC_MSG_CHECKING([whether to build static libraries])
5332 # Make sure either enable_shared or enable_static is yes.
5333 test "$enable_shared" = yes || enable_static=yes
5334 AC_MSG_RESULT([$enable_static])
5335
5336 _LT_CONFIG($1)
5337 fi
5338 AC_LANG_POP
5339 CC="$lt_save_CC"
5340 ])# _LT_LANG_C_CONFIG
5341
5342
5343 # _LT_PROG_CXX
5344 # ------------
5345 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5346 # compiler, we have our own version here.
5347 m4_defun([_LT_PROG_CXX],
5348 [
5349 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5350 AC_PROG_CXX
5351 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5352 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5353 (test "X$CXX" != "Xg++"))) ; then
5354 AC_PROG_CXXCPP
5355 else
5356 _lt_caught_CXX_error=yes
5357 fi
5358 popdef([AC_MSG_ERROR])
5359 ])# _LT_PROG_CXX
5360
5361 dnl aclocal-1.4 backwards compatibility:
5362 dnl AC_DEFUN([_LT_PROG_CXX], [])
5363
5364
5365 # _LT_LANG_CXX_CONFIG([TAG])
5366 # --------------------------
5367 # Ensure that the configuration variables for a C++ compiler are suitably
5368 # defined. These variables are subsequently used by _LT_CONFIG to write
5369 # the compiler configuration to `libtool'.
5370 m4_defun([_LT_LANG_CXX_CONFIG],
5371 [AC_REQUIRE([_LT_PROG_CXX])dnl
5372 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5373 m4_require([_LT_DECL_EGREP])dnl
5374
5375 AC_LANG_PUSH(C++)
5376 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5377 _LT_TAGVAR(allow_undefined_flag, $1)=
5378 _LT_TAGVAR(always_export_symbols, $1)=no
5379 _LT_TAGVAR(archive_expsym_cmds, $1)=
5380 _LT_TAGVAR(compiler_needs_object, $1)=no
5381 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5382 _LT_TAGVAR(hardcode_direct, $1)=no
5383 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5385 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5386 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5387 _LT_TAGVAR(hardcode_minus_L, $1)=no
5388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5389 _LT_TAGVAR(hardcode_automatic, $1)=no
5390 _LT_TAGVAR(inherit_rpath, $1)=no
5391 _LT_TAGVAR(module_cmds, $1)=
5392 _LT_TAGVAR(module_expsym_cmds, $1)=
5393 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5394 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5395 _LT_TAGVAR(no_undefined_flag, $1)=
5396 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5397 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5398
5399 # Source file extension for C++ test sources.
5400 ac_ext=cpp
5401
5402 # Object file extension for compiled C++ test sources.
5403 objext=o
5404 _LT_TAGVAR(objext, $1)=$objext
5405
5406 # No sense in running all these tests if we already determined that
5407 # the CXX compiler isn't working. Some variables (like enable_shared)
5408 # are currently assumed to apply to all compilers on this platform,
5409 # and will be corrupted by setting them based on a non-working compiler.
5410 if test "$_lt_caught_CXX_error" != yes; then
5411 # Code to be used in simple compile tests
5412 lt_simple_compile_test_code="int some_variable = 0;"
5413
5414 # Code to be used in simple link tests
5415 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5416
5417 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5418 _LT_TAG_COMPILER
5419
5420 # save warnings/boilerplate of simple test code
5421 _LT_COMPILER_BOILERPLATE
5422 _LT_LINKER_BOILERPLATE
5423
5424 # Allow CC to be a program name with arguments.
5425 lt_save_CC=$CC
5426 lt_save_LD=$LD
5427 lt_save_GCC=$GCC
5428 GCC=$GXX
5429 lt_save_with_gnu_ld=$with_gnu_ld
5430 lt_save_path_LD=$lt_cv_path_LD
5431 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5432 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5433 else
5434 $as_unset lt_cv_prog_gnu_ld
5435 fi
5436 if test -n "${lt_cv_path_LDCXX+set}"; then
5437 lt_cv_path_LD=$lt_cv_path_LDCXX
5438 else
5439 $as_unset lt_cv_path_LD
5440 fi
5441 test -z "${LDCXX+set}" || LD=$LDCXX
5442 CC=${CXX-"c++"}
5443 compiler=$CC
5444 _LT_TAGVAR(compiler, $1)=$CC
5445 _LT_CC_BASENAME([$compiler])
5446
5447 if test -n "$compiler"; then
5448 # We don't want -fno-exception when compiling C++ code, so set the
5449 # no_builtin_flag separately
5450 if test "$GXX" = yes; then
5451 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5452 else
5453 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5454 fi
5455
5456 if test "$GXX" = yes; then
5457 # Set up default GNU C++ configuration
5458
5459 LT_PATH_LD
5460
5461 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5462 # archiving commands below assume that GNU ld is being used.
5463 if test "$with_gnu_ld" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5465 _LT_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'
5466
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5468 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5469
5470 # If archive_cmds runs LD, not CC, wlarc should be empty
5471 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5472 # investigate it a little bit more. (MM)
5473 wlarc='${wl}'
5474
5475 # ancient GNU ld didn't support --whole-archive et. al.
5476 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5477 $GREP 'no-whole-archive' > /dev/null; then
5478 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5479 else
5480 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5481 fi
5482 else
5483 with_gnu_ld=no
5484 wlarc=
5485
5486 # A generic and very simple default shared library creation
5487 # command for GNU C++ for the case where it uses the native
5488 # linker, instead of GNU ld. If possible, this setting should
5489 # overridden to take advantage of the native linker features on
5490 # the platform it is being used on.
5491 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5492 fi
5493
5494 # Commands to make compiler produce verbose output that lists
5495 # what "hidden" libraries, object files and flags are used when
5496 # linking a shared library.
5497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5498
5499 else
5500 GXX=no
5501 with_gnu_ld=no
5502 wlarc=
5503 fi
5504
5505 # PORTME: fill in a description of your system's C++ link characteristics
5506 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5507 _LT_TAGVAR(ld_shlibs, $1)=yes
5508 case $host_os in
5509 aix3*)
5510 # FIXME: insert proper C++ library support
5511 _LT_TAGVAR(ld_shlibs, $1)=no
5512 ;;
5513 aix[[4-9]]*)
5514 if test "$host_cpu" = ia64; then
5515 # On IA64, the linker does run time linking by default, so we don't
5516 # have to do anything special.
5517 aix_use_runtimelinking=no
5518 exp_sym_flag='-Bexport'
5519 no_entry_flag=""
5520 else
5521 aix_use_runtimelinking=no
5522
5523 # Test if we are trying to use run time linking or normal
5524 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5525 # need to do runtime linking.
5526 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5527 for ld_flag in $LDFLAGS; do
5528 case $ld_flag in
5529 *-brtl*)
5530 aix_use_runtimelinking=yes
5531 break
5532 ;;
5533 esac
5534 done
5535 ;;
5536 esac
5537
5538 exp_sym_flag='-bexport'
5539 no_entry_flag='-bnoentry'
5540 fi
5541
5542 # When large executables or shared objects are built, AIX ld can
5543 # have problems creating the table of contents. If linking a library
5544 # or program results in "error TOC overflow" add -mminimal-toc to
5545 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5546 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5547
5548 _LT_TAGVAR(archive_cmds, $1)=''
5549 _LT_TAGVAR(hardcode_direct, $1)=yes
5550 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5551 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5552 _LT_TAGVAR(link_all_deplibs, $1)=yes
5553 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5554
5555 if test "$GXX" = yes; then
5556 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5557 # We only want to do this on AIX 4.2 and lower, the check
5558 # below for broken collect2 doesn't work under 4.3+
5559 collect2name=`${CC} -print-prog-name=collect2`
5560 if test -f "$collect2name" &&
5561 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5562 then
5563 # We have reworked collect2
5564 :
5565 else
5566 # We have old collect2
5567 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5568 # It fails to find uninstalled libraries when the uninstalled
5569 # path is not listed in the libpath. Setting hardcode_minus_L
5570 # to unsupported forces relinking
5571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5573 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5574 fi
5575 esac
5576 shared_flag='-shared'
5577 if test "$aix_use_runtimelinking" = yes; then
5578 shared_flag="$shared_flag "'${wl}-G'
5579 fi
5580 else
5581 # not using gcc
5582 if test "$host_cpu" = ia64; then
5583 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5584 # chokes on -Wl,-G. The following line is correct:
5585 shared_flag='-G'
5586 else
5587 if test "$aix_use_runtimelinking" = yes; then
5588 shared_flag='${wl}-G'
5589 else
5590 shared_flag='${wl}-bM:SRE'
5591 fi
5592 fi
5593 fi
5594
5595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5596 # It seems that -bexpall does not export symbols beginning with
5597 # underscore (_), so it is better to generate a list of symbols to
5598 # export.
5599 _LT_TAGVAR(always_export_symbols, $1)=yes
5600 if test "$aix_use_runtimelinking" = yes; then
5601 # Warning - without using the other runtime loading flags (-brtl),
5602 # -berok will link without error, but may produce a broken library.
5603 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5604 # Determine the default libpath from the value encoded in an empty
5605 # executable.
5606 _LT_SYS_MODULE_PATH_AIX
5607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5608
5609 _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5610 else
5611 if test "$host_cpu" = ia64; then
5612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5613 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5614 _LT_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"
5615 else
5616 # Determine the default libpath from the value encoded in an
5617 # empty executable.
5618 _LT_SYS_MODULE_PATH_AIX
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5620 # Warning - without using the other run time loading flags,
5621 # -berok will link without error, but may produce a broken library.
5622 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5623 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5624 # Exported symbols can be pulled into shared objects from archives
5625 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5626 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5627 # This is similar to how AIX traditionally builds its shared
5628 # libraries.
5629 _LT_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'
5630 fi
5631 fi
5632 ;;
5633
5634 beos*)
5635 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5636 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5637 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5638 # support --undefined. This deserves some investigation. FIXME
5639 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640 else
5641 _LT_TAGVAR(ld_shlibs, $1)=no
5642 fi
5643 ;;
5644
5645 chorus*)
5646 case $cc_basename in
5647 *)
5648 # FIXME: insert proper C++ library support
5649 _LT_TAGVAR(ld_shlibs, $1)=no
5650 ;;
5651 esac
5652 ;;
5653
5654 cygwin* | mingw* | pw32* | cegcc*)
5655 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5656 # as there is no search path for DLLs.
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5659 _LT_TAGVAR(always_export_symbols, $1)=no
5660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5661
5662 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5663 _LT_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'
5664 # If the export-symbols file already is a .def file (1st line
5665 # is EXPORTS), use it as is; otherwise, prepend...
5666 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5667 cp $export_symbols $output_objdir/$soname.def;
5668 else
5669 echo EXPORTS > $output_objdir/$soname.def;
5670 cat $export_symbols >> $output_objdir/$soname.def;
5671 fi~
5672 $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'
5673 else
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5675 fi
5676 ;;
5677 darwin* | rhapsody*)
5678 _LT_DARWIN_LINKER_FEATURES($1)
5679 ;;
5680
5681 dgux*)
5682 case $cc_basename in
5683 ec++*)
5684 # FIXME: insert proper C++ library support
5685 _LT_TAGVAR(ld_shlibs, $1)=no
5686 ;;
5687 ghcx*)
5688 # Green Hills C++ Compiler
5689 # FIXME: insert proper C++ library support
5690 _LT_TAGVAR(ld_shlibs, $1)=no
5691 ;;
5692 *)
5693 # FIXME: insert proper C++ library support
5694 _LT_TAGVAR(ld_shlibs, $1)=no
5695 ;;
5696 esac
5697 ;;
5698
5699 freebsd[[12]]*)
5700 # C++ shared libraries reported to be fairly broken before
5701 # switch to ELF
5702 _LT_TAGVAR(ld_shlibs, $1)=no
5703 ;;
5704
5705 freebsd-elf*)
5706 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5707 ;;
5708
5709 freebsd* | dragonfly*)
5710 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5711 # conventions
5712 _LT_TAGVAR(ld_shlibs, $1)=yes
5713 ;;
5714
5715 gnu*)
5716 ;;
5717
5718 hpux9*)
5719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5720 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5721 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722 _LT_TAGVAR(hardcode_direct, $1)=yes
5723 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5724 # but as the default
5725 # location of the library.
5726
5727 case $cc_basename in
5728 CC*)
5729 # FIXME: insert proper C++ library support
5730 _LT_TAGVAR(ld_shlibs, $1)=no
5731 ;;
5732 aCC*)
5733 _LT_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'
5734 # Commands to make compiler produce verbose output that lists
5735 # what "hidden" libraries, object files and flags are used when
5736 # linking a shared library.
5737 #
5738 # There doesn't appear to be a way to prevent this compiler from
5739 # explicitly linking system object files so we need to strip them
5740 # from the output so that they don't get included in the library
5741 # dependencies.
5742 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5743 ;;
5744 *)
5745 if test "$GXX" = yes; then
5746 _LT_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'
5747 else
5748 # FIXME: insert proper C++ library support
5749 _LT_TAGVAR(ld_shlibs, $1)=no
5750 fi
5751 ;;
5752 esac
5753 ;;
5754
5755 hpux10*|hpux11*)
5756 if test $with_gnu_ld = no; then
5757 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5758 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5759
5760 case $host_cpu in
5761 hppa*64*|ia64*)
5762 ;;
5763 *)
5764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5765 ;;
5766 esac
5767 fi
5768 case $host_cpu in
5769 hppa*64*|ia64*)
5770 _LT_TAGVAR(hardcode_direct, $1)=no
5771 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5772 ;;
5773 *)
5774 _LT_TAGVAR(hardcode_direct, $1)=yes
5775 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5776 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5777 # but as the default
5778 # location of the library.
5779 ;;
5780 esac
5781
5782 case $cc_basename in
5783 CC*)
5784 # FIXME: insert proper C++ library support
5785 _LT_TAGVAR(ld_shlibs, $1)=no
5786 ;;
5787 aCC*)
5788 case $host_cpu in
5789 hppa*64*)
5790 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5791 ;;
5792 ia64*)
5793 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5794 ;;
5795 *)
5796 _LT_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'
5797 ;;
5798 esac
5799 # Commands to make compiler produce verbose output that lists
5800 # what "hidden" libraries, object files and flags are used when
5801 # linking a shared library.
5802 #
5803 # There doesn't appear to be a way to prevent this compiler from
5804 # explicitly linking system object files so we need to strip them
5805 # from the output so that they don't get included in the library
5806 # dependencies.
5807 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 "X$list" | $Xsed'
5808 ;;
5809 *)
5810 if test "$GXX" = yes; then
5811 if test $with_gnu_ld = no; then
5812 case $host_cpu in
5813 hppa*64*)
5814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5815 ;;
5816 ia64*)
5817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5818 ;;
5819 *)
5820 _LT_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'
5821 ;;
5822 esac
5823 fi
5824 else
5825 # FIXME: insert proper C++ library support
5826 _LT_TAGVAR(ld_shlibs, $1)=no
5827 fi
5828 ;;
5829 esac
5830 ;;
5831
5832 interix[[3-9]]*)
5833 _LT_TAGVAR(hardcode_direct, $1)=no
5834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5836 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5837 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5838 # Instead, shared libraries are loaded at an image base (0x10000000 by
5839 # default) and relocated if they conflict, which is a slow very memory
5840 # consuming and fragmenting process. To avoid this, we pick a random,
5841 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5842 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5843 _LT_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'
5844 _LT_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'
5845 ;;
5846 irix5* | irix6*)
5847 case $cc_basename in
5848 CC*)
5849 # SGI C++
5850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5851
5852 # Archives containing C++ object files must be created using
5853 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5854 # necessary to make sure instantiated templates are included
5855 # in the archive.
5856 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5857 ;;
5858 *)
5859 if test "$GXX" = yes; then
5860 if test "$with_gnu_ld" = no; then
5861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5862 else
5863 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5864 fi
5865 fi
5866 _LT_TAGVAR(link_all_deplibs, $1)=yes
5867 ;;
5868 esac
5869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5870 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5871 _LT_TAGVAR(inherit_rpath, $1)=yes
5872 ;;
5873
5874 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5875 case $cc_basename in
5876 KCC*)
5877 # Kuck and Associates, Inc. (KAI) C++ Compiler
5878
5879 # KCC will only create a shared library if the output file
5880 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5881 # to its proper name (with version) after linking.
5882 _LT_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'
5883 _LT_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'
5884 # Commands to make compiler produce verbose output that lists
5885 # what "hidden" libraries, object files and flags are used when
5886 # linking a shared library.
5887 #
5888 # There doesn't appear to be a way to prevent this compiler from
5889 # explicitly linking system object files so we need to strip them
5890 # from the output so that they don't get included in the library
5891 # dependencies.
5892 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 "X$list" | $Xsed'
5893
5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5896
5897 # Archives containing C++ object files must be created using
5898 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5899 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5900 ;;
5901 icpc* | ecpc* )
5902 # Intel C++
5903 with_gnu_ld=yes
5904 # version 8.0 and above of icpc choke on multiply defined symbols
5905 # if we add $predep_objects and $postdep_objects, however 7.1 and
5906 # earlier do not add the objects themselves.
5907 case `$CC -V 2>&1` in
5908 *"Version 7."*)
5909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5910 _LT_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'
5911 ;;
5912 *) # Version 8.0 or newer
5913 tmp_idyn=
5914 case $host_cpu in
5915 ia64*) tmp_idyn=' -i_dynamic';;
5916 esac
5917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5918 _LT_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'
5919 ;;
5920 esac
5921 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5922 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5923 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5924 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5925 ;;
5926 pgCC* | pgcpp*)
5927 # Portland Group C++ compiler
5928 case `$CC -V` in
5929 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5930 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5931 rm -rf $tpldir~
5932 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5933 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5934 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5935 rm -rf $tpldir~
5936 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5937 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5938 $RANLIB $oldlib'
5939 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5940 rm -rf $tpldir~
5941 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5942 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5943 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5944 rm -rf $tpldir~
5945 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5946 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5947 ;;
5948 *) # Version 6 will use weak symbols
5949 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5950 _LT_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'
5951 ;;
5952 esac
5953
5954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5955 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5956 _LT_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'
5957 ;;
5958 cxx*)
5959 # Compaq C++
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5961 _LT_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'
5962
5963 runpath_var=LD_RUN_PATH
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5966
5967 # Commands to make compiler produce verbose output that lists
5968 # what "hidden" libraries, object files and flags are used when
5969 # linking a shared library.
5970 #
5971 # There doesn't appear to be a way to prevent this compiler from
5972 # explicitly linking system object files so we need to strip them
5973 # from the output so that they don't get included in the library
5974 # dependencies.
5975 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
5976 ;;
5977 xl*)
5978 # IBM XL 8.0 on PPC, with GNU ld
5979 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5980 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5981 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5982 if test "x$supports_anon_versioning" = xyes; then
5983 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5984 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5985 echo "local: *; };" >> $output_objdir/$libname.ver~
5986 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5987 fi
5988 ;;
5989 *)
5990 case `$CC -V 2>&1 | sed 5q` in
5991 *Sun\ C*)
5992 # Sun C++ 5.9
5993 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5994 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5995 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5997 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5998 _LT_TAGVAR(compiler_needs_object, $1)=yes
5999
6000 # Not sure whether something based on
6001 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6002 # would be better.
6003 output_verbose_link_cmd='echo'
6004
6005 # Archives containing C++ object files must be created using
6006 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6007 # necessary to make sure instantiated templates are included
6008 # in the archive.
6009 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6010 ;;
6011 esac
6012 ;;
6013 esac
6014 ;;
6015
6016 lynxos*)
6017 # FIXME: insert proper C++ library support
6018 _LT_TAGVAR(ld_shlibs, $1)=no
6019 ;;
6020
6021 m88k*)
6022 # FIXME: insert proper C++ library support
6023 _LT_TAGVAR(ld_shlibs, $1)=no
6024 ;;
6025
6026 mvs*)
6027 case $cc_basename in
6028 cxx*)
6029 # FIXME: insert proper C++ library support
6030 _LT_TAGVAR(ld_shlibs, $1)=no
6031 ;;
6032 *)
6033 # FIXME: insert proper C++ library support
6034 _LT_TAGVAR(ld_shlibs, $1)=no
6035 ;;
6036 esac
6037 ;;
6038
6039 netbsd*)
6040 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6041 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6042 wlarc=
6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044 _LT_TAGVAR(hardcode_direct, $1)=yes
6045 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6046 fi
6047 # Workaround some broken pre-1.5 toolchains
6048 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6049 ;;
6050
6051 *nto* | *qnx*)
6052 _LT_TAGVAR(ld_shlibs, $1)=yes
6053 ;;
6054
6055 openbsd2*)
6056 # C++ shared libraries are fairly broken
6057 _LT_TAGVAR(ld_shlibs, $1)=no
6058 ;;
6059
6060 openbsd*)
6061 if test -f /usr/libexec/ld.so; then
6062 _LT_TAGVAR(hardcode_direct, $1)=yes
6063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6064 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6065 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6067 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6068 _LT_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'
6069 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6070 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6071 fi
6072 output_verbose_link_cmd=echo
6073 else
6074 _LT_TAGVAR(ld_shlibs, $1)=no
6075 fi
6076 ;;
6077
6078 osf3* | osf4* | osf5*)
6079 case $cc_basename in
6080 KCC*)
6081 # Kuck and Associates, Inc. (KAI) C++ Compiler
6082
6083 # KCC will only create a shared library if the output file
6084 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6085 # to its proper name (with version) after linking.
6086 _LT_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'
6087
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6090
6091 # Archives containing C++ object files must be created using
6092 # the KAI C++ compiler.
6093 case $host in
6094 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6095 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6096 esac
6097 ;;
6098 RCC*)
6099 # Rational C++ 2.4.1
6100 # FIXME: insert proper C++ library support
6101 _LT_TAGVAR(ld_shlibs, $1)=no
6102 ;;
6103 cxx*)
6104 case $host in
6105 osf3*)
6106 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6107 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6109 ;;
6110 *)
6111 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6113 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6114 echo "-hidden">> $lib.exp~
6115 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6116 $RM $lib.exp'
6117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6118 ;;
6119 esac
6120
6121 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6122
6123 # Commands to make compiler produce verbose output that lists
6124 # what "hidden" libraries, object files and flags are used when
6125 # linking a shared library.
6126 #
6127 # There doesn't appear to be a way to prevent this compiler from
6128 # explicitly linking system object files so we need to strip them
6129 # from the output so that they don't get included in the library
6130 # dependencies.
6131 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6132 ;;
6133 *)
6134 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6135 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6136 case $host in
6137 osf3*)
6138 _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6139 ;;
6140 *)
6141 _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6142 ;;
6143 esac
6144
6145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6146 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6147
6148 # Commands to make compiler produce verbose output that lists
6149 # what "hidden" libraries, object files and flags are used when
6150 # linking a shared library.
6151 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6152
6153 else
6154 # FIXME: insert proper C++ library support
6155 _LT_TAGVAR(ld_shlibs, $1)=no
6156 fi
6157 ;;
6158 esac
6159 ;;
6160
6161 psos*)
6162 # FIXME: insert proper C++ library support
6163 _LT_TAGVAR(ld_shlibs, $1)=no
6164 ;;
6165
6166 sunos4*)
6167 case $cc_basename in
6168 CC*)
6169 # Sun C++ 4.x
6170 # FIXME: insert proper C++ library support
6171 _LT_TAGVAR(ld_shlibs, $1)=no
6172 ;;
6173 lcc*)
6174 # Lucid
6175 # FIXME: insert proper C++ library support
6176 _LT_TAGVAR(ld_shlibs, $1)=no
6177 ;;
6178 *)
6179 # FIXME: insert proper C++ library support
6180 _LT_TAGVAR(ld_shlibs, $1)=no
6181 ;;
6182 esac
6183 ;;
6184
6185 solaris*)
6186 case $cc_basename in
6187 CC*)
6188 # Sun C++ 4.2, 5.x and Centerline C++
6189 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6190 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6191 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6192 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6193 $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'
6194
6195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6196 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6197 case $host_os in
6198 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6199 *)
6200 # The compiler driver will combine and reorder linker options,
6201 # but understands `-z linker_flag'.
6202 # Supported since Solaris 2.6 (maybe 2.5.1?)
6203 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6204 ;;
6205 esac
6206 _LT_TAGVAR(link_all_deplibs, $1)=yes
6207
6208 output_verbose_link_cmd='echo'
6209
6210 # Archives containing C++ object files must be created using
6211 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6212 # necessary to make sure instantiated templates are included
6213 # in the archive.
6214 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6215 ;;
6216 gcx*)
6217 # Green Hills C++ Compiler
6218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219
6220 # The C++ compiler must be used to create the archive.
6221 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6222 ;;
6223 *)
6224 # GNU C++ compiler with Solaris linker
6225 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6226 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6227 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6228 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6229 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6231
6232 # Commands to make compiler produce verbose output that lists
6233 # what "hidden" libraries, object files and flags are used when
6234 # linking a shared library.
6235 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6236 else
6237 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6238 # platform.
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6240 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6241 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6242
6243 # Commands to make compiler produce verbose output that lists
6244 # what "hidden" libraries, object files and flags are used when
6245 # linking a shared library.
6246 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6247 fi
6248
6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6250 case $host_os in
6251 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6252 *)
6253 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6254 ;;
6255 esac
6256 fi
6257 ;;
6258 esac
6259 ;;
6260
6261 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6262 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6263 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6264 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6265 runpath_var='LD_RUN_PATH'
6266
6267 case $cc_basename in
6268 CC*)
6269 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6270 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6271 ;;
6272 *)
6273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6274 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6275 ;;
6276 esac
6277 ;;
6278
6279 sysv5* | sco3.2v5* | sco5v6*)
6280 # Note: We can NOT use -z defs as we might desire, because we do not
6281 # link with -lc, and that would cause any symbols used from libc to
6282 # always be unresolved, which means just about no library would
6283 # ever link correctly. If we're not using GNU ld we use -z text
6284 # though, which does catch some bad symbols but isn't as heavy-handed
6285 # as -z defs.
6286 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6287 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6288 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6289 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6291 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6292 _LT_TAGVAR(link_all_deplibs, $1)=yes
6293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6294 runpath_var='LD_RUN_PATH'
6295
6296 case $cc_basename in
6297 CC*)
6298 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6299 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6300 ;;
6301 *)
6302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6303 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6304 ;;
6305 esac
6306 ;;
6307
6308 tandem*)
6309 case $cc_basename in
6310 NCC*)
6311 # NonStop-UX NCC 3.20
6312 # FIXME: insert proper C++ library support
6313 _LT_TAGVAR(ld_shlibs, $1)=no
6314 ;;
6315 *)
6316 # FIXME: insert proper C++ library support
6317 _LT_TAGVAR(ld_shlibs, $1)=no
6318 ;;
6319 esac
6320 ;;
6321
6322 vxworks*)
6323 # FIXME: insert proper C++ library support
6324 _LT_TAGVAR(ld_shlibs, $1)=no
6325 ;;
6326
6327 *)
6328 # FIXME: insert proper C++ library support
6329 _LT_TAGVAR(ld_shlibs, $1)=no
6330 ;;
6331 esac
6332
6333 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6334 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6335
6336 _LT_TAGVAR(GCC, $1)="$GXX"
6337 _LT_TAGVAR(LD, $1)="$LD"
6338
6339 ## CAVEAT EMPTOR:
6340 ## There is no encapsulation within the following macros, do not change
6341 ## the running order or otherwise move them around unless you know exactly
6342 ## what you are doing...
6343 _LT_SYS_HIDDEN_LIBDEPS($1)
6344 _LT_COMPILER_PIC($1)
6345 _LT_COMPILER_C_O($1)
6346 _LT_COMPILER_FILE_LOCKS($1)
6347 _LT_LINKER_SHLIBS($1)
6348 _LT_SYS_DYNAMIC_LINKER($1)
6349 _LT_LINKER_HARDCODE_LIBPATH($1)
6350
6351 _LT_CONFIG($1)
6352 fi # test -n "$compiler"
6353
6354 CC=$lt_save_CC
6355 LDCXX=$LD
6356 LD=$lt_save_LD
6357 GCC=$lt_save_GCC
6358 with_gnu_ld=$lt_save_with_gnu_ld
6359 lt_cv_path_LDCXX=$lt_cv_path_LD
6360 lt_cv_path_LD=$lt_save_path_LD
6361 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6362 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6363 fi # test "$_lt_caught_CXX_error" != yes
6364
6365 AC_LANG_POP
6366 ])# _LT_LANG_CXX_CONFIG
6367
6368
6369 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6370 # ---------------------------------
6371 # Figure out "hidden" library dependencies from verbose
6372 # compiler output when linking a shared library.
6373 # Parse the compiler output and extract the necessary
6374 # objects, libraries and library flags.
6375 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6376 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6377 # Dependencies to place before and after the object being linked:
6378 _LT_TAGVAR(predep_objects, $1)=
6379 _LT_TAGVAR(postdep_objects, $1)=
6380 _LT_TAGVAR(predeps, $1)=
6381 _LT_TAGVAR(postdeps, $1)=
6382 _LT_TAGVAR(compiler_lib_search_path, $1)=
6383
6384 dnl we can't use the lt_simple_compile_test_code here,
6385 dnl because it contains code intended for an executable,
6386 dnl not a library. It's possible we should let each
6387 dnl tag define a new lt_????_link_test_code variable,
6388 dnl but it's only used here...
6389 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6390 int a;
6391 void foo (void) { a = 0; }
6392 _LT_EOF
6393 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6394 class Foo
6395 {
6396 public:
6397 Foo (void) { a = 0; }
6398 private:
6399 int a;
6400 };
6401 _LT_EOF
6402 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6403 subroutine foo
6404 implicit none
6405 integer*4 a
6406 a=0
6407 return
6408 end
6409 _LT_EOF
6410 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6411 subroutine foo
6412 implicit none
6413 integer a
6414 a=0
6415 return
6416 end
6417 _LT_EOF
6418 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6419 public class foo {
6420 private int a;
6421 public void bar (void) {
6422 a = 0;
6423 }
6424 };
6425 _LT_EOF
6426 ])
6427 dnl Parse the compiler output and extract the necessary
6428 dnl objects, libraries and library flags.
6429 if AC_TRY_EVAL(ac_compile); then
6430 # Parse the compiler output and extract the necessary
6431 # objects, libraries and library flags.
6432
6433 # Sentinel used to keep track of whether or not we are before
6434 # the conftest object file.
6435 pre_test_object_deps_done=no
6436
6437 for p in `eval "$output_verbose_link_cmd"`; do
6438 case $p in
6439
6440 -L* | -R* | -l*)
6441 # Some compilers place space between "-{L,R}" and the path.
6442 # Remove the space.
6443 if test $p = "-L" ||
6444 test $p = "-R"; then
6445 prev=$p
6446 continue
6447 else
6448 prev=
6449 fi
6450
6451 if test "$pre_test_object_deps_done" = no; then
6452 case $p in
6453 -L* | -R*)
6454 # Internal compiler library paths should come after those
6455 # provided the user. The postdeps already come after the
6456 # user supplied libs so there is no need to process them.
6457 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6458 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6459 else
6460 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6461 fi
6462 ;;
6463 # The "-l" case would never come before the object being
6464 # linked, so don't bother handling this case.
6465 esac
6466 else
6467 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6468 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6469 else
6470 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6471 fi
6472 fi
6473 ;;
6474
6475 *.$objext)
6476 # This assumes that the test object file only shows up
6477 # once in the compiler output.
6478 if test "$p" = "conftest.$objext"; then
6479 pre_test_object_deps_done=yes
6480 continue
6481 fi
6482
6483 if test "$pre_test_object_deps_done" = no; then
6484 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6485 _LT_TAGVAR(predep_objects, $1)="$p"
6486 else
6487 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6488 fi
6489 else
6490 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6491 _LT_TAGVAR(postdep_objects, $1)="$p"
6492 else
6493 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6494 fi
6495 fi
6496 ;;
6497
6498 *) ;; # Ignore the rest.
6499
6500 esac
6501 done
6502
6503 # Clean up.
6504 rm -f a.out a.exe
6505 else
6506 echo "libtool.m4: error: problem compiling $1 test program"
6507 fi
6508
6509 $RM -f confest.$objext
6510
6511 # PORTME: override above test on systems where it is broken
6512 m4_if([$1], [CXX],
6513 [case $host_os in
6514 interix[[3-9]]*)
6515 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6516 # hack all around it, let's just trust "g++" to DTRT.
6517 _LT_TAGVAR(predep_objects,$1)=
6518 _LT_TAGVAR(postdep_objects,$1)=
6519 _LT_TAGVAR(postdeps,$1)=
6520 ;;
6521
6522 linux*)
6523 case `$CC -V 2>&1 | sed 5q` in
6524 *Sun\ C*)
6525 # Sun C++ 5.9
6526
6527 # The more standards-conforming stlport4 library is
6528 # incompatible with the Cstd library. Avoid specifying
6529 # it if it's in CXXFLAGS. Ignore libCrun as
6530 # -library=stlport4 depends on it.
6531 case " $CXX $CXXFLAGS " in
6532 *" -library=stlport4 "*)
6533 solaris_use_stlport4=yes
6534 ;;
6535 esac
6536
6537 if test "$solaris_use_stlport4" != yes; then
6538 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6539 fi
6540 ;;
6541 esac
6542 ;;
6543
6544 solaris*)
6545 case $cc_basename in
6546 CC*)
6547 # The more standards-conforming stlport4 library is
6548 # incompatible with the Cstd library. Avoid specifying
6549 # it if it's in CXXFLAGS. Ignore libCrun as
6550 # -library=stlport4 depends on it.
6551 case " $CXX $CXXFLAGS " in
6552 *" -library=stlport4 "*)
6553 solaris_use_stlport4=yes
6554 ;;
6555 esac
6556
6557 # Adding this requires a known-good setup of shared libraries for
6558 # Sun compiler versions before 5.6, else PIC objects from an old
6559 # archive will be linked into the output, leading to subtle bugs.
6560 if test "$solaris_use_stlport4" != yes; then
6561 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6562 fi
6563 ;;
6564 esac
6565 ;;
6566 esac
6567 ])
6568
6569 case " $_LT_TAGVAR(postdeps, $1) " in
6570 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6571 esac
6572 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6573 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6574 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6575 fi
6576 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6577 [The directories searched by this compiler when creating a shared library])
6578 _LT_TAGDECL([], [predep_objects], [1],
6579 [Dependencies to place before and after the objects being linked to
6580 create a shared library])
6581 _LT_TAGDECL([], [postdep_objects], [1])
6582 _LT_TAGDECL([], [predeps], [1])
6583 _LT_TAGDECL([], [postdeps], [1])
6584 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6585 [The library search path used internally by the compiler when linking
6586 a shared library])
6587 ])# _LT_SYS_HIDDEN_LIBDEPS
6588
6589
6590 # _LT_PROG_F77
6591 # ------------
6592 # Since AC_PROG_F77 is broken, in that it returns the empty string
6593 # if there is no fortran compiler, we have our own version here.
6594 m4_defun([_LT_PROG_F77],
6595 [
6596 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6597 AC_PROG_F77
6598 if test -z "$F77" || test "X$F77" = "Xno"; then
6599 _lt_disable_F77=yes
6600 fi
6601 popdef([AC_MSG_ERROR])
6602 ])# _LT_PROG_F77
6603
6604 dnl aclocal-1.4 backwards compatibility:
6605 dnl AC_DEFUN([_LT_PROG_F77], [])
6606
6607
6608 # _LT_LANG_F77_CONFIG([TAG])
6609 # --------------------------
6610 # Ensure that the configuration variables for a Fortran 77 compiler are
6611 # suitably defined. These variables are subsequently used by _LT_CONFIG
6612 # to write the compiler configuration to `libtool'.
6613 m4_defun([_LT_LANG_F77_CONFIG],
6614 [AC_REQUIRE([_LT_PROG_F77])dnl
6615 AC_LANG_PUSH(Fortran 77)
6616
6617 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6618 _LT_TAGVAR(allow_undefined_flag, $1)=
6619 _LT_TAGVAR(always_export_symbols, $1)=no
6620 _LT_TAGVAR(archive_expsym_cmds, $1)=
6621 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6622 _LT_TAGVAR(hardcode_direct, $1)=no
6623 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6625 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6626 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6627 _LT_TAGVAR(hardcode_minus_L, $1)=no
6628 _LT_TAGVAR(hardcode_automatic, $1)=no
6629 _LT_TAGVAR(inherit_rpath, $1)=no
6630 _LT_TAGVAR(module_cmds, $1)=
6631 _LT_TAGVAR(module_expsym_cmds, $1)=
6632 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6633 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6634 _LT_TAGVAR(no_undefined_flag, $1)=
6635 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6636 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6637
6638 # Source file extension for f77 test sources.
6639 ac_ext=f
6640
6641 # Object file extension for compiled f77 test sources.
6642 objext=o
6643 _LT_TAGVAR(objext, $1)=$objext
6644
6645 # No sense in running all these tests if we already determined that
6646 # the F77 compiler isn't working. Some variables (like enable_shared)
6647 # are currently assumed to apply to all compilers on this platform,
6648 # and will be corrupted by setting them based on a non-working compiler.
6649 if test "$_lt_disable_F77" != yes; then
6650 # Code to be used in simple compile tests
6651 lt_simple_compile_test_code="\
6652 subroutine t
6653 return
6654 end
6655 "
6656
6657 # Code to be used in simple link tests
6658 lt_simple_link_test_code="\
6659 program t
6660 end
6661 "
6662
6663 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6664 _LT_TAG_COMPILER
6665
6666 # save warnings/boilerplate of simple test code
6667 _LT_COMPILER_BOILERPLATE
6668 _LT_LINKER_BOILERPLATE
6669
6670 # Allow CC to be a program name with arguments.
6671 lt_save_CC="$CC"
6672 lt_save_GCC=$GCC
6673 CC=${F77-"f77"}
6674 compiler=$CC
6675 _LT_TAGVAR(compiler, $1)=$CC
6676 _LT_CC_BASENAME([$compiler])
6677 GCC=$G77
6678 if test -n "$compiler"; then
6679 AC_MSG_CHECKING([if libtool supports shared libraries])
6680 AC_MSG_RESULT([$can_build_shared])
6681
6682 AC_MSG_CHECKING([whether to build shared libraries])
6683 test "$can_build_shared" = "no" && enable_shared=no
6684
6685 # On AIX, shared libraries and static libraries use the same namespace, and
6686 # are all built from PIC.
6687 case $host_os in
6688 aix3*)
6689 test "$enable_shared" = yes && enable_static=no
6690 if test -n "$RANLIB"; then
6691 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6692 postinstall_cmds='$RANLIB $lib'
6693 fi
6694 ;;
6695 aix[[4-9]]*)
6696 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6697 test "$enable_shared" = yes && enable_static=no
6698 fi
6699 ;;
6700 esac
6701 AC_MSG_RESULT([$enable_shared])
6702
6703 AC_MSG_CHECKING([whether to build static libraries])
6704 # Make sure either enable_shared or enable_static is yes.
6705 test "$enable_shared" = yes || enable_static=yes
6706 AC_MSG_RESULT([$enable_static])
6707
6708 _LT_TAGVAR(GCC, $1)="$G77"
6709 _LT_TAGVAR(LD, $1)="$LD"
6710
6711 ## CAVEAT EMPTOR:
6712 ## There is no encapsulation within the following macros, do not change
6713 ## the running order or otherwise move them around unless you know exactly
6714 ## what you are doing...
6715 _LT_COMPILER_PIC($1)
6716 _LT_COMPILER_C_O($1)
6717 _LT_COMPILER_FILE_LOCKS($1)
6718 _LT_LINKER_SHLIBS($1)
6719 _LT_SYS_DYNAMIC_LINKER($1)
6720 _LT_LINKER_HARDCODE_LIBPATH($1)
6721
6722 _LT_CONFIG($1)
6723 fi # test -n "$compiler"
6724
6725 GCC=$lt_save_GCC
6726 CC="$lt_save_CC"
6727 fi # test "$_lt_disable_F77" != yes
6728
6729 AC_LANG_POP
6730 ])# _LT_LANG_F77_CONFIG
6731
6732
6733 # _LT_PROG_FC
6734 # -----------
6735 # Since AC_PROG_FC is broken, in that it returns the empty string
6736 # if there is no fortran compiler, we have our own version here.
6737 m4_defun([_LT_PROG_FC],
6738 [
6739 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6740 AC_PROG_FC
6741 if test -z "$FC" || test "X$FC" = "Xno"; then
6742 _lt_disable_FC=yes
6743 fi
6744 popdef([AC_MSG_ERROR])
6745 ])# _LT_PROG_FC
6746
6747 dnl aclocal-1.4 backwards compatibility:
6748 dnl AC_DEFUN([_LT_PROG_FC], [])
6749
6750
6751 # _LT_LANG_FC_CONFIG([TAG])
6752 # -------------------------
6753 # Ensure that the configuration variables for a Fortran compiler are
6754 # suitably defined. These variables are subsequently used by _LT_CONFIG
6755 # to write the compiler configuration to `libtool'.
6756 m4_defun([_LT_LANG_FC_CONFIG],
6757 [AC_REQUIRE([_LT_PROG_FC])dnl
6758 AC_LANG_PUSH(Fortran)
6759
6760 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6761 _LT_TAGVAR(allow_undefined_flag, $1)=
6762 _LT_TAGVAR(always_export_symbols, $1)=no
6763 _LT_TAGVAR(archive_expsym_cmds, $1)=
6764 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6765 _LT_TAGVAR(hardcode_direct, $1)=no
6766 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6768 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6769 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6770 _LT_TAGVAR(hardcode_minus_L, $1)=no
6771 _LT_TAGVAR(hardcode_automatic, $1)=no
6772 _LT_TAGVAR(inherit_rpath, $1)=no
6773 _LT_TAGVAR(module_cmds, $1)=
6774 _LT_TAGVAR(module_expsym_cmds, $1)=
6775 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6776 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777 _LT_TAGVAR(no_undefined_flag, $1)=
6778 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6779 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6780
6781 # Source file extension for fc test sources.
6782 ac_ext=${ac_fc_srcext-f}
6783
6784 # Object file extension for compiled fc test sources.
6785 objext=o
6786 _LT_TAGVAR(objext, $1)=$objext
6787
6788 # No sense in running all these tests if we already determined that
6789 # the FC compiler isn't working. Some variables (like enable_shared)
6790 # are currently assumed to apply to all compilers on this platform,
6791 # and will be corrupted by setting them based on a non-working compiler.
6792 if test "$_lt_disable_FC" != yes; then
6793 # Code to be used in simple compile tests
6794 lt_simple_compile_test_code="\
6795 subroutine t
6796 return
6797 end
6798 "
6799
6800 # Code to be used in simple link tests
6801 lt_simple_link_test_code="\
6802 program t
6803 end
6804 "
6805
6806 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6807 _LT_TAG_COMPILER
6808
6809 # save warnings/boilerplate of simple test code
6810 _LT_COMPILER_BOILERPLATE
6811 _LT_LINKER_BOILERPLATE
6812
6813 # Allow CC to be a program name with arguments.
6814 lt_save_CC="$CC"
6815 lt_save_GCC=$GCC
6816 CC=${FC-"f95"}
6817 compiler=$CC
6818 GCC=$ac_cv_fc_compiler_gnu
6819
6820 _LT_TAGVAR(compiler, $1)=$CC
6821 _LT_CC_BASENAME([$compiler])
6822
6823 if test -n "$compiler"; then
6824 AC_MSG_CHECKING([if libtool supports shared libraries])
6825 AC_MSG_RESULT([$can_build_shared])
6826
6827 AC_MSG_CHECKING([whether to build shared libraries])
6828 test "$can_build_shared" = "no" && enable_shared=no
6829
6830 # On AIX, shared libraries and static libraries use the same namespace, and
6831 # are all built from PIC.
6832 case $host_os in
6833 aix3*)
6834 test "$enable_shared" = yes && enable_static=no
6835 if test -n "$RANLIB"; then
6836 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6837 postinstall_cmds='$RANLIB $lib'
6838 fi
6839 ;;
6840 aix[[4-9]]*)
6841 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6842 test "$enable_shared" = yes && enable_static=no
6843 fi
6844 ;;
6845 esac
6846 AC_MSG_RESULT([$enable_shared])
6847
6848 AC_MSG_CHECKING([whether to build static libraries])
6849 # Make sure either enable_shared or enable_static is yes.
6850 test "$enable_shared" = yes || enable_static=yes
6851 AC_MSG_RESULT([$enable_static])
6852
6853 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6854 _LT_TAGVAR(LD, $1)="$LD"
6855
6856 ## CAVEAT EMPTOR:
6857 ## There is no encapsulation within the following macros, do not change
6858 ## the running order or otherwise move them around unless you know exactly
6859 ## what you are doing...
6860 _LT_SYS_HIDDEN_LIBDEPS($1)
6861 _LT_COMPILER_PIC($1)
6862 _LT_COMPILER_C_O($1)
6863 _LT_COMPILER_FILE_LOCKS($1)
6864 _LT_LINKER_SHLIBS($1)
6865 _LT_SYS_DYNAMIC_LINKER($1)
6866 _LT_LINKER_HARDCODE_LIBPATH($1)
6867
6868 _LT_CONFIG($1)
6869 fi # test -n "$compiler"
6870
6871 GCC=$lt_save_GCC
6872 CC="$lt_save_CC"
6873 fi # test "$_lt_disable_FC" != yes
6874
6875 AC_LANG_POP
6876 ])# _LT_LANG_FC_CONFIG
6877
6878
6879 # _LT_LANG_GCJ_CONFIG([TAG])
6880 # --------------------------
6881 # Ensure that the configuration variables for the GNU Java Compiler compiler
6882 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6883 # to write the compiler configuration to `libtool'.
6884 m4_defun([_LT_LANG_GCJ_CONFIG],
6885 [AC_REQUIRE([LT_PROG_GCJ])dnl
6886 AC_LANG_SAVE
6887
6888 # Source file extension for Java test sources.
6889 ac_ext=java
6890
6891 # Object file extension for compiled Java test sources.
6892 objext=o
6893 _LT_TAGVAR(objext, $1)=$objext
6894
6895 # Code to be used in simple compile tests
6896 lt_simple_compile_test_code="class foo {}"
6897
6898 # Code to be used in simple link tests
6899 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6900
6901 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6902 _LT_TAG_COMPILER
6903
6904 # save warnings/boilerplate of simple test code
6905 _LT_COMPILER_BOILERPLATE
6906 _LT_LINKER_BOILERPLATE
6907
6908 # Allow CC to be a program name with arguments.
6909 lt_save_CC="$CC"
6910 lt_save_GCC=$GCC
6911 GCC=yes
6912 CC=${GCJ-"gcj"}
6913 compiler=$CC
6914 _LT_TAGVAR(compiler, $1)=$CC
6915 _LT_TAGVAR(LD, $1)="$LD"
6916 _LT_CC_BASENAME([$compiler])
6917
6918 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6919 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6920
6921 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6922
6923 if test -n "$compiler"; then
6924 _LT_COMPILER_NO_RTTI($1)
6925 _LT_COMPILER_PIC($1)
6926 _LT_COMPILER_C_O($1)
6927 _LT_COMPILER_FILE_LOCKS($1)
6928 _LT_LINKER_SHLIBS($1)
6929 _LT_LINKER_HARDCODE_LIBPATH($1)
6930
6931 _LT_CONFIG($1)
6932 fi
6933
6934 AC_LANG_RESTORE
6935
6936 GCC=$lt_save_GCC
6937 CC="$lt_save_CC"
6938 ])# _LT_LANG_GCJ_CONFIG
6939
6940
6941 # _LT_LANG_RC_CONFIG([TAG])
6942 # -------------------------
6943 # Ensure that the configuration variables for the Windows resource compiler
6944 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6945 # to write the compiler configuration to `libtool'.
6946 m4_defun([_LT_LANG_RC_CONFIG],
6947 [AC_REQUIRE([LT_PROG_RC])dnl
6948 AC_LANG_SAVE
6949
6950 # Source file extension for RC test sources.
6951 ac_ext=rc
6952
6953 # Object file extension for compiled RC test sources.
6954 objext=o
6955 _LT_TAGVAR(objext, $1)=$objext
6956
6957 # Code to be used in simple compile tests
6958 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6959
6960 # Code to be used in simple link tests
6961 lt_simple_link_test_code="$lt_simple_compile_test_code"
6962
6963 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6964 _LT_TAG_COMPILER
6965
6966 # save warnings/boilerplate of simple test code
6967 _LT_COMPILER_BOILERPLATE
6968 _LT_LINKER_BOILERPLATE
6969
6970 # Allow CC to be a program name with arguments.
6971 lt_save_CC="$CC"
6972 lt_save_GCC=$GCC
6973 GCC=
6974 CC=${RC-"windres"}
6975 compiler=$CC
6976 _LT_TAGVAR(compiler, $1)=$CC
6977 _LT_CC_BASENAME([$compiler])
6978 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6979
6980 if test -n "$compiler"; then
6981 :
6982 _LT_CONFIG($1)
6983 fi
6984
6985 GCC=$lt_save_GCC
6986 AC_LANG_RESTORE
6987 CC="$lt_save_CC"
6988 ])# _LT_LANG_RC_CONFIG
6989
6990
6991 # LT_PROG_GCJ
6992 # -----------
6993 AC_DEFUN([LT_PROG_GCJ],
6994 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6995 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6996 [AC_CHECK_TOOL(GCJ, gcj,)
6997 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6998 AC_SUBST(GCJFLAGS)])])[]dnl
6999 ])
7000
7001 # Old name:
7002 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7003 dnl aclocal-1.4 backwards compatibility:
7004 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7005
7006
7007 # LT_PROG_RC
7008 # ----------
7009 AC_DEFUN([LT_PROG_RC],
7010 [AC_CHECK_TOOL(RC, windres,)
7011 ])
7012
7013 # Old name:
7014 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7015 dnl aclocal-1.4 backwards compatibility:
7016 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7017
7018
7019 # _LT_DECL_EGREP
7020 # --------------
7021 # If we don't have a new enough Autoconf to choose the best grep
7022 # available, choose the one first in the user's PATH.
7023 m4_defun([_LT_DECL_EGREP],
7024 [AC_REQUIRE([AC_PROG_EGREP])dnl
7025 AC_REQUIRE([AC_PROG_FGREP])dnl
7026 test -z "$GREP" && GREP=grep
7027 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7028 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7029 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7030 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7031 AC_SUBST([GREP])
7032 ])
7033
7034
7035 # _LT_DECL_OBJDUMP
7036 # --------------
7037 # If we don't have a new enough Autoconf to choose the best objdump
7038 # available, choose the one first in the user's PATH.
7039 m4_defun([_LT_DECL_OBJDUMP],
7040 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7041 test -z "$OBJDUMP" && OBJDUMP=objdump
7042 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7043 AC_SUBST([OBJDUMP])
7044 ])
7045
7046
7047 # _LT_DECL_SED
7048 # ------------
7049 # Check for a fully-functional sed program, that truncates
7050 # as few characters as possible. Prefer GNU sed if found.
7051 m4_defun([_LT_DECL_SED],
7052 [AC_PROG_SED
7053 test -z "$SED" && SED=sed
7054 Xsed="$SED -e 1s/^X//"
7055 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7056 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7057 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7058 ])# _LT_DECL_SED
7059
7060 m4_ifndef([AC_PROG_SED], [
7061 # NOTE: This macro has been submitted for inclusion into #
7062 # GNU Autoconf as AC_PROG_SED. When it is available in #
7063 # a released version of Autoconf we should remove this #
7064 # macro and use it instead. #
7065
7066 m4_defun([AC_PROG_SED],
7067 [AC_MSG_CHECKING([for a sed that does not truncate output])
7068 AC_CACHE_VAL(lt_cv_path_SED,
7069 [# Loop through the user's path and test for sed and gsed.
7070 # Then use that list of sed's as ones to test for truncation.
7071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072 for as_dir in $PATH
7073 do
7074 IFS=$as_save_IFS
7075 test -z "$as_dir" && as_dir=.
7076 for lt_ac_prog in sed gsed; do
7077 for ac_exec_ext in '' $ac_executable_extensions; do
7078 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7079 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7080 fi
7081 done
7082 done
7083 done
7084 IFS=$as_save_IFS
7085 lt_ac_max=0
7086 lt_ac_count=0
7087 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7088 # along with /bin/sed that truncates output.
7089 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7090 test ! -f $lt_ac_sed && continue
7091 cat /dev/null > conftest.in
7092 lt_ac_count=0
7093 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7094 # Check for GNU sed and select it if it is found.
7095 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7096 lt_cv_path_SED=$lt_ac_sed
7097 break
7098 fi
7099 while true; do
7100 cat conftest.in conftest.in >conftest.tmp
7101 mv conftest.tmp conftest.in
7102 cp conftest.in conftest.nl
7103 echo >>conftest.nl
7104 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7105 cmp -s conftest.out conftest.nl || break
7106 # 10000 chars as input seems more than enough
7107 test $lt_ac_count -gt 10 && break
7108 lt_ac_count=`expr $lt_ac_count + 1`
7109 if test $lt_ac_count -gt $lt_ac_max; then
7110 lt_ac_max=$lt_ac_count
7111 lt_cv_path_SED=$lt_ac_sed
7112 fi
7113 done
7114 done
7115 ])
7116 SED=$lt_cv_path_SED
7117 AC_SUBST([SED])
7118 AC_MSG_RESULT([$SED])
7119 ])#AC_PROG_SED
7120 ])#m4_ifndef
7121
7122 # Old name:
7123 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7124 dnl aclocal-1.4 backwards compatibility:
7125 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7126
7127
7128 # _LT_CHECK_SHELL_FEATURES
7129 # ------------------------
7130 # Find out whether the shell is Bourne or XSI compatible,
7131 # or has some other useful features.
7132 m4_defun([_LT_CHECK_SHELL_FEATURES],
7133 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7134 # Try some XSI features
7135 xsi_shell=no
7136 ( _lt_dummy="a/b/c"
7137 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7138 = c,a/b,, \
7139 && eval 'test $(( 1 + 1 )) -eq 2 \
7140 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7141 && xsi_shell=yes
7142 AC_MSG_RESULT([$xsi_shell])
7143 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7144
7145 AC_MSG_CHECKING([whether the shell understands "+="])
7146 lt_shell_append=no
7147 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7148 >/dev/null 2>&1 \
7149 && lt_shell_append=yes
7150 AC_MSG_RESULT([$lt_shell_append])
7151 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7152
7153 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7154 lt_unset=unset
7155 else
7156 lt_unset=false
7157 fi
7158 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7159
7160 # test EBCDIC or ASCII
7161 case `echo X|tr X '\101'` in
7162 A) # ASCII based system
7163 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7164 lt_SP2NL='tr \040 \012'
7165 lt_NL2SP='tr \015\012 \040\040'
7166 ;;
7167 *) # EBCDIC based system
7168 lt_SP2NL='tr \100 \n'
7169 lt_NL2SP='tr \r\n \100\100'
7170 ;;
7171 esac
7172 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7173 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7174 ])# _LT_CHECK_SHELL_FEATURES
7175
7176
7177 # _LT_PROG_XSI_SHELLFNS
7178 # ---------------------
7179 # Bourne and XSI compatible variants of some useful shell functions.
7180 m4_defun([_LT_PROG_XSI_SHELLFNS],
7181 [case $xsi_shell in
7182 yes)
7183 cat << \_LT_EOF >> "$cfgfile"
7184
7185 # func_dirname file append nondir_replacement
7186 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7187 # otherwise set result to NONDIR_REPLACEMENT.
7188 func_dirname ()
7189 {
7190 case ${1} in
7191 */*) func_dirname_result="${1%/*}${2}" ;;
7192 * ) func_dirname_result="${3}" ;;
7193 esac
7194 }
7195
7196 # func_basename file
7197 func_basename ()
7198 {
7199 func_basename_result="${1##*/}"
7200 }
7201
7202 # func_dirname_and_basename file append nondir_replacement
7203 # perform func_basename and func_dirname in a single function
7204 # call:
7205 # dirname: Compute the dirname of FILE. If nonempty,
7206 # add APPEND to the result, otherwise set result
7207 # to NONDIR_REPLACEMENT.
7208 # value returned in "$func_dirname_result"
7209 # basename: Compute filename of FILE.
7210 # value retuned in "$func_basename_result"
7211 # Implementation must be kept synchronized with func_dirname
7212 # and func_basename. For efficiency, we do not delegate to
7213 # those functions but instead duplicate the functionality here.
7214 func_dirname_and_basename ()
7215 {
7216 case ${1} in
7217 */*) func_dirname_result="${1%/*}${2}" ;;
7218 * ) func_dirname_result="${3}" ;;
7219 esac
7220 func_basename_result="${1##*/}"
7221 }
7222
7223 # func_stripname prefix suffix name
7224 # strip PREFIX and SUFFIX off of NAME.
7225 # PREFIX and SUFFIX must not contain globbing or regex special
7226 # characters, hashes, percent signs, but SUFFIX may contain a leading
7227 # dot (in which case that matches only a dot).
7228 func_stripname ()
7229 {
7230 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7231 # positional parameters, so assign one to ordinary parameter first.
7232 func_stripname_result=${3}
7233 func_stripname_result=${func_stripname_result#"${1}"}
7234 func_stripname_result=${func_stripname_result%"${2}"}
7235 }
7236
7237 # func_opt_split
7238 func_opt_split ()
7239 {
7240 func_opt_split_opt=${1%%=*}
7241 func_opt_split_arg=${1#*=}
7242 }
7243
7244 # func_lo2o object
7245 func_lo2o ()
7246 {
7247 case ${1} in
7248 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7249 *) func_lo2o_result=${1} ;;
7250 esac
7251 }
7252
7253 # func_xform libobj-or-source
7254 func_xform ()
7255 {
7256 func_xform_result=${1%.*}.lo
7257 }
7258
7259 # func_arith arithmetic-term...
7260 func_arith ()
7261 {
7262 func_arith_result=$(( $[*] ))
7263 }
7264
7265 # func_len string
7266 # STRING may not start with a hyphen.
7267 func_len ()
7268 {
7269 func_len_result=${#1}
7270 }
7271
7272 _LT_EOF
7273 ;;
7274 *) # Bourne compatible functions.
7275 cat << \_LT_EOF >> "$cfgfile"
7276
7277 # func_dirname file append nondir_replacement
7278 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7279 # otherwise set result to NONDIR_REPLACEMENT.
7280 func_dirname ()
7281 {
7282 # Extract subdirectory from the argument.
7283 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7284 if test "X$func_dirname_result" = "X${1}"; then
7285 func_dirname_result="${3}"
7286 else
7287 func_dirname_result="$func_dirname_result${2}"
7288 fi
7289 }
7290
7291 # func_basename file
7292 func_basename ()
7293 {
7294 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7295 }
7296
7297 dnl func_dirname_and_basename
7298 dnl A portable version of this function is already defined in general.m4sh
7299 dnl so there is no need for it here.
7300
7301 # func_stripname prefix suffix name
7302 # strip PREFIX and SUFFIX off of NAME.
7303 # PREFIX and SUFFIX must not contain globbing or regex special
7304 # characters, hashes, percent signs, but SUFFIX may contain a leading
7305 # dot (in which case that matches only a dot).
7306 # func_strip_suffix prefix name
7307 func_stripname ()
7308 {
7309 case ${2} in
7310 .*) func_stripname_result=`$ECHO "X${3}" \
7311 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7312 *) func_stripname_result=`$ECHO "X${3}" \
7313 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7314 esac
7315 }
7316
7317 # sed scripts:
7318 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7319 my_sed_long_arg='1s/^-[[^=]]*=//'
7320
7321 # func_opt_split
7322 func_opt_split ()
7323 {
7324 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7325 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7326 }
7327
7328 # func_lo2o object
7329 func_lo2o ()
7330 {
7331 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7332 }
7333
7334 # func_xform libobj-or-source
7335 func_xform ()
7336 {
7337 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7338 }
7339
7340 # func_arith arithmetic-term...
7341 func_arith ()
7342 {
7343 func_arith_result=`expr "$[@]"`
7344 }
7345
7346 # func_len string
7347 # STRING may not start with a hyphen.
7348 func_len ()
7349 {
7350 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7351 }
7352
7353 _LT_EOF
7354 esac
7355
7356 case $lt_shell_append in
7357 yes)
7358 cat << \_LT_EOF >> "$cfgfile"
7359
7360 # func_append var value
7361 # Append VALUE to the end of shell variable VAR.
7362 func_append ()
7363 {
7364 eval "$[1]+=\$[2]"
7365 }
7366 _LT_EOF
7367 ;;
7368 *)
7369 cat << \_LT_EOF >> "$cfgfile"
7370
7371 # func_append var value
7372 # Append VALUE to the end of shell variable VAR.
7373 func_append ()
7374 {
7375 eval "$[1]=\$$[1]\$[2]"
7376 }
7377
7378 _LT_EOF
7379 ;;
7380 esac
7381 ])
7382
7383 # Helper functions for option handling. -*- Autoconf -*-
7384 #
7385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7386 # Written by Gary V. Vaughan, 2004
7387 #
7388 # This file is free software; the Free Software Foundation gives
7389 # unlimited permission to copy and/or distribute it, with or without
7390 # modifications, as long as this notice is preserved.
7391
7392 # serial 6 ltoptions.m4
7393
7394 # This is to help aclocal find these macros, as it can't see m4_define.
7395 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7396
7397
7398 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7399 # ------------------------------------------
7400 m4_define([_LT_MANGLE_OPTION],
7401 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7402
7403
7404 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7405 # ---------------------------------------
7406 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7407 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
7408 # saved as a flag.
7409 m4_define([_LT_SET_OPTION],
7410 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7411 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7412 _LT_MANGLE_DEFUN([$1], [$2]),
7413 [m4_warning([Unknown $1 option `$2'])])[]dnl
7414 ])
7415
7416
7417 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7418 # ------------------------------------------------------------
7419 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7420 m4_define([_LT_IF_OPTION],
7421 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7422
7423
7424 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7425 # -------------------------------------------------------
7426 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7427 # are set.
7428 m4_define([_LT_UNLESS_OPTIONS],
7429 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7431 [m4_define([$0_found])])])[]dnl
7432 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7433 ])[]dnl
7434 ])
7435
7436
7437 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7438 # ----------------------------------------
7439 # OPTION-LIST is a space-separated list of Libtool options associated
7440 # with MACRO-NAME. If any OPTION has a matching handler declared with
7441 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7442 # the unknown option and exit.
7443 m4_defun([_LT_SET_OPTIONS],
7444 [# Set options
7445 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7446 [_LT_SET_OPTION([$1], _LT_Option)])
7447
7448 m4_if([$1],[LT_INIT],[
7449 dnl
7450 dnl Simply set some default values (i.e off) if boolean options were not
7451 dnl specified:
7452 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7453 ])
7454 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7455 ])
7456 dnl
7457 dnl If no reference was made to various pairs of opposing options, then
7458 dnl we run the default mode handler for the pair. For example, if neither
7459 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7460 dnl archives by default:
7461 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7462 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7463 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7464 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7465 [_LT_ENABLE_FAST_INSTALL])
7466 ])
7467 ])# _LT_SET_OPTIONS
7468
7469
7470
7471 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7472 # -----------------------------------------
7473 m4_define([_LT_MANGLE_DEFUN],
7474 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7475
7476
7477 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7478 # -----------------------------------------------
7479 m4_define([LT_OPTION_DEFINE],
7480 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7481 ])# LT_OPTION_DEFINE
7482
7483
7484 # dlopen
7485 # ------
7486 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7487 ])
7488
7489 AU_DEFUN([AC_LIBTOOL_DLOPEN],
7490 [_LT_SET_OPTION([LT_INIT], [dlopen])
7491 AC_DIAGNOSE([obsolete],
7492 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7493 put the `dlopen' option into LT_INIT's first parameter.])
7494 ])
7495
7496 dnl aclocal-1.4 backwards compatibility:
7497 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7498
7499
7500 # win32-dll
7501 # ---------
7502 # Declare package support for building win32 dll's.
7503 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
7504 [enable_win32_dll=yes
7505
7506 case $host in
7507 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7508 AC_CHECK_TOOL(AS, as, false)
7509 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7510 AC_CHECK_TOOL(OBJDUMP, objdump, false)
7511 ;;
7512 esac
7513
7514 test -z "$AS" && AS=as
7515 _LT_DECL([], [AS], [0], [Assembler program])dnl
7516
7517 test -z "$DLLTOOL" && DLLTOOL=dlltool
7518 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7519
7520 test -z "$OBJDUMP" && OBJDUMP=objdump
7521 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7522 ])# win32-dll
7523
7524 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7525 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7526 _LT_SET_OPTION([LT_INIT], [win32-dll])
7527 AC_DIAGNOSE([obsolete],
7528 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7529 put the `win32-dll' option into LT_INIT's first parameter.])
7530 ])
7531
7532 dnl aclocal-1.4 backwards compatibility:
7533 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7534
7535
7536 # _LT_ENABLE_SHARED([DEFAULT])
7537 # ----------------------------
7538 # implement the --enable-shared flag, and supports the `shared' and
7539 # `disable-shared' LT_INIT options.
7540 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7541 m4_define([_LT_ENABLE_SHARED],
7542 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7543 AC_ARG_ENABLE([shared],
7544 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7545 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7546 [p=${PACKAGE-default}
7547 case $enableval in
7548 yes) enable_shared=yes ;;
7549 no) enable_shared=no ;;
7550 *)
7551 enable_shared=no
7552 # Look at the argument we got. We use all the common list separators.
7553 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7554 for pkg in $enableval; do
7555 IFS="$lt_save_ifs"
7556 if test "X$pkg" = "X$p"; then
7557 enable_shared=yes
7558 fi
7559 done
7560 IFS="$lt_save_ifs"
7561 ;;
7562 esac],
7563 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7564
7565 _LT_DECL([build_libtool_libs], [enable_shared], [0],
7566 [Whether or not to build shared libraries])
7567 ])# _LT_ENABLE_SHARED
7568
7569 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7570 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7571
7572 # Old names:
7573 AC_DEFUN([AC_ENABLE_SHARED],
7574 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7575 ])
7576
7577 AC_DEFUN([AC_DISABLE_SHARED],
7578 [_LT_SET_OPTION([LT_INIT], [disable-shared])
7579 ])
7580
7581 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7582 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7583
7584 dnl aclocal-1.4 backwards compatibility:
7585 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7586 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7587
7588
7589
7590 # _LT_ENABLE_STATIC([DEFAULT])
7591 # ----------------------------
7592 # implement the --enable-static flag, and support the `static' and
7593 # `disable-static' LT_INIT options.
7594 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7595 m4_define([_LT_ENABLE_STATIC],
7596 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7597 AC_ARG_ENABLE([static],
7598 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7599 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7600 [p=${PACKAGE-default}
7601 case $enableval in
7602 yes) enable_static=yes ;;
7603 no) enable_static=no ;;
7604 *)
7605 enable_static=no
7606 # Look at the argument we got. We use all the common list separators.
7607 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7608 for pkg in $enableval; do
7609 IFS="$lt_save_ifs"
7610 if test "X$pkg" = "X$p"; then
7611 enable_static=yes
7612 fi
7613 done
7614 IFS="$lt_save_ifs"
7615 ;;
7616 esac],
7617 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7618
7619 _LT_DECL([build_old_libs], [enable_static], [0],
7620 [Whether or not to build static libraries])
7621 ])# _LT_ENABLE_STATIC
7622
7623 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7624 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7625
7626 # Old names:
7627 AC_DEFUN([AC_ENABLE_STATIC],
7628 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7629 ])
7630
7631 AC_DEFUN([AC_DISABLE_STATIC],
7632 [_LT_SET_OPTION([LT_INIT], [disable-static])
7633 ])
7634
7635 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7636 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7637
7638 dnl aclocal-1.4 backwards compatibility:
7639 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7640 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7641
7642
7643
7644 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
7645 # ----------------------------------
7646 # implement the --enable-fast-install flag, and support the `fast-install'
7647 # and `disable-fast-install' LT_INIT options.
7648 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7649 m4_define([_LT_ENABLE_FAST_INSTALL],
7650 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7651 AC_ARG_ENABLE([fast-install],
7652 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7653 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7654 [p=${PACKAGE-default}
7655 case $enableval in
7656 yes) enable_fast_install=yes ;;
7657 no) enable_fast_install=no ;;
7658 *)
7659 enable_fast_install=no
7660 # Look at the argument we got. We use all the common list separators.
7661 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7662 for pkg in $enableval; do
7663 IFS="$lt_save_ifs"
7664 if test "X$pkg" = "X$p"; then
7665 enable_fast_install=yes
7666 fi
7667 done
7668 IFS="$lt_save_ifs"
7669 ;;
7670 esac],
7671 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7672
7673 _LT_DECL([fast_install], [enable_fast_install], [0],
7674 [Whether or not to optimize for fast installation])dnl
7675 ])# _LT_ENABLE_FAST_INSTALL
7676
7677 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7678 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7679
7680 # Old names:
7681 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7682 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7683 AC_DIAGNOSE([obsolete],
7684 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7685 the `fast-install' option into LT_INIT's first parameter.])
7686 ])
7687
7688 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7689 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7690 AC_DIAGNOSE([obsolete],
7691 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7692 the `disable-fast-install' option into LT_INIT's first parameter.])
7693 ])
7694
7695 dnl aclocal-1.4 backwards compatibility:
7696 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7697 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7698
7699
7700 # _LT_WITH_PIC([MODE])
7701 # --------------------
7702 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
7703 # LT_INIT options.
7704 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7705 m4_define([_LT_WITH_PIC],
7706 [AC_ARG_WITH([pic],
7707 [AS_HELP_STRING([--with-pic],
7708 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7709 [pic_mode="$withval"],
7710 [pic_mode=default])
7711
7712 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7713
7714 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7715 ])# _LT_WITH_PIC
7716
7717 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7718 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7719
7720 # Old name:
7721 AU_DEFUN([AC_LIBTOOL_PICMODE],
7722 [_LT_SET_OPTION([LT_INIT], [pic-only])
7723 AC_DIAGNOSE([obsolete],
7724 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7725 put the `pic-only' option into LT_INIT's first parameter.])
7726 ])
7727
7728 dnl aclocal-1.4 backwards compatibility:
7729 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7730
7731
7732 m4_define([_LTDL_MODE], [])
7733 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7734 [m4_define([_LTDL_MODE], [nonrecursive])])
7735 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
7736 [m4_define([_LTDL_MODE], [recursive])])
7737 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
7738 [m4_define([_LTDL_MODE], [subproject])])
7739
7740 m4_define([_LTDL_TYPE], [])
7741 LT_OPTION_DEFINE([LTDL_INIT], [installable],
7742 [m4_define([_LTDL_TYPE], [installable])])
7743 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
7744 [m4_define([_LTDL_TYPE], [convenience])])
7745
7746 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
7747 #
7748 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7749 # Written by Gary V. Vaughan, 2004
7750 #
7751 # This file is free software; the Free Software Foundation gives
7752 # unlimited permission to copy and/or distribute it, with or without
7753 # modifications, as long as this notice is preserved.
7754
7755 # serial 6 ltsugar.m4
7756
7757 # This is to help aclocal find these macros, as it can't see m4_define.
7758 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7759
7760
7761 # lt_join(SEP, ARG1, [ARG2...])
7762 # -----------------------------
7763 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7764 # associated separator.
7765 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7766 # versions in m4sugar had bugs.
7767 m4_define([lt_join],
7768 [m4_if([$#], [1], [],
7769 [$#], [2], [[$2]],
7770 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7771 m4_define([_lt_join],
7772 [m4_if([$#$2], [2], [],
7773 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7774
7775
7776 # lt_car(LIST)
7777 # lt_cdr(LIST)
7778 # ------------
7779 # Manipulate m4 lists.
7780 # These macros are necessary as long as will still need to support
7781 # Autoconf-2.59 which quotes differently.
7782 m4_define([lt_car], [[$1]])
7783 m4_define([lt_cdr],
7784 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7785 [$#], 1, [],
7786 [m4_dquote(m4_shift($@))])])
7787 m4_define([lt_unquote], $1)
7788
7789
7790 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
7791 # ------------------------------------------
7792 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7793 # Note that neither SEPARATOR nor STRING are expanded; they are appended
7794 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7795 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
7796 # than defined and empty).
7797 #
7798 # This macro is needed until we can rely on Autoconf 2.62, since earlier
7799 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7800 m4_define([lt_append],
7801 [m4_define([$1],
7802 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7803
7804
7805
7806 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7807 # ----------------------------------------------------------
7808 # Produce a SEP delimited list of all paired combinations of elements of
7809 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
7810 # has the form PREFIXmINFIXSUFFIXn.
7811 # Needed until we can rely on m4_combine added in Autoconf 2.62.
7812 m4_define([lt_combine],
7813 [m4_if(m4_eval([$# > 3]), [1],
7814 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7815 [[m4_foreach([_Lt_prefix], [$2],
7816 [m4_foreach([_Lt_suffix],
7817 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7818 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7819
7820
7821 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7822 # -----------------------------------------------------------------------
7823 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7824 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7825 m4_define([lt_if_append_uniq],
7826 [m4_ifdef([$1],
7827 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7828 [lt_append([$1], [$2], [$3])$4],
7829 [$5])],
7830 [lt_append([$1], [$2], [$3])$4])])
7831
7832
7833 # lt_dict_add(DICT, KEY, VALUE)
7834 # -----------------------------
7835 m4_define([lt_dict_add],
7836 [m4_define([$1($2)], [$3])])
7837
7838
7839 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7840 # --------------------------------------------
7841 m4_define([lt_dict_add_subkey],
7842 [m4_define([$1($2:$3)], [$4])])
7843
7844
7845 # lt_dict_fetch(DICT, KEY, [SUBKEY])
7846 # ----------------------------------
7847 m4_define([lt_dict_fetch],
7848 [m4_ifval([$3],
7849 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7850 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7851
7852
7853 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7854 # -----------------------------------------------------------------
7855 m4_define([lt_if_dict_fetch],
7856 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7857 [$5],
7858 [$6])])
7859
7860
7861 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7862 # --------------------------------------------------------------
7863 m4_define([lt_dict_filter],
7864 [m4_if([$5], [], [],
7865 [lt_join(m4_quote(m4_default([$4], [[, ]])),
7866 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7867 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7868 ])
7869
7870 # ltversion.m4 -- version numbers -*- Autoconf -*-
7871 #
7872 # Copyright (C) 2004 Free Software Foundation, Inc.
7873 # Written by Scott James Remnant, 2004
7874 #
7875 # This file is free software; the Free Software Foundation gives
7876 # unlimited permission to copy and/or distribute it, with or without
7877 # modifications, as long as this notice is preserved.
7878
7879 # Generated from ltversion.in.
7880
7881 # serial 3017 ltversion.m4
7882 # This file is part of GNU Libtool
7883
7884 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7885 m4_define([LT_PACKAGE_REVISION], [1.3017])
7886
7887 AC_DEFUN([LTVERSION_VERSION],
7888 [macro_version='2.2.6b'
7889 macro_revision='1.3017'
7890 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7891 _LT_DECL(, macro_revision, 0)
7892 ])
7893
7894 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
7895 #
7896 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7897 # Written by Scott James Remnant, 2004.
7898 #
7899 # This file is free software; the Free Software Foundation gives
7900 # unlimited permission to copy and/or distribute it, with or without
7901 # modifications, as long as this notice is preserved.
7902
7903 # serial 4 lt~obsolete.m4
7904
7905 # These exist entirely to fool aclocal when bootstrapping libtool.
7906 #
7907 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7908 # which have later been changed to m4_define as they aren't part of the
7909 # exported API, or moved to Autoconf or Automake where they belong.
7910 #
7911 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
7912 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7913 # using a macro with the same name in our local m4/libtool.m4 it'll
7914 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7915 # and doesn't know about Autoconf macros at all.)
7916 #
7917 # So we provide this file, which has a silly filename so it's always
7918 # included after everything else. This provides aclocal with the
7919 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7920 # because those macros already exist, or will be overwritten later.
7921 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
7922 #
7923 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7924 # Yes, that means every name once taken will need to remain here until
7925 # we give up compatibility with versions before 1.7, at which point
7926 # we need to keep only those names which we still refer to.
7927
7928 # This is to help aclocal find these macros, as it can't see m4_define.
7929 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7930
7931 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7932 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
7933 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7934 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
7935 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7936 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
7937 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
7938 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7939 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
7940 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
7941 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
7942 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7943 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7944 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7945 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7946 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7947 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
7948 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7949 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7950 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
7951 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
7952 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7953 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7954 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7955 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7956 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7957 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7958 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7959 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
7960 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
7961 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
7962 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7963 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7964 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
7965 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
7966 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7967 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7968 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
7969 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7970 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
7971 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
7972 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
7973 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
7974 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7975 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7976 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7977 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7978 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7979 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7980 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7981 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7982 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7983 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7984 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
7985 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7986
798721 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
22 # serial 1 (pkg-config-0.24)
798823 #
798924 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
799025 #
801247 AC_DEFUN([PKG_PROG_PKG_CONFIG],
801348 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
801449 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8015 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
50 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
51 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
52 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
53
801654 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
801755 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
801856 fi
802563 AC_MSG_RESULT([no])
802664 PKG_CONFIG=""
802765 fi
8028
802966 fi[]dnl
803067 ])# PKG_PROG_PKG_CONFIG
803168
803471 # Check to see whether a particular set of modules exists. Similar
803572 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
803673 #
8037 #
8038 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
8039 # this or PKG_CHECK_MODULES is called, or make sure to call
8040 # PKG_CHECK_EXISTS manually
74 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
75 # only at the first occurence in configure.ac, so if the first place
76 # it's called might be skipped (such as if it is within an "if", you
77 # have to call PKG_CHECK_EXISTS manually
804178 # --------------------------------------------------------------
804279 AC_DEFUN([PKG_CHECK_EXISTS],
804380 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
804481 if test -n "$PKG_CONFIG" && \
804582 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8046 m4_ifval([$2], [$2], [:])
83 m4_default([$2], [:])
804784 m4_ifvaln([$3], [else
804885 $3])dnl
804986 fi])
805087
8051
805288 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
805389 # ---------------------------------------------
805490 m4_define([_PKG_CONFIG],
8055 [if test -n "$PKG_CONFIG"; then
8056 if test -n "$$1"; then
8057 pkg_cv_[]$1="$$1"
8058 else
8059 PKG_CHECK_EXISTS([$3],
8060 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8061 [pkg_failed=yes])
8062 fi
8063 else
8064 pkg_failed=untried
91 [if test -n "$$1"; then
92 pkg_cv_[]$1="$$1"
93 elif test -n "$PKG_CONFIG"; then
94 PKG_CHECK_EXISTS([$3],
95 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
96 [pkg_failed=yes])
97 else
98 pkg_failed=untried
806599 fi[]dnl
8066100 ])# _PKG_CONFIG
8067101
8103137 See the pkg-config man page for more details.])
8104138
8105139 if test $pkg_failed = yes; then
140 AC_MSG_RESULT([no])
8106141 _PKG_SHORT_ERRORS_SUPPORTED
8107142 if test $_pkg_short_errors_supported = yes; then
8108 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
143 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8109144 else
8110 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
145 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8111146 fi
8112147 # Put the nasty error message in config.log where it belongs
8113148 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8114149
8115 ifelse([$4], , [AC_MSG_ERROR(dnl
150 m4_default([$4], [AC_MSG_ERROR(
8116151 [Package requirements ($2) were not met:
8117152
8118153 $$1_PKG_ERRORS
8120155 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8121156 installed software in a non-standard prefix.
8122157
8123 _PKG_TEXT
8124 ])],
8125 [AC_MSG_RESULT([no])
8126 $4])
158 _PKG_TEXT])
159 ])
8127160 elif test $pkg_failed = untried; then
8128 ifelse([$4], , [AC_MSG_FAILURE(dnl
161 AC_MSG_RESULT([no])
162 m4_default([$4], [AC_MSG_FAILURE(
8129163 [The pkg-config script could not be found or is too old. Make sure it
8130164 is in your PATH or set the PKG_CONFIG environment variable to the full
8131165 path to pkg-config.
8132166
8133167 _PKG_TEXT
8134168
8135 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8136 [$4])
169 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
170 ])
8137171 else
8138172 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8139173 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8140174 AC_MSG_RESULT([yes])
8141 ifelse([$3], , :, [$3])
175 $3
8142176 fi[]dnl
8143177 ])# PKG_CHECK_MODULES
8144178
91511185 AC_SUBST([am__untar])
91521186 ]) # _AM_PROG_TAR
91531187
1188 m4_include([m4/attributes.m4])
1189 m4_include([m4/ax_cc_for_build.m4])
1190 m4_include([m4/libtool.m4])
1191 m4_include([m4/ltoptions.m4])
1192 m4_include([m4/ltsugar.m4])
1193 m4_include([m4/ltversion.m4])
1194 m4_include([m4/lt~obsolete.m4])
120120
121121 SkIdentifyParsedData identify_parsed_data;
122122 SkSmartParsedData smart_parsed_data;
123
124 /* cache for commonly used attributes */
125 SkBool attribute_cache_valid:1;
126 SkBool bad_attribute_now:1;
127 SkBool bad_attribute_in_the_past:1;
128 SkBool reallocated_sector_count_found:1;
129 SkBool current_pending_sector_found:1;
130 uint64_t reallocated_sector_count;
131 uint64_t current_pending_sector;
123132
124133 void *blob;
125134 };
12071216 else if (!strcmp(a->name, "reallocated-sector-count") ||
12081217 !strcmp(a->name, "current-pending-sector"))
12091218 a->pretty_value = fourtyeight & 0xFFFFFFFFU;
1219 else if (!strcmp(a->name, "endurance-remaining") ||
1220 !strcmp(a->name, "available-reserved-space"))
1221 a->pretty_value = a->current_value;
1222 else if (!strcmp(a->name, "total-lbas-written") ||
1223 !strcmp(a->name, "total-lbas-read"))
1224 a->pretty_value = fourtyeight * 65536LLU * 512LLU / 1000000LLU;
1225 else if (!strcmp(a->name, "timed-workload-media-wear") ||
1226 !strcmp(a->name, "timed-workload-host-reads"))
1227 a->pretty_value = (double)fourtyeight / 1024LLU;
1228 else if (!strcmp(a->name, "workload-timer"))
1229 a->pretty_value = fourtyeight * 60 * 1000;
12101230 else
12111231 a->pretty_value = fourtyeight;
12121232 }
12611281
12621282 max_sectors = d->size / 512ULL;
12631283
1264 if (max_sectors > 0 && a->pretty_value > max_sectors) {
1284 if (a->pretty_value == 0xffffffffULL ||
1285 a->pretty_value == 0xffffffffffffULL ||
1286 (max_sectors > 0 && a->pretty_value > max_sectors)) {
12651287 a->pretty_value = SK_SMART_ATTRIBUTE_UNIT_UNKNOWN;
12661288 d->attribute_verification_bad = TRUE;
12671289 } else {
12891311 [11] = { "calibration-retry-count", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
12901312 [12] = { "power-cycle-count", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
12911313 [13] = { "read-soft-error-rate", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1314 [170] = { "available-reserved-space", SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL },
1315 [171] = { "program-fail-count", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1316 [172] = { "erase-fail-count", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
12921317 [184] = { "end-to-end-error", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
12931318 [187] = { "reported-uncorrect", SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
12941319 [188] = { "command-timeout", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
13261351 [231] = { "temperature-celsius", SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
13271352
13281353 /* http://www.adtron.com/pdf/SMART_for_XceedLite_SATA_RevA.pdf */
1329 [232] = { "endurance-remaining", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1354 [232] = { "endurance-remaining", SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL },
13301355 [233] = { "power-on-seconds-2", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
13311356 [234] = { "uncorrectable-ecc-count", SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
13321357 [235] = { "good-block-rate", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
13331358
13341359 [240] = { "head-flying-hours", SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1360 [241] = { "total-lbas-written", SK_SMART_ATTRIBUTE_UNIT_MB, NULL },
1361 [242] = { "total-lbas-read", SK_SMART_ATTRIBUTE_UNIT_MB, NULL },
13351362 [250] = { "read-error-retry-rate", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
13361363 };
13371364 /* %STRINGPOOLSTOP% */
13381365
13391366 typedef enum SkSmartQuirk {
1340 SK_SMART_QUIRK_9_POWERONMINUTES = 0x0001,
1341 SK_SMART_QUIRK_9_POWERONSECONDS = 0x0002,
1342 SK_SMART_QUIRK_9_POWERONHALFMINUTES = 0x0004,
1343 SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT = 0x0008,
1344 SK_SMART_QUIRK_193_LOADUNLOAD = 0x0010,
1345 SK_SMART_QUIRK_194_10XCELSIUS = 0x0020,
1346 SK_SMART_QUIRK_194_UNKNOWN = 0x0040,
1347 SK_SMART_QUIRK_200_WRITEERRORCOUNT = 0x0080,
1348 SK_SMART_QUIRK_201_DETECTEDTACOUNT = 0x0100,
1349 SK_SMART_QUIRK_5_UNKNOWN = 0x0200,
1350 SK_SMART_QUIRK_9_UNKNOWN = 0x0400,
1351 SK_SMART_QUIRK_197_UNKNOWN = 0x0800,
1352 SK_SMART_QUIRK_198_UNKNOWN = 0x1000,
1353 SK_SMART_QUIRK_190_UNKNOWN = 0x2000
1367 SK_SMART_QUIRK_9_POWERONMINUTES = 0x000001,
1368 SK_SMART_QUIRK_9_POWERONSECONDS = 0x000002,
1369 SK_SMART_QUIRK_9_POWERONHALFMINUTES = 0x000004,
1370 SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT = 0x000008,
1371 SK_SMART_QUIRK_193_LOADUNLOAD = 0x000010,
1372 SK_SMART_QUIRK_194_10XCELSIUS = 0x000020,
1373 SK_SMART_QUIRK_194_UNKNOWN = 0x000040,
1374 SK_SMART_QUIRK_200_WRITEERRORCOUNT = 0x000080,
1375 SK_SMART_QUIRK_201_DETECTEDTACOUNT = 0x000100,
1376 SK_SMART_QUIRK_5_UNKNOWN = 0x000200,
1377 SK_SMART_QUIRK_9_UNKNOWN = 0x000400,
1378 SK_SMART_QUIRK_197_UNKNOWN = 0x000800,
1379 SK_SMART_QUIRK_198_UNKNOWN = 0x001000,
1380 SK_SMART_QUIRK_190_UNKNOWN = 0x002000,
1381 SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE = 0x004000,
1382 SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR = 0x008000,
1383 SK_SMART_QUIRK_225_TOTALLBASWRITTEN = 0x010000,
1384 SK_SMART_QUIRK_4_UNUSED = 0x020000,
1385 SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR = 0x040000,
1386 SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS = 0x080000,
1387 SK_SMART_QUIRK_228_WORKLOADTIMER = 0x100000,
1388 SK_SMART_QUIRK_3_UNUSED = 0x200000
13541389 } SkSmartQuirk;
13551390
13561391 /* %STRINGPOOLSTART% */
13691404 "197_UNKNOWN",
13701405 "198_UNKNOWN",
13711406 "190_UNKNOWN",
1407 "232_AVAILABLERESERVEDSPACE",
1408 "233_MEDIAWEAROUTINDICATOR",
1409 "225_TOTALLBASWRITTEN",
1410 "4_UNUSED",
1411 "226_TIMEWORKLOADMEDIAWEAR",
1412 "227_TIMEWORKLOADHOSTREADS",
1413 "228_WORKLOADTIMER",
1414 "3_UNUSED",
13721415 NULL
13731416 };
13741417 /* %STRINGPOOLSTOP% */
15211564 SK_SMART_QUIRK_5_UNKNOWN|
15221565 SK_SMART_QUIRK_190_UNKNOWN
15231566 }, {
1567
1568 /*** Intel */
1569 "^INTEL SSDSA2CW[0-9]{3}G3$",
1570 NULL,
1571 SK_SMART_QUIRK_3_UNUSED|
1572 SK_SMART_QUIRK_4_UNUSED|
1573 SK_SMART_QUIRK_225_TOTALLBASWRITTEN|
1574 SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR|
1575 SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS|
1576 SK_SMART_QUIRK_228_WORKLOADTIMER|
1577 SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE|
1578 SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR
1579 }, {
15241580 NULL,
15251581 NULL,
15261582 0
16021658
16031659 if (quirk) {
16041660 switch (id) {
1661 case 3:
1662 /* %STRINGPOOLSTART% */
1663 if (quirk & SK_SMART_QUIRK_3_UNUSED) {
1664 static const SkSmartAttributeInfo a = {
1665 "spin-up-time", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL
1666 };
1667 return &a;
1668 }
1669 /* %STRINGPOOLSTOP% */
1670
1671 break;
1672
1673 case 4:
1674 /* %STRINGPOOLSTART% */
1675 if (quirk & SK_SMART_QUIRK_4_UNUSED) {
1676 static const SkSmartAttributeInfo a = {
1677 "start-stop-count", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL
1678 };
1679 return &a;
1680 }
1681 /* %STRINGPOOLSTOP% */
1682
1683 break;
16051684
16061685 case 5:
16071686 if (quirk & SK_SMART_QUIRK_5_UNKNOWN)
17001779 /* %STRINGPOOLSTOP% */
17011780
17021781 break;
1782
1783 case 225:
1784 /* %STRINGPOOLSTART% */
1785 if (quirk & SK_SMART_QUIRK_225_TOTALLBASWRITTEN) {
1786 static const SkSmartAttributeInfo a = {
1787 "total-lbas-written", SK_SMART_ATTRIBUTE_UNIT_MB, NULL
1788 };
1789 return &a;
1790 }
1791 /* %STRINGPOOLSTOP% */
1792
1793 break;
1794
1795 case 226:
1796 /* %STRINGPOOLSTART% */
1797 if (quirk & SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR) {
1798 static const SkSmartAttributeInfo a = {
1799 "timed-workload-media-wear", SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, NULL
1800 };
1801 return &a;
1802 }
1803 /* %STRINGPOOLSTOP% */
1804
1805 break;
1806
1807 case 227:
1808 /* %STRINGPOOLSTART% */
1809 if (quirk & SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS) {
1810 static const SkSmartAttributeInfo a = {
1811 "timed-workload-host-reads", SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, NULL
1812 };
1813 return &a;
1814 }
1815 /* %STRINGPOOLSTOP% */
1816
1817 break;
1818
1819 case 228:
1820 /* %STRINGPOOLSTART% */
1821 if (quirk & SK_SMART_QUIRK_228_WORKLOADTIMER) {
1822 static const SkSmartAttributeInfo a = {
1823 "workload-timer", SK_SMART_ATTRIBUTE_UNIT_MSECONDS, NULL
1824 };
1825 return &a;
1826 }
1827 /* %STRINGPOOLSTOP% */
1828
1829 break;
1830
1831 case 232:
1832 /* %STRINGPOOLSTART% */
1833 if (quirk & SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE) {
1834 static const SkSmartAttributeInfo a = {
1835 "available-reserved-space", SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL
1836 };
1837 return &a;
1838 }
1839 /* %STRINGPOOLSTOP% */
1840 break;
1841
1842 case 233:
1843 /* %STRINGPOOLSTART% */
1844 if (quirk & SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR) {
1845 static const SkSmartAttributeInfo a = {
1846 "media-wearout-indicator", SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL
1847 };
1848 return &a;
1849 }
1850 /* %STRINGPOOLSTOP% */
1851 break;
1852
17031853 }
17041854 }
17051855
18902040 [SK_SMART_ATTRIBUTE_UNIT_NONE] = "",
18912041 [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = "ms",
18922042 [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = "sectors",
1893 [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = "mK"
2043 [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = "mK",
2044 [SK_SMART_ATTRIBUTE_UNIT_PERCENT] = "%",
2045 [SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT] = "%",
2046 [SK_SMART_ATTRIBUTE_UNIT_MB] = "MB"
18942047 };
18952048 /* %STRINGPOOLSTOP% */
18962049
20142167 return 0;
20152168 }
20162169
2017 static void reallocated_cb(SkDisk *d, const SkSmartAttributeParsedData *a, struct attr_helper *ah) {
2170 static void fill_cache_cb(SkDisk *d, const SkSmartAttributeParsedData *a, void* userdata) {
2171
2172 if (a->prefailure) {
2173 if (a->good_now_valid && !a->good_now)
2174 d->bad_attribute_now = TRUE;
2175
2176 if (a->good_in_the_past_valid && !a->good_in_the_past)
2177 d->bad_attribute_in_the_past = TRUE;
2178 }
20182179
20192180 if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
20202181 return;
20212182
20222183 if (!strcmp(a->name, "reallocated-sector-count")) {
2023
2024 if (!ah->found || a->pretty_value > *ah->value)
2025 *ah->value = a->pretty_value;
2026
2027 ah->found = TRUE;
2028 }
2029 }
2030
2031 static void pending_cb(SkDisk *d, const SkSmartAttributeParsedData *a, struct attr_helper *ah) {
2032
2033 if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
2034 return;
2184 if (a->pretty_value > d->reallocated_sector_count)
2185 d->reallocated_sector_count = a->pretty_value;
2186 d->reallocated_sector_count_found = TRUE;
2187 }
20352188
20362189 if (!strcmp(a->name, "current-pending-sector")) {
2037
2038 if (!ah->found || a->pretty_value > *ah->value)
2039 *ah->value = a->pretty_value;
2040
2041 ah->found = TRUE;
2042 }
2190 if (a->pretty_value > d->current_pending_sector)
2191 d->current_pending_sector = a->pretty_value;
2192 d->current_pending_sector_found = TRUE;
2193 }
2194 }
2195
2196 static int fill_cache(SkDisk *d) {
2197 if (d->attribute_cache_valid)
2198 return 0;
2199
2200 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) fill_cache_cb, NULL) >= 0) {
2201 d->attribute_cache_valid = TRUE;
2202 return 0;
2203 } else
2204 return -1;
20432205 }
20442206
20452207 int sk_disk_smart_get_bad(SkDisk *d, uint64_t *sectors) {
2046 struct attr_helper ah1, ah2;
2047 uint64_t sectors1, sectors2;
2048
20492208 assert(d);
20502209 assert(sectors);
20512210
2052 ah1.found = FALSE;
2053 ah1.value = &sectors1;
2054
2055 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) reallocated_cb, &ah1) < 0)
2056 return -1;
2057
2058 ah2.found = FALSE;
2059 ah2.value = &sectors2;
2060
2061 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) pending_cb, &ah2) < 0)
2062 return -1;
2063
2064 if (!ah1.found && !ah2.found) {
2211 if (fill_cache (d) < 0)
2212 return -1;
2213
2214 if (!d->reallocated_sector_count_found && !d->current_pending_sector_found) {
20652215 errno = ENOENT;
20662216 return -1;
20672217 }
20682218
2069 if (ah1.found && ah2.found)
2070 *sectors = sectors1 + sectors2;
2071 else if (ah1.found)
2072 *sectors = sectors1;
2219 if (d->reallocated_sector_count_found && d->current_pending_sector_found)
2220 *sectors = d->reallocated_sector_count + d->current_pending_sector;
2221 else if (d->reallocated_sector_count_found)
2222 *sectors = d->reallocated_sector_count;
20732223 else
2074 *sectors = sectors2;
2224 *sectors = d->current_pending_sector;
20752225
20762226 return 0;
20772227 }
20952245 return _P(map[overall]);
20962246 }
20972247
2098 static void bad_attribute_now_cb(SkDisk *d, const SkSmartAttributeParsedData *a, SkBool *good) {
2099 if (a->prefailure && a->good_now_valid && !a->good_now)
2100 *good = FALSE;
2101 }
2102
2103 static void bad_attribute_in_the_past_cb(SkDisk *d, const SkSmartAttributeParsedData *a, SkBool *good) {
2104 if (a->prefailure && a->good_in_the_past_valid && !a->good_in_the_past)
2105 *good = FALSE;
2106 }
2107
21082248 static uint64_t u64log2(uint64_t n) {
21092249 unsigned r;
21102250
21442284 sectors = 0;
21452285 } else {
21462286
2147 /* We use log2(n_sectors) as a threshold here. We had to pick
2148 * something, and this makes a bit of sense, or doesn't it? */
2149 sector_threshold = u64log2(d->size/512);
2287 /* We use log2(n_sectors)*1024 as a threshold here. We
2288 * had to pick something, and this makes a bit of
2289 * sense, or doesn't it? */
2290 sector_threshold = u64log2(d->size/512) * 1024;
21502291
21512292 if (sectors >= sector_threshold) {
21522293 *overall = SK_SMART_OVERALL_BAD_SECTOR_MANY;
21552296 }
21562297
21572298 /* Third, check if any of the SMART attributes is bad */
2158 good = TRUE;
2159 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) bad_attribute_now_cb, &good) < 0)
2160 return -1;
2161
2162 if (!good) {
2299 if (fill_cache (d) < 0)
2300 return -1;
2301
2302 if (d->bad_attribute_now) {
21632303 *overall = SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW;
21642304 return 0;
21652305 }
21712311 }
21722312
21732313 /* Fifth, check if any of the SMART attributes ever was bad */
2174 good = TRUE;
2175 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) bad_attribute_in_the_past_cb, &good) < 0)
2176 return -1;
2177
2178 if (!good) {
2314 if (d->bad_attribute_in_the_past) {
21792315 *overall = SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST;
21802316 return 0;
21812317 }
22252361
22262362 case SK_SMART_ATTRIBUTE_UNIT_SECTORS:
22272363 snprintf(s, len, "%llu sectors", (unsigned long long) pretty_value);
2364 break;
2365
2366 case SK_SMART_ATTRIBUTE_UNIT_PERCENT:
2367 snprintf(s, len, "%llu%%", (unsigned long long) pretty_value);
2368 break;
2369
2370 case SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT:
2371 snprintf(s, len, "%0.3f%%", (double) pretty_value);
2372 break;
2373
2374 case SK_SMART_ATTRIBUTE_UNIT_MB:
2375 if (pretty_value >= 1000000LLU)
2376 snprintf(s, len, "%0.3f TB", (double) pretty_value / 1000000LLU);
2377 else if (pretty_value >= 1000LLU)
2378 snprintf(s, len, "%0.3f GB", (double) pretty_value / 1000LLU);
2379 else
2380 snprintf(s, len, "%llu MB", (unsigned long long) pretty_value);
22282381 break;
22292382
22302383 case SK_SMART_ATTRIBUTE_UNIT_NONE:
129129 typedef enum SkSmartAttributeUnit {
130130 SK_SMART_ATTRIBUTE_UNIT_UNKNOWN,
131131 SK_SMART_ATTRIBUTE_UNIT_NONE,
132 SK_SMART_ATTRIBUTE_UNIT_MSECONDS, /* milliseconds */
132 SK_SMART_ATTRIBUTE_UNIT_MSECONDS, /* milliseconds */
133133 SK_SMART_ATTRIBUTE_UNIT_SECTORS,
134 SK_SMART_ATTRIBUTE_UNIT_MKELVIN, /* millikelvin */
134 SK_SMART_ATTRIBUTE_UNIT_MKELVIN, /* millikelvin */
135 SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, /* percentage with 3 decimal points */
136 SK_SMART_ATTRIBUTE_UNIT_PERCENT, /* integer percentage */
137 SK_SMART_ATTRIBUTE_UNIT_MB,
135138 _SK_SMART_ATTRIBUTE_UNIT_MAX
136139
137140 /* This enum may be extended at any time without this being
0 /* Saved 116 relocations, saved 2 strings (19 b) due to suffix compression. */
0 /* Saved 140 relocations, saved 7 strings (90 b) due to suffix compression. */
11 static const char _strpool_[] =
22 "16 Byte SCSI ATA SAT Passthru\0"
33 "12 Byte SCSI ATA SAT Passthru\0"
3333 "Self-test routine in progress\0"
3434 "raw-read-error-rate\0"
3535 "throughput-performance\0"
36 "spin-up-time\0"
37 "start-stop-count\0"
36 /*** Suppressed due to suffix:
37 "spin-up-time\0" ***/
38 /*** Suppressed due to suffix:
39 "start-stop-count\0" ***/
3840 "reallocated-sector-count\0"
3941 "read-channel-margin\0"
4042 "seek-error-rate\0"
4446 "calibration-retry-count\0"
4547 "power-cycle-count\0"
4648 "read-soft-error-rate\0"
49 /*** Suppressed due to suffix:
50 "available-reserved-space\0" ***/
51 "program-fail-count\0"
52 "erase-fail-count\0"
4753 "end-to-end-error\0"
4854 "reported-uncorrect\0"
4955 "command-timeout\0"
8591 "uncorrectable-ecc-count\0"
8692 "good-block-rate\0"
8793 "head-flying-hours\0"
94 /*** Suppressed due to suffix:
95 "total-lbas-written\0" ***/
96 "total-lbas-read\0"
8897 "read-error-retry-rate\0"
8998 "9_POWERONMINUTES\0"
9099 "9_POWERONSECONDS\0"
100109 "197_UNKNOWN\0"
101110 "198_UNKNOWN\0"
102111 "190_UNKNOWN\0"
112 "232_AVAILABLERESERVEDSPACE\0"
113 "233_MEDIAWEAROUTINDICATOR\0"
114 "225_TOTALLBASWRITTEN\0"
115 "4_UNUSED\0"
116 "226_TIMEWORKLOADMEDIAWEAR\0"
117 "227_TIMEWORKLOADHOSTREADS\0"
118 "228_WORKLOADTIMER\0"
119 "3_UNUSED\0"
120 "spin-up-time\0"
121 "start-stop-count\0"
103122 "power-on-minutes\0"
104123 "power-on-seconds\0"
105124 "power-on-half-minutes\0"
107126 "temperature-centi-celsius\0"
108127 "write-error-count\0"
109128 "detected-ta-count\0"
129 "total-lbas-written\0"
130 "timed-workload-media-wear\0"
131 "timed-workload-host-reads\0"
132 "workload-timer\0"
133 "available-reserved-space\0"
134 "media-wearout-indicator\0"
110135 /*** Suppressed due to suffix:
111136 "\0" ***/
112137 "ms\0"
113138 "sectors\0"
114139 "mK\0"
140 /*** Suppressed due to suffix:
141 "%\0" ***/
142 "%\0"
143 "MB\0"
115144 "GOOD\0"
116145 "BAD_ATTRIBUTE_IN_THE_PAST\0"
117146 "BAD_SECTOR\0"
249278
250279 SkIdentifyParsedData identify_parsed_data;
251280 SkSmartParsedData smart_parsed_data;
281
282 /* cache for commonly used attributes */
283 SkBool attribute_cache_valid:1;
284 SkBool bad_attribute_now:1;
285 SkBool bad_attribute_in_the_past:1;
286 SkBool reallocated_sector_count_found:1;
287 SkBool current_pending_sector_found:1;
288 uint64_t reallocated_sector_count;
289 uint64_t current_pending_sector;
252290
253291 void *blob;
254292 };
13361374 else if (!strcmp(a->name, "reallocated-sector-count") ||
13371375 !strcmp(a->name, "current-pending-sector"))
13381376 a->pretty_value = fourtyeight & 0xFFFFFFFFU;
1377 else if (!strcmp(a->name, "endurance-remaining") ||
1378 !strcmp(a->name, "available-reserved-space"))
1379 a->pretty_value = a->current_value;
1380 else if (!strcmp(a->name, "total-lbas-written") ||
1381 !strcmp(a->name, "total-lbas-read"))
1382 a->pretty_value = fourtyeight * 65536LLU * 512LLU / 1000000LLU;
1383 else if (!strcmp(a->name, "timed-workload-media-wear") ||
1384 !strcmp(a->name, "timed-workload-host-reads"))
1385 a->pretty_value = (double)fourtyeight / 1024LLU;
1386 else if (!strcmp(a->name, "workload-timer"))
1387 a->pretty_value = fourtyeight * 60 * 1000;
13391388 else
13401389 a->pretty_value = fourtyeight;
13411390 }
13901439
13911440 max_sectors = d->size / 512ULL;
13921441
1393 if (max_sectors > 0 && a->pretty_value > max_sectors) {
1442 if (a->pretty_value == 0xffffffffULL ||
1443 a->pretty_value == 0xffffffffffffULL ||
1444 (max_sectors > 0 && a->pretty_value > max_sectors)) {
13941445 a->pretty_value = SK_SMART_ATTRIBUTE_UNIT_UNKNOWN;
13951446 d->attribute_verification_bad = TRUE;
13961447 } else {
14071458 static const SkSmartAttributeInfo const attribute_info[256] = {
14081459 [1] = { ((const char*) 1501), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
14091460 [2] = { ((const char*) 1521), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1410 [3] = { ((const char*) 1544), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_short_time },
1411 [4] = { ((const char*) 1557), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1412 [5] = { ((const char*) 1574), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1413 [6] = { ((const char*) 1599), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1414 [7] = { ((const char*) 1619), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1415 [8] = { ((const char*) 1635), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1416 [9] = { ((const char*) 1657), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1417 [10] = { ((const char*) 1672), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1418 [11] = { ((const char*) 1689), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1419 [12] = { ((const char*) 1713), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1420 [13] = { ((const char*) 1731), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1421 [184] = { ((const char*) 1752), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1422 [187] = { ((const char*) 1769), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1423 [188] = { ((const char*) 1788), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1424 [189] = { ((const char*) 1804), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1425 [190] = { ((const char*) 1820), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
1426 [191] = { ((const char*) 1848), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1427 [192] = { ((const char*) 1867), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1428 [193] = { ((const char*) 1891), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1429 [194] = { ((const char*) 1908), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
1430 [195] = { ((const char*) 1930), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1431 [196] = { ((const char*) 1953), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1432 [197] = { ((const char*) 1977), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1433 [198] = { ((const char*) 2000), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1434 [199] = { ((const char*) 2022), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1435 [200] = { ((const char*) 2043), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1436 [201] = { ((const char*) 2065), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1437 [202] = { ((const char*) 2086), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1438 [203] = { ((const char*) 2104), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1439 [204] = { ((const char*) 2119), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1440 [205] = { ((const char*) 2142), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1441 [206] = { ((const char*) 2164), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1442 [207] = { ((const char*) 2178), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1443 [208] = { ((const char*) 2196), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1444 [209] = { ((const char*) 2206), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1445 [220] = { ((const char*) 2231), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1446 [221] = { ((const char*) 2242), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1447 [222] = { ((const char*) 2263), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1448 [223] = { ((const char*) 2276), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1449 [224] = { ((const char*) 2293), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1450 [225] = { ((const char*) 2307), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1451 [226] = { ((const char*) 2326), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_short_time },
1452 [227] = { ((const char*) 2339), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1453 [228] = { ((const char*) 2354), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1454 [230] = { ((const char*) 2380), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1455 [231] = { ((const char*) 1828), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
1461 [3] = { ((const char*) 2919), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_short_time },
1462 [4] = { ((const char*) 2932), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1463 [5] = { ((const char*) 1544), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1464 [6] = { ((const char*) 1569), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1465 [7] = { ((const char*) 1589), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1466 [8] = { ((const char*) 1605), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1467 [9] = { ((const char*) 1627), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1468 [10] = { ((const char*) 1642), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1469 [11] = { ((const char*) 1659), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1470 [12] = { ((const char*) 1683), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1471 [13] = { ((const char*) 1701), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1472 [170] = { ((const char*) 3183), SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL },
1473 [171] = { ((const char*) 1722), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1474 [172] = { ((const char*) 1741), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1475 [184] = { ((const char*) 1758), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1476 [187] = { ((const char*) 1775), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1477 [188] = { ((const char*) 1794), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1478 [189] = { ((const char*) 1810), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1479 [190] = { ((const char*) 1826), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
1480 [191] = { ((const char*) 1854), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1481 [192] = { ((const char*) 1873), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1482 [193] = { ((const char*) 1897), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1483 [194] = { ((const char*) 1914), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
1484 [195] = { ((const char*) 1936), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1485 [196] = { ((const char*) 1959), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1486 [197] = { ((const char*) 1983), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1487 [198] = { ((const char*) 2006), SK_SMART_ATTRIBUTE_UNIT_SECTORS, verify_sectors },
1488 [199] = { ((const char*) 2028), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1489 [200] = { ((const char*) 2049), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1490 [201] = { ((const char*) 2071), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1491 [202] = { ((const char*) 2092), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1492 [203] = { ((const char*) 2110), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1493 [204] = { ((const char*) 2125), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1494 [205] = { ((const char*) 2148), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1495 [206] = { ((const char*) 2170), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1496 [207] = { ((const char*) 2184), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1497 [208] = { ((const char*) 2202), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1498 [209] = { ((const char*) 2212), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1499 [220] = { ((const char*) 2237), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1500 [221] = { ((const char*) 2248), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1501 [222] = { ((const char*) 2269), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1502 [223] = { ((const char*) 2282), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1503 [224] = { ((const char*) 2299), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1504 [225] = { ((const char*) 2313), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1505 [226] = { ((const char*) 2332), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_short_time },
1506 [227] = { ((const char*) 2345), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1507 [228] = { ((const char*) 2360), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
1508 [230] = { ((const char*) 2386), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1509 [231] = { ((const char*) 1834), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
14561510
14571511 /* http://www.adtron.com/pdf/SMART_for_XceedLite_SATA_RevA.pdf */
1458 [232] = { ((const char*) 2395), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1459 [233] = { ((const char*) 2415), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1460 [234] = { ((const char*) 2434), SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
1461 [235] = { ((const char*) 2458), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1462
1463 [240] = { ((const char*) 2474), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1464 [250] = { ((const char*) 2492), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
1512 [232] = { ((const char*) 2401), SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL },
1513 [233] = { ((const char*) 2421), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1514 [234] = { ((const char*) 2440), SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
1515 [235] = { ((const char*) 2464), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
1516
1517 [240] = { ((const char*) 2480), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
1518 [241] = { ((const char*) 3097), SK_SMART_ATTRIBUTE_UNIT_MB, NULL },
1519 [242] = { ((const char*) 2498), SK_SMART_ATTRIBUTE_UNIT_MB, NULL },
1520 [250] = { ((const char*) 2514), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
14651521 };
14661522 /* %STRINGPOOLSTOP% */
14671523
14681524 typedef enum SkSmartQuirk {
1469 SK_SMART_QUIRK_9_POWERONMINUTES = 0x0001,
1470 SK_SMART_QUIRK_9_POWERONSECONDS = 0x0002,
1471 SK_SMART_QUIRK_9_POWERONHALFMINUTES = 0x0004,
1472 SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT = 0x0008,
1473 SK_SMART_QUIRK_193_LOADUNLOAD = 0x0010,
1474 SK_SMART_QUIRK_194_10XCELSIUS = 0x0020,
1475 SK_SMART_QUIRK_194_UNKNOWN = 0x0040,
1476 SK_SMART_QUIRK_200_WRITEERRORCOUNT = 0x0080,
1477 SK_SMART_QUIRK_201_DETECTEDTACOUNT = 0x0100,
1478 SK_SMART_QUIRK_5_UNKNOWN = 0x0200,
1479 SK_SMART_QUIRK_9_UNKNOWN = 0x0400,
1480 SK_SMART_QUIRK_197_UNKNOWN = 0x0800,
1481 SK_SMART_QUIRK_198_UNKNOWN = 0x1000,
1482 SK_SMART_QUIRK_190_UNKNOWN = 0x2000
1525 SK_SMART_QUIRK_9_POWERONMINUTES = 0x000001,
1526 SK_SMART_QUIRK_9_POWERONSECONDS = 0x000002,
1527 SK_SMART_QUIRK_9_POWERONHALFMINUTES = 0x000004,
1528 SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT = 0x000008,
1529 SK_SMART_QUIRK_193_LOADUNLOAD = 0x000010,
1530 SK_SMART_QUIRK_194_10XCELSIUS = 0x000020,
1531 SK_SMART_QUIRK_194_UNKNOWN = 0x000040,
1532 SK_SMART_QUIRK_200_WRITEERRORCOUNT = 0x000080,
1533 SK_SMART_QUIRK_201_DETECTEDTACOUNT = 0x000100,
1534 SK_SMART_QUIRK_5_UNKNOWN = 0x000200,
1535 SK_SMART_QUIRK_9_UNKNOWN = 0x000400,
1536 SK_SMART_QUIRK_197_UNKNOWN = 0x000800,
1537 SK_SMART_QUIRK_198_UNKNOWN = 0x001000,
1538 SK_SMART_QUIRK_190_UNKNOWN = 0x002000,
1539 SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE = 0x004000,
1540 SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR = 0x008000,
1541 SK_SMART_QUIRK_225_TOTALLBASWRITTEN = 0x010000,
1542 SK_SMART_QUIRK_4_UNUSED = 0x020000,
1543 SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR = 0x040000,
1544 SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS = 0x080000,
1545 SK_SMART_QUIRK_228_WORKLOADTIMER = 0x100000,
1546 SK_SMART_QUIRK_3_UNUSED = 0x200000
14831547 } SkSmartQuirk;
14841548
14851549 /* %STRINGPOOLSTART% */
14861550 static const char *quirk_name[] = {
1487 ((const char*) 2514),
1488 ((const char*) 2531),
1489 ((const char*) 2548),
1490 ((const char*) 2569),
1491 ((const char*) 2597),
1492 ((const char*) 2612),
1493 ((const char*) 2627),
1494 ((const char*) 2639),
1495 ((const char*) 2659),
1496 ((const char*) 2679),
1497 ((const char*) 2689),
1498 ((const char*) 2699),
1551 ((const char*) 2536),
1552 ((const char*) 2553),
1553 ((const char*) 2570),
1554 ((const char*) 2591),
1555 ((const char*) 2619),
1556 ((const char*) 2634),
1557 ((const char*) 2649),
1558 ((const char*) 2661),
1559 ((const char*) 2681),
1560 ((const char*) 2701),
14991561 ((const char*) 2711),
1500 ((const char*) 2723),
1562 ((const char*) 2721),
1563 ((const char*) 2733),
1564 ((const char*) 2745),
1565 ((const char*) 2757),
1566 ((const char*) 2784),
1567 ((const char*) 2810),
1568 ((const char*) 2831),
1569 ((const char*) 2840),
1570 ((const char*) 2866),
1571 ((const char*) 2892),
1572 ((const char*) 2910),
15011573 NULL
15021574 };
15031575 /* %STRINGPOOLSTOP% */
16501722 SK_SMART_QUIRK_5_UNKNOWN|
16511723 SK_SMART_QUIRK_190_UNKNOWN
16521724 }, {
1725
1726 /*** Intel */
1727 "^INTEL SSDSA2CW[0-9]{3}G3$",
1728 NULL,
1729 SK_SMART_QUIRK_3_UNUSED|
1730 SK_SMART_QUIRK_4_UNUSED|
1731 SK_SMART_QUIRK_225_TOTALLBASWRITTEN|
1732 SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR|
1733 SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS|
1734 SK_SMART_QUIRK_228_WORKLOADTIMER|
1735 SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE|
1736 SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR
1737 }, {
16531738 NULL,
16541739 NULL,
16551740 0
17311816
17321817 if (quirk) {
17331818 switch (id) {
1819 case 3:
1820 /* %STRINGPOOLSTART% */
1821 if (quirk & SK_SMART_QUIRK_3_UNUSED) {
1822 static const SkSmartAttributeInfo a = {
1823 ((const char*) 2919), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL
1824 };
1825 return &a;
1826 }
1827 /* %STRINGPOOLSTOP% */
1828
1829 break;
1830
1831 case 4:
1832 /* %STRINGPOOLSTART% */
1833 if (quirk & SK_SMART_QUIRK_4_UNUSED) {
1834 static const SkSmartAttributeInfo a = {
1835 ((const char*) 2932), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL
1836 };
1837 return &a;
1838 }
1839 /* %STRINGPOOLSTOP% */
1840
1841 break;
17341842
17351843 case 5:
17361844 if (quirk & SK_SMART_QUIRK_5_UNKNOWN)
17421850 /* %STRINGPOOLSTART% */
17431851 if (quirk & SK_SMART_QUIRK_9_POWERONMINUTES) {
17441852 static const SkSmartAttributeInfo a = {
1745 ((const char*) 2735), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
1853 ((const char*) 2949), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
17461854 };
17471855 return &a;
17481856
17491857 } else if (quirk & SK_SMART_QUIRK_9_POWERONSECONDS) {
17501858 static const SkSmartAttributeInfo a = {
1751 ((const char*) 2752), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
1859 ((const char*) 2966), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
17521860 };
17531861 return &a;
17541862
17551863 } else if (quirk & SK_SMART_QUIRK_9_POWERONHALFMINUTES) {
17561864 static const SkSmartAttributeInfo a = {
1757 ((const char*) 2769), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
1865 ((const char*) 2983), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
17581866 };
17591867 return &a;
17601868 } else if (quirk & SK_SMART_QUIRK_9_UNKNOWN)
17731881 /* %STRINGPOOLSTART% */
17741882 if (quirk & SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT) {
17751883 static const SkSmartAttributeInfo a = {
1776 ((const char*) 2791), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
1884 ((const char*) 3005), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
17771885 };
17781886 return &a;
17791887 }
17851893 /* %STRINGPOOLSTART% */
17861894 if (quirk & SK_SMART_QUIRK_194_10XCELSIUS) {
17871895 static const SkSmartAttributeInfo a = {
1788 ((const char*) 2821), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature
1896 ((const char*) 3035), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature
17891897 };
17901898 return &a;
17911899 } else if (quirk & SK_SMART_QUIRK_194_UNKNOWN)
18101918 /* %STRINGPOOLSTART% */
18111919 if (quirk & SK_SMART_QUIRK_200_WRITEERRORCOUNT) {
18121920 static const SkSmartAttributeInfo a = {
1813 ((const char*) 2847), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
1921 ((const char*) 3061), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
18141922 };
18151923 return &a;
18161924 }
18221930 /* %STRINGPOOLSTART% */
18231931 if (quirk & SK_SMART_QUIRK_201_DETECTEDTACOUNT) {
18241932 static const SkSmartAttributeInfo a = {
1825 ((const char*) 2865), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
1933 ((const char*) 3079), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
18261934 };
18271935 return &a;
18281936 }
18291937 /* %STRINGPOOLSTOP% */
18301938
18311939 break;
1940
1941 case 225:
1942 /* %STRINGPOOLSTART% */
1943 if (quirk & SK_SMART_QUIRK_225_TOTALLBASWRITTEN) {
1944 static const SkSmartAttributeInfo a = {
1945 ((const char*) 3097), SK_SMART_ATTRIBUTE_UNIT_MB, NULL
1946 };
1947 return &a;
1948 }
1949 /* %STRINGPOOLSTOP% */
1950
1951 break;
1952
1953 case 226:
1954 /* %STRINGPOOLSTART% */
1955 if (quirk & SK_SMART_QUIRK_226_TIMEWORKLOADMEDIAWEAR) {
1956 static const SkSmartAttributeInfo a = {
1957 ((const char*) 3116), SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, NULL
1958 };
1959 return &a;
1960 }
1961 /* %STRINGPOOLSTOP% */
1962
1963 break;
1964
1965 case 227:
1966 /* %STRINGPOOLSTART% */
1967 if (quirk & SK_SMART_QUIRK_227_TIMEWORKLOADHOSTREADS) {
1968 static const SkSmartAttributeInfo a = {
1969 ((const char*) 3142), SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, NULL
1970 };
1971 return &a;
1972 }
1973 /* %STRINGPOOLSTOP% */
1974
1975 break;
1976
1977 case 228:
1978 /* %STRINGPOOLSTART% */
1979 if (quirk & SK_SMART_QUIRK_228_WORKLOADTIMER) {
1980 static const SkSmartAttributeInfo a = {
1981 ((const char*) 3168), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, NULL
1982 };
1983 return &a;
1984 }
1985 /* %STRINGPOOLSTOP% */
1986
1987 break;
1988
1989 case 232:
1990 /* %STRINGPOOLSTART% */
1991 if (quirk & SK_SMART_QUIRK_232_AVAILABLERESERVEDSPACE) {
1992 static const SkSmartAttributeInfo a = {
1993 ((const char*) 3183), SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL
1994 };
1995 return &a;
1996 }
1997 /* %STRINGPOOLSTOP% */
1998 break;
1999
2000 case 233:
2001 /* %STRINGPOOLSTART% */
2002 if (quirk & SK_SMART_QUIRK_233_MEDIAWEAROUTINDICATOR) {
2003 static const SkSmartAttributeInfo a = {
2004 ((const char*) 3208), SK_SMART_ATTRIBUTE_UNIT_PERCENT, NULL
2005 };
2006 return &a;
2007 }
2008 /* %STRINGPOOLSTOP% */
2009 break;
2010
18322011 }
18332012 }
18342013
20172196 const char * const map[] = {
20182197 [SK_SMART_ATTRIBUTE_UNIT_UNKNOWN] = NULL,
20192198 [SK_SMART_ATTRIBUTE_UNIT_NONE] = ((const char*) 30),
2020 [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 2883),
2021 [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 2886),
2022 [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 2894)
2199 [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 3232),
2200 [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 3235),
2201 [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 3243),
2202 [SK_SMART_ATTRIBUTE_UNIT_PERCENT] = ((const char*) 3246),
2203 [SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT] = ((const char*) 3246),
2204 [SK_SMART_ATTRIBUTE_UNIT_MB] = ((const char*) 3248)
20232205 };
20242206 /* %STRINGPOOLSTOP% */
20252207
21432325 return 0;
21442326 }
21452327
2146 static void reallocated_cb(SkDisk *d, const SkSmartAttributeParsedData *a, struct attr_helper *ah) {
2328 static void fill_cache_cb(SkDisk *d, const SkSmartAttributeParsedData *a, void* userdata) {
2329
2330 if (a->prefailure) {
2331 if (a->good_now_valid && !a->good_now)
2332 d->bad_attribute_now = TRUE;
2333
2334 if (a->good_in_the_past_valid && !a->good_in_the_past)
2335 d->bad_attribute_in_the_past = TRUE;
2336 }
21472337
21482338 if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
21492339 return;
21502340
21512341 if (!strcmp(a->name, "reallocated-sector-count")) {
2152
2153 if (!ah->found || a->pretty_value > *ah->value)
2154 *ah->value = a->pretty_value;
2155
2156 ah->found = TRUE;
2157 }
2158 }
2159
2160 static void pending_cb(SkDisk *d, const SkSmartAttributeParsedData *a, struct attr_helper *ah) {
2161
2162 if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
2163 return;
2342 if (a->pretty_value > d->reallocated_sector_count)
2343 d->reallocated_sector_count = a->pretty_value;
2344 d->reallocated_sector_count_found = TRUE;
2345 }
21642346
21652347 if (!strcmp(a->name, "current-pending-sector")) {
2166
2167 if (!ah->found || a->pretty_value > *ah->value)
2168 *ah->value = a->pretty_value;
2169
2170 ah->found = TRUE;
2171 }
2348 if (a->pretty_value > d->current_pending_sector)
2349 d->current_pending_sector = a->pretty_value;
2350 d->current_pending_sector_found = TRUE;
2351 }
2352 }
2353
2354 static int fill_cache(SkDisk *d) {
2355 if (d->attribute_cache_valid)
2356 return 0;
2357
2358 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) fill_cache_cb, NULL) >= 0) {
2359 d->attribute_cache_valid = TRUE;
2360 return 0;
2361 } else
2362 return -1;
21722363 }
21732364
21742365 int sk_disk_smart_get_bad(SkDisk *d, uint64_t *sectors) {
2175 struct attr_helper ah1, ah2;
2176 uint64_t sectors1, sectors2;
2177
21782366 assert(d);
21792367 assert(sectors);
21802368
2181 ah1.found = FALSE;
2182 ah1.value = &sectors1;
2183
2184 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) reallocated_cb, &ah1) < 0)
2185 return -1;
2186
2187 ah2.found = FALSE;
2188 ah2.value = &sectors2;
2189
2190 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) pending_cb, &ah2) < 0)
2191 return -1;
2192
2193 if (!ah1.found && !ah2.found) {
2369 if (fill_cache (d) < 0)
2370 return -1;
2371
2372 if (!d->reallocated_sector_count_found && !d->current_pending_sector_found) {
21942373 errno = ENOENT;
21952374 return -1;
21962375 }
21972376
2198 if (ah1.found && ah2.found)
2199 *sectors = sectors1 + sectors2;
2200 else if (ah1.found)
2201 *sectors = sectors1;
2377 if (d->reallocated_sector_count_found && d->current_pending_sector_found)
2378 *sectors = d->reallocated_sector_count + d->current_pending_sector;
2379 else if (d->reallocated_sector_count_found)
2380 *sectors = d->reallocated_sector_count;
22022381 else
2203 *sectors = sectors2;
2382 *sectors = d->current_pending_sector;
22042383
22052384 return 0;
22062385 }
22092388
22102389 /* %STRINGPOOLSTART% */
22112390 const char * const map[] = {
2212 [SK_SMART_OVERALL_GOOD] = ((const char*) 2897),
2213 [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 2902),
2214 [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 2928),
2215 [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 2939),
2216 [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 2957),
2217 [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 2973),
2391 [SK_SMART_OVERALL_GOOD] = ((const char*) 3251),
2392 [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 3256),
2393 [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 3282),
2394 [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 3293),
2395 [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 3311),
2396 [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 3327),
22182397 };
22192398 /* %STRINGPOOLSTOP% */
22202399
22222401 return NULL;
22232402
22242403 return _P(map[overall]);
2225 }
2226
2227 static void bad_attribute_now_cb(SkDisk *d, const SkSmartAttributeParsedData *a, SkBool *good) {
2228 if (a->prefailure && a->good_now_valid && !a->good_now)
2229 *good = FALSE;
2230 }
2231
2232 static void bad_attribute_in_the_past_cb(SkDisk *d, const SkSmartAttributeParsedData *a, SkBool *good) {
2233 if (a->prefailure && a->good_in_the_past_valid && !a->good_in_the_past)
2234 *good = FALSE;
22352404 }
22362405
22372406 static uint64_t u64log2(uint64_t n) {
22732442 sectors = 0;
22742443 } else {
22752444
2276 /* We use log2(n_sectors) as a threshold here. We had to pick
2277 * something, and this makes a bit of sense, or doesn't it? */
2278 sector_threshold = u64log2(d->size/512);
2445 /* We use log2(n_sectors)*1024 as a threshold here. We
2446 * had to pick something, and this makes a bit of
2447 * sense, or doesn't it? */
2448 sector_threshold = u64log2(d->size/512) * 1024;
22792449
22802450 if (sectors >= sector_threshold) {
22812451 *overall = SK_SMART_OVERALL_BAD_SECTOR_MANY;
22842454 }
22852455
22862456 /* Third, check if any of the SMART attributes is bad */
2287 good = TRUE;
2288 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) bad_attribute_now_cb, &good) < 0)
2289 return -1;
2290
2291 if (!good) {
2457 if (fill_cache (d) < 0)
2458 return -1;
2459
2460 if (d->bad_attribute_now) {
22922461 *overall = SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW;
22932462 return 0;
22942463 }
23002469 }
23012470
23022471 /* Fifth, check if any of the SMART attributes ever was bad */
2303 good = TRUE;
2304 if (sk_disk_smart_parse_attributes(d, (SkSmartAttributeParseCallback) bad_attribute_in_the_past_cb, &good) < 0)
2305 return -1;
2306
2307 if (!good) {
2472 if (d->bad_attribute_in_the_past) {
23082473 *overall = SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST;
23092474 return 0;
23102475 }
23542519
23552520 case SK_SMART_ATTRIBUTE_UNIT_SECTORS:
23562521 snprintf(s, len, "%llu sectors", (unsigned long long) pretty_value);
2522 break;
2523
2524 case SK_SMART_ATTRIBUTE_UNIT_PERCENT:
2525 snprintf(s, len, "%llu%%", (unsigned long long) pretty_value);
2526 break;
2527
2528 case SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT:
2529 snprintf(s, len, "%0.3f%%", (double) pretty_value);
2530 break;
2531
2532 case SK_SMART_ATTRIBUTE_UNIT_MB:
2533 if (pretty_value >= 1000000LLU)
2534 snprintf(s, len, "%0.3f TB", (double) pretty_value / 1000000LLU);
2535 else if (pretty_value >= 1000LLU)
2536 snprintf(s, len, "%0.3f GB", (double) pretty_value / 1000LLU);
2537 else
2538 snprintf(s, len, "%llu MB", (unsigned long long) pretty_value);
23572539 break;
23582540
23592541 case SK_SMART_ATTRIBUTE_UNIT_NONE:
0 #!/bin/bash
1
2 # This file is part of libatasmart.
3 #
4 # Copyright 2008-2011 Lennart Poettering
5 #
6 # libatasmart is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation, either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # libatasmart is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with libatasmart; If not, see
18 # <http://www.gnu.org/licenses/>.
19
20 AM_VERSION=1.11
21 AC_VERSION=2.63
22
23 run_versioned() {
24 local P
25 local V
26
27 V=$(echo "$2" | sed -e 's,\.,,g')
28
29 if [ -e "`which $1$V 2> /dev/null`" ] ; then
30 P="$1$V"
31 else
32 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
33 P="$1-$2"
34 else
35 P="$1"
36 fi
37 fi
38
39 shift 2
40 "$P" "$@"
41 }
42
43 set -ex
44
45 if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
46 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
47 chmod +x .git/hooks/pre-commit && \
48 echo "Activated pre-commit hook."
49 fi
50
51 if type -p colorgcc > /dev/null ; then
52 export CC=colorgcc
53 fi
54
55 libdir() {
56 echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
57 }
58
59 if [ "x$1" = "xam" ] ; then
60 run_versioned automake "$AM_VERSION" -a -c --foreign
61 ./config.status
62 else
63 rm -rf autom4te.cache
64 rm -f config.cache
65
66 libtoolize -c --force
67 run_versioned aclocal "$AM_VERSION" -I m4
68 run_versioned autoconf "$AC_VERSION" -Wall
69 run_versioned autoheader "$AC_VERSION"
70 run_versioned automake "$AM_VERSION" --copy --foreign --add-missing
71
72 if [ "x$1" != "xac" ]; then
73 CFLAGS="$CFLAGS -g -O0" ./configure \
74 --sysconfdir=/etc \
75 --localstatedir=/var \
76 --libexecdir=/usr/lib \
77 --libdir=$(libdir /usr/local/lib) \
78 "$@"
79 make clean
80 fi
81 fi
+0
-66
bootstrap.sh less more
0 #!/bin/bash
1
2 # This file is part of libatasmart.
3 #
4 # Copyright 2008 Lennart Poettering
5 #
6 # libatasmart is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation, either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # libatasmart is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with libatasmart. If not, If not, see
18 # <http://www.gnu.org/licenses/>.
19
20 VERSION=1.11
21
22 run_versioned() {
23 local P
24 local V
25
26 V=$(echo "$2" | sed -e 's,\.,,g')
27
28 if [ -e "`which $1$V 2> /dev/null`" ] ; then
29 P="$1$V"
30 else
31 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
32 P="$1-$2"
33 else
34 P="$1"
35 fi
36 fi
37
38 shift 2
39 "$P" "$@"
40 }
41
42 set -ex
43
44 if [ "x$1" = "xam" ] ; then
45 run_versioned automake "$VERSION" -a -c --foreign
46 ./config.status
47 else
48 rm -rf autom4te.cache
49 rm -f config.cache
50
51 touch config.rpath
52 test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
53
54 mkdir -p m4
55 "$LIBTOOLIZE" -c --force
56 run_versioned aclocal "$VERSION"
57 run_versioned autoconf 2.63 -Wall
58 run_versioned autoheader 2.63
59 run_versioned automake "$VERSION" --copy --foreign --add-missing
60
61 if test "x$NOCONFIGURE" = "x"; then
62 CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var "$@"
63 make clean
64 fi
65 fi
33 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-10'
6 timestamp='2009-11-20'
77
88 # This file is free software; you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License as published by
2626 # the same distribution terms that you use for the rest of that program.
2727
2828
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to <config-patches@gnu.org> and include a ChangeLog
31 # entry.
3232 #
3333 # This script attempts to guess a canonical system name similar to
3434 # config.sub. If it succeeds, it prints the system name on stdout, and
3535 # exits with 0. Otherwise, it exits with 1.
3636 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3939
4040 me=`echo "$0" | sed -e 's,.*/,,'`
4141
332332 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
333333 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334334 exit ;;
335 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
336 echo i386-pc-auroraux${UNAME_RELEASE}
337 exit ;;
335338 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336339 eval $set_cc_for_build
337340 SUN_ARCH="i386"
806809 i*:PW*:*)
807810 echo ${UNAME_MACHINE}-pc-pw32
808811 exit ;;
809 *:Interix*:[3456]*)
812 *:Interix*:*)
810813 case ${UNAME_MACHINE} in
811814 x86)
812815 echo i586-pc-interix${UNAME_RELEASE}
813816 exit ;;
814 EM64T | authenticamd | genuineintel)
817 authenticamd | genuineintel | EM64T)
815818 echo x86_64-unknown-interix${UNAME_RELEASE}
816819 exit ;;
817820 IA64)
853856 i*86:Minix:*:*)
854857 echo ${UNAME_MACHINE}-pc-minix
855858 exit ;;
859 alpha:Linux:*:*)
860 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
861 EV5) UNAME_MACHINE=alphaev5 ;;
862 EV56) UNAME_MACHINE=alphaev56 ;;
863 PCA56) UNAME_MACHINE=alphapca56 ;;
864 PCA57) UNAME_MACHINE=alphapca56 ;;
865 EV6) UNAME_MACHINE=alphaev6 ;;
866 EV67) UNAME_MACHINE=alphaev67 ;;
867 EV68*) UNAME_MACHINE=alphaev68 ;;
868 esac
869 objdump --private-headers /bin/sh | grep -q ld.so.1
870 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
871 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
872 exit ;;
856873 arm*:Linux:*:*)
857874 eval $set_cc_for_build
858875 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
874891 exit ;;
875892 frv:Linux:*:*)
876893 echo frv-unknown-linux-gnu
894 exit ;;
895 i*86:Linux:*:*)
896 LIBC=gnu
897 eval $set_cc_for_build
898 sed 's/^ //' << EOF >$dummy.c
899 #ifdef __dietlibc__
900 LIBC=dietlibc
901 #endif
902 EOF
903 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
904 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
877905 exit ;;
878906 ia64:Linux:*:*)
879907 echo ${UNAME_MACHINE}-unknown-linux-gnu
900928 #endif
901929 #endif
902930 EOF
903 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
904 /^CPU/{
905 s: ::g
906 p
907 }'`"
931 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
908932 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
909933 ;;
910934 or32:Linux:*:*)
911935 echo or32-unknown-linux-gnu
912936 exit ;;
913 ppc:Linux:*:*)
914 echo powerpc-unknown-linux-gnu
915 exit ;;
916 ppc64:Linux:*:*)
917 echo powerpc64-unknown-linux-gnu
918 exit ;;
919 alpha:Linux:*:*)
920 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
921 EV5) UNAME_MACHINE=alphaev5 ;;
922 EV56) UNAME_MACHINE=alphaev56 ;;
923 PCA56) UNAME_MACHINE=alphapca56 ;;
924 PCA57) UNAME_MACHINE=alphapca56 ;;
925 EV6) UNAME_MACHINE=alphaev6 ;;
926 EV67) UNAME_MACHINE=alphaev67 ;;
927 EV68*) UNAME_MACHINE=alphaev68 ;;
928 esac
929 objdump --private-headers /bin/sh | grep -q ld.so.1
930 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
931 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
932 exit ;;
933937 padre:Linux:*:*)
934938 echo sparc-unknown-linux-gnu
939 exit ;;
940 parisc64:Linux:*:* | hppa64:Linux:*:*)
941 echo hppa64-unknown-linux-gnu
935942 exit ;;
936943 parisc:Linux:*:* | hppa:Linux:*:*)
937944 # Look for CPU level
941948 *) echo hppa-unknown-linux-gnu ;;
942949 esac
943950 exit ;;
944 parisc64:Linux:*:* | hppa64:Linux:*:*)
945 echo hppa64-unknown-linux-gnu
951 ppc64:Linux:*:*)
952 echo powerpc64-unknown-linux-gnu
953 exit ;;
954 ppc:Linux:*:*)
955 echo powerpc-unknown-linux-gnu
946956 exit ;;
947957 s390:Linux:*:* | s390x:Linux:*:*)
948958 echo ${UNAME_MACHINE}-ibm-linux
965975 xtensa*:Linux:*:*)
966976 echo ${UNAME_MACHINE}-unknown-linux-gnu
967977 exit ;;
968 i*86:Linux:*:*)
969 # The BFD linker knows what the default object file format is, so
970 # first see if it will tell us. cd to the root directory to prevent
971 # problems with other programs or directories called `ld' in the path.
972 # Set LC_ALL=C to ensure ld outputs messages in English.
973 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
974 | sed -ne '/supported targets:/!d
975 s/[ ][ ]*/ /g
976 s/.*supported targets: *//
977 s/ .*//
978 p'`
979 case "$ld_supported_targets" in
980 elf32-i386)
981 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
982 ;;
983 esac
984 # Determine whether the default compiler is a.out or elf
985 eval $set_cc_for_build
986 sed 's/^ //' << EOF >$dummy.c
987 #include <features.h>
988 #ifdef __ELF__
989 # ifdef __GLIBC__
990 # if __GLIBC__ >= 2
991 LIBC=gnu
992 # else
993 LIBC=gnulibc1
994 # endif
995 # else
996 LIBC=gnulibc1
997 # endif
998 #else
999 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1000 LIBC=gnu
1001 #else
1002 LIBC=gnuaout
1003 #endif
1004 #endif
1005 #ifdef __dietlibc__
1006 LIBC=dietlibc
1007 #endif
1008 EOF
1009 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1010 /^LIBC/{
1011 s: ::g
1012 p
1013 }'`"
1014 test x"${LIBC}" != x && {
1015 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1016 exit
1017 }
1018 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1019 ;;
1020978 i*86:DYNIX/ptx:4*:*)
1021979 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1022980 # earlier versions are messed up and put the nodename in both
12461204 *:Darwin:*:*)
12471205 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12481206 case $UNAME_PROCESSOR in
1207 i386)
1208 eval $set_cc_for_build
1209 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1210 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1211 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1212 grep IS_64BIT_ARCH >/dev/null
1213 then
1214 UNAME_PROCESSOR="x86_64"
1215 fi
1216 fi ;;
12491217 unknown) UNAME_PROCESSOR=powerpc ;;
12501218 esac
12511219 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
00 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define if building universal (internal helper macro) */
3 #undef AC_APPLE_UNIVERSAL_BUILD
4
5 /* Define to 1 if you have the <byteswap.h> header file. */
6 #undef HAVE_BYTESWAP_H
71
82 /* Define to 1 if you have the <dlfcn.h> header file. */
93 #undef HAVE_DLFCN_H
137
148 /* Define to 1 if you have the <memory.h> header file. */
159 #undef HAVE_MEMORY_H
16
17 /* Define to 1 if the system has the type `ssize_t'. */
18 #undef HAVE_SSIZE_T
1910
2011 /* Define to 1 if you have the <stdint.h> header file. */
2112 #undef HAVE_STDINT_H
2819
2920 /* Define to 1 if you have the <string.h> header file. */
3021 #undef HAVE_STRING_H
31
32 /* Define to 1 if you have the <sys/ioctl.h> header file. */
33 #undef HAVE_SYS_IOCTL_H
34
35 /* Define to 1 if you have the <sys/poll.h> header file. */
36 #undef HAVE_SYS_POLL_H
3722
3823 /* Define to 1 if you have the <sys/stat.h> header file. */
3924 #undef HAVE_SYS_STAT_H
7257 /* Define to the version of this package. */
7358 #undef PACKAGE_VERSION
7459
75 /* Define as the return type of signal handlers (`int' or `void'). */
76 #undef RETSIGTYPE
77
7860 /* Define to 1 if you have the ANSI C header files. */
7961 #undef STDC_HEADERS
8062
10385 /* Version number of package */
10486 #undef VERSION
10587
106 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
107 significant byte first (like Motorola and SPARC, unlike Intel). */
108 #if defined AC_APPLE_UNIVERSAL_BUILD
109 # if defined __BIG_ENDIAN__
110 # define WORDS_BIGENDIAN 1
111 # endif
112 #else
113 # ifndef WORDS_BIGENDIAN
114 # undef WORDS_BIGENDIAN
115 # endif
116 #endif
117
11888 /* Number of bits in a file offset, on hosts where this is settable. */
11989 #undef _FILE_OFFSET_BITS
12090
130100
131101 /* Define to 1 if you need to in order for `stat' and other things to work. */
132102 #undef _POSIX_SOURCE
133
134 /* Define to empty if `const' does not conform to ANSI C. */
135 #undef const
136
137 /* Define to `int' if <sys/types.h> doesn't define. */
138 #undef gid_t
139
140 /* Define to `long int' if <sys/types.h> does not define. */
141 #undef off_t
142
143 /* Define to `int' if <sys/types.h> does not define. */
144 #undef pid_t
145
146 /* Define to `unsigned int' if <sys/types.h> does not define. */
147 #undef size_t
148
149 /* Define ssize_t if it is not done by the standard libs. */
150 #undef ssize_t
151
152 /* Define to `int' if <sys/types.h> doesn't define. */
153 #undef uid_t
33 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-11'
6 timestamp='2009-11-20'
77
88 # This file is (in principle) common to ALL GNU software.
99 # The presence of a machine in this file suggests that SOME GNU software
3131
3232
3333 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
34 # diff and a properly formatted GNU ChangeLog entry.
3535 #
3636 # Configuration subroutine to validate and canonicalize a configuration type.
3737 # Supply the specified configuration type as an argument.
3838 # If it is invalid, we print an error message on stderr and exit with code 1.
3939 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # You can get the latest version of this script from:
42 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
4043
4144 # This file is supposed to be the same for all GNU packages
4245 # and recognize all the CPU types, system types and aliases
148151 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149152 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150153 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
154 -apple | -axis | -knuth | -cray | -microblaze)
152155 os=
153156 basic_machine=$1
154157 ;;
283286 | pdp10 | pdp11 | pj | pjl \
284287 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
285288 | pyramid \
289 | rx \
286290 | score \
287291 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
288292 | sh64 | sh64le \
290294 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
291295 | spu | strongarm \
292296 | tahoe | thumb | tic4x | tic80 | tron \
297 | ubicom32 \
293298 | v850 | v850e \
294299 | we32k \
295300 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
296301 | z8k | z80)
297302 basic_machine=$basic_machine-unknown
298303 ;;
299 m6811 | m68hc11 | m6812 | m68hc12)
304 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
300305 # Motorola 68HC11/12.
301306 basic_machine=$basic_machine-unknown
302307 os=-none
339344 | lm32-* \
340345 | m32c-* | m32r-* | m32rle-* \
341346 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
342 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
347 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
343348 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
344349 | mips16-* \
345350 | mips64-* | mips64el-* \
367372 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
368373 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
369374 | pyramid-* \
370 | romp-* | rs6000-* \
375 | romp-* | rs6000-* | rx-* \
371376 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
372377 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
373378 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
376381 | tahoe-* | thumb-* \
377382 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
378383 | tron-* \
384 | ubicom32-* \
379385 | v850-* | v850e-* | vax-* \
380386 | we32k-* \
381387 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
724730 merlin)
725731 basic_machine=ns32k-utek
726732 os=-sysv
733 ;;
734 microblaze)
735 basic_machine=microblaze-xilinx
727736 ;;
728737 mingw32)
729738 basic_machine=i386-pc
12461255 # First match some system type aliases
12471256 # that might get confused with valid system types.
12481257 # -solaris* is a basic system type, with this one exception.
1258 -auroraux)
1259 os=-auroraux
1260 ;;
12491261 -solaris1 | -solaris1.*)
12501262 os=`echo $os | sed -e 's|solaris1|sunos4|'`
12511263 ;;
12671279 # -sysv* is not here because it comes later, after sysvr4.
12681280 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
12691281 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1270 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1271 | -kopensolaris* \
1282 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1283 | -sym* | -kopensolaris* \
12721284 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12731285 | -aos* | -aros* \
12741286 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
12891301 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
12901302 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12911303 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1292 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1304 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
12931305 # Remember, each alternative MUST END IN *, to match a version number.
12941306 ;;
12951307 -qnx*)
+2571
-6229
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.65 for libatasmart 0.17.
2 # Generated by GNU Autoconf 2.68 for libatasmart 0.18.
33 #
44 # Report bugs to <mzyvongnfzneg (at) 0pointer (dot) net>.
55 #
66 #
77 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
9 # Inc.
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
9 # Foundation, Inc.
1010 #
1111 #
1212 # This configure script is free software; the Free Software Foundation
9090 IFS=" "" $as_nl"
9191
9292 # Find who we are. Look in the path if we contain no directory separator.
93 as_myself=
9394 case $0 in #((
9495 *[\\/]* ) as_myself=$0 ;;
9596 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
172173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
173174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
174175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
175 test \$(( 1 + 1 )) = 2 || exit 1"
176 test \$(( 1 + 1 )) = 2 || exit 1
177
178 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
179 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
180 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
181 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
182 PATH=/empty FPATH=/empty; export PATH FPATH
183 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
184 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
176185 if (eval "$as_required") 2>/dev/null; then :
177186 as_have_required=yes
178187 else
215224 # We cannot yet assume a decent shell, so we have to provide a
216225 # neutralization value for shells without unset; and this also
217226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
218228 BASH_ENV=/dev/null
219229 ENV=/dev/null
220230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
221231 export CONFIG_SHELL
222 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
232 case $- in # ((((
233 *v*x* | *x*v* ) as_opts=-vx ;;
234 *v* ) as_opts=-v ;;
235 *x* ) as_opts=-x ;;
236 * ) as_opts= ;;
237 esac
238 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
223239 fi
224240
225241 if test x$as_have_required = xno; then :
318334 test -d "$as_dir" && break
319335 done
320336 test -z "$as_dirs" || eval "mkdir $as_dirs"
321 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
337 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
322338
323339
324340 } # as_fn_mkdir_p
358374 fi # as_fn_arith
359375
360376
361 # as_fn_error ERROR [LINENO LOG_FD]
362 # ---------------------------------
377 # as_fn_error STATUS ERROR [LINENO LOG_FD]
378 # ----------------------------------------
363379 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
364380 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
365 # script with status $?, using 1 if that was 0.
381 # script with STATUS, using 1 if that was 0.
366382 as_fn_error ()
367383 {
368 as_status=$?; test $as_status -eq 0 && as_status=1
369 if test "$3"; then
370 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
371 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
384 as_status=$1; test $as_status -eq 0 && as_status=1
385 if test "$4"; then
386 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
387 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
372388 fi
373 $as_echo "$as_me: error: $1" >&2
389 $as_echo "$as_me: error: $2" >&2
374390 as_fn_exit $as_status
375391 } # as_fn_error
376392
527543 # Sed expression to map a string onto a valid variable name.
528544 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
529545
530
531
532 # Check that we are running under the correct shell.
533546 SHELL=${CONFIG_SHELL-/bin/sh}
534
535 case X$lt_ECHO in
536 X*--fallback-echo)
537 # Remove one level of quotation (which was required for Make).
538 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
539 ;;
540 esac
541
542 ECHO=${lt_ECHO-echo}
543 if test "X$1" = X--no-reexec; then
544 # Discard the --no-reexec flag, and continue.
545 shift
546 elif test "X$1" = X--fallback-echo; then
547 # Avoid inline document here, it may be left over
548 :
549 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
550 # Yippee, $ECHO works!
551 :
552 else
553 # Restart under the correct shell.
554 exec $SHELL "$0" --no-reexec ${1+"$@"}
555 fi
556
557 if test "X$1" = X--fallback-echo; then
558 # used as fallback echo
559 shift
560 cat <<_LT_EOF
561 $*
562 _LT_EOF
563 exit 0
564 fi
565
566 # The HP-UX ksh and POSIX shell print the target directory to stdout
567 # if CDPATH is set.
568 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
569
570 if test -z "$lt_ECHO"; then
571 if test "X${echo_test_string+set}" != Xset; then
572 # find a string as large as possible, as long as the shell can cope with it
573 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
574 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
575 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
576 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
577 then
578 break
579 fi
580 done
581 fi
582
583 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
584 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
585 test "X$echo_testing_string" = "X$echo_test_string"; then
586 :
587 else
588 # The Solaris, AIX, and Digital Unix default echo programs unquote
589 # backslashes. This makes it impossible to quote backslashes using
590 # echo "$something" | sed 's/\\/\\\\/g'
591 #
592 # So, first we look for a working echo in the user's PATH.
593
594 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
595 for dir in $PATH /usr/ucb; do
596 IFS="$lt_save_ifs"
597 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
598 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
599 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
600 test "X$echo_testing_string" = "X$echo_test_string"; then
601 ECHO="$dir/echo"
602 break
603 fi
604 done
605 IFS="$lt_save_ifs"
606
607 if test "X$ECHO" = Xecho; then
608 # We didn't find a better echo, so look for alternatives.
609 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
610 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
611 test "X$echo_testing_string" = "X$echo_test_string"; then
612 # This shell has a builtin print -r that does the trick.
613 ECHO='print -r'
614 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
615 test "X$CONFIG_SHELL" != X/bin/ksh; then
616 # If we have ksh, try running configure again with it.
617 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
618 export ORIGINAL_CONFIG_SHELL
619 CONFIG_SHELL=/bin/ksh
620 export CONFIG_SHELL
621 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
622 else
623 # Try using printf.
624 ECHO='printf %s\n'
625 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
626 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
627 test "X$echo_testing_string" = "X$echo_test_string"; then
628 # Cool, printf works
629 :
630 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
631 test "X$echo_testing_string" = 'X\t' &&
632 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
633 test "X$echo_testing_string" = "X$echo_test_string"; then
634 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
635 export CONFIG_SHELL
636 SHELL="$CONFIG_SHELL"
637 export SHELL
638 ECHO="$CONFIG_SHELL $0 --fallback-echo"
639 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
640 test "X$echo_testing_string" = 'X\t' &&
641 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
642 test "X$echo_testing_string" = "X$echo_test_string"; then
643 ECHO="$CONFIG_SHELL $0 --fallback-echo"
644 else
645 # maybe with a smaller string...
646 prev=:
647
648 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
649 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
650 then
651 break
652 fi
653 prev="$cmd"
654 done
655
656 if test "$prev" != 'sed 50q "$0"'; then
657 echo_test_string=`eval $prev`
658 export echo_test_string
659 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
660 else
661 # Oops. We lost completely, so just stick with echo.
662 ECHO=echo
663 fi
664 fi
665 fi
666 fi
667 fi
668 fi
669
670 # Copy echo and quote the copy suitably for passing to libtool from
671 # the Makefile, instead of quoting the original, which is used later.
672 lt_ECHO=$ECHO
673 if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
674 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
675 fi
676
677
678547
679548
680549 test -n "$DJDIR" || exec 7<&0 </dev/null
681550 exec 6>&1
682551
683552 # Name of the host.
684 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
553 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
685554 # so uname gets run too.
686555 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
687556
700569 # Identity of this package.
701570 PACKAGE_NAME='libatasmart'
702571 PACKAGE_TARNAME='libatasmart'
703 PACKAGE_VERSION='0.17'
704 PACKAGE_STRING='libatasmart 0.17'
572 PACKAGE_VERSION='0.18'
573 PACKAGE_STRING='libatasmart 0.18'
705574 PACKAGE_BUGREPORT='mzyvongnfzneg (at) 0pointer (dot) net'
706575 PACKAGE_URL=''
707576
748617 LIBOBJS
749618 LIBUDEV_LIBS
750619 LIBUDEV_CFLAGS
620 PKG_CONFIG_LIBDIR
621 PKG_CONFIG_PATH
751622 PKG_CONFIG
752 CXXCPP
753623 OTOOL64
754624 OTOOL
755625 LIPO
756626 NMEDIT
757627 DSYMUTIL
758 lt_ECHO
628 MANIFEST_TOOL
759629 RANLIB
630 ac_ct_AR
760631 AR
632 DLLTOOL
761633 OBJDUMP
762634 LN_S
763635 NM
766638 LD
767639 FGREP
768640 SED
641 host_os
642 host_vendor
643 host_cpu
644 host
645 build_os
646 build_vendor
647 build_cpu
648 build
769649 LIBTOOL
770 am__fastdepCXX_FALSE
771 am__fastdepCXX_TRUE
772 CXXDEPMODE
773 ac_ct_CXX
774 CXXFLAGS
775 CXX
650 EXEEXT_FOR_BUILD
651 BUILD_LDFLAGS
652 BUILD_CFLAGS
653 CC_FOR_BUILD
776654 EGREP
777655 GREP
778656 CPP
792670 LDFLAGS
793671 CFLAGS
794672 CC
795 host_os
796 host_vendor
797 host_cpu
798 host
799 build_os
800 build_vendor
801 build_cpu
802 build
803673 LIBATASMART_VERSION_INFO
804674 AM_BACKSLASH
805675 AM_DEFAULT_VERBOSITY
869739 enable_option_checking
870740 enable_silent_rules
871741 enable_dependency_tracking
742 enable_largefile
872743 enable_shared
873744 enable_static
874745 with_pic
875746 enable_fast_install
876747 with_gnu_ld
748 with_sysroot
877749 enable_libtool_lock
878 enable_largefile
879750 '
880751 ac_precious_vars='build_alias
881752 host_alias
886757 LIBS
887758 CPPFLAGS
888759 CPP
889 CXX
890 CXXFLAGS
891 CCC
892 CXXCPP
760 CC_FOR_BUILD
761 BUILD_CFLAGS
762 BUILD_LDFLAGS
893763 PKG_CONFIG
764 PKG_CONFIG_PATH
765 PKG_CONFIG_LIBDIR
894766 LIBUDEV_CFLAGS
895767 LIBUDEV_LIBS'
896768
955827 fi
956828
957829 case $ac_option in
958 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
959 *) ac_optarg=yes ;;
830 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
831 *=) ac_optarg= ;;
832 *) ac_optarg=yes ;;
960833 esac
961834
962835 # Accept the important Cygnus configure options, so we can diagnose typos.
1001874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1002875 # Reject names that are not valid shell variable names.
1003876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1004 as_fn_error "invalid feature name: $ac_useropt"
877 as_fn_error $? "invalid feature name: $ac_useropt"
1005878 ac_useropt_orig=$ac_useropt
1006879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1007880 case $ac_user_opts in
1027900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1028901 # Reject names that are not valid shell variable names.
1029902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1030 as_fn_error "invalid feature name: $ac_useropt"
903 as_fn_error $? "invalid feature name: $ac_useropt"
1031904 ac_useropt_orig=$ac_useropt
1032905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033906 case $ac_user_opts in
12311104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
12321105 # Reject names that are not valid shell variable names.
12331106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1234 as_fn_error "invalid package name: $ac_useropt"
1107 as_fn_error $? "invalid package name: $ac_useropt"
12351108 ac_useropt_orig=$ac_useropt
12361109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12371110 case $ac_user_opts in
12471120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
12481121 # Reject names that are not valid shell variable names.
12491122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1250 as_fn_error "invalid package name: $ac_useropt"
1123 as_fn_error $? "invalid package name: $ac_useropt"
12511124 ac_useropt_orig=$ac_useropt
12521125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12531126 case $ac_user_opts in
12771150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
12781151 x_libraries=$ac_optarg ;;
12791152
1280 -*) as_fn_error "unrecognized option: \`$ac_option'
1281 Try \`$0 --help' for more information."
1153 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1154 Try \`$0 --help' for more information"
12821155 ;;
12831156
12841157 *=*)
12861159 # Reject names that are not valid shell variable names.
12871160 case $ac_envvar in #(
12881161 '' | [0-9]* | *[!_$as_cr_alnum]* )
1289 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1162 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
12901163 esac
12911164 eval $ac_envvar=\$ac_optarg
12921165 export $ac_envvar ;;
12961169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
12971170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
12981171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1299 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1172 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
13001173 ;;
13011174
13021175 esac
13041177
13051178 if test -n "$ac_prev"; then
13061179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1307 as_fn_error "missing argument to $ac_option"
1180 as_fn_error $? "missing argument to $ac_option"
13081181 fi
13091182
13101183 if test -n "$ac_unrecognized_opts"; then
13111184 case $enable_option_checking in
13121185 no) ;;
1313 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1186 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
13141187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
13151188 esac
13161189 fi
13331206 [\\/$]* | ?:[\\/]* ) continue;;
13341207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
13351208 esac
1336 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1209 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
13371210 done
13381211
13391212 # There might be people who depend on the old broken behavior: `$host'
13471220 if test "x$host_alias" != x; then
13481221 if test "x$build_alias" = x; then
13491222 cross_compiling=maybe
1350 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1351 If a cross compiler is detected then cross compile mode will be used." >&2
1223 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1224 If a cross compiler is detected then cross compile mode will be used" >&2
13521225 elif test "x$build_alias" != "x$host_alias"; then
13531226 cross_compiling=yes
13541227 fi
13631236 ac_pwd=`pwd` && test -n "$ac_pwd" &&
13641237 ac_ls_di=`ls -di .` &&
13651238 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1366 as_fn_error "working directory cannot be determined"
1239 as_fn_error $? "working directory cannot be determined"
13671240 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1368 as_fn_error "pwd does not report name of working directory"
1241 as_fn_error $? "pwd does not report name of working directory"
13691242
13701243
13711244 # Find the source files, if location was not specified.
14041277 fi
14051278 if test ! -r "$srcdir/$ac_unique_file"; then
14061279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1407 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1280 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
14081281 fi
14091282 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
14101283 ac_abs_confdir=`(
1411 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
14121285 pwd)`
14131286 # When building in place, set srcdir=.
14141287 if test "$ac_abs_confdir" = "$ac_pwd"; then
14341307 # Omit some internal or obsolete options to make the list less imposing.
14351308 # This message is too long to be a string in the A/UX 3.1 sh.
14361309 cat <<_ACEOF
1437 \`configure' configures libatasmart 0.17 to adapt to many kinds of systems.
1310 \`configure' configures libatasmart 0.18 to adapt to many kinds of systems.
14381311
14391312 Usage: $0 [OPTION]... [VAR=VALUE]...
14401313
14481321 --help=short display options specific to this package
14491322 --help=recursive display the short help of all the included packages
14501323 -V, --version display version information and exit
1451 -q, --quiet, --silent do not print \`checking...' messages
1324 -q, --quiet, --silent do not print \`checking ...' messages
14521325 --cache-file=FILE cache test results in FILE [disabled]
14531326 -C, --config-cache alias for \`--cache-file=config.cache'
14541327 -n, --no-create do not create output files
15041377
15051378 if test -n "$ac_init_help"; then
15061379 case $ac_init_help in
1507 short | recursive ) echo "Configuration of libatasmart 0.17:";;
1380 short | recursive ) echo "Configuration of libatasmart 0.18:";;
15081381 esac
15091382 cat <<\_ACEOF
15101383
15161389 --disable-silent-rules verbose build output (undo: `make V=0')
15171390 --disable-dependency-tracking speeds up one-time build
15181391 --enable-dependency-tracking do not reject slow dependency extractors
1392 --disable-largefile omit support for large files
15191393 --enable-shared[=PKGS] build shared libraries [default=yes]
15201394 --enable-static[=PKGS] build static libraries [default=yes]
15211395 --enable-fast-install[=PKGS]
15221396 optimize for fast installation [default=yes]
15231397 --disable-libtool-lock avoid locking (might break parallel builds)
1524 --disable-largefile omit support for large files
15251398
15261399 Optional Packages:
15271400 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
15291402 --with-pic try to use only PIC/non-PIC objects [default=use
15301403 both]
15311404 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1405 --with-sysroot=DIR Search for dependent libraries within DIR
1406 (or the compiler's sysroot if not specified).
15321407
15331408 Some influential environment variables:
15341409 CC C compiler command
15391414 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
15401415 you have headers in a nonstandard directory <include dir>
15411416 CPP C preprocessor
1542 CXX C++ compiler command
1543 CXXFLAGS C++ compiler flags
1544 CXXCPP C++ preprocessor
1417 CC_FOR_BUILD
1418 Host's C compiler command for cross-compilation [default=$(CC)]
1419 BUILD_CFLAGS
1420 Host's C compiler flags [default=$(CFLAGS)]
1421 BUILD_LDFLAGS
1422 Host's linker flags [default=$(LDFLAGS)]
15451423 PKG_CONFIG path to pkg-config utility
1424 PKG_CONFIG_PATH
1425 directories to add to pkg-config's search path
1426 PKG_CONFIG_LIBDIR
1427 path overriding pkg-config's built-in search path
15461428 LIBUDEV_CFLAGS
15471429 C compiler flags for LIBUDEV, overriding pkg-config
15481430 LIBUDEV_LIBS
16141496 test -n "$ac_init_help" && exit $ac_status
16151497 if $ac_init_version; then
16161498 cat <<\_ACEOF
1617 libatasmart configure 0.17
1618 generated by GNU Autoconf 2.65
1619
1620 Copyright (C) 2009 Free Software Foundation, Inc.
1499 libatasmart configure 0.18
1500 generated by GNU Autoconf 2.68
1501
1502 Copyright (C) 2010 Free Software Foundation, Inc.
16211503 This configure script is free software; the Free Software Foundation
16221504 gives unlimited permission to copy, distribute and modify it.
16231505 _ACEOF
16611543
16621544 ac_retval=1
16631545 fi
1664 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1546 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16651547 as_fn_set_status $ac_retval
16661548
16671549 } # ac_fn_c_try_compile
16871569 mv -f conftest.er1 conftest.err
16881570 fi
16891571 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690 test $ac_status = 0; } >/dev/null && {
1572 test $ac_status = 0; } > conftest.i && {
16911573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16921574 test ! -s conftest.err
16931575 }; then :
16981580
16991581 ac_retval=1
17001582 fi
1701 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17021584 as_fn_set_status $ac_retval
17031585
17041586 } # ac_fn_c_try_cpp
17111593 ac_fn_c_check_header_mongrel ()
17121594 {
17131595 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1596 if eval \${$3+:} false; then :
17151597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
17161598 $as_echo_n "checking for $2... " >&6; }
1717 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1599 if eval \${$3+:} false; then :
17181600 $as_echo_n "(cached) " >&6
17191601 fi
17201602 eval ac_res=\$$3
17501632 else
17511633 ac_header_preproc=no
17521634 fi
1753 rm -f conftest.err conftest.$ac_ext
1635 rm -f conftest.err conftest.i conftest.$ac_ext
17541636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
17551637 $as_echo "$ac_header_preproc" >&6; }
17561638
17731655 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
17741656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
17751657 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1776 ( cat <<\_ASBOX
1777 ## ---------------------------------------------------- ##
1658 ( $as_echo "## ---------------------------------------------------- ##
17781659 ## Report this to mzyvongnfzneg (at) 0pointer (dot) net ##
1779 ## ---------------------------------------------------- ##
1780 _ASBOX
1660 ## ---------------------------------------------------- ##"
17811661 ) | sed "s/^/$as_me: WARNING: /" >&2
17821662 ;;
17831663 esac
17841664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
17851665 $as_echo_n "checking for $2... " >&6; }
1786 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1666 if eval \${$3+:} false; then :
17871667 $as_echo_n "(cached) " >&6
17881668 else
17891669 eval "$3=\$ac_header_compiler"
17921672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17931673 $as_echo "$ac_res" >&6; }
17941674 fi
1795 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1675 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17961676
17971677 } # ac_fn_c_check_header_mongrel
17981678
18331713 ac_retval=$ac_status
18341714 fi
18351715 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1836 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
18371717 as_fn_set_status $ac_retval
18381718
18391719 } # ac_fn_c_try_run
18471727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18481728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18491729 $as_echo_n "checking for $2... " >&6; }
1850 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1730 if eval \${$3+:} false; then :
18511731 $as_echo_n "(cached) " >&6
18521732 else
18531733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18651745 eval ac_res=\$$3
18661746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18671747 $as_echo "$ac_res" >&6; }
1868 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
18691749
18701750 } # ac_fn_c_check_header_compile
1871
1872 # ac_fn_cxx_try_compile LINENO
1873 # ----------------------------
1874 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1875 ac_fn_cxx_try_compile ()
1876 {
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 rm -f conftest.$ac_objext
1879 if { { ac_try="$ac_compile"
1880 case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883 esac
1884 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885 $as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_compile") 2>conftest.err
1887 ac_status=$?
1888 if test -s conftest.err; then
1889 grep -v '^ *+' conftest.err >conftest.er1
1890 cat conftest.er1 >&5
1891 mv -f conftest.er1 conftest.err
1892 fi
1893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1894 test $ac_status = 0; } && {
1895 test -z "$ac_cxx_werror_flag" ||
1896 test ! -s conftest.err
1897 } && test -s conftest.$ac_objext; then :
1898 ac_retval=0
1899 else
1900 $as_echo "$as_me: failed program was:" >&5
1901 sed 's/^/| /' conftest.$ac_ext >&5
1902
1903 ac_retval=1
1904 fi
1905 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1906 as_fn_set_status $ac_retval
1907
1908 } # ac_fn_cxx_try_compile
19091751
19101752 # ac_fn_c_try_link LINENO
19111753 # -----------------------
19481790 # interfere with the next link command; also delete a directory that is
19491791 # left behind by Apple's compiler. We do this before executing the actions.
19501792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1951 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1793 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
19521794 as_fn_set_status $ac_retval
19531795
19541796 } # ac_fn_c_try_link
19611803 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19621804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
19631805 $as_echo_n "checking for $2... " >&6; }
1964 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1806 if eval \${$3+:} false; then :
19651807 $as_echo_n "(cached) " >&6
19661808 else
19671809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20161858 eval ac_res=\$$3
20171859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20181860 $as_echo "$ac_res" >&6; }
2019 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
20201862
20211863 } # ac_fn_c_check_func
2022
2023 # ac_fn_cxx_try_cpp LINENO
2024 # ------------------------
2025 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2026 ac_fn_cxx_try_cpp ()
2027 {
2028 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2029 if { { ac_try="$ac_cpp conftest.$ac_ext"
2030 case "(($ac_try" in
2031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2032 *) ac_try_echo=$ac_try;;
2033 esac
2034 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2035 $as_echo "$ac_try_echo"; } >&5
2036 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2037 ac_status=$?
2038 if test -s conftest.err; then
2039 grep -v '^ *+' conftest.err >conftest.er1
2040 cat conftest.er1 >&5
2041 mv -f conftest.er1 conftest.err
2042 fi
2043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2044 test $ac_status = 0; } >/dev/null && {
2045 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2046 test ! -s conftest.err
2047 }; then :
2048 ac_retval=0
2049 else
2050 $as_echo "$as_me: failed program was:" >&5
2051 sed 's/^/| /' conftest.$ac_ext >&5
2052
2053 ac_retval=1
2054 fi
2055 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2056 as_fn_set_status $ac_retval
2057
2058 } # ac_fn_cxx_try_cpp
2059
2060 # ac_fn_cxx_try_link LINENO
2061 # -------------------------
2062 # Try to link conftest.$ac_ext, and return whether this succeeded.
2063 ac_fn_cxx_try_link ()
2064 {
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 rm -f conftest.$ac_objext conftest$ac_exeext
2067 if { { ac_try="$ac_link"
2068 case "(($ac_try" in
2069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2070 *) ac_try_echo=$ac_try;;
2071 esac
2072 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2073 $as_echo "$ac_try_echo"; } >&5
2074 (eval "$ac_link") 2>conftest.err
2075 ac_status=$?
2076 if test -s conftest.err; then
2077 grep -v '^ *+' conftest.err >conftest.er1
2078 cat conftest.er1 >&5
2079 mv -f conftest.er1 conftest.err
2080 fi
2081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082 test $ac_status = 0; } && {
2083 test -z "$ac_cxx_werror_flag" ||
2084 test ! -s conftest.err
2085 } && test -s conftest$ac_exeext && {
2086 test "$cross_compiling" = yes ||
2087 $as_test_x conftest$ac_exeext
2088 }; then :
2089 ac_retval=0
2090 else
2091 $as_echo "$as_me: failed program was:" >&5
2092 sed 's/^/| /' conftest.$ac_ext >&5
2093
2094 ac_retval=1
2095 fi
2096 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2097 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2098 # interfere with the next link command; also delete a directory that is
2099 # left behind by Apple's compiler. We do this before executing the actions.
2100 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2101 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2102 as_fn_set_status $ac_retval
2103
2104 } # ac_fn_cxx_try_link
2105
2106 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2107 # -------------------------------------------
2108 # Tests whether TYPE exists after having included INCLUDES, setting cache
2109 # variable VAR accordingly.
2110 ac_fn_c_check_type ()
2111 {
2112 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2114 $as_echo_n "checking for $2... " >&6; }
2115 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2116 $as_echo_n "(cached) " >&6
2117 else
2118 eval "$3=no"
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120 /* end confdefs.h. */
2121 $4
2122 int
2123 main ()
2124 {
2125 if (sizeof ($2))
2126 return 0;
2127 ;
2128 return 0;
2129 }
2130 _ACEOF
2131 if ac_fn_c_try_compile "$LINENO"; then :
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133 /* end confdefs.h. */
2134 $4
2135 int
2136 main ()
2137 {
2138 if (sizeof (($2)))
2139 return 0;
2140 ;
2141 return 0;
2142 }
2143 _ACEOF
2144 if ac_fn_c_try_compile "$LINENO"; then :
2145
2146 else
2147 eval "$3=yes"
2148 fi
2149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150 fi
2151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152 fi
2153 eval ac_res=\$$3
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2155 $as_echo "$ac_res" >&6; }
2156 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2157
2158 } # ac_fn_c_check_type
21591864 cat >config.log <<_ACEOF
21601865 This file contains any messages produced by compilers while
21611866 running configure, to aid debugging if configure makes a mistake.
21621867
2163 It was created by libatasmart $as_me 0.17, which was
2164 generated by GNU Autoconf 2.65. Invocation command line was
1868 It was created by libatasmart $as_me 0.18, which was
1869 generated by GNU Autoconf 2.68. Invocation command line was
21651870
21661871 $ $0 $@
21671872
22711976 {
22721977 echo
22731978
2274 cat <<\_ASBOX
2275 ## ---------------- ##
1979 $as_echo "## ---------------- ##
22761980 ## Cache variables. ##
2277 ## ---------------- ##
2278 _ASBOX
1981 ## ---------------- ##"
22791982 echo
22801983 # The following way of writing the cache mishandles newlines in values,
22811984 (
23092012 )
23102013 echo
23112014
2312 cat <<\_ASBOX
2313 ## ----------------- ##
2015 $as_echo "## ----------------- ##
23142016 ## Output variables. ##
2315 ## ----------------- ##
2316 _ASBOX
2017 ## ----------------- ##"
23172018 echo
23182019 for ac_var in $ac_subst_vars
23192020 do
23262027 echo
23272028
23282029 if test -n "$ac_subst_files"; then
2329 cat <<\_ASBOX
2330 ## ------------------- ##
2030 $as_echo "## ------------------- ##
23312031 ## File substitutions. ##
2332 ## ------------------- ##
2333 _ASBOX
2032 ## ------------------- ##"
23342033 echo
23352034 for ac_var in $ac_subst_files
23362035 do
23442043 fi
23452044
23462045 if test -s confdefs.h; then
2347 cat <<\_ASBOX
2348 ## ----------- ##
2046 $as_echo "## ----------- ##
23492047 ## confdefs.h. ##
2350 ## ----------- ##
2351 _ASBOX
2048 ## ----------- ##"
23522049 echo
23532050 cat confdefs.h
23542051 echo
24032100 ac_site_file1=NONE
24042101 ac_site_file2=NONE
24052102 if test -n "$CONFIG_SITE"; then
2406 ac_site_file1=$CONFIG_SITE
2103 # We do not want a PATH search for config.site.
2104 case $CONFIG_SITE in #((
2105 -*) ac_site_file1=./$CONFIG_SITE;;
2106 */*) ac_site_file1=$CONFIG_SITE;;
2107 *) ac_site_file1=./$CONFIG_SITE;;
2108 esac
24072109 elif test "x$prefix" != xNONE; then
24082110 ac_site_file1=$prefix/share/config.site
24092111 ac_site_file2=$prefix/etc/config.site
24182120 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
24192121 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
24202122 sed 's/^/| /' "$ac_site_file" >&5
2421 . "$ac_site_file"
2123 . "$ac_site_file" \
2124 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2125 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2126 as_fn_error $? "failed to load site script $ac_site_file
2127 See \`config.log' for more details" "$LINENO" 5; }
24222128 fi
24232129 done
24242130
24942200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24952201 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
24962202 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2497 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2203 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
24982204 fi
24992205 ## -------------------- ##
25002206 ## Main body of script. ##
25162222
25172223 ac_aux_dir=
25182224 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2519 for ac_t in install-sh install.sh shtool; do
2520 if test -f "$ac_dir/$ac_t"; then
2521 ac_aux_dir=$ac_dir
2522 ac_install_sh="$ac_aux_dir/$ac_t -c"
2523 break 2
2524 fi
2525 done
2225 if test -f "$ac_dir/install-sh"; then
2226 ac_aux_dir=$ac_dir
2227 ac_install_sh="$ac_aux_dir/install-sh -c"
2228 break
2229 elif test -f "$ac_dir/install.sh"; then
2230 ac_aux_dir=$ac_dir
2231 ac_install_sh="$ac_aux_dir/install.sh -c"
2232 break
2233 elif test -f "$ac_dir/shtool"; then
2234 ac_aux_dir=$ac_dir
2235 ac_install_sh="$ac_aux_dir/shtool install -c"
2236 break
2237 fi
25262238 done
25272239 if test -z "$ac_aux_dir"; then
2528 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2240 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
25292241 fi
25302242
25312243 # These three variables are undocumented and unsupported,
25542266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
25552267 $as_echo_n "checking for a BSD-compatible install... " >&6; }
25562268 if test -z "$INSTALL"; then
2557 if test "${ac_cv_path_install+set}" = set; then :
2269 if ${ac_cv_path_install+:} false; then :
25582270 $as_echo_n "(cached) " >&6
25592271 else
25602272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26412353 '
26422354 case `pwd` in
26432355 *[\\\"\#\$\&\'\`$am_lf]*)
2644 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
2356 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
26452357 esac
26462358 case $srcdir in
26472359 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2648 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2360 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
26492361 esac
26502362
26512363 # Do `set' in a subshell so we don't clobber the current shell's
26672379 # if, for instance, CONFIG_SHELL is bash and it inherits a
26682380 # broken ls alias from the environment. This has actually
26692381 # happened. Such a system could not be considered "sane".
2670 as_fn_error "ls -t appears to fail. Make sure there is not a broken
2382 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
26712383 alias in your environment" "$LINENO" 5
26722384 fi
26732385
26772389 # Ok.
26782390 :
26792391 else
2680 as_fn_error "newly created file is older than distributed files!
2392 as_fn_error $? "newly created file is older than distributed files!
26812393 Check your system clock" "$LINENO" 5
26822394 fi
26832395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27312443 set dummy ${ac_tool_prefix}strip; ac_word=$2
27322444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27332445 $as_echo_n "checking for $ac_word... " >&6; }
2734 if test "${ac_cv_prog_STRIP+set}" = set; then :
2446 if ${ac_cv_prog_STRIP+:} false; then :
27352447 $as_echo_n "(cached) " >&6
27362448 else
27372449 if test -n "$STRIP"; then
27712483 set dummy strip; ac_word=$2
27722484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27732485 $as_echo_n "checking for $ac_word... " >&6; }
2774 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2486 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27752487 $as_echo_n "(cached) " >&6
27762488 else
27772489 if test -n "$ac_ct_STRIP"; then
28242536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
28252537 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
28262538 if test -z "$MKDIR_P"; then
2827 if test "${ac_cv_path_mkdir+set}" = set; then :
2539 if ${ac_cv_path_mkdir+:} false; then :
28282540 $as_echo_n "(cached) " >&6
28292541 else
28302542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28752587 set dummy $ac_prog; ac_word=$2
28762588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28772589 $as_echo_n "checking for $ac_word... " >&6; }
2878 if test "${ac_cv_prog_AWK+set}" = set; then :
2590 if ${ac_cv_prog_AWK+:} false; then :
28792591 $as_echo_n "(cached) " >&6
28802592 else
28812593 if test -n "$AWK"; then
29152627 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
29162628 set x ${MAKE-make}
29172629 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2918 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
2630 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
29192631 $as_echo_n "(cached) " >&6
29202632 else
29212633 cat >conftest.make <<\_ACEOF
29232635 all:
29242636 @echo '@@@%%%=$(MAKE)=@@@%%%'
29252637 _ACEOF
2926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2638 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29272639 case `${MAKE-make} -f conftest.make 2>/dev/null` in
29282640 *@@@%%%=?*=@@@%%%*)
29292641 eval ac_cv_prog_make_${ac_make}_set=yes;;
29692681 am__isrc=' -I$(srcdir)'
29702682 # test to see if srcdir already configured
29712683 if test -f $srcdir/config.status; then
2972 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2684 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
29732685 fi
29742686 fi
29752687
29852697
29862698 # Define the identity of the package.
29872699 PACKAGE='libatasmart'
2988 VERSION='0.17'
2700 VERSION='0.18'
29892701
29902702
29912703 cat >>confdefs.h <<_ACEOF
30932805 done
30942806 rm -rf conftest.dir
30952807
3096 if test "${am_cv_prog_tar_pax+set}" = set; then :
2808 if ${am_cv_prog_tar_pax+:} false; then :
30972809 $as_echo_n "(cached) " >&6
30982810 else
30992811 am_cv_prog_tar_pax=$_am_tool
31102822 PACKAGE_URL=http://git.0pointer.de/?p=libatasmart.git
31112823
31122824
3113 LIBATASMART_VERSION_INFO=4:3:0
3114
3115
3116 # Make sure we can run config.sub.
3117 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3118 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3119
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3121 $as_echo_n "checking build system type... " >&6; }
3122 if test "${ac_cv_build+set}" = set; then :
3123 $as_echo_n "(cached) " >&6
3124 else
3125 ac_build_alias=$build_alias
3126 test "x$ac_build_alias" = x &&
3127 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3128 test "x$ac_build_alias" = x &&
3129 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3130 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3131 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3132
3133 fi
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3135 $as_echo "$ac_cv_build" >&6; }
3136 case $ac_cv_build in
3137 *-*-*) ;;
3138 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3139 esac
3140 build=$ac_cv_build
3141 ac_save_IFS=$IFS; IFS='-'
3142 set x $ac_cv_build
3143 shift
3144 build_cpu=$1
3145 build_vendor=$2
3146 shift; shift
3147 # Remember, the first character of IFS is used to create $*,
3148 # except with old shells:
3149 build_os=$*
3150 IFS=$ac_save_IFS
3151 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3152
3153
3154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3155 $as_echo_n "checking host system type... " >&6; }
3156 if test "${ac_cv_host+set}" = set; then :
3157 $as_echo_n "(cached) " >&6
3158 else
3159 if test "x$host_alias" = x; then
3160 ac_cv_host=$ac_cv_build
3161 else
3162 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3163 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3164 fi
3165
3166 fi
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3168 $as_echo "$ac_cv_host" >&6; }
3169 case $ac_cv_host in
3170 *-*-*) ;;
3171 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3172 esac
3173 host=$ac_cv_host
3174 ac_save_IFS=$IFS; IFS='-'
3175 set x $ac_cv_host
3176 shift
3177 host_cpu=$1
3178 host_vendor=$2
3179 shift; shift
3180 # Remember, the first character of IFS is used to create $*,
3181 # except with old shells:
3182 host_os=$*
3183 IFS=$ac_save_IFS
3184 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3185
2825 LIBATASMART_VERSION_INFO=4:4:0
31862826
31872827
31882828 # Check whether --enable-silent-rules was given.
32032843 $as_echo "$as_me: *** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***" >&6;}
32042844 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
32052845 fi
3206
3207 #### Checks for programs. ####
3208
3209 # CC
32102846
32112847 ac_ext=c
32122848 ac_cpp='$CPP $CPPFLAGS'
32182854 set dummy ${ac_tool_prefix}gcc; ac_word=$2
32192855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32202856 $as_echo_n "checking for $ac_word... " >&6; }
3221 if test "${ac_cv_prog_CC+set}" = set; then :
2857 if ${ac_cv_prog_CC+:} false; then :
32222858 $as_echo_n "(cached) " >&6
32232859 else
32242860 if test -n "$CC"; then
32582894 set dummy gcc; ac_word=$2
32592895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32602896 $as_echo_n "checking for $ac_word... " >&6; }
3261 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2897 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32622898 $as_echo_n "(cached) " >&6
32632899 else
32642900 if test -n "$ac_ct_CC"; then
33112947 set dummy ${ac_tool_prefix}cc; ac_word=$2
33122948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33132949 $as_echo_n "checking for $ac_word... " >&6; }
3314 if test "${ac_cv_prog_CC+set}" = set; then :
2950 if ${ac_cv_prog_CC+:} false; then :
33152951 $as_echo_n "(cached) " >&6
33162952 else
33172953 if test -n "$CC"; then
33512987 set dummy cc; ac_word=$2
33522988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33532989 $as_echo_n "checking for $ac_word... " >&6; }
3354 if test "${ac_cv_prog_CC+set}" = set; then :
2990 if ${ac_cv_prog_CC+:} false; then :
33552991 $as_echo_n "(cached) " >&6
33562992 else
33572993 if test -n "$CC"; then
34103046 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34113047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34123048 $as_echo_n "checking for $ac_word... " >&6; }
3413 if test "${ac_cv_prog_CC+set}" = set; then :
3049 if ${ac_cv_prog_CC+:} false; then :
34143050 $as_echo_n "(cached) " >&6
34153051 else
34163052 if test -n "$CC"; then
34543090 set dummy $ac_prog; ac_word=$2
34553091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34563092 $as_echo_n "checking for $ac_word... " >&6; }
3457 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3093 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34583094 $as_echo_n "(cached) " >&6
34593095 else
34603096 if test -n "$ac_ct_CC"; then
35083144
35093145 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35103146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3511 as_fn_error "no acceptable C compiler found in \$PATH
3512 See \`config.log' for more details." "$LINENO" 5; }
3147 as_fn_error $? "no acceptable C compiler found in \$PATH
3148 See \`config.log' for more details" "$LINENO" 5; }
35133149
35143150 # Provide some information about the compiler.
35153151 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
36233259
36243260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36253261 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3626 { as_fn_set_status 77
3627 as_fn_error "C compiler cannot create executables
3628 See \`config.log' for more details." "$LINENO" 5; }; }
3262 as_fn_error 77 "C compiler cannot create executables
3263 See \`config.log' for more details" "$LINENO" 5; }
36293264 else
36303265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36313266 $as_echo "yes" >&6; }
36673302 else
36683303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36693304 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3670 as_fn_error "cannot compute suffix of executables: cannot compile and link
3671 See \`config.log' for more details." "$LINENO" 5; }
3305 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3306 See \`config.log' for more details" "$LINENO" 5; }
36723307 fi
36733308 rm -f conftest conftest$ac_cv_exeext
36743309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
37253360 else
37263361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
37273362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3728 as_fn_error "cannot run C compiled programs.
3363 as_fn_error $? "cannot run C compiled programs.
37293364 If you meant to cross compile, use \`--host'.
3730 See \`config.log' for more details." "$LINENO" 5; }
3365 See \`config.log' for more details" "$LINENO" 5; }
37313366 fi
37323367 fi
37333368 fi
37383373 ac_clean_files=$ac_clean_files_save
37393374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
37403375 $as_echo_n "checking for suffix of object files... " >&6; }
3741 if test "${ac_cv_objext+set}" = set; then :
3376 if ${ac_cv_objext+:} false; then :
37423377 $as_echo_n "(cached) " >&6
37433378 else
37443379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37783413
37793414 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
37803415 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3781 as_fn_error "cannot compute suffix of object files: cannot compile
3782 See \`config.log' for more details." "$LINENO" 5; }
3416 as_fn_error $? "cannot compute suffix of object files: cannot compile
3417 See \`config.log' for more details" "$LINENO" 5; }
37833418 fi
37843419 rm -f conftest.$ac_cv_objext conftest.$ac_ext
37853420 fi
37893424 ac_objext=$OBJEXT
37903425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
37913426 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3792 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3427 if ${ac_cv_c_compiler_gnu+:} false; then :
37933428 $as_echo_n "(cached) " >&6
37943429 else
37953430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38263461 ac_save_CFLAGS=$CFLAGS
38273462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
38283463 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3829 if test "${ac_cv_prog_cc_g+set}" = set; then :
3464 if ${ac_cv_prog_cc_g+:} false; then :
38303465 $as_echo_n "(cached) " >&6
38313466 else
38323467 ac_save_c_werror_flag=$ac_c_werror_flag
39043539 fi
39053540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
39063541 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3907 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3542 if ${ac_cv_prog_cc_c89+:} false; then :
39083543 $as_echo_n "(cached) " >&6
39093544 else
39103545 ac_cv_prog_cc_c89=no
40653700
40663701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
40673702 $as_echo_n "checking dependency style of $depcc... " >&6; }
4068 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
3703 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
40693704 $as_echo_n "(cached) " >&6
40703705 else
40713706 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
41883823 fi
41893824
41903825
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3827 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3828 if ${ac_cv_prog_cc_c99+:} false; then :
3829 $as_echo_n "(cached) " >&6
3830 else
3831 ac_cv_prog_cc_c99=no
3832 ac_save_CC=$CC
3833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3834 /* end confdefs.h. */
3835 #include <stdarg.h>
3836 #include <stdbool.h>
3837 #include <stdlib.h>
3838 #include <wchar.h>
3839 #include <stdio.h>
3840
3841 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3842 #define debug(...) fprintf (stderr, __VA_ARGS__)
3843 #define showlist(...) puts (#__VA_ARGS__)
3844 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3845 static void
3846 test_varargs_macros (void)
3847 {
3848 int x = 1234;
3849 int y = 5678;
3850 debug ("Flag");
3851 debug ("X = %d\n", x);
3852 showlist (The first, second, and third items.);
3853 report (x>y, "x is %d but y is %d", x, y);
3854 }
3855
3856 // Check long long types.
3857 #define BIG64 18446744073709551615ull
3858 #define BIG32 4294967295ul
3859 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3860 #if !BIG_OK
3861 your preprocessor is broken;
3862 #endif
3863 #if BIG_OK
3864 #else
3865 your preprocessor is broken;
3866 #endif
3867 static long long int bignum = -9223372036854775807LL;
3868 static unsigned long long int ubignum = BIG64;
3869
3870 struct incomplete_array
3871 {
3872 int datasize;
3873 double data[];
3874 };
3875
3876 struct named_init {
3877 int number;
3878 const wchar_t *name;
3879 double average;
3880 };
3881
3882 typedef const char *ccp;
3883
3884 static inline int
3885 test_restrict (ccp restrict text)
3886 {
3887 // See if C++-style comments work.
3888 // Iterate through items via the restricted pointer.
3889 // Also check for declarations in for loops.
3890 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3891 continue;
3892 return 0;
3893 }
3894
3895 // Check varargs and va_copy.
3896 static void
3897 test_varargs (const char *format, ...)
3898 {
3899 va_list args;
3900 va_start (args, format);
3901 va_list args_copy;
3902 va_copy (args_copy, args);
3903
3904 const char *str;
3905 int number;
3906 float fnumber;
3907
3908 while (*format)
3909 {
3910 switch (*format++)
3911 {
3912 case 's': // string
3913 str = va_arg (args_copy, const char *);
3914 break;
3915 case 'd': // int
3916 number = va_arg (args_copy, int);
3917 break;
3918 case 'f': // float
3919 fnumber = va_arg (args_copy, double);
3920 break;
3921 default:
3922 break;
3923 }
3924 }
3925 va_end (args_copy);
3926 va_end (args);
3927 }
3928
3929 int
3930 main ()
3931 {
3932
3933 // Check bool.
3934 _Bool success = false;
3935
3936 // Check restrict.
3937 if (test_restrict ("String literal") == 0)
3938 success = true;
3939 char *restrict newvar = "Another string";
3940
3941 // Check varargs.
3942 test_varargs ("s, d' f .", "string", 65, 34.234);
3943 test_varargs_macros ();
3944
3945 // Check flexible array members.
3946 struct incomplete_array *ia =
3947 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3948 ia->datasize = 10;
3949 for (int i = 0; i < ia->datasize; ++i)
3950 ia->data[i] = i * 1.234;
3951
3952 // Check named initializers.
3953 struct named_init ni = {
3954 .number = 34,
3955 .name = L"Test wide string",
3956 .average = 543.34343,
3957 };
3958
3959 ni.number = 58;
3960
3961 int dynamic_array[ni.number];
3962 dynamic_array[ni.number - 1] = 543;
3963
3964 // work around unused variable warnings
3965 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3966 || dynamic_array[ni.number - 1] != 543);
3967
3968 ;
3969 return 0;
3970 }
3971 _ACEOF
3972 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
3973 do
3974 CC="$ac_save_CC $ac_arg"
3975 if ac_fn_c_try_compile "$LINENO"; then :
3976 ac_cv_prog_cc_c99=$ac_arg
3977 fi
3978 rm -f core conftest.err conftest.$ac_objext
3979 test "x$ac_cv_prog_cc_c99" != "xno" && break
3980 done
3981 rm -f conftest.$ac_ext
3982 CC=$ac_save_CC
3983
3984 fi
3985 # AC_CACHE_VAL
3986 case "x$ac_cv_prog_cc_c99" in
3987 x)
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3989 $as_echo "none needed" >&6; } ;;
3990 xno)
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3992 $as_echo "unsupported" >&6; } ;;
3993 *)
3994 CC="$CC $ac_cv_prog_cc_c99"
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3996 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3997 esac
3998 if test "x$ac_cv_prog_cc_c99" != xno; then :
3999
4000 fi
4001
4002
41914003 if test "x$CC" != xcc; then
41924004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
41934005 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
41974009 fi
41984010 set dummy $CC; ac_cc=`$as_echo "$2" |
41994011 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4200 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4012 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
42014013 $as_echo_n "(cached) " >&6
42024014 else
42034015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43274139 CPP=
43284140 fi
43294141 if test -z "$CPP"; then
4330 if test "${ac_cv_prog_CPP+set}" = set; then :
4142 if ${ac_cv_prog_CPP+:} false; then :
43314143 $as_echo_n "(cached) " >&6
43324144 else
43334145 # Double quotes because CPP needs to be expanded
43574169 # Broken: fails on valid input.
43584170 continue
43594171 fi
4360 rm -f conftest.err conftest.$ac_ext
4172 rm -f conftest.err conftest.i conftest.$ac_ext
43614173
43624174 # OK, works on sane cases. Now check whether nonexistent headers
43634175 # can be detected and how.
43734185 ac_preproc_ok=:
43744186 break
43754187 fi
4376 rm -f conftest.err conftest.$ac_ext
4188 rm -f conftest.err conftest.i conftest.$ac_ext
43774189
43784190 done
43794191 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4380 rm -f conftest.err conftest.$ac_ext
4192 rm -f conftest.i conftest.err conftest.$ac_ext
43814193 if $ac_preproc_ok; then :
43824194 break
43834195 fi
44164228 # Broken: fails on valid input.
44174229 continue
44184230 fi
4419 rm -f conftest.err conftest.$ac_ext
4231 rm -f conftest.err conftest.i conftest.$ac_ext
44204232
44214233 # OK, works on sane cases. Now check whether nonexistent headers
44224234 # can be detected and how.
44324244 ac_preproc_ok=:
44334245 break
44344246 fi
4435 rm -f conftest.err conftest.$ac_ext
4247 rm -f conftest.err conftest.i conftest.$ac_ext
44364248
44374249 done
44384250 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4439 rm -f conftest.err conftest.$ac_ext
4251 rm -f conftest.i conftest.err conftest.$ac_ext
44404252 if $ac_preproc_ok; then :
44414253
44424254 else
44434255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44444256 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4445 as_fn_error "C preprocessor \"$CPP\" fails sanity check
4446 See \`config.log' for more details." "$LINENO" 5; }
4257 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4258 See \`config.log' for more details" "$LINENO" 5; }
44474259 fi
44484260
44494261 ac_ext=c
44554267
44564268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
44574269 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4458 if test "${ac_cv_path_GREP+set}" = set; then :
4270 if ${ac_cv_path_GREP+:} false; then :
44594271 $as_echo_n "(cached) " >&6
44604272 else
44614273 if test -z "$GREP"; then
45044316 done
45054317 IFS=$as_save_IFS
45064318 if test -z "$ac_cv_path_GREP"; then
4507 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4319 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
45084320 fi
45094321 else
45104322 ac_cv_path_GREP=$GREP
45184330
45194331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
45204332 $as_echo_n "checking for egrep... " >&6; }
4521 if test "${ac_cv_path_EGREP+set}" = set; then :
4333 if ${ac_cv_path_EGREP+:} false; then :
45224334 $as_echo_n "(cached) " >&6
45234335 else
45244336 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
45704382 done
45714383 IFS=$as_save_IFS
45724384 if test -z "$ac_cv_path_EGREP"; then
4573 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4385 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
45744386 fi
45754387 else
45764388 ac_cv_path_EGREP=$EGREP
45864398 if test $ac_cv_c_compiler_gnu = yes; then
45874399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
45884400 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
4589 if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
4401 if ${ac_cv_prog_gcc_traditional+:} false; then :
45904402 $as_echo_n "(cached) " >&6
45914403 else
45924404 ac_pattern="Autoconf.*'x'"
46254437 fi
46264438 fi
46274439
4440
4441
4442
4443
4444
4445
4446
4447 if test -z "$CC_FOR_BUILD"; then
4448 if test "x$cross_compiling" = "xno"; then
4449 CC_FOR_BUILD=${CC}
4450 else
4451 for ac_prog in gcc cc
4452 do
4453 # Extract the first word of "$ac_prog", so it can be a program name with args.
4454 set dummy $ac_prog; ac_word=$2
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4456 $as_echo_n "checking for $ac_word... " >&6; }
4457 if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459 else
4460 if test -n "$CC_FOR_BUILD"; then
4461 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
4462 else
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464 for as_dir in $PATH
4465 do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
4468 for ac_exec_ext in '' $ac_executable_extensions; do
4469 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4470 ac_cv_prog_CC_FOR_BUILD="$ac_prog"
4471 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4472 break 2
4473 fi
4474 done
4475 done
4476 IFS=$as_save_IFS
4477
4478 fi
4479 fi
4480 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
4481 if test -n "$CC_FOR_BUILD"; then
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
4483 $as_echo "$CC_FOR_BUILD" >&6; }
4484 else
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4486 $as_echo "no" >&6; }
4487 fi
4488
4489
4490 test -n "$CC_FOR_BUILD" && break
4491 done
4492
4493 fi
4494 fi
4495
4496 if test "x${BUILD_CFLAGS+set}" != "xset" ; then
4497 if test "x$cross_compiling" = "xyes" ; then
4498 BUILD_CFLAGS=
4499 else
4500 BUILD_CFLAGS=${CFLAGS}
4501 fi
4502 fi
4503
4504 if test "x${BUILD_LDFLAGS+set}" != "xset" ; then
4505 if test "x$cross_compiling" = "xyes" ; then
4506 BUILD_LDFLAGS=
4507 else
4508 BUILD_LDFLAGS=${LDFLAGS}
4509 fi
4510 fi
4511
4512 if test "x$cross_compiling" = "xno"; then
4513 EXEEXT_FOR_BUILD='$(EXEEXT)'
4514 else
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
4516 $as_echo_n "checking for build system executable suffix... " >&6; }
4517 if ${bfd_cv_build_exeext+:} false; then :
4518 $as_echo_n "(cached) " >&6
4519 else
4520 rm -f conftest*
4521 echo 'int main () { return 0; }' > conftest.c
4522 bfd_cv_build_exeext=
4523 ${CC_FOR_BUILD} ${LDFLAGS} ${CFLAGS} -o conftest conftest.c 1>&5 2>&5
4524 for file in conftest.*; do
4525 case $file in
4526 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4527 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4528 esac
4529 done
4530 rm -f conftest*
4531 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4532 fi
4533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
4534 $as_echo "$bfd_cv_build_exeext" >&6; }
4535 EXEEXT_FOR_BUILD=""
4536 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4537 fi
4538
4539
4540
46284541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46294542 $as_echo_n "checking for ANSI C header files... " >&6; }
4630 if test "${ac_cv_header_stdc+set}" = set; then :
4543 if ${ac_cv_header_stdc+:} false; then :
46314544 $as_echo_n "(cached) " >&6
46324545 else
46334546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47444657 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47454658 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47464659 "
4747 eval as_val=\$$as_ac_Header
4748 if test "x$as_val" = x""yes; then :
4660 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47494661 cat >>confdefs.h <<_ACEOF
47504662 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47514663 _ACEOF
47574669
47584670
47594671 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4760 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4672 if test "x$ac_cv_header_minix_config_h" = xyes; then :
47614673 MINIX=yes
47624674 else
47634675 MINIX=
47794691
47804692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
47814693 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4782 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4694 if ${ac_cv_safe_to_define___extensions__+:} false; then :
47834695 $as_echo_n "(cached) " >&6
47844696 else
47854697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48164728 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
48174729
48184730
4819
4820 # C++
4821
4822 ac_ext=cpp
4823 ac_cpp='$CXXCPP $CPPFLAGS'
4824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4827 if test -z "$CXX"; then
4828 if test -n "$CCC"; then
4829 CXX=$CCC
4830 else
4831 if test -n "$ac_tool_prefix"; then
4832 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4833 do
4834 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4835 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837 $as_echo_n "checking for $ac_word... " >&6; }
4838 if test "${ac_cv_prog_CXX+set}" = set; then :
4731 # Check whether --enable-largefile was given.
4732 if test "${enable_largefile+set}" = set; then :
4733 enableval=$enable_largefile;
4734 fi
4735
4736 if test "$enable_largefile" != no; then
4737
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4739 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4740 if ${ac_cv_sys_largefile_CC+:} false; then :
48394741 $as_echo_n "(cached) " >&6
48404742 else
4841 if test -n "$CXX"; then
4842 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4843 else
4844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845 for as_dir in $PATH
4846 do
4847 IFS=$as_save_IFS
4848 test -z "$as_dir" && as_dir=.
4849 for ac_exec_ext in '' $ac_executable_extensions; do
4850 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4851 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4853 break 2
4854 fi
4855 done
4856 done
4857 IFS=$as_save_IFS
4858
4859 fi
4860 fi
4861 CXX=$ac_cv_prog_CXX
4862 if test -n "$CXX"; then
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4864 $as_echo "$CXX" >&6; }
4865 else
4866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867 $as_echo "no" >&6; }
4868 fi
4869
4870
4871 test -n "$CXX" && break
4872 done
4873 fi
4874 if test -z "$CXX"; then
4875 ac_ct_CXX=$CXX
4876 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4877 do
4878 # Extract the first word of "$ac_prog", so it can be a program name with args.
4879 set dummy $ac_prog; ac_word=$2
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881 $as_echo_n "checking for $ac_word... " >&6; }
4882 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
4883 $as_echo_n "(cached) " >&6
4884 else
4885 if test -n "$ac_ct_CXX"; then
4886 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4887 else
4888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889 for as_dir in $PATH
4890 do
4891 IFS=$as_save_IFS
4892 test -z "$as_dir" && as_dir=.
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4895 ac_cv_prog_ac_ct_CXX="$ac_prog"
4896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897 break 2
4898 fi
4899 done
4900 done
4901 IFS=$as_save_IFS
4902
4903 fi
4904 fi
4905 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4906 if test -n "$ac_ct_CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4908 $as_echo "$ac_ct_CXX" >&6; }
4909 else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911 $as_echo "no" >&6; }
4912 fi
4913
4914
4915 test -n "$ac_ct_CXX" && break
4916 done
4917
4918 if test "x$ac_ct_CXX" = x; then
4919 CXX="g++"
4920 else
4921 case $cross_compiling:$ac_tool_warned in
4922 yes:)
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4924 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4925 ac_tool_warned=yes ;;
4926 esac
4927 CXX=$ac_ct_CXX
4928 fi
4929 fi
4930
4931 fi
4932 fi
4933 # Provide some information about the compiler.
4934 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4935 set X $ac_compile
4936 ac_compiler=$2
4937 for ac_option in --version -v -V -qversion; do
4938 { { ac_try="$ac_compiler $ac_option >&5"
4939 case "(($ac_try" in
4940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4941 *) ac_try_echo=$ac_try;;
4942 esac
4943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4944 $as_echo "$ac_try_echo"; } >&5
4945 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4946 ac_status=$?
4947 if test -s conftest.err; then
4948 sed '10a\
4949 ... rest of stderr output deleted ...
4950 10q' conftest.err >conftest.er1
4951 cat conftest.er1 >&5
4952 fi
4953 rm -f conftest.er1 conftest.err
4954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4955 test $ac_status = 0; }
4956 done
4957
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4959 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4960 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
4961 $as_echo_n "(cached) " >&6
4962 else
4963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4743 ac_cv_sys_largefile_CC=no
4744 if test "$GCC" != yes; then
4745 ac_save_CC=$CC
4746 while :; do
4747 # IRIX 6.2 and later do not support large files by default,
4748 # so use the C compiler's -n32 option if that helps.
4749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49644750 /* end confdefs.h. */
4965
4751 #include <sys/types.h>
4752 /* Check that off_t can represent 2**63 - 1 correctly.
4753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4754 since some C++ compilers masquerading as C compilers
4755 incorrectly reject 9223372036854775807. */
4756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4758 && LARGE_OFF_T % 2147483647 == 1)
4759 ? 1 : -1];
49664760 int
49674761 main ()
49684762 {
4969 #ifndef __GNUC__
4970 choke me
4971 #endif
49724763
49734764 ;
49744765 return 0;
49754766 }
49764767 _ACEOF
4977 if ac_fn_cxx_try_compile "$LINENO"; then :
4978 ac_compiler_gnu=yes
4979 else
4980 ac_compiler_gnu=no
4981 fi
4982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4983 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4984
4985 fi
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4987 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4988 if test $ac_compiler_gnu = yes; then
4989 GXX=yes
4990 else
4991 GXX=
4992 fi
4993 ac_test_CXXFLAGS=${CXXFLAGS+set}
4994 ac_save_CXXFLAGS=$CXXFLAGS
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4996 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4997 if test "${ac_cv_prog_cxx_g+set}" = set; then :
4768 if ac_fn_c_try_compile "$LINENO"; then :
4769 break
4770 fi
4771 rm -f core conftest.err conftest.$ac_objext
4772 CC="$CC -n32"
4773 if ac_fn_c_try_compile "$LINENO"; then :
4774 ac_cv_sys_largefile_CC=' -n32'; break
4775 fi
4776 rm -f core conftest.err conftest.$ac_objext
4777 break
4778 done
4779 CC=$ac_save_CC
4780 rm -f conftest.$ac_ext
4781 fi
4782 fi
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4784 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4785 if test "$ac_cv_sys_largefile_CC" != no; then
4786 CC=$CC$ac_cv_sys_largefile_CC
4787 fi
4788
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4790 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4791 if ${ac_cv_sys_file_offset_bits+:} false; then :
49984792 $as_echo_n "(cached) " >&6
49994793 else
5000 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5001 ac_cxx_werror_flag=yes
5002 ac_cv_prog_cxx_g=no
5003 CXXFLAGS="-g"
5004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4794 while :; do
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50054796 /* end confdefs.h. */
5006
4797 #include <sys/types.h>
4798 /* Check that off_t can represent 2**63 - 1 correctly.
4799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4800 since some C++ compilers masquerading as C compilers
4801 incorrectly reject 9223372036854775807. */
4802 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4804 && LARGE_OFF_T % 2147483647 == 1)
4805 ? 1 : -1];
50074806 int
50084807 main ()
50094808 {
50124811 return 0;
50134812 }
50144813 _ACEOF
5015 if ac_fn_cxx_try_compile "$LINENO"; then :
5016 ac_cv_prog_cxx_g=yes
5017 else
5018 CXXFLAGS=""
5019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814 if ac_fn_c_try_compile "$LINENO"; then :
4815 ac_cv_sys_file_offset_bits=no; break
4816 fi
4817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50204819 /* end confdefs.h. */
5021
4820 #define _FILE_OFFSET_BITS 64
4821 #include <sys/types.h>
4822 /* Check that off_t can represent 2**63 - 1 correctly.
4823 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4824 since some C++ compilers masquerading as C compilers
4825 incorrectly reject 9223372036854775807. */
4826 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4827 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4828 && LARGE_OFF_T % 2147483647 == 1)
4829 ? 1 : -1];
50224830 int
50234831 main ()
50244832 {
50274835 return 0;
50284836 }
50294837 _ACEOF
5030 if ac_fn_cxx_try_compile "$LINENO"; then :
5031
5032 else
5033 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5034 CXXFLAGS="-g"
5035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 if ac_fn_c_try_compile "$LINENO"; then :
4839 ac_cv_sys_file_offset_bits=64; break
4840 fi
4841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 ac_cv_sys_file_offset_bits=unknown
4843 break
4844 done
4845 fi
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4847 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4848 case $ac_cv_sys_file_offset_bits in #(
4849 no | unknown) ;;
4850 *)
4851 cat >>confdefs.h <<_ACEOF
4852 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4853 _ACEOF
4854 ;;
4855 esac
4856 rm -rf conftest*
4857 if test $ac_cv_sys_file_offset_bits = unknown; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4859 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4860 if ${ac_cv_sys_large_files+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862 else
4863 while :; do
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50364865 /* end confdefs.h. */
5037
4866 #include <sys/types.h>
4867 /* Check that off_t can represent 2**63 - 1 correctly.
4868 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4869 since some C++ compilers masquerading as C compilers
4870 incorrectly reject 9223372036854775807. */
4871 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4872 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4873 && LARGE_OFF_T % 2147483647 == 1)
4874 ? 1 : -1];
50384875 int
50394876 main ()
50404877 {
50434880 return 0;
50444881 }
50454882 _ACEOF
5046 if ac_fn_cxx_try_compile "$LINENO"; then :
5047 ac_cv_prog_cxx_g=yes
4883 if ac_fn_c_try_compile "$LINENO"; then :
4884 ac_cv_sys_large_files=no; break
50484885 fi
50494886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4888 /* end confdefs.h. */
4889 #define _LARGE_FILES 1
4890 #include <sys/types.h>
4891 /* Check that off_t can represent 2**63 - 1 correctly.
4892 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4893 since some C++ compilers masquerading as C compilers
4894 incorrectly reject 9223372036854775807. */
4895 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4896 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4897 && LARGE_OFF_T % 2147483647 == 1)
4898 ? 1 : -1];
4899 int
4900 main ()
4901 {
4902
4903 ;
4904 return 0;
4905 }
4906 _ACEOF
4907 if ac_fn_c_try_compile "$LINENO"; then :
4908 ac_cv_sys_large_files=1; break
50504909 fi
50514910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5052 fi
5053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5054 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5055 fi
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
5057 $as_echo "$ac_cv_prog_cxx_g" >&6; }
5058 if test "$ac_test_CXXFLAGS" = set; then
5059 CXXFLAGS=$ac_save_CXXFLAGS
5060 elif test $ac_cv_prog_cxx_g = yes; then
5061 if test "$GXX" = yes; then
5062 CXXFLAGS="-g -O2"
5063 else
5064 CXXFLAGS="-g"
4911 ac_cv_sys_large_files=unknown
4912 break
4913 done
4914 fi
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4916 $as_echo "$ac_cv_sys_large_files" >&6; }
4917 case $ac_cv_sys_large_files in #(
4918 no | unknown) ;;
4919 *)
4920 cat >>confdefs.h <<_ACEOF
4921 #define _LARGE_FILES $ac_cv_sys_large_files
4922 _ACEOF
4923 ;;
4924 esac
4925 rm -rf conftest*
50654926 fi
5066 else
5067 if test "$GXX" = yes; then
5068 CXXFLAGS="-O2"
5069 else
5070 CXXFLAGS=
5071 fi
5072 fi
5073 ac_ext=c
5074 ac_cpp='$CPP $CPPFLAGS'
5075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5078
5079 depcc="$CXX" am_compiler_list=
5080
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5082 $as_echo_n "checking dependency style of $depcc... " >&6; }
5083 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
5084 $as_echo_n "(cached) " >&6
5085 else
5086 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5087 # We make a subdir and do the tests there. Otherwise we can end up
5088 # making bogus files that we don't know about and never remove. For
5089 # instance it was reported that on HP-UX the gcc test will end up
5090 # making a dummy file named `D' -- because `-MD' means `put the output
5091 # in D'.
5092 mkdir conftest.dir
5093 # Copy depcomp to subdir because otherwise we won't find it if we're
5094 # using a relative directory.
5095 cp "$am_depcomp" conftest.dir
5096 cd conftest.dir
5097 # We will build objects and dependencies in a subdirectory because
5098 # it helps to detect inapplicable dependency modes. For instance
5099 # both Tru64's cc and ICC support -MD to output dependencies as a
5100 # side effect of compilation, but ICC will put the dependencies in
5101 # the current directory while Tru64 will put them in the object
5102 # directory.
5103 mkdir sub
5104
5105 am_cv_CXX_dependencies_compiler_type=none
5106 if test "$am_compiler_list" = ""; then
5107 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5108 fi
5109 am__universal=false
5110 case " $depcc " in #(
5111 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5112 esac
5113
5114 for depmode in $am_compiler_list; do
5115 # Setup a source with many dependencies, because some compilers
5116 # like to wrap large dependency lists on column 80 (with \), and
5117 # we should not choose a depcomp mode which is confused by this.
5118 #
5119 # We need to recreate these files for each test, as the compiler may
5120 # overwrite some of them when testing with obscure command lines.
5121 # This happens at least with the AIX C compiler.
5122 : > sub/conftest.c
5123 for i in 1 2 3 4 5 6; do
5124 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5125 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5126 # Solaris 8's {/usr,}/bin/sh.
5127 touch sub/conftst$i.h
5128 done
5129 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5130
5131 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5132 # mode. It turns out that the SunPro C++ compiler does not properly
5133 # handle `-M -o', and we need to detect this. Also, some Intel
5134 # versions had trouble with output in subdirs
5135 am__obj=sub/conftest.${OBJEXT-o}
5136 am__minus_obj="-o $am__obj"
5137 case $depmode in
5138 gcc)
5139 # This depmode causes a compiler race in universal mode.
5140 test "$am__universal" = false || continue
5141 ;;
5142 nosideeffect)
5143 # after this tag, mechanisms are not by side-effect, so they'll
5144 # only be used when explicitly requested
5145 if test "x$enable_dependency_tracking" = xyes; then
5146 continue
5147 else
5148 break
5149 fi
5150 ;;
5151 msvisualcpp | msvcmsys)
5152 # This compiler won't grok `-c -o', but also, the minuso test has
5153 # not run yet. These depmodes are late enough in the game, and
5154 # so weak that their functioning should not be impacted.
5155 am__obj=conftest.${OBJEXT-o}
5156 am__minus_obj=
5157 ;;
5158 none) break ;;
5159 esac
5160 if depmode=$depmode \
5161 source=sub/conftest.c object=$am__obj \
5162 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5163 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5164 >/dev/null 2>conftest.err &&
5165 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5166 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5167 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5168 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5169 # icc doesn't choke on unknown options, it will just issue warnings
5170 # or remarks (even with -Werror). So we grep stderr for any message
5171 # that says an option was ignored or not supported.
5172 # When given -MP, icc 7.0 and 7.1 complain thusly:
5173 # icc: Command line warning: ignoring option '-M'; no argument required
5174 # The diagnosis changed in icc 8.0:
5175 # icc: Command line remark: option '-MP' not supported
5176 if (grep 'ignoring option' conftest.err ||
5177 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5178 am_cv_CXX_dependencies_compiler_type=$depmode
5179 break
5180 fi
5181 fi
5182 done
5183
5184 cd ..
5185 rm -rf conftest.dir
5186 else
5187 am_cv_CXX_dependencies_compiler_type=none
5188 fi
5189
5190 fi
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
5192 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
5193 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
5194
5195 if
5196 test "x$enable_dependency_tracking" != xno \
5197 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
5198 am__fastdepCXX_TRUE=
5199 am__fastdepCXX_FALSE='#'
5200 else
5201 am__fastdepCXX_TRUE='#'
5202 am__fastdepCXX_FALSE=
5203 fi
5204
5205
5206
5207 # GCC flags
5208
5209 test_gcc_flag() {
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211 /* end confdefs.h. */
5212 int main(int argc, char*argv) {}
5213 _ACEOF
5214 $CC -c conftest.c $CFLAGS "$1" -o conftest.o > /dev/null 2> /dev/null
5215 ret=$?
5216 rm -f conftest.o
5217 return $ret
5218 }
5219
5220 # If using GCC specify some additional parameters
5221 if test "x$GCC" = "xyes" ; then
5222
5223 # We use gnu99 instead of c99 because many have interpreted the standard
5224 # in a way that int64_t isn't defined on non-64 bit platforms.
5225 DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
5226
5227 for flag in $DESIRED_FLAGS ; do
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $flag" >&5
5229 $as_echo_n "checking whether $CC accepts $flag... " >&6; }
5230 if test_gcc_flag $flag ; then
5231 CFLAGS="$CFLAGS $flag"
5232 CXXFLAGS="$CXXFLAGS $flag"
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5234 $as_echo "yes" >&6; }
5235 else
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237 $as_echo "no" >&6; }
5238 fi
5239 done
5240 fi
5241
5242 #### libtool stuff ####
4927 fi
4928
52434929
52444930 case `pwd` in
52454931 *\ * | *\ *)
52494935
52504936
52514937
5252 macro_version='2.2.6b'
5253 macro_revision='1.3017'
4938 macro_version='2.4'
4939 macro_revision='1.3293'
52544940
52554941
52564942
52654951
52664952
52674953 ltmain="$ac_aux_dir/ltmain.sh"
4954
4955 # Make sure we can run config.sub.
4956 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4957 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4958
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4960 $as_echo_n "checking build system type... " >&6; }
4961 if ${ac_cv_build+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963 else
4964 ac_build_alias=$build_alias
4965 test "x$ac_build_alias" = x &&
4966 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4967 test "x$ac_build_alias" = x &&
4968 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4969 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4970 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4971
4972 fi
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4974 $as_echo "$ac_cv_build" >&6; }
4975 case $ac_cv_build in
4976 *-*-*) ;;
4977 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4978 esac
4979 build=$ac_cv_build
4980 ac_save_IFS=$IFS; IFS='-'
4981 set x $ac_cv_build
4982 shift
4983 build_cpu=$1
4984 build_vendor=$2
4985 shift; shift
4986 # Remember, the first character of IFS is used to create $*,
4987 # except with old shells:
4988 build_os=$*
4989 IFS=$ac_save_IFS
4990 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4991
4992
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4994 $as_echo_n "checking host system type... " >&6; }
4995 if ${ac_cv_host+:} false; then :
4996 $as_echo_n "(cached) " >&6
4997 else
4998 if test "x$host_alias" = x; then
4999 ac_cv_host=$ac_cv_build
5000 else
5001 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5002 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5003 fi
5004
5005 fi
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5007 $as_echo "$ac_cv_host" >&6; }
5008 case $ac_cv_host in
5009 *-*-*) ;;
5010 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5011 esac
5012 host=$ac_cv_host
5013 ac_save_IFS=$IFS; IFS='-'
5014 set x $ac_cv_host
5015 shift
5016 host_cpu=$1
5017 host_vendor=$2
5018 shift; shift
5019 # Remember, the first character of IFS is used to create $*,
5020 # except with old shells:
5021 host_os=$*
5022 IFS=$ac_save_IFS
5023 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5024
5025
5026 # Backslashify metacharacters that are still active within
5027 # double-quoted strings.
5028 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
5029
5030 # Same as above, but do not quote variable references.
5031 double_quote_subst='s/\(["`\\]\)/\\\1/g'
5032
5033 # Sed substitution to delay expansion of an escaped shell variable in a
5034 # double_quote_subst'ed string.
5035 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5036
5037 # Sed substitution to delay expansion of an escaped single quote.
5038 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
5039
5040 # Sed substitution to avoid accidental globbing in evaled expressions
5041 no_glob_subst='s/\*/\\\*/g'
5042
5043 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5044 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5045 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5046
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
5048 $as_echo_n "checking how to print strings... " >&6; }
5049 # Test print first, because it will be a builtin if present.
5050 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
5051 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5052 ECHO='print -r --'
5053 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5054 ECHO='printf %s\n'
5055 else
5056 # Use this function as a fallback that always works.
5057 func_fallback_echo ()
5058 {
5059 eval 'cat <<_LTECHO_EOF
5060 $1
5061 _LTECHO_EOF'
5062 }
5063 ECHO='func_fallback_echo'
5064 fi
5065
5066 # func_echo_all arg...
5067 # Invoke $ECHO with all args, space-separated.
5068 func_echo_all ()
5069 {
5070 $ECHO ""
5071 }
5072
5073 case "$ECHO" in
5074 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
5075 $as_echo "printf" >&6; } ;;
5076 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
5077 $as_echo "print -r" >&6; } ;;
5078 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
5079 $as_echo "cat" >&6; } ;;
5080 esac
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
52685094
52695095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
52705096 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
5271 if test "${ac_cv_path_SED+set}" = set; then :
5097 if ${ac_cv_path_SED+:} false; then :
52725098 $as_echo_n "(cached) " >&6
52735099 else
52745100 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
53235149 done
53245150 IFS=$as_save_IFS
53255151 if test -z "$ac_cv_path_SED"; then
5326 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
5152 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
53275153 fi
53285154 else
53295155 ac_cv_path_SED=$SED
53505176
53515177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
53525178 $as_echo_n "checking for fgrep... " >&6; }
5353 if test "${ac_cv_path_FGREP+set}" = set; then :
5179 if ${ac_cv_path_FGREP+:} false; then :
53545180 $as_echo_n "(cached) " >&6
53555181 else
53565182 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
54025228 done
54035229 IFS=$as_save_IFS
54045230 if test -z "$ac_cv_path_FGREP"; then
5405 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5231 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
54065232 fi
54075233 else
54085234 ac_cv_path_FGREP=$FGREP
54815307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
54825308 $as_echo_n "checking for non-GNU ld... " >&6; }
54835309 fi
5484 if test "${lt_cv_path_LD+set}" = set; then :
5310 if ${lt_cv_path_LD+:} false; then :
54855311 $as_echo_n "(cached) " >&6
54865312 else
54875313 if test -z "$LD"; then
55185344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55195345 $as_echo "no" >&6; }
55205346 fi
5521 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
5347 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
55225348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
55235349 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5524 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
5350 if ${lt_cv_prog_gnu_ld+:} false; then :
55255351 $as_echo_n "(cached) " >&6
55265352 else
55275353 # I'd rather use --version here, but apparently some GNU lds only accept -v.
55485374
55495375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
55505376 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5551 if test "${lt_cv_path_NM+set}" = set; then :
5377 if ${lt_cv_path_NM+:} false; then :
55525378 $as_echo_n "(cached) " >&6
55535379 else
55545380 if test -n "$NM"; then
56015427 NM="$lt_cv_path_NM"
56025428 else
56035429 # Didn't find any BSD compatible name lister, look for dumpbin.
5604 if test -n "$ac_tool_prefix"; then
5605 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
5430 if test -n "$DUMPBIN"; then :
5431 # Let the user override the test.
5432 else
5433 if test -n "$ac_tool_prefix"; then
5434 for ac_prog in dumpbin "link -dump"
56065435 do
56075436 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
56085437 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
56095438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56105439 $as_echo_n "checking for $ac_word... " >&6; }
5611 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
5440 if ${ac_cv_prog_DUMPBIN+:} false; then :
56125441 $as_echo_n "(cached) " >&6
56135442 else
56145443 if test -n "$DUMPBIN"; then
56465475 fi
56475476 if test -z "$DUMPBIN"; then
56485477 ac_ct_DUMPBIN=$DUMPBIN
5649 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
5478 for ac_prog in dumpbin "link -dump"
56505479 do
56515480 # Extract the first word of "$ac_prog", so it can be a program name with args.
56525481 set dummy $ac_prog; ac_word=$2
56535482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56545483 $as_echo_n "checking for $ac_word... " >&6; }
5655 if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
5484 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
56565485 $as_echo_n "(cached) " >&6
56575486 else
56585487 if test -n "$ac_ct_DUMPBIN"; then
57015530 fi
57025531 fi
57035532
5533 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5534 *COFF*)
5535 DUMPBIN="$DUMPBIN -symbols"
5536 ;;
5537 *)
5538 DUMPBIN=:
5539 ;;
5540 esac
5541 fi
57045542
57055543 if test "$DUMPBIN" != ":"; then
57065544 NM="$DUMPBIN"
57155553
57165554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
57175555 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
5718 if test "${lt_cv_nm_interface+set}" = set; then :
5556 if ${lt_cv_nm_interface+:} false; then :
57195557 $as_echo_n "(cached) " >&6
57205558 else
57215559 lt_cv_nm_interface="BSD nm"
57225560 echo "int some_variable = 0;" > conftest.$ac_ext
5723 (eval echo "\"\$as_me:5724: $ac_compile\"" >&5)
5561 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
57245562 (eval "$ac_compile" 2>conftest.err)
57255563 cat conftest.err >&5
5726 (eval echo "\"\$as_me:5727: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5564 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
57275565 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
57285566 cat conftest.err >&5
5729 (eval echo "\"\$as_me:5730: output\"" >&5)
5567 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
57305568 cat conftest.out >&5
57315569 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
57325570 lt_cv_nm_interface="MS dumpbin"
57505588 # find the maximum length of command line arguments
57515589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
57525590 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
5753 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
5591 if ${lt_cv_sys_max_cmd_len+:} false; then :
57545592 $as_echo_n "(cached) " >&6
57555593 else
57565594 i=0
57805618 # the test eventually succeeds (with a max line length of 256k).
57815619 # Instead, let's just punt: use the minimum linelength reported by
57825620 # all of the supported platforms: 8192 (on NT/2K/XP).
5621 lt_cv_sys_max_cmd_len=8192;
5622 ;;
5623
5624 mint*)
5625 # On MiNT this can take a long time and run out of memory.
57835626 lt_cv_sys_max_cmd_len=8192;
57845627 ;;
57855628
58475690 # If test is not a shell built-in, we'll probably end up computing a
58485691 # maximum length that is only half of the actual maximum length, but
58495692 # we can't tell.
5850 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
5851 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
5693 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
5694 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
58525695 test $i != 17 # 1/2 MB should be enough
58535696 do
58545697 i=`expr $i + 1`
58905733 # Try some XSI features
58915734 xsi_shell=no
58925735 ( _lt_dummy="a/b/c"
5893 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5894 = c,a/b,, \
5736 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
5737 = c,a/b,b/c, \
58955738 && eval 'test $(( 1 + 1 )) -eq 2 \
58965739 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
58975740 && xsi_shell=yes
59405783
59415784
59425785
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
5787 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
5788 if ${lt_cv_to_host_file_cmd+:} false; then :
5789 $as_echo_n "(cached) " >&6
5790 else
5791 case $host in
5792 *-*-mingw* )
5793 case $build in
5794 *-*-mingw* ) # actually msys
5795 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
5796 ;;
5797 *-*-cygwin* )
5798 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
5799 ;;
5800 * ) # otherwise, assume *nix
5801 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
5802 ;;
5803 esac
5804 ;;
5805 *-*-cygwin* )
5806 case $build in
5807 *-*-mingw* ) # actually msys
5808 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
5809 ;;
5810 *-*-cygwin* )
5811 lt_cv_to_host_file_cmd=func_convert_file_noop
5812 ;;
5813 * ) # otherwise, assume *nix
5814 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
5815 ;;
5816 esac
5817 ;;
5818 * ) # unhandled hosts (and "normal" native builds)
5819 lt_cv_to_host_file_cmd=func_convert_file_noop
5820 ;;
5821 esac
5822
5823 fi
5824
5825 to_host_file_cmd=$lt_cv_to_host_file_cmd
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
5827 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
5828
5829
5830
5831
5832
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
5834 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
5835 if ${lt_cv_to_tool_file_cmd+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837 else
5838 #assume ordinary cross tools, or native build.
5839 lt_cv_to_tool_file_cmd=func_convert_file_noop
5840 case $host in
5841 *-*-mingw* )
5842 case $build in
5843 *-*-mingw* ) # actually msys
5844 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
5845 ;;
5846 esac
5847 ;;
5848 esac
5849
5850 fi
5851
5852 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
5854 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
5855
5856
5857
5858
5859
59435860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
59445861 $as_echo_n "checking for $LD option to reload object files... " >&6; }
5945 if test "${lt_cv_ld_reload_flag+set}" = set; then :
5862 if ${lt_cv_ld_reload_flag+:} false; then :
59465863 $as_echo_n "(cached) " >&6
59475864 else
59485865 lt_cv_ld_reload_flag='-r'
59565873 esac
59575874 reload_cmds='$LD$reload_flag -o $output$reload_objs'
59585875 case $host_os in
5876 cygwin* | mingw* | pw32* | cegcc*)
5877 if test "$GCC" != yes; then
5878 reload_cmds=false
5879 fi
5880 ;;
59595881 darwin*)
59605882 if test "$GCC" = yes; then
59615883 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
59785900 set dummy ${ac_tool_prefix}objdump; ac_word=$2
59795901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59805902 $as_echo_n "checking for $ac_word... " >&6; }
5981 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
5903 if ${ac_cv_prog_OBJDUMP+:} false; then :
59825904 $as_echo_n "(cached) " >&6
59835905 else
59845906 if test -n "$OBJDUMP"; then
60185940 set dummy objdump; ac_word=$2
60195941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60205942 $as_echo_n "checking for $ac_word... " >&6; }
6021 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
5943 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
60225944 $as_echo_n "(cached) " >&6
60235945 else
60245946 if test -n "$ac_ct_OBJDUMP"; then
60775999
60786000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
60796001 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
6080 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6002 if ${lt_cv_deplibs_check_method+:} false; then :
60816003 $as_echo_n "(cached) " >&6
60826004 else
60836005 lt_cv_file_magic_cmd='$MAGIC_CMD'
61196041 # Base MSYS/MinGW do not provide the 'file' command needed by
61206042 # func_win32_libid shell function, so use a weaker test based on 'objdump',
61216043 # unless we find 'file', for example because we are cross-compiling.
6122 if ( file / ) >/dev/null 2>&1; then
6044 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6045 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
61236046 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
61246047 lt_cv_file_magic_cmd='func_win32_libid'
61256048 else
6126 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6049 # Keep this pattern in sync with the one in func_win32_libid.
6050 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
61276051 lt_cv_file_magic_cmd='$OBJDUMP -f'
61286052 fi
61296053 ;;
61306054
6131 cegcc)
6055 cegcc*)
61326056 # use the weaker test based on 'objdump'. See mingw*.
61336057 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
61346058 lt_cv_file_magic_cmd='$OBJDUMP -f'
61586082 lt_cv_deplibs_check_method=pass_all
61596083 ;;
61606084
6085 haiku*)
6086 lt_cv_deplibs_check_method=pass_all
6087 ;;
6088
61616089 hpux10.20* | hpux11*)
61626090 lt_cv_file_magic_cmd=/usr/bin/file
61636091 case $host_cpu in
61666094 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
61676095 ;;
61686096 hppa*64*)
6169 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]'
6097 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
61706098 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
61716099 ;;
61726100 *)
6173 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6101 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
61746102 lt_cv_file_magic_test_file=/usr/lib/libc.sl
61756103 ;;
61766104 esac
61966124 lt_cv_deplibs_check_method=pass_all
61976125 ;;
61986126
6199 netbsd* | netbsdelf*-gnu)
6127 netbsd*)
62006128 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
62016129 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
62026130 else
62736201 fi
62746202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
62756203 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6204
6205 file_magic_glob=
6206 want_nocaseglob=no
6207 if test "$build" = "$host"; then
6208 case $host_os in
6209 mingw* | pw32*)
6210 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6211 want_nocaseglob=yes
6212 else
6213 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6214 fi
6215 ;;
6216 esac
6217 fi
6218
62766219 file_magic_cmd=$lt_cv_file_magic_cmd
62776220 deplibs_check_method=$lt_cv_deplibs_check_method
62786221 test -z "$deplibs_check_method" && deplibs_check_method=unknown
62886231
62896232
62906233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
62916244 if test -n "$ac_tool_prefix"; then
6292 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6293 set dummy ${ac_tool_prefix}ar; ac_word=$2
6245 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6246 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
62946247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62956248 $as_echo_n "checking for $ac_word... " >&6; }
6296 if test "${ac_cv_prog_AR+set}" = set; then :
6249 if ${ac_cv_prog_DLLTOOL+:} false; then :
62976250 $as_echo_n "(cached) " >&6
62986251 else
6299 if test -n "$AR"; then
6300 ac_cv_prog_AR="$AR" # Let the user override the test.
6252 if test -n "$DLLTOOL"; then
6253 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
63016254 else
63026255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63036256 for as_dir in $PATH
63066259 test -z "$as_dir" && as_dir=.
63076260 for ac_exec_ext in '' $ac_executable_extensions; do
63086261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6309 ac_cv_prog_AR="${ac_tool_prefix}ar"
6262 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
63106263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63116264 break 2
63126265 fi
63166269
63176270 fi
63186271 fi
6319 AR=$ac_cv_prog_AR
6320 if test -n "$AR"; then
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6322 $as_echo "$AR" >&6; }
6272 DLLTOOL=$ac_cv_prog_DLLTOOL
6273 if test -n "$DLLTOOL"; then
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6275 $as_echo "$DLLTOOL" >&6; }
63236276 else
63246277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63256278 $as_echo "no" >&6; }
63276280
63286281
63296282 fi
6330 if test -z "$ac_cv_prog_AR"; then
6331 ac_ct_AR=$AR
6332 # Extract the first word of "ar", so it can be a program name with args.
6333 set dummy ar; ac_word=$2
6283 if test -z "$ac_cv_prog_DLLTOOL"; then
6284 ac_ct_DLLTOOL=$DLLTOOL
6285 # Extract the first word of "dlltool", so it can be a program name with args.
6286 set dummy dlltool; ac_word=$2
63346287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63356288 $as_echo_n "checking for $ac_word... " >&6; }
6336 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6289 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
63376290 $as_echo_n "(cached) " >&6
63386291 else
6339 if test -n "$ac_ct_AR"; then
6340 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6292 if test -n "$ac_ct_DLLTOOL"; then
6293 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
63416294 else
63426295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63436296 for as_dir in $PATH
63466299 test -z "$as_dir" && as_dir=.
63476300 for ac_exec_ext in '' $ac_executable_extensions; do
63486301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6349 ac_cv_prog_ac_ct_AR="ar"
6302 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
63506303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63516304 break 2
63526305 fi
63566309
63576310 fi
63586311 fi
6312 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6313 if test -n "$ac_ct_DLLTOOL"; then
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6315 $as_echo "$ac_ct_DLLTOOL" >&6; }
6316 else
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318 $as_echo "no" >&6; }
6319 fi
6320
6321 if test "x$ac_ct_DLLTOOL" = x; then
6322 DLLTOOL="false"
6323 else
6324 case $cross_compiling:$ac_tool_warned in
6325 yes:)
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6327 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6328 ac_tool_warned=yes ;;
6329 esac
6330 DLLTOOL=$ac_ct_DLLTOOL
6331 fi
6332 else
6333 DLLTOOL="$ac_cv_prog_DLLTOOL"
6334 fi
6335
6336 test -z "$DLLTOOL" && DLLTOOL=dlltool
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
6348 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
6349 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
6350 $as_echo_n "(cached) " >&6
6351 else
6352 lt_cv_sharedlib_from_linklib_cmd='unknown'
6353
6354 case $host_os in
6355 cygwin* | mingw* | pw32* | cegcc*)
6356 # two different shell functions defined in ltmain.sh
6357 # decide which to use based on capabilities of $DLLTOOL
6358 case `$DLLTOOL --help 2>&1` in
6359 *--identify-strict*)
6360 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6361 ;;
6362 *)
6363 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6364 ;;
6365 esac
6366 ;;
6367 *)
6368 # fallback: assume linklib IS sharedlib
6369 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6370 ;;
6371 esac
6372
6373 fi
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
6375 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
6376 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6377 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6378
6379
6380
6381
6382
6383
6384
6385 if test -n "$ac_tool_prefix"; then
6386 for ac_prog in ar
6387 do
6388 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6389 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391 $as_echo_n "checking for $ac_word... " >&6; }
6392 if ${ac_cv_prog_AR+:} false; then :
6393 $as_echo_n "(cached) " >&6
6394 else
6395 if test -n "$AR"; then
6396 ac_cv_prog_AR="$AR" # Let the user override the test.
6397 else
6398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 for as_dir in $PATH
6400 do
6401 IFS=$as_save_IFS
6402 test -z "$as_dir" && as_dir=.
6403 for ac_exec_ext in '' $ac_executable_extensions; do
6404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6405 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407 break 2
6408 fi
6409 done
6410 done
6411 IFS=$as_save_IFS
6412
6413 fi
6414 fi
6415 AR=$ac_cv_prog_AR
6416 if test -n "$AR"; then
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6418 $as_echo "$AR" >&6; }
6419 else
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421 $as_echo "no" >&6; }
6422 fi
6423
6424
6425 test -n "$AR" && break
6426 done
6427 fi
6428 if test -z "$AR"; then
6429 ac_ct_AR=$AR
6430 for ac_prog in ar
6431 do
6432 # Extract the first word of "$ac_prog", so it can be a program name with args.
6433 set dummy $ac_prog; ac_word=$2
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435 $as_echo_n "checking for $ac_word... " >&6; }
6436 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6437 $as_echo_n "(cached) " >&6
6438 else
6439 if test -n "$ac_ct_AR"; then
6440 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6441 else
6442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443 for as_dir in $PATH
6444 do
6445 IFS=$as_save_IFS
6446 test -z "$as_dir" && as_dir=.
6447 for ac_exec_ext in '' $ac_executable_extensions; do
6448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6449 ac_cv_prog_ac_ct_AR="$ac_prog"
6450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451 break 2
6452 fi
6453 done
6454 done
6455 IFS=$as_save_IFS
6456
6457 fi
6458 fi
63596459 ac_ct_AR=$ac_cv_prog_ac_ct_AR
63606460 if test -n "$ac_ct_AR"; then
63616461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
63646464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63656465 $as_echo "no" >&6; }
63666466 fi
6467
6468
6469 test -n "$ac_ct_AR" && break
6470 done
63676471
63686472 if test "x$ac_ct_AR" = x; then
63696473 AR="false"
63766480 esac
63776481 AR=$ac_ct_AR
63786482 fi
6379 else
6380 AR="$ac_cv_prog_AR"
6381 fi
6382
6383 test -z "$AR" && AR=ar
6384 test -z "$AR_FLAGS" && AR_FLAGS=cru
6385
6386
6387
6388
6483 fi
6484
6485 : ${AR=ar}
6486 : ${AR_FLAGS=cru}
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
6499 $as_echo_n "checking for archiver @FILE support... " >&6; }
6500 if ${lt_cv_ar_at_file+:} false; then :
6501 $as_echo_n "(cached) " >&6
6502 else
6503 lt_cv_ar_at_file=no
6504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505 /* end confdefs.h. */
6506
6507 int
6508 main ()
6509 {
6510
6511 ;
6512 return 0;
6513 }
6514 _ACEOF
6515 if ac_fn_c_try_compile "$LINENO"; then :
6516 echo conftest.$ac_objext > conftest.lst
6517 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
6518 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6519 (eval $lt_ar_try) 2>&5
6520 ac_status=$?
6521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6522 test $ac_status = 0; }
6523 if test "$ac_status" -eq 0; then
6524 # Ensure the archiver fails upon bogus file names.
6525 rm -f conftest.$ac_objext libconftest.a
6526 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6527 (eval $lt_ar_try) 2>&5
6528 ac_status=$?
6529 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6530 test $ac_status = 0; }
6531 if test "$ac_status" -ne 0; then
6532 lt_cv_ar_at_file=@
6533 fi
6534 fi
6535 rm -f conftest.* libconftest.a
6536
6537 fi
6538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6539
6540 fi
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
6542 $as_echo "$lt_cv_ar_at_file" >&6; }
6543
6544 if test "x$lt_cv_ar_at_file" = xno; then
6545 archiver_list_spec=
6546 else
6547 archiver_list_spec=$lt_cv_ar_at_file
6548 fi
63896549
63906550
63916551
63986558 set dummy ${ac_tool_prefix}strip; ac_word=$2
63996559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64006560 $as_echo_n "checking for $ac_word... " >&6; }
6401 if test "${ac_cv_prog_STRIP+set}" = set; then :
6561 if ${ac_cv_prog_STRIP+:} false; then :
64026562 $as_echo_n "(cached) " >&6
64036563 else
64046564 if test -n "$STRIP"; then
64386598 set dummy strip; ac_word=$2
64396599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64406600 $as_echo_n "checking for $ac_word... " >&6; }
6441 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
6601 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
64426602 $as_echo_n "(cached) " >&6
64436603 else
64446604 if test -n "$ac_ct_STRIP"; then
64976657 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
64986658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64996659 $as_echo_n "checking for $ac_word... " >&6; }
6500 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6660 if ${ac_cv_prog_RANLIB+:} false; then :
65016661 $as_echo_n "(cached) " >&6
65026662 else
65036663 if test -n "$RANLIB"; then
65376697 set dummy ranlib; ac_word=$2
65386698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65396699 $as_echo_n "checking for $ac_word... " >&6; }
6540 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6700 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
65416701 $as_echo_n "(cached) " >&6
65426702 else
65436703 if test -n "$ac_ct_RANLIB"; then
66086768 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
66096769 fi
66106770
6771 case $host_os in
6772 darwin*)
6773 lock_old_archive_extraction=yes ;;
6774 *)
6775 lock_old_archive_extraction=no ;;
6776 esac
6777
6778
6779
6780
6781
6782
66116783
66126784
66136785
66546826 # Check for command to grab the raw symbol name followed by C symbol from nm.
66556827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
66566828 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6657 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
6829 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
66586830 $as_echo_n "(cached) " >&6
66596831 else
66606832
67156887 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
67166888
67176889 # Transform an extracted symbol line into symbol name and symbol address
6718 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
6719 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
6890 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
6891 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
67206892
67216893 # Handle CRLF in mingw tool chain
67226894 opt_cr=
67526924 else
67536925 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
67546926 fi
6927 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
67556928
67566929 # Check to see that the pipe works correctly.
67576930 pipe_works=no
67776950 test $ac_status = 0; }; then
67786951 # Now try to grab the symbols.
67796952 nlist=conftest.nm
6780 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
6781 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6953 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
6954 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
67826955 ac_status=$?
67836956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
67846957 test $ac_status = 0; } && test -s "$nlist"; then
67936966 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
67946967 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
67956968 cat <<_LT_EOF > conftest.$ac_ext
6969 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
6970 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6971 /* DATA imports from DLLs on WIN32 con't be const, because runtime
6972 relocations are performed -- see ld's documentation on pseudo-relocs. */
6973 # define LT_DLSYM_CONST
6974 #elif defined(__osf__)
6975 /* This system does not cope well with relocations in const data. */
6976 # define LT_DLSYM_CONST
6977 #else
6978 # define LT_DLSYM_CONST const
6979 #endif
6980
67966981 #ifdef __cplusplus
67976982 extern "C" {
67986983 #endif
68046989 cat <<_LT_EOF >> conftest.$ac_ext
68056990
68066991 /* The mapping between symbol names and symbols. */
6807 const struct {
6992 LT_DLSYM_CONST struct {
68086993 const char *name;
68096994 void *address;
68106995 }
68307015 _LT_EOF
68317016 # Now try linking the two files.
68327017 mv conftest.$ac_objext conftstm.$ac_objext
6833 lt_save_LIBS="$LIBS"
6834 lt_save_CFLAGS="$CFLAGS"
7018 lt_globsym_save_LIBS=$LIBS
7019 lt_globsym_save_CFLAGS=$CFLAGS
68357020 LIBS="conftstm.$ac_objext"
68367021 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
68377022 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
68417026 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
68427027 pipe_works=yes
68437028 fi
6844 LIBS="$lt_save_LIBS"
6845 CFLAGS="$lt_save_CFLAGS"
7029 LIBS=$lt_globsym_save_LIBS
7030 CFLAGS=$lt_globsym_save_CFLAGS
68467031 else
68477032 echo "cannot find nm_test_func in $nlist" >&5
68487033 fi
68797064 $as_echo "ok" >&6; }
68807065 fi
68817066
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
7067 # Response file support.
7068 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7069 nm_file_list_spec='@'
7070 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7071 nm_file_list_spec='@'
7072 fi
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7101 $as_echo_n "checking for sysroot... " >&6; }
7102
7103 # Check whether --with-sysroot was given.
7104 if test "${with_sysroot+set}" = set; then :
7105 withval=$with_sysroot;
7106 else
7107 with_sysroot=no
7108 fi
7109
7110
7111 lt_sysroot=
7112 case ${with_sysroot} in #(
7113 yes)
7114 if test "$GCC" = yes; then
7115 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7116 fi
7117 ;; #(
7118 /*)
7119 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7120 ;; #(
7121 no|'')
7122 ;; #(
7123 *)
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
7125 $as_echo "${with_sysroot}" >&6; }
7126 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7127 ;;
7128 esac
7129
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7131 $as_echo "${lt_sysroot:-no}" >&6; }
68987132
68997133
69007134
69317165 ;;
69327166 *-*-irix6*)
69337167 # Find out which ABI we are using.
6934 echo '#line 6935 "configure"' > conftest.$ac_ext
7168 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
69357169 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
69367170 (eval $ac_compile) 2>&5
69377171 ac_status=$?
70257259 CFLAGS="$CFLAGS -belf"
70267260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
70277261 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7028 if test "${lt_cv_cc_needs_belf+set}" = set; then :
7262 if ${lt_cv_cc_needs_belf+:} false; then :
70297263 $as_echo_n "(cached) " >&6
70307264 else
70317265 ac_ext=c
70937327
70947328 need_locks="$enable_libtool_lock"
70957329
7330 if test -n "$ac_tool_prefix"; then
7331 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7332 set dummy ${ac_tool_prefix}mt; ac_word=$2
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334 $as_echo_n "checking for $ac_word... " >&6; }
7335 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
7336 $as_echo_n "(cached) " >&6
7337 else
7338 if test -n "$MANIFEST_TOOL"; then
7339 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7340 else
7341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342 for as_dir in $PATH
7343 do
7344 IFS=$as_save_IFS
7345 test -z "$as_dir" && as_dir=.
7346 for ac_exec_ext in '' $ac_executable_extensions; do
7347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7348 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350 break 2
7351 fi
7352 done
7353 done
7354 IFS=$as_save_IFS
7355
7356 fi
7357 fi
7358 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7359 if test -n "$MANIFEST_TOOL"; then
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7361 $as_echo "$MANIFEST_TOOL" >&6; }
7362 else
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364 $as_echo "no" >&6; }
7365 fi
7366
7367
7368 fi
7369 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7370 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7371 # Extract the first word of "mt", so it can be a program name with args.
7372 set dummy mt; ac_word=$2
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
7376 $as_echo_n "(cached) " >&6
7377 else
7378 if test -n "$ac_ct_MANIFEST_TOOL"; then
7379 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7380 else
7381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382 for as_dir in $PATH
7383 do
7384 IFS=$as_save_IFS
7385 test -z "$as_dir" && as_dir=.
7386 for ac_exec_ext in '' $ac_executable_extensions; do
7387 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7388 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390 break 2
7391 fi
7392 done
7393 done
7394 IFS=$as_save_IFS
7395
7396 fi
7397 fi
7398 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7399 if test -n "$ac_ct_MANIFEST_TOOL"; then
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7401 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7402 else
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404 $as_echo "no" >&6; }
7405 fi
7406
7407 if test "x$ac_ct_MANIFEST_TOOL" = x; then
7408 MANIFEST_TOOL=":"
7409 else
7410 case $cross_compiling:$ac_tool_warned in
7411 yes:)
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7414 ac_tool_warned=yes ;;
7415 esac
7416 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7417 fi
7418 else
7419 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7420 fi
7421
7422 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7424 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7425 if ${lt_cv_path_mainfest_tool+:} false; then :
7426 $as_echo_n "(cached) " >&6
7427 else
7428 lt_cv_path_mainfest_tool=no
7429 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7430 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7431 cat conftest.err >&5
7432 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7433 lt_cv_path_mainfest_tool=yes
7434 fi
7435 rm -f conftest*
7436 fi
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7438 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7439 if test "x$lt_cv_path_mainfest_tool" != xyes; then
7440 MANIFEST_TOOL=:
7441 fi
7442
7443
7444
7445
7446
70967447
70977448 case $host_os in
70987449 rhapsody* | darwin*)
71017452 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
71027453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
71037454 $as_echo_n "checking for $ac_word... " >&6; }
7104 if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
7455 if ${ac_cv_prog_DSYMUTIL+:} false; then :
71057456 $as_echo_n "(cached) " >&6
71067457 else
71077458 if test -n "$DSYMUTIL"; then
71417492 set dummy dsymutil; ac_word=$2
71427493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
71437494 $as_echo_n "checking for $ac_word... " >&6; }
7144 if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
7495 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
71457496 $as_echo_n "(cached) " >&6
71467497 else
71477498 if test -n "$ac_ct_DSYMUTIL"; then
71937544 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
71947545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
71957546 $as_echo_n "checking for $ac_word... " >&6; }
7196 if test "${ac_cv_prog_NMEDIT+set}" = set; then :
7547 if ${ac_cv_prog_NMEDIT+:} false; then :
71977548 $as_echo_n "(cached) " >&6
71987549 else
71997550 if test -n "$NMEDIT"; then
72337584 set dummy nmedit; ac_word=$2
72347585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
72357586 $as_echo_n "checking for $ac_word... " >&6; }
7236 if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
7587 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
72377588 $as_echo_n "(cached) " >&6
72387589 else
72397590 if test -n "$ac_ct_NMEDIT"; then
72857636 set dummy ${ac_tool_prefix}lipo; ac_word=$2
72867637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
72877638 $as_echo_n "checking for $ac_word... " >&6; }
7288 if test "${ac_cv_prog_LIPO+set}" = set; then :
7639 if ${ac_cv_prog_LIPO+:} false; then :
72897640 $as_echo_n "(cached) " >&6
72907641 else
72917642 if test -n "$LIPO"; then
73257676 set dummy lipo; ac_word=$2
73267677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
73277678 $as_echo_n "checking for $ac_word... " >&6; }
7328 if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
7679 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
73297680 $as_echo_n "(cached) " >&6
73307681 else
73317682 if test -n "$ac_ct_LIPO"; then
73777728 set dummy ${ac_tool_prefix}otool; ac_word=$2
73787729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
73797730 $as_echo_n "checking for $ac_word... " >&6; }
7380 if test "${ac_cv_prog_OTOOL+set}" = set; then :
7731 if ${ac_cv_prog_OTOOL+:} false; then :
73817732 $as_echo_n "(cached) " >&6
73827733 else
73837734 if test -n "$OTOOL"; then
74177768 set dummy otool; ac_word=$2
74187769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
74197770 $as_echo_n "checking for $ac_word... " >&6; }
7420 if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
7771 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
74217772 $as_echo_n "(cached) " >&6
74227773 else
74237774 if test -n "$ac_ct_OTOOL"; then
74697820 set dummy ${ac_tool_prefix}otool64; ac_word=$2
74707821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
74717822 $as_echo_n "checking for $ac_word... " >&6; }
7472 if test "${ac_cv_prog_OTOOL64+set}" = set; then :
7823 if ${ac_cv_prog_OTOOL64+:} false; then :
74737824 $as_echo_n "(cached) " >&6
74747825 else
74757826 if test -n "$OTOOL64"; then
75097860 set dummy otool64; ac_word=$2
75107861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
75117862 $as_echo_n "checking for $ac_word... " >&6; }
7512 if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
7863 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
75137864 $as_echo_n "(cached) " >&6
75147865 else
75157866 if test -n "$ac_ct_OTOOL64"; then
75847935
75857936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
75867937 $as_echo_n "checking for -single_module linker flag... " >&6; }
7587 if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
7938 if ${lt_cv_apple_cc_single_mod+:} false; then :
75887939 $as_echo_n "(cached) " >&6
75897940 else
75907941 lt_cv_apple_cc_single_mod=no
76137964 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
76147965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
76157966 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
7616 if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
7967 if ${lt_cv_ld_exported_symbols_list+:} false; then :
76177968 $as_echo_n "(cached) " >&6
76187969 else
76197970 lt_cv_ld_exported_symbols_list=no
76437994 fi
76447995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
76457996 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
7998 $as_echo_n "checking for -force_load linker flag... " >&6; }
7999 if ${lt_cv_ld_force_load+:} false; then :
8000 $as_echo_n "(cached) " >&6
8001 else
8002 lt_cv_ld_force_load=no
8003 cat > conftest.c << _LT_EOF
8004 int forced_loaded() { return 2;}
8005 _LT_EOF
8006 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8007 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8008 echo "$AR cru libconftest.a conftest.o" >&5
8009 $AR cru libconftest.a conftest.o 2>&5
8010 echo "$RANLIB libconftest.a" >&5
8011 $RANLIB libconftest.a 2>&5
8012 cat > conftest.c << _LT_EOF
8013 int main() { return 0;}
8014 _LT_EOF
8015 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
8016 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
8017 _lt_result=$?
8018 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
8019 lt_cv_ld_force_load=yes
8020 else
8021 cat conftest.err >&5
8022 fi
8023 rm -f conftest.err libconftest.a conftest conftest.c
8024 rm -rf conftest.dSYM
8025
8026 fi
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
8028 $as_echo "$lt_cv_ld_force_load" >&6; }
76468029 case $host_os in
76478030 rhapsody* | darwin1.[012])
76488031 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
76708053 else
76718054 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
76728055 fi
7673 if test "$DSYMUTIL" != ":"; then
8056 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
76748057 _lt_dsymutil='~$DSYMUTIL $lib || :'
76758058 else
76768059 _lt_dsymutil=
76828065 do :
76838066 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
76848067 "
7685 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
8068 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
76868069 cat >>confdefs.h <<_ACEOF
76878070 #define HAVE_DLFCN_H 1
76888071 _ACEOF
76908073 fi
76918074
76928075 done
7693
7694
7695
7696 ac_ext=cpp
7697 ac_cpp='$CXXCPP $CPPFLAGS'
7698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7701 if test -z "$CXX"; then
7702 if test -n "$CCC"; then
7703 CXX=$CCC
7704 else
7705 if test -n "$ac_tool_prefix"; then
7706 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
7707 do
7708 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7709 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711 $as_echo_n "checking for $ac_word... " >&6; }
7712 if test "${ac_cv_prog_CXX+set}" = set; then :
7713 $as_echo_n "(cached) " >&6
7714 else
7715 if test -n "$CXX"; then
7716 ac_cv_prog_CXX="$CXX" # Let the user override the test.
7717 else
7718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719 for as_dir in $PATH
7720 do
7721 IFS=$as_save_IFS
7722 test -z "$as_dir" && as_dir=.
7723 for ac_exec_ext in '' $ac_executable_extensions; do
7724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7725 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
7726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727 break 2
7728 fi
7729 done
7730 done
7731 IFS=$as_save_IFS
7732
7733 fi
7734 fi
7735 CXX=$ac_cv_prog_CXX
7736 if test -n "$CXX"; then
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
7738 $as_echo "$CXX" >&6; }
7739 else
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741 $as_echo "no" >&6; }
7742 fi
7743
7744
7745 test -n "$CXX" && break
7746 done
7747 fi
7748 if test -z "$CXX"; then
7749 ac_ct_CXX=$CXX
7750 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
7751 do
7752 # Extract the first word of "$ac_prog", so it can be a program name with args.
7753 set dummy $ac_prog; ac_word=$2
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7755 $as_echo_n "checking for $ac_word... " >&6; }
7756 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
7757 $as_echo_n "(cached) " >&6
7758 else
7759 if test -n "$ac_ct_CXX"; then
7760 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
7761 else
7762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7763 for as_dir in $PATH
7764 do
7765 IFS=$as_save_IFS
7766 test -z "$as_dir" && as_dir=.
7767 for ac_exec_ext in '' $ac_executable_extensions; do
7768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7769 ac_cv_prog_ac_ct_CXX="$ac_prog"
7770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7771 break 2
7772 fi
7773 done
7774 done
7775 IFS=$as_save_IFS
7776
7777 fi
7778 fi
7779 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
7780 if test -n "$ac_ct_CXX"; then
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
7782 $as_echo "$ac_ct_CXX" >&6; }
7783 else
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7785 $as_echo "no" >&6; }
7786 fi
7787
7788
7789 test -n "$ac_ct_CXX" && break
7790 done
7791
7792 if test "x$ac_ct_CXX" = x; then
7793 CXX="g++"
7794 else
7795 case $cross_compiling:$ac_tool_warned in
7796 yes:)
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7799 ac_tool_warned=yes ;;
7800 esac
7801 CXX=$ac_ct_CXX
7802 fi
7803 fi
7804
7805 fi
7806 fi
7807 # Provide some information about the compiler.
7808 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
7809 set X $ac_compile
7810 ac_compiler=$2
7811 for ac_option in --version -v -V -qversion; do
7812 { { ac_try="$ac_compiler $ac_option >&5"
7813 case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816 esac
7817 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7818 $as_echo "$ac_try_echo"; } >&5
7819 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7820 ac_status=$?
7821 if test -s conftest.err; then
7822 sed '10a\
7823 ... rest of stderr output deleted ...
7824 10q' conftest.err >conftest.er1
7825 cat conftest.er1 >&5
7826 fi
7827 rm -f conftest.er1 conftest.err
7828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7829 test $ac_status = 0; }
7830 done
7831
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
7833 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
7834 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
7835 $as_echo_n "(cached) " >&6
7836 else
7837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7838 /* end confdefs.h. */
7839
7840 int
7841 main ()
7842 {
7843 #ifndef __GNUC__
7844 choke me
7845 #endif
7846
7847 ;
7848 return 0;
7849 }
7850 _ACEOF
7851 if ac_fn_cxx_try_compile "$LINENO"; then :
7852 ac_compiler_gnu=yes
7853 else
7854 ac_compiler_gnu=no
7855 fi
7856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7857 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
7858
7859 fi
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
7861 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
7862 if test $ac_compiler_gnu = yes; then
7863 GXX=yes
7864 else
7865 GXX=
7866 fi
7867 ac_test_CXXFLAGS=${CXXFLAGS+set}
7868 ac_save_CXXFLAGS=$CXXFLAGS
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
7870 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
7871 if test "${ac_cv_prog_cxx_g+set}" = set; then :
7872 $as_echo_n "(cached) " >&6
7873 else
7874 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7875 ac_cxx_werror_flag=yes
7876 ac_cv_prog_cxx_g=no
7877 CXXFLAGS="-g"
7878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7879 /* end confdefs.h. */
7880
7881 int
7882 main ()
7883 {
7884
7885 ;
7886 return 0;
7887 }
7888 _ACEOF
7889 if ac_fn_cxx_try_compile "$LINENO"; then :
7890 ac_cv_prog_cxx_g=yes
7891 else
7892 CXXFLAGS=""
7893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894 /* end confdefs.h. */
7895
7896 int
7897 main ()
7898 {
7899
7900 ;
7901 return 0;
7902 }
7903 _ACEOF
7904 if ac_fn_cxx_try_compile "$LINENO"; then :
7905
7906 else
7907 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7908 CXXFLAGS="-g"
7909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7910 /* end confdefs.h. */
7911
7912 int
7913 main ()
7914 {
7915
7916 ;
7917 return 0;
7918 }
7919 _ACEOF
7920 if ac_fn_cxx_try_compile "$LINENO"; then :
7921 ac_cv_prog_cxx_g=yes
7922 fi
7923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7924 fi
7925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7926 fi
7927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7928 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7929 fi
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
7931 $as_echo "$ac_cv_prog_cxx_g" >&6; }
7932 if test "$ac_test_CXXFLAGS" = set; then
7933 CXXFLAGS=$ac_save_CXXFLAGS
7934 elif test $ac_cv_prog_cxx_g = yes; then
7935 if test "$GXX" = yes; then
7936 CXXFLAGS="-g -O2"
7937 else
7938 CXXFLAGS="-g"
7939 fi
7940 else
7941 if test "$GXX" = yes; then
7942 CXXFLAGS="-O2"
7943 else
7944 CXXFLAGS=
7945 fi
7946 fi
7947 ac_ext=c
7948 ac_cpp='$CPP $CPPFLAGS'
7949 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7950 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7951 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7952
7953 depcc="$CXX" am_compiler_list=
7954
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7956 $as_echo_n "checking dependency style of $depcc... " >&6; }
7957 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
7958 $as_echo_n "(cached) " >&6
7959 else
7960 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7961 # We make a subdir and do the tests there. Otherwise we can end up
7962 # making bogus files that we don't know about and never remove. For
7963 # instance it was reported that on HP-UX the gcc test will end up
7964 # making a dummy file named `D' -- because `-MD' means `put the output
7965 # in D'.
7966 mkdir conftest.dir
7967 # Copy depcomp to subdir because otherwise we won't find it if we're
7968 # using a relative directory.
7969 cp "$am_depcomp" conftest.dir
7970 cd conftest.dir
7971 # We will build objects and dependencies in a subdirectory because
7972 # it helps to detect inapplicable dependency modes. For instance
7973 # both Tru64's cc and ICC support -MD to output dependencies as a
7974 # side effect of compilation, but ICC will put the dependencies in
7975 # the current directory while Tru64 will put them in the object
7976 # directory.
7977 mkdir sub
7978
7979 am_cv_CXX_dependencies_compiler_type=none
7980 if test "$am_compiler_list" = ""; then
7981 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7982 fi
7983 am__universal=false
7984 case " $depcc " in #(
7985 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7986 esac
7987
7988 for depmode in $am_compiler_list; do
7989 # Setup a source with many dependencies, because some compilers
7990 # like to wrap large dependency lists on column 80 (with \), and
7991 # we should not choose a depcomp mode which is confused by this.
7992 #
7993 # We need to recreate these files for each test, as the compiler may
7994 # overwrite some of them when testing with obscure command lines.
7995 # This happens at least with the AIX C compiler.
7996 : > sub/conftest.c
7997 for i in 1 2 3 4 5 6; do
7998 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7999 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8000 # Solaris 8's {/usr,}/bin/sh.
8001 touch sub/conftst$i.h
8002 done
8003 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8004
8005 # We check with `-c' and `-o' for the sake of the "dashmstdout"
8006 # mode. It turns out that the SunPro C++ compiler does not properly
8007 # handle `-M -o', and we need to detect this. Also, some Intel
8008 # versions had trouble with output in subdirs
8009 am__obj=sub/conftest.${OBJEXT-o}
8010 am__minus_obj="-o $am__obj"
8011 case $depmode in
8012 gcc)
8013 # This depmode causes a compiler race in universal mode.
8014 test "$am__universal" = false || continue
8015 ;;
8016 nosideeffect)
8017 # after this tag, mechanisms are not by side-effect, so they'll
8018 # only be used when explicitly requested
8019 if test "x$enable_dependency_tracking" = xyes; then
8020 continue
8021 else
8022 break
8023 fi
8024 ;;
8025 msvisualcpp | msvcmsys)
8026 # This compiler won't grok `-c -o', but also, the minuso test has
8027 # not run yet. These depmodes are late enough in the game, and
8028 # so weak that their functioning should not be impacted.
8029 am__obj=conftest.${OBJEXT-o}
8030 am__minus_obj=
8031 ;;
8032 none) break ;;
8033 esac
8034 if depmode=$depmode \
8035 source=sub/conftest.c object=$am__obj \
8036 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8037 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8038 >/dev/null 2>conftest.err &&
8039 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8040 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8041 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8042 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8043 # icc doesn't choke on unknown options, it will just issue warnings
8044 # or remarks (even with -Werror). So we grep stderr for any message
8045 # that says an option was ignored or not supported.
8046 # When given -MP, icc 7.0 and 7.1 complain thusly:
8047 # icc: Command line warning: ignoring option '-M'; no argument required
8048 # The diagnosis changed in icc 8.0:
8049 # icc: Command line remark: option '-MP' not supported
8050 if (grep 'ignoring option' conftest.err ||
8051 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8052 am_cv_CXX_dependencies_compiler_type=$depmode
8053 break
8054 fi
8055 fi
8056 done
8057
8058 cd ..
8059 rm -rf conftest.dir
8060 else
8061 am_cv_CXX_dependencies_compiler_type=none
8062 fi
8063
8064 fi
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
8066 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
8067 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
8068
8069 if
8070 test "x$enable_dependency_tracking" != xno \
8071 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
8072 am__fastdepCXX_TRUE=
8073 am__fastdepCXX_FALSE='#'
8074 else
8075 am__fastdepCXX_TRUE='#'
8076 am__fastdepCXX_FALSE=
8077 fi
8078
8079
8080 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8081 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8082 (test "X$CXX" != "Xg++"))) ; then
8083 ac_ext=cpp
8084 ac_cpp='$CXXCPP $CPPFLAGS'
8085 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8086 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8087 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
8089 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
8090 if test -z "$CXXCPP"; then
8091 if test "${ac_cv_prog_CXXCPP+set}" = set; then :
8092 $as_echo_n "(cached) " >&6
8093 else
8094 # Double quotes because CXXCPP needs to be expanded
8095 for CXXCPP in "$CXX -E" "/lib/cpp"
8096 do
8097 ac_preproc_ok=false
8098 for ac_cxx_preproc_warn_flag in '' yes
8099 do
8100 # Use a header file that comes with gcc, so configuring glibc
8101 # with a fresh cross-compiler works.
8102 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8103 # <limits.h> exists even on freestanding compilers.
8104 # On the NeXT, cc -E runs the code through the compiler's parser,
8105 # not just through cpp. "Syntax error" is here to catch this case.
8106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8107 /* end confdefs.h. */
8108 #ifdef __STDC__
8109 # include <limits.h>
8110 #else
8111 # include <assert.h>
8112 #endif
8113 Syntax error
8114 _ACEOF
8115 if ac_fn_cxx_try_cpp "$LINENO"; then :
8116
8117 else
8118 # Broken: fails on valid input.
8119 continue
8120 fi
8121 rm -f conftest.err conftest.$ac_ext
8122
8123 # OK, works on sane cases. Now check whether nonexistent headers
8124 # can be detected and how.
8125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8126 /* end confdefs.h. */
8127 #include <ac_nonexistent.h>
8128 _ACEOF
8129 if ac_fn_cxx_try_cpp "$LINENO"; then :
8130 # Broken: success on invalid input.
8131 continue
8132 else
8133 # Passes both tests.
8134 ac_preproc_ok=:
8135 break
8136 fi
8137 rm -f conftest.err conftest.$ac_ext
8138
8139 done
8140 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8141 rm -f conftest.err conftest.$ac_ext
8142 if $ac_preproc_ok; then :
8143 break
8144 fi
8145
8146 done
8147 ac_cv_prog_CXXCPP=$CXXCPP
8148
8149 fi
8150 CXXCPP=$ac_cv_prog_CXXCPP
8151 else
8152 ac_cv_prog_CXXCPP=$CXXCPP
8153 fi
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
8155 $as_echo "$CXXCPP" >&6; }
8156 ac_preproc_ok=false
8157 for ac_cxx_preproc_warn_flag in '' yes
8158 do
8159 # Use a header file that comes with gcc, so configuring glibc
8160 # with a fresh cross-compiler works.
8161 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8162 # <limits.h> exists even on freestanding compilers.
8163 # On the NeXT, cc -E runs the code through the compiler's parser,
8164 # not just through cpp. "Syntax error" is here to catch this case.
8165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8166 /* end confdefs.h. */
8167 #ifdef __STDC__
8168 # include <limits.h>
8169 #else
8170 # include <assert.h>
8171 #endif
8172 Syntax error
8173 _ACEOF
8174 if ac_fn_cxx_try_cpp "$LINENO"; then :
8175
8176 else
8177 # Broken: fails on valid input.
8178 continue
8179 fi
8180 rm -f conftest.err conftest.$ac_ext
8181
8182 # OK, works on sane cases. Now check whether nonexistent headers
8183 # can be detected and how.
8184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8185 /* end confdefs.h. */
8186 #include <ac_nonexistent.h>
8187 _ACEOF
8188 if ac_fn_cxx_try_cpp "$LINENO"; then :
8189 # Broken: success on invalid input.
8190 continue
8191 else
8192 # Passes both tests.
8193 ac_preproc_ok=:
8194 break
8195 fi
8196 rm -f conftest.err conftest.$ac_ext
8197
8198 done
8199 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8200 rm -f conftest.err conftest.$ac_ext
8201 if $ac_preproc_ok; then :
8202
8203 else
8204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8206 _lt_caught_CXX_error=yes; }
8207 fi
8208
8209 ac_ext=c
8210 ac_cpp='$CPP $CPPFLAGS'
8211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8214
8215 else
8216 _lt_caught_CXX_error=yes
8217 fi
82188076
82198077
82208078
83728230
83738231
83748232
8233
83758234 test -z "$LN_S" && LN_S="ln -s"
83768235
83778236
83938252
83948253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
83958254 $as_echo_n "checking for objdir... " >&6; }
8396 if test "${lt_cv_objdir+set}" = set; then :
8255 if ${lt_cv_objdir+:} false; then :
83978256 $as_echo_n "(cached) " >&6
83988257 else
83998258 rm -f .libs 2>/dev/null
84178276 cat >>confdefs.h <<_ACEOF
84188277 #define LT_OBJDIR "$lt_cv_objdir/"
84198278 _ACEOF
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
84338279
84348280
84358281
84468292 ;;
84478293 esac
84488294
8449 # Sed substitution that helps us do robust quoting. It backslashifies
8450 # metacharacters that are still active within double-quoted strings.
8451 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
8452
8453 # Same as above, but do not quote variable references.
8454 double_quote_subst='s/\(["`\\]\)/\\\1/g'
8455
8456 # Sed substitution to delay expansion of an escaped shell variable in a
8457 # double_quote_subst'ed string.
8458 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8459
8460 # Sed substitution to delay expansion of an escaped single quote.
8461 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
8462
8463 # Sed substitution to avoid accidental globbing in evaled expressions
8464 no_glob_subst='s/\*/\\\*/g'
8465
84668295 # Global variables:
84678296 ofile=libtool
84688297 can_build_shared=yes
84918320 *) break;;
84928321 esac
84938322 done
8494 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8323 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
84958324
84968325
84978326 # Only perform the check for file, if the check method requires it
85018330 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
85028331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
85038332 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8504 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8333 if ${lt_cv_path_MAGIC_CMD+:} false; then :
85058334 $as_echo_n "(cached) " >&6
85068335 else
85078336 case $MAGIC_CMD in
85678396 if test -n "$ac_tool_prefix"; then
85688397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
85698398 $as_echo_n "checking for file... " >&6; }
8570 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8399 if ${lt_cv_path_MAGIC_CMD+:} false; then :
85718400 $as_echo_n "(cached) " >&6
85728401 else
85738402 case $MAGIC_CMD in
86918520 $RM -r conftest*
86928521
86938522
8523 ## CAVEAT EMPTOR:
8524 ## There is no encapsulation within the following macros, do not change
8525 ## the running order or otherwise move them around unless you know exactly
8526 ## what you are doing...
86948527 if test -n "$compiler"; then
86958528
86968529 lt_prog_compiler_no_builtin_flag=
86978530
86988531 if test "$GCC" = yes; then
8699 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8532 case $cc_basename in
8533 nvcc*)
8534 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
8535 *)
8536 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
8537 esac
87008538
87018539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
87028540 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8703 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8541 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
87048542 $as_echo_n "(cached) " >&6
87058543 else
87068544 lt_cv_prog_compiler_rtti_exceptions=no
87168554 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
87178555 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
87188556 -e 's:$: $lt_compiler_flag:'`
8719 (eval echo "\"\$as_me:8720: $lt_compile\"" >&5)
8557 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
87208558 (eval "$lt_compile" 2>conftest.err)
87218559 ac_status=$?
87228560 cat conftest.err >&5
8723 echo "$as_me:8724: \$? = $ac_status" >&5
8561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
87248562 if (exit $ac_status) && test -s "$ac_outfile"; then
87258563 # The compiler can only warn and ignore the option if not recognized
87268564 # So say no if there are warnings other than the usual output.
8727 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8565 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
87288566 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
87298567 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
87308568 lt_cv_prog_compiler_rtti_exceptions=yes
87538591 lt_prog_compiler_pic=
87548592 lt_prog_compiler_static=
87558593
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8757 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
87588594
87598595 if test "$GCC" = yes; then
87608596 lt_prog_compiler_wl='-Wl,'
88028638 lt_prog_compiler_pic='-fno-common'
88038639 ;;
88048640
8641 haiku*)
8642 # PIC is the default for Haiku.
8643 # The "-static" flag exists, but is broken.
8644 lt_prog_compiler_static=
8645 ;;
8646
88058647 hpux*)
88068648 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
88078649 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
88428684
88438685 *)
88448686 lt_prog_compiler_pic='-fPIC'
8687 ;;
8688 esac
8689
8690 case $cc_basename in
8691 nvcc*) # Cuda Compiler Driver 2.2
8692 lt_prog_compiler_wl='-Xlinker '
8693 lt_prog_compiler_pic='-Xcompiler -fPIC'
88458694 ;;
88468695 esac
88478696 else
89068755 lt_prog_compiler_pic='--shared'
89078756 lt_prog_compiler_static='--static'
89088757 ;;
8909 pgcc* | pgf77* | pgf90* | pgf95*)
8758 nagfor*)
8759 # NAG Fortran compiler
8760 lt_prog_compiler_wl='-Wl,-Wl,,'
8761 lt_prog_compiler_pic='-PIC'
8762 lt_prog_compiler_static='-Bstatic'
8763 ;;
8764 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
89108765 # Portland Group compilers (*not* the Pentium gcc compiler,
89118766 # which looks to be a dead project)
89128767 lt_prog_compiler_wl='-Wl,'
89188773 # All Alpha code is PIC.
89198774 lt_prog_compiler_static='-non_shared'
89208775 ;;
8921 xl*)
8922 # IBM XL C 8.0/Fortran 10.1 on PPC
8776 xl* | bgxl* | bgf* | mpixl*)
8777 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
89238778 lt_prog_compiler_wl='-Wl,'
89248779 lt_prog_compiler_pic='-qpic'
89258780 lt_prog_compiler_static='-qstaticlink'
89268781 ;;
89278782 *)
89288783 case `$CC -V 2>&1 | sed 5q` in
8784 *Sun\ F* | *Sun*Fortran*)
8785 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8786 lt_prog_compiler_pic='-KPIC'
8787 lt_prog_compiler_static='-Bstatic'
8788 lt_prog_compiler_wl=''
8789 ;;
89298790 *Sun\ C*)
89308791 # Sun C 5.9
89318792 lt_prog_compiler_pic='-KPIC'
89328793 lt_prog_compiler_static='-Bstatic'
89338794 lt_prog_compiler_wl='-Wl,'
89348795 ;;
8935 *Sun\ F*)
8936 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8937 lt_prog_compiler_pic='-KPIC'
8938 lt_prog_compiler_static='-Bstatic'
8939 lt_prog_compiler_wl=''
8940 ;;
89418796 esac
89428797 ;;
89438798 esac
89688823 lt_prog_compiler_pic='-KPIC'
89698824 lt_prog_compiler_static='-Bstatic'
89708825 case $cc_basename in
8971 f77* | f90* | f95*)
8826 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
89728827 lt_prog_compiler_wl='-Qoption ld ';;
89738828 *)
89748829 lt_prog_compiler_wl='-Wl,';;
90258880 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
90268881 ;;
90278882 esac
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
9029 $as_echo "$lt_prog_compiler_pic" >&6; }
9030
9031
9032
9033
9034
8883
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8885 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8886 if ${lt_cv_prog_compiler_pic+:} false; then :
8887 $as_echo_n "(cached) " >&6
8888 else
8889 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
8890 fi
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
8892 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
8893 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
90358894
90368895 #
90378896 # Check to make sure the PIC flag actually works.
90398898 if test -n "$lt_prog_compiler_pic"; then
90408899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
90418900 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
9042 if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
8901 if ${lt_cv_prog_compiler_pic_works+:} false; then :
90438902 $as_echo_n "(cached) " >&6
90448903 else
90458904 lt_cv_prog_compiler_pic_works=no
90558914 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
90568915 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
90578916 -e 's:$: $lt_compiler_flag:'`
9058 (eval echo "\"\$as_me:9059: $lt_compile\"" >&5)
8917 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
90598918 (eval "$lt_compile" 2>conftest.err)
90608919 ac_status=$?
90618920 cat conftest.err >&5
9062 echo "$as_me:9063: \$? = $ac_status" >&5
8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
90638922 if (exit $ac_status) && test -s "$ac_outfile"; then
90648923 # The compiler can only warn and ignore the option if not recognized
90658924 # So say no if there are warnings other than the usual output.
9066 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8925 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
90678926 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
90688927 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
90698928 lt_cv_prog_compiler_pic_works=yes
90928951
90938952
90948953
8954
8955
8956
8957
8958
90958959 #
90968960 # Check to make sure the static flag actually works.
90978961 #
90988962 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
90998963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
91008964 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
9101 if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
8965 if ${lt_cv_prog_compiler_static_works+:} false; then :
91028966 $as_echo_n "(cached) " >&6
91038967 else
91048968 lt_cv_prog_compiler_static_works=no
91118975 if test -s conftest.err; then
91128976 # Append any errors to the config.log.
91138977 cat conftest.err 1>&5
9114 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
8978 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
91158979 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
91168980 if diff conftest.exp conftest.er2 >/dev/null; then
91178981 lt_cv_prog_compiler_static_works=yes
91419005
91429006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
91439007 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9144 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
9008 if ${lt_cv_prog_compiler_c_o+:} false; then :
91459009 $as_echo_n "(cached) " >&6
91469010 else
91479011 lt_cv_prog_compiler_c_o=no
91609024 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
91619025 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
91629026 -e 's:$: $lt_compiler_flag:'`
9163 (eval echo "\"\$as_me:9164: $lt_compile\"" >&5)
9027 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
91649028 (eval "$lt_compile" 2>out/conftest.err)
91659029 ac_status=$?
91669030 cat out/conftest.err >&5
9167 echo "$as_me:9168: \$? = $ac_status" >&5
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
91689032 if (exit $ac_status) && test -s out/conftest2.$ac_objext
91699033 then
91709034 # The compiler can only warn and ignore the option if not recognized
91719035 # So say no if there are warnings
9172 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
9036 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
91739037 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
91749038 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
91759039 lt_cv_prog_compiler_c_o=yes
91969060
91979061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
91989062 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9199 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
9063 if ${lt_cv_prog_compiler_c_o+:} false; then :
92009064 $as_echo_n "(cached) " >&6
92019065 else
92029066 lt_cv_prog_compiler_c_o=no
92159079 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
92169080 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
92179081 -e 's:$: $lt_compiler_flag:'`
9218 (eval echo "\"\$as_me:9219: $lt_compile\"" >&5)
9082 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
92199083 (eval "$lt_compile" 2>out/conftest.err)
92209084 ac_status=$?
92219085 cat out/conftest.err >&5
9222 echo "$as_me:9223: \$? = $ac_status" >&5
9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
92239087 if (exit $ac_status) && test -s out/conftest2.$ac_objext
92249088 then
92259089 # The compiler can only warn and ignore the option if not recognized
92269090 # So say no if there are warnings
9227 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
9091 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
92289092 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
92299093 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
92309094 lt_cv_prog_compiler_c_o=yes
93349198 openbsd*)
93359199 with_gnu_ld=no
93369200 ;;
9337 linux* | k*bsd*-gnu)
9338 link_all_deplibs=no
9339 ;;
93409201 esac
93419202
93429203 ld_shlibs=yes
9204
9205 # On some targets, GNU ld is compatible enough with the native linker
9206 # that we're better off using the native interface for both.
9207 lt_use_gnu_ld_interface=no
93439208 if test "$with_gnu_ld" = yes; then
9209 case $host_os in
9210 aix*)
9211 # The AIX port of GNU ld has always aspired to compatibility
9212 # with the native linker. However, as the warning in the GNU ld
9213 # block says, versions before 2.19.5* couldn't really create working
9214 # shared libraries, regardless of the interface used.
9215 case `$LD -v 2>&1` in
9216 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9217 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9218 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9219 *)
9220 lt_use_gnu_ld_interface=yes
9221 ;;
9222 esac
9223 ;;
9224 *)
9225 lt_use_gnu_ld_interface=yes
9226 ;;
9227 esac
9228 fi
9229
9230 if test "$lt_use_gnu_ld_interface" = yes; then
93449231 # If archive_cmds runs LD, not CC, wlarc should be empty
93459232 wlarc='${wl}'
93469233
93749261 ld_shlibs=no
93759262 cat <<_LT_EOF 1>&2
93769263
9377 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9264 *** Warning: the GNU linker, at least up to release 2.19, is reported
93789265 *** to be unable to reliably create shared libraries on AIX.
93799266 *** Therefore, libtool is disabling shared libraries support. If you
9380 *** really care for shared libraries, you may want to modify your PATH
9381 *** so that a non-GNU linker is found, and then restart.
9267 *** really care for shared libraries, you may want to install binutils
9268 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9269 *** You will then need to restart the configuration process.
93829270
93839271 _LT_EOF
93849272 fi
94149302 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
94159303 # as there is no search path for DLLs.
94169304 hardcode_libdir_flag_spec='-L$libdir'
9305 export_dynamic_flag_spec='${wl}--export-all-symbols'
94179306 allow_undefined_flag=unsupported
94189307 always_export_symbols=no
94199308 enable_shared_with_static_runtimes=yes
9420 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9309 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
9310 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
94219311
94229312 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
94239313 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
94359325 fi
94369326 ;;
94379327
9328 haiku*)
9329 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9330 link_all_deplibs=yes
9331 ;;
9332
94389333 interix[3-9]*)
94399334 hardcode_direct=no
94409335 hardcode_shlibpath_var=no
94609355 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
94619356 && test "$tmp_diet" = no
94629357 then
9463 tmp_addflag=
9358 tmp_addflag=' $pic_flag'
94649359 tmp_sharedflag='-shared'
94659360 case $cc_basename,$host_cpu in
94669361 pgcc*) # Portland Group C compiler
9467 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9362 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
94689363 tmp_addflag=' $pic_flag'
94699364 ;;
9470 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
9471 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9365 pgf77* | pgf90* | pgf95* | pgfortran*)
9366 # Portland Group f77 and f90 compilers
9367 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
94729368 tmp_addflag=' $pic_flag -Mnomain' ;;
94739369 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
94749370 tmp_addflag=' -i_dynamic' ;;
94799375 lf95*) # Lahey Fortran 8.1
94809376 whole_archive_flag_spec=
94819377 tmp_sharedflag='--shared' ;;
9482 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9378 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
94839379 tmp_sharedflag='-qmkshrobj'
94849380 tmp_addflag= ;;
9381 nvcc*) # Cuda Compiler Driver 2.2
9382 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9383 compiler_needs_object=yes
9384 ;;
94859385 esac
94869386 case `$CC -V 2>&1 | sed 5q` in
94879387 *Sun\ C*) # Sun C 5.9
9488 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
9388 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
94899389 compiler_needs_object=yes
94909390 tmp_sharedflag='-G' ;;
94919391 *Sun\ F*) # Sun Fortran 8.3
95019401 fi
95029402
95039403 case $cc_basename in
9504 xlf*)
9404 xlf* | bgf* | bgxlf* | mpixlf*)
95059405 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
95069406 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
95079407 hardcode_libdir_flag_spec=
95089408 hardcode_libdir_flag_spec_ld='-rpath $libdir'
9509 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
9409 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
95109410 if test "x$supports_anon_versioning" = xyes; then
95119411 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
95129412 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
95139413 echo "local: *; };" >> $output_objdir/$libname.ver~
9514 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9414 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
95159415 fi
95169416 ;;
95179417 esac
95209420 fi
95219421 ;;
95229422
9523 netbsd* | netbsdelf*-gnu)
9423 netbsd*)
95249424 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
95259425 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
95269426 wlarc=
95279427 else
9528 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9529 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9428 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9429 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
95309430 fi
95319431 ;;
95329432
95449444
95459445 _LT_EOF
95469446 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9547 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9548 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9447 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9448 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
95499449 else
95509450 ld_shlibs=no
95519451 fi
95919491
95929492 *)
95939493 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9594 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9595 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9494 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9495 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
95969496 else
95979497 ld_shlibs=no
95989498 fi
96329532 else
96339533 # If we're using GNU nm, then we don't want the "-C" option.
96349534 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9535 # Also, AIX nm treats weak defined symbols like other global
9536 # defined symbols, whereas GNU nm marks them as "W".
96359537 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9636 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9538 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
96379539 else
96389540 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
96399541 fi
96959597 if test "$aix_use_runtimelinking" = yes; then
96969598 shared_flag="$shared_flag "'${wl}-G'
96979599 fi
9698 link_all_deplibs=no
96999600 else
97009601 # not using gcc
97019602 if test "$host_cpu" = ia64; then
97219622 allow_undefined_flag='-berok'
97229623 # Determine the default libpath from the value encoded in an
97239624 # empty executable.
9724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 if test "${lt_cv_aix_libpath+set}" = set; then
9626 aix_libpath=$lt_cv_aix_libpath
9627 else
9628 if ${lt_cv_aix_libpath_+:} false; then :
9629 $as_echo_n "(cached) " >&6
9630 else
9631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
97259632 /* end confdefs.h. */
97269633
97279634 int
97349641 _ACEOF
97359642 if ac_fn_c_try_link "$LINENO"; then :
97369643
9737 lt_aix_libpath_sed='
9738 /Import File Strings/,/^$/ {
9739 /^0/ {
9740 s/^0 *\(.*\)$/\1/
9741 p
9742 }
9743 }'
9744 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9745 # Check for a 64-bit object if we didn't find anything.
9746 if test -z "$aix_libpath"; then
9747 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9748 fi
9644 lt_aix_libpath_sed='
9645 /Import File Strings/,/^$/ {
9646 /^0/ {
9647 s/^0 *\([^ ]*\) *$/\1/
9648 p
9649 }
9650 }'
9651 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9652 # Check for a 64-bit object if we didn't find anything.
9653 if test -z "$lt_cv_aix_libpath_"; then
9654 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9655 fi
97499656 fi
97509657 rm -f core conftest.err conftest.$ac_objext \
97519658 conftest$ac_exeext conftest.$ac_ext
9752 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9659 if test -z "$lt_cv_aix_libpath_"; then
9660 lt_cv_aix_libpath_="/usr/lib:/lib"
9661 fi
9662
9663 fi
9664
9665 aix_libpath=$lt_cv_aix_libpath_
9666 fi
97539667
97549668 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9755 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
9669 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
97569670 else
97579671 if test "$host_cpu" = ia64; then
97589672 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
97619675 else
97629676 # Determine the default libpath from the value encoded in an
97639677 # empty executable.
9764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 if test "${lt_cv_aix_libpath+set}" = set; then
9679 aix_libpath=$lt_cv_aix_libpath
9680 else
9681 if ${lt_cv_aix_libpath_+:} false; then :
9682 $as_echo_n "(cached) " >&6
9683 else
9684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
97659685 /* end confdefs.h. */
97669686
97679687 int
97749694 _ACEOF
97759695 if ac_fn_c_try_link "$LINENO"; then :
97769696
9777 lt_aix_libpath_sed='
9778 /Import File Strings/,/^$/ {
9779 /^0/ {
9780 s/^0 *\(.*\)$/\1/
9781 p
9782 }
9783 }'
9784 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9785 # Check for a 64-bit object if we didn't find anything.
9786 if test -z "$aix_libpath"; then
9787 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9788 fi
9697 lt_aix_libpath_sed='
9698 /Import File Strings/,/^$/ {
9699 /^0/ {
9700 s/^0 *\([^ ]*\) *$/\1/
9701 p
9702 }
9703 }'
9704 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9705 # Check for a 64-bit object if we didn't find anything.
9706 if test -z "$lt_cv_aix_libpath_"; then
9707 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9708 fi
97899709 fi
97909710 rm -f core conftest.err conftest.$ac_objext \
97919711 conftest$ac_exeext conftest.$ac_ext
9792 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9712 if test -z "$lt_cv_aix_libpath_"; then
9713 lt_cv_aix_libpath_="/usr/lib:/lib"
9714 fi
9715
9716 fi
9717
9718 aix_libpath=$lt_cv_aix_libpath_
9719 fi
97939720
97949721 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
97959722 # Warning - without using the other run time loading flags,
97969723 # -berok will link without error, but may produce a broken library.
97979724 no_undefined_flag=' ${wl}-bernotok'
97989725 allow_undefined_flag=' ${wl}-berok'
9799 # Exported symbols can be pulled into shared objects from archives
9800 whole_archive_flag_spec='$convenience'
9726 if test "$with_gnu_ld" = yes; then
9727 # We only use this code for GNU lds that support --whole-archive.
9728 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9729 else
9730 # Exported symbols can be pulled into shared objects from archives
9731 whole_archive_flag_spec='$convenience'
9732 fi
98019733 archive_cmds_need_lc=yes
98029734 # This is similar to how AIX traditionally builds its shared libraries.
98039735 archive_expsym_cmds="\$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'
98299761 # Microsoft Visual C++.
98309762 # hardcode_libdir_flag_spec is actually meaningless, as there is
98319763 # no search path for DLLs.
9832 hardcode_libdir_flag_spec=' '
9833 allow_undefined_flag=unsupported
9834 # Tell ltmain to make .lib files, not .a files.
9835 libext=lib
9836 # Tell ltmain to make .dll files, not .so files.
9837 shrext_cmds=".dll"
9838 # FIXME: Setting linknames here is a bad hack.
9839 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
9840 # The linker will automatically build a .lib file if we build a DLL.
9841 old_archive_from_new_cmds='true'
9842 # FIXME: Should let the user specify the lib program.
9843 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9844 fix_srcfile_path='`cygpath -w "$srcfile"`'
9845 enable_shared_with_static_runtimes=yes
9764 case $cc_basename in
9765 cl*)
9766 # Native MSVC
9767 hardcode_libdir_flag_spec=' '
9768 allow_undefined_flag=unsupported
9769 always_export_symbols=yes
9770 file_list_spec='@'
9771 # Tell ltmain to make .lib files, not .a files.
9772 libext=lib
9773 # Tell ltmain to make .dll files, not .so files.
9774 shrext_cmds=".dll"
9775 # FIXME: Setting linknames here is a bad hack.
9776 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
9777 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9778 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
9779 else
9780 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
9781 fi~
9782 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9783 linknames='
9784 # The linker will not automatically build a static lib if we build a DLL.
9785 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
9786 enable_shared_with_static_runtimes=yes
9787 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9788 # Don't use ranlib
9789 old_postinstall_cmds='chmod 644 $oldlib'
9790 postlink_cmds='lt_outputfile="@OUTPUT@"~
9791 lt_tool_outputfile="@TOOL_OUTPUT@"~
9792 case $lt_outputfile in
9793 *.exe|*.EXE) ;;
9794 *)
9795 lt_outputfile="$lt_outputfile.exe"
9796 lt_tool_outputfile="$lt_tool_outputfile.exe"
9797 ;;
9798 esac~
9799 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
9800 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9801 $RM "$lt_outputfile.manifest";
9802 fi'
9803 ;;
9804 *)
9805 # Assume MSVC wrapper
9806 hardcode_libdir_flag_spec=' '
9807 allow_undefined_flag=unsupported
9808 # Tell ltmain to make .lib files, not .a files.
9809 libext=lib
9810 # Tell ltmain to make .dll files, not .so files.
9811 shrext_cmds=".dll"
9812 # FIXME: Setting linknames here is a bad hack.
9813 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9814 # The linker will automatically build a .lib file if we build a DLL.
9815 old_archive_from_new_cmds='true'
9816 # FIXME: Should let the user specify the lib program.
9817 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9818 enable_shared_with_static_runtimes=yes
9819 ;;
9820 esac
98469821 ;;
98479822
98489823 darwin* | rhapsody*)
98529827 hardcode_direct=no
98539828 hardcode_automatic=yes
98549829 hardcode_shlibpath_var=unsupported
9855 whole_archive_flag_spec=''
9830 if test "$lt_cv_ld_force_load" = "yes"; then
9831 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
9832 else
9833 whole_archive_flag_spec=''
9834 fi
98569835 link_all_deplibs=yes
98579836 allow_undefined_flag="$_lt_dar_allow_undefined"
98589837 case $cc_basename in
98609839 *) _lt_dar_can_shared=$GCC ;;
98619840 esac
98629841 if test "$_lt_dar_can_shared" = "yes"; then
9863 output_verbose_link_cmd=echo
9842 output_verbose_link_cmd=func_echo_all
98649843 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
98659844 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
98669845 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
99039882
99049883 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
99059884 freebsd* | dragonfly*)
9906 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9885 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
99079886 hardcode_libdir_flag_spec='-R$libdir'
99089887 hardcode_direct=yes
99099888 hardcode_shlibpath_var=no
99119890
99129891 hpux9*)
99139892 if test "$GCC" = yes; then
9914 archive_cmds='$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'
9893 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
99159894 else
99169895 archive_cmds='$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'
99179896 fi
99269905 ;;
99279906
99289907 hpux10*)
9929 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9930 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9908 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9909 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
99319910 else
99329911 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
99339912 fi
99459924 ;;
99469925
99479926 hpux11*)
9948 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9927 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
99499928 case $host_cpu in
99509929 hppa*64*)
99519930 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
99529931 ;;
99539932 ia64*)
9954 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9933 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
99559934 ;;
99569935 *)
9957 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9936 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
99589937 ;;
99599938 esac
99609939 else
99669945 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
99679946 ;;
99689947 *)
9969 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9948
9949 # Older versions of the 11.00 compiler do not understand -b yet
9950 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9952 $as_echo_n "checking if $CC understands -b... " >&6; }
9953 if ${lt_cv_prog_compiler__b+:} false; then :
9954 $as_echo_n "(cached) " >&6
9955 else
9956 lt_cv_prog_compiler__b=no
9957 save_LDFLAGS="$LDFLAGS"
9958 LDFLAGS="$LDFLAGS -b"
9959 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9960 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9961 # The linker can only warn and ignore the option if not recognized
9962 # So say no if there are warnings
9963 if test -s conftest.err; then
9964 # Append any errors to the config.log.
9965 cat conftest.err 1>&5
9966 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9967 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9968 if diff conftest.exp conftest.er2 >/dev/null; then
9969 lt_cv_prog_compiler__b=yes
9970 fi
9971 else
9972 lt_cv_prog_compiler__b=yes
9973 fi
9974 fi
9975 $RM -r conftest*
9976 LDFLAGS="$save_LDFLAGS"
9977
9978 fi
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9980 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9981
9982 if test x"$lt_cv_prog_compiler__b" = xyes; then
9983 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9984 else
9985 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9986 fi
9987
99709988 ;;
99719989 esac
99729990 fi
999410012
999510013 irix5* | irix6* | nonstopux*)
999610014 if test "$GCC" = yes; then
9997 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10015 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
999810016 # Try to use the -exported_symbol ld option, if it does not
999910017 # work, assume that -exports_file does not work either and
1000010018 # implicitly export all symbols.
10001 save_LDFLAGS="$LDFLAGS"
10002 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10019 # This should be the same for all languages, so no per-tag cache variable.
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10021 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10022 if ${lt_cv_irix_exported_symbol+:} false; then :
10023 $as_echo_n "(cached) " >&6
10024 else
10025 save_LDFLAGS="$LDFLAGS"
10026 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1000410028 /* end confdefs.h. */
10005 int foo(void) {}
10029 int foo (void) { return 0; }
1000610030 _ACEOF
1000710031 if ac_fn_c_try_link "$LINENO"; then :
10008 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10009
10032 lt_cv_irix_exported_symbol=yes
10033 else
10034 lt_cv_irix_exported_symbol=no
1001010035 fi
1001110036 rm -f core conftest.err conftest.$ac_objext \
1001210037 conftest$ac_exeext conftest.$ac_ext
10013 LDFLAGS="$save_LDFLAGS"
10038 LDFLAGS="$save_LDFLAGS"
10039 fi
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10041 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10042 if test "$lt_cv_irix_exported_symbol" = yes; then
10043 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10044 fi
1001410045 else
10015 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
10016 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
10046 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10047 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
1001710048 fi
1001810049 archive_cmds_need_lc='no'
1001910050 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1002210053 link_all_deplibs=yes
1002310054 ;;
1002410055
10025 netbsd* | netbsdelf*-gnu)
10056 netbsd*)
1002610057 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1002710058 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1002810059 else
1007510106 hardcode_libdir_flag_spec='-L$libdir'
1007610107 hardcode_minus_L=yes
1007710108 allow_undefined_flag=unsupported
10078 archive_cmds='$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'
10109 archive_cmds='$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'
1007910110 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1008010111 ;;
1008110112
1008210113 osf3*)
1008310114 if test "$GCC" = yes; then
1008410115 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10085 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10116 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1008610117 else
1008710118 allow_undefined_flag=' -expect_unresolved \*'
10088 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
10119 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
1008910120 fi
1009010121 archive_cmds_need_lc='no'
1009110122 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1009510126 osf4* | osf5*) # as osf3* with the addition of -msym flag
1009610127 if test "$GCC" = yes; then
1009710128 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10098 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10129 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1009910130 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1010010131 else
1010110132 allow_undefined_flag=' -expect_unresolved \*'
10102 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
10133 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
1010310134 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
10104 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
10135 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
1010510136
1010610137 # Both c and cxx compiler support -rpath directly
1010710138 hardcode_libdir_flag_spec='-rpath $libdir'
1011410145 no_undefined_flag=' -z defs'
1011510146 if test "$GCC" = yes; then
1011610147 wlarc='${wl}'
10117 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10148 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1011810149 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10119 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10150 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1012010151 else
1012110152 case `$CC -V 2>&1` in
1012210153 *"Compilers 5.0"*)
1030410335 # to ld, don't add -lc before -lgcc.
1030510336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
1030610337 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
10307 $RM conftest*
10308 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10309
10310 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10338 if ${lt_cv_archive_cmds_need_lc+:} false; then :
10339 $as_echo_n "(cached) " >&6
10340 else
10341 $RM conftest*
10342 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10343
10344 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1031110345 (eval $ac_compile) 2>&5
1031210346 ac_status=$?
1031310347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1031410348 test $ac_status = 0; } 2>conftest.err; then
10315 soname=conftest
10316 lib=conftest
10317 libobjs=conftest.$ac_objext
10318 deplibs=
10319 wl=$lt_prog_compiler_wl
10320 pic_flag=$lt_prog_compiler_pic
10321 compiler_flags=-v
10322 linker_flags=-v
10323 verstring=
10324 output_objdir=.
10325 libname=conftest
10326 lt_save_allow_undefined_flag=$allow_undefined_flag
10327 allow_undefined_flag=
10328 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
10349 soname=conftest
10350 lib=conftest
10351 libobjs=conftest.$ac_objext
10352 deplibs=
10353 wl=$lt_prog_compiler_wl
10354 pic_flag=$lt_prog_compiler_pic
10355 compiler_flags=-v
10356 linker_flags=-v
10357 verstring=
10358 output_objdir=.
10359 libname=conftest
10360 lt_save_allow_undefined_flag=$allow_undefined_flag
10361 allow_undefined_flag=
10362 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
1032910363 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
1033010364 ac_status=$?
1033110365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1033210366 test $ac_status = 0; }
10333 then
10334 archive_cmds_need_lc=no
10335 else
10336 archive_cmds_need_lc=yes
10337 fi
10338 allow_undefined_flag=$lt_save_allow_undefined_flag
10339 else
10340 cat conftest.err 1>&5
10341 fi
10342 $RM conftest*
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
10344 $as_echo "$archive_cmds_need_lc" >&6; }
10367 then
10368 lt_cv_archive_cmds_need_lc=no
10369 else
10370 lt_cv_archive_cmds_need_lc=yes
10371 fi
10372 allow_undefined_flag=$lt_save_allow_undefined_flag
10373 else
10374 cat conftest.err 1>&5
10375 fi
10376 $RM conftest*
10377
10378 fi
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
10380 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
10381 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
1034510382 ;;
1034610383 esac
1034710384 fi
1051210549 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1051310550 *) lt_awk_arg="/^libraries:/" ;;
1051410551 esac
10515 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10516 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
10552 case $host_os in
10553 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
10554 *) lt_sed_strip_eq="s,=/,/,g" ;;
10555 esac
10556 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
10557 case $lt_search_path_spec in
10558 *\;*)
1051710559 # if the path contains ";" then we assume it to be the separator
1051810560 # otherwise default to the standard path separator (i.e. ":") - it is
1051910561 # assumed that no part of a normal pathname contains ";" but that should
1052010562 # okay in the real world where ";" in dirpaths is itself problematic.
10521 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
10522 else
10523 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10524 fi
10563 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
10564 ;;
10565 *)
10566 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
10567 ;;
10568 esac
1052510569 # Ok, now we have the path, separated by spaces, we can step through it
1052610570 # and add multilib dir if necessary.
1052710571 lt_tmp_lt_search_path_spec=
1053410578 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1053510579 fi
1053610580 done
10537 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
10581 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
1053810582 BEGIN {RS=" "; FS="/|\n";} {
1053910583 lt_foo="";
1054010584 lt_count=0;
1055410598 if (lt_foo != "") { lt_freq[lt_foo]++; }
1055510599 if (lt_freq[lt_foo] == 1) { print lt_foo; }
1055610600 }'`
10557 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
10601 # AWK program above erroneously prepends '/' to C:/dos/paths
10602 # for these hosts.
10603 case $host_os in
10604 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
10605 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
10606 esac
10607 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
1055810608 else
1055910609 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1056010610 fi
1064210692 m68k)
1064310693 library_names_spec='$libname.ixlibrary $libname.a'
1064410694 # Create ${libname}_ixlibrary.a entries in /sys/libs.
10645 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'
10695 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
1064610696 ;;
1064710697 esac
1064810698 ;;
1067310723 need_version=no
1067410724 need_lib_prefix=no
1067510725
10676 case $GCC,$host_os in
10677 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
10726 case $GCC,$cc_basename in
10727 yes,*)
10728 # gcc
1067810729 library_names_spec='$libname.dll.a'
1067910730 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1068010731 postinstall_cmds='base_file=`basename \${file}`~
1069510746 cygwin*)
1069610747 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1069710748 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10698 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10749
10750 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1069910751 ;;
1070010752 mingw* | cegcc*)
1070110753 # MinGW DLLs use traditional 'lib' prefix
1070210754 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10703 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10704 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10705 # It is most probably a Windows format PATH printed by
10706 # mingw gcc, but we are running on Cygwin. Gcc prints its search
10707 # path with ; separators, and with drive letters. We can handle the
10708 # drive letters (cygwin fileutils understands them), so leave them,
10709 # especially as we might pass files found there to a mingw objdump,
10710 # which wouldn't understand a cygwinified path. Ahh.
10711 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10712 else
10713 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10714 fi
1071510755 ;;
1071610756 pw32*)
1071710757 # pw32 DLLs use 'pw' prefix rather than 'lib'
1071810758 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1071910759 ;;
1072010760 esac
10761 dynamic_linker='Win32 ld.exe'
1072110762 ;;
1072210763
10764 *,cl*)
10765 # Native MSVC
10766 libname_spec='$name'
10767 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10768 library_names_spec='${libname}.dll.lib'
10769
10770 case $build_os in
10771 mingw*)
10772 sys_lib_search_path_spec=
10773 lt_save_ifs=$IFS
10774 IFS=';'
10775 for lt_path in $LIB
10776 do
10777 IFS=$lt_save_ifs
10778 # Let DOS variable expansion print the short 8.3 style file name.
10779 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
10780 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
10781 done
10782 IFS=$lt_save_ifs
10783 # Convert to MSYS style.
10784 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
10785 ;;
10786 cygwin*)
10787 # Convert to unix form, then to dos form, then back to unix form
10788 # but this time dos style (no spaces!) so that the unix form looks
10789 # like /cygdrive/c/PROGRA~1:/cygdr...
10790 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
10791 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
10792 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10793 ;;
10794 *)
10795 sys_lib_search_path_spec="$LIB"
10796 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10797 # It is most probably a Windows format PATH.
10798 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10799 else
10800 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10801 fi
10802 # FIXME: find the short name or the path components, as spaces are
10803 # common. (e.g. "Program Files" -> "PROGRA~1")
10804 ;;
10805 esac
10806
10807 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10808 postinstall_cmds='base_file=`basename \${file}`~
10809 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10810 dldir=$destdir/`dirname \$dlpath`~
10811 test -d \$dldir || mkdir -p \$dldir~
10812 $install_prog $dir/$dlname \$dldir/$dlname'
10813 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10814 dlpath=$dir/\$dldll~
10815 $RM \$dlpath'
10816 shlibpath_overrides_runpath=yes
10817 dynamic_linker='Win32 link.exe'
10818 ;;
10819
1072310820 *)
10821 # Assume MSVC wrapper
1072410822 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10823 dynamic_linker='Win32 ld.exe'
1072510824 ;;
1072610825 esac
10727 dynamic_linker='Win32 ld.exe'
1072810826 # FIXME: first we should search . and the directory the executable is in
1072910827 shlibpath_var=PATH
1073010828 ;;
1081110909 hardcode_into_libs=yes
1081210910 ;;
1081310911
10912 haiku*)
10913 version_type=linux
10914 need_lib_prefix=no
10915 need_version=no
10916 dynamic_linker="$host_os runtime_loader"
10917 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10918 soname_spec='${libname}${release}${shared_ext}$major'
10919 shlibpath_var=LIBRARY_PATH
10920 shlibpath_overrides_runpath=yes
10921 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10922 hardcode_into_libs=yes
10923 ;;
10924
1081410925 hpux9* | hpux10* | hpux11*)
1081510926 # Give a soname corresponding to the major version so that dld.sl refuses to
1081610927 # link against other versions.
1085310964 soname_spec='${libname}${release}${shared_ext}$major'
1085410965 ;;
1085510966 esac
10856 # HP-UX runs *really* slowly unless shared libraries are mode 555.
10967 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
1085710968 postinstall_cmds='chmod 555 $lib'
10969 # or fails outright, so override atomically:
10970 install_override_mode=555
1085810971 ;;
1085910972
1086010973 interix[3-9]*)
1092111034 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1092211035 shlibpath_var=LD_LIBRARY_PATH
1092311036 shlibpath_overrides_runpath=no
11037
1092411038 # Some binutils ld are patched to set DT_RUNPATH
10925 save_LDFLAGS=$LDFLAGS
10926 save_libdir=$libdir
10927 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10928 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11039 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
11040 $as_echo_n "(cached) " >&6
11041 else
11042 lt_cv_shlibpath_overrides_runpath=no
11043 save_LDFLAGS=$LDFLAGS
11044 save_libdir=$libdir
11045 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
11046 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
11047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1093011048 /* end confdefs.h. */
1093111049
1093211050 int
1093911057 _ACEOF
1094011058 if ac_fn_c_try_link "$LINENO"; then :
1094111059 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10942 shlibpath_overrides_runpath=yes
11060 lt_cv_shlibpath_overrides_runpath=yes
1094311061 fi
1094411062 fi
1094511063 rm -f core conftest.err conftest.$ac_objext \
1094611064 conftest$ac_exeext conftest.$ac_ext
10947 LDFLAGS=$save_LDFLAGS
10948 libdir=$save_libdir
11065 LDFLAGS=$save_LDFLAGS
11066 libdir=$save_libdir
11067
11068 fi
11069
11070 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
1094911071
1095011072 # This implies no fast_install, which is unacceptable.
1095111073 # Some rework will be needed to allow for fast_install
1095211074 # before this can be enabled.
1095311075 hardcode_into_libs=yes
1095411076
11077 # Add ABI-specific directories to the system library path.
11078 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
11079
1095511080 # Append ld.so.conf contents to the search path
1095611081 if test -f /etc/ld.so.conf; then
10957 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10958 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11082 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
11083 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
11084
1095911085 fi
1096011086
1096111087 # We used to test for /lib/ld.so.1 and disable shared libraries on
1096511091 # people can always --disable-shared, the test was removed, and we
1096611092 # assume the GNU/Linux dynamic linker is in use.
1096711093 dynamic_linker='GNU/Linux ld.so'
10968 ;;
10969
10970 netbsdelf*-gnu)
10971 version_type=linux
10972 need_lib_prefix=no
10973 need_version=no
10974 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10975 soname_spec='${libname}${release}${shared_ext}$major'
10976 shlibpath_var=LD_LIBRARY_PATH
10977 shlibpath_overrides_runpath=no
10978 hardcode_into_libs=yes
10979 dynamic_linker='NetBSD ld.elf_so'
1098011094 ;;
1098111095
1098211096 netbsd*)
1126911383
1127011384
1127111385
11386
11387
11388
11389
11390
1127211391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
1127311392 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
1127411393 hardcode_action=
1134111460 # if libdl is installed we need to link against it
1134211461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1134311462 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11344 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11463 if ${ac_cv_lib_dl_dlopen+:} false; then :
1134511464 $as_echo_n "(cached) " >&6
1134611465 else
1134711466 ac_check_lib_save_LIBS=$LIBS
1137511494 fi
1137611495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1137711496 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11378 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
11497 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
1137911498 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
1138011499 else
1138111500
1138911508
1139011509 *)
1139111510 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
11392 if test "x$ac_cv_func_shl_load" = x""yes; then :
11511 if test "x$ac_cv_func_shl_load" = xyes; then :
1139311512 lt_cv_dlopen="shl_load"
1139411513 else
1139511514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
1139611515 $as_echo_n "checking for shl_load in -ldld... " >&6; }
11397 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
11516 if ${ac_cv_lib_dld_shl_load+:} false; then :
1139811517 $as_echo_n "(cached) " >&6
1139911518 else
1140011519 ac_check_lib_save_LIBS=$LIBS
1142811547 fi
1142911548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
1143011549 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
11431 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
11550 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
1143211551 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
1143311552 else
1143411553 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11435 if test "x$ac_cv_func_dlopen" = x""yes; then :
11554 if test "x$ac_cv_func_dlopen" = xyes; then :
1143611555 lt_cv_dlopen="dlopen"
1143711556 else
1143811557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1143911558 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11440 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11559 if ${ac_cv_lib_dl_dlopen+:} false; then :
1144111560 $as_echo_n "(cached) " >&6
1144211561 else
1144311562 ac_check_lib_save_LIBS=$LIBS
1147111590 fi
1147211591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1147311592 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11474 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
11593 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
1147511594 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
1147611595 else
1147711596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
1147811597 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
11479 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
11598 if ${ac_cv_lib_svld_dlopen+:} false; then :
1148011599 $as_echo_n "(cached) " >&6
1148111600 else
1148211601 ac_check_lib_save_LIBS=$LIBS
1151011629 fi
1151111630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
1151211631 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
11513 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
11632 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
1151411633 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
1151511634 else
1151611635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
1151711636 $as_echo_n "checking for dld_link in -ldld... " >&6; }
11518 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
11637 if ${ac_cv_lib_dld_dld_link+:} false; then :
1151911638 $as_echo_n "(cached) " >&6
1152011639 else
1152111640 ac_check_lib_save_LIBS=$LIBS
1154911668 fi
1155011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
1155111670 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
11552 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
11671 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
1155311672 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
1155411673 fi
1155511674
1159011709
1159111710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
1159211711 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
11593 if test "${lt_cv_dlopen_self+set}" = set; then :
11712 if ${lt_cv_dlopen_self+:} false; then :
1159411713 $as_echo_n "(cached) " >&6
1159511714 else
1159611715 if test "$cross_compiling" = yes; then :
1159911718 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1160011719 lt_status=$lt_dlunknown
1160111720 cat > conftest.$ac_ext <<_LT_EOF
11602 #line 11603 "configure"
11721 #line $LINENO "configure"
1160311722 #include "confdefs.h"
1160411723
1160511724 #if HAVE_DLFCN_H
1164011759 # endif
1164111760 #endif
1164211761
11643 void fnord() { int i=42;}
11762 /* When -fvisbility=hidden is used, assume the code has been annotated
11763 correspondingly for the symbols needed. */
11764 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11765 int fnord () __attribute__((visibility("default")));
11766 #endif
11767
11768 int fnord () { return 42; }
1164411769 int main ()
1164511770 {
1164611771 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1164911774 if (self)
1165011775 {
1165111776 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11652 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11777 else
11778 {
11779 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11780 else puts (dlerror ());
11781 }
1165311782 /* dlclose (self); */
1165411783 }
1165511784 else
1168611815 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1168711816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
1168811817 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11689 if test "${lt_cv_dlopen_self_static+set}" = set; then :
11818 if ${lt_cv_dlopen_self_static+:} false; then :
1169011819 $as_echo_n "(cached) " >&6
1169111820 else
1169211821 if test "$cross_compiling" = yes; then :
1169511824 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1169611825 lt_status=$lt_dlunknown
1169711826 cat > conftest.$ac_ext <<_LT_EOF
11698 #line 11699 "configure"
11827 #line $LINENO "configure"
1169911828 #include "confdefs.h"
1170011829
1170111830 #if HAVE_DLFCN_H
1173611865 # endif
1173711866 #endif
1173811867
11739 void fnord() { int i=42;}
11868 /* When -fvisbility=hidden is used, assume the code has been annotated
11869 correspondingly for the symbols needed. */
11870 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11871 int fnord () __attribute__((visibility("default")));
11872 #endif
11873
11874 int fnord () { return 42; }
1174011875 int main ()
1174111876 {
1174211877 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1174511880 if (self)
1174611881 {
1174711882 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11748 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11883 else
11884 {
11885 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11886 else puts (dlerror ());
11887 }
1174911888 /* dlclose (self); */
1175011889 }
1175111890 else
1190312042 CC="$lt_save_CC"
1190412043
1190512044
11906 ac_ext=cpp
11907 ac_cpp='$CXXCPP $CPPFLAGS'
11908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11911
11912 archive_cmds_need_lc_CXX=no
11913 allow_undefined_flag_CXX=
11914 always_export_symbols_CXX=no
11915 archive_expsym_cmds_CXX=
11916 compiler_needs_object_CXX=no
11917 export_dynamic_flag_spec_CXX=
11918 hardcode_direct_CXX=no
11919 hardcode_direct_absolute_CXX=no
11920 hardcode_libdir_flag_spec_CXX=
11921 hardcode_libdir_flag_spec_ld_CXX=
11922 hardcode_libdir_separator_CXX=
11923 hardcode_minus_L_CXX=no
11924 hardcode_shlibpath_var_CXX=unsupported
11925 hardcode_automatic_CXX=no
11926 inherit_rpath_CXX=no
11927 module_cmds_CXX=
11928 module_expsym_cmds_CXX=
11929 link_all_deplibs_CXX=unknown
11930 old_archive_cmds_CXX=$old_archive_cmds
11931 no_undefined_flag_CXX=
11932 whole_archive_flag_spec_CXX=
11933 enable_shared_with_static_runtimes_CXX=no
11934
11935 # Source file extension for C++ test sources.
11936 ac_ext=cpp
11937
11938 # Object file extension for compiled C++ test sources.
11939 objext=o
11940 objext_CXX=$objext
11941
11942 # No sense in running all these tests if we already determined that
11943 # the CXX compiler isn't working. Some variables (like enable_shared)
11944 # are currently assumed to apply to all compilers on this platform,
11945 # and will be corrupted by setting them based on a non-working compiler.
11946 if test "$_lt_caught_CXX_error" != yes; then
11947 # Code to be used in simple compile tests
11948 lt_simple_compile_test_code="int some_variable = 0;"
11949
11950 # Code to be used in simple link tests
11951 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
11952
11953 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11954
11955
11956
11957
11958
11959
11960 # If no C compiler was specified, use CC.
11961 LTCC=${LTCC-"$CC"}
11962
11963 # If no C compiler flags were specified, use CFLAGS.
11964 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11965
11966 # Allow CC to be a program name with arguments.
11967 compiler=$CC
11968
11969
11970 # save warnings/boilerplate of simple test code
11971 ac_outfile=conftest.$ac_objext
11972 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11973 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11974 _lt_compiler_boilerplate=`cat conftest.err`
11975 $RM conftest*
11976
11977 ac_outfile=conftest.$ac_objext
11978 echo "$lt_simple_link_test_code" >conftest.$ac_ext
11979 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11980 _lt_linker_boilerplate=`cat conftest.err`
11981 $RM -r conftest*
11982
11983
11984 # Allow CC to be a program name with arguments.
11985 lt_save_CC=$CC
11986 lt_save_LD=$LD
11987 lt_save_GCC=$GCC
11988 GCC=$GXX
11989 lt_save_with_gnu_ld=$with_gnu_ld
11990 lt_save_path_LD=$lt_cv_path_LD
11991 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
11992 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
11993 else
11994 $as_unset lt_cv_prog_gnu_ld
11995 fi
11996 if test -n "${lt_cv_path_LDCXX+set}"; then
11997 lt_cv_path_LD=$lt_cv_path_LDCXX
11998 else
11999 $as_unset lt_cv_path_LD
12000 fi
12001 test -z "${LDCXX+set}" || LD=$LDCXX
12002 CC=${CXX-"c++"}
12003 compiler=$CC
12004 compiler_CXX=$CC
12005 for cc_temp in $compiler""; do
12006 case $cc_temp in
12007 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
12008 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
12009 \-*) ;;
12010 *) break;;
12011 esac
12012 done
12013 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
12014
12015
12016 if test -n "$compiler"; then
12017 # We don't want -fno-exception when compiling C++ code, so set the
12018 # no_builtin_flag separately
12019 if test "$GXX" = yes; then
12020 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
12021 else
12022 lt_prog_compiler_no_builtin_flag_CXX=
12023 fi
12024
12025 if test "$GXX" = yes; then
12026 # Set up default GNU C++ configuration
12027
12028
12029
12030 # Check whether --with-gnu-ld was given.
12031 if test "${with_gnu_ld+set}" = set; then :
12032 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12033 else
12034 with_gnu_ld=no
12035 fi
12036
12037 ac_prog=ld
12038 if test "$GCC" = yes; then
12039 # Check if gcc -print-prog-name=ld gives a path.
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12041 $as_echo_n "checking for ld used by $CC... " >&6; }
12042 case $host in
12043 *-*-mingw*)
12044 # gcc leaves a trailing carriage return which upsets mingw
12045 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12046 *)
12047 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12048 esac
12049 case $ac_prog in
12050 # Accept absolute paths.
12051 [\\/]* | ?:[\\/]*)
12052 re_direlt='/[^/][^/]*/\.\./'
12053 # Canonicalize the pathname of ld
12054 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
12055 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
12056 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
12057 done
12058 test -z "$LD" && LD="$ac_prog"
12059 ;;
12060 "")
12061 # If it fails, then pretend we aren't using GCC.
12062 ac_prog=ld
12063 ;;
12064 *)
12065 # If it is relative, then search for the first ld in PATH.
12066 with_gnu_ld=unknown
12067 ;;
12068 esac
12069 elif test "$with_gnu_ld" = yes; then
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12071 $as_echo_n "checking for GNU ld... " >&6; }
12072 else
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12074 $as_echo_n "checking for non-GNU ld... " >&6; }
12075 fi
12076 if test "${lt_cv_path_LD+set}" = set; then :
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056 ac_config_commands="$ac_config_commands libtool"
12057
12058
12059
12060
12061 # Only expand once:
12062
12063
12064
12065
12066 for flag in -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math; do
12067
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $flag flag" >&5
12069 $as_echo_n "checking if $CC supports $flag flag... " >&6; }
12070 if { as_var=`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
1207712071 $as_echo_n "(cached) " >&6
1207812072 else
12079 if test -z "$LD"; then
12080 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12081 for ac_dir in $PATH; do
12082 IFS="$lt_save_ifs"
12083 test -z "$ac_dir" && ac_dir=.
12084 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12085 lt_cv_path_LD="$ac_dir/$ac_prog"
12086 # Check to see if the program is GNU ld. I'd rather use --version,
12087 # but apparently some variants of GNU ld only accept -v.
12088 # Break only if it was the GNU/non-GNU ld that we prefer.
12089 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
12090 *GNU* | *'with BFD'*)
12091 test "$with_gnu_ld" != no && break
12092 ;;
12093 *)
12094 test "$with_gnu_ld" != yes && break
12095 ;;
12096 esac
12097 fi
12098 done
12099 IFS="$lt_save_ifs"
12100 else
12101 lt_cv_path_LD="$LD" # Let the user override the test with a path.
12102 fi
12103 fi
12104
12105 LD="$lt_cv_path_LD"
12106 if test -n "$LD"; then
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12108 $as_echo "$LD" >&6; }
12109 else
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12111 $as_echo "no" >&6; }
12112 fi
12113 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12115 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12116 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
12073
12074 if { as_var=`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
1211712075 $as_echo_n "(cached) " >&6
1211812076 else
12119 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12120 case `$LD -v 2>&1 </dev/null` in
12121 *GNU* | *'with BFD'*)
12122 lt_cv_prog_gnu_ld=yes
12123 ;;
12124 *)
12125 lt_cv_prog_gnu_ld=no
12126 ;;
12127 esac
12128 fi
12129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
12130 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
12131 with_gnu_ld=$lt_cv_prog_gnu_ld
12132
12133
12134
12135
12136
12137
12138
12139 # Check if GNU C++ uses GNU ld as the underlying linker, since the
12140 # archiving commands below assume that GNU ld is being used.
12141 if test "$with_gnu_ld" = yes; then
12142 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12143 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12144
12145 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12146 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12147
12148 # If archive_cmds runs LD, not CC, wlarc should be empty
12149 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
12150 # investigate it a little bit more. (MM)
12151 wlarc='${wl}'
12152
12153 # ancient GNU ld didn't support --whole-archive et. al.
12154 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
12155 $GREP 'no-whole-archive' > /dev/null; then
12156 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
12157 else
12158 whole_archive_flag_spec_CXX=
12159 fi
12160 else
12161 with_gnu_ld=no
12162 wlarc=
12163
12164 # A generic and very simple default shared library creation
12165 # command for GNU C++ for the case where it uses the native
12166 # linker, instead of GNU ld. If possible, this setting should
12167 # overridden to take advantage of the native linker features on
12168 # the platform it is being used on.
12169 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
12170 fi
12171
12172 # Commands to make compiler produce verbose output that lists
12173 # what "hidden" libraries, object files and flags are used when
12174 # linking a shared library.
12175 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
12176
12177 else
12178 GXX=no
12179 with_gnu_ld=no
12180 wlarc=
12181 fi
12182
12183 # PORTME: fill in a description of your system's C++ link characteristics
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12185 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12186 ld_shlibs_CXX=yes
12187 case $host_os in
12188 aix3*)
12189 # FIXME: insert proper C++ library support
12190 ld_shlibs_CXX=no
12191 ;;
12192 aix[4-9]*)
12193 if test "$host_cpu" = ia64; then
12194 # On IA64, the linker does run time linking by default, so we don't
12195 # have to do anything special.
12196 aix_use_runtimelinking=no
12197 exp_sym_flag='-Bexport'
12198 no_entry_flag=""
12199 else
12200 aix_use_runtimelinking=no
12201
12202 # Test if we are trying to use run time linking or normal
12203 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
12204 # need to do runtime linking.
12205 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12206 for ld_flag in $LDFLAGS; do
12207 case $ld_flag in
12208 *-brtl*)
12209 aix_use_runtimelinking=yes
12210 break
12211 ;;
12212 esac
12213 done
12214 ;;
12215 esac
12216
12217 exp_sym_flag='-bexport'
12218 no_entry_flag='-bnoentry'
12219 fi
12220
12221 # When large executables or shared objects are built, AIX ld can
12222 # have problems creating the table of contents. If linking a library
12223 # or program results in "error TOC overflow" add -mminimal-toc to
12224 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
12225 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12226
12227 archive_cmds_CXX=''
12228 hardcode_direct_CXX=yes
12229 hardcode_direct_absolute_CXX=yes
12230 hardcode_libdir_separator_CXX=':'
12231 link_all_deplibs_CXX=yes
12232 file_list_spec_CXX='${wl}-f,'
12233
12234 if test "$GXX" = yes; then
12235 case $host_os in aix4.[012]|aix4.[012].*)
12236 # We only want to do this on AIX 4.2 and lower, the check
12237 # below for broken collect2 doesn't work under 4.3+
12238 collect2name=`${CC} -print-prog-name=collect2`
12239 if test -f "$collect2name" &&
12240 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12241 then
12242 # We have reworked collect2
12243 :
12244 else
12245 # We have old collect2
12246 hardcode_direct_CXX=unsupported
12247 # It fails to find uninstalled libraries when the uninstalled
12248 # path is not listed in the libpath. Setting hardcode_minus_L
12249 # to unsupported forces relinking
12250 hardcode_minus_L_CXX=yes
12251 hardcode_libdir_flag_spec_CXX='-L$libdir'
12252 hardcode_libdir_separator_CXX=
12253 fi
12254 esac
12255 shared_flag='-shared'
12256 if test "$aix_use_runtimelinking" = yes; then
12257 shared_flag="$shared_flag "'${wl}-G'
12258 fi
12259 else
12260 # not using gcc
12261 if test "$host_cpu" = ia64; then
12262 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12263 # chokes on -Wl,-G. The following line is correct:
12264 shared_flag='-G'
12265 else
12266 if test "$aix_use_runtimelinking" = yes; then
12267 shared_flag='${wl}-G'
12268 else
12269 shared_flag='${wl}-bM:SRE'
12270 fi
12271 fi
12272 fi
12273
12274 export_dynamic_flag_spec_CXX='${wl}-bexpall'
12275 # It seems that -bexpall does not export symbols beginning with
12276 # underscore (_), so it is better to generate a list of symbols to
12277 # export.
12278 always_export_symbols_CXX=yes
12279 if test "$aix_use_runtimelinking" = yes; then
12280 # Warning - without using the other runtime loading flags (-brtl),
12281 # -berok will link without error, but may produce a broken library.
12282 allow_undefined_flag_CXX='-berok'
12283 # Determine the default libpath from the value encoded in an empty
12284 # executable.
12285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 ac_save_CFLAGS="$CFLAGS"
12078 CFLAGS="$CFLAGS $flag"
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1228612080 /* end confdefs.h. */
12287
12288 int
12289 main ()
12290 {
12291
12292 ;
12293 return 0;
12294 }
12081 int main() { return 0; }
1229512082 _ACEOF
12296 if ac_fn_cxx_try_link "$LINENO"; then :
12297
12298 lt_aix_libpath_sed='
12299 /Import File Strings/,/^$/ {
12300 /^0/ {
12301 s/^0 *\(.*\)$/\1/
12302 p
12303 }
12304 }'
12305 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12306 # Check for a 64-bit object if we didn't find anything.
12307 if test -z "$aix_libpath"; then
12308 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12309 fi
12083 if ac_fn_c_try_link "$LINENO"; then :
12084 eval "`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`='yes'"
12085 else
12086 eval "`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`='no'"
1231012087 fi
1231112088 rm -f core conftest.err conftest.$ac_objext \
1231212089 conftest$ac_exeext conftest.$ac_ext
12313 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
12314
12315 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
12316
12317 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
12318 else
12319 if test "$host_cpu" = ia64; then
12320 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
12321 allow_undefined_flag_CXX="-z nodefs"
12322 archive_expsym_cmds_CXX="\$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"
12323 else
12324 # Determine the default libpath from the value encoded in an
12325 # empty executable.
12326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327 /* end confdefs.h. */
12328
12329 int
12330 main ()
12331 {
12332
12333 ;
12334 return 0;
12335 }
12336 _ACEOF
12337 if ac_fn_cxx_try_link "$LINENO"; then :
12338
12339 lt_aix_libpath_sed='
12340 /Import File Strings/,/^$/ {
12341 /^0/ {
12342 s/^0 *\(.*\)$/\1/
12343 p
12344 }
12345 }'
12346 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12347 # Check for a 64-bit object if we didn't find anything.
12348 if test -z "$aix_libpath"; then
12349 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12350 fi
12351 fi
12352 rm -f core conftest.err conftest.$ac_objext \
12353 conftest$ac_exeext conftest.$ac_ext
12354 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
12355
12356 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
12357 # Warning - without using the other run time loading flags,
12358 # -berok will link without error, but may produce a broken library.
12359 no_undefined_flag_CXX=' ${wl}-bernotok'
12360 allow_undefined_flag_CXX=' ${wl}-berok'
12361 # Exported symbols can be pulled into shared objects from archives
12362 whole_archive_flag_spec_CXX='$convenience'
12363 archive_cmds_need_lc_CXX=yes
12364 # This is similar to how AIX traditionally builds its shared
12365 # libraries.
12366 archive_expsym_cmds_CXX="\$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'
12367 fi
12368 fi
12369 ;;
12370
12371 beos*)
12372 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12373 allow_undefined_flag_CXX=unsupported
12374 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12375 # support --undefined. This deserves some investigation. FIXME
12376 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12377 else
12378 ld_shlibs_CXX=no
12379 fi
12380 ;;
12381
12382 chorus*)
12383 case $cc_basename in
12384 *)
12385 # FIXME: insert proper C++ library support
12386 ld_shlibs_CXX=no
12387 ;;
12388 esac
12389 ;;
12390
12391 cygwin* | mingw* | pw32* | cegcc*)
12392 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
12393 # as there is no search path for DLLs.
12394 hardcode_libdir_flag_spec_CXX='-L$libdir'
12395 allow_undefined_flag_CXX=unsupported
12396 always_export_symbols_CXX=no
12397 enable_shared_with_static_runtimes_CXX=yes
12398
12399 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12400 archive_cmds_CXX='$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'
12401 # If the export-symbols file already is a .def file (1st line
12402 # is EXPORTS), use it as is; otherwise, prepend...
12403 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
12404 cp $export_symbols $output_objdir/$soname.def;
12405 else
12406 echo EXPORTS > $output_objdir/$soname.def;
12407 cat $export_symbols >> $output_objdir/$soname.def;
12408 fi~
12409 $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'
12410 else
12411 ld_shlibs_CXX=no
12412 fi
12413 ;;
12414 darwin* | rhapsody*)
12415
12416
12417 archive_cmds_need_lc_CXX=no
12418 hardcode_direct_CXX=no
12419 hardcode_automatic_CXX=yes
12420 hardcode_shlibpath_var_CXX=unsupported
12421 whole_archive_flag_spec_CXX=''
12422 link_all_deplibs_CXX=yes
12423 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
12424 case $cc_basename in
12425 ifort*) _lt_dar_can_shared=yes ;;
12426 *) _lt_dar_can_shared=$GCC ;;
12427 esac
12428 if test "$_lt_dar_can_shared" = "yes"; then
12429 output_verbose_link_cmd=echo
12430 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
12431 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
12432 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
12433 module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
12434 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
12435 archive_cmds_CXX="\$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${_lt_dsymutil}"
12436 archive_expsym_cmds_CXX="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
12437 fi
12438
12439 else
12440 ld_shlibs_CXX=no
12441 fi
12442
12443 ;;
12444
12445 dgux*)
12446 case $cc_basename in
12447 ec++*)
12448 # FIXME: insert proper C++ library support
12449 ld_shlibs_CXX=no
12450 ;;
12451 ghcx*)
12452 # Green Hills C++ Compiler
12453 # FIXME: insert proper C++ library support
12454 ld_shlibs_CXX=no
12455 ;;
12456 *)
12457 # FIXME: insert proper C++ library support
12458 ld_shlibs_CXX=no
12459 ;;
12460 esac
12461 ;;
12462
12463 freebsd[12]*)
12464 # C++ shared libraries reported to be fairly broken before
12465 # switch to ELF
12466 ld_shlibs_CXX=no
12467 ;;
12468
12469 freebsd-elf*)
12470 archive_cmds_need_lc_CXX=no
12471 ;;
12472
12473 freebsd* | dragonfly*)
12474 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
12475 # conventions
12476 ld_shlibs_CXX=yes
12477 ;;
12478
12479 gnu*)
12480 ;;
12481
12482 hpux9*)
12483 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
12484 hardcode_libdir_separator_CXX=:
12485 export_dynamic_flag_spec_CXX='${wl}-E'
12486 hardcode_direct_CXX=yes
12487 hardcode_minus_L_CXX=yes # Not in the search PATH,
12488 # but as the default
12489 # location of the library.
12490
12491 case $cc_basename in
12492 CC*)
12493 # FIXME: insert proper C++ library support
12494 ld_shlibs_CXX=no
12495 ;;
12496 aCC*)
12497 archive_cmds_CXX='$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'
12498 # Commands to make compiler produce verbose output that lists
12499 # what "hidden" libraries, object files and flags are used when
12500 # linking a shared library.
12501 #
12502 # There doesn't appear to be a way to prevent this compiler from
12503 # explicitly linking system object files so we need to strip them
12504 # from the output so that they don't get included in the library
12505 # dependencies.
12506 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
12507 ;;
12508 *)
12509 if test "$GXX" = yes; then
12510 archive_cmds_CXX='$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'
12511 else
12512 # FIXME: insert proper C++ library support
12513 ld_shlibs_CXX=no
12514 fi
12515 ;;
12516 esac
12517 ;;
12518
12519 hpux10*|hpux11*)
12520 if test $with_gnu_ld = no; then
12521 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
12522 hardcode_libdir_separator_CXX=:
12523
12524 case $host_cpu in
12525 hppa*64*|ia64*)
12526 ;;
12527 *)
12528 export_dynamic_flag_spec_CXX='${wl}-E'
12529 ;;
12530 esac
12531 fi
12532 case $host_cpu in
12533 hppa*64*|ia64*)
12534 hardcode_direct_CXX=no
12535 hardcode_shlibpath_var_CXX=no
12536 ;;
12537 *)
12538 hardcode_direct_CXX=yes
12539 hardcode_direct_absolute_CXX=yes
12540 hardcode_minus_L_CXX=yes # Not in the search PATH,
12541 # but as the default
12542 # location of the library.
12543 ;;
12544 esac
12545
12546 case $cc_basename in
12547 CC*)
12548 # FIXME: insert proper C++ library support
12549 ld_shlibs_CXX=no
12550 ;;
12551 aCC*)
12552 case $host_cpu in
12553 hppa*64*)
12554 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12555 ;;
12556 ia64*)
12557 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12558 ;;
12559 *)
12560 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12561 ;;
12562 esac
12563 # Commands to make compiler produce verbose output that lists
12564 # what "hidden" libraries, object files and flags are used when
12565 # linking a shared library.
12566 #
12567 # There doesn't appear to be a way to prevent this compiler from
12568 # explicitly linking system object files so we need to strip them
12569 # from the output so that they don't get included in the library
12570 # dependencies.
12571 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 "X$list" | $Xsed'
12572 ;;
12573 *)
12574 if test "$GXX" = yes; then
12575 if test $with_gnu_ld = no; then
12576 case $host_cpu in
12577 hppa*64*)
12578 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12579 ;;
12580 ia64*)
12581 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12582 ;;
12583 *)
12584 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12585 ;;
12586 esac
12587 fi
12588 else
12589 # FIXME: insert proper C++ library support
12590 ld_shlibs_CXX=no
12591 fi
12592 ;;
12593 esac
12594 ;;
12595
12596 interix[3-9]*)
12597 hardcode_direct_CXX=no
12598 hardcode_shlibpath_var_CXX=no
12599 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12600 export_dynamic_flag_spec_CXX='${wl}-E'
12601 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12602 # Instead, shared libraries are loaded at an image base (0x10000000 by
12603 # default) and relocated if they conflict, which is a slow very memory
12604 # consuming and fragmenting process. To avoid this, we pick a random,
12605 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12606 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
12607 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12608 archive_expsym_cmds_CXX='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'
12609 ;;
12610 irix5* | irix6*)
12611 case $cc_basename in
12612 CC*)
12613 # SGI C++
12614 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
12615
12616 # Archives containing C++ object files must be created using
12617 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
12618 # necessary to make sure instantiated templates are included
12619 # in the archive.
12620 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
12621 ;;
12622 *)
12623 if test "$GXX" = yes; then
12624 if test "$with_gnu_ld" = no; then
12625 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12626 else
12627 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
12628 fi
12629 fi
12630 link_all_deplibs_CXX=yes
12631 ;;
12632 esac
12633 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12634 hardcode_libdir_separator_CXX=:
12635 inherit_rpath_CXX=yes
12636 ;;
12637
12638 linux* | k*bsd*-gnu | kopensolaris*-gnu)
12639 case $cc_basename in
12640 KCC*)
12641 # Kuck and Associates, Inc. (KAI) C++ Compiler
12642
12643 # KCC will only create a shared library if the output file
12644 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12645 # to its proper name (with version) after linking.
12646 archive_cmds_CXX='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'
12647 archive_expsym_cmds_CXX='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'
12648 # Commands to make compiler produce verbose output that lists
12649 # what "hidden" libraries, object files and flags are used when
12650 # linking a shared library.
12651 #
12652 # There doesn't appear to be a way to prevent this compiler from
12653 # explicitly linking system object files so we need to strip them
12654 # from the output so that they don't get included in the library
12655 # dependencies.
12656 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 "X$list" | $Xsed'
12657
12658 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12659 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12660
12661 # Archives containing C++ object files must be created using
12662 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
12663 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
12664 ;;
12665 icpc* | ecpc* )
12666 # Intel C++
12667 with_gnu_ld=yes
12668 # version 8.0 and above of icpc choke on multiply defined symbols
12669 # if we add $predep_objects and $postdep_objects, however 7.1 and
12670 # earlier do not add the objects themselves.
12671 case `$CC -V 2>&1` in
12672 *"Version 7."*)
12673 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12674 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12675 ;;
12676 *) # Version 8.0 or newer
12677 tmp_idyn=
12678 case $host_cpu in
12679 ia64*) tmp_idyn=' -i_dynamic';;
12680 esac
12681 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12682 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12683 ;;
12684 esac
12685 archive_cmds_need_lc_CXX=no
12686 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12687 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12688 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
12689 ;;
12690 pgCC* | pgcpp*)
12691 # Portland Group C++ compiler
12692 case `$CC -V` in
12693 *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
12694 prelink_cmds_CXX='tpldir=Template.dir~
12695 rm -rf $tpldir~
12696 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
12697 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
12698 old_archive_cmds_CXX='tpldir=Template.dir~
12699 rm -rf $tpldir~
12700 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
12701 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
12702 $RANLIB $oldlib'
12703 archive_cmds_CXX='tpldir=Template.dir~
12704 rm -rf $tpldir~
12705 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
12706 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
12707 archive_expsym_cmds_CXX='tpldir=Template.dir~
12708 rm -rf $tpldir~
12709 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
12710 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
12711 ;;
12712 *) # Version 6 will use weak symbols
12713 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
12714 archive_expsym_cmds_CXX='$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'
12715 ;;
12716 esac
12717
12718 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
12719 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12720 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
12721 ;;
12722 cxx*)
12723 # Compaq C++
12724 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12725 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
12726
12727 runpath_var=LD_RUN_PATH
12728 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
12729 hardcode_libdir_separator_CXX=:
12730
12731 # Commands to make compiler produce verbose output that lists
12732 # what "hidden" libraries, object files and flags are used when
12733 # linking a shared library.
12734 #
12735 # There doesn't appear to be a way to prevent this compiler from
12736 # explicitly linking system object files so we need to strip them
12737 # from the output so that they don't get included in the library
12738 # dependencies.
12739 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
12740 ;;
12741 xl*)
12742 # IBM XL 8.0 on PPC, with GNU ld
12743 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12744 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12745 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12746 if test "x$supports_anon_versioning" = xyes; then
12747 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
12748 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12749 echo "local: *; };" >> $output_objdir/$libname.ver~
12750 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
12751 fi
12752 ;;
12753 *)
12754 case `$CC -V 2>&1 | sed 5q` in
12755 *Sun\ C*)
12756 # Sun C++ 5.9
12757 no_undefined_flag_CXX=' -zdefs'
12758 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12759 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
12760 hardcode_libdir_flag_spec_CXX='-R$libdir'
12761 whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
12762 compiler_needs_object_CXX=yes
12763
12764 # Not sure whether something based on
12765 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
12766 # would be better.
12767 output_verbose_link_cmd='echo'
12768
12769 # Archives containing C++ object files must be created using
12770 # "CC -xar", where "CC" is the Sun C++ compiler. This is
12771 # necessary to make sure instantiated templates are included
12772 # in the archive.
12773 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
12774 ;;
12775 esac
12776 ;;
12777 esac
12778 ;;
12779
12780 lynxos*)
12781 # FIXME: insert proper C++ library support
12782 ld_shlibs_CXX=no
12783 ;;
12784
12785 m88k*)
12786 # FIXME: insert proper C++ library support
12787 ld_shlibs_CXX=no
12788 ;;
12789
12790 mvs*)
12791 case $cc_basename in
12792 cxx*)
12793 # FIXME: insert proper C++ library support
12794 ld_shlibs_CXX=no
12795 ;;
12796 *)
12797 # FIXME: insert proper C++ library support
12798 ld_shlibs_CXX=no
12799 ;;
12800 esac
12801 ;;
12802
12803 netbsd*)
12804 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12805 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
12806 wlarc=
12807 hardcode_libdir_flag_spec_CXX='-R$libdir'
12808 hardcode_direct_CXX=yes
12809 hardcode_shlibpath_var_CXX=no
12810 fi
12811 # Workaround some broken pre-1.5 toolchains
12812 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
12813 ;;
12814
12815 *nto* | *qnx*)
12816 ld_shlibs_CXX=yes
12817 ;;
12818
12819 openbsd2*)
12820 # C++ shared libraries are fairly broken
12821 ld_shlibs_CXX=no
12822 ;;
12823
12824 openbsd*)
12825 if test -f /usr/libexec/ld.so; then
12826 hardcode_direct_CXX=yes
12827 hardcode_shlibpath_var_CXX=no
12828 hardcode_direct_absolute_CXX=yes
12829 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
12830 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12831 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12832 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
12833 export_dynamic_flag_spec_CXX='${wl}-E'
12834 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
12835 fi
12836 output_verbose_link_cmd=echo
12837 else
12838 ld_shlibs_CXX=no
12839 fi
12840 ;;
12841
12842 osf3* | osf4* | osf5*)
12843 case $cc_basename in
12844 KCC*)
12845 # Kuck and Associates, Inc. (KAI) C++ Compiler
12846
12847 # KCC will only create a shared library if the output file
12848 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12849 # to its proper name (with version) after linking.
12850 archive_cmds_CXX='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'
12851
12852 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12853 hardcode_libdir_separator_CXX=:
12854
12855 # Archives containing C++ object files must be created using
12856 # the KAI C++ compiler.
12857 case $host in
12858 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
12859 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
12860 esac
12861 ;;
12862 RCC*)
12863 # Rational C++ 2.4.1
12864 # FIXME: insert proper C++ library support
12865 ld_shlibs_CXX=no
12866 ;;
12867 cxx*)
12868 case $host in
12869 osf3*)
12870 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12871 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
12872 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12873 ;;
12874 *)
12875 allow_undefined_flag_CXX=' -expect_unresolved \*'
12876 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
12877 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
12878 echo "-hidden">> $lib.exp~
12879 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
12880 $RM $lib.exp'
12881 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
12882 ;;
12883 esac
12884
12885 hardcode_libdir_separator_CXX=:
12886
12887 # Commands to make compiler produce verbose output that lists
12888 # what "hidden" libraries, object files and flags are used when
12889 # linking a shared library.
12890 #
12891 # There doesn't appear to be a way to prevent this compiler from
12892 # explicitly linking system object files so we need to strip them
12893 # from the output so that they don't get included in the library
12894 # dependencies.
12895 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
12896 ;;
12897 *)
12898 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12899 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12900 case $host in
12901 osf3*)
12902 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12903 ;;
12904 *)
12905 archive_cmds_CXX='$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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12906 ;;
12907 esac
12908
12909 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12910 hardcode_libdir_separator_CXX=:
12911
12912 # Commands to make compiler produce verbose output that lists
12913 # what "hidden" libraries, object files and flags are used when
12914 # linking a shared library.
12915 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
12916
12917 else
12918 # FIXME: insert proper C++ library support
12919 ld_shlibs_CXX=no
12920 fi
12921 ;;
12922 esac
12923 ;;
12924
12925 psos*)
12926 # FIXME: insert proper C++ library support
12927 ld_shlibs_CXX=no
12928 ;;
12929
12930 sunos4*)
12931 case $cc_basename in
12932 CC*)
12933 # Sun C++ 4.x
12934 # FIXME: insert proper C++ library support
12935 ld_shlibs_CXX=no
12936 ;;
12937 lcc*)
12938 # Lucid
12939 # FIXME: insert proper C++ library support
12940 ld_shlibs_CXX=no
12941 ;;
12942 *)
12943 # FIXME: insert proper C++ library support
12944 ld_shlibs_CXX=no
12945 ;;
12946 esac
12947 ;;
12948
12949 solaris*)
12950 case $cc_basename in
12951 CC*)
12952 # Sun C++ 4.2, 5.x and Centerline C++
12953 archive_cmds_need_lc_CXX=yes
12954 no_undefined_flag_CXX=' -zdefs'
12955 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12956 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12957 $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'
12958
12959 hardcode_libdir_flag_spec_CXX='-R$libdir'
12960 hardcode_shlibpath_var_CXX=no
12961 case $host_os in
12962 solaris2.[0-5] | solaris2.[0-5].*) ;;
12963 *)
12964 # The compiler driver will combine and reorder linker options,
12965 # but understands `-z linker_flag'.
12966 # Supported since Solaris 2.6 (maybe 2.5.1?)
12967 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
12968 ;;
12969 esac
12970 link_all_deplibs_CXX=yes
12971
12972 output_verbose_link_cmd='echo'
12973
12974 # Archives containing C++ object files must be created using
12975 # "CC -xar", where "CC" is the Sun C++ compiler. This is
12976 # necessary to make sure instantiated templates are included
12977 # in the archive.
12978 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
12979 ;;
12980 gcx*)
12981 # Green Hills C++ Compiler
12982 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
12983
12984 # The C++ compiler must be used to create the archive.
12985 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
12986 ;;
12987 *)
12988 # GNU C++ compiler with Solaris linker
12989 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12990 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
12991 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
12992 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
12993 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12994 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
12995
12996 # Commands to make compiler produce verbose output that lists
12997 # what "hidden" libraries, object files and flags are used when
12998 # linking a shared library.
12999 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
13000 else
13001 # g++ 2.7 appears to require `-G' NOT `-shared' on this
13002 # platform.
13003 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
13004 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13005 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
13006
13007 # Commands to make compiler produce verbose output that lists
13008 # what "hidden" libraries, object files and flags are used when
13009 # linking a shared library.
13010 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
13011 fi
13012
13013 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
13014 case $host_os in
13015 solaris2.[0-5] | solaris2.[0-5].*) ;;
13016 *)
13017 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
13018 ;;
13019 esac
13020 fi
13021 ;;
13022 esac
13023 ;;
13024
13025 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13026 no_undefined_flag_CXX='${wl}-z,text'
13027 archive_cmds_need_lc_CXX=no
13028 hardcode_shlibpath_var_CXX=no
13029 runpath_var='LD_RUN_PATH'
13030
13031 case $cc_basename in
13032 CC*)
13033 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13034 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13035 ;;
13036 *)
13037 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13038 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13039 ;;
13040 esac
13041 ;;
13042
13043 sysv5* | sco3.2v5* | sco5v6*)
13044 # Note: We can NOT use -z defs as we might desire, because we do not
13045 # link with -lc, and that would cause any symbols used from libc to
13046 # always be unresolved, which means just about no library would
13047 # ever link correctly. If we're not using GNU ld we use -z text
13048 # though, which does catch some bad symbols but isn't as heavy-handed
13049 # as -z defs.
13050 no_undefined_flag_CXX='${wl}-z,text'
13051 allow_undefined_flag_CXX='${wl}-z,nodefs'
13052 archive_cmds_need_lc_CXX=no
13053 hardcode_shlibpath_var_CXX=no
13054 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
13055 hardcode_libdir_separator_CXX=':'
13056 link_all_deplibs_CXX=yes
13057 export_dynamic_flag_spec_CXX='${wl}-Bexport'
13058 runpath_var='LD_RUN_PATH'
13059
13060 case $cc_basename in
13061 CC*)
13062 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13063 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13064 ;;
13065 *)
13066 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13067 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13068 ;;
13069 esac
13070 ;;
13071
13072 tandem*)
13073 case $cc_basename in
13074 NCC*)
13075 # NonStop-UX NCC 3.20
13076 # FIXME: insert proper C++ library support
13077 ld_shlibs_CXX=no
13078 ;;
13079 *)
13080 # FIXME: insert proper C++ library support
13081 ld_shlibs_CXX=no
13082 ;;
13083 esac
13084 ;;
13085
13086 vxworks*)
13087 # FIXME: insert proper C++ library support
13088 ld_shlibs_CXX=no
13089 ;;
13090
13091 *)
13092 # FIXME: insert proper C++ library support
13093 ld_shlibs_CXX=no
13094 ;;
13095 esac
13096
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
13098 $as_echo "$ld_shlibs_CXX" >&6; }
13099 test "$ld_shlibs_CXX" = no && can_build_shared=no
13100
13101 GCC_CXX="$GXX"
13102 LD_CXX="$LD"
13103
13104 ## CAVEAT EMPTOR:
13105 ## There is no encapsulation within the following macros, do not change
13106 ## the running order or otherwise move them around unless you know exactly
13107 ## what you are doing...
13108 # Dependencies to place before and after the object being linked:
13109 predep_objects_CXX=
13110 postdep_objects_CXX=
13111 predeps_CXX=
13112 postdeps_CXX=
13113 compiler_lib_search_path_CXX=
13114
13115 cat > conftest.$ac_ext <<_LT_EOF
13116 class Foo
13117 {
13118 public:
13119 Foo (void) { a = 0; }
13120 private:
13121 int a;
13122 };
13123 _LT_EOF
13124
13125 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13126 (eval $ac_compile) 2>&5
13127 ac_status=$?
13128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13129 test $ac_status = 0; }; then
13130 # Parse the compiler output and extract the necessary
13131 # objects, libraries and library flags.
13132
13133 # Sentinel used to keep track of whether or not we are before
13134 # the conftest object file.
13135 pre_test_object_deps_done=no
13136
13137 for p in `eval "$output_verbose_link_cmd"`; do
13138 case $p in
13139
13140 -L* | -R* | -l*)
13141 # Some compilers place space between "-{L,R}" and the path.
13142 # Remove the space.
13143 if test $p = "-L" ||
13144 test $p = "-R"; then
13145 prev=$p
13146 continue
13147 else
13148 prev=
13149 fi
13150
13151 if test "$pre_test_object_deps_done" = no; then
13152 case $p in
13153 -L* | -R*)
13154 # Internal compiler library paths should come after those
13155 # provided the user. The postdeps already come after the
13156 # user supplied libs so there is no need to process them.
13157 if test -z "$compiler_lib_search_path_CXX"; then
13158 compiler_lib_search_path_CXX="${prev}${p}"
13159 else
13160 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
13161 fi
13162 ;;
13163 # The "-l" case would never come before the object being
13164 # linked, so don't bother handling this case.
13165 esac
13166 else
13167 if test -z "$postdeps_CXX"; then
13168 postdeps_CXX="${prev}${p}"
13169 else
13170 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
13171 fi
13172 fi
13173 ;;
13174
13175 *.$objext)
13176 # This assumes that the test object file only shows up
13177 # once in the compiler output.
13178 if test "$p" = "conftest.$objext"; then
13179 pre_test_object_deps_done=yes
13180 continue
13181 fi
13182
13183 if test "$pre_test_object_deps_done" = no; then
13184 if test -z "$predep_objects_CXX"; then
13185 predep_objects_CXX="$p"
13186 else
13187 predep_objects_CXX="$predep_objects_CXX $p"
13188 fi
13189 else
13190 if test -z "$postdep_objects_CXX"; then
13191 postdep_objects_CXX="$p"
13192 else
13193 postdep_objects_CXX="$postdep_objects_CXX $p"
13194 fi
13195 fi
13196 ;;
13197
13198 *) ;; # Ignore the rest.
13199
13200 esac
12090 CFLAGS="$ac_save_CFLAGS"
12091
12092 fi
12093
12094
12095 if eval test x$`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh` = xyes; then :
12096
12097 fi
12098
12099 fi
12100 eval ac_res=\$`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh`
12101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12102 $as_echo "$ac_res" >&6; }
12103
12104 if eval test x$`$as_echo "cc_cv_cflags_$flag" | $as_tr_sh` = xyes; then :
12105 CFLAGS="$CFLAGS $flag";
12106 fi
12107
1320112108 done
1320212109
13203 # Clean up.
13204 rm -f a.out a.exe
13205 else
13206 echo "libtool.m4: error: problem compiling CXX test program"
13207 fi
13208
13209 $RM -f confest.$objext
13210
13211 # PORTME: override above test on systems where it is broken
13212 case $host_os in
13213 interix[3-9]*)
13214 # Interix 3.5 installs completely hosed .la files for C++, so rather than
13215 # hack all around it, let's just trust "g++" to DTRT.
13216 predep_objects_CXX=
13217 postdep_objects_CXX=
13218 postdeps_CXX=
13219 ;;
13220
13221 linux*)
13222 case `$CC -V 2>&1 | sed 5q` in
13223 *Sun\ C*)
13224 # Sun C++ 5.9
13225
13226 # The more standards-conforming stlport4 library is
13227 # incompatible with the Cstd library. Avoid specifying
13228 # it if it's in CXXFLAGS. Ignore libCrun as
13229 # -library=stlport4 depends on it.
13230 case " $CXX $CXXFLAGS " in
13231 *" -library=stlport4 "*)
13232 solaris_use_stlport4=yes
13233 ;;
13234 esac
13235
13236 if test "$solaris_use_stlport4" != yes; then
13237 postdeps_CXX='-library=Cstd -library=Crun'
13238 fi
13239 ;;
13240 esac
13241 ;;
13242
13243 solaris*)
13244 case $cc_basename in
13245 CC*)
13246 # The more standards-conforming stlport4 library is
13247 # incompatible with the Cstd library. Avoid specifying
13248 # it if it's in CXXFLAGS. Ignore libCrun as
13249 # -library=stlport4 depends on it.
13250 case " $CXX $CXXFLAGS " in
13251 *" -library=stlport4 "*)
13252 solaris_use_stlport4=yes
13253 ;;
13254 esac
13255
13256 # Adding this requires a known-good setup of shared libraries for
13257 # Sun compiler versions before 5.6, else PIC objects from an old
13258 # archive will be linked into the output, leading to subtle bugs.
13259 if test "$solaris_use_stlport4" != yes; then
13260 postdeps_CXX='-library=Cstd -library=Crun'
13261 fi
13262 ;;
13263 esac
13264 ;;
13265 esac
13266
13267
13268 case " $postdeps_CXX " in
13269 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
13270 esac
13271 compiler_lib_search_dirs_CXX=
13272 if test -n "${compiler_lib_search_path_CXX}"; then
13273 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
13274 fi
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306 lt_prog_compiler_wl_CXX=
13307 lt_prog_compiler_pic_CXX=
13308 lt_prog_compiler_static_CXX=
13309
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13311 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
13312
13313 # C++ specific cases for pic, static, wl, etc.
13314 if test "$GXX" = yes; then
13315 lt_prog_compiler_wl_CXX='-Wl,'
13316 lt_prog_compiler_static_CXX='-static'
13317
13318 case $host_os in
13319 aix*)
13320 # All AIX code is PIC.
13321 if test "$host_cpu" = ia64; then
13322 # AIX 5 now supports IA64 processor
13323 lt_prog_compiler_static_CXX='-Bstatic'
13324 fi
13325 ;;
13326
13327 amigaos*)
13328 case $host_cpu in
13329 powerpc)
13330 # see comment about AmigaOS4 .so support
13331 lt_prog_compiler_pic_CXX='-fPIC'
13332 ;;
13333 m68k)
13334 # FIXME: we need at least 68020 code to build shared libraries, but
13335 # adding the `-m68020' flag to GCC prevents building anything better,
13336 # like `-m68040'.
13337 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
13338 ;;
13339 esac
13340 ;;
13341
13342 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13343 # PIC is the default for these OSes.
13344 ;;
13345 mingw* | cygwin* | os2* | pw32* | cegcc*)
13346 # This hack is so that the source file can tell whether it is being
13347 # built for inclusion in a dll (and should export symbols for example).
13348 # Although the cygwin gcc ignores -fPIC, still need this for old-style
13349 # (--disable-auto-import) libraries
13350 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
13351 ;;
13352 darwin* | rhapsody*)
13353 # PIC is the default on this platform
13354 # Common symbols not allowed in MH_DYLIB files
13355 lt_prog_compiler_pic_CXX='-fno-common'
13356 ;;
13357 *djgpp*)
13358 # DJGPP does not support shared libraries at all
13359 lt_prog_compiler_pic_CXX=
13360 ;;
13361 interix[3-9]*)
13362 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13363 # Instead, we relocate shared libraries at runtime.
13364 ;;
13365 sysv4*MP*)
13366 if test -d /usr/nec; then
13367 lt_prog_compiler_pic_CXX=-Kconform_pic
13368 fi
13369 ;;
13370 hpux*)
13371 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
13372 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
13373 # sets the default TLS model and affects inlining.
13374 case $host_cpu in
13375 hppa*64*)
13376 ;;
13377 *)
13378 lt_prog_compiler_pic_CXX='-fPIC'
13379 ;;
13380 esac
13381 ;;
13382 *qnx* | *nto*)
13383 # QNX uses GNU C++, but need to define -shared option too, otherwise
13384 # it will coredump.
13385 lt_prog_compiler_pic_CXX='-fPIC -shared'
13386 ;;
13387 *)
13388 lt_prog_compiler_pic_CXX='-fPIC'
13389 ;;
13390 esac
13391 else
13392 case $host_os in
13393 aix[4-9]*)
13394 # All AIX code is PIC.
13395 if test "$host_cpu" = ia64; then
13396 # AIX 5 now supports IA64 processor
13397 lt_prog_compiler_static_CXX='-Bstatic'
13398 else
13399 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
13400 fi
13401 ;;
13402 chorus*)
13403 case $cc_basename in
13404 cxch68*)
13405 # Green Hills C++ Compiler
13406 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--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"
13407 ;;
13408 esac
13409 ;;
13410 dgux*)
13411 case $cc_basename in
13412 ec++*)
13413 lt_prog_compiler_pic_CXX='-KPIC'
13414 ;;
13415 ghcx*)
13416 # Green Hills C++ Compiler
13417 lt_prog_compiler_pic_CXX='-pic'
13418 ;;
13419 *)
13420 ;;
13421 esac
13422 ;;
13423 freebsd* | dragonfly*)
13424 # FreeBSD uses GNU C++
13425 ;;
13426 hpux9* | hpux10* | hpux11*)
13427 case $cc_basename in
13428 CC*)
13429 lt_prog_compiler_wl_CXX='-Wl,'
13430 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
13431 if test "$host_cpu" != ia64; then
13432 lt_prog_compiler_pic_CXX='+Z'
13433 fi
13434 ;;
13435 aCC*)
13436 lt_prog_compiler_wl_CXX='-Wl,'
13437 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
13438 case $host_cpu in
13439 hppa*64*|ia64*)
13440 # +Z the default
13441 ;;
13442 *)
13443 lt_prog_compiler_pic_CXX='+Z'
13444 ;;
13445 esac
13446 ;;
13447 *)
13448 ;;
13449 esac
13450 ;;
13451 interix*)
13452 # This is c89, which is MS Visual C++ (no shared libs)
13453 # Anyone wants to do a port?
13454 ;;
13455 irix5* | irix6* | nonstopux*)
13456 case $cc_basename in
13457 CC*)
13458 lt_prog_compiler_wl_CXX='-Wl,'
13459 lt_prog_compiler_static_CXX='-non_shared'
13460 # CC pic flag -KPIC is the default.
13461 ;;
13462 *)
13463 ;;
13464 esac
13465 ;;
13466 linux* | k*bsd*-gnu | kopensolaris*-gnu)
13467 case $cc_basename in
13468 KCC*)
13469 # KAI C++ Compiler
13470 lt_prog_compiler_wl_CXX='--backend -Wl,'
13471 lt_prog_compiler_pic_CXX='-fPIC'
13472 ;;
13473 ecpc* )
13474 # old Intel C++ for x86_64 which still supported -KPIC.
13475 lt_prog_compiler_wl_CXX='-Wl,'
13476 lt_prog_compiler_pic_CXX='-KPIC'
13477 lt_prog_compiler_static_CXX='-static'
13478 ;;
13479 icpc* )
13480 # Intel C++, used to be incompatible with GCC.
13481 # ICC 10 doesn't accept -KPIC any more.
13482 lt_prog_compiler_wl_CXX='-Wl,'
13483 lt_prog_compiler_pic_CXX='-fPIC'
13484 lt_prog_compiler_static_CXX='-static'
13485 ;;
13486 pgCC* | pgcpp*)
13487 # Portland Group C++ compiler
13488 lt_prog_compiler_wl_CXX='-Wl,'
13489 lt_prog_compiler_pic_CXX='-fpic'
13490 lt_prog_compiler_static_CXX='-Bstatic'
13491 ;;
13492 cxx*)
13493 # Compaq C++
13494 # Make sure the PIC flag is empty. It appears that all Alpha
13495 # Linux and Compaq Tru64 Unix objects are PIC.
13496 lt_prog_compiler_pic_CXX=
13497 lt_prog_compiler_static_CXX='-non_shared'
13498 ;;
13499 xlc* | xlC*)
13500 # IBM XL 8.0 on PPC
13501 lt_prog_compiler_wl_CXX='-Wl,'
13502 lt_prog_compiler_pic_CXX='-qpic'
13503 lt_prog_compiler_static_CXX='-qstaticlink'
13504 ;;
13505 *)
13506 case `$CC -V 2>&1 | sed 5q` in
13507 *Sun\ C*)
13508 # Sun C++ 5.9
13509 lt_prog_compiler_pic_CXX='-KPIC'
13510 lt_prog_compiler_static_CXX='-Bstatic'
13511 lt_prog_compiler_wl_CXX='-Qoption ld '
13512 ;;
13513 esac
13514 ;;
13515 esac
13516 ;;
13517 lynxos*)
13518 ;;
13519 m88k*)
13520 ;;
13521 mvs*)
13522 case $cc_basename in
13523 cxx*)
13524 lt_prog_compiler_pic_CXX='-W c,exportall'
13525 ;;
13526 *)
13527 ;;
13528 esac
13529 ;;
13530 netbsd* | netbsdelf*-gnu)
13531 ;;
13532 *qnx* | *nto*)
13533 # QNX uses GNU C++, but need to define -shared option too, otherwise
13534 # it will coredump.
13535 lt_prog_compiler_pic_CXX='-fPIC -shared'
13536 ;;
13537 osf3* | osf4* | osf5*)
13538 case $cc_basename in
13539 KCC*)
13540 lt_prog_compiler_wl_CXX='--backend -Wl,'
13541 ;;
13542 RCC*)
13543 # Rational C++ 2.4.1
13544 lt_prog_compiler_pic_CXX='-pic'
13545 ;;
13546 cxx*)
13547 # Digital/Compaq C++
13548 lt_prog_compiler_wl_CXX='-Wl,'
13549 # Make sure the PIC flag is empty. It appears that all Alpha
13550 # Linux and Compaq Tru64 Unix objects are PIC.
13551 lt_prog_compiler_pic_CXX=
13552 lt_prog_compiler_static_CXX='-non_shared'
13553 ;;
13554 *)
13555 ;;
13556 esac
13557 ;;
13558 psos*)
13559 ;;
13560 solaris*)
13561 case $cc_basename in
13562 CC*)
13563 # Sun C++ 4.2, 5.x and Centerline C++
13564 lt_prog_compiler_pic_CXX='-KPIC'
13565 lt_prog_compiler_static_CXX='-Bstatic'
13566 lt_prog_compiler_wl_CXX='-Qoption ld '
13567 ;;
13568 gcx*)
13569 # Green Hills C++ Compiler
13570 lt_prog_compiler_pic_CXX='-PIC'
13571 ;;
13572 *)
13573 ;;
13574 esac
13575 ;;
13576 sunos4*)
13577 case $cc_basename in
13578 CC*)
13579 # Sun C++ 4.x
13580 lt_prog_compiler_pic_CXX='-pic'
13581 lt_prog_compiler_static_CXX='-Bstatic'
13582 ;;
13583 lcc*)
13584 # Lucid
13585 lt_prog_compiler_pic_CXX='-pic'
13586 ;;
13587 *)
13588 ;;
13589 esac
13590 ;;
13591 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13592 case $cc_basename in
13593 CC*)
13594 lt_prog_compiler_wl_CXX='-Wl,'
13595 lt_prog_compiler_pic_CXX='-KPIC'
13596 lt_prog_compiler_static_CXX='-Bstatic'
13597 ;;
13598 esac
13599 ;;
13600 tandem*)
13601 case $cc_basename in
13602 NCC*)
13603 # NonStop-UX NCC 3.20
13604 lt_prog_compiler_pic_CXX='-KPIC'
13605 ;;
13606 *)
13607 ;;
13608 esac
13609 ;;
13610 vxworks*)
13611 ;;
13612 *)
13613 lt_prog_compiler_can_build_shared_CXX=no
13614 ;;
13615 esac
13616 fi
13617
13618 case $host_os in
13619 # For platforms which do not support PIC, -DPIC is meaningless:
13620 *djgpp*)
13621 lt_prog_compiler_pic_CXX=
13622 ;;
13623 *)
13624 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
13625 ;;
13626 esac
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
13628 $as_echo "$lt_prog_compiler_pic_CXX" >&6; }
13629
13630
13631
13632 #
13633 # Check to make sure the PIC flag actually works.
13634 #
13635 if test -n "$lt_prog_compiler_pic_CXX"; then
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
13637 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
13638 if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
13639 $as_echo_n "(cached) " >&6
13640 else
13641 lt_cv_prog_compiler_pic_works_CXX=no
13642 ac_outfile=conftest.$ac_objext
13643 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13644 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
13645 # Insert the option either (1) after the last *FLAGS variable, or
13646 # (2) before a word containing "conftest.", or (3) at the end.
13647 # Note that $ac_compile itself does not contain backslashes and begins
13648 # with a dollar sign (not a hyphen), so the echo should work correctly.
13649 # The option is referenced via a variable to avoid confusing sed.
13650 lt_compile=`echo "$ac_compile" | $SED \
13651 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13652 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13653 -e 's:$: $lt_compiler_flag:'`
13654 (eval echo "\"\$as_me:13655: $lt_compile\"" >&5)
13655 (eval "$lt_compile" 2>conftest.err)
13656 ac_status=$?
13657 cat conftest.err >&5
13658 echo "$as_me:13659: \$? = $ac_status" >&5
13659 if (exit $ac_status) && test -s "$ac_outfile"; then
13660 # The compiler can only warn and ignore the option if not recognized
13661 # So say no if there are warnings other than the usual output.
13662 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
13663 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13664 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13665 lt_cv_prog_compiler_pic_works_CXX=yes
13666 fi
13667 fi
13668 $RM conftest*
13669
13670 fi
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
13672 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
13673
13674 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
13675 case $lt_prog_compiler_pic_CXX in
13676 "" | " "*) ;;
13677 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
13678 esac
13679 else
13680 lt_prog_compiler_pic_CXX=
13681 lt_prog_compiler_can_build_shared_CXX=no
13682 fi
13683
13684 fi
13685
13686
13687
13688 #
13689 # Check to make sure the static flag actually works.
13690 #
13691 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13693 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
13694 if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
13695 $as_echo_n "(cached) " >&6
13696 else
13697 lt_cv_prog_compiler_static_works_CXX=no
13698 save_LDFLAGS="$LDFLAGS"
13699 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13700 echo "$lt_simple_link_test_code" > conftest.$ac_ext
13701 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13702 # The linker can only warn and ignore the option if not recognized
13703 # So say no if there are warnings
13704 if test -s conftest.err; then
13705 # Append any errors to the config.log.
13706 cat conftest.err 1>&5
13707 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
13708 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13709 if diff conftest.exp conftest.er2 >/dev/null; then
13710 lt_cv_prog_compiler_static_works_CXX=yes
13711 fi
13712 else
13713 lt_cv_prog_compiler_static_works_CXX=yes
13714 fi
13715 fi
13716 $RM -r conftest*
13717 LDFLAGS="$save_LDFLAGS"
13718
13719 fi
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
13721 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
13722
13723 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
13724 :
13725 else
13726 lt_prog_compiler_static_CXX=
13727 fi
13728
13729
13730
13731
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13733 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13734 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
13735 $as_echo_n "(cached) " >&6
13736 else
13737 lt_cv_prog_compiler_c_o_CXX=no
13738 $RM -r conftest 2>/dev/null
13739 mkdir conftest
13740 cd conftest
13741 mkdir out
13742 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13743
13744 lt_compiler_flag="-o out/conftest2.$ac_objext"
13745 # Insert the option either (1) after the last *FLAGS variable, or
13746 # (2) before a word containing "conftest.", or (3) at the end.
13747 # Note that $ac_compile itself does not contain backslashes and begins
13748 # with a dollar sign (not a hyphen), so the echo should work correctly.
13749 lt_compile=`echo "$ac_compile" | $SED \
13750 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13751 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13752 -e 's:$: $lt_compiler_flag:'`
13753 (eval echo "\"\$as_me:13754: $lt_compile\"" >&5)
13754 (eval "$lt_compile" 2>out/conftest.err)
13755 ac_status=$?
13756 cat out/conftest.err >&5
13757 echo "$as_me:13758: \$? = $ac_status" >&5
13758 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13759 then
13760 # The compiler can only warn and ignore the option if not recognized
13761 # So say no if there are warnings
13762 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
13763 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13764 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13765 lt_cv_prog_compiler_c_o_CXX=yes
13766 fi
13767 fi
13768 chmod u+w . 2>&5
13769 $RM conftest*
13770 # SGI C++ compiler will create directory out/ii_files/ for
13771 # template instantiation
13772 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13773 $RM out/* && rmdir out
13774 cd ..
13775 $RM -r conftest
13776 $RM conftest*
13777
13778 fi
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
13780 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
13781
13782
13783
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13785 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13786 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
13787 $as_echo_n "(cached) " >&6
13788 else
13789 lt_cv_prog_compiler_c_o_CXX=no
13790 $RM -r conftest 2>/dev/null
13791 mkdir conftest
13792 cd conftest
13793 mkdir out
13794 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13795
13796 lt_compiler_flag="-o out/conftest2.$ac_objext"
13797 # Insert the option either (1) after the last *FLAGS variable, or
13798 # (2) before a word containing "conftest.", or (3) at the end.
13799 # Note that $ac_compile itself does not contain backslashes and begins
13800 # with a dollar sign (not a hyphen), so the echo should work correctly.
13801 lt_compile=`echo "$ac_compile" | $SED \
13802 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13803 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13804 -e 's:$: $lt_compiler_flag:'`
13805 (eval echo "\"\$as_me:13806: $lt_compile\"" >&5)
13806 (eval "$lt_compile" 2>out/conftest.err)
13807 ac_status=$?
13808 cat out/conftest.err >&5
13809 echo "$as_me:13810: \$? = $ac_status" >&5
13810 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13811 then
13812 # The compiler can only warn and ignore the option if not recognized
13813 # So say no if there are warnings
13814 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
13815 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13816 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13817 lt_cv_prog_compiler_c_o_CXX=yes
13818 fi
13819 fi
13820 chmod u+w . 2>&5
13821 $RM conftest*
13822 # SGI C++ compiler will create directory out/ii_files/ for
13823 # template instantiation
13824 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13825 $RM out/* && rmdir out
13826 cd ..
13827 $RM -r conftest
13828 $RM conftest*
13829
13830 fi
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
13832 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
13833
13834
13835
13836
13837 hard_links="nottested"
13838 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
13839 # do not overwrite the value of need_locks provided by the user
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
13841 $as_echo_n "checking if we can lock with hard links... " >&6; }
13842 hard_links=yes
13843 $RM conftest*
13844 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13845 touch conftest.a
13846 ln conftest.a conftest.b 2>&5 || hard_links=no
13847 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
13849 $as_echo "$hard_links" >&6; }
13850 if test "$hard_links" = no; then
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
13852 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
13853 need_locks=warn
13854 fi
13855 else
13856 need_locks=no
13857 fi
13858
13859
13860
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13862 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13863
13864 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13865 case $host_os in
13866 aix[4-9]*)
13867 # If we're using GNU nm, then we don't want the "-C" option.
13868 # -C means demangle to AIX nm, but means don't demangle with GNU nm
13869 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13870 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
13871 else
13872 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
13873 fi
13874 ;;
13875 pw32*)
13876 export_symbols_cmds_CXX="$ltdll_cmds"
13877 ;;
13878 cygwin* | mingw* | cegcc*)
13879 export_symbols_cmds_CXX='$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'
13880 ;;
13881 linux* | k*bsd*-gnu)
13882 link_all_deplibs_CXX=no
13883 ;;
13884 *)
13885 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13886 ;;
13887 esac
13888 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
13889
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
13891 $as_echo "$ld_shlibs_CXX" >&6; }
13892 test "$ld_shlibs_CXX" = no && can_build_shared=no
13893
13894 with_gnu_ld_CXX=$with_gnu_ld
13895
13896
13897
13898
13899
13900
13901 #
13902 # Do we need to explicitly link libc?
13903 #
13904 case "x$archive_cmds_need_lc_CXX" in
13905 x|xyes)
13906 # Assume -lc should be added
13907 archive_cmds_need_lc_CXX=yes
13908
13909 if test "$enable_shared" = yes && test "$GCC" = yes; then
13910 case $archive_cmds_CXX in
13911 *'~'*)
13912 # FIXME: we may have to deal with multi-command sequences.
13913 ;;
13914 '$CC '*)
13915 # Test whether the compiler implicitly links with -lc since on some
13916 # systems, -lgcc has to come before -lc. If gcc already passes -lc
13917 # to ld, don't add -lc before -lgcc.
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13919 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
13920 $RM conftest*
13921 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13922
13923 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13924 (eval $ac_compile) 2>&5
13925 ac_status=$?
13926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13927 test $ac_status = 0; } 2>conftest.err; then
13928 soname=conftest
13929 lib=conftest
13930 libobjs=conftest.$ac_objext
13931 deplibs=
13932 wl=$lt_prog_compiler_wl_CXX
13933 pic_flag=$lt_prog_compiler_pic_CXX
13934 compiler_flags=-v
13935 linker_flags=-v
13936 verstring=
13937 output_objdir=.
13938 libname=conftest
13939 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
13940 allow_undefined_flag_CXX=
13941 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13942 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13943 ac_status=$?
13944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13945 test $ac_status = 0; }
13946 then
13947 archive_cmds_need_lc_CXX=no
13948 else
13949 archive_cmds_need_lc_CXX=yes
13950 fi
13951 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
13952 else
13953 cat conftest.err 1>&5
13954 fi
13955 $RM conftest*
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
13957 $as_echo "$archive_cmds_need_lc_CXX" >&6; }
13958 ;;
13959 esac
13960 fi
13961 ;;
13962 esac
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14028 $as_echo_n "checking dynamic linker characteristics... " >&6; }
14029
14030 library_names_spec=
14031 libname_spec='lib$name'
14032 soname_spec=
14033 shrext_cmds=".so"
14034 postinstall_cmds=
14035 postuninstall_cmds=
14036 finish_cmds=
14037 finish_eval=
14038 shlibpath_var=
14039 shlibpath_overrides_runpath=unknown
14040 version_type=none
14041 dynamic_linker="$host_os ld.so"
14042 sys_lib_dlsearch_path_spec="/lib /usr/lib"
14043 need_lib_prefix=unknown
14044 hardcode_into_libs=no
14045
14046 # when you set need_version to no, make sure it does not cause -set_version
14047 # flags to be left without arguments
14048 need_version=unknown
14049
14050 case $host_os in
14051 aix3*)
14052 version_type=linux
14053 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
14054 shlibpath_var=LIBPATH
14055
14056 # AIX 3 has no versioning support, so we append a major version to the name.
14057 soname_spec='${libname}${release}${shared_ext}$major'
14058 ;;
14059
14060 aix[4-9]*)
14061 version_type=linux
14062 need_lib_prefix=no
14063 need_version=no
14064 hardcode_into_libs=yes
14065 if test "$host_cpu" = ia64; then
14066 # AIX 5 supports IA64
14067 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
14068 shlibpath_var=LD_LIBRARY_PATH
14069 else
14070 # With GCC up to 2.95.x, collect2 would create an import file
14071 # for dependence libraries. The import file would start with
14072 # the line `#! .'. This would cause the generated library to
14073 # depend on `.', always an invalid library. This was fixed in
14074 # development snapshots of GCC prior to 3.0.
14075 case $host_os in
14076 aix4 | aix4.[01] | aix4.[01].*)
14077 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14078 echo ' yes '
14079 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
14080 :
14081 else
14082 can_build_shared=no
14083 fi
14084 ;;
14085 esac
14086 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
14087 # soname into executable. Probably we can add versioning support to
14088 # collect2, so additional links can be useful in future.
14089 if test "$aix_use_runtimelinking" = yes; then
14090 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14091 # instead of lib<name>.a to let people know that these are not
14092 # typical AIX shared libraries.
14093 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14094 else
14095 # We preserve .a as extension for shared libraries through AIX4.2
14096 # and later when we are not doing run time linking.
14097 library_names_spec='${libname}${release}.a $libname.a'
14098 soname_spec='${libname}${release}${shared_ext}$major'
14099 fi
14100 shlibpath_var=LIBPATH
14101 fi
14102 ;;
14103
14104 amigaos*)
14105 case $host_cpu in
14106 powerpc)
14107 # Since July 2007 AmigaOS4 officially supports .so libraries.
14108 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14109 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14110 ;;
14111 m68k)
14112 library_names_spec='$libname.ixlibrary $libname.a'
14113 # Create ${libname}_ixlibrary.a entries in /sys/libs.
14114 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'
14115 ;;
14116 esac
14117 ;;
14118
14119 beos*)
14120 library_names_spec='${libname}${shared_ext}'
14121 dynamic_linker="$host_os ld.so"
14122 shlibpath_var=LIBRARY_PATH
14123 ;;
14124
14125 bsdi[45]*)
14126 version_type=linux
14127 need_version=no
14128 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14129 soname_spec='${libname}${release}${shared_ext}$major'
14130 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14131 shlibpath_var=LD_LIBRARY_PATH
14132 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14133 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14134 # the default ld.so.conf also contains /usr/contrib/lib and
14135 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14136 # libtool to hard-code these into programs
14137 ;;
14138
14139 cygwin* | mingw* | pw32* | cegcc*)
14140 version_type=windows
14141 shrext_cmds=".dll"
14142 need_version=no
14143 need_lib_prefix=no
14144
14145 case $GCC,$host_os in
14146 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
14147 library_names_spec='$libname.dll.a'
14148 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14149 postinstall_cmds='base_file=`basename \${file}`~
14150 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
14151 dldir=$destdir/`dirname \$dlpath`~
14152 test -d \$dldir || mkdir -p \$dldir~
14153 $install_prog $dir/$dlname \$dldir/$dlname~
14154 chmod a+x \$dldir/$dlname~
14155 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14156 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14157 fi'
14158 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14159 dlpath=$dir/\$dldll~
14160 $RM \$dlpath'
14161 shlibpath_overrides_runpath=yes
14162
14163 case $host_os in
14164 cygwin*)
14165 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14166 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14167 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
14168 ;;
14169 mingw* | cegcc*)
14170 # MinGW DLLs use traditional 'lib' prefix
14171 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14172 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
14173 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14174 # It is most probably a Windows format PATH printed by
14175 # mingw gcc, but we are running on Cygwin. Gcc prints its search
14176 # path with ; separators, and with drive letters. We can handle the
14177 # drive letters (cygwin fileutils understands them), so leave them,
14178 # especially as we might pass files found there to a mingw objdump,
14179 # which wouldn't understand a cygwinified path. Ahh.
14180 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14181 else
14182 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14183 fi
14184 ;;
14185 pw32*)
14186 # pw32 DLLs use 'pw' prefix rather than 'lib'
14187 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14188 ;;
14189 esac
14190 ;;
14191
14192 *)
14193 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
14194 ;;
14195 esac
14196 dynamic_linker='Win32 ld.exe'
14197 # FIXME: first we should search . and the directory the executable is in
14198 shlibpath_var=PATH
14199 ;;
14200
14201 darwin* | rhapsody*)
14202 dynamic_linker="$host_os dyld"
14203 version_type=darwin
14204 need_lib_prefix=no
14205 need_version=no
14206 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
14207 soname_spec='${libname}${release}${major}$shared_ext'
14208 shlibpath_overrides_runpath=yes
14209 shlibpath_var=DYLD_LIBRARY_PATH
14210 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14211
14212 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14213 ;;
14214
14215 dgux*)
14216 version_type=linux
14217 need_lib_prefix=no
14218 need_version=no
14219 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
14220 soname_spec='${libname}${release}${shared_ext}$major'
14221 shlibpath_var=LD_LIBRARY_PATH
14222 ;;
14223
14224 freebsd1*)
14225 dynamic_linker=no
14226 ;;
14227
14228 freebsd* | dragonfly*)
14229 # DragonFly does not have aout. When/if they implement a new
14230 # versioning mechanism, adjust this.
14231 if test -x /usr/bin/objformat; then
14232 objformat=`/usr/bin/objformat`
14233 else
14234 case $host_os in
14235 freebsd[123]*) objformat=aout ;;
14236 *) objformat=elf ;;
14237 esac
14238 fi
14239 version_type=freebsd-$objformat
14240 case $version_type in
14241 freebsd-elf*)
14242 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14243 need_version=no
14244 need_lib_prefix=no
14245 ;;
14246 freebsd-*)
14247 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
14248 need_version=yes
14249 ;;
14250 esac
14251 shlibpath_var=LD_LIBRARY_PATH
14252 case $host_os in
14253 freebsd2*)
14254 shlibpath_overrides_runpath=yes
14255 ;;
14256 freebsd3.[01]* | freebsdelf3.[01]*)
14257 shlibpath_overrides_runpath=yes
14258 hardcode_into_libs=yes
14259 ;;
14260 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14261 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14262 shlibpath_overrides_runpath=no
14263 hardcode_into_libs=yes
14264 ;;
14265 *) # from 4.6 on, and DragonFly
14266 shlibpath_overrides_runpath=yes
14267 hardcode_into_libs=yes
14268 ;;
14269 esac
14270 ;;
14271
14272 gnu*)
14273 version_type=linux
14274 need_lib_prefix=no
14275 need_version=no
14276 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
14277 soname_spec='${libname}${release}${shared_ext}$major'
14278 shlibpath_var=LD_LIBRARY_PATH
14279 hardcode_into_libs=yes
14280 ;;
14281
14282 hpux9* | hpux10* | hpux11*)
14283 # Give a soname corresponding to the major version so that dld.sl refuses to
14284 # link against other versions.
14285 version_type=sunos
14286 need_lib_prefix=no
14287 need_version=no
14288 case $host_cpu in
14289 ia64*)
14290 shrext_cmds='.so'
14291 hardcode_into_libs=yes
14292 dynamic_linker="$host_os dld.so"
14293 shlibpath_var=LD_LIBRARY_PATH
14294 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14295 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14296 soname_spec='${libname}${release}${shared_ext}$major'
14297 if test "X$HPUX_IA64_MODE" = X32; then
14298 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14299 else
14300 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14301 fi
14302 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14303 ;;
14304 hppa*64*)
14305 shrext_cmds='.sl'
14306 hardcode_into_libs=yes
14307 dynamic_linker="$host_os dld.sl"
14308 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14309 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14310 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14311 soname_spec='${libname}${release}${shared_ext}$major'
14312 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14313 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14314 ;;
14315 *)
14316 shrext_cmds='.sl'
14317 dynamic_linker="$host_os dld.sl"
14318 shlibpath_var=SHLIB_PATH
14319 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14320 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14321 soname_spec='${libname}${release}${shared_ext}$major'
14322 ;;
14323 esac
14324 # HP-UX runs *really* slowly unless shared libraries are mode 555.
14325 postinstall_cmds='chmod 555 $lib'
14326 ;;
14327
14328 interix[3-9]*)
14329 version_type=linux
14330 need_lib_prefix=no
14331 need_version=no
14332 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
14333 soname_spec='${libname}${release}${shared_ext}$major'
14334 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14335 shlibpath_var=LD_LIBRARY_PATH
14336 shlibpath_overrides_runpath=no
14337 hardcode_into_libs=yes
14338 ;;
14339
14340 irix5* | irix6* | nonstopux*)
14341 case $host_os in
14342 nonstopux*) version_type=nonstopux ;;
14343 *)
14344 if test "$lt_cv_prog_gnu_ld" = yes; then
14345 version_type=linux
14346 else
14347 version_type=irix
14348 fi ;;
14349 esac
14350 need_lib_prefix=no
14351 need_version=no
14352 soname_spec='${libname}${release}${shared_ext}$major'
14353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
14354 case $host_os in
14355 irix5* | nonstopux*)
14356 libsuff= shlibsuff=
14357 ;;
14358 *)
14359 case $LD in # libtool.m4 will add one of these switches to LD
14360 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14361 libsuff= shlibsuff= libmagic=32-bit;;
14362 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14363 libsuff=32 shlibsuff=N32 libmagic=N32;;
14364 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14365 libsuff=64 shlibsuff=64 libmagic=64-bit;;
14366 *) libsuff= shlibsuff= libmagic=never-match;;
14367 esac
14368 ;;
14369 esac
14370 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14371 shlibpath_overrides_runpath=no
14372 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
14373 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
14374 hardcode_into_libs=yes
14375 ;;
14376
14377 # No shared lib support for Linux oldld, aout, or coff.
14378 linux*oldld* | linux*aout* | linux*coff*)
14379 dynamic_linker=no
14380 ;;
14381
14382 # This must be Linux ELF.
14383 linux* | k*bsd*-gnu | kopensolaris*-gnu)
14384 version_type=linux
14385 need_lib_prefix=no
14386 need_version=no
14387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14388 soname_spec='${libname}${release}${shared_ext}$major'
14389 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14390 shlibpath_var=LD_LIBRARY_PATH
14391 shlibpath_overrides_runpath=no
14392 # Some binutils ld are patched to set DT_RUNPATH
14393 save_LDFLAGS=$LDFLAGS
14394 save_libdir=$libdir
14395 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
14396 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
14397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14398 /* end confdefs.h. */
14399
14400 int
14401 main ()
14402 {
14403
14404 ;
14405 return 0;
14406 }
14407 _ACEOF
14408 if ac_fn_cxx_try_link "$LINENO"; then :
14409 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
14410 shlibpath_overrides_runpath=yes
14411 fi
14412 fi
14413 rm -f core conftest.err conftest.$ac_objext \
14414 conftest$ac_exeext conftest.$ac_ext
14415 LDFLAGS=$save_LDFLAGS
14416 libdir=$save_libdir
14417
14418 # This implies no fast_install, which is unacceptable.
14419 # Some rework will be needed to allow for fast_install
14420 # before this can be enabled.
14421 hardcode_into_libs=yes
14422
14423 # Append ld.so.conf contents to the search path
14424 if test -f /etc/ld.so.conf; then
14425 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
14426 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
14427 fi
14428
14429 # We used to test for /lib/ld.so.1 and disable shared libraries on
14430 # powerpc, because MkLinux only supported shared libraries with the
14431 # GNU dynamic linker. Since this was broken with cross compilers,
14432 # most powerpc-linux boxes support dynamic linking these days and
14433 # people can always --disable-shared, the test was removed, and we
14434 # assume the GNU/Linux dynamic linker is in use.
14435 dynamic_linker='GNU/Linux ld.so'
14436 ;;
14437
14438 netbsdelf*-gnu)
14439 version_type=linux
14440 need_lib_prefix=no
14441 need_version=no
14442 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
14443 soname_spec='${libname}${release}${shared_ext}$major'
14444 shlibpath_var=LD_LIBRARY_PATH
14445 shlibpath_overrides_runpath=no
14446 hardcode_into_libs=yes
14447 dynamic_linker='NetBSD ld.elf_so'
14448 ;;
14449
14450 netbsd*)
14451 version_type=sunos
14452 need_lib_prefix=no
14453 need_version=no
14454 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14455 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14456 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14457 dynamic_linker='NetBSD (a.out) ld.so'
14458 else
14459 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
14460 soname_spec='${libname}${release}${shared_ext}$major'
14461 dynamic_linker='NetBSD ld.elf_so'
14462 fi
14463 shlibpath_var=LD_LIBRARY_PATH
14464 shlibpath_overrides_runpath=yes
14465 hardcode_into_libs=yes
14466 ;;
14467
14468 newsos6)
14469 version_type=linux
14470 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14471 shlibpath_var=LD_LIBRARY_PATH
14472 shlibpath_overrides_runpath=yes
14473 ;;
14474
14475 *nto* | *qnx*)
14476 version_type=qnx
14477 need_lib_prefix=no
14478 need_version=no
14479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14480 soname_spec='${libname}${release}${shared_ext}$major'
14481 shlibpath_var=LD_LIBRARY_PATH
14482 shlibpath_overrides_runpath=no
14483 hardcode_into_libs=yes
14484 dynamic_linker='ldqnx.so'
14485 ;;
14486
14487 openbsd*)
14488 version_type=sunos
14489 sys_lib_dlsearch_path_spec="/usr/lib"
14490 need_lib_prefix=no
14491 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
14492 case $host_os in
14493 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
14494 *) need_version=no ;;
14495 esac
14496 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14497 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14498 shlibpath_var=LD_LIBRARY_PATH
14499 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
14500 case $host_os in
14501 openbsd2.[89] | openbsd2.[89].*)
14502 shlibpath_overrides_runpath=no
14503 ;;
14504 *)
14505 shlibpath_overrides_runpath=yes
14506 ;;
14507 esac
14508 else
14509 shlibpath_overrides_runpath=yes
14510 fi
14511 ;;
14512
14513 os2*)
14514 libname_spec='$name'
14515 shrext_cmds=".dll"
14516 need_lib_prefix=no
14517 library_names_spec='$libname${shared_ext} $libname.a'
14518 dynamic_linker='OS/2 ld.exe'
14519 shlibpath_var=LIBPATH
14520 ;;
14521
14522 osf3* | osf4* | osf5*)
14523 version_type=osf
14524 need_lib_prefix=no
14525 need_version=no
14526 soname_spec='${libname}${release}${shared_ext}$major'
14527 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14528 shlibpath_var=LD_LIBRARY_PATH
14529 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14530 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
14531 ;;
14532
14533 rdos*)
14534 dynamic_linker=no
14535 ;;
14536
14537 solaris*)
14538 version_type=linux
14539 need_lib_prefix=no
14540 need_version=no
14541 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14542 soname_spec='${libname}${release}${shared_ext}$major'
14543 shlibpath_var=LD_LIBRARY_PATH
14544 shlibpath_overrides_runpath=yes
14545 hardcode_into_libs=yes
14546 # ldd complains unless libraries are executable
14547 postinstall_cmds='chmod +x $lib'
14548 ;;
14549
14550 sunos4*)
14551 version_type=sunos
14552 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14553 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14554 shlibpath_var=LD_LIBRARY_PATH
14555 shlibpath_overrides_runpath=yes
14556 if test "$with_gnu_ld" = yes; then
14557 need_lib_prefix=no
14558 fi
14559 need_version=yes
14560 ;;
14561
14562 sysv4 | sysv4.3*)
14563 version_type=linux
14564 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14565 soname_spec='${libname}${release}${shared_ext}$major'
14566 shlibpath_var=LD_LIBRARY_PATH
14567 case $host_vendor in
14568 sni)
14569 shlibpath_overrides_runpath=no
14570 need_lib_prefix=no
14571 runpath_var=LD_RUN_PATH
14572 ;;
14573 siemens)
14574 need_lib_prefix=no
14575 ;;
14576 motorola)
14577 need_lib_prefix=no
14578 need_version=no
14579 shlibpath_overrides_runpath=no
14580 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14581 ;;
14582 esac
14583 ;;
14584
14585 sysv4*MP*)
14586 if test -d /usr/nec ;then
14587 version_type=linux
14588 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
14589 soname_spec='$libname${shared_ext}.$major'
14590 shlibpath_var=LD_LIBRARY_PATH
14591 fi
14592 ;;
14593
14594 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14595 version_type=freebsd-elf
14596 need_lib_prefix=no
14597 need_version=no
14598 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14599 soname_spec='${libname}${release}${shared_ext}$major'
14600 shlibpath_var=LD_LIBRARY_PATH
14601 shlibpath_overrides_runpath=yes
14602 hardcode_into_libs=yes
14603 if test "$with_gnu_ld" = yes; then
14604 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14605 else
14606 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14607 case $host_os in
14608 sco3.2v5*)
14609 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14610 ;;
14611 esac
14612 fi
14613 sys_lib_dlsearch_path_spec='/usr/lib'
14614 ;;
14615
14616 tpf*)
14617 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
14618 version_type=linux
14619 need_lib_prefix=no
14620 need_version=no
14621 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14622 shlibpath_var=LD_LIBRARY_PATH
14623 shlibpath_overrides_runpath=no
14624 hardcode_into_libs=yes
14625 ;;
14626
14627 uts4*)
14628 version_type=linux
14629 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14630 soname_spec='${libname}${release}${shared_ext}$major'
14631 shlibpath_var=LD_LIBRARY_PATH
14632 ;;
14633
14634 *)
14635 dynamic_linker=no
14636 ;;
14637 esac
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14639 $as_echo "$dynamic_linker" >&6; }
14640 test "$dynamic_linker" = no && can_build_shared=no
14641
14642 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14643 if test "$GCC" = yes; then
14644 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14645 fi
14646
14647 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
14648 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
14649 fi
14650 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
14651 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
14652 fi
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14690 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
14691 hardcode_action_CXX=
14692 if test -n "$hardcode_libdir_flag_spec_CXX" ||
14693 test -n "$runpath_var_CXX" ||
14694 test "X$hardcode_automatic_CXX" = "Xyes" ; then
14695
14696 # We can hardcode non-existent directories.
14697 if test "$hardcode_direct_CXX" != no &&
14698 # If the only mechanism to avoid hardcoding is shlibpath_var, we
14699 # have to relink, otherwise we might link with an installed library
14700 # when we should be linking with a yet-to-be-installed one
14701 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
14702 test "$hardcode_minus_L_CXX" != no; then
14703 # Linking always hardcodes the temporary library directory.
14704 hardcode_action_CXX=relink
14705 else
14706 # We can link without hardcoding, and we can hardcode nonexisting dirs.
14707 hardcode_action_CXX=immediate
14708 fi
14709 else
14710 # We cannot hardcode anything, or else we can only hardcode existing
14711 # directories.
14712 hardcode_action_CXX=unsupported
14713 fi
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
14715 $as_echo "$hardcode_action_CXX" >&6; }
14716
14717 if test "$hardcode_action_CXX" = relink ||
14718 test "$inherit_rpath_CXX" = yes; then
14719 # Fast installation is not supported
14720 enable_fast_install=no
14721 elif test "$shlibpath_overrides_runpath" = yes ||
14722 test "$enable_shared" = no; then
14723 # Fast installation is not necessary
14724 enable_fast_install=needless
14725 fi
14726
14727
14728
14729
14730
14731
14732
14733 fi # test -n "$compiler"
14734
14735 CC=$lt_save_CC
14736 LDCXX=$LD
14737 LD=$lt_save_LD
14738 GCC=$lt_save_GCC
14739 with_gnu_ld=$lt_save_with_gnu_ld
14740 lt_cv_path_LDCXX=$lt_cv_path_LD
14741 lt_cv_path_LD=$lt_save_path_LD
14742 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
14743 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
14744 fi # test "$_lt_caught_CXX_error" != yes
14745
14746 ac_ext=c
14747 ac_cpp='$CPP $CPPFLAGS'
14748 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14749 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14750 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764 ac_config_commands="$ac_config_commands libtool"
14765
14766
14767
14768
14769 # Only expand once:
14770
14771
14772
14773 #### Checks for header files. ####
14774
14775 # ISO
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
14777 $as_echo_n "checking for ANSI C header files... " >&6; }
14778 if test "${ac_cv_header_stdc+set}" = set; then :
14779 $as_echo_n "(cached) " >&6
14780 else
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782 /* end confdefs.h. */
14783 #include <stdlib.h>
14784 #include <stdarg.h>
14785 #include <string.h>
14786 #include <float.h>
14787
14788 int
14789 main ()
14790 {
14791
14792 ;
14793 return 0;
14794 }
14795 _ACEOF
14796 if ac_fn_c_try_compile "$LINENO"; then :
14797 ac_cv_header_stdc=yes
14798 else
14799 ac_cv_header_stdc=no
14800 fi
14801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14802
14803 if test $ac_cv_header_stdc = yes; then
14804 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14807 #include <string.h>
14808
14809 _ACEOF
14810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14811 $EGREP "memchr" >/dev/null 2>&1; then :
14812
14813 else
14814 ac_cv_header_stdc=no
14815 fi
14816 rm -f conftest*
14817
14818 fi
14819
14820 if test $ac_cv_header_stdc = yes; then
14821 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823 /* end confdefs.h. */
14824 #include <stdlib.h>
14825
14826 _ACEOF
14827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14828 $EGREP "free" >/dev/null 2>&1; then :
14829
14830 else
14831 ac_cv_header_stdc=no
14832 fi
14833 rm -f conftest*
14834
14835 fi
14836
14837 if test $ac_cv_header_stdc = yes; then
14838 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14839 if test "$cross_compiling" = yes; then :
14840 :
14841 else
14842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14843 /* end confdefs.h. */
14844 #include <ctype.h>
14845 #include <stdlib.h>
14846 #if ((' ' & 0x0FF) == 0x020)
14847 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14848 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14849 #else
14850 # define ISLOWER(c) \
14851 (('a' <= (c) && (c) <= 'i') \
14852 || ('j' <= (c) && (c) <= 'r') \
14853 || ('s' <= (c) && (c) <= 'z'))
14854 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14855 #endif
14856
14857 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14858 int
14859 main ()
14860 {
14861 int i;
14862 for (i = 0; i < 256; i++)
14863 if (XOR (islower (i), ISLOWER (i))
14864 || toupper (i) != TOUPPER (i))
14865 return 2;
14866 return 0;
14867 }
14868 _ACEOF
14869 if ac_fn_c_try_run "$LINENO"; then :
14870
14871 else
14872 ac_cv_header_stdc=no
14873 fi
14874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14875 conftest.$ac_objext conftest.beam conftest.$ac_ext
14876 fi
14877
14878 fi
14879 fi
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
14881 $as_echo "$ac_cv_header_stdc" >&6; }
14882 if test $ac_cv_header_stdc = yes; then
14883
14884 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
14885
14886 fi
14887
14888
14889 # XPG4-UNIX
14890 for ac_header in sys/poll.h
14891 do :
14892 ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
14893 if test "x$ac_cv_header_sys_poll_h" = x""yes; then :
14894 cat >>confdefs.h <<_ACEOF
14895 #define HAVE_SYS_POLL_H 1
14896 _ACEOF
14897
14898 fi
14899
14900 done
14901
14902
14903 # Other
14904 for ac_header in sys/ioctl.h
14905 do :
14906 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
14907 if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
14908 cat >>confdefs.h <<_ACEOF
14909 #define HAVE_SYS_IOCTL_H 1
14910 _ACEOF
14911
14912 fi
14913
14914 done
14915
14916 for ac_header in byteswap.h
14917 do :
14918 ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
14919 if test "x$ac_cv_header_byteswap_h" = x""yes; then :
14920 cat >>confdefs.h <<_ACEOF
14921 #define HAVE_BYTESWAP_H 1
14922 _ACEOF
14923
14924 fi
14925
14926 done
14927
14928
14929 #### Typdefs, structures, etc. ####
14930
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14932 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14933 if test "${ac_cv_c_const+set}" = set; then :
14934 $as_echo_n "(cached) " >&6
14935 else
14936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14937 /* end confdefs.h. */
14938
14939 int
14940 main ()
14941 {
14942 /* FIXME: Include the comments suggested by Paul. */
14943 #ifndef __cplusplus
14944 /* Ultrix mips cc rejects this. */
14945 typedef int charset[2];
14946 const charset cs;
14947 /* SunOS 4.1.1 cc rejects this. */
14948 char const *const *pcpcc;
14949 char **ppc;
14950 /* NEC SVR4.0.2 mips cc rejects this. */
14951 struct point {int x, y;};
14952 static struct point const zero = {0,0};
14953 /* AIX XL C 1.02.0.0 rejects this.
14954 It does not let you subtract one const X* pointer from another in
14955 an arm of an if-expression whose if-part is not a constant
14956 expression */
14957 const char *g = "string";
14958 pcpcc = &g + (g ? g-g : 0);
14959 /* HPUX 7.0 cc rejects these. */
14960 ++pcpcc;
14961 ppc = (char**) pcpcc;
14962 pcpcc = (char const *const *) ppc;
14963 { /* SCO 3.2v4 cc rejects this. */
14964 char *t;
14965 char const *s = 0 ? (char *) 0 : (char const *) 0;
14966
14967 *t++ = 0;
14968 if (s) return 0;
14969 }
14970 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14971 int x[] = {25, 17};
14972 const int *foo = &x[0];
14973 ++foo;
14974 }
14975 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14976 typedef const int *iptr;
14977 iptr p = 0;
14978 ++p;
14979 }
14980 { /* AIX XL C 1.02.0.0 rejects this saying
14981 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14982 struct s { int j; const int *ap[3]; };
14983 struct s *b; b->j = 5;
14984 }
14985 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14986 const int foo = 10;
14987 if (!foo) return 0;
14988 }
14989 return !cs[0] && !zero.x;
14990 #endif
14991
14992 ;
14993 return 0;
14994 }
14995 _ACEOF
14996 if ac_fn_c_try_compile "$LINENO"; then :
14997 ac_cv_c_const=yes
14998 else
14999 ac_cv_c_const=no
15000 fi
15001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15002 fi
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
15004 $as_echo "$ac_cv_c_const" >&6; }
15005 if test $ac_cv_c_const = no; then
15006
15007 $as_echo "#define const /**/" >>confdefs.h
15008
15009 fi
15010
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15012 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15013 if test "${ac_cv_c_bigendian+set}" = set; then :
15014 $as_echo_n "(cached) " >&6
15015 else
15016 ac_cv_c_bigendian=unknown
15017 # See if we're dealing with a universal compiler.
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15019 /* end confdefs.h. */
15020 #ifndef __APPLE_CC__
15021 not a universal capable compiler
15022 #endif
15023 typedef int dummy;
15024
15025 _ACEOF
15026 if ac_fn_c_try_compile "$LINENO"; then :
15027
15028 # Check for potential -arch flags. It is not universal unless
15029 # there are at least two -arch flags with different values.
15030 ac_arch=
15031 ac_prev=
15032 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15033 if test -n "$ac_prev"; then
15034 case $ac_word in
15035 i?86 | x86_64 | ppc | ppc64)
15036 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15037 ac_arch=$ac_word
15038 else
15039 ac_cv_c_bigendian=universal
15040 break
15041 fi
15042 ;;
15043 esac
15044 ac_prev=
15045 elif test "x$ac_word" = "x-arch"; then
15046 ac_prev=arch
15047 fi
15048 done
15049 fi
15050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15051 if test $ac_cv_c_bigendian = unknown; then
15052 # See if sys/param.h defines the BYTE_ORDER macro.
15053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15054 /* end confdefs.h. */
15055 #include <sys/types.h>
15056 #include <sys/param.h>
15057
15058 int
15059 main ()
15060 {
15061 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15062 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15063 && LITTLE_ENDIAN)
15064 bogus endian macros
15065 #endif
15066
15067 ;
15068 return 0;
15069 }
15070 _ACEOF
15071 if ac_fn_c_try_compile "$LINENO"; then :
15072 # It does; now see whether it defined to BIG_ENDIAN or not.
15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074 /* end confdefs.h. */
15075 #include <sys/types.h>
15076 #include <sys/param.h>
15077
15078 int
15079 main ()
15080 {
15081 #if BYTE_ORDER != BIG_ENDIAN
15082 not big endian
15083 #endif
15084
15085 ;
15086 return 0;
15087 }
15088 _ACEOF
15089 if ac_fn_c_try_compile "$LINENO"; then :
15090 ac_cv_c_bigendian=yes
15091 else
15092 ac_cv_c_bigendian=no
15093 fi
15094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15095 fi
15096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15097 fi
15098 if test $ac_cv_c_bigendian = unknown; then
15099 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15101 /* end confdefs.h. */
15102 #include <limits.h>
15103
15104 int
15105 main ()
15106 {
15107 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15108 bogus endian macros
15109 #endif
15110
15111 ;
15112 return 0;
15113 }
15114 _ACEOF
15115 if ac_fn_c_try_compile "$LINENO"; then :
15116 # It does; now see whether it defined to _BIG_ENDIAN or not.
15117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15118 /* end confdefs.h. */
15119 #include <limits.h>
15120
15121 int
15122 main ()
15123 {
15124 #ifndef _BIG_ENDIAN
15125 not big endian
15126 #endif
15127
15128 ;
15129 return 0;
15130 }
15131 _ACEOF
15132 if ac_fn_c_try_compile "$LINENO"; then :
15133 ac_cv_c_bigendian=yes
15134 else
15135 ac_cv_c_bigendian=no
15136 fi
15137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15138 fi
15139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15140 fi
15141 if test $ac_cv_c_bigendian = unknown; then
15142 # Compile a test program.
15143 if test "$cross_compiling" = yes; then :
15144 # Try to guess by grepping values from an object file.
15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146 /* end confdefs.h. */
15147 short int ascii_mm[] =
15148 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15149 short int ascii_ii[] =
15150 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15151 int use_ascii (int i) {
15152 return ascii_mm[i] + ascii_ii[i];
15153 }
15154 short int ebcdic_ii[] =
15155 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15156 short int ebcdic_mm[] =
15157 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15158 int use_ebcdic (int i) {
15159 return ebcdic_mm[i] + ebcdic_ii[i];
15160 }
15161 extern int foo;
15162
15163 int
15164 main ()
15165 {
15166 return use_ascii (foo) == use_ebcdic (foo);
15167 ;
15168 return 0;
15169 }
15170 _ACEOF
15171 if ac_fn_c_try_compile "$LINENO"; then :
15172 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15173 ac_cv_c_bigendian=yes
15174 fi
15175 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15176 if test "$ac_cv_c_bigendian" = unknown; then
15177 ac_cv_c_bigendian=no
15178 else
15179 # finding both strings is unlikely to happen, but who knows?
15180 ac_cv_c_bigendian=unknown
15181 fi
15182 fi
15183 fi
15184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15185 else
15186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15187 /* end confdefs.h. */
15188 $ac_includes_default
15189 int
15190 main ()
15191 {
15192
15193 /* Are we little or big endian? From Harbison&Steele. */
15194 union
15195 {
15196 long int l;
15197 char c[sizeof (long int)];
15198 } u;
15199 u.l = 1;
15200 return u.c[sizeof (long int) - 1] == 1;
15201
15202 ;
15203 return 0;
15204 }
15205 _ACEOF
15206 if ac_fn_c_try_run "$LINENO"; then :
15207 ac_cv_c_bigendian=no
15208 else
15209 ac_cv_c_bigendian=yes
15210 fi
15211 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15212 conftest.$ac_objext conftest.beam conftest.$ac_ext
15213 fi
15214
15215 fi
15216 fi
15217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15218 $as_echo "$ac_cv_c_bigendian" >&6; }
15219 case $ac_cv_c_bigendian in #(
15220 yes)
15221 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15222 ;; #(
15223 no)
15224 ;; #(
15225 universal)
15226
15227 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
15228
15229 ;; #(
15230 *)
15231 as_fn_error "unknown endianness
15232 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
15233 esac
15234
15235 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15236 if test "x$ac_cv_type_pid_t" = x""yes; then :
15237
15238 else
15239
15240 cat >>confdefs.h <<_ACEOF
15241 #define pid_t int
15242 _ACEOF
15243
15244 fi
15245
15246 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
15247 if test "x$ac_cv_type_size_t" = x""yes; then :
15248
15249 else
15250
15251 cat >>confdefs.h <<_ACEOF
15252 #define size_t unsigned int
15253 _ACEOF
15254
15255 fi
15256
15257 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
15258 if test "x$ac_cv_type_ssize_t" = x""yes; then :
15259
15260 cat >>confdefs.h <<_ACEOF
15261 #define HAVE_SSIZE_T 1
15262 _ACEOF
15263
15264
15265 else
15266
15267 $as_echo "#define ssize_t signed long" >>confdefs.h
15268
15269 fi
15270
15271 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15272 if test "x$ac_cv_type_off_t" = x""yes; then :
15273
15274 else
15275
15276 cat >>confdefs.h <<_ACEOF
15277 #define off_t long int
15278 _ACEOF
15279
15280 fi
15281
15282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15283 $as_echo_n "checking return type of signal handlers... " >&6; }
15284 if test "${ac_cv_type_signal+set}" = set; then :
15285 $as_echo_n "(cached) " >&6
15286 else
15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288 /* end confdefs.h. */
15289 #include <sys/types.h>
15290 #include <signal.h>
15291
15292 int
15293 main ()
15294 {
15295 return *(signal (0, 0)) (0) == 1;
15296 ;
15297 return 0;
15298 }
15299 _ACEOF
15300 if ac_fn_c_try_compile "$LINENO"; then :
15301 ac_cv_type_signal=int
15302 else
15303 ac_cv_type_signal=void
15304 fi
15305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15306 fi
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15308 $as_echo "$ac_cv_type_signal" >&6; }
15309
15310 cat >>confdefs.h <<_ACEOF
15311 #define RETSIGTYPE $ac_cv_type_signal
15312 _ACEOF
15313
15314
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15316 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
15317 if test "${ac_cv_type_uid_t+set}" = set; then :
15318 $as_echo_n "(cached) " >&6
15319 else
15320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15321 /* end confdefs.h. */
15322 #include <sys/types.h>
15323
15324 _ACEOF
15325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15326 $EGREP "uid_t" >/dev/null 2>&1; then :
15327 ac_cv_type_uid_t=yes
15328 else
15329 ac_cv_type_uid_t=no
15330 fi
15331 rm -f conftest*
15332
15333 fi
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15335 $as_echo "$ac_cv_type_uid_t" >&6; }
15336 if test $ac_cv_type_uid_t = no; then
15337
15338 $as_echo "#define uid_t int" >>confdefs.h
15339
15340
15341 $as_echo "#define gid_t int" >>confdefs.h
15342
15343 fi
15344
15345
15346 #### Large File-Support (LFS) ####
15347
15348 # Check whether --enable-largefile was given.
15349 if test "${enable_largefile+set}" = set; then :
15350 enableval=$enable_largefile;
15351 fi
15352
15353 if test "$enable_largefile" != no; then
15354
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15356 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15357 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
15358 $as_echo_n "(cached) " >&6
15359 else
15360 ac_cv_sys_largefile_CC=no
15361 if test "$GCC" != yes; then
15362 ac_save_CC=$CC
15363 while :; do
15364 # IRIX 6.2 and later do not support large files by default,
15365 # so use the C compiler's -n32 option if that helps.
15366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367 /* end confdefs.h. */
15368 #include <sys/types.h>
15369 /* Check that off_t can represent 2**63 - 1 correctly.
15370 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15371 since some C++ compilers masquerading as C compilers
15372 incorrectly reject 9223372036854775807. */
15373 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15374 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15375 && LARGE_OFF_T % 2147483647 == 1)
15376 ? 1 : -1];
15377 int
15378 main ()
15379 {
15380
15381 ;
15382 return 0;
15383 }
15384 _ACEOF
15385 if ac_fn_c_try_compile "$LINENO"; then :
15386 break
15387 fi
15388 rm -f core conftest.err conftest.$ac_objext
15389 CC="$CC -n32"
15390 if ac_fn_c_try_compile "$LINENO"; then :
15391 ac_cv_sys_largefile_CC=' -n32'; break
15392 fi
15393 rm -f core conftest.err conftest.$ac_objext
15394 break
15395 done
15396 CC=$ac_save_CC
15397 rm -f conftest.$ac_ext
15398 fi
15399 fi
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15401 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15402 if test "$ac_cv_sys_largefile_CC" != no; then
15403 CC=$CC$ac_cv_sys_largefile_CC
15404 fi
15405
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15407 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15408 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
15409 $as_echo_n "(cached) " >&6
15410 else
15411 while :; do
15412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15413 /* end confdefs.h. */
15414 #include <sys/types.h>
15415 /* Check that off_t can represent 2**63 - 1 correctly.
15416 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15417 since some C++ compilers masquerading as C compilers
15418 incorrectly reject 9223372036854775807. */
15419 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15420 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15421 && LARGE_OFF_T % 2147483647 == 1)
15422 ? 1 : -1];
15423 int
15424 main ()
15425 {
15426
15427 ;
15428 return 0;
15429 }
15430 _ACEOF
15431 if ac_fn_c_try_compile "$LINENO"; then :
15432 ac_cv_sys_file_offset_bits=no; break
15433 fi
15434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436 /* end confdefs.h. */
15437 #define _FILE_OFFSET_BITS 64
15438 #include <sys/types.h>
15439 /* Check that off_t can represent 2**63 - 1 correctly.
15440 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15441 since some C++ compilers masquerading as C compilers
15442 incorrectly reject 9223372036854775807. */
15443 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15444 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15445 && LARGE_OFF_T % 2147483647 == 1)
15446 ? 1 : -1];
15447 int
15448 main ()
15449 {
15450
15451 ;
15452 return 0;
15453 }
15454 _ACEOF
15455 if ac_fn_c_try_compile "$LINENO"; then :
15456 ac_cv_sys_file_offset_bits=64; break
15457 fi
15458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15459 ac_cv_sys_file_offset_bits=unknown
15460 break
15461 done
15462 fi
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15464 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15465 case $ac_cv_sys_file_offset_bits in #(
15466 no | unknown) ;;
15467 *)
15468 cat >>confdefs.h <<_ACEOF
15469 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15470 _ACEOF
15471 ;;
15472 esac
15473 rm -rf conftest*
15474 if test $ac_cv_sys_file_offset_bits = unknown; then
15475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15476 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15477 if test "${ac_cv_sys_large_files+set}" = set; then :
15478 $as_echo_n "(cached) " >&6
15479 else
15480 while :; do
15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15482 /* end confdefs.h. */
15483 #include <sys/types.h>
15484 /* Check that off_t can represent 2**63 - 1 correctly.
15485 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15486 since some C++ compilers masquerading as C compilers
15487 incorrectly reject 9223372036854775807. */
15488 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15489 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15490 && LARGE_OFF_T % 2147483647 == 1)
15491 ? 1 : -1];
15492 int
15493 main ()
15494 {
15495
15496 ;
15497 return 0;
15498 }
15499 _ACEOF
15500 if ac_fn_c_try_compile "$LINENO"; then :
15501 ac_cv_sys_large_files=no; break
15502 fi
15503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15505 /* end confdefs.h. */
15506 #define _LARGE_FILES 1
15507 #include <sys/types.h>
15508 /* Check that off_t can represent 2**63 - 1 correctly.
15509 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15510 since some C++ compilers masquerading as C compilers
15511 incorrectly reject 9223372036854775807. */
15512 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15513 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15514 && LARGE_OFF_T % 2147483647 == 1)
15515 ? 1 : -1];
15516 int
15517 main ()
15518 {
15519
15520 ;
15521 return 0;
15522 }
15523 _ACEOF
15524 if ac_fn_c_try_compile "$LINENO"; then :
15525 ac_cv_sys_large_files=1; break
15526 fi
15527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15528 ac_cv_sys_large_files=unknown
15529 break
15530 done
15531 fi
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15533 $as_echo "$ac_cv_sys_large_files" >&6; }
15534 case $ac_cv_sys_large_files in #(
15535 no | unknown) ;;
15536 *)
15537 cat >>confdefs.h <<_ACEOF
15538 #define _LARGE_FILES $ac_cv_sys_large_files
15539 _ACEOF
15540 ;;
15541 esac
15542 rm -rf conftest*
15543 fi
15544 fi
12110
12111
12112
1554512113
1554612114
1554712115
1555212120 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
1555312121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1555412122 $as_echo_n "checking for $ac_word... " >&6; }
15555 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12123 if ${ac_cv_path_PKG_CONFIG+:} false; then :
1555612124 $as_echo_n "(cached) " >&6
1555712125 else
1555812126 case $PKG_CONFIG in
1559512163 set dummy pkg-config; ac_word=$2
1559612164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1559712165 $as_echo_n "checking for $ac_word... " >&6; }
15598 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
12166 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
1559912167 $as_echo_n "(cached) " >&6
1560012168 else
1560112169 case $ac_pt_PKG_CONFIG in
1565812226 $as_echo "no" >&6; }
1565912227 PKG_CONFIG=""
1566012228 fi
15661
1566212229 fi
1566312230
1566412231 pkg_failed=no
1566512232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
1566612233 $as_echo_n "checking for LIBUDEV... " >&6; }
1566712234
15668 if test -n "$PKG_CONFIG"; then
15669 if test -n "$LIBUDEV_CFLAGS"; then
15670 pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS"
15671 else
15672 if test -n "$PKG_CONFIG" && \
12235 if test -n "$LIBUDEV_CFLAGS"; then
12236 pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS"
12237 elif test -n "$PKG_CONFIG"; then
12238 if test -n "$PKG_CONFIG" && \
1567312239 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= 143\""; } >&5
1567412240 ($PKG_CONFIG --exists --print-errors "libudev >= 143") 2>&5
1567512241 ac_status=$?
1567912245 else
1568012246 pkg_failed=yes
1568112247 fi
15682 fi
15683 else
15684 pkg_failed=untried
15685 fi
15686 if test -n "$PKG_CONFIG"; then
15687 if test -n "$LIBUDEV_LIBS"; then
15688 pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS"
15689 else
15690 if test -n "$PKG_CONFIG" && \
12248 else
12249 pkg_failed=untried
12250 fi
12251 if test -n "$LIBUDEV_LIBS"; then
12252 pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS"
12253 elif test -n "$PKG_CONFIG"; then
12254 if test -n "$PKG_CONFIG" && \
1569112255 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= 143\""; } >&5
1569212256 ($PKG_CONFIG --exists --print-errors "libudev >= 143") 2>&5
1569312257 ac_status=$?
1569712261 else
1569812262 pkg_failed=yes
1569912263 fi
15700 fi
15701 else
15702 pkg_failed=untried
12264 else
12265 pkg_failed=untried
1570312266 fi
1570412267
1570512268
1570612269
1570712270 if test $pkg_failed = yes; then
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12272 $as_echo "no" >&6; }
1570812273
1570912274 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1571012275 _pkg_short_errors_supported=yes
1571212277 _pkg_short_errors_supported=no
1571312278 fi
1571412279 if test $_pkg_short_errors_supported = yes; then
15715 LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libudev >= 143"`
12280 LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libudev >= 143" 2>&1`
1571612281 else
15717 LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libudev >= 143"`
12282 LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors "libudev >= 143" 2>&1`
1571812283 fi
1571912284 # Put the nasty error message in config.log where it belongs
1572012285 echo "$LIBUDEV_PKG_ERRORS" >&5
1572112286
15722 as_fn_error "Package requirements (libudev >= 143) were not met:
12287 as_fn_error $? "Package requirements (libudev >= 143) were not met:
1572312288
1572412289 $LIBUDEV_PKG_ERRORS
1572512290
1572612291 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1572712292 installed software in a non-standard prefix.
12293
12294 Alternatively, you may set the environment variables LIBUDEV_CFLAGS
12295 and LIBUDEV_LIBS to avoid the need to call pkg-config.
12296 See the pkg-config man page for more details." "$LINENO" 5
12297
12298 elif test $pkg_failed = untried; then
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12300 $as_echo "no" >&6; }
12301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12302 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12303 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12304 is in your PATH or set the PKG_CONFIG environment variable to the full
12305 path to pkg-config.
1572812306
1572912307 Alternatively, you may set the environment variables LIBUDEV_CFLAGS
1573012308 and LIBUDEV_LIBS to avoid the need to call pkg-config.
1573112309 See the pkg-config man page for more details.
15732 " "$LINENO" 5
15733 elif test $pkg_failed = untried; then
15734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15735 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15736 as_fn_error "The pkg-config script could not be found or is too old. Make sure it
15737 is in your PATH or set the PKG_CONFIG environment variable to the full
15738 path to pkg-config.
15739
15740 Alternatively, you may set the environment variables LIBUDEV_CFLAGS
15741 and LIBUDEV_LIBS to avoid the need to call pkg-config.
15742 See the pkg-config man page for more details.
1574312310
1574412311 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
15745 See \`config.log' for more details." "$LINENO" 5; }
12312 See \`config.log' for more details" "$LINENO" 5; }
12313
1574612314 else
1574712315 LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS
1574812316 LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS
1574912317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1575012318 $as_echo "yes" >&6; }
15751 :
15752 fi
15753
15754 ###################################
15755 # Output #
15756 ###################################
15757
15758 ac_config_files="$ac_config_files Makefile libatasmart.pc"
12319
12320 fi
12321
12322
12323 ac_config_files="$ac_config_files Makefile strpool/Makefile libatasmart.pc"
1575912324
1576012325 cat >confcache <<\_ACEOF
1576112326 # This file is a shell script that caches the results of configure
1582112386 :end' >>confcache
1582212387 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1582312388 if test -w "$cache_file"; then
15824 test "x$cache_file" != "x/dev/null" &&
12389 if test "x$cache_file" != "x/dev/null"; then
1582512390 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
1582612391 $as_echo "$as_me: updating cache $cache_file" >&6;}
15827 cat confcache >$cache_file
12392 if test ! -f "$cache_file" || test -h "$cache_file"; then
12393 cat confcache >"$cache_file"
12394 else
12395 case $cache_file in #(
12396 */* | ?:*)
12397 mv -f confcache "$cache_file"$$ &&
12398 mv -f "$cache_file"$$ "$cache_file" ;; #(
12399 *)
12400 mv -f confcache "$cache_file" ;;
12401 esac
12402 fi
12403 fi
1582812404 else
1582912405 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
1583012406 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
1584012416
1584112417 ac_libobjs=
1584212418 ac_ltlibobjs=
12419 U=
1584312420 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
1584412421 # 1. Remove the extension, and $U if already installed.
1584512422 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
1586312440 fi
1586412441
1586512442 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
15866 as_fn_error "conditional \"AMDEP\" was never defined.
12443 as_fn_error $? "conditional \"AMDEP\" was never defined.
1586712444 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1586812445 fi
1586912446 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
15870 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12447 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
1587112448 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1587212449 fi
15873 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
15874 as_fn_error "conditional \"am__fastdepCXX\" was never defined.
15875 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15876 fi
15877 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
15878 as_fn_error "conditional \"am__fastdepCXX\" was never defined.
15879 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15880 fi
15881
15882
15883 : ${CONFIG_STATUS=./config.status}
12450
12451 : "${CONFIG_STATUS=./config.status}"
1588412452 ac_write_fail=0
1588512453 ac_clean_files_save=$ac_clean_files
1588612454 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1598112549 IFS=" "" $as_nl"
1598212550
1598312551 # Find who we are. Look in the path if we contain no directory separator.
12552 as_myself=
1598412553 case $0 in #((
1598512554 *[\\/]* ) as_myself=$0 ;;
1598612555 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1602612595 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1602712596
1602812597
16029 # as_fn_error ERROR [LINENO LOG_FD]
16030 # ---------------------------------
12598 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12599 # ----------------------------------------
1603112600 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
1603212601 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16033 # script with status $?, using 1 if that was 0.
12602 # script with STATUS, using 1 if that was 0.
1603412603 as_fn_error ()
1603512604 {
16036 as_status=$?; test $as_status -eq 0 && as_status=1
16037 if test "$3"; then
16038 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16039 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
12605 as_status=$1; test $as_status -eq 0 && as_status=1
12606 if test "$4"; then
12607 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12608 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
1604012609 fi
16041 $as_echo "$as_me: error: $1" >&2
12610 $as_echo "$as_me: error: $2" >&2
1604212611 as_fn_exit $as_status
1604312612 } # as_fn_error
1604412613
1623412803 test -d "$as_dir" && break
1623512804 done
1623612805 test -z "$as_dirs" || eval "mkdir $as_dirs"
16237 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
12806 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
1623812807
1623912808
1624012809 } # as_fn_mkdir_p
1628712856 # report actual input values of CONFIG_FILES etc. instead of their
1628812857 # values after options handling.
1628912858 ac_log="
16290 This file was extended by libatasmart $as_me 0.17, which was
16291 generated by GNU Autoconf 2.65. Invocation command line was
12859 This file was extended by libatasmart $as_me 0.18, which was
12860 generated by GNU Autoconf 2.68. Invocation command line was
1629212861
1629312862 CONFIG_FILES = $CONFIG_FILES
1629412863 CONFIG_HEADERS = $CONFIG_HEADERS
1635312922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1635412923 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1635512924 ac_cs_version="\\
16356 libatasmart config.status 0.17
16357 configured by $0, generated by GNU Autoconf 2.65,
12925 libatasmart config.status 0.18
12926 configured by $0, generated by GNU Autoconf 2.68,
1635812927 with options \\"\$ac_cs_config\\"
1635912928
16360 Copyright (C) 2009 Free Software Foundation, Inc.
12929 Copyright (C) 2010 Free Software Foundation, Inc.
1636112930 This config.status script is free software; the Free Software Foundation
1636212931 gives unlimited permission to copy, distribute and modify it."
1636312932
1637512944 while test $# != 0
1637612945 do
1637712946 case $1 in
16378 --*=*)
12947 --*=?*)
1637912948 ac_option=`expr "X$1" : 'X\([^=]*\)='`
1638012949 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12950 ac_shift=:
12951 ;;
12952 --*=)
12953 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12954 ac_optarg=
1638112955 ac_shift=:
1638212956 ;;
1638312957 *)
1640112975 $ac_shift
1640212976 case $ac_optarg in
1640312977 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12978 '') as_fn_error $? "missing file argument" ;;
1640412979 esac
1640512980 as_fn_append CONFIG_FILES " '$ac_optarg'"
1640612981 ac_need_defaults=false;;
1641312988 ac_need_defaults=false;;
1641412989 --he | --h)
1641512990 # Conflict between --help and --header
16416 as_fn_error "ambiguous option: \`$1'
12991 as_fn_error $? "ambiguous option: \`$1'
1641712992 Try \`$0 --help' for more information.";;
1641812993 --help | --hel | -h )
1641912994 $as_echo "$ac_cs_usage"; exit ;;
1642212997 ac_cs_silent=: ;;
1642312998
1642412999 # This is an error.
16425 -*) as_fn_error "unrecognized option: \`$1'
13000 -*) as_fn_error $? "unrecognized option: \`$1'
1642613001 Try \`$0 --help' for more information." ;;
1642713002
1642813003 *) as_fn_append ac_config_targets " $1"
1647613051 sed_quote_subst='$sed_quote_subst'
1647713052 double_quote_subst='$double_quote_subst'
1647813053 delay_variable_subst='$delay_variable_subst'
16479 macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
16480 macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
16481 enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
16482 enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
16483 pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
16484 enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
16485 host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
16486 host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
16487 host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
16488 build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
16489 build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
16490 build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
16491 SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
16492 Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
16493 GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
16494 EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
16495 FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
16496 LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
16497 NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
16498 LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
16499 max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
16500 ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
16501 exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
16502 lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
16503 lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
16504 lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
16505 reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
16506 reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16507 OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
16508 deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
16509 file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
16510 AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
16511 AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
16512 STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
16513 RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
16514 old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16515 old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16516 old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16517 CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
16518 CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
16519 compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
16520 GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
16521 lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
16522 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
16523 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
16524 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
16525 objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
16526 SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
16527 ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
16528 MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
16529 lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
16530 lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
16531 lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
16532 lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
16533 lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
16534 need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
16535 DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
16536 NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
16537 LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
16538 OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
16539 OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
16540 libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
16541 shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16542 extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16543 archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
16544 enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
16545 export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
16546 whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
16547 compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
16548 old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16549 old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16550 archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16551 archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16552 module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16553 module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16554 with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
16555 allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
16556 no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
16557 hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
16558 hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
16559 hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
16560 hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
16561 hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
16562 hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
16563 hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
16564 hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
16565 inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
16566 link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
16567 fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
16568 always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
16569 export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16570 exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
16571 include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
16572 prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16573 file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
16574 variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
16575 need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
16576 need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
16577 version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
16578 runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
16579 shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
16580 shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
16581 libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
16582 library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
16583 soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
16584 postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16585 postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16586 finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
16587 finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
16588 hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
16589 sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
16590 sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
16591 hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
16592 enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
16593 enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
16594 enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
16595 old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
16596 striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
16597 compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
16598 predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
16599 postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
16600 predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
16601 postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
16602 compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
16603 LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16604 old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16605 compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16606 GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16607 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16608 lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16609 lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16610 lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16611 lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16612 archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16613 enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16614 export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16615 whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16616 compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16617 old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16618 old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16619 archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16620 archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16621 module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16622 module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16623 with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16624 allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16625 no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16626 hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16627 hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16628 hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16629 hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16630 hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16631 hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16632 hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16633 hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16634 inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16635 link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16636 fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16637 always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16638 export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16639 exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16640 include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16641 prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16642 file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16643 hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16644 compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16645 predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16646 postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16647 predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16648 postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
16649 compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
13054 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
13055 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
13056 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
13057 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
13058 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
13059 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
13060 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
13061 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
13062 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
13063 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
13064 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
13065 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
13066 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
13067 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
13068 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
13069 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
13070 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
13071 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
13072 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
13073 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
13074 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
13075 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
13076 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
13077 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
13078 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
13079 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
13080 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
13081 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
13082 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
13083 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
13084 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
13085 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
13086 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
13087 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
13088 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
13089 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
13090 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
13091 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
13092 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
13093 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
13094 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
13095 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
13096 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
13097 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
13098 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13099 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13100 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
13101 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
13102 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
13103 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
13104 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
13105 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
13106 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
13107 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
13108 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
13109 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
13110 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
13111 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
13112 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
13113 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
13114 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
13115 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
13116 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
13117 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
13118 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
13119 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
13120 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
13121 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
13122 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
13123 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
13124 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
13125 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
13126 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
13127 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
13128 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13129 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
13130 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
13131 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
13132 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
13133 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
13134 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
13135 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13136 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
13137 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13138 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
13139 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13140 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
13141 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
13142 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
13143 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
13144 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
13145 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
13146 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
13147 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
13148 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
13149 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
13150 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
13151 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
13152 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
13153 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
13154 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
13155 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
13156 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
13157 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
13158 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
13159 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
13160 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
13161 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
13162 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
13163 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
13164 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
13165 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
13166 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
13167 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
13168 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
13169 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
13170 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
13171 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13172 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13173 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
13174 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
13175 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
13176 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
13177 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
13178 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
13179 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
13180 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
13181 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
13182 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
13183 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
1665013184
1665113185 LTCC='$LTCC'
1665213186 LTCFLAGS='$LTCFLAGS'
1665313187 compiler='$compiler_DEFAULT'
1665413188
13189 # A function that is used when there is no print builtin or printf.
13190 func_fallback_echo ()
13191 {
13192 eval 'cat <<_LTECHO_EOF
13193 \$1
13194 _LTECHO_EOF'
13195 }
13196
1665513197 # Quote evaled strings.
16656 for var in SED \
13198 for var in SHELL \
13199 ECHO \
13200 SED \
1665713201 GREP \
1665813202 EGREP \
1665913203 FGREP \
1666613210 OBJDUMP \
1666713211 deplibs_check_method \
1666813212 file_magic_cmd \
13213 file_magic_glob \
13214 want_nocaseglob \
13215 DLLTOOL \
13216 sharedlib_from_linklib_cmd \
1666913217 AR \
1667013218 AR_FLAGS \
13219 archiver_list_spec \
1667113220 STRIP \
1667213221 RANLIB \
1667313222 CC \
1667713226 lt_cv_sys_global_symbol_to_cdecl \
1667813227 lt_cv_sys_global_symbol_to_c_name_address \
1667913228 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
16680 SHELL \
16681 ECHO \
13229 nm_file_list_spec \
1668213230 lt_prog_compiler_no_builtin_flag \
13231 lt_prog_compiler_pic \
1668313232 lt_prog_compiler_wl \
16684 lt_prog_compiler_pic \
1668513233 lt_prog_compiler_static \
1668613234 lt_cv_prog_compiler_c_o \
1668713235 need_locks \
13236 MANIFEST_TOOL \
1668813237 DSYMUTIL \
1668913238 NMEDIT \
1669013239 LIPO \
1670013249 hardcode_libdir_flag_spec \
1670113250 hardcode_libdir_flag_spec_ld \
1670213251 hardcode_libdir_separator \
16703 fix_srcfile_path \
1670413252 exclude_expsyms \
1670513253 include_expsyms \
1670613254 file_list_spec \
1670813256 libname_spec \
1670913257 library_names_spec \
1671013258 soname_spec \
13259 install_override_mode \
1671113260 finish_eval \
1671213261 old_striplib \
16713 striplib \
16714 compiler_lib_search_dirs \
16715 predep_objects \
16716 postdep_objects \
16717 predeps \
16718 postdeps \
16719 compiler_lib_search_path \
16720 LD_CXX \
16721 compiler_CXX \
16722 lt_prog_compiler_no_builtin_flag_CXX \
16723 lt_prog_compiler_wl_CXX \
16724 lt_prog_compiler_pic_CXX \
16725 lt_prog_compiler_static_CXX \
16726 lt_cv_prog_compiler_c_o_CXX \
16727 export_dynamic_flag_spec_CXX \
16728 whole_archive_flag_spec_CXX \
16729 compiler_needs_object_CXX \
16730 with_gnu_ld_CXX \
16731 allow_undefined_flag_CXX \
16732 no_undefined_flag_CXX \
16733 hardcode_libdir_flag_spec_CXX \
16734 hardcode_libdir_flag_spec_ld_CXX \
16735 hardcode_libdir_separator_CXX \
16736 fix_srcfile_path_CXX \
16737 exclude_expsyms_CXX \
16738 include_expsyms_CXX \
16739 file_list_spec_CXX \
16740 compiler_lib_search_dirs_CXX \
16741 predep_objects_CXX \
16742 postdep_objects_CXX \
16743 predeps_CXX \
16744 postdeps_CXX \
16745 compiler_lib_search_path_CXX; do
16746 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
13262 striplib; do
13263 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1674713264 *[\\\\\\\`\\"\\\$]*)
16748 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
13265 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1674913266 ;;
1675013267 *)
1675113268 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1676713284 module_expsym_cmds \
1676813285 export_symbols_cmds \
1676913286 prelink_cmds \
13287 postlink_cmds \
1677013288 postinstall_cmds \
1677113289 postuninstall_cmds \
1677213290 finish_cmds \
1677313291 sys_lib_search_path_spec \
16774 sys_lib_dlsearch_path_spec \
16775 old_archive_cmds_CXX \
16776 old_archive_from_new_cmds_CXX \
16777 old_archive_from_expsyms_cmds_CXX \
16778 archive_cmds_CXX \
16779 archive_expsym_cmds_CXX \
16780 module_cmds_CXX \
16781 module_expsym_cmds_CXX \
16782 export_symbols_cmds_CXX \
16783 prelink_cmds_CXX; do
16784 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
13292 sys_lib_dlsearch_path_spec; do
13293 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1678513294 *[\\\\\\\`\\"\\\$]*)
16786 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
13295 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1678713296 ;;
1678813297 *)
1678913298 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1679113300 esac
1679213301 done
1679313302
16794 # Fix-up fallback echo if it was mangled by the above quoting rules.
16795 case \$lt_ECHO in
16796 *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
16797 ;;
16798 esac
16799
1680013303 ac_aux_dir='$ac_aux_dir'
1680113304 xsi_shell='$xsi_shell'
1680213305 lt_shell_append='$lt_shell_append'
1681313316 TIMESTAMP='$TIMESTAMP'
1681413317 RM='$RM'
1681513318 ofile='$ofile'
16816
16817
1681813319
1681913320
1682013321
1683113332 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
1683213333 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
1683313334 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
13335 "strpool/Makefile") CONFIG_FILES="$CONFIG_FILES strpool/Makefile" ;;
1683413336 "libatasmart.pc") CONFIG_FILES="$CONFIG_FILES libatasmart.pc" ;;
1683513337
16836 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13338 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1683713339 esac
1683813340 done
1683913341
1685613358 # after its creation but before its name has been assigned to `$tmp'.
1685713359 $debug ||
1685813360 {
16859 tmp=
13361 tmp= ac_tmp=
1686013362 trap 'exit_status=$?
16861 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
13363 : "${ac_tmp:=$tmp}"
13364 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
1686213365 ' 0
1686313366 trap 'as_fn_exit 1' 1 2 13 15
1686413367 }
1686613369
1686713370 {
1686813371 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16869 test -n "$tmp" && test -d "$tmp"
13372 test -d "$tmp"
1687013373 } ||
1687113374 {
1687213375 tmp=./conf$$-$RANDOM
1687313376 (umask 077 && mkdir "$tmp")
16874 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
13377 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13378 ac_tmp=$tmp
1687513379
1687613380 # Set up the scripts for CONFIG_FILES section.
1687713381 # No need to generate them if there are no CONFIG_FILES.
1688813392 fi
1688913393 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
1689013394 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16891 ac_cs_awk_cr='\r'
13395 ac_cs_awk_cr='\\r'
1689213396 else
1689313397 ac_cs_awk_cr=$ac_cr
1689413398 fi
1689513399
16896 echo 'BEGIN {' >"$tmp/subs1.awk" &&
13400 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
1689713401 _ACEOF
1689813402
1689913403
1690213406 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
1690313407 echo "_ACEOF"
1690413408 } >conf$$subs.sh ||
16905 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16906 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
13409 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13410 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
1690713411 ac_delim='%!_!# '
1690813412 for ac_last_try in false false false false false :; do
1690913413 . ./conf$$subs.sh ||
16910 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13414 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1691113415
1691213416 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
1691313417 if test $ac_delim_n = $ac_delim_num; then
1691413418 break
1691513419 elif $ac_last_try; then
16916 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13420 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1691713421 else
1691813422 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1691913423 fi
1692113425 rm -f conf$$subs.sh
1692213426
1692313427 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16924 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
13428 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
1692513429 _ACEOF
1692613430 sed -n '
1692713431 h
1696913473 rm -f conf$$subs.awk
1697013474 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1697113475 _ACAWK
16972 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
13476 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
1697313477 for (key in S) S_is_set[key] = 1
1697413478 FS = ""
1697513479
1700113505 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
1700213506 else
1700313507 cat
17004 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17005 || as_fn_error "could not setup config files machinery" "$LINENO" 5
13508 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13509 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
1700613510 _ACEOF
1700713511
17008 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17009 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13512 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13513 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
1701013514 # trailing colons and then remove the whole line if VPATH becomes empty
1701113515 # (actually we leave an empty line to preserve line numbers).
1701213516 if test "x$srcdir" = x.; then
17013 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17014 s/:*\$(srcdir):*/:/
17015 s/:*\${srcdir}:*/:/
17016 s/:*@srcdir@:*/:/
17017 s/^\([^=]*=[ ]*\):*/\1/
13517 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
13518 h
13519 s///
13520 s/^/:/
13521 s/[ ]*$/:/
13522 s/:\$(srcdir):/:/g
13523 s/:\${srcdir}:/:/g
13524 s/:@srcdir@:/:/g
13525 s/^:*//
1701813526 s/:*$//
13527 x
13528 s/\(=[ ]*\).*/\1/
13529 G
13530 s/\n//
1701913531 s/^[^=]*=[ ]*$//
1702013532 }'
1702113533 fi
1702713539 # No need to generate them if there are no CONFIG_HEADERS.
1702813540 # This happens for instance with `./config.status Makefile'.
1702913541 if test -n "$CONFIG_HEADERS"; then
17030 cat >"$tmp/defines.awk" <<\_ACAWK ||
13542 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
1703113543 BEGIN {
1703213544 _ACEOF
1703313545
1703913551 # handling of long lines.
1704013552 ac_delim='%!_!# '
1704113553 for ac_last_try in false false :; do
17042 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17043 if test -z "$ac_t"; then
13554 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13555 if test -z "$ac_tt"; then
1704413556 break
1704513557 elif $ac_last_try; then
17046 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
13558 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
1704713559 else
1704813560 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1704913561 fi
1712813640 _ACAWK
1712913641 _ACEOF
1713013642 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17131 as_fn_error "could not setup config headers machinery" "$LINENO" 5
13643 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
1713213644 fi # test -n "$CONFIG_HEADERS"
1713313645
1713413646
1714113653 esac
1714213654 case $ac_mode$ac_tag in
1714313655 :[FHL]*:*);;
17144 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
13656 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
1714513657 :[FH]-) ac_tag=-:-;;
1714613658 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
1714713659 esac
1716013672 for ac_f
1716113673 do
1716213674 case $ac_f in
17163 -) ac_f="$tmp/stdin";;
13675 -) ac_f="$ac_tmp/stdin";;
1716413676 *) # Look for the file first in the build tree, then in the source tree
1716513677 # (if the path is not absolute). The absolute path cannot be DOS-style,
1716613678 # because $ac_f cannot contain `:'.
1716913681 [\\/$]*) false;;
1717013682 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1717113683 esac ||
17172 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13684 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
1717313685 esac
1717413686 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
1717513687 as_fn_append ac_file_inputs " '$ac_f'"
1719513707 esac
1719613708
1719713709 case $ac_tag in
17198 *:-:* | *:-) cat >"$tmp/stdin" \
17199 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
13710 *:-:* | *:-) cat >"$ac_tmp/stdin" \
13711 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
1720013712 esac
1720113713 ;;
1720213714 esac
1733213844 s&@MKDIR_P@&$ac_MKDIR_P&;t t
1733313845 $ac_datarootdir_hack
1733413846 "
17335 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
17336 || as_fn_error "could not create $ac_file" "$LINENO" 5
13847 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13848 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1733713849
1733813850 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17339 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17340 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13851 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13852 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13853 "$ac_tmp/out"`; test -z "$ac_out"; } &&
1734113854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17342 which seems to be undefined. Please make sure it is defined." >&5
13855 which seems to be undefined. Please make sure it is defined" >&5
1734313856 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17344 which seems to be undefined. Please make sure it is defined." >&2;}
17345
17346 rm -f "$tmp/stdin"
13857 which seems to be undefined. Please make sure it is defined" >&2;}
13858
13859 rm -f "$ac_tmp/stdin"
1734713860 case $ac_file in
17348 -) cat "$tmp/out" && rm -f "$tmp/out";;
17349 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
13861 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13862 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
1735013863 esac \
17351 || as_fn_error "could not create $ac_file" "$LINENO" 5
13864 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1735213865 ;;
1735313866 :H)
1735413867 #
1735713870 if test x"$ac_file" != x-; then
1735813871 {
1735913872 $as_echo "/* $configure_input */" \
17360 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17361 } >"$tmp/config.h" \
17362 || as_fn_error "could not create $ac_file" "$LINENO" 5
17363 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
13873 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13874 } >"$ac_tmp/config.h" \
13875 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13876 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
1736413877 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
1736513878 $as_echo "$as_me: $ac_file is unchanged" >&6;}
1736613879 else
1736713880 rm -f "$ac_file"
17368 mv "$tmp/config.h" "$ac_file" \
17369 || as_fn_error "could not create $ac_file" "$LINENO" 5
13881 mv "$ac_tmp/config.h" "$ac_file" \
13882 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1737013883 fi
1737113884 else
1737213885 $as_echo "/* $configure_input */" \
17373 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17374 || as_fn_error "could not create -" "$LINENO" 5
13886 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13887 || as_fn_error $? "could not create -" "$LINENO" 5
1737513888 fi
1737613889 # Compute "$ac_file"'s index in $config_headers.
1737713890 _am_arg="$ac_file"
1753214045 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1753314046 #
1753414047 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
17535 # 2006, 2007, 2008 Free Software Foundation, Inc.
14048 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14049 # Inc.
1753614050 # Written by Gordon Matzigkeit, 1996
1753714051 #
1753814052 # This file is part of GNU Libtool.
1756014074
1756114075
1756214076 # The names of the tagged configurations supported by this script.
17563 available_tags="CXX "
14077 available_tags=""
1756414078
1756514079 # ### BEGIN LIBTOOL CONFIG
1756614080
1757914093
1758014094 # Whether or not to optimize for fast installation.
1758114095 fast_install=$enable_fast_install
14096
14097 # Shell to use when invoking shell scripts.
14098 SHELL=$lt_SHELL
14099
14100 # An echo program that protects backslashes.
14101 ECHO=$lt_ECHO
1758214102
1758314103 # The host system.
1758414104 host_alias=$host_alias
1762914149 # turn newlines into spaces.
1763014150 NL2SP=$lt_lt_NL2SP
1763114151
17632 # How to create reloadable object files.
17633 reload_flag=$lt_reload_flag
17634 reload_cmds=$lt_reload_cmds
14152 # convert \$build file names to \$host format.
14153 to_host_file_cmd=$lt_cv_to_host_file_cmd
14154
14155 # convert \$build files to toolchain format.
14156 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
1763514157
1763614158 # An object symbol dumper.
1763714159 OBJDUMP=$lt_OBJDUMP
1763914161 # Method to check whether dependent libraries are shared objects.
1764014162 deplibs_check_method=$lt_deplibs_check_method
1764114163
17642 # Command to use when deplibs_check_method == "file_magic".
14164 # Command to use when deplibs_check_method = "file_magic".
1764314165 file_magic_cmd=$lt_file_magic_cmd
14166
14167 # How to find potential files when deplibs_check_method = "file_magic".
14168 file_magic_glob=$lt_file_magic_glob
14169
14170 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
14171 want_nocaseglob=$lt_want_nocaseglob
14172
14173 # DLL creation program.
14174 DLLTOOL=$lt_DLLTOOL
14175
14176 # Command to associate shared and link libraries.
14177 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
1764414178
1764514179 # The archiver.
1764614180 AR=$lt_AR
14181
14182 # Flags to create an archive.
1764714183 AR_FLAGS=$lt_AR_FLAGS
14184
14185 # How to feed a file listing to the archiver.
14186 archiver_list_spec=$lt_archiver_list_spec
1764814187
1764914188 # A symbol stripping program.
1765014189 STRIP=$lt_STRIP
1765414193 old_postinstall_cmds=$lt_old_postinstall_cmds
1765514194 old_postuninstall_cmds=$lt_old_postuninstall_cmds
1765614195
14196 # Whether to use a lock for old archive extraction.
14197 lock_old_archive_extraction=$lock_old_archive_extraction
14198
1765714199 # A C compiler.
1765814200 LTCC=$lt_CC
1765914201
1767214214 # Transform the output of nm in a C name address pair when lib prefix is needed.
1767314215 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
1767414216
14217 # Specify filename containing input files for \$NM.
14218 nm_file_list_spec=$lt_nm_file_list_spec
14219
14220 # The root where to search for dependent libraries,and in which our libraries should be installed.
14221 lt_sysroot=$lt_sysroot
14222
1767514223 # The name of the directory that contains temporary libtool files.
1767614224 objdir=$objdir
1767714225
17678 # Shell to use when invoking shell scripts.
17679 SHELL=$lt_SHELL
17680
17681 # An echo program that does not interpret backslashes.
17682 ECHO=$lt_ECHO
17683
1768414226 # Used to examine libraries when file_magic_cmd begins with "file".
1768514227 MAGIC_CMD=$MAGIC_CMD
1768614228
1768714229 # Must we lock files when doing compilation?
1768814230 need_locks=$lt_need_locks
14231
14232 # Manifest tool.
14233 MANIFEST_TOOL=$lt_MANIFEST_TOOL
1768914234
1769014235 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
1769114236 DSYMUTIL=$lt_DSYMUTIL
1774314288 # The coded name of the library, if different from the real name.
1774414289 soname_spec=$lt_soname_spec
1774514290
14291 # Permission mode override for installation of shared libraries.
14292 install_override_mode=$lt_install_override_mode
14293
1774614294 # Command to use after installation of a shared archive.
1774714295 postinstall_cmds=$lt_postinstall_cmds
1774814296
1778214330 # The linker used to build libraries.
1778314331 LD=$lt_LD
1778414332
14333 # How to create reloadable object files.
14334 reload_flag=$lt_reload_flag
14335 reload_cmds=$lt_reload_cmds
14336
1778514337 # Commands used to build an old-style archive.
1778614338 old_archive_cmds=$lt_old_archive_cmds
1778714339
1779414346 # Compiler flag to turn off builtin functions.
1779514347 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
1779614348
14349 # Additional compiler flags for building library objects.
14350 pic_flag=$lt_lt_prog_compiler_pic
14351
1779714352 # How to pass a linker flag through the compiler.
1779814353 wl=$lt_lt_prog_compiler_wl
17799
17800 # Additional compiler flags for building library objects.
17801 pic_flag=$lt_lt_prog_compiler_pic
1780214354
1780314355 # Compiler flag to prevent dynamic linking.
1780414356 link_static_flag=$lt_lt_prog_compiler_static
1788614438 # Whether libtool must link a program against all its dependency libraries.
1788714439 link_all_deplibs=$link_all_deplibs
1788814440
17889 # Fix the shell variable \$srcfile for the compiler.
17890 fix_srcfile_path=$lt_fix_srcfile_path
17891
1789214441 # Set to "yes" if exported symbols are required.
1789314442 always_export_symbols=$always_export_symbols
1789414443
1790414453 # Commands necessary for linking programs (against libraries) with templates.
1790514454 prelink_cmds=$lt_prelink_cmds
1790614455
14456 # Commands necessary for finishing linking programs.
14457 postlink_cmds=$lt_postlink_cmds
14458
1790714459 # Specify filename containing input files.
1790814460 file_list_spec=$lt_file_list_spec
1790914461
1791014462 # How to hardcode a shared library path into an executable.
1791114463 hardcode_action=$hardcode_action
17912
17913 # The directories searched by this compiler when creating a shared library.
17914 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
17915
17916 # Dependencies to place before and after the objects being linked to
17917 # create a shared library.
17918 predep_objects=$lt_predep_objects
17919 postdep_objects=$lt_postdep_objects
17920 predeps=$lt_predeps
17921 postdeps=$lt_postdeps
17922
17923 # The library search path used internally by the compiler when linking
17924 # a shared library.
17925 compiler_lib_search_path=$lt_compiler_lib_search_path
1792614464
1792714465 # ### END LIBTOOL CONFIG
1792814466
1795014488 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1795114489 # text mode, it properly converts lines to CR/LF. This bash problem
1795214490 # is reportedly fixed, but why not run on old versions too?
17953 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
17954 || (rm -f "$cfgfile"; exit 1)
17955
17956 case $xsi_shell in
17957 yes)
17958 cat << \_LT_EOF >> "$cfgfile"
17959
17960 # func_dirname file append nondir_replacement
17961 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
17962 # otherwise set result to NONDIR_REPLACEMENT.
17963 func_dirname ()
17964 {
17965 case ${1} in
17966 */*) func_dirname_result="${1%/*}${2}" ;;
17967 * ) func_dirname_result="${3}" ;;
17968 esac
17969 }
17970
17971 # func_basename file
17972 func_basename ()
17973 {
17974 func_basename_result="${1##*/}"
17975 }
17976
17977 # func_dirname_and_basename file append nondir_replacement
17978 # perform func_basename and func_dirname in a single function
17979 # call:
17980 # dirname: Compute the dirname of FILE. If nonempty,
17981 # add APPEND to the result, otherwise set result
17982 # to NONDIR_REPLACEMENT.
17983 # value returned in "$func_dirname_result"
17984 # basename: Compute filename of FILE.
17985 # value retuned in "$func_basename_result"
17986 # Implementation must be kept synchronized with func_dirname
17987 # and func_basename. For efficiency, we do not delegate to
17988 # those functions but instead duplicate the functionality here.
17989 func_dirname_and_basename ()
17990 {
17991 case ${1} in
17992 */*) func_dirname_result="${1%/*}${2}" ;;
17993 * ) func_dirname_result="${3}" ;;
17994 esac
17995 func_basename_result="${1##*/}"
17996 }
17997
17998 # func_stripname prefix suffix name
17999 # strip PREFIX and SUFFIX off of NAME.
18000 # PREFIX and SUFFIX must not contain globbing or regex special
18001 # characters, hashes, percent signs, but SUFFIX may contain a leading
18002 # dot (in which case that matches only a dot).
18003 func_stripname ()
18004 {
18005 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
18006 # positional parameters, so assign one to ordinary parameter first.
18007 func_stripname_result=${3}
18008 func_stripname_result=${func_stripname_result#"${1}"}
18009 func_stripname_result=${func_stripname_result%"${2}"}
18010 }
18011
18012 # func_opt_split
18013 func_opt_split ()
18014 {
18015 func_opt_split_opt=${1%%=*}
18016 func_opt_split_arg=${1#*=}
18017 }
18018
18019 # func_lo2o object
18020 func_lo2o ()
18021 {
18022 case ${1} in
18023 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
18024 *) func_lo2o_result=${1} ;;
18025 esac
18026 }
18027
18028 # func_xform libobj-or-source
18029 func_xform ()
18030 {
18031 func_xform_result=${1%.*}.lo
18032 }
18033
18034 # func_arith arithmetic-term...
18035 func_arith ()
18036 {
18037 func_arith_result=$(( $* ))
18038 }
18039
18040 # func_len string
18041 # STRING may not start with a hyphen.
18042 func_len ()
18043 {
18044 func_len_result=${#1}
18045 }
18046
18047 _LT_EOF
18048 ;;
18049 *) # Bourne compatible functions.
18050 cat << \_LT_EOF >> "$cfgfile"
18051
18052 # func_dirname file append nondir_replacement
18053 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
18054 # otherwise set result to NONDIR_REPLACEMENT.
18055 func_dirname ()
18056 {
18057 # Extract subdirectory from the argument.
18058 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
18059 if test "X$func_dirname_result" = "X${1}"; then
18060 func_dirname_result="${3}"
18061 else
18062 func_dirname_result="$func_dirname_result${2}"
18063 fi
18064 }
18065
18066 # func_basename file
18067 func_basename ()
18068 {
18069 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
18070 }
18071
18072
18073 # func_stripname prefix suffix name
18074 # strip PREFIX and SUFFIX off of NAME.
18075 # PREFIX and SUFFIX must not contain globbing or regex special
18076 # characters, hashes, percent signs, but SUFFIX may contain a leading
18077 # dot (in which case that matches only a dot).
18078 # func_strip_suffix prefix name
18079 func_stripname ()
18080 {
18081 case ${2} in
18082 .*) func_stripname_result=`$ECHO "X${3}" \
18083 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
18084 *) func_stripname_result=`$ECHO "X${3}" \
18085 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
18086 esac
18087 }
18088
18089 # sed scripts:
18090 my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
18091 my_sed_long_arg='1s/^-[^=]*=//'
18092
18093 # func_opt_split
18094 func_opt_split ()
18095 {
18096 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
18097 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
18098 }
18099
18100 # func_lo2o object
18101 func_lo2o ()
18102 {
18103 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
18104 }
18105
18106 # func_xform libobj-or-source
18107 func_xform ()
18108 {
18109 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
18110 }
18111
18112 # func_arith arithmetic-term...
18113 func_arith ()
18114 {
18115 func_arith_result=`expr "$@"`
18116 }
18117
18118 # func_len string
18119 # STRING may not start with a hyphen.
18120 func_len ()
18121 {
18122 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
18123 }
18124
18125 _LT_EOF
18126 esac
18127
18128 case $lt_shell_append in
18129 yes)
18130 cat << \_LT_EOF >> "$cfgfile"
18131
18132 # func_append var value
18133 # Append VALUE to the end of shell variable VAR.
18134 func_append ()
18135 {
18136 eval "$1+=\$2"
18137 }
18138 _LT_EOF
18139 ;;
18140 *)
18141 cat << \_LT_EOF >> "$cfgfile"
18142
18143 # func_append var value
18144 # Append VALUE to the end of shell variable VAR.
18145 func_append ()
18146 {
18147 eval "$1=\$$1\$2"
18148 }
18149
18150 _LT_EOF
18151 ;;
18152 esac
18153
18154
18155 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
18156 || (rm -f "$cfgfile"; exit 1)
18157
18158 mv -f "$cfgfile" "$ofile" ||
14491 sed '$q' "$ltmain" >> "$cfgfile" \
14492 || (rm -f "$cfgfile"; exit 1)
14493
14494 if test x"$xsi_shell" = xyes; then
14495 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
14496 func_dirname ()\
14497 {\
14498 \ case ${1} in\
14499 \ */*) func_dirname_result="${1%/*}${2}" ;;\
14500 \ * ) func_dirname_result="${3}" ;;\
14501 \ esac\
14502 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
14503 && mv -f "$cfgfile.tmp" "$cfgfile" \
14504 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14505 test 0 -eq $? || _lt_function_replace_fail=:
14506
14507
14508 sed -e '/^func_basename ()$/,/^} # func_basename /c\
14509 func_basename ()\
14510 {\
14511 \ func_basename_result="${1##*/}"\
14512 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
14513 && mv -f "$cfgfile.tmp" "$cfgfile" \
14514 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14515 test 0 -eq $? || _lt_function_replace_fail=:
14516
14517
14518 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
14519 func_dirname_and_basename ()\
14520 {\
14521 \ case ${1} in\
14522 \ */*) func_dirname_result="${1%/*}${2}" ;;\
14523 \ * ) func_dirname_result="${3}" ;;\
14524 \ esac\
14525 \ func_basename_result="${1##*/}"\
14526 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
14527 && mv -f "$cfgfile.tmp" "$cfgfile" \
14528 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14529 test 0 -eq $? || _lt_function_replace_fail=:
14530
14531
14532 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
14533 func_stripname ()\
14534 {\
14535 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
14536 \ # positional parameters, so assign one to ordinary parameter first.\
14537 \ func_stripname_result=${3}\
14538 \ func_stripname_result=${func_stripname_result#"${1}"}\
14539 \ func_stripname_result=${func_stripname_result%"${2}"}\
14540 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
14541 && mv -f "$cfgfile.tmp" "$cfgfile" \
14542 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14543 test 0 -eq $? || _lt_function_replace_fail=:
14544
14545
14546 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
14547 func_split_long_opt ()\
14548 {\
14549 \ func_split_long_opt_name=${1%%=*}\
14550 \ func_split_long_opt_arg=${1#*=}\
14551 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
14552 && mv -f "$cfgfile.tmp" "$cfgfile" \
14553 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14554 test 0 -eq $? || _lt_function_replace_fail=:
14555
14556
14557 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
14558 func_split_short_opt ()\
14559 {\
14560 \ func_split_short_opt_arg=${1#??}\
14561 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
14562 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
14563 && mv -f "$cfgfile.tmp" "$cfgfile" \
14564 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14565 test 0 -eq $? || _lt_function_replace_fail=:
14566
14567
14568 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
14569 func_lo2o ()\
14570 {\
14571 \ case ${1} in\
14572 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
14573 \ *) func_lo2o_result=${1} ;;\
14574 \ esac\
14575 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
14576 && mv -f "$cfgfile.tmp" "$cfgfile" \
14577 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14578 test 0 -eq $? || _lt_function_replace_fail=:
14579
14580
14581 sed -e '/^func_xform ()$/,/^} # func_xform /c\
14582 func_xform ()\
14583 {\
14584 func_xform_result=${1%.*}.lo\
14585 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
14586 && mv -f "$cfgfile.tmp" "$cfgfile" \
14587 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14588 test 0 -eq $? || _lt_function_replace_fail=:
14589
14590
14591 sed -e '/^func_arith ()$/,/^} # func_arith /c\
14592 func_arith ()\
14593 {\
14594 func_arith_result=$(( $* ))\
14595 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
14596 && mv -f "$cfgfile.tmp" "$cfgfile" \
14597 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14598 test 0 -eq $? || _lt_function_replace_fail=:
14599
14600
14601 sed -e '/^func_len ()$/,/^} # func_len /c\
14602 func_len ()\
14603 {\
14604 func_len_result=${#1}\
14605 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
14606 && mv -f "$cfgfile.tmp" "$cfgfile" \
14607 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14608 test 0 -eq $? || _lt_function_replace_fail=:
14609
14610 fi
14611
14612 if test x"$lt_shell_append" = xyes; then
14613 sed -e '/^func_append ()$/,/^} # func_append /c\
14614 func_append ()\
14615 {\
14616 eval "${1}+=\\${2}"\
14617 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
14618 && mv -f "$cfgfile.tmp" "$cfgfile" \
14619 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14620 test 0 -eq $? || _lt_function_replace_fail=:
14621
14622
14623 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
14624 func_append_quoted ()\
14625 {\
14626 \ func_quote_for_eval "${2}"\
14627 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
14628 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
14629 && mv -f "$cfgfile.tmp" "$cfgfile" \
14630 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14631 test 0 -eq $? || _lt_function_replace_fail=:
14632
14633
14634 # Save a `func_append' function call where possible by direct use of '+='
14635 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
14636 && mv -f "$cfgfile.tmp" "$cfgfile" \
14637 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14638 test 0 -eq $? || _lt_function_replace_fail=:
14639 else
14640 # Save a `func_append' function call even when '+=' is not available
14641 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
14642 && mv -f "$cfgfile.tmp" "$cfgfile" \
14643 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14644 test 0 -eq $? || _lt_function_replace_fail=:
14645 fi
14646
14647 if test x"$_lt_function_replace_fail" = x":"; then
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
14649 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
14650 fi
14651
14652
14653 mv -f "$cfgfile" "$ofile" ||
1815914654 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1816014655 chmod +x "$ofile"
18161
18162
18163 cat <<_LT_EOF >> "$ofile"
18164
18165 # ### BEGIN LIBTOOL TAG CONFIG: CXX
18166
18167 # The linker used to build libraries.
18168 LD=$lt_LD_CXX
18169
18170 # Commands used to build an old-style archive.
18171 old_archive_cmds=$lt_old_archive_cmds_CXX
18172
18173 # A language specific compiler.
18174 CC=$lt_compiler_CXX
18175
18176 # Is the compiler the GNU compiler?
18177 with_gcc=$GCC_CXX
18178
18179 # Compiler flag to turn off builtin functions.
18180 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
18181
18182 # How to pass a linker flag through the compiler.
18183 wl=$lt_lt_prog_compiler_wl_CXX
18184
18185 # Additional compiler flags for building library objects.
18186 pic_flag=$lt_lt_prog_compiler_pic_CXX
18187
18188 # Compiler flag to prevent dynamic linking.
18189 link_static_flag=$lt_lt_prog_compiler_static_CXX
18190
18191 # Does compiler simultaneously support -c and -o options?
18192 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
18193
18194 # Whether or not to add -lc for building shared libraries.
18195 build_libtool_need_lc=$archive_cmds_need_lc_CXX
18196
18197 # Whether or not to disallow shared libs when runtime libs are static.
18198 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
18199
18200 # Compiler flag to allow reflexive dlopens.
18201 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
18202
18203 # Compiler flag to generate shared objects directly from archives.
18204 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
18205
18206 # Whether the compiler copes with passing no objects directly.
18207 compiler_needs_object=$lt_compiler_needs_object_CXX
18208
18209 # Create an old-style archive from a shared archive.
18210 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
18211
18212 # Create a temporary old-style archive to link instead of a shared archive.
18213 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
18214
18215 # Commands used to build a shared archive.
18216 archive_cmds=$lt_archive_cmds_CXX
18217 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
18218
18219 # Commands used to build a loadable module if different from building
18220 # a shared archive.
18221 module_cmds=$lt_module_cmds_CXX
18222 module_expsym_cmds=$lt_module_expsym_cmds_CXX
18223
18224 # Whether we are building with GNU ld or not.
18225 with_gnu_ld=$lt_with_gnu_ld_CXX
18226
18227 # Flag that allows shared libraries with undefined symbols to be built.
18228 allow_undefined_flag=$lt_allow_undefined_flag_CXX
18229
18230 # Flag that enforces no undefined symbols.
18231 no_undefined_flag=$lt_no_undefined_flag_CXX
18232
18233 # Flag to hardcode \$libdir into a binary during linking.
18234 # This must work even if \$libdir does not exist
18235 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
18236
18237 # If ld is used when linking, flag to hardcode \$libdir into a binary
18238 # during linking. This must work even if \$libdir does not exist.
18239 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
18240
18241 # Whether we need a single "-rpath" flag with a separated argument.
18242 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
18243
18244 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
18245 # DIR into the resulting binary.
18246 hardcode_direct=$hardcode_direct_CXX
18247
18248 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
18249 # DIR into the resulting binary and the resulting library dependency is
18250 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
18251 # library is relocated.
18252 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
18253
18254 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
18255 # into the resulting binary.
18256 hardcode_minus_L=$hardcode_minus_L_CXX
18257
18258 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
18259 # into the resulting binary.
18260 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
18261
18262 # Set to "yes" if building a shared library automatically hardcodes DIR
18263 # into the library and all subsequent libraries and executables linked
18264 # against it.
18265 hardcode_automatic=$hardcode_automatic_CXX
18266
18267 # Set to yes if linker adds runtime paths of dependent libraries
18268 # to runtime path list.
18269 inherit_rpath=$inherit_rpath_CXX
18270
18271 # Whether libtool must link a program against all its dependency libraries.
18272 link_all_deplibs=$link_all_deplibs_CXX
18273
18274 # Fix the shell variable \$srcfile for the compiler.
18275 fix_srcfile_path=$lt_fix_srcfile_path_CXX
18276
18277 # Set to "yes" if exported symbols are required.
18278 always_export_symbols=$always_export_symbols_CXX
18279
18280 # The commands to list exported symbols.
18281 export_symbols_cmds=$lt_export_symbols_cmds_CXX
18282
18283 # Symbols that should not be listed in the preloaded symbols.
18284 exclude_expsyms=$lt_exclude_expsyms_CXX
18285
18286 # Symbols that must always be exported.
18287 include_expsyms=$lt_include_expsyms_CXX
18288
18289 # Commands necessary for linking programs (against libraries) with templates.
18290 prelink_cmds=$lt_prelink_cmds_CXX
18291
18292 # Specify filename containing input files.
18293 file_list_spec=$lt_file_list_spec_CXX
18294
18295 # How to hardcode a shared library path into an executable.
18296 hardcode_action=$hardcode_action_CXX
18297
18298 # The directories searched by this compiler when creating a shared library.
18299 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
18300
18301 # Dependencies to place before and after the objects being linked to
18302 # create a shared library.
18303 predep_objects=$lt_predep_objects_CXX
18304 postdep_objects=$lt_postdep_objects_CXX
18305 predeps=$lt_predeps_CXX
18306 postdeps=$lt_postdeps_CXX
18307
18308 # The library search path used internally by the compiler when linking
18309 # a shared library.
18310 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
18311
18312 # ### END LIBTOOL TAG CONFIG: CXX
18313 _LT_EOF
1831414656
1831514657 ;;
1831614658
1832314665 ac_clean_files=$ac_clean_files_save
1832414666
1832514667 test $ac_write_fail = 0 ||
18326 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14668 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
1832714669
1832814670
1832914671 # configure is writing to config.log, and then calls config.status.
1834414686 exec 5>>config.log
1834514687 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1834614688 # would make configure fail if this is the last instruction.
18347 $ac_cs_success || as_fn_exit $?
14689 $ac_cs_success || as_fn_exit 1
1834814690 fi
1834914691 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1835014692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
0 # -*- Autoconf -*-
1 # Process this file with autoconf to produce a configure script.
0 dnl -*- Autoconf -*-
1 dnl Process this file with autoconf to produce a configure script.
22
3 # This file is part of libatasmart.
4 #
5 # Copyright 2008 Lennart Poettering
6 #
7 # libatasmart is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation, either version 2.1 of the
10 # License, or (at your option) any later version.
11 #
12 # libatasmart is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with libatasmart. If not, If not, see
19 # <http://www.gnu.org/licenses/>.
3 dnl This file is part of libatasmart.
4 dnl
5 dnl Copyright 2008 Lennart Poettering
6 dnl
7 dnl libatasmart is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU Lesser General Public License as
9 dnl published by the Free Software Foundation, either version 2.1 of the
10 dnl License, or (at your option) any later version.
11 dnl
12 dnl libatasmart is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 dnl Lesser General Public License for more details.
16 dnl
17 dnl You should have received a copy of the GNU Lesser General Public
18 dnl License along with libatasmart. If not, If not, see
19 dnl <http://www.gnu.org/licenses/>.
2020
2121 AC_PREREQ(2.63)
2222
23 AC_INIT([libatasmart], 0.17, [mzyvongnfzneg (at) 0pointer (dot) net])
23 AC_INIT([libatasmart], 0.18, [mzyvongnfzneg (at) 0pointer (dot) net])
2424 AC_CONFIG_SRCDIR([atasmart.c])
2525 AC_CONFIG_HEADERS([config.h])
2626 AC_CONFIG_MACRO_DIR(m4)
2929
3030 AC_SUBST(PACKAGE_URL, [http://git.0pointer.de/?p=libatasmart.git])
3131
32 AC_SUBST(LIBATASMART_VERSION_INFO, [4:3:0])
33
34 AC_CANONICAL_HOST
32 AC_SUBST(LIBATASMART_VERSION_INFO, [4:4:0])
3533
3634 AM_SILENT_RULES([yes])
3735
4038 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
4139 fi
4240
43 #### Checks for programs. ####
44
45 # CC
46
4741 AC_PROG_CC
42 AC_PROG_CC_C99
4843 AM_PROG_CC_C_O
4944 AC_PROG_GCC_TRADITIONAL
45 AX_CC_FOR_BUILD
46
5047 AC_USE_SYSTEM_EXTENSIONS
51
52 # C++
53
54 AC_PROG_CXX
55
56 # GCC flags
57
58 test_gcc_flag() {
59 AC_LANG_CONFTEST([int main(int argc, char*argv[]) {}])
60 $CC -c conftest.c $CFLAGS "$1" -o conftest.o > /dev/null 2> /dev/null
61 ret=$?
62 rm -f conftest.o
63 return $ret
64 }
65
66 # If using GCC specify some additional parameters
67 if test "x$GCC" = "xyes" ; then
68
69 # We use gnu99 instead of c99 because many have interpreted the standard
70 # in a way that int64_t isn't defined on non-64 bit platforms.
71 DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
72
73 for flag in $DESIRED_FLAGS ; do
74 AC_MSG_CHECKING([whether $CC accepts $flag])
75 if test_gcc_flag $flag ; then
76 CFLAGS="$CFLAGS $flag"
77 CXXFLAGS="$CXXFLAGS $flag"
78 AC_MSG_RESULT([yes])
79 else
80 AC_MSG_RESULT([no])
81 fi
82 done
83 fi
84
85 #### libtool stuff ####
48 AC_SYS_LARGEFILE
8649
8750 AC_PROG_LIBTOOL
8851
89 #### Checks for header files. ####
90
91 # ISO
92 AC_HEADER_STDC
93
94 # XPG4-UNIX
95 AC_CHECK_HEADERS([sys/poll.h])
96
97 # Other
98 AC_CHECK_HEADERS([sys/ioctl.h])
99 AC_CHECK_HEADERS([byteswap.h])
100
101 #### Typdefs, structures, etc. ####
102
103 AC_C_CONST
104 AC_C_BIGENDIAN
105 AC_TYPE_PID_T
106 AC_TYPE_SIZE_T
107 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
108 [Define ssize_t if it is not done by the standard libs.])])
109 AC_TYPE_OFF_T
110 AC_TYPE_SIGNAL
111 AC_TYPE_UID_T
112
113 #### Large File-Support (LFS) ####
114
115 AC_SYS_LARGEFILE
52 dnl Check compiler flags
53 CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math])
11654
11755 PKG_CHECK_MODULES([LIBUDEV], [libudev >= 143])
11856
119 ###################################
120 # Output #
121 ###################################
57 dnl###################################
58 dnl# Output #
59 dnl###################################
12260
12361 AC_CONFIG_FILES([
12462 Makefile
63 strpool/Makefile
12564 libatasmart.pc
12665 ])
12766 AC_OUTPUT
00 prefix=@prefix@
11 exec_prefix=${prefix}
22 libdir=@libdir@
3 includedir=${prefix}/include
3 includedir=@includedir@
44
55 Name: libatasmart
66 Description: ATA S.M.A.R.T. Reading and Parsing Library
+2759
-1536
ltmain.sh less more
0 # Generated from ltmain.m4sh.
1
2 # ltmain.sh (GNU libtool) 2.2.6b
0
1 # libtool (GNU libtool) 2.4
32 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
43
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
66 # This is free software; see the source for copying conditions. There is NO
77 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88
3131 #
3232 # Provide generalized library-building support services.
3333 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --tag=TAG use configuration variables from tag TAG
42 # -v, --verbose print informational messages (default)
43 # --version print version information
44 # -h, --help print short or long help message
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --tag=TAG use configuration variables from tag TAG
44 # -v, --verbose print more informational messages than default
45 # --no-verbose don't print the extra informational messages
46 # --version print version information
47 # -h, --help, --help-all print short, long, or detailed help message
4548 #
4649 # MODE must be one of the following:
4750 #
48 # clean remove files from the build directory
49 # compile compile a source file into a libtool object
50 # execute automatically set library path, then run a program
51 # finish complete the installation of libtool libraries
52 # install install libraries or executables
53 # link create a library or an executable
54 # uninstall remove libraries from an installed directory
51 # clean remove files from the build directory
52 # compile compile a source file into a libtool object
53 # execute automatically set library path, then run a program
54 # finish complete the installation of libtool libraries
55 # install install libraries or executables
56 # link create a library or an executable
57 # uninstall remove libraries from an installed directory
5558 #
56 # MODE-ARGS vary depending on the MODE.
59 # MODE-ARGS vary depending on the MODE. When passed as first option,
60 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
5761 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
5862 #
5963 # When reporting a bug, please describe a test case to reproduce it and
6064 # include the following information:
6165 #
62 # host-triplet: $host
63 # shell: $SHELL
64 # compiler: $LTCC
65 # compiler flags: $LTCFLAGS
66 # linker: $LD (gnu? $with_gnu_ld)
67 # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
68 # automake: $automake_version
69 # autoconf: $autoconf_version
66 # host-triplet: $host
67 # shell: $SHELL
68 # compiler: $LTCC
69 # compiler flags: $LTCFLAGS
70 # linker: $LD (gnu? $with_gnu_ld)
71 # $progname: (GNU libtool) 2.4
72 # automake: $automake_version
73 # autoconf: $autoconf_version
7074 #
7175 # Report bugs to <bug-libtool@gnu.org>.
72
73 PROGRAM=ltmain.sh
76 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
77 # General help using GNU software: <http://www.gnu.org/gethelp/>.
78
79 PROGRAM=libtool
7480 PACKAGE=libtool
75 VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
81 VERSION=2.4
7682 TIMESTAMP=""
77 package_revision=1.3017
83 package_revision=1.3293
7884
7985 # Be Bourne compatible
8086 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9096 BIN_SH=xpg4; export BIN_SH # for Tru64
9197 DUALCASE=1; export DUALCASE # for MKS sh
9298
99 # A function that is used when there is no print builtin or printf.
100 func_fallback_echo ()
101 {
102 eval 'cat <<_LTECHO_EOF
103 $1
104 _LTECHO_EOF'
105 }
106
93107 # NLS nuisances: We save the old values to restore during execute mode.
94 # Only set LANG and LC_ALL to C if already set.
95 # These must not be set unconditionally because not all systems understand
96 # e.g. LANG=C (notably SCO).
97108 lt_user_locale=
98109 lt_safe_locale=
99110 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
106117 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
107118 fi"
108119 done
120 LC_ALL=C
121 LANGUAGE=C
122 export LANGUAGE LC_ALL
109123
110124 $lt_unset CDPATH
111125
112126
127 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
128 # is ksh but when the shell is invoked as "sh" and the current value of
129 # the _XPG environment variable is not equal to 1 (one), the special
130 # positional parameter $0, within a function call, is the name of the
131 # function.
132 progpath="$0"
113133
114134
115135
116136 : ${CP="cp -f"}
117 : ${ECHO="echo"}
137 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
118138 : ${EGREP="/bin/grep -E"}
119139 : ${FGREP="/bin/grep -F"}
120140 : ${GREP="/bin/grep"}
142162
143163 dirname="s,/[^/]*$,,"
144164 basename="s,^.*/,,"
165
166 # func_dirname file append nondir_replacement
167 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
168 # otherwise set result to NONDIR_REPLACEMENT.
169 func_dirname ()
170 {
171 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
172 if test "X$func_dirname_result" = "X${1}"; then
173 func_dirname_result="${3}"
174 else
175 func_dirname_result="$func_dirname_result${2}"
176 fi
177 } # func_dirname may be replaced by extended shell implementation
178
179
180 # func_basename file
181 func_basename ()
182 {
183 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
184 } # func_basename may be replaced by extended shell implementation
185
145186
146187 # func_dirname_and_basename file append nondir_replacement
147188 # perform func_basename and func_dirname in a single function
157198 # those functions but instead duplicate the functionality here.
158199 func_dirname_and_basename ()
159200 {
160 # Extract subdirectory from the argument.
161 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
162 if test "X$func_dirname_result" = "X${1}"; then
163 func_dirname_result="${3}"
164 else
165 func_dirname_result="$func_dirname_result${2}"
201 # Extract subdirectory from the argument.
202 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
203 if test "X$func_dirname_result" = "X${1}"; then
204 func_dirname_result="${3}"
205 else
206 func_dirname_result="$func_dirname_result${2}"
207 fi
208 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
209 } # func_dirname_and_basename may be replaced by extended shell implementation
210
211
212 # func_stripname prefix suffix name
213 # strip PREFIX and SUFFIX off of NAME.
214 # PREFIX and SUFFIX must not contain globbing or regex special
215 # characters, hashes, percent signs, but SUFFIX may contain a leading
216 # dot (in which case that matches only a dot).
217 # func_strip_suffix prefix name
218 func_stripname ()
219 {
220 case ${2} in
221 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
222 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
223 esac
224 } # func_stripname may be replaced by extended shell implementation
225
226
227 # These SED scripts presuppose an absolute path with a trailing slash.
228 pathcar='s,^/\([^/]*\).*$,\1,'
229 pathcdr='s,^/[^/]*,,'
230 removedotparts=':dotsl
231 s@/\./@/@g
232 t dotsl
233 s,/\.$,/,'
234 collapseslashes='s@/\{1,\}@/@g'
235 finalslash='s,/*$,/,'
236
237 # func_normal_abspath PATH
238 # Remove doubled-up and trailing slashes, "." path components,
239 # and cancel out any ".." path components in PATH after making
240 # it an absolute path.
241 # value returned in "$func_normal_abspath_result"
242 func_normal_abspath ()
243 {
244 # Start from root dir and reassemble the path.
245 func_normal_abspath_result=
246 func_normal_abspath_tpath=$1
247 func_normal_abspath_altnamespace=
248 case $func_normal_abspath_tpath in
249 "")
250 # Empty path, that just means $cwd.
251 func_stripname '' '/' "`pwd`"
252 func_normal_abspath_result=$func_stripname_result
253 return
254 ;;
255 # The next three entries are used to spot a run of precisely
256 # two leading slashes without using negated character classes;
257 # we take advantage of case's first-match behaviour.
258 ///*)
259 # Unusual form of absolute path, do nothing.
260 ;;
261 //*)
262 # Not necessarily an ordinary path; POSIX reserves leading '//'
263 # and for example Cygwin uses it to access remote file shares
264 # over CIFS/SMB, so we conserve a leading double slash if found.
265 func_normal_abspath_altnamespace=/
266 ;;
267 /*)
268 # Absolute path, do nothing.
269 ;;
270 *)
271 # Relative path, prepend $cwd.
272 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
273 ;;
274 esac
275 # Cancel out all the simple stuff to save iterations. We also want
276 # the path to end with a slash for ease of parsing, so make sure
277 # there is one (and only one) here.
278 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
279 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
280 while :; do
281 # Processed it all yet?
282 if test "$func_normal_abspath_tpath" = / ; then
283 # If we ascended to the root using ".." the result may be empty now.
284 if test -z "$func_normal_abspath_result" ; then
285 func_normal_abspath_result=/
286 fi
287 break
288 fi
289 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
290 -e "$pathcar"`
291 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
292 -e "$pathcdr"`
293 # Figure out what to do with it
294 case $func_normal_abspath_tcomponent in
295 "")
296 # Trailing empty path component, ignore it.
297 ;;
298 ..)
299 # Parent dir; strip last assembled component from result.
300 func_dirname "$func_normal_abspath_result"
301 func_normal_abspath_result=$func_dirname_result
302 ;;
303 *)
304 # Actual path component, append it.
305 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
306 ;;
307 esac
308 done
309 # Restore leading double-slash if one was found on entry.
310 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
311 }
312
313 # func_relative_path SRCDIR DSTDIR
314 # generates a relative path from SRCDIR to DSTDIR, with a trailing
315 # slash if non-empty, suitable for immediately appending a filename
316 # without needing to append a separator.
317 # value returned in "$func_relative_path_result"
318 func_relative_path ()
319 {
320 func_relative_path_result=
321 func_normal_abspath "$1"
322 func_relative_path_tlibdir=$func_normal_abspath_result
323 func_normal_abspath "$2"
324 func_relative_path_tbindir=$func_normal_abspath_result
325
326 # Ascend the tree starting from libdir
327 while :; do
328 # check if we have found a prefix of bindir
329 case $func_relative_path_tbindir in
330 $func_relative_path_tlibdir)
331 # found an exact match
332 func_relative_path_tcancelled=
333 break
334 ;;
335 $func_relative_path_tlibdir*)
336 # found a matching prefix
337 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
338 func_relative_path_tcancelled=$func_stripname_result
339 if test -z "$func_relative_path_result"; then
340 func_relative_path_result=.
341 fi
342 break
343 ;;
344 *)
345 func_dirname $func_relative_path_tlibdir
346 func_relative_path_tlibdir=${func_dirname_result}
347 if test "x$func_relative_path_tlibdir" = x ; then
348 # Have to descend all the way to the root!
349 func_relative_path_result=../$func_relative_path_result
350 func_relative_path_tcancelled=$func_relative_path_tbindir
351 break
352 fi
353 func_relative_path_result=../$func_relative_path_result
354 ;;
355 esac
356 done
357
358 # Now calculate path; take care to avoid doubling-up slashes.
359 func_stripname '' '/' "$func_relative_path_result"
360 func_relative_path_result=$func_stripname_result
361 func_stripname '/' '/' "$func_relative_path_tcancelled"
362 if test "x$func_stripname_result" != x ; then
363 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
166364 fi
167 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
168 }
169
170 # Generated shell functions inserted here.
171
172 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
173 # is ksh but when the shell is invoked as "sh" and the current value of
174 # the _XPG environment variable is not equal to 1 (one), the special
175 # positional parameter $0, within a function call, is the name of the
176 # function.
177 progpath="$0"
365
366 # Normalisation. If bindir is libdir, return empty string,
367 # else relative path ending with a slash; either way, target
368 # file name can be directly appended.
369 if test ! -z "$func_relative_path_result"; then
370 func_stripname './' '' "$func_relative_path_result/"
371 func_relative_path_result=$func_stripname_result
372 fi
373 }
178374
179375 # The name of this program:
180 # In the unlikely event $progname began with a '-', it would play havoc with
181 # func_echo (imagine progname=-n), so we prepend ./ in that case:
182376 func_dirname_and_basename "$progpath"
183377 progname=$func_basename_result
184 case $progname in
185 -*) progname=./$progname ;;
186 esac
187378
188379 # Make sure we have an absolute path for reexecution:
189380 case $progpath in
214405 # Same as above, but do not quote variable references.
215406 double_quote_subst='s/\(["`\\]\)/\\\1/g'
216407
408 # Sed substitution that turns a string into a regex matching for the
409 # string literally.
410 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
411
412 # Sed substitution that converts a w32 file name or path
413 # which contains forward slashes, into one that contains
414 # (escaped) backslashes. A very naive implementation.
415 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
416
217417 # Re-`\' parameter expansions in output of double_quote_subst that were
218418 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
219419 # in input to double_quote_subst, that '$' was protected from expansion.
242442 # name if it has been set yet.
243443 func_echo ()
244444 {
245 $ECHO "$progname${mode+: }$mode: $*"
445 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
246446 }
247447
248448 # func_verbose arg...
257457 :
258458 }
259459
460 # func_echo_all arg...
461 # Invoke $ECHO with all args, space-separated.
462 func_echo_all ()
463 {
464 $ECHO "$*"
465 }
466
260467 # func_error arg...
261468 # Echo program name prefixed message to standard error.
262469 func_error ()
263470 {
264 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
471 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
265472 }
266473
267474 # func_warning arg...
268475 # Echo program name prefixed warning message to standard error.
269476 func_warning ()
270477 {
271 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
478 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
272479
273480 # bash bug again:
274481 :
325532 case $my_directory_path in */*) ;; *) break ;; esac
326533
327534 # ...otherwise throw away the child directory and loop
328 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
535 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
329536 done
330 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
537 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
331538
332539 save_mkdir_p_IFS="$IFS"; IFS=':'
333540 for my_dir in $my_dir_list; do
377584 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
378585 fi
379586
380 $ECHO "X$my_tmpdir" | $Xsed
587 $ECHO "$my_tmpdir"
381588 }
382589
383590
391598 {
392599 case $1 in
393600 *[\\\`\"\$]*)
394 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
601 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
395602 *)
396603 func_quote_for_eval_unquoted_result="$1" ;;
397604 esac
418625 {
419626 case $1 in
420627 *[\\\`\"]*)
421 my_arg=`$ECHO "X$1" | $Xsed \
628 my_arg=`$ECHO "$1" | $SED \
422629 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
423630 *)
424631 my_arg="$1" ;;
487694 fi
488695 }
489696
490
491
697 # func_tr_sh
698 # Turn $1 into a string suitable for a shell variable name.
699 # Result is stored in $func_tr_sh_result. All characters
700 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
701 # if $1 begins with a digit, a '_' is prepended as well.
702 func_tr_sh ()
703 {
704 case $1 in
705 [0-9]* | *[!a-zA-Z0-9_]*)
706 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
707 ;;
708 * )
709 func_tr_sh_result=$1
710 ;;
711 esac
712 }
492713
493714
494715 # func_version
495716 # Echo version message to standard output and exit.
496717 func_version ()
497718 {
498 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
719 $opt_debug
720
721 $SED -n '/(C)/!b go
722 :more
723 /\./!{
724 N
725 s/\n# / /
726 b more
727 }
728 :go
729 /^# '$PROGRAM' (GNU /,/# warranty; / {
499730 s/^# //
500731 s/^# *$//
501732 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
508739 # Echo short help message to standard output and exit.
509740 func_usage ()
510741 {
511 $SED -n '/^# Usage:/,/# -h/ {
742 $opt_debug
743
744 $SED -n '/^# Usage:/,/^# *.*--help/ {
512745 s/^# //
513746 s/^# *$//
514747 s/\$progname/'$progname'/
515748 p
516749 }' < "$progpath"
517 $ECHO
750 echo
518751 $ECHO "run \`$progname --help | more' for full usage"
519752 exit $?
520753 }
521754
522 # func_help
523 # Echo long help message to standard output and exit.
755 # func_help [NOEXIT]
756 # Echo long help message to standard output and exit,
757 # unless 'noexit' is passed as argument.
524758 func_help ()
525759 {
760 $opt_debug
761
526762 $SED -n '/^# Usage:/,/# Report bugs to/ {
763 :print
527764 s/^# //
528765 s/^# *$//
529766 s*\$progname*'$progname'*
536773 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
537774 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
538775 p
539 }' < "$progpath"
540 exit $?
776 d
777 }
778 /^# .* home page:/b print
779 /^# General help using/b print
780 ' < "$progpath"
781 ret=$?
782 if test -z "$1"; then
783 exit $ret
784 fi
541785 }
542786
543787 # func_missing_arg argname
545789 # exit_cmd.
546790 func_missing_arg ()
547791 {
548 func_error "missing argument for $1"
792 $opt_debug
793
794 func_error "missing argument for $1."
549795 exit_cmd=exit
550796 }
551797
798
799 # func_split_short_opt shortopt
800 # Set func_split_short_opt_name and func_split_short_opt_arg shell
801 # variables after splitting SHORTOPT after the 2nd character.
802 func_split_short_opt ()
803 {
804 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
805 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
806
807 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
808 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
809 } # func_split_short_opt may be replaced by extended shell implementation
810
811
812 # func_split_long_opt longopt
813 # Set func_split_long_opt_name and func_split_long_opt_arg shell
814 # variables after splitting LONGOPT at the `=' sign.
815 func_split_long_opt ()
816 {
817 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
818 my_sed_long_arg='1s/^--[^=]*=//'
819
820 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
821 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
822 } # func_split_long_opt may be replaced by extended shell implementation
823
552824 exit_cmd=:
553825
554826
555827
556828
557
558 # Check that we have a working $ECHO.
559 if test "X$1" = X--no-reexec; then
560 # Discard the --no-reexec flag, and continue.
561 shift
562 elif test "X$1" = X--fallback-echo; then
563 # Avoid inline document here, it may be left over
564 :
565 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
566 # Yippee, $ECHO works!
567 :
568 else
569 # Restart under the correct shell, and then maybe $ECHO will work.
570 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
571 fi
572
573 if test "X$1" = X--fallback-echo; then
574 # used as fallback echo
575 shift
576 cat <<EOF
577 $*
578 EOF
579 exit $EXIT_SUCCESS
580 fi
581829
582830 magic="%%%MAGIC variable%%%"
583831 magic_exe="%%%MAGIC EXE variable%%%"
584832
585833 # Global variables.
586 # $mode is unset
587834 nonopt=
588 execute_dlfiles=
589835 preserve_args=
590836 lo2o="s/\\.lo\$/.${objext}/"
591837 o2lo="s/\\.${objext}\$/.lo/"
592838 extracted_archives=
593839 extracted_serial=0
594840
595 opt_dry_run=false
596 opt_duplicate_deps=false
597 opt_silent=false
598 opt_debug=:
599
600841 # If this variable is set in any of the actions, the command in it
601842 # will be execed at the end. This prevents here-documents from being
602843 # left over by shells.
603844 exec_cmd=
604845
846 # func_append var value
847 # Append VALUE to the end of shell variable VAR.
848 func_append ()
849 {
850 eval "${1}=\$${1}\${2}"
851 } # func_append may be replaced by extended shell implementation
852
853 # func_append_quoted var value
854 # Quote VALUE and append to the end of shell variable VAR, separated
855 # by a space.
856 func_append_quoted ()
857 {
858 func_quote_for_eval "${2}"
859 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
860 } # func_append_quoted may be replaced by extended shell implementation
861
862
863 # func_arith arithmetic-term...
864 func_arith ()
865 {
866 func_arith_result=`expr "${@}"`
867 } # func_arith may be replaced by extended shell implementation
868
869
870 # func_len string
871 # STRING may not start with a hyphen.
872 func_len ()
873 {
874 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
875 } # func_len may be replaced by extended shell implementation
876
877
878 # func_lo2o object
879 func_lo2o ()
880 {
881 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
882 } # func_lo2o may be replaced by extended shell implementation
883
884
885 # func_xform libobj-or-source
886 func_xform ()
887 {
888 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
889 } # func_xform may be replaced by extended shell implementation
890
891
605892 # func_fatal_configuration arg...
606893 # Echo program name prefixed message to standard error, followed by
607894 # a configuration failure hint, and exit.
635922 # Display the features supported by this script.
636923 func_features ()
637924 {
638 $ECHO "host: $host"
925 echo "host: $host"
639926 if test "$build_libtool_libs" = yes; then
640 $ECHO "enable shared libraries"
927 echo "enable shared libraries"
641928 else
642 $ECHO "disable shared libraries"
929 echo "disable shared libraries"
643930 fi
644931 if test "$build_old_libs" = yes; then
645 $ECHO "enable static libraries"
932 echo "enable static libraries"
646933 else
647 $ECHO "disable static libraries"
934 echo "disable static libraries"
648935 fi
649936
650937 exit $?
689976 fi
690977 ;;
691978 esac
692 }
693
694 # Parse options once, thoroughly. This comes as soon as possible in
695 # the script to make things like `libtool --version' happen quickly.
696 {
697
698 # Shorthand for --mode=foo, only valid as the first argument
699 case $1 in
700 clean|clea|cle|cl)
701 shift; set dummy --mode clean ${1+"$@"}; shift
702 ;;
703 compile|compil|compi|comp|com|co|c)
704 shift; set dummy --mode compile ${1+"$@"}; shift
705 ;;
706 execute|execut|execu|exec|exe|ex|e)
707 shift; set dummy --mode execute ${1+"$@"}; shift
708 ;;
709 finish|finis|fini|fin|fi|f)
710 shift; set dummy --mode finish ${1+"$@"}; shift
711 ;;
712 install|instal|insta|inst|ins|in|i)
713 shift; set dummy --mode install ${1+"$@"}; shift
714 ;;
715 link|lin|li|l)
716 shift; set dummy --mode link ${1+"$@"}; shift
717 ;;
718 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
719 shift; set dummy --mode uninstall ${1+"$@"}; shift
720 ;;
721 esac
722
723 # Parse non-mode specific arguments:
724 while test "$#" -gt 0; do
725 opt="$1"
726 shift
727
728 case $opt in
729 --config) func_config ;;
730
731 --debug) preserve_args="$preserve_args $opt"
732 func_echo "enabling shell trace mode"
733 opt_debug='set -x'
734 $opt_debug
735 ;;
736
737 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
738 execute_dlfiles="$execute_dlfiles $1"
739 shift
740 ;;
741
742 --dry-run | -n) opt_dry_run=: ;;
743 --features) func_features ;;
744 --finish) mode="finish" ;;
745
746 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
747 case $1 in
748 # Valid mode arguments:
749 clean) ;;
750 compile) ;;
751 execute) ;;
752 finish) ;;
753 install) ;;
754 link) ;;
755 relink) ;;
756 uninstall) ;;
757
758 # Catch anything else as an error
759 *) func_error "invalid argument for $opt"
760 exit_cmd=exit
761 break
762 ;;
763 esac
764
765 mode="$1"
766 shift
767 ;;
768
769 --preserve-dup-deps)
770 opt_duplicate_deps=: ;;
771
772 --quiet|--silent) preserve_args="$preserve_args $opt"
773 opt_silent=:
774 ;;
775
776 --verbose| -v) preserve_args="$preserve_args $opt"
777 opt_silent=false
778 ;;
779
780 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
781 preserve_args="$preserve_args $opt $1"
782 func_enable_tag "$1" # tagname is set here
783 shift
784 ;;
785
786 # Separate optargs to long options:
787 -dlopen=*|--mode=*|--tag=*)
788 func_opt_split "$opt"
789 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
790 shift
791 ;;
792
793 -\?|-h) func_usage ;;
794 --help) opt_help=: ;;
795 --version) func_version ;;
796
797 -*) func_fatal_help "unrecognized option \`$opt'" ;;
798
799 *) nonopt="$opt"
800 break
801 ;;
802 esac
803 done
804
805
806 case $host in
807 *cygwin* | *mingw* | *pw32* | *cegcc*)
808 # don't eliminate duplications in $postdeps and $predeps
809 opt_duplicate_compiler_generated_deps=:
810 ;;
811 *)
812 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
813 ;;
814 esac
815
816 # Having warned about all mis-specified options, bail out if
817 # anything was wrong.
818 $exit_cmd $EXIT_FAILURE
819979 }
820980
821981 # func_check_version_match
8541014 }
8551015
8561016
1017 # Shorthand for --mode=foo, only valid as the first argument
1018 case $1 in
1019 clean|clea|cle|cl)
1020 shift; set dummy --mode clean ${1+"$@"}; shift
1021 ;;
1022 compile|compil|compi|comp|com|co|c)
1023 shift; set dummy --mode compile ${1+"$@"}; shift
1024 ;;
1025 execute|execut|execu|exec|exe|ex|e)
1026 shift; set dummy --mode execute ${1+"$@"}; shift
1027 ;;
1028 finish|finis|fini|fin|fi|f)
1029 shift; set dummy --mode finish ${1+"$@"}; shift
1030 ;;
1031 install|instal|insta|inst|ins|in|i)
1032 shift; set dummy --mode install ${1+"$@"}; shift
1033 ;;
1034 link|lin|li|l)
1035 shift; set dummy --mode link ${1+"$@"}; shift
1036 ;;
1037 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1038 shift; set dummy --mode uninstall ${1+"$@"}; shift
1039 ;;
1040 esac
1041
1042
1043
1044 # Option defaults:
1045 opt_debug=:
1046 opt_dry_run=false
1047 opt_config=false
1048 opt_preserve_dup_deps=false
1049 opt_features=false
1050 opt_finish=false
1051 opt_help=false
1052 opt_help_all=false
1053 opt_silent=:
1054 opt_verbose=:
1055 opt_silent=false
1056 opt_verbose=false
1057
1058
1059 # Parse options once, thoroughly. This comes as soon as possible in the
1060 # script to make things like `--version' happen as quickly as we can.
1061 {
1062 # this just eases exit handling
1063 while test $# -gt 0; do
1064 opt="$1"
1065 shift
1066 case $opt in
1067 --debug|-x) opt_debug='set -x'
1068 func_echo "enabling shell trace mode"
1069 $opt_debug
1070 ;;
1071 --dry-run|--dryrun|-n)
1072 opt_dry_run=:
1073 ;;
1074 --config)
1075 opt_config=:
1076 func_config
1077 ;;
1078 --dlopen|-dlopen)
1079 optarg="$1"
1080 opt_dlopen="${opt_dlopen+$opt_dlopen
1081 }$optarg"
1082 shift
1083 ;;
1084 --preserve-dup-deps)
1085 opt_preserve_dup_deps=:
1086 ;;
1087 --features)
1088 opt_features=:
1089 func_features
1090 ;;
1091 --finish)
1092 opt_finish=:
1093 set dummy --mode finish ${1+"$@"}; shift
1094 ;;
1095 --help)
1096 opt_help=:
1097 ;;
1098 --help-all)
1099 opt_help_all=:
1100 opt_help=': help-all'
1101 ;;
1102 --mode)
1103 test $# = 0 && func_missing_arg $opt && break
1104 optarg="$1"
1105 opt_mode="$optarg"
1106 case $optarg in
1107 # Valid mode arguments:
1108 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1109
1110 # Catch anything else as an error
1111 *) func_error "invalid argument for $opt"
1112 exit_cmd=exit
1113 break
1114 ;;
1115 esac
1116 shift
1117 ;;
1118 --no-silent|--no-quiet)
1119 opt_silent=false
1120 func_append preserve_args " $opt"
1121 ;;
1122 --no-verbose)
1123 opt_verbose=false
1124 func_append preserve_args " $opt"
1125 ;;
1126 --silent|--quiet)
1127 opt_silent=:
1128 func_append preserve_args " $opt"
1129 opt_verbose=false
1130 ;;
1131 --verbose|-v)
1132 opt_verbose=:
1133 func_append preserve_args " $opt"
1134 opt_silent=false
1135 ;;
1136 --tag)
1137 test $# = 0 && func_missing_arg $opt && break
1138 optarg="$1"
1139 opt_tag="$optarg"
1140 func_append preserve_args " $opt $optarg"
1141 func_enable_tag "$optarg"
1142 shift
1143 ;;
1144
1145 -\?|-h) func_usage ;;
1146 --help) func_help ;;
1147 --version) func_version ;;
1148
1149 # Separate optargs to long options:
1150 --*=*)
1151 func_split_long_opt "$opt"
1152 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1153 shift
1154 ;;
1155
1156 # Separate non-argument short options:
1157 -\?*|-h*|-n*|-v*)
1158 func_split_short_opt "$opt"
1159 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1160 shift
1161 ;;
1162
1163 --) break ;;
1164 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1165 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1166 esac
1167 done
1168
1169 # Validate options:
1170
1171 # save first non-option argument
1172 if test "$#" -gt 0; then
1173 nonopt="$opt"
1174 shift
1175 fi
1176
1177 # preserve --debug
1178 test "$opt_debug" = : || func_append preserve_args " --debug"
1179
1180 case $host in
1181 *cygwin* | *mingw* | *pw32* | *cegcc*)
1182 # don't eliminate duplications in $postdeps and $predeps
1183 opt_duplicate_compiler_generated_deps=:
1184 ;;
1185 *)
1186 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1187 ;;
1188 esac
1189
1190 $opt_help || {
1191 # Sanity checks first:
1192 func_check_version_match
1193
1194 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1195 func_fatal_configuration "not configured to build any kind of library"
1196 fi
1197
1198 # Darwin sucks
1199 eval std_shrext=\"$shrext_cmds\"
1200
1201 # Only execute mode is allowed to have -dlopen flags.
1202 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1203 func_error "unrecognized option \`-dlopen'"
1204 $ECHO "$help" 1>&2
1205 exit $EXIT_FAILURE
1206 fi
1207
1208 # Change the help message to a mode-specific one.
1209 generic_help="$help"
1210 help="Try \`$progname --help --mode=$opt_mode' for more information."
1211 }
1212
1213
1214 # Bail if the options were screwed
1215 $exit_cmd $EXIT_FAILURE
1216 }
1217
1218
1219
1220
8571221 ## ----------- ##
8581222 ## Main. ##
8591223 ## ----------- ##
860
861 $opt_help || {
862 # Sanity checks first:
863 func_check_version_match
864
865 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
866 func_fatal_configuration "not configured to build any kind of library"
867 fi
868
869 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
870
871
872 # Darwin sucks
873 eval std_shrext=\"$shrext_cmds\"
874
875
876 # Only execute mode is allowed to have -dlopen flags.
877 if test -n "$execute_dlfiles" && test "$mode" != execute; then
878 func_error "unrecognized option \`-dlopen'"
879 $ECHO "$help" 1>&2
880 exit $EXIT_FAILURE
881 fi
882
883 # Change the help message to a mode-specific one.
884 generic_help="$help"
885 help="Try \`$progname --help --mode=$mode' for more information."
886 }
887
8881224
8891225 # func_lalib_p file
8901226 # True iff FILE is a libtool `.la' library or `.lo' object file.
9491285 # temporary ltwrapper_script.
9501286 func_ltwrapper_scriptname ()
9511287 {
952 func_ltwrapper_scriptname_result=""
953 if func_ltwrapper_executable_p "$1"; then
954 func_dirname_and_basename "$1" "" "."
955 func_stripname '' '.exe' "$func_basename_result"
956 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
957 fi
1288 func_dirname_and_basename "$1" "" "."
1289 func_stripname '' '.exe' "$func_basename_result"
1290 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
9581291 }
9591292
9601293 # func_ltwrapper_p file
10001333 }
10011334
10021335
1336 # func_resolve_sysroot PATH
1337 # Replace a leading = in PATH with a sysroot. Store the result into
1338 # func_resolve_sysroot_result
1339 func_resolve_sysroot ()
1340 {
1341 func_resolve_sysroot_result=$1
1342 case $func_resolve_sysroot_result in
1343 =*)
1344 func_stripname '=' '' "$func_resolve_sysroot_result"
1345 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1346 ;;
1347 esac
1348 }
1349
1350 # func_replace_sysroot PATH
1351 # If PATH begins with the sysroot, replace it with = and
1352 # store the result into func_replace_sysroot_result.
1353 func_replace_sysroot ()
1354 {
1355 case "$lt_sysroot:$1" in
1356 ?*:"$lt_sysroot"*)
1357 func_stripname "$lt_sysroot" '' "$1"
1358 func_replace_sysroot_result="=$func_stripname_result"
1359 ;;
1360 *)
1361 # Including no sysroot.
1362 func_replace_sysroot_result=$1
1363 ;;
1364 esac
1365 }
1366
10031367 # func_infer_tag arg
10041368 # Infer tagged configuration to use if any are available and
10051369 # if one wasn't chosen via the "--tag" command line option.
10121376 if test -n "$available_tags" && test -z "$tagname"; then
10131377 CC_quoted=
10141378 for arg in $CC; do
1015 func_quote_for_eval "$arg"
1016 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1379 func_append_quoted CC_quoted "$arg"
10171380 done
1381 CC_expanded=`func_echo_all $CC`
1382 CC_quoted_expanded=`func_echo_all $CC_quoted`
10181383 case $@ in
10191384 # Blanks in the command may have been stripped by the calling shell,
10201385 # but not from the CC environment variable when configure was run.
1021 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1386 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1387 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
10221388 # Blanks at the start of $base_compile will cause this to fail
10231389 # if we don't check for them as well.
10241390 *)
10291395 CC_quoted=
10301396 for arg in $CC; do
10311397 # Double-quote args containing other shell metacharacters.
1032 func_quote_for_eval "$arg"
1033 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1398 func_append_quoted CC_quoted "$arg"
10341399 done
1400 CC_expanded=`func_echo_all $CC`
1401 CC_quoted_expanded=`func_echo_all $CC_quoted`
10351402 case "$@ " in
1036 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1403 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1404 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
10371405 # The compiler in the base compile command matches
10381406 # the one in the tagged configuration.
10391407 # Assume this is the tagged configuration we want.
10961464 }
10971465 }
10981466
1467
1468 ##################################################
1469 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1470 ##################################################
1471
1472 # func_convert_core_file_wine_to_w32 ARG
1473 # Helper function used by file name conversion functions when $build is *nix,
1474 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1475 # correctly configured wine environment available, with the winepath program
1476 # in $build's $PATH.
1477 #
1478 # ARG is the $build file name to be converted to w32 format.
1479 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1480 # be empty on error (or when ARG is empty)
1481 func_convert_core_file_wine_to_w32 ()
1482 {
1483 $opt_debug
1484 func_convert_core_file_wine_to_w32_result="$1"
1485 if test -n "$1"; then
1486 # Unfortunately, winepath does not exit with a non-zero error code, so we
1487 # are forced to check the contents of stdout. On the other hand, if the
1488 # command is not found, the shell will set an exit code of 127 and print
1489 # *an error message* to stdout. So we must check for both error code of
1490 # zero AND non-empty stdout, which explains the odd construction:
1491 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1492 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1493 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1494 $SED -e "$lt_sed_naive_backslashify"`
1495 else
1496 func_convert_core_file_wine_to_w32_result=
1497 fi
1498 fi
1499 }
1500 # end: func_convert_core_file_wine_to_w32
1501
1502
1503 # func_convert_core_path_wine_to_w32 ARG
1504 # Helper function used by path conversion functions when $build is *nix, and
1505 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1506 # configured wine environment available, with the winepath program in $build's
1507 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1508 #
1509 # ARG is path to be converted from $build format to win32.
1510 # Result is available in $func_convert_core_path_wine_to_w32_result.
1511 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1512 # are convertible, then the result may be empty.
1513 func_convert_core_path_wine_to_w32 ()
1514 {
1515 $opt_debug
1516 # unfortunately, winepath doesn't convert paths, only file names
1517 func_convert_core_path_wine_to_w32_result=""
1518 if test -n "$1"; then
1519 oldIFS=$IFS
1520 IFS=:
1521 for func_convert_core_path_wine_to_w32_f in $1; do
1522 IFS=$oldIFS
1523 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1524 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1525 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1526 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1527 else
1528 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1529 fi
1530 fi
1531 done
1532 IFS=$oldIFS
1533 fi
1534 }
1535 # end: func_convert_core_path_wine_to_w32
1536
1537
1538 # func_cygpath ARGS...
1539 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1540 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1541 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1542 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1543 # file name or path is assumed to be in w32 format, as previously converted
1544 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1545 # or path in func_cygpath_result (input file name or path is assumed to be in
1546 # Cygwin format). Returns an empty string on error.
1547 #
1548 # ARGS are passed to cygpath, with the last one being the file name or path to
1549 # be converted.
1550 #
1551 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1552 # environment variable; do not put it in $PATH.
1553 func_cygpath ()
1554 {
1555 $opt_debug
1556 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1557 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1558 if test "$?" -ne 0; then
1559 # on failure, ensure result is empty
1560 func_cygpath_result=
1561 fi
1562 else
1563 func_cygpath_result=
1564 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1565 fi
1566 }
1567 #end: func_cygpath
1568
1569
1570 # func_convert_core_msys_to_w32 ARG
1571 # Convert file name or path ARG from MSYS format to w32 format. Return
1572 # result in func_convert_core_msys_to_w32_result.
1573 func_convert_core_msys_to_w32 ()
1574 {
1575 $opt_debug
1576 # awkward: cmd appends spaces to result
1577 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1578 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1579 }
1580 #end: func_convert_core_msys_to_w32
1581
1582
1583 # func_convert_file_check ARG1 ARG2
1584 # Verify that ARG1 (a file name in $build format) was converted to $host
1585 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1586 # func_to_host_file_result to ARG1).
1587 func_convert_file_check ()
1588 {
1589 $opt_debug
1590 if test -z "$2" && test -n "$1" ; then
1591 func_error "Could not determine host file name corresponding to"
1592 func_error " \`$1'"
1593 func_error "Continuing, but uninstalled executables may not work."
1594 # Fallback:
1595 func_to_host_file_result="$1"
1596 fi
1597 }
1598 # end func_convert_file_check
1599
1600
1601 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1602 # Verify that FROM_PATH (a path in $build format) was converted to $host
1603 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1604 # func_to_host_file_result to a simplistic fallback value (see below).
1605 func_convert_path_check ()
1606 {
1607 $opt_debug
1608 if test -z "$4" && test -n "$3"; then
1609 func_error "Could not determine the host path corresponding to"
1610 func_error " \`$3'"
1611 func_error "Continuing, but uninstalled executables may not work."
1612 # Fallback. This is a deliberately simplistic "conversion" and
1613 # should not be "improved". See libtool.info.
1614 if test "x$1" != "x$2"; then
1615 lt_replace_pathsep_chars="s|$1|$2|g"
1616 func_to_host_path_result=`echo "$3" |
1617 $SED -e "$lt_replace_pathsep_chars"`
1618 else
1619 func_to_host_path_result="$3"
1620 fi
1621 fi
1622 }
1623 # end func_convert_path_check
1624
1625
1626 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1627 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1628 # and appending REPL if ORIG matches BACKPAT.
1629 func_convert_path_front_back_pathsep ()
1630 {
1631 $opt_debug
1632 case $4 in
1633 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1634 ;;
1635 esac
1636 case $4 in
1637 $2 ) func_append func_to_host_path_result "$3"
1638 ;;
1639 esac
1640 }
1641 # end func_convert_path_front_back_pathsep
1642
1643
1644 ##################################################
1645 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1646 ##################################################
1647 # invoked via `$to_host_file_cmd ARG'
1648 #
1649 # In each case, ARG is the path to be converted from $build to $host format.
1650 # Result will be available in $func_to_host_file_result.
1651
1652
1653 # func_to_host_file ARG
1654 # Converts the file name ARG from $build format to $host format. Return result
1655 # in func_to_host_file_result.
1656 func_to_host_file ()
1657 {
1658 $opt_debug
1659 $to_host_file_cmd "$1"
1660 }
1661 # end func_to_host_file
1662
1663
1664 # func_to_tool_file ARG LAZY
1665 # converts the file name ARG from $build format to toolchain format. Return
1666 # result in func_to_tool_file_result. If the conversion in use is listed
1667 # in (the comma separated) LAZY, no conversion takes place.
1668 func_to_tool_file ()
1669 {
1670 $opt_debug
1671 case ,$2, in
1672 *,"$to_tool_file_cmd",*)
1673 func_to_tool_file_result=$1
1674 ;;
1675 *)
1676 $to_tool_file_cmd "$1"
1677 func_to_tool_file_result=$func_to_host_file_result
1678 ;;
1679 esac
1680 }
1681 # end func_to_tool_file
1682
1683
1684 # func_convert_file_noop ARG
1685 # Copy ARG to func_to_host_file_result.
1686 func_convert_file_noop ()
1687 {
1688 func_to_host_file_result="$1"
1689 }
1690 # end func_convert_file_noop
1691
1692
1693 # func_convert_file_msys_to_w32 ARG
1694 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1695 # conversion to w32 is not available inside the cwrapper. Returns result in
1696 # func_to_host_file_result.
1697 func_convert_file_msys_to_w32 ()
1698 {
1699 $opt_debug
1700 func_to_host_file_result="$1"
1701 if test -n "$1"; then
1702 func_convert_core_msys_to_w32 "$1"
1703 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1704 fi
1705 func_convert_file_check "$1" "$func_to_host_file_result"
1706 }
1707 # end func_convert_file_msys_to_w32
1708
1709
1710 # func_convert_file_cygwin_to_w32 ARG
1711 # Convert file name ARG from Cygwin to w32 format. Returns result in
1712 # func_to_host_file_result.
1713 func_convert_file_cygwin_to_w32 ()
1714 {
1715 $opt_debug
1716 func_to_host_file_result="$1"
1717 if test -n "$1"; then
1718 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1719 # LT_CYGPATH in this case.
1720 func_to_host_file_result=`cygpath -m "$1"`
1721 fi
1722 func_convert_file_check "$1" "$func_to_host_file_result"
1723 }
1724 # end func_convert_file_cygwin_to_w32
1725
1726
1727 # func_convert_file_nix_to_w32 ARG
1728 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1729 # and a working winepath. Returns result in func_to_host_file_result.
1730 func_convert_file_nix_to_w32 ()
1731 {
1732 $opt_debug
1733 func_to_host_file_result="$1"
1734 if test -n "$1"; then
1735 func_convert_core_file_wine_to_w32 "$1"
1736 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1737 fi
1738 func_convert_file_check "$1" "$func_to_host_file_result"
1739 }
1740 # end func_convert_file_nix_to_w32
1741
1742
1743 # func_convert_file_msys_to_cygwin ARG
1744 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1745 # Returns result in func_to_host_file_result.
1746 func_convert_file_msys_to_cygwin ()
1747 {
1748 $opt_debug
1749 func_to_host_file_result="$1"
1750 if test -n "$1"; then
1751 func_convert_core_msys_to_w32 "$1"
1752 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1753 func_to_host_file_result="$func_cygpath_result"
1754 fi
1755 func_convert_file_check "$1" "$func_to_host_file_result"
1756 }
1757 # end func_convert_file_msys_to_cygwin
1758
1759
1760 # func_convert_file_nix_to_cygwin ARG
1761 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1762 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1763 # in func_to_host_file_result.
1764 func_convert_file_nix_to_cygwin ()
1765 {
1766 $opt_debug
1767 func_to_host_file_result="$1"
1768 if test -n "$1"; then
1769 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1770 func_convert_core_file_wine_to_w32 "$1"
1771 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1772 func_to_host_file_result="$func_cygpath_result"
1773 fi
1774 func_convert_file_check "$1" "$func_to_host_file_result"
1775 }
1776 # end func_convert_file_nix_to_cygwin
1777
1778
1779 #############################################
1780 # $build to $host PATH CONVERSION FUNCTIONS #
1781 #############################################
1782 # invoked via `$to_host_path_cmd ARG'
1783 #
1784 # In each case, ARG is the path to be converted from $build to $host format.
1785 # The result will be available in $func_to_host_path_result.
1786 #
1787 # Path separators are also converted from $build format to $host format. If
1788 # ARG begins or ends with a path separator character, it is preserved (but
1789 # converted to $host format) on output.
1790 #
1791 # All path conversion functions are named using the following convention:
1792 # file name conversion function : func_convert_file_X_to_Y ()
1793 # path conversion function : func_convert_path_X_to_Y ()
1794 # where, for any given $build/$host combination the 'X_to_Y' value is the
1795 # same. If conversion functions are added for new $build/$host combinations,
1796 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1797 # will break.
1798
1799
1800 # func_init_to_host_path_cmd
1801 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1802 # appropriate value, based on the value of $to_host_file_cmd.
1803 to_host_path_cmd=
1804 func_init_to_host_path_cmd ()
1805 {
1806 $opt_debug
1807 if test -z "$to_host_path_cmd"; then
1808 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1809 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1810 fi
1811 }
1812
1813
1814 # func_to_host_path ARG
1815 # Converts the path ARG from $build format to $host format. Return result
1816 # in func_to_host_path_result.
1817 func_to_host_path ()
1818 {
1819 $opt_debug
1820 func_init_to_host_path_cmd
1821 $to_host_path_cmd "$1"
1822 }
1823 # end func_to_host_path
1824
1825
1826 # func_convert_path_noop ARG
1827 # Copy ARG to func_to_host_path_result.
1828 func_convert_path_noop ()
1829 {
1830 func_to_host_path_result="$1"
1831 }
1832 # end func_convert_path_noop
1833
1834
1835 # func_convert_path_msys_to_w32 ARG
1836 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1837 # conversion to w32 is not available inside the cwrapper. Returns result in
1838 # func_to_host_path_result.
1839 func_convert_path_msys_to_w32 ()
1840 {
1841 $opt_debug
1842 func_to_host_path_result="$1"
1843 if test -n "$1"; then
1844 # Remove leading and trailing path separator characters from ARG. MSYS
1845 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1846 # and winepath ignores them completely.
1847 func_stripname : : "$1"
1848 func_to_host_path_tmp1=$func_stripname_result
1849 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1850 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1851 func_convert_path_check : ";" \
1852 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1853 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1854 fi
1855 }
1856 # end func_convert_path_msys_to_w32
1857
1858
1859 # func_convert_path_cygwin_to_w32 ARG
1860 # Convert path ARG from Cygwin to w32 format. Returns result in
1861 # func_to_host_file_result.
1862 func_convert_path_cygwin_to_w32 ()
1863 {
1864 $opt_debug
1865 func_to_host_path_result="$1"
1866 if test -n "$1"; then
1867 # See func_convert_path_msys_to_w32:
1868 func_stripname : : "$1"
1869 func_to_host_path_tmp1=$func_stripname_result
1870 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1871 func_convert_path_check : ";" \
1872 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1873 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1874 fi
1875 }
1876 # end func_convert_path_cygwin_to_w32
1877
1878
1879 # func_convert_path_nix_to_w32 ARG
1880 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1881 # a working winepath. Returns result in func_to_host_file_result.
1882 func_convert_path_nix_to_w32 ()
1883 {
1884 $opt_debug
1885 func_to_host_path_result="$1"
1886 if test -n "$1"; then
1887 # See func_convert_path_msys_to_w32:
1888 func_stripname : : "$1"
1889 func_to_host_path_tmp1=$func_stripname_result
1890 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1891 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1892 func_convert_path_check : ";" \
1893 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1894 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1895 fi
1896 }
1897 # end func_convert_path_nix_to_w32
1898
1899
1900 # func_convert_path_msys_to_cygwin ARG
1901 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1902 # Returns result in func_to_host_file_result.
1903 func_convert_path_msys_to_cygwin ()
1904 {
1905 $opt_debug
1906 func_to_host_path_result="$1"
1907 if test -n "$1"; then
1908 # See func_convert_path_msys_to_w32:
1909 func_stripname : : "$1"
1910 func_to_host_path_tmp1=$func_stripname_result
1911 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1912 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1913 func_to_host_path_result="$func_cygpath_result"
1914 func_convert_path_check : : \
1915 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1916 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1917 fi
1918 }
1919 # end func_convert_path_msys_to_cygwin
1920
1921
1922 # func_convert_path_nix_to_cygwin ARG
1923 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1924 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1925 # func_to_host_file_result.
1926 func_convert_path_nix_to_cygwin ()
1927 {
1928 $opt_debug
1929 func_to_host_path_result="$1"
1930 if test -n "$1"; then
1931 # Remove leading and trailing path separator characters from
1932 # ARG. msys behavior is inconsistent here, cygpath turns them
1933 # into '.;' and ';.', and winepath ignores them completely.
1934 func_stripname : : "$1"
1935 func_to_host_path_tmp1=$func_stripname_result
1936 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1937 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1938 func_to_host_path_result="$func_cygpath_result"
1939 func_convert_path_check : : \
1940 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1941 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1942 fi
1943 }
1944 # end func_convert_path_nix_to_cygwin
1945
1946
10991947 # func_mode_compile arg...
11001948 func_mode_compile ()
11011949 {
11361984 ;;
11371985
11381986 -pie | -fpie | -fPIE)
1139 pie_flag="$pie_flag $arg"
1987 func_append pie_flag " $arg"
11401988 continue
11411989 ;;
11421990
11431991 -shared | -static | -prefer-pic | -prefer-non-pic)
1144 later="$later $arg"
1992 func_append later " $arg"
11451993 continue
11461994 ;;
11471995
11622010 save_ifs="$IFS"; IFS=','
11632011 for arg in $args; do
11642012 IFS="$save_ifs"
1165 func_quote_for_eval "$arg"
1166 lastarg="$lastarg $func_quote_for_eval_result"
2013 func_append_quoted lastarg "$arg"
11672014 done
11682015 IFS="$save_ifs"
11692016 func_stripname ' ' '' "$lastarg"
11702017 lastarg=$func_stripname_result
11712018
11722019 # Add the arguments to base_compile.
1173 base_compile="$base_compile $lastarg"
2020 func_append base_compile " $lastarg"
11742021 continue
11752022 ;;
11762023
11862033 esac # case $arg_mode
11872034
11882035 # Aesthetically quote the previous argument.
1189 func_quote_for_eval "$lastarg"
1190 base_compile="$base_compile $func_quote_for_eval_result"
2036 func_append_quoted base_compile "$lastarg"
11912037 done # for arg
11922038
11932039 case $arg_mode in
12122058 *.[cCFSifmso] | \
12132059 *.ada | *.adb | *.ads | *.asm | \
12142060 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1215 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
2061 *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
12162062 func_xform "$libobj"
12172063 libobj=$func_xform_result
12182064 ;;
12872133 # Calculate the filename of the output object if compiler does
12882134 # not support -o with -c
12892135 if test "$compiler_c_o" = no; then
1290 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
2136 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
12912137 lockfile="$output_obj.lock"
12922138 else
12932139 output_obj=
13182164 $opt_dry_run || $RM $removelist
13192165 exit $EXIT_FAILURE
13202166 fi
1321 removelist="$removelist $output_obj"
2167 func_append removelist " $output_obj"
13222168 $ECHO "$srcfile" > "$lockfile"
13232169 fi
13242170
13252171 $opt_dry_run || $RM $removelist
1326 removelist="$removelist $lockfile"
2172 func_append removelist " $lockfile"
13272173 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
13282174
1329 if test -n "$fix_srcfile_path"; then
1330 eval srcfile=\"$fix_srcfile_path\"
1331 fi
2175 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2176 srcfile=$func_to_tool_file_result
13322177 func_quote_for_eval "$srcfile"
13332178 qsrcfile=$func_quote_for_eval_result
13342179
13482193
13492194 if test -z "$output_obj"; then
13502195 # Place PIC objects in $objdir
1351 command="$command -o $lobj"
2196 func_append command " -o $lobj"
13522197 fi
13532198
13542199 func_show_eval_locale "$command" \
13952240 command="$base_compile $qsrcfile $pic_flag"
13962241 fi
13972242 if test "$compiler_c_o" = yes; then
1398 command="$command -o $obj"
2243 func_append command " -o $obj"
13992244 fi
14002245
14012246 # Suppress compiler output if we already did a PIC compilation.
1402 command="$command$suppress_output"
2247 func_append command "$suppress_output"
14032248 func_show_eval_locale "$command" \
14042249 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
14052250
14442289 }
14452290
14462291 $opt_help || {
1447 test "$mode" = compile && func_mode_compile ${1+"$@"}
2292 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
14482293 }
14492294
14502295 func_mode_help ()
14512296 {
14522297 # We need to display help for each of the modes.
1453 case $mode in
2298 case $opt_mode in
14542299 "")
14552300 # Generic help is extracted from the usage comments
14562301 # at the start of this file.
14812326
14822327 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
14832328 -no-suppress do not suppress compiler output for multiple passes
1484 -prefer-pic try to building PIC objects only
1485 -prefer-non-pic try to building non-PIC objects only
2329 -prefer-pic try to build PIC objects only
2330 -prefer-non-pic try to build non-PIC objects only
14862331 -shared do not build a \`.o' file suitable for static linking
14872332 -static only build a \`.o' file suitable for static linking
2333 -Wc,FLAG pass FLAG directly to the compiler
14882334
14892335 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
14902336 from the given SOURCEFILE.
15372383
15382384 The following components of INSTALL-COMMAND are treated specially:
15392385
1540 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2386 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
15412387
15422388 The rest of the components are interpreted as arguments to that command (only
15432389 BSD-compatible install options are recognized)."
15572403
15582404 -all-static do not do any dynamic linking at all
15592405 -avoid-version do not add a version suffix if possible
2406 -bindir BINDIR specify path to binaries directory (for systems where
2407 libraries must be found in the PATH setting at runtime)
15602408 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
15612409 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
15622410 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
15852433 -version-info CURRENT[:REVISION[:AGE]]
15862434 specify library version info [each variable defaults to 0]
15872435 -weak LIBNAME declare that the target provides the LIBNAME interface
2436 -Wc,FLAG
2437 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2438 -Wl,FLAG
2439 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2440 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
15882441
15892442 All other options (arguments beginning with \`-') are ignored.
15902443
16182471 ;;
16192472
16202473 *)
1621 func_fatal_help "invalid operation mode \`$mode'"
2474 func_fatal_help "invalid operation mode \`$opt_mode'"
16222475 ;;
16232476 esac
16242477
1625 $ECHO
2478 echo
16262479 $ECHO "Try \`$progname --help' for more information about other modes."
1627
1628 exit $?
1629 }
1630
1631 # Now that we've collected a possible --mode arg, show help if necessary
1632 $opt_help && func_mode_help
2480 }
2481
2482 # Now that we've collected a possible --mode arg, show help if necessary
2483 if $opt_help; then
2484 if test "$opt_help" = :; then
2485 func_mode_help
2486 else
2487 {
2488 func_help noexit
2489 for opt_mode in compile link execute install finish uninstall clean; do
2490 func_mode_help
2491 done
2492 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2493 {
2494 func_help noexit
2495 for opt_mode in compile link execute install finish uninstall clean; do
2496 echo
2497 func_mode_help
2498 done
2499 } |
2500 sed '1d
2501 /^When reporting/,/^Report/{
2502 H
2503 d
2504 }
2505 $x
2506 /information about other modes/d
2507 /more detailed .*MODE/d
2508 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2509 fi
2510 exit $?
2511 fi
16332512
16342513
16352514 # func_mode_execute arg...
16422521 func_fatal_help "you must specify a COMMAND"
16432522
16442523 # Handle -dlopen flags immediately.
1645 for file in $execute_dlfiles; do
2524 for file in $opt_dlopen; do
16462525 test -f "$file" \
16472526 || func_fatal_help "\`$file' is not a file"
16482527
16492528 dir=
16502529 case $file in
16512530 *.la)
2531 func_resolve_sysroot "$file"
2532 file=$func_resolve_sysroot_result
2533
16522534 # Check to see that this really is a libtool archive.
16532535 func_lalib_unsafe_p "$file" \
16542536 || func_fatal_help "\`$lib' is not a valid libtool archive"
16702552 dir="$func_dirname_result"
16712553
16722554 if test -f "$dir/$objdir/$dlname"; then
1673 dir="$dir/$objdir"
2555 func_append dir "/$objdir"
16742556 else
16752557 if test ! -f "$dir/$dlname"; then
16762558 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
17112593 for file
17122594 do
17132595 case $file in
1714 -*) ;;
2596 -* | *.la | *.lo ) ;;
17152597 *)
17162598 # Do a test to see if this is really a libtool program.
17172599 if func_ltwrapper_script_p "$file"; then
17272609 ;;
17282610 esac
17292611 # Quote arguments (to preserve shell metacharacters).
1730 func_quote_for_eval "$file"
1731 args="$args $func_quote_for_eval_result"
2612 func_append_quoted args "$file"
17322613 done
17332614
17342615 if test "X$opt_dry_run" = Xfalse; then
17532634 # Display what would be done.
17542635 if test -n "$shlibpath_var"; then
17552636 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1756 $ECHO "export $shlibpath_var"
2637 echo "export $shlibpath_var"
17572638 fi
17582639 $ECHO "$cmd$args"
17592640 exit $EXIT_SUCCESS
17602641 fi
17612642 }
17622643
1763 test "$mode" = execute && func_mode_execute ${1+"$@"}
2644 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
17642645
17652646
17662647 # func_mode_finish arg...
17672648 func_mode_finish ()
17682649 {
17692650 $opt_debug
1770 libdirs="$nonopt"
2651 libs=
2652 libdirs=
17712653 admincmds=
17722654
2655 for opt in "$nonopt" ${1+"$@"}
2656 do
2657 if test -d "$opt"; then
2658 func_append libdirs " $opt"
2659
2660 elif test -f "$opt"; then
2661 if func_lalib_unsafe_p "$opt"; then
2662 func_append libs " $opt"
2663 else
2664 func_warning "\`$opt' is not a valid libtool archive"
2665 fi
2666
2667 else
2668 func_fatal_error "invalid argument \`$opt'"
2669 fi
2670 done
2671
2672 if test -n "$libs"; then
2673 if test -n "$lt_sysroot"; then
2674 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2675 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2676 else
2677 sysroot_cmd=
2678 fi
2679
2680 # Remove sysroot references
2681 if $opt_dry_run; then
2682 for lib in $libs; do
2683 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2684 done
2685 else
2686 tmpdir=`func_mktempdir`
2687 for lib in $libs; do
2688 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2689 > $tmpdir/tmp-la
2690 mv -f $tmpdir/tmp-la $lib
2691 done
2692 ${RM}r "$tmpdir"
2693 fi
2694 fi
2695
17732696 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1774 for dir
1775 do
1776 libdirs="$libdirs $dir"
1777 done
1778
17792697 for libdir in $libdirs; do
17802698 if test -n "$finish_cmds"; then
17812699 # Do each command in the finish commands.
17852703 if test -n "$finish_eval"; then
17862704 # Do the single finish_eval.
17872705 eval cmds=\"$finish_eval\"
1788 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
2706 $opt_dry_run || eval "$cmds" || func_append admincmds "
17892707 $cmds"
17902708 fi
17912709 done
17942712 # Exit here if they wanted silent mode.
17952713 $opt_silent && exit $EXIT_SUCCESS
17962714
1797 $ECHO "X----------------------------------------------------------------------" | $Xsed
1798 $ECHO "Libraries have been installed in:"
1799 for libdir in $libdirs; do
1800 $ECHO " $libdir"
1801 done
1802 $ECHO
1803 $ECHO "If you ever happen to want to link against installed libraries"
1804 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1805 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1806 $ECHO "flag during linking and do at least one of the following:"
1807 if test -n "$shlibpath_var"; then
1808 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1809 $ECHO " during execution"
2715 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2716 echo "----------------------------------------------------------------------"
2717 echo "Libraries have been installed in:"
2718 for libdir in $libdirs; do
2719 $ECHO " $libdir"
2720 done
2721 echo
2722 echo "If you ever happen to want to link against installed libraries"
2723 echo "in a given directory, LIBDIR, you must either use libtool, and"
2724 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2725 echo "flag during linking and do at least one of the following:"
2726 if test -n "$shlibpath_var"; then
2727 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2728 echo " during execution"
2729 fi
2730 if test -n "$runpath_var"; then
2731 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2732 echo " during linking"
2733 fi
2734 if test -n "$hardcode_libdir_flag_spec"; then
2735 libdir=LIBDIR
2736 eval flag=\"$hardcode_libdir_flag_spec\"
2737
2738 $ECHO " - use the \`$flag' linker flag"
2739 fi
2740 if test -n "$admincmds"; then
2741 $ECHO " - have your system administrator run these commands:$admincmds"
2742 fi
2743 if test -f /etc/ld.so.conf; then
2744 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2745 fi
2746 echo
2747
2748 echo "See any operating system documentation about shared libraries for"
2749 case $host in
2750 solaris2.[6789]|solaris2.1[0-9])
2751 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2752 echo "pages."
2753 ;;
2754 *)
2755 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2756 ;;
2757 esac
2758 echo "----------------------------------------------------------------------"
18102759 fi
1811 if test -n "$runpath_var"; then
1812 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1813 $ECHO " during linking"
1814 fi
1815 if test -n "$hardcode_libdir_flag_spec"; then
1816 libdir=LIBDIR
1817 eval flag=\"$hardcode_libdir_flag_spec\"
1818
1819 $ECHO " - use the \`$flag' linker flag"
1820 fi
1821 if test -n "$admincmds"; then
1822 $ECHO " - have your system administrator run these commands:$admincmds"
1823 fi
1824 if test -f /etc/ld.so.conf; then
1825 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1826 fi
1827 $ECHO
1828
1829 $ECHO "See any operating system documentation about shared libraries for"
1830 case $host in
1831 solaris2.[6789]|solaris2.1[0-9])
1832 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1833 $ECHO "pages."
1834 ;;
1835 *)
1836 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1837 ;;
1838 esac
1839 $ECHO "X----------------------------------------------------------------------" | $Xsed
18402760 exit $EXIT_SUCCESS
18412761 }
18422762
1843 test "$mode" = finish && func_mode_finish ${1+"$@"}
2763 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
18442764
18452765
18462766 # func_mode_install arg...
18512771 # install_prog (especially on Windows NT).
18522772 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
18532773 # Allow the use of GNU shtool's install command.
1854 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
2774 case $nonopt in *shtool*) :;; *) false;; esac; then
18552775 # Aesthetically quote it.
18562776 func_quote_for_eval "$nonopt"
18572777 install_prog="$func_quote_for_eval_result "
18652785 # The real first argument should be the name of the installation program.
18662786 # Aesthetically quote it.
18672787 func_quote_for_eval "$arg"
1868 install_prog="$install_prog$func_quote_for_eval_result"
2788 func_append install_prog "$func_quote_for_eval_result"
2789 install_shared_prog=$install_prog
2790 case " $install_prog " in
2791 *[\\\ /]cp\ *) install_cp=: ;;
2792 *) install_cp=false ;;
2793 esac
18692794
18702795 # We need to accept at least all the BSD install flags.
18712796 dest=
18752800 install_type=
18762801 isdir=no
18772802 stripme=
2803 no_mode=:
18782804 for arg
18792805 do
2806 arg2=
18802807 if test -n "$dest"; then
1881 files="$files $dest"
2808 func_append files " $dest"
18822809 dest=$arg
18832810 continue
18842811 fi
18862813 case $arg in
18872814 -d) isdir=yes ;;
18882815 -f)
1889 case " $install_prog " in
1890 *[\\\ /]cp\ *) ;;
1891 *) prev=$arg ;;
1892 esac
2816 if $install_cp; then :; else
2817 prev=$arg
2818 fi
18932819 ;;
18942820 -g | -m | -o)
18952821 prev=$arg
19032829 *)
19042830 # If the previous option needed an argument, then skip it.
19052831 if test -n "$prev"; then
2832 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2833 arg2=$install_override_mode
2834 no_mode=false
2835 fi
19062836 prev=
19072837 else
19082838 dest=$arg
19132843
19142844 # Aesthetically quote the argument.
19152845 func_quote_for_eval "$arg"
1916 install_prog="$install_prog $func_quote_for_eval_result"
2846 func_append install_prog " $func_quote_for_eval_result"
2847 if test -n "$arg2"; then
2848 func_quote_for_eval "$arg2"
2849 fi
2850 func_append install_shared_prog " $func_quote_for_eval_result"
19172851 done
19182852
19192853 test -z "$install_prog" && \
19212855
19222856 test -n "$prev" && \
19232857 func_fatal_help "the \`$prev' option requires an argument"
2858
2859 if test -n "$install_override_mode" && $no_mode; then
2860 if $install_cp; then :; else
2861 func_quote_for_eval "$install_override_mode"
2862 func_append install_shared_prog " -m $func_quote_for_eval_result"
2863 fi
2864 fi
19242865
19252866 if test -z "$files"; then
19262867 if test -z "$dest"; then
19762917 case $file in
19772918 *.$libext)
19782919 # Do the static libraries later.
1979 staticlibs="$staticlibs $file"
2920 func_append staticlibs " $file"
19802921 ;;
19812922
19822923 *.la)
2924 func_resolve_sysroot "$file"
2925 file=$func_resolve_sysroot_result
2926
19832927 # Check to see that this really is a libtool archive.
19842928 func_lalib_unsafe_p "$file" \
19852929 || func_fatal_help "\`$file' is not a valid libtool archive"
19932937 if test "X$destdir" = "X$libdir"; then
19942938 case "$current_libdirs " in
19952939 *" $libdir "*) ;;
1996 *) current_libdirs="$current_libdirs $libdir" ;;
2940 *) func_append current_libdirs " $libdir" ;;
19972941 esac
19982942 else
19992943 # Note the libdir as a future libdir.
20002944 case "$future_libdirs " in
20012945 *" $libdir "*) ;;
2002 *) future_libdirs="$future_libdirs $libdir" ;;
2946 *) func_append future_libdirs " $libdir" ;;
20032947 esac
20042948 fi
20052949
20062950 func_dirname "$file" "/" ""
20072951 dir="$func_dirname_result"
2008 dir="$dir$objdir"
2952 func_append dir "$objdir"
20092953
20102954 if test -n "$relink_command"; then
20112955 # Determine the prefix the user has applied to our future dir.
2012 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2956 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
20132957
20142958 # Don't allow the user to place us outside of our expected
20152959 # location b/c this prevents finding dependent libraries that
20222966
20232967 if test -n "$inst_prefix_dir"; then
20242968 # Stick the inst_prefix_dir data into the link command.
2025 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2969 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
20262970 else
2027 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2971 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
20282972 fi
20292973
20302974 func_warning "relinking \`$file'"
20422986 test -n "$relink_command" && srcname="$realname"T
20432987
20442988 # Install the shared library and build the symlinks.
2045 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2989 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
20462990 'exit $?'
20472991 tstripme="$stripme"
20482992 case $host_os in
20823026 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
20833027
20843028 # Maybe install the static library, too.
2085 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3029 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
20863030 ;;
20873031
20883032 *.lo)
21823126 if test -f "$lib"; then
21833127 func_source "$lib"
21843128 fi
2185 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
3129 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
21863130 if test -n "$libdir" && test ! -f "$libfile"; then
21873131 func_warning "\`$lib' has not been installed in \`$libdir'"
21883132 finalize=no
22013145 file="$func_basename_result"
22023146 outputname="$tmpdir/$file"
22033147 # Replace the output file specification.
2204 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3148 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
22053149
22063150 $opt_silent || {
22073151 func_quote_for_expand "$relink_command"
22203164 }
22213165 else
22223166 # Install the binary that we compiled earlier.
2223 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3167 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
22243168 fi
22253169 fi
22263170
22793223 fi
22803224 }
22813225
2282 test "$mode" = install && func_mode_install ${1+"$@"}
3226 test "$opt_mode" = install && func_mode_install ${1+"$@"}
22833227
22843228
22853229 # func_generate_dlsyms outputname originator pic_p
23223266 extern \"C\" {
23233267 #endif
23243268
3269 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3270 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3271 #endif
3272
3273 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3274 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3275 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3276 relocations are performed -- see ld's documentation on pseudo-relocs. */
3277 # define LT_DLSYM_CONST
3278 #elif defined(__osf__)
3279 /* This system does not cope well with relocations in const data. */
3280 # define LT_DLSYM_CONST
3281 #else
3282 # define LT_DLSYM_CONST const
3283 #endif
3284
23253285 /* External symbol declarations for the compiler. */\
23263286 "
23273287
23313291 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
23323292
23333293 # Add our own program objects to the symbol list.
2334 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3294 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
23353295 for progfile in $progfiles; do
2336 func_verbose "extracting global C symbols from \`$progfile'"
2337 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3296 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3297 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3298 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
23383299 done
23393300
23403301 if test -n "$exclude_expsyms"; then
23703331 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
23713332 eval '$MV "$nlist"T "$nlist"'
23723333 case $host in
2373 *cygwin | *mingw* | *cegcc* )
3334 *cygwin* | *mingw* | *cegcc* )
23743335 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
23753336 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
23763337 ;;
23833344 func_verbose "extracting global C symbols from \`$dlprefile'"
23843345 func_basename "$dlprefile"
23853346 name="$func_basename_result"
2386 $opt_dry_run || {
2387 eval '$ECHO ": $name " >> "$nlist"'
2388 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2389 }
3347 case $host in
3348 *cygwin* | *mingw* | *cegcc* )
3349 # if an import library, we need to obtain dlname
3350 if func_win32_import_lib_p "$dlprefile"; then
3351 func_tr_sh "$dlprefile"
3352 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3353 dlprefile_dlbasename=""
3354 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3355 # Use subshell, to avoid clobbering current variable values
3356 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3357 if test -n "$dlprefile_dlname" ; then
3358 func_basename "$dlprefile_dlname"
3359 dlprefile_dlbasename="$func_basename_result"
3360 else
3361 # no lafile. user explicitly requested -dlpreopen <import library>.
3362 $sharedlib_from_linklib_cmd "$dlprefile"
3363 dlprefile_dlbasename=$sharedlib_from_linklib_result
3364 fi
3365 fi
3366 $opt_dry_run || {
3367 if test -n "$dlprefile_dlbasename" ; then
3368 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3369 else
3370 func_warning "Could not compute DLL name from $name"
3371 eval '$ECHO ": $name " >> "$nlist"'
3372 fi
3373 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3374 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3375 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3376 }
3377 else # not an import lib
3378 $opt_dry_run || {
3379 eval '$ECHO ": $name " >> "$nlist"'
3380 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3381 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3382 }
3383 fi
3384 ;;
3385 *)
3386 $opt_dry_run || {
3387 eval '$ECHO ": $name " >> "$nlist"'
3388 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3389 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3390 }
3391 ;;
3392 esac
23903393 done
23913394
23923395 $opt_dry_run || {
24143417 if test -f "$nlist"S; then
24153418 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
24163419 else
2417 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
3420 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
24183421 fi
24193422
2420 $ECHO >> "$output_objdir/$my_dlsyms" "\
3423 echo >> "$output_objdir/$my_dlsyms" "\
24213424
24223425 /* The mapping between symbol names and symbols. */
24233426 typedef struct {
24243427 const char *name;
24253428 void *address;
24263429 } lt_dlsymlist;
2427 "
2428 case $host in
2429 *cygwin* | *mingw* | *cegcc* )
2430 $ECHO >> "$output_objdir/$my_dlsyms" "\
2431 /* DATA imports from DLLs on WIN32 con't be const, because
2432 runtime relocations are performed -- see ld's documentation
2433 on pseudo-relocs. */"
2434 lt_dlsym_const= ;;
2435 *osf5*)
2436 echo >> "$output_objdir/$my_dlsyms" "\
2437 /* This system does not cope well with relocations in const data */"
2438 lt_dlsym_const= ;;
2439 *)
2440 lt_dlsym_const=const ;;
2441 esac
2442
2443 $ECHO >> "$output_objdir/$my_dlsyms" "\
2444 extern $lt_dlsym_const lt_dlsymlist
3430 extern LT_DLSYM_CONST lt_dlsymlist
24453431 lt_${my_prefix}_LTX_preloaded_symbols[];
2446 $lt_dlsym_const lt_dlsymlist
3432 LT_DLSYM_CONST lt_dlsymlist
24473433 lt_${my_prefix}_LTX_preloaded_symbols[] =
24483434 {\
24493435 { \"$my_originator\", (void *) 0 },"
24563442 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
24573443 ;;
24583444 esac
2459 $ECHO >> "$output_objdir/$my_dlsyms" "\
3445 echo >> "$output_objdir/$my_dlsyms" "\
24603446 {0, (void *) 0}
24613447 };
24623448
24993485 for arg in $LTCFLAGS; do
25003486 case $arg in
25013487 -pie | -fpie | -fPIE) ;;
2502 *) symtab_cflags="$symtab_cflags $arg" ;;
3488 *) func_append symtab_cflags " $arg" ;;
25033489 esac
25043490 done
25053491
25143500 case $host in
25153501 *cygwin* | *mingw* | *cegcc* )
25163502 if test -f "$output_objdir/$my_outputname.def"; then
2517 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2518 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3503 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3504 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
25193505 else
2520 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2521 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3506 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3507 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25223508 fi
25233509 ;;
25243510 *)
2525 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2526 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3511 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3512 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25273513 ;;
25283514 esac
25293515 ;;
25373523 # really was required.
25383524
25393525 # Nullify the symbol file.
2540 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2541 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3526 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3527 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
25423528 fi
25433529 }
25443530
25483534 # Need a lot of goo to handle *both* DLLs and import libs
25493535 # Has to be a shell function in order to 'eat' the argument
25503536 # that is supplied when $file_magic_command is called.
3537 # Despite the name, also deal with 64 bit binaries.
25513538 func_win32_libid ()
25523539 {
25533540 $opt_debug
25583545 win32_libid_type="x86 archive import"
25593546 ;;
25603547 *ar\ archive*) # could be an import, or static
3548 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
25613549 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2562 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2563 win32_nmres=`eval $NM -f posix -A $1 |
3550 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3551 func_to_tool_file "$1" func_convert_file_msys_to_w32
3552 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
25643553 $SED -n -e '
25653554 1,100{
25663555 / I /{
25893578 $ECHO "$win32_libid_type"
25903579 }
25913580
3581 # func_cygming_dll_for_implib ARG
3582 #
3583 # Platform-specific function to extract the
3584 # name of the DLL associated with the specified
3585 # import library ARG.
3586 # Invoked by eval'ing the libtool variable
3587 # $sharedlib_from_linklib_cmd
3588 # Result is available in the variable
3589 # $sharedlib_from_linklib_result
3590 func_cygming_dll_for_implib ()
3591 {
3592 $opt_debug
3593 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3594 }
3595
3596 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3597 #
3598 # The is the core of a fallback implementation of a
3599 # platform-specific function to extract the name of the
3600 # DLL associated with the specified import library LIBNAME.
3601 #
3602 # SECTION_NAME is either .idata$6 or .idata$7, depending
3603 # on the platform and compiler that created the implib.
3604 #
3605 # Echos the name of the DLL associated with the
3606 # specified import library.
3607 func_cygming_dll_for_implib_fallback_core ()
3608 {
3609 $opt_debug
3610 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3611 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3612 $SED '/^Contents of section '"$match_literal"':/{
3613 # Place marker at beginning of archive member dllname section
3614 s/.*/====MARK====/
3615 p
3616 d
3617 }
3618 # These lines can sometimes be longer than 43 characters, but
3619 # are always uninteresting
3620 /:[ ]*file format pe[i]\{,1\}-/d
3621 /^In archive [^:]*:/d
3622 # Ensure marker is printed
3623 /^====MARK====/p
3624 # Remove all lines with less than 43 characters
3625 /^.\{43\}/!d
3626 # From remaining lines, remove first 43 characters
3627 s/^.\{43\}//' |
3628 $SED -n '
3629 # Join marker and all lines until next marker into a single line
3630 /^====MARK====/ b para
3631 H
3632 $ b para
3633 b
3634 :para
3635 x
3636 s/\n//g
3637 # Remove the marker
3638 s/^====MARK====//
3639 # Remove trailing dots and whitespace
3640 s/[\. \t]*$//
3641 # Print
3642 /./p' |
3643 # we now have a list, one entry per line, of the stringified
3644 # contents of the appropriate section of all members of the
3645 # archive which possess that section. Heuristic: eliminate
3646 # all those which have a first or second character that is
3647 # a '.' (that is, objdump's representation of an unprintable
3648 # character.) This should work for all archives with less than
3649 # 0x302f exports -- but will fail for DLLs whose name actually
3650 # begins with a literal '.' or a single character followed by
3651 # a '.'.
3652 #
3653 # Of those that remain, print the first one.
3654 $SED -e '/^\./d;/^.\./d;q'
3655 }
3656
3657 # func_cygming_gnu_implib_p ARG
3658 # This predicate returns with zero status (TRUE) if
3659 # ARG is a GNU/binutils-style import library. Returns
3660 # with nonzero status (FALSE) otherwise.
3661 func_cygming_gnu_implib_p ()
3662 {
3663 $opt_debug
3664 func_to_tool_file "$1" func_convert_file_msys_to_w32
3665 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3666 test -n "$func_cygming_gnu_implib_tmp"
3667 }
3668
3669 # func_cygming_ms_implib_p ARG
3670 # This predicate returns with zero status (TRUE) if
3671 # ARG is an MS-style import library. Returns
3672 # with nonzero status (FALSE) otherwise.
3673 func_cygming_ms_implib_p ()
3674 {
3675 $opt_debug
3676 func_to_tool_file "$1" func_convert_file_msys_to_w32
3677 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3678 test -n "$func_cygming_ms_implib_tmp"
3679 }
3680
3681 # func_cygming_dll_for_implib_fallback ARG
3682 # Platform-specific function to extract the
3683 # name of the DLL associated with the specified
3684 # import library ARG.
3685 #
3686 # This fallback implementation is for use when $DLLTOOL
3687 # does not support the --identify-strict option.
3688 # Invoked by eval'ing the libtool variable
3689 # $sharedlib_from_linklib_cmd
3690 # Result is available in the variable
3691 # $sharedlib_from_linklib_result
3692 func_cygming_dll_for_implib_fallback ()
3693 {
3694 $opt_debug
3695 if func_cygming_gnu_implib_p "$1" ; then
3696 # binutils import library
3697 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3698 elif func_cygming_ms_implib_p "$1" ; then
3699 # ms-generated import library
3700 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3701 else
3702 # unknown
3703 sharedlib_from_linklib_result=""
3704 fi
3705 }
25923706
25933707
25943708 # func_extract_an_archive dir oldlib
25973711 $opt_debug
25983712 f_ex_an_ar_dir="$1"; shift
25993713 f_ex_an_ar_oldlib="$1"
2600 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
3714 if test "$lock_old_archive_extraction" = yes; then
3715 lockfile=$f_ex_an_ar_oldlib.lock
3716 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3717 func_echo "Waiting for $lockfile to be removed"
3718 sleep 2
3719 done
3720 fi
3721 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3722 'stat=$?; rm -f "$lockfile"; exit $stat'
3723 if test "$lock_old_archive_extraction" = yes; then
3724 $opt_dry_run || rm -f "$lockfile"
3725 fi
26013726 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
26023727 :
26033728 else
26683793 darwin_file=
26693794 darwin_files=
26703795 for darwin_file in $darwin_filelist; do
2671 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
3796 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
26723797 $LIPO -create -output "$darwin_file" $darwin_files
26733798 done # $darwin_filelist
26743799 $RM -rf unfat-$$
26833808 func_extract_an_archive "$my_xdir" "$my_xabs"
26843809 ;;
26853810 esac
2686 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3811 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
26873812 done
26883813
26893814 func_extract_archives_result="$my_oldobjs"
26903815 }
2691
2692
2693
2694 # func_emit_wrapper_part1 [arg=no]
2695 #
2696 # Emit the first part of a libtool wrapper script on stdout.
2697 # For more information, see the description associated with
2698 # func_emit_wrapper(), below.
2699 func_emit_wrapper_part1 ()
2700 {
2701 func_emit_wrapper_part1_arg1=no
2702 if test -n "$1" ; then
2703 func_emit_wrapper_part1_arg1=$1
2704 fi
2705
2706 $ECHO "\
2707 #! $SHELL
2708
2709 # $output - temporary wrapper script for $objdir/$outputname
2710 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2711 #
2712 # The $output program cannot be directly executed until all the libtool
2713 # libraries that it depends on are installed.
2714 #
2715 # This wrapper script should never be moved out of the build directory.
2716 # If it is, it will not operate correctly.
2717
2718 # Sed substitution that helps us do robust quoting. It backslashifies
2719 # metacharacters that are still active within double-quoted strings.
2720 Xsed='${SED} -e 1s/^X//'
2721 sed_quote_subst='$sed_quote_subst'
2722
2723 # Be Bourne compatible
2724 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2725 emulate sh
2726 NULLCMD=:
2727 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2728 # is contrary to our usage. Disable this feature.
2729 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2730 setopt NO_GLOB_SUBST
2731 else
2732 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2733 fi
2734 BIN_SH=xpg4; export BIN_SH # for Tru64
2735 DUALCASE=1; export DUALCASE # for MKS sh
2736
2737 # The HP-UX ksh and POSIX shell print the target directory to stdout
2738 # if CDPATH is set.
2739 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2740
2741 relink_command=\"$relink_command\"
2742
2743 # This environment variable determines our operation mode.
2744 if test \"\$libtool_install_magic\" = \"$magic\"; then
2745 # install mode needs the following variables:
2746 generated_by_libtool_version='$macro_version'
2747 notinst_deplibs='$notinst_deplibs'
2748 else
2749 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2750 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2751 ECHO=\"$qecho\"
2752 file=\"\$0\"
2753 # Make sure echo works.
2754 if test \"X\$1\" = X--no-reexec; then
2755 # Discard the --no-reexec flag, and continue.
2756 shift
2757 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2758 # Yippee, \$ECHO works!
2759 :
2760 else
2761 # Restart under the correct shell, and then maybe \$ECHO will work.
2762 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2763 fi
2764 fi\
2765 "
2766 $ECHO "\
2767
2768 # Find the directory that this script lives in.
2769 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2770 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2771
2772 # Follow symbolic links until we get to the real thisdir.
2773 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2774 while test -n \"\$file\"; do
2775 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2776
2777 # If there was a directory component, then change thisdir.
2778 if test \"x\$destdir\" != \"x\$file\"; then
2779 case \"\$destdir\" in
2780 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2781 *) thisdir=\"\$thisdir/\$destdir\" ;;
2782 esac
2783 fi
2784
2785 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2786 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2787 done
2788 "
2789 }
2790 # end: func_emit_wrapper_part1
2791
2792 # func_emit_wrapper_part2 [arg=no]
2793 #
2794 # Emit the second part of a libtool wrapper script on stdout.
2795 # For more information, see the description associated with
2796 # func_emit_wrapper(), below.
2797 func_emit_wrapper_part2 ()
2798 {
2799 func_emit_wrapper_part2_arg1=no
2800 if test -n "$1" ; then
2801 func_emit_wrapper_part2_arg1=$1
2802 fi
2803
2804 $ECHO "\
2805
2806 # Usually 'no', except on cygwin/mingw when embedded into
2807 # the cwrapper.
2808 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2809 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2810 # special case for '.'
2811 if test \"\$thisdir\" = \".\"; then
2812 thisdir=\`pwd\`
2813 fi
2814 # remove .libs from thisdir
2815 case \"\$thisdir\" in
2816 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2817 $objdir ) thisdir=. ;;
2818 esac
2819 fi
2820
2821 # Try to get the absolute directory name.
2822 absdir=\`cd \"\$thisdir\" && pwd\`
2823 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2824 "
2825
2826 if test "$fast_install" = yes; then
2827 $ECHO "\
2828 program=lt-'$outputname'$exeext
2829 progdir=\"\$thisdir/$objdir\"
2830
2831 if test ! -f \"\$progdir/\$program\" ||
2832 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2833 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2834
2835 file=\"\$\$-\$program\"
2836
2837 if test ! -d \"\$progdir\"; then
2838 $MKDIR \"\$progdir\"
2839 else
2840 $RM \"\$progdir/\$file\"
2841 fi"
2842
2843 $ECHO "\
2844
2845 # relink executable if necessary
2846 if test -n \"\$relink_command\"; then
2847 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2848 else
2849 $ECHO \"\$relink_command_output\" >&2
2850 $RM \"\$progdir/\$file\"
2851 exit 1
2852 fi
2853 fi
2854
2855 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2856 { $RM \"\$progdir/\$program\";
2857 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2858 $RM \"\$progdir/\$file\"
2859 fi"
2860 else
2861 $ECHO "\
2862 program='$outputname'
2863 progdir=\"\$thisdir/$objdir\"
2864 "
2865 fi
2866
2867 $ECHO "\
2868
2869 if test -f \"\$progdir/\$program\"; then"
2870
2871 # Export our shlibpath_var if we have one.
2872 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2873 $ECHO "\
2874 # Add our own library path to $shlibpath_var
2875 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2876
2877 # Some systems cannot cope with colon-terminated $shlibpath_var
2878 # The second colon is a workaround for a bug in BeOS R4 sed
2879 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2880
2881 export $shlibpath_var
2882 "
2883 fi
2884
2885 # fixup the dll searchpath if we need to.
2886 if test -n "$dllsearchpath"; then
2887 $ECHO "\
2888 # Add the dll search path components to the executable PATH
2889 PATH=$dllsearchpath:\$PATH
2890 "
2891 fi
2892
2893 $ECHO "\
2894 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2895 # Run the actual program with our arguments.
2896 "
2897 case $host in
2898 # Backslashes separate directories on plain windows
2899 *-*-mingw | *-*-os2* | *-cegcc*)
2900 $ECHO "\
2901 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2902 "
2903 ;;
2904
2905 *)
2906 $ECHO "\
2907 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2908 "
2909 ;;
2910 esac
2911 $ECHO "\
2912 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2913 exit 1
2914 fi
2915 else
2916 # The program doesn't exist.
2917 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2918 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2919 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2920 exit 1
2921 fi
2922 fi\
2923 "
2924 }
2925 # end: func_emit_wrapper_part2
29263816
29273817
29283818 # func_emit_wrapper [arg=no]
29413831 # behavior.
29423832 func_emit_wrapper ()
29433833 {
2944 func_emit_wrapper_arg1=no
2945 if test -n "$1" ; then
2946 func_emit_wrapper_arg1=$1
2947 fi
2948
2949 # split this up so that func_emit_cwrapperexe_src
2950 # can call each part independently.
2951 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2952 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2953 }
2954
2955
2956 # func_to_host_path arg
3834 func_emit_wrapper_arg1=${1-no}
3835
3836 $ECHO "\
3837 #! $SHELL
3838
3839 # $output - temporary wrapper script for $objdir/$outputname
3840 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
29573841 #
2958 # Convert paths to host format when used with build tools.
2959 # Intended for use with "native" mingw (where libtool itself
2960 # is running under the msys shell), or in the following cross-
2961 # build environments:
2962 # $build $host
2963 # mingw (msys) mingw [e.g. native]
2964 # cygwin mingw
2965 # *nix + wine mingw
2966 # where wine is equipped with the `winepath' executable.
2967 # In the native mingw case, the (msys) shell automatically
2968 # converts paths for any non-msys applications it launches,
2969 # but that facility isn't available from inside the cwrapper.
2970 # Similar accommodations are necessary for $host mingw and
2971 # $build cygwin. Calling this function does no harm for other
2972 # $host/$build combinations not listed above.
3842 # The $output program cannot be directly executed until all the libtool
3843 # libraries that it depends on are installed.
29733844 #
2974 # ARG is the path (on $build) that should be converted to
2975 # the proper representation for $host. The result is stored
2976 # in $func_to_host_path_result.
2977 func_to_host_path ()
2978 {
2979 func_to_host_path_result="$1"
2980 if test -n "$1" ; then
2981 case $host in
2982 *mingw* )
2983 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2984 case $build in
2985 *mingw* ) # actually, msys
2986 # awkward: cmd appends spaces to result
2987 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2988 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2989 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2990 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2991 $SED -e "$lt_sed_naive_backslashify"`
2992 ;;
2993 *cygwin* )
2994 func_to_host_path_tmp1=`cygpath -w "$1"`
2995 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2996 $SED -e "$lt_sed_naive_backslashify"`
2997 ;;
2998 * )
2999 # Unfortunately, winepath does not exit with a non-zero
3000 # error code, so we are forced to check the contents of
3001 # stdout. On the other hand, if the command is not
3002 # found, the shell will set an exit code of 127 and print
3003 # *an error message* to stdout. So we must check for both
3004 # error code of zero AND non-empty stdout, which explains
3005 # the odd construction:
3006 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3007 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3008 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3009 $SED -e "$lt_sed_naive_backslashify"`
3010 else
3011 # Allow warning below.
3012 func_to_host_path_result=""
3013 fi
3014 ;;
3015 esac
3016 if test -z "$func_to_host_path_result" ; then
3017 func_error "Could not determine host path corresponding to"
3018 func_error " '$1'"
3019 func_error "Continuing, but uninstalled executables may not work."
3020 # Fallback:
3021 func_to_host_path_result="$1"
3022 fi
3023 ;;
3845 # This wrapper script should never be moved out of the build directory.
3846 # If it is, it will not operate correctly.
3847
3848 # Sed substitution that helps us do robust quoting. It backslashifies
3849 # metacharacters that are still active within double-quoted strings.
3850 sed_quote_subst='$sed_quote_subst'
3851
3852 # Be Bourne compatible
3853 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3854 emulate sh
3855 NULLCMD=:
3856 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3857 # is contrary to our usage. Disable this feature.
3858 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3859 setopt NO_GLOB_SUBST
3860 else
3861 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3862 fi
3863 BIN_SH=xpg4; export BIN_SH # for Tru64
3864 DUALCASE=1; export DUALCASE # for MKS sh
3865
3866 # The HP-UX ksh and POSIX shell print the target directory to stdout
3867 # if CDPATH is set.
3868 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3869
3870 relink_command=\"$relink_command\"
3871
3872 # This environment variable determines our operation mode.
3873 if test \"\$libtool_install_magic\" = \"$magic\"; then
3874 # install mode needs the following variables:
3875 generated_by_libtool_version='$macro_version'
3876 notinst_deplibs='$notinst_deplibs'
3877 else
3878 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3879 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3880 file=\"\$0\""
3881
3882 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3883 $ECHO "\
3884
3885 # A function that is used when there is no print builtin or printf.
3886 func_fallback_echo ()
3887 {
3888 eval 'cat <<_LTECHO_EOF
3889 \$1
3890 _LTECHO_EOF'
3891 }
3892 ECHO=\"$qECHO\"
3893 fi
3894
3895 # Very basic option parsing. These options are (a) specific to
3896 # the libtool wrapper, (b) are identical between the wrapper
3897 # /script/ and the wrapper /executable/ which is used only on
3898 # windows platforms, and (c) all begin with the string "--lt-"
3899 # (application programs are unlikely to have options which match
3900 # this pattern).
3901 #
3902 # There are only two supported options: --lt-debug and
3903 # --lt-dump-script. There is, deliberately, no --lt-help.
3904 #
3905 # The first argument to this parsing function should be the
3906 # script's $0 value, followed by "$@".
3907 lt_option_debug=
3908 func_parse_lt_options ()
3909 {
3910 lt_script_arg0=\$0
3911 shift
3912 for lt_opt
3913 do
3914 case \"\$lt_opt\" in
3915 --lt-debug) lt_option_debug=1 ;;
3916 --lt-dump-script)
3917 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3918 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3919 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3920 cat \"\$lt_dump_D/\$lt_dump_F\"
3921 exit 0
3922 ;;
3923 --lt-*)
3924 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3925 exit 1
3926 ;;
3927 esac
3928 done
3929
3930 # Print the debug banner immediately:
3931 if test -n \"\$lt_option_debug\"; then
3932 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3933 fi
3934 }
3935
3936 # Used when --lt-debug. Prints its arguments to stdout
3937 # (redirection is the responsibility of the caller)
3938 func_lt_dump_args ()
3939 {
3940 lt_dump_args_N=1;
3941 for lt_arg
3942 do
3943 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3944 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3945 done
3946 }
3947
3948 # Core function for launching the target application
3949 func_exec_program_core ()
3950 {
3951 "
3952 case $host in
3953 # Backslashes separate directories on plain windows
3954 *-*-mingw | *-*-os2* | *-cegcc*)
3955 $ECHO "\
3956 if test -n \"\$lt_option_debug\"; then
3957 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3958 func_lt_dump_args \${1+\"\$@\"} 1>&2
3959 fi
3960 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3961 "
3962 ;;
3963
3964 *)
3965 $ECHO "\
3966 if test -n \"\$lt_option_debug\"; then
3967 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3968 func_lt_dump_args \${1+\"\$@\"} 1>&2
3969 fi
3970 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3971 "
3972 ;;
3973 esac
3974 $ECHO "\
3975 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3976 exit 1
3977 }
3978
3979 # A function to encapsulate launching the target application
3980 # Strips options in the --lt-* namespace from \$@ and
3981 # launches target application with the remaining arguments.
3982 func_exec_program ()
3983 {
3984 for lt_wr_arg
3985 do
3986 case \$lt_wr_arg in
3987 --lt-*) ;;
3988 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3989 esac
3990 shift
3991 done
3992 func_exec_program_core \${1+\"\$@\"}
3993 }
3994
3995 # Parse options
3996 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
3997
3998 # Find the directory that this script lives in.
3999 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4000 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4001
4002 # Follow symbolic links until we get to the real thisdir.
4003 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4004 while test -n \"\$file\"; do
4005 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4006
4007 # If there was a directory component, then change thisdir.
4008 if test \"x\$destdir\" != \"x\$file\"; then
4009 case \"\$destdir\" in
4010 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4011 *) thisdir=\"\$thisdir/\$destdir\" ;;
4012 esac
4013 fi
4014
4015 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4016 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4017 done
4018
4019 # Usually 'no', except on cygwin/mingw when embedded into
4020 # the cwrapper.
4021 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4022 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4023 # special case for '.'
4024 if test \"\$thisdir\" = \".\"; then
4025 thisdir=\`pwd\`
4026 fi
4027 # remove .libs from thisdir
4028 case \"\$thisdir\" in
4029 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4030 $objdir ) thisdir=. ;;
30244031 esac
30254032 fi
3026 }
3027 # end: func_to_host_path
3028
3029 # func_to_host_pathlist arg
3030 #
3031 # Convert pathlists to host format when used with build tools.
3032 # See func_to_host_path(), above. This function supports the
3033 # following $build/$host combinations (but does no harm for
3034 # combinations not listed here):
3035 # $build $host
3036 # mingw (msys) mingw [e.g. native]
3037 # cygwin mingw
3038 # *nix + wine mingw
3039 #
3040 # Path separators are also converted from $build format to
3041 # $host format. If ARG begins or ends with a path separator
3042 # character, it is preserved (but converted to $host format)
3043 # on output.
3044 #
3045 # ARG is a pathlist (on $build) that should be converted to
3046 # the proper representation on $host. The result is stored
3047 # in $func_to_host_pathlist_result.
3048 func_to_host_pathlist ()
3049 {
3050 func_to_host_pathlist_result="$1"
3051 if test -n "$1" ; then
3052 case $host in
3053 *mingw* )
3054 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3055 # Remove leading and trailing path separator characters from
3056 # ARG. msys behavior is inconsistent here, cygpath turns them
3057 # into '.;' and ';.', and winepath ignores them completely.
3058 func_to_host_pathlist_tmp2="$1"
3059 # Once set for this call, this variable should not be
3060 # reassigned. It is used in tha fallback case.
3061 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3062 $SED -e 's|^:*||' -e 's|:*$||'`
3063 case $build in
3064 *mingw* ) # Actually, msys.
3065 # Awkward: cmd appends spaces to result.
3066 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3067 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3068 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3069 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3070 $SED -e "$lt_sed_naive_backslashify"`
3071 ;;
3072 *cygwin* )
3073 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3074 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3075 $SED -e "$lt_sed_naive_backslashify"`
3076 ;;
3077 * )
3078 # unfortunately, winepath doesn't convert pathlists
3079 func_to_host_pathlist_result=""
3080 func_to_host_pathlist_oldIFS=$IFS
3081 IFS=:
3082 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3083 IFS=$func_to_host_pathlist_oldIFS
3084 if test -n "$func_to_host_pathlist_f" ; then
3085 func_to_host_path "$func_to_host_pathlist_f"
3086 if test -n "$func_to_host_path_result" ; then
3087 if test -z "$func_to_host_pathlist_result" ; then
3088 func_to_host_pathlist_result="$func_to_host_path_result"
3089 else
3090 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3091 fi
3092 fi
3093 fi
3094 IFS=:
3095 done
3096 IFS=$func_to_host_pathlist_oldIFS
3097 ;;
3098 esac
3099 if test -z "$func_to_host_pathlist_result" ; then
3100 func_error "Could not determine the host path(s) corresponding to"
3101 func_error " '$1'"
3102 func_error "Continuing, but uninstalled executables may not work."
3103 # Fallback. This may break if $1 contains DOS-style drive
3104 # specifications. The fix is not to complicate the expression
3105 # below, but for the user to provide a working wine installation
3106 # with winepath so that path translation in the cross-to-mingw
3107 # case works properly.
3108 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3109 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3110 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3111 fi
3112 # Now, add the leading and trailing path separators back
3113 case "$1" in
3114 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3115 ;;
3116 esac
3117 case "$1" in
3118 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3119 ;;
3120 esac
3121 ;;
3122 esac
4033
4034 # Try to get the absolute directory name.
4035 absdir=\`cd \"\$thisdir\" && pwd\`
4036 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4037 "
4038
4039 if test "$fast_install" = yes; then
4040 $ECHO "\
4041 program=lt-'$outputname'$exeext
4042 progdir=\"\$thisdir/$objdir\"
4043
4044 if test ! -f \"\$progdir/\$program\" ||
4045 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4046 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4047
4048 file=\"\$\$-\$program\"
4049
4050 if test ! -d \"\$progdir\"; then
4051 $MKDIR \"\$progdir\"
4052 else
4053 $RM \"\$progdir/\$file\"
4054 fi"
4055
4056 $ECHO "\
4057
4058 # relink executable if necessary
4059 if test -n \"\$relink_command\"; then
4060 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4061 else
4062 $ECHO \"\$relink_command_output\" >&2
4063 $RM \"\$progdir/\$file\"
4064 exit 1
4065 fi
4066 fi
4067
4068 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4069 { $RM \"\$progdir/\$program\";
4070 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4071 $RM \"\$progdir/\$file\"
4072 fi"
4073 else
4074 $ECHO "\
4075 program='$outputname'
4076 progdir=\"\$thisdir/$objdir\"
4077 "
4078 fi
4079
4080 $ECHO "\
4081
4082 if test -f \"\$progdir/\$program\"; then"
4083
4084 # fixup the dll searchpath if we need to.
4085 #
4086 # Fix the DLL searchpath if we need to. Do this before prepending
4087 # to shlibpath, because on Windows, both are PATH and uninstalled
4088 # libraries must come first.
4089 if test -n "$dllsearchpath"; then
4090 $ECHO "\
4091 # Add the dll search path components to the executable PATH
4092 PATH=$dllsearchpath:\$PATH
4093 "
4094 fi
4095
4096 # Export our shlibpath_var if we have one.
4097 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4098 $ECHO "\
4099 # Add our own library path to $shlibpath_var
4100 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4101
4102 # Some systems cannot cope with colon-terminated $shlibpath_var
4103 # The second colon is a workaround for a bug in BeOS R4 sed
4104 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4105
4106 export $shlibpath_var
4107 "
4108 fi
4109
4110 $ECHO "\
4111 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4112 # Run the actual program with our arguments.
4113 func_exec_program \${1+\"\$@\"}
4114 fi
4115 else
4116 # The program doesn't exist.
4117 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4118 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4119 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4120 exit 1
31234121 fi
3124 }
3125 # end: func_to_host_pathlist
4122 fi\
4123 "
4124 }
4125
31264126
31274127 # func_emit_cwrapperexe_src
31284128 # emit the source code for a wrapper executable on stdout
31404140
31414141 This wrapper executable should never be moved out of the build directory.
31424142 If it is, it will not operate correctly.
3143
3144 Currently, it simply execs the wrapper *script* "$SHELL $output",
3145 but could eventually absorb all of the scripts functionality and
3146 exec $objdir/$outputname directly.
31474143 */
31484144 EOF
31494145 cat <<"EOF"
4146 #ifdef _MSC_VER
4147 # define _CRT_SECURE_NO_DEPRECATE 1
4148 #endif
31504149 #include <stdio.h>
31514150 #include <stdlib.h>
31524151 #ifdef _MSC_VER
31534152 # include <direct.h>
31544153 # include <process.h>
31554154 # include <io.h>
3156 # define setmode _setmode
31574155 #else
31584156 # include <unistd.h>
31594157 # include <stdint.h>
31604158 # ifdef __CYGWIN__
31614159 # include <io.h>
3162 # define HAVE_SETENV
3163 # ifdef __STRICT_ANSI__
3164 char *realpath (const char *, char *);
3165 int putenv (char *);
3166 int setenv (const char *, const char *, int);
3167 # endif
31684160 # endif
31694161 #endif
31704162 #include <malloc.h>
31764168 #include <fcntl.h>
31774169 #include <sys/stat.h>
31784170
4171 /* declarations of non-ANSI functions */
4172 #if defined(__MINGW32__)
4173 # ifdef __STRICT_ANSI__
4174 int _putenv (const char *);
4175 # endif
4176 #elif defined(__CYGWIN__)
4177 # ifdef __STRICT_ANSI__
4178 char *realpath (const char *, char *);
4179 int putenv (char *);
4180 int setenv (const char *, const char *, int);
4181 # endif
4182 /* #elif defined (other platforms) ... */
4183 #endif
4184
4185 /* portability defines, excluding path handling macros */
4186 #if defined(_MSC_VER)
4187 # define setmode _setmode
4188 # define stat _stat
4189 # define chmod _chmod
4190 # define getcwd _getcwd
4191 # define putenv _putenv
4192 # define S_IXUSR _S_IEXEC
4193 # ifndef _INTPTR_T_DEFINED
4194 # define _INTPTR_T_DEFINED
4195 # define intptr_t int
4196 # endif
4197 #elif defined(__MINGW32__)
4198 # define setmode _setmode
4199 # define stat _stat
4200 # define chmod _chmod
4201 # define getcwd _getcwd
4202 # define putenv _putenv
4203 #elif defined(__CYGWIN__)
4204 # define HAVE_SETENV
4205 # define FOPEN_WB "wb"
4206 /* #elif defined (other platforms) ... */
4207 #endif
4208
31794209 #if defined(PATH_MAX)
31804210 # define LT_PATHMAX PATH_MAX
31814211 #elif defined(MAXPATHLEN)
31914221 # define S_IXGRP 0
31924222 #endif
31934223
3194 #ifdef _MSC_VER
3195 # define S_IXUSR _S_IEXEC
3196 # define stat _stat
3197 # ifndef _INTPTR_T_DEFINED
3198 # define intptr_t int
3199 # endif
3200 #endif
3201
4224 /* path handling portability macros */
32024225 #ifndef DIR_SEPARATOR
32034226 # define DIR_SEPARATOR '/'
32044227 # define PATH_SEPARATOR ':'
32294252 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
32304253 #endif /* PATH_SEPARATOR_2 */
32314254
3232 #ifdef __CYGWIN__
3233 # define FOPEN_WB "wb"
3234 #endif
3235
32364255 #ifndef FOPEN_WB
32374256 # define FOPEN_WB "w"
32384257 #endif
32454264 if (stale) { free ((void *) stale); stale = 0; } \
32464265 } while (0)
32474266
3248 #undef LTWRAPPER_DEBUGPRINTF
3249 #if defined DEBUGWRAPPER
3250 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3251 static void
3252 ltwrapper_debugprintf (const char *fmt, ...)
3253 {
3254 va_list args;
3255 va_start (args, fmt);
3256 (void) vfprintf (stderr, fmt, args);
3257 va_end (args);
3258 }
4267 #if defined(LT_DEBUGWRAPPER)
4268 static int lt_debug = 1;
32594269 #else
3260 # define LTWRAPPER_DEBUGPRINTF(args)
4270 static int lt_debug = 0;
32614271 #endif
32624272
3263 const char *program_name = NULL;
4273 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
32644274
32654275 void *xmalloc (size_t num);
32664276 char *xstrdup (const char *string);
32704280 int make_executable (const char *path);
32714281 int check_executable (const char *path);
32724282 char *strendzap (char *str, const char *pat);
3273 void lt_fatal (const char *message, ...);
4283 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4284 void lt_fatal (const char *file, int line, const char *message, ...);
4285 static const char *nonnull (const char *s);
4286 static const char *nonempty (const char *s);
32744287 void lt_setenv (const char *name, const char *value);
32754288 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3276 void lt_opt_process_env_set (const char *arg);
3277 void lt_opt_process_env_prepend (const char *arg);
3278 void lt_opt_process_env_append (const char *arg);
3279 int lt_split_name_value (const char *arg, char** name, char** value);
32804289 void lt_update_exe_path (const char *name, const char *value);
32814290 void lt_update_lib_path (const char *name, const char *value);
3282
3283 static const char *script_text_part1 =
4291 char **prepare_spawn (char **argv);
4292 void lt_dump_script (FILE *f);
32844293 EOF
32854294
3286 func_emit_wrapper_part1 yes |
3287 $SED -e 's/\([\\"]\)/\\\1/g' \
3288 -e 's/^/ "/' -e 's/$/\\n"/'
3289 echo ";"
32904295 cat <<EOF
3291
3292 static const char *script_text_part2 =
3293 EOF
3294 func_emit_wrapper_part2 yes |
3295 $SED -e 's/\([\\"]\)/\\\1/g' \
3296 -e 's/^/ "/' -e 's/$/\\n"/'
3297 echo ";"
3298
3299 cat <<EOF
3300 const char * MAGIC_EXE = "$magic_exe";
4296 volatile const char * MAGIC_EXE = "$magic_exe";
33014297 const char * LIB_PATH_VARNAME = "$shlibpath_var";
33024298 EOF
33034299
33044300 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3305 func_to_host_pathlist "$temp_rpath"
4301 func_to_host_path "$temp_rpath"
33064302 cat <<EOF
3307 const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4303 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
33084304 EOF
33094305 else
33104306 cat <<"EOF"
33134309 fi
33144310
33154311 if test -n "$dllsearchpath"; then
3316 func_to_host_pathlist "$dllsearchpath:"
4312 func_to_host_path "$dllsearchpath:"
33174313 cat <<EOF
33184314 const char * EXE_PATH_VARNAME = "PATH";
3319 const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4315 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
33204316 EOF
33214317 else
33224318 cat <<"EOF"
33394335 cat <<"EOF"
33404336
33414337 #define LTWRAPPER_OPTION_PREFIX "--lt-"
3342 #define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3343
3344 static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
4338
33454339 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3346
33474340 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3348
3349 static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3350 static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3351 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3352
3353 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3354 static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3355 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3356
3357 static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3358 static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3359 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
4341 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
33604342
33614343 int
33624344 main (int argc, char *argv[])
33734355 int i;
33744356
33754357 program_name = (char *) xstrdup (base_name (argv[0]));
3376 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3378
3379 /* very simple arg parsing; don't want to rely on getopt */
4358 newargz = XMALLOC (char *, argc + 1);
4359
4360 /* very simple arg parsing; don't want to rely on getopt
4361 * also, copy all non cwrapper options to newargz, except
4362 * argz[0], which is handled differently
4363 */
4364 newargc=0;
33804365 for (i = 1; i < argc; i++)
33814366 {
33824367 if (strcmp (argv[i], dumpscript_opt) == 0)
33904375 esac
33914376
33924377 cat <<"EOF"
3393 printf ("%s", script_text_part1);
3394 printf ("%s", script_text_part2);
4378 lt_dump_script (stdout);
33954379 return 0;
33964380 }
4381 if (strcmp (argv[i], debug_opt) == 0)
4382 {
4383 lt_debug = 1;
4384 continue;
4385 }
4386 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4387 {
4388 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4389 namespace, but it is not one of the ones we know about and
4390 have already dealt with, above (inluding dump-script), then
4391 report an error. Otherwise, targets might begin to believe
4392 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4393 namespace. The first time any user complains about this, we'll
4394 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4395 or a configure.ac-settable value.
4396 */
4397 lt_fatal (__FILE__, __LINE__,
4398 "unrecognized %s option: '%s'",
4399 ltwrapper_option_prefix, argv[i]);
4400 }
4401 /* otherwise ... */
4402 newargz[++newargc] = xstrdup (argv[i]);
33974403 }
3398
3399 newargz = XMALLOC (char *, argc + 1);
4404 newargz[++newargc] = NULL;
4405
4406 EOF
4407 cat <<EOF
4408 /* The GNU banner must be the first non-error debug message */
4409 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4410 EOF
4411 cat <<"EOF"
4412 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4413 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4414
34004415 tmp_pathspec = find_executable (argv[0]);
34014416 if (tmp_pathspec == NULL)
3402 lt_fatal ("Couldn't find %s", argv[0]);
3403 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3404 tmp_pathspec));
4417 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4418 lt_debugprintf (__FILE__, __LINE__,
4419 "(main) found exe (before symlink chase) at: %s\n",
4420 tmp_pathspec);
34054421
34064422 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3407 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3408 actual_cwrapper_path));
4423 lt_debugprintf (__FILE__, __LINE__,
4424 "(main) found exe (after symlink chase) at: %s\n",
4425 actual_cwrapper_path);
34094426 XFREE (tmp_pathspec);
34104427
3411 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
4428 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
34124429 strendzap (actual_cwrapper_path, actual_cwrapper_name);
34134430
34144431 /* wrapper name transforms */
34264443 target_name = tmp_pathspec;
34274444 tmp_pathspec = 0;
34284445
3429 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3430 target_name));
4446 lt_debugprintf (__FILE__, __LINE__,
4447 "(main) libtool target name: %s\n",
4448 target_name);
34314449 EOF
34324450
34334451 cat <<EOF
34774495
34784496 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
34794497 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4498 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4499 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4500 because on Windows, both *_VARNAMEs are PATH but uninstalled
4501 libraries must come first. */
4502 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
34804503 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3481 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3482
3483 newargc=0;
3484 for (i = 1; i < argc; i++)
3485 {
3486 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3487 {
3488 if (argv[i][env_set_opt_len] == '=')
3489 {
3490 const char *p = argv[i] + env_set_opt_len + 1;
3491 lt_opt_process_env_set (p);
3492 }
3493 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3494 {
3495 lt_opt_process_env_set (argv[++i]); /* don't copy */
3496 }
3497 else
3498 lt_fatal ("%s missing required argument", env_set_opt);
3499 continue;
3500 }
3501 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3502 {
3503 if (argv[i][env_prepend_opt_len] == '=')
3504 {
3505 const char *p = argv[i] + env_prepend_opt_len + 1;
3506 lt_opt_process_env_prepend (p);
3507 }
3508 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3509 {
3510 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3511 }
3512 else
3513 lt_fatal ("%s missing required argument", env_prepend_opt);
3514 continue;
3515 }
3516 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3517 {
3518 if (argv[i][env_append_opt_len] == '=')
3519 {
3520 const char *p = argv[i] + env_append_opt_len + 1;
3521 lt_opt_process_env_append (p);
3522 }
3523 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3524 {
3525 lt_opt_process_env_append (argv[++i]); /* don't copy */
3526 }
3527 else
3528 lt_fatal ("%s missing required argument", env_append_opt);
3529 continue;
3530 }
3531 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3532 {
3533 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3534 namespace, but it is not one of the ones we know about and
3535 have already dealt with, above (inluding dump-script), then
3536 report an error. Otherwise, targets might begin to believe
3537 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3538 namespace. The first time any user complains about this, we'll
3539 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3540 or a configure.ac-settable value.
3541 */
3542 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3543 ltwrapper_option_prefix, argv[i]);
3544 }
3545 /* otherwise ... */
3546 newargz[++newargc] = xstrdup (argv[i]);
3547 }
3548 newargz[++newargc] = NULL;
3549
3550 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
4504
4505 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4506 nonnull (lt_argv_zero));
35514507 for (i = 0; i < newargc; i++)
35524508 {
3553 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
4509 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4510 i, nonnull (newargz[i]));
35544511 }
35554512
35564513 EOF
35594516 mingw*)
35604517 cat <<"EOF"
35614518 /* execv doesn't actually work on mingw as expected on unix */
4519 newargz = prepare_spawn (newargz);
35624520 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
35634521 if (rval == -1)
35644522 {
35654523 /* failed to start process */
3566 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
4524 lt_debugprintf (__FILE__, __LINE__,
4525 "(main) failed to launch target \"%s\": %s\n",
4526 lt_argv_zero, nonnull (strerror (errno)));
35674527 return 127;
35684528 }
35694529 return rval;
35854545 {
35864546 void *p = (void *) malloc (num);
35874547 if (!p)
3588 lt_fatal ("Memory exhausted");
4548 lt_fatal (__FILE__, __LINE__, "memory exhausted");
35894549
35904550 return p;
35914551 }
36194579 {
36204580 struct stat st;
36214581
3622 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3623 path ? (*path ? path : "EMPTY!") : "NULL!"));
4582 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4583 nonempty (path));
36244584 if ((!path) || (!*path))
36254585 return 0;
36264586
36374597 int rval = 0;
36384598 struct stat st;
36394599
3640 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3641 path ? (*path ? path : "EMPTY!") : "NULL!"));
4600 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4601 nonempty (path));
36424602 if ((!path) || (!*path))
36434603 return 0;
36444604
36644624 int tmp_len;
36654625 char *concat_name;
36664626
3667 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3668 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
4627 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4628 nonempty (wrapper));
36694629
36704630 if ((wrapper == NULL) || (*wrapper == '\0'))
36714631 return NULL;
37184678 {
37194679 /* empty path: current directory */
37204680 if (getcwd (tmp, LT_PATHMAX) == NULL)
3721 lt_fatal ("getcwd failed");
4681 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4682 nonnull (strerror (errno)));
37224683 tmp_len = strlen (tmp);
37234684 concat_name =
37244685 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37434704 }
37444705 /* Relative path | not found in path: prepend cwd */
37454706 if (getcwd (tmp, LT_PATHMAX) == NULL)
3746 lt_fatal ("getcwd failed");
4707 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4708 nonnull (strerror (errno)));
37474709 tmp_len = strlen (tmp);
37484710 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37494711 memcpy (concat_name, tmp, tmp_len);
37694731 int has_symlinks = 0;
37704732 while (strlen (tmp_pathspec) && !has_symlinks)
37714733 {
3772 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3773 tmp_pathspec));
4734 lt_debugprintf (__FILE__, __LINE__,
4735 "checking path component for symlinks: %s\n",
4736 tmp_pathspec);
37744737 if (lstat (tmp_pathspec, &s) == 0)
37754738 {
37764739 if (S_ISLNK (s.st_mode) != 0)
37924755 }
37934756 else
37944757 {
3795 char *errstr = strerror (errno);
3796 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
4758 lt_fatal (__FILE__, __LINE__,
4759 "error accessing file \"%s\": %s",
4760 tmp_pathspec, nonnull (strerror (errno)));
37974761 }
37984762 }
37994763 XFREE (tmp_pathspec);
38064770 tmp_pathspec = realpath (pathspec, buf);
38074771 if (tmp_pathspec == 0)
38084772 {
3809 lt_fatal ("Could not follow symlinks for %s", pathspec);
4773 lt_fatal (__FILE__, __LINE__,
4774 "could not follow symlinks for %s", pathspec);
38104775 }
38114776 return xstrdup (tmp_pathspec);
38124777 #endif
38324797 return str;
38334798 }
38344799
4800 void
4801 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4802 {
4803 va_list args;
4804 if (lt_debug)
4805 {
4806 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4807 va_start (args, fmt);
4808 (void) vfprintf (stderr, fmt, args);
4809 va_end (args);
4810 }
4811 }
4812
38354813 static void
3836 lt_error_core (int exit_status, const char *mode,
4814 lt_error_core (int exit_status, const char *file,
4815 int line, const char *mode,
38374816 const char *message, va_list ap)
38384817 {
3839 fprintf (stderr, "%s: %s: ", program_name, mode);
4818 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
38404819 vfprintf (stderr, message, ap);
38414820 fprintf (stderr, ".\n");
38424821
38454824 }
38464825
38474826 void
3848 lt_fatal (const char *message, ...)
4827 lt_fatal (const char *file, int line, const char *message, ...)
38494828 {
38504829 va_list ap;
38514830 va_start (ap, message);
3852 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4831 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
38534832 va_end (ap);
4833 }
4834
4835 static const char *
4836 nonnull (const char *s)
4837 {
4838 return s ? s : "(null)";
4839 }
4840
4841 static const char *
4842 nonempty (const char *s)
4843 {
4844 return (s && !*s) ? "(empty)" : nonnull (s);
38544845 }
38554846
38564847 void
38574848 lt_setenv (const char *name, const char *value)
38584849 {
3859 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3860 (name ? name : "<NULL>"),
3861 (value ? value : "<NULL>")));
4850 lt_debugprintf (__FILE__, __LINE__,
4851 "(lt_setenv) setting '%s' to '%s'\n",
4852 nonnull (name), nonnull (value));
38624853 {
38634854 #ifdef HAVE_SETENV
38644855 /* always make a copy, for consistency with !HAVE_SETENV */
39034894 return new_value;
39044895 }
39054896
3906 int
3907 lt_split_name_value (const char *arg, char** name, char** value)
3908 {
3909 const char *p;
3910 int len;
3911 if (!arg || !*arg)
3912 return 1;
3913
3914 p = strchr (arg, (int)'=');
3915
3916 if (!p)
3917 return 1;
3918
3919 *value = xstrdup (++p);
3920
3921 len = strlen (arg) - strlen (*value);
3922 *name = XMALLOC (char, len);
3923 strncpy (*name, arg, len-1);
3924 (*name)[len - 1] = '\0';
3925
3926 return 0;
3927 }
3928
3929 void
3930 lt_opt_process_env_set (const char *arg)
3931 {
3932 char *name = NULL;
3933 char *value = NULL;
3934
3935 if (lt_split_name_value (arg, &name, &value) != 0)
3936 {
3937 XFREE (name);
3938 XFREE (value);
3939 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3940 }
3941
3942 lt_setenv (name, value);
3943 XFREE (name);
3944 XFREE (value);
3945 }
3946
3947 void
3948 lt_opt_process_env_prepend (const char *arg)
3949 {
3950 char *name = NULL;
3951 char *value = NULL;
3952 char *new_value = NULL;
3953
3954 if (lt_split_name_value (arg, &name, &value) != 0)
3955 {
3956 XFREE (name);
3957 XFREE (value);
3958 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3959 }
3960
3961 new_value = lt_extend_str (getenv (name), value, 0);
3962 lt_setenv (name, new_value);
3963 XFREE (new_value);
3964 XFREE (name);
3965 XFREE (value);
3966 }
3967
3968 void
3969 lt_opt_process_env_append (const char *arg)
3970 {
3971 char *name = NULL;
3972 char *value = NULL;
3973 char *new_value = NULL;
3974
3975 if (lt_split_name_value (arg, &name, &value) != 0)
3976 {
3977 XFREE (name);
3978 XFREE (value);
3979 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3980 }
3981
3982 new_value = lt_extend_str (getenv (name), value, 1);
3983 lt_setenv (name, new_value);
3984 XFREE (new_value);
3985 XFREE (name);
3986 XFREE (value);
3987 }
3988
39894897 void
39904898 lt_update_exe_path (const char *name, const char *value)
39914899 {
3992 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3993 (name ? name : "<NULL>"),
3994 (value ? value : "<NULL>")));
4900 lt_debugprintf (__FILE__, __LINE__,
4901 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4902 nonnull (name), nonnull (value));
39954903
39964904 if (name && *name && value && *value)
39974905 {
40104918 void
40114919 lt_update_lib_path (const char *name, const char *value)
40124920 {
4013 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4014 (name ? name : "<NULL>"),
4015 (value ? value : "<NULL>")));
4921 lt_debugprintf (__FILE__, __LINE__,
4922 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4923 nonnull (name), nonnull (value));
40164924
40174925 if (name && *name && value && *value)
40184926 {
40224930 }
40234931 }
40244932
4025
40264933 EOF
4934 case $host_os in
4935 mingw*)
4936 cat <<"EOF"
4937
4938 /* Prepares an argument vector before calling spawn().
4939 Note that spawn() does not by itself call the command interpreter
4940 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4941 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4942 GetVersionEx(&v);
4943 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4944 }) ? "cmd.exe" : "command.com").
4945 Instead it simply concatenates the arguments, separated by ' ', and calls
4946 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4947 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4948 special way:
4949 - Space and tab are interpreted as delimiters. They are not treated as
4950 delimiters if they are surrounded by double quotes: "...".
4951 - Unescaped double quotes are removed from the input. Their only effect is
4952 that within double quotes, space and tab are treated like normal
4953 characters.
4954 - Backslashes not followed by double quotes are not special.
4955 - But 2*n+1 backslashes followed by a double quote become
4956 n backslashes followed by a double quote (n >= 0):
4957 \" -> "
4958 \\\" -> \"
4959 \\\\\" -> \\"
4960 */
4961 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4962 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4963 char **
4964 prepare_spawn (char **argv)
4965 {
4966 size_t argc;
4967 char **new_argv;
4968 size_t i;
4969
4970 /* Count number of arguments. */
4971 for (argc = 0; argv[argc] != NULL; argc++)
4972 ;
4973
4974 /* Allocate new argument vector. */
4975 new_argv = XMALLOC (char *, argc + 1);
4976
4977 /* Put quoted arguments into the new argument vector. */
4978 for (i = 0; i < argc; i++)
4979 {
4980 const char *string = argv[i];
4981
4982 if (string[0] == '\0')
4983 new_argv[i] = xstrdup ("\"\"");
4984 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4985 {
4986 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4987 size_t length;
4988 unsigned int backslashes;
4989 const char *s;
4990 char *quoted_string;
4991 char *p;
4992
4993 length = 0;
4994 backslashes = 0;
4995 if (quote_around)
4996 length++;
4997 for (s = string; *s != '\0'; s++)
4998 {
4999 char c = *s;
5000 if (c == '"')
5001 length += backslashes + 1;
5002 length++;
5003 if (c == '\\')
5004 backslashes++;
5005 else
5006 backslashes = 0;
5007 }
5008 if (quote_around)
5009 length += backslashes + 1;
5010
5011 quoted_string = XMALLOC (char, length + 1);
5012
5013 p = quoted_string;
5014 backslashes = 0;
5015 if (quote_around)
5016 *p++ = '"';
5017 for (s = string; *s != '\0'; s++)
5018 {
5019 char c = *s;
5020 if (c == '"')
5021 {
5022 unsigned int j;
5023 for (j = backslashes + 1; j > 0; j--)
5024 *p++ = '\\';
5025 }
5026 *p++ = c;
5027 if (c == '\\')
5028 backslashes++;
5029 else
5030 backslashes = 0;
5031 }
5032 if (quote_around)
5033 {
5034 unsigned int j;
5035 for (j = backslashes; j > 0; j--)
5036 *p++ = '\\';
5037 *p++ = '"';
5038 }
5039 *p = '\0';
5040
5041 new_argv[i] = quoted_string;
5042 }
5043 else
5044 new_argv[i] = (char *) string;
5045 }
5046 new_argv[argc] = NULL;
5047
5048 return new_argv;
5049 }
5050 EOF
5051 ;;
5052 esac
5053
5054 cat <<"EOF"
5055 void lt_dump_script (FILE* f)
5056 {
5057 EOF
5058 func_emit_wrapper yes |
5059 $SED -e 's/\([\\"]\)/\\\1/g' \
5060 -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
5061
5062 cat <<"EOF"
5063 }
5064 EOF
40275065 }
40285066 # end: func_emit_cwrapperexe_src
5067
5068 # func_win32_import_lib_p ARG
5069 # True if ARG is an import lib, as indicated by $file_magic_cmd
5070 func_win32_import_lib_p ()
5071 {
5072 $opt_debug
5073 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5074 *import*) : ;;
5075 *) false ;;
5076 esac
5077 }
40295078
40305079 # func_mode_link arg...
40315080 func_mode_link ()
40715120 new_inherited_linker_flags=
40725121
40735122 avoid_version=no
5123 bindir=
40745124 dlfiles=
40755125 dlprefiles=
40765126 dlself=no
41635213 esac
41645214
41655215 case $prev in
5216 bindir)
5217 bindir="$arg"
5218 prev=
5219 continue
5220 ;;
41665221 dlfiles|dlprefiles)
41675222 if test "$preload" = no; then
41685223 # Add the symbol object into the linking commands.
41945249 ;;
41955250 *)
41965251 if test "$prev" = dlfiles; then
4197 dlfiles="$dlfiles $arg"
5252 func_append dlfiles " $arg"
41985253 else
4199 dlprefiles="$dlprefiles $arg"
5254 func_append dlprefiles " $arg"
42005255 fi
42015256 prev=
42025257 continue
42205275 *-*-darwin*)
42215276 case "$deplibs " in
42225277 *" $qarg.ltframework "*) ;;
4223 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
5278 *) func_append deplibs " $qarg.ltframework" # this is fixed later
42245279 ;;
42255280 esac
42265281 ;;
42395294 moreargs=
42405295 for fil in `cat "$save_arg"`
42415296 do
4242 # moreargs="$moreargs $fil"
5297 # func_append moreargs " $fil"
42435298 arg=$fil
42445299 # A libtool-controlled object.
42455300
42685323
42695324 if test "$prev" = dlfiles; then
42705325 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4271 dlfiles="$dlfiles $pic_object"
5326 func_append dlfiles " $pic_object"
42725327 prev=
42735328 continue
42745329 else
42805335 # CHECK ME: I think I busted this. -Ossama
42815336 if test "$prev" = dlprefiles; then
42825337 # Preload the old-style object.
4283 dlprefiles="$dlprefiles $pic_object"
5338 func_append dlprefiles " $pic_object"
42845339 prev=
42855340 fi
42865341
43505405 if test "$prev" = rpath; then
43515406 case "$rpath " in
43525407 *" $arg "*) ;;
4353 *) rpath="$rpath $arg" ;;
5408 *) func_append rpath " $arg" ;;
43545409 esac
43555410 else
43565411 case "$xrpath " in
43575412 *" $arg "*) ;;
4358 *) xrpath="$xrpath $arg" ;;
5413 *) func_append xrpath " $arg" ;;
43595414 esac
43605415 fi
43615416 prev=
43675422 continue
43685423 ;;
43695424 weak)
4370 weak_libs="$weak_libs $arg"
5425 func_append weak_libs " $arg"
43715426 prev=
43725427 continue
43735428 ;;
43745429 xcclinker)
4375 linker_flags="$linker_flags $qarg"
4376 compiler_flags="$compiler_flags $qarg"
5430 func_append linker_flags " $qarg"
5431 func_append compiler_flags " $qarg"
43775432 prev=
43785433 func_append compile_command " $qarg"
43795434 func_append finalize_command " $qarg"
43805435 continue
43815436 ;;
43825437 xcompiler)
4383 compiler_flags="$compiler_flags $qarg"
5438 func_append compiler_flags " $qarg"
43845439 prev=
43855440 func_append compile_command " $qarg"
43865441 func_append finalize_command " $qarg"
43875442 continue
43885443 ;;
43895444 xlinker)
4390 linker_flags="$linker_flags $qarg"
4391 compiler_flags="$compiler_flags $wl$qarg"
5445 func_append linker_flags " $qarg"
5446 func_append compiler_flags " $wl$qarg"
43925447 prev=
43935448 func_append compile_command " $wl$qarg"
43945449 func_append finalize_command " $wl$qarg"
44245479 continue
44255480 ;;
44265481
5482 -bindir)
5483 prev=bindir
5484 continue
5485 ;;
5486
44275487 -dlopen)
44285488 prev=dlfiles
44295489 continue
44745534 ;;
44755535
44765536 -L*)
4477 func_stripname '-L' '' "$arg"
4478 dir=$func_stripname_result
4479 if test -z "$dir"; then
5537 func_stripname "-L" '' "$arg"
5538 if test -z "$func_stripname_result"; then
44805539 if test "$#" -gt 0; then
44815540 func_fatal_error "require no space between \`-L' and \`$1'"
44825541 else
44835542 func_fatal_error "need path for \`-L' option"
44845543 fi
44855544 fi
5545 func_resolve_sysroot "$func_stripname_result"
5546 dir=$func_resolve_sysroot_result
44865547 # We need an absolute path.
44875548 case $dir in
44885549 [\\/]* | [A-Za-z]:[\\/]*) ;;
44945555 ;;
44955556 esac
44965557 case "$deplibs " in
4497 *" -L$dir "*) ;;
5558 *" -L$dir "* | *" $arg "*)
5559 # Will only happen for absolute or sysroot arguments
5560 ;;
44985561 *)
4499 deplibs="$deplibs -L$dir"
4500 lib_search_path="$lib_search_path $dir"
5562 # Preserve sysroot, but never include relative directories
5563 case $dir in
5564 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5565 *) func_append deplibs " -L$dir" ;;
5566 esac
5567 func_append lib_search_path " $dir"
45015568 ;;
45025569 esac
45035570 case $host in
45045571 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4505 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
5572 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
45065573 case :$dllsearchpath: in
45075574 *":$dir:"*) ;;
45085575 ::) dllsearchpath=$dir;;
4509 *) dllsearchpath="$dllsearchpath:$dir";;
5576 *) func_append dllsearchpath ":$dir";;
45105577 esac
45115578 case :$dllsearchpath: in
45125579 *":$testbindir:"*) ;;
45135580 ::) dllsearchpath=$testbindir;;
4514 *) dllsearchpath="$dllsearchpath:$testbindir";;
5581 *) func_append dllsearchpath ":$testbindir";;
45155582 esac
45165583 ;;
45175584 esac
45215588 -l*)
45225589 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
45235590 case $host in
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
5591 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
45255592 # These systems don't actually have a C or math library (as such)
45265593 continue
45275594 ;;
45355602 ;;
45365603 *-*-rhapsody* | *-*-darwin1.[012])
45375604 # Rhapsody C and math libraries are in the System framework
4538 deplibs="$deplibs System.ltframework"
5605 func_append deplibs " System.ltframework"
45395606 continue
45405607 ;;
45415608 *-*-sco3.2v5* | *-*-sco5v6*)
45555622 ;;
45565623 esac
45575624 fi
4558 deplibs="$deplibs $arg"
5625 func_append deplibs " $arg"
45595626 continue
45605627 ;;
45615628
45675634 # Tru64 UNIX uses -model [arg] to determine the layout of C++
45685635 # classes, name mangling, and exception handling.
45695636 # Darwin uses the -arch flag to determine output architecture.
4570 -model|-arch|-isysroot)
4571 compiler_flags="$compiler_flags $arg"
5637 -model|-arch|-isysroot|--sysroot)
5638 func_append compiler_flags " $arg"
45725639 func_append compile_command " $arg"
45735640 func_append finalize_command " $arg"
45745641 prev=xcompiler
45765643 ;;
45775644
45785645 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4579 compiler_flags="$compiler_flags $arg"
5646 func_append compiler_flags " $arg"
45805647 func_append compile_command " $arg"
45815648 func_append finalize_command " $arg"
45825649 case "$new_inherited_linker_flags " in
45835650 *" $arg "*) ;;
4584 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
5651 * ) func_append new_inherited_linker_flags " $arg" ;;
45855652 esac
45865653 continue
45875654 ;;
46485715 # We need an absolute path.
46495716 case $dir in
46505717 [\\/]* | [A-Za-z]:[\\/]*) ;;
5718 =*)
5719 func_stripname '=' '' "$dir"
5720 dir=$lt_sysroot$func_stripname_result
5721 ;;
46515722 *)
46525723 func_fatal_error "only absolute run-paths are allowed"
46535724 ;;
46545725 esac
46555726 case "$xrpath " in
46565727 *" $dir "*) ;;
4657 *) xrpath="$xrpath $dir" ;;
5728 *) func_append xrpath " $dir" ;;
46585729 esac
46595730 continue
46605731 ;;
47075778 for flag in $args; do
47085779 IFS="$save_ifs"
47095780 func_quote_for_eval "$flag"
4710 arg="$arg $wl$func_quote_for_eval_result"
4711 compiler_flags="$compiler_flags $func_quote_for_eval_result"
5781 func_append arg " $func_quote_for_eval_result"
5782 func_append compiler_flags " $func_quote_for_eval_result"
47125783 done
47135784 IFS="$save_ifs"
47145785 func_stripname ' ' '' "$arg"
47235794 for flag in $args; do
47245795 IFS="$save_ifs"
47255796 func_quote_for_eval "$flag"
4726 arg="$arg $wl$func_quote_for_eval_result"
4727 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4728 linker_flags="$linker_flags $func_quote_for_eval_result"
5797 func_append arg " $wl$func_quote_for_eval_result"
5798 func_append compiler_flags " $wl$func_quote_for_eval_result"
5799 func_append linker_flags " $func_quote_for_eval_result"
47295800 done
47305801 IFS="$save_ifs"
47315802 func_stripname ' ' '' "$arg"
47535824 arg="$func_quote_for_eval_result"
47545825 ;;
47555826
4756 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4757 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4758 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4759 # +DA*, +DD* enable 64-bit mode on the HP compiler
4760 # -q* pass through compiler args for the IBM compiler
4761 # -m*, -t[45]*, -txscale* pass through architecture-specific
4762 # compiler args for GCC
4763 # -F/path gives path to uninstalled frameworks, gcc on darwin
4764 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4765 # @file GCC response files
5827 # Flags to be passed through unchanged, with rationale:
5828 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5829 # -r[0-9][0-9]* specify processor for the SGI compiler
5830 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5831 # +DA*, +DD* enable 64-bit mode for the HP compiler
5832 # -q* compiler args for the IBM compiler
5833 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5834 # -F/path path to uninstalled frameworks, gcc on darwin
5835 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5836 # @file GCC response files
5837 # -tp=* Portland pgcc target processor selection
5838 # --sysroot=* for sysroot support
5839 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
47665840 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4767 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
5841 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5842 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
47685843 func_quote_for_eval "$arg"
47695844 arg="$func_quote_for_eval_result"
47705845 func_append compile_command " $arg"
47715846 func_append finalize_command " $arg"
4772 compiler_flags="$compiler_flags $arg"
5847 func_append compiler_flags " $arg"
47735848 continue
47745849 ;;
47755850
47815856
47825857 *.$objext)
47835858 # A standard object.
4784 objs="$objs $arg"
5859 func_append objs " $arg"
47855860 ;;
47865861
47875862 *.lo)
48125887
48135888 if test "$prev" = dlfiles; then
48145889 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4815 dlfiles="$dlfiles $pic_object"
5890 func_append dlfiles " $pic_object"
48165891 prev=
48175892 continue
48185893 else
48245899 # CHECK ME: I think I busted this. -Ossama
48255900 if test "$prev" = dlprefiles; then
48265901 # Preload the old-style object.
4827 dlprefiles="$dlprefiles $pic_object"
5902 func_append dlprefiles " $pic_object"
48285903 prev=
48295904 fi
48305905
48695944
48705945 *.$libext)
48715946 # An archive.
4872 deplibs="$deplibs $arg"
4873 old_deplibs="$old_deplibs $arg"
5947 func_append deplibs " $arg"
5948 func_append old_deplibs " $arg"
48745949 continue
48755950 ;;
48765951
48775952 *.la)
48785953 # A libtool-controlled library.
48795954
5955 func_resolve_sysroot "$arg"
48805956 if test "$prev" = dlfiles; then
48815957 # This library was specified with -dlopen.
4882 dlfiles="$dlfiles $arg"
5958 func_append dlfiles " $func_resolve_sysroot_result"
48835959 prev=
48845960 elif test "$prev" = dlprefiles; then
48855961 # The library was specified with -dlpreopen.
4886 dlprefiles="$dlprefiles $arg"
5962 func_append dlprefiles " $func_resolve_sysroot_result"
48875963 prev=
48885964 else
4889 deplibs="$deplibs $arg"
5965 func_append deplibs " $func_resolve_sysroot_result"
48905966 fi
48915967 continue
48925968 ;;
49246000
49256001 if test -n "$shlibpath_var"; then
49266002 # get the directories listed in $shlibpath_var
4927 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
6003 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
49286004 else
49296005 shlib_search_path=
49306006 fi
49336009
49346010 func_dirname "$output" "/" ""
49356011 output_objdir="$func_dirname_result$objdir"
6012 func_to_tool_file "$output_objdir/"
6013 tool_output_objdir=$func_to_tool_file_result
49366014 # Create the object directory.
49376015 func_mkdir_p "$output_objdir"
49386016
49536031 # Find all interdependent deplibs by searching for libraries
49546032 # that are linked more than once (e.g. -la -lb -la)
49556033 for deplib in $deplibs; do
4956 if $opt_duplicate_deps ; then
6034 if $opt_preserve_dup_deps ; then
49576035 case "$libs " in
4958 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6036 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
49596037 esac
49606038 fi
4961 libs="$libs $deplib"
6039 func_append libs " $deplib"
49626040 done
49636041
49646042 if test "$linkmode" = lib; then
49716049 if $opt_duplicate_compiler_generated_deps; then
49726050 for pre_post_dep in $predeps $postdeps; do
49736051 case "$pre_post_deps " in
4974 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
6052 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
49756053 esac
4976 pre_post_deps="$pre_post_deps $pre_post_dep"
6054 func_append pre_post_deps " $pre_post_dep"
49776055 done
49786056 fi
49796057 pre_post_deps=
50326110 case $pass in
50336111 dlopen) libs="$dlfiles" ;;
50346112 dlpreopen) libs="$dlprefiles" ;;
5035 link)
5036 libs="$deplibs %DEPLIBS%"
5037 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5038 ;;
6113 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
50396114 esac
50406115 fi
50416116 if test "$linkmode,$pass" = "lib,dlpreopen"; then
50436118 for lib in $dlprefiles; do
50446119 # Ignore non-libtool-libs
50456120 dependency_libs=
6121 func_resolve_sysroot "$lib"
50466122 case $lib in
5047 *.la) func_source "$lib" ;;
6123 *.la) func_source "$func_resolve_sysroot_result" ;;
50486124 esac
50496125
50506126 # Collect preopened libtool deplibs, except any this library
50516127 # has declared as weak libs
50526128 for deplib in $dependency_libs; do
5053 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
6129 func_basename "$deplib"
6130 deplib_base=$func_basename_result
50546131 case " $weak_libs " in
50556132 *" $deplib_base "*) ;;
5056 *) deplibs="$deplibs $deplib" ;;
6133 *) func_append deplibs " $deplib" ;;
50576134 esac
50586135 done
50596136 done
50746151 compile_deplibs="$deplib $compile_deplibs"
50756152 finalize_deplibs="$deplib $finalize_deplibs"
50766153 else
5077 compiler_flags="$compiler_flags $deplib"
6154 func_append compiler_flags " $deplib"
50786155 if test "$linkmode" = lib ; then
50796156 case "$new_inherited_linker_flags " in
50806157 *" $deplib "*) ;;
5081 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6158 * ) func_append new_inherited_linker_flags " $deplib" ;;
50826159 esac
50836160 fi
50846161 fi
51636240 if test "$linkmode" = lib ; then
51646241 case "$new_inherited_linker_flags " in
51656242 *" $deplib "*) ;;
5166 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6243 * ) func_append new_inherited_linker_flags " $deplib" ;;
51676244 esac
51686245 fi
51696246 fi
51766253 test "$pass" = conv && continue
51776254 newdependency_libs="$deplib $newdependency_libs"
51786255 func_stripname '-L' '' "$deplib"
5179 newlib_search_path="$newlib_search_path $func_stripname_result"
6256 func_resolve_sysroot "$func_stripname_result"
6257 func_append newlib_search_path " $func_resolve_sysroot_result"
51806258 ;;
51816259 prog)
51826260 if test "$pass" = conv; then
51906268 finalize_deplibs="$deplib $finalize_deplibs"
51916269 fi
51926270 func_stripname '-L' '' "$deplib"
5193 newlib_search_path="$newlib_search_path $func_stripname_result"
6271 func_resolve_sysroot "$func_stripname_result"
6272 func_append newlib_search_path " $func_resolve_sysroot_result"
51946273 ;;
51956274 *)
51966275 func_warning "\`-L' is ignored for archives/objects"
52016280 -R*)
52026281 if test "$pass" = link; then
52036282 func_stripname '-R' '' "$deplib"
5204 dir=$func_stripname_result
6283 func_resolve_sysroot "$func_stripname_result"
6284 dir=$func_resolve_sysroot_result
52056285 # Make sure the xrpath contains only unique directories.
52066286 case "$xrpath " in
52076287 *" $dir "*) ;;
5208 *) xrpath="$xrpath $dir" ;;
6288 *) func_append xrpath " $dir" ;;
52096289 esac
52106290 fi
52116291 deplibs="$deplib $deplibs"
52126292 continue
52136293 ;;
5214 *.la) lib="$deplib" ;;
6294 *.la)
6295 func_resolve_sysroot "$deplib"
6296 lib=$func_resolve_sysroot_result
6297 ;;
52156298 *.$libext)
52166299 if test "$pass" = conv; then
52176300 deplibs="$deplib $deplibs"
52296312 match_pattern*)
52306313 set dummy $deplibs_check_method; shift
52316314 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5232 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
6315 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
52336316 | $EGREP "$match_pattern_regex" > /dev/null; then
52346317 valid_a_lib=yes
52356318 fi
52396322 ;;
52406323 esac
52416324 if test "$valid_a_lib" != yes; then
5242 $ECHO
6325 echo
52436326 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5244 $ECHO "*** I have the capability to make that library automatically link in when"
5245 $ECHO "*** you link to this library. But I can only do this if you have a"
5246 $ECHO "*** shared version of the library, which you do not appear to have"
5247 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5248 $ECHO "*** that it is just a static archive that I should not use here."
6327 echo "*** I have the capability to make that library automatically link in when"
6328 echo "*** you link to this library. But I can only do this if you have a"
6329 echo "*** shared version of the library, which you do not appear to have"
6330 echo "*** because the file extensions .$libext of this argument makes me believe"
6331 echo "*** that it is just a static archive that I should not use here."
52496332 else
5250 $ECHO
6333 echo
52516334 $ECHO "*** Warning: Linking the shared library $output against the"
52526335 $ECHO "*** static library $deplib is not portable!"
52536336 deplibs="$deplib $deplibs"
52746357 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
52756358 # If there is no dlopen support or we're linking statically,
52766359 # we need to preload.
5277 newdlprefiles="$newdlprefiles $deplib"
6360 func_append newdlprefiles " $deplib"
52786361 compile_deplibs="$deplib $compile_deplibs"
52796362 finalize_deplibs="$deplib $finalize_deplibs"
52806363 else
5281 newdlfiles="$newdlfiles $deplib"
6364 func_append newdlfiles " $deplib"
52826365 fi
52836366 fi
52846367 continue
53206403
53216404 # Convert "-framework foo" to "foo.ltframework"
53226405 if test -n "$inherited_linker_flags"; then
5323 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
6406 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
53246407 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
53256408 case " $new_inherited_linker_flags " in
53266409 *" $tmp_inherited_linker_flag "*) ;;
5327 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
6410 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
53286411 esac
53296412 done
53306413 fi
5331 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6414 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
53326415 if test "$linkmode,$pass" = "lib,link" ||
53336416 test "$linkmode,$pass" = "prog,scan" ||
53346417 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5335 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5336 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
6418 test -n "$dlopen" && func_append dlfiles " $dlopen"
6419 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
53376420 fi
53386421
53396422 if test "$pass" = conv; then
53446427 func_fatal_error "cannot find name of link library for \`$lib'"
53456428 fi
53466429 # It is a libtool convenience library, so add in its objects.
5347 convenience="$convenience $ladir/$objdir/$old_library"
5348 old_convenience="$old_convenience $ladir/$objdir/$old_library"
5349 tmp_libs=
5350 for deplib in $dependency_libs; do
5351 deplibs="$deplib $deplibs"
5352 if $opt_duplicate_deps ; then
5353 case "$tmp_libs " in
5354 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5355 esac
5356 fi
5357 tmp_libs="$tmp_libs $deplib"
5358 done
6430 func_append convenience " $ladir/$objdir/$old_library"
6431 func_append old_convenience " $ladir/$objdir/$old_library"
53596432 elif test "$linkmode" != prog && test "$linkmode" != lib; then
53606433 func_fatal_error "\`$lib' is not a convenience library"
53616434 fi
6435 tmp_libs=
6436 for deplib in $dependency_libs; do
6437 deplibs="$deplib $deplibs"
6438 if $opt_preserve_dup_deps ; then
6439 case "$tmp_libs " in
6440 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6441 esac
6442 fi
6443 func_append tmp_libs " $deplib"
6444 done
53626445 continue
53636446 fi # $pass = conv
53646447
53656448
53666449 # Get the name of the library we link against.
53676450 linklib=
5368 for l in $old_library $library_names; do
5369 linklib="$l"
5370 done
6451 if test -n "$old_library" &&
6452 { test "$prefer_static_libs" = yes ||
6453 test "$prefer_static_libs,$installed" = "built,no"; }; then
6454 linklib=$old_library
6455 else
6456 for l in $old_library $library_names; do
6457 linklib="$l"
6458 done
6459 fi
53716460 if test -z "$linklib"; then
53726461 func_fatal_error "cannot find name of link library for \`$lib'"
53736462 fi
53846473 # statically, we need to preload. We also need to preload any
53856474 # dependent libraries so libltdl's deplib preloader doesn't
53866475 # bomb out in the load deplibs phase.
5387 dlprefiles="$dlprefiles $lib $dependency_libs"
6476 func_append dlprefiles " $lib $dependency_libs"
53886477 else
5389 newdlfiles="$newdlfiles $lib"
6478 func_append newdlfiles " $lib"
53906479 fi
53916480 continue
53926481 fi # $pass = dlopen
54086497
54096498 # Find the relevant object directory and library name.
54106499 if test "X$installed" = Xyes; then
5411 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6500 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
54126501 func_warning "library \`$lib' was moved."
54136502 dir="$ladir"
54146503 absdir="$abs_ladir"
54156504 libdir="$abs_ladir"
54166505 else
5417 dir="$libdir"
5418 absdir="$libdir"
6506 dir="$lt_sysroot$libdir"
6507 absdir="$lt_sysroot$libdir"
54196508 fi
54206509 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
54216510 else
54236512 dir="$ladir"
54246513 absdir="$abs_ladir"
54256514 # Remove this search path later
5426 notinst_path="$notinst_path $abs_ladir"
6515 func_append notinst_path " $abs_ladir"
54276516 else
54286517 dir="$ladir/$objdir"
54296518 absdir="$abs_ladir/$objdir"
54306519 # Remove this search path later
5431 notinst_path="$notinst_path $abs_ladir"
6520 func_append notinst_path " $abs_ladir"
54326521 fi
54336522 fi # $installed = yes
54346523 func_stripname 'lib' '.la' "$laname"
54396528 if test -z "$libdir" && test "$linkmode" = prog; then
54406529 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
54416530 fi
5442 # Prefer using a static library (so that no silly _DYNAMIC symbols
5443 # are required to link).
5444 if test -n "$old_library"; then
5445 newdlprefiles="$newdlprefiles $dir/$old_library"
5446 # Keep a list of preopened convenience libraries to check
5447 # that they are being used correctly in the link pass.
5448 test -z "$libdir" && \
5449 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5450 # Otherwise, use the dlname, so that lt_dlopen finds it.
5451 elif test -n "$dlname"; then
5452 newdlprefiles="$newdlprefiles $dir/$dlname"
5453 else
5454 newdlprefiles="$newdlprefiles $dir/$linklib"
5455 fi
6531 case "$host" in
6532 # special handling for platforms with PE-DLLs.
6533 *cygwin* | *mingw* | *cegcc* )
6534 # Linker will automatically link against shared library if both
6535 # static and shared are present. Therefore, ensure we extract
6536 # symbols from the import library if a shared library is present
6537 # (otherwise, the dlopen module name will be incorrect). We do
6538 # this by putting the import library name into $newdlprefiles.
6539 # We recover the dlopen module name by 'saving' the la file
6540 # name in a special purpose variable, and (later) extracting the
6541 # dlname from the la file.
6542 if test -n "$dlname"; then
6543 func_tr_sh "$dir/$linklib"
6544 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6545 func_append newdlprefiles " $dir/$linklib"
6546 else
6547 func_append newdlprefiles " $dir/$old_library"
6548 # Keep a list of preopened convenience libraries to check
6549 # that they are being used correctly in the link pass.
6550 test -z "$libdir" && \
6551 func_append dlpreconveniencelibs " $dir/$old_library"
6552 fi
6553 ;;
6554 * )
6555 # Prefer using a static library (so that no silly _DYNAMIC symbols
6556 # are required to link).
6557 if test -n "$old_library"; then
6558 func_append newdlprefiles " $dir/$old_library"
6559 # Keep a list of preopened convenience libraries to check
6560 # that they are being used correctly in the link pass.
6561 test -z "$libdir" && \
6562 func_append dlpreconveniencelibs " $dir/$old_library"
6563 # Otherwise, use the dlname, so that lt_dlopen finds it.
6564 elif test -n "$dlname"; then
6565 func_append newdlprefiles " $dir/$dlname"
6566 else
6567 func_append newdlprefiles " $dir/$linklib"
6568 fi
6569 ;;
6570 esac
54566571 fi # $pass = dlpreopen
54576572
54586573 if test -z "$libdir"; then
54706585
54716586
54726587 if test "$linkmode" = prog && test "$pass" != link; then
5473 newlib_search_path="$newlib_search_path $ladir"
6588 func_append newlib_search_path " $ladir"
54746589 deplibs="$lib $deplibs"
54756590
54766591 linkalldeplibs=no
54836598 for deplib in $dependency_libs; do
54846599 case $deplib in
54856600 -L*) func_stripname '-L' '' "$deplib"
5486 newlib_search_path="$newlib_search_path $func_stripname_result"
6601 func_resolve_sysroot "$func_stripname_result"
6602 func_append newlib_search_path " $func_resolve_sysroot_result"
54876603 ;;
54886604 esac
54896605 # Need to link against all dependency_libs?
54946610 # or/and link against static libraries
54956611 newdependency_libs="$deplib $newdependency_libs"
54966612 fi
5497 if $opt_duplicate_deps ; then
6613 if $opt_preserve_dup_deps ; then
54986614 case "$tmp_libs " in
5499 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6615 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
55006616 esac
55016617 fi
5502 tmp_libs="$tmp_libs $deplib"
6618 func_append tmp_libs " $deplib"
55036619 done # for deplib
55046620 continue
55056621 fi # $linkmode = prog...
55146630 # Make sure the rpath contains only unique directories.
55156631 case "$temp_rpath:" in
55166632 *"$absdir:"*) ;;
5517 *) temp_rpath="$temp_rpath$absdir:" ;;
6633 *) func_append temp_rpath "$absdir:" ;;
55186634 esac
55196635 fi
55206636
55266642 *)
55276643 case "$compile_rpath " in
55286644 *" $absdir "*) ;;
5529 *) compile_rpath="$compile_rpath $absdir"
6645 *) func_append compile_rpath " $absdir" ;;
55306646 esac
55316647 ;;
55326648 esac
55356651 *)
55366652 case "$finalize_rpath " in
55376653 *" $libdir "*) ;;
5538 *) finalize_rpath="$finalize_rpath $libdir"
6654 *) func_append finalize_rpath " $libdir" ;;
55396655 esac
55406656 ;;
55416657 esac
55606676 case $host in
55616677 *cygwin* | *mingw* | *cegcc*)
55626678 # No point in relinking DLLs because paths are not encoded
5563 notinst_deplibs="$notinst_deplibs $lib"
6679 func_append notinst_deplibs " $lib"
55646680 need_relink=no
55656681 ;;
55666682 *)
55676683 if test "$installed" = no; then
5568 notinst_deplibs="$notinst_deplibs $lib"
6684 func_append notinst_deplibs " $lib"
55696685 need_relink=yes
55706686 fi
55716687 ;;
55826698 fi
55836699 done
55846700 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5585 $ECHO
6701 echo
55866702 if test "$linkmode" = prog; then
55876703 $ECHO "*** Warning: Linking the executable $output against the loadable module"
55886704 else
56006716 *)
56016717 case "$compile_rpath " in
56026718 *" $absdir "*) ;;
5603 *) compile_rpath="$compile_rpath $absdir"
6719 *) func_append compile_rpath " $absdir" ;;
56046720 esac
56056721 ;;
56066722 esac
56096725 *)
56106726 case "$finalize_rpath " in
56116727 *" $libdir "*) ;;
5612 *) finalize_rpath="$finalize_rpath $libdir"
6728 *) func_append finalize_rpath " $libdir" ;;
56136729 esac
56146730 ;;
56156731 esac
56636779 linklib=$newlib
56646780 fi # test -n "$old_archive_from_expsyms_cmds"
56656781
5666 if test "$linkmode" = prog || test "$mode" != relink; then
6782 if test "$linkmode" = prog || test "$opt_mode" != relink; then
56676783 add_shlibpath=
56686784 add_dir=
56696785 add=
56856801 if test "X$dlopenmodule" != "X$lib"; then
56866802 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
56876803 if test -z "$old_library" ; then
5688 $ECHO
5689 $ECHO "*** And there doesn't seem to be a static archive available"
5690 $ECHO "*** The link will probably fail, sorry"
6804 echo
6805 echo "*** And there doesn't seem to be a static archive available"
6806 echo "*** The link will probably fail, sorry"
56916807 else
56926808 add="$dir/$old_library"
56936809 fi
57196835 if test -n "$inst_prefix_dir"; then
57206836 case $libdir in
57216837 [\\/]*)
5722 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6838 func_append add_dir " -L$inst_prefix_dir$libdir"
57236839 ;;
57246840 esac
57256841 fi
57416857 if test -n "$add_shlibpath"; then
57426858 case :$compile_shlibpath: in
57436859 *":$add_shlibpath:"*) ;;
5744 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
6860 *) func_append compile_shlibpath "$add_shlibpath:" ;;
57456861 esac
57466862 fi
57476863 if test "$linkmode" = prog; then
57556871 test "$hardcode_shlibpath_var" = yes; then
57566872 case :$finalize_shlibpath: in
57576873 *":$libdir:"*) ;;
5758 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6874 *) func_append finalize_shlibpath "$libdir:" ;;
57596875 esac
57606876 fi
57616877 fi
57626878 fi
57636879
5764 if test "$linkmode" = prog || test "$mode" = relink; then
6880 if test "$linkmode" = prog || test "$opt_mode" = relink; then
57656881 add_shlibpath=
57666882 add_dir=
57676883 add=
57756891 elif test "$hardcode_shlibpath_var" = yes; then
57766892 case :$finalize_shlibpath: in
57776893 *":$libdir:"*) ;;
5778 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6894 *) func_append finalize_shlibpath "$libdir:" ;;
57796895 esac
57806896 add="-l$name"
57816897 elif test "$hardcode_automatic" = yes; then
57926908 if test -n "$inst_prefix_dir"; then
57936909 case $libdir in
57946910 [\\/]*)
5795 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6911 func_append add_dir " -L$inst_prefix_dir$libdir"
57966912 ;;
57976913 esac
57986914 fi
58276943
58286944 # Just print a warning and add the library to dependency_libs so
58296945 # that the program can be linked against the static library.
5830 $ECHO
6946 echo
58316947 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5832 $ECHO "*** I have the capability to make that library automatically link in when"
5833 $ECHO "*** you link to this library. But I can only do this if you have a"
5834 $ECHO "*** shared version of the library, which you do not appear to have."
6948 echo "*** I have the capability to make that library automatically link in when"
6949 echo "*** you link to this library. But I can only do this if you have a"
6950 echo "*** shared version of the library, which you do not appear to have."
58356951 if test "$module" = yes; then
5836 $ECHO "*** But as you try to build a module library, libtool will still create "
5837 $ECHO "*** a static module, that should work as long as the dlopening application"
5838 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
6952 echo "*** But as you try to build a module library, libtool will still create "
6953 echo "*** a static module, that should work as long as the dlopening application"
6954 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
58396955 if test -z "$global_symbol_pipe"; then
5840 $ECHO
5841 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5842 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5843 $ECHO "*** not find such a program. So, this module is probably useless."
5844 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6956 echo
6957 echo "*** However, this would only work if libtool was able to extract symbol"
6958 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6959 echo "*** not find such a program. So, this module is probably useless."
6960 echo "*** \`nm' from GNU binutils and a full rebuild may help."
58456961 fi
58466962 if test "$build_old_libs" = no; then
58476963 build_libtool_libs=module
58696985 temp_xrpath=$func_stripname_result
58706986 case " $xrpath " in
58716987 *" $temp_xrpath "*) ;;
5872 *) xrpath="$xrpath $temp_xrpath";;
6988 *) func_append xrpath " $temp_xrpath";;
58736989 esac;;
5874 *) temp_deplibs="$temp_deplibs $libdir";;
6990 *) func_append temp_deplibs " $libdir";;
58756991 esac
58766992 done
58776993 dependency_libs="$temp_deplibs"
58786994 fi
58796995
5880 newlib_search_path="$newlib_search_path $absdir"
6996 func_append newlib_search_path " $absdir"
58816997 # Link against this library
58826998 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
58836999 # ... and its dependency_libs
58847000 tmp_libs=
58857001 for deplib in $dependency_libs; do
58867002 newdependency_libs="$deplib $newdependency_libs"
5887 if $opt_duplicate_deps ; then
7003 case $deplib in
7004 -L*) func_stripname '-L' '' "$deplib"
7005 func_resolve_sysroot "$func_stripname_result";;
7006 *) func_resolve_sysroot "$deplib" ;;
7007 esac
7008 if $opt_preserve_dup_deps ; then
58887009 case "$tmp_libs " in
5889 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
7010 *" $func_resolve_sysroot_result "*)
7011 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
58907012 esac
58917013 fi
5892 tmp_libs="$tmp_libs $deplib"
7014 func_append tmp_libs " $func_resolve_sysroot_result"
58937015 done
58947016
58957017 if test "$link_all_deplibs" != no; then
58997021 case $deplib in
59007022 -L*) path="$deplib" ;;
59017023 *.la)
7024 func_resolve_sysroot "$deplib"
7025 deplib=$func_resolve_sysroot_result
59027026 func_dirname "$deplib" "" "."
5903 dir="$func_dirname_result"
7027 dir=$func_dirname_result
59047028 # We need an absolute path.
59057029 case $dir in
59067030 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
59277051 if test -z "$darwin_install_name"; then
59287052 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
59297053 fi
5930 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5931 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
7054 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7055 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
59327056 path=
59337057 fi
59347058 fi
59617085 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
59627086 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
59637087 else
5964 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7088 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
59657089 fi
59667090 fi
59677091 dependency_libs="$newdependency_libs"
59787102 for dir in $newlib_search_path; do
59797103 case "$lib_search_path " in
59807104 *" $dir "*) ;;
5981 *) lib_search_path="$lib_search_path $dir" ;;
7105 *) func_append lib_search_path " $dir" ;;
59827106 esac
59837107 done
59847108 newlib_search_path=
60367160 -L*)
60377161 case " $tmp_libs " in
60387162 *" $deplib "*) ;;
6039 *) tmp_libs="$tmp_libs $deplib" ;;
7163 *) func_append tmp_libs " $deplib" ;;
60407164 esac
60417165 ;;
6042 *) tmp_libs="$tmp_libs $deplib" ;;
7166 *) func_append tmp_libs " $deplib" ;;
60437167 esac
60447168 done
60457169 eval $var=\"$tmp_libs\"
60557179 ;;
60567180 esac
60577181 if test -n "$i" ; then
6058 tmp_libs="$tmp_libs $i"
7182 func_append tmp_libs " $i"
60597183 fi
60607184 done
60617185 dependency_libs=$tmp_libs
60967220 # Now set the variables for building old libraries.
60977221 build_libtool_libs=no
60987222 oldlibs="$output"
6099 objs="$objs$old_deplibs"
7223 func_append objs "$old_deplibs"
61007224 ;;
61017225
61027226 lib)
61297253 if test "$deplibs_check_method" != pass_all; then
61307254 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
61317255 else
6132 $ECHO
7256 echo
61337257 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
61347258 $ECHO "*** objects $objs is not portable!"
6135 libobjs="$libobjs $objs"
7259 func_append libobjs " $objs"
61367260 fi
61377261 fi
61387262
61977321 age="$number_minor"
61987322 revision="$number_revision"
61997323 ;;
6200 freebsd-aout|freebsd-elf|sunos)
7324 freebsd-aout|freebsd-elf|qnx|sunos)
62017325 current="$number_major"
62027326 revision="$number_minor"
62037327 age="0"
62087332 age="$number_minor"
62097333 revision="$number_minor"
62107334 lt_irix_increment=no
6211 ;;
6212 *)
6213 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
62147335 ;;
62157336 esac
62167337 ;;
63337454 done
63347455
63357456 # Make executables depend on our current version.
6336 verstring="$verstring:${current}.0"
7457 func_append verstring ":${current}.0"
63377458 ;;
63387459
63397460 qnx)
64017522 fi
64027523
64037524 func_generate_dlsyms "$libname" "$libname" "yes"
6404 libobjs="$libobjs $symfileobj"
7525 func_append libobjs " $symfileobj"
64057526 test "X$libobjs" = "X " && libobjs=
64067527
6407 if test "$mode" != relink; then
7528 if test "$opt_mode" != relink; then
64087529 # Remove our outputs, but don't remove object files since they
64097530 # may have been created when compiling PIC objects.
64107531 removelist=
64207541 continue
64217542 fi
64227543 fi
6423 removelist="$removelist $p"
7544 func_append removelist " $p"
64247545 ;;
64257546 *) ;;
64267547 esac
64317552
64327553 # Now set the variables for building old libraries.
64337554 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6434 oldlibs="$oldlibs $output_objdir/$libname.$libext"
7555 func_append oldlibs " $output_objdir/$libname.$libext"
64357556
64367557 # Transform .lo files to .o files.
6437 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
7558 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
64387559 fi
64397560
64407561 # Eliminate all temporary directories.
64417562 #for path in $notinst_path; do
6442 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6443 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6444 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
7563 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7564 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7565 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
64457566 #done
64467567
64477568 if test -n "$xrpath"; then
64487569 # If the user specified any rpath flags, then add them.
64497570 temp_xrpath=
64507571 for libdir in $xrpath; do
6451 temp_xrpath="$temp_xrpath -R$libdir"
7572 func_replace_sysroot "$libdir"
7573 func_append temp_xrpath " -R$func_replace_sysroot_result"
64527574 case "$finalize_rpath " in
64537575 *" $libdir "*) ;;
6454 *) finalize_rpath="$finalize_rpath $libdir" ;;
7576 *) func_append finalize_rpath " $libdir" ;;
64557577 esac
64567578 done
64577579 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
64657587 for lib in $old_dlfiles; do
64667588 case " $dlprefiles $dlfiles " in
64677589 *" $lib "*) ;;
6468 *) dlfiles="$dlfiles $lib" ;;
7590 *) func_append dlfiles " $lib" ;;
64697591 esac
64707592 done
64717593
64757597 for lib in $old_dlprefiles; do
64767598 case "$dlprefiles " in
64777599 *" $lib "*) ;;
6478 *) dlprefiles="$dlprefiles $lib" ;;
7600 *) func_append dlprefiles " $lib" ;;
64797601 esac
64807602 done
64817603
64827604 if test "$build_libtool_libs" = yes; then
64837605 if test -n "$rpath"; then
64847606 case $host in
6485 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
7607 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
64867608 # these systems don't actually have a c library (as such)!
64877609 ;;
64887610 *-*-rhapsody* | *-*-darwin1.[012])
64897611 # Rhapsody C library is in the System framework
6490 deplibs="$deplibs System.ltframework"
7612 func_append deplibs " System.ltframework"
64917613 ;;
64927614 *-*-netbsd*)
64937615 # Don't link with libc until the a.out ld.so is fixed.
65047626 *)
65057627 # Add libc to deplibs on all other systems if necessary.
65067628 if test "$build_libtool_need_lc" = "yes"; then
6507 deplibs="$deplibs -lc"
7629 func_append deplibs " -lc"
65087630 fi
65097631 ;;
65107632 esac
65537675 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65547676 case " $predeps $postdeps " in
65557677 *" $i "*)
6556 newdeplibs="$newdeplibs $i"
7678 func_append newdeplibs " $i"
65577679 i=""
65587680 ;;
65597681 esac
65647686 set dummy $deplib_matches; shift
65657687 deplib_match=$1
65667688 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6567 newdeplibs="$newdeplibs $i"
7689 func_append newdeplibs " $i"
65687690 else
65697691 droppeddeps=yes
6570 $ECHO
7692 echo
65717693 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6572 $ECHO "*** I have the capability to make that library automatically link in when"
6573 $ECHO "*** you link to this library. But I can only do this if you have a"
6574 $ECHO "*** shared version of the library, which I believe you do not have"
6575 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6576 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
7694 echo "*** I have the capability to make that library automatically link in when"
7695 echo "*** you link to this library. But I can only do this if you have a"
7696 echo "*** shared version of the library, which I believe you do not have"
7697 echo "*** because a test_compile did reveal that the linker did not use it for"
7698 echo "*** its dynamic dependency list that programs get resolved with at runtime."
65777699 fi
65787700 fi
65797701 ;;
65807702 *)
6581 newdeplibs="$newdeplibs $i"
7703 func_append newdeplibs " $i"
65827704 ;;
65837705 esac
65847706 done
65967718 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65977719 case " $predeps $postdeps " in
65987720 *" $i "*)
6599 newdeplibs="$newdeplibs $i"
7721 func_append newdeplibs " $i"
66007722 i=""
66017723 ;;
66027724 esac
66077729 set dummy $deplib_matches; shift
66087730 deplib_match=$1
66097731 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6610 newdeplibs="$newdeplibs $i"
7732 func_append newdeplibs " $i"
66117733 else
66127734 droppeddeps=yes
6613 $ECHO
7735 echo
66147736 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6615 $ECHO "*** I have the capability to make that library automatically link in when"
6616 $ECHO "*** you link to this library. But I can only do this if you have a"
6617 $ECHO "*** shared version of the library, which you do not appear to have"
6618 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6619 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
7737 echo "*** I have the capability to make that library automatically link in when"
7738 echo "*** you link to this library. But I can only do this if you have a"
7739 echo "*** shared version of the library, which you do not appear to have"
7740 echo "*** because a test_compile did reveal that the linker did not use this one"
7741 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
66207742 fi
66217743 fi
66227744 else
66237745 droppeddeps=yes
6624 $ECHO
7746 echo
66257747 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6626 $ECHO "*** make it link in! You will probably need to install it or some"
6627 $ECHO "*** library that it depends on before this library will be fully"
6628 $ECHO "*** functional. Installing it before continuing would be even better."
7748 echo "*** make it link in! You will probably need to install it or some"
7749 echo "*** library that it depends on before this library will be fully"
7750 echo "*** functional. Installing it before continuing would be even better."
66297751 fi
66307752 ;;
66317753 *)
6632 newdeplibs="$newdeplibs $i"
7754 func_append newdeplibs " $i"
66337755 ;;
66347756 esac
66357757 done
66467768 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
66477769 case " $predeps $postdeps " in
66487770 *" $a_deplib "*)
6649 newdeplibs="$newdeplibs $a_deplib"
7771 func_append newdeplibs " $a_deplib"
66507772 a_deplib=""
66517773 ;;
66527774 esac
66537775 fi
66547776 if test -n "$a_deplib" ; then
66557777 libname=`eval "\\$ECHO \"$libname_spec\""`
7778 if test -n "$file_magic_glob"; then
7779 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7780 else
7781 libnameglob=$libname
7782 fi
7783 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
66567784 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6657 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7785 if test "$want_nocaseglob" = yes; then
7786 shopt -s nocaseglob
7787 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7788 $nocaseglob
7789 else
7790 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7791 fi
66587792 for potent_lib in $potential_libs; do
66597793 # Follow soft links.
66607794 if ls -lLd "$potent_lib" 2>/dev/null |
66717805 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
66727806 case $potliblink in
66737807 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6674 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
7808 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
66757809 esac
66767810 done
66777811 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
66787812 $SED -e 10q |
66797813 $EGREP "$file_magic_regex" > /dev/null; then
6680 newdeplibs="$newdeplibs $a_deplib"
7814 func_append newdeplibs " $a_deplib"
66817815 a_deplib=""
66827816 break 2
66837817 fi
66867820 fi
66877821 if test -n "$a_deplib" ; then
66887822 droppeddeps=yes
6689 $ECHO
7823 echo
66907824 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6691 $ECHO "*** I have the capability to make that library automatically link in when"
6692 $ECHO "*** you link to this library. But I can only do this if you have a"
6693 $ECHO "*** shared version of the library, which you do not appear to have"
6694 $ECHO "*** because I did check the linker path looking for a file starting"
7825 echo "*** I have the capability to make that library automatically link in when"
7826 echo "*** you link to this library. But I can only do this if you have a"
7827 echo "*** shared version of the library, which you do not appear to have"
7828 echo "*** because I did check the linker path looking for a file starting"
66957829 if test -z "$potlib" ; then
66967830 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
66977831 else
67027836 ;;
67037837 *)
67047838 # Add a -L argument.
6705 newdeplibs="$newdeplibs $a_deplib"
7839 func_append newdeplibs " $a_deplib"
67067840 ;;
67077841 esac
67087842 done # Gone through all deplibs.
67187852 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67197853 case " $predeps $postdeps " in
67207854 *" $a_deplib "*)
6721 newdeplibs="$newdeplibs $a_deplib"
7855 func_append newdeplibs " $a_deplib"
67227856 a_deplib=""
67237857 ;;
67247858 esac
67297863 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
67307864 for potent_lib in $potential_libs; do
67317865 potlib="$potent_lib" # see symlink-check above in file_magic test
6732 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
7866 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
67337867 $EGREP "$match_pattern_regex" > /dev/null; then
6734 newdeplibs="$newdeplibs $a_deplib"
7868 func_append newdeplibs " $a_deplib"
67357869 a_deplib=""
67367870 break 2
67377871 fi
67407874 fi
67417875 if test -n "$a_deplib" ; then
67427876 droppeddeps=yes
6743 $ECHO
7877 echo
67447878 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6745 $ECHO "*** I have the capability to make that library automatically link in when"
6746 $ECHO "*** you link to this library. But I can only do this if you have a"
6747 $ECHO "*** shared version of the library, which you do not appear to have"
6748 $ECHO "*** because I did check the linker path looking for a file starting"
7879 echo "*** I have the capability to make that library automatically link in when"
7880 echo "*** you link to this library. But I can only do this if you have a"
7881 echo "*** shared version of the library, which you do not appear to have"
7882 echo "*** because I did check the linker path looking for a file starting"
67497883 if test -z "$potlib" ; then
67507884 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
67517885 else
67567890 ;;
67577891 *)
67587892 # Add a -L argument.
6759 newdeplibs="$newdeplibs $a_deplib"
7893 func_append newdeplibs " $a_deplib"
67607894 ;;
67617895 esac
67627896 done # Gone through all deplibs.
67637897 ;;
67647898 none | unknown | *)
67657899 newdeplibs=""
6766 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6767 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
7900 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
67687901 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67697902 for i in $predeps $postdeps ; do
67707903 # can't use Xsed below, because $i might contain '/'
6771 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
7904 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
67727905 done
67737906 fi
6774 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6775 $GREP . >/dev/null; then
6776 $ECHO
7907 case $tmp_deplibs in
7908 *[!\ \ ]*)
7909 echo
67777910 if test "X$deplibs_check_method" = "Xnone"; then
6778 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
7911 echo "*** Warning: inter-library dependencies are not supported in this platform."
67797912 else
6780 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
7913 echo "*** Warning: inter-library dependencies are not known to be supported."
67817914 fi
6782 $ECHO "*** All declared inter-library dependencies are being dropped."
7915 echo "*** All declared inter-library dependencies are being dropped."
67837916 droppeddeps=yes
6784 fi
7917 ;;
7918 esac
67857919 ;;
67867920 esac
67877921 versuffix=$versuffix_save
67937927 case $host in
67947928 *-*-rhapsody* | *-*-darwin1.[012])
67957929 # On Rhapsody replace the C library with the System framework
6796 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7930 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
67977931 ;;
67987932 esac
67997933
68007934 if test "$droppeddeps" = yes; then
68017935 if test "$module" = yes; then
6802 $ECHO
6803 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
7936 echo
7937 echo "*** Warning: libtool could not satisfy all declared inter-library"
68047938 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6805 $ECHO "*** a static module, that should work as long as the dlopening"
6806 $ECHO "*** application is linked with the -dlopen flag."
7939 echo "*** a static module, that should work as long as the dlopening"
7940 echo "*** application is linked with the -dlopen flag."
68077941 if test -z "$global_symbol_pipe"; then
6808 $ECHO
6809 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6810 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6811 $ECHO "*** not find such a program. So, this module is probably useless."
6812 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
7942 echo
7943 echo "*** However, this would only work if libtool was able to extract symbol"
7944 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7945 echo "*** not find such a program. So, this module is probably useless."
7946 echo "*** \`nm' from GNU binutils and a full rebuild may help."
68137947 fi
68147948 if test "$build_old_libs" = no; then
68157949 oldlibs="$output_objdir/$libname.$libext"
68197953 build_libtool_libs=no
68207954 fi
68217955 else
6822 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6823 $ECHO "*** automatically added whenever a program is linked with this library"
6824 $ECHO "*** or is declared to -dlopen it."
7956 echo "*** The inter-library dependencies that have been dropped here will be"
7957 echo "*** automatically added whenever a program is linked with this library"
7958 echo "*** or is declared to -dlopen it."
68257959
68267960 if test "$allow_undefined" = no; then
6827 $ECHO
6828 $ECHO "*** Since this library must not contain undefined symbols,"
6829 $ECHO "*** because either the platform does not support them or"
6830 $ECHO "*** it was explicitly requested with -no-undefined,"
6831 $ECHO "*** libtool will only create a static version of it."
7961 echo
7962 echo "*** Since this library must not contain undefined symbols,"
7963 echo "*** because either the platform does not support them or"
7964 echo "*** it was explicitly requested with -no-undefined,"
7965 echo "*** libtool will only create a static version of it."
68327966 if test "$build_old_libs" = no; then
68337967 oldlibs="$output_objdir/$libname.$libext"
68347968 build_libtool_libs=module
68457979 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
68467980 case $host in
68477981 *-*-darwin*)
6848 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6849 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7982 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7983 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7984 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
68517985 ;;
68527986 esac
68537987
68607994 *)
68617995 case " $deplibs " in
68627996 *" -L$path/$objdir "*)
6863 new_libs="$new_libs -L$path/$objdir" ;;
7997 func_append new_libs " -L$path/$objdir" ;;
68647998 esac
68657999 ;;
68668000 esac
68708004 -L*)
68718005 case " $new_libs " in
68728006 *" $deplib "*) ;;
6873 *) new_libs="$new_libs $deplib" ;;
8007 *) func_append new_libs " $deplib" ;;
68748008 esac
68758009 ;;
6876 *) new_libs="$new_libs $deplib" ;;
8010 *) func_append new_libs " $deplib" ;;
68778011 esac
68788012 done
68798013 deplibs="$new_libs"
68908024 hardcode_libdirs=
68918025 dep_rpath=
68928026 rpath="$finalize_rpath"
6893 test "$mode" != relink && rpath="$compile_rpath$rpath"
8027 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
68948028 for libdir in $rpath; do
68958029 if test -n "$hardcode_libdir_flag_spec"; then
68968030 if test -n "$hardcode_libdir_separator"; then
8031 func_replace_sysroot "$libdir"
8032 libdir=$func_replace_sysroot_result
68978033 if test -z "$hardcode_libdirs"; then
68988034 hardcode_libdirs="$libdir"
68998035 else
69028038 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
69038039 ;;
69048040 *)
6905 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8041 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
69068042 ;;
69078043 esac
69088044 fi
69098045 else
69108046 eval flag=\"$hardcode_libdir_flag_spec\"
6911 dep_rpath="$dep_rpath $flag"
8047 func_append dep_rpath " $flag"
69128048 fi
69138049 elif test -n "$runpath_var"; then
69148050 case "$perm_rpath " in
69158051 *" $libdir "*) ;;
6916 *) perm_rpath="$perm_rpath $libdir" ;;
8052 *) func_apped perm_rpath " $libdir" ;;
69178053 esac
69188054 fi
69198055 done
69318067 # We should set the runpath_var.
69328068 rpath=
69338069 for dir in $perm_rpath; do
6934 rpath="$rpath$dir:"
8070 func_append rpath "$dir:"
69358071 done
69368072 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
69378073 fi
69398075 fi
69408076
69418077 shlibpath="$finalize_shlibpath"
6942 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8078 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
69438079 if test -n "$shlibpath"; then
69448080 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
69458081 fi
69658101 linknames=
69668102 for link
69678103 do
6968 linknames="$linknames $link"
8104 func_append linknames " $link"
69698105 done
69708106
69718107 # Use standard objects if they are pic
6972 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8108 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
69738109 test "X$libobjs" = "X " && libobjs=
69748110
69758111 delfiles=
69768112 if test -n "$export_symbols" && test -n "$include_expsyms"; then
69778113 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
69788114 export_symbols="$output_objdir/$libname.uexp"
6979 delfiles="$delfiles $export_symbols"
8115 func_append delfiles " $export_symbols"
69808116 fi
69818117
69828118 orig_export_symbols=
70078143 $opt_dry_run || $RM $export_symbols
70088144 cmds=$export_symbols_cmds
70098145 save_ifs="$IFS"; IFS='~'
7010 for cmd in $cmds; do
8146 for cmd1 in $cmds; do
70118147 IFS="$save_ifs"
7012 eval cmd=\"$cmd\"
7013 func_len " $cmd"
7014 len=$func_len_result
7015 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8148 # Take the normal branch if the nm_file_list_spec branch
8149 # doesn't work or if tool conversion is not needed.
8150 case $nm_file_list_spec~$to_tool_file_cmd in
8151 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8152 try_normal_branch=yes
8153 eval cmd=\"$cmd1\"
8154 func_len " $cmd"
8155 len=$func_len_result
8156 ;;
8157 *)
8158 try_normal_branch=no
8159 ;;
8160 esac
8161 if test "$try_normal_branch" = yes \
8162 && { test "$len" -lt "$max_cmd_len" \
8163 || test "$max_cmd_len" -le -1; }
8164 then
70168165 func_show_eval "$cmd" 'exit $?'
8166 skipped_export=false
8167 elif test -n "$nm_file_list_spec"; then
8168 func_basename "$output"
8169 output_la=$func_basename_result
8170 save_libobjs=$libobjs
8171 save_output=$output
8172 output=${output_objdir}/${output_la}.nm
8173 func_to_tool_file "$output"
8174 libobjs=$nm_file_list_spec$func_to_tool_file_result
8175 func_append delfiles " $output"
8176 func_verbose "creating $NM input file list: $output"
8177 for obj in $save_libobjs; do
8178 func_to_tool_file "$obj"
8179 $ECHO "$func_to_tool_file_result"
8180 done > "$output"
8181 eval cmd=\"$cmd1\"
8182 func_show_eval "$cmd" 'exit $?'
8183 output=$save_output
8184 libobjs=$save_libobjs
70178185 skipped_export=false
70188186 else
70198187 # The command line is too long to execute in one step.
70358203 if test -n "$export_symbols" && test -n "$include_expsyms"; then
70368204 tmp_export_symbols="$export_symbols"
70378205 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7038 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8206 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
70398207 fi
70408208
70418209 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
70478215 # global variables. join(1) would be nice here, but unfortunately
70488216 # isn't a blessed tool.
70498217 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7050 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8218 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
70518219 export_symbols=$output_objdir/$libname.def
70528220 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
70538221 fi
70578225 case " $convenience " in
70588226 *" $test_deplib "*) ;;
70598227 *)
7060 tmp_deplibs="$tmp_deplibs $test_deplib"
8228 func_append tmp_deplibs " $test_deplib"
70618229 ;;
70628230 esac
70638231 done
70778245 test "X$libobjs" = "X " && libobjs=
70788246 else
70798247 gentop="$output_objdir/${outputname}x"
7080 generated="$generated $gentop"
8248 func_append generated " $gentop"
70818249
70828250 func_extract_archives $gentop $convenience
7083 libobjs="$libobjs $func_extract_archives_result"
8251 func_append libobjs " $func_extract_archives_result"
70848252 test "X$libobjs" = "X " && libobjs=
70858253 fi
70868254 fi
70878255
70888256 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
70898257 eval flag=\"$thread_safe_flag_spec\"
7090 linker_flags="$linker_flags $flag"
8258 func_append linker_flags " $flag"
70918259 fi
70928260
70938261 # Make a backup of the uninstalled library when relinking
7094 if test "$mode" = relink; then
8262 if test "$opt_mode" = relink; then
70958263 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
70968264 fi
70978265
71368304 save_libobjs=$libobjs
71378305 fi
71388306 save_output=$output
7139 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
8307 func_basename "$output"
8308 output_la=$func_basename_result
71408309
71418310 # Clear the reloadable object creation command queue and
71428311 # initialize k to one.
71498318 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
71508319 output=${output_objdir}/${output_la}.lnkscript
71518320 func_verbose "creating GNU ld script: $output"
7152 $ECHO 'INPUT (' > $output
8321 echo 'INPUT (' > $output
71538322 for obj in $save_libobjs
71548323 do
7155 $ECHO "$obj" >> $output
8324 func_to_tool_file "$obj"
8325 $ECHO "$func_to_tool_file_result" >> $output
71568326 done
7157 $ECHO ')' >> $output
7158 delfiles="$delfiles $output"
8327 echo ')' >> $output
8328 func_append delfiles " $output"
8329 func_to_tool_file "$output"
8330 output=$func_to_tool_file_result
71598331 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
71608332 output=${output_objdir}/${output_la}.lnk
71618333 func_verbose "creating linker input file list: $output"
71698341 fi
71708342 for obj
71718343 do
7172 $ECHO "$obj" >> $output
8344 func_to_tool_file "$obj"
8345 $ECHO "$func_to_tool_file_result" >> $output
71738346 done
7174 delfiles="$delfiles $output"
7175 output=$firstobj\"$file_list_spec$output\"
8347 func_append delfiles " $output"
8348 func_to_tool_file "$output"
8349 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
71768350 else
71778351 if test -n "$save_libobjs"; then
71788352 func_verbose "creating reloadable object files..."
71968370 # command to the queue.
71978371 if test "$k" -eq 1 ; then
71988372 # The first file doesn't have a previous command to add.
7199 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
8373 reload_objs=$objlist
8374 eval concat_cmds=\"$reload_cmds\"
72008375 else
72018376 # All subsequent reloadable object files will link in
72028377 # the last one created.
7203 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
8378 reload_objs="$objlist $last_robj"
8379 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
72048380 fi
72058381 last_robj=$output_objdir/$output_la-${k}.$objext
72068382 func_arith $k + 1
72078383 k=$func_arith_result
72088384 output=$output_objdir/$output_la-${k}.$objext
7209 objlist=$obj
8385 objlist=" $obj"
72108386 func_len " $last_robj"
72118387 func_arith $len0 + $func_len_result
72128388 len=$func_arith_result
72168392 # reloadable object file. All subsequent reloadable object
72178393 # files will link in the last one created.
72188394 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7219 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
8395 reload_objs="$objlist $last_robj"
8396 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
72208397 if test -n "$last_robj"; then
72218398 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
72228399 fi
7223 delfiles="$delfiles $output"
8400 func_append delfiles " $output"
72248401
72258402 else
72268403 output=
72548431 lt_exit=$?
72558432
72568433 # Restore the uninstalled library and exit
7257 if test "$mode" = relink; then
8434 if test "$opt_mode" = relink; then
72588435 ( cd "$output_objdir" && \
72598436 $RM "${realname}T" && \
72608437 $MV "${realname}U" "$realname" )
72758452 if test -n "$export_symbols" && test -n "$include_expsyms"; then
72768453 tmp_export_symbols="$export_symbols"
72778454 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7278 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8455 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
72798456 fi
72808457
72818458 if test -n "$orig_export_symbols"; then
72878464 # global variables. join(1) would be nice here, but unfortunately
72888465 # isn't a blessed tool.
72898466 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7290 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8467 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
72918468 export_symbols=$output_objdir/$libname.def
72928469 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
72938470 fi
73288505 # Add any objects from preloaded convenience libraries
73298506 if test -n "$dlprefiles"; then
73308507 gentop="$output_objdir/${outputname}x"
7331 generated="$generated $gentop"
8508 func_append generated " $gentop"
73328509
73338510 func_extract_archives $gentop $dlprefiles
7334 libobjs="$libobjs $func_extract_archives_result"
8511 func_append libobjs " $func_extract_archives_result"
73358512 test "X$libobjs" = "X " && libobjs=
73368513 fi
73378514
73478524 lt_exit=$?
73488525
73498526 # Restore the uninstalled library and exit
7350 if test "$mode" = relink; then
8527 if test "$opt_mode" = relink; then
73518528 ( cd "$output_objdir" && \
73528529 $RM "${realname}T" && \
73538530 $MV "${realname}U" "$realname" )
73598536 IFS="$save_ifs"
73608537
73618538 # Restore the uninstalled library and exit
7362 if test "$mode" = relink; then
8539 if test "$opt_mode" = relink; then
73638540 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
73648541
73658542 if test -n "$convenience"; then
74408617 if test -n "$convenience"; then
74418618 if test -n "$whole_archive_flag_spec"; then
74428619 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7443 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
8620 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
74448621 else
74458622 gentop="$output_objdir/${obj}x"
7446 generated="$generated $gentop"
8623 func_append generated " $gentop"
74478624
74488625 func_extract_archives $gentop $convenience
74498626 reload_conv_objs="$reload_objs $func_extract_archives_result"
74508627 fi
74518628 fi
74528629
8630 # If we're not building shared, we need to use non_pic_objs
8631 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8632
74538633 # Create the old-style object.
7454 reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8634 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
74558635
74568636 output="$obj"
74578637 func_execute_cmds "$reload_cmds" 'exit $?'
75118691 case $host in
75128692 *-*-rhapsody* | *-*-darwin1.[012])
75138693 # On Rhapsody replace the C library is the System framework
7514 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7515 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
8694 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8695 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
75168696 ;;
75178697 esac
75188698
75238703 if test "$tagname" = CXX ; then
75248704 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
75258705 10.[0123])
7526 compile_command="$compile_command ${wl}-bind_at_load"
7527 finalize_command="$finalize_command ${wl}-bind_at_load"
8706 func_append compile_command " ${wl}-bind_at_load"
8707 func_append finalize_command " ${wl}-bind_at_load"
75288708 ;;
75298709 esac
75308710 fi
75318711 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7532 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7533 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
8712 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8713 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
75348714 ;;
75358715 esac
75368716
75448724 *)
75458725 case " $compile_deplibs " in
75468726 *" -L$path/$objdir "*)
7547 new_libs="$new_libs -L$path/$objdir" ;;
8727 func_append new_libs " -L$path/$objdir" ;;
75488728 esac
75498729 ;;
75508730 esac
75548734 -L*)
75558735 case " $new_libs " in
75568736 *" $deplib "*) ;;
7557 *) new_libs="$new_libs $deplib" ;;
8737 *) func_append new_libs " $deplib" ;;
75588738 esac
75598739 ;;
7560 *) new_libs="$new_libs $deplib" ;;
8740 *) func_append new_libs " $deplib" ;;
75618741 esac
75628742 done
75638743 compile_deplibs="$new_libs"
75648744
75658745
7566 compile_command="$compile_command $compile_deplibs"
7567 finalize_command="$finalize_command $finalize_deplibs"
8746 func_append compile_command " $compile_deplibs"
8747 func_append finalize_command " $finalize_deplibs"
75688748
75698749 if test -n "$rpath$xrpath"; then
75708750 # If the user specified any rpath flags, then add them.
75728752 # This is the magic to use -rpath.
75738753 case "$finalize_rpath " in
75748754 *" $libdir "*) ;;
7575 *) finalize_rpath="$finalize_rpath $libdir" ;;
8755 *) func_append finalize_rpath " $libdir" ;;
75768756 esac
75778757 done
75788758 fi
75918771 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
75928772 ;;
75938773 *)
7594 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8774 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
75958775 ;;
75968776 esac
75978777 fi
75988778 else
75998779 eval flag=\"$hardcode_libdir_flag_spec\"
7600 rpath="$rpath $flag"
8780 func_append rpath " $flag"
76018781 fi
76028782 elif test -n "$runpath_var"; then
76038783 case "$perm_rpath " in
76048784 *" $libdir "*) ;;
7605 *) perm_rpath="$perm_rpath $libdir" ;;
8785 *) func_append perm_rpath " $libdir" ;;
76068786 esac
76078787 fi
76088788 case $host in
76118791 case :$dllsearchpath: in
76128792 *":$libdir:"*) ;;
76138793 ::) dllsearchpath=$libdir;;
7614 *) dllsearchpath="$dllsearchpath:$libdir";;
8794 *) func_append dllsearchpath ":$libdir";;
76158795 esac
76168796 case :$dllsearchpath: in
76178797 *":$testbindir:"*) ;;
76188798 ::) dllsearchpath=$testbindir;;
7619 *) dllsearchpath="$dllsearchpath:$testbindir";;
8799 *) func_append dllsearchpath ":$testbindir";;
76208800 esac
76218801 ;;
76228802 esac
76428822 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
76438823 ;;
76448824 *)
7645 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8825 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
76468826 ;;
76478827 esac
76488828 fi
76498829 else
76508830 eval flag=\"$hardcode_libdir_flag_spec\"
7651 rpath="$rpath $flag"
8831 func_append rpath " $flag"
76528832 fi
76538833 elif test -n "$runpath_var"; then
76548834 case "$finalize_perm_rpath " in
76558835 *" $libdir "*) ;;
7656 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
8836 *) func_append finalize_perm_rpath " $libdir" ;;
76578837 esac
76588838 fi
76598839 done
76678847
76688848 if test -n "$libobjs" && test "$build_old_libs" = yes; then
76698849 # Transform all the library objects into standard objects.
7670 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7671 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8850 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8851 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
76728852 fi
76738853
76748854 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
76808860
76818861 wrappers_required=yes
76828862 case $host in
8863 *cegcc* | *mingw32ce*)
8864 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8865 wrappers_required=no
8866 ;;
76838867 *cygwin* | *mingw* )
76848868 if test "$build_libtool_libs" != yes; then
76858869 wrappers_required=no
76868870 fi
7687 ;;
7688 *cegcc)
7689 # Disable wrappers for cegcc, we are cross compiling anyway.
7690 wrappers_required=no
76918871 ;;
76928872 *)
76938873 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
76978877 esac
76988878 if test "$wrappers_required" = no; then
76998879 # Replace the output file specification.
7700 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8880 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77018881 link_command="$compile_command$compile_rpath"
77028882
77038883 # We have no uninstalled library dependencies, so finalize right now.
77048884 exit_status=0
77058885 func_show_eval "$link_command" 'exit_status=$?'
8886
8887 if test -n "$postlink_cmds"; then
8888 func_to_tool_file "$output"
8889 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8890 func_execute_cmds "$postlink_cmds" 'exit $?'
8891 fi
77068892
77078893 # Delete the generated files.
77088894 if test -f "$output_objdir/${outputname}S.${objext}"; then
77268912 # We should set the runpath_var.
77278913 rpath=
77288914 for dir in $perm_rpath; do
7729 rpath="$rpath$dir:"
8915 func_append rpath "$dir:"
77308916 done
77318917 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
77328918 fi
77348920 # We should set the runpath_var.
77358921 rpath=
77368922 for dir in $finalize_perm_rpath; do
7737 rpath="$rpath$dir:"
8923 func_append rpath "$dir:"
77388924 done
77398925 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
77408926 fi
77448930 # We don't need to create a wrapper script.
77458931 link_command="$compile_var$compile_command$compile_rpath"
77468932 # Replace the output file specification.
7747 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8933 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77488934 # Delete the old output file.
77498935 $opt_dry_run || $RM $output
77508936 # Link the executable and exit
77518937 func_show_eval "$link_command" 'exit $?'
8938
8939 if test -n "$postlink_cmds"; then
8940 func_to_tool_file "$output"
8941 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8942 func_execute_cmds "$postlink_cmds" 'exit $?'
8943 fi
8944
77528945 exit $EXIT_SUCCESS
77538946 fi
77548947
77638956 if test "$fast_install" != no; then
77648957 link_command="$finalize_var$compile_command$finalize_rpath"
77658958 if test "$fast_install" = yes; then
7766 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
8959 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
77678960 else
77688961 # fast_install is set to needless
77698962 relink_command=
77758968 fi
77768969
77778970 # Replace the output file specification.
7778 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8971 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
77798972
77808973 # Delete the old output files.
77818974 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
77828975
77838976 func_show_eval "$link_command" 'exit $?'
8977
8978 if test -n "$postlink_cmds"; then
8979 func_to_tool_file "$output_objdir/$outputname"
8980 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8981 func_execute_cmds "$postlink_cmds" 'exit $?'
8982 fi
77848983
77858984 # Now create the wrapper script.
77868985 func_verbose "creating $output"
77998998 fi
78008999 done
78019000 relink_command="(cd `pwd`; $relink_command)"
7802 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7803 fi
7804
7805 # Quote $ECHO for shipping.
7806 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7807 case $progpath in
7808 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7809 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7810 esac
7811 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7812 else
7813 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
9001 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
78149002 fi
78159003
78169004 # Only actually do things if not in dry run mode.
78909078 else
78919079 oldobjs="$old_deplibs $non_pic_objects"
78929080 if test "$preload" = yes && test -f "$symfileobj"; then
7893 oldobjs="$oldobjs $symfileobj"
9081 func_append oldobjs " $symfileobj"
78949082 fi
78959083 fi
78969084 addlibs="$old_convenience"
78989086
78999087 if test -n "$addlibs"; then
79009088 gentop="$output_objdir/${outputname}x"
7901 generated="$generated $gentop"
9089 func_append generated " $gentop"
79029090
79039091 func_extract_archives $gentop $addlibs
7904 oldobjs="$oldobjs $func_extract_archives_result"
9092 func_append oldobjs " $func_extract_archives_result"
79059093 fi
79069094
79079095 # Do each command in the archive commands.
79129100 # Add any objects from preloaded convenience libraries
79139101 if test -n "$dlprefiles"; then
79149102 gentop="$output_objdir/${outputname}x"
7915 generated="$generated $gentop"
9103 func_append generated " $gentop"
79169104
79179105 func_extract_archives $gentop $dlprefiles
7918 oldobjs="$oldobjs $func_extract_archives_result"
9106 func_append oldobjs " $func_extract_archives_result"
79199107 fi
79209108
79219109 # POSIX demands no paths to be encoded in archives. We have
79319119 done | sort | sort -uc >/dev/null 2>&1); then
79329120 :
79339121 else
7934 $ECHO "copying selected object files to avoid basename conflicts..."
9122 echo "copying selected object files to avoid basename conflicts..."
79359123 gentop="$output_objdir/${outputname}x"
7936 generated="$generated $gentop"
9124 func_append generated " $gentop"
79379125 func_mkdir_p "$gentop"
79389126 save_oldobjs=$oldobjs
79399127 oldobjs=
79579145 esac
79589146 done
79599147 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7960 oldobjs="$oldobjs $gentop/$newobj"
9148 func_append oldobjs " $gentop/$newobj"
79619149 ;;
7962 *) oldobjs="$oldobjs $obj" ;;
9150 *) func_append oldobjs " $obj" ;;
79639151 esac
79649152 done
79659153 fi
79689156 func_len " $cmds"
79699157 len=$func_len_result
79709158 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9159 cmds=$old_archive_cmds
9160 elif test -n "$archiver_list_spec"; then
9161 func_verbose "using command file archive linking..."
9162 for obj in $oldobjs
9163 do
9164 func_to_tool_file "$obj"
9165 $ECHO "$func_to_tool_file_result"
9166 done > $output_objdir/$libname.libcmd
9167 func_to_tool_file "$output_objdir/$libname.libcmd"
9168 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
79719169 cmds=$old_archive_cmds
79729170 else
79739171 # the command line is too long to link in one step, link in parts
80429240 done
80439241 # Quote the link command for shipping.
80449242 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8045 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9243 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
80469244 if test "$hardcode_automatic" = yes ; then
80479245 relink_command=
80489246 fi
80659263 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
80669264 test -z "$libdir" && \
80679265 func_fatal_error "\`$deplib' is not a valid libtool archive"
8068 newdependency_libs="$newdependency_libs $libdir/$name"
9266 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
80699267 ;;
8070 *) newdependency_libs="$newdependency_libs $deplib" ;;
9268 -L*)
9269 func_stripname -L '' "$deplib"
9270 func_replace_sysroot "$func_stripname_result"
9271 func_append newdependency_libs " -L$func_replace_sysroot_result"
9272 ;;
9273 -R*)
9274 func_stripname -R '' "$deplib"
9275 func_replace_sysroot "$func_stripname_result"
9276 func_append newdependency_libs " -R$func_replace_sysroot_result"
9277 ;;
9278 *) func_append newdependency_libs " $deplib" ;;
80719279 esac
80729280 done
80739281 dependency_libs="$newdependency_libs"
80819289 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
80829290 test -z "$libdir" && \
80839291 func_fatal_error "\`$lib' is not a valid libtool archive"
8084 newdlfiles="$newdlfiles $libdir/$name"
9292 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
80859293 ;;
8086 *) newdlfiles="$newdlfiles $lib" ;;
9294 *) func_append newdlfiles " $lib" ;;
80879295 esac
80889296 done
80899297 dlfiles="$newdlfiles"
81009308 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
81019309 test -z "$libdir" && \
81029310 func_fatal_error "\`$lib' is not a valid libtool archive"
8103 newdlprefiles="$newdlprefiles $libdir/$name"
9311 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
81049312 ;;
81059313 esac
81069314 done
81129320 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81139321 *) abs=`pwd`"/$lib" ;;
81149322 esac
8115 newdlfiles="$newdlfiles $abs"
9323 func_append newdlfiles " $abs"
81169324 done
81179325 dlfiles="$newdlfiles"
81189326 newdlprefiles=
81219329 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81229330 *) abs=`pwd`"/$lib" ;;
81239331 esac
8124 newdlprefiles="$newdlprefiles $abs"
9332 func_append newdlprefiles " $abs"
81259333 done
81269334 dlprefiles="$newdlprefiles"
81279335 fi
81289336 $RM $output
81299337 # place dlname in correct position for cygwin
9338 # In fact, it would be nice if we could use this code for all target
9339 # systems that can't hard-code library paths into their executables
9340 # and that have no shared library path variable independent of PATH,
9341 # but it turns out we can't easily determine that from inspecting
9342 # libtool variables, so we have to hard-code the OSs to which it
9343 # applies here; at the moment, that means platforms that use the PE
9344 # object format with DLL files. See the long comment at the top of
9345 # tests/bindir.at for full details.
81309346 tdlname=$dlname
81319347 case $host,$output,$installed,$module,$dlname in
8132 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
9348 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9349 # If a -bindir argument was supplied, place the dll there.
9350 if test "x$bindir" != x ;
9351 then
9352 func_relative_path "$install_libdir" "$bindir"
9353 tdlname=$func_relative_path_result$dlname
9354 else
9355 # Otherwise fall back on heuristic.
9356 tdlname=../bin/$dlname
9357 fi
9358 ;;
81339359 esac
81349360 $ECHO > $output "\
81359361 # $outputname - a libtool library file
81889414 exit $EXIT_SUCCESS
81899415 }
81909416
8191 { test "$mode" = link || test "$mode" = relink; } &&
9417 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
81929418 func_mode_link ${1+"$@"}
81939419
81949420
82089434 for arg
82099435 do
82109436 case $arg in
8211 -f) RM="$RM $arg"; rmforce=yes ;;
8212 -*) RM="$RM $arg" ;;
8213 *) files="$files $arg" ;;
9437 -f) func_append RM " $arg"; rmforce=yes ;;
9438 -*) func_append RM " $arg" ;;
9439 *) func_append files " $arg" ;;
82149440 esac
82159441 done
82169442
82199445
82209446 rmdirs=
82219447
8222 origobjdir="$objdir"
82239448 for file in $files; do
82249449 func_dirname "$file" "" "."
82259450 dir="$func_dirname_result"
82269451 if test "X$dir" = X.; then
8227 objdir="$origobjdir"
9452 odir="$objdir"
82289453 else
8229 objdir="$dir/$origobjdir"
9454 odir="$dir/$objdir"
82309455 fi
82319456 func_basename "$file"
82329457 name="$func_basename_result"
8233 test "$mode" = uninstall && objdir="$dir"
8234
8235 # Remember objdir for removal later, being careful to avoid duplicates
8236 if test "$mode" = clean; then
9458 test "$opt_mode" = uninstall && odir="$dir"
9459
9460 # Remember odir for removal later, being careful to avoid duplicates
9461 if test "$opt_mode" = clean; then
82379462 case " $rmdirs " in
8238 *" $objdir "*) ;;
8239 *) rmdirs="$rmdirs $objdir" ;;
9463 *" $odir "*) ;;
9464 *) func_append rmdirs " $odir" ;;
82409465 esac
82419466 fi
82429467
82629487
82639488 # Delete the libtool libraries and symlinks.
82649489 for n in $library_names; do
8265 rmfiles="$rmfiles $objdir/$n"
9490 func_append rmfiles " $odir/$n"
82669491 done
8267 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8268
8269 case "$mode" in
9492 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9493
9494 case "$opt_mode" in
82709495 clean)
8271 case " $library_names " in
8272 # " " in the beginning catches empty $dlname
9496 case " $library_names " in
82739497 *" $dlname "*) ;;
8274 *) rmfiles="$rmfiles $objdir/$dlname" ;;
9498 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
82759499 esac
8276 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
9500 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
82779501 ;;
82789502 uninstall)
82799503 if test -n "$library_names"; then
83019525 # Add PIC object to the list of files to remove.
83029526 if test -n "$pic_object" &&
83039527 test "$pic_object" != none; then
8304 rmfiles="$rmfiles $dir/$pic_object"
9528 func_append rmfiles " $dir/$pic_object"
83059529 fi
83069530
83079531 # Add non-PIC object to the list of files to remove.
83089532 if test -n "$non_pic_object" &&
83099533 test "$non_pic_object" != none; then
8310 rmfiles="$rmfiles $dir/$non_pic_object"
9534 func_append rmfiles " $dir/$non_pic_object"
83119535 fi
83129536 fi
83139537 ;;
83149538
83159539 *)
8316 if test "$mode" = clean ; then
9540 if test "$opt_mode" = clean ; then
83179541 noexename=$name
83189542 case $file in
83199543 *.exe)
83239547 noexename=$func_stripname_result
83249548 # $file with .exe has already been added to rmfiles,
83259549 # add $file without .exe
8326 rmfiles="$rmfiles $file"
9550 func_append rmfiles " $file"
83279551 ;;
83289552 esac
83299553 # Do a test to see if this is a libtool program.
83329556 func_ltwrapper_scriptname "$file"
83339557 relink_command=
83349558 func_source $func_ltwrapper_scriptname_result
8335 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
9559 func_append rmfiles " $func_ltwrapper_scriptname_result"
83369560 else
83379561 relink_command=
83389562 func_source $dir/$noexename
83409564
83419565 # note $name still contains .exe if it was in $file originally
83429566 # as does the version of $file that was added into $rmfiles
8343 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
9567 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
83449568 if test "$fast_install" = yes && test -n "$relink_command"; then
8345 rmfiles="$rmfiles $objdir/lt-$name"
9569 func_append rmfiles " $odir/lt-$name"
83469570 fi
83479571 if test "X$noexename" != "X$name" ; then
8348 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
9572 func_append rmfiles " $odir/lt-${noexename}.c"
83499573 fi
83509574 fi
83519575 fi
83539577 esac
83549578 func_show_eval "$RM $rmfiles" 'exit_status=1'
83559579 done
8356 objdir="$origobjdir"
83579580
83589581 # Try to remove the ${objdir}s in the directories where we deleted files
83599582 for dir in $rmdirs; do
83659588 exit $exit_status
83669589 }
83679590
8368 { test "$mode" = uninstall || test "$mode" = clean; } &&
9591 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
83699592 func_mode_uninstall ${1+"$@"}
83709593
8371 test -z "$mode" && {
9594 test -z "$opt_mode" && {
83729595 help="$generic_help"
83739596 func_fatal_help "you must specify a MODE"
83749597 }
83759598
83769599 test -z "$exec_cmd" && \
8377 func_fatal_help "invalid operation mode \`$mode'"
9600 func_fatal_help "invalid operation mode \`$opt_mode'"
83789601
83799602 if test -n "$exec_cmd"; then
83809603 eval exec "$exec_cmd"
0 dnl Macros to check the presence of generic (non-typed) symbols.
1 dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com>
2 dnl Copyright (c) 2006-2007 xine project
3 dnl
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2, or (at your option)
7 dnl any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 dnl 02110-1301, USA.
18 dnl
19 dnl As a special exception, the copyright owners of the
20 dnl macro gives unlimited permission to copy, distribute and modify the
21 dnl configure scripts that are the output of Autoconf when processing the
22 dnl Macro. You need not follow the terms of the GNU General Public
23 dnl License when using or distributing such scripts, even though portions
24 dnl of the text of the Macro appear in them. The GNU General Public
25 dnl License (GPL) does govern all other use of the material that
26 dnl constitutes the Autoconf Macro.
27 dnl
28 dnl This special exception to the GPL applies to versions of the
29 dnl Autoconf Macro released by this project. When you make and
30 dnl distribute a modified version of the Autoconf Macro, you may extend
31 dnl this special exception to the GPL to apply to your modified version as
32 dnl well.
33
34 dnl Check if the flag is supported by compiler
35 dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
36
37 AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
38 AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
39 [ac_save_CFLAGS="$CFLAGS"
40 CFLAGS="$CFLAGS $1"
41 AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
42 [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
43 [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
44 CFLAGS="$ac_save_CFLAGS"
45 ])
46
47 AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
48 [$2], [$3])
49 ])
50
51 dnl Check if the flag is supported by compiler (cacheable)
52 dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
53
54 AC_DEFUN([CC_CHECK_CFLAGS], [
55 AC_CACHE_CHECK([if $CC supports $1 flag],
56 AS_TR_SH([cc_cv_cflags_$1]),
57 CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
58 )
59
60 AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
61 [$2], [$3])
62 ])
63
64 dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
65 dnl Check for CFLAG and appends them to CFLAGS if supported
66 AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
67 AC_CACHE_CHECK([if $CC supports $1 flag],
68 AS_TR_SH([cc_cv_cflags_$1]),
69 CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
70 )
71
72 AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
73 [CFLAGS="$CFLAGS $1"; $2], [$3])
74 ])
75
76 dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])
77 AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [
78 for flag in $1; do
79 CC_CHECK_CFLAG_APPEND($flag, [$2], [$3])
80 done
81 ])
82
83 dnl Check if the flag is supported by linker (cacheable)
84 dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
85
86 AC_DEFUN([CC_CHECK_LDFLAGS], [
87 AC_CACHE_CHECK([if $CC supports $1 flag],
88 AS_TR_SH([cc_cv_ldflags_$1]),
89 [ac_save_LDFLAGS="$LDFLAGS"
90 LDFLAGS="$LDFLAGS $1"
91 AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
92 [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
93 [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
94 LDFLAGS="$ac_save_LDFLAGS"
95 ])
96
97 AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
98 [$2], [$3])
99 ])
100
101 dnl Check for a -Werror flag or equivalent. -Werror is the GCC
102 dnl and ICC flag that tells the compiler to treat all the warnings
103 dnl as fatal. We usually need this option to make sure that some
104 dnl constructs (like attributes) are not simply ignored.
105 dnl
106 dnl Other compilers don't support -Werror per se, but they support
107 dnl an equivalent flag:
108 dnl - Sun Studio compiler supports -errwarn=%all
109 AC_DEFUN([CC_CHECK_WERROR], [
110 AC_CACHE_CHECK(
111 [for $CC way to treat warnings as errors],
112 [cc_cv_werror],
113 [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
114 [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
115 ])
116 ])
117
118 AC_DEFUN([CC_CHECK_ATTRIBUTE], [
119 AC_REQUIRE([CC_CHECK_WERROR])
120 AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
121 AS_TR_SH([cc_cv_attribute_$1]),
122 [ac_save_CFLAGS="$CFLAGS"
123 CFLAGS="$CFLAGS $cc_cv_werror"
124 AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
125 [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
126 [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
127 CFLAGS="$ac_save_CFLAGS"
128 ])
129
130 AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
131 [AC_DEFINE(
132 AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
133 [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
134 )
135 $4],
136 [$5])
137 ])
138
139 AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
140 CC_CHECK_ATTRIBUTE(
141 [constructor],,
142 [extern void foo();
143 void __attribute__((constructor)) ctor() { foo(); }],
144 [$1], [$2])
145 ])
146
147 AC_DEFUN([CC_ATTRIBUTE_DESTRUCTOR], [
148 CC_CHECK_ATTRIBUTE(
149 [destructor],,
150 [extern void foo();
151 void __attribute__((destructor)) dtor() { foo(); }],
152 [$1], [$2])
153 ])
154
155 AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
156 CC_CHECK_ATTRIBUTE(
157 [format], [format(printf, n, n)],
158 [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
159 [$1], [$2])
160 ])
161
162 AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
163 CC_CHECK_ATTRIBUTE(
164 [format_arg], [format_arg(printf)],
165 [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
166 [$1], [$2])
167 ])
168
169 AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
170 CC_CHECK_ATTRIBUTE(
171 [visibility_$1], [visibility("$1")],
172 [void __attribute__((visibility("$1"))) $1_function() { }],
173 [$2], [$3])
174 ])
175
176 AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
177 CC_CHECK_ATTRIBUTE(
178 [nonnull], [nonnull()],
179 [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
180 [$1], [$2])
181 ])
182
183 AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
184 CC_CHECK_ATTRIBUTE(
185 [unused], ,
186 [void some_function(void *foo, __attribute__((unused)) void *bar);],
187 [$1], [$2])
188 ])
189
190 AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
191 CC_CHECK_ATTRIBUTE(
192 [sentinel], ,
193 [void some_function(void *foo, ...) __attribute__((sentinel));],
194 [$1], [$2])
195 ])
196
197 AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
198 CC_CHECK_ATTRIBUTE(
199 [deprecated], ,
200 [void some_function(void *foo, ...) __attribute__((deprecated));],
201 [$1], [$2])
202 ])
203
204 AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
205 CC_CHECK_ATTRIBUTE(
206 [alias], [weak, alias],
207 [void other_function(void *foo) { }
208 void some_function(void *foo) __attribute__((weak, alias("other_function")));],
209 [$1], [$2])
210 ])
211
212 AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
213 CC_CHECK_ATTRIBUTE(
214 [malloc], ,
215 [void * __attribute__((malloc)) my_alloc(int n);],
216 [$1], [$2])
217 ])
218
219 AC_DEFUN([CC_ATTRIBUTE_PACKED], [
220 CC_CHECK_ATTRIBUTE(
221 [packed], ,
222 [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
223 [$1], [$2])
224 ])
225
226 AC_DEFUN([CC_ATTRIBUTE_CONST], [
227 CC_CHECK_ATTRIBUTE(
228 [const], ,
229 [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
230 [$1], [$2])
231 ])
232
233 AC_DEFUN([CC_FLAG_VISIBILITY], [
234 AC_REQUIRE([CC_CHECK_WERROR])
235 AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
236 [cc_cv_flag_visibility],
237 [cc_flag_visibility_save_CFLAGS="$CFLAGS"
238 CFLAGS="$CFLAGS $cc_cv_werror"
239 CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
240 cc_cv_flag_visibility='yes',
241 cc_cv_flag_visibility='no')
242 CFLAGS="$cc_flag_visibility_save_CFLAGS"])
243
244 AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
245 [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
246 [Define this if the compiler supports the -fvisibility flag])
247 $1],
248 [$2])
249 ])
250
251 AC_DEFUN([CC_FUNC_EXPECT], [
252 AC_REQUIRE([CC_CHECK_WERROR])
253 AC_CACHE_CHECK([if compiler has __builtin_expect function],
254 [cc_cv_func_expect],
255 [ac_save_CFLAGS="$CFLAGS"
256 CFLAGS="$CFLAGS $cc_cv_werror"
257 AC_COMPILE_IFELSE(
258 [int some_function() {
259 int a = 3;
260 return (int)__builtin_expect(a, 3);
261 }],
262 [cc_cv_func_expect=yes],
263 [cc_cv_func_expect=no])
264 CFLAGS="$ac_save_CFLAGS"
265 ])
266
267 AS_IF([test "x$cc_cv_func_expect" = "xyes"],
268 [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
269 [Define this if the compiler supports __builtin_expect() function])
270 $1],
271 [$2])
272 ])
273
274 AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
275 AC_REQUIRE([CC_CHECK_WERROR])
276 AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
277 [cc_cv_attribute_aligned],
278 [ac_save_CFLAGS="$CFLAGS"
279 CFLAGS="$CFLAGS $cc_cv_werror"
280 for cc_attribute_align_try in 64 32 16 8 4 2; do
281 AC_COMPILE_IFELSE([
282 int main() {
283 static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
284 return c;
285 }], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
286 done
287 CFLAGS="$ac_save_CFLAGS"
288 ])
289
290 if test "x$cc_cv_attribute_aligned" != "x"; then
291 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
292 [Define the highest alignment supported])
293 fi
294 ])
0 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
2 # ===========================================================================
3 #
4 # SYNOPSIS
5 #
6 # AX_CC_FOR_BUILD
7 #
8 # DESCRIPTION
9 #
10 # Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
11 #
12 # LICENSE
13 #
14 # Copyright (c) 2010 Diego Elio Pettenò <flameeyes@gmail.com>
15 # Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org>
16 # Copyright (c) 1999 Richard Henderson <rth@redhat.com>
17 #
18 # This program is free software: you can redistribute it and/or modify it
19 # under the terms of the GNU General Public License as published by the
20 # Free Software Foundation, either version 3 of the License, or (at your
21 # option) any later version.
22 #
23 # This program is distributed in the hope that it will be useful, but
24 # WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
26 # Public License for more details.
27 #
28 # You should have received a copy of the GNU General Public License along
29 # with this program. If not, see <http://www.gnu.org/licenses/>.
30 #
31 # As a special exception, the respective Autoconf Macro's copyright owner
32 # gives unlimited permission to copy, distribute and modify the configure
33 # scripts that are the output of Autoconf when processing the Macro. You
34 # need not follow the terms of the GNU General Public License when using
35 # or distributing such scripts, even though portions of the text of the
36 # Macro appear in them. The GNU General Public License (GPL) does govern
37 # all other use of the material that constitutes the Autoconf Macro.
38 #
39 # This special exception to the GPL applies to versions of the Autoconf
40 # Macro released by the Autoconf Archive. When you make and distribute a
41 # modified version of the Autoconf Macro, you may extend this special
42 # exception to the GPL to apply to your modified version as well.
43
44 #serial 2
45
46 dnl Get a default for CC_FOR_BUILD to put into Makefile.
47 AC_DEFUN([AX_CC_FOR_BUILD], [
48 AC_REQUIRE([AC_PROG_CC])
49
50 dnl Declare the new variables
51 AC_ARG_VAR([CC_FOR_BUILD],
52 [Host's C compiler command for cross-compilation @<:@default=$(CC)@:>@])
53 AC_ARG_VAR([BUILD_CFLAGS],
54 [Host's C compiler flags @<:@default=$(CFLAGS)@:>@])
55 AC_ARG_VAR([BUILD_LDFLAGS],
56 [Host's linker flags @<:@default=$(LDFLAGS)@:>@])
57
58 dnl Put a plausible default for CC_FOR_BUILD in Makefile.
59 if test -z "$CC_FOR_BUILD"; then
60 if test "x$cross_compiling" = "xno"; then
61 CC_FOR_BUILD=${CC}
62 else
63 AC_CHECK_PROGS(CC_FOR_BUILD, [gcc cc])
64 fi
65 fi
66
67 if test "x${BUILD_CFLAGS+set}" != "xset" ; then
68 if test "x$cross_compiling" = "xyes" ; then
69 BUILD_CFLAGS=
70 else
71 BUILD_CFLAGS=${CFLAGS}
72 fi
73 fi
74
75 if test "x${BUILD_LDFLAGS+set}" != "xset" ; then
76 if test "x$cross_compiling" = "xyes" ; then
77 BUILD_LDFLAGS=
78 else
79 BUILD_LDFLAGS=${LDFLAGS}
80 fi
81 fi
82
83 dnl Also set EXEEXT_FOR_BUILD.
84 if test "x$cross_compiling" = "xno"; then
85 EXEEXT_FOR_BUILD='$(EXEEXT)'
86 else
87 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
88 [rm -f conftest*
89 echo 'int main () { return 0; }' > conftest.c
90 bfd_cv_build_exeext=
91 ${CC_FOR_BUILD} ${LDFLAGS} ${CFLAGS} -o conftest conftest.c 1>&5 2>&5
92 for file in conftest.*; do
93 case $file in
94 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
95 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
96 esac
97 done
98 rm -f conftest*
99 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
100 EXEEXT_FOR_BUILD=""
101 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
102 fi
103 AC_SUBST(EXEEXT_FOR_BUILD)
104 ])dnl
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
4 # Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14 # Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [host_alias], [0], [The host system])dnl
149 _LT_DECL([], [host], [0])dnl
150 _LT_DECL([], [host_os], [0])dnl
151 dnl
152 _LT_DECL([], [build_alias], [0], [The build system])dnl
153 _LT_DECL([], [build], [0])dnl
154 _LT_DECL([], [build_os], [0])dnl
155 dnl
156 AC_REQUIRE([AC_PROG_CC])dnl
157 AC_REQUIRE([LT_PATH_LD])dnl
158 AC_REQUIRE([LT_PATH_NM])dnl
159 dnl
160 AC_REQUIRE([AC_PROG_LN_S])dnl
161 test -z "$LN_S" && LN_S="ln -s"
162 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
163 dnl
164 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
165 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
166 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
167 dnl
168 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
169 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
170 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
171 m4_require([_LT_CMD_RELOAD])dnl
172 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
173 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
174 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
175 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
176 m4_require([_LT_WITH_SYSROOT])dnl
177
178 _LT_CONFIG_LIBTOOL_INIT([
179 # See if we are running on zsh, and set the options which allow our
180 # commands through without removal of \ escapes INIT.
181 if test -n "\${ZSH_VERSION+set}" ; then
182 setopt NO_GLOB_SUBST
183 fi
184 ])
185 if test -n "${ZSH_VERSION+set}" ; then
186 setopt NO_GLOB_SUBST
187 fi
188
189 _LT_CHECK_OBJDIR
190
191 m4_require([_LT_TAG_COMPILER])dnl
192
193 case $host_os in
194 aix3*)
195 # AIX sometimes has problems with the GCC collect2 program. For some
196 # reason, if we set the COLLECT_NAMES environment variable, the problems
197 # vanish in a puff of smoke.
198 if test "X${COLLECT_NAMES+set}" != Xset; then
199 COLLECT_NAMES=
200 export COLLECT_NAMES
201 fi
202 ;;
203 esac
204
205 # Global variables:
206 ofile=libtool
207 can_build_shared=yes
208
209 # All known linkers require a `.a' archive for static linking (except MSVC,
210 # which needs '.lib').
211 libext=a
212
213 with_gnu_ld="$lt_cv_prog_gnu_ld"
214
215 old_CC="$CC"
216 old_CFLAGS="$CFLAGS"
217
218 # Set sane defaults for various variables
219 test -z "$CC" && CC=cc
220 test -z "$LTCC" && LTCC=$CC
221 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
222 test -z "$LD" && LD=ld
223 test -z "$ac_objext" && ac_objext=o
224
225 _LT_CC_BASENAME([$compiler])
226
227 # Only perform the check for file, if the check method requires it
228 test -z "$MAGIC_CMD" && MAGIC_CMD=file
229 case $deplibs_check_method in
230 file_magic*)
231 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
232 _LT_PATH_MAGIC
233 fi
234 ;;
235 esac
236
237 # Use C for the default configuration in the libtool script
238 LT_SUPPORTED_TAG([CC])
239 _LT_LANG_C_CONFIG
240 _LT_LANG_DEFAULT_CONFIG
241 _LT_CONFIG_COMMANDS
242 ])# _LT_SETUP
243
244
245 # _LT_PREPARE_SED_QUOTE_VARS
246 # --------------------------
247 # Define a few sed substitution that help us do robust quoting.
248 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
249 [# Backslashify metacharacters that are still active within
250 # double-quoted strings.
251 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
252
253 # Same as above, but do not quote variable references.
254 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
255
256 # Sed substitution to delay expansion of an escaped shell variable in a
257 # double_quote_subst'ed string.
258 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
259
260 # Sed substitution to delay expansion of an escaped single quote.
261 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
262
263 # Sed substitution to avoid accidental globbing in evaled expressions
264 no_glob_subst='s/\*/\\\*/g'
265 ])
266
267 # _LT_PROG_LTMAIN
268 # ---------------
269 # Note that this code is called both from `configure', and `config.status'
270 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
271 # `config.status' has no value for ac_aux_dir unless we are using Automake,
272 # so we pass a copy along to make sure it has a sensible value anyway.
273 m4_defun([_LT_PROG_LTMAIN],
274 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
275 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
276 ltmain="$ac_aux_dir/ltmain.sh"
277 ])# _LT_PROG_LTMAIN
278
279
280 ## ------------------------------------- ##
281 ## Accumulate code for creating libtool. ##
282 ## ------------------------------------- ##
283
284 # So that we can recreate a full libtool script including additional
285 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
286 # in macros and then make a single call at the end using the `libtool'
287 # label.
288
289
290 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
291 # ----------------------------------------
292 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
293 m4_define([_LT_CONFIG_LIBTOOL_INIT],
294 [m4_ifval([$1],
295 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
296 [$1
297 ])])])
298
299 # Initialize.
300 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
301
302
303 # _LT_CONFIG_LIBTOOL([COMMANDS])
304 # ------------------------------
305 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306 m4_define([_LT_CONFIG_LIBTOOL],
307 [m4_ifval([$1],
308 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
309 [$1
310 ])])])
311
312 # Initialize.
313 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
314
315
316 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
317 # -----------------------------------------------------
318 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
319 [_LT_CONFIG_LIBTOOL([$1])
320 _LT_CONFIG_LIBTOOL_INIT([$2])
321 ])
322
323
324 # _LT_FORMAT_COMMENT([COMMENT])
325 # -----------------------------
326 # Add leading comment marks to the start of each line, and a trailing
327 # full-stop to the whole comment if one is not present already.
328 m4_define([_LT_FORMAT_COMMENT],
329 [m4_ifval([$1], [
330 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
331 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
332 )])
333
334
335
336 ## ------------------------ ##
337 ## FIXME: Eliminate VARNAME ##
338 ## ------------------------ ##
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # A function that is used when there is no print builtin or printf.
535 func_fallback_echo ()
536 {
537 eval 'cat <<_LTECHO_EOF
538 \$[]1
539 _LTECHO_EOF'
540 }
541
542 # Quote evaled strings.
543 for var in lt_decl_all_varnames([[ \
544 ]], lt_decl_quote_varnames); do
545 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
546 *[[\\\\\\\`\\"\\\$]]*)
547 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
548 ;;
549 *)
550 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
551 ;;
552 esac
553 done
554
555 # Double-quote double-evaled strings.
556 for var in lt_decl_all_varnames([[ \
557 ]], lt_decl_dquote_varnames); do
558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559 *[[\\\\\\\`\\"\\\$]]*)
560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
561 ;;
562 *)
563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
564 ;;
565 esac
566 done
567
568 _LT_OUTPUT_LIBTOOL_INIT
569 ])
570
571 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
572 # ------------------------------------
573 # Generate a child script FILE with all initialization necessary to
574 # reuse the environment learned by the parent script, and make the
575 # file executable. If COMMENT is supplied, it is inserted after the
576 # `#!' sequence but before initialization text begins. After this
577 # macro, additional text can be appended to FILE to form the body of
578 # the child script. The macro ends with non-zero status if the
579 # file could not be fully written (such as if the disk is full).
580 m4_ifdef([AS_INIT_GENERATED],
581 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
582 [m4_defun([_LT_GENERATED_FILE_INIT],
583 [m4_require([AS_PREPARE])]dnl
584 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
585 [lt_write_fail=0
586 cat >$1 <<_ASEOF || lt_write_fail=1
587 #! $SHELL
588 # Generated by $as_me.
589 $2
590 SHELL=\${CONFIG_SHELL-$SHELL}
591 export SHELL
592 _ASEOF
593 cat >>$1 <<\_ASEOF || lt_write_fail=1
594 AS_SHELL_SANITIZE
595 _AS_PREPARE
596 exec AS_MESSAGE_FD>&1
597 _ASEOF
598 test $lt_write_fail = 0 && chmod +x $1[]dnl
599 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
600
601 # LT_OUTPUT
602 # ---------
603 # This macro allows early generation of the libtool script (before
604 # AC_OUTPUT is called), incase it is used in configure for compilation
605 # tests.
606 AC_DEFUN([LT_OUTPUT],
607 [: ${CONFIG_LT=./config.lt}
608 AC_MSG_NOTICE([creating $CONFIG_LT])
609 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
610 [# Run this file to recreate a libtool stub with the current configuration.])
611
612 cat >>"$CONFIG_LT" <<\_LTEOF
613 lt_cl_silent=false
614 exec AS_MESSAGE_LOG_FD>>config.log
615 {
616 echo
617 AS_BOX([Running $as_me.])
618 } >&AS_MESSAGE_LOG_FD
619
620 lt_cl_help="\
621 \`$as_me' creates a local libtool stub from the current configuration,
622 for use in further configure time tests before the real libtool is
623 generated.
624
625 Usage: $[0] [[OPTIONS]]
626
627 -h, --help print this help, then exit
628 -V, --version print version number, then exit
629 -q, --quiet do not print progress messages
630 -d, --debug don't remove temporary files
631
632 Report bugs to <bug-libtool@gnu.org>."
633
634 lt_cl_version="\
635 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
636 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
637 configured by $[0], generated by m4_PACKAGE_STRING.
638
639 Copyright (C) 2010 Free Software Foundation, Inc.
640 This config.lt script is free software; the Free Software Foundation
641 gives unlimited permision to copy, distribute and modify it."
642
643 while test $[#] != 0
644 do
645 case $[1] in
646 --version | --v* | -V )
647 echo "$lt_cl_version"; exit 0 ;;
648 --help | --h* | -h )
649 echo "$lt_cl_help"; exit 0 ;;
650 --debug | --d* | -d )
651 debug=: ;;
652 --quiet | --q* | --silent | --s* | -q )
653 lt_cl_silent=: ;;
654
655 -*) AC_MSG_ERROR([unrecognized option: $[1]
656 Try \`$[0] --help' for more information.]) ;;
657
658 *) AC_MSG_ERROR([unrecognized argument: $[1]
659 Try \`$[0] --help' for more information.]) ;;
660 esac
661 shift
662 done
663
664 if $lt_cl_silent; then
665 exec AS_MESSAGE_FD>/dev/null
666 fi
667 _LTEOF
668
669 cat >>"$CONFIG_LT" <<_LTEOF
670 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
671 _LTEOF
672
673 cat >>"$CONFIG_LT" <<\_LTEOF
674 AC_MSG_NOTICE([creating $ofile])
675 _LT_OUTPUT_LIBTOOL_COMMANDS
676 AS_EXIT(0)
677 _LTEOF
678 chmod +x "$CONFIG_LT"
679
680 # configure is writing to config.log, but config.lt does its own redirection,
681 # appending to config.log, which fails on DOS, as config.log is still kept
682 # open by configure. Here we exec the FD to /dev/null, effectively closing
683 # config.log, so it can be properly (re)opened and appended to by config.lt.
684 lt_cl_success=:
685 test "$silent" = yes &&
686 lt_config_lt_args="$lt_config_lt_args --quiet"
687 exec AS_MESSAGE_LOG_FD>/dev/null
688 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
689 exec AS_MESSAGE_LOG_FD>>config.log
690 $lt_cl_success || AS_EXIT(1)
691 ])# LT_OUTPUT
692
693
694 # _LT_CONFIG(TAG)
695 # ---------------
696 # If TAG is the built-in tag, create an initial libtool script with a
697 # default configuration from the untagged config vars. Otherwise add code
698 # to config.status for appending the configuration named by TAG from the
699 # matching tagged config vars.
700 m4_defun([_LT_CONFIG],
701 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
702 _LT_CONFIG_SAVE_COMMANDS([
703 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
704 m4_if(_LT_TAG, [C], [
705 # See if we are running on zsh, and set the options which allow our
706 # commands through without removal of \ escapes.
707 if test -n "${ZSH_VERSION+set}" ; then
708 setopt NO_GLOB_SUBST
709 fi
710
711 cfgfile="${ofile}T"
712 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
713 $RM "$cfgfile"
714
715 cat <<_LT_EOF >> "$cfgfile"
716 #! $SHELL
717
718 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
719 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
720 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
721 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
722 #
723 _LT_COPYING
724 _LT_LIBTOOL_TAGS
725
726 # ### BEGIN LIBTOOL CONFIG
727 _LT_LIBTOOL_CONFIG_VARS
728 _LT_LIBTOOL_TAG_VARS
729 # ### END LIBTOOL CONFIG
730
731 _LT_EOF
732
733 case $host_os in
734 aix3*)
735 cat <<\_LT_EOF >> "$cfgfile"
736 # AIX sometimes has problems with the GCC collect2 program. For some
737 # reason, if we set the COLLECT_NAMES environment variable, the problems
738 # vanish in a puff of smoke.
739 if test "X${COLLECT_NAMES+set}" != Xset; then
740 COLLECT_NAMES=
741 export COLLECT_NAMES
742 fi
743 _LT_EOF
744 ;;
745 esac
746
747 _LT_PROG_LTMAIN
748
749 # We use sed instead of cat because bash on DJGPP gets confused if
750 # if finds mixed CR/LF and LF-only lines. Since sed operates in
751 # text mode, it properly converts lines to CR/LF. This bash problem
752 # is reportedly fixed, but why not run on old versions too?
753 sed '$q' "$ltmain" >> "$cfgfile" \
754 || (rm -f "$cfgfile"; exit 1)
755
756 _LT_PROG_REPLACE_SHELLFNS
757
758 mv -f "$cfgfile" "$ofile" ||
759 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
760 chmod +x "$ofile"
761 ],
762 [cat <<_LT_EOF >> "$ofile"
763
764 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
765 dnl in a comment (ie after a #).
766 # ### BEGIN LIBTOOL TAG CONFIG: $1
767 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
768 # ### END LIBTOOL TAG CONFIG: $1
769 _LT_EOF
770 ])dnl /m4_if
771 ],
772 [m4_if([$1], [], [
773 PACKAGE='$PACKAGE'
774 VERSION='$VERSION'
775 TIMESTAMP='$TIMESTAMP'
776 RM='$RM'
777 ofile='$ofile'], [])
778 ])dnl /_LT_CONFIG_SAVE_COMMANDS
779 ])# _LT_CONFIG
780
781
782 # LT_SUPPORTED_TAG(TAG)
783 # ---------------------
784 # Trace this macro to discover what tags are supported by the libtool
785 # --tag option, using:
786 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
787 AC_DEFUN([LT_SUPPORTED_TAG], [])
788
789
790 # C support is built-in for now
791 m4_define([_LT_LANG_C_enabled], [])
792 m4_define([_LT_TAGS], [])
793
794
795 # LT_LANG(LANG)
796 # -------------
797 # Enable libtool support for the given language if not already enabled.
798 AC_DEFUN([LT_LANG],
799 [AC_BEFORE([$0], [LT_OUTPUT])dnl
800 m4_case([$1],
801 [C], [_LT_LANG(C)],
802 [C++], [_LT_LANG(CXX)],
803 [Java], [_LT_LANG(GCJ)],
804 [Fortran 77], [_LT_LANG(F77)],
805 [Fortran], [_LT_LANG(FC)],
806 [Windows Resource], [_LT_LANG(RC)],
807 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
808 [_LT_LANG($1)],
809 [m4_fatal([$0: unsupported language: "$1"])])])dnl
810 ])# LT_LANG
811
812
813 # _LT_LANG(LANGNAME)
814 # ------------------
815 m4_defun([_LT_LANG],
816 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
817 [LT_SUPPORTED_TAG([$1])dnl
818 m4_append([_LT_TAGS], [$1 ])dnl
819 m4_define([_LT_LANG_]$1[_enabled], [])dnl
820 _LT_LANG_$1_CONFIG($1)])dnl
821 ])# _LT_LANG
822
823
824 # _LT_LANG_DEFAULT_CONFIG
825 # -----------------------
826 m4_defun([_LT_LANG_DEFAULT_CONFIG],
827 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
828 [LT_LANG(CXX)],
829 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
830
831 AC_PROVIDE_IFELSE([AC_PROG_F77],
832 [LT_LANG(F77)],
833 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
834
835 AC_PROVIDE_IFELSE([AC_PROG_FC],
836 [LT_LANG(FC)],
837 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
838
839 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
840 dnl pulling things in needlessly.
841 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
842 [LT_LANG(GCJ)],
843 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
844 [LT_LANG(GCJ)],
845 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
846 [LT_LANG(GCJ)],
847 [m4_ifdef([AC_PROG_GCJ],
848 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
849 m4_ifdef([A][M_PROG_GCJ],
850 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
851 m4_ifdef([LT_PROG_GCJ],
852 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
853
854 AC_PROVIDE_IFELSE([LT_PROG_RC],
855 [LT_LANG(RC)],
856 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
857 ])# _LT_LANG_DEFAULT_CONFIG
858
859 # Obsolete macros:
860 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
861 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
862 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
863 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
864 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
865 dnl aclocal-1.4 backwards compatibility:
866 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
867 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
868 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
869 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
870 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
871
872
873 # _LT_TAG_COMPILER
874 # ----------------
875 m4_defun([_LT_TAG_COMPILER],
876 [AC_REQUIRE([AC_PROG_CC])dnl
877
878 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
879 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
880 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
881 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
882
883 # If no C compiler was specified, use CC.
884 LTCC=${LTCC-"$CC"}
885
886 # If no C compiler flags were specified, use CFLAGS.
887 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
888
889 # Allow CC to be a program name with arguments.
890 compiler=$CC
891 ])# _LT_TAG_COMPILER
892
893
894 # _LT_COMPILER_BOILERPLATE
895 # ------------------------
896 # Check for compiler boilerplate output or warnings with
897 # the simple compiler test code.
898 m4_defun([_LT_COMPILER_BOILERPLATE],
899 [m4_require([_LT_DECL_SED])dnl
900 ac_outfile=conftest.$ac_objext
901 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
902 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
903 _lt_compiler_boilerplate=`cat conftest.err`
904 $RM conftest*
905 ])# _LT_COMPILER_BOILERPLATE
906
907
908 # _LT_LINKER_BOILERPLATE
909 # ----------------------
910 # Check for linker boilerplate output or warnings with
911 # the simple link test code.
912 m4_defun([_LT_LINKER_BOILERPLATE],
913 [m4_require([_LT_DECL_SED])dnl
914 ac_outfile=conftest.$ac_objext
915 echo "$lt_simple_link_test_code" >conftest.$ac_ext
916 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
917 _lt_linker_boilerplate=`cat conftest.err`
918 $RM -r conftest*
919 ])# _LT_LINKER_BOILERPLATE
920
921 # _LT_REQUIRED_DARWIN_CHECKS
922 # -------------------------
923 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
924 case $host_os in
925 rhapsody* | darwin*)
926 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
927 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
928 AC_CHECK_TOOL([LIPO], [lipo], [:])
929 AC_CHECK_TOOL([OTOOL], [otool], [:])
930 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
931 _LT_DECL([], [DSYMUTIL], [1],
932 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
933 _LT_DECL([], [NMEDIT], [1],
934 [Tool to change global to local symbols on Mac OS X])
935 _LT_DECL([], [LIPO], [1],
936 [Tool to manipulate fat objects and archives on Mac OS X])
937 _LT_DECL([], [OTOOL], [1],
938 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
939 _LT_DECL([], [OTOOL64], [1],
940 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
941
942 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
943 [lt_cv_apple_cc_single_mod=no
944 if test -z "${LT_MULTI_MODULE}"; then
945 # By default we will add the -single_module flag. You can override
946 # by either setting the environment variable LT_MULTI_MODULE
947 # non-empty at configure time, or by adding -multi_module to the
948 # link flags.
949 rm -rf libconftest.dylib*
950 echo "int foo(void){return 1;}" > conftest.c
951 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
952 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
953 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
954 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
955 _lt_result=$?
956 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
957 lt_cv_apple_cc_single_mod=yes
958 else
959 cat conftest.err >&AS_MESSAGE_LOG_FD
960 fi
961 rm -rf libconftest.dylib*
962 rm -f conftest.*
963 fi])
964 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
965 [lt_cv_ld_exported_symbols_list],
966 [lt_cv_ld_exported_symbols_list=no
967 save_LDFLAGS=$LDFLAGS
968 echo "_main" > conftest.sym
969 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
970 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
971 [lt_cv_ld_exported_symbols_list=yes],
972 [lt_cv_ld_exported_symbols_list=no])
973 LDFLAGS="$save_LDFLAGS"
974 ])
975 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
976 [lt_cv_ld_force_load=no
977 cat > conftest.c << _LT_EOF
978 int forced_loaded() { return 2;}
979 _LT_EOF
980 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
981 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
982 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
983 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
984 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
985 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
986 cat > conftest.c << _LT_EOF
987 int main() { return 0;}
988 _LT_EOF
989 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
990 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
991 _lt_result=$?
992 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
993 lt_cv_ld_force_load=yes
994 else
995 cat conftest.err >&AS_MESSAGE_LOG_FD
996 fi
997 rm -f conftest.err libconftest.a conftest conftest.c
998 rm -rf conftest.dSYM
999 ])
1000 case $host_os in
1001 rhapsody* | darwin1.[[012]])
1002 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1003 darwin1.*)
1004 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1005 darwin*) # darwin 5.x on
1006 # if running on 10.5 or later, the deployment target defaults
1007 # to the OS version, if on x86, and 10.4, the deployment
1008 # target defaults to 10.4. Don't you love it?
1009 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1010 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1011 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1012 10.[[012]]*)
1013 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1014 10.*)
1015 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1016 esac
1017 ;;
1018 esac
1019 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1020 _lt_dar_single_mod='$single_module'
1021 fi
1022 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1023 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1024 else
1025 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1026 fi
1027 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1028 _lt_dsymutil='~$DSYMUTIL $lib || :'
1029 else
1030 _lt_dsymutil=
1031 fi
1032 ;;
1033 esac
1034 ])
1035
1036
1037 # _LT_DARWIN_LINKER_FEATURES
1038 # --------------------------
1039 # Checks for linker and compiler features on darwin
1040 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1041 [
1042 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1043 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1044 _LT_TAGVAR(hardcode_direct, $1)=no
1045 _LT_TAGVAR(hardcode_automatic, $1)=yes
1046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1047 if test "$lt_cv_ld_force_load" = "yes"; then
1048 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1049 else
1050 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1051 fi
1052 _LT_TAGVAR(link_all_deplibs, $1)=yes
1053 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1054 case $cc_basename in
1055 ifort*) _lt_dar_can_shared=yes ;;
1056 *) _lt_dar_can_shared=$GCC ;;
1057 esac
1058 if test "$_lt_dar_can_shared" = "yes"; then
1059 output_verbose_link_cmd=func_echo_all
1060 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1061 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1062 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1063 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1064 m4_if([$1], [CXX],
1065 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1066 _LT_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${_lt_dsymutil}"
1067 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
1068 fi
1069 ],[])
1070 else
1071 _LT_TAGVAR(ld_shlibs, $1)=no
1072 fi
1073 ])
1074
1075 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1076 # ----------------------------------
1077 # Links a minimal program and checks the executable
1078 # for the system default hardcoded library path. In most cases,
1079 # this is /usr/lib:/lib, but when the MPI compilers are used
1080 # the location of the communication and MPI libs are included too.
1081 # If we don't find anything, use the default library path according
1082 # to the aix ld manual.
1083 # Store the results from the different compilers for each TAGNAME.
1084 # Allow to override them for all tags through lt_cv_aix_libpath.
1085 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1086 [m4_require([_LT_DECL_SED])dnl
1087 if test "${lt_cv_aix_libpath+set}" = set; then
1088 aix_libpath=$lt_cv_aix_libpath
1089 else
1090 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1091 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1092 lt_aix_libpath_sed='[
1093 /Import File Strings/,/^$/ {
1094 /^0/ {
1095 s/^0 *\([^ ]*\) *$/\1/
1096 p
1097 }
1098 }]'
1099 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1100 # Check for a 64-bit object if we didn't find anything.
1101 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1102 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1103 fi],[])
1104 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1105 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1106 fi
1107 ])
1108 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1109 fi
1110 ])# _LT_SYS_MODULE_PATH_AIX
1111
1112
1113 # _LT_SHELL_INIT(ARG)
1114 # -------------------
1115 m4_define([_LT_SHELL_INIT],
1116 [m4_divert_text([M4SH-INIT], [$1
1117 ])])# _LT_SHELL_INIT
1118
1119
1120
1121 # _LT_PROG_ECHO_BACKSLASH
1122 # -----------------------
1123 # Find how we can fake an echo command that does not interpret backslash.
1124 # In particular, with Autoconf 2.60 or later we add some code to the start
1125 # of the generated configure script which will find a shell with a builtin
1126 # printf (which we can use as an echo command).
1127 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1128 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1129 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1130 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1131
1132 AC_MSG_CHECKING([how to print strings])
1133 # Test print first, because it will be a builtin if present.
1134 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1135 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1136 ECHO='print -r --'
1137 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1138 ECHO='printf %s\n'
1139 else
1140 # Use this function as a fallback that always works.
1141 func_fallback_echo ()
1142 {
1143 eval 'cat <<_LTECHO_EOF
1144 $[]1
1145 _LTECHO_EOF'
1146 }
1147 ECHO='func_fallback_echo'
1148 fi
1149
1150 # func_echo_all arg...
1151 # Invoke $ECHO with all args, space-separated.
1152 func_echo_all ()
1153 {
1154 $ECHO "$*"
1155 }
1156
1157 case "$ECHO" in
1158 printf*) AC_MSG_RESULT([printf]) ;;
1159 print*) AC_MSG_RESULT([print -r]) ;;
1160 *) AC_MSG_RESULT([cat]) ;;
1161 esac
1162
1163 m4_ifdef([_AS_DETECT_SUGGESTED],
1164 [_AS_DETECT_SUGGESTED([
1165 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1166 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1167 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1168 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1169 PATH=/empty FPATH=/empty; export PATH FPATH
1170 test "X`printf %s $ECHO`" = "X$ECHO" \
1171 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1172
1173 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1174 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1175 ])# _LT_PROG_ECHO_BACKSLASH
1176
1177
1178 # _LT_WITH_SYSROOT
1179 # ----------------
1180 AC_DEFUN([_LT_WITH_SYSROOT],
1181 [AC_MSG_CHECKING([for sysroot])
1182 AC_ARG_WITH([sysroot],
1183 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1184 (or the compiler's sysroot if not specified).],
1185 [], [with_sysroot=no])
1186
1187 dnl lt_sysroot will always be passed unquoted. We quote it here
1188 dnl in case the user passed a directory name.
1189 lt_sysroot=
1190 case ${with_sysroot} in #(
1191 yes)
1192 if test "$GCC" = yes; then
1193 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1194 fi
1195 ;; #(
1196 /*)
1197 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1198 ;; #(
1199 no|'')
1200 ;; #(
1201 *)
1202 AC_MSG_RESULT([${with_sysroot}])
1203 AC_MSG_ERROR([The sysroot must be an absolute path.])
1204 ;;
1205 esac
1206
1207 AC_MSG_RESULT([${lt_sysroot:-no}])
1208 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1209 [dependent libraries, and in which our libraries should be installed.])])
1210
1211 # _LT_ENABLE_LOCK
1212 # ---------------
1213 m4_defun([_LT_ENABLE_LOCK],
1214 [AC_ARG_ENABLE([libtool-lock],
1215 [AS_HELP_STRING([--disable-libtool-lock],
1216 [avoid locking (might break parallel builds)])])
1217 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1218
1219 # Some flags need to be propagated to the compiler or linker for good
1220 # libtool support.
1221 case $host in
1222 ia64-*-hpux*)
1223 # Find out which ABI we are using.
1224 echo 'int i;' > conftest.$ac_ext
1225 if AC_TRY_EVAL(ac_compile); then
1226 case `/usr/bin/file conftest.$ac_objext` in
1227 *ELF-32*)
1228 HPUX_IA64_MODE="32"
1229 ;;
1230 *ELF-64*)
1231 HPUX_IA64_MODE="64"
1232 ;;
1233 esac
1234 fi
1235 rm -rf conftest*
1236 ;;
1237 *-*-irix6*)
1238 # Find out which ABI we are using.
1239 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 if test "$lt_cv_prog_gnu_ld" = yes; then
1242 case `/usr/bin/file conftest.$ac_objext` in
1243 *32-bit*)
1244 LD="${LD-ld} -melf32bsmip"
1245 ;;
1246 *N32*)
1247 LD="${LD-ld} -melf32bmipn32"
1248 ;;
1249 *64-bit*)
1250 LD="${LD-ld} -melf64bmip"
1251 ;;
1252 esac
1253 else
1254 case `/usr/bin/file conftest.$ac_objext` in
1255 *32-bit*)
1256 LD="${LD-ld} -32"
1257 ;;
1258 *N32*)
1259 LD="${LD-ld} -n32"
1260 ;;
1261 *64-bit*)
1262 LD="${LD-ld} -64"
1263 ;;
1264 esac
1265 fi
1266 fi
1267 rm -rf conftest*
1268 ;;
1269
1270 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1271 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1272 # Find out which ABI we are using.
1273 echo 'int i;' > conftest.$ac_ext
1274 if AC_TRY_EVAL(ac_compile); then
1275 case `/usr/bin/file conftest.o` in
1276 *32-bit*)
1277 case $host in
1278 x86_64-*kfreebsd*-gnu)
1279 LD="${LD-ld} -m elf_i386_fbsd"
1280 ;;
1281 x86_64-*linux*)
1282 LD="${LD-ld} -m elf_i386"
1283 ;;
1284 ppc64-*linux*|powerpc64-*linux*)
1285 LD="${LD-ld} -m elf32ppclinux"
1286 ;;
1287 s390x-*linux*)
1288 LD="${LD-ld} -m elf_s390"
1289 ;;
1290 sparc64-*linux*)
1291 LD="${LD-ld} -m elf32_sparc"
1292 ;;
1293 esac
1294 ;;
1295 *64-bit*)
1296 case $host in
1297 x86_64-*kfreebsd*-gnu)
1298 LD="${LD-ld} -m elf_x86_64_fbsd"
1299 ;;
1300 x86_64-*linux*)
1301 LD="${LD-ld} -m elf_x86_64"
1302 ;;
1303 ppc*-*linux*|powerpc*-*linux*)
1304 LD="${LD-ld} -m elf64ppc"
1305 ;;
1306 s390*-*linux*|s390*-*tpf*)
1307 LD="${LD-ld} -m elf64_s390"
1308 ;;
1309 sparc*-*linux*)
1310 LD="${LD-ld} -m elf64_sparc"
1311 ;;
1312 esac
1313 ;;
1314 esac
1315 fi
1316 rm -rf conftest*
1317 ;;
1318
1319 *-*-sco3.2v5*)
1320 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1321 SAVE_CFLAGS="$CFLAGS"
1322 CFLAGS="$CFLAGS -belf"
1323 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1324 [AC_LANG_PUSH(C)
1325 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1326 AC_LANG_POP])
1327 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1328 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1329 CFLAGS="$SAVE_CFLAGS"
1330 fi
1331 ;;
1332 sparc*-*solaris*)
1333 # Find out which ABI we are using.
1334 echo 'int i;' > conftest.$ac_ext
1335 if AC_TRY_EVAL(ac_compile); then
1336 case `/usr/bin/file conftest.o` in
1337 *64-bit*)
1338 case $lt_cv_prog_gnu_ld in
1339 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1340 *)
1341 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1342 LD="${LD-ld} -64"
1343 fi
1344 ;;
1345 esac
1346 ;;
1347 esac
1348 fi
1349 rm -rf conftest*
1350 ;;
1351 esac
1352
1353 need_locks="$enable_libtool_lock"
1354 ])# _LT_ENABLE_LOCK
1355
1356
1357 # _LT_PROG_AR
1358 # -----------
1359 m4_defun([_LT_PROG_AR],
1360 [AC_CHECK_TOOLS(AR, [ar], false)
1361 : ${AR=ar}
1362 : ${AR_FLAGS=cru}
1363 _LT_DECL([], [AR], [1], [The archiver])
1364 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1365
1366 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1367 [lt_cv_ar_at_file=no
1368 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1369 [echo conftest.$ac_objext > conftest.lst
1370 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1371 AC_TRY_EVAL([lt_ar_try])
1372 if test "$ac_status" -eq 0; then
1373 # Ensure the archiver fails upon bogus file names.
1374 rm -f conftest.$ac_objext libconftest.a
1375 AC_TRY_EVAL([lt_ar_try])
1376 if test "$ac_status" -ne 0; then
1377 lt_cv_ar_at_file=@
1378 fi
1379 fi
1380 rm -f conftest.* libconftest.a
1381 ])
1382 ])
1383
1384 if test "x$lt_cv_ar_at_file" = xno; then
1385 archiver_list_spec=
1386 else
1387 archiver_list_spec=$lt_cv_ar_at_file
1388 fi
1389 _LT_DECL([], [archiver_list_spec], [1],
1390 [How to feed a file listing to the archiver])
1391 ])# _LT_PROG_AR
1392
1393
1394 # _LT_CMD_OLD_ARCHIVE
1395 # -------------------
1396 m4_defun([_LT_CMD_OLD_ARCHIVE],
1397 [_LT_PROG_AR
1398
1399 AC_CHECK_TOOL(STRIP, strip, :)
1400 test -z "$STRIP" && STRIP=:
1401 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1402
1403 AC_CHECK_TOOL(RANLIB, ranlib, :)
1404 test -z "$RANLIB" && RANLIB=:
1405 _LT_DECL([], [RANLIB], [1],
1406 [Commands used to install an old-style archive])
1407
1408 # Determine commands to create old-style static archives.
1409 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1410 old_postinstall_cmds='chmod 644 $oldlib'
1411 old_postuninstall_cmds=
1412
1413 if test -n "$RANLIB"; then
1414 case $host_os in
1415 openbsd*)
1416 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1417 ;;
1418 *)
1419 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1420 ;;
1421 esac
1422 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1423 fi
1424
1425 case $host_os in
1426 darwin*)
1427 lock_old_archive_extraction=yes ;;
1428 *)
1429 lock_old_archive_extraction=no ;;
1430 esac
1431 _LT_DECL([], [old_postinstall_cmds], [2])
1432 _LT_DECL([], [old_postuninstall_cmds], [2])
1433 _LT_TAGDECL([], [old_archive_cmds], [2],
1434 [Commands used to build an old-style archive])
1435 _LT_DECL([], [lock_old_archive_extraction], [0],
1436 [Whether to use a lock for old archive extraction])
1437 ])# _LT_CMD_OLD_ARCHIVE
1438
1439
1440 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1441 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1442 # ----------------------------------------------------------------
1443 # Check whether the given compiler option works
1444 AC_DEFUN([_LT_COMPILER_OPTION],
1445 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1446 m4_require([_LT_DECL_SED])dnl
1447 AC_CACHE_CHECK([$1], [$2],
1448 [$2=no
1449 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1450 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1451 lt_compiler_flag="$3"
1452 # Insert the option either (1) after the last *FLAGS variable, or
1453 # (2) before a word containing "conftest.", or (3) at the end.
1454 # Note that $ac_compile itself does not contain backslashes and begins
1455 # with a dollar sign (not a hyphen), so the echo should work correctly.
1456 # The option is referenced via a variable to avoid confusing sed.
1457 lt_compile=`echo "$ac_compile" | $SED \
1458 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1459 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1460 -e 's:$: $lt_compiler_flag:'`
1461 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1462 (eval "$lt_compile" 2>conftest.err)
1463 ac_status=$?
1464 cat conftest.err >&AS_MESSAGE_LOG_FD
1465 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1466 if (exit $ac_status) && test -s "$ac_outfile"; then
1467 # The compiler can only warn and ignore the option if not recognized
1468 # So say no if there are warnings other than the usual output.
1469 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1470 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1471 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1472 $2=yes
1473 fi
1474 fi
1475 $RM conftest*
1476 ])
1477
1478 if test x"[$]$2" = xyes; then
1479 m4_if([$5], , :, [$5])
1480 else
1481 m4_if([$6], , :, [$6])
1482 fi
1483 ])# _LT_COMPILER_OPTION
1484
1485 # Old name:
1486 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1487 dnl aclocal-1.4 backwards compatibility:
1488 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1489
1490
1491 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1492 # [ACTION-SUCCESS], [ACTION-FAILURE])
1493 # ----------------------------------------------------
1494 # Check whether the given linker option works
1495 AC_DEFUN([_LT_LINKER_OPTION],
1496 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1497 m4_require([_LT_DECL_SED])dnl
1498 AC_CACHE_CHECK([$1], [$2],
1499 [$2=no
1500 save_LDFLAGS="$LDFLAGS"
1501 LDFLAGS="$LDFLAGS $3"
1502 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1503 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1504 # The linker can only warn and ignore the option if not recognized
1505 # So say no if there are warnings
1506 if test -s conftest.err; then
1507 # Append any errors to the config.log.
1508 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1509 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1510 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1511 if diff conftest.exp conftest.er2 >/dev/null; then
1512 $2=yes
1513 fi
1514 else
1515 $2=yes
1516 fi
1517 fi
1518 $RM -r conftest*
1519 LDFLAGS="$save_LDFLAGS"
1520 ])
1521
1522 if test x"[$]$2" = xyes; then
1523 m4_if([$4], , :, [$4])
1524 else
1525 m4_if([$5], , :, [$5])
1526 fi
1527 ])# _LT_LINKER_OPTION
1528
1529 # Old name:
1530 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1531 dnl aclocal-1.4 backwards compatibility:
1532 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1533
1534
1535 # LT_CMD_MAX_LEN
1536 #---------------
1537 AC_DEFUN([LT_CMD_MAX_LEN],
1538 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1539 # find the maximum length of command line arguments
1540 AC_MSG_CHECKING([the maximum length of command line arguments])
1541 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1542 i=0
1543 teststring="ABCD"
1544
1545 case $build_os in
1546 msdosdjgpp*)
1547 # On DJGPP, this test can blow up pretty badly due to problems in libc
1548 # (any single argument exceeding 2000 bytes causes a buffer overrun
1549 # during glob expansion). Even if it were fixed, the result of this
1550 # check would be larger than it should be.
1551 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1552 ;;
1553
1554 gnu*)
1555 # Under GNU Hurd, this test is not required because there is
1556 # no limit to the length of command line arguments.
1557 # Libtool will interpret -1 as no limit whatsoever
1558 lt_cv_sys_max_cmd_len=-1;
1559 ;;
1560
1561 cygwin* | mingw* | cegcc*)
1562 # On Win9x/ME, this test blows up -- it succeeds, but takes
1563 # about 5 minutes as the teststring grows exponentially.
1564 # Worse, since 9x/ME are not pre-emptively multitasking,
1565 # you end up with a "frozen" computer, even though with patience
1566 # the test eventually succeeds (with a max line length of 256k).
1567 # Instead, let's just punt: use the minimum linelength reported by
1568 # all of the supported platforms: 8192 (on NT/2K/XP).
1569 lt_cv_sys_max_cmd_len=8192;
1570 ;;
1571
1572 mint*)
1573 # On MiNT this can take a long time and run out of memory.
1574 lt_cv_sys_max_cmd_len=8192;
1575 ;;
1576
1577 amigaos*)
1578 # On AmigaOS with pdksh, this test takes hours, literally.
1579 # So we just punt and use a minimum line length of 8192.
1580 lt_cv_sys_max_cmd_len=8192;
1581 ;;
1582
1583 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1584 # This has been around since 386BSD, at least. Likely further.
1585 if test -x /sbin/sysctl; then
1586 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1587 elif test -x /usr/sbin/sysctl; then
1588 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1589 else
1590 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1591 fi
1592 # And add a safety zone
1593 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1594 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1595 ;;
1596
1597 interix*)
1598 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1599 lt_cv_sys_max_cmd_len=196608
1600 ;;
1601
1602 osf*)
1603 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1604 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1605 # nice to cause kernel panics so lets avoid the loop below.
1606 # First set a reasonable default.
1607 lt_cv_sys_max_cmd_len=16384
1608 #
1609 if test -x /sbin/sysconfig; then
1610 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1611 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1612 esac
1613 fi
1614 ;;
1615 sco3.2v5*)
1616 lt_cv_sys_max_cmd_len=102400
1617 ;;
1618 sysv5* | sco5v6* | sysv4.2uw2*)
1619 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1620 if test -n "$kargmax"; then
1621 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1622 else
1623 lt_cv_sys_max_cmd_len=32768
1624 fi
1625 ;;
1626 *)
1627 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1628 if test -n "$lt_cv_sys_max_cmd_len"; then
1629 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1630 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1631 else
1632 # Make teststring a little bigger before we do anything with it.
1633 # a 1K string should be a reasonable start.
1634 for i in 1 2 3 4 5 6 7 8 ; do
1635 teststring=$teststring$teststring
1636 done
1637 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1638 # If test is not a shell built-in, we'll probably end up computing a
1639 # maximum length that is only half of the actual maximum length, but
1640 # we can't tell.
1641 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1642 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1643 test $i != 17 # 1/2 MB should be enough
1644 do
1645 i=`expr $i + 1`
1646 teststring=$teststring$teststring
1647 done
1648 # Only check the string length outside the loop.
1649 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1650 teststring=
1651 # Add a significant safety factor because C++ compilers can tack on
1652 # massive amounts of additional arguments before passing them to the
1653 # linker. It appears as though 1/2 is a usable value.
1654 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1655 fi
1656 ;;
1657 esac
1658 ])
1659 if test -n $lt_cv_sys_max_cmd_len ; then
1660 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1661 else
1662 AC_MSG_RESULT(none)
1663 fi
1664 max_cmd_len=$lt_cv_sys_max_cmd_len
1665 _LT_DECL([], [max_cmd_len], [0],
1666 [What is the maximum length of a command?])
1667 ])# LT_CMD_MAX_LEN
1668
1669 # Old name:
1670 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1671 dnl aclocal-1.4 backwards compatibility:
1672 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1673
1674
1675 # _LT_HEADER_DLFCN
1676 # ----------------
1677 m4_defun([_LT_HEADER_DLFCN],
1678 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1679 ])# _LT_HEADER_DLFCN
1680
1681
1682 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1683 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1684 # ----------------------------------------------------------------
1685 m4_defun([_LT_TRY_DLOPEN_SELF],
1686 [m4_require([_LT_HEADER_DLFCN])dnl
1687 if test "$cross_compiling" = yes; then :
1688 [$4]
1689 else
1690 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1691 lt_status=$lt_dlunknown
1692 cat > conftest.$ac_ext <<_LT_EOF
1693 [#line $LINENO "configure"
1694 #include "confdefs.h"
1695
1696 #if HAVE_DLFCN_H
1697 #include <dlfcn.h>
1698 #endif
1699
1700 #include <stdio.h>
1701
1702 #ifdef RTLD_GLOBAL
1703 # define LT_DLGLOBAL RTLD_GLOBAL
1704 #else
1705 # ifdef DL_GLOBAL
1706 # define LT_DLGLOBAL DL_GLOBAL
1707 # else
1708 # define LT_DLGLOBAL 0
1709 # endif
1710 #endif
1711
1712 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1713 find out it does not work in some platform. */
1714 #ifndef LT_DLLAZY_OR_NOW
1715 # ifdef RTLD_LAZY
1716 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1717 # else
1718 # ifdef DL_LAZY
1719 # define LT_DLLAZY_OR_NOW DL_LAZY
1720 # else
1721 # ifdef RTLD_NOW
1722 # define LT_DLLAZY_OR_NOW RTLD_NOW
1723 # else
1724 # ifdef DL_NOW
1725 # define LT_DLLAZY_OR_NOW DL_NOW
1726 # else
1727 # define LT_DLLAZY_OR_NOW 0
1728 # endif
1729 # endif
1730 # endif
1731 # endif
1732 #endif
1733
1734 /* When -fvisbility=hidden is used, assume the code has been annotated
1735 correspondingly for the symbols needed. */
1736 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1737 int fnord () __attribute__((visibility("default")));
1738 #endif
1739
1740 int fnord () { return 42; }
1741 int main ()
1742 {
1743 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1744 int status = $lt_dlunknown;
1745
1746 if (self)
1747 {
1748 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1749 else
1750 {
1751 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1752 else puts (dlerror ());
1753 }
1754 /* dlclose (self); */
1755 }
1756 else
1757 puts (dlerror ());
1758
1759 return status;
1760 }]
1761 _LT_EOF
1762 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1763 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1764 lt_status=$?
1765 case x$lt_status in
1766 x$lt_dlno_uscore) $1 ;;
1767 x$lt_dlneed_uscore) $2 ;;
1768 x$lt_dlunknown|x*) $3 ;;
1769 esac
1770 else :
1771 # compilation failed
1772 $3
1773 fi
1774 fi
1775 rm -fr conftest*
1776 ])# _LT_TRY_DLOPEN_SELF
1777
1778
1779 # LT_SYS_DLOPEN_SELF
1780 # ------------------
1781 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1782 [m4_require([_LT_HEADER_DLFCN])dnl
1783 if test "x$enable_dlopen" != xyes; then
1784 enable_dlopen=unknown
1785 enable_dlopen_self=unknown
1786 enable_dlopen_self_static=unknown
1787 else
1788 lt_cv_dlopen=no
1789 lt_cv_dlopen_libs=
1790
1791 case $host_os in
1792 beos*)
1793 lt_cv_dlopen="load_add_on"
1794 lt_cv_dlopen_libs=
1795 lt_cv_dlopen_self=yes
1796 ;;
1797
1798 mingw* | pw32* | cegcc*)
1799 lt_cv_dlopen="LoadLibrary"
1800 lt_cv_dlopen_libs=
1801 ;;
1802
1803 cygwin*)
1804 lt_cv_dlopen="dlopen"
1805 lt_cv_dlopen_libs=
1806 ;;
1807
1808 darwin*)
1809 # if libdl is installed we need to link against it
1810 AC_CHECK_LIB([dl], [dlopen],
1811 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1812 lt_cv_dlopen="dyld"
1813 lt_cv_dlopen_libs=
1814 lt_cv_dlopen_self=yes
1815 ])
1816 ;;
1817
1818 *)
1819 AC_CHECK_FUNC([shl_load],
1820 [lt_cv_dlopen="shl_load"],
1821 [AC_CHECK_LIB([dld], [shl_load],
1822 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1823 [AC_CHECK_FUNC([dlopen],
1824 [lt_cv_dlopen="dlopen"],
1825 [AC_CHECK_LIB([dl], [dlopen],
1826 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1827 [AC_CHECK_LIB([svld], [dlopen],
1828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1829 [AC_CHECK_LIB([dld], [dld_link],
1830 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1831 ])
1832 ])
1833 ])
1834 ])
1835 ])
1836 ;;
1837 esac
1838
1839 if test "x$lt_cv_dlopen" != xno; then
1840 enable_dlopen=yes
1841 else
1842 enable_dlopen=no
1843 fi
1844
1845 case $lt_cv_dlopen in
1846 dlopen)
1847 save_CPPFLAGS="$CPPFLAGS"
1848 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1849
1850 save_LDFLAGS="$LDFLAGS"
1851 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1852
1853 save_LIBS="$LIBS"
1854 LIBS="$lt_cv_dlopen_libs $LIBS"
1855
1856 AC_CACHE_CHECK([whether a program can dlopen itself],
1857 lt_cv_dlopen_self, [dnl
1858 _LT_TRY_DLOPEN_SELF(
1859 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1860 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1861 ])
1862
1863 if test "x$lt_cv_dlopen_self" = xyes; then
1864 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1865 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1866 lt_cv_dlopen_self_static, [dnl
1867 _LT_TRY_DLOPEN_SELF(
1868 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1869 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1870 ])
1871 fi
1872
1873 CPPFLAGS="$save_CPPFLAGS"
1874 LDFLAGS="$save_LDFLAGS"
1875 LIBS="$save_LIBS"
1876 ;;
1877 esac
1878
1879 case $lt_cv_dlopen_self in
1880 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1881 *) enable_dlopen_self=unknown ;;
1882 esac
1883
1884 case $lt_cv_dlopen_self_static in
1885 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1886 *) enable_dlopen_self_static=unknown ;;
1887 esac
1888 fi
1889 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1890 [Whether dlopen is supported])
1891 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1892 [Whether dlopen of programs is supported])
1893 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1894 [Whether dlopen of statically linked programs is supported])
1895 ])# LT_SYS_DLOPEN_SELF
1896
1897 # Old name:
1898 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1899 dnl aclocal-1.4 backwards compatibility:
1900 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1901
1902
1903 # _LT_COMPILER_C_O([TAGNAME])
1904 # ---------------------------
1905 # Check to see if options -c and -o are simultaneously supported by compiler.
1906 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1907 m4_defun([_LT_COMPILER_C_O],
1908 [m4_require([_LT_DECL_SED])dnl
1909 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1910 m4_require([_LT_TAG_COMPILER])dnl
1911 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1912 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1913 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1914 $RM -r conftest 2>/dev/null
1915 mkdir conftest
1916 cd conftest
1917 mkdir out
1918 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1919
1920 lt_compiler_flag="-o out/conftest2.$ac_objext"
1921 # Insert the option either (1) after the last *FLAGS variable, or
1922 # (2) before a word containing "conftest.", or (3) at the end.
1923 # Note that $ac_compile itself does not contain backslashes and begins
1924 # with a dollar sign (not a hyphen), so the echo should work correctly.
1925 lt_compile=`echo "$ac_compile" | $SED \
1926 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1927 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1928 -e 's:$: $lt_compiler_flag:'`
1929 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1930 (eval "$lt_compile" 2>out/conftest.err)
1931 ac_status=$?
1932 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1933 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1934 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1935 then
1936 # The compiler can only warn and ignore the option if not recognized
1937 # So say no if there are warnings
1938 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1939 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1940 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1941 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1942 fi
1943 fi
1944 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1945 $RM conftest*
1946 # SGI C++ compiler will create directory out/ii_files/ for
1947 # template instantiation
1948 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1949 $RM out/* && rmdir out
1950 cd ..
1951 $RM -r conftest
1952 $RM conftest*
1953 ])
1954 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1955 [Does compiler simultaneously support -c and -o options?])
1956 ])# _LT_COMPILER_C_O
1957
1958
1959 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1960 # ----------------------------------
1961 # Check to see if we can do hard links to lock some files if needed
1962 m4_defun([_LT_COMPILER_FILE_LOCKS],
1963 [m4_require([_LT_ENABLE_LOCK])dnl
1964 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1965 _LT_COMPILER_C_O([$1])
1966
1967 hard_links="nottested"
1968 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1969 # do not overwrite the value of need_locks provided by the user
1970 AC_MSG_CHECKING([if we can lock with hard links])
1971 hard_links=yes
1972 $RM conftest*
1973 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1974 touch conftest.a
1975 ln conftest.a conftest.b 2>&5 || hard_links=no
1976 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1977 AC_MSG_RESULT([$hard_links])
1978 if test "$hard_links" = no; then
1979 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1980 need_locks=warn
1981 fi
1982 else
1983 need_locks=no
1984 fi
1985 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1986 ])# _LT_COMPILER_FILE_LOCKS
1987
1988
1989 # _LT_CHECK_OBJDIR
1990 # ----------------
1991 m4_defun([_LT_CHECK_OBJDIR],
1992 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1993 [rm -f .libs 2>/dev/null
1994 mkdir .libs 2>/dev/null
1995 if test -d .libs; then
1996 lt_cv_objdir=.libs
1997 else
1998 # MS-DOS does not allow filenames that begin with a dot.
1999 lt_cv_objdir=_libs
2000 fi
2001 rmdir .libs 2>/dev/null])
2002 objdir=$lt_cv_objdir
2003 _LT_DECL([], [objdir], [0],
2004 [The name of the directory that contains temporary libtool files])dnl
2005 m4_pattern_allow([LT_OBJDIR])dnl
2006 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2007 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2008 ])# _LT_CHECK_OBJDIR
2009
2010
2011 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2012 # --------------------------------------
2013 # Check hardcoding attributes.
2014 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2015 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2016 _LT_TAGVAR(hardcode_action, $1)=
2017 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2018 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2019 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2020
2021 # We can hardcode non-existent directories.
2022 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2023 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2024 # have to relink, otherwise we might link with an installed library
2025 # when we should be linking with a yet-to-be-installed one
2026 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2027 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2028 # Linking always hardcodes the temporary library directory.
2029 _LT_TAGVAR(hardcode_action, $1)=relink
2030 else
2031 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2032 _LT_TAGVAR(hardcode_action, $1)=immediate
2033 fi
2034 else
2035 # We cannot hardcode anything, or else we can only hardcode existing
2036 # directories.
2037 _LT_TAGVAR(hardcode_action, $1)=unsupported
2038 fi
2039 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2040
2041 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2042 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2043 # Fast installation is not supported
2044 enable_fast_install=no
2045 elif test "$shlibpath_overrides_runpath" = yes ||
2046 test "$enable_shared" = no; then
2047 # Fast installation is not necessary
2048 enable_fast_install=needless
2049 fi
2050 _LT_TAGDECL([], [hardcode_action], [0],
2051 [How to hardcode a shared library path into an executable])
2052 ])# _LT_LINKER_HARDCODE_LIBPATH
2053
2054
2055 # _LT_CMD_STRIPLIB
2056 # ----------------
2057 m4_defun([_LT_CMD_STRIPLIB],
2058 [m4_require([_LT_DECL_EGREP])
2059 striplib=
2060 old_striplib=
2061 AC_MSG_CHECKING([whether stripping libraries is possible])
2062 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2063 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2064 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2065 AC_MSG_RESULT([yes])
2066 else
2067 # FIXME - insert some real tests, host_os isn't really good enough
2068 case $host_os in
2069 darwin*)
2070 if test -n "$STRIP" ; then
2071 striplib="$STRIP -x"
2072 old_striplib="$STRIP -S"
2073 AC_MSG_RESULT([yes])
2074 else
2075 AC_MSG_RESULT([no])
2076 fi
2077 ;;
2078 *)
2079 AC_MSG_RESULT([no])
2080 ;;
2081 esac
2082 fi
2083 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2084 _LT_DECL([], [striplib], [1])
2085 ])# _LT_CMD_STRIPLIB
2086
2087
2088 # _LT_SYS_DYNAMIC_LINKER([TAG])
2089 # -----------------------------
2090 # PORTME Fill in your ld.so characteristics
2091 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2092 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2093 m4_require([_LT_DECL_EGREP])dnl
2094 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2095 m4_require([_LT_DECL_OBJDUMP])dnl
2096 m4_require([_LT_DECL_SED])dnl
2097 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2098 AC_MSG_CHECKING([dynamic linker characteristics])
2099 m4_if([$1],
2100 [], [
2101 if test "$GCC" = yes; then
2102 case $host_os in
2103 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2104 *) lt_awk_arg="/^libraries:/" ;;
2105 esac
2106 case $host_os in
2107 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2108 *) lt_sed_strip_eq="s,=/,/,g" ;;
2109 esac
2110 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2111 case $lt_search_path_spec in
2112 *\;*)
2113 # if the path contains ";" then we assume it to be the separator
2114 # otherwise default to the standard path separator (i.e. ":") - it is
2115 # assumed that no part of a normal pathname contains ";" but that should
2116 # okay in the real world where ";" in dirpaths is itself problematic.
2117 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2118 ;;
2119 *)
2120 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2121 ;;
2122 esac
2123 # Ok, now we have the path, separated by spaces, we can step through it
2124 # and add multilib dir if necessary.
2125 lt_tmp_lt_search_path_spec=
2126 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2127 for lt_sys_path in $lt_search_path_spec; do
2128 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2129 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2130 else
2131 test -d "$lt_sys_path" && \
2132 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2133 fi
2134 done
2135 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2136 BEGIN {RS=" "; FS="/|\n";} {
2137 lt_foo="";
2138 lt_count=0;
2139 for (lt_i = NF; lt_i > 0; lt_i--) {
2140 if ($lt_i != "" && $lt_i != ".") {
2141 if ($lt_i == "..") {
2142 lt_count++;
2143 } else {
2144 if (lt_count == 0) {
2145 lt_foo="/" $lt_i lt_foo;
2146 } else {
2147 lt_count--;
2148 }
2149 }
2150 }
2151 }
2152 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2153 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2154 }'`
2155 # AWK program above erroneously prepends '/' to C:/dos/paths
2156 # for these hosts.
2157 case $host_os in
2158 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2159 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2160 esac
2161 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2162 else
2163 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2164 fi])
2165 library_names_spec=
2166 libname_spec='lib$name'
2167 soname_spec=
2168 shrext_cmds=".so"
2169 postinstall_cmds=
2170 postuninstall_cmds=
2171 finish_cmds=
2172 finish_eval=
2173 shlibpath_var=
2174 shlibpath_overrides_runpath=unknown
2175 version_type=none
2176 dynamic_linker="$host_os ld.so"
2177 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2178 need_lib_prefix=unknown
2179 hardcode_into_libs=no
2180
2181 # when you set need_version to no, make sure it does not cause -set_version
2182 # flags to be left without arguments
2183 need_version=unknown
2184
2185 case $host_os in
2186 aix3*)
2187 version_type=linux
2188 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2189 shlibpath_var=LIBPATH
2190
2191 # AIX 3 has no versioning support, so we append a major version to the name.
2192 soname_spec='${libname}${release}${shared_ext}$major'
2193 ;;
2194
2195 aix[[4-9]]*)
2196 version_type=linux
2197 need_lib_prefix=no
2198 need_version=no
2199 hardcode_into_libs=yes
2200 if test "$host_cpu" = ia64; then
2201 # AIX 5 supports IA64
2202 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2203 shlibpath_var=LD_LIBRARY_PATH
2204 else
2205 # With GCC up to 2.95.x, collect2 would create an import file
2206 # for dependence libraries. The import file would start with
2207 # the line `#! .'. This would cause the generated library to
2208 # depend on `.', always an invalid library. This was fixed in
2209 # development snapshots of GCC prior to 3.0.
2210 case $host_os in
2211 aix4 | aix4.[[01]] | aix4.[[01]].*)
2212 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2213 echo ' yes '
2214 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2215 :
2216 else
2217 can_build_shared=no
2218 fi
2219 ;;
2220 esac
2221 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2222 # soname into executable. Probably we can add versioning support to
2223 # collect2, so additional links can be useful in future.
2224 if test "$aix_use_runtimelinking" = yes; then
2225 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2226 # instead of lib<name>.a to let people know that these are not
2227 # typical AIX shared libraries.
2228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2229 else
2230 # We preserve .a as extension for shared libraries through AIX4.2
2231 # and later when we are not doing run time linking.
2232 library_names_spec='${libname}${release}.a $libname.a'
2233 soname_spec='${libname}${release}${shared_ext}$major'
2234 fi
2235 shlibpath_var=LIBPATH
2236 fi
2237 ;;
2238
2239 amigaos*)
2240 case $host_cpu in
2241 powerpc)
2242 # Since July 2007 AmigaOS4 officially supports .so libraries.
2243 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2244 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2245 ;;
2246 m68k)
2247 library_names_spec='$libname.ixlibrary $libname.a'
2248 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2249 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
2250 ;;
2251 esac
2252 ;;
2253
2254 beos*)
2255 library_names_spec='${libname}${shared_ext}'
2256 dynamic_linker="$host_os ld.so"
2257 shlibpath_var=LIBRARY_PATH
2258 ;;
2259
2260 bsdi[[45]]*)
2261 version_type=linux
2262 need_version=no
2263 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2264 soname_spec='${libname}${release}${shared_ext}$major'
2265 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2266 shlibpath_var=LD_LIBRARY_PATH
2267 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2268 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2269 # the default ld.so.conf also contains /usr/contrib/lib and
2270 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2271 # libtool to hard-code these into programs
2272 ;;
2273
2274 cygwin* | mingw* | pw32* | cegcc*)
2275 version_type=windows
2276 shrext_cmds=".dll"
2277 need_version=no
2278 need_lib_prefix=no
2279
2280 case $GCC,$cc_basename in
2281 yes,*)
2282 # gcc
2283 library_names_spec='$libname.dll.a'
2284 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2285 postinstall_cmds='base_file=`basename \${file}`~
2286 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2287 dldir=$destdir/`dirname \$dlpath`~
2288 test -d \$dldir || mkdir -p \$dldir~
2289 $install_prog $dir/$dlname \$dldir/$dlname~
2290 chmod a+x \$dldir/$dlname~
2291 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2292 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2293 fi'
2294 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2295 dlpath=$dir/\$dldll~
2296 $RM \$dlpath'
2297 shlibpath_overrides_runpath=yes
2298
2299 case $host_os in
2300 cygwin*)
2301 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2302 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2303 m4_if([$1], [],[
2304 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2305 ;;
2306 mingw* | cegcc*)
2307 # MinGW DLLs use traditional 'lib' prefix
2308 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2309 ;;
2310 pw32*)
2311 # pw32 DLLs use 'pw' prefix rather than 'lib'
2312 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2313 ;;
2314 esac
2315 dynamic_linker='Win32 ld.exe'
2316 ;;
2317
2318 *,cl*)
2319 # Native MSVC
2320 libname_spec='$name'
2321 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2322 library_names_spec='${libname}.dll.lib'
2323
2324 case $build_os in
2325 mingw*)
2326 sys_lib_search_path_spec=
2327 lt_save_ifs=$IFS
2328 IFS=';'
2329 for lt_path in $LIB
2330 do
2331 IFS=$lt_save_ifs
2332 # Let DOS variable expansion print the short 8.3 style file name.
2333 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2334 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2335 done
2336 IFS=$lt_save_ifs
2337 # Convert to MSYS style.
2338 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2339 ;;
2340 cygwin*)
2341 # Convert to unix form, then to dos form, then back to unix form
2342 # but this time dos style (no spaces!) so that the unix form looks
2343 # like /cygdrive/c/PROGRA~1:/cygdr...
2344 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2345 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2346 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2347 ;;
2348 *)
2349 sys_lib_search_path_spec="$LIB"
2350 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2351 # It is most probably a Windows format PATH.
2352 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2353 else
2354 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2355 fi
2356 # FIXME: find the short name or the path components, as spaces are
2357 # common. (e.g. "Program Files" -> "PROGRA~1")
2358 ;;
2359 esac
2360
2361 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2362 postinstall_cmds='base_file=`basename \${file}`~
2363 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2364 dldir=$destdir/`dirname \$dlpath`~
2365 test -d \$dldir || mkdir -p \$dldir~
2366 $install_prog $dir/$dlname \$dldir/$dlname'
2367 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2368 dlpath=$dir/\$dldll~
2369 $RM \$dlpath'
2370 shlibpath_overrides_runpath=yes
2371 dynamic_linker='Win32 link.exe'
2372 ;;
2373
2374 *)
2375 # Assume MSVC wrapper
2376 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2377 dynamic_linker='Win32 ld.exe'
2378 ;;
2379 esac
2380 # FIXME: first we should search . and the directory the executable is in
2381 shlibpath_var=PATH
2382 ;;
2383
2384 darwin* | rhapsody*)
2385 dynamic_linker="$host_os dyld"
2386 version_type=darwin
2387 need_lib_prefix=no
2388 need_version=no
2389 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2390 soname_spec='${libname}${release}${major}$shared_ext'
2391 shlibpath_overrides_runpath=yes
2392 shlibpath_var=DYLD_LIBRARY_PATH
2393 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2394 m4_if([$1], [],[
2395 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2396 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2397 ;;
2398
2399 dgux*)
2400 version_type=linux
2401 need_lib_prefix=no
2402 need_version=no
2403 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2404 soname_spec='${libname}${release}${shared_ext}$major'
2405 shlibpath_var=LD_LIBRARY_PATH
2406 ;;
2407
2408 freebsd1*)
2409 dynamic_linker=no
2410 ;;
2411
2412 freebsd* | dragonfly*)
2413 # DragonFly does not have aout. When/if they implement a new
2414 # versioning mechanism, adjust this.
2415 if test -x /usr/bin/objformat; then
2416 objformat=`/usr/bin/objformat`
2417 else
2418 case $host_os in
2419 freebsd[[123]]*) objformat=aout ;;
2420 *) objformat=elf ;;
2421 esac
2422 fi
2423 version_type=freebsd-$objformat
2424 case $version_type in
2425 freebsd-elf*)
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2427 need_version=no
2428 need_lib_prefix=no
2429 ;;
2430 freebsd-*)
2431 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2432 need_version=yes
2433 ;;
2434 esac
2435 shlibpath_var=LD_LIBRARY_PATH
2436 case $host_os in
2437 freebsd2*)
2438 shlibpath_overrides_runpath=yes
2439 ;;
2440 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2441 shlibpath_overrides_runpath=yes
2442 hardcode_into_libs=yes
2443 ;;
2444 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2445 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2446 shlibpath_overrides_runpath=no
2447 hardcode_into_libs=yes
2448 ;;
2449 *) # from 4.6 on, and DragonFly
2450 shlibpath_overrides_runpath=yes
2451 hardcode_into_libs=yes
2452 ;;
2453 esac
2454 ;;
2455
2456 gnu*)
2457 version_type=linux
2458 need_lib_prefix=no
2459 need_version=no
2460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2461 soname_spec='${libname}${release}${shared_ext}$major'
2462 shlibpath_var=LD_LIBRARY_PATH
2463 hardcode_into_libs=yes
2464 ;;
2465
2466 haiku*)
2467 version_type=linux
2468 need_lib_prefix=no
2469 need_version=no
2470 dynamic_linker="$host_os runtime_loader"
2471 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2472 soname_spec='${libname}${release}${shared_ext}$major'
2473 shlibpath_var=LIBRARY_PATH
2474 shlibpath_overrides_runpath=yes
2475 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2476 hardcode_into_libs=yes
2477 ;;
2478
2479 hpux9* | hpux10* | hpux11*)
2480 # Give a soname corresponding to the major version so that dld.sl refuses to
2481 # link against other versions.
2482 version_type=sunos
2483 need_lib_prefix=no
2484 need_version=no
2485 case $host_cpu in
2486 ia64*)
2487 shrext_cmds='.so'
2488 hardcode_into_libs=yes
2489 dynamic_linker="$host_os dld.so"
2490 shlibpath_var=LD_LIBRARY_PATH
2491 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 if test "X$HPUX_IA64_MODE" = X32; then
2495 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2496 else
2497 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2498 fi
2499 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2500 ;;
2501 hppa*64*)
2502 shrext_cmds='.sl'
2503 hardcode_into_libs=yes
2504 dynamic_linker="$host_os dld.sl"
2505 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2506 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2507 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2508 soname_spec='${libname}${release}${shared_ext}$major'
2509 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2510 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2511 ;;
2512 *)
2513 shrext_cmds='.sl'
2514 dynamic_linker="$host_os dld.sl"
2515 shlibpath_var=SHLIB_PATH
2516 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2518 soname_spec='${libname}${release}${shared_ext}$major'
2519 ;;
2520 esac
2521 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2522 postinstall_cmds='chmod 555 $lib'
2523 # or fails outright, so override atomically:
2524 install_override_mode=555
2525 ;;
2526
2527 interix[[3-9]]*)
2528 version_type=linux
2529 need_lib_prefix=no
2530 need_version=no
2531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2532 soname_spec='${libname}${release}${shared_ext}$major'
2533 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2534 shlibpath_var=LD_LIBRARY_PATH
2535 shlibpath_overrides_runpath=no
2536 hardcode_into_libs=yes
2537 ;;
2538
2539 irix5* | irix6* | nonstopux*)
2540 case $host_os in
2541 nonstopux*) version_type=nonstopux ;;
2542 *)
2543 if test "$lt_cv_prog_gnu_ld" = yes; then
2544 version_type=linux
2545 else
2546 version_type=irix
2547 fi ;;
2548 esac
2549 need_lib_prefix=no
2550 need_version=no
2551 soname_spec='${libname}${release}${shared_ext}$major'
2552 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2553 case $host_os in
2554 irix5* | nonstopux*)
2555 libsuff= shlibsuff=
2556 ;;
2557 *)
2558 case $LD in # libtool.m4 will add one of these switches to LD
2559 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2560 libsuff= shlibsuff= libmagic=32-bit;;
2561 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2562 libsuff=32 shlibsuff=N32 libmagic=N32;;
2563 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2564 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2565 *) libsuff= shlibsuff= libmagic=never-match;;
2566 esac
2567 ;;
2568 esac
2569 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2570 shlibpath_overrides_runpath=no
2571 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2572 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2573 hardcode_into_libs=yes
2574 ;;
2575
2576 # No shared lib support for Linux oldld, aout, or coff.
2577 linux*oldld* | linux*aout* | linux*coff*)
2578 dynamic_linker=no
2579 ;;
2580
2581 # This must be Linux ELF.
2582 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2583 version_type=linux
2584 need_lib_prefix=no
2585 need_version=no
2586 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2587 soname_spec='${libname}${release}${shared_ext}$major'
2588 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2589 shlibpath_var=LD_LIBRARY_PATH
2590 shlibpath_overrides_runpath=no
2591
2592 # Some binutils ld are patched to set DT_RUNPATH
2593 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2594 [lt_cv_shlibpath_overrides_runpath=no
2595 save_LDFLAGS=$LDFLAGS
2596 save_libdir=$libdir
2597 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2598 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2599 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2600 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2601 [lt_cv_shlibpath_overrides_runpath=yes])])
2602 LDFLAGS=$save_LDFLAGS
2603 libdir=$save_libdir
2604 ])
2605 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2606
2607 # This implies no fast_install, which is unacceptable.
2608 # Some rework will be needed to allow for fast_install
2609 # before this can be enabled.
2610 hardcode_into_libs=yes
2611
2612 # Add ABI-specific directories to the system library path.
2613 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2614
2615 # Append ld.so.conf contents to the search path
2616 if test -f /etc/ld.so.conf; then
2617 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2618 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2619
2620 fi
2621
2622 # We used to test for /lib/ld.so.1 and disable shared libraries on
2623 # powerpc, because MkLinux only supported shared libraries with the
2624 # GNU dynamic linker. Since this was broken with cross compilers,
2625 # most powerpc-linux boxes support dynamic linking these days and
2626 # people can always --disable-shared, the test was removed, and we
2627 # assume the GNU/Linux dynamic linker is in use.
2628 dynamic_linker='GNU/Linux ld.so'
2629 ;;
2630
2631 netbsd*)
2632 version_type=sunos
2633 need_lib_prefix=no
2634 need_version=no
2635 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2636 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2637 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2638 dynamic_linker='NetBSD (a.out) ld.so'
2639 else
2640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2641 soname_spec='${libname}${release}${shared_ext}$major'
2642 dynamic_linker='NetBSD ld.elf_so'
2643 fi
2644 shlibpath_var=LD_LIBRARY_PATH
2645 shlibpath_overrides_runpath=yes
2646 hardcode_into_libs=yes
2647 ;;
2648
2649 newsos6)
2650 version_type=linux
2651 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2652 shlibpath_var=LD_LIBRARY_PATH
2653 shlibpath_overrides_runpath=yes
2654 ;;
2655
2656 *nto* | *qnx*)
2657 version_type=qnx
2658 need_lib_prefix=no
2659 need_version=no
2660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2661 soname_spec='${libname}${release}${shared_ext}$major'
2662 shlibpath_var=LD_LIBRARY_PATH
2663 shlibpath_overrides_runpath=no
2664 hardcode_into_libs=yes
2665 dynamic_linker='ldqnx.so'
2666 ;;
2667
2668 openbsd*)
2669 version_type=sunos
2670 sys_lib_dlsearch_path_spec="/usr/lib"
2671 need_lib_prefix=no
2672 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2673 case $host_os in
2674 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2675 *) need_version=no ;;
2676 esac
2677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2678 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2679 shlibpath_var=LD_LIBRARY_PATH
2680 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2681 case $host_os in
2682 openbsd2.[[89]] | openbsd2.[[89]].*)
2683 shlibpath_overrides_runpath=no
2684 ;;
2685 *)
2686 shlibpath_overrides_runpath=yes
2687 ;;
2688 esac
2689 else
2690 shlibpath_overrides_runpath=yes
2691 fi
2692 ;;
2693
2694 os2*)
2695 libname_spec='$name'
2696 shrext_cmds=".dll"
2697 need_lib_prefix=no
2698 library_names_spec='$libname${shared_ext} $libname.a'
2699 dynamic_linker='OS/2 ld.exe'
2700 shlibpath_var=LIBPATH
2701 ;;
2702
2703 osf3* | osf4* | osf5*)
2704 version_type=osf
2705 need_lib_prefix=no
2706 need_version=no
2707 soname_spec='${libname}${release}${shared_ext}$major'
2708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2709 shlibpath_var=LD_LIBRARY_PATH
2710 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2711 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2712 ;;
2713
2714 rdos*)
2715 dynamic_linker=no
2716 ;;
2717
2718 solaris*)
2719 version_type=linux
2720 need_lib_prefix=no
2721 need_version=no
2722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2723 soname_spec='${libname}${release}${shared_ext}$major'
2724 shlibpath_var=LD_LIBRARY_PATH
2725 shlibpath_overrides_runpath=yes
2726 hardcode_into_libs=yes
2727 # ldd complains unless libraries are executable
2728 postinstall_cmds='chmod +x $lib'
2729 ;;
2730
2731 sunos4*)
2732 version_type=sunos
2733 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2734 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2735 shlibpath_var=LD_LIBRARY_PATH
2736 shlibpath_overrides_runpath=yes
2737 if test "$with_gnu_ld" = yes; then
2738 need_lib_prefix=no
2739 fi
2740 need_version=yes
2741 ;;
2742
2743 sysv4 | sysv4.3*)
2744 version_type=linux
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 case $host_vendor in
2749 sni)
2750 shlibpath_overrides_runpath=no
2751 need_lib_prefix=no
2752 runpath_var=LD_RUN_PATH
2753 ;;
2754 siemens)
2755 need_lib_prefix=no
2756 ;;
2757 motorola)
2758 need_lib_prefix=no
2759 need_version=no
2760 shlibpath_overrides_runpath=no
2761 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2762 ;;
2763 esac
2764 ;;
2765
2766 sysv4*MP*)
2767 if test -d /usr/nec ;then
2768 version_type=linux
2769 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2770 soname_spec='$libname${shared_ext}.$major'
2771 shlibpath_var=LD_LIBRARY_PATH
2772 fi
2773 ;;
2774
2775 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2776 version_type=freebsd-elf
2777 need_lib_prefix=no
2778 need_version=no
2779 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2780 soname_spec='${libname}${release}${shared_ext}$major'
2781 shlibpath_var=LD_LIBRARY_PATH
2782 shlibpath_overrides_runpath=yes
2783 hardcode_into_libs=yes
2784 if test "$with_gnu_ld" = yes; then
2785 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2786 else
2787 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2788 case $host_os in
2789 sco3.2v5*)
2790 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2791 ;;
2792 esac
2793 fi
2794 sys_lib_dlsearch_path_spec='/usr/lib'
2795 ;;
2796
2797 tpf*)
2798 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2799 version_type=linux
2800 need_lib_prefix=no
2801 need_version=no
2802 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2803 shlibpath_var=LD_LIBRARY_PATH
2804 shlibpath_overrides_runpath=no
2805 hardcode_into_libs=yes
2806 ;;
2807
2808 uts4*)
2809 version_type=linux
2810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2811 soname_spec='${libname}${release}${shared_ext}$major'
2812 shlibpath_var=LD_LIBRARY_PATH
2813 ;;
2814
2815 *)
2816 dynamic_linker=no
2817 ;;
2818 esac
2819 AC_MSG_RESULT([$dynamic_linker])
2820 test "$dynamic_linker" = no && can_build_shared=no
2821
2822 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2823 if test "$GCC" = yes; then
2824 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2825 fi
2826
2827 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2828 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2829 fi
2830 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2831 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2832 fi
2833
2834 _LT_DECL([], [variables_saved_for_relink], [1],
2835 [Variables whose values should be saved in libtool wrapper scripts and
2836 restored at link time])
2837 _LT_DECL([], [need_lib_prefix], [0],
2838 [Do we need the "lib" prefix for modules?])
2839 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2840 _LT_DECL([], [version_type], [0], [Library versioning type])
2841 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2842 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2843 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2844 [Is shlibpath searched before the hard-coded library search path?])
2845 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2846 _LT_DECL([], [library_names_spec], [1],
2847 [[List of archive names. First name is the real one, the rest are links.
2848 The last name is the one that the linker finds with -lNAME]])
2849 _LT_DECL([], [soname_spec], [1],
2850 [[The coded name of the library, if different from the real name]])
2851 _LT_DECL([], [install_override_mode], [1],
2852 [Permission mode override for installation of shared libraries])
2853 _LT_DECL([], [postinstall_cmds], [2],
2854 [Command to use after installation of a shared archive])
2855 _LT_DECL([], [postuninstall_cmds], [2],
2856 [Command to use after uninstallation of a shared archive])
2857 _LT_DECL([], [finish_cmds], [2],
2858 [Commands used to finish a libtool library installation in a directory])
2859 _LT_DECL([], [finish_eval], [1],
2860 [[As "finish_cmds", except a single script fragment to be evaled but
2861 not shown]])
2862 _LT_DECL([], [hardcode_into_libs], [0],
2863 [Whether we should hardcode library paths into libraries])
2864 _LT_DECL([], [sys_lib_search_path_spec], [2],
2865 [Compile-time system search path for libraries])
2866 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2867 [Run-time system search path for libraries])
2868 ])# _LT_SYS_DYNAMIC_LINKER
2869
2870
2871 # _LT_PATH_TOOL_PREFIX(TOOL)
2872 # --------------------------
2873 # find a file program which can recognize shared library
2874 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2875 [m4_require([_LT_DECL_EGREP])dnl
2876 AC_MSG_CHECKING([for $1])
2877 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2878 [case $MAGIC_CMD in
2879 [[\\/*] | ?:[\\/]*])
2880 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2881 ;;
2882 *)
2883 lt_save_MAGIC_CMD="$MAGIC_CMD"
2884 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2885 dnl $ac_dummy forces splitting on constant user-supplied paths.
2886 dnl POSIX.2 word splitting is done only on the output of word expansions,
2887 dnl not every word. This closes a longstanding sh security hole.
2888 ac_dummy="m4_if([$2], , $PATH, [$2])"
2889 for ac_dir in $ac_dummy; do
2890 IFS="$lt_save_ifs"
2891 test -z "$ac_dir" && ac_dir=.
2892 if test -f $ac_dir/$1; then
2893 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2894 if test -n "$file_magic_test_file"; then
2895 case $deplibs_check_method in
2896 "file_magic "*)
2897 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2898 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2899 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2900 $EGREP "$file_magic_regex" > /dev/null; then
2901 :
2902 else
2903 cat <<_LT_EOF 1>&2
2904
2905 *** Warning: the command libtool uses to detect shared libraries,
2906 *** $file_magic_cmd, produces output that libtool cannot recognize.
2907 *** The result is that libtool may fail to recognize shared libraries
2908 *** as such. This will affect the creation of libtool libraries that
2909 *** depend on shared libraries, but programs linked with such libtool
2910 *** libraries will work regardless of this problem. Nevertheless, you
2911 *** may want to report the problem to your system manager and/or to
2912 *** bug-libtool@gnu.org
2913
2914 _LT_EOF
2915 fi ;;
2916 esac
2917 fi
2918 break
2919 fi
2920 done
2921 IFS="$lt_save_ifs"
2922 MAGIC_CMD="$lt_save_MAGIC_CMD"
2923 ;;
2924 esac])
2925 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2926 if test -n "$MAGIC_CMD"; then
2927 AC_MSG_RESULT($MAGIC_CMD)
2928 else
2929 AC_MSG_RESULT(no)
2930 fi
2931 _LT_DECL([], [MAGIC_CMD], [0],
2932 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2933 ])# _LT_PATH_TOOL_PREFIX
2934
2935 # Old name:
2936 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2937 dnl aclocal-1.4 backwards compatibility:
2938 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2939
2940
2941 # _LT_PATH_MAGIC
2942 # --------------
2943 # find a file program which can recognize a shared library
2944 m4_defun([_LT_PATH_MAGIC],
2945 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2946 if test -z "$lt_cv_path_MAGIC_CMD"; then
2947 if test -n "$ac_tool_prefix"; then
2948 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2949 else
2950 MAGIC_CMD=:
2951 fi
2952 fi
2953 ])# _LT_PATH_MAGIC
2954
2955
2956 # LT_PATH_LD
2957 # ----------
2958 # find the pathname to the GNU or non-GNU linker
2959 AC_DEFUN([LT_PATH_LD],
2960 [AC_REQUIRE([AC_PROG_CC])dnl
2961 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2962 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2963 m4_require([_LT_DECL_SED])dnl
2964 m4_require([_LT_DECL_EGREP])dnl
2965 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2966
2967 AC_ARG_WITH([gnu-ld],
2968 [AS_HELP_STRING([--with-gnu-ld],
2969 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2970 [test "$withval" = no || with_gnu_ld=yes],
2971 [with_gnu_ld=no])dnl
2972
2973 ac_prog=ld
2974 if test "$GCC" = yes; then
2975 # Check if gcc -print-prog-name=ld gives a path.
2976 AC_MSG_CHECKING([for ld used by $CC])
2977 case $host in
2978 *-*-mingw*)
2979 # gcc leaves a trailing carriage return which upsets mingw
2980 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2981 *)
2982 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2983 esac
2984 case $ac_prog in
2985 # Accept absolute paths.
2986 [[\\/]]* | ?:[[\\/]]*)
2987 re_direlt='/[[^/]][[^/]]*/\.\./'
2988 # Canonicalize the pathname of ld
2989 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2990 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2991 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2992 done
2993 test -z "$LD" && LD="$ac_prog"
2994 ;;
2995 "")
2996 # If it fails, then pretend we aren't using GCC.
2997 ac_prog=ld
2998 ;;
2999 *)
3000 # If it is relative, then search for the first ld in PATH.
3001 with_gnu_ld=unknown
3002 ;;
3003 esac
3004 elif test "$with_gnu_ld" = yes; then
3005 AC_MSG_CHECKING([for GNU ld])
3006 else
3007 AC_MSG_CHECKING([for non-GNU ld])
3008 fi
3009 AC_CACHE_VAL(lt_cv_path_LD,
3010 [if test -z "$LD"; then
3011 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3012 for ac_dir in $PATH; do
3013 IFS="$lt_save_ifs"
3014 test -z "$ac_dir" && ac_dir=.
3015 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3016 lt_cv_path_LD="$ac_dir/$ac_prog"
3017 # Check to see if the program is GNU ld. I'd rather use --version,
3018 # but apparently some variants of GNU ld only accept -v.
3019 # Break only if it was the GNU/non-GNU ld that we prefer.
3020 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3021 *GNU* | *'with BFD'*)
3022 test "$with_gnu_ld" != no && break
3023 ;;
3024 *)
3025 test "$with_gnu_ld" != yes && break
3026 ;;
3027 esac
3028 fi
3029 done
3030 IFS="$lt_save_ifs"
3031 else
3032 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3033 fi])
3034 LD="$lt_cv_path_LD"
3035 if test -n "$LD"; then
3036 AC_MSG_RESULT($LD)
3037 else
3038 AC_MSG_RESULT(no)
3039 fi
3040 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3041 _LT_PATH_LD_GNU
3042 AC_SUBST([LD])
3043
3044 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3045 ])# LT_PATH_LD
3046
3047 # Old names:
3048 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3049 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3050 dnl aclocal-1.4 backwards compatibility:
3051 dnl AC_DEFUN([AM_PROG_LD], [])
3052 dnl AC_DEFUN([AC_PROG_LD], [])
3053
3054
3055 # _LT_PATH_LD_GNU
3056 #- --------------
3057 m4_defun([_LT_PATH_LD_GNU],
3058 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3059 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3060 case `$LD -v 2>&1 </dev/null` in
3061 *GNU* | *'with BFD'*)
3062 lt_cv_prog_gnu_ld=yes
3063 ;;
3064 *)
3065 lt_cv_prog_gnu_ld=no
3066 ;;
3067 esac])
3068 with_gnu_ld=$lt_cv_prog_gnu_ld
3069 ])# _LT_PATH_LD_GNU
3070
3071
3072 # _LT_CMD_RELOAD
3073 # --------------
3074 # find reload flag for linker
3075 # -- PORTME Some linkers may need a different reload flag.
3076 m4_defun([_LT_CMD_RELOAD],
3077 [AC_CACHE_CHECK([for $LD option to reload object files],
3078 lt_cv_ld_reload_flag,
3079 [lt_cv_ld_reload_flag='-r'])
3080 reload_flag=$lt_cv_ld_reload_flag
3081 case $reload_flag in
3082 "" | " "*) ;;
3083 *) reload_flag=" $reload_flag" ;;
3084 esac
3085 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3086 case $host_os in
3087 cygwin* | mingw* | pw32* | cegcc*)
3088 if test "$GCC" != yes; then
3089 reload_cmds=false
3090 fi
3091 ;;
3092 darwin*)
3093 if test "$GCC" = yes; then
3094 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3095 else
3096 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3097 fi
3098 ;;
3099 esac
3100 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3101 _LT_TAGDECL([], [reload_cmds], [2])dnl
3102 ])# _LT_CMD_RELOAD
3103
3104
3105 # _LT_CHECK_MAGIC_METHOD
3106 # ----------------------
3107 # how to check for library dependencies
3108 # -- PORTME fill in with the dynamic library characteristics
3109 m4_defun([_LT_CHECK_MAGIC_METHOD],
3110 [m4_require([_LT_DECL_EGREP])
3111 m4_require([_LT_DECL_OBJDUMP])
3112 AC_CACHE_CHECK([how to recognize dependent libraries],
3113 lt_cv_deplibs_check_method,
3114 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3115 lt_cv_file_magic_test_file=
3116 lt_cv_deplibs_check_method='unknown'
3117 # Need to set the preceding variable on all platforms that support
3118 # interlibrary dependencies.
3119 # 'none' -- dependencies not supported.
3120 # `unknown' -- same as none, but documents that we really don't know.
3121 # 'pass_all' -- all dependencies passed with no checks.
3122 # 'test_compile' -- check by making test program.
3123 # 'file_magic [[regex]]' -- check by looking for files in library path
3124 # which responds to the $file_magic_cmd with a given extended regex.
3125 # If you have `file' or equivalent on your system and you're not sure
3126 # whether `pass_all' will *always* work, you probably want this one.
3127
3128 case $host_os in
3129 aix[[4-9]]*)
3130 lt_cv_deplibs_check_method=pass_all
3131 ;;
3132
3133 beos*)
3134 lt_cv_deplibs_check_method=pass_all
3135 ;;
3136
3137 bsdi[[45]]*)
3138 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3139 lt_cv_file_magic_cmd='/usr/bin/file -L'
3140 lt_cv_file_magic_test_file=/shlib/libc.so
3141 ;;
3142
3143 cygwin*)
3144 # func_win32_libid is a shell function defined in ltmain.sh
3145 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3146 lt_cv_file_magic_cmd='func_win32_libid'
3147 ;;
3148
3149 mingw* | pw32*)
3150 # Base MSYS/MinGW do not provide the 'file' command needed by
3151 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3152 # unless we find 'file', for example because we are cross-compiling.
3153 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3154 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3155 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3156 lt_cv_file_magic_cmd='func_win32_libid'
3157 else
3158 # Keep this pattern in sync with the one in func_win32_libid.
3159 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3160 lt_cv_file_magic_cmd='$OBJDUMP -f'
3161 fi
3162 ;;
3163
3164 cegcc*)
3165 # use the weaker test based on 'objdump'. See mingw*.
3166 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3167 lt_cv_file_magic_cmd='$OBJDUMP -f'
3168 ;;
3169
3170 darwin* | rhapsody*)
3171 lt_cv_deplibs_check_method=pass_all
3172 ;;
3173
3174 freebsd* | dragonfly*)
3175 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3176 case $host_cpu in
3177 i*86 )
3178 # Not sure whether the presence of OpenBSD here was a mistake.
3179 # Let's accept both of them until this is cleared up.
3180 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3181 lt_cv_file_magic_cmd=/usr/bin/file
3182 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3183 ;;
3184 esac
3185 else
3186 lt_cv_deplibs_check_method=pass_all
3187 fi
3188 ;;
3189
3190 gnu*)
3191 lt_cv_deplibs_check_method=pass_all
3192 ;;
3193
3194 haiku*)
3195 lt_cv_deplibs_check_method=pass_all
3196 ;;
3197
3198 hpux10.20* | hpux11*)
3199 lt_cv_file_magic_cmd=/usr/bin/file
3200 case $host_cpu in
3201 ia64*)
3202 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3203 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3204 ;;
3205 hppa*64*)
3206 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3207 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3208 ;;
3209 *)
3210 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3211 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3212 ;;
3213 esac
3214 ;;
3215
3216 interix[[3-9]]*)
3217 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3218 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3219 ;;
3220
3221 irix5* | irix6* | nonstopux*)
3222 case $LD in
3223 *-32|*"-32 ") libmagic=32-bit;;
3224 *-n32|*"-n32 ") libmagic=N32;;
3225 *-64|*"-64 ") libmagic=64-bit;;
3226 *) libmagic=never-match;;
3227 esac
3228 lt_cv_deplibs_check_method=pass_all
3229 ;;
3230
3231 # This must be Linux ELF.
3232 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3233 lt_cv_deplibs_check_method=pass_all
3234 ;;
3235
3236 netbsd*)
3237 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3238 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3239 else
3240 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3241 fi
3242 ;;
3243
3244 newos6*)
3245 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3246 lt_cv_file_magic_cmd=/usr/bin/file
3247 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3248 ;;
3249
3250 *nto* | *qnx*)
3251 lt_cv_deplibs_check_method=pass_all
3252 ;;
3253
3254 openbsd*)
3255 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3256 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3257 else
3258 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3259 fi
3260 ;;
3261
3262 osf3* | osf4* | osf5*)
3263 lt_cv_deplibs_check_method=pass_all
3264 ;;
3265
3266 rdos*)
3267 lt_cv_deplibs_check_method=pass_all
3268 ;;
3269
3270 solaris*)
3271 lt_cv_deplibs_check_method=pass_all
3272 ;;
3273
3274 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3275 lt_cv_deplibs_check_method=pass_all
3276 ;;
3277
3278 sysv4 | sysv4.3*)
3279 case $host_vendor in
3280 motorola)
3281 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]]'
3282 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3283 ;;
3284 ncr)
3285 lt_cv_deplibs_check_method=pass_all
3286 ;;
3287 sequent)
3288 lt_cv_file_magic_cmd='/bin/file'
3289 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3290 ;;
3291 sni)
3292 lt_cv_file_magic_cmd='/bin/file'
3293 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3294 lt_cv_file_magic_test_file=/lib/libc.so
3295 ;;
3296 siemens)
3297 lt_cv_deplibs_check_method=pass_all
3298 ;;
3299 pc)
3300 lt_cv_deplibs_check_method=pass_all
3301 ;;
3302 esac
3303 ;;
3304
3305 tpf*)
3306 lt_cv_deplibs_check_method=pass_all
3307 ;;
3308 esac
3309 ])
3310
3311 file_magic_glob=
3312 want_nocaseglob=no
3313 if test "$build" = "$host"; then
3314 case $host_os in
3315 mingw* | pw32*)
3316 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3317 want_nocaseglob=yes
3318 else
3319 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3320 fi
3321 ;;
3322 esac
3323 fi
3324
3325 file_magic_cmd=$lt_cv_file_magic_cmd
3326 deplibs_check_method=$lt_cv_deplibs_check_method
3327 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3328
3329 _LT_DECL([], [deplibs_check_method], [1],
3330 [Method to check whether dependent libraries are shared objects])
3331 _LT_DECL([], [file_magic_cmd], [1],
3332 [Command to use when deplibs_check_method = "file_magic"])
3333 _LT_DECL([], [file_magic_glob], [1],
3334 [How to find potential files when deplibs_check_method = "file_magic"])
3335 _LT_DECL([], [want_nocaseglob], [1],
3336 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3337 ])# _LT_CHECK_MAGIC_METHOD
3338
3339
3340 # LT_PATH_NM
3341 # ----------
3342 # find the pathname to a BSD- or MS-compatible name lister
3343 AC_DEFUN([LT_PATH_NM],
3344 [AC_REQUIRE([AC_PROG_CC])dnl
3345 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3346 [if test -n "$NM"; then
3347 # Let the user override the test.
3348 lt_cv_path_NM="$NM"
3349 else
3350 lt_nm_to_check="${ac_tool_prefix}nm"
3351 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3352 lt_nm_to_check="$lt_nm_to_check nm"
3353 fi
3354 for lt_tmp_nm in $lt_nm_to_check; do
3355 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3356 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3357 IFS="$lt_save_ifs"
3358 test -z "$ac_dir" && ac_dir=.
3359 tmp_nm="$ac_dir/$lt_tmp_nm"
3360 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3361 # Check to see if the nm accepts a BSD-compat flag.
3362 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3363 # nm: unknown option "B" ignored
3364 # Tru64's nm complains that /dev/null is an invalid object file
3365 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3366 */dev/null* | *'Invalid file or object type'*)
3367 lt_cv_path_NM="$tmp_nm -B"
3368 break
3369 ;;
3370 *)
3371 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3372 */dev/null*)
3373 lt_cv_path_NM="$tmp_nm -p"
3374 break
3375 ;;
3376 *)
3377 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3378 continue # so that we can try to find one that supports BSD flags
3379 ;;
3380 esac
3381 ;;
3382 esac
3383 fi
3384 done
3385 IFS="$lt_save_ifs"
3386 done
3387 : ${lt_cv_path_NM=no}
3388 fi])
3389 if test "$lt_cv_path_NM" != "no"; then
3390 NM="$lt_cv_path_NM"
3391 else
3392 # Didn't find any BSD compatible name lister, look for dumpbin.
3393 if test -n "$DUMPBIN"; then :
3394 # Let the user override the test.
3395 else
3396 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3397 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3398 *COFF*)
3399 DUMPBIN="$DUMPBIN -symbols"
3400 ;;
3401 *)
3402 DUMPBIN=:
3403 ;;
3404 esac
3405 fi
3406 AC_SUBST([DUMPBIN])
3407 if test "$DUMPBIN" != ":"; then
3408 NM="$DUMPBIN"
3409 fi
3410 fi
3411 test -z "$NM" && NM=nm
3412 AC_SUBST([NM])
3413 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3414
3415 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3416 [lt_cv_nm_interface="BSD nm"
3417 echo "int some_variable = 0;" > conftest.$ac_ext
3418 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3419 (eval "$ac_compile" 2>conftest.err)
3420 cat conftest.err >&AS_MESSAGE_LOG_FD
3421 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3422 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3423 cat conftest.err >&AS_MESSAGE_LOG_FD
3424 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3425 cat conftest.out >&AS_MESSAGE_LOG_FD
3426 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3427 lt_cv_nm_interface="MS dumpbin"
3428 fi
3429 rm -f conftest*])
3430 ])# LT_PATH_NM
3431
3432 # Old names:
3433 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3434 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3435 dnl aclocal-1.4 backwards compatibility:
3436 dnl AC_DEFUN([AM_PROG_NM], [])
3437 dnl AC_DEFUN([AC_PROG_NM], [])
3438
3439 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3440 # --------------------------------
3441 # how to determine the name of the shared library
3442 # associated with a specific link library.
3443 # -- PORTME fill in with the dynamic library characteristics
3444 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3445 [m4_require([_LT_DECL_EGREP])
3446 m4_require([_LT_DECL_OBJDUMP])
3447 m4_require([_LT_DECL_DLLTOOL])
3448 AC_CACHE_CHECK([how to associate runtime and link libraries],
3449 lt_cv_sharedlib_from_linklib_cmd,
3450 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3451
3452 case $host_os in
3453 cygwin* | mingw* | pw32* | cegcc*)
3454 # two different shell functions defined in ltmain.sh
3455 # decide which to use based on capabilities of $DLLTOOL
3456 case `$DLLTOOL --help 2>&1` in
3457 *--identify-strict*)
3458 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3459 ;;
3460 *)
3461 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3462 ;;
3463 esac
3464 ;;
3465 *)
3466 # fallback: assume linklib IS sharedlib
3467 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3468 ;;
3469 esac
3470 ])
3471 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3472 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3473
3474 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3475 [Command to associate shared and link libraries])
3476 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3477
3478
3479 # _LT_PATH_MANIFEST_TOOL
3480 # ----------------------
3481 # locate the manifest tool
3482 m4_defun([_LT_PATH_MANIFEST_TOOL],
3483 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3484 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3485 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3486 [lt_cv_path_mainfest_tool=no
3487 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3488 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3489 cat conftest.err >&AS_MESSAGE_LOG_FD
3490 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3491 lt_cv_path_mainfest_tool=yes
3492 fi
3493 rm -f conftest*])
3494 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3495 MANIFEST_TOOL=:
3496 fi
3497 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3498 ])# _LT_PATH_MANIFEST_TOOL
3499
3500
3501 # LT_LIB_M
3502 # --------
3503 # check for math library
3504 AC_DEFUN([LT_LIB_M],
3505 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3506 LIBM=
3507 case $host in
3508 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3509 # These system don't have libm, or don't need it
3510 ;;
3511 *-ncr-sysv4.3*)
3512 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3513 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3514 ;;
3515 *)
3516 AC_CHECK_LIB(m, cos, LIBM="-lm")
3517 ;;
3518 esac
3519 AC_SUBST([LIBM])
3520 ])# LT_LIB_M
3521
3522 # Old name:
3523 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3524 dnl aclocal-1.4 backwards compatibility:
3525 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3526
3527
3528 # _LT_COMPILER_NO_RTTI([TAGNAME])
3529 # -------------------------------
3530 m4_defun([_LT_COMPILER_NO_RTTI],
3531 [m4_require([_LT_TAG_COMPILER])dnl
3532
3533 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3534
3535 if test "$GCC" = yes; then
3536 case $cc_basename in
3537 nvcc*)
3538 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3539 *)
3540 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3541 esac
3542
3543 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3544 lt_cv_prog_compiler_rtti_exceptions,
3545 [-fno-rtti -fno-exceptions], [],
3546 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3547 fi
3548 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3549 [Compiler flag to turn off builtin functions])
3550 ])# _LT_COMPILER_NO_RTTI
3551
3552
3553 # _LT_CMD_GLOBAL_SYMBOLS
3554 # ----------------------
3555 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3556 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3557 AC_REQUIRE([AC_PROG_CC])dnl
3558 AC_REQUIRE([AC_PROG_AWK])dnl
3559 AC_REQUIRE([LT_PATH_NM])dnl
3560 AC_REQUIRE([LT_PATH_LD])dnl
3561 m4_require([_LT_DECL_SED])dnl
3562 m4_require([_LT_DECL_EGREP])dnl
3563 m4_require([_LT_TAG_COMPILER])dnl
3564
3565 # Check for command to grab the raw symbol name followed by C symbol from nm.
3566 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3567 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3568 [
3569 # These are sane defaults that work on at least a few old systems.
3570 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3571
3572 # Character class describing NM global symbol codes.
3573 symcode='[[BCDEGRST]]'
3574
3575 # Regexp to match symbols that can be accessed directly from C.
3576 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3577
3578 # Define system-specific variables.
3579 case $host_os in
3580 aix*)
3581 symcode='[[BCDT]]'
3582 ;;
3583 cygwin* | mingw* | pw32* | cegcc*)
3584 symcode='[[ABCDGISTW]]'
3585 ;;
3586 hpux*)
3587 if test "$host_cpu" = ia64; then
3588 symcode='[[ABCDEGRST]]'
3589 fi
3590 ;;
3591 irix* | nonstopux*)
3592 symcode='[[BCDEGRST]]'
3593 ;;
3594 osf*)
3595 symcode='[[BCDEGQRST]]'
3596 ;;
3597 solaris*)
3598 symcode='[[BDRT]]'
3599 ;;
3600 sco3.2v5*)
3601 symcode='[[DT]]'
3602 ;;
3603 sysv4.2uw2*)
3604 symcode='[[DT]]'
3605 ;;
3606 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3607 symcode='[[ABDT]]'
3608 ;;
3609 sysv4)
3610 symcode='[[DFNSTU]]'
3611 ;;
3612 esac
3613
3614 # If we're using GNU nm, then use its standard symbol codes.
3615 case `$NM -V 2>&1` in
3616 *GNU* | *'with BFD'*)
3617 symcode='[[ABCDGIRSTW]]' ;;
3618 esac
3619
3620 # Transform an extracted symbol line into a proper C declaration.
3621 # Some systems (esp. on ia64) link data and code symbols differently,
3622 # so use this general approach.
3623 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3624
3625 # Transform an extracted symbol line into symbol name and symbol address
3626 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3627 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3628
3629 # Handle CRLF in mingw tool chain
3630 opt_cr=
3631 case $build_os in
3632 mingw*)
3633 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3634 ;;
3635 esac
3636
3637 # Try without a prefix underscore, then with it.
3638 for ac_symprfx in "" "_"; do
3639
3640 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3641 symxfrm="\\1 $ac_symprfx\\2 \\2"
3642
3643 # Write the raw and C identifiers.
3644 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3645 # Fake it for dumpbin and say T for any non-static function
3646 # and D for any global variable.
3647 # Also find C++ and __fastcall symbols from MSVC++,
3648 # which start with @ or ?.
3649 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3650 " {last_section=section; section=\$ 3};"\
3651 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3652 " \$ 0!~/External *\|/{next};"\
3653 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3654 " {if(hide[section]) next};"\
3655 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3656 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3657 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3658 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3659 " ' prfx=^$ac_symprfx]"
3660 else
3661 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3662 fi
3663 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3664
3665 # Check to see that the pipe works correctly.
3666 pipe_works=no
3667
3668 rm -f conftest*
3669 cat > conftest.$ac_ext <<_LT_EOF
3670 #ifdef __cplusplus
3671 extern "C" {
3672 #endif
3673 char nm_test_var;
3674 void nm_test_func(void);
3675 void nm_test_func(void){}
3676 #ifdef __cplusplus
3677 }
3678 #endif
3679 int main(){nm_test_var='a';nm_test_func();return(0);}
3680 _LT_EOF
3681
3682 if AC_TRY_EVAL(ac_compile); then
3683 # Now try to grab the symbols.
3684 nlist=conftest.nm
3685 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3686 # Try sorting and uniquifying the output.
3687 if sort "$nlist" | uniq > "$nlist"T; then
3688 mv -f "$nlist"T "$nlist"
3689 else
3690 rm -f "$nlist"T
3691 fi
3692
3693 # Make sure that we snagged all the symbols we need.
3694 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3695 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3696 cat <<_LT_EOF > conftest.$ac_ext
3697 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3698 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3699 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3700 relocations are performed -- see ld's documentation on pseudo-relocs. */
3701 # define LT@&t@_DLSYM_CONST
3702 #elif defined(__osf__)
3703 /* This system does not cope well with relocations in const data. */
3704 # define LT@&t@_DLSYM_CONST
3705 #else
3706 # define LT@&t@_DLSYM_CONST const
3707 #endif
3708
3709 #ifdef __cplusplus
3710 extern "C" {
3711 #endif
3712
3713 _LT_EOF
3714 # Now generate the symbol file.
3715 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3716
3717 cat <<_LT_EOF >> conftest.$ac_ext
3718
3719 /* The mapping between symbol names and symbols. */
3720 LT@&t@_DLSYM_CONST struct {
3721 const char *name;
3722 void *address;
3723 }
3724 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3725 {
3726 { "@PROGRAM@", (void *) 0 },
3727 _LT_EOF
3728 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3729 cat <<\_LT_EOF >> conftest.$ac_ext
3730 {0, (void *) 0}
3731 };
3732
3733 /* This works around a problem in FreeBSD linker */
3734 #ifdef FREEBSD_WORKAROUND
3735 static const void *lt_preloaded_setup() {
3736 return lt__PROGRAM__LTX_preloaded_symbols;
3737 }
3738 #endif
3739
3740 #ifdef __cplusplus
3741 }
3742 #endif
3743 _LT_EOF
3744 # Now try linking the two files.
3745 mv conftest.$ac_objext conftstm.$ac_objext
3746 lt_globsym_save_LIBS=$LIBS
3747 lt_globsym_save_CFLAGS=$CFLAGS
3748 LIBS="conftstm.$ac_objext"
3749 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3750 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3751 pipe_works=yes
3752 fi
3753 LIBS=$lt_globsym_save_LIBS
3754 CFLAGS=$lt_globsym_save_CFLAGS
3755 else
3756 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3757 fi
3758 else
3759 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3760 fi
3761 else
3762 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3763 fi
3764 else
3765 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3766 cat conftest.$ac_ext >&5
3767 fi
3768 rm -rf conftest* conftst*
3769
3770 # Do not use the global_symbol_pipe unless it works.
3771 if test "$pipe_works" = yes; then
3772 break
3773 else
3774 lt_cv_sys_global_symbol_pipe=
3775 fi
3776 done
3777 ])
3778 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3779 lt_cv_sys_global_symbol_to_cdecl=
3780 fi
3781 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3782 AC_MSG_RESULT(failed)
3783 else
3784 AC_MSG_RESULT(ok)
3785 fi
3786
3787 # Response file support.
3788 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3789 nm_file_list_spec='@'
3790 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3791 nm_file_list_spec='@'
3792 fi
3793
3794 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3795 [Take the output of nm and produce a listing of raw symbols and C names])
3796 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3797 [Transform the output of nm in a proper C declaration])
3798 _LT_DECL([global_symbol_to_c_name_address],
3799 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3800 [Transform the output of nm in a C name address pair])
3801 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3802 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3803 [Transform the output of nm in a C name address pair when lib prefix is needed])
3804 _LT_DECL([], [nm_file_list_spec], [1],
3805 [Specify filename containing input files for $NM])
3806 ]) # _LT_CMD_GLOBAL_SYMBOLS
3807
3808
3809 # _LT_COMPILER_PIC([TAGNAME])
3810 # ---------------------------
3811 m4_defun([_LT_COMPILER_PIC],
3812 [m4_require([_LT_TAG_COMPILER])dnl
3813 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3814 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3815 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3816
3817 m4_if([$1], [CXX], [
3818 # C++ specific cases for pic, static, wl, etc.
3819 if test "$GXX" = yes; then
3820 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3822
3823 case $host_os in
3824 aix*)
3825 # All AIX code is PIC.
3826 if test "$host_cpu" = ia64; then
3827 # AIX 5 now supports IA64 processor
3828 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3829 fi
3830 ;;
3831
3832 amigaos*)
3833 case $host_cpu in
3834 powerpc)
3835 # see comment about AmigaOS4 .so support
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3837 ;;
3838 m68k)
3839 # FIXME: we need at least 68020 code to build shared libraries, but
3840 # adding the `-m68020' flag to GCC prevents building anything better,
3841 # like `-m68040'.
3842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3843 ;;
3844 esac
3845 ;;
3846
3847 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3848 # PIC is the default for these OSes.
3849 ;;
3850 mingw* | cygwin* | os2* | pw32* | cegcc*)
3851 # This hack is so that the source file can tell whether it is being
3852 # built for inclusion in a dll (and should export symbols for example).
3853 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3854 # (--disable-auto-import) libraries
3855 m4_if([$1], [GCJ], [],
3856 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3857 ;;
3858 darwin* | rhapsody*)
3859 # PIC is the default on this platform
3860 # Common symbols not allowed in MH_DYLIB files
3861 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3862 ;;
3863 *djgpp*)
3864 # DJGPP does not support shared libraries at all
3865 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3866 ;;
3867 haiku*)
3868 # PIC is the default for Haiku.
3869 # The "-static" flag exists, but is broken.
3870 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3871 ;;
3872 interix[[3-9]]*)
3873 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3874 # Instead, we relocate shared libraries at runtime.
3875 ;;
3876 sysv4*MP*)
3877 if test -d /usr/nec; then
3878 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3879 fi
3880 ;;
3881 hpux*)
3882 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3883 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3884 # sets the default TLS model and affects inlining.
3885 case $host_cpu in
3886 hppa*64*)
3887 ;;
3888 *)
3889 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3890 ;;
3891 esac
3892 ;;
3893 *qnx* | *nto*)
3894 # QNX uses GNU C++, but need to define -shared option too, otherwise
3895 # it will coredump.
3896 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3897 ;;
3898 *)
3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3900 ;;
3901 esac
3902 else
3903 case $host_os in
3904 aix[[4-9]]*)
3905 # All AIX code is PIC.
3906 if test "$host_cpu" = ia64; then
3907 # AIX 5 now supports IA64 processor
3908 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3909 else
3910 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3911 fi
3912 ;;
3913 chorus*)
3914 case $cc_basename in
3915 cxch68*)
3916 # Green Hills C++ Compiler
3917 # _LT_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"
3918 ;;
3919 esac
3920 ;;
3921 mingw* | cygwin* | os2* | pw32* | cegcc*)
3922 # This hack is so that the source file can tell whether it is being
3923 # built for inclusion in a dll (and should export symbols for example).
3924 m4_if([$1], [GCJ], [],
3925 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3926 ;;
3927 dgux*)
3928 case $cc_basename in
3929 ec++*)
3930 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3931 ;;
3932 ghcx*)
3933 # Green Hills C++ Compiler
3934 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3935 ;;
3936 *)
3937 ;;
3938 esac
3939 ;;
3940 freebsd* | dragonfly*)
3941 # FreeBSD uses GNU C++
3942 ;;
3943 hpux9* | hpux10* | hpux11*)
3944 case $cc_basename in
3945 CC*)
3946 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3947 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3948 if test "$host_cpu" != ia64; then
3949 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3950 fi
3951 ;;
3952 aCC*)
3953 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3954 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3955 case $host_cpu in
3956 hppa*64*|ia64*)
3957 # +Z the default
3958 ;;
3959 *)
3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3961 ;;
3962 esac
3963 ;;
3964 *)
3965 ;;
3966 esac
3967 ;;
3968 interix*)
3969 # This is c89, which is MS Visual C++ (no shared libs)
3970 # Anyone wants to do a port?
3971 ;;
3972 irix5* | irix6* | nonstopux*)
3973 case $cc_basename in
3974 CC*)
3975 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3976 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3977 # CC pic flag -KPIC is the default.
3978 ;;
3979 *)
3980 ;;
3981 esac
3982 ;;
3983 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3984 case $cc_basename in
3985 KCC*)
3986 # KAI C++ Compiler
3987 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3988 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3989 ;;
3990 ecpc* )
3991 # old Intel C++ for x86_64 which still supported -KPIC.
3992 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3994 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3995 ;;
3996 icpc* )
3997 # Intel C++, used to be incompatible with GCC.
3998 # ICC 10 doesn't accept -KPIC any more.
3999 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4000 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4001 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4002 ;;
4003 pgCC* | pgcpp*)
4004 # Portland Group C++ compiler
4005 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4006 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4007 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4008 ;;
4009 cxx*)
4010 # Compaq C++
4011 # Make sure the PIC flag is empty. It appears that all Alpha
4012 # Linux and Compaq Tru64 Unix objects are PIC.
4013 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4014 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4015 ;;
4016 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4017 # IBM XL 8.0, 9.0 on PPC and BlueGene
4018 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4019 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4020 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4021 ;;
4022 *)
4023 case `$CC -V 2>&1 | sed 5q` in
4024 *Sun\ C*)
4025 # Sun C++ 5.9
4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4027 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4028 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4029 ;;
4030 esac
4031 ;;
4032 esac
4033 ;;
4034 lynxos*)
4035 ;;
4036 m88k*)
4037 ;;
4038 mvs*)
4039 case $cc_basename in
4040 cxx*)
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4042 ;;
4043 *)
4044 ;;
4045 esac
4046 ;;
4047 netbsd*)
4048 ;;
4049 *qnx* | *nto*)
4050 # QNX uses GNU C++, but need to define -shared option too, otherwise
4051 # it will coredump.
4052 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4053 ;;
4054 osf3* | osf4* | osf5*)
4055 case $cc_basename in
4056 KCC*)
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4058 ;;
4059 RCC*)
4060 # Rational C++ 2.4.1
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4062 ;;
4063 cxx*)
4064 # Digital/Compaq C++
4065 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4066 # Make sure the PIC flag is empty. It appears that all Alpha
4067 # Linux and Compaq Tru64 Unix objects are PIC.
4068 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4070 ;;
4071 *)
4072 ;;
4073 esac
4074 ;;
4075 psos*)
4076 ;;
4077 solaris*)
4078 case $cc_basename in
4079 CC* | sunCC*)
4080 # Sun C++ 4.2, 5.x and Centerline C++
4081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4084 ;;
4085 gcx*)
4086 # Green Hills C++ Compiler
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4088 ;;
4089 *)
4090 ;;
4091 esac
4092 ;;
4093 sunos4*)
4094 case $cc_basename in
4095 CC*)
4096 # Sun C++ 4.x
4097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4098 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4099 ;;
4100 lcc*)
4101 # Lucid
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4103 ;;
4104 *)
4105 ;;
4106 esac
4107 ;;
4108 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4109 case $cc_basename in
4110 CC*)
4111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4113 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4114 ;;
4115 esac
4116 ;;
4117 tandem*)
4118 case $cc_basename in
4119 NCC*)
4120 # NonStop-UX NCC 3.20
4121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4122 ;;
4123 *)
4124 ;;
4125 esac
4126 ;;
4127 vxworks*)
4128 ;;
4129 *)
4130 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4131 ;;
4132 esac
4133 fi
4134 ],
4135 [
4136 if test "$GCC" = yes; then
4137 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4138 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4139
4140 case $host_os in
4141 aix*)
4142 # All AIX code is PIC.
4143 if test "$host_cpu" = ia64; then
4144 # AIX 5 now supports IA64 processor
4145 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4146 fi
4147 ;;
4148
4149 amigaos*)
4150 case $host_cpu in
4151 powerpc)
4152 # see comment about AmigaOS4 .so support
4153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4154 ;;
4155 m68k)
4156 # FIXME: we need at least 68020 code to build shared libraries, but
4157 # adding the `-m68020' flag to GCC prevents building anything better,
4158 # like `-m68040'.
4159 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4160 ;;
4161 esac
4162 ;;
4163
4164 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4165 # PIC is the default for these OSes.
4166 ;;
4167
4168 mingw* | cygwin* | pw32* | os2* | cegcc*)
4169 # This hack is so that the source file can tell whether it is being
4170 # built for inclusion in a dll (and should export symbols for example).
4171 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4172 # (--disable-auto-import) libraries
4173 m4_if([$1], [GCJ], [],
4174 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4175 ;;
4176
4177 darwin* | rhapsody*)
4178 # PIC is the default on this platform
4179 # Common symbols not allowed in MH_DYLIB files
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4181 ;;
4182
4183 haiku*)
4184 # PIC is the default for Haiku.
4185 # The "-static" flag exists, but is broken.
4186 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4187 ;;
4188
4189 hpux*)
4190 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4191 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4192 # sets the default TLS model and affects inlining.
4193 case $host_cpu in
4194 hppa*64*)
4195 # +Z the default
4196 ;;
4197 *)
4198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4199 ;;
4200 esac
4201 ;;
4202
4203 interix[[3-9]]*)
4204 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4205 # Instead, we relocate shared libraries at runtime.
4206 ;;
4207
4208 msdosdjgpp*)
4209 # Just because we use GCC doesn't mean we suddenly get shared libraries
4210 # on systems that don't support them.
4211 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4212 enable_shared=no
4213 ;;
4214
4215 *nto* | *qnx*)
4216 # QNX uses GNU C++, but need to define -shared option too, otherwise
4217 # it will coredump.
4218 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4219 ;;
4220
4221 sysv4*MP*)
4222 if test -d /usr/nec; then
4223 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4224 fi
4225 ;;
4226
4227 *)
4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4229 ;;
4230 esac
4231
4232 case $cc_basename in
4233 nvcc*) # Cuda Compiler Driver 2.2
4234 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4235 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4236 ;;
4237 esac
4238 else
4239 # PORTME Check for flag to pass linker flags through the system compiler.
4240 case $host_os in
4241 aix*)
4242 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4243 if test "$host_cpu" = ia64; then
4244 # AIX 5 now supports IA64 processor
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4246 else
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4248 fi
4249 ;;
4250
4251 mingw* | cygwin* | pw32* | os2* | cegcc*)
4252 # This hack is so that the source file can tell whether it is being
4253 # built for inclusion in a dll (and should export symbols for example).
4254 m4_if([$1], [GCJ], [],
4255 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4256 ;;
4257
4258 hpux9* | hpux10* | hpux11*)
4259 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4260 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4261 # not for PA HP-UX.
4262 case $host_cpu in
4263 hppa*64*|ia64*)
4264 # +Z the default
4265 ;;
4266 *)
4267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4268 ;;
4269 esac
4270 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4271 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4272 ;;
4273
4274 irix5* | irix6* | nonstopux*)
4275 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4276 # PIC (with -KPIC) is the default.
4277 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4278 ;;
4279
4280 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4281 case $cc_basename in
4282 # old Intel for x86_64 which still supported -KPIC.
4283 ecc*)
4284 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4286 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4287 ;;
4288 # icc used to be incompatible with GCC.
4289 # ICC 10 doesn't accept -KPIC any more.
4290 icc* | ifort*)
4291 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4293 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4294 ;;
4295 # Lahey Fortran 8.1.
4296 lf95*)
4297 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4300 ;;
4301 nagfor*)
4302 # NAG Fortran compiler
4303 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4304 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4305 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4306 ;;
4307 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4308 # Portland Group compilers (*not* the Pentium gcc compiler,
4309 # which looks to be a dead project)
4310 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4312 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4313 ;;
4314 ccc*)
4315 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4316 # All Alpha code is PIC.
4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4318 ;;
4319 xl* | bgxl* | bgf* | mpixl*)
4320 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4321 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4323 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4324 ;;
4325 *)
4326 case `$CC -V 2>&1 | sed 5q` in
4327 *Sun\ F* | *Sun*Fortran*)
4328 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4329 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4331 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4332 ;;
4333 *Sun\ C*)
4334 # Sun C 5.9
4335 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4336 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4338 ;;
4339 esac
4340 ;;
4341 esac
4342 ;;
4343
4344 newsos6)
4345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4347 ;;
4348
4349 *nto* | *qnx*)
4350 # QNX uses GNU C++, but need to define -shared option too, otherwise
4351 # it will coredump.
4352 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4353 ;;
4354
4355 osf3* | osf4* | osf5*)
4356 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4357 # All OSF/1 code is PIC.
4358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4359 ;;
4360
4361 rdos*)
4362 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4363 ;;
4364
4365 solaris*)
4366 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4368 case $cc_basename in
4369 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4371 *)
4372 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4373 esac
4374 ;;
4375
4376 sunos4*)
4377 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4379 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4380 ;;
4381
4382 sysv4 | sysv4.2uw2* | sysv4.3*)
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4386 ;;
4387
4388 sysv4*MP*)
4389 if test -d /usr/nec ;then
4390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4392 fi
4393 ;;
4394
4395 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 ;;
4400
4401 unicos*)
4402 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4403 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4404 ;;
4405
4406 uts4*)
4407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4409 ;;
4410
4411 *)
4412 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4413 ;;
4414 esac
4415 fi
4416 ])
4417 case $host_os in
4418 # For platforms which do not support PIC, -DPIC is meaningless:
4419 *djgpp*)
4420 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4421 ;;
4422 *)
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4424 ;;
4425 esac
4426
4427 AC_CACHE_CHECK([for $compiler option to produce PIC],
4428 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4429 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4431
4432 #
4433 # Check to make sure the PIC flag actually works.
4434 #
4435 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4436 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4437 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4438 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4439 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4440 "" | " "*) ;;
4441 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4442 esac],
4443 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4444 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4445 fi
4446 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4447 [Additional compiler flags for building library objects])
4448
4449 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4450 [How to pass a linker flag through the compiler])
4451 #
4452 # Check to make sure the static flag actually works.
4453 #
4454 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4455 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4456 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4457 $lt_tmp_static_flag,
4458 [],
4459 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4460 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4461 [Compiler flag to prevent dynamic linking])
4462 ])# _LT_COMPILER_PIC
4463
4464
4465 # _LT_LINKER_SHLIBS([TAGNAME])
4466 # ----------------------------
4467 # See if the linker supports building shared libraries.
4468 m4_defun([_LT_LINKER_SHLIBS],
4469 [AC_REQUIRE([LT_PATH_LD])dnl
4470 AC_REQUIRE([LT_PATH_NM])dnl
4471 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4472 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4473 m4_require([_LT_DECL_EGREP])dnl
4474 m4_require([_LT_DECL_SED])dnl
4475 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4476 m4_require([_LT_TAG_COMPILER])dnl
4477 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4478 m4_if([$1], [CXX], [
4479 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4480 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4481 case $host_os in
4482 aix[[4-9]]*)
4483 # If we're using GNU nm, then we don't want the "-C" option.
4484 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4485 # Also, AIX nm treats weak defined symbols like other global defined
4486 # symbols, whereas GNU nm marks them as "W".
4487 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4488 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4489 else
4490 _LT_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'
4491 fi
4492 ;;
4493 pw32*)
4494 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4495 ;;
4496 cygwin* | mingw* | cegcc*)
4497 case $cc_basename in
4498 cl*) ;;
4499 *)
4500 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4501 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4502 ;;
4503 esac
4504 ;;
4505 *)
4506 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4507 ;;
4508 esac
4509 ], [
4510 runpath_var=
4511 _LT_TAGVAR(allow_undefined_flag, $1)=
4512 _LT_TAGVAR(always_export_symbols, $1)=no
4513 _LT_TAGVAR(archive_cmds, $1)=
4514 _LT_TAGVAR(archive_expsym_cmds, $1)=
4515 _LT_TAGVAR(compiler_needs_object, $1)=no
4516 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4517 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4518 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4519 _LT_TAGVAR(hardcode_automatic, $1)=no
4520 _LT_TAGVAR(hardcode_direct, $1)=no
4521 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4522 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4523 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4524 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4525 _LT_TAGVAR(hardcode_minus_L, $1)=no
4526 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4527 _LT_TAGVAR(inherit_rpath, $1)=no
4528 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4529 _LT_TAGVAR(module_cmds, $1)=
4530 _LT_TAGVAR(module_expsym_cmds, $1)=
4531 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4532 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4533 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4534 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4535 # include_expsyms should be a list of space-separated symbols to be *always*
4536 # included in the symbol list
4537 _LT_TAGVAR(include_expsyms, $1)=
4538 # exclude_expsyms can be an extended regexp of symbols to exclude
4539 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4540 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4541 # as well as any symbol that contains `d'.
4542 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4543 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4544 # platforms (ab)use it in PIC code, but their linkers get confused if
4545 # the symbol is explicitly referenced. Since portable code cannot
4546 # rely on this symbol name, it's probably fine to never include it in
4547 # preloaded symbol tables.
4548 # Exclude shared library initialization/finalization symbols.
4549 dnl Note also adjust exclude_expsyms for C++ above.
4550 extract_expsyms_cmds=
4551
4552 case $host_os in
4553 cygwin* | mingw* | pw32* | cegcc*)
4554 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4555 # When not using gcc, we currently assume that we are using
4556 # Microsoft Visual C++.
4557 if test "$GCC" != yes; then
4558 with_gnu_ld=no
4559 fi
4560 ;;
4561 interix*)
4562 # we just hope/assume this is gcc and not c89 (= MSVC++)
4563 with_gnu_ld=yes
4564 ;;
4565 openbsd*)
4566 with_gnu_ld=no
4567 ;;
4568 esac
4569
4570 _LT_TAGVAR(ld_shlibs, $1)=yes
4571
4572 # On some targets, GNU ld is compatible enough with the native linker
4573 # that we're better off using the native interface for both.
4574 lt_use_gnu_ld_interface=no
4575 if test "$with_gnu_ld" = yes; then
4576 case $host_os in
4577 aix*)
4578 # The AIX port of GNU ld has always aspired to compatibility
4579 # with the native linker. However, as the warning in the GNU ld
4580 # block says, versions before 2.19.5* couldn't really create working
4581 # shared libraries, regardless of the interface used.
4582 case `$LD -v 2>&1` in
4583 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4584 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4585 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4586 *)
4587 lt_use_gnu_ld_interface=yes
4588 ;;
4589 esac
4590 ;;
4591 *)
4592 lt_use_gnu_ld_interface=yes
4593 ;;
4594 esac
4595 fi
4596
4597 if test "$lt_use_gnu_ld_interface" = yes; then
4598 # If archive_cmds runs LD, not CC, wlarc should be empty
4599 wlarc='${wl}'
4600
4601 # Set some defaults for GNU ld with shared library support. These
4602 # are reset later if shared libraries are not supported. Putting them
4603 # here allows them to be overridden if necessary.
4604 runpath_var=LD_RUN_PATH
4605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4606 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4607 # ancient GNU ld didn't support --whole-archive et. al.
4608 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4609 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4610 else
4611 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4612 fi
4613 supports_anon_versioning=no
4614 case `$LD -v 2>&1` in
4615 *GNU\ gold*) supports_anon_versioning=yes ;;
4616 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4617 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4618 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4619 *\ 2.11.*) ;; # other 2.11 versions
4620 *) supports_anon_versioning=yes ;;
4621 esac
4622
4623 # See if GNU ld supports shared libraries.
4624 case $host_os in
4625 aix[[3-9]]*)
4626 # On AIX/PPC, the GNU linker is very broken
4627 if test "$host_cpu" != ia64; then
4628 _LT_TAGVAR(ld_shlibs, $1)=no
4629 cat <<_LT_EOF 1>&2
4630
4631 *** Warning: the GNU linker, at least up to release 2.19, is reported
4632 *** to be unable to reliably create shared libraries on AIX.
4633 *** Therefore, libtool is disabling shared libraries support. If you
4634 *** really care for shared libraries, you may want to install binutils
4635 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4636 *** You will then need to restart the configuration process.
4637
4638 _LT_EOF
4639 fi
4640 ;;
4641
4642 amigaos*)
4643 case $host_cpu in
4644 powerpc)
4645 # see comment about AmigaOS4 .so support
4646 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4647 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4648 ;;
4649 m68k)
4650 _LT_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)'
4651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4652 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4653 ;;
4654 esac
4655 ;;
4656
4657 beos*)
4658 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4659 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4660 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4661 # support --undefined. This deserves some investigation. FIXME
4662 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4663 else
4664 _LT_TAGVAR(ld_shlibs, $1)=no
4665 fi
4666 ;;
4667
4668 cygwin* | mingw* | pw32* | cegcc*)
4669 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4670 # as there is no search path for DLLs.
4671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4672 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4673 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4674 _LT_TAGVAR(always_export_symbols, $1)=no
4675 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4676 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4677 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4678
4679 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4681 # If the export-symbols file already is a .def file (1st line
4682 # is EXPORTS), use it as is; otherwise, prepend...
4683 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4684 cp $export_symbols $output_objdir/$soname.def;
4685 else
4686 echo EXPORTS > $output_objdir/$soname.def;
4687 cat $export_symbols >> $output_objdir/$soname.def;
4688 fi~
4689 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4690 else
4691 _LT_TAGVAR(ld_shlibs, $1)=no
4692 fi
4693 ;;
4694
4695 haiku*)
4696 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4697 _LT_TAGVAR(link_all_deplibs, $1)=yes
4698 ;;
4699
4700 interix[[3-9]]*)
4701 _LT_TAGVAR(hardcode_direct, $1)=no
4702 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4705 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4706 # Instead, shared libraries are loaded at an image base (0x10000000 by
4707 # default) and relocated if they conflict, which is a slow very memory
4708 # consuming and fragmenting process. To avoid this, we pick a random,
4709 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4710 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4711 _LT_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'
4712 _LT_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'
4713 ;;
4714
4715 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4716 tmp_diet=no
4717 if test "$host_os" = linux-dietlibc; then
4718 case $cc_basename in
4719 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4720 esac
4721 fi
4722 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4723 && test "$tmp_diet" = no
4724 then
4725 tmp_addflag=' $pic_flag'
4726 tmp_sharedflag='-shared'
4727 case $cc_basename,$host_cpu in
4728 pgcc*) # Portland Group C compiler
4729 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4730 tmp_addflag=' $pic_flag'
4731 ;;
4732 pgf77* | pgf90* | pgf95* | pgfortran*)
4733 # Portland Group f77 and f90 compilers
4734 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4735 tmp_addflag=' $pic_flag -Mnomain' ;;
4736 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4737 tmp_addflag=' -i_dynamic' ;;
4738 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4739 tmp_addflag=' -i_dynamic -nofor_main' ;;
4740 ifc* | ifort*) # Intel Fortran compiler
4741 tmp_addflag=' -nofor_main' ;;
4742 lf95*) # Lahey Fortran 8.1
4743 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4744 tmp_sharedflag='--shared' ;;
4745 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4746 tmp_sharedflag='-qmkshrobj'
4747 tmp_addflag= ;;
4748 nvcc*) # Cuda Compiler Driver 2.2
4749 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4750 _LT_TAGVAR(compiler_needs_object, $1)=yes
4751 ;;
4752 esac
4753 case `$CC -V 2>&1 | sed 5q` in
4754 *Sun\ C*) # Sun C 5.9
4755 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4756 _LT_TAGVAR(compiler_needs_object, $1)=yes
4757 tmp_sharedflag='-G' ;;
4758 *Sun\ F*) # Sun Fortran 8.3
4759 tmp_sharedflag='-G' ;;
4760 esac
4761 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4762
4763 if test "x$supports_anon_versioning" = xyes; then
4764 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4765 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4766 echo "local: *; };" >> $output_objdir/$libname.ver~
4767 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4768 fi
4769
4770 case $cc_basename in
4771 xlf* | bgf* | bgxlf* | mpixlf*)
4772 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4773 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4774 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4775 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4776 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4777 if test "x$supports_anon_versioning" = xyes; then
4778 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4779 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4780 echo "local: *; };" >> $output_objdir/$libname.ver~
4781 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4782 fi
4783 ;;
4784 esac
4785 else
4786 _LT_TAGVAR(ld_shlibs, $1)=no
4787 fi
4788 ;;
4789
4790 netbsd*)
4791 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4792 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4793 wlarc=
4794 else
4795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4797 fi
4798 ;;
4799
4800 solaris*)
4801 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4802 _LT_TAGVAR(ld_shlibs, $1)=no
4803 cat <<_LT_EOF 1>&2
4804
4805 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4806 *** create shared libraries on Solaris systems. Therefore, libtool
4807 *** is disabling shared libraries support. We urge you to upgrade GNU
4808 *** binutils to release 2.9.1 or newer. Another option is to modify
4809 *** your PATH or compiler configuration so that the native linker is
4810 *** used, and then restart.
4811
4812 _LT_EOF
4813 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4815 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4816 else
4817 _LT_TAGVAR(ld_shlibs, $1)=no
4818 fi
4819 ;;
4820
4821 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4822 case `$LD -v 2>&1` in
4823 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4824 _LT_TAGVAR(ld_shlibs, $1)=no
4825 cat <<_LT_EOF 1>&2
4826
4827 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4828 *** reliably create shared libraries on SCO systems. Therefore, libtool
4829 *** is disabling shared libraries support. We urge you to upgrade GNU
4830 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4831 *** your PATH or compiler configuration so that the native linker is
4832 *** used, and then restart.
4833
4834 _LT_EOF
4835 ;;
4836 *)
4837 # For security reasons, it is highly recommended that you always
4838 # use absolute paths for naming shared libraries, and exclude the
4839 # DT_RUNPATH tag from executables and libraries. But doing so
4840 # requires that you compile everything twice, which is a pain.
4841 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4842 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4845 else
4846 _LT_TAGVAR(ld_shlibs, $1)=no
4847 fi
4848 ;;
4849 esac
4850 ;;
4851
4852 sunos4*)
4853 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4854 wlarc=
4855 _LT_TAGVAR(hardcode_direct, $1)=yes
4856 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4857 ;;
4858
4859 *)
4860 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4863 else
4864 _LT_TAGVAR(ld_shlibs, $1)=no
4865 fi
4866 ;;
4867 esac
4868
4869 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4870 runpath_var=
4871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4872 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4873 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4874 fi
4875 else
4876 # PORTME fill in a description of your system's linker (not GNU ld)
4877 case $host_os in
4878 aix3*)
4879 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4880 _LT_TAGVAR(always_export_symbols, $1)=yes
4881 _LT_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'
4882 # Note: this linker hardcodes the directories in LIBPATH if there
4883 # are no directories specified by -L.
4884 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4885 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4886 # Neither direct hardcoding nor static linking is supported with a
4887 # broken collect2.
4888 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4889 fi
4890 ;;
4891
4892 aix[[4-9]]*)
4893 if test "$host_cpu" = ia64; then
4894 # On IA64, the linker does run time linking by default, so we don't
4895 # have to do anything special.
4896 aix_use_runtimelinking=no
4897 exp_sym_flag='-Bexport'
4898 no_entry_flag=""
4899 else
4900 # If we're using GNU nm, then we don't want the "-C" option.
4901 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4902 # Also, AIX nm treats weak defined symbols like other global
4903 # defined symbols, whereas GNU nm marks them as "W".
4904 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4905 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4906 else
4907 _LT_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'
4908 fi
4909 aix_use_runtimelinking=no
4910
4911 # Test if we are trying to use run time linking or normal
4912 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4913 # need to do runtime linking.
4914 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4915 for ld_flag in $LDFLAGS; do
4916 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4917 aix_use_runtimelinking=yes
4918 break
4919 fi
4920 done
4921 ;;
4922 esac
4923
4924 exp_sym_flag='-bexport'
4925 no_entry_flag='-bnoentry'
4926 fi
4927
4928 # When large executables or shared objects are built, AIX ld can
4929 # have problems creating the table of contents. If linking a library
4930 # or program results in "error TOC overflow" add -mminimal-toc to
4931 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4932 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4933
4934 _LT_TAGVAR(archive_cmds, $1)=''
4935 _LT_TAGVAR(hardcode_direct, $1)=yes
4936 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4937 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4938 _LT_TAGVAR(link_all_deplibs, $1)=yes
4939 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4940
4941 if test "$GCC" = yes; then
4942 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4943 # We only want to do this on AIX 4.2 and lower, the check
4944 # below for broken collect2 doesn't work under 4.3+
4945 collect2name=`${CC} -print-prog-name=collect2`
4946 if test -f "$collect2name" &&
4947 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4948 then
4949 # We have reworked collect2
4950 :
4951 else
4952 # We have old collect2
4953 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4954 # It fails to find uninstalled libraries when the uninstalled
4955 # path is not listed in the libpath. Setting hardcode_minus_L
4956 # to unsupported forces relinking
4957 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4958 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4959 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4960 fi
4961 ;;
4962 esac
4963 shared_flag='-shared'
4964 if test "$aix_use_runtimelinking" = yes; then
4965 shared_flag="$shared_flag "'${wl}-G'
4966 fi
4967 else
4968 # not using gcc
4969 if test "$host_cpu" = ia64; then
4970 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4971 # chokes on -Wl,-G. The following line is correct:
4972 shared_flag='-G'
4973 else
4974 if test "$aix_use_runtimelinking" = yes; then
4975 shared_flag='${wl}-G'
4976 else
4977 shared_flag='${wl}-bM:SRE'
4978 fi
4979 fi
4980 fi
4981
4982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4983 # It seems that -bexpall does not export symbols beginning with
4984 # underscore (_), so it is better to generate a list of symbols to export.
4985 _LT_TAGVAR(always_export_symbols, $1)=yes
4986 if test "$aix_use_runtimelinking" = yes; then
4987 # Warning - without using the other runtime loading flags (-brtl),
4988 # -berok will link without error, but may produce a broken library.
4989 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4990 # Determine the default libpath from the value encoded in an
4991 # empty executable.
4992 _LT_SYS_MODULE_PATH_AIX([$1])
4993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4994 _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4995 else
4996 if test "$host_cpu" = ia64; then
4997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4998 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4999 _LT_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"
5000 else
5001 # Determine the default libpath from the value encoded in an
5002 # empty executable.
5003 _LT_SYS_MODULE_PATH_AIX([$1])
5004 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5005 # Warning - without using the other run time loading flags,
5006 # -berok will link without error, but may produce a broken library.
5007 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5008 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5009 if test "$with_gnu_ld" = yes; then
5010 # We only use this code for GNU lds that support --whole-archive.
5011 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5012 else
5013 # Exported symbols can be pulled into shared objects from archives
5014 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5015 fi
5016 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5017 # This is similar to how AIX traditionally builds its shared libraries.
5018 _LT_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'
5019 fi
5020 fi
5021 ;;
5022
5023 amigaos*)
5024 case $host_cpu in
5025 powerpc)
5026 # see comment about AmigaOS4 .so support
5027 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5028 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5029 ;;
5030 m68k)
5031 _LT_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)'
5032 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5033 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5034 ;;
5035 esac
5036 ;;
5037
5038 bsdi[[45]]*)
5039 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5040 ;;
5041
5042 cygwin* | mingw* | pw32* | cegcc*)
5043 # When not using gcc, we currently assume that we are using
5044 # Microsoft Visual C++.
5045 # hardcode_libdir_flag_spec is actually meaningless, as there is
5046 # no search path for DLLs.
5047 case $cc_basename in
5048 cl*)
5049 # Native MSVC
5050 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5051 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5052 _LT_TAGVAR(always_export_symbols, $1)=yes
5053 _LT_TAGVAR(file_list_spec, $1)='@'
5054 # Tell ltmain to make .lib files, not .a files.
5055 libext=lib
5056 # Tell ltmain to make .dll files, not .so files.
5057 shrext_cmds=".dll"
5058 # FIXME: Setting linknames here is a bad hack.
5059 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5060 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5061 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5062 else
5063 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5064 fi~
5065 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5066 linknames='
5067 # The linker will not automatically build a static lib if we build a DLL.
5068 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5069 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5070 _LT_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'
5071 # Don't use ranlib
5072 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5073 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5074 lt_tool_outputfile="@TOOL_OUTPUT@"~
5075 case $lt_outputfile in
5076 *.exe|*.EXE) ;;
5077 *)
5078 lt_outputfile="$lt_outputfile.exe"
5079 lt_tool_outputfile="$lt_tool_outputfile.exe"
5080 ;;
5081 esac~
5082 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5083 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5084 $RM "$lt_outputfile.manifest";
5085 fi'
5086 ;;
5087 *)
5088 # Assume MSVC wrapper
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5090 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5091 # Tell ltmain to make .lib files, not .a files.
5092 libext=lib
5093 # Tell ltmain to make .dll files, not .so files.
5094 shrext_cmds=".dll"
5095 # FIXME: Setting linknames here is a bad hack.
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5097 # The linker will automatically build a .lib file if we build a DLL.
5098 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5099 # FIXME: Should let the user specify the lib program.
5100 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5101 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5102 ;;
5103 esac
5104 ;;
5105
5106 darwin* | rhapsody*)
5107 _LT_DARWIN_LINKER_FEATURES($1)
5108 ;;
5109
5110 dgux*)
5111 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5112 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5113 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5114 ;;
5115
5116 freebsd1*)
5117 _LT_TAGVAR(ld_shlibs, $1)=no
5118 ;;
5119
5120 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5121 # support. Future versions do this automatically, but an explicit c++rt0.o
5122 # does not break anything, and helps significantly (at the cost of a little
5123 # extra space).
5124 freebsd2.2*)
5125 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5126 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5127 _LT_TAGVAR(hardcode_direct, $1)=yes
5128 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5129 ;;
5130
5131 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5132 freebsd2*)
5133 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5134 _LT_TAGVAR(hardcode_direct, $1)=yes
5135 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5136 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5137 ;;
5138
5139 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5140 freebsd* | dragonfly*)
5141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5143 _LT_TAGVAR(hardcode_direct, $1)=yes
5144 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5145 ;;
5146
5147 hpux9*)
5148 if test "$GCC" = yes; then
5149 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5150 else
5151 _LT_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'
5152 fi
5153 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5154 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5155 _LT_TAGVAR(hardcode_direct, $1)=yes
5156
5157 # hardcode_minus_L: Not really in the search PATH,
5158 # but as the default location of the library.
5159 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5160 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5161 ;;
5162
5163 hpux10*)
5164 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5166 else
5167 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5168 fi
5169 if test "$with_gnu_ld" = no; then
5170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5171 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5172 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5173 _LT_TAGVAR(hardcode_direct, $1)=yes
5174 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5175 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5176 # hardcode_minus_L: Not really in the search PATH,
5177 # but as the default location of the library.
5178 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5179 fi
5180 ;;
5181
5182 hpux11*)
5183 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5184 case $host_cpu in
5185 hppa*64*)
5186 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5187 ;;
5188 ia64*)
5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5190 ;;
5191 *)
5192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5193 ;;
5194 esac
5195 else
5196 case $host_cpu in
5197 hppa*64*)
5198 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5199 ;;
5200 ia64*)
5201 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5202 ;;
5203 *)
5204 m4_if($1, [], [
5205 # Older versions of the 11.00 compiler do not understand -b yet
5206 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5207 _LT_LINKER_OPTION([if $CC understands -b],
5208 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5209 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5210 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5211 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5212 ;;
5213 esac
5214 fi
5215 if test "$with_gnu_ld" = no; then
5216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5217 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5218
5219 case $host_cpu in
5220 hppa*64*|ia64*)
5221 _LT_TAGVAR(hardcode_direct, $1)=no
5222 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5223 ;;
5224 *)
5225 _LT_TAGVAR(hardcode_direct, $1)=yes
5226 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5227 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5228
5229 # hardcode_minus_L: Not really in the search PATH,
5230 # but as the default location of the library.
5231 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5232 ;;
5233 esac
5234 fi
5235 ;;
5236
5237 irix5* | irix6* | nonstopux*)
5238 if test "$GCC" = yes; then
5239 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5240 # Try to use the -exported_symbol ld option, if it does not
5241 # work, assume that -exports_file does not work either and
5242 # implicitly export all symbols.
5243 # This should be the same for all languages, so no per-tag cache variable.
5244 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5245 [lt_cv_irix_exported_symbol],
5246 [save_LDFLAGS="$LDFLAGS"
5247 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5248 AC_LINK_IFELSE(
5249 [AC_LANG_SOURCE(
5250 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5251 [C++], [[int foo (void) { return 0; }]],
5252 [Fortran 77], [[
5253 subroutine foo
5254 end]],
5255 [Fortran], [[
5256 subroutine foo
5257 end]])])],
5258 [lt_cv_irix_exported_symbol=yes],
5259 [lt_cv_irix_exported_symbol=no])
5260 LDFLAGS="$save_LDFLAGS"])
5261 if test "$lt_cv_irix_exported_symbol" = yes; then
5262 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5263 fi
5264 else
5265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5266 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5267 fi
5268 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5270 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5271 _LT_TAGVAR(inherit_rpath, $1)=yes
5272 _LT_TAGVAR(link_all_deplibs, $1)=yes
5273 ;;
5274
5275 netbsd*)
5276 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5277 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5278 else
5279 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5280 fi
5281 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5282 _LT_TAGVAR(hardcode_direct, $1)=yes
5283 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5284 ;;
5285
5286 newsos6)
5287 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5288 _LT_TAGVAR(hardcode_direct, $1)=yes
5289 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5290 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5291 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5292 ;;
5293
5294 *nto* | *qnx*)
5295 ;;
5296
5297 openbsd*)
5298 if test -f /usr/libexec/ld.so; then
5299 _LT_TAGVAR(hardcode_direct, $1)=yes
5300 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5301 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5302 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5303 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5304 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5306 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5307 else
5308 case $host_os in
5309 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5310 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5311 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5312 ;;
5313 *)
5314 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5315 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5316 ;;
5317 esac
5318 fi
5319 else
5320 _LT_TAGVAR(ld_shlibs, $1)=no
5321 fi
5322 ;;
5323
5324 os2*)
5325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5326 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5327 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5328 _LT_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'
5329 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5330 ;;
5331
5332 osf3*)
5333 if test "$GCC" = yes; then
5334 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5336 else
5337 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5338 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5339 fi
5340 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5342 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5343 ;;
5344
5345 osf4* | osf5*) # as osf3* with the addition of -msym flag
5346 if test "$GCC" = yes; then
5347 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5350 else
5351 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5353 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5354 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5355
5356 # Both c and cxx compiler support -rpath directly
5357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5358 fi
5359 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5360 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5361 ;;
5362
5363 solaris*)
5364 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5365 if test "$GCC" = yes; then
5366 wlarc='${wl}'
5367 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5368 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5369 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5370 else
5371 case `$CC -V 2>&1` in
5372 *"Compilers 5.0"*)
5373 wlarc=''
5374 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5375 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5376 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5377 ;;
5378 *)
5379 wlarc='${wl}'
5380 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5381 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5382 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5383 ;;
5384 esac
5385 fi
5386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5387 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5388 case $host_os in
5389 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5390 *)
5391 # The compiler driver will combine and reorder linker options,
5392 # but understands `-z linker_flag'. GCC discards it without `$wl',
5393 # but is careful enough not to reorder.
5394 # Supported since Solaris 2.6 (maybe 2.5.1?)
5395 if test "$GCC" = yes; then
5396 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5397 else
5398 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5399 fi
5400 ;;
5401 esac
5402 _LT_TAGVAR(link_all_deplibs, $1)=yes
5403 ;;
5404
5405 sunos4*)
5406 if test "x$host_vendor" = xsequent; then
5407 # Use $CC to link under sequent, because it throws in some extra .o
5408 # files that make .init and .fini sections work.
5409 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5410 else
5411 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5412 fi
5413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5414 _LT_TAGVAR(hardcode_direct, $1)=yes
5415 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5416 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5417 ;;
5418
5419 sysv4)
5420 case $host_vendor in
5421 sni)
5422 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5423 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5424 ;;
5425 siemens)
5426 ## LD is ld it makes a PLAMLIB
5427 ## CC just makes a GrossModule.
5428 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5429 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5430 _LT_TAGVAR(hardcode_direct, $1)=no
5431 ;;
5432 motorola)
5433 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5434 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5435 ;;
5436 esac
5437 runpath_var='LD_RUN_PATH'
5438 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5439 ;;
5440
5441 sysv4.3*)
5442 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5443 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5444 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5445 ;;
5446
5447 sysv4*MP*)
5448 if test -d /usr/nec; then
5449 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5450 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5451 runpath_var=LD_RUN_PATH
5452 hardcode_runpath_var=yes
5453 _LT_TAGVAR(ld_shlibs, $1)=yes
5454 fi
5455 ;;
5456
5457 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5458 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5459 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5460 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5461 runpath_var='LD_RUN_PATH'
5462
5463 if test "$GCC" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5465 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5466 else
5467 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5468 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5469 fi
5470 ;;
5471
5472 sysv5* | sco3.2v5* | sco5v6*)
5473 # Note: We can NOT use -z defs as we might desire, because we do not
5474 # link with -lc, and that would cause any symbols used from libc to
5475 # always be unresolved, which means just about no library would
5476 # ever link correctly. If we're not using GNU ld we use -z text
5477 # though, which does catch some bad symbols but isn't as heavy-handed
5478 # as -z defs.
5479 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5480 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5481 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5482 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5484 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5485 _LT_TAGVAR(link_all_deplibs, $1)=yes
5486 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5487 runpath_var='LD_RUN_PATH'
5488
5489 if test "$GCC" = yes; then
5490 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5491 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5492 else
5493 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5494 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5495 fi
5496 ;;
5497
5498 uts4*)
5499 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5501 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5502 ;;
5503
5504 *)
5505 _LT_TAGVAR(ld_shlibs, $1)=no
5506 ;;
5507 esac
5508
5509 if test x$host_vendor = xsni; then
5510 case $host in
5511 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5513 ;;
5514 esac
5515 fi
5516 fi
5517 ])
5518 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5519 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5520
5521 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5522
5523 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5524 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5525 _LT_DECL([], [extract_expsyms_cmds], [2],
5526 [The commands to extract the exported symbol list from a shared archive])
5527
5528 #
5529 # Do we need to explicitly link libc?
5530 #
5531 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5532 x|xyes)
5533 # Assume -lc should be added
5534 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5535
5536 if test "$enable_shared" = yes && test "$GCC" = yes; then
5537 case $_LT_TAGVAR(archive_cmds, $1) in
5538 *'~'*)
5539 # FIXME: we may have to deal with multi-command sequences.
5540 ;;
5541 '$CC '*)
5542 # Test whether the compiler implicitly links with -lc since on some
5543 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5544 # to ld, don't add -lc before -lgcc.
5545 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5546 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5547 [$RM conftest*
5548 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5549
5550 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5551 soname=conftest
5552 lib=conftest
5553 libobjs=conftest.$ac_objext
5554 deplibs=
5555 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5556 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5557 compiler_flags=-v
5558 linker_flags=-v
5559 verstring=
5560 output_objdir=.
5561 libname=conftest
5562 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5563 _LT_TAGVAR(allow_undefined_flag, $1)=
5564 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5565 then
5566 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5567 else
5568 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5569 fi
5570 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5571 else
5572 cat conftest.err 1>&5
5573 fi
5574 $RM conftest*
5575 ])
5576 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5577 ;;
5578 esac
5579 fi
5580 ;;
5581 esac
5582
5583 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5584 [Whether or not to add -lc for building shared libraries])
5585 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5586 [enable_shared_with_static_runtimes], [0],
5587 [Whether or not to disallow shared libs when runtime libs are static])
5588 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5589 [Compiler flag to allow reflexive dlopens])
5590 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5591 [Compiler flag to generate shared objects directly from archives])
5592 _LT_TAGDECL([], [compiler_needs_object], [1],
5593 [Whether the compiler copes with passing no objects directly])
5594 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5595 [Create an old-style archive from a shared archive])
5596 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5597 [Create a temporary old-style archive to link instead of a shared archive])
5598 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5599 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5600 _LT_TAGDECL([], [module_cmds], [2],
5601 [Commands used to build a loadable module if different from building
5602 a shared archive.])
5603 _LT_TAGDECL([], [module_expsym_cmds], [2])
5604 _LT_TAGDECL([], [with_gnu_ld], [1],
5605 [Whether we are building with GNU ld or not])
5606 _LT_TAGDECL([], [allow_undefined_flag], [1],
5607 [Flag that allows shared libraries with undefined symbols to be built])
5608 _LT_TAGDECL([], [no_undefined_flag], [1],
5609 [Flag that enforces no undefined symbols])
5610 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5611 [Flag to hardcode $libdir into a binary during linking.
5612 This must work even if $libdir does not exist])
5613 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5614 [[If ld is used when linking, flag to hardcode $libdir into a binary
5615 during linking. This must work even if $libdir does not exist]])
5616 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5617 [Whether we need a single "-rpath" flag with a separated argument])
5618 _LT_TAGDECL([], [hardcode_direct], [0],
5619 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5620 DIR into the resulting binary])
5621 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5622 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5623 DIR into the resulting binary and the resulting library dependency is
5624 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5625 library is relocated])
5626 _LT_TAGDECL([], [hardcode_minus_L], [0],
5627 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5628 into the resulting binary])
5629 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5630 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5631 into the resulting binary])
5632 _LT_TAGDECL([], [hardcode_automatic], [0],
5633 [Set to "yes" if building a shared library automatically hardcodes DIR
5634 into the library and all subsequent libraries and executables linked
5635 against it])
5636 _LT_TAGDECL([], [inherit_rpath], [0],
5637 [Set to yes if linker adds runtime paths of dependent libraries
5638 to runtime path list])
5639 _LT_TAGDECL([], [link_all_deplibs], [0],
5640 [Whether libtool must link a program against all its dependency libraries])
5641 _LT_TAGDECL([], [always_export_symbols], [0],
5642 [Set to "yes" if exported symbols are required])
5643 _LT_TAGDECL([], [export_symbols_cmds], [2],
5644 [The commands to list exported symbols])
5645 _LT_TAGDECL([], [exclude_expsyms], [1],
5646 [Symbols that should not be listed in the preloaded symbols])
5647 _LT_TAGDECL([], [include_expsyms], [1],
5648 [Symbols that must always be exported])
5649 _LT_TAGDECL([], [prelink_cmds], [2],
5650 [Commands necessary for linking programs (against libraries) with templates])
5651 _LT_TAGDECL([], [postlink_cmds], [2],
5652 [Commands necessary for finishing linking programs])
5653 _LT_TAGDECL([], [file_list_spec], [1],
5654 [Specify filename containing input files])
5655 dnl FIXME: Not yet implemented
5656 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5657 dnl [Compiler flag to generate thread safe objects])
5658 ])# _LT_LINKER_SHLIBS
5659
5660
5661 # _LT_LANG_C_CONFIG([TAG])
5662 # ------------------------
5663 # Ensure that the configuration variables for a C compiler are suitably
5664 # defined. These variables are subsequently used by _LT_CONFIG to write
5665 # the compiler configuration to `libtool'.
5666 m4_defun([_LT_LANG_C_CONFIG],
5667 [m4_require([_LT_DECL_EGREP])dnl
5668 lt_save_CC="$CC"
5669 AC_LANG_PUSH(C)
5670
5671 # Source file extension for C test sources.
5672 ac_ext=c
5673
5674 # Object file extension for compiled C test sources.
5675 objext=o
5676 _LT_TAGVAR(objext, $1)=$objext
5677
5678 # Code to be used in simple compile tests
5679 lt_simple_compile_test_code="int some_variable = 0;"
5680
5681 # Code to be used in simple link tests
5682 lt_simple_link_test_code='int main(){return(0);}'
5683
5684 _LT_TAG_COMPILER
5685 # Save the default compiler, since it gets overwritten when the other
5686 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5687 compiler_DEFAULT=$CC
5688
5689 # save warnings/boilerplate of simple test code
5690 _LT_COMPILER_BOILERPLATE
5691 _LT_LINKER_BOILERPLATE
5692
5693 ## CAVEAT EMPTOR:
5694 ## There is no encapsulation within the following macros, do not change
5695 ## the running order or otherwise move them around unless you know exactly
5696 ## what you are doing...
5697 if test -n "$compiler"; then
5698 _LT_COMPILER_NO_RTTI($1)
5699 _LT_COMPILER_PIC($1)
5700 _LT_COMPILER_C_O($1)
5701 _LT_COMPILER_FILE_LOCKS($1)
5702 _LT_LINKER_SHLIBS($1)
5703 _LT_SYS_DYNAMIC_LINKER($1)
5704 _LT_LINKER_HARDCODE_LIBPATH($1)
5705 LT_SYS_DLOPEN_SELF
5706 _LT_CMD_STRIPLIB
5707
5708 # Report which library types will actually be built
5709 AC_MSG_CHECKING([if libtool supports shared libraries])
5710 AC_MSG_RESULT([$can_build_shared])
5711
5712 AC_MSG_CHECKING([whether to build shared libraries])
5713 test "$can_build_shared" = "no" && enable_shared=no
5714
5715 # On AIX, shared libraries and static libraries use the same namespace, and
5716 # are all built from PIC.
5717 case $host_os in
5718 aix3*)
5719 test "$enable_shared" = yes && enable_static=no
5720 if test -n "$RANLIB"; then
5721 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5722 postinstall_cmds='$RANLIB $lib'
5723 fi
5724 ;;
5725
5726 aix[[4-9]]*)
5727 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5728 test "$enable_shared" = yes && enable_static=no
5729 fi
5730 ;;
5731 esac
5732 AC_MSG_RESULT([$enable_shared])
5733
5734 AC_MSG_CHECKING([whether to build static libraries])
5735 # Make sure either enable_shared or enable_static is yes.
5736 test "$enable_shared" = yes || enable_static=yes
5737 AC_MSG_RESULT([$enable_static])
5738
5739 _LT_CONFIG($1)
5740 fi
5741 AC_LANG_POP
5742 CC="$lt_save_CC"
5743 ])# _LT_LANG_C_CONFIG
5744
5745
5746 # _LT_LANG_CXX_CONFIG([TAG])
5747 # --------------------------
5748 # Ensure that the configuration variables for a C++ compiler are suitably
5749 # defined. These variables are subsequently used by _LT_CONFIG to write
5750 # the compiler configuration to `libtool'.
5751 m4_defun([_LT_LANG_CXX_CONFIG],
5752 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5753 m4_require([_LT_DECL_EGREP])dnl
5754 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5755 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5756 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5757 (test "X$CXX" != "Xg++"))) ; then
5758 AC_PROG_CXXCPP
5759 else
5760 _lt_caught_CXX_error=yes
5761 fi
5762
5763 AC_LANG_PUSH(C++)
5764 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5765 _LT_TAGVAR(allow_undefined_flag, $1)=
5766 _LT_TAGVAR(always_export_symbols, $1)=no
5767 _LT_TAGVAR(archive_expsym_cmds, $1)=
5768 _LT_TAGVAR(compiler_needs_object, $1)=no
5769 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5770 _LT_TAGVAR(hardcode_direct, $1)=no
5771 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5772 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5773 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5774 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5775 _LT_TAGVAR(hardcode_minus_L, $1)=no
5776 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5777 _LT_TAGVAR(hardcode_automatic, $1)=no
5778 _LT_TAGVAR(inherit_rpath, $1)=no
5779 _LT_TAGVAR(module_cmds, $1)=
5780 _LT_TAGVAR(module_expsym_cmds, $1)=
5781 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5782 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5783 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5784 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5785 _LT_TAGVAR(no_undefined_flag, $1)=
5786 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5787 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5788
5789 # Source file extension for C++ test sources.
5790 ac_ext=cpp
5791
5792 # Object file extension for compiled C++ test sources.
5793 objext=o
5794 _LT_TAGVAR(objext, $1)=$objext
5795
5796 # No sense in running all these tests if we already determined that
5797 # the CXX compiler isn't working. Some variables (like enable_shared)
5798 # are currently assumed to apply to all compilers on this platform,
5799 # and will be corrupted by setting them based on a non-working compiler.
5800 if test "$_lt_caught_CXX_error" != yes; then
5801 # Code to be used in simple compile tests
5802 lt_simple_compile_test_code="int some_variable = 0;"
5803
5804 # Code to be used in simple link tests
5805 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5806
5807 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5808 _LT_TAG_COMPILER
5809
5810 # save warnings/boilerplate of simple test code
5811 _LT_COMPILER_BOILERPLATE
5812 _LT_LINKER_BOILERPLATE
5813
5814 # Allow CC to be a program name with arguments.
5815 lt_save_CC=$CC
5816 lt_save_CFLAGS=$CFLAGS
5817 lt_save_LD=$LD
5818 lt_save_GCC=$GCC
5819 GCC=$GXX
5820 lt_save_with_gnu_ld=$with_gnu_ld
5821 lt_save_path_LD=$lt_cv_path_LD
5822 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5823 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5824 else
5825 $as_unset lt_cv_prog_gnu_ld
5826 fi
5827 if test -n "${lt_cv_path_LDCXX+set}"; then
5828 lt_cv_path_LD=$lt_cv_path_LDCXX
5829 else
5830 $as_unset lt_cv_path_LD
5831 fi
5832 test -z "${LDCXX+set}" || LD=$LDCXX
5833 CC=${CXX-"c++"}
5834 CFLAGS=$CXXFLAGS
5835 compiler=$CC
5836 _LT_TAGVAR(compiler, $1)=$CC
5837 _LT_CC_BASENAME([$compiler])
5838
5839 if test -n "$compiler"; then
5840 # We don't want -fno-exception when compiling C++ code, so set the
5841 # no_builtin_flag separately
5842 if test "$GXX" = yes; then
5843 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5844 else
5845 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5846 fi
5847
5848 if test "$GXX" = yes; then
5849 # Set up default GNU C++ configuration
5850
5851 LT_PATH_LD
5852
5853 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5854 # archiving commands below assume that GNU ld is being used.
5855 if test "$with_gnu_ld" = yes; then
5856 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5857 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5858
5859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5860 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5861
5862 # If archive_cmds runs LD, not CC, wlarc should be empty
5863 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5864 # investigate it a little bit more. (MM)
5865 wlarc='${wl}'
5866
5867 # ancient GNU ld didn't support --whole-archive et. al.
5868 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5869 $GREP 'no-whole-archive' > /dev/null; then
5870 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5871 else
5872 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5873 fi
5874 else
5875 with_gnu_ld=no
5876 wlarc=
5877
5878 # A generic and very simple default shared library creation
5879 # command for GNU C++ for the case where it uses the native
5880 # linker, instead of GNU ld. If possible, this setting should
5881 # overridden to take advantage of the native linker features on
5882 # the platform it is being used on.
5883 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5884 fi
5885
5886 # Commands to make compiler produce verbose output that lists
5887 # what "hidden" libraries, object files and flags are used when
5888 # linking a shared library.
5889 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5890
5891 else
5892 GXX=no
5893 with_gnu_ld=no
5894 wlarc=
5895 fi
5896
5897 # PORTME: fill in a description of your system's C++ link characteristics
5898 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5899 _LT_TAGVAR(ld_shlibs, $1)=yes
5900 case $host_os in
5901 aix3*)
5902 # FIXME: insert proper C++ library support
5903 _LT_TAGVAR(ld_shlibs, $1)=no
5904 ;;
5905 aix[[4-9]]*)
5906 if test "$host_cpu" = ia64; then
5907 # On IA64, the linker does run time linking by default, so we don't
5908 # have to do anything special.
5909 aix_use_runtimelinking=no
5910 exp_sym_flag='-Bexport'
5911 no_entry_flag=""
5912 else
5913 aix_use_runtimelinking=no
5914
5915 # Test if we are trying to use run time linking or normal
5916 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5917 # need to do runtime linking.
5918 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5919 for ld_flag in $LDFLAGS; do
5920 case $ld_flag in
5921 *-brtl*)
5922 aix_use_runtimelinking=yes
5923 break
5924 ;;
5925 esac
5926 done
5927 ;;
5928 esac
5929
5930 exp_sym_flag='-bexport'
5931 no_entry_flag='-bnoentry'
5932 fi
5933
5934 # When large executables or shared objects are built, AIX ld can
5935 # have problems creating the table of contents. If linking a library
5936 # or program results in "error TOC overflow" add -mminimal-toc to
5937 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5938 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5939
5940 _LT_TAGVAR(archive_cmds, $1)=''
5941 _LT_TAGVAR(hardcode_direct, $1)=yes
5942 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5943 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5944 _LT_TAGVAR(link_all_deplibs, $1)=yes
5945 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5946
5947 if test "$GXX" = yes; then
5948 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5949 # We only want to do this on AIX 4.2 and lower, the check
5950 # below for broken collect2 doesn't work under 4.3+
5951 collect2name=`${CC} -print-prog-name=collect2`
5952 if test -f "$collect2name" &&
5953 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5954 then
5955 # We have reworked collect2
5956 :
5957 else
5958 # We have old collect2
5959 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5960 # It fails to find uninstalled libraries when the uninstalled
5961 # path is not listed in the libpath. Setting hardcode_minus_L
5962 # to unsupported forces relinking
5963 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5966 fi
5967 esac
5968 shared_flag='-shared'
5969 if test "$aix_use_runtimelinking" = yes; then
5970 shared_flag="$shared_flag "'${wl}-G'
5971 fi
5972 else
5973 # not using gcc
5974 if test "$host_cpu" = ia64; then
5975 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5976 # chokes on -Wl,-G. The following line is correct:
5977 shared_flag='-G'
5978 else
5979 if test "$aix_use_runtimelinking" = yes; then
5980 shared_flag='${wl}-G'
5981 else
5982 shared_flag='${wl}-bM:SRE'
5983 fi
5984 fi
5985 fi
5986
5987 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5988 # It seems that -bexpall does not export symbols beginning with
5989 # underscore (_), so it is better to generate a list of symbols to
5990 # export.
5991 _LT_TAGVAR(always_export_symbols, $1)=yes
5992 if test "$aix_use_runtimelinking" = yes; then
5993 # Warning - without using the other runtime loading flags (-brtl),
5994 # -berok will link without error, but may produce a broken library.
5995 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5996 # Determine the default libpath from the value encoded in an empty
5997 # executable.
5998 _LT_SYS_MODULE_PATH_AIX([$1])
5999 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6000
6001 _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6002 else
6003 if test "$host_cpu" = ia64; then
6004 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6005 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6006 _LT_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"
6007 else
6008 # Determine the default libpath from the value encoded in an
6009 # empty executable.
6010 _LT_SYS_MODULE_PATH_AIX([$1])
6011 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6012 # Warning - without using the other run time loading flags,
6013 # -berok will link without error, but may produce a broken library.
6014 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6015 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6016 if test "$with_gnu_ld" = yes; then
6017 # We only use this code for GNU lds that support --whole-archive.
6018 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6019 else
6020 # Exported symbols can be pulled into shared objects from archives
6021 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6022 fi
6023 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6024 # This is similar to how AIX traditionally builds its shared
6025 # libraries.
6026 _LT_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'
6027 fi
6028 fi
6029 ;;
6030
6031 beos*)
6032 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6033 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6034 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6035 # support --undefined. This deserves some investigation. FIXME
6036 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6037 else
6038 _LT_TAGVAR(ld_shlibs, $1)=no
6039 fi
6040 ;;
6041
6042 chorus*)
6043 case $cc_basename in
6044 *)
6045 # FIXME: insert proper C++ library support
6046 _LT_TAGVAR(ld_shlibs, $1)=no
6047 ;;
6048 esac
6049 ;;
6050
6051 cygwin* | mingw* | pw32* | cegcc*)
6052 case $GXX,$cc_basename in
6053 ,cl* | no,cl*)
6054 # Native MSVC
6055 # hardcode_libdir_flag_spec is actually meaningless, as there is
6056 # no search path for DLLs.
6057 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6058 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6059 _LT_TAGVAR(always_export_symbols, $1)=yes
6060 _LT_TAGVAR(file_list_spec, $1)='@'
6061 # Tell ltmain to make .lib files, not .a files.
6062 libext=lib
6063 # Tell ltmain to make .dll files, not .so files.
6064 shrext_cmds=".dll"
6065 # FIXME: Setting linknames here is a bad hack.
6066 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6067 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6068 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6069 else
6070 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6071 fi~
6072 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6073 linknames='
6074 # The linker will not automatically build a static lib if we build a DLL.
6075 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6076 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6077 # Don't use ranlib
6078 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6079 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6080 lt_tool_outputfile="@TOOL_OUTPUT@"~
6081 case $lt_outputfile in
6082 *.exe|*.EXE) ;;
6083 *)
6084 lt_outputfile="$lt_outputfile.exe"
6085 lt_tool_outputfile="$lt_tool_outputfile.exe"
6086 ;;
6087 esac~
6088 func_to_tool_file "$lt_outputfile"~
6089 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6090 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6091 $RM "$lt_outputfile.manifest";
6092 fi'
6093 ;;
6094 *)
6095 # g++
6096 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6097 # as there is no search path for DLLs.
6098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6099 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6100 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6101 _LT_TAGVAR(always_export_symbols, $1)=no
6102 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6103
6104 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6105 _LT_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'
6106 # If the export-symbols file already is a .def file (1st line
6107 # is EXPORTS), use it as is; otherwise, prepend...
6108 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6109 cp $export_symbols $output_objdir/$soname.def;
6110 else
6111 echo EXPORTS > $output_objdir/$soname.def;
6112 cat $export_symbols >> $output_objdir/$soname.def;
6113 fi~
6114 $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'
6115 else
6116 _LT_TAGVAR(ld_shlibs, $1)=no
6117 fi
6118 ;;
6119 esac
6120 ;;
6121 darwin* | rhapsody*)
6122 _LT_DARWIN_LINKER_FEATURES($1)
6123 ;;
6124
6125 dgux*)
6126 case $cc_basename in
6127 ec++*)
6128 # FIXME: insert proper C++ library support
6129 _LT_TAGVAR(ld_shlibs, $1)=no
6130 ;;
6131 ghcx*)
6132 # Green Hills C++ Compiler
6133 # FIXME: insert proper C++ library support
6134 _LT_TAGVAR(ld_shlibs, $1)=no
6135 ;;
6136 *)
6137 # FIXME: insert proper C++ library support
6138 _LT_TAGVAR(ld_shlibs, $1)=no
6139 ;;
6140 esac
6141 ;;
6142
6143 freebsd[[12]]*)
6144 # C++ shared libraries reported to be fairly broken before
6145 # switch to ELF
6146 _LT_TAGVAR(ld_shlibs, $1)=no
6147 ;;
6148
6149 freebsd-elf*)
6150 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6151 ;;
6152
6153 freebsd* | dragonfly*)
6154 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6155 # conventions
6156 _LT_TAGVAR(ld_shlibs, $1)=yes
6157 ;;
6158
6159 gnu*)
6160 ;;
6161
6162 haiku*)
6163 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6164 _LT_TAGVAR(link_all_deplibs, $1)=yes
6165 ;;
6166
6167 hpux9*)
6168 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6169 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6170 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6171 _LT_TAGVAR(hardcode_direct, $1)=yes
6172 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6173 # but as the default
6174 # location of the library.
6175
6176 case $cc_basename in
6177 CC*)
6178 # FIXME: insert proper C++ library support
6179 _LT_TAGVAR(ld_shlibs, $1)=no
6180 ;;
6181 aCC*)
6182 _LT_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'
6183 # Commands to make compiler produce verbose output that lists
6184 # what "hidden" libraries, object files and flags are used when
6185 # linking a shared library.
6186 #
6187 # There doesn't appear to be a way to prevent this compiler from
6188 # explicitly linking system object files so we need to strip them
6189 # from the output so that they don't get included in the library
6190 # dependencies.
6191 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6192 ;;
6193 *)
6194 if test "$GXX" = yes; then
6195 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
6196 else
6197 # FIXME: insert proper C++ library support
6198 _LT_TAGVAR(ld_shlibs, $1)=no
6199 fi
6200 ;;
6201 esac
6202 ;;
6203
6204 hpux10*|hpux11*)
6205 if test $with_gnu_ld = no; then
6206 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6207 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6208
6209 case $host_cpu in
6210 hppa*64*|ia64*)
6211 ;;
6212 *)
6213 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6214 ;;
6215 esac
6216 fi
6217 case $host_cpu in
6218 hppa*64*|ia64*)
6219 _LT_TAGVAR(hardcode_direct, $1)=no
6220 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6221 ;;
6222 *)
6223 _LT_TAGVAR(hardcode_direct, $1)=yes
6224 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6225 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6226 # but as the default
6227 # location of the library.
6228 ;;
6229 esac
6230
6231 case $cc_basename in
6232 CC*)
6233 # FIXME: insert proper C++ library support
6234 _LT_TAGVAR(ld_shlibs, $1)=no
6235 ;;
6236 aCC*)
6237 case $host_cpu in
6238 hppa*64*)
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6240 ;;
6241 ia64*)
6242 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6243 ;;
6244 *)
6245 _LT_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'
6246 ;;
6247 esac
6248 # Commands to make compiler produce verbose output that lists
6249 # what "hidden" libraries, object files and flags are used when
6250 # linking a shared library.
6251 #
6252 # There doesn't appear to be a way to prevent this compiler from
6253 # explicitly linking system object files so we need to strip them
6254 # from the output so that they don't get included in the library
6255 # dependencies.
6256 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; func_echo_all "$list"'
6257 ;;
6258 *)
6259 if test "$GXX" = yes; then
6260 if test $with_gnu_ld = no; then
6261 case $host_cpu in
6262 hppa*64*)
6263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6264 ;;
6265 ia64*)
6266 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6267 ;;
6268 *)
6269 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6270 ;;
6271 esac
6272 fi
6273 else
6274 # FIXME: insert proper C++ library support
6275 _LT_TAGVAR(ld_shlibs, $1)=no
6276 fi
6277 ;;
6278 esac
6279 ;;
6280
6281 interix[[3-9]]*)
6282 _LT_TAGVAR(hardcode_direct, $1)=no
6283 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6284 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6285 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6286 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6287 # Instead, shared libraries are loaded at an image base (0x10000000 by
6288 # default) and relocated if they conflict, which is a slow very memory
6289 # consuming and fragmenting process. To avoid this, we pick a random,
6290 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6291 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6292 _LT_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'
6293 _LT_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'
6294 ;;
6295 irix5* | irix6*)
6296 case $cc_basename in
6297 CC*)
6298 # SGI C++
6299 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6300
6301 # Archives containing C++ object files must be created using
6302 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6303 # necessary to make sure instantiated templates are included
6304 # in the archive.
6305 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6306 ;;
6307 *)
6308 if test "$GXX" = yes; then
6309 if test "$with_gnu_ld" = no; then
6310 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6311 else
6312 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6313 fi
6314 fi
6315 _LT_TAGVAR(link_all_deplibs, $1)=yes
6316 ;;
6317 esac
6318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6319 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6320 _LT_TAGVAR(inherit_rpath, $1)=yes
6321 ;;
6322
6323 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6324 case $cc_basename in
6325 KCC*)
6326 # Kuck and Associates, Inc. (KAI) C++ Compiler
6327
6328 # KCC will only create a shared library if the output file
6329 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6330 # to its proper name (with version) after linking.
6331 _LT_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'
6332 _LT_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'
6333 # Commands to make compiler produce verbose output that lists
6334 # what "hidden" libraries, object files and flags are used when
6335 # linking a shared library.
6336 #
6337 # There doesn't appear to be a way to prevent this compiler from
6338 # explicitly linking system object files so we need to strip them
6339 # from the output so that they don't get included in the library
6340 # dependencies.
6341 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; func_echo_all "$list"'
6342
6343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6344 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6345
6346 # Archives containing C++ object files must be created using
6347 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6348 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6349 ;;
6350 icpc* | ecpc* )
6351 # Intel C++
6352 with_gnu_ld=yes
6353 # version 8.0 and above of icpc choke on multiply defined symbols
6354 # if we add $predep_objects and $postdep_objects, however 7.1 and
6355 # earlier do not add the objects themselves.
6356 case `$CC -V 2>&1` in
6357 *"Version 7."*)
6358 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6359 _LT_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'
6360 ;;
6361 *) # Version 8.0 or newer
6362 tmp_idyn=
6363 case $host_cpu in
6364 ia64*) tmp_idyn=' -i_dynamic';;
6365 esac
6366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6367 _LT_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'
6368 ;;
6369 esac
6370 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6371 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6372 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6373 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6374 ;;
6375 pgCC* | pgcpp*)
6376 # Portland Group C++ compiler
6377 case `$CC -V` in
6378 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6379 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6380 rm -rf $tpldir~
6381 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6382 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6383 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6384 rm -rf $tpldir~
6385 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6386 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6387 $RANLIB $oldlib'
6388 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6389 rm -rf $tpldir~
6390 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6391 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6392 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6393 rm -rf $tpldir~
6394 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6395 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6396 ;;
6397 *) # Version 6 and above use weak symbols
6398 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6399 _LT_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'
6400 ;;
6401 esac
6402
6403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6404 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6405 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6406 ;;
6407 cxx*)
6408 # Compaq C++
6409 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6410 _LT_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'
6411
6412 runpath_var=LD_RUN_PATH
6413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6414 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6415
6416 # Commands to make compiler produce verbose output that lists
6417 # what "hidden" libraries, object files and flags are used when
6418 # linking a shared library.
6419 #
6420 # There doesn't appear to be a way to prevent this compiler from
6421 # explicitly linking system object files so we need to strip them
6422 # from the output so that they don't get included in the library
6423 # dependencies.
6424 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
6425 ;;
6426 xl* | mpixl* | bgxl*)
6427 # IBM XL 8.0 on PPC, with GNU ld
6428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6429 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6430 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6431 if test "x$supports_anon_versioning" = xyes; then
6432 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6433 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6434 echo "local: *; };" >> $output_objdir/$libname.ver~
6435 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6436 fi
6437 ;;
6438 *)
6439 case `$CC -V 2>&1 | sed 5q` in
6440 *Sun\ C*)
6441 # Sun C++ 5.9
6442 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6443 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6444 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6446 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6447 _LT_TAGVAR(compiler_needs_object, $1)=yes
6448
6449 # Not sure whether something based on
6450 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6451 # would be better.
6452 output_verbose_link_cmd='func_echo_all'
6453
6454 # Archives containing C++ object files must be created using
6455 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6456 # necessary to make sure instantiated templates are included
6457 # in the archive.
6458 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6459 ;;
6460 esac
6461 ;;
6462 esac
6463 ;;
6464
6465 lynxos*)
6466 # FIXME: insert proper C++ library support
6467 _LT_TAGVAR(ld_shlibs, $1)=no
6468 ;;
6469
6470 m88k*)
6471 # FIXME: insert proper C++ library support
6472 _LT_TAGVAR(ld_shlibs, $1)=no
6473 ;;
6474
6475 mvs*)
6476 case $cc_basename in
6477 cxx*)
6478 # FIXME: insert proper C++ library support
6479 _LT_TAGVAR(ld_shlibs, $1)=no
6480 ;;
6481 *)
6482 # FIXME: insert proper C++ library support
6483 _LT_TAGVAR(ld_shlibs, $1)=no
6484 ;;
6485 esac
6486 ;;
6487
6488 netbsd*)
6489 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6490 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6491 wlarc=
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6493 _LT_TAGVAR(hardcode_direct, $1)=yes
6494 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6495 fi
6496 # Workaround some broken pre-1.5 toolchains
6497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6498 ;;
6499
6500 *nto* | *qnx*)
6501 _LT_TAGVAR(ld_shlibs, $1)=yes
6502 ;;
6503
6504 openbsd2*)
6505 # C++ shared libraries are fairly broken
6506 _LT_TAGVAR(ld_shlibs, $1)=no
6507 ;;
6508
6509 openbsd*)
6510 if test -f /usr/libexec/ld.so; then
6511 _LT_TAGVAR(hardcode_direct, $1)=yes
6512 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6514 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6516 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6517 _LT_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'
6518 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6519 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6520 fi
6521 output_verbose_link_cmd=func_echo_all
6522 else
6523 _LT_TAGVAR(ld_shlibs, $1)=no
6524 fi
6525 ;;
6526
6527 osf3* | osf4* | osf5*)
6528 case $cc_basename in
6529 KCC*)
6530 # Kuck and Associates, Inc. (KAI) C++ Compiler
6531
6532 # KCC will only create a shared library if the output file
6533 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6534 # to its proper name (with version) after linking.
6535 _LT_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'
6536
6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6538 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6539
6540 # Archives containing C++ object files must be created using
6541 # the KAI C++ compiler.
6542 case $host in
6543 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6544 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6545 esac
6546 ;;
6547 RCC*)
6548 # Rational C++ 2.4.1
6549 # FIXME: insert proper C++ library support
6550 _LT_TAGVAR(ld_shlibs, $1)=no
6551 ;;
6552 cxx*)
6553 case $host in
6554 osf3*)
6555 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6556 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6557 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6558 ;;
6559 *)
6560 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6561 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6562 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6563 echo "-hidden">> $lib.exp~
6564 $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~
6565 $RM $lib.exp'
6566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6567 ;;
6568 esac
6569
6570 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6571
6572 # Commands to make compiler produce verbose output that lists
6573 # what "hidden" libraries, object files and flags are used when
6574 # linking a shared library.
6575 #
6576 # There doesn't appear to be a way to prevent this compiler from
6577 # explicitly linking system object files so we need to strip them
6578 # from the output so that they don't get included in the library
6579 # dependencies.
6580 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
6581 ;;
6582 *)
6583 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6584 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6585 case $host in
6586 osf3*)
6587 _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6588 ;;
6589 *)
6590 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6591 ;;
6592 esac
6593
6594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6595 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6596
6597 # Commands to make compiler produce verbose output that lists
6598 # what "hidden" libraries, object files and flags are used when
6599 # linking a shared library.
6600 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6601
6602 else
6603 # FIXME: insert proper C++ library support
6604 _LT_TAGVAR(ld_shlibs, $1)=no
6605 fi
6606 ;;
6607 esac
6608 ;;
6609
6610 psos*)
6611 # FIXME: insert proper C++ library support
6612 _LT_TAGVAR(ld_shlibs, $1)=no
6613 ;;
6614
6615 sunos4*)
6616 case $cc_basename in
6617 CC*)
6618 # Sun C++ 4.x
6619 # FIXME: insert proper C++ library support
6620 _LT_TAGVAR(ld_shlibs, $1)=no
6621 ;;
6622 lcc*)
6623 # Lucid
6624 # FIXME: insert proper C++ library support
6625 _LT_TAGVAR(ld_shlibs, $1)=no
6626 ;;
6627 *)
6628 # FIXME: insert proper C++ library support
6629 _LT_TAGVAR(ld_shlibs, $1)=no
6630 ;;
6631 esac
6632 ;;
6633
6634 solaris*)
6635 case $cc_basename in
6636 CC* | sunCC*)
6637 # Sun C++ 4.2, 5.x and Centerline C++
6638 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6639 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6640 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6641 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6642 $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'
6643
6644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6645 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6646 case $host_os in
6647 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6648 *)
6649 # The compiler driver will combine and reorder linker options,
6650 # but understands `-z linker_flag'.
6651 # Supported since Solaris 2.6 (maybe 2.5.1?)
6652 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6653 ;;
6654 esac
6655 _LT_TAGVAR(link_all_deplibs, $1)=yes
6656
6657 output_verbose_link_cmd='func_echo_all'
6658
6659 # Archives containing C++ object files must be created using
6660 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6661 # necessary to make sure instantiated templates are included
6662 # in the archive.
6663 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6664 ;;
6665 gcx*)
6666 # Green Hills C++ Compiler
6667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6668
6669 # The C++ compiler must be used to create the archive.
6670 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6671 ;;
6672 *)
6673 # GNU C++ compiler with Solaris linker
6674 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6675 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6676 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6677 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6678 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6679 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6680
6681 # Commands to make compiler produce verbose output that lists
6682 # what "hidden" libraries, object files and flags are used when
6683 # linking a shared library.
6684 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6685 else
6686 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6687 # platform.
6688 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6689 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6690 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6691
6692 # Commands to make compiler produce verbose output that lists
6693 # what "hidden" libraries, object files and flags are used when
6694 # linking a shared library.
6695 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6696 fi
6697
6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6699 case $host_os in
6700 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6701 *)
6702 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6703 ;;
6704 esac
6705 fi
6706 ;;
6707 esac
6708 ;;
6709
6710 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6711 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6712 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6713 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6714 runpath_var='LD_RUN_PATH'
6715
6716 case $cc_basename in
6717 CC*)
6718 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6719 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6720 ;;
6721 *)
6722 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6723 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6724 ;;
6725 esac
6726 ;;
6727
6728 sysv5* | sco3.2v5* | sco5v6*)
6729 # Note: We can NOT use -z defs as we might desire, because we do not
6730 # link with -lc, and that would cause any symbols used from libc to
6731 # always be unresolved, which means just about no library would
6732 # ever link correctly. If we're not using GNU ld we use -z text
6733 # though, which does catch some bad symbols but isn't as heavy-handed
6734 # as -z defs.
6735 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6736 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6737 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6740 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6741 _LT_TAGVAR(link_all_deplibs, $1)=yes
6742 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6743 runpath_var='LD_RUN_PATH'
6744
6745 case $cc_basename in
6746 CC*)
6747 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6748 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6749 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6750 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6751 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6752 '"$_LT_TAGVAR(reload_cmds, $1)"
6753 ;;
6754 *)
6755 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6756 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6757 ;;
6758 esac
6759 ;;
6760
6761 tandem*)
6762 case $cc_basename in
6763 NCC*)
6764 # NonStop-UX NCC 3.20
6765 # FIXME: insert proper C++ library support
6766 _LT_TAGVAR(ld_shlibs, $1)=no
6767 ;;
6768 *)
6769 # FIXME: insert proper C++ library support
6770 _LT_TAGVAR(ld_shlibs, $1)=no
6771 ;;
6772 esac
6773 ;;
6774
6775 vxworks*)
6776 # FIXME: insert proper C++ library support
6777 _LT_TAGVAR(ld_shlibs, $1)=no
6778 ;;
6779
6780 *)
6781 # FIXME: insert proper C++ library support
6782 _LT_TAGVAR(ld_shlibs, $1)=no
6783 ;;
6784 esac
6785
6786 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6787 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6788
6789 _LT_TAGVAR(GCC, $1)="$GXX"
6790 _LT_TAGVAR(LD, $1)="$LD"
6791
6792 ## CAVEAT EMPTOR:
6793 ## There is no encapsulation within the following macros, do not change
6794 ## the running order or otherwise move them around unless you know exactly
6795 ## what you are doing...
6796 _LT_SYS_HIDDEN_LIBDEPS($1)
6797 _LT_COMPILER_PIC($1)
6798 _LT_COMPILER_C_O($1)
6799 _LT_COMPILER_FILE_LOCKS($1)
6800 _LT_LINKER_SHLIBS($1)
6801 _LT_SYS_DYNAMIC_LINKER($1)
6802 _LT_LINKER_HARDCODE_LIBPATH($1)
6803
6804 _LT_CONFIG($1)
6805 fi # test -n "$compiler"
6806
6807 CC=$lt_save_CC
6808 CFLAGS=$lt_save_CFLAGS
6809 LDCXX=$LD
6810 LD=$lt_save_LD
6811 GCC=$lt_save_GCC
6812 with_gnu_ld=$lt_save_with_gnu_ld
6813 lt_cv_path_LDCXX=$lt_cv_path_LD
6814 lt_cv_path_LD=$lt_save_path_LD
6815 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6816 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6817 fi # test "$_lt_caught_CXX_error" != yes
6818
6819 AC_LANG_POP
6820 ])# _LT_LANG_CXX_CONFIG
6821
6822
6823 # _LT_FUNC_STRIPNAME_CNF
6824 # ----------------------
6825 # func_stripname_cnf prefix suffix name
6826 # strip PREFIX and SUFFIX off of NAME.
6827 # PREFIX and SUFFIX must not contain globbing or regex special
6828 # characters, hashes, percent signs, but SUFFIX may contain a leading
6829 # dot (in which case that matches only a dot).
6830 #
6831 # This function is identical to the (non-XSI) version of func_stripname,
6832 # except this one can be used by m4 code that may be executed by configure,
6833 # rather than the libtool script.
6834 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6835 AC_REQUIRE([_LT_DECL_SED])
6836 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6837 func_stripname_cnf ()
6838 {
6839 case ${2} in
6840 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6841 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6842 esac
6843 } # func_stripname_cnf
6844 ])# _LT_FUNC_STRIPNAME_CNF
6845
6846 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6847 # ---------------------------------
6848 # Figure out "hidden" library dependencies from verbose
6849 # compiler output when linking a shared library.
6850 # Parse the compiler output and extract the necessary
6851 # objects, libraries and library flags.
6852 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6853 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6854 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6855 # Dependencies to place before and after the object being linked:
6856 _LT_TAGVAR(predep_objects, $1)=
6857 _LT_TAGVAR(postdep_objects, $1)=
6858 _LT_TAGVAR(predeps, $1)=
6859 _LT_TAGVAR(postdeps, $1)=
6860 _LT_TAGVAR(compiler_lib_search_path, $1)=
6861
6862 dnl we can't use the lt_simple_compile_test_code here,
6863 dnl because it contains code intended for an executable,
6864 dnl not a library. It's possible we should let each
6865 dnl tag define a new lt_????_link_test_code variable,
6866 dnl but it's only used here...
6867 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6868 int a;
6869 void foo (void) { a = 0; }
6870 _LT_EOF
6871 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6872 class Foo
6873 {
6874 public:
6875 Foo (void) { a = 0; }
6876 private:
6877 int a;
6878 };
6879 _LT_EOF
6880 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6881 subroutine foo
6882 implicit none
6883 integer*4 a
6884 a=0
6885 return
6886 end
6887 _LT_EOF
6888 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6889 subroutine foo
6890 implicit none
6891 integer a
6892 a=0
6893 return
6894 end
6895 _LT_EOF
6896 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6897 public class foo {
6898 private int a;
6899 public void bar (void) {
6900 a = 0;
6901 }
6902 };
6903 _LT_EOF
6904 ])
6905
6906 _lt_libdeps_save_CFLAGS=$CFLAGS
6907 case "$CC $CFLAGS " in #(
6908 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6909 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6910 esac
6911
6912 dnl Parse the compiler output and extract the necessary
6913 dnl objects, libraries and library flags.
6914 if AC_TRY_EVAL(ac_compile); then
6915 # Parse the compiler output and extract the necessary
6916 # objects, libraries and library flags.
6917
6918 # Sentinel used to keep track of whether or not we are before
6919 # the conftest object file.
6920 pre_test_object_deps_done=no
6921
6922 for p in `eval "$output_verbose_link_cmd"`; do
6923 case ${prev}${p} in
6924
6925 -L* | -R* | -l*)
6926 # Some compilers place space between "-{L,R}" and the path.
6927 # Remove the space.
6928 if test $p = "-L" ||
6929 test $p = "-R"; then
6930 prev=$p
6931 continue
6932 fi
6933
6934 # Expand the sysroot to ease extracting the directories later.
6935 if test -z "$prev"; then
6936 case $p in
6937 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
6938 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
6939 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
6940 esac
6941 fi
6942 case $p in
6943 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
6944 esac
6945 if test "$pre_test_object_deps_done" = no; then
6946 case ${prev} in
6947 -L | -R)
6948 # Internal compiler library paths should come after those
6949 # provided the user. The postdeps already come after the
6950 # user supplied libs so there is no need to process them.
6951 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6952 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6953 else
6954 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6955 fi
6956 ;;
6957 # The "-l" case would never come before the object being
6958 # linked, so don't bother handling this case.
6959 esac
6960 else
6961 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6962 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6963 else
6964 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6965 fi
6966 fi
6967 prev=
6968 ;;
6969
6970 *.lto.$objext) ;; # Ignore GCC LTO objects
6971 *.$objext)
6972 # This assumes that the test object file only shows up
6973 # once in the compiler output.
6974 if test "$p" = "conftest.$objext"; then
6975 pre_test_object_deps_done=yes
6976 continue
6977 fi
6978
6979 if test "$pre_test_object_deps_done" = no; then
6980 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6981 _LT_TAGVAR(predep_objects, $1)="$p"
6982 else
6983 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6984 fi
6985 else
6986 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6987 _LT_TAGVAR(postdep_objects, $1)="$p"
6988 else
6989 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6990 fi
6991 fi
6992 ;;
6993
6994 *) ;; # Ignore the rest.
6995
6996 esac
6997 done
6998
6999 # Clean up.
7000 rm -f a.out a.exe
7001 else
7002 echo "libtool.m4: error: problem compiling $1 test program"
7003 fi
7004
7005 $RM -f confest.$objext
7006 CFLAGS=$_lt_libdeps_save_CFLAGS
7007
7008 # PORTME: override above test on systems where it is broken
7009 m4_if([$1], [CXX],
7010 [case $host_os in
7011 interix[[3-9]]*)
7012 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7013 # hack all around it, let's just trust "g++" to DTRT.
7014 _LT_TAGVAR(predep_objects,$1)=
7015 _LT_TAGVAR(postdep_objects,$1)=
7016 _LT_TAGVAR(postdeps,$1)=
7017 ;;
7018
7019 linux*)
7020 case `$CC -V 2>&1 | sed 5q` in
7021 *Sun\ C*)
7022 # Sun C++ 5.9
7023
7024 # The more standards-conforming stlport4 library is
7025 # incompatible with the Cstd library. Avoid specifying
7026 # it if it's in CXXFLAGS. Ignore libCrun as
7027 # -library=stlport4 depends on it.
7028 case " $CXX $CXXFLAGS " in
7029 *" -library=stlport4 "*)
7030 solaris_use_stlport4=yes
7031 ;;
7032 esac
7033
7034 if test "$solaris_use_stlport4" != yes; then
7035 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7036 fi
7037 ;;
7038 esac
7039 ;;
7040
7041 solaris*)
7042 case $cc_basename in
7043 CC* | sunCC*)
7044 # The more standards-conforming stlport4 library is
7045 # incompatible with the Cstd library. Avoid specifying
7046 # it if it's in CXXFLAGS. Ignore libCrun as
7047 # -library=stlport4 depends on it.
7048 case " $CXX $CXXFLAGS " in
7049 *" -library=stlport4 "*)
7050 solaris_use_stlport4=yes
7051 ;;
7052 esac
7053
7054 # Adding this requires a known-good setup of shared libraries for
7055 # Sun compiler versions before 5.6, else PIC objects from an old
7056 # archive will be linked into the output, leading to subtle bugs.
7057 if test "$solaris_use_stlport4" != yes; then
7058 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7059 fi
7060 ;;
7061 esac
7062 ;;
7063 esac
7064 ])
7065
7066 case " $_LT_TAGVAR(postdeps, $1) " in
7067 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7068 esac
7069 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7070 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7071 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7072 fi
7073 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7074 [The directories searched by this compiler when creating a shared library])
7075 _LT_TAGDECL([], [predep_objects], [1],
7076 [Dependencies to place before and after the objects being linked to
7077 create a shared library])
7078 _LT_TAGDECL([], [postdep_objects], [1])
7079 _LT_TAGDECL([], [predeps], [1])
7080 _LT_TAGDECL([], [postdeps], [1])
7081 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7082 [The library search path used internally by the compiler when linking
7083 a shared library])
7084 ])# _LT_SYS_HIDDEN_LIBDEPS
7085
7086
7087 # _LT_LANG_F77_CONFIG([TAG])
7088 # --------------------------
7089 # Ensure that the configuration variables for a Fortran 77 compiler are
7090 # suitably defined. These variables are subsequently used by _LT_CONFIG
7091 # to write the compiler configuration to `libtool'.
7092 m4_defun([_LT_LANG_F77_CONFIG],
7093 [AC_LANG_PUSH(Fortran 77)
7094 if test -z "$F77" || test "X$F77" = "Xno"; then
7095 _lt_disable_F77=yes
7096 fi
7097
7098 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7099 _LT_TAGVAR(allow_undefined_flag, $1)=
7100 _LT_TAGVAR(always_export_symbols, $1)=no
7101 _LT_TAGVAR(archive_expsym_cmds, $1)=
7102 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7103 _LT_TAGVAR(hardcode_direct, $1)=no
7104 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7105 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7106 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7107 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7108 _LT_TAGVAR(hardcode_minus_L, $1)=no
7109 _LT_TAGVAR(hardcode_automatic, $1)=no
7110 _LT_TAGVAR(inherit_rpath, $1)=no
7111 _LT_TAGVAR(module_cmds, $1)=
7112 _LT_TAGVAR(module_expsym_cmds, $1)=
7113 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7114 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7115 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7116 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7117 _LT_TAGVAR(no_undefined_flag, $1)=
7118 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7119 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7120
7121 # Source file extension for f77 test sources.
7122 ac_ext=f
7123
7124 # Object file extension for compiled f77 test sources.
7125 objext=o
7126 _LT_TAGVAR(objext, $1)=$objext
7127
7128 # No sense in running all these tests if we already determined that
7129 # the F77 compiler isn't working. Some variables (like enable_shared)
7130 # are currently assumed to apply to all compilers on this platform,
7131 # and will be corrupted by setting them based on a non-working compiler.
7132 if test "$_lt_disable_F77" != yes; then
7133 # Code to be used in simple compile tests
7134 lt_simple_compile_test_code="\
7135 subroutine t
7136 return
7137 end
7138 "
7139
7140 # Code to be used in simple link tests
7141 lt_simple_link_test_code="\
7142 program t
7143 end
7144 "
7145
7146 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7147 _LT_TAG_COMPILER
7148
7149 # save warnings/boilerplate of simple test code
7150 _LT_COMPILER_BOILERPLATE
7151 _LT_LINKER_BOILERPLATE
7152
7153 # Allow CC to be a program name with arguments.
7154 lt_save_CC="$CC"
7155 lt_save_GCC=$GCC
7156 lt_save_CFLAGS=$CFLAGS
7157 CC=${F77-"f77"}
7158 CFLAGS=$FFLAGS
7159 compiler=$CC
7160 _LT_TAGVAR(compiler, $1)=$CC
7161 _LT_CC_BASENAME([$compiler])
7162 GCC=$G77
7163 if test -n "$compiler"; then
7164 AC_MSG_CHECKING([if libtool supports shared libraries])
7165 AC_MSG_RESULT([$can_build_shared])
7166
7167 AC_MSG_CHECKING([whether to build shared libraries])
7168 test "$can_build_shared" = "no" && enable_shared=no
7169
7170 # On AIX, shared libraries and static libraries use the same namespace, and
7171 # are all built from PIC.
7172 case $host_os in
7173 aix3*)
7174 test "$enable_shared" = yes && enable_static=no
7175 if test -n "$RANLIB"; then
7176 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7177 postinstall_cmds='$RANLIB $lib'
7178 fi
7179 ;;
7180 aix[[4-9]]*)
7181 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7182 test "$enable_shared" = yes && enable_static=no
7183 fi
7184 ;;
7185 esac
7186 AC_MSG_RESULT([$enable_shared])
7187
7188 AC_MSG_CHECKING([whether to build static libraries])
7189 # Make sure either enable_shared or enable_static is yes.
7190 test "$enable_shared" = yes || enable_static=yes
7191 AC_MSG_RESULT([$enable_static])
7192
7193 _LT_TAGVAR(GCC, $1)="$G77"
7194 _LT_TAGVAR(LD, $1)="$LD"
7195
7196 ## CAVEAT EMPTOR:
7197 ## There is no encapsulation within the following macros, do not change
7198 ## the running order or otherwise move them around unless you know exactly
7199 ## what you are doing...
7200 _LT_COMPILER_PIC($1)
7201 _LT_COMPILER_C_O($1)
7202 _LT_COMPILER_FILE_LOCKS($1)
7203 _LT_LINKER_SHLIBS($1)
7204 _LT_SYS_DYNAMIC_LINKER($1)
7205 _LT_LINKER_HARDCODE_LIBPATH($1)
7206
7207 _LT_CONFIG($1)
7208 fi # test -n "$compiler"
7209
7210 GCC=$lt_save_GCC
7211 CC="$lt_save_CC"
7212 CFLAGS="$lt_save_CFLAGS"
7213 fi # test "$_lt_disable_F77" != yes
7214
7215 AC_LANG_POP
7216 ])# _LT_LANG_F77_CONFIG
7217
7218
7219 # _LT_LANG_FC_CONFIG([TAG])
7220 # -------------------------
7221 # Ensure that the configuration variables for a Fortran compiler are
7222 # suitably defined. These variables are subsequently used by _LT_CONFIG
7223 # to write the compiler configuration to `libtool'.
7224 m4_defun([_LT_LANG_FC_CONFIG],
7225 [AC_LANG_PUSH(Fortran)
7226
7227 if test -z "$FC" || test "X$FC" = "Xno"; then
7228 _lt_disable_FC=yes
7229 fi
7230
7231 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7232 _LT_TAGVAR(allow_undefined_flag, $1)=
7233 _LT_TAGVAR(always_export_symbols, $1)=no
7234 _LT_TAGVAR(archive_expsym_cmds, $1)=
7235 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7236 _LT_TAGVAR(hardcode_direct, $1)=no
7237 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7239 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7240 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7241 _LT_TAGVAR(hardcode_minus_L, $1)=no
7242 _LT_TAGVAR(hardcode_automatic, $1)=no
7243 _LT_TAGVAR(inherit_rpath, $1)=no
7244 _LT_TAGVAR(module_cmds, $1)=
7245 _LT_TAGVAR(module_expsym_cmds, $1)=
7246 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7247 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7248 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7249 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7250 _LT_TAGVAR(no_undefined_flag, $1)=
7251 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7252 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7253
7254 # Source file extension for fc test sources.
7255 ac_ext=${ac_fc_srcext-f}
7256
7257 # Object file extension for compiled fc test sources.
7258 objext=o
7259 _LT_TAGVAR(objext, $1)=$objext
7260
7261 # No sense in running all these tests if we already determined that
7262 # the FC compiler isn't working. Some variables (like enable_shared)
7263 # are currently assumed to apply to all compilers on this platform,
7264 # and will be corrupted by setting them based on a non-working compiler.
7265 if test "$_lt_disable_FC" != yes; then
7266 # Code to be used in simple compile tests
7267 lt_simple_compile_test_code="\
7268 subroutine t
7269 return
7270 end
7271 "
7272
7273 # Code to be used in simple link tests
7274 lt_simple_link_test_code="\
7275 program t
7276 end
7277 "
7278
7279 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7280 _LT_TAG_COMPILER
7281
7282 # save warnings/boilerplate of simple test code
7283 _LT_COMPILER_BOILERPLATE
7284 _LT_LINKER_BOILERPLATE
7285
7286 # Allow CC to be a program name with arguments.
7287 lt_save_CC="$CC"
7288 lt_save_GCC=$GCC
7289 lt_save_CFLAGS=$CFLAGS
7290 CC=${FC-"f95"}
7291 CFLAGS=$FCFLAGS
7292 compiler=$CC
7293 GCC=$ac_cv_fc_compiler_gnu
7294
7295 _LT_TAGVAR(compiler, $1)=$CC
7296 _LT_CC_BASENAME([$compiler])
7297
7298 if test -n "$compiler"; then
7299 AC_MSG_CHECKING([if libtool supports shared libraries])
7300 AC_MSG_RESULT([$can_build_shared])
7301
7302 AC_MSG_CHECKING([whether to build shared libraries])
7303 test "$can_build_shared" = "no" && enable_shared=no
7304
7305 # On AIX, shared libraries and static libraries use the same namespace, and
7306 # are all built from PIC.
7307 case $host_os in
7308 aix3*)
7309 test "$enable_shared" = yes && enable_static=no
7310 if test -n "$RANLIB"; then
7311 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7312 postinstall_cmds='$RANLIB $lib'
7313 fi
7314 ;;
7315 aix[[4-9]]*)
7316 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7317 test "$enable_shared" = yes && enable_static=no
7318 fi
7319 ;;
7320 esac
7321 AC_MSG_RESULT([$enable_shared])
7322
7323 AC_MSG_CHECKING([whether to build static libraries])
7324 # Make sure either enable_shared or enable_static is yes.
7325 test "$enable_shared" = yes || enable_static=yes
7326 AC_MSG_RESULT([$enable_static])
7327
7328 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7329 _LT_TAGVAR(LD, $1)="$LD"
7330
7331 ## CAVEAT EMPTOR:
7332 ## There is no encapsulation within the following macros, do not change
7333 ## the running order or otherwise move them around unless you know exactly
7334 ## what you are doing...
7335 _LT_SYS_HIDDEN_LIBDEPS($1)
7336 _LT_COMPILER_PIC($1)
7337 _LT_COMPILER_C_O($1)
7338 _LT_COMPILER_FILE_LOCKS($1)
7339 _LT_LINKER_SHLIBS($1)
7340 _LT_SYS_DYNAMIC_LINKER($1)
7341 _LT_LINKER_HARDCODE_LIBPATH($1)
7342
7343 _LT_CONFIG($1)
7344 fi # test -n "$compiler"
7345
7346 GCC=$lt_save_GCC
7347 CC=$lt_save_CC
7348 CFLAGS=$lt_save_CFLAGS
7349 fi # test "$_lt_disable_FC" != yes
7350
7351 AC_LANG_POP
7352 ])# _LT_LANG_FC_CONFIG
7353
7354
7355 # _LT_LANG_GCJ_CONFIG([TAG])
7356 # --------------------------
7357 # Ensure that the configuration variables for the GNU Java Compiler compiler
7358 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7359 # to write the compiler configuration to `libtool'.
7360 m4_defun([_LT_LANG_GCJ_CONFIG],
7361 [AC_REQUIRE([LT_PROG_GCJ])dnl
7362 AC_LANG_SAVE
7363
7364 # Source file extension for Java test sources.
7365 ac_ext=java
7366
7367 # Object file extension for compiled Java test sources.
7368 objext=o
7369 _LT_TAGVAR(objext, $1)=$objext
7370
7371 # Code to be used in simple compile tests
7372 lt_simple_compile_test_code="class foo {}"
7373
7374 # Code to be used in simple link tests
7375 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7376
7377 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7378 _LT_TAG_COMPILER
7379
7380 # save warnings/boilerplate of simple test code
7381 _LT_COMPILER_BOILERPLATE
7382 _LT_LINKER_BOILERPLATE
7383
7384 # Allow CC to be a program name with arguments.
7385 lt_save_CC=$CC
7386 lt_save_CFLAGS=$CFLAGS
7387 lt_save_GCC=$GCC
7388 GCC=yes
7389 CC=${GCJ-"gcj"}
7390 CFLAGS=$GCJFLAGS
7391 compiler=$CC
7392 _LT_TAGVAR(compiler, $1)=$CC
7393 _LT_TAGVAR(LD, $1)="$LD"
7394 _LT_CC_BASENAME([$compiler])
7395
7396 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7397 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7398
7399 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7400 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7401 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7402
7403 ## CAVEAT EMPTOR:
7404 ## There is no encapsulation within the following macros, do not change
7405 ## the running order or otherwise move them around unless you know exactly
7406 ## what you are doing...
7407 if test -n "$compiler"; then
7408 _LT_COMPILER_NO_RTTI($1)
7409 _LT_COMPILER_PIC($1)
7410 _LT_COMPILER_C_O($1)
7411 _LT_COMPILER_FILE_LOCKS($1)
7412 _LT_LINKER_SHLIBS($1)
7413 _LT_LINKER_HARDCODE_LIBPATH($1)
7414
7415 _LT_CONFIG($1)
7416 fi
7417
7418 AC_LANG_RESTORE
7419
7420 GCC=$lt_save_GCC
7421 CC=$lt_save_CC
7422 CFLAGS=$lt_save_CFLAGS
7423 ])# _LT_LANG_GCJ_CONFIG
7424
7425
7426 # _LT_LANG_RC_CONFIG([TAG])
7427 # -------------------------
7428 # Ensure that the configuration variables for the Windows resource compiler
7429 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7430 # to write the compiler configuration to `libtool'.
7431 m4_defun([_LT_LANG_RC_CONFIG],
7432 [AC_REQUIRE([LT_PROG_RC])dnl
7433 AC_LANG_SAVE
7434
7435 # Source file extension for RC test sources.
7436 ac_ext=rc
7437
7438 # Object file extension for compiled RC test sources.
7439 objext=o
7440 _LT_TAGVAR(objext, $1)=$objext
7441
7442 # Code to be used in simple compile tests
7443 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7444
7445 # Code to be used in simple link tests
7446 lt_simple_link_test_code="$lt_simple_compile_test_code"
7447
7448 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7449 _LT_TAG_COMPILER
7450
7451 # save warnings/boilerplate of simple test code
7452 _LT_COMPILER_BOILERPLATE
7453 _LT_LINKER_BOILERPLATE
7454
7455 # Allow CC to be a program name with arguments.
7456 lt_save_CC="$CC"
7457 lt_save_CFLAGS=$CFLAGS
7458 lt_save_GCC=$GCC
7459 GCC=
7460 CC=${RC-"windres"}
7461 CFLAGS=
7462 compiler=$CC
7463 _LT_TAGVAR(compiler, $1)=$CC
7464 _LT_CC_BASENAME([$compiler])
7465 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7466
7467 if test -n "$compiler"; then
7468 :
7469 _LT_CONFIG($1)
7470 fi
7471
7472 GCC=$lt_save_GCC
7473 AC_LANG_RESTORE
7474 CC=$lt_save_CC
7475 CFLAGS=$lt_save_CFLAGS
7476 ])# _LT_LANG_RC_CONFIG
7477
7478
7479 # LT_PROG_GCJ
7480 # -----------
7481 AC_DEFUN([LT_PROG_GCJ],
7482 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7483 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7484 [AC_CHECK_TOOL(GCJ, gcj,)
7485 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7486 AC_SUBST(GCJFLAGS)])])[]dnl
7487 ])
7488
7489 # Old name:
7490 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7491 dnl aclocal-1.4 backwards compatibility:
7492 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7493
7494
7495 # LT_PROG_RC
7496 # ----------
7497 AC_DEFUN([LT_PROG_RC],
7498 [AC_CHECK_TOOL(RC, windres,)
7499 ])
7500
7501 # Old name:
7502 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7503 dnl aclocal-1.4 backwards compatibility:
7504 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7505
7506
7507 # _LT_DECL_EGREP
7508 # --------------
7509 # If we don't have a new enough Autoconf to choose the best grep
7510 # available, choose the one first in the user's PATH.
7511 m4_defun([_LT_DECL_EGREP],
7512 [AC_REQUIRE([AC_PROG_EGREP])dnl
7513 AC_REQUIRE([AC_PROG_FGREP])dnl
7514 test -z "$GREP" && GREP=grep
7515 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7516 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7517 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7518 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7519 AC_SUBST([GREP])
7520 ])
7521
7522
7523 # _LT_DECL_OBJDUMP
7524 # --------------
7525 # If we don't have a new enough Autoconf to choose the best objdump
7526 # available, choose the one first in the user's PATH.
7527 m4_defun([_LT_DECL_OBJDUMP],
7528 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7529 test -z "$OBJDUMP" && OBJDUMP=objdump
7530 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7531 AC_SUBST([OBJDUMP])
7532 ])
7533
7534 # _LT_DECL_DLLTOOL
7535 # ----------------
7536 # Ensure DLLTOOL variable is set.
7537 m4_defun([_LT_DECL_DLLTOOL],
7538 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7539 test -z "$DLLTOOL" && DLLTOOL=dlltool
7540 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7541 AC_SUBST([DLLTOOL])
7542 ])
7543
7544 # _LT_DECL_SED
7545 # ------------
7546 # Check for a fully-functional sed program, that truncates
7547 # as few characters as possible. Prefer GNU sed if found.
7548 m4_defun([_LT_DECL_SED],
7549 [AC_PROG_SED
7550 test -z "$SED" && SED=sed
7551 Xsed="$SED -e 1s/^X//"
7552 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7553 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7554 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7555 ])# _LT_DECL_SED
7556
7557 m4_ifndef([AC_PROG_SED], [
7558 ############################################################
7559 # NOTE: This macro has been submitted for inclusion into #
7560 # GNU Autoconf as AC_PROG_SED. When it is available in #
7561 # a released version of Autoconf we should remove this #
7562 # macro and use it instead. #
7563 ############################################################
7564
7565 m4_defun([AC_PROG_SED],
7566 [AC_MSG_CHECKING([for a sed that does not truncate output])
7567 AC_CACHE_VAL(lt_cv_path_SED,
7568 [# Loop through the user's path and test for sed and gsed.
7569 # Then use that list of sed's as ones to test for truncation.
7570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7571 for as_dir in $PATH
7572 do
7573 IFS=$as_save_IFS
7574 test -z "$as_dir" && as_dir=.
7575 for lt_ac_prog in sed gsed; do
7576 for ac_exec_ext in '' $ac_executable_extensions; do
7577 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7578 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7579 fi
7580 done
7581 done
7582 done
7583 IFS=$as_save_IFS
7584 lt_ac_max=0
7585 lt_ac_count=0
7586 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7587 # along with /bin/sed that truncates output.
7588 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7589 test ! -f $lt_ac_sed && continue
7590 cat /dev/null > conftest.in
7591 lt_ac_count=0
7592 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7593 # Check for GNU sed and select it if it is found.
7594 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7595 lt_cv_path_SED=$lt_ac_sed
7596 break
7597 fi
7598 while true; do
7599 cat conftest.in conftest.in >conftest.tmp
7600 mv conftest.tmp conftest.in
7601 cp conftest.in conftest.nl
7602 echo >>conftest.nl
7603 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7604 cmp -s conftest.out conftest.nl || break
7605 # 10000 chars as input seems more than enough
7606 test $lt_ac_count -gt 10 && break
7607 lt_ac_count=`expr $lt_ac_count + 1`
7608 if test $lt_ac_count -gt $lt_ac_max; then
7609 lt_ac_max=$lt_ac_count
7610 lt_cv_path_SED=$lt_ac_sed
7611 fi
7612 done
7613 done
7614 ])
7615 SED=$lt_cv_path_SED
7616 AC_SUBST([SED])
7617 AC_MSG_RESULT([$SED])
7618 ])#AC_PROG_SED
7619 ])#m4_ifndef
7620
7621 # Old name:
7622 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7623 dnl aclocal-1.4 backwards compatibility:
7624 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7625
7626
7627 # _LT_CHECK_SHELL_FEATURES
7628 # ------------------------
7629 # Find out whether the shell is Bourne or XSI compatible,
7630 # or has some other useful features.
7631 m4_defun([_LT_CHECK_SHELL_FEATURES],
7632 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7633 # Try some XSI features
7634 xsi_shell=no
7635 ( _lt_dummy="a/b/c"
7636 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7637 = c,a/b,b/c, \
7638 && eval 'test $(( 1 + 1 )) -eq 2 \
7639 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7640 && xsi_shell=yes
7641 AC_MSG_RESULT([$xsi_shell])
7642 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7643
7644 AC_MSG_CHECKING([whether the shell understands "+="])
7645 lt_shell_append=no
7646 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7647 >/dev/null 2>&1 \
7648 && lt_shell_append=yes
7649 AC_MSG_RESULT([$lt_shell_append])
7650 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7651
7652 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7653 lt_unset=unset
7654 else
7655 lt_unset=false
7656 fi
7657 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7658
7659 # test EBCDIC or ASCII
7660 case `echo X|tr X '\101'` in
7661 A) # ASCII based system
7662 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7663 lt_SP2NL='tr \040 \012'
7664 lt_NL2SP='tr \015\012 \040\040'
7665 ;;
7666 *) # EBCDIC based system
7667 lt_SP2NL='tr \100 \n'
7668 lt_NL2SP='tr \r\n \100\100'
7669 ;;
7670 esac
7671 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7672 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7673 ])# _LT_CHECK_SHELL_FEATURES
7674
7675
7676 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7677 # ------------------------------------------------------
7678 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7679 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7680 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7681 [dnl {
7682 sed -e '/^$1 ()$/,/^} # $1 /c\
7683 $1 ()\
7684 {\
7685 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7686 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7687 && mv -f "$cfgfile.tmp" "$cfgfile" \
7688 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7689 test 0 -eq $? || _lt_function_replace_fail=:
7690 ])
7691
7692
7693 # _LT_PROG_REPLACE_SHELLFNS
7694 # -------------------------
7695 # Replace existing portable implementations of several shell functions with
7696 # equivalent extended shell implementations where those features are available..
7697 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7698 [if test x"$xsi_shell" = xyes; then
7699 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7700 case ${1} in
7701 */*) func_dirname_result="${1%/*}${2}" ;;
7702 * ) func_dirname_result="${3}" ;;
7703 esac])
7704
7705 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7706 func_basename_result="${1##*/}"])
7707
7708 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7709 case ${1} in
7710 */*) func_dirname_result="${1%/*}${2}" ;;
7711 * ) func_dirname_result="${3}" ;;
7712 esac
7713 func_basename_result="${1##*/}"])
7714
7715 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7716 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7717 # positional parameters, so assign one to ordinary parameter first.
7718 func_stripname_result=${3}
7719 func_stripname_result=${func_stripname_result#"${1}"}
7720 func_stripname_result=${func_stripname_result%"${2}"}])
7721
7722 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7723 func_split_long_opt_name=${1%%=*}
7724 func_split_long_opt_arg=${1#*=}])
7725
7726 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7727 func_split_short_opt_arg=${1#??}
7728 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7729
7730 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7731 case ${1} in
7732 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7733 *) func_lo2o_result=${1} ;;
7734 esac])
7735
7736 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7737
7738 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7739
7740 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7741 fi
7742
7743 if test x"$lt_shell_append" = xyes; then
7744 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7745
7746 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7747 func_quote_for_eval "${2}"
7748 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7749 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7750
7751 # Save a `func_append' function call where possible by direct use of '+='
7752 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7753 && mv -f "$cfgfile.tmp" "$cfgfile" \
7754 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7755 test 0 -eq $? || _lt_function_replace_fail=:
7756 else
7757 # Save a `func_append' function call even when '+=' is not available
7758 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7759 && mv -f "$cfgfile.tmp" "$cfgfile" \
7760 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7761 test 0 -eq $? || _lt_function_replace_fail=:
7762 fi
7763
7764 if test x"$_lt_function_replace_fail" = x":"; then
7765 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7766 fi
7767 ])
7768
7769 # _LT_PATH_CONVERSION_FUNCTIONS
7770 # -----------------------------
7771 # Determine which file name conversion functions should be used by
7772 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7773 # for certain cross-compile configurations and native mingw.
7774 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7775 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7776 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7777 AC_MSG_CHECKING([how to convert $build file names to $host format])
7778 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7779 [case $host in
7780 *-*-mingw* )
7781 case $build in
7782 *-*-mingw* ) # actually msys
7783 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7784 ;;
7785 *-*-cygwin* )
7786 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7787 ;;
7788 * ) # otherwise, assume *nix
7789 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7790 ;;
7791 esac
7792 ;;
7793 *-*-cygwin* )
7794 case $build in
7795 *-*-mingw* ) # actually msys
7796 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7797 ;;
7798 *-*-cygwin* )
7799 lt_cv_to_host_file_cmd=func_convert_file_noop
7800 ;;
7801 * ) # otherwise, assume *nix
7802 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7803 ;;
7804 esac
7805 ;;
7806 * ) # unhandled hosts (and "normal" native builds)
7807 lt_cv_to_host_file_cmd=func_convert_file_noop
7808 ;;
7809 esac
7810 ])
7811 to_host_file_cmd=$lt_cv_to_host_file_cmd
7812 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7813 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7814 [0], [convert $build file names to $host format])dnl
7815
7816 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7817 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7818 [#assume ordinary cross tools, or native build.
7819 lt_cv_to_tool_file_cmd=func_convert_file_noop
7820 case $host in
7821 *-*-mingw* )
7822 case $build in
7823 *-*-mingw* ) # actually msys
7824 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7825 ;;
7826 esac
7827 ;;
7828 esac
7829 ])
7830 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7831 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7832 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7833 [0], [convert $build files to toolchain format])dnl
7834 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [pic_mode="$withval"],
331 [pic_mode=default])
332
333 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
335 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336 ])# _LT_WITH_PIC
337
338 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
341 # Old name:
342 AU_DEFUN([AC_LIBTOOL_PICMODE],
343 [_LT_SET_OPTION([LT_INIT], [pic-only])
344 AC_DIAGNOSE([obsolete],
345 [$0: Remove this warning and the call to _LT_SET_OPTION when you
346 put the `pic-only' option into LT_INIT's first parameter.])
347 ])
348
349 dnl aclocal-1.4 backwards compatibility:
350 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
352 ## ----------------- ##
353 ## LTDL_INIT Options ##
354 ## ----------------- ##
355
356 m4_define([_LTDL_MODE], [])
357 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358 [m4_define([_LTDL_MODE], [nonrecursive])])
359 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360 [m4_define([_LTDL_MODE], [recursive])])
361 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362 [m4_define([_LTDL_MODE], [subproject])])
363
364 m4_define([_LTDL_TYPE], [])
365 LT_OPTION_DEFINE([LTDL_INIT], [installable],
366 [m4_define([_LTDL_TYPE], [installable])])
367 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3293 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4])
15 m4_define([LT_PACKAGE_REVISION], [1.3293])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4'
19 macro_revision='1.3293'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # This file is part of libatasmart.
1 #
2 # Copyright 2008 Lennart Poettering
3 #
4 # libatasmart is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU Lesser General Public License as
6 # published by the Free Software Foundation, either version 2.1 of the
7 # License, or (at your option) any later version.
8 #
9 # libatasmart is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with libatasmart. If not, If not, see
16 # <http://www.gnu.org/licenses/>.
17
18 CC = @CC_FOR_BUILD@
19 CFLAGS = @BUILD_CFLAGS@
20 LDFLAGS = @BUILD_LDFLAGS@
21
22 noinst_PROGRAMS = \
23 strpool
24
25 strpool_SOURCES = \
26 ../strpool.c
27
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # This file is part of libatasmart.
18 #
19 # Copyright 2008 Lennart Poettering
20 #
21 # libatasmart is free software; you can redistribute it and/or modify
22 # it under the terms of the GNU Lesser General Public License as
23 # published by the Free Software Foundation, either version 2.1 of the
24 # License, or (at your option) any later version.
25 #
26 # libatasmart is distributed in the hope that it will be useful, but
27 # WITHOUT ANY WARRANTY; without even the implied warranty of
28 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 # Lesser General Public License for more details.
30 #
31 # You should have received a copy of the GNU Lesser General Public
32 # License along with libatasmart. If not, If not, see
33 # <http://www.gnu.org/licenses/>.
34
35 VPATH = @srcdir@
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkgincludedir = $(includedir)/@PACKAGE@
38 pkglibdir = $(libdir)/@PACKAGE@
39 pkglibexecdir = $(libexecdir)/@PACKAGE@
40 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
41 install_sh_DATA = $(install_sh) -c -m 644
42 install_sh_PROGRAM = $(install_sh) -c
43 install_sh_SCRIPT = $(install_sh) -c
44 INSTALL_HEADER = $(INSTALL_DATA)
45 transform = $(program_transform_name)
46 NORMAL_INSTALL = :
47 PRE_INSTALL = :
48 POST_INSTALL = :
49 NORMAL_UNINSTALL = :
50 PRE_UNINSTALL = :
51 POST_UNINSTALL = :
52 build_triplet = @build@
53 host_triplet = @host@
54 noinst_PROGRAMS = strpool$(EXEEXT)
55 subdir = strpool
56 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
57 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
58 am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
59 $(top_srcdir)/m4/ax_cc_for_build.m4 \
60 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
61 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
62 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
63 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
64 $(ACLOCAL_M4)
65 mkinstalldirs = $(install_sh) -d
66 CONFIG_HEADER = $(top_builddir)/config.h
67 CONFIG_CLEAN_FILES =
68 CONFIG_CLEAN_VPATH_FILES =
69 PROGRAMS = $(noinst_PROGRAMS)
70 am_strpool_OBJECTS = strpool.$(OBJEXT)
71 strpool_OBJECTS = $(am_strpool_OBJECTS)
72 strpool_LDADD = $(LDADD)
73 AM_V_lt = $(am__v_lt_$(V))
74 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
75 am__v_lt_0 = --silent
76 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
77 depcomp = $(SHELL) $(top_srcdir)/depcomp
78 am__depfiles_maybe = depfiles
79 am__mv = mv -f
80 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
81 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
82 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
83 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
84 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
85 $(AM_CFLAGS) $(CFLAGS)
86 AM_V_CC = $(am__v_CC_$(V))
87 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
88 am__v_CC_0 = @echo " CC " $@;
89 AM_V_at = $(am__v_at_$(V))
90 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
91 am__v_at_0 = @
92 CCLD = $(CC)
93 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
94 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
95 $(AM_LDFLAGS) $(LDFLAGS) -o $@
96 AM_V_CCLD = $(am__v_CCLD_$(V))
97 am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
98 am__v_CCLD_0 = @echo " CCLD " $@;
99 AM_V_GEN = $(am__v_GEN_$(V))
100 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
101 am__v_GEN_0 = @echo " GEN " $@;
102 SOURCES = $(strpool_SOURCES)
103 DIST_SOURCES = $(strpool_SOURCES)
104 ETAGS = etags
105 CTAGS = ctags
106 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
107 ACLOCAL = @ACLOCAL@
108 AMTAR = @AMTAR@
109 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
110 AR = @AR@
111 AUTOCONF = @AUTOCONF@
112 AUTOHEADER = @AUTOHEADER@
113 AUTOMAKE = @AUTOMAKE@
114 AWK = @AWK@
115 BUILD_CFLAGS = @BUILD_CFLAGS@
116 BUILD_LDFLAGS = @BUILD_LDFLAGS@
117 CC = @CC_FOR_BUILD@
118 CCDEPMODE = @CCDEPMODE@
119 CC_FOR_BUILD = @CC_FOR_BUILD@
120 CFLAGS = @BUILD_CFLAGS@
121 CPP = @CPP@
122 CPPFLAGS = @CPPFLAGS@
123 CYGPATH_W = @CYGPATH_W@
124 DEFS = @DEFS@
125 DEPDIR = @DEPDIR@
126 DLLTOOL = @DLLTOOL@
127 DSYMUTIL = @DSYMUTIL@
128 DUMPBIN = @DUMPBIN@
129 ECHO_C = @ECHO_C@
130 ECHO_N = @ECHO_N@
131 ECHO_T = @ECHO_T@
132 EGREP = @EGREP@
133 EXEEXT = @EXEEXT@
134 EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
135 FGREP = @FGREP@
136 GREP = @GREP@
137 INSTALL = @INSTALL@
138 INSTALL_DATA = @INSTALL_DATA@
139 INSTALL_PROGRAM = @INSTALL_PROGRAM@
140 INSTALL_SCRIPT = @INSTALL_SCRIPT@
141 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
142 LD = @LD@
143 LDFLAGS = @BUILD_LDFLAGS@
144 LIBATASMART_VERSION_INFO = @LIBATASMART_VERSION_INFO@
145 LIBOBJS = @LIBOBJS@
146 LIBS = @LIBS@
147 LIBTOOL = @LIBTOOL@
148 LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
149 LIBUDEV_LIBS = @LIBUDEV_LIBS@
150 LIPO = @LIPO@
151 LN_S = @LN_S@
152 LTLIBOBJS = @LTLIBOBJS@
153 MAKEINFO = @MAKEINFO@
154 MANIFEST_TOOL = @MANIFEST_TOOL@
155 MKDIR_P = @MKDIR_P@
156 NM = @NM@
157 NMEDIT = @NMEDIT@
158 OBJDUMP = @OBJDUMP@
159 OBJEXT = @OBJEXT@
160 OTOOL = @OTOOL@
161 OTOOL64 = @OTOOL64@
162 PACKAGE = @PACKAGE@
163 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
164 PACKAGE_NAME = @PACKAGE_NAME@
165 PACKAGE_STRING = @PACKAGE_STRING@
166 PACKAGE_TARNAME = @PACKAGE_TARNAME@
167 PACKAGE_URL = @PACKAGE_URL@
168 PACKAGE_VERSION = @PACKAGE_VERSION@
169 PATH_SEPARATOR = @PATH_SEPARATOR@
170 PKG_CONFIG = @PKG_CONFIG@
171 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173 RANLIB = @RANLIB@
174 SED = @SED@
175 SET_MAKE = @SET_MAKE@
176 SHELL = @SHELL@
177 STRIP = @STRIP@
178 VERSION = @VERSION@
179 abs_builddir = @abs_builddir@
180 abs_srcdir = @abs_srcdir@
181 abs_top_builddir = @abs_top_builddir@
182 abs_top_srcdir = @abs_top_srcdir@
183 ac_ct_AR = @ac_ct_AR@
184 ac_ct_CC = @ac_ct_CC@
185 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
186 am__include = @am__include@
187 am__leading_dot = @am__leading_dot@
188 am__quote = @am__quote@
189 am__tar = @am__tar@
190 am__untar = @am__untar@
191 bindir = @bindir@
192 build = @build@
193 build_alias = @build_alias@
194 build_cpu = @build_cpu@
195 build_os = @build_os@
196 build_vendor = @build_vendor@
197 builddir = @builddir@
198 datadir = @datadir@
199 datarootdir = @datarootdir@
200 docdir = @docdir@
201 dvidir = @dvidir@
202 exec_prefix = @exec_prefix@
203 host = @host@
204 host_alias = @host_alias@
205 host_cpu = @host_cpu@
206 host_os = @host_os@
207 host_vendor = @host_vendor@
208 htmldir = @htmldir@
209 includedir = @includedir@
210 infodir = @infodir@
211 install_sh = @install_sh@
212 libdir = @libdir@
213 libexecdir = @libexecdir@
214 localedir = @localedir@
215 localstatedir = @localstatedir@
216 mandir = @mandir@
217 mkdir_p = @mkdir_p@
218 oldincludedir = @oldincludedir@
219 pdfdir = @pdfdir@
220 prefix = @prefix@
221 program_transform_name = @program_transform_name@
222 psdir = @psdir@
223 sbindir = @sbindir@
224 sharedstatedir = @sharedstatedir@
225 srcdir = @srcdir@
226 sysconfdir = @sysconfdir@
227 target_alias = @target_alias@
228 top_build_prefix = @top_build_prefix@
229 top_builddir = @top_builddir@
230 top_srcdir = @top_srcdir@
231 strpool_SOURCES = \
232 ../strpool.c
233
234 all: all-am
235
236 .SUFFIXES:
237 .SUFFIXES: .c .lo .o .obj
238 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
239 @for dep in $?; do \
240 case '$(am__configure_deps)' in \
241 *$$dep*) \
242 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
243 && { if test -f $@; then exit 0; else break; fi; }; \
244 exit 1;; \
245 esac; \
246 done; \
247 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign strpool/Makefile'; \
248 $(am__cd) $(top_srcdir) && \
249 $(AUTOMAKE) --foreign strpool/Makefile
250 .PRECIOUS: Makefile
251 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
252 @case '$?' in \
253 *config.status*) \
254 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
255 *) \
256 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
257 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
258 esac;
259
260 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262
263 $(top_srcdir)/configure: $(am__configure_deps)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267 $(am__aclocal_m4_deps):
268
269 clean-noinstPROGRAMS:
270 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
271 echo " rm -f" $$list; \
272 rm -f $$list || exit $$?; \
273 test -n "$(EXEEXT)" || exit 0; \
274 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
275 echo " rm -f" $$list; \
276 rm -f $$list
277 strpool$(EXEEXT): $(strpool_OBJECTS) $(strpool_DEPENDENCIES)
278 @rm -f strpool$(EXEEXT)
279 $(AM_V_CCLD)$(LINK) $(strpool_OBJECTS) $(strpool_LDADD) $(LIBS)
280
281 mostlyclean-compile:
282 -rm -f *.$(OBJEXT)
283
284 distclean-compile:
285 -rm -f *.tab.c
286
287 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strpool.Po@am__quote@
288
289 .c.o:
290 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
291 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
292 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
293 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
294 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
295 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
296
297 .c.obj:
298 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
299 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
300 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
301 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
302 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
303 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
304
305 .c.lo:
306 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
307 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
308 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
309 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
310 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
311 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
312
313 strpool.o: ../strpool.c
314 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strpool.o -MD -MP -MF $(DEPDIR)/strpool.Tpo -c -o strpool.o `test -f '../strpool.c' || echo '$(srcdir)/'`../strpool.c
315 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strpool.Tpo $(DEPDIR)/strpool.Po
316 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
317 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../strpool.c' object='strpool.o' libtool=no @AMDEPBACKSLASH@
318 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
319 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strpool.o `test -f '../strpool.c' || echo '$(srcdir)/'`../strpool.c
320
321 strpool.obj: ../strpool.c
322 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strpool.obj -MD -MP -MF $(DEPDIR)/strpool.Tpo -c -o strpool.obj `if test -f '../strpool.c'; then $(CYGPATH_W) '../strpool.c'; else $(CYGPATH_W) '$(srcdir)/../strpool.c'; fi`
323 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strpool.Tpo $(DEPDIR)/strpool.Po
324 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
325 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../strpool.c' object='strpool.obj' libtool=no @AMDEPBACKSLASH@
326 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
327 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strpool.obj `if test -f '../strpool.c'; then $(CYGPATH_W) '../strpool.c'; else $(CYGPATH_W) '$(srcdir)/../strpool.c'; fi`
328
329 mostlyclean-libtool:
330 -rm -f *.lo
331
332 clean-libtool:
333 -rm -rf .libs _libs
334
335 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
336 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
337 unique=`for i in $$list; do \
338 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
339 done | \
340 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
341 END { if (nonempty) { for (i in files) print i; }; }'`; \
342 mkid -fID $$unique
343 tags: TAGS
344
345 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
346 $(TAGS_FILES) $(LISP)
347 set x; \
348 here=`pwd`; \
349 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
350 unique=`for i in $$list; do \
351 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
352 done | \
353 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
354 END { if (nonempty) { for (i in files) print i; }; }'`; \
355 shift; \
356 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
357 test -n "$$unique" || unique=$$empty_fix; \
358 if test $$# -gt 0; then \
359 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
360 "$$@" $$unique; \
361 else \
362 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
363 $$unique; \
364 fi; \
365 fi
366 ctags: CTAGS
367 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
368 $(TAGS_FILES) $(LISP)
369 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
370 unique=`for i in $$list; do \
371 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
372 done | \
373 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
374 END { if (nonempty) { for (i in files) print i; }; }'`; \
375 test -z "$(CTAGS_ARGS)$$unique" \
376 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
377 $$unique
378
379 GTAGS:
380 here=`$(am__cd) $(top_builddir) && pwd` \
381 && $(am__cd) $(top_srcdir) \
382 && gtags -i $(GTAGS_ARGS) "$$here"
383
384 distclean-tags:
385 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
386
387 distdir: $(DISTFILES)
388 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
389 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
390 list='$(DISTFILES)'; \
391 dist_files=`for file in $$list; do echo $$file; done | \
392 sed -e "s|^$$srcdirstrip/||;t" \
393 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
394 case $$dist_files in \
395 */*) $(MKDIR_P) `echo "$$dist_files" | \
396 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
397 sort -u` ;; \
398 esac; \
399 for file in $$dist_files; do \
400 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
401 if test -d $$d/$$file; then \
402 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
403 if test -d "$(distdir)/$$file"; then \
404 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
405 fi; \
406 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
407 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
408 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
409 fi; \
410 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
411 else \
412 test -f "$(distdir)/$$file" \
413 || cp -p $$d/$$file "$(distdir)/$$file" \
414 || exit 1; \
415 fi; \
416 done
417 check-am: all-am
418 check: check-am
419 all-am: Makefile $(PROGRAMS)
420 installdirs:
421 install: install-am
422 install-exec: install-exec-am
423 install-data: install-data-am
424 uninstall: uninstall-am
425
426 install-am: all-am
427 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
428
429 installcheck: installcheck-am
430 install-strip:
431 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
432 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
433 `test -z '$(STRIP)' || \
434 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
435 mostlyclean-generic:
436
437 clean-generic:
438
439 distclean-generic:
440 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
441 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
442
443 maintainer-clean-generic:
444 @echo "This command is intended for maintainers to use"
445 @echo "it deletes files that may require special tools to rebuild."
446 clean: clean-am
447
448 clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
449 mostlyclean-am
450
451 distclean: distclean-am
452 -rm -rf ./$(DEPDIR)
453 -rm -f Makefile
454 distclean-am: clean-am distclean-compile distclean-generic \
455 distclean-tags
456
457 dvi: dvi-am
458
459 dvi-am:
460
461 html: html-am
462
463 html-am:
464
465 info: info-am
466
467 info-am:
468
469 install-data-am:
470
471 install-dvi: install-dvi-am
472
473 install-dvi-am:
474
475 install-exec-am:
476
477 install-html: install-html-am
478
479 install-html-am:
480
481 install-info: install-info-am
482
483 install-info-am:
484
485 install-man:
486
487 install-pdf: install-pdf-am
488
489 install-pdf-am:
490
491 install-ps: install-ps-am
492
493 install-ps-am:
494
495 installcheck-am:
496
497 maintainer-clean: maintainer-clean-am
498 -rm -rf ./$(DEPDIR)
499 -rm -f Makefile
500 maintainer-clean-am: distclean-am maintainer-clean-generic
501
502 mostlyclean: mostlyclean-am
503
504 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
505 mostlyclean-libtool
506
507 pdf: pdf-am
508
509 pdf-am:
510
511 ps: ps-am
512
513 ps-am:
514
515 uninstall-am:
516
517 .MAKE: install-am install-strip
518
519 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
520 clean-libtool clean-noinstPROGRAMS ctags distclean \
521 distclean-compile distclean-generic distclean-libtool \
522 distclean-tags distdir dvi dvi-am html html-am info info-am \
523 install install-am install-data install-data-am install-dvi \
524 install-dvi-am install-exec install-exec-am install-html \
525 install-html-am install-info install-info-am install-man \
526 install-pdf install-pdf-am install-ps install-ps-am \
527 install-strip installcheck installcheck-am installdirs \
528 maintainer-clean maintainer-clean-generic mostlyclean \
529 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
530 pdf pdf-am ps ps-am tags uninstall uninstall-am
531
532
533 # Tell versions [3.59,3.63) of GNU make to not export all variables.
534 # Otherwise a system limit (for SysV at least) may be exceeded.
535 .NOEXPORT:
434434 rl = 0;
435435
436436 i->next = NULL;
437 i->suffix_of = NULL;
437438
438439 if (last)
439440 last->next = i;