Merge lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream into lp:~ubuntu-desktop/libindicator/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 372
Proposed branch: lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream
Merge into: lp:~ubuntu-desktop/libindicator/ubuntu
Diff against target: 18496 lines (+7803/-3452)
33 files modified
AUTHORS (+3/-0)
ChangeLog (+147/-0)
Makefile.am (+42/-3)
Makefile.in (+69/-25)
aclocal.m4 (+0/-99)
build-aux/config.guess (+120/-105)
build-aux/config.sub (+101/-55)
build-aux/ltmain.sh (+2657/-1409)
configure (+1999/-853)
configure.ac (+20/-1)
debian/changelog (+10/-2)
debian/control (+8/-6)
libindicator/Makefile.am (+4/-2)
libindicator/Makefile.in (+15/-4)
libindicator/indicator-desktop-shortcuts.c (+1/-1)
libindicator/indicator-object-marshal.c (+1/-1)
libindicator/indicator-object.c (+364/-34)
libindicator/indicator-object.h (+17/-0)
libindicator/indicator3-0.4.pc.in.in (+1/-1)
m4/gcov.m4 (+82/-0)
m4/libtool.m4 (+1450/-826)
m4/ltoptions.m4 (+24/-8)
m4/ltversion.m4 (+6/-6)
m4/lt~obsolete.m4 (+9/-3)
tests/Makefile.am (+45/-2)
tests/Makefile.in (+101/-4)
tests/dummy-indicator-entry-func.c (+130/-0)
tests/dummy-indicator-entry-func.h (+56/-0)
tests/dummy-indicator-signaler.c (+2/-0)
tests/dummy-indicator-visible.c (+139/-0)
tests/test-loader.c (+165/-0)
tools/Makefile.in (+11/-2)
tools/indicator-loader.c (+4/-0)
To merge this branch: bzr merge lp:~indicator-applet-developers/ubuntu/precise/libindicator/upstream
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+89933@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2011-09-20 02:43:09 +0000
3+++ AUTHORS 2012-01-24 16:25:28 +0000
4@@ -1,9 +1,12 @@
5 # Generated by Makefile. Do not edit.
6
7+ Allan LeSage
8 Aurelien Gateau
9+ Charles Kerr
10 Cody Russell
11 Eitan Isaacson
12 Evgeni Golov
13+ György Balló
14 Javier Jardón
15 Karl
16 Ken VanDine
17
18=== modified file 'ChangeLog'
19--- ChangeLog 2011-09-28 15:48:20 +0000
20+++ ChangeLog 2012-01-24 16:25:28 +0000
21@@ -1,5 +1,152 @@
22 # Generated by Makefile. Do not edit.
23
24+2012-01-24 Ted Gould <ted@gould.cx>
25+
26+ 0.4.90
27+
28+2012-01-23 Ted Gould <ted@gould.cx>
29+
30+ Bumping the ABI version
31+
32+2012-01-23 Ted Gould <ted@gould.cx>
33+
34+ Add visibility concept to the default indicator object
35+
36+2012-01-23 Charles Kerr <charles.kerr@canonical.com>
37+
38+ "bzr merge lp:indicator" + conflict resolution in tests suite
39+
40+2012-01-23 Charles Kerr <charles.kerr@canonical.com>
41+
42+ another iteration of the indicator-object visibility support patch, incorporating ideas from discussion with ted
43+
44+ - some functions were public when they should have been private
45+ - the hide/show handler is now a virtual function & is documented in indicator-object.h
46+ - added unit tests
47+ - the GSettings monitor has been removed
48+
49+2012-01-20 Charles Kerr <charles.kerr@canonical.com>
50+
51+ fix bugs in IndicatorObject's visibility support.
52+
53+2012-01-13 Charles Kerr <charles.kerr@canonical.com>
54+
55+ Better implementation.
56+
57+ This version handles the bootstrapping conditions better, and also refs+detaches the GtkMenu for safekeeping between removed->added events s.t. it can keep being reused.
58+
59+2012-01-12 Charles Kerr <charles.kerr@canonical.com>
60+
61+ initial revision for GSettings/GtkMenu visibility support
62+
63+2012-01-23 Ted Gould <ted@gould.cx>
64+
65+ Put the parent pointer in the entry struct to make it easier for the implementers of the panel side
66+
67+2012-01-19 Ted Gould <ted@gould.cx>
68+
69+ Checking to ensure the parent_object pointer gets set
70+
71+2012-01-19 Ted Gould <ted@gould.cx>
72+
73+ Adding a warning for entries that do not set their parent_object
74+
75+2012-01-19 Ted Gould <ted@gould.cx>
76+
77+ Set the parent_object on the default entry
78+
79+2012-01-19 Ted Gould <ted@gould.cx>
80+
81+ Adding a parent object pointer to the entry
82+
83+2012-01-19 Ted Gould <ted@gould.cx>
84+
85+ Adding a window ID function to pass the window ID
86+
87+2012-01-16 Ted Gould <ted@gould.cx>
88+
89+ Moving the function into the tester to making linking simpler
90+
91+2012-01-16 Ted Gould <ted@gould.cx>
92+
93+ Adding a test to look to make sure the fallback works
94+
95+2012-01-14 Ted Gould <ted@gould.cx>
96+
97+ Add a function to swap out the window entry handler
98+
99+2012-01-14 Ted Gould <ted@gould.cx>
100+
101+ Getting the header in dist
102+
103+2012-01-14 Ted Gould <ted@gould.cx>
104+
105+ Adding a test functioin for the entry func demmy indicator
106+
107+2012-01-14 Ted Gould <ted@gould.cx>
108+
109+ Mark the entry functions as called
110+
111+2012-01-13 Ted Gould <ted@gould.cx>
112+
113+ Setting up entry functions
114+
115+2012-01-13 Ted Gould <ted@gould.cx>
116+
117+ Adding some public values to know if functions were called
118+
119+2012-01-13 Ted Gould <ted@gould.cx>
120+
121+ Moving things into a shared header
122+
123+2012-01-13 Ted Gould <ted@gould.cx>
124+
125+ Build a new dummy indicator
126+
127+2012-01-13 Ted Gould <ted@gould.cx>
128+
129+ Clearing the entry function pointers
130+
131+2012-01-13 Ted Gould <ted@gould.cx>
132+
133+ Handling the activate_window function and going up the stack
134+
135+2012-01-13 Ted Gould <ted@gould.cx>
136+
137+ Documenting what this stuff does
138+
139+2012-01-13 Ted Gould <ted@gould.cx>
140+
141+ Adding an activate window function, that can also be virtual!
142+
143+2012-01-13 Ted Gould <ted@gould.cx>
144+
145+ Adding test coverage checking
146+
147+2011-12-06 Allan LeSage <allanlesage@gmail.com>
148+
149+ Added coverage reporting via gcov config and targets.
150+
151+2012-01-13 Ted Gould <ted@gould.cx>
152+
153+ Ignoring all the stuff we build
154+
155+2012-01-13 Ted Gould <ted@gould.cx>
156+
157+ Putting the GTK3 headers in a different directory
158+
159+2011-11-20 György Balló <ballogy@freestart.hu>
160+
161+ Use different directory for headers of gtk3 library
162+
163+2012-01-13 Ted Gould <ted@gould.cx>
164+
165+ Adding ability to disable tests
166+
167+2011-11-20 György Balló <ballogy@freestart.hu>
168+
169+ Make building tests optional
170+
171 2011-09-28 Ted Gould <ted@gould.cx>
172
173 0.4.1
174
175=== modified file 'Makefile.am'
176--- Makefile.am 2011-07-21 15:04:21 +0000
177+++ Makefile.am 2012-01-24 16:25:28 +0000
178@@ -2,12 +2,16 @@
179
180 SUBDIRS = \
181 libindicator \
182- tests \
183 tools
184
185+tools: libindicator
186+
187+if WANT_TESTS
188+SUBDIRS += \
189+ tests
190+
191 tests: libindicator
192-
193-tools: libindicator
194+endif
195
196 DISTCHECK_CONFIGURE_FLAGS = --disable-deprecations
197
198@@ -40,3 +44,38 @@
199 echo Failed to generate AUTHORS: not a branch >&2; \
200 fi
201
202+
203+# Coverage targets
204+
205+.PHONY: clean-gcda
206+clean-gcda:
207+ @echo Removing old coverage results
208+ -find -name '*.gcda' -print | xargs -r rm
209+
210+.PHONY: coverage-html generate-coverage-html clean-coverage-html
211+coverage-html: clean-gcda
212+ -$(MAKE) $(AM_MAKEFLAGS) -k check
213+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
214+
215+generate-coverage-html:
216+ @echo Collecting coverage data
217+ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
218+ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
219+
220+clean-coverage-html: clean-gcda
221+ -$(LCOV) --directory $(top_builddir) -z
222+ -rm -rf coverage.info coveragereport
223+
224+.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
225+coverage-xml: clean-gcda
226+ -$(MAKE) $(AM_MAKEFLAGS) -k check
227+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
228+
229+generate-coverage-xml:
230+ @echo Generating coverage XML report
231+ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
232+
233+clean-coverage-xml: clean-gcda
234+ -rm -rf $(top_builddir)/coverage.xml
235+
236+clean-local: clean-coverage-html clean-coverage-xml
237
238=== modified file 'Makefile.in'
239--- Makefile.in 2011-09-20 02:44:03 +0000
240+++ Makefile.in 2012-01-24 16:25:28 +0000
241@@ -33,6 +33,9 @@
242 POST_UNINSTALL = :
243 build_triplet = @build@
244 host_triplet = @host@
245+@WANT_TESTS_TRUE@am__append_1 = \
246+@WANT_TESTS_TRUE@ tests
247+
248 subdir = .
249 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
250 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
251@@ -45,7 +48,7 @@
252 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
253 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
254 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
255- $(top_srcdir)/configure.ac
256+ $(top_srcdir)/m4/gcov.m4 $(top_srcdir)/configure.ac
257 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
258 $(ACLOCAL_M4)
259 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
260@@ -76,7 +79,7 @@
261 distdir dist dist-all distcheck
262 ETAGS = etags
263 CTAGS = ctags
264-DIST_SUBDIRS = $(SUBDIRS)
265+DIST_SUBDIRS = libindicator tools tests
266 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
267 distdir = $(PACKAGE)-$(VERSION)
268 top_distdir = $(distdir)
269@@ -124,11 +127,15 @@
270 CC = @CC@
271 CCDEPMODE = @CCDEPMODE@
272 CFLAGS = @CFLAGS@
273+COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
274+COVERAGE_CXXFLAGS = @COVERAGE_CXXFLAGS@
275+COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
276 CPP = @CPP@
277 CPPFLAGS = @CPPFLAGS@
278 CYGPATH_W = @CYGPATH_W@
279 DEFS = @DEFS@
280 DEPDIR = @DEPDIR@
281+DLLTOOL = @DLLTOOL@
282 DSYMUTIL = @DSYMUTIL@
283 DUMPBIN = @DUMPBIN@
284 ECHO_C = @ECHO_C@
285@@ -138,6 +145,8 @@
286 EXEEXT = @EXEEXT@
287 EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
288 FGREP = @FGREP@
289+GCOVR = @GCOVR@
290+GENHTML = @GENHTML@
291 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
292 GLIB_MKENUMS = @GLIB_MKENUMS@
293 GREP = @GREP@
294@@ -146,6 +155,7 @@
295 INSTALL_PROGRAM = @INSTALL_PROGRAM@
296 INSTALL_SCRIPT = @INSTALL_SCRIPT@
297 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
298+LCOV = @LCOV@
299 LD = @LD@
300 LDFLAGS = @LDFLAGS@
301 LIBDIR = @LIBDIR@
302@@ -160,6 +170,7 @@
303 LTLIBOBJS = @LTLIBOBJS@
304 MAINT = @MAINT@
305 MAKEINFO = @MAKEINFO@
306+MANIFEST_TOOL = @MANIFEST_TOOL@
307 MKDIR_P = @MKDIR_P@
308 NM = @NM@
309 NMEDIT = @NMEDIT@
310@@ -183,6 +194,7 @@
311 SED = @SED@
312 SET_MAKE = @SET_MAKE@
313 SHELL = @SHELL@
314+SHTOOL = @SHTOOL@
315 STRIP = @STRIP@
316 SYSCONFDIR = @SYSCONFDIR@
317 VERSION = @VERSION@
318@@ -190,6 +202,7 @@
319 abs_srcdir = @abs_srcdir@
320 abs_top_builddir = @abs_top_builddir@
321 abs_top_srcdir = @abs_top_srcdir@
322+ac_ct_AR = @ac_ct_AR@
323 ac_ct_CC = @ac_ct_CC@
324 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
325 am__include = @am__include@
326@@ -222,7 +235,6 @@
327 libexecdir = @libexecdir@
328 localedir = @localedir@
329 localstatedir = @localstatedir@
330-lt_ECHO = @lt_ECHO@
331 mandir = @mandir@
332 mkdir_p = @mkdir_p@
333 oldincludedir = @oldincludedir@
334@@ -239,11 +251,7 @@
335 top_builddir = @top_builddir@
336 top_srcdir = @top_srcdir@
337 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
338-SUBDIRS = \
339- libindicator \
340- tests \
341- tools
342-
343+SUBDIRS = libindicator tools $(am__append_1)
344 DISTCHECK_CONFIGURE_FLAGS = --disable-deprecations
345 DISTCLEANFILES = \
346 libindicator-*.tar.gz
347@@ -659,7 +667,7 @@
348 @echo "it deletes files that may require special tools to rebuild."
349 clean: clean-recursive
350
351-clean-am: clean-generic clean-libtool mostlyclean-am
352+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
353
354 distclean: distclean-recursive
355 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
356@@ -732,25 +740,26 @@
357
358 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
359 all all-am am--refresh check check-am clean clean-generic \
360- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
361- dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
362- dist-zip distcheck distclean distclean-generic distclean-hdr \
363- distclean-libtool distclean-tags distcleancheck distdir \
364- distuninstallcheck dvi dvi-am html html-am info info-am \
365- install install-am install-data install-data-am install-dvi \
366- install-dvi-am install-exec install-exec-am install-html \
367- install-html-am install-info install-info-am install-man \
368- install-pdf install-pdf-am install-ps install-ps-am \
369- install-strip installcheck installcheck-am installdirs \
370- installdirs-am maintainer-clean maintainer-clean-generic \
371- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
372- ps ps-am tags tags-recursive uninstall uninstall-am
373-
374-
375-tests: libindicator
376+ clean-libtool clean-local ctags ctags-recursive dist dist-all \
377+ dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
378+ dist-xz dist-zip distcheck distclean distclean-generic \
379+ distclean-hdr distclean-libtool distclean-tags distcleancheck \
380+ distdir distuninstallcheck dvi dvi-am html html-am info \
381+ info-am install install-am install-data install-data-am \
382+ install-dvi install-dvi-am install-exec install-exec-am \
383+ install-html install-html-am install-info install-info-am \
384+ install-man install-pdf install-pdf-am install-ps \
385+ install-ps-am install-strip installcheck installcheck-am \
386+ installdirs installdirs-am maintainer-clean \
387+ maintainer-clean-generic mostlyclean mostlyclean-generic \
388+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
389+ uninstall uninstall-am
390+
391
392 tools: libindicator
393
394+@WANT_TESTS_TRUE@tests: libindicator
395+
396 dist-hook:
397 @if test -d "$(top_srcdir)/.bzr"; \
398 then \
399@@ -777,6 +786,41 @@
400 echo Failed to generate AUTHORS: not a branch >&2; \
401 fi
402
403+# Coverage targets
404+
405+.PHONY: clean-gcda
406+clean-gcda:
407+ @echo Removing old coverage results
408+ -find -name '*.gcda' -print | xargs -r rm
409+
410+.PHONY: coverage-html generate-coverage-html clean-coverage-html
411+coverage-html: clean-gcda
412+ -$(MAKE) $(AM_MAKEFLAGS) -k check
413+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
414+
415+generate-coverage-html:
416+ @echo Collecting coverage data
417+ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
418+ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
419+
420+clean-coverage-html: clean-gcda
421+ -$(LCOV) --directory $(top_builddir) -z
422+ -rm -rf coverage.info coveragereport
423+
424+.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
425+coverage-xml: clean-gcda
426+ -$(MAKE) $(AM_MAKEFLAGS) -k check
427+ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
428+
429+generate-coverage-xml:
430+ @echo Generating coverage XML report
431+ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
432+
433+clean-coverage-xml: clean-gcda
434+ -rm -rf $(top_builddir)/coverage.xml
435+
436+clean-local: clean-coverage-html clean-coverage-xml
437+
438 # Tell versions [3.59,3.63) of GNU make to not export all variables.
439 # Otherwise a system limit (for SysV at least) may be exceeded.
440 .NOEXPORT:
441
442=== modified file 'aclocal.m4'
443--- aclocal.m4 2011-07-07 05:32:12 +0000
444+++ aclocal.m4 2012-01-24 16:25:28 +0000
445@@ -19,105 +19,6 @@
446 If you have problems, you may need to regenerate the build system entirely.
447 To do so, use the procedure documented by the package, typically `autoreconf'.])])
448
449-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
450-#
451-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
452-# Written by Scott James Remnant, 2004.
453-#
454-# This file is free software; the Free Software Foundation gives
455-# unlimited permission to copy and/or distribute it, with or without
456-# modifications, as long as this notice is preserved.
457-
458-# serial 5 lt~obsolete.m4
459-
460-# These exist entirely to fool aclocal when bootstrapping libtool.
461-#
462-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
463-# which have later been changed to m4_define as they aren't part of the
464-# exported API, or moved to Autoconf or Automake where they belong.
465-#
466-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
467-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
468-# using a macro with the same name in our local m4/libtool.m4 it'll
469-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
470-# and doesn't know about Autoconf macros at all.)
471-#
472-# So we provide this file, which has a silly filename so it's always
473-# included after everything else. This provides aclocal with the
474-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
475-# because those macros already exist, or will be overwritten later.
476-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
477-#
478-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
479-# Yes, that means every name once taken will need to remain here until
480-# we give up compatibility with versions before 1.7, at which point
481-# we need to keep only those names which we still refer to.
482-
483-# This is to help aclocal find these macros, as it can't see m4_define.
484-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
485-
486-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
487-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
488-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
489-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
490-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
491-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
492-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
493-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
494-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
495-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
496-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
497-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
498-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
499-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
500-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
501-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
502-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
503-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
504-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
505-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
506-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
507-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
508-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
509-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
510-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
511-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
512-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
513-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
514-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
515-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
516-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
517-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
518-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
519-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
520-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
521-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
522-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
523-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
524-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
525-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
526-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
527-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
528-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
529-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
530-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
531-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
532-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
533-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
534-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
535-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
536-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
537-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
538-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
539-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
540-m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
541-m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
542-m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
543-m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
544-m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
545-m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
546-m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
547-
548 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
549 # serial 1 (pkg-config-0.24)
550 #
551
552=== modified file 'build-aux/config.guess'
553--- build-aux/config.guess 2011-07-07 05:28:26 +0000
554+++ build-aux/config.guess 2012-01-24 16:25:28 +0000
555@@ -1,10 +1,10 @@
556 #! /bin/sh
557 # Attempt to guess a canonical system name.
558 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
559-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
560-# Free Software Foundation, Inc.
561+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
562+# 2011 Free Software Foundation, Inc.
563
564-timestamp='2009-12-30'
565+timestamp='2011-05-11'
566
567 # This file is free software; you can redistribute it and/or modify it
568 # under the terms of the GNU General Public License as published by
569@@ -57,7 +57,7 @@
570
571 Originally written by Per Bothner.
572 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
573-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
574+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
575 Software Foundation, Inc.
576
577 This is free software; see the source for copying conditions. There is NO
578@@ -181,7 +181,7 @@
579 fi
580 ;;
581 *)
582- os=netbsd
583+ os=netbsd
584 ;;
585 esac
586 # The OS release
587@@ -224,7 +224,7 @@
588 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
589 ;;
590 *5.*)
591- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
592+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
593 ;;
594 esac
595 # According to Compaq, /usr/sbin/psrinfo has been available on
596@@ -270,7 +270,10 @@
597 # A Xn.n version is an unreleased experimental baselevel.
598 # 1.2 uses "1.2" for uname -r.
599 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
600- exit ;;
601+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
602+ exitcode=$?
603+ trap '' 0
604+ exit $exitcode ;;
605 Alpha\ *:Windows_NT*:*)
606 # How do we know it's Interix rather than the generic POSIX subsystem?
607 # Should we change UNAME_MACHINE based on the output of uname instead
608@@ -296,7 +299,7 @@
609 echo s390-ibm-zvmoe
610 exit ;;
611 *:OS400:*:*)
612- echo powerpc-ibm-os400
613+ echo powerpc-ibm-os400
614 exit ;;
615 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
616 echo arm-acorn-riscix${UNAME_RELEASE}
617@@ -395,23 +398,23 @@
618 # MiNT. But MiNT is downward compatible to TOS, so this should
619 # be no problem.
620 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
621- echo m68k-atari-mint${UNAME_RELEASE}
622+ echo m68k-atari-mint${UNAME_RELEASE}
623 exit ;;
624 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
625 echo m68k-atari-mint${UNAME_RELEASE}
626- exit ;;
627+ exit ;;
628 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
629- echo m68k-atari-mint${UNAME_RELEASE}
630+ echo m68k-atari-mint${UNAME_RELEASE}
631 exit ;;
632 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
633- echo m68k-milan-mint${UNAME_RELEASE}
634- exit ;;
635+ echo m68k-milan-mint${UNAME_RELEASE}
636+ exit ;;
637 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
638- echo m68k-hades-mint${UNAME_RELEASE}
639- exit ;;
640+ echo m68k-hades-mint${UNAME_RELEASE}
641+ exit ;;
642 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
643- echo m68k-unknown-mint${UNAME_RELEASE}
644- exit ;;
645+ echo m68k-unknown-mint${UNAME_RELEASE}
646+ exit ;;
647 m68k:machten:*:*)
648 echo m68k-apple-machten${UNAME_RELEASE}
649 exit ;;
650@@ -481,8 +484,8 @@
651 echo m88k-motorola-sysv3
652 exit ;;
653 AViiON:dgux:*:*)
654- # DG/UX returns AViiON for all architectures
655- UNAME_PROCESSOR=`/usr/bin/uname -p`
656+ # DG/UX returns AViiON for all architectures
657+ UNAME_PROCESSOR=`/usr/bin/uname -p`
658 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
659 then
660 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
661@@ -495,7 +498,7 @@
662 else
663 echo i586-dg-dgux${UNAME_RELEASE}
664 fi
665- exit ;;
666+ exit ;;
667 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
668 echo m88k-dolphin-sysv3
669 exit ;;
670@@ -552,7 +555,7 @@
671 echo rs6000-ibm-aix3.2
672 fi
673 exit ;;
674- *:AIX:*:[456])
675+ *:AIX:*:[4567])
676 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
677 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
678 IBM_ARCH=rs6000
679@@ -595,52 +598,52 @@
680 9000/[678][0-9][0-9])
681 if [ -x /usr/bin/getconf ]; then
682 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
683- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
684- case "${sc_cpu_version}" in
685- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
686- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
687- 532) # CPU_PA_RISC2_0
688- case "${sc_kernel_bits}" in
689- 32) HP_ARCH="hppa2.0n" ;;
690- 64) HP_ARCH="hppa2.0w" ;;
691+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
692+ case "${sc_cpu_version}" in
693+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
694+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
695+ 532) # CPU_PA_RISC2_0
696+ case "${sc_kernel_bits}" in
697+ 32) HP_ARCH="hppa2.0n" ;;
698+ 64) HP_ARCH="hppa2.0w" ;;
699 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
700- esac ;;
701- esac
702+ esac ;;
703+ esac
704 fi
705 if [ "${HP_ARCH}" = "" ]; then
706 eval $set_cc_for_build
707- sed 's/^ //' << EOF >$dummy.c
708-
709- #define _HPUX_SOURCE
710- #include <stdlib.h>
711- #include <unistd.h>
712-
713- int main ()
714- {
715- #if defined(_SC_KERNEL_BITS)
716- long bits = sysconf(_SC_KERNEL_BITS);
717- #endif
718- long cpu = sysconf (_SC_CPU_VERSION);
719-
720- switch (cpu)
721- {
722- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
723- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
724- case CPU_PA_RISC2_0:
725- #if defined(_SC_KERNEL_BITS)
726- switch (bits)
727- {
728- case 64: puts ("hppa2.0w"); break;
729- case 32: puts ("hppa2.0n"); break;
730- default: puts ("hppa2.0"); break;
731- } break;
732- #else /* !defined(_SC_KERNEL_BITS) */
733- puts ("hppa2.0"); break;
734- #endif
735- default: puts ("hppa1.0"); break;
736- }
737- exit (0);
738- }
739+ sed 's/^ //' << EOF >$dummy.c
740+
741+ #define _HPUX_SOURCE
742+ #include <stdlib.h>
743+ #include <unistd.h>
744+
745+ int main ()
746+ {
747+ #if defined(_SC_KERNEL_BITS)
748+ long bits = sysconf(_SC_KERNEL_BITS);
749+ #endif
750+ long cpu = sysconf (_SC_CPU_VERSION);
751+
752+ switch (cpu)
753+ {
754+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
755+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
756+ case CPU_PA_RISC2_0:
757+ #if defined(_SC_KERNEL_BITS)
758+ switch (bits)
759+ {
760+ case 64: puts ("hppa2.0w"); break;
761+ case 32: puts ("hppa2.0n"); break;
762+ default: puts ("hppa2.0"); break;
763+ } break;
764+ #else /* !defined(_SC_KERNEL_BITS) */
765+ puts ("hppa2.0"); break;
766+ #endif
767+ default: puts ("hppa1.0"); break;
768+ }
769+ exit (0);
770+ }
771 EOF
772 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
773 test -z "$HP_ARCH" && HP_ARCH=hppa
774@@ -731,22 +734,22 @@
775 exit ;;
776 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
777 echo c1-convex-bsd
778- exit ;;
779+ exit ;;
780 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
781 if getsysinfo -f scalar_acc
782 then echo c32-convex-bsd
783 else echo c2-convex-bsd
784 fi
785- exit ;;
786+ exit ;;
787 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
788 echo c34-convex-bsd
789- exit ;;
790+ exit ;;
791 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
792 echo c38-convex-bsd
793- exit ;;
794+ exit ;;
795 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
796 echo c4-convex-bsd
797- exit ;;
798+ exit ;;
799 CRAY*Y-MP:*:*:*)
800 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
801 exit ;;
802@@ -770,14 +773,14 @@
803 exit ;;
804 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
805 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
806- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
807- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
808- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
809- exit ;;
810+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
811+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
812+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
813+ exit ;;
814 5000:UNIX_System_V:4.*:*)
815- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
816- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
817- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
818+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
819+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
820+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
821 exit ;;
822 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
823 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
824@@ -805,14 +808,14 @@
825 echo ${UNAME_MACHINE}-pc-mingw32
826 exit ;;
827 i*:windows32*:*)
828- # uname -m includes "-pc" on this system.
829- echo ${UNAME_MACHINE}-mingw32
830+ # uname -m includes "-pc" on this system.
831+ echo ${UNAME_MACHINE}-mingw32
832 exit ;;
833 i*:PW*:*)
834 echo ${UNAME_MACHINE}-pc-pw32
835 exit ;;
836 *:Interix*:*)
837- case ${UNAME_MACHINE} in
838+ case ${UNAME_MACHINE} in
839 x86)
840 echo i586-pc-interix${UNAME_RELEASE}
841 exit ;;
842@@ -867,7 +870,7 @@
843 EV6) UNAME_MACHINE=alphaev6 ;;
844 EV67) UNAME_MACHINE=alphaev67 ;;
845 EV68*) UNAME_MACHINE=alphaev68 ;;
846- esac
847+ esac
848 objdump --private-headers /bin/sh | grep -q ld.so.1
849 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
850 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
851@@ -879,7 +882,13 @@
852 then
853 echo ${UNAME_MACHINE}-unknown-linux-gnu
854 else
855- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
856+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
857+ | grep -q __ARM_PCS_VFP
858+ then
859+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
860+ else
861+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
862+ fi
863 fi
864 exit ;;
865 avr32*:Linux:*:*)
866@@ -892,7 +901,7 @@
867 echo crisv32-axis-linux-gnu
868 exit ;;
869 frv:Linux:*:*)
870- echo frv-unknown-linux-gnu
871+ echo frv-unknown-linux-gnu
872 exit ;;
873 i*86:Linux:*:*)
874 LIBC=gnu
875@@ -960,7 +969,7 @@
876 echo ${UNAME_MACHINE}-ibm-linux
877 exit ;;
878 sh64*:Linux:*:*)
879- echo ${UNAME_MACHINE}-unknown-linux-gnu
880+ echo ${UNAME_MACHINE}-unknown-linux-gnu
881 exit ;;
882 sh*:Linux:*:*)
883 echo ${UNAME_MACHINE}-unknown-linux-gnu
884@@ -968,6 +977,9 @@
885 sparc:Linux:*:* | sparc64:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu
887 exit ;;
888+ tile*:Linux:*:*)
889+ echo ${UNAME_MACHINE}-tilera-linux-gnu
890+ exit ;;
891 vax:Linux:*:*)
892 echo ${UNAME_MACHINE}-dec-linux-gnu
893 exit ;;
894@@ -975,7 +987,7 @@
895 echo x86_64-unknown-linux-gnu
896 exit ;;
897 xtensa*:Linux:*:*)
898- echo ${UNAME_MACHINE}-unknown-linux-gnu
899+ echo ${UNAME_MACHINE}-unknown-linux-gnu
900 exit ;;
901 i*86:DYNIX/ptx:4*:*)
902 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
903@@ -984,11 +996,11 @@
904 echo i386-sequent-sysv4
905 exit ;;
906 i*86:UNIX_SV:4.2MP:2.*)
907- # Unixware is an offshoot of SVR4, but it has its own version
908- # number series starting with 2...
909- # I am not positive that other SVR4 systems won't match this,
910+ # Unixware is an offshoot of SVR4, but it has its own version
911+ # number series starting with 2...
912+ # I am not positive that other SVR4 systems won't match this,
913 # I just have to hope. -- rms.
914- # Use sysv4.2uw... so that sysv4* matches it.
915+ # Use sysv4.2uw... so that sysv4* matches it.
916 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
917 exit ;;
918 i*86:OS/2:*:*)
919@@ -1020,7 +1032,7 @@
920 fi
921 exit ;;
922 i*86:*:5:[678]*)
923- # UnixWare 7.x, OpenUNIX and OpenServer 6.
924+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
925 case `/bin/uname -X | grep "^Machine"` in
926 *486*) UNAME_MACHINE=i486 ;;
927 *Pentium) UNAME_MACHINE=i586 ;;
928@@ -1048,13 +1060,13 @@
929 exit ;;
930 pc:*:*:*)
931 # Left here for compatibility:
932- # uname -m prints for DJGPP always 'pc', but it prints nothing about
933- # the processor, so we play safe by assuming i586.
934+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
935+ # the processor, so we play safe by assuming i586.
936 # Note: whatever this is, it MUST be the same as what config.sub
937 # prints for the "djgpp" host, or else GDB configury will decide that
938 # this is a cross-build.
939 echo i586-pc-msdosdjgpp
940- exit ;;
941+ exit ;;
942 Intel:Mach:3*:*)
943 echo i386-pc-mach3
944 exit ;;
945@@ -1089,8 +1101,8 @@
946 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
947 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
948 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
949- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
950- && { echo i486-ncr-sysv4; exit; } ;;
951+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
952+ && { echo i486-ncr-sysv4; exit; } ;;
953 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
954 OS_REL='.3'
955 test -r /etc/.relid \
956@@ -1133,10 +1145,10 @@
957 echo ns32k-sni-sysv
958 fi
959 exit ;;
960- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
961- # says <Richard.M.Bartel@ccMail.Census.GOV>
962- echo i586-unisys-sysv4
963- exit ;;
964+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
965+ # says <Richard.M.Bartel@ccMail.Census.GOV>
966+ echo i586-unisys-sysv4
967+ exit ;;
968 *:UNIX_System_V:4*:FTX*)
969 # From Gerald Hewes <hewes@openmarket.com>.
970 # How about differentiating between stratus architectures? -djm
971@@ -1162,11 +1174,11 @@
972 exit ;;
973 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
974 if [ -d /usr/nec ]; then
975- echo mips-nec-sysv${UNAME_RELEASE}
976+ echo mips-nec-sysv${UNAME_RELEASE}
977 else
978- echo mips-unknown-sysv${UNAME_RELEASE}
979+ echo mips-unknown-sysv${UNAME_RELEASE}
980 fi
981- exit ;;
982+ exit ;;
983 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
984 echo powerpc-be-beos
985 exit ;;
986@@ -1231,6 +1243,9 @@
987 *:QNX:*:4*)
988 echo i386-pc-qnx
989 exit ;;
990+ NEO-?:NONSTOP_KERNEL:*:*)
991+ echo neo-tandem-nsk${UNAME_RELEASE}
992+ exit ;;
993 NSE-?:NONSTOP_KERNEL:*:*)
994 echo nse-tandem-nsk${UNAME_RELEASE}
995 exit ;;
996@@ -1276,13 +1291,13 @@
997 echo pdp10-unknown-its
998 exit ;;
999 SEI:*:*:SEIUX)
1000- echo mips-sei-seiux${UNAME_RELEASE}
1001+ echo mips-sei-seiux${UNAME_RELEASE}
1002 exit ;;
1003 *:DragonFly:*:*)
1004 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1005 exit ;;
1006 *:*VMS:*:*)
1007- UNAME_MACHINE=`(uname -p) 2>/dev/null`
1008+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1009 case "${UNAME_MACHINE}" in
1010 A*) echo alpha-dec-vms ; exit ;;
1011 I*) echo ia64-dec-vms ; exit ;;
1012@@ -1322,11 +1337,11 @@
1013 #include <sys/param.h>
1014 printf ("m68k-sony-newsos%s\n",
1015 #ifdef NEWSOS4
1016- "4"
1017+ "4"
1018 #else
1019- ""
1020+ ""
1021 #endif
1022- ); exit (0);
1023+ ); exit (0);
1024 #endif
1025 #endif
1026
1027
1028=== modified file 'build-aux/config.sub'
1029--- build-aux/config.sub 2011-07-07 05:28:26 +0000
1030+++ build-aux/config.sub 2012-01-24 16:25:28 +0000
1031@@ -1,10 +1,10 @@
1032 #! /bin/sh
1033 # Configuration validation subroutine script.
1034 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1035-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1036-# Free Software Foundation, Inc.
1037+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
1038+# 2011 Free Software Foundation, Inc.
1039
1040-timestamp='2010-01-22'
1041+timestamp='2011-03-23'
1042
1043 # This file is (in principle) common to ALL GNU software.
1044 # The presence of a machine in this file suggests that SOME GNU software
1045@@ -76,7 +76,7 @@
1046 GNU config.sub ($timestamp)
1047
1048 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1049-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
1050+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
1051 Software Foundation, Inc.
1052
1053 This is free software; see the source for copying conditions. There is NO
1054@@ -124,8 +124,9 @@
1055 # Here we must recognize all the valid KERNEL-OS combinations.
1056 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1057 case $maybe_os in
1058- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1059- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1060+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
1061+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
1062+ knetbsd*-gnu* | netbsd*-gnu* | \
1063 kopensolaris*-gnu* | \
1064 storm-chaos* | os2-emx* | rtmk-nova*)
1065 os=-$maybe_os
1066@@ -157,8 +158,8 @@
1067 os=
1068 basic_machine=$1
1069 ;;
1070- -bluegene*)
1071- os=-cnk
1072+ -bluegene*)
1073+ os=-cnk
1074 ;;
1075 -sim | -cisco | -oki | -wec | -winbond)
1076 os=
1077@@ -174,10 +175,10 @@
1078 os=-chorusos
1079 basic_machine=$1
1080 ;;
1081- -chorusrdb)
1082- os=-chorusrdb
1083+ -chorusrdb)
1084+ os=-chorusrdb
1085 basic_machine=$1
1086- ;;
1087+ ;;
1088 -hiux*)
1089 os=-hiuxwe2
1090 ;;
1091@@ -282,11 +283,13 @@
1092 | moxie \
1093 | mt \
1094 | msp430 \
1095+ | nds32 | nds32le | nds32be \
1096 | nios | nios2 \
1097 | ns16k | ns32k \
1098+ | open8 \
1099 | or32 \
1100 | pdp10 | pdp11 | pj | pjl \
1101- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1102+ | powerpc | powerpc64 | powerpc64le | powerpcle \
1103 | pyramid \
1104 | rx \
1105 | score \
1106@@ -294,15 +297,24 @@
1107 | sh64 | sh64le \
1108 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1109 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1110- | spu | strongarm \
1111- | tahoe | thumb | tic4x | tic80 | tron \
1112+ | spu \
1113+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
1114 | ubicom32 \
1115 | v850 | v850e \
1116 | we32k \
1117- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1118+ | x86 | xc16x | xstormy16 | xtensa \
1119 | z8k | z80)
1120 basic_machine=$basic_machine-unknown
1121 ;;
1122+ c54x)
1123+ basic_machine=tic54x-unknown
1124+ ;;
1125+ c55x)
1126+ basic_machine=tic55x-unknown
1127+ ;;
1128+ c6x)
1129+ basic_machine=tic6x-unknown
1130+ ;;
1131 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
1132 # Motorola 68HC11/12.
1133 basic_machine=$basic_machine-unknown
1134@@ -314,6 +326,18 @@
1135 basic_machine=mt-unknown
1136 ;;
1137
1138+ strongarm | thumb | xscale)
1139+ basic_machine=arm-unknown
1140+ ;;
1141+
1142+ xscaleeb)
1143+ basic_machine=armeb-unknown
1144+ ;;
1145+
1146+ xscaleel)
1147+ basic_machine=armel-unknown
1148+ ;;
1149+
1150 # We use `pc' rather than `unknown'
1151 # because (1) that's what they normally are, and
1152 # (2) the word "unknown" tends to confuse beginning users.
1153@@ -334,7 +358,7 @@
1154 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
1155 | avr-* | avr32-* \
1156 | bfin-* | bs2000-* \
1157- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1158+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
1159 | clipper-* | craynv-* | cydra-* \
1160 | d10v-* | d30v-* | dlx-* \
1161 | elxsi-* \
1162@@ -368,26 +392,28 @@
1163 | mmix-* \
1164 | mt-* \
1165 | msp430-* \
1166+ | nds32-* | nds32le-* | nds32be-* \
1167 | nios-* | nios2-* \
1168 | none-* | np1-* | ns16k-* | ns32k-* \
1169+ | open8-* \
1170 | orion-* \
1171 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1172- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1173+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
1174 | pyramid-* \
1175 | romp-* | rs6000-* | rx-* \
1176 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1177 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1178 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1179 | sparclite-* \
1180- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1181- | tahoe-* | thumb-* \
1182+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
1183+ | tahoe-* \
1184 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1185 | tile-* | tilegx-* \
1186 | tron-* \
1187 | ubicom32-* \
1188 | v850-* | v850e-* | vax-* \
1189 | we32k-* \
1190- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1191+ | x86-* | x86_64-* | xc16x-* | xps100-* \
1192 | xstormy16-* | xtensa*-* \
1193 | ymp-* \
1194 | z8k-* | z80-*)
1195@@ -412,7 +438,7 @@
1196 basic_machine=a29k-amd
1197 os=-udi
1198 ;;
1199- abacus)
1200+ abacus)
1201 basic_machine=abacus-unknown
1202 ;;
1203 adobe68k)
1204@@ -482,11 +508,20 @@
1205 basic_machine=powerpc-ibm
1206 os=-cnk
1207 ;;
1208+ c54x-*)
1209+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
1210+ ;;
1211+ c55x-*)
1212+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
1213+ ;;
1214+ c6x-*)
1215+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
1216+ ;;
1217 c90)
1218 basic_machine=c90-cray
1219 os=-unicos
1220 ;;
1221- cegcc)
1222+ cegcc)
1223 basic_machine=arm-unknown
1224 os=-cegcc
1225 ;;
1226@@ -518,7 +553,7 @@
1227 basic_machine=craynv-cray
1228 os=-unicosmp
1229 ;;
1230- cr16)
1231+ cr16 | cr16-*)
1232 basic_machine=cr16-unknown
1233 os=-elf
1234 ;;
1235@@ -734,7 +769,7 @@
1236 basic_machine=ns32k-utek
1237 os=-sysv
1238 ;;
1239- microblaze)
1240+ microblaze)
1241 basic_machine=microblaze-xilinx
1242 ;;
1243 mingw32)
1244@@ -841,6 +876,12 @@
1245 np1)
1246 basic_machine=np1-gould
1247 ;;
1248+ neo-tandem)
1249+ basic_machine=neo-tandem
1250+ ;;
1251+ nse-tandem)
1252+ basic_machine=nse-tandem
1253+ ;;
1254 nsr-tandem)
1255 basic_machine=nsr-tandem
1256 ;;
1257@@ -923,9 +964,10 @@
1258 ;;
1259 power) basic_machine=power-ibm
1260 ;;
1261- ppc) basic_machine=powerpc-unknown
1262+ ppc | ppcbe) basic_machine=powerpc-unknown
1263 ;;
1264- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1265+ ppc-* | ppcbe-*)
1266+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1267 ;;
1268 ppcle | powerpclittle | ppc-le | powerpc-little)
1269 basic_machine=powerpcle-unknown
1270@@ -1019,6 +1061,9 @@
1271 basic_machine=i860-stratus
1272 os=-sysv4
1273 ;;
1274+ strongarm-* | thumb-*)
1275+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1276+ ;;
1277 sun2)
1278 basic_machine=m68000-sun
1279 ;;
1280@@ -1075,20 +1120,8 @@
1281 basic_machine=t90-cray
1282 os=-unicos
1283 ;;
1284- tic54x | c54x*)
1285- basic_machine=tic54x-unknown
1286- os=-coff
1287- ;;
1288- tic55x | c55x*)
1289- basic_machine=tic55x-unknown
1290- os=-coff
1291- ;;
1292- tic6x | c6x*)
1293- basic_machine=tic6x-unknown
1294- os=-coff
1295- ;;
1296- # This must be matched before tile*.
1297- tilegx*)
1298+ # This must be matched before tile*.
1299+ tilegx*)
1300 basic_machine=tilegx-unknown
1301 os=-linux-gnu
1302 ;;
1303@@ -1163,6 +1196,9 @@
1304 xps | xps100)
1305 basic_machine=xps100-honeywell
1306 ;;
1307+ xscale-* | xscalee[bl]-*)
1308+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1309+ ;;
1310 ymp)
1311 basic_machine=ymp-cray
1312 os=-unicos
1313@@ -1260,11 +1296,11 @@
1314 if [ x"$os" != x"" ]
1315 then
1316 case $os in
1317- # First match some system type aliases
1318- # that might get confused with valid system types.
1319+ # First match some system type aliases
1320+ # that might get confused with valid system types.
1321 # -solaris* is a basic system type, with this one exception.
1322- -auroraux)
1323- os=-auroraux
1324+ -auroraux)
1325+ os=-auroraux
1326 ;;
1327 -solaris1 | -solaris1.*)
1328 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1329@@ -1301,7 +1337,8 @@
1330 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1331 | -chorusos* | -chorusrdb* | -cegcc* \
1332 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1333- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1334+ | -mingw32* | -linux-gnu* | -linux-android* \
1335+ | -linux-newlib* | -linux-uclibc* \
1336 | -uxpv* | -beos* | -mpeix* | -udk* \
1337 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1338 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1339@@ -1348,7 +1385,7 @@
1340 -opened*)
1341 os=-openedition
1342 ;;
1343- -os400*)
1344+ -os400*)
1345 os=-os400
1346 ;;
1347 -wince*)
1348@@ -1397,7 +1434,7 @@
1349 -sinix*)
1350 os=-sysv4
1351 ;;
1352- -tpf*)
1353+ -tpf*)
1354 os=-tpf
1355 ;;
1356 -triton*)
1357@@ -1442,8 +1479,8 @@
1358 -dicos*)
1359 os=-dicos
1360 ;;
1361- -nacl*)
1362- ;;
1363+ -nacl*)
1364+ ;;
1365 -none)
1366 ;;
1367 *)
1368@@ -1466,10 +1503,10 @@
1369 # system, and we'll never get to this point.
1370
1371 case $basic_machine in
1372- score-*)
1373+ score-*)
1374 os=-elf
1375 ;;
1376- spu-*)
1377+ spu-*)
1378 os=-elf
1379 ;;
1380 *-acorn)
1381@@ -1481,8 +1518,17 @@
1382 arm*-semi)
1383 os=-aout
1384 ;;
1385- c4x-* | tic4x-*)
1386- os=-coff
1387+ c4x-* | tic4x-*)
1388+ os=-coff
1389+ ;;
1390+ tic54x-*)
1391+ os=-coff
1392+ ;;
1393+ tic55x-*)
1394+ os=-coff
1395+ ;;
1396+ tic6x-*)
1397+ os=-coff
1398 ;;
1399 # This must come before the *-dec entry.
1400 pdp10-*)
1401@@ -1509,7 +1555,7 @@
1402 m68*-cisco)
1403 os=-aout
1404 ;;
1405- mep-*)
1406+ mep-*)
1407 os=-elf
1408 ;;
1409 mips*-cisco)
1410@@ -1536,7 +1582,7 @@
1411 *-ibm)
1412 os=-aix
1413 ;;
1414- *-knuth)
1415+ *-knuth)
1416 os=-mmixware
1417 ;;
1418 *-wec)
1419
1420=== modified file 'build-aux/ltmain.sh' (properties changed: +x to -x)
1421--- build-aux/ltmain.sh 2011-07-07 05:28:26 +0000
1422+++ build-aux/ltmain.sh 2012-01-24 16:25:28 +0000
1423@@ -1,9 +1,9 @@
1424-# Generated from ltmain.m4sh.
1425
1426-# ltmain.sh (GNU libtool) 2.2.6b
1427+# libtool (GNU libtool) 2.4.2
1428 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1429
1430-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
1431+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
1432+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
1433 # This is free software; see the source for copying conditions. There is NO
1434 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1435
1436@@ -32,50 +32,57 @@
1437 #
1438 # Provide generalized library-building support services.
1439 #
1440-# --config show all configuration variables
1441-# --debug enable verbose shell tracing
1442-# -n, --dry-run display commands without modifying any files
1443-# --features display basic configuration information and exit
1444-# --mode=MODE use operation mode MODE
1445-# --preserve-dup-deps don't remove duplicate dependency libraries
1446-# --quiet, --silent don't print informational messages
1447-# --tag=TAG use configuration variables from tag TAG
1448-# -v, --verbose print informational messages (default)
1449-# --version print version information
1450-# -h, --help print short or long help message
1451+# --config show all configuration variables
1452+# --debug enable verbose shell tracing
1453+# -n, --dry-run display commands without modifying any files
1454+# --features display basic configuration information and exit
1455+# --mode=MODE use operation mode MODE
1456+# --preserve-dup-deps don't remove duplicate dependency libraries
1457+# --quiet, --silent don't print informational messages
1458+# --no-quiet, --no-silent
1459+# print informational messages (default)
1460+# --no-warn don't display warning messages
1461+# --tag=TAG use configuration variables from tag TAG
1462+# -v, --verbose print more informational messages than default
1463+# --no-verbose don't print the extra informational messages
1464+# --version print version information
1465+# -h, --help, --help-all print short, long, or detailed help message
1466 #
1467 # MODE must be one of the following:
1468 #
1469-# clean remove files from the build directory
1470-# compile compile a source file into a libtool object
1471-# execute automatically set library path, then run a program
1472-# finish complete the installation of libtool libraries
1473-# install install libraries or executables
1474-# link create a library or an executable
1475-# uninstall remove libraries from an installed directory
1476+# clean remove files from the build directory
1477+# compile compile a source file into a libtool object
1478+# execute automatically set library path, then run a program
1479+# finish complete the installation of libtool libraries
1480+# install install libraries or executables
1481+# link create a library or an executable
1482+# uninstall remove libraries from an installed directory
1483 #
1484-# MODE-ARGS vary depending on the MODE.
1485+# MODE-ARGS vary depending on the MODE. When passed as first option,
1486+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
1487 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
1488 #
1489 # When reporting a bug, please describe a test case to reproduce it and
1490 # include the following information:
1491 #
1492-# host-triplet: $host
1493-# shell: $SHELL
1494-# compiler: $LTCC
1495-# compiler flags: $LTCFLAGS
1496-# linker: $LD (gnu? $with_gnu_ld)
1497-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
1498-# automake: $automake_version
1499-# autoconf: $autoconf_version
1500+# host-triplet: $host
1501+# shell: $SHELL
1502+# compiler: $LTCC
1503+# compiler flags: $LTCFLAGS
1504+# linker: $LD (gnu? $with_gnu_ld)
1505+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
1506+# automake: $automake_version
1507+# autoconf: $autoconf_version
1508 #
1509 # Report bugs to <bug-libtool@gnu.org>.
1510+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
1511+# General help using GNU software: <http://www.gnu.org/gethelp/>.
1512
1513-PROGRAM=ltmain.sh
1514+PROGRAM=libtool
1515 PACKAGE=libtool
1516-VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
1517+VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
1518 TIMESTAMP=""
1519-package_revision=1.3017
1520+package_revision=1.3337
1521
1522 # Be Bourne compatible
1523 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
1524@@ -91,10 +98,15 @@
1525 BIN_SH=xpg4; export BIN_SH # for Tru64
1526 DUALCASE=1; export DUALCASE # for MKS sh
1527
1528+# A function that is used when there is no print builtin or printf.
1529+func_fallback_echo ()
1530+{
1531+ eval 'cat <<_LTECHO_EOF
1532+$1
1533+_LTECHO_EOF'
1534+}
1535+
1536 # NLS nuisances: We save the old values to restore during execute mode.
1537-# Only set LANG and LC_ALL to C if already set.
1538-# These must not be set unconditionally because not all systems understand
1539-# e.g. LANG=C (notably SCO).
1540 lt_user_locale=
1541 lt_safe_locale=
1542 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1543@@ -107,24 +119,28 @@
1544 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
1545 fi"
1546 done
1547+LC_ALL=C
1548+LANGUAGE=C
1549+export LANGUAGE LC_ALL
1550
1551 $lt_unset CDPATH
1552
1553
1554+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
1555+# is ksh but when the shell is invoked as "sh" and the current value of
1556+# the _XPG environment variable is not equal to 1 (one), the special
1557+# positional parameter $0, within a function call, is the name of the
1558+# function.
1559+progpath="$0"
1560
1561
1562
1563 : ${CP="cp -f"}
1564-: ${ECHO="echo"}
1565-: ${EGREP="/bin/grep -E"}
1566-: ${FGREP="/bin/grep -F"}
1567-: ${GREP="/bin/grep"}
1568-: ${LN_S="ln -s"}
1569+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
1570 : ${MAKE="make"}
1571 : ${MKDIR="mkdir"}
1572 : ${MV="mv -f"}
1573 : ${RM="rm -f"}
1574-: ${SED="/bin/sed"}
1575 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
1576 : ${Xsed="$SED -e 1s/^X//"}
1577
1578@@ -144,6 +160,27 @@
1579 dirname="s,/[^/]*$,,"
1580 basename="s,^.*/,,"
1581
1582+# func_dirname file append nondir_replacement
1583+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
1584+# otherwise set result to NONDIR_REPLACEMENT.
1585+func_dirname ()
1586+{
1587+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
1588+ if test "X$func_dirname_result" = "X${1}"; then
1589+ func_dirname_result="${3}"
1590+ else
1591+ func_dirname_result="$func_dirname_result${2}"
1592+ fi
1593+} # func_dirname may be replaced by extended shell implementation
1594+
1595+
1596+# func_basename file
1597+func_basename ()
1598+{
1599+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
1600+} # func_basename may be replaced by extended shell implementation
1601+
1602+
1603 # func_dirname_and_basename file append nondir_replacement
1604 # perform func_basename and func_dirname in a single function
1605 # call:
1606@@ -158,33 +195,183 @@
1607 # those functions but instead duplicate the functionality here.
1608 func_dirname_and_basename ()
1609 {
1610- # Extract subdirectory from the argument.
1611- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
1612- if test "X$func_dirname_result" = "X${1}"; then
1613- func_dirname_result="${3}"
1614- else
1615- func_dirname_result="$func_dirname_result${2}"
1616- fi
1617- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
1618-}
1619-
1620-# Generated shell functions inserted here.
1621-
1622-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
1623-# is ksh but when the shell is invoked as "sh" and the current value of
1624-# the _XPG environment variable is not equal to 1 (one), the special
1625-# positional parameter $0, within a function call, is the name of the
1626-# function.
1627-progpath="$0"
1628+ # Extract subdirectory from the argument.
1629+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
1630+ if test "X$func_dirname_result" = "X${1}"; then
1631+ func_dirname_result="${3}"
1632+ else
1633+ func_dirname_result="$func_dirname_result${2}"
1634+ fi
1635+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
1636+} # func_dirname_and_basename may be replaced by extended shell implementation
1637+
1638+
1639+# func_stripname prefix suffix name
1640+# strip PREFIX and SUFFIX off of NAME.
1641+# PREFIX and SUFFIX must not contain globbing or regex special
1642+# characters, hashes, percent signs, but SUFFIX may contain a leading
1643+# dot (in which case that matches only a dot).
1644+# func_strip_suffix prefix name
1645+func_stripname ()
1646+{
1647+ case ${2} in
1648+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
1649+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
1650+ esac
1651+} # func_stripname may be replaced by extended shell implementation
1652+
1653+
1654+# These SED scripts presuppose an absolute path with a trailing slash.
1655+pathcar='s,^/\([^/]*\).*$,\1,'
1656+pathcdr='s,^/[^/]*,,'
1657+removedotparts=':dotsl
1658+ s@/\./@/@g
1659+ t dotsl
1660+ s,/\.$,/,'
1661+collapseslashes='s@/\{1,\}@/@g'
1662+finalslash='s,/*$,/,'
1663+
1664+# func_normal_abspath PATH
1665+# Remove doubled-up and trailing slashes, "." path components,
1666+# and cancel out any ".." path components in PATH after making
1667+# it an absolute path.
1668+# value returned in "$func_normal_abspath_result"
1669+func_normal_abspath ()
1670+{
1671+ # Start from root dir and reassemble the path.
1672+ func_normal_abspath_result=
1673+ func_normal_abspath_tpath=$1
1674+ func_normal_abspath_altnamespace=
1675+ case $func_normal_abspath_tpath in
1676+ "")
1677+ # Empty path, that just means $cwd.
1678+ func_stripname '' '/' "`pwd`"
1679+ func_normal_abspath_result=$func_stripname_result
1680+ return
1681+ ;;
1682+ # The next three entries are used to spot a run of precisely
1683+ # two leading slashes without using negated character classes;
1684+ # we take advantage of case's first-match behaviour.
1685+ ///*)
1686+ # Unusual form of absolute path, do nothing.
1687+ ;;
1688+ //*)
1689+ # Not necessarily an ordinary path; POSIX reserves leading '//'
1690+ # and for example Cygwin uses it to access remote file shares
1691+ # over CIFS/SMB, so we conserve a leading double slash if found.
1692+ func_normal_abspath_altnamespace=/
1693+ ;;
1694+ /*)
1695+ # Absolute path, do nothing.
1696+ ;;
1697+ *)
1698+ # Relative path, prepend $cwd.
1699+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
1700+ ;;
1701+ esac
1702+ # Cancel out all the simple stuff to save iterations. We also want
1703+ # the path to end with a slash for ease of parsing, so make sure
1704+ # there is one (and only one) here.
1705+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
1706+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
1707+ while :; do
1708+ # Processed it all yet?
1709+ if test "$func_normal_abspath_tpath" = / ; then
1710+ # If we ascended to the root using ".." the result may be empty now.
1711+ if test -z "$func_normal_abspath_result" ; then
1712+ func_normal_abspath_result=/
1713+ fi
1714+ break
1715+ fi
1716+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
1717+ -e "$pathcar"`
1718+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
1719+ -e "$pathcdr"`
1720+ # Figure out what to do with it
1721+ case $func_normal_abspath_tcomponent in
1722+ "")
1723+ # Trailing empty path component, ignore it.
1724+ ;;
1725+ ..)
1726+ # Parent dir; strip last assembled component from result.
1727+ func_dirname "$func_normal_abspath_result"
1728+ func_normal_abspath_result=$func_dirname_result
1729+ ;;
1730+ *)
1731+ # Actual path component, append it.
1732+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
1733+ ;;
1734+ esac
1735+ done
1736+ # Restore leading double-slash if one was found on entry.
1737+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1738+}
1739+
1740+# func_relative_path SRCDIR DSTDIR
1741+# generates a relative path from SRCDIR to DSTDIR, with a trailing
1742+# slash if non-empty, suitable for immediately appending a filename
1743+# without needing to append a separator.
1744+# value returned in "$func_relative_path_result"
1745+func_relative_path ()
1746+{
1747+ func_relative_path_result=
1748+ func_normal_abspath "$1"
1749+ func_relative_path_tlibdir=$func_normal_abspath_result
1750+ func_normal_abspath "$2"
1751+ func_relative_path_tbindir=$func_normal_abspath_result
1752+
1753+ # Ascend the tree starting from libdir
1754+ while :; do
1755+ # check if we have found a prefix of bindir
1756+ case $func_relative_path_tbindir in
1757+ $func_relative_path_tlibdir)
1758+ # found an exact match
1759+ func_relative_path_tcancelled=
1760+ break
1761+ ;;
1762+ $func_relative_path_tlibdir*)
1763+ # found a matching prefix
1764+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1765+ func_relative_path_tcancelled=$func_stripname_result
1766+ if test -z "$func_relative_path_result"; then
1767+ func_relative_path_result=.
1768+ fi
1769+ break
1770+ ;;
1771+ *)
1772+ func_dirname $func_relative_path_tlibdir
1773+ func_relative_path_tlibdir=${func_dirname_result}
1774+ if test "x$func_relative_path_tlibdir" = x ; then
1775+ # Have to descend all the way to the root!
1776+ func_relative_path_result=../$func_relative_path_result
1777+ func_relative_path_tcancelled=$func_relative_path_tbindir
1778+ break
1779+ fi
1780+ func_relative_path_result=../$func_relative_path_result
1781+ ;;
1782+ esac
1783+ done
1784+
1785+ # Now calculate path; take care to avoid doubling-up slashes.
1786+ func_stripname '' '/' "$func_relative_path_result"
1787+ func_relative_path_result=$func_stripname_result
1788+ func_stripname '/' '/' "$func_relative_path_tcancelled"
1789+ if test "x$func_stripname_result" != x ; then
1790+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
1791+ fi
1792+
1793+ # Normalisation. If bindir is libdir, return empty string,
1794+ # else relative path ending with a slash; either way, target
1795+ # file name can be directly appended.
1796+ if test ! -z "$func_relative_path_result"; then
1797+ func_stripname './' '' "$func_relative_path_result/"
1798+ func_relative_path_result=$func_stripname_result
1799+ fi
1800+}
1801
1802 # The name of this program:
1803-# In the unlikely event $progname began with a '-', it would play havoc with
1804-# func_echo (imagine progname=-n), so we prepend ./ in that case:
1805 func_dirname_and_basename "$progpath"
1806 progname=$func_basename_result
1807-case $progname in
1808- -*) progname=./$progname ;;
1809-esac
1810
1811 # Make sure we have an absolute path for reexecution:
1812 case $progpath in
1813@@ -196,7 +383,7 @@
1814 ;;
1815 *)
1816 save_IFS="$IFS"
1817- IFS=:
1818+ IFS=${PATH_SEPARATOR-:}
1819 for progdir in $PATH; do
1820 IFS="$save_IFS"
1821 test -x "$progdir/$progname" && break
1822@@ -215,6 +402,15 @@
1823 # Same as above, but do not quote variable references.
1824 double_quote_subst='s/\(["`\\]\)/\\\1/g'
1825
1826+# Sed substitution that turns a string into a regex matching for the
1827+# string literally.
1828+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
1829+
1830+# Sed substitution that converts a w32 file name or path
1831+# which contains forward slashes, into one that contains
1832+# (escaped) backslashes. A very naive implementation.
1833+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
1834+
1835 # Re-`\' parameter expansions in output of double_quote_subst that were
1836 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
1837 # in input to double_quote_subst, that '$' was protected from expansion.
1838@@ -243,7 +439,7 @@
1839 # name if it has been set yet.
1840 func_echo ()
1841 {
1842- $ECHO "$progname${mode+: }$mode: $*"
1843+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
1844 }
1845
1846 # func_verbose arg...
1847@@ -258,18 +454,25 @@
1848 :
1849 }
1850
1851+# func_echo_all arg...
1852+# Invoke $ECHO with all args, space-separated.
1853+func_echo_all ()
1854+{
1855+ $ECHO "$*"
1856+}
1857+
1858 # func_error arg...
1859 # Echo program name prefixed message to standard error.
1860 func_error ()
1861 {
1862- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
1863+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
1864 }
1865
1866 # func_warning arg...
1867 # Echo program name prefixed warning message to standard error.
1868 func_warning ()
1869 {
1870- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
1871+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
1872
1873 # bash bug again:
1874 :
1875@@ -326,9 +529,9 @@
1876 case $my_directory_path in */*) ;; *) break ;; esac
1877
1878 # ...otherwise throw away the child directory and loop
1879- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
1880+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
1881 done
1882- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
1883+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
1884
1885 save_mkdir_p_IFS="$IFS"; IFS=':'
1886 for my_dir in $my_dir_list; do
1887@@ -378,7 +581,7 @@
1888 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
1889 fi
1890
1891- $ECHO "X$my_tmpdir" | $Xsed
1892+ $ECHO "$my_tmpdir"
1893 }
1894
1895
1896@@ -392,7 +595,7 @@
1897 {
1898 case $1 in
1899 *[\\\`\"\$]*)
1900- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
1901+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
1902 *)
1903 func_quote_for_eval_unquoted_result="$1" ;;
1904 esac
1905@@ -419,7 +622,7 @@
1906 {
1907 case $1 in
1908 *[\\\`\"]*)
1909- my_arg=`$ECHO "X$1" | $Xsed \
1910+ my_arg=`$ECHO "$1" | $SED \
1911 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
1912 *)
1913 my_arg="$1" ;;
1914@@ -488,15 +691,39 @@
1915 fi
1916 }
1917
1918-
1919-
1920+# func_tr_sh
1921+# Turn $1 into a string suitable for a shell variable name.
1922+# Result is stored in $func_tr_sh_result. All characters
1923+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1924+# if $1 begins with a digit, a '_' is prepended as well.
1925+func_tr_sh ()
1926+{
1927+ case $1 in
1928+ [0-9]* | *[!a-zA-Z0-9_]*)
1929+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
1930+ ;;
1931+ * )
1932+ func_tr_sh_result=$1
1933+ ;;
1934+ esac
1935+}
1936
1937
1938 # func_version
1939 # Echo version message to standard output and exit.
1940 func_version ()
1941 {
1942- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
1943+ $opt_debug
1944+
1945+ $SED -n '/(C)/!b go
1946+ :more
1947+ /\./!{
1948+ N
1949+ s/\n# / /
1950+ b more
1951+ }
1952+ :go
1953+ /^# '$PROGRAM' (GNU /,/# warranty; / {
1954 s/^# //
1955 s/^# *$//
1956 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
1957@@ -509,22 +736,28 @@
1958 # Echo short help message to standard output and exit.
1959 func_usage ()
1960 {
1961- $SED -n '/^# Usage:/,/# -h/ {
1962+ $opt_debug
1963+
1964+ $SED -n '/^# Usage:/,/^# *.*--help/ {
1965 s/^# //
1966 s/^# *$//
1967 s/\$progname/'$progname'/
1968 p
1969 }' < "$progpath"
1970- $ECHO
1971+ echo
1972 $ECHO "run \`$progname --help | more' for full usage"
1973 exit $?
1974 }
1975
1976-# func_help
1977-# Echo long help message to standard output and exit.
1978+# func_help [NOEXIT]
1979+# Echo long help message to standard output and exit,
1980+# unless 'noexit' is passed as argument.
1981 func_help ()
1982 {
1983+ $opt_debug
1984+
1985 $SED -n '/^# Usage:/,/# Report bugs to/ {
1986+ :print
1987 s/^# //
1988 s/^# *$//
1989 s*\$progname*'$progname'*
1990@@ -534,11 +767,18 @@
1991 s*\$LTCFLAGS*'"$LTCFLAGS"'*
1992 s*\$LD*'"$LD"'*
1993 s/\$with_gnu_ld/'"$with_gnu_ld"'/
1994- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
1995- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
1996+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
1997+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
1998 p
1999- }' < "$progpath"
2000- exit $?
2001+ d
2002+ }
2003+ /^# .* home page:/b print
2004+ /^# General help using/b print
2005+ ' < "$progpath"
2006+ ret=$?
2007+ if test -z "$1"; then
2008+ exit $ret
2009+ fi
2010 }
2011
2012 # func_missing_arg argname
2013@@ -546,63 +786,106 @@
2014 # exit_cmd.
2015 func_missing_arg ()
2016 {
2017- func_error "missing argument for $1"
2018+ $opt_debug
2019+
2020+ func_error "missing argument for $1."
2021 exit_cmd=exit
2022 }
2023
2024+
2025+# func_split_short_opt shortopt
2026+# Set func_split_short_opt_name and func_split_short_opt_arg shell
2027+# variables after splitting SHORTOPT after the 2nd character.
2028+func_split_short_opt ()
2029+{
2030+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
2031+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
2032+
2033+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
2034+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
2035+} # func_split_short_opt may be replaced by extended shell implementation
2036+
2037+
2038+# func_split_long_opt longopt
2039+# Set func_split_long_opt_name and func_split_long_opt_arg shell
2040+# variables after splitting LONGOPT at the `=' sign.
2041+func_split_long_opt ()
2042+{
2043+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
2044+ my_sed_long_arg='1s/^--[^=]*=//'
2045+
2046+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
2047+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
2048+} # func_split_long_opt may be replaced by extended shell implementation
2049+
2050 exit_cmd=:
2051
2052
2053
2054
2055
2056-# Check that we have a working $ECHO.
2057-if test "X$1" = X--no-reexec; then
2058- # Discard the --no-reexec flag, and continue.
2059- shift
2060-elif test "X$1" = X--fallback-echo; then
2061- # Avoid inline document here, it may be left over
2062- :
2063-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
2064- # Yippee, $ECHO works!
2065- :
2066-else
2067- # Restart under the correct shell, and then maybe $ECHO will work.
2068- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
2069-fi
2070-
2071-if test "X$1" = X--fallback-echo; then
2072- # used as fallback echo
2073- shift
2074- cat <<EOF
2075-$*
2076-EOF
2077- exit $EXIT_SUCCESS
2078-fi
2079-
2080 magic="%%%MAGIC variable%%%"
2081 magic_exe="%%%MAGIC EXE variable%%%"
2082
2083 # Global variables.
2084-# $mode is unset
2085 nonopt=
2086-execute_dlfiles=
2087 preserve_args=
2088 lo2o="s/\\.lo\$/.${objext}/"
2089 o2lo="s/\\.${objext}\$/.lo/"
2090 extracted_archives=
2091 extracted_serial=0
2092
2093-opt_dry_run=false
2094-opt_duplicate_deps=false
2095-opt_silent=false
2096-opt_debug=:
2097-
2098 # If this variable is set in any of the actions, the command in it
2099 # will be execed at the end. This prevents here-documents from being
2100 # left over by shells.
2101 exec_cmd=
2102
2103+# func_append var value
2104+# Append VALUE to the end of shell variable VAR.
2105+func_append ()
2106+{
2107+ eval "${1}=\$${1}\${2}"
2108+} # func_append may be replaced by extended shell implementation
2109+
2110+# func_append_quoted var value
2111+# Quote VALUE and append to the end of shell variable VAR, separated
2112+# by a space.
2113+func_append_quoted ()
2114+{
2115+ func_quote_for_eval "${2}"
2116+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
2117+} # func_append_quoted may be replaced by extended shell implementation
2118+
2119+
2120+# func_arith arithmetic-term...
2121+func_arith ()
2122+{
2123+ func_arith_result=`expr "${@}"`
2124+} # func_arith may be replaced by extended shell implementation
2125+
2126+
2127+# func_len string
2128+# STRING may not start with a hyphen.
2129+func_len ()
2130+{
2131+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
2132+} # func_len may be replaced by extended shell implementation
2133+
2134+
2135+# func_lo2o object
2136+func_lo2o ()
2137+{
2138+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
2139+} # func_lo2o may be replaced by extended shell implementation
2140+
2141+
2142+# func_xform libobj-or-source
2143+func_xform ()
2144+{
2145+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
2146+} # func_xform may be replaced by extended shell implementation
2147+
2148+
2149 # func_fatal_configuration arg...
2150 # Echo program name prefixed message to standard error, followed by
2151 # a configuration failure hint, and exit.
2152@@ -636,16 +919,16 @@
2153 # Display the features supported by this script.
2154 func_features ()
2155 {
2156- $ECHO "host: $host"
2157+ echo "host: $host"
2158 if test "$build_libtool_libs" = yes; then
2159- $ECHO "enable shared libraries"
2160+ echo "enable shared libraries"
2161 else
2162- $ECHO "disable shared libraries"
2163+ echo "disable shared libraries"
2164 fi
2165 if test "$build_old_libs" = yes; then
2166- $ECHO "enable static libraries"
2167+ echo "enable static libraries"
2168 else
2169- $ECHO "disable static libraries"
2170+ echo "disable static libraries"
2171 fi
2172
2173 exit $?
2174@@ -692,133 +975,6 @@
2175 esac
2176 }
2177
2178-# Parse options once, thoroughly. This comes as soon as possible in
2179-# the script to make things like `libtool --version' happen quickly.
2180-{
2181-
2182- # Shorthand for --mode=foo, only valid as the first argument
2183- case $1 in
2184- clean|clea|cle|cl)
2185- shift; set dummy --mode clean ${1+"$@"}; shift
2186- ;;
2187- compile|compil|compi|comp|com|co|c)
2188- shift; set dummy --mode compile ${1+"$@"}; shift
2189- ;;
2190- execute|execut|execu|exec|exe|ex|e)
2191- shift; set dummy --mode execute ${1+"$@"}; shift
2192- ;;
2193- finish|finis|fini|fin|fi|f)
2194- shift; set dummy --mode finish ${1+"$@"}; shift
2195- ;;
2196- install|instal|insta|inst|ins|in|i)
2197- shift; set dummy --mode install ${1+"$@"}; shift
2198- ;;
2199- link|lin|li|l)
2200- shift; set dummy --mode link ${1+"$@"}; shift
2201- ;;
2202- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2203- shift; set dummy --mode uninstall ${1+"$@"}; shift
2204- ;;
2205- esac
2206-
2207- # Parse non-mode specific arguments:
2208- while test "$#" -gt 0; do
2209- opt="$1"
2210- shift
2211-
2212- case $opt in
2213- --config) func_config ;;
2214-
2215- --debug) preserve_args="$preserve_args $opt"
2216- func_echo "enabling shell trace mode"
2217- opt_debug='set -x'
2218- $opt_debug
2219- ;;
2220-
2221- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
2222- execute_dlfiles="$execute_dlfiles $1"
2223- shift
2224- ;;
2225-
2226- --dry-run | -n) opt_dry_run=: ;;
2227- --features) func_features ;;
2228- --finish) mode="finish" ;;
2229-
2230- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
2231- case $1 in
2232- # Valid mode arguments:
2233- clean) ;;
2234- compile) ;;
2235- execute) ;;
2236- finish) ;;
2237- install) ;;
2238- link) ;;
2239- relink) ;;
2240- uninstall) ;;
2241-
2242- # Catch anything else as an error
2243- *) func_error "invalid argument for $opt"
2244- exit_cmd=exit
2245- break
2246- ;;
2247- esac
2248-
2249- mode="$1"
2250- shift
2251- ;;
2252-
2253- --preserve-dup-deps)
2254- opt_duplicate_deps=: ;;
2255-
2256- --quiet|--silent) preserve_args="$preserve_args $opt"
2257- opt_silent=:
2258- ;;
2259-
2260- --verbose| -v) preserve_args="$preserve_args $opt"
2261- opt_silent=false
2262- ;;
2263-
2264- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
2265- preserve_args="$preserve_args $opt $1"
2266- func_enable_tag "$1" # tagname is set here
2267- shift
2268- ;;
2269-
2270- # Separate optargs to long options:
2271- -dlopen=*|--mode=*|--tag=*)
2272- func_opt_split "$opt"
2273- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
2274- shift
2275- ;;
2276-
2277- -\?|-h) func_usage ;;
2278- --help) opt_help=: ;;
2279- --version) func_version ;;
2280-
2281- -*) func_fatal_help "unrecognized option \`$opt'" ;;
2282-
2283- *) nonopt="$opt"
2284- break
2285- ;;
2286- esac
2287- done
2288-
2289-
2290- case $host in
2291- *cygwin* | *mingw* | *pw32* | *cegcc*)
2292- # don't eliminate duplications in $postdeps and $predeps
2293- opt_duplicate_compiler_generated_deps=:
2294- ;;
2295- *)
2296- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
2297- ;;
2298- esac
2299-
2300- # Having warned about all mis-specified options, bail out if
2301- # anything was wrong.
2302- $exit_cmd $EXIT_FAILURE
2303-}
2304-
2305 # func_check_version_match
2306 # Ensure that we are using m4 macros, and libtool script from the same
2307 # release of libtool.
2308@@ -855,38 +1011,219 @@
2309 }
2310
2311
2312+# Shorthand for --mode=foo, only valid as the first argument
2313+case $1 in
2314+clean|clea|cle|cl)
2315+ shift; set dummy --mode clean ${1+"$@"}; shift
2316+ ;;
2317+compile|compil|compi|comp|com|co|c)
2318+ shift; set dummy --mode compile ${1+"$@"}; shift
2319+ ;;
2320+execute|execut|execu|exec|exe|ex|e)
2321+ shift; set dummy --mode execute ${1+"$@"}; shift
2322+ ;;
2323+finish|finis|fini|fin|fi|f)
2324+ shift; set dummy --mode finish ${1+"$@"}; shift
2325+ ;;
2326+install|instal|insta|inst|ins|in|i)
2327+ shift; set dummy --mode install ${1+"$@"}; shift
2328+ ;;
2329+link|lin|li|l)
2330+ shift; set dummy --mode link ${1+"$@"}; shift
2331+ ;;
2332+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2333+ shift; set dummy --mode uninstall ${1+"$@"}; shift
2334+ ;;
2335+esac
2336+
2337+
2338+
2339+# Option defaults:
2340+opt_debug=:
2341+opt_dry_run=false
2342+opt_config=false
2343+opt_preserve_dup_deps=false
2344+opt_features=false
2345+opt_finish=false
2346+opt_help=false
2347+opt_help_all=false
2348+opt_silent=:
2349+opt_warning=:
2350+opt_verbose=:
2351+opt_silent=false
2352+opt_verbose=false
2353+
2354+
2355+# Parse options once, thoroughly. This comes as soon as possible in the
2356+# script to make things like `--version' happen as quickly as we can.
2357+{
2358+ # this just eases exit handling
2359+ while test $# -gt 0; do
2360+ opt="$1"
2361+ shift
2362+ case $opt in
2363+ --debug|-x) opt_debug='set -x'
2364+ func_echo "enabling shell trace mode"
2365+ $opt_debug
2366+ ;;
2367+ --dry-run|--dryrun|-n)
2368+ opt_dry_run=:
2369+ ;;
2370+ --config)
2371+ opt_config=:
2372+func_config
2373+ ;;
2374+ --dlopen|-dlopen)
2375+ optarg="$1"
2376+ opt_dlopen="${opt_dlopen+$opt_dlopen
2377+}$optarg"
2378+ shift
2379+ ;;
2380+ --preserve-dup-deps)
2381+ opt_preserve_dup_deps=:
2382+ ;;
2383+ --features)
2384+ opt_features=:
2385+func_features
2386+ ;;
2387+ --finish)
2388+ opt_finish=:
2389+set dummy --mode finish ${1+"$@"}; shift
2390+ ;;
2391+ --help)
2392+ opt_help=:
2393+ ;;
2394+ --help-all)
2395+ opt_help_all=:
2396+opt_help=': help-all'
2397+ ;;
2398+ --mode)
2399+ test $# = 0 && func_missing_arg $opt && break
2400+ optarg="$1"
2401+ opt_mode="$optarg"
2402+case $optarg in
2403+ # Valid mode arguments:
2404+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
2405+
2406+ # Catch anything else as an error
2407+ *) func_error "invalid argument for $opt"
2408+ exit_cmd=exit
2409+ break
2410+ ;;
2411+esac
2412+ shift
2413+ ;;
2414+ --no-silent|--no-quiet)
2415+ opt_silent=false
2416+func_append preserve_args " $opt"
2417+ ;;
2418+ --no-warning|--no-warn)
2419+ opt_warning=false
2420+func_append preserve_args " $opt"
2421+ ;;
2422+ --no-verbose)
2423+ opt_verbose=false
2424+func_append preserve_args " $opt"
2425+ ;;
2426+ --silent|--quiet)
2427+ opt_silent=:
2428+func_append preserve_args " $opt"
2429+ opt_verbose=false
2430+ ;;
2431+ --verbose|-v)
2432+ opt_verbose=:
2433+func_append preserve_args " $opt"
2434+opt_silent=false
2435+ ;;
2436+ --tag)
2437+ test $# = 0 && func_missing_arg $opt && break
2438+ optarg="$1"
2439+ opt_tag="$optarg"
2440+func_append preserve_args " $opt $optarg"
2441+func_enable_tag "$optarg"
2442+ shift
2443+ ;;
2444+
2445+ -\?|-h) func_usage ;;
2446+ --help) func_help ;;
2447+ --version) func_version ;;
2448+
2449+ # Separate optargs to long options:
2450+ --*=*)
2451+ func_split_long_opt "$opt"
2452+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
2453+ shift
2454+ ;;
2455+
2456+ # Separate non-argument short options:
2457+ -\?*|-h*|-n*|-v*)
2458+ func_split_short_opt "$opt"
2459+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
2460+ shift
2461+ ;;
2462+
2463+ --) break ;;
2464+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
2465+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
2466+ esac
2467+ done
2468+
2469+ # Validate options:
2470+
2471+ # save first non-option argument
2472+ if test "$#" -gt 0; then
2473+ nonopt="$opt"
2474+ shift
2475+ fi
2476+
2477+ # preserve --debug
2478+ test "$opt_debug" = : || func_append preserve_args " --debug"
2479+
2480+ case $host in
2481+ *cygwin* | *mingw* | *pw32* | *cegcc*)
2482+ # don't eliminate duplications in $postdeps and $predeps
2483+ opt_duplicate_compiler_generated_deps=:
2484+ ;;
2485+ *)
2486+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2487+ ;;
2488+ esac
2489+
2490+ $opt_help || {
2491+ # Sanity checks first:
2492+ func_check_version_match
2493+
2494+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2495+ func_fatal_configuration "not configured to build any kind of library"
2496+ fi
2497+
2498+ # Darwin sucks
2499+ eval std_shrext=\"$shrext_cmds\"
2500+
2501+ # Only execute mode is allowed to have -dlopen flags.
2502+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
2503+ func_error "unrecognized option \`-dlopen'"
2504+ $ECHO "$help" 1>&2
2505+ exit $EXIT_FAILURE
2506+ fi
2507+
2508+ # Change the help message to a mode-specific one.
2509+ generic_help="$help"
2510+ help="Try \`$progname --help --mode=$opt_mode' for more information."
2511+ }
2512+
2513+
2514+ # Bail if the options were screwed
2515+ $exit_cmd $EXIT_FAILURE
2516+}
2517+
2518+
2519+
2520+
2521 ## ----------- ##
2522 ## Main. ##
2523 ## ----------- ##
2524
2525-$opt_help || {
2526- # Sanity checks first:
2527- func_check_version_match
2528-
2529- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2530- func_fatal_configuration "not configured to build any kind of library"
2531- fi
2532-
2533- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
2534-
2535-
2536- # Darwin sucks
2537- eval std_shrext=\"$shrext_cmds\"
2538-
2539-
2540- # Only execute mode is allowed to have -dlopen flags.
2541- if test -n "$execute_dlfiles" && test "$mode" != execute; then
2542- func_error "unrecognized option \`-dlopen'"
2543- $ECHO "$help" 1>&2
2544- exit $EXIT_FAILURE
2545- fi
2546-
2547- # Change the help message to a mode-specific one.
2548- generic_help="$help"
2549- help="Try \`$progname --help --mode=$mode' for more information."
2550-}
2551-
2552-
2553 # func_lalib_p file
2554 # True iff FILE is a libtool `.la' library or `.lo' object file.
2555 # This function is only a basic sanity check; it will hardly flush out
2556@@ -950,12 +1287,9 @@
2557 # temporary ltwrapper_script.
2558 func_ltwrapper_scriptname ()
2559 {
2560- func_ltwrapper_scriptname_result=""
2561- if func_ltwrapper_executable_p "$1"; then
2562- func_dirname_and_basename "$1" "" "."
2563- func_stripname '' '.exe' "$func_basename_result"
2564- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2565- fi
2566+ func_dirname_and_basename "$1" "" "."
2567+ func_stripname '' '.exe' "$func_basename_result"
2568+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2569 }
2570
2571 # func_ltwrapper_p file
2572@@ -1001,6 +1335,37 @@
2573 }
2574
2575
2576+# func_resolve_sysroot PATH
2577+# Replace a leading = in PATH with a sysroot. Store the result into
2578+# func_resolve_sysroot_result
2579+func_resolve_sysroot ()
2580+{
2581+ func_resolve_sysroot_result=$1
2582+ case $func_resolve_sysroot_result in
2583+ =*)
2584+ func_stripname '=' '' "$func_resolve_sysroot_result"
2585+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2586+ ;;
2587+ esac
2588+}
2589+
2590+# func_replace_sysroot PATH
2591+# If PATH begins with the sysroot, replace it with = and
2592+# store the result into func_replace_sysroot_result.
2593+func_replace_sysroot ()
2594+{
2595+ case "$lt_sysroot:$1" in
2596+ ?*:"$lt_sysroot"*)
2597+ func_stripname "$lt_sysroot" '' "$1"
2598+ func_replace_sysroot_result="=$func_stripname_result"
2599+ ;;
2600+ *)
2601+ # Including no sysroot.
2602+ func_replace_sysroot_result=$1
2603+ ;;
2604+ esac
2605+}
2606+
2607 # func_infer_tag arg
2608 # Infer tagged configuration to use if any are available and
2609 # if one wasn't chosen via the "--tag" command line option.
2610@@ -1013,13 +1378,15 @@
2611 if test -n "$available_tags" && test -z "$tagname"; then
2612 CC_quoted=
2613 for arg in $CC; do
2614- func_quote_for_eval "$arg"
2615- CC_quoted="$CC_quoted $func_quote_for_eval_result"
2616+ func_append_quoted CC_quoted "$arg"
2617 done
2618+ CC_expanded=`func_echo_all $CC`
2619+ CC_quoted_expanded=`func_echo_all $CC_quoted`
2620 case $@ in
2621 # Blanks in the command may have been stripped by the calling shell,
2622 # but not from the CC environment variable when configure was run.
2623- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
2624+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2625+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
2626 # Blanks at the start of $base_compile will cause this to fail
2627 # if we don't check for them as well.
2628 *)
2629@@ -1030,11 +1397,13 @@
2630 CC_quoted=
2631 for arg in $CC; do
2632 # Double-quote args containing other shell metacharacters.
2633- func_quote_for_eval "$arg"
2634- CC_quoted="$CC_quoted $func_quote_for_eval_result"
2635+ func_append_quoted CC_quoted "$arg"
2636 done
2637+ CC_expanded=`func_echo_all $CC`
2638+ CC_quoted_expanded=`func_echo_all $CC_quoted`
2639 case "$@ " in
2640- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
2641+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
2642+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
2643 # The compiler in the base compile command matches
2644 # the one in the tagged configuration.
2645 # Assume this is the tagged configuration we want.
2646@@ -1097,6 +1466,486 @@
2647 }
2648 }
2649
2650+
2651+##################################################
2652+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2653+##################################################
2654+
2655+# func_convert_core_file_wine_to_w32 ARG
2656+# Helper function used by file name conversion functions when $build is *nix,
2657+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
2658+# correctly configured wine environment available, with the winepath program
2659+# in $build's $PATH.
2660+#
2661+# ARG is the $build file name to be converted to w32 format.
2662+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
2663+# be empty on error (or when ARG is empty)
2664+func_convert_core_file_wine_to_w32 ()
2665+{
2666+ $opt_debug
2667+ func_convert_core_file_wine_to_w32_result="$1"
2668+ if test -n "$1"; then
2669+ # Unfortunately, winepath does not exit with a non-zero error code, so we
2670+ # are forced to check the contents of stdout. On the other hand, if the
2671+ # command is not found, the shell will set an exit code of 127 and print
2672+ # *an error message* to stdout. So we must check for both error code of
2673+ # zero AND non-empty stdout, which explains the odd construction:
2674+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2675+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
2676+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2677+ $SED -e "$lt_sed_naive_backslashify"`
2678+ else
2679+ func_convert_core_file_wine_to_w32_result=
2680+ fi
2681+ fi
2682+}
2683+# end: func_convert_core_file_wine_to_w32
2684+
2685+
2686+# func_convert_core_path_wine_to_w32 ARG
2687+# Helper function used by path conversion functions when $build is *nix, and
2688+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2689+# configured wine environment available, with the winepath program in $build's
2690+# $PATH. Assumes ARG has no leading or trailing path separator characters.
2691+#
2692+# ARG is path to be converted from $build format to win32.
2693+# Result is available in $func_convert_core_path_wine_to_w32_result.
2694+# Unconvertible file (directory) names in ARG are skipped; if no directory names
2695+# are convertible, then the result may be empty.
2696+func_convert_core_path_wine_to_w32 ()
2697+{
2698+ $opt_debug
2699+ # unfortunately, winepath doesn't convert paths, only file names
2700+ func_convert_core_path_wine_to_w32_result=""
2701+ if test -n "$1"; then
2702+ oldIFS=$IFS
2703+ IFS=:
2704+ for func_convert_core_path_wine_to_w32_f in $1; do
2705+ IFS=$oldIFS
2706+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2707+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
2708+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
2709+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
2710+ else
2711+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2712+ fi
2713+ fi
2714+ done
2715+ IFS=$oldIFS
2716+ fi
2717+}
2718+# end: func_convert_core_path_wine_to_w32
2719+
2720+
2721+# func_cygpath ARGS...
2722+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2723+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2724+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2725+# (2), returns the Cygwin file name or path in func_cygpath_result (input
2726+# file name or path is assumed to be in w32 format, as previously converted
2727+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
2728+# or path in func_cygpath_result (input file name or path is assumed to be in
2729+# Cygwin format). Returns an empty string on error.
2730+#
2731+# ARGS are passed to cygpath, with the last one being the file name or path to
2732+# be converted.
2733+#
2734+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2735+# environment variable; do not put it in $PATH.
2736+func_cygpath ()
2737+{
2738+ $opt_debug
2739+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2740+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2741+ if test "$?" -ne 0; then
2742+ # on failure, ensure result is empty
2743+ func_cygpath_result=
2744+ fi
2745+ else
2746+ func_cygpath_result=
2747+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
2748+ fi
2749+}
2750+#end: func_cygpath
2751+
2752+
2753+# func_convert_core_msys_to_w32 ARG
2754+# Convert file name or path ARG from MSYS format to w32 format. Return
2755+# result in func_convert_core_msys_to_w32_result.
2756+func_convert_core_msys_to_w32 ()
2757+{
2758+ $opt_debug
2759+ # awkward: cmd appends spaces to result
2760+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2761+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2762+}
2763+#end: func_convert_core_msys_to_w32
2764+
2765+
2766+# func_convert_file_check ARG1 ARG2
2767+# Verify that ARG1 (a file name in $build format) was converted to $host
2768+# format in ARG2. Otherwise, emit an error message, but continue (resetting
2769+# func_to_host_file_result to ARG1).
2770+func_convert_file_check ()
2771+{
2772+ $opt_debug
2773+ if test -z "$2" && test -n "$1" ; then
2774+ func_error "Could not determine host file name corresponding to"
2775+ func_error " \`$1'"
2776+ func_error "Continuing, but uninstalled executables may not work."
2777+ # Fallback:
2778+ func_to_host_file_result="$1"
2779+ fi
2780+}
2781+# end func_convert_file_check
2782+
2783+
2784+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2785+# Verify that FROM_PATH (a path in $build format) was converted to $host
2786+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2787+# func_to_host_file_result to a simplistic fallback value (see below).
2788+func_convert_path_check ()
2789+{
2790+ $opt_debug
2791+ if test -z "$4" && test -n "$3"; then
2792+ func_error "Could not determine the host path corresponding to"
2793+ func_error " \`$3'"
2794+ func_error "Continuing, but uninstalled executables may not work."
2795+ # Fallback. This is a deliberately simplistic "conversion" and
2796+ # should not be "improved". See libtool.info.
2797+ if test "x$1" != "x$2"; then
2798+ lt_replace_pathsep_chars="s|$1|$2|g"
2799+ func_to_host_path_result=`echo "$3" |
2800+ $SED -e "$lt_replace_pathsep_chars"`
2801+ else
2802+ func_to_host_path_result="$3"
2803+ fi
2804+ fi
2805+}
2806+# end func_convert_path_check
2807+
2808+
2809+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
2810+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
2811+# and appending REPL if ORIG matches BACKPAT.
2812+func_convert_path_front_back_pathsep ()
2813+{
2814+ $opt_debug
2815+ case $4 in
2816+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
2817+ ;;
2818+ esac
2819+ case $4 in
2820+ $2 ) func_append func_to_host_path_result "$3"
2821+ ;;
2822+ esac
2823+}
2824+# end func_convert_path_front_back_pathsep
2825+
2826+
2827+##################################################
2828+# $build to $host FILE NAME CONVERSION FUNCTIONS #
2829+##################################################
2830+# invoked via `$to_host_file_cmd ARG'
2831+#
2832+# In each case, ARG is the path to be converted from $build to $host format.
2833+# Result will be available in $func_to_host_file_result.
2834+
2835+
2836+# func_to_host_file ARG
2837+# Converts the file name ARG from $build format to $host format. Return result
2838+# in func_to_host_file_result.
2839+func_to_host_file ()
2840+{
2841+ $opt_debug
2842+ $to_host_file_cmd "$1"
2843+}
2844+# end func_to_host_file
2845+
2846+
2847+# func_to_tool_file ARG LAZY
2848+# converts the file name ARG from $build format to toolchain format. Return
2849+# result in func_to_tool_file_result. If the conversion in use is listed
2850+# in (the comma separated) LAZY, no conversion takes place.
2851+func_to_tool_file ()
2852+{
2853+ $opt_debug
2854+ case ,$2, in
2855+ *,"$to_tool_file_cmd",*)
2856+ func_to_tool_file_result=$1
2857+ ;;
2858+ *)
2859+ $to_tool_file_cmd "$1"
2860+ func_to_tool_file_result=$func_to_host_file_result
2861+ ;;
2862+ esac
2863+}
2864+# end func_to_tool_file
2865+
2866+
2867+# func_convert_file_noop ARG
2868+# Copy ARG to func_to_host_file_result.
2869+func_convert_file_noop ()
2870+{
2871+ func_to_host_file_result="$1"
2872+}
2873+# end func_convert_file_noop
2874+
2875+
2876+# func_convert_file_msys_to_w32 ARG
2877+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
2878+# conversion to w32 is not available inside the cwrapper. Returns result in
2879+# func_to_host_file_result.
2880+func_convert_file_msys_to_w32 ()
2881+{
2882+ $opt_debug
2883+ func_to_host_file_result="$1"
2884+ if test -n "$1"; then
2885+ func_convert_core_msys_to_w32 "$1"
2886+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
2887+ fi
2888+ func_convert_file_check "$1" "$func_to_host_file_result"
2889+}
2890+# end func_convert_file_msys_to_w32
2891+
2892+
2893+# func_convert_file_cygwin_to_w32 ARG
2894+# Convert file name ARG from Cygwin to w32 format. Returns result in
2895+# func_to_host_file_result.
2896+func_convert_file_cygwin_to_w32 ()
2897+{
2898+ $opt_debug
2899+ func_to_host_file_result="$1"
2900+ if test -n "$1"; then
2901+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
2902+ # LT_CYGPATH in this case.
2903+ func_to_host_file_result=`cygpath -m "$1"`
2904+ fi
2905+ func_convert_file_check "$1" "$func_to_host_file_result"
2906+}
2907+# end func_convert_file_cygwin_to_w32
2908+
2909+
2910+# func_convert_file_nix_to_w32 ARG
2911+# Convert file name ARG from *nix to w32 format. Requires a wine environment
2912+# and a working winepath. Returns result in func_to_host_file_result.
2913+func_convert_file_nix_to_w32 ()
2914+{
2915+ $opt_debug
2916+ func_to_host_file_result="$1"
2917+ if test -n "$1"; then
2918+ func_convert_core_file_wine_to_w32 "$1"
2919+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
2920+ fi
2921+ func_convert_file_check "$1" "$func_to_host_file_result"
2922+}
2923+# end func_convert_file_nix_to_w32
2924+
2925+
2926+# func_convert_file_msys_to_cygwin ARG
2927+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
2928+# Returns result in func_to_host_file_result.
2929+func_convert_file_msys_to_cygwin ()
2930+{
2931+ $opt_debug
2932+ func_to_host_file_result="$1"
2933+ if test -n "$1"; then
2934+ func_convert_core_msys_to_w32 "$1"
2935+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
2936+ func_to_host_file_result="$func_cygpath_result"
2937+ fi
2938+ func_convert_file_check "$1" "$func_to_host_file_result"
2939+}
2940+# end func_convert_file_msys_to_cygwin
2941+
2942+
2943+# func_convert_file_nix_to_cygwin ARG
2944+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
2945+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
2946+# in func_to_host_file_result.
2947+func_convert_file_nix_to_cygwin ()
2948+{
2949+ $opt_debug
2950+ func_to_host_file_result="$1"
2951+ if test -n "$1"; then
2952+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
2953+ func_convert_core_file_wine_to_w32 "$1"
2954+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
2955+ func_to_host_file_result="$func_cygpath_result"
2956+ fi
2957+ func_convert_file_check "$1" "$func_to_host_file_result"
2958+}
2959+# end func_convert_file_nix_to_cygwin
2960+
2961+
2962+#############################################
2963+# $build to $host PATH CONVERSION FUNCTIONS #
2964+#############################################
2965+# invoked via `$to_host_path_cmd ARG'
2966+#
2967+# In each case, ARG is the path to be converted from $build to $host format.
2968+# The result will be available in $func_to_host_path_result.
2969+#
2970+# Path separators are also converted from $build format to $host format. If
2971+# ARG begins or ends with a path separator character, it is preserved (but
2972+# converted to $host format) on output.
2973+#
2974+# All path conversion functions are named using the following convention:
2975+# file name conversion function : func_convert_file_X_to_Y ()
2976+# path conversion function : func_convert_path_X_to_Y ()
2977+# where, for any given $build/$host combination the 'X_to_Y' value is the
2978+# same. If conversion functions are added for new $build/$host combinations,
2979+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
2980+# will break.
2981+
2982+
2983+# func_init_to_host_path_cmd
2984+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
2985+# appropriate value, based on the value of $to_host_file_cmd.
2986+to_host_path_cmd=
2987+func_init_to_host_path_cmd ()
2988+{
2989+ $opt_debug
2990+ if test -z "$to_host_path_cmd"; then
2991+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
2992+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
2993+ fi
2994+}
2995+
2996+
2997+# func_to_host_path ARG
2998+# Converts the path ARG from $build format to $host format. Return result
2999+# in func_to_host_path_result.
3000+func_to_host_path ()
3001+{
3002+ $opt_debug
3003+ func_init_to_host_path_cmd
3004+ $to_host_path_cmd "$1"
3005+}
3006+# end func_to_host_path
3007+
3008+
3009+# func_convert_path_noop ARG
3010+# Copy ARG to func_to_host_path_result.
3011+func_convert_path_noop ()
3012+{
3013+ func_to_host_path_result="$1"
3014+}
3015+# end func_convert_path_noop
3016+
3017+
3018+# func_convert_path_msys_to_w32 ARG
3019+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3020+# conversion to w32 is not available inside the cwrapper. Returns result in
3021+# func_to_host_path_result.
3022+func_convert_path_msys_to_w32 ()
3023+{
3024+ $opt_debug
3025+ func_to_host_path_result="$1"
3026+ if test -n "$1"; then
3027+ # Remove leading and trailing path separator characters from ARG. MSYS
3028+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3029+ # and winepath ignores them completely.
3030+ func_stripname : : "$1"
3031+ func_to_host_path_tmp1=$func_stripname_result
3032+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3033+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
3034+ func_convert_path_check : ";" \
3035+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3036+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3037+ fi
3038+}
3039+# end func_convert_path_msys_to_w32
3040+
3041+
3042+# func_convert_path_cygwin_to_w32 ARG
3043+# Convert path ARG from Cygwin to w32 format. Returns result in
3044+# func_to_host_file_result.
3045+func_convert_path_cygwin_to_w32 ()
3046+{
3047+ $opt_debug
3048+ func_to_host_path_result="$1"
3049+ if test -n "$1"; then
3050+ # See func_convert_path_msys_to_w32:
3051+ func_stripname : : "$1"
3052+ func_to_host_path_tmp1=$func_stripname_result
3053+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3054+ func_convert_path_check : ";" \
3055+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3056+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3057+ fi
3058+}
3059+# end func_convert_path_cygwin_to_w32
3060+
3061+
3062+# func_convert_path_nix_to_w32 ARG
3063+# Convert path ARG from *nix to w32 format. Requires a wine environment and
3064+# a working winepath. Returns result in func_to_host_file_result.
3065+func_convert_path_nix_to_w32 ()
3066+{
3067+ $opt_debug
3068+ func_to_host_path_result="$1"
3069+ if test -n "$1"; then
3070+ # See func_convert_path_msys_to_w32:
3071+ func_stripname : : "$1"
3072+ func_to_host_path_tmp1=$func_stripname_result
3073+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3074+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
3075+ func_convert_path_check : ";" \
3076+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3077+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3078+ fi
3079+}
3080+# end func_convert_path_nix_to_w32
3081+
3082+
3083+# func_convert_path_msys_to_cygwin ARG
3084+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3085+# Returns result in func_to_host_file_result.
3086+func_convert_path_msys_to_cygwin ()
3087+{
3088+ $opt_debug
3089+ func_to_host_path_result="$1"
3090+ if test -n "$1"; then
3091+ # See func_convert_path_msys_to_w32:
3092+ func_stripname : : "$1"
3093+ func_to_host_path_tmp1=$func_stripname_result
3094+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3095+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3096+ func_to_host_path_result="$func_cygpath_result"
3097+ func_convert_path_check : : \
3098+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3099+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3100+ fi
3101+}
3102+# end func_convert_path_msys_to_cygwin
3103+
3104+
3105+# func_convert_path_nix_to_cygwin ARG
3106+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3107+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3108+# func_to_host_file_result.
3109+func_convert_path_nix_to_cygwin ()
3110+{
3111+ $opt_debug
3112+ func_to_host_path_result="$1"
3113+ if test -n "$1"; then
3114+ # Remove leading and trailing path separator characters from
3115+ # ARG. msys behavior is inconsistent here, cygpath turns them
3116+ # into '.;' and ';.', and winepath ignores them completely.
3117+ func_stripname : : "$1"
3118+ func_to_host_path_tmp1=$func_stripname_result
3119+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3120+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3121+ func_to_host_path_result="$func_cygpath_result"
3122+ func_convert_path_check : : \
3123+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3124+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3125+ fi
3126+}
3127+# end func_convert_path_nix_to_cygwin
3128+
3129+
3130 # func_mode_compile arg...
3131 func_mode_compile ()
3132 {
3133@@ -1137,12 +1986,12 @@
3134 ;;
3135
3136 -pie | -fpie | -fPIE)
3137- pie_flag="$pie_flag $arg"
3138+ func_append pie_flag " $arg"
3139 continue
3140 ;;
3141
3142 -shared | -static | -prefer-pic | -prefer-non-pic)
3143- later="$later $arg"
3144+ func_append later " $arg"
3145 continue
3146 ;;
3147
3148@@ -1163,15 +2012,14 @@
3149 save_ifs="$IFS"; IFS=','
3150 for arg in $args; do
3151 IFS="$save_ifs"
3152- func_quote_for_eval "$arg"
3153- lastarg="$lastarg $func_quote_for_eval_result"
3154+ func_append_quoted lastarg "$arg"
3155 done
3156 IFS="$save_ifs"
3157 func_stripname ' ' '' "$lastarg"
3158 lastarg=$func_stripname_result
3159
3160 # Add the arguments to base_compile.
3161- base_compile="$base_compile $lastarg"
3162+ func_append base_compile " $lastarg"
3163 continue
3164 ;;
3165
3166@@ -1187,8 +2035,7 @@
3167 esac # case $arg_mode
3168
3169 # Aesthetically quote the previous argument.
3170- func_quote_for_eval "$lastarg"
3171- base_compile="$base_compile $func_quote_for_eval_result"
3172+ func_append_quoted base_compile "$lastarg"
3173 done # for arg
3174
3175 case $arg_mode in
3176@@ -1213,7 +2060,7 @@
3177 *.[cCFSifmso] | \
3178 *.ada | *.adb | *.ads | *.asm | \
3179 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3180- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
3181+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3182 func_xform "$libobj"
3183 libobj=$func_xform_result
3184 ;;
3185@@ -1288,7 +2135,7 @@
3186 # Calculate the filename of the output object if compiler does
3187 # not support -o with -c
3188 if test "$compiler_c_o" = no; then
3189- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
3190+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
3191 lockfile="$output_obj.lock"
3192 else
3193 output_obj=
3194@@ -1319,17 +2166,16 @@
3195 $opt_dry_run || $RM $removelist
3196 exit $EXIT_FAILURE
3197 fi
3198- removelist="$removelist $output_obj"
3199+ func_append removelist " $output_obj"
3200 $ECHO "$srcfile" > "$lockfile"
3201 fi
3202
3203 $opt_dry_run || $RM $removelist
3204- removelist="$removelist $lockfile"
3205+ func_append removelist " $lockfile"
3206 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3207
3208- if test -n "$fix_srcfile_path"; then
3209- eval srcfile=\"$fix_srcfile_path\"
3210- fi
3211+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3212+ srcfile=$func_to_tool_file_result
3213 func_quote_for_eval "$srcfile"
3214 qsrcfile=$func_quote_for_eval_result
3215
3216@@ -1349,7 +2195,7 @@
3217
3218 if test -z "$output_obj"; then
3219 # Place PIC objects in $objdir
3220- command="$command -o $lobj"
3221+ func_append command " -o $lobj"
3222 fi
3223
3224 func_show_eval_locale "$command" \
3225@@ -1396,11 +2242,11 @@
3226 command="$base_compile $qsrcfile $pic_flag"
3227 fi
3228 if test "$compiler_c_o" = yes; then
3229- command="$command -o $obj"
3230+ func_append command " -o $obj"
3231 fi
3232
3233 # Suppress compiler output if we already did a PIC compilation.
3234- command="$command$suppress_output"
3235+ func_append command "$suppress_output"
3236 func_show_eval_locale "$command" \
3237 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3238
3239@@ -1445,13 +2291,13 @@
3240 }
3241
3242 $opt_help || {
3243-test "$mode" = compile && func_mode_compile ${1+"$@"}
3244+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
3245 }
3246
3247 func_mode_help ()
3248 {
3249 # We need to display help for each of the modes.
3250- case $mode in
3251+ case $opt_mode in
3252 "")
3253 # Generic help is extracted from the usage comments
3254 # at the start of this file.
3255@@ -1482,10 +2328,11 @@
3256
3257 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3258 -no-suppress do not suppress compiler output for multiple passes
3259- -prefer-pic try to building PIC objects only
3260- -prefer-non-pic try to building non-PIC objects only
3261+ -prefer-pic try to build PIC objects only
3262+ -prefer-non-pic try to build non-PIC objects only
3263 -shared do not build a \`.o' file suitable for static linking
3264 -static only build a \`.o' file suitable for static linking
3265+ -Wc,FLAG pass FLAG directly to the compiler
3266
3267 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3268 from the given SOURCEFILE.
3269@@ -1538,7 +2385,7 @@
3270
3271 The following components of INSTALL-COMMAND are treated specially:
3272
3273- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3274+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
3275
3276 The rest of the components are interpreted as arguments to that command (only
3277 BSD-compatible install options are recognized)."
3278@@ -1558,6 +2405,8 @@
3279
3280 -all-static do not do any dynamic linking at all
3281 -avoid-version do not add a version suffix if possible
3282+ -bindir BINDIR specify path to binaries directory (for systems where
3283+ libraries must be found in the PATH setting at runtime)
3284 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3285 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3286 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3287@@ -1586,6 +2435,11 @@
3288 -version-info CURRENT[:REVISION[:AGE]]
3289 specify library version info [each variable defaults to 0]
3290 -weak LIBNAME declare that the target provides the LIBNAME interface
3291+ -Wc,FLAG
3292+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
3293+ -Wl,FLAG
3294+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
3295+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
3296
3297 All other options (arguments beginning with \`-') are ignored.
3298
3299@@ -1619,18 +2473,44 @@
3300 ;;
3301
3302 *)
3303- func_fatal_help "invalid operation mode \`$mode'"
3304+ func_fatal_help "invalid operation mode \`$opt_mode'"
3305 ;;
3306 esac
3307
3308- $ECHO
3309+ echo
3310 $ECHO "Try \`$progname --help' for more information about other modes."
3311-
3312- exit $?
3313 }
3314
3315- # Now that we've collected a possible --mode arg, show help if necessary
3316- $opt_help && func_mode_help
3317+# Now that we've collected a possible --mode arg, show help if necessary
3318+if $opt_help; then
3319+ if test "$opt_help" = :; then
3320+ func_mode_help
3321+ else
3322+ {
3323+ func_help noexit
3324+ for opt_mode in compile link execute install finish uninstall clean; do
3325+ func_mode_help
3326+ done
3327+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
3328+ {
3329+ func_help noexit
3330+ for opt_mode in compile link execute install finish uninstall clean; do
3331+ echo
3332+ func_mode_help
3333+ done
3334+ } |
3335+ sed '1d
3336+ /^When reporting/,/^Report/{
3337+ H
3338+ d
3339+ }
3340+ $x
3341+ /information about other modes/d
3342+ /more detailed .*MODE/d
3343+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
3344+ fi
3345+ exit $?
3346+fi
3347
3348
3349 # func_mode_execute arg...
3350@@ -1643,13 +2523,16 @@
3351 func_fatal_help "you must specify a COMMAND"
3352
3353 # Handle -dlopen flags immediately.
3354- for file in $execute_dlfiles; do
3355+ for file in $opt_dlopen; do
3356 test -f "$file" \
3357 || func_fatal_help "\`$file' is not a file"
3358
3359 dir=
3360 case $file in
3361 *.la)
3362+ func_resolve_sysroot "$file"
3363+ file=$func_resolve_sysroot_result
3364+
3365 # Check to see that this really is a libtool archive.
3366 func_lalib_unsafe_p "$file" \
3367 || func_fatal_help "\`$lib' is not a valid libtool archive"
3368@@ -1671,7 +2554,7 @@
3369 dir="$func_dirname_result"
3370
3371 if test -f "$dir/$objdir/$dlname"; then
3372- dir="$dir/$objdir"
3373+ func_append dir "/$objdir"
3374 else
3375 if test ! -f "$dir/$dlname"; then
3376 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
3377@@ -1712,7 +2595,7 @@
3378 for file
3379 do
3380 case $file in
3381- -*) ;;
3382+ -* | *.la | *.lo ) ;;
3383 *)
3384 # Do a test to see if this is really a libtool program.
3385 if func_ltwrapper_script_p "$file"; then
3386@@ -1728,8 +2611,7 @@
3387 ;;
3388 esac
3389 # Quote arguments (to preserve shell metacharacters).
3390- func_quote_for_eval "$file"
3391- args="$args $func_quote_for_eval_result"
3392+ func_append_quoted args "$file"
3393 done
3394
3395 if test "X$opt_dry_run" = Xfalse; then
3396@@ -1754,29 +2636,66 @@
3397 # Display what would be done.
3398 if test -n "$shlibpath_var"; then
3399 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
3400- $ECHO "export $shlibpath_var"
3401+ echo "export $shlibpath_var"
3402 fi
3403 $ECHO "$cmd$args"
3404 exit $EXIT_SUCCESS
3405 fi
3406 }
3407
3408-test "$mode" = execute && func_mode_execute ${1+"$@"}
3409+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
3410
3411
3412 # func_mode_finish arg...
3413 func_mode_finish ()
3414 {
3415 $opt_debug
3416- libdirs="$nonopt"
3417+ libs=
3418+ libdirs=
3419 admincmds=
3420
3421+ for opt in "$nonopt" ${1+"$@"}
3422+ do
3423+ if test -d "$opt"; then
3424+ func_append libdirs " $opt"
3425+
3426+ elif test -f "$opt"; then
3427+ if func_lalib_unsafe_p "$opt"; then
3428+ func_append libs " $opt"
3429+ else
3430+ func_warning "\`$opt' is not a valid libtool archive"
3431+ fi
3432+
3433+ else
3434+ func_fatal_error "invalid argument \`$opt'"
3435+ fi
3436+ done
3437+
3438+ if test -n "$libs"; then
3439+ if test -n "$lt_sysroot"; then
3440+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
3441+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
3442+ else
3443+ sysroot_cmd=
3444+ fi
3445+
3446+ # Remove sysroot references
3447+ if $opt_dry_run; then
3448+ for lib in $libs; do
3449+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
3450+ done
3451+ else
3452+ tmpdir=`func_mktempdir`
3453+ for lib in $libs; do
3454+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
3455+ > $tmpdir/tmp-la
3456+ mv -f $tmpdir/tmp-la $lib
3457+ done
3458+ ${RM}r "$tmpdir"
3459+ fi
3460+ fi
3461+
3462 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3463- for dir
3464- do
3465- libdirs="$libdirs $dir"
3466- done
3467-
3468 for libdir in $libdirs; do
3469 if test -n "$finish_cmds"; then
3470 # Do each command in the finish commands.
3471@@ -1786,7 +2705,7 @@
3472 if test -n "$finish_eval"; then
3473 # Do the single finish_eval.
3474 eval cmds=\"$finish_eval\"
3475- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
3476+ $opt_dry_run || eval "$cmds" || func_append admincmds "
3477 $cmds"
3478 fi
3479 done
3480@@ -1795,53 +2714,55 @@
3481 # Exit here if they wanted silent mode.
3482 $opt_silent && exit $EXIT_SUCCESS
3483
3484- $ECHO "X----------------------------------------------------------------------" | $Xsed
3485- $ECHO "Libraries have been installed in:"
3486- for libdir in $libdirs; do
3487- $ECHO " $libdir"
3488- done
3489- $ECHO
3490- $ECHO "If you ever happen to want to link against installed libraries"
3491- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
3492- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
3493- $ECHO "flag during linking and do at least one of the following:"
3494- if test -n "$shlibpath_var"; then
3495- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
3496- $ECHO " during execution"
3497- fi
3498- if test -n "$runpath_var"; then
3499- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
3500- $ECHO " during linking"
3501- fi
3502- if test -n "$hardcode_libdir_flag_spec"; then
3503- libdir=LIBDIR
3504- eval flag=\"$hardcode_libdir_flag_spec\"
3505-
3506- $ECHO " - use the \`$flag' linker flag"
3507- fi
3508- if test -n "$admincmds"; then
3509- $ECHO " - have your system administrator run these commands:$admincmds"
3510- fi
3511- if test -f /etc/ld.so.conf; then
3512- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3513- fi
3514- $ECHO
3515-
3516- $ECHO "See any operating system documentation about shared libraries for"
3517- case $host in
3518- solaris2.[6789]|solaris2.1[0-9])
3519- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3520- $ECHO "pages."
3521- ;;
3522- *)
3523- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
3524- ;;
3525- esac
3526- $ECHO "X----------------------------------------------------------------------" | $Xsed
3527+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3528+ echo "----------------------------------------------------------------------"
3529+ echo "Libraries have been installed in:"
3530+ for libdir in $libdirs; do
3531+ $ECHO " $libdir"
3532+ done
3533+ echo
3534+ echo "If you ever happen to want to link against installed libraries"
3535+ echo "in a given directory, LIBDIR, you must either use libtool, and"
3536+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3537+ echo "flag during linking and do at least one of the following:"
3538+ if test -n "$shlibpath_var"; then
3539+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3540+ echo " during execution"
3541+ fi
3542+ if test -n "$runpath_var"; then
3543+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
3544+ echo " during linking"
3545+ fi
3546+ if test -n "$hardcode_libdir_flag_spec"; then
3547+ libdir=LIBDIR
3548+ eval flag=\"$hardcode_libdir_flag_spec\"
3549+
3550+ $ECHO " - use the \`$flag' linker flag"
3551+ fi
3552+ if test -n "$admincmds"; then
3553+ $ECHO " - have your system administrator run these commands:$admincmds"
3554+ fi
3555+ if test -f /etc/ld.so.conf; then
3556+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3557+ fi
3558+ echo
3559+
3560+ echo "See any operating system documentation about shared libraries for"
3561+ case $host in
3562+ solaris2.[6789]|solaris2.1[0-9])
3563+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3564+ echo "pages."
3565+ ;;
3566+ *)
3567+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
3568+ ;;
3569+ esac
3570+ echo "----------------------------------------------------------------------"
3571+ fi
3572 exit $EXIT_SUCCESS
3573 }
3574
3575-test "$mode" = finish && func_mode_finish ${1+"$@"}
3576+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
3577
3578
3579 # func_mode_install arg...
3580@@ -1852,7 +2773,7 @@
3581 # install_prog (especially on Windows NT).
3582 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
3583 # Allow the use of GNU shtool's install command.
3584- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
3585+ case $nonopt in *shtool*) :;; *) false;; esac; then
3586 # Aesthetically quote it.
3587 func_quote_for_eval "$nonopt"
3588 install_prog="$func_quote_for_eval_result "
3589@@ -1866,7 +2787,12 @@
3590 # The real first argument should be the name of the installation program.
3591 # Aesthetically quote it.
3592 func_quote_for_eval "$arg"
3593- install_prog="$install_prog$func_quote_for_eval_result"
3594+ func_append install_prog "$func_quote_for_eval_result"
3595+ install_shared_prog=$install_prog
3596+ case " $install_prog " in
3597+ *[\\\ /]cp\ *) install_cp=: ;;
3598+ *) install_cp=false ;;
3599+ esac
3600
3601 # We need to accept at least all the BSD install flags.
3602 dest=
3603@@ -1876,10 +2802,12 @@
3604 install_type=
3605 isdir=no
3606 stripme=
3607+ no_mode=:
3608 for arg
3609 do
3610+ arg2=
3611 if test -n "$dest"; then
3612- files="$files $dest"
3613+ func_append files " $dest"
3614 dest=$arg
3615 continue
3616 fi
3617@@ -1887,10 +2815,9 @@
3618 case $arg in
3619 -d) isdir=yes ;;
3620 -f)
3621- case " $install_prog " in
3622- *[\\\ /]cp\ *) ;;
3623- *) prev=$arg ;;
3624- esac
3625+ if $install_cp; then :; else
3626+ prev=$arg
3627+ fi
3628 ;;
3629 -g | -m | -o)
3630 prev=$arg
3631@@ -1904,6 +2831,10 @@
3632 *)
3633 # If the previous option needed an argument, then skip it.
3634 if test -n "$prev"; then
3635+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
3636+ arg2=$install_override_mode
3637+ no_mode=false
3638+ fi
3639 prev=
3640 else
3641 dest=$arg
3642@@ -1914,7 +2845,11 @@
3643
3644 # Aesthetically quote the argument.
3645 func_quote_for_eval "$arg"
3646- install_prog="$install_prog $func_quote_for_eval_result"
3647+ func_append install_prog " $func_quote_for_eval_result"
3648+ if test -n "$arg2"; then
3649+ func_quote_for_eval "$arg2"
3650+ fi
3651+ func_append install_shared_prog " $func_quote_for_eval_result"
3652 done
3653
3654 test -z "$install_prog" && \
3655@@ -1923,6 +2858,13 @@
3656 test -n "$prev" && \
3657 func_fatal_help "the \`$prev' option requires an argument"
3658
3659+ if test -n "$install_override_mode" && $no_mode; then
3660+ if $install_cp; then :; else
3661+ func_quote_for_eval "$install_override_mode"
3662+ func_append install_shared_prog " -m $func_quote_for_eval_result"
3663+ fi
3664+ fi
3665+
3666 if test -z "$files"; then
3667 if test -z "$dest"; then
3668 func_fatal_help "no file or destination specified"
3669@@ -1977,10 +2919,13 @@
3670 case $file in
3671 *.$libext)
3672 # Do the static libraries later.
3673- staticlibs="$staticlibs $file"
3674+ func_append staticlibs " $file"
3675 ;;
3676
3677 *.la)
3678+ func_resolve_sysroot "$file"
3679+ file=$func_resolve_sysroot_result
3680+
3681 # Check to see that this really is a libtool archive.
3682 func_lalib_unsafe_p "$file" \
3683 || func_fatal_help "\`$file' is not a valid libtool archive"
3684@@ -1994,23 +2939,23 @@
3685 if test "X$destdir" = "X$libdir"; then
3686 case "$current_libdirs " in
3687 *" $libdir "*) ;;
3688- *) current_libdirs="$current_libdirs $libdir" ;;
3689+ *) func_append current_libdirs " $libdir" ;;
3690 esac
3691 else
3692 # Note the libdir as a future libdir.
3693 case "$future_libdirs " in
3694 *" $libdir "*) ;;
3695- *) future_libdirs="$future_libdirs $libdir" ;;
3696+ *) func_append future_libdirs " $libdir" ;;
3697 esac
3698 fi
3699
3700 func_dirname "$file" "/" ""
3701 dir="$func_dirname_result"
3702- dir="$dir$objdir"
3703+ func_append dir "$objdir"
3704
3705 if test -n "$relink_command"; then
3706 # Determine the prefix the user has applied to our future dir.
3707- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
3708+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
3709
3710 # Don't allow the user to place us outside of our expected
3711 # location b/c this prevents finding dependent libraries that
3712@@ -2023,9 +2968,9 @@
3713
3714 if test -n "$inst_prefix_dir"; then
3715 # Stick the inst_prefix_dir data into the link command.
3716- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
3717+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
3718 else
3719- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
3720+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
3721 fi
3722
3723 func_warning "relinking \`$file'"
3724@@ -2043,7 +2988,7 @@
3725 test -n "$relink_command" && srcname="$realname"T
3726
3727 # Install the shared library and build the symlinks.
3728- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
3729+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
3730 'exit $?'
3731 tstripme="$stripme"
3732 case $host_os in
3733@@ -2083,7 +3028,7 @@
3734 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3735
3736 # Maybe install the static library, too.
3737- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3738+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3739 ;;
3740
3741 *.lo)
3742@@ -2183,7 +3128,7 @@
3743 if test -f "$lib"; then
3744 func_source "$lib"
3745 fi
3746- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
3747+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
3748 if test -n "$libdir" && test ! -f "$libfile"; then
3749 func_warning "\`$lib' has not been installed in \`$libdir'"
3750 finalize=no
3751@@ -2202,7 +3147,7 @@
3752 file="$func_basename_result"
3753 outputname="$tmpdir/$file"
3754 # Replace the output file specification.
3755- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3756+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
3757
3758 $opt_silent || {
3759 func_quote_for_expand "$relink_command"
3760@@ -2221,7 +3166,7 @@
3761 }
3762 else
3763 # Install the binary that we compiled earlier.
3764- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3765+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
3766 fi
3767 fi
3768
3769@@ -2257,11 +3202,13 @@
3770
3771 # Set up the ranlib parameters.
3772 oldlib="$destdir/$name"
3773+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3774+ tool_oldlib=$func_to_tool_file_result
3775
3776 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3777
3778 if test -n "$stripme" && test -n "$old_striplib"; then
3779- func_show_eval "$old_striplib $oldlib" 'exit $?'
3780+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3781 fi
3782
3783 # Do each command in the postinstall commands.
3784@@ -2280,7 +3227,7 @@
3785 fi
3786 }
3787
3788-test "$mode" = install && func_mode_install ${1+"$@"}
3789+test "$opt_mode" = install && func_mode_install ${1+"$@"}
3790
3791
3792 # func_generate_dlsyms outputname originator pic_p
3793@@ -2323,6 +3270,22 @@
3794 extern \"C\" {
3795 #endif
3796
3797+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3798+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3799+#endif
3800+
3801+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3802+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3803+/* DATA imports from DLLs on WIN32 con't be const, because runtime
3804+ relocations are performed -- see ld's documentation on pseudo-relocs. */
3805+# define LT_DLSYM_CONST
3806+#elif defined(__osf__)
3807+/* This system does not cope well with relocations in const data. */
3808+# define LT_DLSYM_CONST
3809+#else
3810+# define LT_DLSYM_CONST const
3811+#endif
3812+
3813 /* External symbol declarations for the compiler. */\
3814 "
3815
3816@@ -2332,10 +3295,11 @@
3817 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
3818
3819 # Add our own program objects to the symbol list.
3820- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3821+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3822 for progfile in $progfiles; do
3823- func_verbose "extracting global C symbols from \`$progfile'"
3824- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3825+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3826+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3827+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3828 done
3829
3830 if test -n "$exclude_expsyms"; then
3831@@ -2371,7 +3335,7 @@
3832 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
3833 eval '$MV "$nlist"T "$nlist"'
3834 case $host in
3835- *cygwin | *mingw* | *cegcc* )
3836+ *cygwin* | *mingw* | *cegcc* )
3837 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3838 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
3839 ;;
3840@@ -2384,10 +3348,52 @@
3841 func_verbose "extracting global C symbols from \`$dlprefile'"
3842 func_basename "$dlprefile"
3843 name="$func_basename_result"
3844- $opt_dry_run || {
3845- eval '$ECHO ": $name " >> "$nlist"'
3846- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3847- }
3848+ case $host in
3849+ *cygwin* | *mingw* | *cegcc* )
3850+ # if an import library, we need to obtain dlname
3851+ if func_win32_import_lib_p "$dlprefile"; then
3852+ func_tr_sh "$dlprefile"
3853+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
3854+ dlprefile_dlbasename=""
3855+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3856+ # Use subshell, to avoid clobbering current variable values
3857+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3858+ if test -n "$dlprefile_dlname" ; then
3859+ func_basename "$dlprefile_dlname"
3860+ dlprefile_dlbasename="$func_basename_result"
3861+ else
3862+ # no lafile. user explicitly requested -dlpreopen <import library>.
3863+ $sharedlib_from_linklib_cmd "$dlprefile"
3864+ dlprefile_dlbasename=$sharedlib_from_linklib_result
3865+ fi
3866+ fi
3867+ $opt_dry_run || {
3868+ if test -n "$dlprefile_dlbasename" ; then
3869+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3870+ else
3871+ func_warning "Could not compute DLL name from $name"
3872+ eval '$ECHO ": $name " >> "$nlist"'
3873+ fi
3874+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3875+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3876+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3877+ }
3878+ else # not an import lib
3879+ $opt_dry_run || {
3880+ eval '$ECHO ": $name " >> "$nlist"'
3881+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3882+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3883+ }
3884+ fi
3885+ ;;
3886+ *)
3887+ $opt_dry_run || {
3888+ eval '$ECHO ": $name " >> "$nlist"'
3889+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3890+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3891+ }
3892+ ;;
3893+ esac
3894 done
3895
3896 $opt_dry_run || {
3897@@ -2415,36 +3421,19 @@
3898 if test -f "$nlist"S; then
3899 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
3900 else
3901- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
3902+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
3903 fi
3904
3905- $ECHO >> "$output_objdir/$my_dlsyms" "\
3906+ echo >> "$output_objdir/$my_dlsyms" "\
3907
3908 /* The mapping between symbol names and symbols. */
3909 typedef struct {
3910 const char *name;
3911 void *address;
3912 } lt_dlsymlist;
3913-"
3914- case $host in
3915- *cygwin* | *mingw* | *cegcc* )
3916- $ECHO >> "$output_objdir/$my_dlsyms" "\
3917-/* DATA imports from DLLs on WIN32 con't be const, because
3918- runtime relocations are performed -- see ld's documentation
3919- on pseudo-relocs. */"
3920- lt_dlsym_const= ;;
3921- *osf5*)
3922- echo >> "$output_objdir/$my_dlsyms" "\
3923-/* This system does not cope well with relocations in const data */"
3924- lt_dlsym_const= ;;
3925- *)
3926- lt_dlsym_const=const ;;
3927- esac
3928-
3929- $ECHO >> "$output_objdir/$my_dlsyms" "\
3930-extern $lt_dlsym_const lt_dlsymlist
3931+extern LT_DLSYM_CONST lt_dlsymlist
3932 lt_${my_prefix}_LTX_preloaded_symbols[];
3933-$lt_dlsym_const lt_dlsymlist
3934+LT_DLSYM_CONST lt_dlsymlist
3935 lt_${my_prefix}_LTX_preloaded_symbols[] =
3936 {\
3937 { \"$my_originator\", (void *) 0 },"
3938@@ -2457,7 +3446,7 @@
3939 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
3940 ;;
3941 esac
3942- $ECHO >> "$output_objdir/$my_dlsyms" "\
3943+ echo >> "$output_objdir/$my_dlsyms" "\
3944 {0, (void *) 0}
3945 };
3946
3947@@ -2484,7 +3473,7 @@
3948 # linked before any other PIC object. But we must not use
3949 # pic_flag when linking with -static. The problem exists in
3950 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3951- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3952+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3953 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3954 *-*-hpux*)
3955 pic_flag_for_symtable=" $pic_flag" ;;
3956@@ -2500,7 +3489,7 @@
3957 for arg in $LTCFLAGS; do
3958 case $arg in
3959 -pie | -fpie | -fPIE) ;;
3960- *) symtab_cflags="$symtab_cflags $arg" ;;
3961+ *) func_append symtab_cflags " $arg" ;;
3962 esac
3963 done
3964
3965@@ -2515,16 +3504,16 @@
3966 case $host in
3967 *cygwin* | *mingw* | *cegcc* )
3968 if test -f "$output_objdir/$my_outputname.def"; then
3969- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3970- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3971+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3972+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3973 else
3974- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3975- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3976+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3977+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3978 fi
3979 ;;
3980 *)
3981- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3982- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3983+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3984+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3985 ;;
3986 esac
3987 ;;
3988@@ -2538,8 +3527,8 @@
3989 # really was required.
3990
3991 # Nullify the symbol file.
3992- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3993- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3994+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3995+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
3996 fi
3997 }
3998
3999@@ -2549,6 +3538,7 @@
4000 # Need a lot of goo to handle *both* DLLs and import libs
4001 # Has to be a shell function in order to 'eat' the argument
4002 # that is supplied when $file_magic_command is called.
4003+# Despite the name, also deal with 64 bit binaries.
4004 func_win32_libid ()
4005 {
4006 $opt_debug
4007@@ -2559,9 +3549,11 @@
4008 win32_libid_type="x86 archive import"
4009 ;;
4010 *ar\ archive*) # could be an import, or static
4011+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
4012 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
4013- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
4014- win32_nmres=`eval $NM -f posix -A $1 |
4015+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
4016+ func_to_tool_file "$1" func_convert_file_msys_to_w32
4017+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
4018 $SED -n -e '
4019 1,100{
4020 / I /{
4021@@ -2590,6 +3582,131 @@
4022 $ECHO "$win32_libid_type"
4023 }
4024
4025+# func_cygming_dll_for_implib ARG
4026+#
4027+# Platform-specific function to extract the
4028+# name of the DLL associated with the specified
4029+# import library ARG.
4030+# Invoked by eval'ing the libtool variable
4031+# $sharedlib_from_linklib_cmd
4032+# Result is available in the variable
4033+# $sharedlib_from_linklib_result
4034+func_cygming_dll_for_implib ()
4035+{
4036+ $opt_debug
4037+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
4038+}
4039+
4040+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
4041+#
4042+# The is the core of a fallback implementation of a
4043+# platform-specific function to extract the name of the
4044+# DLL associated with the specified import library LIBNAME.
4045+#
4046+# SECTION_NAME is either .idata$6 or .idata$7, depending
4047+# on the platform and compiler that created the implib.
4048+#
4049+# Echos the name of the DLL associated with the
4050+# specified import library.
4051+func_cygming_dll_for_implib_fallback_core ()
4052+{
4053+ $opt_debug
4054+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
4055+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
4056+ $SED '/^Contents of section '"$match_literal"':/{
4057+ # Place marker at beginning of archive member dllname section
4058+ s/.*/====MARK====/
4059+ p
4060+ d
4061+ }
4062+ # These lines can sometimes be longer than 43 characters, but
4063+ # are always uninteresting
4064+ /:[ ]*file format pe[i]\{,1\}-/d
4065+ /^In archive [^:]*:/d
4066+ # Ensure marker is printed
4067+ /^====MARK====/p
4068+ # Remove all lines with less than 43 characters
4069+ /^.\{43\}/!d
4070+ # From remaining lines, remove first 43 characters
4071+ s/^.\{43\}//' |
4072+ $SED -n '
4073+ # Join marker and all lines until next marker into a single line
4074+ /^====MARK====/ b para
4075+ H
4076+ $ b para
4077+ b
4078+ :para
4079+ x
4080+ s/\n//g
4081+ # Remove the marker
4082+ s/^====MARK====//
4083+ # Remove trailing dots and whitespace
4084+ s/[\. \t]*$//
4085+ # Print
4086+ /./p' |
4087+ # we now have a list, one entry per line, of the stringified
4088+ # contents of the appropriate section of all members of the
4089+ # archive which possess that section. Heuristic: eliminate
4090+ # all those which have a first or second character that is
4091+ # a '.' (that is, objdump's representation of an unprintable
4092+ # character.) This should work for all archives with less than
4093+ # 0x302f exports -- but will fail for DLLs whose name actually
4094+ # begins with a literal '.' or a single character followed by
4095+ # a '.'.
4096+ #
4097+ # Of those that remain, print the first one.
4098+ $SED -e '/^\./d;/^.\./d;q'
4099+}
4100+
4101+# func_cygming_gnu_implib_p ARG
4102+# This predicate returns with zero status (TRUE) if
4103+# ARG is a GNU/binutils-style import library. Returns
4104+# with nonzero status (FALSE) otherwise.
4105+func_cygming_gnu_implib_p ()
4106+{
4107+ $opt_debug
4108+ func_to_tool_file "$1" func_convert_file_msys_to_w32
4109+ 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)$'`
4110+ test -n "$func_cygming_gnu_implib_tmp"
4111+}
4112+
4113+# func_cygming_ms_implib_p ARG
4114+# This predicate returns with zero status (TRUE) if
4115+# ARG is an MS-style import library. Returns
4116+# with nonzero status (FALSE) otherwise.
4117+func_cygming_ms_implib_p ()
4118+{
4119+ $opt_debug
4120+ func_to_tool_file "$1" func_convert_file_msys_to_w32
4121+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
4122+ test -n "$func_cygming_ms_implib_tmp"
4123+}
4124+
4125+# func_cygming_dll_for_implib_fallback ARG
4126+# Platform-specific function to extract the
4127+# name of the DLL associated with the specified
4128+# import library ARG.
4129+#
4130+# This fallback implementation is for use when $DLLTOOL
4131+# does not support the --identify-strict option.
4132+# Invoked by eval'ing the libtool variable
4133+# $sharedlib_from_linklib_cmd
4134+# Result is available in the variable
4135+# $sharedlib_from_linklib_result
4136+func_cygming_dll_for_implib_fallback ()
4137+{
4138+ $opt_debug
4139+ if func_cygming_gnu_implib_p "$1" ; then
4140+ # binutils import library
4141+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
4142+ elif func_cygming_ms_implib_p "$1" ; then
4143+ # ms-generated import library
4144+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
4145+ else
4146+ # unknown
4147+ sharedlib_from_linklib_result=""
4148+ fi
4149+}
4150
4151
4152 # func_extract_an_archive dir oldlib
4153@@ -2598,7 +3715,18 @@
4154 $opt_debug
4155 f_ex_an_ar_dir="$1"; shift
4156 f_ex_an_ar_oldlib="$1"
4157- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
4158+ if test "$lock_old_archive_extraction" = yes; then
4159+ lockfile=$f_ex_an_ar_oldlib.lock
4160+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
4161+ func_echo "Waiting for $lockfile to be removed"
4162+ sleep 2
4163+ done
4164+ fi
4165+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
4166+ 'stat=$?; rm -f "$lockfile"; exit $stat'
4167+ if test "$lock_old_archive_extraction" = yes; then
4168+ $opt_dry_run || rm -f "$lockfile"
4169+ fi
4170 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
4171 :
4172 else
4173@@ -2669,7 +3797,7 @@
4174 darwin_file=
4175 darwin_files=
4176 for darwin_file in $darwin_filelist; do
4177- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
4178+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
4179 $LIPO -create -output "$darwin_file" $darwin_files
4180 done # $darwin_filelist
4181 $RM -rf unfat-$$
4182@@ -2684,25 +3812,30 @@
4183 func_extract_an_archive "$my_xdir" "$my_xabs"
4184 ;;
4185 esac
4186- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4187+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
4188 done
4189
4190 func_extract_archives_result="$my_oldobjs"
4191 }
4192
4193
4194-
4195-# func_emit_wrapper_part1 [arg=no]
4196-#
4197-# Emit the first part of a libtool wrapper script on stdout.
4198-# For more information, see the description associated with
4199-# func_emit_wrapper(), below.
4200-func_emit_wrapper_part1 ()
4201+# func_emit_wrapper [arg=no]
4202+#
4203+# Emit a libtool wrapper script on stdout.
4204+# Don't directly open a file because we may want to
4205+# incorporate the script contents within a cygwin/mingw
4206+# wrapper executable. Must ONLY be called from within
4207+# func_mode_link because it depends on a number of variables
4208+# set therein.
4209+#
4210+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
4211+# variable will take. If 'yes', then the emitted script
4212+# will assume that the directory in which it is stored is
4213+# the $objdir directory. This is a cygwin/mingw-specific
4214+# behavior.
4215+func_emit_wrapper ()
4216 {
4217- func_emit_wrapper_part1_arg1=no
4218- if test -n "$1" ; then
4219- func_emit_wrapper_part1_arg1=$1
4220- fi
4221+ func_emit_wrapper_arg1=${1-no}
4222
4223 $ECHO "\
4224 #! $SHELL
4225@@ -2718,7 +3851,6 @@
4226
4227 # Sed substitution that helps us do robust quoting. It backslashifies
4228 # metacharacters that are still active within double-quoted strings.
4229-Xsed='${SED} -e 1s/^X//'
4230 sed_quote_subst='$sed_quote_subst'
4231
4232 # Be Bourne compatible
4233@@ -2749,31 +3881,135 @@
4234 else
4235 # When we are sourced in execute mode, \$file and \$ECHO are already set.
4236 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4237- ECHO=\"$qecho\"
4238- file=\"\$0\"
4239- # Make sure echo works.
4240- if test \"X\$1\" = X--no-reexec; then
4241- # Discard the --no-reexec flag, and continue.
4242+ file=\"\$0\""
4243+
4244+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
4245+ $ECHO "\
4246+
4247+# A function that is used when there is no print builtin or printf.
4248+func_fallback_echo ()
4249+{
4250+ eval 'cat <<_LTECHO_EOF
4251+\$1
4252+_LTECHO_EOF'
4253+}
4254+ ECHO=\"$qECHO\"
4255+ fi
4256+
4257+# Very basic option parsing. These options are (a) specific to
4258+# the libtool wrapper, (b) are identical between the wrapper
4259+# /script/ and the wrapper /executable/ which is used only on
4260+# windows platforms, and (c) all begin with the string "--lt-"
4261+# (application programs are unlikely to have options which match
4262+# this pattern).
4263+#
4264+# There are only two supported options: --lt-debug and
4265+# --lt-dump-script. There is, deliberately, no --lt-help.
4266+#
4267+# The first argument to this parsing function should be the
4268+# script's $0 value, followed by "$@".
4269+lt_option_debug=
4270+func_parse_lt_options ()
4271+{
4272+ lt_script_arg0=\$0
4273+ shift
4274+ for lt_opt
4275+ do
4276+ case \"\$lt_opt\" in
4277+ --lt-debug) lt_option_debug=1 ;;
4278+ --lt-dump-script)
4279+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
4280+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
4281+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
4282+ cat \"\$lt_dump_D/\$lt_dump_F\"
4283+ exit 0
4284+ ;;
4285+ --lt-*)
4286+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
4287+ exit 1
4288+ ;;
4289+ esac
4290+ done
4291+
4292+ # Print the debug banner immediately:
4293+ if test -n \"\$lt_option_debug\"; then
4294+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
4295+ fi
4296+}
4297+
4298+# Used when --lt-debug. Prints its arguments to stdout
4299+# (redirection is the responsibility of the caller)
4300+func_lt_dump_args ()
4301+{
4302+ lt_dump_args_N=1;
4303+ for lt_arg
4304+ do
4305+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
4306+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
4307+ done
4308+}
4309+
4310+# Core function for launching the target application
4311+func_exec_program_core ()
4312+{
4313+"
4314+ case $host in
4315+ # Backslashes separate directories on plain windows
4316+ *-*-mingw | *-*-os2* | *-cegcc*)
4317+ $ECHO "\
4318+ if test -n \"\$lt_option_debug\"; then
4319+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
4320+ func_lt_dump_args \${1+\"\$@\"} 1>&2
4321+ fi
4322+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4323+"
4324+ ;;
4325+
4326+ *)
4327+ $ECHO "\
4328+ if test -n \"\$lt_option_debug\"; then
4329+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
4330+ func_lt_dump_args \${1+\"\$@\"} 1>&2
4331+ fi
4332+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
4333+"
4334+ ;;
4335+ esac
4336+ $ECHO "\
4337+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
4338+ exit 1
4339+}
4340+
4341+# A function to encapsulate launching the target application
4342+# Strips options in the --lt-* namespace from \$@ and
4343+# launches target application with the remaining arguments.
4344+func_exec_program ()
4345+{
4346+ case \" \$* \" in
4347+ *\\ --lt-*)
4348+ for lt_wr_arg
4349+ do
4350+ case \$lt_wr_arg in
4351+ --lt-*) ;;
4352+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
4353+ esac
4354 shift
4355- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
4356- # Yippee, \$ECHO works!
4357- :
4358- else
4359- # Restart under the correct shell, and then maybe \$ECHO will work.
4360- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
4361- fi
4362- fi\
4363-"
4364- $ECHO "\
4365+ done ;;
4366+ esac
4367+ func_exec_program_core \${1+\"\$@\"}
4368+}
4369+
4370+ # Parse options
4371+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4372
4373 # Find the directory that this script lives in.
4374- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
4375+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4376 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4377
4378 # Follow symbolic links until we get to the real thisdir.
4379- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
4380+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4381 while test -n \"\$file\"; do
4382- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
4383+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4384
4385 # If there was a directory component, then change thisdir.
4386 if test \"x\$destdir\" != \"x\$file\"; then
4387@@ -2783,30 +4019,13 @@
4388 esac
4389 fi
4390
4391- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4392- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
4393+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4394+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4395 done
4396-"
4397-}
4398-# end: func_emit_wrapper_part1
4399-
4400-# func_emit_wrapper_part2 [arg=no]
4401-#
4402-# Emit the second part of a libtool wrapper script on stdout.
4403-# For more information, see the description associated with
4404-# func_emit_wrapper(), below.
4405-func_emit_wrapper_part2 ()
4406-{
4407- func_emit_wrapper_part2_arg1=no
4408- if test -n "$1" ; then
4409- func_emit_wrapper_part2_arg1=$1
4410- fi
4411-
4412- $ECHO "\
4413
4414 # Usually 'no', except on cygwin/mingw when embedded into
4415 # the cwrapper.
4416- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
4417+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4418 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4419 # special case for '.'
4420 if test \"\$thisdir\" = \".\"; then
4421@@ -2814,7 +4033,7 @@
4422 fi
4423 # remove .libs from thisdir
4424 case \"\$thisdir\" in
4425- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
4426+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4427 $objdir ) thisdir=. ;;
4428 esac
4429 fi
4430@@ -2869,6 +4088,18 @@
4431
4432 if test -f \"\$progdir/\$program\"; then"
4433
4434+ # fixup the dll searchpath if we need to.
4435+ #
4436+ # Fix the DLL searchpath if we need to. Do this before prepending
4437+ # to shlibpath, because on Windows, both are PATH and uninstalled
4438+ # libraries must come first.
4439+ if test -n "$dllsearchpath"; then
4440+ $ECHO "\
4441+ # Add the dll search path components to the executable PATH
4442+ PATH=$dllsearchpath:\$PATH
4443+"
4444+ fi
4445+
4446 # Export our shlibpath_var if we have one.
4447 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4448 $ECHO "\
4449@@ -2877,253 +4108,28 @@
4450
4451 # Some systems cannot cope with colon-terminated $shlibpath_var
4452 # The second colon is a workaround for a bug in BeOS R4 sed
4453- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
4454+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4455
4456 export $shlibpath_var
4457 "
4458 fi
4459
4460- # fixup the dll searchpath if we need to.
4461- if test -n "$dllsearchpath"; then
4462- $ECHO "\
4463- # Add the dll search path components to the executable PATH
4464- PATH=$dllsearchpath:\$PATH
4465-"
4466- fi
4467-
4468 $ECHO "\
4469 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4470 # Run the actual program with our arguments.
4471-"
4472- case $host in
4473- # Backslashes separate directories on plain windows
4474- *-*-mingw | *-*-os2* | *-cegcc*)
4475- $ECHO "\
4476- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4477-"
4478- ;;
4479-
4480- *)
4481- $ECHO "\
4482- exec \"\$progdir/\$program\" \${1+\"\$@\"}
4483-"
4484- ;;
4485- esac
4486- $ECHO "\
4487- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
4488- exit 1
4489+ func_exec_program \${1+\"\$@\"}
4490 fi
4491 else
4492 # The program doesn't exist.
4493 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4494 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4495- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4496+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4497 exit 1
4498 fi
4499 fi\
4500 "
4501 }
4502-# end: func_emit_wrapper_part2
4503-
4504-
4505-# func_emit_wrapper [arg=no]
4506-#
4507-# Emit a libtool wrapper script on stdout.
4508-# Don't directly open a file because we may want to
4509-# incorporate the script contents within a cygwin/mingw
4510-# wrapper executable. Must ONLY be called from within
4511-# func_mode_link because it depends on a number of variables
4512-# set therein.
4513-#
4514-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
4515-# variable will take. If 'yes', then the emitted script
4516-# will assume that the directory in which it is stored is
4517-# the $objdir directory. This is a cygwin/mingw-specific
4518-# behavior.
4519-func_emit_wrapper ()
4520-{
4521- func_emit_wrapper_arg1=no
4522- if test -n "$1" ; then
4523- func_emit_wrapper_arg1=$1
4524- fi
4525-
4526- # split this up so that func_emit_cwrapperexe_src
4527- # can call each part independently.
4528- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
4529- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
4530-}
4531-
4532-
4533-# func_to_host_path arg
4534-#
4535-# Convert paths to host format when used with build tools.
4536-# Intended for use with "native" mingw (where libtool itself
4537-# is running under the msys shell), or in the following cross-
4538-# build environments:
4539-# $build $host
4540-# mingw (msys) mingw [e.g. native]
4541-# cygwin mingw
4542-# *nix + wine mingw
4543-# where wine is equipped with the `winepath' executable.
4544-# In the native mingw case, the (msys) shell automatically
4545-# converts paths for any non-msys applications it launches,
4546-# but that facility isn't available from inside the cwrapper.
4547-# Similar accommodations are necessary for $host mingw and
4548-# $build cygwin. Calling this function does no harm for other
4549-# $host/$build combinations not listed above.
4550-#
4551-# ARG is the path (on $build) that should be converted to
4552-# the proper representation for $host. The result is stored
4553-# in $func_to_host_path_result.
4554-func_to_host_path ()
4555-{
4556- func_to_host_path_result="$1"
4557- if test -n "$1" ; then
4558- case $host in
4559- *mingw* )
4560- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
4561- case $build in
4562- *mingw* ) # actually, msys
4563- # awkward: cmd appends spaces to result
4564- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
4565- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
4566- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
4567- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
4568- $SED -e "$lt_sed_naive_backslashify"`
4569- ;;
4570- *cygwin* )
4571- func_to_host_path_tmp1=`cygpath -w "$1"`
4572- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
4573- $SED -e "$lt_sed_naive_backslashify"`
4574- ;;
4575- * )
4576- # Unfortunately, winepath does not exit with a non-zero
4577- # error code, so we are forced to check the contents of
4578- # stdout. On the other hand, if the command is not
4579- # found, the shell will set an exit code of 127 and print
4580- # *an error message* to stdout. So we must check for both
4581- # error code of zero AND non-empty stdout, which explains
4582- # the odd construction:
4583- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
4584- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
4585- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
4586- $SED -e "$lt_sed_naive_backslashify"`
4587- else
4588- # Allow warning below.
4589- func_to_host_path_result=""
4590- fi
4591- ;;
4592- esac
4593- if test -z "$func_to_host_path_result" ; then
4594- func_error "Could not determine host path corresponding to"
4595- func_error " '$1'"
4596- func_error "Continuing, but uninstalled executables may not work."
4597- # Fallback:
4598- func_to_host_path_result="$1"
4599- fi
4600- ;;
4601- esac
4602- fi
4603-}
4604-# end: func_to_host_path
4605-
4606-# func_to_host_pathlist arg
4607-#
4608-# Convert pathlists to host format when used with build tools.
4609-# See func_to_host_path(), above. This function supports the
4610-# following $build/$host combinations (but does no harm for
4611-# combinations not listed here):
4612-# $build $host
4613-# mingw (msys) mingw [e.g. native]
4614-# cygwin mingw
4615-# *nix + wine mingw
4616-#
4617-# Path separators are also converted from $build format to
4618-# $host format. If ARG begins or ends with a path separator
4619-# character, it is preserved (but converted to $host format)
4620-# on output.
4621-#
4622-# ARG is a pathlist (on $build) that should be converted to
4623-# the proper representation on $host. The result is stored
4624-# in $func_to_host_pathlist_result.
4625-func_to_host_pathlist ()
4626-{
4627- func_to_host_pathlist_result="$1"
4628- if test -n "$1" ; then
4629- case $host in
4630- *mingw* )
4631- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
4632- # Remove leading and trailing path separator characters from
4633- # ARG. msys behavior is inconsistent here, cygpath turns them
4634- # into '.;' and ';.', and winepath ignores them completely.
4635- func_to_host_pathlist_tmp2="$1"
4636- # Once set for this call, this variable should not be
4637- # reassigned. It is used in tha fallback case.
4638- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
4639- $SED -e 's|^:*||' -e 's|:*$||'`
4640- case $build in
4641- *mingw* ) # Actually, msys.
4642- # Awkward: cmd appends spaces to result.
4643- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
4644- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
4645- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
4646- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
4647- $SED -e "$lt_sed_naive_backslashify"`
4648- ;;
4649- *cygwin* )
4650- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
4651- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
4652- $SED -e "$lt_sed_naive_backslashify"`
4653- ;;
4654- * )
4655- # unfortunately, winepath doesn't convert pathlists
4656- func_to_host_pathlist_result=""
4657- func_to_host_pathlist_oldIFS=$IFS
4658- IFS=:
4659- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
4660- IFS=$func_to_host_pathlist_oldIFS
4661- if test -n "$func_to_host_pathlist_f" ; then
4662- func_to_host_path "$func_to_host_pathlist_f"
4663- if test -n "$func_to_host_path_result" ; then
4664- if test -z "$func_to_host_pathlist_result" ; then
4665- func_to_host_pathlist_result="$func_to_host_path_result"
4666- else
4667- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
4668- fi
4669- fi
4670- fi
4671- IFS=:
4672- done
4673- IFS=$func_to_host_pathlist_oldIFS
4674- ;;
4675- esac
4676- if test -z "$func_to_host_pathlist_result" ; then
4677- func_error "Could not determine the host path(s) corresponding to"
4678- func_error " '$1'"
4679- func_error "Continuing, but uninstalled executables may not work."
4680- # Fallback. This may break if $1 contains DOS-style drive
4681- # specifications. The fix is not to complicate the expression
4682- # below, but for the user to provide a working wine installation
4683- # with winepath so that path translation in the cross-to-mingw
4684- # case works properly.
4685- lt_replace_pathsep_nix_to_dos="s|:|;|g"
4686- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
4687- $SED -e "$lt_replace_pathsep_nix_to_dos"`
4688- fi
4689- # Now, add the leading and trailing path separators back
4690- case "$1" in
4691- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
4692- ;;
4693- esac
4694- case "$1" in
4695- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
4696- ;;
4697- esac
4698- ;;
4699- esac
4700- fi
4701-}
4702-# end: func_to_host_pathlist
4703+
4704
4705 # func_emit_cwrapperexe_src
4706 # emit the source code for a wrapper executable on stdout
4707@@ -3141,31 +4147,23 @@
4708
4709 This wrapper executable should never be moved out of the build directory.
4710 If it is, it will not operate correctly.
4711-
4712- Currently, it simply execs the wrapper *script* "$SHELL $output",
4713- but could eventually absorb all of the scripts functionality and
4714- exec $objdir/$outputname directly.
4715 */
4716 EOF
4717 cat <<"EOF"
4718+#ifdef _MSC_VER
4719+# define _CRT_SECURE_NO_DEPRECATE 1
4720+#endif
4721 #include <stdio.h>
4722 #include <stdlib.h>
4723 #ifdef _MSC_VER
4724 # include <direct.h>
4725 # include <process.h>
4726 # include <io.h>
4727-# define setmode _setmode
4728 #else
4729 # include <unistd.h>
4730 # include <stdint.h>
4731 # ifdef __CYGWIN__
4732 # include <io.h>
4733-# define HAVE_SETENV
4734-# ifdef __STRICT_ANSI__
4735-char *realpath (const char *, char *);
4736-int putenv (char *);
4737-int setenv (const char *, const char *, int);
4738-# endif
4739 # endif
4740 #endif
4741 #include <malloc.h>
4742@@ -3177,6 +4175,44 @@
4743 #include <fcntl.h>
4744 #include <sys/stat.h>
4745
4746+/* declarations of non-ANSI functions */
4747+#if defined(__MINGW32__)
4748+# ifdef __STRICT_ANSI__
4749+int _putenv (const char *);
4750+# endif
4751+#elif defined(__CYGWIN__)
4752+# ifdef __STRICT_ANSI__
4753+char *realpath (const char *, char *);
4754+int putenv (char *);
4755+int setenv (const char *, const char *, int);
4756+# endif
4757+/* #elif defined (other platforms) ... */
4758+#endif
4759+
4760+/* portability defines, excluding path handling macros */
4761+#if defined(_MSC_VER)
4762+# define setmode _setmode
4763+# define stat _stat
4764+# define chmod _chmod
4765+# define getcwd _getcwd
4766+# define putenv _putenv
4767+# define S_IXUSR _S_IEXEC
4768+# ifndef _INTPTR_T_DEFINED
4769+# define _INTPTR_T_DEFINED
4770+# define intptr_t int
4771+# endif
4772+#elif defined(__MINGW32__)
4773+# define setmode _setmode
4774+# define stat _stat
4775+# define chmod _chmod
4776+# define getcwd _getcwd
4777+# define putenv _putenv
4778+#elif defined(__CYGWIN__)
4779+# define HAVE_SETENV
4780+# define FOPEN_WB "wb"
4781+/* #elif defined (other platforms) ... */
4782+#endif
4783+
4784 #if defined(PATH_MAX)
4785 # define LT_PATHMAX PATH_MAX
4786 #elif defined(MAXPATHLEN)
4787@@ -3192,14 +4228,7 @@
4788 # define S_IXGRP 0
4789 #endif
4790
4791-#ifdef _MSC_VER
4792-# define S_IXUSR _S_IEXEC
4793-# define stat _stat
4794-# ifndef _INTPTR_T_DEFINED
4795-# define intptr_t int
4796-# endif
4797-#endif
4798-
4799+/* path handling portability macros */
4800 #ifndef DIR_SEPARATOR
4801 # define DIR_SEPARATOR '/'
4802 # define PATH_SEPARATOR ':'
4803@@ -3230,10 +4259,6 @@
4804 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4805 #endif /* PATH_SEPARATOR_2 */
4806
4807-#ifdef __CYGWIN__
4808-# define FOPEN_WB "wb"
4809-#endif
4810-
4811 #ifndef FOPEN_WB
4812 # define FOPEN_WB "w"
4813 #endif
4814@@ -3246,22 +4271,13 @@
4815 if (stale) { free ((void *) stale); stale = 0; } \
4816 } while (0)
4817
4818-#undef LTWRAPPER_DEBUGPRINTF
4819-#if defined DEBUGWRAPPER
4820-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
4821-static void
4822-ltwrapper_debugprintf (const char *fmt, ...)
4823-{
4824- va_list args;
4825- va_start (args, fmt);
4826- (void) vfprintf (stderr, fmt, args);
4827- va_end (args);
4828-}
4829+#if defined(LT_DEBUGWRAPPER)
4830+static int lt_debug = 1;
4831 #else
4832-# define LTWRAPPER_DEBUGPRINTF(args)
4833+static int lt_debug = 0;
4834 #endif
4835
4836-const char *program_name = NULL;
4837+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
4838
4839 void *xmalloc (size_t num);
4840 char *xstrdup (const char *string);
4841@@ -3271,41 +4287,27 @@
4842 int make_executable (const char *path);
4843 int check_executable (const char *path);
4844 char *strendzap (char *str, const char *pat);
4845-void lt_fatal (const char *message, ...);
4846+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4847+void lt_fatal (const char *file, int line, const char *message, ...);
4848+static const char *nonnull (const char *s);
4849+static const char *nonempty (const char *s);
4850 void lt_setenv (const char *name, const char *value);
4851 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
4852-void lt_opt_process_env_set (const char *arg);
4853-void lt_opt_process_env_prepend (const char *arg);
4854-void lt_opt_process_env_append (const char *arg);
4855-int lt_split_name_value (const char *arg, char** name, char** value);
4856 void lt_update_exe_path (const char *name, const char *value);
4857 void lt_update_lib_path (const char *name, const char *value);
4858-
4859-static const char *script_text_part1 =
4860-EOF
4861-
4862- func_emit_wrapper_part1 yes |
4863- $SED -e 's/\([\\"]\)/\\\1/g' \
4864- -e 's/^/ "/' -e 's/$/\\n"/'
4865- echo ";"
4866- cat <<EOF
4867-
4868-static const char *script_text_part2 =
4869-EOF
4870- func_emit_wrapper_part2 yes |
4871- $SED -e 's/\([\\"]\)/\\\1/g' \
4872- -e 's/^/ "/' -e 's/$/\\n"/'
4873- echo ";"
4874-
4875- cat <<EOF
4876-const char * MAGIC_EXE = "$magic_exe";
4877+char **prepare_spawn (char **argv);
4878+void lt_dump_script (FILE *f);
4879+EOF
4880+
4881+ cat <<EOF
4882+volatile const char * MAGIC_EXE = "$magic_exe";
4883 const char * LIB_PATH_VARNAME = "$shlibpath_var";
4884 EOF
4885
4886 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4887- func_to_host_pathlist "$temp_rpath"
4888+ func_to_host_path "$temp_rpath"
4889 cat <<EOF
4890-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4891+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
4892 EOF
4893 else
4894 cat <<"EOF"
4895@@ -3314,10 +4316,10 @@
4896 fi
4897
4898 if test -n "$dllsearchpath"; then
4899- func_to_host_pathlist "$dllsearchpath:"
4900+ func_to_host_path "$dllsearchpath:"
4901 cat <<EOF
4902 const char * EXE_PATH_VARNAME = "PATH";
4903-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4904+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
4905 EOF
4906 else
4907 cat <<"EOF"
4908@@ -3340,24 +4342,10 @@
4909 cat <<"EOF"
4910
4911 #define LTWRAPPER_OPTION_PREFIX "--lt-"
4912-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
4913
4914-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
4915 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
4916-
4917 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
4918-
4919-static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
4920-static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
4921- /* argument is putenv-style "foo=bar", value of foo is set to bar */
4922-
4923-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
4924-static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
4925- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
4926-
4927-static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
4928-static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
4929- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
4930+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
4931
4932 int
4933 main (int argc, char *argv[])
4934@@ -3374,10 +4362,13 @@
4935 int i;
4936
4937 program_name = (char *) xstrdup (base_name (argv[0]));
4938- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
4939- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
4940+ newargz = XMALLOC (char *, argc + 1);
4941
4942- /* very simple arg parsing; don't want to rely on getopt */
4943+ /* very simple arg parsing; don't want to rely on getopt
4944+ * also, copy all non cwrapper options to newargz, except
4945+ * argz[0], which is handled differently
4946+ */
4947+ newargc=0;
4948 for (i = 1; i < argc; i++)
4949 {
4950 if (strcmp (argv[i], dumpscript_opt) == 0)
4951@@ -3391,25 +4382,57 @@
4952 esac
4953
4954 cat <<"EOF"
4955- printf ("%s", script_text_part1);
4956- printf ("%s", script_text_part2);
4957+ lt_dump_script (stdout);
4958 return 0;
4959 }
4960+ if (strcmp (argv[i], debug_opt) == 0)
4961+ {
4962+ lt_debug = 1;
4963+ continue;
4964+ }
4965+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4966+ {
4967+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4968+ namespace, but it is not one of the ones we know about and
4969+ have already dealt with, above (inluding dump-script), then
4970+ report an error. Otherwise, targets might begin to believe
4971+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4972+ namespace. The first time any user complains about this, we'll
4973+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4974+ or a configure.ac-settable value.
4975+ */
4976+ lt_fatal (__FILE__, __LINE__,
4977+ "unrecognized %s option: '%s'",
4978+ ltwrapper_option_prefix, argv[i]);
4979+ }
4980+ /* otherwise ... */
4981+ newargz[++newargc] = xstrdup (argv[i]);
4982 }
4983-
4984- newargz = XMALLOC (char *, argc + 1);
4985+ newargz[++newargc] = NULL;
4986+
4987+EOF
4988+ cat <<EOF
4989+ /* The GNU banner must be the first non-error debug message */
4990+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4991+EOF
4992+ cat <<"EOF"
4993+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4994+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4995+
4996 tmp_pathspec = find_executable (argv[0]);
4997 if (tmp_pathspec == NULL)
4998- lt_fatal ("Couldn't find %s", argv[0]);
4999- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
5000- tmp_pathspec));
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches