Codebase list libotr / a171365
Imported Upstream version 4.1.0~rc1 intrigeri 9 years ago
46 changed file(s) with 29404 addition(s) and 11366 deletion(s). Raw diff Collapse all Expand all
11
22 Authors:
33
4 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Lisa Du, Nikita Borisov
4 Ian Goldberg, David Goulet, Rob Smits, Chris Alexander, Willy Lew,
5 Lisa Du, Nikita Borisov
56 <otr@cypherpunks.ca>
67
78 See the README file for mailing list information
0 2014-10-18
1
2 * README:
3 * configure.ac:
4 * src/version.h: Bump version number to 4.1.0
5
6 2014-10-18
7
8 * Protocol-v3.html: Correctly count the number of actions an OTR
9 client must handle. Thanks to Fred Yontz <fred@ridersite.org>
10 for the report.
11
12 2014-10-13
13
14 * src/context.h: Add API functions
15 otrl_context_find_recent_instance and
16 otrl_context_find_recent_secure_instance.
17
18 2014-10-13
19
20 * src/context.c (otrl_context_forget): Correct check for
21 children contexts' state being OTRL_MSGSTATE_PLAINTEXT. Thanks
22 to k007k <k007k@wp.pl> for the report.
23
24 2014-10-13
25
26 * src/message.c (otrl_message_receiving): Fix memory leak in
27 fragment reassembly. Thanks to Matthew D. Green
28 <matthewdgreen@gmail.com> for the report and David Goulet
29 <dgoulet@ev0ke.net> for the patch.
30
31 2014-10-13
32
33 * src/message.c (otrl_message_sending): Fix possible memory
34 leak.
35
36 2014-07-13
37
38 * src/auth.c (otrl_auth_handle_commit): Add a clarifying
39 comment.
40
41 2014-06-12
42
43 * src/message.h: Typo fix.
44
45 2014-06-03
46
47 * Makefile.am:
48 * configure.ac: Modernize autoconf build system. Thanks to
49 David Goulet <dgoulet@ev0ke.net> for the patch.
50
51 2014-05-22
52
53 * README:
54 * src/context.c: Typo fixes.
55
56 2014-05-04
57
58 * INSTALL:
59 * bootstrap: Add bootstrap script to set up the build system.
60 Thanks to David Goulet <dgoulet@ev0ke.net> for the patch.
61
62 2014-05-04
63
64 * src/dh.c:
65 * src/sm.c:
66 * toolkit/sesskeys.c: Use gcrypt secure memory allocation.
67 Thanks to Julien Voisin <julien.voisin@dustri.org> for the
68 patch.
69
70 2014-04-21
71
72 * src/mem.c (otrl_mem_differ): Simplify otrl_mem_differ. Thanks
73 to Julien Voisin <julien.voisin@dustri.org> for the patch.
74
75 2014-02-20
76
77 * src/proto.c (otrl_proto_instance): Fix a memory leak when
78 receiving an invalid instance tag. Thanks to Julien Voisin
79 <julien.voisin@dustri.org> for the patch.
80
81 2014-02-15
82
83 * src/proto.c:
84 * src/auth.c:
85 * src/mem.c:
86 * src/mem.h: Use a constant-time memory comparison for safety.
87 Thanks to jvoisin <julien.voisin@dustri.org> for the suggestion.
88
89 2013-10-13
90
91 * src/proto.c: Return 0 instead of crashing from
92 otrl_proto_query_bestversion if passed an illegal input.
93 Thanks to Conrad Hoffmann <ch@bitfehler.net> for the report and
94 the patch.
95
96 2013-08-21
97
98 * src/proto.c: Fix warning from clang in proto.c. Before, trying
99 to fragment a message into more than 65535 pieces would cause
100 incorrect fragments to be output. Now, it just returns an error
101 (as that is disallowed by the spec). Thanks to Teemu Huovila
102 <thuovila@cs.helsinki.fi> for reporting the issue.
103
104 2013-08-08
105
106 * Protocol-v3.html: Random exponents in SMP should be 1536 bits.
107 The spec (but not the code) incorrectly said "128 bits" before.
108
109 2013-07-28
110
111 * packaging/fedora/libotr.spec: Fedora spec file for 4.x from
112 Paul Wouters <paul@cypherpunks.ca>
113
114 2013-07-17
115
116 * toolkit/sesskeys.c: Workaround for a crash bug in libgcrypt
117 affecting otr_sesskeys. Passing a private key value of 0 to
118 otr_sesskeys would cause libgcrypt to crash in gcry_mpi_powm.
119 We reported this libgcrypt bug and it was then fixed in
120 http://lists.gnupg.org/pipermail/gcrypt-devel/2013-July/002251.html
121 but the workaround is simply to use
122 gcry_mpi_new(DH1536_MOD_LEN_BITS) instead of gcry_mpi_new(0).
123 Note that this only affected the otr_sesskeys toolkit program,
124 and not libotr itself.
125 Thanks to the Mayhem Team at CMU (Alexandre Rebert, Thanassis
126 Avgerinos, Sang Kil Cha, David Brumley, Manuel Egele) for the
127 report.
128
129 2013-01-19
130
131 * src/message.c: pass opdata when sending message fragment
132 The inject_message callback was missing the opdata when sending
133 message fragments. Thanks to David Goulet <dgoulet@ev0ke.net>
134 for the report.
135
136 2012-12-18
137
138 * src/message.c: Copy lastmessage to the newly created context.
139 This fixes a case where the first user message gets lost when
140 OTRL_POLICY_REQUIRE_ENCRYPTION policy is set because after
141 establishing the encryption lastmessage remains with the master
142 context and will not be resent. Thanks to Andreas Schlick
143 <schlick@lavabit.com> for the report.
144
145 2012-09-09
146
147 * configure.ac: Make linker hardening [DEP, ALSR] work on
148 Windows builds. Thanks to Daniel Atallah <datallah@pidgin.im>
149 for noticing that it wasn't working before.
150
0151 2012-09-04
1152
2153 * README: Release 4.0.0
1717 If you're got a CVS copy, you will need to regenerate the configure
1818 script using:
1919
20 autoreconf -s -i
20 ./bootstrap
2121
2222 Once you have the configure script (which comes with the source
2323 deistribution), run it with the "--with-pic" option, as well as any
0 ACLOCAL_AMFLAGS = -I config
1
02 SUBDIRS = src toolkit
13
24 EXTRA_DIST = Protocol-v3.html UPGRADING packaging libotr.m4 libotr.pc.in
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
66 # This Makefile.in is free software; the Free Software Foundation
77 # gives unlimited permission to copy and/or distribute it,
88 # with or without modifications, as long as this notice is preserved.
3838 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
3939 $(srcdir)/libotr.pc.in $(top_srcdir)/configure AUTHORS COPYING \
4040 COPYING.LIB ChangeLog INSTALL NEWS config.guess config.sub \
41 depcomp install-sh ltmain.sh missing
41 config/config.guess config/config.sub config/depcomp \
42 config/install-sh config/ltmain.sh config/missing depcomp \
43 install-sh ltmain.sh missing
4244 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
43 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
45 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
46 $(top_srcdir)/config/ltoptions.m4 \
47 $(top_srcdir)/config/ltsugar.m4 \
48 $(top_srcdir)/config/ltversion.m4 \
49 $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac
4450 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4551 $(ACLOCAL_M4)
4652 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
4955 CONFIG_HEADER = config.h
5056 CONFIG_CLEAN_FILES = libotr.pc
5157 CONFIG_CLEAN_VPATH_FILES =
58 AM_V_GEN = $(am__v_GEN_@AM_V@)
59 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
60 am__v_GEN_0 = @echo " GEN " $@;
61 AM_V_at = $(am__v_at_@AM_V@)
62 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
63 am__v_at_0 = @
5264 SOURCES =
5365 DIST_SOURCES =
5466 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
7991 am__base_list = \
8092 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
8193 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
94 am__uninstall_files_from_dir = { \
95 test -z "$$files" \
96 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
97 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
98 $(am__cd) "$$dir" && rm -f $$files; }; \
99 }
82100 am__installdirs = "$(DESTDIR)$(aclocaldir)" \
83101 "$(DESTDIR)$(pkgconfigdir)"
84102 DATA = $(aclocal_DATA) $(pkgconfig_DATA)
94112 distdir = $(PACKAGE)-$(VERSION)
95113 top_distdir = $(distdir)
96114 am__remove_distdir = \
97 { test ! -d "$(distdir)" \
98 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
99 && rm -fr "$(distdir)"; }; }
115 if test -d "$(distdir)"; then \
116 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
117 && rm -rf "$(distdir)" \
118 || { sleep 5 && rm -rf "$(distdir)"; }; \
119 else :; fi
100120 am__relativize = \
101121 dir0=`pwd`; \
102122 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
125145 DIST_ARCHIVES = $(distdir).tar.gz
126146 GZIP_ENV = --best
127147 distuninstallcheck_listfiles = find . -type f -print
148 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
149 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
128150 distcleancheck_listfiles = find . -type f -print
129151 ACLOCAL = @ACLOCAL@
130152 AMTAR = @AMTAR@
153 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
131154 AR = @AR@
132155 AUTOCONF = @AUTOCONF@
133156 AUTOHEADER = @AUTOHEADER@
141164 CYGPATH_W = @CYGPATH_W@
142165 DEFS = @DEFS@
143166 DEPDIR = @DEPDIR@
167 DLLTOOL = @DLLTOOL@
144168 DSYMUTIL = @DSYMUTIL@
145169 DUMPBIN = @DUMPBIN@
146170 ECHO_C = @ECHO_C@
168192 LN_S = @LN_S@
169193 LTLIBOBJS = @LTLIBOBJS@
170194 MAKEINFO = @MAKEINFO@
195 MANIFEST_TOOL = @MANIFEST_TOOL@
171196 MKDIR_P = @MKDIR_P@
172197 NM = @NM@
173198 NMEDIT = @NMEDIT@
193218 abs_srcdir = @abs_srcdir@
194219 abs_top_builddir = @abs_top_builddir@
195220 abs_top_srcdir = @abs_top_srcdir@
221 ac_ct_AR = @ac_ct_AR@
196222 ac_ct_CC = @ac_ct_CC@
197223 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
198224 am__include = @am__include@
225251 libexecdir = @libexecdir@
226252 localedir = @localedir@
227253 localstatedir = @localstatedir@
228 lt_ECHO = @lt_ECHO@
229254 mandir = @mandir@
230255 mkdir_p = @mkdir_p@
231256 oldincludedir = @oldincludedir@
241266 top_build_prefix = @top_build_prefix@
242267 top_builddir = @top_builddir@
243268 top_srcdir = @top_srcdir@
269 ACLOCAL_AMFLAGS = -I config
244270 SUBDIRS = src toolkit
245271 EXTRA_DIST = Protocol-v3.html UPGRADING packaging libotr.m4 libotr.pc.in
246272 aclocaldir = $(datadir)/aclocal
251277 $(MAKE) $(AM_MAKEFLAGS) all-recursive
252278
253279 .SUFFIXES:
254 am--refresh:
280 am--refresh: Makefile
255281 @:
256282 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
257283 @for dep in $?; do \
287313 $(am__aclocal_m4_deps):
288314
289315 config.h: stamp-h1
290 @if test ! -f $@; then \
291 rm -f stamp-h1; \
292 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
293 else :; fi
316 @if test ! -f $@; then rm -f stamp-h1; else :; fi
317 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
294318
295319 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
296320 @rm -f stamp-h1
330354 @$(NORMAL_UNINSTALL)
331355 @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \
332356 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
333 test -n "$$files" || exit 0; \
334 echo " ( cd '$(DESTDIR)$(aclocaldir)' && rm -f" $$files ")"; \
335 cd "$(DESTDIR)$(aclocaldir)" && rm -f $$files
357 dir='$(DESTDIR)$(aclocaldir)'; $(am__uninstall_files_from_dir)
336358 install-pkgconfigDATA: $(pkgconfig_DATA)
337359 @$(NORMAL_INSTALL)
338360 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
350372 @$(NORMAL_UNINSTALL)
351373 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
352374 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
353 test -n "$$files" || exit 0; \
354 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
355 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
375 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
356376
357377 # This directory's subdirectories are mostly independent; you can cd
358378 # into them and run `make' without going through this Makefile.
561581 $(am__remove_distdir)
562582
563583 dist-bzip2: distdir
564 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
584 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
585 $(am__remove_distdir)
586
587 dist-lzip: distdir
588 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
565589 $(am__remove_distdir)
566590
567591 dist-lzma: distdir
569593 $(am__remove_distdir)
570594
571595 dist-xz: distdir
572 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
596 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
573597 $(am__remove_distdir)
574598
575599 dist-tarZ: distdir
600624 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
601625 *.tar.lzma*) \
602626 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
627 *.tar.lz*) \
628 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
603629 *.tar.xz*) \
604630 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
605631 *.tar.Z*) \
619645 && am__cwd=`pwd` \
620646 && $(am__cd) $(distdir)/_build \
621647 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
648 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
622649 $(DISTCHECK_CONFIGURE_FLAGS) \
623650 && $(MAKE) $(AM_MAKEFLAGS) \
624651 && $(MAKE) $(AM_MAKEFLAGS) dvi \
647674 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
648675 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
649676 distuninstallcheck:
650 @$(am__cd) '$(distuninstallcheck_dir)' \
651 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
677 @test -n '$(distuninstallcheck_dir)' || { \
678 echo 'ERROR: trying to run $@ with an empty' \
679 '$$(distuninstallcheck_dir)' >&2; \
680 exit 1; \
681 }; \
682 $(am__cd) '$(distuninstallcheck_dir)' || { \
683 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
684 exit 1; \
685 }; \
686 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
652687 || { echo "ERROR: files left after uninstall:" ; \
653688 if test -n "$(DESTDIR)"; then \
654689 echo " (check DESTDIR support)"; \
682717
683718 installcheck: installcheck-recursive
684719 install-strip:
685 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
686 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
687 `test -z '$(STRIP)' || \
688 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
720 if test -z '$(STRIP)'; then \
721 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
722 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
723 install; \
724 else \
725 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
726 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
727 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
728 fi
689729 mostlyclean-generic:
690730
691731 clean-generic:
773813 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
774814 all all-am am--refresh check check-am clean clean-generic \
775815 clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
776 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
777 distcheck distclean distclean-generic distclean-hdr \
816 dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
817 dist-zip distcheck distclean distclean-generic distclean-hdr \
778818 distclean-libtool distclean-tags distcleancheck distdir \
779819 distuninstallcheck dvi dvi-am html html-am info info-am \
780820 install install-aclocalDATA install-am install-data \
0 18 Oct 2014:
1 - Release 4.1.0
2 - Modernized autoconf build system
3 - Use constant-time comparisons where needed
4 - Use gcrypt secure memory allocation
5 - Correctly reject attempts to fragment a message into too many pieces
6 - Fix a missing opdata when sending message fragments
7 - Don't lose the first user message when REQUIRE_ENCRYPTION is set
8 - Fix some memory leaks
9 - Correct check for children contexts' state when forgetting a context
10 - API Changes:
11 - Added API functions otrl_context_find_recent_instance and
12 otrl_context_find_recent_secure_instance.
13
014 24 Aug 2012:
115 - Release 4.0.0
216 - Support v3 of the OTR protocol
10441044 <ol>
10451045 <li>Determine her secret input x, which is to be compared to Bob's
10461046 secret y.</li>
1047 <li>Pick random values a<sub>2</sub> and a<sub>3</sub> (128 bits).
1047 <li>Pick random values a<sub>2</sub> and a<sub>3</sub> (1536 bits).
10481048 These will be Alice's exponents for the DH exchange to pick generators.</li>
1049 <li>Pick random values r2 and r3 (128 bits).
1049 <li>Pick random values r2 and r3 (1536 bits).
10501050 These will be used to generate zero-knowledge proofs that this message
10511051 was created according to the protocol.</li>
10521052 <li>Compute g<sub>2a</sub> = g<sub>1</sub><sup>a<sub>2</sub></sup> and
14661466 <p>Note that it is possible for UIs simply to offer the old
14671467 "combinations" of options, and not ask about each one separately.</p>
14681468 <h4>State transitions</h4>
1469 <p>There are thirteen actions an OTR client must handle:</p>
1469 <p>There are twelve actions an OTR client must handle:</p>
14701470 <ul>
14711471 <li>Received messages:
14721472 <ul>
00 Off-the-Record Messaging Library and Toolkit
1 v4.0.0, 4 Sep 2012
1 v4.1.0, 18 Oct 2014
22
33 This is a library and toolkit which implements Off-the-Record (OTR) Messaging.
44
1818 is compromised.
1919
2020 For more information on Off-the-Record Messaging, see
21 http://otr.cypherpunks.ca/
21 https://otr.cypherpunks.ca/
2222
2323 LIBRARY USAGE
2424
3636 list of known fingerprints and the list of private keys, so it should be
3737 "one per user". Many OTR-enabled programs (such as IM clients) only have a
3838 single user, so for them, you can just create a single one, and use it
39 thoughout. Create an OtrlUserState as follows:
39 throughout. Create an OtrlUserState as follows:
4040
4141 userstate = otrl_userstate_create();
4242
290290 There are three mailing lists pertaining to Off-the-Record Messaging:
291291
292292 otr-announce:
293 http://lists.cypherpunks.ca/mailman/listinfo/otr-announce/
293 https://lists.cypherpunks.ca/mailman/listinfo/otr-announce/
294294 *** All users of OTR software should join this. *** It is used to
295295 announce new versions of OTR software, and other important information.
296296
297297 otr-users:
298 http://lists.cypherpunks.ca/mailman/listinfo/otr-users/
298 https://lists.cypherpunks.ca/mailman/listinfo/otr-users/
299299 Discussion of usage issues related to OTR Messaging software.
300300
301301 otr-dev:
302 http://lists.cypherpunks.ca/mailman/listinfo/otr-dev/
302 https://lists.cypherpunks.ca/mailman/listinfo/otr-dev/
303303 Discussion of OTR Messaging software development.
304304
305305 LICENSE
308308 covered by the following (LGPL) license:
309309
310310 Off-the-Record Messaging library
311 Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
312 Willy Lew, Lisa Du, Nikita Borisov
311 Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
312 Chris Alexander, Willy Lew, Lisa Du,
313 Nikita Borisov
313314 <otr@cypherpunks.ca>
314315
315316 This library is free software; you can redistribute it and/or
330331 by the following (GPL) license:
331332
332333 Off-the-Record Messaging Toolkit
333 Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
334 Nikita Borisov
334 Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
335 Chris Alexander, Nikita Borisov
335336 <otr@cypherpunks.ca>
336337
337338 This program is free software; you can redistribute it and/or modify
353354 To report problems, comments, suggestions, patches, etc., you can email
354355 the authors:
355356
356 Ian Goldberg, Rob Smits, Chris Alexander, Lisa Du, Nikita Borisov
357 Ian Goldberg, David Goulet, Rob Smits, Chris Alexander, Lisa Du,
358 Nikita Borisov
357359 <otr@cypherpunks.ca>
358360
359361 For more information on Off-the-Record Messaging, visit
360 http://otr.cypherpunks.ca/
362 https://otr.cypherpunks.ca/
0 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
0 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
11
22 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
3 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
4 # Inc.
45 # This file is free software; the Free Software Foundation
56 # gives unlimited permission to copy and/or distribute it,
67 # with or without modifications, as long as this notice is preserved.
1213
1314 m4_ifndef([AC_AUTOCONF_VERSION],
1415 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
16 [m4_warning([this file was generated for autoconf 2.65.
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
1718 You have another version of autoconf. It may work, but is not guaranteed to.
1819 If you have problems, you may need to regenerate the build system entirely.
1920 To do so, use the procedure documented by the package, typically `autoreconf'.])])
3536 dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
3637 dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
3738 dnl with the API version to also check the API compatibility. Example:
38 dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
39 dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
3940 dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
4041 dnl this features allows to prevent build against newer versions of libgcrypt
4142 dnl with a changed API.
5152 fi
5253 fi
5354
54 AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
55 AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
5556 tmp=ifelse([$1], ,1:1.2.0,$1)
5657 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
5758 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
7980 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
8081 if test "$major" -gt "$req_major"; then
8182 ok=yes
82 else
83 else
8384 if test "$major" -eq "$req_major"; then
8485 if test "$minor" -gt "$req_minor"; then
8586 ok=yes
118119 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
119120 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
120121 ifelse([$2], , :, [$2])
122 if test x"$host" != x ; then
123 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
124 if test x"$libgcrypt_config_host" != xnone ; then
125 if test x"$libgcrypt_config_host" != x"$host" ; then
126 AC_MSG_WARN([[
127 ***
128 *** The config script $LIBGCRYPT_CONFIG was
129 *** built for $libgcrypt_config_host and thus may not match the
130 *** used host $host.
131 *** You may want to use the configure option --with-libgcrypt-prefix
132 *** to specify a matching config script.
133 ***]])
134 fi
135 fi
136 fi
121137 else
122138 LIBGCRYPT_CFLAGS=""
123139 LIBGCRYPT_LIBS=""
127143 AC_SUBST(LIBGCRYPT_LIBS)
128144 ])
129145
130 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
131 #
132 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
133 # 2006, 2007, 2008 Free Software Foundation, Inc.
134 # Written by Gordon Matzigkeit, 1996
135 #
136 # This file is free software; the Free Software Foundation gives
137 # unlimited permission to copy and/or distribute it, with or without
138 # modifications, as long as this notice is preserved.
139
140 m4_define([_LT_COPYING], [dnl
141 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
142 # 2006, 2007, 2008 Free Software Foundation, Inc.
143 # Written by Gordon Matzigkeit, 1996
144 #
145 # This file is part of GNU Libtool.
146 #
147 # GNU Libtool is free software; you can redistribute it and/or
148 # modify it under the terms of the GNU General Public License as
149 # published by the Free Software Foundation; either version 2 of
150 # the License, or (at your option) any later version.
151 #
152 # As a special exception to the GNU General Public License,
153 # if you distribute this file as part of a program or library that
154 # is built using GNU Libtool, you may include this file under the
155 # same distribution terms that you use for the rest of that program.
156 #
157 # GNU Libtool is distributed in the hope that it will be useful,
158 # but WITHOUT ANY WARRANTY; without even the implied warranty of
159 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
160 # GNU General Public License for more details.
161 #
162 # You should have received a copy of the GNU General Public License
163 # along with GNU Libtool; see the file COPYING. If not, a copy
164 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
165 # obtained by writing to the Free Software Foundation, Inc.,
166 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
167 ])
168
169 # serial 56 LT_INIT
170
171
172 # LT_PREREQ(VERSION)
173 # ------------------
174 # Complain and exit if this libtool version is less that VERSION.
175 m4_defun([LT_PREREQ],
176 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
177 [m4_default([$3],
178 [m4_fatal([Libtool version $1 or higher is required],
179 63)])],
180 [$2])])
181
182
183 # _LT_CHECK_BUILDDIR
184 # ------------------
185 # Complain if the absolute build directory name contains unusual characters
186 m4_defun([_LT_CHECK_BUILDDIR],
187 [case `pwd` in
188 *\ * | *\ *)
189 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
190 esac
191 ])
192
193
194 # LT_INIT([OPTIONS])
195 # ------------------
196 AC_DEFUN([LT_INIT],
197 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
198 AC_BEFORE([$0], [LT_LANG])dnl
199 AC_BEFORE([$0], [LT_OUTPUT])dnl
200 AC_BEFORE([$0], [LTDL_INIT])dnl
201 m4_require([_LT_CHECK_BUILDDIR])dnl
202
203 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
204 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
205 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
206 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
207 dnl unless we require an AC_DEFUNed macro:
208 AC_REQUIRE([LTOPTIONS_VERSION])dnl
209 AC_REQUIRE([LTSUGAR_VERSION])dnl
210 AC_REQUIRE([LTVERSION_VERSION])dnl
211 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
212 m4_require([_LT_PROG_LTMAIN])dnl
213
214 dnl Parse OPTIONS
215 _LT_SET_OPTIONS([$0], [$1])
216
217 # This can be used to rebuild libtool when needed
218 LIBTOOL_DEPS="$ltmain"
219
220 # Always use our own libtool.
221 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
222 AC_SUBST(LIBTOOL)dnl
223
224 _LT_SETUP
225
226 # Only expand once:
227 m4_define([LT_INIT])
228 ])# LT_INIT
229
230 # Old names:
231 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
232 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
233 dnl aclocal-1.4 backwards compatibility:
234 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
235 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
236
237
238 # _LT_CC_BASENAME(CC)
239 # -------------------
240 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
241 m4_defun([_LT_CC_BASENAME],
242 [for cc_temp in $1""; do
243 case $cc_temp in
244 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
245 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
246 \-*) ;;
247 *) break;;
248 esac
249 done
250 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
251 ])
252
253
254 # _LT_FILEUTILS_DEFAULTS
255 # ----------------------
256 # It is okay to use these file commands and assume they have been set
257 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
258 m4_defun([_LT_FILEUTILS_DEFAULTS],
259 [: ${CP="cp -f"}
260 : ${MV="mv -f"}
261 : ${RM="rm -f"}
262 ])# _LT_FILEUTILS_DEFAULTS
263
264
265 # _LT_SETUP
266 # ---------
267 m4_defun([_LT_SETUP],
268 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
269 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
270 _LT_DECL([], [host_alias], [0], [The host system])dnl
271 _LT_DECL([], [host], [0])dnl
272 _LT_DECL([], [host_os], [0])dnl
273 dnl
274 _LT_DECL([], [build_alias], [0], [The build system])dnl
275 _LT_DECL([], [build], [0])dnl
276 _LT_DECL([], [build_os], [0])dnl
277 dnl
278 AC_REQUIRE([AC_PROG_CC])dnl
279 AC_REQUIRE([LT_PATH_LD])dnl
280 AC_REQUIRE([LT_PATH_NM])dnl
281 dnl
282 AC_REQUIRE([AC_PROG_LN_S])dnl
283 test -z "$LN_S" && LN_S="ln -s"
284 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
285 dnl
286 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
287 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
288 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
289 dnl
290 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
291 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
292 m4_require([_LT_CMD_RELOAD])dnl
293 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
294 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
295 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
296
297 _LT_CONFIG_LIBTOOL_INIT([
298 # See if we are running on zsh, and set the options which allow our
299 # commands through without removal of \ escapes INIT.
300 if test -n "\${ZSH_VERSION+set}" ; then
301 setopt NO_GLOB_SUBST
302 fi
303 ])
304 if test -n "${ZSH_VERSION+set}" ; then
305 setopt NO_GLOB_SUBST
306 fi
307
308 _LT_CHECK_OBJDIR
309
310 m4_require([_LT_TAG_COMPILER])dnl
311 _LT_PROG_ECHO_BACKSLASH
312
313 case $host_os in
314 aix3*)
315 # AIX sometimes has problems with the GCC collect2 program. For some
316 # reason, if we set the COLLECT_NAMES environment variable, the problems
317 # vanish in a puff of smoke.
318 if test "X${COLLECT_NAMES+set}" != Xset; then
319 COLLECT_NAMES=
320 export COLLECT_NAMES
321 fi
322 ;;
323 esac
324
325 # Sed substitution that helps us do robust quoting. It backslashifies
326 # metacharacters that are still active within double-quoted strings.
327 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
328
329 # Same as above, but do not quote variable references.
330 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
331
332 # Sed substitution to delay expansion of an escaped shell variable in a
333 # double_quote_subst'ed string.
334 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
335
336 # Sed substitution to delay expansion of an escaped single quote.
337 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
338
339 # Sed substitution to avoid accidental globbing in evaled expressions
340 no_glob_subst='s/\*/\\\*/g'
341
342 # Global variables:
343 ofile=libtool
344 can_build_shared=yes
345
346 # All known linkers require a `.a' archive for static linking (except MSVC,
347 # which needs '.lib').
348 libext=a
349
350 with_gnu_ld="$lt_cv_prog_gnu_ld"
351
352 old_CC="$CC"
353 old_CFLAGS="$CFLAGS"
354
355 # Set sane defaults for various variables
356 test -z "$CC" && CC=cc
357 test -z "$LTCC" && LTCC=$CC
358 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
359 test -z "$LD" && LD=ld
360 test -z "$ac_objext" && ac_objext=o
361
362 _LT_CC_BASENAME([$compiler])
363
364 # Only perform the check for file, if the check method requires it
365 test -z "$MAGIC_CMD" && MAGIC_CMD=file
366 case $deplibs_check_method in
367 file_magic*)
368 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
369 _LT_PATH_MAGIC
370 fi
371 ;;
372 esac
373
374 # Use C for the default configuration in the libtool script
375 LT_SUPPORTED_TAG([CC])
376 _LT_LANG_C_CONFIG
377 _LT_LANG_DEFAULT_CONFIG
378 _LT_CONFIG_COMMANDS
379 ])# _LT_SETUP
380
381
382 # _LT_PROG_LTMAIN
383 # ---------------
384 # Note that this code is called both from `configure', and `config.status'
385 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
386 # `config.status' has no value for ac_aux_dir unless we are using Automake,
387 # so we pass a copy along to make sure it has a sensible value anyway.
388 m4_defun([_LT_PROG_LTMAIN],
389 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
390 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
391 ltmain="$ac_aux_dir/ltmain.sh"
392 ])# _LT_PROG_LTMAIN
393
394
395
396 # So that we can recreate a full libtool script including additional
397 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
398 # in macros and then make a single call at the end using the `libtool'
399 # label.
400
401
402 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
403 # ----------------------------------------
404 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
405 m4_define([_LT_CONFIG_LIBTOOL_INIT],
406 [m4_ifval([$1],
407 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
408 [$1
409 ])])])
410
411 # Initialize.
412 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
413
414
415 # _LT_CONFIG_LIBTOOL([COMMANDS])
416 # ------------------------------
417 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
418 m4_define([_LT_CONFIG_LIBTOOL],
419 [m4_ifval([$1],
420 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
421 [$1
422 ])])])
423
424 # Initialize.
425 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
426
427
428 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
429 # -----------------------------------------------------
430 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
431 [_LT_CONFIG_LIBTOOL([$1])
432 _LT_CONFIG_LIBTOOL_INIT([$2])
433 ])
434
435
436 # _LT_FORMAT_COMMENT([COMMENT])
437 # -----------------------------
438 # Add leading comment marks to the start of each line, and a trailing
439 # full-stop to the whole comment if one is not present already.
440 m4_define([_LT_FORMAT_COMMENT],
441 [m4_ifval([$1], [
442 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
443 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
444 )])
445
446
447
448
449
450 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
451 # -------------------------------------------------------------------
452 # CONFIGNAME is the name given to the value in the libtool script.
453 # VARNAME is the (base) name used in the configure script.
454 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
455 # VARNAME. Any other value will be used directly.
456 m4_define([_LT_DECL],
457 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
458 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
459 [m4_ifval([$1], [$1], [$2])])
460 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
461 m4_ifval([$4],
462 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
463 lt_dict_add_subkey([lt_decl_dict], [$2],
464 [tagged?], [m4_ifval([$5], [yes], [no])])])
465 ])
466
467
468 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
469 # --------------------------------------------------------
470 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
471
472
473 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
474 # ------------------------------------------------
475 m4_define([lt_decl_tag_varnames],
476 [_lt_decl_filter([tagged?], [yes], $@)])
477
478
479 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
480 # ---------------------------------------------------------
481 m4_define([_lt_decl_filter],
482 [m4_case([$#],
483 [0], [m4_fatal([$0: too few arguments: $#])],
484 [1], [m4_fatal([$0: too few arguments: $#: $1])],
485 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
486 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
487 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
488 ])
489
490
491 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
492 # --------------------------------------------------
493 m4_define([lt_decl_quote_varnames],
494 [_lt_decl_filter([value], [1], $@)])
495
496
497 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
498 # ---------------------------------------------------
499 m4_define([lt_decl_dquote_varnames],
500 [_lt_decl_filter([value], [2], $@)])
501
502
503 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
504 # ---------------------------------------------------
505 m4_define([lt_decl_varnames_tagged],
506 [m4_assert([$# <= 2])dnl
507 _$0(m4_quote(m4_default([$1], [[, ]])),
508 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
509 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
510 m4_define([_lt_decl_varnames_tagged],
511 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
512
513
514 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
515 # ------------------------------------------------
516 m4_define([lt_decl_all_varnames],
517 [_$0(m4_quote(m4_default([$1], [[, ]])),
518 m4_if([$2], [],
519 m4_quote(lt_decl_varnames),
520 m4_quote(m4_shift($@))))[]dnl
521 ])
522 m4_define([_lt_decl_all_varnames],
523 [lt_join($@, lt_decl_varnames_tagged([$1],
524 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
525 ])
526
527
528 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
529 # ------------------------------------
530 # Quote a variable value, and forward it to `config.status' so that its
531 # declaration there will have the same value as in `configure'. VARNAME
532 # must have a single quote delimited value for this to work.
533 m4_define([_LT_CONFIG_STATUS_DECLARE],
534 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
535
536
537 # _LT_CONFIG_STATUS_DECLARATIONS
538 # ------------------------------
539 # We delimit libtool config variables with single quotes, so when
540 # we write them to config.status, we have to be sure to quote all
541 # embedded single quotes properly. In configure, this macro expands
542 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
543 #
544 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
545 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
546 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
547 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
548
549
550 # _LT_LIBTOOL_TAGS
551 # ----------------
552 # Output comment and list of tags supported by the script
553 m4_defun([_LT_LIBTOOL_TAGS],
554 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
555 available_tags="_LT_TAGS"dnl
556 ])
557
558
559 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
560 # -----------------------------------
561 # Extract the dictionary values for VARNAME (optionally with TAG) and
562 # expand to a commented shell variable setting:
563 #
564 # # Some comment about what VAR is for.
565 # visible_name=$lt_internal_name
566 m4_define([_LT_LIBTOOL_DECLARE],
567 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
568 [description])))[]dnl
569 m4_pushdef([_libtool_name],
570 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
571 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
572 [0], [_libtool_name=[$]$1],
573 [1], [_libtool_name=$lt_[]$1],
574 [2], [_libtool_name=$lt_[]$1],
575 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
576 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
577 ])
578
579
580 # _LT_LIBTOOL_CONFIG_VARS
581 # -----------------------
582 # Produce commented declarations of non-tagged libtool config variables
583 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
584 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
585 # section) are produced by _LT_LIBTOOL_TAG_VARS.
586 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
587 [m4_foreach([_lt_var],
588 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
589 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
590
591
592 # _LT_LIBTOOL_TAG_VARS(TAG)
593 # -------------------------
594 m4_define([_LT_LIBTOOL_TAG_VARS],
595 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
596 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
597
598
599 # _LT_TAGVAR(VARNAME, [TAGNAME])
600 # ------------------------------
601 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
602
603
604 # _LT_CONFIG_COMMANDS
605 # -------------------
606 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
607 # variables for single and double quote escaping we saved from calls
608 # to _LT_DECL, we can put quote escaped variables declarations
609 # into `config.status', and then the shell code to quote escape them in
610 # for loops in `config.status'. Finally, any additional code accumulated
611 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
612 m4_defun([_LT_CONFIG_COMMANDS],
613 [AC_PROVIDE_IFELSE([LT_OUTPUT],
614 dnl If the libtool generation code has been placed in $CONFIG_LT,
615 dnl instead of duplicating it all over again into config.status,
616 dnl then we will have config.status run $CONFIG_LT later, so it
617 dnl needs to know what name is stored there:
618 [AC_CONFIG_COMMANDS([libtool],
619 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
620 dnl If the libtool generation code is destined for config.status,
621 dnl expand the accumulated commands and init code now:
622 [AC_CONFIG_COMMANDS([libtool],
623 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
624 ])#_LT_CONFIG_COMMANDS
625
626
627 # Initialize.
628 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
629 [
630
631 # The HP-UX ksh and POSIX shell print the target directory to stdout
632 # if CDPATH is set.
633 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
634
635 sed_quote_subst='$sed_quote_subst'
636 double_quote_subst='$double_quote_subst'
637 delay_variable_subst='$delay_variable_subst'
638 _LT_CONFIG_STATUS_DECLARATIONS
639 LTCC='$LTCC'
640 LTCFLAGS='$LTCFLAGS'
641 compiler='$compiler_DEFAULT'
642
643 # Quote evaled strings.
644 for var in lt_decl_all_varnames([[ \
645 ]], lt_decl_quote_varnames); do
646 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
647 *[[\\\\\\\`\\"\\\$]]*)
648 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
649 ;;
650 *)
651 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
652 ;;
653 esac
654 done
655
656 # Double-quote double-evaled strings.
657 for var in lt_decl_all_varnames([[ \
658 ]], lt_decl_dquote_varnames); do
659 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
660 *[[\\\\\\\`\\"\\\$]]*)
661 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
662 ;;
663 *)
664 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
665 ;;
666 esac
667 done
668
669 # Fix-up fallback echo if it was mangled by the above quoting rules.
670 case \$lt_ECHO in
671 *'\\\[$]0 --fallback-echo"')dnl "
672 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
673 ;;
674 esac
675
676 _LT_OUTPUT_LIBTOOL_INIT
677 ])
678
679
680 # LT_OUTPUT
681 # ---------
682 # This macro allows early generation of the libtool script (before
683 # AC_OUTPUT is called), incase it is used in configure for compilation
684 # tests.
685 AC_DEFUN([LT_OUTPUT],
686 [: ${CONFIG_LT=./config.lt}
687 AC_MSG_NOTICE([creating $CONFIG_LT])
688 cat >"$CONFIG_LT" <<_LTEOF
689 #! $SHELL
690 # Generated by $as_me.
691 # Run this file to recreate a libtool stub with the current configuration.
692
693 lt_cl_silent=false
694 SHELL=\${CONFIG_SHELL-$SHELL}
695 _LTEOF
696
697 cat >>"$CONFIG_LT" <<\_LTEOF
698 AS_SHELL_SANITIZE
699 _AS_PREPARE
700
701 exec AS_MESSAGE_FD>&1
702 exec AS_MESSAGE_LOG_FD>>config.log
703 {
704 echo
705 AS_BOX([Running $as_me.])
706 } >&AS_MESSAGE_LOG_FD
707
708 lt_cl_help="\
709 \`$as_me' creates a local libtool stub from the current configuration,
710 for use in further configure time tests before the real libtool is
711 generated.
712
713 Usage: $[0] [[OPTIONS]]
714
715 -h, --help print this help, then exit
716 -V, --version print version number, then exit
717 -q, --quiet do not print progress messages
718 -d, --debug don't remove temporary files
719
720 Report bugs to <bug-libtool@gnu.org>."
721
722 lt_cl_version="\
723 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
724 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
725 configured by $[0], generated by m4_PACKAGE_STRING.
726
727 Copyright (C) 2008 Free Software Foundation, Inc.
728 This config.lt script is free software; the Free Software Foundation
729 gives unlimited permision to copy, distribute and modify it."
730
731 while test $[#] != 0
732 do
733 case $[1] in
734 --version | --v* | -V )
735 echo "$lt_cl_version"; exit 0 ;;
736 --help | --h* | -h )
737 echo "$lt_cl_help"; exit 0 ;;
738 --debug | --d* | -d )
739 debug=: ;;
740 --quiet | --q* | --silent | --s* | -q )
741 lt_cl_silent=: ;;
742
743 -*) AC_MSG_ERROR([unrecognized option: $[1]
744 Try \`$[0] --help' for more information.]) ;;
745
746 *) AC_MSG_ERROR([unrecognized argument: $[1]
747 Try \`$[0] --help' for more information.]) ;;
748 esac
749 shift
750 done
751
752 if $lt_cl_silent; then
753 exec AS_MESSAGE_FD>/dev/null
754 fi
755 _LTEOF
756
757 cat >>"$CONFIG_LT" <<_LTEOF
758 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
759 _LTEOF
760
761 cat >>"$CONFIG_LT" <<\_LTEOF
762 AC_MSG_NOTICE([creating $ofile])
763 _LT_OUTPUT_LIBTOOL_COMMANDS
764 AS_EXIT(0)
765 _LTEOF
766 chmod +x "$CONFIG_LT"
767
768 # configure is writing to config.log, but config.lt does its own redirection,
769 # appending to config.log, which fails on DOS, as config.log is still kept
770 # open by configure. Here we exec the FD to /dev/null, effectively closing
771 # config.log, so it can be properly (re)opened and appended to by config.lt.
772 if test "$no_create" != yes; then
773 lt_cl_success=:
774 test "$silent" = yes &&
775 lt_config_lt_args="$lt_config_lt_args --quiet"
776 exec AS_MESSAGE_LOG_FD>/dev/null
777 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
778 exec AS_MESSAGE_LOG_FD>>config.log
779 $lt_cl_success || AS_EXIT(1)
780 fi
781 ])# LT_OUTPUT
782
783
784 # _LT_CONFIG(TAG)
785 # ---------------
786 # If TAG is the built-in tag, create an initial libtool script with a
787 # default configuration from the untagged config vars. Otherwise add code
788 # to config.status for appending the configuration named by TAG from the
789 # matching tagged config vars.
790 m4_defun([_LT_CONFIG],
791 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
792 _LT_CONFIG_SAVE_COMMANDS([
793 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
794 m4_if(_LT_TAG, [C], [
795 # See if we are running on zsh, and set the options which allow our
796 # commands through without removal of \ escapes.
797 if test -n "${ZSH_VERSION+set}" ; then
798 setopt NO_GLOB_SUBST
799 fi
800
801 cfgfile="${ofile}T"
802 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
803 $RM "$cfgfile"
804
805 cat <<_LT_EOF >> "$cfgfile"
806 #! $SHELL
807
808 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
809 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
810 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
811 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
812 #
813 _LT_COPYING
814 _LT_LIBTOOL_TAGS
815
816 # ### BEGIN LIBTOOL CONFIG
817 _LT_LIBTOOL_CONFIG_VARS
818 _LT_LIBTOOL_TAG_VARS
819 # ### END LIBTOOL CONFIG
820
821 _LT_EOF
822
823 case $host_os in
824 aix3*)
825 cat <<\_LT_EOF >> "$cfgfile"
826 # AIX sometimes has problems with the GCC collect2 program. For some
827 # reason, if we set the COLLECT_NAMES environment variable, the problems
828 # vanish in a puff of smoke.
829 if test "X${COLLECT_NAMES+set}" != Xset; then
830 COLLECT_NAMES=
831 export COLLECT_NAMES
832 fi
833 _LT_EOF
834 ;;
835 esac
836
837 _LT_PROG_LTMAIN
838
839 # We use sed instead of cat because bash on DJGPP gets confused if
840 # if finds mixed CR/LF and LF-only lines. Since sed operates in
841 # text mode, it properly converts lines to CR/LF. This bash problem
842 # is reportedly fixed, but why not run on old versions too?
843 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
844 || (rm -f "$cfgfile"; exit 1)
845
846 _LT_PROG_XSI_SHELLFNS
847
848 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
849 || (rm -f "$cfgfile"; exit 1)
850
851 mv -f "$cfgfile" "$ofile" ||
852 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
853 chmod +x "$ofile"
854 ],
855 [cat <<_LT_EOF >> "$ofile"
856
857 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
858 dnl in a comment (ie after a #).
859 # ### BEGIN LIBTOOL TAG CONFIG: $1
860 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
861 # ### END LIBTOOL TAG CONFIG: $1
862 _LT_EOF
863 ])dnl /m4_if
864 ],
865 [m4_if([$1], [], [
866 PACKAGE='$PACKAGE'
867 VERSION='$VERSION'
868 TIMESTAMP='$TIMESTAMP'
869 RM='$RM'
870 ofile='$ofile'], [])
871 ])dnl /_LT_CONFIG_SAVE_COMMANDS
872 ])# _LT_CONFIG
873
874
875 # LT_SUPPORTED_TAG(TAG)
876 # ---------------------
877 # Trace this macro to discover what tags are supported by the libtool
878 # --tag option, using:
879 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
880 AC_DEFUN([LT_SUPPORTED_TAG], [])
881
882
883 # C support is built-in for now
884 m4_define([_LT_LANG_C_enabled], [])
885 m4_define([_LT_TAGS], [])
886
887
888 # LT_LANG(LANG)
889 # -------------
890 # Enable libtool support for the given language if not already enabled.
891 AC_DEFUN([LT_LANG],
892 [AC_BEFORE([$0], [LT_OUTPUT])dnl
893 m4_case([$1],
894 [C], [_LT_LANG(C)],
895 [C++], [_LT_LANG(CXX)],
896 [Java], [_LT_LANG(GCJ)],
897 [Fortran 77], [_LT_LANG(F77)],
898 [Fortran], [_LT_LANG(FC)],
899 [Windows Resource], [_LT_LANG(RC)],
900 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
901 [_LT_LANG($1)],
902 [m4_fatal([$0: unsupported language: "$1"])])])dnl
903 ])# LT_LANG
904
905
906 # _LT_LANG(LANGNAME)
907 # ------------------
908 m4_defun([_LT_LANG],
909 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
910 [LT_SUPPORTED_TAG([$1])dnl
911 m4_append([_LT_TAGS], [$1 ])dnl
912 m4_define([_LT_LANG_]$1[_enabled], [])dnl
913 _LT_LANG_$1_CONFIG($1)])dnl
914 ])# _LT_LANG
915
916
917 # _LT_LANG_DEFAULT_CONFIG
918 # -----------------------
919 m4_defun([_LT_LANG_DEFAULT_CONFIG],
920 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
921 [LT_LANG(CXX)],
922 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
923
924 AC_PROVIDE_IFELSE([AC_PROG_F77],
925 [LT_LANG(F77)],
926 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
927
928 AC_PROVIDE_IFELSE([AC_PROG_FC],
929 [LT_LANG(FC)],
930 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
931
932 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
933 dnl pulling things in needlessly.
934 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
935 [LT_LANG(GCJ)],
936 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
937 [LT_LANG(GCJ)],
938 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
939 [LT_LANG(GCJ)],
940 [m4_ifdef([AC_PROG_GCJ],
941 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
942 m4_ifdef([A][M_PROG_GCJ],
943 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
944 m4_ifdef([LT_PROG_GCJ],
945 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
946
947 AC_PROVIDE_IFELSE([LT_PROG_RC],
948 [LT_LANG(RC)],
949 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
950 ])# _LT_LANG_DEFAULT_CONFIG
951
952 # Obsolete macros:
953 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
954 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
955 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
956 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
957 dnl aclocal-1.4 backwards compatibility:
958 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
959 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
960 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
961 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
962
963
964 # _LT_TAG_COMPILER
965 # ----------------
966 m4_defun([_LT_TAG_COMPILER],
967 [AC_REQUIRE([AC_PROG_CC])dnl
968
969 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
970 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
971 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
972 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
973
974 # If no C compiler was specified, use CC.
975 LTCC=${LTCC-"$CC"}
976
977 # If no C compiler flags were specified, use CFLAGS.
978 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
979
980 # Allow CC to be a program name with arguments.
981 compiler=$CC
982 ])# _LT_TAG_COMPILER
983
984
985 # _LT_COMPILER_BOILERPLATE
986 # ------------------------
987 # Check for compiler boilerplate output or warnings with
988 # the simple compiler test code.
989 m4_defun([_LT_COMPILER_BOILERPLATE],
990 [m4_require([_LT_DECL_SED])dnl
991 ac_outfile=conftest.$ac_objext
992 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
993 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
994 _lt_compiler_boilerplate=`cat conftest.err`
995 $RM conftest*
996 ])# _LT_COMPILER_BOILERPLATE
997
998
999 # _LT_LINKER_BOILERPLATE
1000 # ----------------------
1001 # Check for linker boilerplate output or warnings with
1002 # the simple link test code.
1003 m4_defun([_LT_LINKER_BOILERPLATE],
1004 [m4_require([_LT_DECL_SED])dnl
1005 ac_outfile=conftest.$ac_objext
1006 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1007 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1008 _lt_linker_boilerplate=`cat conftest.err`
1009 $RM -r conftest*
1010 ])# _LT_LINKER_BOILERPLATE
1011
1012 # _LT_REQUIRED_DARWIN_CHECKS
1013 # -------------------------
1014 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1015 case $host_os in
1016 rhapsody* | darwin*)
1017 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1018 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1019 AC_CHECK_TOOL([LIPO], [lipo], [:])
1020 AC_CHECK_TOOL([OTOOL], [otool], [:])
1021 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1022 _LT_DECL([], [DSYMUTIL], [1],
1023 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1024 _LT_DECL([], [NMEDIT], [1],
1025 [Tool to change global to local symbols on Mac OS X])
1026 _LT_DECL([], [LIPO], [1],
1027 [Tool to manipulate fat objects and archives on Mac OS X])
1028 _LT_DECL([], [OTOOL], [1],
1029 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1030 _LT_DECL([], [OTOOL64], [1],
1031 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1032
1033 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1034 [lt_cv_apple_cc_single_mod=no
1035 if test -z "${LT_MULTI_MODULE}"; then
1036 # By default we will add the -single_module flag. You can override
1037 # by either setting the environment variable LT_MULTI_MODULE
1038 # non-empty at configure time, or by adding -multi_module to the
1039 # link flags.
1040 rm -rf libconftest.dylib*
1041 echo "int foo(void){return 1;}" > conftest.c
1042 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1043 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1044 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1045 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1046 _lt_result=$?
1047 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1048 lt_cv_apple_cc_single_mod=yes
1049 else
1050 cat conftest.err >&AS_MESSAGE_LOG_FD
1051 fi
1052 rm -rf libconftest.dylib*
1053 rm -f conftest.*
1054 fi])
1055 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1056 [lt_cv_ld_exported_symbols_list],
1057 [lt_cv_ld_exported_symbols_list=no
1058 save_LDFLAGS=$LDFLAGS
1059 echo "_main" > conftest.sym
1060 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1061 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1062 [lt_cv_ld_exported_symbols_list=yes],
1063 [lt_cv_ld_exported_symbols_list=no])
1064 LDFLAGS="$save_LDFLAGS"
1065 ])
1066 case $host_os in
1067 rhapsody* | darwin1.[[012]])
1068 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1069 darwin1.*)
1070 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1071 darwin*) # darwin 5.x on
1072 # if running on 10.5 or later, the deployment target defaults
1073 # to the OS version, if on x86, and 10.4, the deployment
1074 # target defaults to 10.4. Don't you love it?
1075 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1076 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1077 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1078 10.[[012]]*)
1079 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1080 10.*)
1081 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1082 esac
1083 ;;
1084 esac
1085 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1086 _lt_dar_single_mod='$single_module'
1087 fi
1088 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1089 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1090 else
1091 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1092 fi
1093 if test "$DSYMUTIL" != ":"; then
1094 _lt_dsymutil='~$DSYMUTIL $lib || :'
1095 else
1096 _lt_dsymutil=
1097 fi
1098 ;;
1099 esac
1100 ])
1101
1102
1103 # _LT_DARWIN_LINKER_FEATURES
1104 # --------------------------
1105 # Checks for linker and compiler features on darwin
1106 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1107 [
1108 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1109 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1110 _LT_TAGVAR(hardcode_direct, $1)=no
1111 _LT_TAGVAR(hardcode_automatic, $1)=yes
1112 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1113 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1114 _LT_TAGVAR(link_all_deplibs, $1)=yes
1115 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1116 case $cc_basename in
1117 ifort*) _lt_dar_can_shared=yes ;;
1118 *) _lt_dar_can_shared=$GCC ;;
1119 esac
1120 if test "$_lt_dar_can_shared" = "yes"; then
1121 output_verbose_link_cmd=echo
1122 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1123 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1124 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1125 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1126 m4_if([$1], [CXX],
1127 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1128 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1129 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1130 fi
1131 ],[])
1132 else
1133 _LT_TAGVAR(ld_shlibs, $1)=no
1134 fi
1135 ])
1136
1137 # _LT_SYS_MODULE_PATH_AIX
1138 # -----------------------
1139 # Links a minimal program and checks the executable
1140 # for the system default hardcoded library path. In most cases,
1141 # this is /usr/lib:/lib, but when the MPI compilers are used
1142 # the location of the communication and MPI libs are included too.
1143 # If we don't find anything, use the default library path according
1144 # to the aix ld manual.
1145 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1146 [m4_require([_LT_DECL_SED])dnl
1147 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1148 lt_aix_libpath_sed='
1149 /Import File Strings/,/^$/ {
1150 /^0/ {
1151 s/^0 *\(.*\)$/\1/
1152 p
1153 }
1154 }'
1155 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1156 # Check for a 64-bit object if we didn't find anything.
1157 if test -z "$aix_libpath"; then
1158 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1159 fi],[])
1160 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1161 ])# _LT_SYS_MODULE_PATH_AIX
1162
1163
1164 # _LT_SHELL_INIT(ARG)
1165 # -------------------
1166 m4_define([_LT_SHELL_INIT],
1167 [ifdef([AC_DIVERSION_NOTICE],
1168 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1169 [AC_DIVERT_PUSH(NOTICE)])
1170 $1
1171 AC_DIVERT_POP
1172 ])# _LT_SHELL_INIT
1173
1174
1175 # _LT_PROG_ECHO_BACKSLASH
1176 # -----------------------
1177 # Add some code to the start of the generated configure script which
1178 # will find an echo command which doesn't interpret backslashes.
1179 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1180 [_LT_SHELL_INIT([
1181 # Check that we are running under the correct shell.
1182 SHELL=${CONFIG_SHELL-/bin/sh}
1183
1184 case X$lt_ECHO in
1185 X*--fallback-echo)
1186 # Remove one level of quotation (which was required for Make).
1187 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1188 ;;
1189 esac
1190
1191 ECHO=${lt_ECHO-echo}
1192 if test "X[$]1" = X--no-reexec; then
1193 # Discard the --no-reexec flag, and continue.
1194 shift
1195 elif test "X[$]1" = X--fallback-echo; then
1196 # Avoid inline document here, it may be left over
1197 :
1198 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1199 # Yippee, $ECHO works!
1200 :
1201 else
1202 # Restart under the correct shell.
1203 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1204 fi
1205
1206 if test "X[$]1" = X--fallback-echo; then
1207 # used as fallback echo
1208 shift
1209 cat <<_LT_EOF
1210 [$]*
1211 _LT_EOF
1212 exit 0
1213 fi
1214
1215 # The HP-UX ksh and POSIX shell print the target directory to stdout
1216 # if CDPATH is set.
1217 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1218
1219 if test -z "$lt_ECHO"; then
1220 if test "X${echo_test_string+set}" != Xset; then
1221 # find a string as large as possible, as long as the shell can cope with it
1222 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1223 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1224 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1225 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1226 then
1227 break
1228 fi
1229 done
1230 fi
1231
1232 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1233 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1234 test "X$echo_testing_string" = "X$echo_test_string"; then
1235 :
1236 else
1237 # The Solaris, AIX, and Digital Unix default echo programs unquote
1238 # backslashes. This makes it impossible to quote backslashes using
1239 # echo "$something" | sed 's/\\/\\\\/g'
1240 #
1241 # So, first we look for a working echo in the user's PATH.
1242
1243 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1244 for dir in $PATH /usr/ucb; do
1245 IFS="$lt_save_ifs"
1246 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1247 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1248 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1249 test "X$echo_testing_string" = "X$echo_test_string"; then
1250 ECHO="$dir/echo"
1251 break
1252 fi
1253 done
1254 IFS="$lt_save_ifs"
1255
1256 if test "X$ECHO" = Xecho; then
1257 # We didn't find a better echo, so look for alternatives.
1258 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1259 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1260 test "X$echo_testing_string" = "X$echo_test_string"; then
1261 # This shell has a builtin print -r that does the trick.
1262 ECHO='print -r'
1263 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1264 test "X$CONFIG_SHELL" != X/bin/ksh; then
1265 # If we have ksh, try running configure again with it.
1266 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1267 export ORIGINAL_CONFIG_SHELL
1268 CONFIG_SHELL=/bin/ksh
1269 export CONFIG_SHELL
1270 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1271 else
1272 # Try using printf.
1273 ECHO='printf %s\n'
1274 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1275 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1276 test "X$echo_testing_string" = "X$echo_test_string"; then
1277 # Cool, printf works
1278 :
1279 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1280 test "X$echo_testing_string" = 'X\t' &&
1281 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1282 test "X$echo_testing_string" = "X$echo_test_string"; then
1283 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1284 export CONFIG_SHELL
1285 SHELL="$CONFIG_SHELL"
1286 export SHELL
1287 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1288 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1289 test "X$echo_testing_string" = 'X\t' &&
1290 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1291 test "X$echo_testing_string" = "X$echo_test_string"; then
1292 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1293 else
1294 # maybe with a smaller string...
1295 prev=:
1296
1297 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1298 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1299 then
1300 break
1301 fi
1302 prev="$cmd"
1303 done
1304
1305 if test "$prev" != 'sed 50q "[$]0"'; then
1306 echo_test_string=`eval $prev`
1307 export echo_test_string
1308 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1309 else
1310 # Oops. We lost completely, so just stick with echo.
1311 ECHO=echo
1312 fi
1313 fi
1314 fi
1315 fi
1316 fi
1317 fi
1318
1319 # Copy echo and quote the copy suitably for passing to libtool from
1320 # the Makefile, instead of quoting the original, which is used later.
1321 lt_ECHO=$ECHO
1322 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1323 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1324 fi
1325
1326 AC_SUBST(lt_ECHO)
1327 ])
1328 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1329 _LT_DECL([], [ECHO], [1],
1330 [An echo program that does not interpret backslashes])
1331 ])# _LT_PROG_ECHO_BACKSLASH
1332
1333
1334 # _LT_ENABLE_LOCK
1335 # ---------------
1336 m4_defun([_LT_ENABLE_LOCK],
1337 [AC_ARG_ENABLE([libtool-lock],
1338 [AS_HELP_STRING([--disable-libtool-lock],
1339 [avoid locking (might break parallel builds)])])
1340 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1341
1342 # Some flags need to be propagated to the compiler or linker for good
1343 # libtool support.
1344 case $host in
1345 ia64-*-hpux*)
1346 # Find out which ABI we are using.
1347 echo 'int i;' > conftest.$ac_ext
1348 if AC_TRY_EVAL(ac_compile); then
1349 case `/usr/bin/file conftest.$ac_objext` in
1350 *ELF-32*)
1351 HPUX_IA64_MODE="32"
1352 ;;
1353 *ELF-64*)
1354 HPUX_IA64_MODE="64"
1355 ;;
1356 esac
1357 fi
1358 rm -rf conftest*
1359 ;;
1360 *-*-irix6*)
1361 # Find out which ABI we are using.
1362 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1363 if AC_TRY_EVAL(ac_compile); then
1364 if test "$lt_cv_prog_gnu_ld" = yes; then
1365 case `/usr/bin/file conftest.$ac_objext` in
1366 *32-bit*)
1367 LD="${LD-ld} -melf32bsmip"
1368 ;;
1369 *N32*)
1370 LD="${LD-ld} -melf32bmipn32"
1371 ;;
1372 *64-bit*)
1373 LD="${LD-ld} -melf64bmip"
1374 ;;
1375 esac
1376 else
1377 case `/usr/bin/file conftest.$ac_objext` in
1378 *32-bit*)
1379 LD="${LD-ld} -32"
1380 ;;
1381 *N32*)
1382 LD="${LD-ld} -n32"
1383 ;;
1384 *64-bit*)
1385 LD="${LD-ld} -64"
1386 ;;
1387 esac
1388 fi
1389 fi
1390 rm -rf conftest*
1391 ;;
1392
1393 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1394 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1395 # Find out which ABI we are using.
1396 echo 'int i;' > conftest.$ac_ext
1397 if AC_TRY_EVAL(ac_compile); then
1398 case `/usr/bin/file conftest.o` in
1399 *32-bit*)
1400 case $host in
1401 x86_64-*kfreebsd*-gnu)
1402 LD="${LD-ld} -m elf_i386_fbsd"
1403 ;;
1404 x86_64-*linux*)
1405 LD="${LD-ld} -m elf_i386"
1406 ;;
1407 ppc64-*linux*|powerpc64-*linux*)
1408 LD="${LD-ld} -m elf32ppclinux"
1409 ;;
1410 s390x-*linux*)
1411 LD="${LD-ld} -m elf_s390"
1412 ;;
1413 sparc64-*linux*)
1414 LD="${LD-ld} -m elf32_sparc"
1415 ;;
1416 esac
1417 ;;
1418 *64-bit*)
1419 case $host in
1420 x86_64-*kfreebsd*-gnu)
1421 LD="${LD-ld} -m elf_x86_64_fbsd"
1422 ;;
1423 x86_64-*linux*)
1424 LD="${LD-ld} -m elf_x86_64"
1425 ;;
1426 ppc*-*linux*|powerpc*-*linux*)
1427 LD="${LD-ld} -m elf64ppc"
1428 ;;
1429 s390*-*linux*|s390*-*tpf*)
1430 LD="${LD-ld} -m elf64_s390"
1431 ;;
1432 sparc*-*linux*)
1433 LD="${LD-ld} -m elf64_sparc"
1434 ;;
1435 esac
1436 ;;
1437 esac
1438 fi
1439 rm -rf conftest*
1440 ;;
1441
1442 *-*-sco3.2v5*)
1443 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1444 SAVE_CFLAGS="$CFLAGS"
1445 CFLAGS="$CFLAGS -belf"
1446 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1447 [AC_LANG_PUSH(C)
1448 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1449 AC_LANG_POP])
1450 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1451 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1452 CFLAGS="$SAVE_CFLAGS"
1453 fi
1454 ;;
1455 sparc*-*solaris*)
1456 # Find out which ABI we are using.
1457 echo 'int i;' > conftest.$ac_ext
1458 if AC_TRY_EVAL(ac_compile); then
1459 case `/usr/bin/file conftest.o` in
1460 *64-bit*)
1461 case $lt_cv_prog_gnu_ld in
1462 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1463 *)
1464 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1465 LD="${LD-ld} -64"
1466 fi
1467 ;;
1468 esac
1469 ;;
1470 esac
1471 fi
1472 rm -rf conftest*
1473 ;;
1474 esac
1475
1476 need_locks="$enable_libtool_lock"
1477 ])# _LT_ENABLE_LOCK
1478
1479
1480 # _LT_CMD_OLD_ARCHIVE
1481 # -------------------
1482 m4_defun([_LT_CMD_OLD_ARCHIVE],
1483 [AC_CHECK_TOOL(AR, ar, false)
1484 test -z "$AR" && AR=ar
1485 test -z "$AR_FLAGS" && AR_FLAGS=cru
1486 _LT_DECL([], [AR], [1], [The archiver])
1487 _LT_DECL([], [AR_FLAGS], [1])
1488
1489 AC_CHECK_TOOL(STRIP, strip, :)
1490 test -z "$STRIP" && STRIP=:
1491 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1492
1493 AC_CHECK_TOOL(RANLIB, ranlib, :)
1494 test -z "$RANLIB" && RANLIB=:
1495 _LT_DECL([], [RANLIB], [1],
1496 [Commands used to install an old-style archive])
1497
1498 # Determine commands to create old-style static archives.
1499 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1500 old_postinstall_cmds='chmod 644 $oldlib'
1501 old_postuninstall_cmds=
1502
1503 if test -n "$RANLIB"; then
1504 case $host_os in
1505 openbsd*)
1506 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1507 ;;
1508 *)
1509 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1510 ;;
1511 esac
1512 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1513 fi
1514 _LT_DECL([], [old_postinstall_cmds], [2])
1515 _LT_DECL([], [old_postuninstall_cmds], [2])
1516 _LT_TAGDECL([], [old_archive_cmds], [2],
1517 [Commands used to build an old-style archive])
1518 ])# _LT_CMD_OLD_ARCHIVE
1519
1520
1521 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1522 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1523 # ----------------------------------------------------------------
1524 # Check whether the given compiler option works
1525 AC_DEFUN([_LT_COMPILER_OPTION],
1526 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1527 m4_require([_LT_DECL_SED])dnl
1528 AC_CACHE_CHECK([$1], [$2],
1529 [$2=no
1530 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1531 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1532 lt_compiler_flag="$3"
1533 # Insert the option either (1) after the last *FLAGS variable, or
1534 # (2) before a word containing "conftest.", or (3) at the end.
1535 # Note that $ac_compile itself does not contain backslashes and begins
1536 # with a dollar sign (not a hyphen), so the echo should work correctly.
1537 # The option is referenced via a variable to avoid confusing sed.
1538 lt_compile=`echo "$ac_compile" | $SED \
1539 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1540 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1541 -e 's:$: $lt_compiler_flag:'`
1542 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1543 (eval "$lt_compile" 2>conftest.err)
1544 ac_status=$?
1545 cat conftest.err >&AS_MESSAGE_LOG_FD
1546 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1547 if (exit $ac_status) && test -s "$ac_outfile"; then
1548 # The compiler can only warn and ignore the option if not recognized
1549 # So say no if there are warnings other than the usual output.
1550 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1551 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1552 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1553 $2=yes
1554 fi
1555 fi
1556 $RM conftest*
1557 ])
1558
1559 if test x"[$]$2" = xyes; then
1560 m4_if([$5], , :, [$5])
1561 else
1562 m4_if([$6], , :, [$6])
1563 fi
1564 ])# _LT_COMPILER_OPTION
1565
1566 # Old name:
1567 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1568 dnl aclocal-1.4 backwards compatibility:
1569 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1570
1571
1572 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1573 # [ACTION-SUCCESS], [ACTION-FAILURE])
1574 # ----------------------------------------------------
1575 # Check whether the given linker option works
1576 AC_DEFUN([_LT_LINKER_OPTION],
1577 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1578 m4_require([_LT_DECL_SED])dnl
1579 AC_CACHE_CHECK([$1], [$2],
1580 [$2=no
1581 save_LDFLAGS="$LDFLAGS"
1582 LDFLAGS="$LDFLAGS $3"
1583 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1584 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1585 # The linker can only warn and ignore the option if not recognized
1586 # So say no if there are warnings
1587 if test -s conftest.err; then
1588 # Append any errors to the config.log.
1589 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1590 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1591 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1592 if diff conftest.exp conftest.er2 >/dev/null; then
1593 $2=yes
1594 fi
1595 else
1596 $2=yes
1597 fi
1598 fi
1599 $RM -r conftest*
1600 LDFLAGS="$save_LDFLAGS"
1601 ])
1602
1603 if test x"[$]$2" = xyes; then
1604 m4_if([$4], , :, [$4])
1605 else
1606 m4_if([$5], , :, [$5])
1607 fi
1608 ])# _LT_LINKER_OPTION
1609
1610 # Old name:
1611 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1612 dnl aclocal-1.4 backwards compatibility:
1613 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1614
1615
1616 # LT_CMD_MAX_LEN
1617 #---------------
1618 AC_DEFUN([LT_CMD_MAX_LEN],
1619 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1620 # find the maximum length of command line arguments
1621 AC_MSG_CHECKING([the maximum length of command line arguments])
1622 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1623 i=0
1624 teststring="ABCD"
1625
1626 case $build_os in
1627 msdosdjgpp*)
1628 # On DJGPP, this test can blow up pretty badly due to problems in libc
1629 # (any single argument exceeding 2000 bytes causes a buffer overrun
1630 # during glob expansion). Even if it were fixed, the result of this
1631 # check would be larger than it should be.
1632 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1633 ;;
1634
1635 gnu*)
1636 # Under GNU Hurd, this test is not required because there is
1637 # no limit to the length of command line arguments.
1638 # Libtool will interpret -1 as no limit whatsoever
1639 lt_cv_sys_max_cmd_len=-1;
1640 ;;
1641
1642 cygwin* | mingw* | cegcc*)
1643 # On Win9x/ME, this test blows up -- it succeeds, but takes
1644 # about 5 minutes as the teststring grows exponentially.
1645 # Worse, since 9x/ME are not pre-emptively multitasking,
1646 # you end up with a "frozen" computer, even though with patience
1647 # the test eventually succeeds (with a max line length of 256k).
1648 # Instead, let's just punt: use the minimum linelength reported by
1649 # all of the supported platforms: 8192 (on NT/2K/XP).
1650 lt_cv_sys_max_cmd_len=8192;
1651 ;;
1652
1653 amigaos*)
1654 # On AmigaOS with pdksh, this test takes hours, literally.
1655 # So we just punt and use a minimum line length of 8192.
1656 lt_cv_sys_max_cmd_len=8192;
1657 ;;
1658
1659 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1660 # This has been around since 386BSD, at least. Likely further.
1661 if test -x /sbin/sysctl; then
1662 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1663 elif test -x /usr/sbin/sysctl; then
1664 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1665 else
1666 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1667 fi
1668 # And add a safety zone
1669 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1670 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1671 ;;
1672
1673 interix*)
1674 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1675 lt_cv_sys_max_cmd_len=196608
1676 ;;
1677
1678 osf*)
1679 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1680 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1681 # nice to cause kernel panics so lets avoid the loop below.
1682 # First set a reasonable default.
1683 lt_cv_sys_max_cmd_len=16384
1684 #
1685 if test -x /sbin/sysconfig; then
1686 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1687 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1688 esac
1689 fi
1690 ;;
1691 sco3.2v5*)
1692 lt_cv_sys_max_cmd_len=102400
1693 ;;
1694 sysv5* | sco5v6* | sysv4.2uw2*)
1695 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1696 if test -n "$kargmax"; then
1697 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1698 else
1699 lt_cv_sys_max_cmd_len=32768
1700 fi
1701 ;;
1702 *)
1703 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1704 if test -n "$lt_cv_sys_max_cmd_len"; then
1705 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1706 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1707 else
1708 # Make teststring a little bigger before we do anything with it.
1709 # a 1K string should be a reasonable start.
1710 for i in 1 2 3 4 5 6 7 8 ; do
1711 teststring=$teststring$teststring
1712 done
1713 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1714 # If test is not a shell built-in, we'll probably end up computing a
1715 # maximum length that is only half of the actual maximum length, but
1716 # we can't tell.
1717 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1718 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1719 test $i != 17 # 1/2 MB should be enough
1720 do
1721 i=`expr $i + 1`
1722 teststring=$teststring$teststring
1723 done
1724 # Only check the string length outside the loop.
1725 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1726 teststring=
1727 # Add a significant safety factor because C++ compilers can tack on
1728 # massive amounts of additional arguments before passing them to the
1729 # linker. It appears as though 1/2 is a usable value.
1730 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1731 fi
1732 ;;
1733 esac
1734 ])
1735 if test -n $lt_cv_sys_max_cmd_len ; then
1736 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1737 else
1738 AC_MSG_RESULT(none)
1739 fi
1740 max_cmd_len=$lt_cv_sys_max_cmd_len
1741 _LT_DECL([], [max_cmd_len], [0],
1742 [What is the maximum length of a command?])
1743 ])# LT_CMD_MAX_LEN
1744
1745 # Old name:
1746 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1747 dnl aclocal-1.4 backwards compatibility:
1748 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1749
1750
1751 # _LT_HEADER_DLFCN
1752 # ----------------
1753 m4_defun([_LT_HEADER_DLFCN],
1754 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1755 ])# _LT_HEADER_DLFCN
1756
1757
1758 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1759 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1760 # ----------------------------------------------------------------
1761 m4_defun([_LT_TRY_DLOPEN_SELF],
1762 [m4_require([_LT_HEADER_DLFCN])dnl
1763 if test "$cross_compiling" = yes; then :
1764 [$4]
1765 else
1766 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1767 lt_status=$lt_dlunknown
1768 cat > conftest.$ac_ext <<_LT_EOF
1769 [#line __oline__ "configure"
1770 #include "confdefs.h"
1771
1772 #if HAVE_DLFCN_H
1773 #include <dlfcn.h>
1774 #endif
1775
1776 #include <stdio.h>
1777
1778 #ifdef RTLD_GLOBAL
1779 # define LT_DLGLOBAL RTLD_GLOBAL
1780 #else
1781 # ifdef DL_GLOBAL
1782 # define LT_DLGLOBAL DL_GLOBAL
1783 # else
1784 # define LT_DLGLOBAL 0
1785 # endif
1786 #endif
1787
1788 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1789 find out it does not work in some platform. */
1790 #ifndef LT_DLLAZY_OR_NOW
1791 # ifdef RTLD_LAZY
1792 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1793 # else
1794 # ifdef DL_LAZY
1795 # define LT_DLLAZY_OR_NOW DL_LAZY
1796 # else
1797 # ifdef RTLD_NOW
1798 # define LT_DLLAZY_OR_NOW RTLD_NOW
1799 # else
1800 # ifdef DL_NOW
1801 # define LT_DLLAZY_OR_NOW DL_NOW
1802 # else
1803 # define LT_DLLAZY_OR_NOW 0
1804 # endif
1805 # endif
1806 # endif
1807 # endif
1808 #endif
1809
1810 void fnord() { int i=42;}
1811 int main ()
1812 {
1813 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1814 int status = $lt_dlunknown;
1815
1816 if (self)
1817 {
1818 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1819 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1820 /* dlclose (self); */
1821 }
1822 else
1823 puts (dlerror ());
1824
1825 return status;
1826 }]
1827 _LT_EOF
1828 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1829 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1830 lt_status=$?
1831 case x$lt_status in
1832 x$lt_dlno_uscore) $1 ;;
1833 x$lt_dlneed_uscore) $2 ;;
1834 x$lt_dlunknown|x*) $3 ;;
1835 esac
1836 else :
1837 # compilation failed
1838 $3
1839 fi
1840 fi
1841 rm -fr conftest*
1842 ])# _LT_TRY_DLOPEN_SELF
1843
1844
1845 # LT_SYS_DLOPEN_SELF
1846 # ------------------
1847 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1848 [m4_require([_LT_HEADER_DLFCN])dnl
1849 if test "x$enable_dlopen" != xyes; then
1850 enable_dlopen=unknown
1851 enable_dlopen_self=unknown
1852 enable_dlopen_self_static=unknown
1853 else
1854 lt_cv_dlopen=no
1855 lt_cv_dlopen_libs=
1856
1857 case $host_os in
1858 beos*)
1859 lt_cv_dlopen="load_add_on"
1860 lt_cv_dlopen_libs=
1861 lt_cv_dlopen_self=yes
1862 ;;
1863
1864 mingw* | pw32* | cegcc*)
1865 lt_cv_dlopen="LoadLibrary"
1866 lt_cv_dlopen_libs=
1867 ;;
1868
1869 cygwin*)
1870 lt_cv_dlopen="dlopen"
1871 lt_cv_dlopen_libs=
1872 ;;
1873
1874 darwin*)
1875 # if libdl is installed we need to link against it
1876 AC_CHECK_LIB([dl], [dlopen],
1877 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1878 lt_cv_dlopen="dyld"
1879 lt_cv_dlopen_libs=
1880 lt_cv_dlopen_self=yes
1881 ])
1882 ;;
1883
1884 *)
1885 AC_CHECK_FUNC([shl_load],
1886 [lt_cv_dlopen="shl_load"],
1887 [AC_CHECK_LIB([dld], [shl_load],
1888 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1889 [AC_CHECK_FUNC([dlopen],
1890 [lt_cv_dlopen="dlopen"],
1891 [AC_CHECK_LIB([dl], [dlopen],
1892 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1893 [AC_CHECK_LIB([svld], [dlopen],
1894 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1895 [AC_CHECK_LIB([dld], [dld_link],
1896 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1897 ])
1898 ])
1899 ])
1900 ])
1901 ])
1902 ;;
1903 esac
1904
1905 if test "x$lt_cv_dlopen" != xno; then
1906 enable_dlopen=yes
1907 else
1908 enable_dlopen=no
1909 fi
1910
1911 case $lt_cv_dlopen in
1912 dlopen)
1913 save_CPPFLAGS="$CPPFLAGS"
1914 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1915
1916 save_LDFLAGS="$LDFLAGS"
1917 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1918
1919 save_LIBS="$LIBS"
1920 LIBS="$lt_cv_dlopen_libs $LIBS"
1921
1922 AC_CACHE_CHECK([whether a program can dlopen itself],
1923 lt_cv_dlopen_self, [dnl
1924 _LT_TRY_DLOPEN_SELF(
1925 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1926 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1927 ])
1928
1929 if test "x$lt_cv_dlopen_self" = xyes; then
1930 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1931 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1932 lt_cv_dlopen_self_static, [dnl
1933 _LT_TRY_DLOPEN_SELF(
1934 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1935 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1936 ])
1937 fi
1938
1939 CPPFLAGS="$save_CPPFLAGS"
1940 LDFLAGS="$save_LDFLAGS"
1941 LIBS="$save_LIBS"
1942 ;;
1943 esac
1944
1945 case $lt_cv_dlopen_self in
1946 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1947 *) enable_dlopen_self=unknown ;;
1948 esac
1949
1950 case $lt_cv_dlopen_self_static in
1951 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1952 *) enable_dlopen_self_static=unknown ;;
1953 esac
1954 fi
1955 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1956 [Whether dlopen is supported])
1957 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1958 [Whether dlopen of programs is supported])
1959 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1960 [Whether dlopen of statically linked programs is supported])
1961 ])# LT_SYS_DLOPEN_SELF
1962
1963 # Old name:
1964 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1965 dnl aclocal-1.4 backwards compatibility:
1966 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1967
1968
1969 # _LT_COMPILER_C_O([TAGNAME])
1970 # ---------------------------
1971 # Check to see if options -c and -o are simultaneously supported by compiler.
1972 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1973 m4_defun([_LT_COMPILER_C_O],
1974 [m4_require([_LT_DECL_SED])dnl
1975 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1976 m4_require([_LT_TAG_COMPILER])dnl
1977 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1978 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1979 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1980 $RM -r conftest 2>/dev/null
1981 mkdir conftest
1982 cd conftest
1983 mkdir out
1984 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1985
1986 lt_compiler_flag="-o out/conftest2.$ac_objext"
1987 # Insert the option either (1) after the last *FLAGS variable, or
1988 # (2) before a word containing "conftest.", or (3) at the end.
1989 # Note that $ac_compile itself does not contain backslashes and begins
1990 # with a dollar sign (not a hyphen), so the echo should work correctly.
1991 lt_compile=`echo "$ac_compile" | $SED \
1992 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1993 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1994 -e 's:$: $lt_compiler_flag:'`
1995 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1996 (eval "$lt_compile" 2>out/conftest.err)
1997 ac_status=$?
1998 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1999 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2000 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2001 then
2002 # The compiler can only warn and ignore the option if not recognized
2003 # So say no if there are warnings
2004 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2005 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2006 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2007 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2008 fi
2009 fi
2010 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2011 $RM conftest*
2012 # SGI C++ compiler will create directory out/ii_files/ for
2013 # template instantiation
2014 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2015 $RM out/* && rmdir out
2016 cd ..
2017 $RM -r conftest
2018 $RM conftest*
2019 ])
2020 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2021 [Does compiler simultaneously support -c and -o options?])
2022 ])# _LT_COMPILER_C_O
2023
2024
2025 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2026 # ----------------------------------
2027 # Check to see if we can do hard links to lock some files if needed
2028 m4_defun([_LT_COMPILER_FILE_LOCKS],
2029 [m4_require([_LT_ENABLE_LOCK])dnl
2030 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2031 _LT_COMPILER_C_O([$1])
2032
2033 hard_links="nottested"
2034 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2035 # do not overwrite the value of need_locks provided by the user
2036 AC_MSG_CHECKING([if we can lock with hard links])
2037 hard_links=yes
2038 $RM conftest*
2039 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2040 touch conftest.a
2041 ln conftest.a conftest.b 2>&5 || hard_links=no
2042 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2043 AC_MSG_RESULT([$hard_links])
2044 if test "$hard_links" = no; then
2045 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2046 need_locks=warn
2047 fi
2048 else
2049 need_locks=no
2050 fi
2051 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2052 ])# _LT_COMPILER_FILE_LOCKS
2053
2054
2055 # _LT_CHECK_OBJDIR
2056 # ----------------
2057 m4_defun([_LT_CHECK_OBJDIR],
2058 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2059 [rm -f .libs 2>/dev/null
2060 mkdir .libs 2>/dev/null
2061 if test -d .libs; then
2062 lt_cv_objdir=.libs
2063 else
2064 # MS-DOS does not allow filenames that begin with a dot.
2065 lt_cv_objdir=_libs
2066 fi
2067 rmdir .libs 2>/dev/null])
2068 objdir=$lt_cv_objdir
2069 _LT_DECL([], [objdir], [0],
2070 [The name of the directory that contains temporary libtool files])dnl
2071 m4_pattern_allow([LT_OBJDIR])dnl
2072 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2073 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2074 ])# _LT_CHECK_OBJDIR
2075
2076
2077 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2078 # --------------------------------------
2079 # Check hardcoding attributes.
2080 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2081 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2082 _LT_TAGVAR(hardcode_action, $1)=
2083 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2084 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2085 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2086
2087 # We can hardcode non-existent directories.
2088 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2089 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2090 # have to relink, otherwise we might link with an installed library
2091 # when we should be linking with a yet-to-be-installed one
2092 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2093 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2094 # Linking always hardcodes the temporary library directory.
2095 _LT_TAGVAR(hardcode_action, $1)=relink
2096 else
2097 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2098 _LT_TAGVAR(hardcode_action, $1)=immediate
2099 fi
2100 else
2101 # We cannot hardcode anything, or else we can only hardcode existing
2102 # directories.
2103 _LT_TAGVAR(hardcode_action, $1)=unsupported
2104 fi
2105 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2106
2107 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2108 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2109 # Fast installation is not supported
2110 enable_fast_install=no
2111 elif test "$shlibpath_overrides_runpath" = yes ||
2112 test "$enable_shared" = no; then
2113 # Fast installation is not necessary
2114 enable_fast_install=needless
2115 fi
2116 _LT_TAGDECL([], [hardcode_action], [0],
2117 [How to hardcode a shared library path into an executable])
2118 ])# _LT_LINKER_HARDCODE_LIBPATH
2119
2120
2121 # _LT_CMD_STRIPLIB
2122 # ----------------
2123 m4_defun([_LT_CMD_STRIPLIB],
2124 [m4_require([_LT_DECL_EGREP])
2125 striplib=
2126 old_striplib=
2127 AC_MSG_CHECKING([whether stripping libraries is possible])
2128 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2129 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2130 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2131 AC_MSG_RESULT([yes])
2132 else
2133 # FIXME - insert some real tests, host_os isn't really good enough
2134 case $host_os in
2135 darwin*)
2136 if test -n "$STRIP" ; then
2137 striplib="$STRIP -x"
2138 old_striplib="$STRIP -S"
2139 AC_MSG_RESULT([yes])
2140 else
2141 AC_MSG_RESULT([no])
2142 fi
2143 ;;
2144 *)
2145 AC_MSG_RESULT([no])
2146 ;;
2147 esac
2148 fi
2149 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2150 _LT_DECL([], [striplib], [1])
2151 ])# _LT_CMD_STRIPLIB
2152
2153
2154 # _LT_SYS_DYNAMIC_LINKER([TAG])
2155 # -----------------------------
2156 # PORTME Fill in your ld.so characteristics
2157 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2158 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2159 m4_require([_LT_DECL_EGREP])dnl
2160 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2161 m4_require([_LT_DECL_OBJDUMP])dnl
2162 m4_require([_LT_DECL_SED])dnl
2163 AC_MSG_CHECKING([dynamic linker characteristics])
2164 m4_if([$1],
2165 [], [
2166 if test "$GCC" = yes; then
2167 case $host_os in
2168 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2169 *) lt_awk_arg="/^libraries:/" ;;
2170 esac
2171 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2172 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2173 # if the path contains ";" then we assume it to be the separator
2174 # otherwise default to the standard path separator (i.e. ":") - it is
2175 # assumed that no part of a normal pathname contains ";" but that should
2176 # okay in the real world where ";" in dirpaths is itself problematic.
2177 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2178 else
2179 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2180 fi
2181 # Ok, now we have the path, separated by spaces, we can step through it
2182 # and add multilib dir if necessary.
2183 lt_tmp_lt_search_path_spec=
2184 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2185 for lt_sys_path in $lt_search_path_spec; do
2186 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2187 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2188 else
2189 test -d "$lt_sys_path" && \
2190 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2191 fi
2192 done
2193 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2194 BEGIN {RS=" "; FS="/|\n";} {
2195 lt_foo="";
2196 lt_count=0;
2197 for (lt_i = NF; lt_i > 0; lt_i--) {
2198 if ($lt_i != "" && $lt_i != ".") {
2199 if ($lt_i == "..") {
2200 lt_count++;
2201 } else {
2202 if (lt_count == 0) {
2203 lt_foo="/" $lt_i lt_foo;
2204 } else {
2205 lt_count--;
2206 }
2207 }
2208 }
2209 }
2210 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2211 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2212 }'`
2213 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2214 else
2215 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2216 fi])
2217 library_names_spec=
2218 libname_spec='lib$name'
2219 soname_spec=
2220 shrext_cmds=".so"
2221 postinstall_cmds=
2222 postuninstall_cmds=
2223 finish_cmds=
2224 finish_eval=
2225 shlibpath_var=
2226 shlibpath_overrides_runpath=unknown
2227 version_type=none
2228 dynamic_linker="$host_os ld.so"
2229 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2230 need_lib_prefix=unknown
2231 hardcode_into_libs=no
2232
2233 # when you set need_version to no, make sure it does not cause -set_version
2234 # flags to be left without arguments
2235 need_version=unknown
2236
2237 case $host_os in
2238 aix3*)
2239 version_type=linux
2240 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2241 shlibpath_var=LIBPATH
2242
2243 # AIX 3 has no versioning support, so we append a major version to the name.
2244 soname_spec='${libname}${release}${shared_ext}$major'
2245 ;;
2246
2247 aix[[4-9]]*)
2248 version_type=linux
2249 need_lib_prefix=no
2250 need_version=no
2251 hardcode_into_libs=yes
2252 if test "$host_cpu" = ia64; then
2253 # AIX 5 supports IA64
2254 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2255 shlibpath_var=LD_LIBRARY_PATH
2256 else
2257 # With GCC up to 2.95.x, collect2 would create an import file
2258 # for dependence libraries. The import file would start with
2259 # the line `#! .'. This would cause the generated library to
2260 # depend on `.', always an invalid library. This was fixed in
2261 # development snapshots of GCC prior to 3.0.
2262 case $host_os in
2263 aix4 | aix4.[[01]] | aix4.[[01]].*)
2264 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2265 echo ' yes '
2266 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2267 :
2268 else
2269 can_build_shared=no
2270 fi
2271 ;;
2272 esac
2273 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2274 # soname into executable. Probably we can add versioning support to
2275 # collect2, so additional links can be useful in future.
2276 if test "$aix_use_runtimelinking" = yes; then
2277 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2278 # instead of lib<name>.a to let people know that these are not
2279 # typical AIX shared libraries.
2280 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2281 else
2282 # We preserve .a as extension for shared libraries through AIX4.2
2283 # and later when we are not doing run time linking.
2284 library_names_spec='${libname}${release}.a $libname.a'
2285 soname_spec='${libname}${release}${shared_ext}$major'
2286 fi
2287 shlibpath_var=LIBPATH
2288 fi
2289 ;;
2290
2291 amigaos*)
2292 case $host_cpu in
2293 powerpc)
2294 # Since July 2007 AmigaOS4 officially supports .so libraries.
2295 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2296 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2297 ;;
2298 m68k)
2299 library_names_spec='$libname.ixlibrary $libname.a'
2300 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2301 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2302 ;;
2303 esac
2304 ;;
2305
2306 beos*)
2307 library_names_spec='${libname}${shared_ext}'
2308 dynamic_linker="$host_os ld.so"
2309 shlibpath_var=LIBRARY_PATH
2310 ;;
2311
2312 bsdi[[45]]*)
2313 version_type=linux
2314 need_version=no
2315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2316 soname_spec='${libname}${release}${shared_ext}$major'
2317 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2318 shlibpath_var=LD_LIBRARY_PATH
2319 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2320 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2321 # the default ld.so.conf also contains /usr/contrib/lib and
2322 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2323 # libtool to hard-code these into programs
2324 ;;
2325
2326 cygwin* | mingw* | pw32* | cegcc*)
2327 version_type=windows
2328 shrext_cmds=".dll"
2329 need_version=no
2330 need_lib_prefix=no
2331
2332 case $GCC,$host_os in
2333 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2334 library_names_spec='$libname.dll.a'
2335 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2336 postinstall_cmds='base_file=`basename \${file}`~
2337 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2338 dldir=$destdir/`dirname \$dlpath`~
2339 test -d \$dldir || mkdir -p \$dldir~
2340 $install_prog $dir/$dlname \$dldir/$dlname~
2341 chmod a+x \$dldir/$dlname~
2342 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2343 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2344 fi'
2345 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2346 dlpath=$dir/\$dldll~
2347 $RM \$dlpath'
2348 shlibpath_overrides_runpath=yes
2349
2350 case $host_os in
2351 cygwin*)
2352 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2353 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2354 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2355 ;;
2356 mingw* | cegcc*)
2357 # MinGW DLLs use traditional 'lib' prefix
2358 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2359 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2360 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2361 # It is most probably a Windows format PATH printed by
2362 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2363 # path with ; separators, and with drive letters. We can handle the
2364 # drive letters (cygwin fileutils understands them), so leave them,
2365 # especially as we might pass files found there to a mingw objdump,
2366 # which wouldn't understand a cygwinified path. Ahh.
2367 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2368 else
2369 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2370 fi
2371 ;;
2372 pw32*)
2373 # pw32 DLLs use 'pw' prefix rather than 'lib'
2374 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2375 ;;
2376 esac
2377 ;;
2378
2379 *)
2380 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2381 ;;
2382 esac
2383 dynamic_linker='Win32 ld.exe'
2384 # FIXME: first we should search . and the directory the executable is in
2385 shlibpath_var=PATH
2386 ;;
2387
2388 darwin* | rhapsody*)
2389 dynamic_linker="$host_os dyld"
2390 version_type=darwin
2391 need_lib_prefix=no
2392 need_version=no
2393 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2394 soname_spec='${libname}${release}${major}$shared_ext'
2395 shlibpath_overrides_runpath=yes
2396 shlibpath_var=DYLD_LIBRARY_PATH
2397 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2398 m4_if([$1], [],[
2399 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2400 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2401 ;;
2402
2403 dgux*)
2404 version_type=linux
2405 need_lib_prefix=no
2406 need_version=no
2407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2408 soname_spec='${libname}${release}${shared_ext}$major'
2409 shlibpath_var=LD_LIBRARY_PATH
2410 ;;
2411
2412 freebsd1*)
2413 dynamic_linker=no
2414 ;;
2415
2416 freebsd* | dragonfly*)
2417 # DragonFly does not have aout. When/if they implement a new
2418 # versioning mechanism, adjust this.
2419 if test -x /usr/bin/objformat; then
2420 objformat=`/usr/bin/objformat`
2421 else
2422 case $host_os in
2423 freebsd[[123]]*) objformat=aout ;;
2424 *) objformat=elf ;;
2425 esac
2426 fi
2427 version_type=freebsd-$objformat
2428 case $version_type in
2429 freebsd-elf*)
2430 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2431 need_version=no
2432 need_lib_prefix=no
2433 ;;
2434 freebsd-*)
2435 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2436 need_version=yes
2437 ;;
2438 esac
2439 shlibpath_var=LD_LIBRARY_PATH
2440 case $host_os in
2441 freebsd2*)
2442 shlibpath_overrides_runpath=yes
2443 ;;
2444 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2445 shlibpath_overrides_runpath=yes
2446 hardcode_into_libs=yes
2447 ;;
2448 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2449 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2450 shlibpath_overrides_runpath=no
2451 hardcode_into_libs=yes
2452 ;;
2453 *) # from 4.6 on, and DragonFly
2454 shlibpath_overrides_runpath=yes
2455 hardcode_into_libs=yes
2456 ;;
2457 esac
2458 ;;
2459
2460 gnu*)
2461 version_type=linux
2462 need_lib_prefix=no
2463 need_version=no
2464 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2465 soname_spec='${libname}${release}${shared_ext}$major'
2466 shlibpath_var=LD_LIBRARY_PATH
2467 hardcode_into_libs=yes
2468 ;;
2469
2470 hpux9* | hpux10* | hpux11*)
2471 # Give a soname corresponding to the major version so that dld.sl refuses to
2472 # link against other versions.
2473 version_type=sunos
2474 need_lib_prefix=no
2475 need_version=no
2476 case $host_cpu in
2477 ia64*)
2478 shrext_cmds='.so'
2479 hardcode_into_libs=yes
2480 dynamic_linker="$host_os dld.so"
2481 shlibpath_var=LD_LIBRARY_PATH
2482 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2484 soname_spec='${libname}${release}${shared_ext}$major'
2485 if test "X$HPUX_IA64_MODE" = X32; then
2486 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2487 else
2488 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2489 fi
2490 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2491 ;;
2492 hppa*64*)
2493 shrext_cmds='.sl'
2494 hardcode_into_libs=yes
2495 dynamic_linker="$host_os dld.sl"
2496 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2497 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2499 soname_spec='${libname}${release}${shared_ext}$major'
2500 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2501 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2502 ;;
2503 *)
2504 shrext_cmds='.sl'
2505 dynamic_linker="$host_os dld.sl"
2506 shlibpath_var=SHLIB_PATH
2507 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2509 soname_spec='${libname}${release}${shared_ext}$major'
2510 ;;
2511 esac
2512 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2513 postinstall_cmds='chmod 555 $lib'
2514 ;;
2515
2516 interix[[3-9]]*)
2517 version_type=linux
2518 need_lib_prefix=no
2519 need_version=no
2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2521 soname_spec='${libname}${release}${shared_ext}$major'
2522 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2523 shlibpath_var=LD_LIBRARY_PATH
2524 shlibpath_overrides_runpath=no
2525 hardcode_into_libs=yes
2526 ;;
2527
2528 irix5* | irix6* | nonstopux*)
2529 case $host_os in
2530 nonstopux*) version_type=nonstopux ;;
2531 *)
2532 if test "$lt_cv_prog_gnu_ld" = yes; then
2533 version_type=linux
2534 else
2535 version_type=irix
2536 fi ;;
2537 esac
2538 need_lib_prefix=no
2539 need_version=no
2540 soname_spec='${libname}${release}${shared_ext}$major'
2541 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2542 case $host_os in
2543 irix5* | nonstopux*)
2544 libsuff= shlibsuff=
2545 ;;
2546 *)
2547 case $LD in # libtool.m4 will add one of these switches to LD
2548 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2549 libsuff= shlibsuff= libmagic=32-bit;;
2550 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2551 libsuff=32 shlibsuff=N32 libmagic=N32;;
2552 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2553 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2554 *) libsuff= shlibsuff= libmagic=never-match;;
2555 esac
2556 ;;
2557 esac
2558 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2559 shlibpath_overrides_runpath=no
2560 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2561 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2562 hardcode_into_libs=yes
2563 ;;
2564
2565 # No shared lib support for Linux oldld, aout, or coff.
2566 linux*oldld* | linux*aout* | linux*coff*)
2567 dynamic_linker=no
2568 ;;
2569
2570 # This must be Linux ELF.
2571 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2572 version_type=linux
2573 need_lib_prefix=no
2574 need_version=no
2575 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2576 soname_spec='${libname}${release}${shared_ext}$major'
2577 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2578 shlibpath_var=LD_LIBRARY_PATH
2579 shlibpath_overrides_runpath=no
2580 # Some binutils ld are patched to set DT_RUNPATH
2581 save_LDFLAGS=$LDFLAGS
2582 save_libdir=$libdir
2583 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2584 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2585 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2586 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2587 [shlibpath_overrides_runpath=yes])])
2588 LDFLAGS=$save_LDFLAGS
2589 libdir=$save_libdir
2590
2591 # This implies no fast_install, which is unacceptable.
2592 # Some rework will be needed to allow for fast_install
2593 # before this can be enabled.
2594 hardcode_into_libs=yes
2595
2596 # Append ld.so.conf contents to the search path
2597 if test -f /etc/ld.so.conf; then
2598 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2599 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2600 fi
2601
2602 # We used to test for /lib/ld.so.1 and disable shared libraries on
2603 # powerpc, because MkLinux only supported shared libraries with the
2604 # GNU dynamic linker. Since this was broken with cross compilers,
2605 # most powerpc-linux boxes support dynamic linking these days and
2606 # people can always --disable-shared, the test was removed, and we
2607 # assume the GNU/Linux dynamic linker is in use.
2608 dynamic_linker='GNU/Linux ld.so'
2609 ;;
2610
2611 netbsdelf*-gnu)
2612 version_type=linux
2613 need_lib_prefix=no
2614 need_version=no
2615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2616 soname_spec='${libname}${release}${shared_ext}$major'
2617 shlibpath_var=LD_LIBRARY_PATH
2618 shlibpath_overrides_runpath=no
2619 hardcode_into_libs=yes
2620 dynamic_linker='NetBSD ld.elf_so'
2621 ;;
2622
2623 netbsd*)
2624 version_type=sunos
2625 need_lib_prefix=no
2626 need_version=no
2627 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2629 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2630 dynamic_linker='NetBSD (a.out) ld.so'
2631 else
2632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2633 soname_spec='${libname}${release}${shared_ext}$major'
2634 dynamic_linker='NetBSD ld.elf_so'
2635 fi
2636 shlibpath_var=LD_LIBRARY_PATH
2637 shlibpath_overrides_runpath=yes
2638 hardcode_into_libs=yes
2639 ;;
2640
2641 newsos6)
2642 version_type=linux
2643 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2644 shlibpath_var=LD_LIBRARY_PATH
2645 shlibpath_overrides_runpath=yes
2646 ;;
2647
2648 *nto* | *qnx*)
2649 version_type=qnx
2650 need_lib_prefix=no
2651 need_version=no
2652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653 soname_spec='${libname}${release}${shared_ext}$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 shlibpath_overrides_runpath=no
2656 hardcode_into_libs=yes
2657 dynamic_linker='ldqnx.so'
2658 ;;
2659
2660 openbsd*)
2661 version_type=sunos
2662 sys_lib_dlsearch_path_spec="/usr/lib"
2663 need_lib_prefix=no
2664 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2665 case $host_os in
2666 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2667 *) need_version=no ;;
2668 esac
2669 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2670 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2671 shlibpath_var=LD_LIBRARY_PATH
2672 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2673 case $host_os in
2674 openbsd2.[[89]] | openbsd2.[[89]].*)
2675 shlibpath_overrides_runpath=no
2676 ;;
2677 *)
2678 shlibpath_overrides_runpath=yes
2679 ;;
2680 esac
2681 else
2682 shlibpath_overrides_runpath=yes
2683 fi
2684 ;;
2685
2686 os2*)
2687 libname_spec='$name'
2688 shrext_cmds=".dll"
2689 need_lib_prefix=no
2690 library_names_spec='$libname${shared_ext} $libname.a'
2691 dynamic_linker='OS/2 ld.exe'
2692 shlibpath_var=LIBPATH
2693 ;;
2694
2695 osf3* | osf4* | osf5*)
2696 version_type=osf
2697 need_lib_prefix=no
2698 need_version=no
2699 soname_spec='${libname}${release}${shared_ext}$major'
2700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2701 shlibpath_var=LD_LIBRARY_PATH
2702 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2703 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2704 ;;
2705
2706 rdos*)
2707 dynamic_linker=no
2708 ;;
2709
2710 solaris*)
2711 version_type=linux
2712 need_lib_prefix=no
2713 need_version=no
2714 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2715 soname_spec='${libname}${release}${shared_ext}$major'
2716 shlibpath_var=LD_LIBRARY_PATH
2717 shlibpath_overrides_runpath=yes
2718 hardcode_into_libs=yes
2719 # ldd complains unless libraries are executable
2720 postinstall_cmds='chmod +x $lib'
2721 ;;
2722
2723 sunos4*)
2724 version_type=sunos
2725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2726 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2727 shlibpath_var=LD_LIBRARY_PATH
2728 shlibpath_overrides_runpath=yes
2729 if test "$with_gnu_ld" = yes; then
2730 need_lib_prefix=no
2731 fi
2732 need_version=yes
2733 ;;
2734
2735 sysv4 | sysv4.3*)
2736 version_type=linux
2737 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2738 soname_spec='${libname}${release}${shared_ext}$major'
2739 shlibpath_var=LD_LIBRARY_PATH
2740 case $host_vendor in
2741 sni)
2742 shlibpath_overrides_runpath=no
2743 need_lib_prefix=no
2744 runpath_var=LD_RUN_PATH
2745 ;;
2746 siemens)
2747 need_lib_prefix=no
2748 ;;
2749 motorola)
2750 need_lib_prefix=no
2751 need_version=no
2752 shlibpath_overrides_runpath=no
2753 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2754 ;;
2755 esac
2756 ;;
2757
2758 sysv4*MP*)
2759 if test -d /usr/nec ;then
2760 version_type=linux
2761 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2762 soname_spec='$libname${shared_ext}.$major'
2763 shlibpath_var=LD_LIBRARY_PATH
2764 fi
2765 ;;
2766
2767 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2768 version_type=freebsd-elf
2769 need_lib_prefix=no
2770 need_version=no
2771 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2772 soname_spec='${libname}${release}${shared_ext}$major'
2773 shlibpath_var=LD_LIBRARY_PATH
2774 shlibpath_overrides_runpath=yes
2775 hardcode_into_libs=yes
2776 if test "$with_gnu_ld" = yes; then
2777 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2778 else
2779 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2780 case $host_os in
2781 sco3.2v5*)
2782 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2783 ;;
2784 esac
2785 fi
2786 sys_lib_dlsearch_path_spec='/usr/lib'
2787 ;;
2788
2789 tpf*)
2790 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2791 version_type=linux
2792 need_lib_prefix=no
2793 need_version=no
2794 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2795 shlibpath_var=LD_LIBRARY_PATH
2796 shlibpath_overrides_runpath=no
2797 hardcode_into_libs=yes
2798 ;;
2799
2800 uts4*)
2801 version_type=linux
2802 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2803 soname_spec='${libname}${release}${shared_ext}$major'
2804 shlibpath_var=LD_LIBRARY_PATH
2805 ;;
2806
2807 *)
2808 dynamic_linker=no
2809 ;;
2810 esac
2811 AC_MSG_RESULT([$dynamic_linker])
2812 test "$dynamic_linker" = no && can_build_shared=no
2813
2814 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2815 if test "$GCC" = yes; then
2816 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2817 fi
2818
2819 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2820 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2821 fi
2822 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2823 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2824 fi
2825
2826 _LT_DECL([], [variables_saved_for_relink], [1],
2827 [Variables whose values should be saved in libtool wrapper scripts and
2828 restored at link time])
2829 _LT_DECL([], [need_lib_prefix], [0],
2830 [Do we need the "lib" prefix for modules?])
2831 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2832 _LT_DECL([], [version_type], [0], [Library versioning type])
2833 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2834 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2835 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2836 [Is shlibpath searched before the hard-coded library search path?])
2837 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2838 _LT_DECL([], [library_names_spec], [1],
2839 [[List of archive names. First name is the real one, the rest are links.
2840 The last name is the one that the linker finds with -lNAME]])
2841 _LT_DECL([], [soname_spec], [1],
2842 [[The coded name of the library, if different from the real name]])
2843 _LT_DECL([], [postinstall_cmds], [2],
2844 [Command to use after installation of a shared archive])
2845 _LT_DECL([], [postuninstall_cmds], [2],
2846 [Command to use after uninstallation of a shared archive])
2847 _LT_DECL([], [finish_cmds], [2],
2848 [Commands used to finish a libtool library installation in a directory])
2849 _LT_DECL([], [finish_eval], [1],
2850 [[As "finish_cmds", except a single script fragment to be evaled but
2851 not shown]])
2852 _LT_DECL([], [hardcode_into_libs], [0],
2853 [Whether we should hardcode library paths into libraries])
2854 _LT_DECL([], [sys_lib_search_path_spec], [2],
2855 [Compile-time system search path for libraries])
2856 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2857 [Run-time system search path for libraries])
2858 ])# _LT_SYS_DYNAMIC_LINKER
2859
2860
2861 # _LT_PATH_TOOL_PREFIX(TOOL)
2862 # --------------------------
2863 # find a file program which can recognize shared library
2864 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2865 [m4_require([_LT_DECL_EGREP])dnl
2866 AC_MSG_CHECKING([for $1])
2867 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2868 [case $MAGIC_CMD in
2869 [[\\/*] | ?:[\\/]*])
2870 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2871 ;;
2872 *)
2873 lt_save_MAGIC_CMD="$MAGIC_CMD"
2874 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2875 dnl $ac_dummy forces splitting on constant user-supplied paths.
2876 dnl POSIX.2 word splitting is done only on the output of word expansions,
2877 dnl not every word. This closes a longstanding sh security hole.
2878 ac_dummy="m4_if([$2], , $PATH, [$2])"
2879 for ac_dir in $ac_dummy; do
2880 IFS="$lt_save_ifs"
2881 test -z "$ac_dir" && ac_dir=.
2882 if test -f $ac_dir/$1; then
2883 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2884 if test -n "$file_magic_test_file"; then
2885 case $deplibs_check_method in
2886 "file_magic "*)
2887 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2888 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2889 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2890 $EGREP "$file_magic_regex" > /dev/null; then
2891 :
2892 else
2893 cat <<_LT_EOF 1>&2
2894
2895 *** Warning: the command libtool uses to detect shared libraries,
2896 *** $file_magic_cmd, produces output that libtool cannot recognize.
2897 *** The result is that libtool may fail to recognize shared libraries
2898 *** as such. This will affect the creation of libtool libraries that
2899 *** depend on shared libraries, but programs linked with such libtool
2900 *** libraries will work regardless of this problem. Nevertheless, you
2901 *** may want to report the problem to your system manager and/or to
2902 *** bug-libtool@gnu.org
2903
2904 _LT_EOF
2905 fi ;;
2906 esac
2907 fi
2908 break
2909 fi
2910 done
2911 IFS="$lt_save_ifs"
2912 MAGIC_CMD="$lt_save_MAGIC_CMD"
2913 ;;
2914 esac])
2915 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2916 if test -n "$MAGIC_CMD"; then
2917 AC_MSG_RESULT($MAGIC_CMD)
2918 else
2919 AC_MSG_RESULT(no)
2920 fi
2921 _LT_DECL([], [MAGIC_CMD], [0],
2922 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2923 ])# _LT_PATH_TOOL_PREFIX
2924
2925 # Old name:
2926 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2927 dnl aclocal-1.4 backwards compatibility:
2928 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2929
2930
2931 # _LT_PATH_MAGIC
2932 # --------------
2933 # find a file program which can recognize a shared library
2934 m4_defun([_LT_PATH_MAGIC],
2935 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2936 if test -z "$lt_cv_path_MAGIC_CMD"; then
2937 if test -n "$ac_tool_prefix"; then
2938 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2939 else
2940 MAGIC_CMD=:
2941 fi
2942 fi
2943 ])# _LT_PATH_MAGIC
2944
2945
2946 # LT_PATH_LD
2947 # ----------
2948 # find the pathname to the GNU or non-GNU linker
2949 AC_DEFUN([LT_PATH_LD],
2950 [AC_REQUIRE([AC_PROG_CC])dnl
2951 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2952 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2953 m4_require([_LT_DECL_SED])dnl
2954 m4_require([_LT_DECL_EGREP])dnl
2955
2956 AC_ARG_WITH([gnu-ld],
2957 [AS_HELP_STRING([--with-gnu-ld],
2958 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2959 [test "$withval" = no || with_gnu_ld=yes],
2960 [with_gnu_ld=no])dnl
2961
2962 ac_prog=ld
2963 if test "$GCC" = yes; then
2964 # Check if gcc -print-prog-name=ld gives a path.
2965 AC_MSG_CHECKING([for ld used by $CC])
2966 case $host in
2967 *-*-mingw*)
2968 # gcc leaves a trailing carriage return which upsets mingw
2969 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2970 *)
2971 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2972 esac
2973 case $ac_prog in
2974 # Accept absolute paths.
2975 [[\\/]]* | ?:[[\\/]]*)
2976 re_direlt='/[[^/]][[^/]]*/\.\./'
2977 # Canonicalize the pathname of ld
2978 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2979 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2980 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2981 done
2982 test -z "$LD" && LD="$ac_prog"
2983 ;;
2984 "")
2985 # If it fails, then pretend we aren't using GCC.
2986 ac_prog=ld
2987 ;;
2988 *)
2989 # If it is relative, then search for the first ld in PATH.
2990 with_gnu_ld=unknown
2991 ;;
2992 esac
2993 elif test "$with_gnu_ld" = yes; then
2994 AC_MSG_CHECKING([for GNU ld])
2995 else
2996 AC_MSG_CHECKING([for non-GNU ld])
2997 fi
2998 AC_CACHE_VAL(lt_cv_path_LD,
2999 [if test -z "$LD"; then
3000 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3001 for ac_dir in $PATH; do
3002 IFS="$lt_save_ifs"
3003 test -z "$ac_dir" && ac_dir=.
3004 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3005 lt_cv_path_LD="$ac_dir/$ac_prog"
3006 # Check to see if the program is GNU ld. I'd rather use --version,
3007 # but apparently some variants of GNU ld only accept -v.
3008 # Break only if it was the GNU/non-GNU ld that we prefer.
3009 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3010 *GNU* | *'with BFD'*)
3011 test "$with_gnu_ld" != no && break
3012 ;;
3013 *)
3014 test "$with_gnu_ld" != yes && break
3015 ;;
3016 esac
3017 fi
3018 done
3019 IFS="$lt_save_ifs"
3020 else
3021 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3022 fi])
3023 LD="$lt_cv_path_LD"
3024 if test -n "$LD"; then
3025 AC_MSG_RESULT($LD)
3026 else
3027 AC_MSG_RESULT(no)
3028 fi
3029 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3030 _LT_PATH_LD_GNU
3031 AC_SUBST([LD])
3032
3033 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3034 ])# LT_PATH_LD
3035
3036 # Old names:
3037 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3038 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3039 dnl aclocal-1.4 backwards compatibility:
3040 dnl AC_DEFUN([AM_PROG_LD], [])
3041 dnl AC_DEFUN([AC_PROG_LD], [])
3042
3043
3044 # _LT_PATH_LD_GNU
3045 #- --------------
3046 m4_defun([_LT_PATH_LD_GNU],
3047 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3048 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3049 case `$LD -v 2>&1 </dev/null` in
3050 *GNU* | *'with BFD'*)
3051 lt_cv_prog_gnu_ld=yes
3052 ;;
3053 *)
3054 lt_cv_prog_gnu_ld=no
3055 ;;
3056 esac])
3057 with_gnu_ld=$lt_cv_prog_gnu_ld
3058 ])# _LT_PATH_LD_GNU
3059
3060
3061 # _LT_CMD_RELOAD
3062 # --------------
3063 # find reload flag for linker
3064 # -- PORTME Some linkers may need a different reload flag.
3065 m4_defun([_LT_CMD_RELOAD],
3066 [AC_CACHE_CHECK([for $LD option to reload object files],
3067 lt_cv_ld_reload_flag,
3068 [lt_cv_ld_reload_flag='-r'])
3069 reload_flag=$lt_cv_ld_reload_flag
3070 case $reload_flag in
3071 "" | " "*) ;;
3072 *) reload_flag=" $reload_flag" ;;
3073 esac
3074 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3075 case $host_os in
3076 darwin*)
3077 if test "$GCC" = yes; then
3078 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3079 else
3080 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3081 fi
3082 ;;
3083 esac
3084 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3085 _LT_DECL([], [reload_cmds], [2])dnl
3086 ])# _LT_CMD_RELOAD
3087
3088
3089 # _LT_CHECK_MAGIC_METHOD
3090 # ----------------------
3091 # how to check for library dependencies
3092 # -- PORTME fill in with the dynamic library characteristics
3093 m4_defun([_LT_CHECK_MAGIC_METHOD],
3094 [m4_require([_LT_DECL_EGREP])
3095 m4_require([_LT_DECL_OBJDUMP])
3096 AC_CACHE_CHECK([how to recognize dependent libraries],
3097 lt_cv_deplibs_check_method,
3098 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3099 lt_cv_file_magic_test_file=
3100 lt_cv_deplibs_check_method='unknown'
3101 # Need to set the preceding variable on all platforms that support
3102 # interlibrary dependencies.
3103 # 'none' -- dependencies not supported.
3104 # `unknown' -- same as none, but documents that we really don't know.
3105 # 'pass_all' -- all dependencies passed with no checks.
3106 # 'test_compile' -- check by making test program.
3107 # 'file_magic [[regex]]' -- check by looking for files in library path
3108 # which responds to the $file_magic_cmd with a given extended regex.
3109 # If you have `file' or equivalent on your system and you're not sure
3110 # whether `pass_all' will *always* work, you probably want this one.
3111
3112 case $host_os in
3113 aix[[4-9]]*)
3114 lt_cv_deplibs_check_method=pass_all
3115 ;;
3116
3117 beos*)
3118 lt_cv_deplibs_check_method=pass_all
3119 ;;
3120
3121 bsdi[[45]]*)
3122 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3123 lt_cv_file_magic_cmd='/usr/bin/file -L'
3124 lt_cv_file_magic_test_file=/shlib/libc.so
3125 ;;
3126
3127 cygwin*)
3128 # func_win32_libid is a shell function defined in ltmain.sh
3129 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3130 lt_cv_file_magic_cmd='func_win32_libid'
3131 ;;
3132
3133 mingw* | pw32*)
3134 # Base MSYS/MinGW do not provide the 'file' command needed by
3135 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3136 # unless we find 'file', for example because we are cross-compiling.
3137 if ( file / ) >/dev/null 2>&1; then
3138 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3139 lt_cv_file_magic_cmd='func_win32_libid'
3140 else
3141 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3142 lt_cv_file_magic_cmd='$OBJDUMP -f'
3143 fi
3144 ;;
3145
3146 cegcc)
3147 # use the weaker test based on 'objdump'. See mingw*.
3148 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3149 lt_cv_file_magic_cmd='$OBJDUMP -f'
3150 ;;
3151
3152 darwin* | rhapsody*)
3153 lt_cv_deplibs_check_method=pass_all
3154 ;;
3155
3156 freebsd* | dragonfly*)
3157 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3158 case $host_cpu in
3159 i*86 )
3160 # Not sure whether the presence of OpenBSD here was a mistake.
3161 # Let's accept both of them until this is cleared up.
3162 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3163 lt_cv_file_magic_cmd=/usr/bin/file
3164 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3165 ;;
3166 esac
3167 else
3168 lt_cv_deplibs_check_method=pass_all
3169 fi
3170 ;;
3171
3172 gnu*)
3173 lt_cv_deplibs_check_method=pass_all
3174 ;;
3175
3176 hpux10.20* | hpux11*)
3177 lt_cv_file_magic_cmd=/usr/bin/file
3178 case $host_cpu in
3179 ia64*)
3180 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3181 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3182 ;;
3183 hppa*64*)
3184 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3185 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3186 ;;
3187 *)
3188 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3189 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3190 ;;
3191 esac
3192 ;;
3193
3194 interix[[3-9]]*)
3195 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3196 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3197 ;;
3198
3199 irix5* | irix6* | nonstopux*)
3200 case $LD in
3201 *-32|*"-32 ") libmagic=32-bit;;
3202 *-n32|*"-n32 ") libmagic=N32;;
3203 *-64|*"-64 ") libmagic=64-bit;;
3204 *) libmagic=never-match;;
3205 esac
3206 lt_cv_deplibs_check_method=pass_all
3207 ;;
3208
3209 # This must be Linux ELF.
3210 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3211 lt_cv_deplibs_check_method=pass_all
3212 ;;
3213
3214 netbsd* | netbsdelf*-gnu)
3215 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3216 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3217 else
3218 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3219 fi
3220 ;;
3221
3222 newos6*)
3223 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3224 lt_cv_file_magic_cmd=/usr/bin/file
3225 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3226 ;;
3227
3228 *nto* | *qnx*)
3229 lt_cv_deplibs_check_method=pass_all
3230 ;;
3231
3232 openbsd*)
3233 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3234 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3235 else
3236 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3237 fi
3238 ;;
3239
3240 osf3* | osf4* | osf5*)
3241 lt_cv_deplibs_check_method=pass_all
3242 ;;
3243
3244 rdos*)
3245 lt_cv_deplibs_check_method=pass_all
3246 ;;
3247
3248 solaris*)
3249 lt_cv_deplibs_check_method=pass_all
3250 ;;
3251
3252 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3253 lt_cv_deplibs_check_method=pass_all
3254 ;;
3255
3256 sysv4 | sysv4.3*)
3257 case $host_vendor in
3258 motorola)
3259 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3260 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3261 ;;
3262 ncr)
3263 lt_cv_deplibs_check_method=pass_all
3264 ;;
3265 sequent)
3266 lt_cv_file_magic_cmd='/bin/file'
3267 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3268 ;;
3269 sni)
3270 lt_cv_file_magic_cmd='/bin/file'
3271 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3272 lt_cv_file_magic_test_file=/lib/libc.so
3273 ;;
3274 siemens)
3275 lt_cv_deplibs_check_method=pass_all
3276 ;;
3277 pc)
3278 lt_cv_deplibs_check_method=pass_all
3279 ;;
3280 esac
3281 ;;
3282
3283 tpf*)
3284 lt_cv_deplibs_check_method=pass_all
3285 ;;
3286 esac
3287 ])
3288 file_magic_cmd=$lt_cv_file_magic_cmd
3289 deplibs_check_method=$lt_cv_deplibs_check_method
3290 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3291
3292 _LT_DECL([], [deplibs_check_method], [1],
3293 [Method to check whether dependent libraries are shared objects])
3294 _LT_DECL([], [file_magic_cmd], [1],
3295 [Command to use when deplibs_check_method == "file_magic"])
3296 ])# _LT_CHECK_MAGIC_METHOD
3297
3298
3299 # LT_PATH_NM
3300 # ----------
3301 # find the pathname to a BSD- or MS-compatible name lister
3302 AC_DEFUN([LT_PATH_NM],
3303 [AC_REQUIRE([AC_PROG_CC])dnl
3304 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3305 [if test -n "$NM"; then
3306 # Let the user override the test.
3307 lt_cv_path_NM="$NM"
3308 else
3309 lt_nm_to_check="${ac_tool_prefix}nm"
3310 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3311 lt_nm_to_check="$lt_nm_to_check nm"
3312 fi
3313 for lt_tmp_nm in $lt_nm_to_check; do
3314 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3315 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3316 IFS="$lt_save_ifs"
3317 test -z "$ac_dir" && ac_dir=.
3318 tmp_nm="$ac_dir/$lt_tmp_nm"
3319 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3320 # Check to see if the nm accepts a BSD-compat flag.
3321 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3322 # nm: unknown option "B" ignored
3323 # Tru64's nm complains that /dev/null is an invalid object file
3324 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3325 */dev/null* | *'Invalid file or object type'*)
3326 lt_cv_path_NM="$tmp_nm -B"
3327 break
3328 ;;
3329 *)
3330 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3331 */dev/null*)
3332 lt_cv_path_NM="$tmp_nm -p"
3333 break
3334 ;;
3335 *)
3336 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3337 continue # so that we can try to find one that supports BSD flags
3338 ;;
3339 esac
3340 ;;
3341 esac
3342 fi
3343 done
3344 IFS="$lt_save_ifs"
3345 done
3346 : ${lt_cv_path_NM=no}
3347 fi])
3348 if test "$lt_cv_path_NM" != "no"; then
3349 NM="$lt_cv_path_NM"
3350 else
3351 # Didn't find any BSD compatible name lister, look for dumpbin.
3352 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3353 AC_SUBST([DUMPBIN])
3354 if test "$DUMPBIN" != ":"; then
3355 NM="$DUMPBIN"
3356 fi
3357 fi
3358 test -z "$NM" && NM=nm
3359 AC_SUBST([NM])
3360 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3361
3362 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3363 [lt_cv_nm_interface="BSD nm"
3364 echo "int some_variable = 0;" > conftest.$ac_ext
3365 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3366 (eval "$ac_compile" 2>conftest.err)
3367 cat conftest.err >&AS_MESSAGE_LOG_FD
3368 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3369 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3370 cat conftest.err >&AS_MESSAGE_LOG_FD
3371 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3372 cat conftest.out >&AS_MESSAGE_LOG_FD
3373 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3374 lt_cv_nm_interface="MS dumpbin"
3375 fi
3376 rm -f conftest*])
3377 ])# LT_PATH_NM
3378
3379 # Old names:
3380 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3381 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3382 dnl aclocal-1.4 backwards compatibility:
3383 dnl AC_DEFUN([AM_PROG_NM], [])
3384 dnl AC_DEFUN([AC_PROG_NM], [])
3385
3386
3387 # LT_LIB_M
3388 # --------
3389 # check for math library
3390 AC_DEFUN([LT_LIB_M],
3391 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3392 LIBM=
3393 case $host in
3394 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3395 # These system don't have libm, or don't need it
3396 ;;
3397 *-ncr-sysv4.3*)
3398 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3399 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3400 ;;
3401 *)
3402 AC_CHECK_LIB(m, cos, LIBM="-lm")
3403 ;;
3404 esac
3405 AC_SUBST([LIBM])
3406 ])# LT_LIB_M
3407
3408 # Old name:
3409 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3410 dnl aclocal-1.4 backwards compatibility:
3411 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3412
3413
3414 # _LT_COMPILER_NO_RTTI([TAGNAME])
3415 # -------------------------------
3416 m4_defun([_LT_COMPILER_NO_RTTI],
3417 [m4_require([_LT_TAG_COMPILER])dnl
3418
3419 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3420
3421 if test "$GCC" = yes; then
3422 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3423
3424 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3425 lt_cv_prog_compiler_rtti_exceptions,
3426 [-fno-rtti -fno-exceptions], [],
3427 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3428 fi
3429 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3430 [Compiler flag to turn off builtin functions])
3431 ])# _LT_COMPILER_NO_RTTI
3432
3433
3434 # _LT_CMD_GLOBAL_SYMBOLS
3435 # ----------------------
3436 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3437 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3438 AC_REQUIRE([AC_PROG_CC])dnl
3439 AC_REQUIRE([LT_PATH_NM])dnl
3440 AC_REQUIRE([LT_PATH_LD])dnl
3441 m4_require([_LT_DECL_SED])dnl
3442 m4_require([_LT_DECL_EGREP])dnl
3443 m4_require([_LT_TAG_COMPILER])dnl
3444
3445 # Check for command to grab the raw symbol name followed by C symbol from nm.
3446 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3447 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3448 [
3449 # These are sane defaults that work on at least a few old systems.
3450 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3451
3452 # Character class describing NM global symbol codes.
3453 symcode='[[BCDEGRST]]'
3454
3455 # Regexp to match symbols that can be accessed directly from C.
3456 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3457
3458 # Define system-specific variables.
3459 case $host_os in
3460 aix*)
3461 symcode='[[BCDT]]'
3462 ;;
3463 cygwin* | mingw* | pw32* | cegcc*)
3464 symcode='[[ABCDGISTW]]'
3465 ;;
3466 hpux*)
3467 if test "$host_cpu" = ia64; then
3468 symcode='[[ABCDEGRST]]'
3469 fi
3470 ;;
3471 irix* | nonstopux*)
3472 symcode='[[BCDEGRST]]'
3473 ;;
3474 osf*)
3475 symcode='[[BCDEGQRST]]'
3476 ;;
3477 solaris*)
3478 symcode='[[BDRT]]'
3479 ;;
3480 sco3.2v5*)
3481 symcode='[[DT]]'
3482 ;;
3483 sysv4.2uw2*)
3484 symcode='[[DT]]'
3485 ;;
3486 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3487 symcode='[[ABDT]]'
3488 ;;
3489 sysv4)
3490 symcode='[[DFNSTU]]'
3491 ;;
3492 esac
3493
3494 # If we're using GNU nm, then use its standard symbol codes.
3495 case `$NM -V 2>&1` in
3496 *GNU* | *'with BFD'*)
3497 symcode='[[ABCDGIRSTW]]' ;;
3498 esac
3499
3500 # Transform an extracted symbol line into a proper C declaration.
3501 # Some systems (esp. on ia64) link data and code symbols differently,
3502 # so use this general approach.
3503 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3504
3505 # Transform an extracted symbol line into symbol name and symbol address
3506 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3507 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3508
3509 # Handle CRLF in mingw tool chain
3510 opt_cr=
3511 case $build_os in
3512 mingw*)
3513 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3514 ;;
3515 esac
3516
3517 # Try without a prefix underscore, then with it.
3518 for ac_symprfx in "" "_"; do
3519
3520 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3521 symxfrm="\\1 $ac_symprfx\\2 \\2"
3522
3523 # Write the raw and C identifiers.
3524 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3525 # Fake it for dumpbin and say T for any non-static function
3526 # and D for any global variable.
3527 # Also find C++ and __fastcall symbols from MSVC++,
3528 # which start with @ or ?.
3529 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3530 " {last_section=section; section=\$ 3};"\
3531 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3532 " \$ 0!~/External *\|/{next};"\
3533 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3534 " {if(hide[section]) next};"\
3535 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3536 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3537 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3538 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3539 " ' prfx=^$ac_symprfx]"
3540 else
3541 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3542 fi
3543
3544 # Check to see that the pipe works correctly.
3545 pipe_works=no
3546
3547 rm -f conftest*
3548 cat > conftest.$ac_ext <<_LT_EOF
3549 #ifdef __cplusplus
3550 extern "C" {
3551 #endif
3552 char nm_test_var;
3553 void nm_test_func(void);
3554 void nm_test_func(void){}
3555 #ifdef __cplusplus
3556 }
3557 #endif
3558 int main(){nm_test_var='a';nm_test_func();return(0);}
3559 _LT_EOF
3560
3561 if AC_TRY_EVAL(ac_compile); then
3562 # Now try to grab the symbols.
3563 nlist=conftest.nm
3564 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3565 # Try sorting and uniquifying the output.
3566 if sort "$nlist" | uniq > "$nlist"T; then
3567 mv -f "$nlist"T "$nlist"
3568 else
3569 rm -f "$nlist"T
3570 fi
3571
3572 # Make sure that we snagged all the symbols we need.
3573 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3574 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3575 cat <<_LT_EOF > conftest.$ac_ext
3576 #ifdef __cplusplus
3577 extern "C" {
3578 #endif
3579
3580 _LT_EOF
3581 # Now generate the symbol file.
3582 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3583
3584 cat <<_LT_EOF >> conftest.$ac_ext
3585
3586 /* The mapping between symbol names and symbols. */
3587 const struct {
3588 const char *name;
3589 void *address;
3590 }
3591 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3592 {
3593 { "@PROGRAM@", (void *) 0 },
3594 _LT_EOF
3595 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3596 cat <<\_LT_EOF >> conftest.$ac_ext
3597 {0, (void *) 0}
3598 };
3599
3600 /* This works around a problem in FreeBSD linker */
3601 #ifdef FREEBSD_WORKAROUND
3602 static const void *lt_preloaded_setup() {
3603 return lt__PROGRAM__LTX_preloaded_symbols;
3604 }
3605 #endif
3606
3607 #ifdef __cplusplus
3608 }
3609 #endif
3610 _LT_EOF
3611 # Now try linking the two files.
3612 mv conftest.$ac_objext conftstm.$ac_objext
3613 lt_save_LIBS="$LIBS"
3614 lt_save_CFLAGS="$CFLAGS"
3615 LIBS="conftstm.$ac_objext"
3616 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3617 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3618 pipe_works=yes
3619 fi
3620 LIBS="$lt_save_LIBS"
3621 CFLAGS="$lt_save_CFLAGS"
3622 else
3623 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3624 fi
3625 else
3626 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3627 fi
3628 else
3629 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3630 fi
3631 else
3632 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3633 cat conftest.$ac_ext >&5
3634 fi
3635 rm -rf conftest* conftst*
3636
3637 # Do not use the global_symbol_pipe unless it works.
3638 if test "$pipe_works" = yes; then
3639 break
3640 else
3641 lt_cv_sys_global_symbol_pipe=
3642 fi
3643 done
3644 ])
3645 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3646 lt_cv_sys_global_symbol_to_cdecl=
3647 fi
3648 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3649 AC_MSG_RESULT(failed)
3650 else
3651 AC_MSG_RESULT(ok)
3652 fi
3653
3654 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3655 [Take the output of nm and produce a listing of raw symbols and C names])
3656 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3657 [Transform the output of nm in a proper C declaration])
3658 _LT_DECL([global_symbol_to_c_name_address],
3659 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3660 [Transform the output of nm in a C name address pair])
3661 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3662 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3663 [Transform the output of nm in a C name address pair when lib prefix is needed])
3664 ]) # _LT_CMD_GLOBAL_SYMBOLS
3665
3666
3667 # _LT_COMPILER_PIC([TAGNAME])
3668 # ---------------------------
3669 m4_defun([_LT_COMPILER_PIC],
3670 [m4_require([_LT_TAG_COMPILER])dnl
3671 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3672 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3673 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3674
3675 AC_MSG_CHECKING([for $compiler option to produce PIC])
3676 m4_if([$1], [CXX], [
3677 # C++ specific cases for pic, static, wl, etc.
3678 if test "$GXX" = yes; then
3679 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3680 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3681
3682 case $host_os in
3683 aix*)
3684 # All AIX code is PIC.
3685 if test "$host_cpu" = ia64; then
3686 # AIX 5 now supports IA64 processor
3687 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3688 fi
3689 ;;
3690
3691 amigaos*)
3692 case $host_cpu in
3693 powerpc)
3694 # see comment about AmigaOS4 .so support
3695 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3696 ;;
3697 m68k)
3698 # FIXME: we need at least 68020 code to build shared libraries, but
3699 # adding the `-m68020' flag to GCC prevents building anything better,
3700 # like `-m68040'.
3701 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3702 ;;
3703 esac
3704 ;;
3705
3706 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3707 # PIC is the default for these OSes.
3708 ;;
3709 mingw* | cygwin* | os2* | pw32* | cegcc*)
3710 # This hack is so that the source file can tell whether it is being
3711 # built for inclusion in a dll (and should export symbols for example).
3712 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3713 # (--disable-auto-import) libraries
3714 m4_if([$1], [GCJ], [],
3715 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3716 ;;
3717 darwin* | rhapsody*)
3718 # PIC is the default on this platform
3719 # Common symbols not allowed in MH_DYLIB files
3720 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3721 ;;
3722 *djgpp*)
3723 # DJGPP does not support shared libraries at all
3724 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3725 ;;
3726 interix[[3-9]]*)
3727 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3728 # Instead, we relocate shared libraries at runtime.
3729 ;;
3730 sysv4*MP*)
3731 if test -d /usr/nec; then
3732 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3733 fi
3734 ;;
3735 hpux*)
3736 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3737 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3738 # sets the default TLS model and affects inlining.
3739 case $host_cpu in
3740 hppa*64*)
3741 ;;
3742 *)
3743 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3744 ;;
3745 esac
3746 ;;
3747 *qnx* | *nto*)
3748 # QNX uses GNU C++, but need to define -shared option too, otherwise
3749 # it will coredump.
3750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3751 ;;
3752 *)
3753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3754 ;;
3755 esac
3756 else
3757 case $host_os in
3758 aix[[4-9]]*)
3759 # All AIX code is PIC.
3760 if test "$host_cpu" = ia64; then
3761 # AIX 5 now supports IA64 processor
3762 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3763 else
3764 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3765 fi
3766 ;;
3767 chorus*)
3768 case $cc_basename in
3769 cxch68*)
3770 # Green Hills C++ Compiler
3771 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3772 ;;
3773 esac
3774 ;;
3775 dgux*)
3776 case $cc_basename in
3777 ec++*)
3778 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3779 ;;
3780 ghcx*)
3781 # Green Hills C++ Compiler
3782 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3783 ;;
3784 *)
3785 ;;
3786 esac
3787 ;;
3788 freebsd* | dragonfly*)
3789 # FreeBSD uses GNU C++
3790 ;;
3791 hpux9* | hpux10* | hpux11*)
3792 case $cc_basename in
3793 CC*)
3794 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3795 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3796 if test "$host_cpu" != ia64; then
3797 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3798 fi
3799 ;;
3800 aCC*)
3801 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3802 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3803 case $host_cpu in
3804 hppa*64*|ia64*)
3805 # +Z the default
3806 ;;
3807 *)
3808 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3809 ;;
3810 esac
3811 ;;
3812 *)
3813 ;;
3814 esac
3815 ;;
3816 interix*)
3817 # This is c89, which is MS Visual C++ (no shared libs)
3818 # Anyone wants to do a port?
3819 ;;
3820 irix5* | irix6* | nonstopux*)
3821 case $cc_basename in
3822 CC*)
3823 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3825 # CC pic flag -KPIC is the default.
3826 ;;
3827 *)
3828 ;;
3829 esac
3830 ;;
3831 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3832 case $cc_basename in
3833 KCC*)
3834 # KAI C++ Compiler
3835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3837 ;;
3838 ecpc* )
3839 # old Intel C++ for x86_64 which still supported -KPIC.
3840 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3842 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3843 ;;
3844 icpc* )
3845 # Intel C++, used to be incompatible with GCC.
3846 # ICC 10 doesn't accept -KPIC any more.
3847 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3849 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3850 ;;
3851 pgCC* | pgcpp*)
3852 # Portland Group C++ compiler
3853 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3854 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3855 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3856 ;;
3857 cxx*)
3858 # Compaq C++
3859 # Make sure the PIC flag is empty. It appears that all Alpha
3860 # Linux and Compaq Tru64 Unix objects are PIC.
3861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3862 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3863 ;;
3864 xlc* | xlC*)
3865 # IBM XL 8.0 on PPC
3866 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3867 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3868 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3869 ;;
3870 *)
3871 case `$CC -V 2>&1 | sed 5q` in
3872 *Sun\ C*)
3873 # Sun C++ 5.9
3874 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3875 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3876 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3877 ;;
3878 esac
3879 ;;
3880 esac
3881 ;;
3882 lynxos*)
3883 ;;
3884 m88k*)
3885 ;;
3886 mvs*)
3887 case $cc_basename in
3888 cxx*)
3889 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3890 ;;
3891 *)
3892 ;;
3893 esac
3894 ;;
3895 netbsd* | netbsdelf*-gnu)
3896 ;;
3897 *qnx* | *nto*)
3898 # QNX uses GNU C++, but need to define -shared option too, otherwise
3899 # it will coredump.
3900 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3901 ;;
3902 osf3* | osf4* | osf5*)
3903 case $cc_basename in
3904 KCC*)
3905 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3906 ;;
3907 RCC*)
3908 # Rational C++ 2.4.1
3909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3910 ;;
3911 cxx*)
3912 # Digital/Compaq C++
3913 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3914 # Make sure the PIC flag is empty. It appears that all Alpha
3915 # Linux and Compaq Tru64 Unix objects are PIC.
3916 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3917 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3918 ;;
3919 *)
3920 ;;
3921 esac
3922 ;;
3923 psos*)
3924 ;;
3925 solaris*)
3926 case $cc_basename in
3927 CC*)
3928 # Sun C++ 4.2, 5.x and Centerline C++
3929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3930 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3931 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3932 ;;
3933 gcx*)
3934 # Green Hills C++ Compiler
3935 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3936 ;;
3937 *)
3938 ;;
3939 esac
3940 ;;
3941 sunos4*)
3942 case $cc_basename in
3943 CC*)
3944 # Sun C++ 4.x
3945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3946 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3947 ;;
3948 lcc*)
3949 # Lucid
3950 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3951 ;;
3952 *)
3953 ;;
3954 esac
3955 ;;
3956 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3957 case $cc_basename in
3958 CC*)
3959 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3961 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3962 ;;
3963 esac
3964 ;;
3965 tandem*)
3966 case $cc_basename in
3967 NCC*)
3968 # NonStop-UX NCC 3.20
3969 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3970 ;;
3971 *)
3972 ;;
3973 esac
3974 ;;
3975 vxworks*)
3976 ;;
3977 *)
3978 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3979 ;;
3980 esac
3981 fi
3982 ],
3983 [
3984 if test "$GCC" = yes; then
3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3986 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3987
3988 case $host_os in
3989 aix*)
3990 # All AIX code is PIC.
3991 if test "$host_cpu" = ia64; then
3992 # AIX 5 now supports IA64 processor
3993 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3994 fi
3995 ;;
3996
3997 amigaos*)
3998 case $host_cpu in
3999 powerpc)
4000 # see comment about AmigaOS4 .so support
4001 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4002 ;;
4003 m68k)
4004 # FIXME: we need at least 68020 code to build shared libraries, but
4005 # adding the `-m68020' flag to GCC prevents building anything better,
4006 # like `-m68040'.
4007 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4008 ;;
4009 esac
4010 ;;
4011
4012 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4013 # PIC is the default for these OSes.
4014 ;;
4015
4016 mingw* | cygwin* | pw32* | os2* | cegcc*)
4017 # This hack is so that the source file can tell whether it is being
4018 # built for inclusion in a dll (and should export symbols for example).
4019 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4020 # (--disable-auto-import) libraries
4021 m4_if([$1], [GCJ], [],
4022 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4023 ;;
4024
4025 darwin* | rhapsody*)
4026 # PIC is the default on this platform
4027 # Common symbols not allowed in MH_DYLIB files
4028 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4029 ;;
4030
4031 hpux*)
4032 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4033 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4034 # sets the default TLS model and affects inlining.
4035 case $host_cpu in
4036 hppa*64*)
4037 # +Z the default
4038 ;;
4039 *)
4040 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4041 ;;
4042 esac
4043 ;;
4044
4045 interix[[3-9]]*)
4046 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4047 # Instead, we relocate shared libraries at runtime.
4048 ;;
4049
4050 msdosdjgpp*)
4051 # Just because we use GCC doesn't mean we suddenly get shared libraries
4052 # on systems that don't support them.
4053 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4054 enable_shared=no
4055 ;;
4056
4057 *nto* | *qnx*)
4058 # QNX uses GNU C++, but need to define -shared option too, otherwise
4059 # it will coredump.
4060 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4061 ;;
4062
4063 sysv4*MP*)
4064 if test -d /usr/nec; then
4065 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4066 fi
4067 ;;
4068
4069 *)
4070 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4071 ;;
4072 esac
4073 else
4074 # PORTME Check for flag to pass linker flags through the system compiler.
4075 case $host_os in
4076 aix*)
4077 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4078 if test "$host_cpu" = ia64; then
4079 # AIX 5 now supports IA64 processor
4080 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4081 else
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4083 fi
4084 ;;
4085
4086 mingw* | cygwin* | pw32* | os2* | cegcc*)
4087 # This hack is so that the source file can tell whether it is being
4088 # built for inclusion in a dll (and should export symbols for example).
4089 m4_if([$1], [GCJ], [],
4090 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4091 ;;
4092
4093 hpux9* | hpux10* | hpux11*)
4094 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4095 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4096 # not for PA HP-UX.
4097 case $host_cpu in
4098 hppa*64*|ia64*)
4099 # +Z the default
4100 ;;
4101 *)
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4103 ;;
4104 esac
4105 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4106 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4107 ;;
4108
4109 irix5* | irix6* | nonstopux*)
4110 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4111 # PIC (with -KPIC) is the default.
4112 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4113 ;;
4114
4115 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4116 case $cc_basename in
4117 # old Intel for x86_64 which still supported -KPIC.
4118 ecc*)
4119 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4120 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4121 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4122 ;;
4123 # icc used to be incompatible with GCC.
4124 # ICC 10 doesn't accept -KPIC any more.
4125 icc* | ifort*)
4126 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4128 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4129 ;;
4130 # Lahey Fortran 8.1.
4131 lf95*)
4132 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4133 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4134 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4135 ;;
4136 pgcc* | pgf77* | pgf90* | pgf95*)
4137 # Portland Group compilers (*not* the Pentium gcc compiler,
4138 # which looks to be a dead project)
4139 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4140 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4141 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4142 ;;
4143 ccc*)
4144 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4145 # All Alpha code is PIC.
4146 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4147 ;;
4148 xl*)
4149 # IBM XL C 8.0/Fortran 10.1 on PPC
4150 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4151 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4152 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4153 ;;
4154 *)
4155 case `$CC -V 2>&1 | sed 5q` in
4156 *Sun\ C*)
4157 # Sun C 5.9
4158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4159 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4160 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4161 ;;
4162 *Sun\ F*)
4163 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4164 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4165 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4166 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4167 ;;
4168 esac
4169 ;;
4170 esac
4171 ;;
4172
4173 newsos6)
4174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4176 ;;
4177
4178 *nto* | *qnx*)
4179 # QNX uses GNU C++, but need to define -shared option too, otherwise
4180 # it will coredump.
4181 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4182 ;;
4183
4184 osf3* | osf4* | osf5*)
4185 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4186 # All OSF/1 code is PIC.
4187 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4188 ;;
4189
4190 rdos*)
4191 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4192 ;;
4193
4194 solaris*)
4195 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4196 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4197 case $cc_basename in
4198 f77* | f90* | f95*)
4199 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4200 *)
4201 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4202 esac
4203 ;;
4204
4205 sunos4*)
4206 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4208 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4209 ;;
4210
4211 sysv4 | sysv4.2uw2* | sysv4.3*)
4212 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4214 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4215 ;;
4216
4217 sysv4*MP*)
4218 if test -d /usr/nec ;then
4219 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4220 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4221 fi
4222 ;;
4223
4224 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4225 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4226 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4227 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4228 ;;
4229
4230 unicos*)
4231 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4232 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4233 ;;
4234
4235 uts4*)
4236 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4237 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4238 ;;
4239
4240 *)
4241 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4242 ;;
4243 esac
4244 fi
4245 ])
4246 case $host_os in
4247 # For platforms which do not support PIC, -DPIC is meaningless:
4248 *djgpp*)
4249 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4250 ;;
4251 *)
4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4253 ;;
4254 esac
4255 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4256 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4257 [How to pass a linker flag through the compiler])
4258
4259 #
4260 # Check to make sure the PIC flag actually works.
4261 #
4262 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4263 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4264 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4265 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4266 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4267 "" | " "*) ;;
4268 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4269 esac],
4270 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4271 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4272 fi
4273 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4274 [Additional compiler flags for building library objects])
4275
4276 #
4277 # Check to make sure the static flag actually works.
4278 #
4279 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4280 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4281 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4282 $lt_tmp_static_flag,
4283 [],
4284 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4285 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4286 [Compiler flag to prevent dynamic linking])
4287 ])# _LT_COMPILER_PIC
4288
4289
4290 # _LT_LINKER_SHLIBS([TAGNAME])
4291 # ----------------------------
4292 # See if the linker supports building shared libraries.
4293 m4_defun([_LT_LINKER_SHLIBS],
4294 [AC_REQUIRE([LT_PATH_LD])dnl
4295 AC_REQUIRE([LT_PATH_NM])dnl
4296 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4297 m4_require([_LT_DECL_EGREP])dnl
4298 m4_require([_LT_DECL_SED])dnl
4299 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4300 m4_require([_LT_TAG_COMPILER])dnl
4301 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4302 m4_if([$1], [CXX], [
4303 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4304 case $host_os in
4305 aix[[4-9]]*)
4306 # If we're using GNU nm, then we don't want the "-C" option.
4307 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4308 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4309 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4310 else
4311 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4312 fi
4313 ;;
4314 pw32*)
4315 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4316 ;;
4317 cygwin* | mingw* | cegcc*)
4318 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4319 ;;
4320 linux* | k*bsd*-gnu)
4321 _LT_TAGVAR(link_all_deplibs, $1)=no
4322 ;;
4323 *)
4324 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4325 ;;
4326 esac
4327 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4328 ], [
4329 runpath_var=
4330 _LT_TAGVAR(allow_undefined_flag, $1)=
4331 _LT_TAGVAR(always_export_symbols, $1)=no
4332 _LT_TAGVAR(archive_cmds, $1)=
4333 _LT_TAGVAR(archive_expsym_cmds, $1)=
4334 _LT_TAGVAR(compiler_needs_object, $1)=no
4335 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4336 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4337 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4338 _LT_TAGVAR(hardcode_automatic, $1)=no
4339 _LT_TAGVAR(hardcode_direct, $1)=no
4340 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4342 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4343 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4344 _LT_TAGVAR(hardcode_minus_L, $1)=no
4345 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4346 _LT_TAGVAR(inherit_rpath, $1)=no
4347 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4348 _LT_TAGVAR(module_cmds, $1)=
4349 _LT_TAGVAR(module_expsym_cmds, $1)=
4350 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4351 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4352 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4353 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4354 # include_expsyms should be a list of space-separated symbols to be *always*
4355 # included in the symbol list
4356 _LT_TAGVAR(include_expsyms, $1)=
4357 # exclude_expsyms can be an extended regexp of symbols to exclude
4358 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4359 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4360 # as well as any symbol that contains `d'.
4361 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4362 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4363 # platforms (ab)use it in PIC code, but their linkers get confused if
4364 # the symbol is explicitly referenced. Since portable code cannot
4365 # rely on this symbol name, it's probably fine to never include it in
4366 # preloaded symbol tables.
4367 # Exclude shared library initialization/finalization symbols.
4368 dnl Note also adjust exclude_expsyms for C++ above.
4369 extract_expsyms_cmds=
4370
4371 case $host_os in
4372 cygwin* | mingw* | pw32* | cegcc*)
4373 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4374 # When not using gcc, we currently assume that we are using
4375 # Microsoft Visual C++.
4376 if test "$GCC" != yes; then
4377 with_gnu_ld=no
4378 fi
4379 ;;
4380 interix*)
4381 # we just hope/assume this is gcc and not c89 (= MSVC++)
4382 with_gnu_ld=yes
4383 ;;
4384 openbsd*)
4385 with_gnu_ld=no
4386 ;;
4387 linux* | k*bsd*-gnu)
4388 _LT_TAGVAR(link_all_deplibs, $1)=no
4389 ;;
4390 esac
4391
4392 _LT_TAGVAR(ld_shlibs, $1)=yes
4393 if test "$with_gnu_ld" = yes; then
4394 # If archive_cmds runs LD, not CC, wlarc should be empty
4395 wlarc='${wl}'
4396
4397 # Set some defaults for GNU ld with shared library support. These
4398 # are reset later if shared libraries are not supported. Putting them
4399 # here allows them to be overridden if necessary.
4400 runpath_var=LD_RUN_PATH
4401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4402 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4403 # ancient GNU ld didn't support --whole-archive et. al.
4404 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4405 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4406 else
4407 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4408 fi
4409 supports_anon_versioning=no
4410 case `$LD -v 2>&1` in
4411 *GNU\ gold*) supports_anon_versioning=yes ;;
4412 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4413 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4414 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4415 *\ 2.11.*) ;; # other 2.11 versions
4416 *) supports_anon_versioning=yes ;;
4417 esac
4418
4419 # See if GNU ld supports shared libraries.
4420 case $host_os in
4421 aix[[3-9]]*)
4422 # On AIX/PPC, the GNU linker is very broken
4423 if test "$host_cpu" != ia64; then
4424 _LT_TAGVAR(ld_shlibs, $1)=no
4425 cat <<_LT_EOF 1>&2
4426
4427 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4428 *** to be unable to reliably create shared libraries on AIX.
4429 *** Therefore, libtool is disabling shared libraries support. If you
4430 *** really care for shared libraries, you may want to modify your PATH
4431 *** so that a non-GNU linker is found, and then restart.
4432
4433 _LT_EOF
4434 fi
4435 ;;
4436
4437 amigaos*)
4438 case $host_cpu in
4439 powerpc)
4440 # see comment about AmigaOS4 .so support
4441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4442 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4443 ;;
4444 m68k)
4445 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4447 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4448 ;;
4449 esac
4450 ;;
4451
4452 beos*)
4453 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4454 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4455 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4456 # support --undefined. This deserves some investigation. FIXME
4457 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4458 else
4459 _LT_TAGVAR(ld_shlibs, $1)=no
4460 fi
4461 ;;
4462
4463 cygwin* | mingw* | pw32* | cegcc*)
4464 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4465 # as there is no search path for DLLs.
4466 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4467 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4468 _LT_TAGVAR(always_export_symbols, $1)=no
4469 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4470 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4471
4472 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4473 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4474 # If the export-symbols file already is a .def file (1st line
4475 # is EXPORTS), use it as is; otherwise, prepend...
4476 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4477 cp $export_symbols $output_objdir/$soname.def;
4478 else
4479 echo EXPORTS > $output_objdir/$soname.def;
4480 cat $export_symbols >> $output_objdir/$soname.def;
4481 fi~
4482 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4483 else
4484 _LT_TAGVAR(ld_shlibs, $1)=no
4485 fi
4486 ;;
4487
4488 interix[[3-9]]*)
4489 _LT_TAGVAR(hardcode_direct, $1)=no
4490 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4492 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4493 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4494 # Instead, shared libraries are loaded at an image base (0x10000000 by
4495 # default) and relocated if they conflict, which is a slow very memory
4496 # consuming and fragmenting process. To avoid this, we pick a random,
4497 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4498 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4499 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4500 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4501 ;;
4502
4503 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4504 tmp_diet=no
4505 if test "$host_os" = linux-dietlibc; then
4506 case $cc_basename in
4507 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4508 esac
4509 fi
4510 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4511 && test "$tmp_diet" = no
4512 then
4513 tmp_addflag=
4514 tmp_sharedflag='-shared'
4515 case $cc_basename,$host_cpu in
4516 pgcc*) # Portland Group C compiler
4517 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4518 tmp_addflag=' $pic_flag'
4519 ;;
4520 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4521 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4522 tmp_addflag=' $pic_flag -Mnomain' ;;
4523 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4524 tmp_addflag=' -i_dynamic' ;;
4525 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4526 tmp_addflag=' -i_dynamic -nofor_main' ;;
4527 ifc* | ifort*) # Intel Fortran compiler
4528 tmp_addflag=' -nofor_main' ;;
4529 lf95*) # Lahey Fortran 8.1
4530 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4531 tmp_sharedflag='--shared' ;;
4532 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4533 tmp_sharedflag='-qmkshrobj'
4534 tmp_addflag= ;;
4535 esac
4536 case `$CC -V 2>&1 | sed 5q` in
4537 *Sun\ C*) # Sun C 5.9
4538 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4539 _LT_TAGVAR(compiler_needs_object, $1)=yes
4540 tmp_sharedflag='-G' ;;
4541 *Sun\ F*) # Sun Fortran 8.3
4542 tmp_sharedflag='-G' ;;
4543 esac
4544 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4545
4546 if test "x$supports_anon_versioning" = xyes; then
4547 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4548 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4549 echo "local: *; };" >> $output_objdir/$libname.ver~
4550 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4551 fi
4552
4553 case $cc_basename in
4554 xlf*)
4555 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4556 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4557 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4558 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4559 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4560 if test "x$supports_anon_versioning" = xyes; then
4561 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4562 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4563 echo "local: *; };" >> $output_objdir/$libname.ver~
4564 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4565 fi
4566 ;;
4567 esac
4568 else
4569 _LT_TAGVAR(ld_shlibs, $1)=no
4570 fi
4571 ;;
4572
4573 netbsd* | netbsdelf*-gnu)
4574 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4575 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4576 wlarc=
4577 else
4578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4579 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4580 fi
4581 ;;
4582
4583 solaris*)
4584 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4585 _LT_TAGVAR(ld_shlibs, $1)=no
4586 cat <<_LT_EOF 1>&2
4587
4588 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4589 *** create shared libraries on Solaris systems. Therefore, libtool
4590 *** is disabling shared libraries support. We urge you to upgrade GNU
4591 *** binutils to release 2.9.1 or newer. Another option is to modify
4592 *** your PATH or compiler configuration so that the native linker is
4593 *** used, and then restart.
4594
4595 _LT_EOF
4596 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4597 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4598 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4599 else
4600 _LT_TAGVAR(ld_shlibs, $1)=no
4601 fi
4602 ;;
4603
4604 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4605 case `$LD -v 2>&1` in
4606 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4607 _LT_TAGVAR(ld_shlibs, $1)=no
4608 cat <<_LT_EOF 1>&2
4609
4610 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4611 *** reliably create shared libraries on SCO systems. Therefore, libtool
4612 *** is disabling shared libraries support. We urge you to upgrade GNU
4613 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4614 *** your PATH or compiler configuration so that the native linker is
4615 *** used, and then restart.
4616
4617 _LT_EOF
4618 ;;
4619 *)
4620 # For security reasons, it is highly recommended that you always
4621 # use absolute paths for naming shared libraries, and exclude the
4622 # DT_RUNPATH tag from executables and libraries. But doing so
4623 # requires that you compile everything twice, which is a pain.
4624 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4625 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4626 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4627 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4628 else
4629 _LT_TAGVAR(ld_shlibs, $1)=no
4630 fi
4631 ;;
4632 esac
4633 ;;
4634
4635 sunos4*)
4636 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4637 wlarc=
4638 _LT_TAGVAR(hardcode_direct, $1)=yes
4639 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4640 ;;
4641
4642 *)
4643 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4644 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4645 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4646 else
4647 _LT_TAGVAR(ld_shlibs, $1)=no
4648 fi
4649 ;;
4650 esac
4651
4652 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4653 runpath_var=
4654 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4655 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4656 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4657 fi
4658 else
4659 # PORTME fill in a description of your system's linker (not GNU ld)
4660 case $host_os in
4661 aix3*)
4662 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4663 _LT_TAGVAR(always_export_symbols, $1)=yes
4664 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4665 # Note: this linker hardcodes the directories in LIBPATH if there
4666 # are no directories specified by -L.
4667 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4668 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4669 # Neither direct hardcoding nor static linking is supported with a
4670 # broken collect2.
4671 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4672 fi
4673 ;;
4674
4675 aix[[4-9]]*)
4676 if test "$host_cpu" = ia64; then
4677 # On IA64, the linker does run time linking by default, so we don't
4678 # have to do anything special.
4679 aix_use_runtimelinking=no
4680 exp_sym_flag='-Bexport'
4681 no_entry_flag=""
4682 else
4683 # If we're using GNU nm, then we don't want the "-C" option.
4684 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4685 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4686 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4687 else
4688 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4689 fi
4690 aix_use_runtimelinking=no
4691
4692 # Test if we are trying to use run time linking or normal
4693 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4694 # need to do runtime linking.
4695 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4696 for ld_flag in $LDFLAGS; do
4697 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4698 aix_use_runtimelinking=yes
4699 break
4700 fi
4701 done
4702 ;;
4703 esac
4704
4705 exp_sym_flag='-bexport'
4706 no_entry_flag='-bnoentry'
4707 fi
4708
4709 # When large executables or shared objects are built, AIX ld can
4710 # have problems creating the table of contents. If linking a library
4711 # or program results in "error TOC overflow" add -mminimal-toc to
4712 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4713 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4714
4715 _LT_TAGVAR(archive_cmds, $1)=''
4716 _LT_TAGVAR(hardcode_direct, $1)=yes
4717 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4718 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4719 _LT_TAGVAR(link_all_deplibs, $1)=yes
4720 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4721
4722 if test "$GCC" = yes; then
4723 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4724 # We only want to do this on AIX 4.2 and lower, the check
4725 # below for broken collect2 doesn't work under 4.3+
4726 collect2name=`${CC} -print-prog-name=collect2`
4727 if test -f "$collect2name" &&
4728 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4729 then
4730 # We have reworked collect2
4731 :
4732 else
4733 # We have old collect2
4734 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4735 # It fails to find uninstalled libraries when the uninstalled
4736 # path is not listed in the libpath. Setting hardcode_minus_L
4737 # to unsupported forces relinking
4738 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4740 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4741 fi
4742 ;;
4743 esac
4744 shared_flag='-shared'
4745 if test "$aix_use_runtimelinking" = yes; then
4746 shared_flag="$shared_flag "'${wl}-G'
4747 fi
4748 _LT_TAGVAR(link_all_deplibs, $1)=no
4749 else
4750 # not using gcc
4751 if test "$host_cpu" = ia64; then
4752 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4753 # chokes on -Wl,-G. The following line is correct:
4754 shared_flag='-G'
4755 else
4756 if test "$aix_use_runtimelinking" = yes; then
4757 shared_flag='${wl}-G'
4758 else
4759 shared_flag='${wl}-bM:SRE'
4760 fi
4761 fi
4762 fi
4763
4764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4765 # It seems that -bexpall does not export symbols beginning with
4766 # underscore (_), so it is better to generate a list of symbols to export.
4767 _LT_TAGVAR(always_export_symbols, $1)=yes
4768 if test "$aix_use_runtimelinking" = yes; then
4769 # Warning - without using the other runtime loading flags (-brtl),
4770 # -berok will link without error, but may produce a broken library.
4771 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4772 # Determine the default libpath from the value encoded in an
4773 # empty executable.
4774 _LT_SYS_MODULE_PATH_AIX
4775 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4776 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4777 else
4778 if test "$host_cpu" = ia64; then
4779 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4780 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4781 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4782 else
4783 # Determine the default libpath from the value encoded in an
4784 # empty executable.
4785 _LT_SYS_MODULE_PATH_AIX
4786 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4787 # Warning - without using the other run time loading flags,
4788 # -berok will link without error, but may produce a broken library.
4789 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4790 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4791 # Exported symbols can be pulled into shared objects from archives
4792 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4793 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4794 # This is similar to how AIX traditionally builds its shared libraries.
4795 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4796 fi
4797 fi
4798 ;;
4799
4800 amigaos*)
4801 case $host_cpu in
4802 powerpc)
4803 # see comment about AmigaOS4 .so support
4804 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4805 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4806 ;;
4807 m68k)
4808 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4809 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4810 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4811 ;;
4812 esac
4813 ;;
4814
4815 bsdi[[45]]*)
4816 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4817 ;;
4818
4819 cygwin* | mingw* | pw32* | cegcc*)
4820 # When not using gcc, we currently assume that we are using
4821 # Microsoft Visual C++.
4822 # hardcode_libdir_flag_spec is actually meaningless, as there is
4823 # no search path for DLLs.
4824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4825 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4826 # Tell ltmain to make .lib files, not .a files.
4827 libext=lib
4828 # Tell ltmain to make .dll files, not .so files.
4829 shrext_cmds=".dll"
4830 # FIXME: Setting linknames here is a bad hack.
4831 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4832 # The linker will automatically build a .lib file if we build a DLL.
4833 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4834 # FIXME: Should let the user specify the lib program.
4835 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4836 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4837 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4838 ;;
4839
4840 darwin* | rhapsody*)
4841 _LT_DARWIN_LINKER_FEATURES($1)
4842 ;;
4843
4844 dgux*)
4845 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4846 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4847 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4848 ;;
4849
4850 freebsd1*)
4851 _LT_TAGVAR(ld_shlibs, $1)=no
4852 ;;
4853
4854 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4855 # support. Future versions do this automatically, but an explicit c++rt0.o
4856 # does not break anything, and helps significantly (at the cost of a little
4857 # extra space).
4858 freebsd2.2*)
4859 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4860 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4861 _LT_TAGVAR(hardcode_direct, $1)=yes
4862 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4863 ;;
4864
4865 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4866 freebsd2*)
4867 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4868 _LT_TAGVAR(hardcode_direct, $1)=yes
4869 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4870 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871 ;;
4872
4873 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4874 freebsd* | dragonfly*)
4875 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4877 _LT_TAGVAR(hardcode_direct, $1)=yes
4878 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879 ;;
4880
4881 hpux9*)
4882 if test "$GCC" = yes; then
4883 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4884 else
4885 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4886 fi
4887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4888 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4889 _LT_TAGVAR(hardcode_direct, $1)=yes
4890
4891 # hardcode_minus_L: Not really in the search PATH,
4892 # but as the default location of the library.
4893 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4894 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4895 ;;
4896
4897 hpux10*)
4898 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4900 else
4901 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4902 fi
4903 if test "$with_gnu_ld" = no; then
4904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4905 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4906 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4907 _LT_TAGVAR(hardcode_direct, $1)=yes
4908 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4909 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910 # hardcode_minus_L: Not really in the search PATH,
4911 # but as the default location of the library.
4912 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4913 fi
4914 ;;
4915
4916 hpux11*)
4917 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4918 case $host_cpu in
4919 hppa*64*)
4920 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4921 ;;
4922 ia64*)
4923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4924 ;;
4925 *)
4926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4927 ;;
4928 esac
4929 else
4930 case $host_cpu in
4931 hppa*64*)
4932 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4933 ;;
4934 ia64*)
4935 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4936 ;;
4937 *)
4938 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4939 ;;
4940 esac
4941 fi
4942 if test "$with_gnu_ld" = no; then
4943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4945
4946 case $host_cpu in
4947 hppa*64*|ia64*)
4948 _LT_TAGVAR(hardcode_direct, $1)=no
4949 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4950 ;;
4951 *)
4952 _LT_TAGVAR(hardcode_direct, $1)=yes
4953 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4954 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4955
4956 # hardcode_minus_L: Not really in the search PATH,
4957 # but as the default location of the library.
4958 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4959 ;;
4960 esac
4961 fi
4962 ;;
4963
4964 irix5* | irix6* | nonstopux*)
4965 if test "$GCC" = yes; then
4966 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4967 # Try to use the -exported_symbol ld option, if it does not
4968 # work, assume that -exports_file does not work either and
4969 # implicitly export all symbols.
4970 save_LDFLAGS="$LDFLAGS"
4971 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4972 AC_LINK_IFELSE(int foo(void) {},
4973 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4974 )
4975 LDFLAGS="$save_LDFLAGS"
4976 else
4977 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4978 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4979 fi
4980 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4982 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4983 _LT_TAGVAR(inherit_rpath, $1)=yes
4984 _LT_TAGVAR(link_all_deplibs, $1)=yes
4985 ;;
4986
4987 netbsd* | netbsdelf*-gnu)
4988 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4989 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4990 else
4991 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4992 fi
4993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4994 _LT_TAGVAR(hardcode_direct, $1)=yes
4995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4996 ;;
4997
4998 newsos6)
4999 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5000 _LT_TAGVAR(hardcode_direct, $1)=yes
5001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5002 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004 ;;
5005
5006 *nto* | *qnx*)
5007 ;;
5008
5009 openbsd*)
5010 if test -f /usr/libexec/ld.so; then
5011 _LT_TAGVAR(hardcode_direct, $1)=yes
5012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5013 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5014 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5015 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5016 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5017 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5018 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5019 else
5020 case $host_os in
5021 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5022 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5024 ;;
5025 *)
5026 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5027 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5028 ;;
5029 esac
5030 fi
5031 else
5032 _LT_TAGVAR(ld_shlibs, $1)=no
5033 fi
5034 ;;
5035
5036 os2*)
5037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5038 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5039 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5040 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5041 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5042 ;;
5043
5044 osf3*)
5045 if test "$GCC" = yes; then
5046 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5047 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5048 else
5049 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5050 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5051 fi
5052 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5054 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5055 ;;
5056
5057 osf4* | osf5*) # as osf3* with the addition of -msym flag
5058 if test "$GCC" = yes; then
5059 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5060 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5062 else
5063 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5064 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5065 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5066 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5067
5068 # Both c and cxx compiler support -rpath directly
5069 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5070 fi
5071 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5072 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5073 ;;
5074
5075 solaris*)
5076 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5077 if test "$GCC" = yes; then
5078 wlarc='${wl}'
5079 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5080 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5081 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5082 else
5083 case `$CC -V 2>&1` in
5084 *"Compilers 5.0"*)
5085 wlarc=''
5086 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5088 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5089 ;;
5090 *)
5091 wlarc='${wl}'
5092 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5093 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5094 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5095 ;;
5096 esac
5097 fi
5098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5099 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5100 case $host_os in
5101 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5102 *)
5103 # The compiler driver will combine and reorder linker options,
5104 # but understands `-z linker_flag'. GCC discards it without `$wl',
5105 # but is careful enough not to reorder.
5106 # Supported since Solaris 2.6 (maybe 2.5.1?)
5107 if test "$GCC" = yes; then
5108 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5109 else
5110 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5111 fi
5112 ;;
5113 esac
5114 _LT_TAGVAR(link_all_deplibs, $1)=yes
5115 ;;
5116
5117 sunos4*)
5118 if test "x$host_vendor" = xsequent; then
5119 # Use $CC to link under sequent, because it throws in some extra .o
5120 # files that make .init and .fini sections work.
5121 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5122 else
5123 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5124 fi
5125 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5126 _LT_TAGVAR(hardcode_direct, $1)=yes
5127 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5128 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5129 ;;
5130
5131 sysv4)
5132 case $host_vendor in
5133 sni)
5134 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5135 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5136 ;;
5137 siemens)
5138 ## LD is ld it makes a PLAMLIB
5139 ## CC just makes a GrossModule.
5140 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5141 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5142 _LT_TAGVAR(hardcode_direct, $1)=no
5143 ;;
5144 motorola)
5145 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5146 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5147 ;;
5148 esac
5149 runpath_var='LD_RUN_PATH'
5150 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5151 ;;
5152
5153 sysv4.3*)
5154 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5155 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5156 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5157 ;;
5158
5159 sysv4*MP*)
5160 if test -d /usr/nec; then
5161 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5162 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5163 runpath_var=LD_RUN_PATH
5164 hardcode_runpath_var=yes
5165 _LT_TAGVAR(ld_shlibs, $1)=yes
5166 fi
5167 ;;
5168
5169 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5170 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5171 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5172 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5173 runpath_var='LD_RUN_PATH'
5174
5175 if test "$GCC" = yes; then
5176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5177 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5178 else
5179 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5180 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5181 fi
5182 ;;
5183
5184 sysv5* | sco3.2v5* | sco5v6*)
5185 # Note: We can NOT use -z defs as we might desire, because we do not
5186 # link with -lc, and that would cause any symbols used from libc to
5187 # always be unresolved, which means just about no library would
5188 # ever link correctly. If we're not using GNU ld we use -z text
5189 # though, which does catch some bad symbols but isn't as heavy-handed
5190 # as -z defs.
5191 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5192 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5193 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5194 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5196 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5197 _LT_TAGVAR(link_all_deplibs, $1)=yes
5198 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5199 runpath_var='LD_RUN_PATH'
5200
5201 if test "$GCC" = yes; then
5202 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5203 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5204 else
5205 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5206 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5207 fi
5208 ;;
5209
5210 uts4*)
5211 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5212 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5213 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5214 ;;
5215
5216 *)
5217 _LT_TAGVAR(ld_shlibs, $1)=no
5218 ;;
5219 esac
5220
5221 if test x$host_vendor = xsni; then
5222 case $host in
5223 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5224 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5225 ;;
5226 esac
5227 fi
5228 fi
5229 ])
5230 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5231 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5232
5233 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5234
5235 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5236 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5237 _LT_DECL([], [extract_expsyms_cmds], [2],
5238 [The commands to extract the exported symbol list from a shared archive])
5239
5240 #
5241 # Do we need to explicitly link libc?
5242 #
5243 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5244 x|xyes)
5245 # Assume -lc should be added
5246 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5247
5248 if test "$enable_shared" = yes && test "$GCC" = yes; then
5249 case $_LT_TAGVAR(archive_cmds, $1) in
5250 *'~'*)
5251 # FIXME: we may have to deal with multi-command sequences.
5252 ;;
5253 '$CC '*)
5254 # Test whether the compiler implicitly links with -lc since on some
5255 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5256 # to ld, don't add -lc before -lgcc.
5257 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5258 $RM conftest*
5259 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5260
5261 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5262 soname=conftest
5263 lib=conftest
5264 libobjs=conftest.$ac_objext
5265 deplibs=
5266 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5267 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5268 compiler_flags=-v
5269 linker_flags=-v
5270 verstring=
5271 output_objdir=.
5272 libname=conftest
5273 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5274 _LT_TAGVAR(allow_undefined_flag, $1)=
5275 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5276 then
5277 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5278 else
5279 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5280 fi
5281 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5282 else
5283 cat conftest.err 1>&5
5284 fi
5285 $RM conftest*
5286 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5287 ;;
5288 esac
5289 fi
5290 ;;
5291 esac
5292
5293 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5294 [Whether or not to add -lc for building shared libraries])
5295 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5296 [enable_shared_with_static_runtimes], [0],
5297 [Whether or not to disallow shared libs when runtime libs are static])
5298 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5299 [Compiler flag to allow reflexive dlopens])
5300 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5301 [Compiler flag to generate shared objects directly from archives])
5302 _LT_TAGDECL([], [compiler_needs_object], [1],
5303 [Whether the compiler copes with passing no objects directly])
5304 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5305 [Create an old-style archive from a shared archive])
5306 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5307 [Create a temporary old-style archive to link instead of a shared archive])
5308 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5309 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5310 _LT_TAGDECL([], [module_cmds], [2],
5311 [Commands used to build a loadable module if different from building
5312 a shared archive.])
5313 _LT_TAGDECL([], [module_expsym_cmds], [2])
5314 _LT_TAGDECL([], [with_gnu_ld], [1],
5315 [Whether we are building with GNU ld or not])
5316 _LT_TAGDECL([], [allow_undefined_flag], [1],
5317 [Flag that allows shared libraries with undefined symbols to be built])
5318 _LT_TAGDECL([], [no_undefined_flag], [1],
5319 [Flag that enforces no undefined symbols])
5320 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5321 [Flag to hardcode $libdir into a binary during linking.
5322 This must work even if $libdir does not exist])
5323 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5324 [[If ld is used when linking, flag to hardcode $libdir into a binary
5325 during linking. This must work even if $libdir does not exist]])
5326 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5327 [Whether we need a single "-rpath" flag with a separated argument])
5328 _LT_TAGDECL([], [hardcode_direct], [0],
5329 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5330 DIR into the resulting binary])
5331 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5332 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5333 DIR into the resulting binary and the resulting library dependency is
5334 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5335 library is relocated])
5336 _LT_TAGDECL([], [hardcode_minus_L], [0],
5337 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5338 into the resulting binary])
5339 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5340 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5341 into the resulting binary])
5342 _LT_TAGDECL([], [hardcode_automatic], [0],
5343 [Set to "yes" if building a shared library automatically hardcodes DIR
5344 into the library and all subsequent libraries and executables linked
5345 against it])
5346 _LT_TAGDECL([], [inherit_rpath], [0],
5347 [Set to yes if linker adds runtime paths of dependent libraries
5348 to runtime path list])
5349 _LT_TAGDECL([], [link_all_deplibs], [0],
5350 [Whether libtool must link a program against all its dependency libraries])
5351 _LT_TAGDECL([], [fix_srcfile_path], [1],
5352 [Fix the shell variable $srcfile for the compiler])
5353 _LT_TAGDECL([], [always_export_symbols], [0],
5354 [Set to "yes" if exported symbols are required])
5355 _LT_TAGDECL([], [export_symbols_cmds], [2],
5356 [The commands to list exported symbols])
5357 _LT_TAGDECL([], [exclude_expsyms], [1],
5358 [Symbols that should not be listed in the preloaded symbols])
5359 _LT_TAGDECL([], [include_expsyms], [1],
5360 [Symbols that must always be exported])
5361 _LT_TAGDECL([], [prelink_cmds], [2],
5362 [Commands necessary for linking programs (against libraries) with templates])
5363 _LT_TAGDECL([], [file_list_spec], [1],
5364 [Specify filename containing input files])
5365 dnl FIXME: Not yet implemented
5366 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5367 dnl [Compiler flag to generate thread safe objects])
5368 ])# _LT_LINKER_SHLIBS
5369
5370
5371 # _LT_LANG_C_CONFIG([TAG])
5372 # ------------------------
5373 # Ensure that the configuration variables for a C compiler are suitably
5374 # defined. These variables are subsequently used by _LT_CONFIG to write
5375 # the compiler configuration to `libtool'.
5376 m4_defun([_LT_LANG_C_CONFIG],
5377 [m4_require([_LT_DECL_EGREP])dnl
5378 lt_save_CC="$CC"
5379 AC_LANG_PUSH(C)
5380
5381 # Source file extension for C test sources.
5382 ac_ext=c
5383
5384 # Object file extension for compiled C test sources.
5385 objext=o
5386 _LT_TAGVAR(objext, $1)=$objext
5387
5388 # Code to be used in simple compile tests
5389 lt_simple_compile_test_code="int some_variable = 0;"
5390
5391 # Code to be used in simple link tests
5392 lt_simple_link_test_code='int main(){return(0);}'
5393
5394 _LT_TAG_COMPILER
5395 # Save the default compiler, since it gets overwritten when the other
5396 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5397 compiler_DEFAULT=$CC
5398
5399 # save warnings/boilerplate of simple test code
5400 _LT_COMPILER_BOILERPLATE
5401 _LT_LINKER_BOILERPLATE
5402
5403 if test -n "$compiler"; then
5404 _LT_COMPILER_NO_RTTI($1)
5405 _LT_COMPILER_PIC($1)
5406 _LT_COMPILER_C_O($1)
5407 _LT_COMPILER_FILE_LOCKS($1)
5408 _LT_LINKER_SHLIBS($1)
5409 _LT_SYS_DYNAMIC_LINKER($1)
5410 _LT_LINKER_HARDCODE_LIBPATH($1)
5411 LT_SYS_DLOPEN_SELF
5412 _LT_CMD_STRIPLIB
5413
5414 # Report which library types will actually be built
5415 AC_MSG_CHECKING([if libtool supports shared libraries])
5416 AC_MSG_RESULT([$can_build_shared])
5417
5418 AC_MSG_CHECKING([whether to build shared libraries])
5419 test "$can_build_shared" = "no" && enable_shared=no
5420
5421 # On AIX, shared libraries and static libraries use the same namespace, and
5422 # are all built from PIC.
5423 case $host_os in
5424 aix3*)
5425 test "$enable_shared" = yes && enable_static=no
5426 if test -n "$RANLIB"; then
5427 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5428 postinstall_cmds='$RANLIB $lib'
5429 fi
5430 ;;
5431
5432 aix[[4-9]]*)
5433 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5434 test "$enable_shared" = yes && enable_static=no
5435 fi
5436 ;;
5437 esac
5438 AC_MSG_RESULT([$enable_shared])
5439
5440 AC_MSG_CHECKING([whether to build static libraries])
5441 # Make sure either enable_shared or enable_static is yes.
5442 test "$enable_shared" = yes || enable_static=yes
5443 AC_MSG_RESULT([$enable_static])
5444
5445 _LT_CONFIG($1)
5446 fi
5447 AC_LANG_POP
5448 CC="$lt_save_CC"
5449 ])# _LT_LANG_C_CONFIG
5450
5451
5452 # _LT_PROG_CXX
5453 # ------------
5454 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5455 # compiler, we have our own version here.
5456 m4_defun([_LT_PROG_CXX],
5457 [
5458 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5459 AC_PROG_CXX
5460 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5461 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5462 (test "X$CXX" != "Xg++"))) ; then
5463 AC_PROG_CXXCPP
5464 else
5465 _lt_caught_CXX_error=yes
5466 fi
5467 popdef([AC_MSG_ERROR])
5468 ])# _LT_PROG_CXX
5469
5470 dnl aclocal-1.4 backwards compatibility:
5471 dnl AC_DEFUN([_LT_PROG_CXX], [])
5472
5473
5474 # _LT_LANG_CXX_CONFIG([TAG])
5475 # --------------------------
5476 # Ensure that the configuration variables for a C++ compiler are suitably
5477 # defined. These variables are subsequently used by _LT_CONFIG to write
5478 # the compiler configuration to `libtool'.
5479 m4_defun([_LT_LANG_CXX_CONFIG],
5480 [AC_REQUIRE([_LT_PROG_CXX])dnl
5481 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5482 m4_require([_LT_DECL_EGREP])dnl
5483
5484 AC_LANG_PUSH(C++)
5485 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5486 _LT_TAGVAR(allow_undefined_flag, $1)=
5487 _LT_TAGVAR(always_export_symbols, $1)=no
5488 _LT_TAGVAR(archive_expsym_cmds, $1)=
5489 _LT_TAGVAR(compiler_needs_object, $1)=no
5490 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5491 _LT_TAGVAR(hardcode_direct, $1)=no
5492 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5493 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5494 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5495 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5496 _LT_TAGVAR(hardcode_minus_L, $1)=no
5497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5498 _LT_TAGVAR(hardcode_automatic, $1)=no
5499 _LT_TAGVAR(inherit_rpath, $1)=no
5500 _LT_TAGVAR(module_cmds, $1)=
5501 _LT_TAGVAR(module_expsym_cmds, $1)=
5502 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5503 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5504 _LT_TAGVAR(no_undefined_flag, $1)=
5505 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5506 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5507
5508 # Source file extension for C++ test sources.
5509 ac_ext=cpp
5510
5511 # Object file extension for compiled C++ test sources.
5512 objext=o
5513 _LT_TAGVAR(objext, $1)=$objext
5514
5515 # No sense in running all these tests if we already determined that
5516 # the CXX compiler isn't working. Some variables (like enable_shared)
5517 # are currently assumed to apply to all compilers on this platform,
5518 # and will be corrupted by setting them based on a non-working compiler.
5519 if test "$_lt_caught_CXX_error" != yes; then
5520 # Code to be used in simple compile tests
5521 lt_simple_compile_test_code="int some_variable = 0;"
5522
5523 # Code to be used in simple link tests
5524 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5525
5526 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5527 _LT_TAG_COMPILER
5528
5529 # save warnings/boilerplate of simple test code
5530 _LT_COMPILER_BOILERPLATE
5531 _LT_LINKER_BOILERPLATE
5532
5533 # Allow CC to be a program name with arguments.
5534 lt_save_CC=$CC
5535 lt_save_LD=$LD
5536 lt_save_GCC=$GCC
5537 GCC=$GXX
5538 lt_save_with_gnu_ld=$with_gnu_ld
5539 lt_save_path_LD=$lt_cv_path_LD
5540 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5541 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5542 else
5543 $as_unset lt_cv_prog_gnu_ld
5544 fi
5545 if test -n "${lt_cv_path_LDCXX+set}"; then
5546 lt_cv_path_LD=$lt_cv_path_LDCXX
5547 else
5548 $as_unset lt_cv_path_LD
5549 fi
5550 test -z "${LDCXX+set}" || LD=$LDCXX
5551 CC=${CXX-"c++"}
5552 compiler=$CC
5553 _LT_TAGVAR(compiler, $1)=$CC
5554 _LT_CC_BASENAME([$compiler])
5555
5556 if test -n "$compiler"; then
5557 # We don't want -fno-exception when compiling C++ code, so set the
5558 # no_builtin_flag separately
5559 if test "$GXX" = yes; then
5560 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5561 else
5562 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5563 fi
5564
5565 if test "$GXX" = yes; then
5566 # Set up default GNU C++ configuration
5567
5568 LT_PATH_LD
5569
5570 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5571 # archiving commands below assume that GNU ld is being used.
5572 if test "$with_gnu_ld" = yes; then
5573 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5574 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5575
5576 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5577 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5578
5579 # If archive_cmds runs LD, not CC, wlarc should be empty
5580 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5581 # investigate it a little bit more. (MM)
5582 wlarc='${wl}'
5583
5584 # ancient GNU ld didn't support --whole-archive et. al.
5585 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5586 $GREP 'no-whole-archive' > /dev/null; then
5587 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5588 else
5589 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5590 fi
5591 else
5592 with_gnu_ld=no
5593 wlarc=
5594
5595 # A generic and very simple default shared library creation
5596 # command for GNU C++ for the case where it uses the native
5597 # linker, instead of GNU ld. If possible, this setting should
5598 # overridden to take advantage of the native linker features on
5599 # the platform it is being used on.
5600 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5601 fi
5602
5603 # Commands to make compiler produce verbose output that lists
5604 # what "hidden" libraries, object files and flags are used when
5605 # linking a shared library.
5606 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5607
5608 else
5609 GXX=no
5610 with_gnu_ld=no
5611 wlarc=
5612 fi
5613
5614 # PORTME: fill in a description of your system's C++ link characteristics
5615 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5616 _LT_TAGVAR(ld_shlibs, $1)=yes
5617 case $host_os in
5618 aix3*)
5619 # FIXME: insert proper C++ library support
5620 _LT_TAGVAR(ld_shlibs, $1)=no
5621 ;;
5622 aix[[4-9]]*)
5623 if test "$host_cpu" = ia64; then
5624 # On IA64, the linker does run time linking by default, so we don't
5625 # have to do anything special.
5626 aix_use_runtimelinking=no
5627 exp_sym_flag='-Bexport'
5628 no_entry_flag=""
5629 else
5630 aix_use_runtimelinking=no
5631
5632 # Test if we are trying to use run time linking or normal
5633 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5634 # need to do runtime linking.
5635 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5636 for ld_flag in $LDFLAGS; do
5637 case $ld_flag in
5638 *-brtl*)
5639 aix_use_runtimelinking=yes
5640 break
5641 ;;
5642 esac
5643 done
5644 ;;
5645 esac
5646
5647 exp_sym_flag='-bexport'
5648 no_entry_flag='-bnoentry'
5649 fi
5650
5651 # When large executables or shared objects are built, AIX ld can
5652 # have problems creating the table of contents. If linking a library
5653 # or program results in "error TOC overflow" add -mminimal-toc to
5654 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5655 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5656
5657 _LT_TAGVAR(archive_cmds, $1)=''
5658 _LT_TAGVAR(hardcode_direct, $1)=yes
5659 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5660 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5661 _LT_TAGVAR(link_all_deplibs, $1)=yes
5662 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5663
5664 if test "$GXX" = yes; then
5665 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5666 # We only want to do this on AIX 4.2 and lower, the check
5667 # below for broken collect2 doesn't work under 4.3+
5668 collect2name=`${CC} -print-prog-name=collect2`
5669 if test -f "$collect2name" &&
5670 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5671 then
5672 # We have reworked collect2
5673 :
5674 else
5675 # We have old collect2
5676 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5677 # It fails to find uninstalled libraries when the uninstalled
5678 # path is not listed in the libpath. Setting hardcode_minus_L
5679 # to unsupported forces relinking
5680 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5681 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5682 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5683 fi
5684 esac
5685 shared_flag='-shared'
5686 if test "$aix_use_runtimelinking" = yes; then
5687 shared_flag="$shared_flag "'${wl}-G'
5688 fi
5689 else
5690 # not using gcc
5691 if test "$host_cpu" = ia64; then
5692 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5693 # chokes on -Wl,-G. The following line is correct:
5694 shared_flag='-G'
5695 else
5696 if test "$aix_use_runtimelinking" = yes; then
5697 shared_flag='${wl}-G'
5698 else
5699 shared_flag='${wl}-bM:SRE'
5700 fi
5701 fi
5702 fi
5703
5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5705 # It seems that -bexpall does not export symbols beginning with
5706 # underscore (_), so it is better to generate a list of symbols to
5707 # export.
5708 _LT_TAGVAR(always_export_symbols, $1)=yes
5709 if test "$aix_use_runtimelinking" = yes; then
5710 # Warning - without using the other runtime loading flags (-brtl),
5711 # -berok will link without error, but may produce a broken library.
5712 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5713 # Determine the default libpath from the value encoded in an empty
5714 # executable.
5715 _LT_SYS_MODULE_PATH_AIX
5716 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5717
5718 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5719 else
5720 if test "$host_cpu" = ia64; then
5721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5722 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5723 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5724 else
5725 # Determine the default libpath from the value encoded in an
5726 # empty executable.
5727 _LT_SYS_MODULE_PATH_AIX
5728 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5729 # Warning - without using the other run time loading flags,
5730 # -berok will link without error, but may produce a broken library.
5731 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5732 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5733 # Exported symbols can be pulled into shared objects from archives
5734 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5735 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5736 # This is similar to how AIX traditionally builds its shared
5737 # libraries.
5738 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5739 fi
5740 fi
5741 ;;
5742
5743 beos*)
5744 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5745 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5746 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5747 # support --undefined. This deserves some investigation. FIXME
5748 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5749 else
5750 _LT_TAGVAR(ld_shlibs, $1)=no
5751 fi
5752 ;;
5753
5754 chorus*)
5755 case $cc_basename in
5756 *)
5757 # FIXME: insert proper C++ library support
5758 _LT_TAGVAR(ld_shlibs, $1)=no
5759 ;;
5760 esac
5761 ;;
5762
5763 cygwin* | mingw* | pw32* | cegcc*)
5764 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5765 # as there is no search path for DLLs.
5766 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5767 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5768 _LT_TAGVAR(always_export_symbols, $1)=no
5769 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5770
5771 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5773 # If the export-symbols file already is a .def file (1st line
5774 # is EXPORTS), use it as is; otherwise, prepend...
5775 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5776 cp $export_symbols $output_objdir/$soname.def;
5777 else
5778 echo EXPORTS > $output_objdir/$soname.def;
5779 cat $export_symbols >> $output_objdir/$soname.def;
5780 fi~
5781 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5782 else
5783 _LT_TAGVAR(ld_shlibs, $1)=no
5784 fi
5785 ;;
5786 darwin* | rhapsody*)
5787 _LT_DARWIN_LINKER_FEATURES($1)
5788 ;;
5789
5790 dgux*)
5791 case $cc_basename in
5792 ec++*)
5793 # FIXME: insert proper C++ library support
5794 _LT_TAGVAR(ld_shlibs, $1)=no
5795 ;;
5796 ghcx*)
5797 # Green Hills C++ Compiler
5798 # FIXME: insert proper C++ library support
5799 _LT_TAGVAR(ld_shlibs, $1)=no
5800 ;;
5801 *)
5802 # FIXME: insert proper C++ library support
5803 _LT_TAGVAR(ld_shlibs, $1)=no
5804 ;;
5805 esac
5806 ;;
5807
5808 freebsd[[12]]*)
5809 # C++ shared libraries reported to be fairly broken before
5810 # switch to ELF
5811 _LT_TAGVAR(ld_shlibs, $1)=no
5812 ;;
5813
5814 freebsd-elf*)
5815 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5816 ;;
5817
5818 freebsd* | dragonfly*)
5819 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5820 # conventions
5821 _LT_TAGVAR(ld_shlibs, $1)=yes
5822 ;;
5823
5824 gnu*)
5825 ;;
5826
5827 hpux9*)
5828 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5829 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5830 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5831 _LT_TAGVAR(hardcode_direct, $1)=yes
5832 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5833 # but as the default
5834 # location of the library.
5835
5836 case $cc_basename in
5837 CC*)
5838 # FIXME: insert proper C++ library support
5839 _LT_TAGVAR(ld_shlibs, $1)=no
5840 ;;
5841 aCC*)
5842 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5843 # Commands to make compiler produce verbose output that lists
5844 # what "hidden" libraries, object files and flags are used when
5845 # linking a shared library.
5846 #
5847 # There doesn't appear to be a way to prevent this compiler from
5848 # explicitly linking system object files so we need to strip them
5849 # from the output so that they don't get included in the library
5850 # dependencies.
5851 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5852 ;;
5853 *)
5854 if test "$GXX" = yes; then
5855 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5856 else
5857 # FIXME: insert proper C++ library support
5858 _LT_TAGVAR(ld_shlibs, $1)=no
5859 fi
5860 ;;
5861 esac
5862 ;;
5863
5864 hpux10*|hpux11*)
5865 if test $with_gnu_ld = no; then
5866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5867 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5868
5869 case $host_cpu in
5870 hppa*64*|ia64*)
5871 ;;
5872 *)
5873 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5874 ;;
5875 esac
5876 fi
5877 case $host_cpu in
5878 hppa*64*|ia64*)
5879 _LT_TAGVAR(hardcode_direct, $1)=no
5880 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5881 ;;
5882 *)
5883 _LT_TAGVAR(hardcode_direct, $1)=yes
5884 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5885 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5886 # but as the default
5887 # location of the library.
5888 ;;
5889 esac
5890
5891 case $cc_basename in
5892 CC*)
5893 # FIXME: insert proper C++ library support
5894 _LT_TAGVAR(ld_shlibs, $1)=no
5895 ;;
5896 aCC*)
5897 case $host_cpu in
5898 hppa*64*)
5899 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5900 ;;
5901 ia64*)
5902 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5903 ;;
5904 *)
5905 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5906 ;;
5907 esac
5908 # Commands to make compiler produce verbose output that lists
5909 # what "hidden" libraries, object files and flags are used when
5910 # linking a shared library.
5911 #
5912 # There doesn't appear to be a way to prevent this compiler from
5913 # explicitly linking system object files so we need to strip them
5914 # from the output so that they don't get included in the library
5915 # dependencies.
5916 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5917 ;;
5918 *)
5919 if test "$GXX" = yes; then
5920 if test $with_gnu_ld = no; then
5921 case $host_cpu in
5922 hppa*64*)
5923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5924 ;;
5925 ia64*)
5926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5927 ;;
5928 *)
5929 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5930 ;;
5931 esac
5932 fi
5933 else
5934 # FIXME: insert proper C++ library support
5935 _LT_TAGVAR(ld_shlibs, $1)=no
5936 fi
5937 ;;
5938 esac
5939 ;;
5940
5941 interix[[3-9]]*)
5942 _LT_TAGVAR(hardcode_direct, $1)=no
5943 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5946 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5947 # Instead, shared libraries are loaded at an image base (0x10000000 by
5948 # default) and relocated if they conflict, which is a slow very memory
5949 # consuming and fragmenting process. To avoid this, we pick a random,
5950 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5951 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5953 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5954 ;;
5955 irix5* | irix6*)
5956 case $cc_basename in
5957 CC*)
5958 # SGI C++
5959 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5960
5961 # Archives containing C++ object files must be created using
5962 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5963 # necessary to make sure instantiated templates are included
5964 # in the archive.
5965 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5966 ;;
5967 *)
5968 if test "$GXX" = yes; then
5969 if test "$with_gnu_ld" = no; then
5970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5971 else
5972 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5973 fi
5974 fi
5975 _LT_TAGVAR(link_all_deplibs, $1)=yes
5976 ;;
5977 esac
5978 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5979 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5980 _LT_TAGVAR(inherit_rpath, $1)=yes
5981 ;;
5982
5983 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5984 case $cc_basename in
5985 KCC*)
5986 # Kuck and Associates, Inc. (KAI) C++ Compiler
5987
5988 # KCC will only create a shared library if the output file
5989 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5990 # to its proper name (with version) after linking.
5991 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5992 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
5993 # Commands to make compiler produce verbose output that lists
5994 # what "hidden" libraries, object files and flags are used when
5995 # linking a shared library.
5996 #
5997 # There doesn't appear to be a way to prevent this compiler from
5998 # explicitly linking system object files so we need to strip them
5999 # from the output so that they don't get included in the library
6000 # dependencies.
6001 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6002
6003 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6004 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6005
6006 # Archives containing C++ object files must be created using
6007 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6008 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6009 ;;
6010 icpc* | ecpc* )
6011 # Intel C++
6012 with_gnu_ld=yes
6013 # version 8.0 and above of icpc choke on multiply defined symbols
6014 # if we add $predep_objects and $postdep_objects, however 7.1 and
6015 # earlier do not add the objects themselves.
6016 case `$CC -V 2>&1` in
6017 *"Version 7."*)
6018 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6019 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6020 ;;
6021 *) # Version 8.0 or newer
6022 tmp_idyn=
6023 case $host_cpu in
6024 ia64*) tmp_idyn=' -i_dynamic';;
6025 esac
6026 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6027 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6028 ;;
6029 esac
6030 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6031 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6033 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6034 ;;
6035 pgCC* | pgcpp*)
6036 # Portland Group C++ compiler
6037 case `$CC -V` in
6038 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6039 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6040 rm -rf $tpldir~
6041 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6042 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6043 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6044 rm -rf $tpldir~
6045 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6046 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6047 $RANLIB $oldlib'
6048 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6049 rm -rf $tpldir~
6050 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6051 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6052 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6053 rm -rf $tpldir~
6054 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6055 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6056 ;;
6057 *) # Version 6 will use weak symbols
6058 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6059 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6060 ;;
6061 esac
6062
6063 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6065 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6066 ;;
6067 cxx*)
6068 # Compaq C++
6069 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6070 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6071
6072 runpath_var=LD_RUN_PATH
6073 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6074 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6075
6076 # Commands to make compiler produce verbose output that lists
6077 # what "hidden" libraries, object files and flags are used when
6078 # linking a shared library.
6079 #
6080 # There doesn't appear to be a way to prevent this compiler from
6081 # explicitly linking system object files so we need to strip them
6082 # from the output so that they don't get included in the library
6083 # dependencies.
6084 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6085 ;;
6086 xl*)
6087 # IBM XL 8.0 on PPC, with GNU ld
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6089 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6090 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6091 if test "x$supports_anon_versioning" = xyes; then
6092 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6093 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6094 echo "local: *; };" >> $output_objdir/$libname.ver~
6095 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6096 fi
6097 ;;
6098 *)
6099 case `$CC -V 2>&1 | sed 5q` in
6100 *Sun\ C*)
6101 # Sun C++ 5.9
6102 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6103 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6104 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6105 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6106 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6107 _LT_TAGVAR(compiler_needs_object, $1)=yes
6108
6109 # Not sure whether something based on
6110 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6111 # would be better.
6112 output_verbose_link_cmd='echo'
6113
6114 # Archives containing C++ object files must be created using
6115 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6116 # necessary to make sure instantiated templates are included
6117 # in the archive.
6118 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6119 ;;
6120 esac
6121 ;;
6122 esac
6123 ;;
6124
6125 lynxos*)
6126 # FIXME: insert proper C++ library support
6127 _LT_TAGVAR(ld_shlibs, $1)=no
6128 ;;
6129
6130 m88k*)
6131 # FIXME: insert proper C++ library support
6132 _LT_TAGVAR(ld_shlibs, $1)=no
6133 ;;
6134
6135 mvs*)
6136 case $cc_basename in
6137 cxx*)
6138 # FIXME: insert proper C++ library support
6139 _LT_TAGVAR(ld_shlibs, $1)=no
6140 ;;
6141 *)
6142 # FIXME: insert proper C++ library support
6143 _LT_TAGVAR(ld_shlibs, $1)=no
6144 ;;
6145 esac
6146 ;;
6147
6148 netbsd*)
6149 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6150 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6151 wlarc=
6152 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6153 _LT_TAGVAR(hardcode_direct, $1)=yes
6154 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6155 fi
6156 # Workaround some broken pre-1.5 toolchains
6157 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6158 ;;
6159
6160 *nto* | *qnx*)
6161 _LT_TAGVAR(ld_shlibs, $1)=yes
6162 ;;
6163
6164 openbsd2*)
6165 # C++ shared libraries are fairly broken
6166 _LT_TAGVAR(ld_shlibs, $1)=no
6167 ;;
6168
6169 openbsd*)
6170 if test -f /usr/libexec/ld.so; then
6171 _LT_TAGVAR(hardcode_direct, $1)=yes
6172 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6173 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6174 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6176 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6177 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6178 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6179 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6180 fi
6181 output_verbose_link_cmd=echo
6182 else
6183 _LT_TAGVAR(ld_shlibs, $1)=no
6184 fi
6185 ;;
6186
6187 osf3* | osf4* | osf5*)
6188 case $cc_basename in
6189 KCC*)
6190 # Kuck and Associates, Inc. (KAI) C++ Compiler
6191
6192 # KCC will only create a shared library if the output file
6193 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6194 # to its proper name (with version) after linking.
6195 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6196
6197 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6198 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6199
6200 # Archives containing C++ object files must be created using
6201 # the KAI C++ compiler.
6202 case $host in
6203 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6204 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6205 esac
6206 ;;
6207 RCC*)
6208 # Rational C++ 2.4.1
6209 # FIXME: insert proper C++ library support
6210 _LT_TAGVAR(ld_shlibs, $1)=no
6211 ;;
6212 cxx*)
6213 case $host in
6214 osf3*)
6215 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6216 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6217 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6218 ;;
6219 *)
6220 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6221 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6222 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6223 echo "-hidden">> $lib.exp~
6224 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6225 $RM $lib.exp'
6226 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6227 ;;
6228 esac
6229
6230 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6231
6232 # Commands to make compiler produce verbose output that lists
6233 # what "hidden" libraries, object files and flags are used when
6234 # linking a shared library.
6235 #
6236 # There doesn't appear to be a way to prevent this compiler from
6237 # explicitly linking system object files so we need to strip them
6238 # from the output so that they don't get included in the library
6239 # dependencies.
6240 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6241 ;;
6242 *)
6243 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6244 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6245 case $host in
6246 osf3*)
6247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6248 ;;
6249 *)
6250 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6251 ;;
6252 esac
6253
6254 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6255 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6256
6257 # Commands to make compiler produce verbose output that lists
6258 # what "hidden" libraries, object files and flags are used when
6259 # linking a shared library.
6260 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6261
6262 else
6263 # FIXME: insert proper C++ library support
6264 _LT_TAGVAR(ld_shlibs, $1)=no
6265 fi
6266 ;;
6267 esac
6268 ;;
6269
6270 psos*)
6271 # FIXME: insert proper C++ library support
6272 _LT_TAGVAR(ld_shlibs, $1)=no
6273 ;;
6274
6275 sunos4*)
6276 case $cc_basename in
6277 CC*)
6278 # Sun C++ 4.x
6279 # FIXME: insert proper C++ library support
6280 _LT_TAGVAR(ld_shlibs, $1)=no
6281 ;;
6282 lcc*)
6283 # Lucid
6284 # FIXME: insert proper C++ library support
6285 _LT_TAGVAR(ld_shlibs, $1)=no
6286 ;;
6287 *)
6288 # FIXME: insert proper C++ library support
6289 _LT_TAGVAR(ld_shlibs, $1)=no
6290 ;;
6291 esac
6292 ;;
6293
6294 solaris*)
6295 case $cc_basename in
6296 CC*)
6297 # Sun C++ 4.2, 5.x and Centerline C++
6298 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6299 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6300 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6301 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6302 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6303
6304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6305 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6306 case $host_os in
6307 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6308 *)
6309 # The compiler driver will combine and reorder linker options,
6310 # but understands `-z linker_flag'.
6311 # Supported since Solaris 2.6 (maybe 2.5.1?)
6312 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6313 ;;
6314 esac
6315 _LT_TAGVAR(link_all_deplibs, $1)=yes
6316
6317 output_verbose_link_cmd='echo'
6318
6319 # Archives containing C++ object files must be created using
6320 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6321 # necessary to make sure instantiated templates are included
6322 # in the archive.
6323 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6324 ;;
6325 gcx*)
6326 # Green Hills C++ Compiler
6327 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6328
6329 # The C++ compiler must be used to create the archive.
6330 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6331 ;;
6332 *)
6333 # GNU C++ compiler with Solaris linker
6334 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6335 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6336 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6337 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6338 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6339 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6340
6341 # Commands to make compiler produce verbose output that lists
6342 # what "hidden" libraries, object files and flags are used when
6343 # linking a shared library.
6344 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6345 else
6346 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6347 # platform.
6348 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6349 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6350 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6351
6352 # Commands to make compiler produce verbose output that lists
6353 # what "hidden" libraries, object files and flags are used when
6354 # linking a shared library.
6355 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6356 fi
6357
6358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6359 case $host_os in
6360 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6361 *)
6362 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6363 ;;
6364 esac
6365 fi
6366 ;;
6367 esac
6368 ;;
6369
6370 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6371 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6372 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6373 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6374 runpath_var='LD_RUN_PATH'
6375
6376 case $cc_basename in
6377 CC*)
6378 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6379 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6380 ;;
6381 *)
6382 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6383 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6384 ;;
6385 esac
6386 ;;
6387
6388 sysv5* | sco3.2v5* | sco5v6*)
6389 # Note: We can NOT use -z defs as we might desire, because we do not
6390 # link with -lc, and that would cause any symbols used from libc to
6391 # always be unresolved, which means just about no library would
6392 # ever link correctly. If we're not using GNU ld we use -z text
6393 # though, which does catch some bad symbols but isn't as heavy-handed
6394 # as -z defs.
6395 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6396 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6397 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6398 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6400 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6401 _LT_TAGVAR(link_all_deplibs, $1)=yes
6402 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6403 runpath_var='LD_RUN_PATH'
6404
6405 case $cc_basename in
6406 CC*)
6407 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6408 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6409 ;;
6410 *)
6411 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6412 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6413 ;;
6414 esac
6415 ;;
6416
6417 tandem*)
6418 case $cc_basename in
6419 NCC*)
6420 # NonStop-UX NCC 3.20
6421 # FIXME: insert proper C++ library support
6422 _LT_TAGVAR(ld_shlibs, $1)=no
6423 ;;
6424 *)
6425 # FIXME: insert proper C++ library support
6426 _LT_TAGVAR(ld_shlibs, $1)=no
6427 ;;
6428 esac
6429 ;;
6430
6431 vxworks*)
6432 # FIXME: insert proper C++ library support
6433 _LT_TAGVAR(ld_shlibs, $1)=no
6434 ;;
6435
6436 *)
6437 # FIXME: insert proper C++ library support
6438 _LT_TAGVAR(ld_shlibs, $1)=no
6439 ;;
6440 esac
6441
6442 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6443 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6444
6445 _LT_TAGVAR(GCC, $1)="$GXX"
6446 _LT_TAGVAR(LD, $1)="$LD"
6447
6448 ## CAVEAT EMPTOR:
6449 ## There is no encapsulation within the following macros, do not change
6450 ## the running order or otherwise move them around unless you know exactly
6451 ## what you are doing...
6452 _LT_SYS_HIDDEN_LIBDEPS($1)
6453 _LT_COMPILER_PIC($1)
6454 _LT_COMPILER_C_O($1)
6455 _LT_COMPILER_FILE_LOCKS($1)
6456 _LT_LINKER_SHLIBS($1)
6457 _LT_SYS_DYNAMIC_LINKER($1)
6458 _LT_LINKER_HARDCODE_LIBPATH($1)
6459
6460 _LT_CONFIG($1)
6461 fi # test -n "$compiler"
6462
6463 CC=$lt_save_CC
6464 LDCXX=$LD
6465 LD=$lt_save_LD
6466 GCC=$lt_save_GCC
6467 with_gnu_ld=$lt_save_with_gnu_ld
6468 lt_cv_path_LDCXX=$lt_cv_path_LD
6469 lt_cv_path_LD=$lt_save_path_LD
6470 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6471 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6472 fi # test "$_lt_caught_CXX_error" != yes
6473
6474 AC_LANG_POP
6475 ])# _LT_LANG_CXX_CONFIG
6476
6477
6478 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6479 # ---------------------------------
6480 # Figure out "hidden" library dependencies from verbose
6481 # compiler output when linking a shared library.
6482 # Parse the compiler output and extract the necessary
6483 # objects, libraries and library flags.
6484 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6485 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6486 # Dependencies to place before and after the object being linked:
6487 _LT_TAGVAR(predep_objects, $1)=
6488 _LT_TAGVAR(postdep_objects, $1)=
6489 _LT_TAGVAR(predeps, $1)=
6490 _LT_TAGVAR(postdeps, $1)=
6491 _LT_TAGVAR(compiler_lib_search_path, $1)=
6492
6493 dnl we can't use the lt_simple_compile_test_code here,
6494 dnl because it contains code intended for an executable,
6495 dnl not a library. It's possible we should let each
6496 dnl tag define a new lt_????_link_test_code variable,
6497 dnl but it's only used here...
6498 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6499 int a;
6500 void foo (void) { a = 0; }
6501 _LT_EOF
6502 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6503 class Foo
6504 {
6505 public:
6506 Foo (void) { a = 0; }
6507 private:
6508 int a;
6509 };
6510 _LT_EOF
6511 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6512 subroutine foo
6513 implicit none
6514 integer*4 a
6515 a=0
6516 return
6517 end
6518 _LT_EOF
6519 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6520 subroutine foo
6521 implicit none
6522 integer a
6523 a=0
6524 return
6525 end
6526 _LT_EOF
6527 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6528 public class foo {
6529 private int a;
6530 public void bar (void) {
6531 a = 0;
6532 }
6533 };
6534 _LT_EOF
6535 ])
6536 dnl Parse the compiler output and extract the necessary
6537 dnl objects, libraries and library flags.
6538 if AC_TRY_EVAL(ac_compile); then
6539 # Parse the compiler output and extract the necessary
6540 # objects, libraries and library flags.
6541
6542 # Sentinel used to keep track of whether or not we are before
6543 # the conftest object file.
6544 pre_test_object_deps_done=no
6545
6546 for p in `eval "$output_verbose_link_cmd"`; do
6547 case $p in
6548
6549 -L* | -R* | -l*)
6550 # Some compilers place space between "-{L,R}" and the path.
6551 # Remove the space.
6552 if test $p = "-L" ||
6553 test $p = "-R"; then
6554 prev=$p
6555 continue
6556 else
6557 prev=
6558 fi
6559
6560 if test "$pre_test_object_deps_done" = no; then
6561 case $p in
6562 -L* | -R*)
6563 # Internal compiler library paths should come after those
6564 # provided the user. The postdeps already come after the
6565 # user supplied libs so there is no need to process them.
6566 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6567 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6568 else
6569 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6570 fi
6571 ;;
6572 # The "-l" case would never come before the object being
6573 # linked, so don't bother handling this case.
6574 esac
6575 else
6576 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6577 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6578 else
6579 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6580 fi
6581 fi
6582 ;;
6583
6584 *.$objext)
6585 # This assumes that the test object file only shows up
6586 # once in the compiler output.
6587 if test "$p" = "conftest.$objext"; then
6588 pre_test_object_deps_done=yes
6589 continue
6590 fi
6591
6592 if test "$pre_test_object_deps_done" = no; then
6593 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6594 _LT_TAGVAR(predep_objects, $1)="$p"
6595 else
6596 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6597 fi
6598 else
6599 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6600 _LT_TAGVAR(postdep_objects, $1)="$p"
6601 else
6602 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6603 fi
6604 fi
6605 ;;
6606
6607 *) ;; # Ignore the rest.
6608
6609 esac
6610 done
6611
6612 # Clean up.
6613 rm -f a.out a.exe
6614 else
6615 echo "libtool.m4: error: problem compiling $1 test program"
6616 fi
6617
6618 $RM -f confest.$objext
6619
6620 # PORTME: override above test on systems where it is broken
6621 m4_if([$1], [CXX],
6622 [case $host_os in
6623 interix[[3-9]]*)
6624 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6625 # hack all around it, let's just trust "g++" to DTRT.
6626 _LT_TAGVAR(predep_objects,$1)=
6627 _LT_TAGVAR(postdep_objects,$1)=
6628 _LT_TAGVAR(postdeps,$1)=
6629 ;;
6630
6631 linux*)
6632 case `$CC -V 2>&1 | sed 5q` in
6633 *Sun\ C*)
6634 # Sun C++ 5.9
6635
6636 # The more standards-conforming stlport4 library is
6637 # incompatible with the Cstd library. Avoid specifying
6638 # it if it's in CXXFLAGS. Ignore libCrun as
6639 # -library=stlport4 depends on it.
6640 case " $CXX $CXXFLAGS " in
6641 *" -library=stlport4 "*)
6642 solaris_use_stlport4=yes
6643 ;;
6644 esac
6645
6646 if test "$solaris_use_stlport4" != yes; then
6647 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6648 fi
6649 ;;
6650 esac
6651 ;;
6652
6653 solaris*)
6654 case $cc_basename in
6655 CC*)
6656 # The more standards-conforming stlport4 library is
6657 # incompatible with the Cstd library. Avoid specifying
6658 # it if it's in CXXFLAGS. Ignore libCrun as
6659 # -library=stlport4 depends on it.
6660 case " $CXX $CXXFLAGS " in
6661 *" -library=stlport4 "*)
6662 solaris_use_stlport4=yes
6663 ;;
6664 esac
6665
6666 # Adding this requires a known-good setup of shared libraries for
6667 # Sun compiler versions before 5.6, else PIC objects from an old
6668 # archive will be linked into the output, leading to subtle bugs.
6669 if test "$solaris_use_stlport4" != yes; then
6670 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6671 fi
6672 ;;
6673 esac
6674 ;;
6675 esac
6676 ])
6677
6678 case " $_LT_TAGVAR(postdeps, $1) " in
6679 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6680 esac
6681 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6682 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6683 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6684 fi
6685 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6686 [The directories searched by this compiler when creating a shared library])
6687 _LT_TAGDECL([], [predep_objects], [1],
6688 [Dependencies to place before and after the objects being linked to
6689 create a shared library])
6690 _LT_TAGDECL([], [postdep_objects], [1])
6691 _LT_TAGDECL([], [predeps], [1])
6692 _LT_TAGDECL([], [postdeps], [1])
6693 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6694 [The library search path used internally by the compiler when linking
6695 a shared library])
6696 ])# _LT_SYS_HIDDEN_LIBDEPS
6697
6698
6699 # _LT_PROG_F77
6700 # ------------
6701 # Since AC_PROG_F77 is broken, in that it returns the empty string
6702 # if there is no fortran compiler, we have our own version here.
6703 m4_defun([_LT_PROG_F77],
6704 [
6705 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6706 AC_PROG_F77
6707 if test -z "$F77" || test "X$F77" = "Xno"; then
6708 _lt_disable_F77=yes
6709 fi
6710 popdef([AC_MSG_ERROR])
6711 ])# _LT_PROG_F77
6712
6713 dnl aclocal-1.4 backwards compatibility:
6714 dnl AC_DEFUN([_LT_PROG_F77], [])
6715
6716
6717 # _LT_LANG_F77_CONFIG([TAG])
6718 # --------------------------
6719 # Ensure that the configuration variables for a Fortran 77 compiler are
6720 # suitably defined. These variables are subsequently used by _LT_CONFIG
6721 # to write the compiler configuration to `libtool'.
6722 m4_defun([_LT_LANG_F77_CONFIG],
6723 [AC_REQUIRE([_LT_PROG_F77])dnl
6724 AC_LANG_PUSH(Fortran 77)
6725
6726 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6727 _LT_TAGVAR(allow_undefined_flag, $1)=
6728 _LT_TAGVAR(always_export_symbols, $1)=no
6729 _LT_TAGVAR(archive_expsym_cmds, $1)=
6730 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6731 _LT_TAGVAR(hardcode_direct, $1)=no
6732 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6733 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6734 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6735 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6736 _LT_TAGVAR(hardcode_minus_L, $1)=no
6737 _LT_TAGVAR(hardcode_automatic, $1)=no
6738 _LT_TAGVAR(inherit_rpath, $1)=no
6739 _LT_TAGVAR(module_cmds, $1)=
6740 _LT_TAGVAR(module_expsym_cmds, $1)=
6741 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6742 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6743 _LT_TAGVAR(no_undefined_flag, $1)=
6744 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6745 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6746
6747 # Source file extension for f77 test sources.
6748 ac_ext=f
6749
6750 # Object file extension for compiled f77 test sources.
6751 objext=o
6752 _LT_TAGVAR(objext, $1)=$objext
6753
6754 # No sense in running all these tests if we already determined that
6755 # the F77 compiler isn't working. Some variables (like enable_shared)
6756 # are currently assumed to apply to all compilers on this platform,
6757 # and will be corrupted by setting them based on a non-working compiler.
6758 if test "$_lt_disable_F77" != yes; then
6759 # Code to be used in simple compile tests
6760 lt_simple_compile_test_code="\
6761 subroutine t
6762 return
6763 end
6764 "
6765
6766 # Code to be used in simple link tests
6767 lt_simple_link_test_code="\
6768 program t
6769 end
6770 "
6771
6772 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6773 _LT_TAG_COMPILER
6774
6775 # save warnings/boilerplate of simple test code
6776 _LT_COMPILER_BOILERPLATE
6777 _LT_LINKER_BOILERPLATE
6778
6779 # Allow CC to be a program name with arguments.
6780 lt_save_CC="$CC"
6781 lt_save_GCC=$GCC
6782 CC=${F77-"f77"}
6783 compiler=$CC
6784 _LT_TAGVAR(compiler, $1)=$CC
6785 _LT_CC_BASENAME([$compiler])
6786 GCC=$G77
6787 if test -n "$compiler"; then
6788 AC_MSG_CHECKING([if libtool supports shared libraries])
6789 AC_MSG_RESULT([$can_build_shared])
6790
6791 AC_MSG_CHECKING([whether to build shared libraries])
6792 test "$can_build_shared" = "no" && enable_shared=no
6793
6794 # On AIX, shared libraries and static libraries use the same namespace, and
6795 # are all built from PIC.
6796 case $host_os in
6797 aix3*)
6798 test "$enable_shared" = yes && enable_static=no
6799 if test -n "$RANLIB"; then
6800 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6801 postinstall_cmds='$RANLIB $lib'
6802 fi
6803 ;;
6804 aix[[4-9]]*)
6805 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6806 test "$enable_shared" = yes && enable_static=no
6807 fi
6808 ;;
6809 esac
6810 AC_MSG_RESULT([$enable_shared])
6811
6812 AC_MSG_CHECKING([whether to build static libraries])
6813 # Make sure either enable_shared or enable_static is yes.
6814 test "$enable_shared" = yes || enable_static=yes
6815 AC_MSG_RESULT([$enable_static])
6816
6817 _LT_TAGVAR(GCC, $1)="$G77"
6818 _LT_TAGVAR(LD, $1)="$LD"
6819
6820 ## CAVEAT EMPTOR:
6821 ## There is no encapsulation within the following macros, do not change
6822 ## the running order or otherwise move them around unless you know exactly
6823 ## what you are doing...
6824 _LT_COMPILER_PIC($1)
6825 _LT_COMPILER_C_O($1)
6826 _LT_COMPILER_FILE_LOCKS($1)
6827 _LT_LINKER_SHLIBS($1)
6828 _LT_SYS_DYNAMIC_LINKER($1)
6829 _LT_LINKER_HARDCODE_LIBPATH($1)
6830
6831 _LT_CONFIG($1)
6832 fi # test -n "$compiler"
6833
6834 GCC=$lt_save_GCC
6835 CC="$lt_save_CC"
6836 fi # test "$_lt_disable_F77" != yes
6837
6838 AC_LANG_POP
6839 ])# _LT_LANG_F77_CONFIG
6840
6841
6842 # _LT_PROG_FC
6843 # -----------
6844 # Since AC_PROG_FC is broken, in that it returns the empty string
6845 # if there is no fortran compiler, we have our own version here.
6846 m4_defun([_LT_PROG_FC],
6847 [
6848 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6849 AC_PROG_FC
6850 if test -z "$FC" || test "X$FC" = "Xno"; then
6851 _lt_disable_FC=yes
6852 fi
6853 popdef([AC_MSG_ERROR])
6854 ])# _LT_PROG_FC
6855
6856 dnl aclocal-1.4 backwards compatibility:
6857 dnl AC_DEFUN([_LT_PROG_FC], [])
6858
6859
6860 # _LT_LANG_FC_CONFIG([TAG])
6861 # -------------------------
6862 # Ensure that the configuration variables for a Fortran compiler are
6863 # suitably defined. These variables are subsequently used by _LT_CONFIG
6864 # to write the compiler configuration to `libtool'.
6865 m4_defun([_LT_LANG_FC_CONFIG],
6866 [AC_REQUIRE([_LT_PROG_FC])dnl
6867 AC_LANG_PUSH(Fortran)
6868
6869 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6870 _LT_TAGVAR(allow_undefined_flag, $1)=
6871 _LT_TAGVAR(always_export_symbols, $1)=no
6872 _LT_TAGVAR(archive_expsym_cmds, $1)=
6873 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6874 _LT_TAGVAR(hardcode_direct, $1)=no
6875 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6877 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6878 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6879 _LT_TAGVAR(hardcode_minus_L, $1)=no
6880 _LT_TAGVAR(hardcode_automatic, $1)=no
6881 _LT_TAGVAR(inherit_rpath, $1)=no
6882 _LT_TAGVAR(module_cmds, $1)=
6883 _LT_TAGVAR(module_expsym_cmds, $1)=
6884 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6885 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6886 _LT_TAGVAR(no_undefined_flag, $1)=
6887 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6888 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6889
6890 # Source file extension for fc test sources.
6891 ac_ext=${ac_fc_srcext-f}
6892
6893 # Object file extension for compiled fc test sources.
6894 objext=o
6895 _LT_TAGVAR(objext, $1)=$objext
6896
6897 # No sense in running all these tests if we already determined that
6898 # the FC compiler isn't working. Some variables (like enable_shared)
6899 # are currently assumed to apply to all compilers on this platform,
6900 # and will be corrupted by setting them based on a non-working compiler.
6901 if test "$_lt_disable_FC" != yes; then
6902 # Code to be used in simple compile tests
6903 lt_simple_compile_test_code="\
6904 subroutine t
6905 return
6906 end
6907 "
6908
6909 # Code to be used in simple link tests
6910 lt_simple_link_test_code="\
6911 program t
6912 end
6913 "
6914
6915 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6916 _LT_TAG_COMPILER
6917
6918 # save warnings/boilerplate of simple test code
6919 _LT_COMPILER_BOILERPLATE
6920 _LT_LINKER_BOILERPLATE
6921
6922 # Allow CC to be a program name with arguments.
6923 lt_save_CC="$CC"
6924 lt_save_GCC=$GCC
6925 CC=${FC-"f95"}
6926 compiler=$CC
6927 GCC=$ac_cv_fc_compiler_gnu
6928
6929 _LT_TAGVAR(compiler, $1)=$CC
6930 _LT_CC_BASENAME([$compiler])
6931
6932 if test -n "$compiler"; then
6933 AC_MSG_CHECKING([if libtool supports shared libraries])
6934 AC_MSG_RESULT([$can_build_shared])
6935
6936 AC_MSG_CHECKING([whether to build shared libraries])
6937 test "$can_build_shared" = "no" && enable_shared=no
6938
6939 # On AIX, shared libraries and static libraries use the same namespace, and
6940 # are all built from PIC.
6941 case $host_os in
6942 aix3*)
6943 test "$enable_shared" = yes && enable_static=no
6944 if test -n "$RANLIB"; then
6945 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6946 postinstall_cmds='$RANLIB $lib'
6947 fi
6948 ;;
6949 aix[[4-9]]*)
6950 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6951 test "$enable_shared" = yes && enable_static=no
6952 fi
6953 ;;
6954 esac
6955 AC_MSG_RESULT([$enable_shared])
6956
6957 AC_MSG_CHECKING([whether to build static libraries])
6958 # Make sure either enable_shared or enable_static is yes.
6959 test "$enable_shared" = yes || enable_static=yes
6960 AC_MSG_RESULT([$enable_static])
6961
6962 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6963 _LT_TAGVAR(LD, $1)="$LD"
6964
6965 ## CAVEAT EMPTOR:
6966 ## There is no encapsulation within the following macros, do not change
6967 ## the running order or otherwise move them around unless you know exactly
6968 ## what you are doing...
6969 _LT_SYS_HIDDEN_LIBDEPS($1)
6970 _LT_COMPILER_PIC($1)
6971 _LT_COMPILER_C_O($1)
6972 _LT_COMPILER_FILE_LOCKS($1)
6973 _LT_LINKER_SHLIBS($1)
6974 _LT_SYS_DYNAMIC_LINKER($1)
6975 _LT_LINKER_HARDCODE_LIBPATH($1)
6976
6977 _LT_CONFIG($1)
6978 fi # test -n "$compiler"
6979
6980 GCC=$lt_save_GCC
6981 CC="$lt_save_CC"
6982 fi # test "$_lt_disable_FC" != yes
6983
6984 AC_LANG_POP
6985 ])# _LT_LANG_FC_CONFIG
6986
6987
6988 # _LT_LANG_GCJ_CONFIG([TAG])
6989 # --------------------------
6990 # Ensure that the configuration variables for the GNU Java Compiler compiler
6991 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6992 # to write the compiler configuration to `libtool'.
6993 m4_defun([_LT_LANG_GCJ_CONFIG],
6994 [AC_REQUIRE([LT_PROG_GCJ])dnl
6995 AC_LANG_SAVE
6996
6997 # Source file extension for Java test sources.
6998 ac_ext=java
6999
7000 # Object file extension for compiled Java test sources.
7001 objext=o
7002 _LT_TAGVAR(objext, $1)=$objext
7003
7004 # Code to be used in simple compile tests
7005 lt_simple_compile_test_code="class foo {}"
7006
7007 # Code to be used in simple link tests
7008 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7009
7010 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7011 _LT_TAG_COMPILER
7012
7013 # save warnings/boilerplate of simple test code
7014 _LT_COMPILER_BOILERPLATE
7015 _LT_LINKER_BOILERPLATE
7016
7017 # Allow CC to be a program name with arguments.
7018 lt_save_CC="$CC"
7019 lt_save_GCC=$GCC
7020 GCC=yes
7021 CC=${GCJ-"gcj"}
7022 compiler=$CC
7023 _LT_TAGVAR(compiler, $1)=$CC
7024 _LT_TAGVAR(LD, $1)="$LD"
7025 _LT_CC_BASENAME([$compiler])
7026
7027 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7028 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7029
7030 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7031
7032 if test -n "$compiler"; then
7033 _LT_COMPILER_NO_RTTI($1)
7034 _LT_COMPILER_PIC($1)
7035 _LT_COMPILER_C_O($1)
7036 _LT_COMPILER_FILE_LOCKS($1)
7037 _LT_LINKER_SHLIBS($1)
7038 _LT_LINKER_HARDCODE_LIBPATH($1)
7039
7040 _LT_CONFIG($1)
7041 fi
7042
7043 AC_LANG_RESTORE
7044
7045 GCC=$lt_save_GCC
7046 CC="$lt_save_CC"
7047 ])# _LT_LANG_GCJ_CONFIG
7048
7049
7050 # _LT_LANG_RC_CONFIG([TAG])
7051 # -------------------------
7052 # Ensure that the configuration variables for the Windows resource compiler
7053 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7054 # to write the compiler configuration to `libtool'.
7055 m4_defun([_LT_LANG_RC_CONFIG],
7056 [AC_REQUIRE([LT_PROG_RC])dnl
7057 AC_LANG_SAVE
7058
7059 # Source file extension for RC test sources.
7060 ac_ext=rc
7061
7062 # Object file extension for compiled RC test sources.
7063 objext=o
7064 _LT_TAGVAR(objext, $1)=$objext
7065
7066 # Code to be used in simple compile tests
7067 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7068
7069 # Code to be used in simple link tests
7070 lt_simple_link_test_code="$lt_simple_compile_test_code"
7071
7072 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7073 _LT_TAG_COMPILER
7074
7075 # save warnings/boilerplate of simple test code
7076 _LT_COMPILER_BOILERPLATE
7077 _LT_LINKER_BOILERPLATE
7078
7079 # Allow CC to be a program name with arguments.
7080 lt_save_CC="$CC"
7081 lt_save_GCC=$GCC
7082 GCC=
7083 CC=${RC-"windres"}
7084 compiler=$CC
7085 _LT_TAGVAR(compiler, $1)=$CC
7086 _LT_CC_BASENAME([$compiler])
7087 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7088
7089 if test -n "$compiler"; then
7090 :
7091 _LT_CONFIG($1)
7092 fi
7093
7094 GCC=$lt_save_GCC
7095 AC_LANG_RESTORE
7096 CC="$lt_save_CC"
7097 ])# _LT_LANG_RC_CONFIG
7098
7099
7100 # LT_PROG_GCJ
7101 # -----------
7102 AC_DEFUN([LT_PROG_GCJ],
7103 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7104 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7105 [AC_CHECK_TOOL(GCJ, gcj,)
7106 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7107 AC_SUBST(GCJFLAGS)])])[]dnl
7108 ])
7109
7110 # Old name:
7111 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7112 dnl aclocal-1.4 backwards compatibility:
7113 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7114
7115
7116 # LT_PROG_RC
7117 # ----------
7118 AC_DEFUN([LT_PROG_RC],
7119 [AC_CHECK_TOOL(RC, windres,)
7120 ])
7121
7122 # Old name:
7123 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7124 dnl aclocal-1.4 backwards compatibility:
7125 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7126
7127
7128 # _LT_DECL_EGREP
7129 # --------------
7130 # If we don't have a new enough Autoconf to choose the best grep
7131 # available, choose the one first in the user's PATH.
7132 m4_defun([_LT_DECL_EGREP],
7133 [AC_REQUIRE([AC_PROG_EGREP])dnl
7134 AC_REQUIRE([AC_PROG_FGREP])dnl
7135 test -z "$GREP" && GREP=grep
7136 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7137 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7138 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7139 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7140 AC_SUBST([GREP])
7141 ])
7142
7143
7144 # _LT_DECL_OBJDUMP
7145 # --------------
7146 # If we don't have a new enough Autoconf to choose the best objdump
7147 # available, choose the one first in the user's PATH.
7148 m4_defun([_LT_DECL_OBJDUMP],
7149 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7150 test -z "$OBJDUMP" && OBJDUMP=objdump
7151 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7152 AC_SUBST([OBJDUMP])
7153 ])
7154
7155
7156 # _LT_DECL_SED
7157 # ------------
7158 # Check for a fully-functional sed program, that truncates
7159 # as few characters as possible. Prefer GNU sed if found.
7160 m4_defun([_LT_DECL_SED],
7161 [AC_PROG_SED
7162 test -z "$SED" && SED=sed
7163 Xsed="$SED -e 1s/^X//"
7164 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7165 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7166 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7167 ])# _LT_DECL_SED
7168
7169 m4_ifndef([AC_PROG_SED], [
7170 # NOTE: This macro has been submitted for inclusion into #
7171 # GNU Autoconf as AC_PROG_SED. When it is available in #
7172 # a released version of Autoconf we should remove this #
7173 # macro and use it instead. #
7174
7175 m4_defun([AC_PROG_SED],
7176 [AC_MSG_CHECKING([for a sed that does not truncate output])
7177 AC_CACHE_VAL(lt_cv_path_SED,
7178 [# Loop through the user's path and test for sed and gsed.
7179 # Then use that list of sed's as ones to test for truncation.
7180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181 for as_dir in $PATH
7182 do
7183 IFS=$as_save_IFS
7184 test -z "$as_dir" && as_dir=.
7185 for lt_ac_prog in sed gsed; do
7186 for ac_exec_ext in '' $ac_executable_extensions; do
7187 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7188 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7189 fi
7190 done
7191 done
7192 done
7193 IFS=$as_save_IFS
7194 lt_ac_max=0
7195 lt_ac_count=0
7196 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7197 # along with /bin/sed that truncates output.
7198 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7199 test ! -f $lt_ac_sed && continue
7200 cat /dev/null > conftest.in
7201 lt_ac_count=0
7202 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7203 # Check for GNU sed and select it if it is found.
7204 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7205 lt_cv_path_SED=$lt_ac_sed
7206 break
7207 fi
7208 while true; do
7209 cat conftest.in conftest.in >conftest.tmp
7210 mv conftest.tmp conftest.in
7211 cp conftest.in conftest.nl
7212 echo >>conftest.nl
7213 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7214 cmp -s conftest.out conftest.nl || break
7215 # 10000 chars as input seems more than enough
7216 test $lt_ac_count -gt 10 && break
7217 lt_ac_count=`expr $lt_ac_count + 1`
7218 if test $lt_ac_count -gt $lt_ac_max; then
7219 lt_ac_max=$lt_ac_count
7220 lt_cv_path_SED=$lt_ac_sed
7221 fi
7222 done
7223 done
7224 ])
7225 SED=$lt_cv_path_SED
7226 AC_SUBST([SED])
7227 AC_MSG_RESULT([$SED])
7228 ])#AC_PROG_SED
7229 ])#m4_ifndef
7230
7231 # Old name:
7232 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7233 dnl aclocal-1.4 backwards compatibility:
7234 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7235
7236
7237 # _LT_CHECK_SHELL_FEATURES
7238 # ------------------------
7239 # Find out whether the shell is Bourne or XSI compatible,
7240 # or has some other useful features.
7241 m4_defun([_LT_CHECK_SHELL_FEATURES],
7242 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7243 # Try some XSI features
7244 xsi_shell=no
7245 ( _lt_dummy="a/b/c"
7246 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7247 = c,a/b,, \
7248 && eval 'test $(( 1 + 1 )) -eq 2 \
7249 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7250 && xsi_shell=yes
7251 AC_MSG_RESULT([$xsi_shell])
7252 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7253
7254 AC_MSG_CHECKING([whether the shell understands "+="])
7255 lt_shell_append=no
7256 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7257 >/dev/null 2>&1 \
7258 && lt_shell_append=yes
7259 AC_MSG_RESULT([$lt_shell_append])
7260 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7261
7262 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7263 lt_unset=unset
7264 else
7265 lt_unset=false
7266 fi
7267 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7268
7269 # test EBCDIC or ASCII
7270 case `echo X|tr X '\101'` in
7271 A) # ASCII based system
7272 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7273 lt_SP2NL='tr \040 \012'
7274 lt_NL2SP='tr \015\012 \040\040'
7275 ;;
7276 *) # EBCDIC based system
7277 lt_SP2NL='tr \100 \n'
7278 lt_NL2SP='tr \r\n \100\100'
7279 ;;
7280 esac
7281 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7282 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7283 ])# _LT_CHECK_SHELL_FEATURES
7284
7285
7286 # _LT_PROG_XSI_SHELLFNS
7287 # ---------------------
7288 # Bourne and XSI compatible variants of some useful shell functions.
7289 m4_defun([_LT_PROG_XSI_SHELLFNS],
7290 [case $xsi_shell in
7291 yes)
7292 cat << \_LT_EOF >> "$cfgfile"
7293
7294 # func_dirname file append nondir_replacement
7295 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7296 # otherwise set result to NONDIR_REPLACEMENT.
7297 func_dirname ()
7298 {
7299 case ${1} in
7300 */*) func_dirname_result="${1%/*}${2}" ;;
7301 * ) func_dirname_result="${3}" ;;
7302 esac
7303 }
7304
7305 # func_basename file
7306 func_basename ()
7307 {
7308 func_basename_result="${1##*/}"
7309 }
7310
7311 # func_dirname_and_basename file append nondir_replacement
7312 # perform func_basename and func_dirname in a single function
7313 # call:
7314 # dirname: Compute the dirname of FILE. If nonempty,
7315 # add APPEND to the result, otherwise set result
7316 # to NONDIR_REPLACEMENT.
7317 # value returned in "$func_dirname_result"
7318 # basename: Compute filename of FILE.
7319 # value retuned in "$func_basename_result"
7320 # Implementation must be kept synchronized with func_dirname
7321 # and func_basename. For efficiency, we do not delegate to
7322 # those functions but instead duplicate the functionality here.
7323 func_dirname_and_basename ()
7324 {
7325 case ${1} in
7326 */*) func_dirname_result="${1%/*}${2}" ;;
7327 * ) func_dirname_result="${3}" ;;
7328 esac
7329 func_basename_result="${1##*/}"
7330 }
7331
7332 # func_stripname prefix suffix name
7333 # strip PREFIX and SUFFIX off of NAME.
7334 # PREFIX and SUFFIX must not contain globbing or regex special
7335 # characters, hashes, percent signs, but SUFFIX may contain a leading
7336 # dot (in which case that matches only a dot).
7337 func_stripname ()
7338 {
7339 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7340 # positional parameters, so assign one to ordinary parameter first.
7341 func_stripname_result=${3}
7342 func_stripname_result=${func_stripname_result#"${1}"}
7343 func_stripname_result=${func_stripname_result%"${2}"}
7344 }
7345
7346 # func_opt_split
7347 func_opt_split ()
7348 {
7349 func_opt_split_opt=${1%%=*}
7350 func_opt_split_arg=${1#*=}
7351 }
7352
7353 # func_lo2o object
7354 func_lo2o ()
7355 {
7356 case ${1} in
7357 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7358 *) func_lo2o_result=${1} ;;
7359 esac
7360 }
7361
7362 # func_xform libobj-or-source
7363 func_xform ()
7364 {
7365 func_xform_result=${1%.*}.lo
7366 }
7367
7368 # func_arith arithmetic-term...
7369 func_arith ()
7370 {
7371 func_arith_result=$(( $[*] ))
7372 }
7373
7374 # func_len string
7375 # STRING may not start with a hyphen.
7376 func_len ()
7377 {
7378 func_len_result=${#1}
7379 }
7380
7381 _LT_EOF
7382 ;;
7383 *) # Bourne compatible functions.
7384 cat << \_LT_EOF >> "$cfgfile"
7385
7386 # func_dirname file append nondir_replacement
7387 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7388 # otherwise set result to NONDIR_REPLACEMENT.
7389 func_dirname ()
7390 {
7391 # Extract subdirectory from the argument.
7392 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7393 if test "X$func_dirname_result" = "X${1}"; then
7394 func_dirname_result="${3}"
7395 else
7396 func_dirname_result="$func_dirname_result${2}"
7397 fi
7398 }
7399
7400 # func_basename file
7401 func_basename ()
7402 {
7403 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7404 }
7405
7406 dnl func_dirname_and_basename
7407 dnl A portable version of this function is already defined in general.m4sh
7408 dnl so there is no need for it here.
7409
7410 # func_stripname prefix suffix name
7411 # strip PREFIX and SUFFIX off of NAME.
7412 # PREFIX and SUFFIX must not contain globbing or regex special
7413 # characters, hashes, percent signs, but SUFFIX may contain a leading
7414 # dot (in which case that matches only a dot).
7415 # func_strip_suffix prefix name
7416 func_stripname ()
7417 {
7418 case ${2} in
7419 .*) func_stripname_result=`$ECHO "X${3}" \
7420 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7421 *) func_stripname_result=`$ECHO "X${3}" \
7422 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7423 esac
7424 }
7425
7426 # sed scripts:
7427 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7428 my_sed_long_arg='1s/^-[[^=]]*=//'
7429
7430 # func_opt_split
7431 func_opt_split ()
7432 {
7433 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7434 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7435 }
7436
7437 # func_lo2o object
7438 func_lo2o ()
7439 {
7440 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7441 }
7442
7443 # func_xform libobj-or-source
7444 func_xform ()
7445 {
7446 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7447 }
7448
7449 # func_arith arithmetic-term...
7450 func_arith ()
7451 {
7452 func_arith_result=`expr "$[@]"`
7453 }
7454
7455 # func_len string
7456 # STRING may not start with a hyphen.
7457 func_len ()
7458 {
7459 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7460 }
7461
7462 _LT_EOF
7463 esac
7464
7465 case $lt_shell_append in
7466 yes)
7467 cat << \_LT_EOF >> "$cfgfile"
7468
7469 # func_append var value
7470 # Append VALUE to the end of shell variable VAR.
7471 func_append ()
7472 {
7473 eval "$[1]+=\$[2]"
7474 }
7475 _LT_EOF
7476 ;;
7477 *)
7478 cat << \_LT_EOF >> "$cfgfile"
7479
7480 # func_append var value
7481 # Append VALUE to the end of shell variable VAR.
7482 func_append ()
7483 {
7484 eval "$[1]=\$$[1]\$[2]"
7485 }
7486
7487 _LT_EOF
7488 ;;
7489 esac
7490 ])
7491
7492 # Helper functions for option handling. -*- Autoconf -*-
7493 #
7494 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7495 # Written by Gary V. Vaughan, 2004
7496 #
7497 # This file is free software; the Free Software Foundation gives
7498 # unlimited permission to copy and/or distribute it, with or without
7499 # modifications, as long as this notice is preserved.
7500
7501 # serial 6 ltoptions.m4
7502
7503 # This is to help aclocal find these macros, as it can't see m4_define.
7504 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7505
7506
7507 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7508 # ------------------------------------------
7509 m4_define([_LT_MANGLE_OPTION],
7510 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7511
7512
7513 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7514 # ---------------------------------------
7515 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7516 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
7517 # saved as a flag.
7518 m4_define([_LT_SET_OPTION],
7519 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7520 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7521 _LT_MANGLE_DEFUN([$1], [$2]),
7522 [m4_warning([Unknown $1 option `$2'])])[]dnl
7523 ])
7524
7525
7526 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7527 # ------------------------------------------------------------
7528 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7529 m4_define([_LT_IF_OPTION],
7530 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7531
7532
7533 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7534 # -------------------------------------------------------
7535 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7536 # are set.
7537 m4_define([_LT_UNLESS_OPTIONS],
7538 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7539 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7540 [m4_define([$0_found])])])[]dnl
7541 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7542 ])[]dnl
7543 ])
7544
7545
7546 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7547 # ----------------------------------------
7548 # OPTION-LIST is a space-separated list of Libtool options associated
7549 # with MACRO-NAME. If any OPTION has a matching handler declared with
7550 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7551 # the unknown option and exit.
7552 m4_defun([_LT_SET_OPTIONS],
7553 [# Set options
7554 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7555 [_LT_SET_OPTION([$1], _LT_Option)])
7556
7557 m4_if([$1],[LT_INIT],[
7558 dnl
7559 dnl Simply set some default values (i.e off) if boolean options were not
7560 dnl specified:
7561 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7562 ])
7563 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7564 ])
7565 dnl
7566 dnl If no reference was made to various pairs of opposing options, then
7567 dnl we run the default mode handler for the pair. For example, if neither
7568 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7569 dnl archives by default:
7570 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7571 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7572 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7573 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7574 [_LT_ENABLE_FAST_INSTALL])
7575 ])
7576 ])# _LT_SET_OPTIONS
7577
7578
7579
7580 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7581 # -----------------------------------------
7582 m4_define([_LT_MANGLE_DEFUN],
7583 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7584
7585
7586 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7587 # -----------------------------------------------
7588 m4_define([LT_OPTION_DEFINE],
7589 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7590 ])# LT_OPTION_DEFINE
7591
7592
7593 # dlopen
7594 # ------
7595 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7596 ])
7597
7598 AU_DEFUN([AC_LIBTOOL_DLOPEN],
7599 [_LT_SET_OPTION([LT_INIT], [dlopen])
7600 AC_DIAGNOSE([obsolete],
7601 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7602 put the `dlopen' option into LT_INIT's first parameter.])
7603 ])
7604
7605 dnl aclocal-1.4 backwards compatibility:
7606 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7607
7608
7609 # win32-dll
7610 # ---------
7611 # Declare package support for building win32 dll's.
7612 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
7613 [enable_win32_dll=yes
7614
7615 case $host in
7616 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7617 AC_CHECK_TOOL(AS, as, false)
7618 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7619 AC_CHECK_TOOL(OBJDUMP, objdump, false)
7620 ;;
7621 esac
7622
7623 test -z "$AS" && AS=as
7624 _LT_DECL([], [AS], [0], [Assembler program])dnl
7625
7626 test -z "$DLLTOOL" && DLLTOOL=dlltool
7627 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7628
7629 test -z "$OBJDUMP" && OBJDUMP=objdump
7630 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7631 ])# win32-dll
7632
7633 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7634 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7635 _LT_SET_OPTION([LT_INIT], [win32-dll])
7636 AC_DIAGNOSE([obsolete],
7637 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7638 put the `win32-dll' option into LT_INIT's first parameter.])
7639 ])
7640
7641 dnl aclocal-1.4 backwards compatibility:
7642 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7643
7644
7645 # _LT_ENABLE_SHARED([DEFAULT])
7646 # ----------------------------
7647 # implement the --enable-shared flag, and supports the `shared' and
7648 # `disable-shared' LT_INIT options.
7649 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7650 m4_define([_LT_ENABLE_SHARED],
7651 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7652 AC_ARG_ENABLE([shared],
7653 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7654 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7655 [p=${PACKAGE-default}
7656 case $enableval in
7657 yes) enable_shared=yes ;;
7658 no) enable_shared=no ;;
7659 *)
7660 enable_shared=no
7661 # Look at the argument we got. We use all the common list separators.
7662 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7663 for pkg in $enableval; do
7664 IFS="$lt_save_ifs"
7665 if test "X$pkg" = "X$p"; then
7666 enable_shared=yes
7667 fi
7668 done
7669 IFS="$lt_save_ifs"
7670 ;;
7671 esac],
7672 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7673
7674 _LT_DECL([build_libtool_libs], [enable_shared], [0],
7675 [Whether or not to build shared libraries])
7676 ])# _LT_ENABLE_SHARED
7677
7678 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7679 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7680
7681 # Old names:
7682 AC_DEFUN([AC_ENABLE_SHARED],
7683 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7684 ])
7685
7686 AC_DEFUN([AC_DISABLE_SHARED],
7687 [_LT_SET_OPTION([LT_INIT], [disable-shared])
7688 ])
7689
7690 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7691 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7692
7693 dnl aclocal-1.4 backwards compatibility:
7694 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7695 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7696
7697
7698
7699 # _LT_ENABLE_STATIC([DEFAULT])
7700 # ----------------------------
7701 # implement the --enable-static flag, and support the `static' and
7702 # `disable-static' LT_INIT options.
7703 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7704 m4_define([_LT_ENABLE_STATIC],
7705 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7706 AC_ARG_ENABLE([static],
7707 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7708 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7709 [p=${PACKAGE-default}
7710 case $enableval in
7711 yes) enable_static=yes ;;
7712 no) enable_static=no ;;
7713 *)
7714 enable_static=no
7715 # Look at the argument we got. We use all the common list separators.
7716 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7717 for pkg in $enableval; do
7718 IFS="$lt_save_ifs"
7719 if test "X$pkg" = "X$p"; then
7720 enable_static=yes
7721 fi
7722 done
7723 IFS="$lt_save_ifs"
7724 ;;
7725 esac],
7726 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7727
7728 _LT_DECL([build_old_libs], [enable_static], [0],
7729 [Whether or not to build static libraries])
7730 ])# _LT_ENABLE_STATIC
7731
7732 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7733 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7734
7735 # Old names:
7736 AC_DEFUN([AC_ENABLE_STATIC],
7737 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7738 ])
7739
7740 AC_DEFUN([AC_DISABLE_STATIC],
7741 [_LT_SET_OPTION([LT_INIT], [disable-static])
7742 ])
7743
7744 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7745 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7746
7747 dnl aclocal-1.4 backwards compatibility:
7748 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7749 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7750
7751
7752
7753 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
7754 # ----------------------------------
7755 # implement the --enable-fast-install flag, and support the `fast-install'
7756 # and `disable-fast-install' LT_INIT options.
7757 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7758 m4_define([_LT_ENABLE_FAST_INSTALL],
7759 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7760 AC_ARG_ENABLE([fast-install],
7761 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7762 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7763 [p=${PACKAGE-default}
7764 case $enableval in
7765 yes) enable_fast_install=yes ;;
7766 no) enable_fast_install=no ;;
7767 *)
7768 enable_fast_install=no
7769 # Look at the argument we got. We use all the common list separators.
7770 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7771 for pkg in $enableval; do
7772 IFS="$lt_save_ifs"
7773 if test "X$pkg" = "X$p"; then
7774 enable_fast_install=yes
7775 fi
7776 done
7777 IFS="$lt_save_ifs"
7778 ;;
7779 esac],
7780 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7781
7782 _LT_DECL([fast_install], [enable_fast_install], [0],
7783 [Whether or not to optimize for fast installation])dnl
7784 ])# _LT_ENABLE_FAST_INSTALL
7785
7786 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7787 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7788
7789 # Old names:
7790 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7791 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7792 AC_DIAGNOSE([obsolete],
7793 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7794 the `fast-install' option into LT_INIT's first parameter.])
7795 ])
7796
7797 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7798 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7799 AC_DIAGNOSE([obsolete],
7800 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7801 the `disable-fast-install' option into LT_INIT's first parameter.])
7802 ])
7803
7804 dnl aclocal-1.4 backwards compatibility:
7805 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7806 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7807
7808
7809 # _LT_WITH_PIC([MODE])
7810 # --------------------
7811 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
7812 # LT_INIT options.
7813 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7814 m4_define([_LT_WITH_PIC],
7815 [AC_ARG_WITH([pic],
7816 [AS_HELP_STRING([--with-pic],
7817 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7818 [pic_mode="$withval"],
7819 [pic_mode=default])
7820
7821 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7822
7823 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7824 ])# _LT_WITH_PIC
7825
7826 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7827 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7828
7829 # Old name:
7830 AU_DEFUN([AC_LIBTOOL_PICMODE],
7831 [_LT_SET_OPTION([LT_INIT], [pic-only])
7832 AC_DIAGNOSE([obsolete],
7833 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7834 put the `pic-only' option into LT_INIT's first parameter.])
7835 ])
7836
7837 dnl aclocal-1.4 backwards compatibility:
7838 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7839
7840
7841 m4_define([_LTDL_MODE], [])
7842 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7843 [m4_define([_LTDL_MODE], [nonrecursive])])
7844 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
7845 [m4_define([_LTDL_MODE], [recursive])])
7846 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
7847 [m4_define([_LTDL_MODE], [subproject])])
7848
7849 m4_define([_LTDL_TYPE], [])
7850 LT_OPTION_DEFINE([LTDL_INIT], [installable],
7851 [m4_define([_LTDL_TYPE], [installable])])
7852 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
7853 [m4_define([_LTDL_TYPE], [convenience])])
7854
7855 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
7856 #
7857 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7858 # Written by Gary V. Vaughan, 2004
7859 #
7860 # This file is free software; the Free Software Foundation gives
7861 # unlimited permission to copy and/or distribute it, with or without
7862 # modifications, as long as this notice is preserved.
7863
7864 # serial 6 ltsugar.m4
7865
7866 # This is to help aclocal find these macros, as it can't see m4_define.
7867 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7868
7869
7870 # lt_join(SEP, ARG1, [ARG2...])
7871 # -----------------------------
7872 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7873 # associated separator.
7874 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7875 # versions in m4sugar had bugs.
7876 m4_define([lt_join],
7877 [m4_if([$#], [1], [],
7878 [$#], [2], [[$2]],
7879 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7880 m4_define([_lt_join],
7881 [m4_if([$#$2], [2], [],
7882 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7883
7884
7885 # lt_car(LIST)
7886 # lt_cdr(LIST)
7887 # ------------
7888 # Manipulate m4 lists.
7889 # These macros are necessary as long as will still need to support
7890 # Autoconf-2.59 which quotes differently.
7891 m4_define([lt_car], [[$1]])
7892 m4_define([lt_cdr],
7893 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7894 [$#], 1, [],
7895 [m4_dquote(m4_shift($@))])])
7896 m4_define([lt_unquote], $1)
7897
7898
7899 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
7900 # ------------------------------------------
7901 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7902 # Note that neither SEPARATOR nor STRING are expanded; they are appended
7903 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7904 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
7905 # than defined and empty).
7906 #
7907 # This macro is needed until we can rely on Autoconf 2.62, since earlier
7908 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7909 m4_define([lt_append],
7910 [m4_define([$1],
7911 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7912
7913
7914
7915 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7916 # ----------------------------------------------------------
7917 # Produce a SEP delimited list of all paired combinations of elements of
7918 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
7919 # has the form PREFIXmINFIXSUFFIXn.
7920 # Needed until we can rely on m4_combine added in Autoconf 2.62.
7921 m4_define([lt_combine],
7922 [m4_if(m4_eval([$# > 3]), [1],
7923 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7924 [[m4_foreach([_Lt_prefix], [$2],
7925 [m4_foreach([_Lt_suffix],
7926 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7927 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7928
7929
7930 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7931 # -----------------------------------------------------------------------
7932 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7933 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7934 m4_define([lt_if_append_uniq],
7935 [m4_ifdef([$1],
7936 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7937 [lt_append([$1], [$2], [$3])$4],
7938 [$5])],
7939 [lt_append([$1], [$2], [$3])$4])])
7940
7941
7942 # lt_dict_add(DICT, KEY, VALUE)
7943 # -----------------------------
7944 m4_define([lt_dict_add],
7945 [m4_define([$1($2)], [$3])])
7946
7947
7948 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7949 # --------------------------------------------
7950 m4_define([lt_dict_add_subkey],
7951 [m4_define([$1($2:$3)], [$4])])
7952
7953
7954 # lt_dict_fetch(DICT, KEY, [SUBKEY])
7955 # ----------------------------------
7956 m4_define([lt_dict_fetch],
7957 [m4_ifval([$3],
7958 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7959 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7960
7961
7962 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7963 # -----------------------------------------------------------------
7964 m4_define([lt_if_dict_fetch],
7965 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7966 [$5],
7967 [$6])])
7968
7969
7970 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7971 # --------------------------------------------------------------
7972 m4_define([lt_dict_filter],
7973 [m4_if([$5], [], [],
7974 [lt_join(m4_quote(m4_default([$4], [[, ]])),
7975 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7976 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7977 ])
7978
7979 # ltversion.m4 -- version numbers -*- Autoconf -*-
7980 #
7981 # Copyright (C) 2004 Free Software Foundation, Inc.
7982 # Written by Scott James Remnant, 2004
7983 #
7984 # This file is free software; the Free Software Foundation gives
7985 # unlimited permission to copy and/or distribute it, with or without
7986 # modifications, as long as this notice is preserved.
7987
7988 # Generated from ltversion.in.
7989
7990 # serial 3017 ltversion.m4
7991 # This file is part of GNU Libtool
7992
7993 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7994 m4_define([LT_PACKAGE_REVISION], [1.3017])
7995
7996 AC_DEFUN([LTVERSION_VERSION],
7997 [macro_version='2.2.6b'
7998 macro_revision='1.3017'
7999 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8000 _LT_DECL(, macro_revision, 0)
8001 ])
8002
8003 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8004 #
8005 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8006 # Written by Scott James Remnant, 2004.
8007 #
8008 # This file is free software; the Free Software Foundation gives
8009 # unlimited permission to copy and/or distribute it, with or without
8010 # modifications, as long as this notice is preserved.
8011
8012 # serial 4 lt~obsolete.m4
8013
8014 # These exist entirely to fool aclocal when bootstrapping libtool.
8015 #
8016 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8017 # which have later been changed to m4_define as they aren't part of the
8018 # exported API, or moved to Autoconf or Automake where they belong.
8019 #
8020 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8021 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8022 # using a macro with the same name in our local m4/libtool.m4 it'll
8023 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8024 # and doesn't know about Autoconf macros at all.)
8025 #
8026 # So we provide this file, which has a silly filename so it's always
8027 # included after everything else. This provides aclocal with the
8028 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8029 # because those macros already exist, or will be overwritten later.
8030 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8031 #
8032 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8033 # Yes, that means every name once taken will need to remain here until
8034 # we give up compatibility with versions before 1.7, at which point
8035 # we need to keep only those names which we still refer to.
8036
8037 # This is to help aclocal find these macros, as it can't see m4_define.
8038 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8039
8040 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8041 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8042 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8043 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8044 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8045 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8046 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8047 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8048 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8049 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8050 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8051 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8052 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8053 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8054 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8055 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8056 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8057 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8058 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8059 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8060 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8061 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8062 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8063 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8064 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8065 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8066 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8067 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8068 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8069 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8070 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8071 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8072 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8073 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8074 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8075 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8076 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8077 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8078 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8079 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8080 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8081 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8082 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
8083 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8084 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8085 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8086 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8087 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8088 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8089 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8090 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8091 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8092 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8093 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8094 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8095
8096 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8097 #
8098 # This file is free software; the Free Software Foundation
8099 # gives unlimited permission to copy and/or distribute it,
8100 # with or without modifications, as long as this notice is preserved.
146 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
147 # Foundation, Inc.
148 #
149 # This file is free software; the Free Software Foundation
150 # gives unlimited permission to copy and/or distribute it,
151 # with or without modifications, as long as this notice is preserved.
152
153 # serial 1
8101154
8102155 # AM_AUTOMAKE_VERSION(VERSION)
8103156 # ----------------------------
8108161 [am__api_version='1.11'
8109162 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8110163 dnl require some minimum version. Point them to the right macro.
8111 m4_if([$1], [1.11.1], [],
164 m4_if([$1], [1.11.3], [],
8112165 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8113166 ])
8114167
8124177 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8125178 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8126179 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8127 [AM_AUTOMAKE_VERSION([1.11.1])dnl
180 [AM_AUTOMAKE_VERSION([1.11.3])dnl
8128181 m4_ifndef([AC_AUTOCONF_VERSION],
8129182 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8130183 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8131184
8132185 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
8133186
8134 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8135 #
8136 # This file is free software; the Free Software Foundation
8137 # gives unlimited permission to copy and/or distribute it,
8138 # with or without modifications, as long as this notice is preserved.
187 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
188 #
189 # This file is free software; the Free Software Foundation
190 # gives unlimited permission to copy and/or distribute it,
191 # with or without modifications, as long as this notice is preserved.
192
193 # serial 1
8139194
8140195 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8141196 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8218273 Usually this means the macro was only invoked conditionally.]])
8219274 fi])])
8220275
8221 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8222 # Free Software Foundation, Inc.
8223 #
8224 # This file is free software; the Free Software Foundation
8225 # gives unlimited permission to copy and/or distribute it,
8226 # with or without modifications, as long as this notice is preserved.
8227
8228 # serial 10
276 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
277 # 2010, 2011 Free Software Foundation, Inc.
278 #
279 # This file is free software; the Free Software Foundation
280 # gives unlimited permission to copy and/or distribute it,
281 # with or without modifications, as long as this notice is preserved.
282
283 # serial 12
8229284
8230285 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8231286 # written in clear, in which case automake, when reading aclocal.m4,
8265320 # instance it was reported that on HP-UX the gcc test will end up
8266321 # making a dummy file named `D' -- because `-MD' means `put the output
8267322 # in D'.
323 rm -rf conftest.dir
8268324 mkdir conftest.dir
8269325 # Copy depcomp to subdir because otherwise we won't find it if we're
8270326 # using a relative directory.
8329385 break
8330386 fi
8331387 ;;
8332 msvisualcpp | msvcmsys)
388 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
8333389 # This compiler won't grok `-c -o', but also, the minuso test has
8334390 # not run yet. These depmodes are late enough in the game, and
8335391 # so weak that their functioning should not be impacted.
8394450 if test "x$enable_dependency_tracking" != xno; then
8395451 am_depcomp="$ac_aux_dir/depcomp"
8396452 AMDEPBACKSLASH='\'
453 am__nodep='_no'
8397454 fi
8398455 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8399456 AC_SUBST([AMDEPBACKSLASH])dnl
8400457 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
458 AC_SUBST([am__nodep])dnl
459 _AM_SUBST_NOTMAKE([am__nodep])dnl
8401460 ])
8402461
8403462 # Generate code to set up dependency tracking. -*- Autoconf -*-
8631690 done
8632691 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8633692
8634 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
8635 #
8636 # This file is free software; the Free Software Foundation
8637 # gives unlimited permission to copy and/or distribute it,
8638 # with or without modifications, as long as this notice is preserved.
693 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
694 # Inc.
695 #
696 # This file is free software; the Free Software Foundation
697 # gives unlimited permission to copy and/or distribute it,
698 # with or without modifications, as long as this notice is preserved.
699
700 # serial 1
8639701
8640702 # AM_PROG_INSTALL_SH
8641703 # ------------------
8768830 fi
8769831 ])
8770832
8771 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8772 #
8773 # This file is free software; the Free Software Foundation
8774 # gives unlimited permission to copy and/or distribute it,
8775 # with or without modifications, as long as this notice is preserved.
833 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
834 # Inc.
835 #
836 # This file is free software; the Free Software Foundation
837 # gives unlimited permission to copy and/or distribute it,
838 # with or without modifications, as long as this notice is preserved.
839
840 # serial 1
8776841
8777842 # AM_PROG_MKDIR_P
8778843 # ---------------
8796861
8797862 # Helper functions for option handling. -*- Autoconf -*-
8798863
8799 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
8800 #
8801 # This file is free software; the Free Software Foundation
8802 # gives unlimited permission to copy and/or distribute it,
8803 # with or without modifications, as long as this notice is preserved.
8804
8805 # serial 4
864 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
865 # Foundation, Inc.
866 #
867 # This file is free software; the Free Software Foundation
868 # gives unlimited permission to copy and/or distribute it,
869 # with or without modifications, as long as this notice is preserved.
870
871 # serial 5
8806872
8807873 # _AM_MANGLE_OPTION(NAME)
8808874 # -----------------------
8810876 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8811877
8812878 # _AM_SET_OPTION(NAME)
8813 # ------------------------------
879 # --------------------
8814880 # Set option NAME. Presently that only means defining a flag for this option.
8815881 AC_DEFUN([_AM_SET_OPTION],
8816882 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8817883
8818884 # _AM_SET_OPTIONS(OPTIONS)
8819 # ----------------------------------
885 # ------------------------
8820886 # OPTIONS is a space-separated list of Automake options.
8821887 AC_DEFUN([_AM_SET_OPTIONS],
8822888 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8892958 fi
8893959 AC_MSG_RESULT(yes)])
8894960
8895 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8896 #
8897 # This file is free software; the Free Software Foundation
8898 # gives unlimited permission to copy and/or distribute it,
8899 # with or without modifications, as long as this notice is preserved.
961 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
962 #
963 # This file is free software; the Free Software Foundation
964 # gives unlimited permission to copy and/or distribute it,
965 # with or without modifications, as long as this notice is preserved.
966
967 # serial 2
968
969 # AM_SILENT_RULES([DEFAULT])
970 # --------------------------
971 # Enable less verbose build rules; with the default set to DEFAULT
972 # (`yes' being less verbose, `no' or empty being verbose).
973 AC_DEFUN([AM_SILENT_RULES],
974 [AC_ARG_ENABLE([silent-rules],
975 [ --enable-silent-rules less verbose build output (undo: `make V=1')
976 --disable-silent-rules verbose build output (undo: `make V=0')])
977 case $enable_silent_rules in
978 yes) AM_DEFAULT_VERBOSITY=0;;
979 no) AM_DEFAULT_VERBOSITY=1;;
980 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
981 esac
982 dnl
983 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
984 dnl do not support nested variable expansions.
985 dnl See automake bug#9928 and bug#10237.
986 am_make=${MAKE-make}
987 AC_CACHE_CHECK([whether $am_make supports nested variables],
988 [am_cv_make_support_nested_variables],
989 [if AS_ECHO([['TRUE=$(BAR$(V))
990 BAR0=false
991 BAR1=true
992 V=1
993 am__doit:
994 @$(TRUE)
995 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
996 am_cv_make_support_nested_variables=yes
997 else
998 am_cv_make_support_nested_variables=no
999 fi])
1000 if test $am_cv_make_support_nested_variables = yes; then
1001 dnl Using `$V' instead of `$(V)' breaks IRIX make.
1002 AM_V='$(V)'
1003 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1004 else
1005 AM_V=$AM_DEFAULT_VERBOSITY
1006 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1007 fi
1008 AC_SUBST([AM_V])dnl
1009 AM_SUBST_NOTMAKE([AM_V])dnl
1010 AC_SUBST([AM_DEFAULT_V])dnl
1011 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1012 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1013 AM_BACKSLASH='\'
1014 AC_SUBST([AM_BACKSLASH])dnl
1015 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1016 ])
1017
1018 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1019 #
1020 # This file is free software; the Free Software Foundation
1021 # gives unlimited permission to copy and/or distribute it,
1022 # with or without modifications, as long as this notice is preserved.
1023
1024 # serial 1
89001025
89011026 # AM_PROG_INSTALL_STRIP
89021027 # ---------------------
89201045 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
89211046 AC_SUBST([INSTALL_STRIP_PROGRAM])])
89221047
8923 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
8924 #
8925 # This file is free software; the Free Software Foundation
8926 # gives unlimited permission to copy and/or distribute it,
8927 # with or without modifications, as long as this notice is preserved.
8928
8929 # serial 2
1048 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1049 #
1050 # This file is free software; the Free Software Foundation
1051 # gives unlimited permission to copy and/or distribute it,
1052 # with or without modifications, as long as this notice is preserved.
1053
1054 # serial 3
89301055
89311056 # _AM_SUBST_NOTMAKE(VARIABLE)
89321057 # ---------------------------
89351060 AC_DEFUN([_AM_SUBST_NOTMAKE])
89361061
89371062 # AM_SUBST_NOTMAKE(VARIABLE)
8938 # ---------------------------
1063 # --------------------------
89391064 # Public sister of _AM_SUBST_NOTMAKE.
89401065 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
89411066
89421067 # Check how to create a tarball. -*- Autoconf -*-
89431068
8944 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1069 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
89451070 #
89461071 # This file is free software; the Free Software Foundation
89471072 # gives unlimited permission to copy and/or distribute it,
89631088 # a tarball read from stdin.
89641089 # $(am__untar) < result.tar
89651090 AC_DEFUN([_AM_PROG_TAR],
8966 [# Always define AMTAR for backward compatibility.
8967 AM_MISSING_PROG([AMTAR], [tar])
1091 [# Always define AMTAR for backward compatibility. Yes, it's still used
1092 # in the wild :-( We should find a proper way to deprecate it ...
1093 AC_SUBST([AMTAR], ['$${TAR-tar}'])
89681094 m4_if([$1], [v7],
8969 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1095 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
89701096 [m4_case([$1], [ustar],, [pax],,
89711097 [m4_fatal([Unknown tar format])])
89721098 AC_MSG_CHECKING([how to create a $1 tar archive])
90351161 AC_SUBST([am__untar])
90361162 ]) # _AM_PROG_TAR
90371163
1164 m4_include([config/libtool.m4])
1165 m4_include([config/ltoptions.m4])
1166 m4_include([config/ltsugar.m4])
1167 m4_include([config/ltversion.m4])
1168 m4_include([config/lt~obsolete.m4])
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-02-10'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26
27 # Originally written by Per Bothner. Please send patches (context
28 # diff format) to <config-patches@gnu.org> and include a ChangeLog
29 # entry.
30 #
31 # This script attempts to guess a canonical system name similar to
32 # config.sub. If it succeeds, it prints the system name on stdout, and
33 # exits with 0. Otherwise, it exits with 1.
34 #
35 # You can get the latest version of this script from:
36 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
37
38 me=`echo "$0" | sed -e 's,.*/,,'`
39
40 usage="\
41 Usage: $0 [OPTION]
42
43 Output the configuration name of the system \`$me' is run on.
44
45 Operation modes:
46 -h, --help print this help, then exit
47 -t, --time-stamp print date of last modification, then exit
48 -v, --version print version number, then exit
49
50 Report bugs and patches to <config-patches@gnu.org>."
51
52 version="\
53 GNU config.guess ($timestamp)
54
55 Originally written by Per Bothner.
56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
57 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
58 Free Software Foundation, Inc.
59
60 This is free software; see the source for copying conditions. There is NO
61 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
62
63 help="
64 Try \`$me --help' for more information."
65
66 # Parse command line
67 while test $# -gt 0 ; do
68 case $1 in
69 --time-stamp | --time* | -t )
70 echo "$timestamp" ; exit ;;
71 --version | -v )
72 echo "$version" ; exit ;;
73 --help | --h* | -h )
74 echo "$usage"; exit ;;
75 -- ) # Stop option processing
76 shift; break ;;
77 - ) # Use stdin as input.
78 break ;;
79 -* )
80 echo "$me: invalid option $1$help" >&2
81 exit 1 ;;
82 * )
83 break ;;
84 esac
85 done
86
87 if test $# != 0; then
88 echo "$me: too many arguments$help" >&2
89 exit 1
90 fi
91
92 trap 'exit 1' 1 2 15
93
94 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
95 # compiler to aid in system detection is discouraged as it requires
96 # temporary files to be created and, as you can see below, it is a
97 # headache to deal with in a portable fashion.
98
99 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
100 # use `HOST_CC' if defined, but it is deprecated.
101
102 # Portable tmp directory creation inspired by the Autoconf team.
103
104 set_cc_for_build='
105 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
106 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
107 : ${TMPDIR=/tmp} ;
108 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
109 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
110 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
111 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
112 dummy=$tmp/dummy ;
113 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
114 case $CC_FOR_BUILD,$HOST_CC,$CC in
115 ,,) echo "int x;" > $dummy.c ;
116 for c in cc gcc c89 c99 ; do
117 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
118 CC_FOR_BUILD="$c"; break ;
119 fi ;
120 done ;
121 if test x"$CC_FOR_BUILD" = x ; then
122 CC_FOR_BUILD=no_compiler_found ;
123 fi
124 ;;
125 ,,*) CC_FOR_BUILD=$CC ;;
126 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
127 esac ; set_cc_for_build= ;'
128
129 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
130 # (ghazi@noc.rutgers.edu 1994-08-24)
131 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
132 PATH=$PATH:/.attbin ; export PATH
133 fi
134
135 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
136 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
137 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
138 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
139
140 # Note: order is significant - the case branches are not exclusive.
141
142 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
143 *:NetBSD:*:*)
144 # NetBSD (nbsd) targets should (where applicable) match one or
145 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
146 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
147 # switched to ELF, *-*-netbsd* would select the old
148 # object file format. This provides both forward
149 # compatibility and a consistent mechanism for selecting the
150 # object file format.
151 #
152 # Note: NetBSD doesn't particularly care about the vendor
153 # portion of the name. We always set it to "unknown".
154 sysctl="sysctl -n hw.machine_arch"
155 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
156 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
157 case "${UNAME_MACHINE_ARCH}" in
158 armeb) machine=armeb-unknown ;;
159 arm*) machine=arm-unknown ;;
160 sh3el) machine=shl-unknown ;;
161 sh3eb) machine=sh-unknown ;;
162 sh5el) machine=sh5le-unknown ;;
163 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
164 esac
165 # The Operating System including object format, if it has switched
166 # to ELF recently, or will in the future.
167 case "${UNAME_MACHINE_ARCH}" in
168 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
169 eval $set_cc_for_build
170 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
171 | grep -q __ELF__
172 then
173 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
174 # Return netbsd for either. FIX?
175 os=netbsd
176 else
177 os=netbsdelf
178 fi
179 ;;
180 *)
181 os=netbsd
182 ;;
183 esac
184 # The OS release
185 # Debian GNU/NetBSD machines have a different userland, and
186 # thus, need a distinct triplet. However, they do not need
187 # kernel version information, so it can be replaced with a
188 # suitable tag, in the style of linux-gnu.
189 case "${UNAME_VERSION}" in
190 Debian*)
191 release='-gnu'
192 ;;
193 *)
194 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
195 ;;
196 esac
197 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
198 # contains redundant information, the shorter form:
199 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
200 echo "${machine}-${os}${release}"
201 exit ;;
202 *:OpenBSD:*:*)
203 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
204 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
205 exit ;;
206 *:ekkoBSD:*:*)
207 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208 exit ;;
209 *:SolidBSD:*:*)
210 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
211 exit ;;
212 macppc:MirBSD:*:*)
213 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
214 exit ;;
215 *:MirBSD:*:*)
216 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
217 exit ;;
218 alpha:OSF1:*:*)
219 case $UNAME_RELEASE in
220 *4.0)
221 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
222 ;;
223 *5.*)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
225 ;;
226 esac
227 # According to Compaq, /usr/sbin/psrinfo has been available on
228 # OSF/1 and Tru64 systems produced since 1995. I hope that
229 # covers most systems running today. This code pipes the CPU
230 # types through head -n 1, so we only detect the type of CPU 0.
231 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
232 case "$ALPHA_CPU_TYPE" in
233 "EV4 (21064)")
234 UNAME_MACHINE="alpha" ;;
235 "EV4.5 (21064)")
236 UNAME_MACHINE="alpha" ;;
237 "LCA4 (21066/21068)")
238 UNAME_MACHINE="alpha" ;;
239 "EV5 (21164)")
240 UNAME_MACHINE="alphaev5" ;;
241 "EV5.6 (21164A)")
242 UNAME_MACHINE="alphaev56" ;;
243 "EV5.6 (21164PC)")
244 UNAME_MACHINE="alphapca56" ;;
245 "EV5.7 (21164PC)")
246 UNAME_MACHINE="alphapca57" ;;
247 "EV6 (21264)")
248 UNAME_MACHINE="alphaev6" ;;
249 "EV6.7 (21264A)")
250 UNAME_MACHINE="alphaev67" ;;
251 "EV6.8CB (21264C)")
252 UNAME_MACHINE="alphaev68" ;;
253 "EV6.8AL (21264B)")
254 UNAME_MACHINE="alphaev68" ;;
255 "EV6.8CX (21264D)")
256 UNAME_MACHINE="alphaev68" ;;
257 "EV6.9A (21264/EV69A)")
258 UNAME_MACHINE="alphaev69" ;;
259 "EV7 (21364)")
260 UNAME_MACHINE="alphaev7" ;;
261 "EV7.9 (21364A)")
262 UNAME_MACHINE="alphaev79" ;;
263 esac
264 # A Pn.n version is a patched version.
265 # A Vn.n version is a released version.
266 # A Tn.n version is a released field test version.
267 # A Xn.n version is an unreleased experimental baselevel.
268 # 1.2 uses "1.2" for uname -r.
269 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
270 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
271 exitcode=$?
272 trap '' 0
273 exit $exitcode ;;
274 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model?
278 echo alpha-pc-interix
279 exit ;;
280 21064:Windows_NT:50:3)
281 echo alpha-dec-winnt3.5
282 exit ;;
283 Amiga*:UNIX_System_V:4.0:*)
284 echo m68k-unknown-sysv4
285 exit ;;
286 *:[Aa]miga[Oo][Ss]:*:*)
287 echo ${UNAME_MACHINE}-unknown-amigaos
288 exit ;;
289 *:[Mm]orph[Oo][Ss]:*:*)
290 echo ${UNAME_MACHINE}-unknown-morphos
291 exit ;;
292 *:OS/390:*:*)
293 echo i370-ibm-openedition
294 exit ;;
295 *:z/VM:*:*)
296 echo s390-ibm-zvmoe
297 exit ;;
298 *:OS400:*:*)
299 echo powerpc-ibm-os400
300 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*)
305 echo arm-unknown-riscos
306 exit ;;
307 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308 echo hppa1.1-hitachi-hiuxmpp
309 exit ;;
310 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312 if test "`(/bin/universe) 2>/dev/null`" = att ; then
313 echo pyramid-pyramid-sysv3
314 else
315 echo pyramid-pyramid-bsd
316 fi
317 exit ;;
318 NILE*:*:*:dcosx)
319 echo pyramid-pyramid-svr4
320 exit ;;
321 DRS?6000:unix:4.0:6*)
322 echo sparc-icl-nx6
323 exit ;;
324 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325 case `/usr/bin/uname -p` in
326 sparc) echo sparc-icl-nx7; exit ;;
327 esac ;;
328 s390x:SunOS:*:*)
329 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
331 sun4H:SunOS:5.*:*)
332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341 eval $set_cc_for_build
342 SUN_ARCH="i386"
343 # If there is a compiler, see if it is configured for 64-bit objects.
344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345 # This test works for both compilers.
346 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349 grep IS_64BIT_ARCH >/dev/null
350 then
351 SUN_ARCH="x86_64"
352 fi
353 fi
354 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 sun4*:SunOS:6*:*)
357 # According to config.sub, this is the proper way to canonicalize
358 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
359 # it's likely to be more like Solaris than SunOS4.
360 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361 exit ;;
362 sun4*:SunOS:*:*)
363 case "`/usr/bin/arch -k`" in
364 Series*|S4*)
365 UNAME_RELEASE=`uname -v`
366 ;;
367 esac
368 # Japanese Language versions have a version number like `4.1.3-JL'.
369 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
370 exit ;;
371 sun3*:SunOS:*:*)
372 echo m68k-sun-sunos${UNAME_RELEASE}
373 exit ;;
374 sun*:*:4.2BSD:*)
375 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377 case "`/bin/arch`" in
378 sun3)
379 echo m68k-sun-sunos${UNAME_RELEASE}
380 ;;
381 sun4)
382 echo sparc-sun-sunos${UNAME_RELEASE}
383 ;;
384 esac
385 exit ;;
386 aushp:SunOS:*:*)
387 echo sparc-auspex-sunos${UNAME_RELEASE}
388 exit ;;
389 # The situation for MiNT is a little confusing. The machine name
390 # can be virtually everything (everything which is not
391 # "atarist" or "atariste" at least should have a processor
392 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
393 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;;
415 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;;
418 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE}
420 exit ;;
421 RISC*:Mach:*:*)
422 echo mips-dec-mach_bsd4.3
423 exit ;;
424 RISC*:ULTRIX:*:*)
425 echo mips-dec-ultrix${UNAME_RELEASE}
426 exit ;;
427 VAX*:ULTRIX*:*:*)
428 echo vax-dec-ultrix${UNAME_RELEASE}
429 exit ;;
430 2020:CLIX:*:* | 2430:CLIX:*:*)
431 echo clipper-intergraph-clix${UNAME_RELEASE}
432 exit ;;
433 mips:*:*:UMIPS | mips:*:*:RISCos)
434 eval $set_cc_for_build
435 sed 's/^ //' << EOF >$dummy.c
436 #ifdef __cplusplus
437 #include <stdio.h> /* for printf() prototype */
438 int main (int argc, char *argv[]) {
439 #else
440 int main (argc, argv) int argc; char *argv[]; {
441 #endif
442 #if defined (host_mips) && defined (MIPSEB)
443 #if defined (SYSTYPE_SYSV)
444 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445 #endif
446 #if defined (SYSTYPE_SVR4)
447 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448 #endif
449 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451 #endif
452 #endif
453 exit (-1);
454 }
455 EOF
456 $CC_FOR_BUILD -o $dummy $dummy.c &&
457 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
458 SYSTEM_NAME=`$dummy $dummyarg` &&
459 { echo "$SYSTEM_NAME"; exit; }
460 echo mips-mips-riscos${UNAME_RELEASE}
461 exit ;;
462 Motorola:PowerMAX_OS:*:*)
463 echo powerpc-motorola-powermax
464 exit ;;
465 Motorola:*:4.3:PL8-*)
466 echo powerpc-harris-powermax
467 exit ;;
468 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469 echo powerpc-harris-powermax
470 exit ;;
471 Night_Hawk:Power_UNIX:*:*)
472 echo powerpc-harris-powerunix
473 exit ;;
474 m88k:CX/UX:7*:*)
475 echo m88k-harris-cxux7
476 exit ;;
477 m88k:*:4*:R4*)
478 echo m88k-motorola-sysv4
479 exit ;;
480 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3
482 exit ;;
483 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then
491 echo m88k-dg-dgux${UNAME_RELEASE}
492 else
493 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi
495 else
496 echo i586-dg-dgux${UNAME_RELEASE}
497 fi
498 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3
501 exit ;;
502 M88*:*:R3*:*)
503 # Delta 88k system running SVR3
504 echo m88k-motorola-sysv3
505 exit ;;
506 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507 echo m88k-tektronix-sysv3
508 exit ;;
509 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510 echo m68k-tektronix-bsd
511 exit ;;
512 *:IRIX*:*:*)
513 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514 exit ;;
515 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
517 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518 i*86:AIX:*:*)
519 echo i386-ibm-aix
520 exit ;;
521 ia64:AIX:*:*)
522 if [ -x /usr/bin/oslevel ] ; then
523 IBM_REV=`/usr/bin/oslevel`
524 else
525 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526 fi
527 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528 exit ;;
529 *:AIX:2:3)
530 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531 eval $set_cc_for_build
532 sed 's/^ //' << EOF >$dummy.c
533 #include <sys/systemcfg.h>
534
535 main()
536 {
537 if (!__power_pc())
538 exit(1);
539 puts("powerpc-ibm-aix3.2.5");
540 exit(0);
541 }
542 EOF
543 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
544 then
545 echo "$SYSTEM_NAME"
546 else
547 echo rs6000-ibm-aix3.2.5
548 fi
549 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550 echo rs6000-ibm-aix3.2.4
551 else
552 echo rs6000-ibm-aix3.2
553 fi
554 exit ;;
555 *:AIX:*:[4567])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000
559 else
560 IBM_ARCH=powerpc
561 fi
562 if [ -x /usr/bin/oslevel ] ; then
563 IBM_REV=`/usr/bin/oslevel`
564 else
565 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566 fi
567 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
568 exit ;;
569 *:AIX:*:*)
570 echo rs6000-ibm-aix
571 exit ;;
572 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573 echo romp-ibm-bsd4.4
574 exit ;;
575 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
576 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
577 exit ;; # report: romp-ibm BSD 4.3
578 *:BOSX:*:*)
579 echo rs6000-bull-bosx
580 exit ;;
581 DPX/2?00:B.O.S.:*:*)
582 echo m68k-bull-sysv3
583 exit ;;
584 9000/[34]??:4.3bsd:1.*:*)
585 echo m68k-hp-bsd
586 exit ;;
587 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588 echo m68k-hp-bsd4.4
589 exit ;;
590 9000/[34678]??:HP-UX:*:*)
591 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592 case "${UNAME_MACHINE}" in
593 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;;
608 esac
609 fi
610 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c
613
614 #define _HPUX_SOURCE
615 #include <stdlib.h>
616 #include <unistd.h>
617
618 int main ()
619 {
620 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif
623 long cpu = sysconf (_SC_CPU_VERSION);
624
625 switch (cpu)
626 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS)
631 switch (bits)
632 {
633 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break;
636 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break;
639 #endif
640 default: puts ("hppa1.0"); break;
641 }
642 exit (0);
643 }
644 EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;;
648 esac
649 if [ ${HP_ARCH} = "hppa2.0w" ]
650 then
651 eval $set_cc_for_build
652
653 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
654 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
655 # generating 64-bit code. GNU and HP use different nomenclature:
656 #
657 # $ CC_FOR_BUILD=cc ./config.guess
658 # => hppa2.0w-hp-hpux11.23
659 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
660 # => hppa64-hp-hpux11.23
661
662 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
663 grep -q __LP64__
664 then
665 HP_ARCH="hppa2.0w"
666 else
667 HP_ARCH="hppa64"
668 fi
669 fi
670 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
671 exit ;;
672 ia64:HP-UX:*:*)
673 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674 echo ia64-hp-hpux${HPUX_REV}
675 exit ;;
676 3050*:HI-UX:*:*)
677 eval $set_cc_for_build
678 sed 's/^ //' << EOF >$dummy.c
679 #include <unistd.h>
680 int
681 main ()
682 {
683 long cpu = sysconf (_SC_CPU_VERSION);
684 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
686 results, however. */
687 if (CPU_IS_PA_RISC (cpu))
688 {
689 switch (cpu)
690 {
691 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694 default: puts ("hppa-hitachi-hiuxwe2"); break;
695 }
696 }
697 else if (CPU_IS_HP_MC68K (cpu))
698 puts ("m68k-hitachi-hiuxwe2");
699 else puts ("unknown-hitachi-hiuxwe2");
700 exit (0);
701 }
702 EOF
703 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
704 { echo "$SYSTEM_NAME"; exit; }
705 echo unknown-hitachi-hiuxwe2
706 exit ;;
707 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708 echo hppa1.1-hp-bsd
709 exit ;;
710 9000/8??:4.3bsd:*:*)
711 echo hppa1.0-hp-bsd
712 exit ;;
713 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714 echo hppa1.0-hp-mpeix
715 exit ;;
716 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717 echo hppa1.1-hp-osf
718 exit ;;
719 hp8??:OSF1:*:*)
720 echo hppa1.0-hp-osf
721 exit ;;
722 i*86:OSF1:*:*)
723 if [ -x /usr/sbin/sysversion ] ; then
724 echo ${UNAME_MACHINE}-unknown-osf1mk
725 else
726 echo ${UNAME_MACHINE}-unknown-osf1
727 fi
728 exit ;;
729 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites
731 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd
734 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd
738 else echo c2-convex-bsd
739 fi
740 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd
743 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd
746 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd
749 exit ;;
750 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;;
753 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757 -e 's/\.[^.]*$/.X/'
758 exit ;;
759 CRAY*TS:*:*:*)
760 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
761 exit ;;
762 CRAY*T3E:*:*:*)
763 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
764 exit ;;
765 CRAY*SV1:*:*:*)
766 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
767 exit ;;
768 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
777 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;;
785 sparc*:BSD/OS:*:*)
786 echo sparc-unknown-bsdi${UNAME_RELEASE}
787 exit ;;
788 *:BSD/OS:*:*)
789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790 exit ;;
791 *:FreeBSD:*:*)
792 UNAME_PROCESSOR=`/usr/bin/uname -p`
793 case ${UNAME_PROCESSOR} in
794 amd64)
795 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796 *)
797 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 esac
799 exit ;;
800 i*:CYGWIN*:*)
801 echo ${UNAME_MACHINE}-pc-cygwin
802 exit ;;
803 *:MINGW*:*)
804 echo ${UNAME_MACHINE}-pc-mingw32
805 exit ;;
806 i*:MSYS*:*)
807 echo ${UNAME_MACHINE}-pc-msys
808 exit ;;
809 i*:windows32*:*)
810 # uname -m includes "-pc" on this system.
811 echo ${UNAME_MACHINE}-mingw32
812 exit ;;
813 i*:PW*:*)
814 echo ${UNAME_MACHINE}-pc-pw32
815 exit ;;
816 *:Interix*:*)
817 case ${UNAME_MACHINE} in
818 x86)
819 echo i586-pc-interix${UNAME_RELEASE}
820 exit ;;
821 authenticamd | genuineintel | EM64T)
822 echo x86_64-unknown-interix${UNAME_RELEASE}
823 exit ;;
824 IA64)
825 echo ia64-unknown-interix${UNAME_RELEASE}
826 exit ;;
827 esac ;;
828 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
829 echo i${UNAME_MACHINE}-pc-mks
830 exit ;;
831 8664:Windows_NT:*)
832 echo x86_64-pc-mks
833 exit ;;
834 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
835 # How do we know it's Interix rather than the generic POSIX subsystem?
836 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
837 # UNAME_MACHINE based on the output of uname instead of i386?
838 echo i586-pc-interix
839 exit ;;
840 i*:UWIN*:*)
841 echo ${UNAME_MACHINE}-pc-uwin
842 exit ;;
843 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
844 echo x86_64-unknown-cygwin
845 exit ;;
846 p*:CYGWIN*:*)
847 echo powerpcle-unknown-cygwin
848 exit ;;
849 prep*:SunOS:5.*:*)
850 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
851 exit ;;
852 *:GNU:*:*)
853 # the GNU system
854 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
855 exit ;;
856 *:GNU/*:*:*)
857 # other systems with GNU libc and userland
858 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
859 exit ;;
860 i*86:Minix:*:*)
861 echo ${UNAME_MACHINE}-pc-minix
862 exit ;;
863 aarch64:Linux:*:*)
864 echo ${UNAME_MACHINE}-unknown-linux-gnu
865 exit ;;
866 aarch64_be:Linux:*:*)
867 UNAME_MACHINE=aarch64_be
868 echo ${UNAME_MACHINE}-unknown-linux-gnu
869 exit ;;
870 alpha:Linux:*:*)
871 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
872 EV5) UNAME_MACHINE=alphaev5 ;;
873 EV56) UNAME_MACHINE=alphaev56 ;;
874 PCA56) UNAME_MACHINE=alphapca56 ;;
875 PCA57) UNAME_MACHINE=alphapca56 ;;
876 EV6) UNAME_MACHINE=alphaev6 ;;
877 EV67) UNAME_MACHINE=alphaev67 ;;
878 EV68*) UNAME_MACHINE=alphaev68 ;;
879 esac
880 objdump --private-headers /bin/sh | grep -q ld.so.1
881 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
882 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
883 exit ;;
884 arm*:Linux:*:*)
885 eval $set_cc_for_build
886 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
887 | grep -q __ARM_EABI__
888 then
889 echo ${UNAME_MACHINE}-unknown-linux-gnu
890 else
891 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
892 | grep -q __ARM_PCS_VFP
893 then
894 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
895 else
896 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
897 fi
898 fi
899 exit ;;
900 avr32*:Linux:*:*)
901 echo ${UNAME_MACHINE}-unknown-linux-gnu
902 exit ;;
903 cris:Linux:*:*)
904 echo ${UNAME_MACHINE}-axis-linux-gnu
905 exit ;;
906 crisv32:Linux:*:*)
907 echo ${UNAME_MACHINE}-axis-linux-gnu
908 exit ;;
909 frv:Linux:*:*)
910 echo ${UNAME_MACHINE}-unknown-linux-gnu
911 exit ;;
912 hexagon:Linux:*:*)
913 echo ${UNAME_MACHINE}-unknown-linux-gnu
914 exit ;;
915 i*86:Linux:*:*)
916 LIBC=gnu
917 eval $set_cc_for_build
918 sed 's/^ //' << EOF >$dummy.c
919 #ifdef __dietlibc__
920 LIBC=dietlibc
921 #endif
922 EOF
923 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
924 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
925 exit ;;
926 ia64:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-gnu
928 exit ;;
929 m32r*:Linux:*:*)
930 echo ${UNAME_MACHINE}-unknown-linux-gnu
931 exit ;;
932 m68*:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-gnu
934 exit ;;
935 mips:Linux:*:* | mips64:Linux:*:*)
936 eval $set_cc_for_build
937 sed 's/^ //' << EOF >$dummy.c
938 #undef CPU
939 #undef ${UNAME_MACHINE}
940 #undef ${UNAME_MACHINE}el
941 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
942 CPU=${UNAME_MACHINE}el
943 #else
944 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
945 CPU=${UNAME_MACHINE}
946 #else
947 CPU=
948 #endif
949 #endif
950 EOF
951 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
952 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
953 ;;
954 or32:Linux:*:*)
955 echo ${UNAME_MACHINE}-unknown-linux-gnu
956 exit ;;
957 padre:Linux:*:*)
958 echo sparc-unknown-linux-gnu
959 exit ;;
960 parisc64:Linux:*:* | hppa64:Linux:*:*)
961 echo hppa64-unknown-linux-gnu
962 exit ;;
963 parisc:Linux:*:* | hppa:Linux:*:*)
964 # Look for CPU level
965 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
966 PA7*) echo hppa1.1-unknown-linux-gnu ;;
967 PA8*) echo hppa2.0-unknown-linux-gnu ;;
968 *) echo hppa-unknown-linux-gnu ;;
969 esac
970 exit ;;
971 ppc64:Linux:*:*)
972 echo powerpc64-unknown-linux-gnu
973 exit ;;
974 ppc:Linux:*:*)
975 echo powerpc-unknown-linux-gnu
976 exit ;;
977 s390:Linux:*:* | s390x:Linux:*:*)
978 echo ${UNAME_MACHINE}-ibm-linux
979 exit ;;
980 sh64*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-gnu
982 exit ;;
983 sh*:Linux:*:*)
984 echo ${UNAME_MACHINE}-unknown-linux-gnu
985 exit ;;
986 sparc:Linux:*:* | sparc64:Linux:*:*)
987 echo ${UNAME_MACHINE}-unknown-linux-gnu
988 exit ;;
989 tile*:Linux:*:*)
990 echo ${UNAME_MACHINE}-unknown-linux-gnu
991 exit ;;
992 vax:Linux:*:*)
993 echo ${UNAME_MACHINE}-dec-linux-gnu
994 exit ;;
995 x86_64:Linux:*:*)
996 echo ${UNAME_MACHINE}-unknown-linux-gnu
997 exit ;;
998 xtensa*:Linux:*:*)
999 echo ${UNAME_MACHINE}-unknown-linux-gnu
1000 exit ;;
1001 i*86:DYNIX/ptx:4*:*)
1002 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1003 # earlier versions are messed up and put the nodename in both
1004 # sysname and nodename.
1005 echo i386-sequent-sysv4
1006 exit ;;
1007 i*86:UNIX_SV:4.2MP:2.*)
1008 # Unixware is an offshoot of SVR4, but it has its own version
1009 # number series starting with 2...
1010 # I am not positive that other SVR4 systems won't match this,
1011 # I just have to hope. -- rms.
1012 # Use sysv4.2uw... so that sysv4* matches it.
1013 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1014 exit ;;
1015 i*86:OS/2:*:*)
1016 # If we were able to find `uname', then EMX Unix compatibility
1017 # is probably installed.
1018 echo ${UNAME_MACHINE}-pc-os2-emx
1019 exit ;;
1020 i*86:XTS-300:*:STOP)
1021 echo ${UNAME_MACHINE}-unknown-stop
1022 exit ;;
1023 i*86:atheos:*:*)
1024 echo ${UNAME_MACHINE}-unknown-atheos
1025 exit ;;
1026 i*86:syllable:*:*)
1027 echo ${UNAME_MACHINE}-pc-syllable
1028 exit ;;
1029 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1030 echo i386-unknown-lynxos${UNAME_RELEASE}
1031 exit ;;
1032 i*86:*DOS:*:*)
1033 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1034 exit ;;
1035 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1036 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1037 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1038 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1039 else
1040 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1041 fi
1042 exit ;;
1043 i*86:*:5:[678]*)
1044 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1045 case `/bin/uname -X | grep "^Machine"` in
1046 *486*) UNAME_MACHINE=i486 ;;
1047 *Pentium) UNAME_MACHINE=i586 ;;
1048 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1049 esac
1050 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1051 exit ;;
1052 i*86:*:3.2:*)
1053 if test -f /usr/options/cb.name; then
1054 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1055 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1056 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1057 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1058 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1059 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1060 && UNAME_MACHINE=i586
1061 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1062 && UNAME_MACHINE=i686
1063 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1064 && UNAME_MACHINE=i686
1065 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1066 else
1067 echo ${UNAME_MACHINE}-pc-sysv32
1068 fi
1069 exit ;;
1070 pc:*:*:*)
1071 # Left here for compatibility:
1072 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1073 # the processor, so we play safe by assuming i586.
1074 # Note: whatever this is, it MUST be the same as what config.sub
1075 # prints for the "djgpp" host, or else GDB configury will decide that
1076 # this is a cross-build.
1077 echo i586-pc-msdosdjgpp
1078 exit ;;
1079 Intel:Mach:3*:*)
1080 echo i386-pc-mach3
1081 exit ;;
1082 paragon:*:*:*)
1083 echo i860-intel-osf1
1084 exit ;;
1085 i860:*:4.*:*) # i860-SVR4
1086 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1087 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1088 else # Add other i860-SVR4 vendors below as they are discovered.
1089 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1090 fi
1091 exit ;;
1092 mini*:CTIX:SYS*5:*)
1093 # "miniframe"
1094 echo m68010-convergent-sysv
1095 exit ;;
1096 mc68k:UNIX:SYSTEM5:3.51m)
1097 echo m68k-convergent-sysv
1098 exit ;;
1099 M680?0:D-NIX:5.3:*)
1100 echo m68k-diab-dnix
1101 exit ;;
1102 M68*:*:R3V[5678]*:*)
1103 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1104 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1105 OS_REL=''
1106 test -r /etc/.relid \
1107 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1108 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1109 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1112 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1113 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1114 && { echo i486-ncr-sysv4; exit; } ;;
1115 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1116 OS_REL='.3'
1117 test -r /etc/.relid \
1118 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1119 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1120 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1121 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1122 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1123 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1124 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1125 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1126 echo m68k-unknown-lynxos${UNAME_RELEASE}
1127 exit ;;
1128 mc68030:UNIX_System_V:4.*:*)
1129 echo m68k-atari-sysv4
1130 exit ;;
1131 TSUNAMI:LynxOS:2.*:*)
1132 echo sparc-unknown-lynxos${UNAME_RELEASE}
1133 exit ;;
1134 rs6000:LynxOS:2.*:*)
1135 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1136 exit ;;
1137 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1138 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1139 exit ;;
1140 SM[BE]S:UNIX_SV:*:*)
1141 echo mips-dde-sysv${UNAME_RELEASE}
1142 exit ;;
1143 RM*:ReliantUNIX-*:*:*)
1144 echo mips-sni-sysv4
1145 exit ;;
1146 RM*:SINIX-*:*:*)
1147 echo mips-sni-sysv4
1148 exit ;;
1149 *:SINIX-*:*:*)
1150 if uname -p 2>/dev/null >/dev/null ; then
1151 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1152 echo ${UNAME_MACHINE}-sni-sysv4
1153 else
1154 echo ns32k-sni-sysv
1155 fi
1156 exit ;;
1157 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1158 # says <Richard.M.Bartel@ccMail.Census.GOV>
1159 echo i586-unisys-sysv4
1160 exit ;;
1161 *:UNIX_System_V:4*:FTX*)
1162 # From Gerald Hewes <hewes@openmarket.com>.
1163 # How about differentiating between stratus architectures? -djm
1164 echo hppa1.1-stratus-sysv4
1165 exit ;;
1166 *:*:*:FTX*)
1167 # From seanf@swdc.stratus.com.
1168 echo i860-stratus-sysv4
1169 exit ;;
1170 i*86:VOS:*:*)
1171 # From Paul.Green@stratus.com.
1172 echo ${UNAME_MACHINE}-stratus-vos
1173 exit ;;
1174 *:VOS:*:*)
1175 # From Paul.Green@stratus.com.
1176 echo hppa1.1-stratus-vos
1177 exit ;;
1178 mc68*:A/UX:*:*)
1179 echo m68k-apple-aux${UNAME_RELEASE}
1180 exit ;;
1181 news*:NEWS-OS:6*:*)
1182 echo mips-sony-newsos6
1183 exit ;;
1184 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1185 if [ -d /usr/nec ]; then
1186 echo mips-nec-sysv${UNAME_RELEASE}
1187 else
1188 echo mips-unknown-sysv${UNAME_RELEASE}
1189 fi
1190 exit ;;
1191 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1192 echo powerpc-be-beos
1193 exit ;;
1194 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1195 echo powerpc-apple-beos
1196 exit ;;
1197 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1198 echo i586-pc-beos
1199 exit ;;
1200 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1201 echo i586-pc-haiku
1202 exit ;;
1203 SX-4:SUPER-UX:*:*)
1204 echo sx4-nec-superux${UNAME_RELEASE}
1205 exit ;;
1206 SX-5:SUPER-UX:*:*)
1207 echo sx5-nec-superux${UNAME_RELEASE}
1208 exit ;;
1209 SX-6:SUPER-UX:*:*)
1210 echo sx6-nec-superux${UNAME_RELEASE}
1211 exit ;;
1212 SX-7:SUPER-UX:*:*)
1213 echo sx7-nec-superux${UNAME_RELEASE}
1214 exit ;;
1215 SX-8:SUPER-UX:*:*)
1216 echo sx8-nec-superux${UNAME_RELEASE}
1217 exit ;;
1218 SX-8R:SUPER-UX:*:*)
1219 echo sx8r-nec-superux${UNAME_RELEASE}
1220 exit ;;
1221 Power*:Rhapsody:*:*)
1222 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1223 exit ;;
1224 *:Rhapsody:*:*)
1225 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1226 exit ;;
1227 *:Darwin:*:*)
1228 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1229 case $UNAME_PROCESSOR in
1230 i386)
1231 eval $set_cc_for_build
1232 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1233 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1234 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1235 grep IS_64BIT_ARCH >/dev/null
1236 then
1237 UNAME_PROCESSOR="x86_64"
1238 fi
1239 fi ;;
1240 unknown) UNAME_PROCESSOR=powerpc ;;
1241 esac
1242 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1243 exit ;;
1244 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1245 UNAME_PROCESSOR=`uname -p`
1246 if test "$UNAME_PROCESSOR" = "x86"; then
1247 UNAME_PROCESSOR=i386
1248 UNAME_MACHINE=pc
1249 fi
1250 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1251 exit ;;
1252 *:QNX:*:4*)
1253 echo i386-pc-qnx
1254 exit ;;
1255 NEO-?:NONSTOP_KERNEL:*:*)
1256 echo neo-tandem-nsk${UNAME_RELEASE}
1257 exit ;;
1258 NSE-?:NONSTOP_KERNEL:*:*)
1259 echo nse-tandem-nsk${UNAME_RELEASE}
1260 exit ;;
1261 NSR-?:NONSTOP_KERNEL:*:*)
1262 echo nsr-tandem-nsk${UNAME_RELEASE}
1263 exit ;;
1264 *:NonStop-UX:*:*)
1265 echo mips-compaq-nonstopux
1266 exit ;;
1267 BS2000:POSIX*:*:*)
1268 echo bs2000-siemens-sysv
1269 exit ;;
1270 DS/*:UNIX_System_V:*:*)
1271 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1272 exit ;;
1273 *:Plan9:*:*)
1274 # "uname -m" is not consistent, so use $cputype instead. 386
1275 # is converted to i386 for consistency with other x86
1276 # operating systems.
1277 if test "$cputype" = "386"; then
1278 UNAME_MACHINE=i386
1279 else
1280 UNAME_MACHINE="$cputype"
1281 fi
1282 echo ${UNAME_MACHINE}-unknown-plan9
1283 exit ;;
1284 *:TOPS-10:*:*)
1285 echo pdp10-unknown-tops10
1286 exit ;;
1287 *:TENEX:*:*)
1288 echo pdp10-unknown-tenex
1289 exit ;;
1290 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1291 echo pdp10-dec-tops20
1292 exit ;;
1293 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1294 echo pdp10-xkl-tops20
1295 exit ;;
1296 *:TOPS-20:*:*)
1297 echo pdp10-unknown-tops20
1298 exit ;;
1299 *:ITS:*:*)
1300 echo pdp10-unknown-its
1301 exit ;;
1302 SEI:*:*:SEIUX)
1303 echo mips-sei-seiux${UNAME_RELEASE}
1304 exit ;;
1305 *:DragonFly:*:*)
1306 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1307 exit ;;
1308 *:*VMS:*:*)
1309 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1310 case "${UNAME_MACHINE}" in
1311 A*) echo alpha-dec-vms ; exit ;;
1312 I*) echo ia64-dec-vms ; exit ;;
1313 V*) echo vax-dec-vms ; exit ;;
1314 esac ;;
1315 *:XENIX:*:SysV)
1316 echo i386-pc-xenix
1317 exit ;;
1318 i*86:skyos:*:*)
1319 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1320 exit ;;
1321 i*86:rdos:*:*)
1322 echo ${UNAME_MACHINE}-pc-rdos
1323 exit ;;
1324 i*86:AROS:*:*)
1325 echo ${UNAME_MACHINE}-pc-aros
1326 exit ;;
1327 x86_64:VMkernel:*:*)
1328 echo ${UNAME_MACHINE}-unknown-esx
1329 exit ;;
1330 esac
1331
1332 #echo '(No uname command or uname output not recognized.)' 1>&2
1333 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1334
1335 eval $set_cc_for_build
1336 cat >$dummy.c <<EOF
1337 #ifdef _SEQUENT_
1338 # include <sys/types.h>
1339 # include <sys/utsname.h>
1340 #endif
1341 main ()
1342 {
1343 #if defined (sony)
1344 #if defined (MIPSEB)
1345 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1346 I don't know.... */
1347 printf ("mips-sony-bsd\n"); exit (0);
1348 #else
1349 #include <sys/param.h>
1350 printf ("m68k-sony-newsos%s\n",
1351 #ifdef NEWSOS4
1352 "4"
1353 #else
1354 ""
1355 #endif
1356 ); exit (0);
1357 #endif
1358 #endif
1359
1360 #if defined (__arm) && defined (__acorn) && defined (__unix)
1361 printf ("arm-acorn-riscix\n"); exit (0);
1362 #endif
1363
1364 #if defined (hp300) && !defined (hpux)
1365 printf ("m68k-hp-bsd\n"); exit (0);
1366 #endif
1367
1368 #if defined (NeXT)
1369 #if !defined (__ARCHITECTURE__)
1370 #define __ARCHITECTURE__ "m68k"
1371 #endif
1372 int version;
1373 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1374 if (version < 4)
1375 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1376 else
1377 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1378 exit (0);
1379 #endif
1380
1381 #if defined (MULTIMAX) || defined (n16)
1382 #if defined (UMAXV)
1383 printf ("ns32k-encore-sysv\n"); exit (0);
1384 #else
1385 #if defined (CMU)
1386 printf ("ns32k-encore-mach\n"); exit (0);
1387 #else
1388 printf ("ns32k-encore-bsd\n"); exit (0);
1389 #endif
1390 #endif
1391 #endif
1392
1393 #if defined (__386BSD__)
1394 printf ("i386-pc-bsd\n"); exit (0);
1395 #endif
1396
1397 #if defined (sequent)
1398 #if defined (i386)
1399 printf ("i386-sequent-dynix\n"); exit (0);
1400 #endif
1401 #if defined (ns32000)
1402 printf ("ns32k-sequent-dynix\n"); exit (0);
1403 #endif
1404 #endif
1405
1406 #if defined (_SEQUENT_)
1407 struct utsname un;
1408
1409 uname(&un);
1410
1411 if (strncmp(un.version, "V2", 2) == 0) {
1412 printf ("i386-sequent-ptx2\n"); exit (0);
1413 }
1414 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1415 printf ("i386-sequent-ptx1\n"); exit (0);
1416 }
1417 printf ("i386-sequent-ptx\n"); exit (0);
1418
1419 #endif
1420
1421 #if defined (vax)
1422 # if !defined (ultrix)
1423 # include <sys/param.h>
1424 # if defined (BSD)
1425 # if BSD == 43
1426 printf ("vax-dec-bsd4.3\n"); exit (0);
1427 # else
1428 # if BSD == 199006
1429 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1430 # else
1431 printf ("vax-dec-bsd\n"); exit (0);
1432 # endif
1433 # endif
1434 # else
1435 printf ("vax-dec-bsd\n"); exit (0);
1436 # endif
1437 # else
1438 printf ("vax-dec-ultrix\n"); exit (0);
1439 # endif
1440 #endif
1441
1442 #if defined (alliant) && defined (i860)
1443 printf ("i860-alliant-bsd\n"); exit (0);
1444 #endif
1445
1446 exit (1);
1447 }
1448 EOF
1449
1450 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1451 { echo "$SYSTEM_NAME"; exit; }
1452
1453 # Apollos put the system type in the environment.
1454
1455 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1456
1457 # Convex versions that predate uname can use getsysinfo(1)
1458
1459 if [ -x /usr/convex/getsysinfo ]
1460 then
1461 case `getsysinfo -f cpu_type` in
1462 c1*)
1463 echo c1-convex-bsd
1464 exit ;;
1465 c2*)
1466 if getsysinfo -f scalar_acc
1467 then echo c32-convex-bsd
1468 else echo c2-convex-bsd
1469 fi
1470 exit ;;
1471 c34*)
1472 echo c34-convex-bsd
1473 exit ;;
1474 c38*)
1475 echo c38-convex-bsd
1476 exit ;;
1477 c4*)
1478 echo c4-convex-bsd
1479 exit ;;
1480 esac
1481 fi
1482
1483 cat >&2 <<EOF
1484 $0: unable to guess system type
1485
1486 This script, last modified $timestamp, has failed to recognize
1487 the operating system you are using. It is advised that you
1488 download the most up to date version of the config scripts from
1489
1490 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1491 and
1492 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1493
1494 If the version you run ($0) is already up to date, please
1495 send the following data and any information you think might be
1496 pertinent to <config-patches@gnu.org> in order to provide the needed
1497 information to handle your system.
1498
1499 config.guess timestamp = $timestamp
1500
1501 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1502 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1503 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1504 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1505
1506 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1507 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1508
1509 hostinfo = `(hostinfo) 2>/dev/null`
1510 /bin/universe = `(/bin/universe) 2>/dev/null`
1511 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1512 /bin/arch = `(/bin/arch) 2>/dev/null`
1513 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1514 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1515
1516 UNAME_MACHINE = ${UNAME_MACHINE}
1517 UNAME_RELEASE = ${UNAME_RELEASE}
1518 UNAME_SYSTEM = ${UNAME_SYSTEM}
1519 UNAME_VERSION = ${UNAME_VERSION}
1520 EOF
1521
1522 exit 1
1523
1524 # Local variables:
1525 # eval: (add-hook 'write-file-hooks 'time-stamp)
1526 # time-stamp-start: "timestamp='"
1527 # time-stamp-format: "%:y-%02m-%02d"
1528 # time-stamp-end: "'"
1529 # End:
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-02-10'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #
25 # As a special exception to the GNU General Public License, if you
26 # distribute this file as part of a program that contains a
27 # configuration script generated by Autoconf, you may include it under
28 # the same distribution terms that you use for the rest of that program.
29
30
31 # Please send patches to <config-patches@gnu.org>. Submit a context
32 # diff and a properly formatted GNU ChangeLog entry.
33 #
34 # Configuration subroutine to validate and canonicalize a configuration type.
35 # Supply the specified configuration type as an argument.
36 # If it is invalid, we print an error message on stderr and exit with code 1.
37 # Otherwise, we print the canonical config type on stdout and succeed.
38
39 # You can get the latest version of this script from:
40 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
41
42 # This file is supposed to be the same for all GNU packages
43 # and recognize all the CPU types, system types and aliases
44 # that are meaningful with *any* GNU software.
45 # Each package is responsible for reporting which valid configurations
46 # it does not support. The user should be able to distinguish
47 # a failure to support a valid configuration from a meaningless
48 # configuration.
49
50 # The goal of this file is to map all the various variations of a given
51 # machine specification into a single specification in the form:
52 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
53 # or in some cases, the newer four-part form:
54 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
55 # It is wrong to echo any other type of specification.
56
57 me=`echo "$0" | sed -e 's,.*/,,'`
58
59 usage="\
60 Usage: $0 [OPTION] CPU-MFR-OPSYS
61 $0 [OPTION] ALIAS
62
63 Canonicalize a configuration name.
64
65 Operation modes:
66 -h, --help print this help, then exit
67 -t, --time-stamp print date of last modification, then exit
68 -v, --version print version number, then exit
69
70 Report bugs and patches to <config-patches@gnu.org>."
71
72 version="\
73 GNU config.sub ($timestamp)
74
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
76 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
77 Free Software Foundation, Inc.
78
79 This is free software; see the source for copying conditions. There is NO
80 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
81
82 help="
83 Try \`$me --help' for more information."
84
85 # Parse command line
86 while test $# -gt 0 ; do
87 case $1 in
88 --time-stamp | --time* | -t )
89 echo "$timestamp" ; exit ;;
90 --version | -v )
91 echo "$version" ; exit ;;
92 --help | --h* | -h )
93 echo "$usage"; exit ;;
94 -- ) # Stop option processing
95 shift; break ;;
96 - ) # Use stdin as input.
97 break ;;
98 -* )
99 echo "$me: invalid option $1$help"
100 exit 1 ;;
101
102 *local*)
103 # First pass through any local machine types.
104 echo $1
105 exit ;;
106
107 * )
108 break ;;
109 esac
110 done
111
112 case $# in
113 0) echo "$me: missing argument$help" >&2
114 exit 1;;
115 1) ;;
116 *) echo "$me: too many arguments$help" >&2
117 exit 1;;
118 esac
119
120 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
121 # Here we must recognize all the valid KERNEL-OS combinations.
122 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
123 case $maybe_os in
124 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
125 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
126 knetbsd*-gnu* | netbsd*-gnu* | \
127 kopensolaris*-gnu* | \
128 storm-chaos* | os2-emx* | rtmk-nova*)
129 os=-$maybe_os
130 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
131 ;;
132 android-linux)
133 os=-linux-android
134 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
135 ;;
136 *)
137 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
138 if [ $basic_machine != $1 ]
139 then os=`echo $1 | sed 's/.*-/-/'`
140 else os=; fi
141 ;;
142 esac
143
144 ### Let's recognize common machines as not being operating systems so
145 ### that things like config.sub decstation-3100 work. We also
146 ### recognize some manufacturers as not being operating systems, so we
147 ### can provide default operating systems below.
148 case $os in
149 -sun*os*)
150 # Prevent following clause from handling this invalid input.
151 ;;
152 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
153 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
154 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
155 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
156 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
157 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
158 -apple | -axis | -knuth | -cray | -microblaze)
159 os=
160 basic_machine=$1
161 ;;
162 -bluegene*)
163 os=-cnk
164 ;;
165 -sim | -cisco | -oki | -wec | -winbond)
166 os=
167 basic_machine=$1
168 ;;
169 -scout)
170 ;;
171 -wrs)
172 os=-vxworks
173 basic_machine=$1
174 ;;
175 -chorusos*)
176 os=-chorusos
177 basic_machine=$1
178 ;;
179 -chorusrdb)
180 os=-chorusrdb
181 basic_machine=$1
182 ;;
183 -hiux*)
184 os=-hiuxwe2
185 ;;
186 -sco6)
187 os=-sco5v6
188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco5)
191 os=-sco3.2v5
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco4)
195 os=-sco3.2v4
196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco3.2.[4-9]*)
199 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
200 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco3.2v[4-9]*)
203 # Don't forget version if it is 3.2v4 or newer.
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -sco5v6*)
207 # Don't forget version if it is 3.2v4 or newer.
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -sco*)
211 os=-sco3.2v2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -udk*)
215 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216 ;;
217 -isc)
218 os=-isc2.2
219 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220 ;;
221 -clix*)
222 basic_machine=clipper-intergraph
223 ;;
224 -isc*)
225 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
226 ;;
227 -lynx*)
228 os=-lynxos
229 ;;
230 -ptx*)
231 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
232 ;;
233 -windowsnt*)
234 os=`echo $os | sed -e 's/windowsnt/winnt/'`
235 ;;
236 -psos*)
237 os=-psos
238 ;;
239 -mint | -mint[0-9]*)
240 basic_machine=m68k-atari
241 os=-mint
242 ;;
243 esac
244
245 # Decode aliases for certain CPU-COMPANY combinations.
246 case $basic_machine in
247 # Recognize the basic CPU types without company name.
248 # Some are omitted here because they have special meanings below.
249 1750a | 580 \
250 | a29k \
251 | aarch64 | aarch64_be \
252 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
253 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254 | am33_2.0 \
255 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
256 | be32 | be64 \
257 | bfin \
258 | c4x | clipper \
259 | d10v | d30v | dlx | dsp16xx \
260 | epiphany \
261 | fido | fr30 | frv \
262 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
263 | hexagon \
264 | i370 | i860 | i960 | ia64 \
265 | ip2k | iq2000 \
266 | le32 | le64 \
267 | lm32 \
268 | m32c | m32r | m32rle | m68000 | m68k | m88k \
269 | maxq | mb | microblaze | mcore | mep | metag \
270 | mips | mipsbe | mipseb | mipsel | mipsle \
271 | mips16 \
272 | mips64 | mips64el \
273 | mips64octeon | mips64octeonel \
274 | mips64orion | mips64orionel \
275 | mips64r5900 | mips64r5900el \
276 | mips64vr | mips64vrel \
277 | mips64vr4100 | mips64vr4100el \
278 | mips64vr4300 | mips64vr4300el \
279 | mips64vr5000 | mips64vr5000el \
280 | mips64vr5900 | mips64vr5900el \
281 | mipsisa32 | mipsisa32el \
282 | mipsisa32r2 | mipsisa32r2el \
283 | mipsisa64 | mipsisa64el \
284 | mipsisa64r2 | mipsisa64r2el \
285 | mipsisa64sb1 | mipsisa64sb1el \
286 | mipsisa64sr71k | mipsisa64sr71kel \
287 | mipstx39 | mipstx39el \
288 | mn10200 | mn10300 \
289 | moxie \
290 | mt \
291 | msp430 \
292 | nds32 | nds32le | nds32be \
293 | nios | nios2 \
294 | ns16k | ns32k \
295 | open8 \
296 | or32 \
297 | pdp10 | pdp11 | pj | pjl \
298 | powerpc | powerpc64 | powerpc64le | powerpcle \
299 | pyramid \
300 | rl78 | rx \
301 | score \
302 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
303 | sh64 | sh64le \
304 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
305 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
306 | spu \
307 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
308 | ubicom32 \
309 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
310 | we32k \
311 | x86 | xc16x | xstormy16 | xtensa \
312 | z8k | z80)
313 basic_machine=$basic_machine-unknown
314 ;;
315 c54x)
316 basic_machine=tic54x-unknown
317 ;;
318 c55x)
319 basic_machine=tic55x-unknown
320 ;;
321 c6x)
322 basic_machine=tic6x-unknown
323 ;;
324 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
325 basic_machine=$basic_machine-unknown
326 os=-none
327 ;;
328 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
329 ;;
330 ms1)
331 basic_machine=mt-unknown
332 ;;
333
334 strongarm | thumb | xscale)
335 basic_machine=arm-unknown
336 ;;
337 xgate)
338 basic_machine=$basic_machine-unknown
339 os=-none
340 ;;
341 xscaleeb)
342 basic_machine=armeb-unknown
343 ;;
344
345 xscaleel)
346 basic_machine=armel-unknown
347 ;;
348
349 # We use `pc' rather than `unknown'
350 # because (1) that's what they normally are, and
351 # (2) the word "unknown" tends to confuse beginning users.
352 i*86 | x86_64)
353 basic_machine=$basic_machine-pc
354 ;;
355 # Object if more than one company name word.
356 *-*-*)
357 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
358 exit 1
359 ;;
360 # Recognize the basic CPU types with company name.
361 580-* \
362 | a29k-* \
363 | aarch64-* | aarch64_be-* \
364 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
365 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
366 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
367 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
368 | avr-* | avr32-* \
369 | be32-* | be64-* \
370 | bfin-* | bs2000-* \
371 | c[123]* | c30-* | [cjt]90-* | c4x-* \
372 | clipper-* | craynv-* | cydra-* \
373 | d10v-* | d30v-* | dlx-* \
374 | elxsi-* \
375 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
376 | h8300-* | h8500-* \
377 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
378 | hexagon-* \
379 | i*86-* | i860-* | i960-* | ia64-* \
380 | ip2k-* | iq2000-* \
381 | le32-* | le64-* \
382 | lm32-* \
383 | m32c-* | m32r-* | m32rle-* \
384 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
385 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
386 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
387 | mips16-* \
388 | mips64-* | mips64el-* \
389 | mips64octeon-* | mips64octeonel-* \
390 | mips64orion-* | mips64orionel-* \
391 | mips64r5900-* | mips64r5900el-* \
392 | mips64vr-* | mips64vrel-* \
393 | mips64vr4100-* | mips64vr4100el-* \
394 | mips64vr4300-* | mips64vr4300el-* \
395 | mips64vr5000-* | mips64vr5000el-* \
396 | mips64vr5900-* | mips64vr5900el-* \
397 | mipsisa32-* | mipsisa32el-* \
398 | mipsisa32r2-* | mipsisa32r2el-* \
399 | mipsisa64-* | mipsisa64el-* \
400 | mipsisa64r2-* | mipsisa64r2el-* \
401 | mipsisa64sb1-* | mipsisa64sb1el-* \
402 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
403 | mipstx39-* | mipstx39el-* \
404 | mmix-* \
405 | mt-* \
406 | msp430-* \
407 | nds32-* | nds32le-* | nds32be-* \
408 | nios-* | nios2-* \
409 | none-* | np1-* | ns16k-* | ns32k-* \
410 | open8-* \
411 | orion-* \
412 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
413 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
414 | pyramid-* \
415 | rl78-* | romp-* | rs6000-* | rx-* \
416 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
417 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
418 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
419 | sparclite-* \
420 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
421 | tahoe-* \
422 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
423 | tile*-* \
424 | tron-* \
425 | ubicom32-* \
426 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
427 | vax-* \
428 | we32k-* \
429 | x86-* | x86_64-* | xc16x-* | xps100-* \
430 | xstormy16-* | xtensa*-* \
431 | ymp-* \
432 | z8k-* | z80-*)
433 ;;
434 # Recognize the basic CPU types without company name, with glob match.
435 xtensa*)
436 basic_machine=$basic_machine-unknown
437 ;;
438 # Recognize the various machine names and aliases which stand
439 # for a CPU type and a company and sometimes even an OS.
440 386bsd)
441 basic_machine=i386-unknown
442 os=-bsd
443 ;;
444 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
445 basic_machine=m68000-att
446 ;;
447 3b*)
448 basic_machine=we32k-att
449 ;;
450 a29khif)
451 basic_machine=a29k-amd
452 os=-udi
453 ;;
454 abacus)
455 basic_machine=abacus-unknown
456 ;;
457 adobe68k)
458 basic_machine=m68010-adobe
459 os=-scout
460 ;;
461 alliant | fx80)
462 basic_machine=fx80-alliant
463 ;;
464 altos | altos3068)
465 basic_machine=m68k-altos
466 ;;
467 am29k)
468 basic_machine=a29k-none
469 os=-bsd
470 ;;
471 amd64)
472 basic_machine=x86_64-pc
473 ;;
474 amd64-*)
475 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
476 ;;
477 amdahl)
478 basic_machine=580-amdahl
479 os=-sysv
480 ;;
481 amiga | amiga-*)
482 basic_machine=m68k-unknown
483 ;;
484 amigaos | amigados)
485 basic_machine=m68k-unknown
486 os=-amigaos
487 ;;
488 amigaunix | amix)
489 basic_machine=m68k-unknown
490 os=-sysv4
491 ;;
492 apollo68)
493 basic_machine=m68k-apollo
494 os=-sysv
495 ;;
496 apollo68bsd)
497 basic_machine=m68k-apollo
498 os=-bsd
499 ;;
500 aros)
501 basic_machine=i386-pc
502 os=-aros
503 ;;
504 aux)
505 basic_machine=m68k-apple
506 os=-aux
507 ;;
508 balance)
509 basic_machine=ns32k-sequent
510 os=-dynix
511 ;;
512 blackfin)
513 basic_machine=bfin-unknown
514 os=-linux
515 ;;
516 blackfin-*)
517 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
518 os=-linux
519 ;;
520 bluegene*)
521 basic_machine=powerpc-ibm
522 os=-cnk
523 ;;
524 c54x-*)
525 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
526 ;;
527 c55x-*)
528 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
529 ;;
530 c6x-*)
531 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
532 ;;
533 c90)
534 basic_machine=c90-cray
535 os=-unicos
536 ;;
537 cegcc)
538 basic_machine=arm-unknown
539 os=-cegcc
540 ;;
541 convex-c1)
542 basic_machine=c1-convex
543 os=-bsd
544 ;;
545 convex-c2)
546 basic_machine=c2-convex
547 os=-bsd
548 ;;
549 convex-c32)
550 basic_machine=c32-convex
551 os=-bsd
552 ;;
553 convex-c34)
554 basic_machine=c34-convex
555 os=-bsd
556 ;;
557 convex-c38)
558 basic_machine=c38-convex
559 os=-bsd
560 ;;
561 cray | j90)
562 basic_machine=j90-cray
563 os=-unicos
564 ;;
565 craynv)
566 basic_machine=craynv-cray
567 os=-unicosmp
568 ;;
569 cr16 | cr16-*)
570 basic_machine=cr16-unknown
571 os=-elf
572 ;;
573 crds | unos)
574 basic_machine=m68k-crds
575 ;;
576 crisv32 | crisv32-* | etraxfs*)
577 basic_machine=crisv32-axis
578 ;;
579 cris | cris-* | etrax*)
580 basic_machine=cris-axis
581 ;;
582 crx)
583 basic_machine=crx-unknown
584 os=-elf
585 ;;
586 da30 | da30-*)
587 basic_machine=m68k-da30
588 ;;
589 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
590 basic_machine=mips-dec
591 ;;
592 decsystem10* | dec10*)
593 basic_machine=pdp10-dec
594 os=-tops10
595 ;;
596 decsystem20* | dec20*)
597 basic_machine=pdp10-dec
598 os=-tops20
599 ;;
600 delta | 3300 | motorola-3300 | motorola-delta \
601 | 3300-motorola | delta-motorola)
602 basic_machine=m68k-motorola
603 ;;
604 delta88)
605 basic_machine=m88k-motorola
606 os=-sysv3
607 ;;
608 dicos)
609 basic_machine=i686-pc
610 os=-dicos
611 ;;
612 djgpp)
613 basic_machine=i586-pc
614 os=-msdosdjgpp
615 ;;
616 dpx20 | dpx20-*)
617 basic_machine=rs6000-bull
618 os=-bosx
619 ;;
620 dpx2* | dpx2*-bull)
621 basic_machine=m68k-bull
622 os=-sysv3
623 ;;
624 ebmon29k)
625 basic_machine=a29k-amd
626 os=-ebmon
627 ;;
628 elxsi)
629 basic_machine=elxsi-elxsi
630 os=-bsd
631 ;;
632 encore | umax | mmax)
633 basic_machine=ns32k-encore
634 ;;
635 es1800 | OSE68k | ose68k | ose | OSE)
636 basic_machine=m68k-ericsson
637 os=-ose
638 ;;
639 fx2800)
640 basic_machine=i860-alliant
641 ;;
642 genix)
643 basic_machine=ns32k-ns
644 ;;
645 gmicro)
646 basic_machine=tron-gmicro
647 os=-sysv
648 ;;
649 go32)
650 basic_machine=i386-pc
651 os=-go32
652 ;;
653 h3050r* | hiux*)
654 basic_machine=hppa1.1-hitachi
655 os=-hiuxwe2
656 ;;
657 h8300hms)
658 basic_machine=h8300-hitachi
659 os=-hms
660 ;;
661 h8300xray)
662 basic_machine=h8300-hitachi
663 os=-xray
664 ;;
665 h8500hms)
666 basic_machine=h8500-hitachi
667 os=-hms
668 ;;
669 harris)
670 basic_machine=m88k-harris
671 os=-sysv3
672 ;;
673 hp300-*)
674 basic_machine=m68k-hp
675 ;;
676 hp300bsd)
677 basic_machine=m68k-hp
678 os=-bsd
679 ;;
680 hp300hpux)
681 basic_machine=m68k-hp
682 os=-hpux
683 ;;
684 hp3k9[0-9][0-9] | hp9[0-9][0-9])
685 basic_machine=hppa1.0-hp
686 ;;
687 hp9k2[0-9][0-9] | hp9k31[0-9])
688 basic_machine=m68000-hp
689 ;;
690 hp9k3[2-9][0-9])
691 basic_machine=m68k-hp
692 ;;
693 hp9k6[0-9][0-9] | hp6[0-9][0-9])
694 basic_machine=hppa1.0-hp
695 ;;
696 hp9k7[0-79][0-9] | hp7[0-79][0-9])
697 basic_machine=hppa1.1-hp
698 ;;
699 hp9k78[0-9] | hp78[0-9])
700 # FIXME: really hppa2.0-hp
701 basic_machine=hppa1.1-hp
702 ;;
703 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
704 # FIXME: really hppa2.0-hp
705 basic_machine=hppa1.1-hp
706 ;;
707 hp9k8[0-9][13679] | hp8[0-9][13679])
708 basic_machine=hppa1.1-hp
709 ;;
710 hp9k8[0-9][0-9] | hp8[0-9][0-9])
711 basic_machine=hppa1.0-hp
712 ;;
713 hppa-next)
714 os=-nextstep3
715 ;;
716 hppaosf)
717 basic_machine=hppa1.1-hp
718 os=-osf
719 ;;
720 hppro)
721 basic_machine=hppa1.1-hp
722 os=-proelf
723 ;;
724 i370-ibm* | ibm*)
725 basic_machine=i370-ibm
726 ;;
727 i*86v32)
728 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
729 os=-sysv32
730 ;;
731 i*86v4*)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-sysv4
734 ;;
735 i*86v)
736 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
737 os=-sysv
738 ;;
739 i*86sol2)
740 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
741 os=-solaris2
742 ;;
743 i386mach)
744 basic_machine=i386-mach
745 os=-mach
746 ;;
747 i386-vsta | vsta)
748 basic_machine=i386-unknown
749 os=-vsta
750 ;;
751 iris | iris4d)
752 basic_machine=mips-sgi
753 case $os in
754 -irix*)
755 ;;
756 *)
757 os=-irix4
758 ;;
759 esac
760 ;;
761 isi68 | isi)
762 basic_machine=m68k-isi
763 os=-sysv
764 ;;
765 m68knommu)
766 basic_machine=m68k-unknown
767 os=-linux
768 ;;
769 m68knommu-*)
770 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
771 os=-linux
772 ;;
773 m88k-omron*)
774 basic_machine=m88k-omron
775 ;;
776 magnum | m3230)
777 basic_machine=mips-mips
778 os=-sysv
779 ;;
780 merlin)
781 basic_machine=ns32k-utek
782 os=-sysv
783 ;;
784 microblaze)
785 basic_machine=microblaze-xilinx
786 ;;
787 mingw32)
788 basic_machine=i386-pc
789 os=-mingw32
790 ;;
791 mingw32ce)
792 basic_machine=arm-unknown
793 os=-mingw32ce
794 ;;
795 miniframe)
796 basic_machine=m68000-convergent
797 ;;
798 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
799 basic_machine=m68k-atari
800 os=-mint
801 ;;
802 mips3*-*)
803 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
804 ;;
805 mips3*)
806 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
807 ;;
808 monitor)
809 basic_machine=m68k-rom68k
810 os=-coff
811 ;;
812 morphos)
813 basic_machine=powerpc-unknown
814 os=-morphos
815 ;;
816 msdos)
817 basic_machine=i386-pc
818 os=-msdos
819 ;;
820 ms1-*)
821 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
822 ;;
823 msys)
824 basic_machine=i386-pc
825 os=-msys
826 ;;
827 mvs)
828 basic_machine=i370-ibm
829 os=-mvs
830 ;;
831 nacl)
832 basic_machine=le32-unknown
833 os=-nacl
834 ;;
835 ncr3000)
836 basic_machine=i486-ncr
837 os=-sysv4
838 ;;
839 netbsd386)
840 basic_machine=i386-unknown
841 os=-netbsd
842 ;;
843 netwinder)
844 basic_machine=armv4l-rebel
845 os=-linux
846 ;;
847 news | news700 | news800 | news900)
848 basic_machine=m68k-sony
849 os=-newsos
850 ;;
851 news1000)
852 basic_machine=m68030-sony
853 os=-newsos
854 ;;
855 news-3600 | risc-news)
856 basic_machine=mips-sony
857 os=-newsos
858 ;;
859 necv70)
860 basic_machine=v70-nec
861 os=-sysv
862 ;;
863 next | m*-next )
864 basic_machine=m68k-next
865 case $os in
866 -nextstep* )
867 ;;
868 -ns2*)
869 os=-nextstep2
870 ;;
871 *)
872 os=-nextstep3
873 ;;
874 esac
875 ;;
876 nh3000)
877 basic_machine=m68k-harris
878 os=-cxux
879 ;;
880 nh[45]000)
881 basic_machine=m88k-harris
882 os=-cxux
883 ;;
884 nindy960)
885 basic_machine=i960-intel
886 os=-nindy
887 ;;
888 mon960)
889 basic_machine=i960-intel
890 os=-mon960
891 ;;
892 nonstopux)
893 basic_machine=mips-compaq
894 os=-nonstopux
895 ;;
896 np1)
897 basic_machine=np1-gould
898 ;;
899 neo-tandem)
900 basic_machine=neo-tandem
901 ;;
902 nse-tandem)
903 basic_machine=nse-tandem
904 ;;
905 nsr-tandem)
906 basic_machine=nsr-tandem
907 ;;
908 op50n-* | op60c-*)
909 basic_machine=hppa1.1-oki
910 os=-proelf
911 ;;
912 openrisc | openrisc-*)
913 basic_machine=or32-unknown
914 ;;
915 os400)
916 basic_machine=powerpc-ibm
917 os=-os400
918 ;;
919 OSE68000 | ose68000)
920 basic_machine=m68000-ericsson
921 os=-ose
922 ;;
923 os68k)
924 basic_machine=m68k-none
925 os=-os68k
926 ;;
927 pa-hitachi)
928 basic_machine=hppa1.1-hitachi
929 os=-hiuxwe2
930 ;;
931 paragon)
932 basic_machine=i860-intel
933 os=-osf
934 ;;
935 parisc)
936 basic_machine=hppa-unknown
937 os=-linux
938 ;;
939 parisc-*)
940 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
941 os=-linux
942 ;;
943 pbd)
944 basic_machine=sparc-tti
945 ;;
946 pbb)
947 basic_machine=m68k-tti
948 ;;
949 pc532 | pc532-*)
950 basic_machine=ns32k-pc532
951 ;;
952 pc98)
953 basic_machine=i386-pc
954 ;;
955 pc98-*)
956 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
957 ;;
958 pentium | p5 | k5 | k6 | nexgen | viac3)
959 basic_machine=i586-pc
960 ;;
961 pentiumpro | p6 | 6x86 | athlon | athlon_*)
962 basic_machine=i686-pc
963 ;;
964 pentiumii | pentium2 | pentiumiii | pentium3)
965 basic_machine=i686-pc
966 ;;
967 pentium4)
968 basic_machine=i786-pc
969 ;;
970 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
971 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
972 ;;
973 pentiumpro-* | p6-* | 6x86-* | athlon-*)
974 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
975 ;;
976 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
977 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
978 ;;
979 pentium4-*)
980 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
981 ;;
982 pn)
983 basic_machine=pn-gould
984 ;;
985 power) basic_machine=power-ibm
986 ;;
987 ppc | ppcbe) basic_machine=powerpc-unknown
988 ;;
989 ppc-* | ppcbe-*)
990 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
991 ;;
992 ppcle | powerpclittle | ppc-le | powerpc-little)
993 basic_machine=powerpcle-unknown
994 ;;
995 ppcle-* | powerpclittle-*)
996 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
997 ;;
998 ppc64) basic_machine=powerpc64-unknown
999 ;;
1000 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1001 ;;
1002 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1003 basic_machine=powerpc64le-unknown
1004 ;;
1005 ppc64le-* | powerpc64little-*)
1006 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1007 ;;
1008 ps2)
1009 basic_machine=i386-ibm
1010 ;;
1011 pw32)
1012 basic_machine=i586-unknown
1013 os=-pw32
1014 ;;
1015 rdos)
1016 basic_machine=i386-pc
1017 os=-rdos
1018 ;;
1019 rom68k)
1020 basic_machine=m68k-rom68k
1021 os=-coff
1022 ;;
1023 rm[46]00)
1024 basic_machine=mips-siemens
1025 ;;
1026 rtpc | rtpc-*)
1027 basic_machine=romp-ibm
1028 ;;
1029 s390 | s390-*)
1030 basic_machine=s390-ibm
1031 ;;
1032 s390x | s390x-*)
1033 basic_machine=s390x-ibm
1034 ;;
1035 sa29200)
1036 basic_machine=a29k-amd
1037 os=-udi
1038 ;;
1039 sb1)
1040 basic_machine=mipsisa64sb1-unknown
1041 ;;
1042 sb1el)
1043 basic_machine=mipsisa64sb1el-unknown
1044 ;;
1045 sde)
1046 basic_machine=mipsisa32-sde
1047 os=-elf
1048 ;;
1049 sei)
1050 basic_machine=mips-sei
1051 os=-seiux
1052 ;;
1053 sequent)
1054 basic_machine=i386-sequent
1055 ;;
1056 sh)
1057 basic_machine=sh-hitachi
1058 os=-hms
1059 ;;
1060 sh5el)
1061 basic_machine=sh5le-unknown
1062 ;;
1063 sh64)
1064 basic_machine=sh64-unknown
1065 ;;
1066 sparclite-wrs | simso-wrs)
1067 basic_machine=sparclite-wrs
1068 os=-vxworks
1069 ;;
1070 sps7)
1071 basic_machine=m68k-bull
1072 os=-sysv2
1073 ;;
1074 spur)
1075 basic_machine=spur-unknown
1076 ;;
1077 st2000)
1078 basic_machine=m68k-tandem
1079 ;;
1080 stratus)
1081 basic_machine=i860-stratus
1082 os=-sysv4
1083 ;;
1084 strongarm-* | thumb-*)
1085 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1086 ;;
1087 sun2)
1088 basic_machine=m68000-sun
1089 ;;
1090 sun2os3)
1091 basic_machine=m68000-sun
1092 os=-sunos3
1093 ;;
1094 sun2os4)
1095 basic_machine=m68000-sun
1096 os=-sunos4
1097 ;;
1098 sun3os3)
1099 basic_machine=m68k-sun
1100 os=-sunos3
1101 ;;
1102 sun3os4)
1103 basic_machine=m68k-sun
1104 os=-sunos4
1105 ;;
1106 sun4os3)
1107 basic_machine=sparc-sun
1108 os=-sunos3
1109 ;;
1110 sun4os4)
1111 basic_machine=sparc-sun
1112 os=-sunos4
1113 ;;
1114 sun4sol2)
1115 basic_machine=sparc-sun
1116 os=-solaris2
1117 ;;
1118 sun3 | sun3-*)
1119 basic_machine=m68k-sun
1120 ;;
1121 sun4)
1122 basic_machine=sparc-sun
1123 ;;
1124 sun386 | sun386i | roadrunner)
1125 basic_machine=i386-sun
1126 ;;
1127 sv1)
1128 basic_machine=sv1-cray
1129 os=-unicos
1130 ;;
1131 symmetry)
1132 basic_machine=i386-sequent
1133 os=-dynix
1134 ;;
1135 t3e)
1136 basic_machine=alphaev5-cray
1137 os=-unicos
1138 ;;
1139 t90)
1140 basic_machine=t90-cray
1141 os=-unicos
1142 ;;
1143 tile*)
1144 basic_machine=$basic_machine-unknown
1145 os=-linux-gnu
1146 ;;
1147 tx39)
1148 basic_machine=mipstx39-unknown
1149 ;;
1150 tx39el)
1151 basic_machine=mipstx39el-unknown
1152 ;;
1153 toad1)
1154 basic_machine=pdp10-xkl
1155 os=-tops20
1156 ;;
1157 tower | tower-32)
1158 basic_machine=m68k-ncr
1159 ;;
1160 tpf)
1161 basic_machine=s390x-ibm
1162 os=-tpf
1163 ;;
1164 udi29k)
1165 basic_machine=a29k-amd
1166 os=-udi
1167 ;;
1168 ultra3)
1169 basic_machine=a29k-nyu
1170 os=-sym1
1171 ;;
1172 v810 | necv810)
1173 basic_machine=v810-nec
1174 os=-none
1175 ;;
1176 vaxv)
1177 basic_machine=vax-dec
1178 os=-sysv
1179 ;;
1180 vms)
1181 basic_machine=vax-dec
1182 os=-vms
1183 ;;
1184 vpp*|vx|vx-*)
1185 basic_machine=f301-fujitsu
1186 ;;
1187 vxworks960)
1188 basic_machine=i960-wrs
1189 os=-vxworks
1190 ;;
1191 vxworks68)
1192 basic_machine=m68k-wrs
1193 os=-vxworks
1194 ;;
1195 vxworks29k)
1196 basic_machine=a29k-wrs
1197 os=-vxworks
1198 ;;
1199 w65*)
1200 basic_machine=w65-wdc
1201 os=-none
1202 ;;
1203 w89k-*)
1204 basic_machine=hppa1.1-winbond
1205 os=-proelf
1206 ;;
1207 xbox)
1208 basic_machine=i686-pc
1209 os=-mingw32
1210 ;;
1211 xps | xps100)
1212 basic_machine=xps100-honeywell
1213 ;;
1214 xscale-* | xscalee[bl]-*)
1215 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1216 ;;
1217 ymp)
1218 basic_machine=ymp-cray
1219 os=-unicos
1220 ;;
1221 z8k-*-coff)
1222 basic_machine=z8k-unknown
1223 os=-sim
1224 ;;
1225 z80-*-coff)
1226 basic_machine=z80-unknown
1227 os=-sim
1228 ;;
1229 none)
1230 basic_machine=none-none
1231 os=-none
1232 ;;
1233
1234 # Here we handle the default manufacturer of certain CPU types. It is in
1235 # some cases the only manufacturer, in others, it is the most popular.
1236 w89k)
1237 basic_machine=hppa1.1-winbond
1238 ;;
1239 op50n)
1240 basic_machine=hppa1.1-oki
1241 ;;
1242 op60c)
1243 basic_machine=hppa1.1-oki
1244 ;;
1245 romp)
1246 basic_machine=romp-ibm
1247 ;;
1248 mmix)
1249 basic_machine=mmix-knuth
1250 ;;
1251 rs6000)
1252 basic_machine=rs6000-ibm
1253 ;;
1254 vax)
1255 basic_machine=vax-dec
1256 ;;
1257 pdp10)
1258 # there are many clones, so DEC is not a safe bet
1259 basic_machine=pdp10-unknown
1260 ;;
1261 pdp11)
1262 basic_machine=pdp11-dec
1263 ;;
1264 we32k)
1265 basic_machine=we32k-att
1266 ;;
1267 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1268 basic_machine=sh-unknown
1269 ;;
1270 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1271 basic_machine=sparc-sun
1272 ;;
1273 cydra)
1274 basic_machine=cydra-cydrome
1275 ;;
1276 orion)
1277 basic_machine=orion-highlevel
1278 ;;
1279 orion105)
1280 basic_machine=clipper-highlevel
1281 ;;
1282 mac | mpw | mac-mpw)
1283 basic_machine=m68k-apple
1284 ;;
1285 pmac | pmac-mpw)
1286 basic_machine=powerpc-apple
1287 ;;
1288 *-unknown)
1289 # Make sure to match an already-canonicalized machine name.
1290 ;;
1291 *)
1292 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1293 exit 1
1294 ;;
1295 esac
1296
1297 # Here we canonicalize certain aliases for manufacturers.
1298 case $basic_machine in
1299 *-digital*)
1300 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1301 ;;
1302 *-commodore*)
1303 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1304 ;;
1305 *)
1306 ;;
1307 esac
1308
1309 # Decode manufacturer-specific aliases for certain operating systems.
1310
1311 if [ x"$os" != x"" ]
1312 then
1313 case $os in
1314 # First match some system type aliases
1315 # that might get confused with valid system types.
1316 # -solaris* is a basic system type, with this one exception.
1317 -auroraux)
1318 os=-auroraux
1319 ;;
1320 -solaris1 | -solaris1.*)
1321 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1322 ;;
1323 -solaris)
1324 os=-solaris2
1325 ;;
1326 -svr4*)
1327 os=-sysv4
1328 ;;
1329 -unixware*)
1330 os=-sysv4.2uw
1331 ;;
1332 -gnu/linux*)
1333 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1334 ;;
1335 # First accept the basic system types.
1336 # The portable systems comes first.
1337 # Each alternative MUST END IN A *, to match a version number.
1338 # -sysv* is not here because it comes later, after sysvr4.
1339 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1340 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1341 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1342 | -sym* | -kopensolaris* \
1343 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1344 | -aos* | -aros* \
1345 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1346 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1347 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1348 | -openbsd* | -solidbsd* \
1349 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1350 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1351 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1352 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1353 | -chorusos* | -chorusrdb* | -cegcc* \
1354 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1355 | -mingw32* | -linux-gnu* | -linux-android* \
1356 | -linux-newlib* | -linux-uclibc* \
1357 | -uxpv* | -beos* | -mpeix* | -udk* \
1358 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1359 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1360 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1361 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1362 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1363 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1364 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1365 # Remember, each alternative MUST END IN *, to match a version number.
1366 ;;
1367 -qnx*)
1368 case $basic_machine in
1369 x86-* | i*86-*)
1370 ;;
1371 *)
1372 os=-nto$os
1373 ;;
1374 esac
1375 ;;
1376 -nto-qnx*)
1377 ;;
1378 -nto*)
1379 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1380 ;;
1381 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1382 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1383 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1384 ;;
1385 -mac*)
1386 os=`echo $os | sed -e 's|mac|macos|'`
1387 ;;
1388 -linux-dietlibc)
1389 os=-linux-dietlibc
1390 ;;
1391 -linux*)
1392 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1393 ;;
1394 -sunos5*)
1395 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1396 ;;
1397 -sunos6*)
1398 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1399 ;;
1400 -opened*)
1401 os=-openedition
1402 ;;
1403 -os400*)
1404 os=-os400
1405 ;;
1406 -wince*)
1407 os=-wince
1408 ;;
1409 -osfrose*)
1410 os=-osfrose
1411 ;;
1412 -osf*)
1413 os=-osf
1414 ;;
1415 -utek*)
1416 os=-bsd
1417 ;;
1418 -dynix*)
1419 os=-bsd
1420 ;;
1421 -acis*)
1422 os=-aos
1423 ;;
1424 -atheos*)
1425 os=-atheos
1426 ;;
1427 -syllable*)
1428 os=-syllable
1429 ;;
1430 -386bsd)
1431 os=-bsd
1432 ;;
1433 -ctix* | -uts*)
1434 os=-sysv
1435 ;;
1436 -nova*)
1437 os=-rtmk-nova
1438 ;;
1439 -ns2 )
1440 os=-nextstep2
1441 ;;
1442 -nsk*)
1443 os=-nsk
1444 ;;
1445 # Preserve the version number of sinix5.
1446 -sinix5.*)
1447 os=`echo $os | sed -e 's|sinix|sysv|'`
1448 ;;
1449 -sinix*)
1450 os=-sysv4
1451 ;;
1452 -tpf*)
1453 os=-tpf
1454 ;;
1455 -triton*)
1456 os=-sysv3
1457 ;;
1458 -oss*)
1459 os=-sysv3
1460 ;;
1461 -svr4)
1462 os=-sysv4
1463 ;;
1464 -svr3)
1465 os=-sysv3
1466 ;;
1467 -sysvr4)
1468 os=-sysv4
1469 ;;
1470 # This must come after -sysvr4.
1471 -sysv*)
1472 ;;
1473 -ose*)
1474 os=-ose
1475 ;;
1476 -es1800*)
1477 os=-ose
1478 ;;
1479 -xenix)
1480 os=-xenix
1481 ;;
1482 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1483 os=-mint
1484 ;;
1485 -aros*)
1486 os=-aros
1487 ;;
1488 -kaos*)
1489 os=-kaos
1490 ;;
1491 -zvmoe)
1492 os=-zvmoe
1493 ;;
1494 -dicos*)
1495 os=-dicos
1496 ;;
1497 -nacl*)
1498 ;;
1499 -none)
1500 ;;
1501 *)
1502 # Get rid of the `-' at the beginning of $os.
1503 os=`echo $os | sed 's/[^-]*-//'`
1504 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1505 exit 1
1506 ;;
1507 esac
1508 else
1509
1510 # Here we handle the default operating systems that come with various machines.
1511 # The value should be what the vendor currently ships out the door with their
1512 # machine or put another way, the most popular os provided with the machine.
1513
1514 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1515 # "-sun"), then you have to tell the case statement up towards the top
1516 # that MANUFACTURER isn't an operating system. Otherwise, code above
1517 # will signal an error saying that MANUFACTURER isn't an operating
1518 # system, and we'll never get to this point.
1519
1520 case $basic_machine in
1521 score-*)
1522 os=-elf
1523 ;;
1524 spu-*)
1525 os=-elf
1526 ;;
1527 *-acorn)
1528 os=-riscix1.2
1529 ;;
1530 arm*-rebel)
1531 os=-linux
1532 ;;
1533 arm*-semi)
1534 os=-aout
1535 ;;
1536 c4x-* | tic4x-*)
1537 os=-coff
1538 ;;
1539 tic54x-*)
1540 os=-coff
1541 ;;
1542 tic55x-*)
1543 os=-coff
1544 ;;
1545 tic6x-*)
1546 os=-coff
1547 ;;
1548 # This must come before the *-dec entry.
1549 pdp10-*)
1550 os=-tops20
1551 ;;
1552 pdp11-*)
1553 os=-none
1554 ;;
1555 *-dec | vax-*)
1556 os=-ultrix4.2
1557 ;;
1558 m68*-apollo)
1559 os=-domain
1560 ;;
1561 i386-sun)
1562 os=-sunos4.0.2
1563 ;;
1564 m68000-sun)
1565 os=-sunos3
1566 ;;
1567 m68*-cisco)
1568 os=-aout
1569 ;;
1570 mep-*)
1571 os=-elf
1572 ;;
1573 mips*-cisco)
1574 os=-elf
1575 ;;
1576 mips*-*)
1577 os=-elf
1578 ;;
1579 or32-*)
1580 os=-coff
1581 ;;
1582 *-tti) # must be before sparc entry or we get the wrong os.
1583 os=-sysv3
1584 ;;
1585 sparc-* | *-sun)
1586 os=-sunos4.1.1
1587 ;;
1588 *-be)
1589 os=-beos
1590 ;;
1591 *-haiku)
1592 os=-haiku
1593 ;;
1594 *-ibm)
1595 os=-aix
1596 ;;
1597 *-knuth)
1598 os=-mmixware
1599 ;;
1600 *-wec)
1601 os=-proelf
1602 ;;
1603 *-winbond)
1604 os=-proelf
1605 ;;
1606 *-oki)
1607 os=-proelf
1608 ;;
1609 *-hp)
1610 os=-hpux
1611 ;;
1612 *-hitachi)
1613 os=-hiux
1614 ;;
1615 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1616 os=-sysv
1617 ;;
1618 *-cbm)
1619 os=-amigaos
1620 ;;
1621 *-dg)
1622 os=-dgux
1623 ;;
1624 *-dolphin)
1625 os=-sysv3
1626 ;;
1627 m68k-ccur)
1628 os=-rtu
1629 ;;
1630 m88k-omron*)
1631 os=-luna
1632 ;;
1633 *-next )
1634 os=-nextstep
1635 ;;
1636 *-sequent)
1637 os=-ptx
1638 ;;
1639 *-crds)
1640 os=-unos
1641 ;;
1642 *-ns)
1643 os=-genix
1644 ;;
1645 i370-*)
1646 os=-mvs
1647 ;;
1648 *-next)
1649 os=-nextstep3
1650 ;;
1651 *-gould)
1652 os=-sysv
1653 ;;
1654 *-highlevel)
1655 os=-bsd
1656 ;;
1657 *-encore)
1658 os=-bsd
1659 ;;
1660 *-sgi)
1661 os=-irix
1662 ;;
1663 *-siemens)
1664 os=-sysv4
1665 ;;
1666 *-masscomp)
1667 os=-rtu
1668 ;;
1669 f30[01]-fujitsu | f700-fujitsu)
1670 os=-uxpv
1671 ;;
1672 *-rom68k)
1673 os=-coff
1674 ;;
1675 *-*bug)
1676 os=-coff
1677 ;;
1678 *-apple)
1679 os=-macos
1680 ;;
1681 *-atari*)
1682 os=-mint
1683 ;;
1684 *)
1685 os=-none
1686 ;;
1687 esac
1688 fi
1689
1690 # Here we handle the case where we know the os, and the CPU type, but not the
1691 # manufacturer. We pick the logical manufacturer.
1692 vendor=unknown
1693 case $basic_machine in
1694 *-unknown)
1695 case $os in
1696 -riscix*)
1697 vendor=acorn
1698 ;;
1699 -sunos*)
1700 vendor=sun
1701 ;;
1702 -cnk*|-aix*)
1703 vendor=ibm
1704 ;;
1705 -beos*)
1706 vendor=be
1707 ;;
1708 -hpux*)
1709 vendor=hp
1710 ;;
1711 -mpeix*)
1712 vendor=hp
1713 ;;
1714 -hiux*)
1715 vendor=hitachi
1716 ;;
1717 -unos*)
1718 vendor=crds
1719 ;;
1720 -dgux*)
1721 vendor=dg
1722 ;;
1723 -luna*)
1724 vendor=omron
1725 ;;
1726 -genix*)
1727 vendor=ns
1728 ;;
1729 -mvs* | -opened*)
1730 vendor=ibm
1731 ;;
1732 -os400*)
1733 vendor=ibm
1734 ;;
1735 -ptx*)
1736 vendor=sequent
1737 ;;
1738 -tpf*)
1739 vendor=ibm
1740 ;;
1741 -vxsim* | -vxworks* | -windiss*)
1742 vendor=wrs
1743 ;;
1744 -aux*)
1745 vendor=apple
1746 ;;
1747 -hms*)
1748 vendor=hitachi
1749 ;;
1750 -mpw* | -macos*)
1751 vendor=apple
1752 ;;
1753 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1754 vendor=atari
1755 ;;
1756 -vos*)
1757 vendor=stratus
1758 ;;
1759 esac
1760 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1761 ;;
1762 esac
1763
1764 echo $basic_machine$os
1765 exit
1766
1767 # Local variables:
1768 # eval: (add-hook 'write-file-hooks 'time-stamp)
1769 # time-stamp-start: "timestamp='"
1770 # time-stamp-format: "%:y-%02m-%02d"
1771 # time-stamp-end: "'"
1772 # End:
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2011-12-04.11; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
6 # 2011 Free Software Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
27
28 case $1 in
29 '')
30 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
31 exit 1;
32 ;;
33 -h | --h*)
34 cat <<\EOF
35 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
36
37 Run PROGRAMS ARGS to compile a file, generating dependencies
38 as side-effects.
39
40 Environment variables:
41 depmode Dependency tracking mode.
42 source Source file read by `PROGRAMS ARGS'.
43 object Object file output by `PROGRAMS ARGS'.
44 DEPDIR directory where to store dependencies.
45 depfile Dependency file to output.
46 tmpdepfile Temporary file to use when outputting dependencies.
47 libtool Whether libtool is used (yes/no).
48
49 Report bugs to <bug-automake@gnu.org>.
50 EOF
51 exit $?
52 ;;
53 -v | --v*)
54 echo "depcomp $scriptversion"
55 exit $?
56 ;;
57 esac
58
59 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
60 echo "depcomp: Variables source, object and depmode must be set" 1>&2
61 exit 1
62 fi
63
64 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
65 depfile=${depfile-`echo "$object" |
66 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
67 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
68
69 rm -f "$tmpdepfile"
70
71 # Some modes work just like other modes, but use different flags. We
72 # parameterize here, but still list the modes in the big case below,
73 # to make depend.m4 easier to write. Note that we *cannot* use a case
74 # here, because this file can only contain one case statement.
75 if test "$depmode" = hp; then
76 # HP compiler uses -M and no extra arg.
77 gccflag=-M
78 depmode=gcc
79 fi
80
81 if test "$depmode" = dashXmstdout; then
82 # This is just like dashmstdout with a different argument.
83 dashmflag=-xM
84 depmode=dashmstdout
85 fi
86
87 cygpath_u="cygpath -u -f -"
88 if test "$depmode" = msvcmsys; then
89 # This is just like msvisualcpp but w/o cygpath translation.
90 # Just convert the backslash-escaped backslashes to single forward
91 # slashes to satisfy depend.m4
92 cygpath_u='sed s,\\\\,/,g'
93 depmode=msvisualcpp
94 fi
95
96 if test "$depmode" = msvc7msys; then
97 # This is just like msvc7 but w/o cygpath translation.
98 # Just convert the backslash-escaped backslashes to single forward
99 # slashes to satisfy depend.m4
100 cygpath_u='sed s,\\\\,/,g'
101 depmode=msvc7
102 fi
103
104 case "$depmode" in
105 gcc3)
106 ## gcc 3 implements dependency tracking that does exactly what
107 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
108 ## it if -MD -MP comes after the -MF stuff. Hmm.
109 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
110 ## the command line argument order; so add the flags where they
111 ## appear in depend2.am. Note that the slowdown incurred here
112 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
113 for arg
114 do
115 case $arg in
116 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
117 *) set fnord "$@" "$arg" ;;
118 esac
119 shift # fnord
120 shift # $arg
121 done
122 "$@"
123 stat=$?
124 if test $stat -eq 0; then :
125 else
126 rm -f "$tmpdepfile"
127 exit $stat
128 fi
129 mv "$tmpdepfile" "$depfile"
130 ;;
131
132 gcc)
133 ## There are various ways to get dependency output from gcc. Here's
134 ## why we pick this rather obscure method:
135 ## - Don't want to use -MD because we'd like the dependencies to end
136 ## up in a subdir. Having to rename by hand is ugly.
137 ## (We might end up doing this anyway to support other compilers.)
138 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
139 ## -MM, not -M (despite what the docs say).
140 ## - Using -M directly means running the compiler twice (even worse
141 ## than renaming).
142 if test -z "$gccflag"; then
143 gccflag=-MD,
144 fi
145 "$@" -Wp,"$gccflag$tmpdepfile"
146 stat=$?
147 if test $stat -eq 0; then :
148 else
149 rm -f "$tmpdepfile"
150 exit $stat
151 fi
152 rm -f "$depfile"
153 echo "$object : \\" > "$depfile"
154 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
155 ## The second -e expression handles DOS-style file names with drive letters.
156 sed -e 's/^[^:]*: / /' \
157 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
158 ## This next piece of magic avoids the `deleted header file' problem.
159 ## The problem is that when a header file which appears in a .P file
160 ## is deleted, the dependency causes make to die (because there is
161 ## typically no way to rebuild the header). We avoid this by adding
162 ## dummy dependencies for each header file. Too bad gcc doesn't do
163 ## this for us directly.
164 tr ' ' '
165 ' < "$tmpdepfile" |
166 ## Some versions of gcc put a space before the `:'. On the theory
167 ## that the space means something, we add a space to the output as
168 ## well. hp depmode also adds that space, but also prefixes the VPATH
169 ## to the object. Take care to not repeat it in the output.
170 ## Some versions of the HPUX 10.20 sed can't process this invocation
171 ## correctly. Breaking it into two sed invocations is a workaround.
172 sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
173 | sed -e 's/$/ :/' >> "$depfile"
174 rm -f "$tmpdepfile"
175 ;;
176
177 hp)
178 # This case exists only to let depend.m4 do its work. It works by
179 # looking at the text of this script. This case will never be run,
180 # since it is checked for above.
181 exit 1
182 ;;
183
184 sgi)
185 if test "$libtool" = yes; then
186 "$@" "-Wp,-MDupdate,$tmpdepfile"
187 else
188 "$@" -MDupdate "$tmpdepfile"
189 fi
190 stat=$?
191 if test $stat -eq 0; then :
192 else
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 rm -f "$depfile"
197
198 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
199 echo "$object : \\" > "$depfile"
200
201 # Clip off the initial element (the dependent). Don't try to be
202 # clever and replace this with sed code, as IRIX sed won't handle
203 # lines with more than a fixed number of characters (4096 in
204 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
205 # the IRIX cc adds comments like `#:fec' to the end of the
206 # dependency line.
207 tr ' ' '
208 ' < "$tmpdepfile" \
209 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
210 tr '
211 ' ' ' >> "$depfile"
212 echo >> "$depfile"
213
214 # The second pass generates a dummy entry for each header file.
215 tr ' ' '
216 ' < "$tmpdepfile" \
217 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
218 >> "$depfile"
219 else
220 # The sourcefile does not contain any dependencies, so just
221 # store a dummy comment line, to avoid errors with the Makefile
222 # "include basename.Plo" scheme.
223 echo "#dummy" > "$depfile"
224 fi
225 rm -f "$tmpdepfile"
226 ;;
227
228 aix)
229 # The C for AIX Compiler uses -M and outputs the dependencies
230 # in a .u file. In older versions, this file always lives in the
231 # current directory. Also, the AIX compiler puts `$object:' at the
232 # start of each line; $object doesn't have directory information.
233 # Version 6 uses the directory in both cases.
234 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
235 test "x$dir" = "x$object" && dir=
236 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
237 if test "$libtool" = yes; then
238 tmpdepfile1=$dir$base.u
239 tmpdepfile2=$base.u
240 tmpdepfile3=$dir.libs/$base.u
241 "$@" -Wc,-M
242 else
243 tmpdepfile1=$dir$base.u
244 tmpdepfile2=$dir$base.u
245 tmpdepfile3=$dir$base.u
246 "$@" -M
247 fi
248 stat=$?
249
250 if test $stat -eq 0; then :
251 else
252 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
253 exit $stat
254 fi
255
256 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
257 do
258 test -f "$tmpdepfile" && break
259 done
260 if test -f "$tmpdepfile"; then
261 # Each line is of the form `foo.o: dependent.h'.
262 # Do two passes, one to just change these to
263 # `$object: dependent.h' and one to simply `dependent.h:'.
264 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
265 # That's a tab and a space in the [].
266 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
267 else
268 # The sourcefile does not contain any dependencies, so just
269 # store a dummy comment line, to avoid errors with the Makefile
270 # "include basename.Plo" scheme.
271 echo "#dummy" > "$depfile"
272 fi
273 rm -f "$tmpdepfile"
274 ;;
275
276 icc)
277 # Intel's C compiler understands `-MD -MF file'. However on
278 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
279 # ICC 7.0 will fill foo.d with something like
280 # foo.o: sub/foo.c
281 # foo.o: sub/foo.h
282 # which is wrong. We want:
283 # sub/foo.o: sub/foo.c
284 # sub/foo.o: sub/foo.h
285 # sub/foo.c:
286 # sub/foo.h:
287 # ICC 7.1 will output
288 # foo.o: sub/foo.c sub/foo.h
289 # and will wrap long lines using \ :
290 # foo.o: sub/foo.c ... \
291 # sub/foo.h ... \
292 # ...
293
294 "$@" -MD -MF "$tmpdepfile"
295 stat=$?
296 if test $stat -eq 0; then :
297 else
298 rm -f "$tmpdepfile"
299 exit $stat
300 fi
301 rm -f "$depfile"
302 # Each line is of the form `foo.o: dependent.h',
303 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
304 # Do two passes, one to just change these to
305 # `$object: dependent.h' and one to simply `dependent.h:'.
306 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
307 # Some versions of the HPUX 10.20 sed can't process this invocation
308 # correctly. Breaking it into two sed invocations is a workaround.
309 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
310 sed -e 's/$/ :/' >> "$depfile"
311 rm -f "$tmpdepfile"
312 ;;
313
314 hp2)
315 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
316 # compilers, which have integrated preprocessors. The correct option
317 # to use with these is +Maked; it writes dependencies to a file named
318 # 'foo.d', which lands next to the object file, wherever that
319 # happens to be.
320 # Much of this is similar to the tru64 case; see comments there.
321 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
322 test "x$dir" = "x$object" && dir=
323 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
324 if test "$libtool" = yes; then
325 tmpdepfile1=$dir$base.d
326 tmpdepfile2=$dir.libs/$base.d
327 "$@" -Wc,+Maked
328 else
329 tmpdepfile1=$dir$base.d
330 tmpdepfile2=$dir$base.d
331 "$@" +Maked
332 fi
333 stat=$?
334 if test $stat -eq 0; then :
335 else
336 rm -f "$tmpdepfile1" "$tmpdepfile2"
337 exit $stat
338 fi
339
340 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
341 do
342 test -f "$tmpdepfile" && break
343 done
344 if test -f "$tmpdepfile"; then
345 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
346 # Add `dependent.h:' lines.
347 sed -ne '2,${
348 s/^ *//
349 s/ \\*$//
350 s/$/:/
351 p
352 }' "$tmpdepfile" >> "$depfile"
353 else
354 echo "#dummy" > "$depfile"
355 fi
356 rm -f "$tmpdepfile" "$tmpdepfile2"
357 ;;
358
359 tru64)
360 # The Tru64 compiler uses -MD to generate dependencies as a side
361 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
362 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
363 # dependencies in `foo.d' instead, so we check for that too.
364 # Subdirectories are respected.
365 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
366 test "x$dir" = "x$object" && dir=
367 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
368
369 if test "$libtool" = yes; then
370 # With Tru64 cc, shared objects can also be used to make a
371 # static library. This mechanism is used in libtool 1.4 series to
372 # handle both shared and static libraries in a single compilation.
373 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
374 #
375 # With libtool 1.5 this exception was removed, and libtool now
376 # generates 2 separate objects for the 2 libraries. These two
377 # compilations output dependencies in $dir.libs/$base.o.d and
378 # in $dir$base.o.d. We have to check for both files, because
379 # one of the two compilations can be disabled. We should prefer
380 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
381 # automatically cleaned when .libs/ is deleted, while ignoring
382 # the former would cause a distcleancheck panic.
383 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
384 tmpdepfile2=$dir$base.o.d # libtool 1.5
385 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
386 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
387 "$@" -Wc,-MD
388 else
389 tmpdepfile1=$dir$base.o.d
390 tmpdepfile2=$dir$base.d
391 tmpdepfile3=$dir$base.d
392 tmpdepfile4=$dir$base.d
393 "$@" -MD
394 fi
395
396 stat=$?
397 if test $stat -eq 0; then :
398 else
399 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
400 exit $stat
401 fi
402
403 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
404 do
405 test -f "$tmpdepfile" && break
406 done
407 if test -f "$tmpdepfile"; then
408 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
409 # That's a tab and a space in the [].
410 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
411 else
412 echo "#dummy" > "$depfile"
413 fi
414 rm -f "$tmpdepfile"
415 ;;
416
417 msvc7)
418 if test "$libtool" = yes; then
419 showIncludes=-Wc,-showIncludes
420 else
421 showIncludes=-showIncludes
422 fi
423 "$@" $showIncludes > "$tmpdepfile"
424 stat=$?
425 grep -v '^Note: including file: ' "$tmpdepfile"
426 if test "$stat" = 0; then :
427 else
428 rm -f "$tmpdepfile"
429 exit $stat
430 fi
431 rm -f "$depfile"
432 echo "$object : \\" > "$depfile"
433 # The first sed program below extracts the file names and escapes
434 # backslashes for cygpath. The second sed program outputs the file
435 # name when reading, but also accumulates all include files in the
436 # hold buffer in order to output them again at the end. This only
437 # works with sed implementations that can handle large buffers.
438 sed < "$tmpdepfile" -n '
439 /^Note: including file: *\(.*\)/ {
440 s//\1/
441 s/\\/\\\\/g
442 p
443 }' | $cygpath_u | sort -u | sed -n '
444 s/ /\\ /g
445 s/\(.*\)/ \1 \\/p
446 s/.\(.*\) \\/\1:/
447 H
448 $ {
449 s/.*/ /
450 G
451 p
452 }' >> "$depfile"
453 rm -f "$tmpdepfile"
454 ;;
455
456 msvc7msys)
457 # This case exists only to let depend.m4 do its work. It works by
458 # looking at the text of this script. This case will never be run,
459 # since it is checked for above.
460 exit 1
461 ;;
462
463 #nosideeffect)
464 # This comment above is used by automake to tell side-effect
465 # dependency tracking mechanisms from slower ones.
466
467 dashmstdout)
468 # Important note: in order to support this mode, a compiler *must*
469 # always write the preprocessed file to stdout, regardless of -o.
470 "$@" || exit $?
471
472 # Remove the call to Libtool.
473 if test "$libtool" = yes; then
474 while test "X$1" != 'X--mode=compile'; do
475 shift
476 done
477 shift
478 fi
479
480 # Remove `-o $object'.
481 IFS=" "
482 for arg
483 do
484 case $arg in
485 -o)
486 shift
487 ;;
488 $object)
489 shift
490 ;;
491 *)
492 set fnord "$@" "$arg"
493 shift # fnord
494 shift # $arg
495 ;;
496 esac
497 done
498
499 test -z "$dashmflag" && dashmflag=-M
500 # Require at least two characters before searching for `:'
501 # in the target name. This is to cope with DOS-style filenames:
502 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
503 "$@" $dashmflag |
504 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
505 rm -f "$depfile"
506 cat < "$tmpdepfile" > "$depfile"
507 tr ' ' '
508 ' < "$tmpdepfile" | \
509 ## Some versions of the HPUX 10.20 sed can't process this invocation
510 ## correctly. Breaking it into two sed invocations is a workaround.
511 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
512 rm -f "$tmpdepfile"
513 ;;
514
515 dashXmstdout)
516 # This case only exists to satisfy depend.m4. It is never actually
517 # run, as this mode is specially recognized in the preamble.
518 exit 1
519 ;;
520
521 makedepend)
522 "$@" || exit $?
523 # Remove any Libtool call
524 if test "$libtool" = yes; then
525 while test "X$1" != 'X--mode=compile'; do
526 shift
527 done
528 shift
529 fi
530 # X makedepend
531 shift
532 cleared=no eat=no
533 for arg
534 do
535 case $cleared in
536 no)
537 set ""; shift
538 cleared=yes ;;
539 esac
540 if test $eat = yes; then
541 eat=no
542 continue
543 fi
544 case "$arg" in
545 -D*|-I*)
546 set fnord "$@" "$arg"; shift ;;
547 # Strip any option that makedepend may not understand. Remove
548 # the object too, otherwise makedepend will parse it as a source file.
549 -arch)
550 eat=yes ;;
551 -*|$object)
552 ;;
553 *)
554 set fnord "$@" "$arg"; shift ;;
555 esac
556 done
557 obj_suffix=`echo "$object" | sed 's/^.*\././'`
558 touch "$tmpdepfile"
559 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
560 rm -f "$depfile"
561 # makedepend may prepend the VPATH from the source file name to the object.
562 # No need to regex-escape $object, excess matching of '.' is harmless.
563 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
564 sed '1,2d' "$tmpdepfile" | tr ' ' '
565 ' | \
566 ## Some versions of the HPUX 10.20 sed can't process this invocation
567 ## correctly. Breaking it into two sed invocations is a workaround.
568 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
569 rm -f "$tmpdepfile" "$tmpdepfile".bak
570 ;;
571
572 cpp)
573 # Important note: in order to support this mode, a compiler *must*
574 # always write the preprocessed file to stdout.
575 "$@" || exit $?
576
577 # Remove the call to Libtool.
578 if test "$libtool" = yes; then
579 while test "X$1" != 'X--mode=compile'; do
580 shift
581 done
582 shift
583 fi
584
585 # Remove `-o $object'.
586 IFS=" "
587 for arg
588 do
589 case $arg in
590 -o)
591 shift
592 ;;
593 $object)
594 shift
595 ;;
596 *)
597 set fnord "$@" "$arg"
598 shift # fnord
599 shift # $arg
600 ;;
601 esac
602 done
603
604 "$@" -E |
605 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
606 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
607 sed '$ s: \\$::' > "$tmpdepfile"
608 rm -f "$depfile"
609 echo "$object : \\" > "$depfile"
610 cat < "$tmpdepfile" >> "$depfile"
611 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
612 rm -f "$tmpdepfile"
613 ;;
614
615 msvisualcpp)
616 # Important note: in order to support this mode, a compiler *must*
617 # always write the preprocessed file to stdout.
618 "$@" || exit $?
619
620 # Remove the call to Libtool.
621 if test "$libtool" = yes; then
622 while test "X$1" != 'X--mode=compile'; do
623 shift
624 done
625 shift
626 fi
627
628 IFS=" "
629 for arg
630 do
631 case "$arg" in
632 -o)
633 shift
634 ;;
635 $object)
636 shift
637 ;;
638 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
639 set fnord "$@"
640 shift
641 shift
642 ;;
643 *)
644 set fnord "$@" "$arg"
645 shift
646 shift
647 ;;
648 esac
649 done
650 "$@" -E 2>/dev/null |
651 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
652 rm -f "$depfile"
653 echo "$object : \\" > "$depfile"
654 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
655 echo " " >> "$depfile"
656 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
657 rm -f "$tmpdepfile"
658 ;;
659
660 msvcmsys)
661 # This case exists only to let depend.m4 do its work. It works by
662 # looking at the text of this script. This case will never be run,
663 # since it is checked for above.
664 exit 1
665 ;;
666
667 none)
668 exec "$@"
669 ;;
670
671 *)
672 echo "Unknown depmode $depmode" 1>&2
673 exit 1
674 ;;
675 esac
676
677 exit 0
678
679 # Local Variables:
680 # mode: shell-script
681 # sh-indentation: 2
682 # eval: (add-hook 'write-file-hooks 'time-stamp)
683 # time-stamp-start: "scriptversion="
684 # time-stamp-format: "%:y-%02m-%02d.%02H"
685 # time-stamp-time-zone: "UTC"
686 # time-stamp-end: "; # UTC"
687 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 shift;;
159
160 -T) no_target_directory=true;;
161
162 --version) echo "$0 $scriptversion"; exit $?;;
163
164 --) shift
165 break;;
166
167 -*) echo "$0: invalid option: $1" >&2
168 exit 1;;
169
170 *) break;;
171 esac
172 shift
173 done
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 done
189 fi
190
191 if test $# -eq 0; then
192 if test -z "$dir_arg"; then
193 echo "$0: no input file specified." >&2
194 exit 1
195 fi
196 # It's OK to call `install-sh -d' without argument.
197 # This can happen when creating conditional directories.
198 exit 0
199 fi
200
201 if test -z "$dir_arg"; then
202 trap '(exit $?); exit' 1 2 13 15
203
204 # Set umask so as not to create temps with too-generous modes.
205 # However, 'strip' requires both read and write access to temps.
206 case $mode in
207 # Optimize common cases.
208 *644) cp_umask=133;;
209 *755) cp_umask=22;;
210
211 *[0-7])
212 if test -z "$stripcmd"; then
213 u_plus_rw=
214 else
215 u_plus_rw='% 200'
216 fi
217 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
218 *)
219 if test -z "$stripcmd"; then
220 u_plus_rw=
221 else
222 u_plus_rw=,u+rw
223 fi
224 cp_umask=$mode$u_plus_rw;;
225 esac
226 fi
227
228 for src
229 do
230 # Protect names starting with `-'.
231 case $src in
232 -*) src=./$src;;
233 esac
234
235 if test -n "$dir_arg"; then
236 dst=$src
237 dstdir=$dst
238 test -d "$dstdir"
239 dstdir_status=$?
240 else
241
242 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
243 # might cause directories to be created, which would be especially bad
244 # if $src (and thus $dsttmp) contains '*'.
245 if test ! -f "$src" && test ! -d "$src"; then
246 echo "$0: $src does not exist." >&2
247 exit 1
248 fi
249
250 if test -z "$dst_arg"; then
251 echo "$0: no destination specified." >&2
252 exit 1
253 fi
254
255 dst=$dst_arg
256 # Protect names starting with `-'.
257 case $dst in
258 -*) dst=./$dst;;
259 esac
260
261 # If destination is a directory, append the input filename; won't work
262 # if double slashes aren't ignored.
263 if test -d "$dst"; then
264 if test -n "$no_target_directory"; then
265 echo "$0: $dst_arg: Is a directory" >&2
266 exit 1
267 fi
268 dstdir=$dst
269 dst=$dstdir/`basename "$src"`
270 dstdir_status=0
271 else
272 # Prefer dirname, but fall back on a substitute if dirname fails.
273 dstdir=`
274 (dirname "$dst") 2>/dev/null ||
275 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
276 X"$dst" : 'X\(//\)[^/]' \| \
277 X"$dst" : 'X\(//\)$' \| \
278 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
279 echo X"$dst" |
280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
281 s//\1/
282 q
283 }
284 /^X\(\/\/\)[^/].*/{
285 s//\1/
286 q
287 }
288 /^X\(\/\/\)$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\).*/{
293 s//\1/
294 q
295 }
296 s/.*/./; q'
297 `
298
299 test -d "$dstdir"
300 dstdir_status=$?
301 fi
302 fi
303
304 obsolete_mkdir_used=false
305
306 if test $dstdir_status != 0; then
307 case $posix_mkdir in
308 '')
309 # Create intermediate dirs using mode 755 as modified by the umask.
310 # This is like FreeBSD 'install' as of 1997-10-28.
311 umask=`umask`
312 case $stripcmd.$umask in
313 # Optimize common cases.
314 *[2367][2367]) mkdir_umask=$umask;;
315 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
316
317 *[0-7])
318 mkdir_umask=`expr $umask + 22 \
319 - $umask % 100 % 40 + $umask % 20 \
320 - $umask % 10 % 4 + $umask % 2
321 `;;
322 *) mkdir_umask=$umask,go-w;;
323 esac
324
325 # With -d, create the new directory with the user-specified mode.
326 # Otherwise, rely on $mkdir_umask.
327 if test -n "$dir_arg"; then
328 mkdir_mode=-m$mode
329 else
330 mkdir_mode=
331 fi
332
333 posix_mkdir=false
334 case $umask in
335 *[123567][0-7][0-7])
336 # POSIX mkdir -p sets u+wx bits regardless of umask, which
337 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
338 ;;
339 *)
340 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
341 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
342
343 if (umask $mkdir_umask &&
344 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
345 then
346 if test -z "$dir_arg" || {
347 # Check for POSIX incompatibilities with -m.
348 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
349 # other-writeable bit of parent directory when it shouldn't.
350 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
351 ls_ld_tmpdir=`ls -ld "$tmpdir"`
352 case $ls_ld_tmpdir in
353 d????-?r-*) different_mode=700;;
354 d????-?--*) different_mode=755;;
355 *) false;;
356 esac &&
357 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
358 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
359 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
360 }
361 }
362 then posix_mkdir=:
363 fi
364 rmdir "$tmpdir/d" "$tmpdir"
365 else
366 # Remove any dirs left behind by ancient mkdir implementations.
367 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
368 fi
369 trap '' 0;;
370 esac;;
371 esac
372
373 if
374 $posix_mkdir && (
375 umask $mkdir_umask &&
376 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
377 )
378 then :
379 else
380
381 # The umask is ridiculous, or mkdir does not conform to POSIX,
382 # or it failed possibly due to a race condition. Create the
383 # directory the slow way, step by step, checking for races as we go.
384
385 case $dstdir in
386 /*) prefix='/';;
387 -*) prefix='./';;
388 *) prefix='';;
389 esac
390
391 eval "$initialize_posix_glob"
392
393 oIFS=$IFS
394 IFS=/
395 $posix_glob set -f
396 set fnord $dstdir
397 shift
398 $posix_glob set +f
399 IFS=$oIFS
400
401 prefixes=
402
403 for d
404 do
405 test -z "$d" && continue
406
407 prefix=$prefix$d
408 if test -d "$prefix"; then
409 prefixes=
410 else
411 if $posix_mkdir; then
412 (umask=$mkdir_umask &&
413 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414 # Don't fail if two instances are running concurrently.
415 test -d "$prefix" || exit 1
416 else
417 case $prefix in
418 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) qprefix=$prefix;;
420 esac
421 prefixes="$prefixes '$qprefix'"
422 fi
423 fi
424 prefix=$prefix/
425 done
426
427 if test -n "$prefixes"; then
428 # Don't fail if two instances are running concurrently.
429 (umask $mkdir_umask &&
430 eval "\$doit_exec \$mkdirprog $prefixes") ||
431 test -d "$dstdir" || exit 1
432 obsolete_mkdir_used=true
433 fi
434 fi
435 fi
436
437 if test -n "$dir_arg"; then
438 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442 else
443
444 # Make a couple of temp file names in the proper directory.
445 dsttmp=$dstdir/_inst.$$_
446 rmtmp=$dstdir/_rm.$$_
447
448 # Trap to clean up those temp files at exit.
449 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
451 # Copy the file name to the temp name.
452 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
454 # and set any options; do chmod last to preserve setuid bits.
455 #
456 # If any of these fail, we abort the whole thing. If we want to
457 # ignore errors from any of these, just make sure not to ignore
458 # errors from the above "$doit $cpprog $src $dsttmp" command.
459 #
460 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
461 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
462 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
463 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
465 # If -C, don't bother to copy if it wouldn't change the file.
466 if $copy_on_change &&
467 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
468 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
469
470 eval "$initialize_posix_glob" &&
471 $posix_glob set -f &&
472 set X $old && old=:$2:$4:$5:$6 &&
473 set X $new && new=:$2:$4:$5:$6 &&
474 $posix_glob set +f &&
475
476 test "$old" = "$new" &&
477 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
478 then
479 rm -f "$dsttmp"
480 else
481 # Rename the file to the real destination.
482 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
483
484 # The rename failed, perhaps because mv can't rename something else
485 # to itself, or perhaps because mv is so ancient that it does not
486 # support -f.
487 {
488 # Now remove or move aside any old file at destination location.
489 # We try this two ways since rm can't unlink itself on some
490 # systems and the destination file might be busy for other
491 # reasons. In this case, the final cleanup might fail but the new
492 # file should still install successfully.
493 {
494 test ! -f "$dst" ||
495 $doit $rmcmd -f "$dst" 2>/dev/null ||
496 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
497 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
498 } ||
499 { echo "$0: cannot unlink or rename $dst" >&2
500 (exit 1); exit 1
501 }
502 } &&
503
504 # Now rename the file to the real destination.
505 $doit $mvcmd "$dsttmp" "$dst"
506 }
507 fi || exit 1
508
509 trap '' 0
510 fi
511 done
512
513 # Local variables:
514 # eval: (add-hook 'write-file-hooks 'time-stamp)
515 # time-stamp-start: "scriptversion="
516 # time-stamp-format: "%:y-%02m-%02d.%02H"
517 # time-stamp-time-zone: "UTC"
518 # time-stamp-end: "; # UTC"
519 # End:
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
4 # Foundation, Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14 # Foundation, Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
149 dnl
150 _LT_DECL([], [host_alias], [0], [The host system])dnl
151 _LT_DECL([], [host], [0])dnl
152 _LT_DECL([], [host_os], [0])dnl
153 dnl
154 _LT_DECL([], [build_alias], [0], [The build system])dnl
155 _LT_DECL([], [build], [0])dnl
156 _LT_DECL([], [build_os], [0])dnl
157 dnl
158 AC_REQUIRE([AC_PROG_CC])dnl
159 AC_REQUIRE([LT_PATH_LD])dnl
160 AC_REQUIRE([LT_PATH_NM])dnl
161 dnl
162 AC_REQUIRE([AC_PROG_LN_S])dnl
163 test -z "$LN_S" && LN_S="ln -s"
164 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
165 dnl
166 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
167 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
168 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
169 dnl
170 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
171 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
172 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
173 m4_require([_LT_CMD_RELOAD])dnl
174 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
175 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
176 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
177 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
178 m4_require([_LT_WITH_SYSROOT])dnl
179
180 _LT_CONFIG_LIBTOOL_INIT([
181 # See if we are running on zsh, and set the options which allow our
182 # commands through without removal of \ escapes INIT.
183 if test -n "\${ZSH_VERSION+set}" ; then
184 setopt NO_GLOB_SUBST
185 fi
186 ])
187 if test -n "${ZSH_VERSION+set}" ; then
188 setopt NO_GLOB_SUBST
189 fi
190
191 _LT_CHECK_OBJDIR
192
193 m4_require([_LT_TAG_COMPILER])dnl
194
195 case $host_os in
196 aix3*)
197 # AIX sometimes has problems with the GCC collect2 program. For some
198 # reason, if we set the COLLECT_NAMES environment variable, the problems
199 # vanish in a puff of smoke.
200 if test "X${COLLECT_NAMES+set}" != Xset; then
201 COLLECT_NAMES=
202 export COLLECT_NAMES
203 fi
204 ;;
205 esac
206
207 # Global variables:
208 ofile=libtool
209 can_build_shared=yes
210
211 # All known linkers require a `.a' archive for static linking (except MSVC,
212 # which needs '.lib').
213 libext=a
214
215 with_gnu_ld="$lt_cv_prog_gnu_ld"
216
217 old_CC="$CC"
218 old_CFLAGS="$CFLAGS"
219
220 # Set sane defaults for various variables
221 test -z "$CC" && CC=cc
222 test -z "$LTCC" && LTCC=$CC
223 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
224 test -z "$LD" && LD=ld
225 test -z "$ac_objext" && ac_objext=o
226
227 _LT_CC_BASENAME([$compiler])
228
229 # Only perform the check for file, if the check method requires it
230 test -z "$MAGIC_CMD" && MAGIC_CMD=file
231 case $deplibs_check_method in
232 file_magic*)
233 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
234 _LT_PATH_MAGIC
235 fi
236 ;;
237 esac
238
239 # Use C for the default configuration in the libtool script
240 LT_SUPPORTED_TAG([CC])
241 _LT_LANG_C_CONFIG
242 _LT_LANG_DEFAULT_CONFIG
243 _LT_CONFIG_COMMANDS
244 ])# _LT_SETUP
245
246
247 # _LT_PREPARE_SED_QUOTE_VARS
248 # --------------------------
249 # Define a few sed substitution that help us do robust quoting.
250 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
251 [# Backslashify metacharacters that are still active within
252 # double-quoted strings.
253 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
254
255 # Same as above, but do not quote variable references.
256 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
257
258 # Sed substitution to delay expansion of an escaped shell variable in a
259 # double_quote_subst'ed string.
260 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
261
262 # Sed substitution to delay expansion of an escaped single quote.
263 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
264
265 # Sed substitution to avoid accidental globbing in evaled expressions
266 no_glob_subst='s/\*/\\\*/g'
267 ])
268
269 # _LT_PROG_LTMAIN
270 # ---------------
271 # Note that this code is called both from `configure', and `config.status'
272 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
274 # so we pass a copy along to make sure it has a sensible value anyway.
275 m4_defun([_LT_PROG_LTMAIN],
276 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
277 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
278 ltmain="$ac_aux_dir/ltmain.sh"
279 ])# _LT_PROG_LTMAIN
280
281
282 ## ------------------------------------- ##
283 ## Accumulate code for creating libtool. ##
284 ## ------------------------------------- ##
285
286 # So that we can recreate a full libtool script including additional
287 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
288 # in macros and then make a single call at the end using the `libtool'
289 # label.
290
291
292 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
293 # ----------------------------------------
294 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
295 m4_define([_LT_CONFIG_LIBTOOL_INIT],
296 [m4_ifval([$1],
297 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
298 [$1
299 ])])])
300
301 # Initialize.
302 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
303
304
305 # _LT_CONFIG_LIBTOOL([COMMANDS])
306 # ------------------------------
307 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308 m4_define([_LT_CONFIG_LIBTOOL],
309 [m4_ifval([$1],
310 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
311 [$1
312 ])])])
313
314 # Initialize.
315 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
316
317
318 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
319 # -----------------------------------------------------
320 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
321 [_LT_CONFIG_LIBTOOL([$1])
322 _LT_CONFIG_LIBTOOL_INIT([$2])
323 ])
324
325
326 # _LT_FORMAT_COMMENT([COMMENT])
327 # -----------------------------
328 # Add leading comment marks to the start of each line, and a trailing
329 # full-stop to the whole comment if one is not present already.
330 m4_define([_LT_FORMAT_COMMENT],
331 [m4_ifval([$1], [
332 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
333 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
334 )])
335
336
337
338 ## ------------------------ ##
339 ## FIXME: Eliminate VARNAME ##
340 ## ------------------------ ##
341
342
343 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
344 # -------------------------------------------------------------------
345 # CONFIGNAME is the name given to the value in the libtool script.
346 # VARNAME is the (base) name used in the configure script.
347 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
348 # VARNAME. Any other value will be used directly.
349 m4_define([_LT_DECL],
350 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
351 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
352 [m4_ifval([$1], [$1], [$2])])
353 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
354 m4_ifval([$4],
355 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
356 lt_dict_add_subkey([lt_decl_dict], [$2],
357 [tagged?], [m4_ifval([$5], [yes], [no])])])
358 ])
359
360
361 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
362 # --------------------------------------------------------
363 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
364
365
366 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
367 # ------------------------------------------------
368 m4_define([lt_decl_tag_varnames],
369 [_lt_decl_filter([tagged?], [yes], $@)])
370
371
372 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
373 # ---------------------------------------------------------
374 m4_define([_lt_decl_filter],
375 [m4_case([$#],
376 [0], [m4_fatal([$0: too few arguments: $#])],
377 [1], [m4_fatal([$0: too few arguments: $#: $1])],
378 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
379 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
380 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
381 ])
382
383
384 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
385 # --------------------------------------------------
386 m4_define([lt_decl_quote_varnames],
387 [_lt_decl_filter([value], [1], $@)])
388
389
390 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
391 # ---------------------------------------------------
392 m4_define([lt_decl_dquote_varnames],
393 [_lt_decl_filter([value], [2], $@)])
394
395
396 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
397 # ---------------------------------------------------
398 m4_define([lt_decl_varnames_tagged],
399 [m4_assert([$# <= 2])dnl
400 _$0(m4_quote(m4_default([$1], [[, ]])),
401 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
402 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
403 m4_define([_lt_decl_varnames_tagged],
404 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
405
406
407 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
408 # ------------------------------------------------
409 m4_define([lt_decl_all_varnames],
410 [_$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_if([$2], [],
412 m4_quote(lt_decl_varnames),
413 m4_quote(m4_shift($@))))[]dnl
414 ])
415 m4_define([_lt_decl_all_varnames],
416 [lt_join($@, lt_decl_varnames_tagged([$1],
417 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
418 ])
419
420
421 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
422 # ------------------------------------
423 # Quote a variable value, and forward it to `config.status' so that its
424 # declaration there will have the same value as in `configure'. VARNAME
425 # must have a single quote delimited value for this to work.
426 m4_define([_LT_CONFIG_STATUS_DECLARE],
427 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
428
429
430 # _LT_CONFIG_STATUS_DECLARATIONS
431 # ------------------------------
432 # We delimit libtool config variables with single quotes, so when
433 # we write them to config.status, we have to be sure to quote all
434 # embedded single quotes properly. In configure, this macro expands
435 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
436 #
437 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
438 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
439 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
440 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
441
442
443 # _LT_LIBTOOL_TAGS
444 # ----------------
445 # Output comment and list of tags supported by the script
446 m4_defun([_LT_LIBTOOL_TAGS],
447 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
448 available_tags="_LT_TAGS"dnl
449 ])
450
451
452 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
453 # -----------------------------------
454 # Extract the dictionary values for VARNAME (optionally with TAG) and
455 # expand to a commented shell variable setting:
456 #
457 # # Some comment about what VAR is for.
458 # visible_name=$lt_internal_name
459 m4_define([_LT_LIBTOOL_DECLARE],
460 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
461 [description])))[]dnl
462 m4_pushdef([_libtool_name],
463 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
464 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
465 [0], [_libtool_name=[$]$1],
466 [1], [_libtool_name=$lt_[]$1],
467 [2], [_libtool_name=$lt_[]$1],
468 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
469 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
470 ])
471
472
473 # _LT_LIBTOOL_CONFIG_VARS
474 # -----------------------
475 # Produce commented declarations of non-tagged libtool config variables
476 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
477 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
478 # section) are produced by _LT_LIBTOOL_TAG_VARS.
479 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
480 [m4_foreach([_lt_var],
481 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
482 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
483
484
485 # _LT_LIBTOOL_TAG_VARS(TAG)
486 # -------------------------
487 m4_define([_LT_LIBTOOL_TAG_VARS],
488 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
489 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
490
491
492 # _LT_TAGVAR(VARNAME, [TAGNAME])
493 # ------------------------------
494 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
495
496
497 # _LT_CONFIG_COMMANDS
498 # -------------------
499 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
500 # variables for single and double quote escaping we saved from calls
501 # to _LT_DECL, we can put quote escaped variables declarations
502 # into `config.status', and then the shell code to quote escape them in
503 # for loops in `config.status'. Finally, any additional code accumulated
504 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
505 m4_defun([_LT_CONFIG_COMMANDS],
506 [AC_PROVIDE_IFELSE([LT_OUTPUT],
507 dnl If the libtool generation code has been placed in $CONFIG_LT,
508 dnl instead of duplicating it all over again into config.status,
509 dnl then we will have config.status run $CONFIG_LT later, so it
510 dnl needs to know what name is stored there:
511 [AC_CONFIG_COMMANDS([libtool],
512 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
513 dnl If the libtool generation code is destined for config.status,
514 dnl expand the accumulated commands and init code now:
515 [AC_CONFIG_COMMANDS([libtool],
516 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
517 ])#_LT_CONFIG_COMMANDS
518
519
520 # Initialize.
521 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
522 [
523
524 # The HP-UX ksh and POSIX shell print the target directory to stdout
525 # if CDPATH is set.
526 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
527
528 sed_quote_subst='$sed_quote_subst'
529 double_quote_subst='$double_quote_subst'
530 delay_variable_subst='$delay_variable_subst'
531 _LT_CONFIG_STATUS_DECLARATIONS
532 LTCC='$LTCC'
533 LTCFLAGS='$LTCFLAGS'
534 compiler='$compiler_DEFAULT'
535
536 # A function that is used when there is no print builtin or printf.
537 func_fallback_echo ()
538 {
539 eval 'cat <<_LTECHO_EOF
540 \$[]1
541 _LTECHO_EOF'
542 }
543
544 # Quote evaled strings.
545 for var in lt_decl_all_varnames([[ \
546 ]], lt_decl_quote_varnames); do
547 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
548 *[[\\\\\\\`\\"\\\$]]*)
549 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
550 ;;
551 *)
552 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
553 ;;
554 esac
555 done
556
557 # Double-quote double-evaled strings.
558 for var in lt_decl_all_varnames([[ \
559 ]], lt_decl_dquote_varnames); do
560 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
563 ;;
564 *)
565 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566 ;;
567 esac
568 done
569
570 _LT_OUTPUT_LIBTOOL_INIT
571 ])
572
573 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
574 # ------------------------------------
575 # Generate a child script FILE with all initialization necessary to
576 # reuse the environment learned by the parent script, and make the
577 # file executable. If COMMENT is supplied, it is inserted after the
578 # `#!' sequence but before initialization text begins. After this
579 # macro, additional text can be appended to FILE to form the body of
580 # the child script. The macro ends with non-zero status if the
581 # file could not be fully written (such as if the disk is full).
582 m4_ifdef([AS_INIT_GENERATED],
583 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
584 [m4_defun([_LT_GENERATED_FILE_INIT],
585 [m4_require([AS_PREPARE])]dnl
586 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
587 [lt_write_fail=0
588 cat >$1 <<_ASEOF || lt_write_fail=1
589 #! $SHELL
590 # Generated by $as_me.
591 $2
592 SHELL=\${CONFIG_SHELL-$SHELL}
593 export SHELL
594 _ASEOF
595 cat >>$1 <<\_ASEOF || lt_write_fail=1
596 AS_SHELL_SANITIZE
597 _AS_PREPARE
598 exec AS_MESSAGE_FD>&1
599 _ASEOF
600 test $lt_write_fail = 0 && chmod +x $1[]dnl
601 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
602
603 # LT_OUTPUT
604 # ---------
605 # This macro allows early generation of the libtool script (before
606 # AC_OUTPUT is called), incase it is used in configure for compilation
607 # tests.
608 AC_DEFUN([LT_OUTPUT],
609 [: ${CONFIG_LT=./config.lt}
610 AC_MSG_NOTICE([creating $CONFIG_LT])
611 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
612 [# Run this file to recreate a libtool stub with the current configuration.])
613
614 cat >>"$CONFIG_LT" <<\_LTEOF
615 lt_cl_silent=false
616 exec AS_MESSAGE_LOG_FD>>config.log
617 {
618 echo
619 AS_BOX([Running $as_me.])
620 } >&AS_MESSAGE_LOG_FD
621
622 lt_cl_help="\
623 \`$as_me' creates a local libtool stub from the current configuration,
624 for use in further configure time tests before the real libtool is
625 generated.
626
627 Usage: $[0] [[OPTIONS]]
628
629 -h, --help print this help, then exit
630 -V, --version print version number, then exit
631 -q, --quiet do not print progress messages
632 -d, --debug don't remove temporary files
633
634 Report bugs to <bug-libtool@gnu.org>."
635
636 lt_cl_version="\
637 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
638 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
639 configured by $[0], generated by m4_PACKAGE_STRING.
640
641 Copyright (C) 2011 Free Software Foundation, Inc.
642 This config.lt script is free software; the Free Software Foundation
643 gives unlimited permision to copy, distribute and modify it."
644
645 while test $[#] != 0
646 do
647 case $[1] in
648 --version | --v* | -V )
649 echo "$lt_cl_version"; exit 0 ;;
650 --help | --h* | -h )
651 echo "$lt_cl_help"; exit 0 ;;
652 --debug | --d* | -d )
653 debug=: ;;
654 --quiet | --q* | --silent | --s* | -q )
655 lt_cl_silent=: ;;
656
657 -*) AC_MSG_ERROR([unrecognized option: $[1]
658 Try \`$[0] --help' for more information.]) ;;
659
660 *) AC_MSG_ERROR([unrecognized argument: $[1]
661 Try \`$[0] --help' for more information.]) ;;
662 esac
663 shift
664 done
665
666 if $lt_cl_silent; then
667 exec AS_MESSAGE_FD>/dev/null
668 fi
669 _LTEOF
670
671 cat >>"$CONFIG_LT" <<_LTEOF
672 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
673 _LTEOF
674
675 cat >>"$CONFIG_LT" <<\_LTEOF
676 AC_MSG_NOTICE([creating $ofile])
677 _LT_OUTPUT_LIBTOOL_COMMANDS
678 AS_EXIT(0)
679 _LTEOF
680 chmod +x "$CONFIG_LT"
681
682 # configure is writing to config.log, but config.lt does its own redirection,
683 # appending to config.log, which fails on DOS, as config.log is still kept
684 # open by configure. Here we exec the FD to /dev/null, effectively closing
685 # config.log, so it can be properly (re)opened and appended to by config.lt.
686 lt_cl_success=:
687 test "$silent" = yes &&
688 lt_config_lt_args="$lt_config_lt_args --quiet"
689 exec AS_MESSAGE_LOG_FD>/dev/null
690 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
691 exec AS_MESSAGE_LOG_FD>>config.log
692 $lt_cl_success || AS_EXIT(1)
693 ])# LT_OUTPUT
694
695
696 # _LT_CONFIG(TAG)
697 # ---------------
698 # If TAG is the built-in tag, create an initial libtool script with a
699 # default configuration from the untagged config vars. Otherwise add code
700 # to config.status for appending the configuration named by TAG from the
701 # matching tagged config vars.
702 m4_defun([_LT_CONFIG],
703 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
704 _LT_CONFIG_SAVE_COMMANDS([
705 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
706 m4_if(_LT_TAG, [C], [
707 # See if we are running on zsh, and set the options which allow our
708 # commands through without removal of \ escapes.
709 if test -n "${ZSH_VERSION+set}" ; then
710 setopt NO_GLOB_SUBST
711 fi
712
713 cfgfile="${ofile}T"
714 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
715 $RM "$cfgfile"
716
717 cat <<_LT_EOF >> "$cfgfile"
718 #! $SHELL
719
720 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
721 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
722 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
723 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
724 #
725 _LT_COPYING
726 _LT_LIBTOOL_TAGS
727
728 # ### BEGIN LIBTOOL CONFIG
729 _LT_LIBTOOL_CONFIG_VARS
730 _LT_LIBTOOL_TAG_VARS
731 # ### END LIBTOOL CONFIG
732
733 _LT_EOF
734
735 case $host_os in
736 aix3*)
737 cat <<\_LT_EOF >> "$cfgfile"
738 # AIX sometimes has problems with the GCC collect2 program. For some
739 # reason, if we set the COLLECT_NAMES environment variable, the problems
740 # vanish in a puff of smoke.
741 if test "X${COLLECT_NAMES+set}" != Xset; then
742 COLLECT_NAMES=
743 export COLLECT_NAMES
744 fi
745 _LT_EOF
746 ;;
747 esac
748
749 _LT_PROG_LTMAIN
750
751 # We use sed instead of cat because bash on DJGPP gets confused if
752 # if finds mixed CR/LF and LF-only lines. Since sed operates in
753 # text mode, it properly converts lines to CR/LF. This bash problem
754 # is reportedly fixed, but why not run on old versions too?
755 sed '$q' "$ltmain" >> "$cfgfile" \
756 || (rm -f "$cfgfile"; exit 1)
757
758 _LT_PROG_REPLACE_SHELLFNS
759
760 mv -f "$cfgfile" "$ofile" ||
761 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
762 chmod +x "$ofile"
763 ],
764 [cat <<_LT_EOF >> "$ofile"
765
766 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
767 dnl in a comment (ie after a #).
768 # ### BEGIN LIBTOOL TAG CONFIG: $1
769 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
770 # ### END LIBTOOL TAG CONFIG: $1
771 _LT_EOF
772 ])dnl /m4_if
773 ],
774 [m4_if([$1], [], [
775 PACKAGE='$PACKAGE'
776 VERSION='$VERSION'
777 TIMESTAMP='$TIMESTAMP'
778 RM='$RM'
779 ofile='$ofile'], [])
780 ])dnl /_LT_CONFIG_SAVE_COMMANDS
781 ])# _LT_CONFIG
782
783
784 # LT_SUPPORTED_TAG(TAG)
785 # ---------------------
786 # Trace this macro to discover what tags are supported by the libtool
787 # --tag option, using:
788 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
789 AC_DEFUN([LT_SUPPORTED_TAG], [])
790
791
792 # C support is built-in for now
793 m4_define([_LT_LANG_C_enabled], [])
794 m4_define([_LT_TAGS], [])
795
796
797 # LT_LANG(LANG)
798 # -------------
799 # Enable libtool support for the given language if not already enabled.
800 AC_DEFUN([LT_LANG],
801 [AC_BEFORE([$0], [LT_OUTPUT])dnl
802 m4_case([$1],
803 [C], [_LT_LANG(C)],
804 [C++], [_LT_LANG(CXX)],
805 [Go], [_LT_LANG(GO)],
806 [Java], [_LT_LANG(GCJ)],
807 [Fortran 77], [_LT_LANG(F77)],
808 [Fortran], [_LT_LANG(FC)],
809 [Windows Resource], [_LT_LANG(RC)],
810 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
811 [_LT_LANG($1)],
812 [m4_fatal([$0: unsupported language: "$1"])])])dnl
813 ])# LT_LANG
814
815
816 # _LT_LANG(LANGNAME)
817 # ------------------
818 m4_defun([_LT_LANG],
819 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
820 [LT_SUPPORTED_TAG([$1])dnl
821 m4_append([_LT_TAGS], [$1 ])dnl
822 m4_define([_LT_LANG_]$1[_enabled], [])dnl
823 _LT_LANG_$1_CONFIG($1)])dnl
824 ])# _LT_LANG
825
826
827 m4_ifndef([AC_PROG_GO], [
828 ############################################################
829 # NOTE: This macro has been submitted for inclusion into #
830 # GNU Autoconf as AC_PROG_GO. When it is available in #
831 # a released version of Autoconf we should remove this #
832 # macro and use it instead. #
833 ############################################################
834 m4_defun([AC_PROG_GO],
835 [AC_LANG_PUSH(Go)dnl
836 AC_ARG_VAR([GOC], [Go compiler command])dnl
837 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
838 _AC_ARG_VAR_LDFLAGS()dnl
839 AC_CHECK_TOOL(GOC, gccgo)
840 if test -z "$GOC"; then
841 if test -n "$ac_tool_prefix"; then
842 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
843 fi
844 fi
845 if test -z "$GOC"; then
846 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
847 fi
848 ])#m4_defun
849 ])#m4_ifndef
850
851
852 # _LT_LANG_DEFAULT_CONFIG
853 # -----------------------
854 m4_defun([_LT_LANG_DEFAULT_CONFIG],
855 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
856 [LT_LANG(CXX)],
857 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
858
859 AC_PROVIDE_IFELSE([AC_PROG_F77],
860 [LT_LANG(F77)],
861 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
862
863 AC_PROVIDE_IFELSE([AC_PROG_FC],
864 [LT_LANG(FC)],
865 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
866
867 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
868 dnl pulling things in needlessly.
869 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
870 [LT_LANG(GCJ)],
871 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
872 [LT_LANG(GCJ)],
873 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
874 [LT_LANG(GCJ)],
875 [m4_ifdef([AC_PROG_GCJ],
876 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
877 m4_ifdef([A][M_PROG_GCJ],
878 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
879 m4_ifdef([LT_PROG_GCJ],
880 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
881
882 AC_PROVIDE_IFELSE([AC_PROG_GO],
883 [LT_LANG(GO)],
884 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
885
886 AC_PROVIDE_IFELSE([LT_PROG_RC],
887 [LT_LANG(RC)],
888 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
889 ])# _LT_LANG_DEFAULT_CONFIG
890
891 # Obsolete macros:
892 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
893 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
894 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
895 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
896 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
897 dnl aclocal-1.4 backwards compatibility:
898 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
899 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
900 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
901 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
902 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
903
904
905 # _LT_TAG_COMPILER
906 # ----------------
907 m4_defun([_LT_TAG_COMPILER],
908 [AC_REQUIRE([AC_PROG_CC])dnl
909
910 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
911 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
912 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
913 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
914
915 # If no C compiler was specified, use CC.
916 LTCC=${LTCC-"$CC"}
917
918 # If no C compiler flags were specified, use CFLAGS.
919 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
920
921 # Allow CC to be a program name with arguments.
922 compiler=$CC
923 ])# _LT_TAG_COMPILER
924
925
926 # _LT_COMPILER_BOILERPLATE
927 # ------------------------
928 # Check for compiler boilerplate output or warnings with
929 # the simple compiler test code.
930 m4_defun([_LT_COMPILER_BOILERPLATE],
931 [m4_require([_LT_DECL_SED])dnl
932 ac_outfile=conftest.$ac_objext
933 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
934 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
935 _lt_compiler_boilerplate=`cat conftest.err`
936 $RM conftest*
937 ])# _LT_COMPILER_BOILERPLATE
938
939
940 # _LT_LINKER_BOILERPLATE
941 # ----------------------
942 # Check for linker boilerplate output or warnings with
943 # the simple link test code.
944 m4_defun([_LT_LINKER_BOILERPLATE],
945 [m4_require([_LT_DECL_SED])dnl
946 ac_outfile=conftest.$ac_objext
947 echo "$lt_simple_link_test_code" >conftest.$ac_ext
948 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
949 _lt_linker_boilerplate=`cat conftest.err`
950 $RM -r conftest*
951 ])# _LT_LINKER_BOILERPLATE
952
953 # _LT_REQUIRED_DARWIN_CHECKS
954 # -------------------------
955 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
956 case $host_os in
957 rhapsody* | darwin*)
958 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
959 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
960 AC_CHECK_TOOL([LIPO], [lipo], [:])
961 AC_CHECK_TOOL([OTOOL], [otool], [:])
962 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
963 _LT_DECL([], [DSYMUTIL], [1],
964 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
965 _LT_DECL([], [NMEDIT], [1],
966 [Tool to change global to local symbols on Mac OS X])
967 _LT_DECL([], [LIPO], [1],
968 [Tool to manipulate fat objects and archives on Mac OS X])
969 _LT_DECL([], [OTOOL], [1],
970 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
971 _LT_DECL([], [OTOOL64], [1],
972 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
973
974 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
975 [lt_cv_apple_cc_single_mod=no
976 if test -z "${LT_MULTI_MODULE}"; then
977 # By default we will add the -single_module flag. You can override
978 # by either setting the environment variable LT_MULTI_MODULE
979 # non-empty at configure time, or by adding -multi_module to the
980 # link flags.
981 rm -rf libconftest.dylib*
982 echo "int foo(void){return 1;}" > conftest.c
983 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
984 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
985 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
986 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
987 _lt_result=$?
988 # If there is a non-empty error log, and "single_module"
989 # appears in it, assume the flag caused a linker warning
990 if test -s conftest.err && $GREP single_module conftest.err; then
991 cat conftest.err >&AS_MESSAGE_LOG_FD
992 # Otherwise, if the output was created with a 0 exit code from
993 # the compiler, it worked.
994 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
995 lt_cv_apple_cc_single_mod=yes
996 else
997 cat conftest.err >&AS_MESSAGE_LOG_FD
998 fi
999 rm -rf libconftest.dylib*
1000 rm -f conftest.*
1001 fi])
1002
1003 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1004 [lt_cv_ld_exported_symbols_list],
1005 [lt_cv_ld_exported_symbols_list=no
1006 save_LDFLAGS=$LDFLAGS
1007 echo "_main" > conftest.sym
1008 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1009 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1010 [lt_cv_ld_exported_symbols_list=yes],
1011 [lt_cv_ld_exported_symbols_list=no])
1012 LDFLAGS="$save_LDFLAGS"
1013 ])
1014
1015 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1016 [lt_cv_ld_force_load=no
1017 cat > conftest.c << _LT_EOF
1018 int forced_loaded() { return 2;}
1019 _LT_EOF
1020 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1021 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1022 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1023 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1024 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1025 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1026 cat > conftest.c << _LT_EOF
1027 int main() { return 0;}
1028 _LT_EOF
1029 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1030 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1031 _lt_result=$?
1032 if test -s conftest.err && $GREP force_load conftest.err; then
1033 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1035 lt_cv_ld_force_load=yes
1036 else
1037 cat conftest.err >&AS_MESSAGE_LOG_FD
1038 fi
1039 rm -f conftest.err libconftest.a conftest conftest.c
1040 rm -rf conftest.dSYM
1041 ])
1042 case $host_os in
1043 rhapsody* | darwin1.[[012]])
1044 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1045 darwin1.*)
1046 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1047 darwin*) # darwin 5.x on
1048 # if running on 10.5 or later, the deployment target defaults
1049 # to the OS version, if on x86, and 10.4, the deployment
1050 # target defaults to 10.4. Don't you love it?
1051 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1052 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1053 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1054 10.[[012]]*)
1055 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1056 10.*)
1057 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1058 esac
1059 ;;
1060 esac
1061 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1062 _lt_dar_single_mod='$single_module'
1063 fi
1064 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1065 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1066 else
1067 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1068 fi
1069 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1070 _lt_dsymutil='~$DSYMUTIL $lib || :'
1071 else
1072 _lt_dsymutil=
1073 fi
1074 ;;
1075 esac
1076 ])
1077
1078
1079 # _LT_DARWIN_LINKER_FEATURES([TAG])
1080 # ---------------------------------
1081 # Checks for linker and compiler features on darwin
1082 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1083 [
1084 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1085 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1086 _LT_TAGVAR(hardcode_direct, $1)=no
1087 _LT_TAGVAR(hardcode_automatic, $1)=yes
1088 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1089 if test "$lt_cv_ld_force_load" = "yes"; then
1090 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1091 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1092 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1093 else
1094 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1095 fi
1096 _LT_TAGVAR(link_all_deplibs, $1)=yes
1097 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1098 case $cc_basename in
1099 ifort*) _lt_dar_can_shared=yes ;;
1100 *) _lt_dar_can_shared=$GCC ;;
1101 esac
1102 if test "$_lt_dar_can_shared" = "yes"; then
1103 output_verbose_link_cmd=func_echo_all
1104 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1105 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1106 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1107 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1108 m4_if([$1], [CXX],
1109 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1110 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1111 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1112 fi
1113 ],[])
1114 else
1115 _LT_TAGVAR(ld_shlibs, $1)=no
1116 fi
1117 ])
1118
1119 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1120 # ----------------------------------
1121 # Links a minimal program and checks the executable
1122 # for the system default hardcoded library path. In most cases,
1123 # this is /usr/lib:/lib, but when the MPI compilers are used
1124 # the location of the communication and MPI libs are included too.
1125 # If we don't find anything, use the default library path according
1126 # to the aix ld manual.
1127 # Store the results from the different compilers for each TAGNAME.
1128 # Allow to override them for all tags through lt_cv_aix_libpath.
1129 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1130 [m4_require([_LT_DECL_SED])dnl
1131 if test "${lt_cv_aix_libpath+set}" = set; then
1132 aix_libpath=$lt_cv_aix_libpath
1133 else
1134 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1135 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1136 lt_aix_libpath_sed='[
1137 /Import File Strings/,/^$/ {
1138 /^0/ {
1139 s/^0 *\([^ ]*\) *$/\1/
1140 p
1141 }
1142 }]'
1143 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1144 # Check for a 64-bit object if we didn't find anything.
1145 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1146 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1147 fi],[])
1148 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1150 fi
1151 ])
1152 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1153 fi
1154 ])# _LT_SYS_MODULE_PATH_AIX
1155
1156
1157 # _LT_SHELL_INIT(ARG)
1158 # -------------------
1159 m4_define([_LT_SHELL_INIT],
1160 [m4_divert_text([M4SH-INIT], [$1
1161 ])])# _LT_SHELL_INIT
1162
1163
1164
1165 # _LT_PROG_ECHO_BACKSLASH
1166 # -----------------------
1167 # Find how we can fake an echo command that does not interpret backslash.
1168 # In particular, with Autoconf 2.60 or later we add some code to the start
1169 # of the generated configure script which will find a shell with a builtin
1170 # printf (which we can use as an echo command).
1171 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1172 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1173 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1174 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1175
1176 AC_MSG_CHECKING([how to print strings])
1177 # Test print first, because it will be a builtin if present.
1178 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1179 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1180 ECHO='print -r --'
1181 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1182 ECHO='printf %s\n'
1183 else
1184 # Use this function as a fallback that always works.
1185 func_fallback_echo ()
1186 {
1187 eval 'cat <<_LTECHO_EOF
1188 $[]1
1189 _LTECHO_EOF'
1190 }
1191 ECHO='func_fallback_echo'
1192 fi
1193
1194 # func_echo_all arg...
1195 # Invoke $ECHO with all args, space-separated.
1196 func_echo_all ()
1197 {
1198 $ECHO "$*"
1199 }
1200
1201 case "$ECHO" in
1202 printf*) AC_MSG_RESULT([printf]) ;;
1203 print*) AC_MSG_RESULT([print -r]) ;;
1204 *) AC_MSG_RESULT([cat]) ;;
1205 esac
1206
1207 m4_ifdef([_AS_DETECT_SUGGESTED],
1208 [_AS_DETECT_SUGGESTED([
1209 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1210 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1211 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1213 PATH=/empty FPATH=/empty; export PATH FPATH
1214 test "X`printf %s $ECHO`" = "X$ECHO" \
1215 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1216
1217 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1218 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1219 ])# _LT_PROG_ECHO_BACKSLASH
1220
1221
1222 # _LT_WITH_SYSROOT
1223 # ----------------
1224 AC_DEFUN([_LT_WITH_SYSROOT],
1225 [AC_MSG_CHECKING([for sysroot])
1226 AC_ARG_WITH([sysroot],
1227 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1228 (or the compiler's sysroot if not specified).],
1229 [], [with_sysroot=no])
1230
1231 dnl lt_sysroot will always be passed unquoted. We quote it here
1232 dnl in case the user passed a directory name.
1233 lt_sysroot=
1234 case ${with_sysroot} in #(
1235 yes)
1236 if test "$GCC" = yes; then
1237 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1238 fi
1239 ;; #(
1240 /*)
1241 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1242 ;; #(
1243 no|'')
1244 ;; #(
1245 *)
1246 AC_MSG_RESULT([${with_sysroot}])
1247 AC_MSG_ERROR([The sysroot must be an absolute path.])
1248 ;;
1249 esac
1250
1251 AC_MSG_RESULT([${lt_sysroot:-no}])
1252 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1253 [dependent libraries, and in which our libraries should be installed.])])
1254
1255 # _LT_ENABLE_LOCK
1256 # ---------------
1257 m4_defun([_LT_ENABLE_LOCK],
1258 [AC_ARG_ENABLE([libtool-lock],
1259 [AS_HELP_STRING([--disable-libtool-lock],
1260 [avoid locking (might break parallel builds)])])
1261 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1262
1263 # Some flags need to be propagated to the compiler or linker for good
1264 # libtool support.
1265 case $host in
1266 ia64-*-hpux*)
1267 # Find out which ABI we are using.
1268 echo 'int i;' > conftest.$ac_ext
1269 if AC_TRY_EVAL(ac_compile); then
1270 case `/usr/bin/file conftest.$ac_objext` in
1271 *ELF-32*)
1272 HPUX_IA64_MODE="32"
1273 ;;
1274 *ELF-64*)
1275 HPUX_IA64_MODE="64"
1276 ;;
1277 esac
1278 fi
1279 rm -rf conftest*
1280 ;;
1281 *-*-irix6*)
1282 # Find out which ABI we are using.
1283 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1284 if AC_TRY_EVAL(ac_compile); then
1285 if test "$lt_cv_prog_gnu_ld" = yes; then
1286 case `/usr/bin/file conftest.$ac_objext` in
1287 *32-bit*)
1288 LD="${LD-ld} -melf32bsmip"
1289 ;;
1290 *N32*)
1291 LD="${LD-ld} -melf32bmipn32"
1292 ;;
1293 *64-bit*)
1294 LD="${LD-ld} -melf64bmip"
1295 ;;
1296 esac
1297 else
1298 case `/usr/bin/file conftest.$ac_objext` in
1299 *32-bit*)
1300 LD="${LD-ld} -32"
1301 ;;
1302 *N32*)
1303 LD="${LD-ld} -n32"
1304 ;;
1305 *64-bit*)
1306 LD="${LD-ld} -64"
1307 ;;
1308 esac
1309 fi
1310 fi
1311 rm -rf conftest*
1312 ;;
1313
1314 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1315 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1316 # Find out which ABI we are using.
1317 echo 'int i;' > conftest.$ac_ext
1318 if AC_TRY_EVAL(ac_compile); then
1319 case `/usr/bin/file conftest.o` in
1320 *32-bit*)
1321 case $host in
1322 x86_64-*kfreebsd*-gnu)
1323 LD="${LD-ld} -m elf_i386_fbsd"
1324 ;;
1325 x86_64-*linux*)
1326 LD="${LD-ld} -m elf_i386"
1327 ;;
1328 ppc64-*linux*|powerpc64-*linux*)
1329 LD="${LD-ld} -m elf32ppclinux"
1330 ;;
1331 s390x-*linux*)
1332 LD="${LD-ld} -m elf_s390"
1333 ;;
1334 sparc64-*linux*)
1335 LD="${LD-ld} -m elf32_sparc"
1336 ;;
1337 esac
1338 ;;
1339 *64-bit*)
1340 case $host in
1341 x86_64-*kfreebsd*-gnu)
1342 LD="${LD-ld} -m elf_x86_64_fbsd"
1343 ;;
1344 x86_64-*linux*)
1345 LD="${LD-ld} -m elf_x86_64"
1346 ;;
1347 ppc*-*linux*|powerpc*-*linux*)
1348 LD="${LD-ld} -m elf64ppc"
1349 ;;
1350 s390*-*linux*|s390*-*tpf*)
1351 LD="${LD-ld} -m elf64_s390"
1352 ;;
1353 sparc*-*linux*)
1354 LD="${LD-ld} -m elf64_sparc"
1355 ;;
1356 esac
1357 ;;
1358 esac
1359 fi
1360 rm -rf conftest*
1361 ;;
1362
1363 *-*-sco3.2v5*)
1364 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1365 SAVE_CFLAGS="$CFLAGS"
1366 CFLAGS="$CFLAGS -belf"
1367 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1368 [AC_LANG_PUSH(C)
1369 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1370 AC_LANG_POP])
1371 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1372 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1373 CFLAGS="$SAVE_CFLAGS"
1374 fi
1375 ;;
1376 *-*solaris*)
1377 # Find out which ABI we are using.
1378 echo 'int i;' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 case `/usr/bin/file conftest.o` in
1381 *64-bit*)
1382 case $lt_cv_prog_gnu_ld in
1383 yes*)
1384 case $host in
1385 i?86-*-solaris*)
1386 LD="${LD-ld} -m elf_x86_64"
1387 ;;
1388 sparc*-*-solaris*)
1389 LD="${LD-ld} -m elf64_sparc"
1390 ;;
1391 esac
1392 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1393 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1394 LD="${LD-ld}_sol2"
1395 fi
1396 ;;
1397 *)
1398 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1399 LD="${LD-ld} -64"
1400 fi
1401 ;;
1402 esac
1403 ;;
1404 esac
1405 fi
1406 rm -rf conftest*
1407 ;;
1408 esac
1409
1410 need_locks="$enable_libtool_lock"
1411 ])# _LT_ENABLE_LOCK
1412
1413
1414 # _LT_PROG_AR
1415 # -----------
1416 m4_defun([_LT_PROG_AR],
1417 [AC_CHECK_TOOLS(AR, [ar], false)
1418 : ${AR=ar}
1419 : ${AR_FLAGS=cru}
1420 _LT_DECL([], [AR], [1], [The archiver])
1421 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1422
1423 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1424 [lt_cv_ar_at_file=no
1425 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1426 [echo conftest.$ac_objext > conftest.lst
1427 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1428 AC_TRY_EVAL([lt_ar_try])
1429 if test "$ac_status" -eq 0; then
1430 # Ensure the archiver fails upon bogus file names.
1431 rm -f conftest.$ac_objext libconftest.a
1432 AC_TRY_EVAL([lt_ar_try])
1433 if test "$ac_status" -ne 0; then
1434 lt_cv_ar_at_file=@
1435 fi
1436 fi
1437 rm -f conftest.* libconftest.a
1438 ])
1439 ])
1440
1441 if test "x$lt_cv_ar_at_file" = xno; then
1442 archiver_list_spec=
1443 else
1444 archiver_list_spec=$lt_cv_ar_at_file
1445 fi
1446 _LT_DECL([], [archiver_list_spec], [1],
1447 [How to feed a file listing to the archiver])
1448 ])# _LT_PROG_AR
1449
1450
1451 # _LT_CMD_OLD_ARCHIVE
1452 # -------------------
1453 m4_defun([_LT_CMD_OLD_ARCHIVE],
1454 [_LT_PROG_AR
1455
1456 AC_CHECK_TOOL(STRIP, strip, :)
1457 test -z "$STRIP" && STRIP=:
1458 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1459
1460 AC_CHECK_TOOL(RANLIB, ranlib, :)
1461 test -z "$RANLIB" && RANLIB=:
1462 _LT_DECL([], [RANLIB], [1],
1463 [Commands used to install an old-style archive])
1464
1465 # Determine commands to create old-style static archives.
1466 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1467 old_postinstall_cmds='chmod 644 $oldlib'
1468 old_postuninstall_cmds=
1469
1470 if test -n "$RANLIB"; then
1471 case $host_os in
1472 openbsd*)
1473 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1474 ;;
1475 *)
1476 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1477 ;;
1478 esac
1479 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1480 fi
1481
1482 case $host_os in
1483 darwin*)
1484 lock_old_archive_extraction=yes ;;
1485 *)
1486 lock_old_archive_extraction=no ;;
1487 esac
1488 _LT_DECL([], [old_postinstall_cmds], [2])
1489 _LT_DECL([], [old_postuninstall_cmds], [2])
1490 _LT_TAGDECL([], [old_archive_cmds], [2],
1491 [Commands used to build an old-style archive])
1492 _LT_DECL([], [lock_old_archive_extraction], [0],
1493 [Whether to use a lock for old archive extraction])
1494 ])# _LT_CMD_OLD_ARCHIVE
1495
1496
1497 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1498 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1499 # ----------------------------------------------------------------
1500 # Check whether the given compiler option works
1501 AC_DEFUN([_LT_COMPILER_OPTION],
1502 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1503 m4_require([_LT_DECL_SED])dnl
1504 AC_CACHE_CHECK([$1], [$2],
1505 [$2=no
1506 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1507 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1508 lt_compiler_flag="$3"
1509 # Insert the option either (1) after the last *FLAGS variable, or
1510 # (2) before a word containing "conftest.", or (3) at the end.
1511 # Note that $ac_compile itself does not contain backslashes and begins
1512 # with a dollar sign (not a hyphen), so the echo should work correctly.
1513 # The option is referenced via a variable to avoid confusing sed.
1514 lt_compile=`echo "$ac_compile" | $SED \
1515 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1516 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1517 -e 's:$: $lt_compiler_flag:'`
1518 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1519 (eval "$lt_compile" 2>conftest.err)
1520 ac_status=$?
1521 cat conftest.err >&AS_MESSAGE_LOG_FD
1522 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1523 if (exit $ac_status) && test -s "$ac_outfile"; then
1524 # The compiler can only warn and ignore the option if not recognized
1525 # So say no if there are warnings other than the usual output.
1526 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1527 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1528 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1529 $2=yes
1530 fi
1531 fi
1532 $RM conftest*
1533 ])
1534
1535 if test x"[$]$2" = xyes; then
1536 m4_if([$5], , :, [$5])
1537 else
1538 m4_if([$6], , :, [$6])
1539 fi
1540 ])# _LT_COMPILER_OPTION
1541
1542 # Old name:
1543 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1544 dnl aclocal-1.4 backwards compatibility:
1545 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1546
1547
1548 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1549 # [ACTION-SUCCESS], [ACTION-FAILURE])
1550 # ----------------------------------------------------
1551 # Check whether the given linker option works
1552 AC_DEFUN([_LT_LINKER_OPTION],
1553 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1554 m4_require([_LT_DECL_SED])dnl
1555 AC_CACHE_CHECK([$1], [$2],
1556 [$2=no
1557 save_LDFLAGS="$LDFLAGS"
1558 LDFLAGS="$LDFLAGS $3"
1559 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1560 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1561 # The linker can only warn and ignore the option if not recognized
1562 # So say no if there are warnings
1563 if test -s conftest.err; then
1564 # Append any errors to the config.log.
1565 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1566 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1567 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1568 if diff conftest.exp conftest.er2 >/dev/null; then
1569 $2=yes
1570 fi
1571 else
1572 $2=yes
1573 fi
1574 fi
1575 $RM -r conftest*
1576 LDFLAGS="$save_LDFLAGS"
1577 ])
1578
1579 if test x"[$]$2" = xyes; then
1580 m4_if([$4], , :, [$4])
1581 else
1582 m4_if([$5], , :, [$5])
1583 fi
1584 ])# _LT_LINKER_OPTION
1585
1586 # Old name:
1587 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1588 dnl aclocal-1.4 backwards compatibility:
1589 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1590
1591
1592 # LT_CMD_MAX_LEN
1593 #---------------
1594 AC_DEFUN([LT_CMD_MAX_LEN],
1595 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1596 # find the maximum length of command line arguments
1597 AC_MSG_CHECKING([the maximum length of command line arguments])
1598 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1599 i=0
1600 teststring="ABCD"
1601
1602 case $build_os in
1603 msdosdjgpp*)
1604 # On DJGPP, this test can blow up pretty badly due to problems in libc
1605 # (any single argument exceeding 2000 bytes causes a buffer overrun
1606 # during glob expansion). Even if it were fixed, the result of this
1607 # check would be larger than it should be.
1608 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1609 ;;
1610
1611 gnu*)
1612 # Under GNU Hurd, this test is not required because there is
1613 # no limit to the length of command line arguments.
1614 # Libtool will interpret -1 as no limit whatsoever
1615 lt_cv_sys_max_cmd_len=-1;
1616 ;;
1617
1618 cygwin* | mingw* | cegcc*)
1619 # On Win9x/ME, this test blows up -- it succeeds, but takes
1620 # about 5 minutes as the teststring grows exponentially.
1621 # Worse, since 9x/ME are not pre-emptively multitasking,
1622 # you end up with a "frozen" computer, even though with patience
1623 # the test eventually succeeds (with a max line length of 256k).
1624 # Instead, let's just punt: use the minimum linelength reported by
1625 # all of the supported platforms: 8192 (on NT/2K/XP).
1626 lt_cv_sys_max_cmd_len=8192;
1627 ;;
1628
1629 mint*)
1630 # On MiNT this can take a long time and run out of memory.
1631 lt_cv_sys_max_cmd_len=8192;
1632 ;;
1633
1634 amigaos*)
1635 # On AmigaOS with pdksh, this test takes hours, literally.
1636 # So we just punt and use a minimum line length of 8192.
1637 lt_cv_sys_max_cmd_len=8192;
1638 ;;
1639
1640 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1641 # This has been around since 386BSD, at least. Likely further.
1642 if test -x /sbin/sysctl; then
1643 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1644 elif test -x /usr/sbin/sysctl; then
1645 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1646 else
1647 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1648 fi
1649 # And add a safety zone
1650 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1651 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1652 ;;
1653
1654 interix*)
1655 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1656 lt_cv_sys_max_cmd_len=196608
1657 ;;
1658
1659 os2*)
1660 # The test takes a long time on OS/2.
1661 lt_cv_sys_max_cmd_len=8192
1662 ;;
1663
1664 osf*)
1665 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1666 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1667 # nice to cause kernel panics so lets avoid the loop below.
1668 # First set a reasonable default.
1669 lt_cv_sys_max_cmd_len=16384
1670 #
1671 if test -x /sbin/sysconfig; then
1672 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1673 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1674 esac
1675 fi
1676 ;;
1677 sco3.2v5*)
1678 lt_cv_sys_max_cmd_len=102400
1679 ;;
1680 sysv5* | sco5v6* | sysv4.2uw2*)
1681 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1682 if test -n "$kargmax"; then
1683 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1684 else
1685 lt_cv_sys_max_cmd_len=32768
1686 fi
1687 ;;
1688 *)
1689 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1690 if test -n "$lt_cv_sys_max_cmd_len"; then
1691 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1692 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1693 else
1694 # Make teststring a little bigger before we do anything with it.
1695 # a 1K string should be a reasonable start.
1696 for i in 1 2 3 4 5 6 7 8 ; do
1697 teststring=$teststring$teststring
1698 done
1699 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1700 # If test is not a shell built-in, we'll probably end up computing a
1701 # maximum length that is only half of the actual maximum length, but
1702 # we can't tell.
1703 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1704 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1705 test $i != 17 # 1/2 MB should be enough
1706 do
1707 i=`expr $i + 1`
1708 teststring=$teststring$teststring
1709 done
1710 # Only check the string length outside the loop.
1711 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1712 teststring=
1713 # Add a significant safety factor because C++ compilers can tack on
1714 # massive amounts of additional arguments before passing them to the
1715 # linker. It appears as though 1/2 is a usable value.
1716 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1717 fi
1718 ;;
1719 esac
1720 ])
1721 if test -n $lt_cv_sys_max_cmd_len ; then
1722 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1723 else
1724 AC_MSG_RESULT(none)
1725 fi
1726 max_cmd_len=$lt_cv_sys_max_cmd_len
1727 _LT_DECL([], [max_cmd_len], [0],
1728 [What is the maximum length of a command?])
1729 ])# LT_CMD_MAX_LEN
1730
1731 # Old name:
1732 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1733 dnl aclocal-1.4 backwards compatibility:
1734 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1735
1736
1737 # _LT_HEADER_DLFCN
1738 # ----------------
1739 m4_defun([_LT_HEADER_DLFCN],
1740 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1741 ])# _LT_HEADER_DLFCN
1742
1743
1744 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1745 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1746 # ----------------------------------------------------------------
1747 m4_defun([_LT_TRY_DLOPEN_SELF],
1748 [m4_require([_LT_HEADER_DLFCN])dnl
1749 if test "$cross_compiling" = yes; then :
1750 [$4]
1751 else
1752 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1753 lt_status=$lt_dlunknown
1754 cat > conftest.$ac_ext <<_LT_EOF
1755 [#line $LINENO "configure"
1756 #include "confdefs.h"
1757
1758 #if HAVE_DLFCN_H
1759 #include <dlfcn.h>
1760 #endif
1761
1762 #include <stdio.h>
1763
1764 #ifdef RTLD_GLOBAL
1765 # define LT_DLGLOBAL RTLD_GLOBAL
1766 #else
1767 # ifdef DL_GLOBAL
1768 # define LT_DLGLOBAL DL_GLOBAL
1769 # else
1770 # define LT_DLGLOBAL 0
1771 # endif
1772 #endif
1773
1774 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1775 find out it does not work in some platform. */
1776 #ifndef LT_DLLAZY_OR_NOW
1777 # ifdef RTLD_LAZY
1778 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1779 # else
1780 # ifdef DL_LAZY
1781 # define LT_DLLAZY_OR_NOW DL_LAZY
1782 # else
1783 # ifdef RTLD_NOW
1784 # define LT_DLLAZY_OR_NOW RTLD_NOW
1785 # else
1786 # ifdef DL_NOW
1787 # define LT_DLLAZY_OR_NOW DL_NOW
1788 # else
1789 # define LT_DLLAZY_OR_NOW 0
1790 # endif
1791 # endif
1792 # endif
1793 # endif
1794 #endif
1795
1796 /* When -fvisbility=hidden is used, assume the code has been annotated
1797 correspondingly for the symbols needed. */
1798 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1799 int fnord () __attribute__((visibility("default")));
1800 #endif
1801
1802 int fnord () { return 42; }
1803 int main ()
1804 {
1805 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1806 int status = $lt_dlunknown;
1807
1808 if (self)
1809 {
1810 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1811 else
1812 {
1813 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1814 else puts (dlerror ());
1815 }
1816 /* dlclose (self); */
1817 }
1818 else
1819 puts (dlerror ());
1820
1821 return status;
1822 }]
1823 _LT_EOF
1824 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1825 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1826 lt_status=$?
1827 case x$lt_status in
1828 x$lt_dlno_uscore) $1 ;;
1829 x$lt_dlneed_uscore) $2 ;;
1830 x$lt_dlunknown|x*) $3 ;;
1831 esac
1832 else :
1833 # compilation failed
1834 $3
1835 fi
1836 fi
1837 rm -fr conftest*
1838 ])# _LT_TRY_DLOPEN_SELF
1839
1840
1841 # LT_SYS_DLOPEN_SELF
1842 # ------------------
1843 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1844 [m4_require([_LT_HEADER_DLFCN])dnl
1845 if test "x$enable_dlopen" != xyes; then
1846 enable_dlopen=unknown
1847 enable_dlopen_self=unknown
1848 enable_dlopen_self_static=unknown
1849 else
1850 lt_cv_dlopen=no
1851 lt_cv_dlopen_libs=
1852
1853 case $host_os in
1854 beos*)
1855 lt_cv_dlopen="load_add_on"
1856 lt_cv_dlopen_libs=
1857 lt_cv_dlopen_self=yes
1858 ;;
1859
1860 mingw* | pw32* | cegcc*)
1861 lt_cv_dlopen="LoadLibrary"
1862 lt_cv_dlopen_libs=
1863 ;;
1864
1865 cygwin*)
1866 lt_cv_dlopen="dlopen"
1867 lt_cv_dlopen_libs=
1868 ;;
1869
1870 darwin*)
1871 # if libdl is installed we need to link against it
1872 AC_CHECK_LIB([dl], [dlopen],
1873 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1874 lt_cv_dlopen="dyld"
1875 lt_cv_dlopen_libs=
1876 lt_cv_dlopen_self=yes
1877 ])
1878 ;;
1879
1880 *)
1881 AC_CHECK_FUNC([shl_load],
1882 [lt_cv_dlopen="shl_load"],
1883 [AC_CHECK_LIB([dld], [shl_load],
1884 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1885 [AC_CHECK_FUNC([dlopen],
1886 [lt_cv_dlopen="dlopen"],
1887 [AC_CHECK_LIB([dl], [dlopen],
1888 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1889 [AC_CHECK_LIB([svld], [dlopen],
1890 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1891 [AC_CHECK_LIB([dld], [dld_link],
1892 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1893 ])
1894 ])
1895 ])
1896 ])
1897 ])
1898 ;;
1899 esac
1900
1901 if test "x$lt_cv_dlopen" != xno; then
1902 enable_dlopen=yes
1903 else
1904 enable_dlopen=no
1905 fi
1906
1907 case $lt_cv_dlopen in
1908 dlopen)
1909 save_CPPFLAGS="$CPPFLAGS"
1910 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1911
1912 save_LDFLAGS="$LDFLAGS"
1913 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1914
1915 save_LIBS="$LIBS"
1916 LIBS="$lt_cv_dlopen_libs $LIBS"
1917
1918 AC_CACHE_CHECK([whether a program can dlopen itself],
1919 lt_cv_dlopen_self, [dnl
1920 _LT_TRY_DLOPEN_SELF(
1921 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1922 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1923 ])
1924
1925 if test "x$lt_cv_dlopen_self" = xyes; then
1926 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1927 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1928 lt_cv_dlopen_self_static, [dnl
1929 _LT_TRY_DLOPEN_SELF(
1930 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1931 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1932 ])
1933 fi
1934
1935 CPPFLAGS="$save_CPPFLAGS"
1936 LDFLAGS="$save_LDFLAGS"
1937 LIBS="$save_LIBS"
1938 ;;
1939 esac
1940
1941 case $lt_cv_dlopen_self in
1942 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1943 *) enable_dlopen_self=unknown ;;
1944 esac
1945
1946 case $lt_cv_dlopen_self_static in
1947 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1948 *) enable_dlopen_self_static=unknown ;;
1949 esac
1950 fi
1951 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1952 [Whether dlopen is supported])
1953 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1954 [Whether dlopen of programs is supported])
1955 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1956 [Whether dlopen of statically linked programs is supported])
1957 ])# LT_SYS_DLOPEN_SELF
1958
1959 # Old name:
1960 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1961 dnl aclocal-1.4 backwards compatibility:
1962 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1963
1964
1965 # _LT_COMPILER_C_O([TAGNAME])
1966 # ---------------------------
1967 # Check to see if options -c and -o are simultaneously supported by compiler.
1968 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1969 m4_defun([_LT_COMPILER_C_O],
1970 [m4_require([_LT_DECL_SED])dnl
1971 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1972 m4_require([_LT_TAG_COMPILER])dnl
1973 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1974 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1975 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1976 $RM -r conftest 2>/dev/null
1977 mkdir conftest
1978 cd conftest
1979 mkdir out
1980 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1981
1982 lt_compiler_flag="-o out/conftest2.$ac_objext"
1983 # Insert the option either (1) after the last *FLAGS variable, or
1984 # (2) before a word containing "conftest.", or (3) at the end.
1985 # Note that $ac_compile itself does not contain backslashes and begins
1986 # with a dollar sign (not a hyphen), so the echo should work correctly.
1987 lt_compile=`echo "$ac_compile" | $SED \
1988 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1989 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1990 -e 's:$: $lt_compiler_flag:'`
1991 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1992 (eval "$lt_compile" 2>out/conftest.err)
1993 ac_status=$?
1994 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1995 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1996 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1997 then
1998 # The compiler can only warn and ignore the option if not recognized
1999 # So say no if there are warnings
2000 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2001 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2002 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2003 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2004 fi
2005 fi
2006 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2007 $RM conftest*
2008 # SGI C++ compiler will create directory out/ii_files/ for
2009 # template instantiation
2010 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2011 $RM out/* && rmdir out
2012 cd ..
2013 $RM -r conftest
2014 $RM conftest*
2015 ])
2016 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2017 [Does compiler simultaneously support -c and -o options?])
2018 ])# _LT_COMPILER_C_O
2019
2020
2021 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2022 # ----------------------------------
2023 # Check to see if we can do hard links to lock some files if needed
2024 m4_defun([_LT_COMPILER_FILE_LOCKS],
2025 [m4_require([_LT_ENABLE_LOCK])dnl
2026 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2027 _LT_COMPILER_C_O([$1])
2028
2029 hard_links="nottested"
2030 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2031 # do not overwrite the value of need_locks provided by the user
2032 AC_MSG_CHECKING([if we can lock with hard links])
2033 hard_links=yes
2034 $RM conftest*
2035 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2036 touch conftest.a
2037 ln conftest.a conftest.b 2>&5 || hard_links=no
2038 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2039 AC_MSG_RESULT([$hard_links])
2040 if test "$hard_links" = no; then
2041 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2042 need_locks=warn
2043 fi
2044 else
2045 need_locks=no
2046 fi
2047 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2048 ])# _LT_COMPILER_FILE_LOCKS
2049
2050
2051 # _LT_CHECK_OBJDIR
2052 # ----------------
2053 m4_defun([_LT_CHECK_OBJDIR],
2054 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2055 [rm -f .libs 2>/dev/null
2056 mkdir .libs 2>/dev/null
2057 if test -d .libs; then
2058 lt_cv_objdir=.libs
2059 else
2060 # MS-DOS does not allow filenames that begin with a dot.
2061 lt_cv_objdir=_libs
2062 fi
2063 rmdir .libs 2>/dev/null])
2064 objdir=$lt_cv_objdir
2065 _LT_DECL([], [objdir], [0],
2066 [The name of the directory that contains temporary libtool files])dnl
2067 m4_pattern_allow([LT_OBJDIR])dnl
2068 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2069 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2070 ])# _LT_CHECK_OBJDIR
2071
2072
2073 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2074 # --------------------------------------
2075 # Check hardcoding attributes.
2076 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2077 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2078 _LT_TAGVAR(hardcode_action, $1)=
2079 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2080 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2081 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2082
2083 # We can hardcode non-existent directories.
2084 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2085 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2086 # have to relink, otherwise we might link with an installed library
2087 # when we should be linking with a yet-to-be-installed one
2088 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2089 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2090 # Linking always hardcodes the temporary library directory.
2091 _LT_TAGVAR(hardcode_action, $1)=relink
2092 else
2093 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2094 _LT_TAGVAR(hardcode_action, $1)=immediate
2095 fi
2096 else
2097 # We cannot hardcode anything, or else we can only hardcode existing
2098 # directories.
2099 _LT_TAGVAR(hardcode_action, $1)=unsupported
2100 fi
2101 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2102
2103 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2104 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2105 # Fast installation is not supported
2106 enable_fast_install=no
2107 elif test "$shlibpath_overrides_runpath" = yes ||
2108 test "$enable_shared" = no; then
2109 # Fast installation is not necessary
2110 enable_fast_install=needless
2111 fi
2112 _LT_TAGDECL([], [hardcode_action], [0],
2113 [How to hardcode a shared library path into an executable])
2114 ])# _LT_LINKER_HARDCODE_LIBPATH
2115
2116
2117 # _LT_CMD_STRIPLIB
2118 # ----------------
2119 m4_defun([_LT_CMD_STRIPLIB],
2120 [m4_require([_LT_DECL_EGREP])
2121 striplib=
2122 old_striplib=
2123 AC_MSG_CHECKING([whether stripping libraries is possible])
2124 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2125 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2126 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2127 AC_MSG_RESULT([yes])
2128 else
2129 # FIXME - insert some real tests, host_os isn't really good enough
2130 case $host_os in
2131 darwin*)
2132 if test -n "$STRIP" ; then
2133 striplib="$STRIP -x"
2134 old_striplib="$STRIP -S"
2135 AC_MSG_RESULT([yes])
2136 else
2137 AC_MSG_RESULT([no])
2138 fi
2139 ;;
2140 *)
2141 AC_MSG_RESULT([no])
2142 ;;
2143 esac
2144 fi
2145 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2146 _LT_DECL([], [striplib], [1])
2147 ])# _LT_CMD_STRIPLIB
2148
2149
2150 # _LT_SYS_DYNAMIC_LINKER([TAG])
2151 # -----------------------------
2152 # PORTME Fill in your ld.so characteristics
2153 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2154 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2155 m4_require([_LT_DECL_EGREP])dnl
2156 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2157 m4_require([_LT_DECL_OBJDUMP])dnl
2158 m4_require([_LT_DECL_SED])dnl
2159 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2160 AC_MSG_CHECKING([dynamic linker characteristics])
2161 m4_if([$1],
2162 [], [
2163 if test "$GCC" = yes; then
2164 case $host_os in
2165 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2166 *) lt_awk_arg="/^libraries:/" ;;
2167 esac
2168 case $host_os in
2169 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2170 *) lt_sed_strip_eq="s,=/,/,g" ;;
2171 esac
2172 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2173 case $lt_search_path_spec in
2174 *\;*)
2175 # if the path contains ";" then we assume it to be the separator
2176 # otherwise default to the standard path separator (i.e. ":") - it is
2177 # assumed that no part of a normal pathname contains ";" but that should
2178 # okay in the real world where ";" in dirpaths is itself problematic.
2179 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2180 ;;
2181 *)
2182 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2183 ;;
2184 esac
2185 # Ok, now we have the path, separated by spaces, we can step through it
2186 # and add multilib dir if necessary.
2187 lt_tmp_lt_search_path_spec=
2188 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2189 for lt_sys_path in $lt_search_path_spec; do
2190 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2191 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2192 else
2193 test -d "$lt_sys_path" && \
2194 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2195 fi
2196 done
2197 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2198 BEGIN {RS=" "; FS="/|\n";} {
2199 lt_foo="";
2200 lt_count=0;
2201 for (lt_i = NF; lt_i > 0; lt_i--) {
2202 if ($lt_i != "" && $lt_i != ".") {
2203 if ($lt_i == "..") {
2204 lt_count++;
2205 } else {
2206 if (lt_count == 0) {
2207 lt_foo="/" $lt_i lt_foo;
2208 } else {
2209 lt_count--;
2210 }
2211 }
2212 }
2213 }
2214 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2215 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2216 }'`
2217 # AWK program above erroneously prepends '/' to C:/dos/paths
2218 # for these hosts.
2219 case $host_os in
2220 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2221 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2222 esac
2223 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2224 else
2225 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2226 fi])
2227 library_names_spec=
2228 libname_spec='lib$name'
2229 soname_spec=
2230 shrext_cmds=".so"
2231 postinstall_cmds=
2232 postuninstall_cmds=
2233 finish_cmds=
2234 finish_eval=
2235 shlibpath_var=
2236 shlibpath_overrides_runpath=unknown
2237 version_type=none
2238 dynamic_linker="$host_os ld.so"
2239 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2240 need_lib_prefix=unknown
2241 hardcode_into_libs=no
2242
2243 # when you set need_version to no, make sure it does not cause -set_version
2244 # flags to be left without arguments
2245 need_version=unknown
2246
2247 case $host_os in
2248 aix3*)
2249 version_type=linux # correct to gnu/linux during the next big refactor
2250 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2251 shlibpath_var=LIBPATH
2252
2253 # AIX 3 has no versioning support, so we append a major version to the name.
2254 soname_spec='${libname}${release}${shared_ext}$major'
2255 ;;
2256
2257 aix[[4-9]]*)
2258 version_type=linux # correct to gnu/linux during the next big refactor
2259 need_lib_prefix=no
2260 need_version=no
2261 hardcode_into_libs=yes
2262 if test "$host_cpu" = ia64; then
2263 # AIX 5 supports IA64
2264 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2265 shlibpath_var=LD_LIBRARY_PATH
2266 else
2267 # With GCC up to 2.95.x, collect2 would create an import file
2268 # for dependence libraries. The import file would start with
2269 # the line `#! .'. This would cause the generated library to
2270 # depend on `.', always an invalid library. This was fixed in
2271 # development snapshots of GCC prior to 3.0.
2272 case $host_os in
2273 aix4 | aix4.[[01]] | aix4.[[01]].*)
2274 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2275 echo ' yes '
2276 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2277 :
2278 else
2279 can_build_shared=no
2280 fi
2281 ;;
2282 esac
2283 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2284 # soname into executable. Probably we can add versioning support to
2285 # collect2, so additional links can be useful in future.
2286 if test "$aix_use_runtimelinking" = yes; then
2287 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2288 # instead of lib<name>.a to let people know that these are not
2289 # typical AIX shared libraries.
2290 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2291 else
2292 # We preserve .a as extension for shared libraries through AIX4.2
2293 # and later when we are not doing run time linking.
2294 library_names_spec='${libname}${release}.a $libname.a'
2295 soname_spec='${libname}${release}${shared_ext}$major'
2296 fi
2297 shlibpath_var=LIBPATH
2298 fi
2299 ;;
2300
2301 amigaos*)
2302 case $host_cpu in
2303 powerpc)
2304 # Since July 2007 AmigaOS4 officially supports .so libraries.
2305 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2306 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2307 ;;
2308 m68k)
2309 library_names_spec='$libname.ixlibrary $libname.a'
2310 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2311 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2312 ;;
2313 esac
2314 ;;
2315
2316 beos*)
2317 library_names_spec='${libname}${shared_ext}'
2318 dynamic_linker="$host_os ld.so"
2319 shlibpath_var=LIBRARY_PATH
2320 ;;
2321
2322 bsdi[[45]]*)
2323 version_type=linux # correct to gnu/linux during the next big refactor
2324 need_version=no
2325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2326 soname_spec='${libname}${release}${shared_ext}$major'
2327 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2328 shlibpath_var=LD_LIBRARY_PATH
2329 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2330 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2331 # the default ld.so.conf also contains /usr/contrib/lib and
2332 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2333 # libtool to hard-code these into programs
2334 ;;
2335
2336 cygwin* | mingw* | pw32* | cegcc*)
2337 version_type=windows
2338 shrext_cmds=".dll"
2339 need_version=no
2340 need_lib_prefix=no
2341
2342 case $GCC,$cc_basename in
2343 yes,*)
2344 # gcc
2345 library_names_spec='$libname.dll.a'
2346 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2347 postinstall_cmds='base_file=`basename \${file}`~
2348 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2349 dldir=$destdir/`dirname \$dlpath`~
2350 test -d \$dldir || mkdir -p \$dldir~
2351 $install_prog $dir/$dlname \$dldir/$dlname~
2352 chmod a+x \$dldir/$dlname~
2353 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2354 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2355 fi'
2356 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2357 dlpath=$dir/\$dldll~
2358 $RM \$dlpath'
2359 shlibpath_overrides_runpath=yes
2360
2361 case $host_os in
2362 cygwin*)
2363 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2364 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2365 m4_if([$1], [],[
2366 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2367 ;;
2368 mingw* | cegcc*)
2369 # MinGW DLLs use traditional 'lib' prefix
2370 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2371 ;;
2372 pw32*)
2373 # pw32 DLLs use 'pw' prefix rather than 'lib'
2374 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2375 ;;
2376 esac
2377 dynamic_linker='Win32 ld.exe'
2378 ;;
2379
2380 *,cl*)
2381 # Native MSVC
2382 libname_spec='$name'
2383 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2384 library_names_spec='${libname}.dll.lib'
2385
2386 case $build_os in
2387 mingw*)
2388 sys_lib_search_path_spec=
2389 lt_save_ifs=$IFS
2390 IFS=';'
2391 for lt_path in $LIB
2392 do
2393 IFS=$lt_save_ifs
2394 # Let DOS variable expansion print the short 8.3 style file name.
2395 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2396 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2397 done
2398 IFS=$lt_save_ifs
2399 # Convert to MSYS style.
2400 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2401 ;;
2402 cygwin*)
2403 # Convert to unix form, then to dos form, then back to unix form
2404 # but this time dos style (no spaces!) so that the unix form looks
2405 # like /cygdrive/c/PROGRA~1:/cygdr...
2406 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2407 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2408 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2409 ;;
2410 *)
2411 sys_lib_search_path_spec="$LIB"
2412 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2413 # It is most probably a Windows format PATH.
2414 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2415 else
2416 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2417 fi
2418 # FIXME: find the short name or the path components, as spaces are
2419 # common. (e.g. "Program Files" -> "PROGRA~1")
2420 ;;
2421 esac
2422
2423 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2424 postinstall_cmds='base_file=`basename \${file}`~
2425 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2426 dldir=$destdir/`dirname \$dlpath`~
2427 test -d \$dldir || mkdir -p \$dldir~
2428 $install_prog $dir/$dlname \$dldir/$dlname'
2429 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2430 dlpath=$dir/\$dldll~
2431 $RM \$dlpath'
2432 shlibpath_overrides_runpath=yes
2433 dynamic_linker='Win32 link.exe'
2434 ;;
2435
2436 *)
2437 # Assume MSVC wrapper
2438 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2439 dynamic_linker='Win32 ld.exe'
2440 ;;
2441 esac
2442 # FIXME: first we should search . and the directory the executable is in
2443 shlibpath_var=PATH
2444 ;;
2445
2446 darwin* | rhapsody*)
2447 dynamic_linker="$host_os dyld"
2448 version_type=darwin
2449 need_lib_prefix=no
2450 need_version=no
2451 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2452 soname_spec='${libname}${release}${major}$shared_ext'
2453 shlibpath_overrides_runpath=yes
2454 shlibpath_var=DYLD_LIBRARY_PATH
2455 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2456 m4_if([$1], [],[
2457 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2458 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2459 ;;
2460
2461 dgux*)
2462 version_type=linux # correct to gnu/linux during the next big refactor
2463 need_lib_prefix=no
2464 need_version=no
2465 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2466 soname_spec='${libname}${release}${shared_ext}$major'
2467 shlibpath_var=LD_LIBRARY_PATH
2468 ;;
2469
2470 freebsd* | dragonfly*)
2471 # DragonFly does not have aout. When/if they implement a new
2472 # versioning mechanism, adjust this.
2473 if test -x /usr/bin/objformat; then
2474 objformat=`/usr/bin/objformat`
2475 else
2476 case $host_os in
2477 freebsd[[23]].*) objformat=aout ;;
2478 *) objformat=elf ;;
2479 esac
2480 fi
2481 version_type=freebsd-$objformat
2482 case $version_type in
2483 freebsd-elf*)
2484 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2485 need_version=no
2486 need_lib_prefix=no
2487 ;;
2488 freebsd-*)
2489 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2490 need_version=yes
2491 ;;
2492 esac
2493 shlibpath_var=LD_LIBRARY_PATH
2494 case $host_os in
2495 freebsd2.*)
2496 shlibpath_overrides_runpath=yes
2497 ;;
2498 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2499 shlibpath_overrides_runpath=yes
2500 hardcode_into_libs=yes
2501 ;;
2502 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2503 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2504 shlibpath_overrides_runpath=no
2505 hardcode_into_libs=yes
2506 ;;
2507 *) # from 4.6 on, and DragonFly
2508 shlibpath_overrides_runpath=yes
2509 hardcode_into_libs=yes
2510 ;;
2511 esac
2512 ;;
2513
2514 gnu*)
2515 version_type=linux # correct to gnu/linux during the next big refactor
2516 need_lib_prefix=no
2517 need_version=no
2518 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2519 soname_spec='${libname}${release}${shared_ext}$major'
2520 shlibpath_var=LD_LIBRARY_PATH
2521 shlibpath_overrides_runpath=no
2522 hardcode_into_libs=yes
2523 ;;
2524
2525 haiku*)
2526 version_type=linux # correct to gnu/linux during the next big refactor
2527 need_lib_prefix=no
2528 need_version=no
2529 dynamic_linker="$host_os runtime_loader"
2530 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2531 soname_spec='${libname}${release}${shared_ext}$major'
2532 shlibpath_var=LIBRARY_PATH
2533 shlibpath_overrides_runpath=yes
2534 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2535 hardcode_into_libs=yes
2536 ;;
2537
2538 hpux9* | hpux10* | hpux11*)
2539 # Give a soname corresponding to the major version so that dld.sl refuses to
2540 # link against other versions.
2541 version_type=sunos
2542 need_lib_prefix=no
2543 need_version=no
2544 case $host_cpu in
2545 ia64*)
2546 shrext_cmds='.so'
2547 hardcode_into_libs=yes
2548 dynamic_linker="$host_os dld.so"
2549 shlibpath_var=LD_LIBRARY_PATH
2550 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2552 soname_spec='${libname}${release}${shared_ext}$major'
2553 if test "X$HPUX_IA64_MODE" = X32; then
2554 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2555 else
2556 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2557 fi
2558 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2559 ;;
2560 hppa*64*)
2561 shrext_cmds='.sl'
2562 hardcode_into_libs=yes
2563 dynamic_linker="$host_os dld.sl"
2564 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2565 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2567 soname_spec='${libname}${release}${shared_ext}$major'
2568 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2569 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2570 ;;
2571 *)
2572 shrext_cmds='.sl'
2573 dynamic_linker="$host_os dld.sl"
2574 shlibpath_var=SHLIB_PATH
2575 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2576 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2577 soname_spec='${libname}${release}${shared_ext}$major'
2578 ;;
2579 esac
2580 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2581 postinstall_cmds='chmod 555 $lib'
2582 # or fails outright, so override atomically:
2583 install_override_mode=555
2584 ;;
2585
2586 interix[[3-9]]*)
2587 version_type=linux # correct to gnu/linux during the next big refactor
2588 need_lib_prefix=no
2589 need_version=no
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2591 soname_spec='${libname}${release}${shared_ext}$major'
2592 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2593 shlibpath_var=LD_LIBRARY_PATH
2594 shlibpath_overrides_runpath=no
2595 hardcode_into_libs=yes
2596 ;;
2597
2598 irix5* | irix6* | nonstopux*)
2599 case $host_os in
2600 nonstopux*) version_type=nonstopux ;;
2601 *)
2602 if test "$lt_cv_prog_gnu_ld" = yes; then
2603 version_type=linux # correct to gnu/linux during the next big refactor
2604 else
2605 version_type=irix
2606 fi ;;
2607 esac
2608 need_lib_prefix=no
2609 need_version=no
2610 soname_spec='${libname}${release}${shared_ext}$major'
2611 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2612 case $host_os in
2613 irix5* | nonstopux*)
2614 libsuff= shlibsuff=
2615 ;;
2616 *)
2617 case $LD in # libtool.m4 will add one of these switches to LD
2618 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2619 libsuff= shlibsuff= libmagic=32-bit;;
2620 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2621 libsuff=32 shlibsuff=N32 libmagic=N32;;
2622 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2623 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2624 *) libsuff= shlibsuff= libmagic=never-match;;
2625 esac
2626 ;;
2627 esac
2628 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2629 shlibpath_overrides_runpath=no
2630 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2631 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2632 hardcode_into_libs=yes
2633 ;;
2634
2635 # No shared lib support for Linux oldld, aout, or coff.
2636 linux*oldld* | linux*aout* | linux*coff*)
2637 dynamic_linker=no
2638 ;;
2639
2640 # This must be glibc/ELF.
2641 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2642 version_type=linux # correct to gnu/linux during the next big refactor
2643 need_lib_prefix=no
2644 need_version=no
2645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2646 soname_spec='${libname}${release}${shared_ext}$major'
2647 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2648 shlibpath_var=LD_LIBRARY_PATH
2649 shlibpath_overrides_runpath=no
2650
2651 # Some binutils ld are patched to set DT_RUNPATH
2652 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2653 [lt_cv_shlibpath_overrides_runpath=no
2654 save_LDFLAGS=$LDFLAGS
2655 save_libdir=$libdir
2656 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2657 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2658 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2659 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2660 [lt_cv_shlibpath_overrides_runpath=yes])])
2661 LDFLAGS=$save_LDFLAGS
2662 libdir=$save_libdir
2663 ])
2664 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2665
2666 # This implies no fast_install, which is unacceptable.
2667 # Some rework will be needed to allow for fast_install
2668 # before this can be enabled.
2669 hardcode_into_libs=yes
2670
2671 # Append ld.so.conf contents to the search path
2672 if test -f /etc/ld.so.conf; then
2673 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2674 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2675 fi
2676
2677 # We used to test for /lib/ld.so.1 and disable shared libraries on
2678 # powerpc, because MkLinux only supported shared libraries with the
2679 # GNU dynamic linker. Since this was broken with cross compilers,
2680 # most powerpc-linux boxes support dynamic linking these days and
2681 # people can always --disable-shared, the test was removed, and we
2682 # assume the GNU/Linux dynamic linker is in use.
2683 dynamic_linker='GNU/Linux ld.so'
2684 ;;
2685
2686 netbsdelf*-gnu)
2687 version_type=linux
2688 need_lib_prefix=no
2689 need_version=no
2690 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2691 soname_spec='${libname}${release}${shared_ext}$major'
2692 shlibpath_var=LD_LIBRARY_PATH
2693 shlibpath_overrides_runpath=no
2694 hardcode_into_libs=yes
2695 dynamic_linker='NetBSD ld.elf_so'
2696 ;;
2697
2698 netbsd*)
2699 version_type=sunos
2700 need_lib_prefix=no
2701 need_version=no
2702 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2704 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2705 dynamic_linker='NetBSD (a.out) ld.so'
2706 else
2707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2708 soname_spec='${libname}${release}${shared_ext}$major'
2709 dynamic_linker='NetBSD ld.elf_so'
2710 fi
2711 shlibpath_var=LD_LIBRARY_PATH
2712 shlibpath_overrides_runpath=yes
2713 hardcode_into_libs=yes
2714 ;;
2715
2716 newsos6)
2717 version_type=linux # correct to gnu/linux during the next big refactor
2718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2719 shlibpath_var=LD_LIBRARY_PATH
2720 shlibpath_overrides_runpath=yes
2721 ;;
2722
2723 *nto* | *qnx*)
2724 version_type=qnx
2725 need_lib_prefix=no
2726 need_version=no
2727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2728 soname_spec='${libname}${release}${shared_ext}$major'
2729 shlibpath_var=LD_LIBRARY_PATH
2730 shlibpath_overrides_runpath=no
2731 hardcode_into_libs=yes
2732 dynamic_linker='ldqnx.so'
2733 ;;
2734
2735 openbsd*)
2736 version_type=sunos
2737 sys_lib_dlsearch_path_spec="/usr/lib"
2738 need_lib_prefix=no
2739 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2740 case $host_os in
2741 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2742 *) need_version=no ;;
2743 esac
2744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2745 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2746 shlibpath_var=LD_LIBRARY_PATH
2747 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2748 case $host_os in
2749 openbsd2.[[89]] | openbsd2.[[89]].*)
2750 shlibpath_overrides_runpath=no
2751 ;;
2752 *)
2753 shlibpath_overrides_runpath=yes
2754 ;;
2755 esac
2756 else
2757 shlibpath_overrides_runpath=yes
2758 fi
2759 ;;
2760
2761 os2*)
2762 libname_spec='$name'
2763 shrext_cmds=".dll"
2764 need_lib_prefix=no
2765 library_names_spec='$libname${shared_ext} $libname.a'
2766 dynamic_linker='OS/2 ld.exe'
2767 shlibpath_var=LIBPATH
2768 ;;
2769
2770 osf3* | osf4* | osf5*)
2771 version_type=osf
2772 need_lib_prefix=no
2773 need_version=no
2774 soname_spec='${libname}${release}${shared_ext}$major'
2775 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2776 shlibpath_var=LD_LIBRARY_PATH
2777 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2778 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2779 ;;
2780
2781 rdos*)
2782 dynamic_linker=no
2783 ;;
2784
2785 solaris*)
2786 version_type=linux # correct to gnu/linux during the next big refactor
2787 need_lib_prefix=no
2788 need_version=no
2789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2790 soname_spec='${libname}${release}${shared_ext}$major'
2791 shlibpath_var=LD_LIBRARY_PATH
2792 shlibpath_overrides_runpath=yes
2793 hardcode_into_libs=yes
2794 # ldd complains unless libraries are executable
2795 postinstall_cmds='chmod +x $lib'
2796 ;;
2797
2798 sunos4*)
2799 version_type=sunos
2800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2801 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2802 shlibpath_var=LD_LIBRARY_PATH
2803 shlibpath_overrides_runpath=yes
2804 if test "$with_gnu_ld" = yes; then
2805 need_lib_prefix=no
2806 fi
2807 need_version=yes
2808 ;;
2809
2810 sysv4 | sysv4.3*)
2811 version_type=linux # correct to gnu/linux during the next big refactor
2812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2813 soname_spec='${libname}${release}${shared_ext}$major'
2814 shlibpath_var=LD_LIBRARY_PATH
2815 case $host_vendor in
2816 sni)
2817 shlibpath_overrides_runpath=no
2818 need_lib_prefix=no
2819 runpath_var=LD_RUN_PATH
2820 ;;
2821 siemens)
2822 need_lib_prefix=no
2823 ;;
2824 motorola)
2825 need_lib_prefix=no
2826 need_version=no
2827 shlibpath_overrides_runpath=no
2828 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2829 ;;
2830 esac
2831 ;;
2832
2833 sysv4*MP*)
2834 if test -d /usr/nec ;then
2835 version_type=linux # correct to gnu/linux during the next big refactor
2836 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2837 soname_spec='$libname${shared_ext}.$major'
2838 shlibpath_var=LD_LIBRARY_PATH
2839 fi
2840 ;;
2841
2842 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2843 version_type=freebsd-elf
2844 need_lib_prefix=no
2845 need_version=no
2846 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2847 soname_spec='${libname}${release}${shared_ext}$major'
2848 shlibpath_var=LD_LIBRARY_PATH
2849 shlibpath_overrides_runpath=yes
2850 hardcode_into_libs=yes
2851 if test "$with_gnu_ld" = yes; then
2852 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2853 else
2854 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2855 case $host_os in
2856 sco3.2v5*)
2857 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2858 ;;
2859 esac
2860 fi
2861 sys_lib_dlsearch_path_spec='/usr/lib'
2862 ;;
2863
2864 tpf*)
2865 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2866 version_type=linux # correct to gnu/linux during the next big refactor
2867 need_lib_prefix=no
2868 need_version=no
2869 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2870 shlibpath_var=LD_LIBRARY_PATH
2871 shlibpath_overrides_runpath=no
2872 hardcode_into_libs=yes
2873 ;;
2874
2875 uts4*)
2876 version_type=linux # correct to gnu/linux during the next big refactor
2877 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2878 soname_spec='${libname}${release}${shared_ext}$major'
2879 shlibpath_var=LD_LIBRARY_PATH
2880 ;;
2881
2882 *)
2883 dynamic_linker=no
2884 ;;
2885 esac
2886 AC_MSG_RESULT([$dynamic_linker])
2887 test "$dynamic_linker" = no && can_build_shared=no
2888
2889 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2890 if test "$GCC" = yes; then
2891 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2892 fi
2893
2894 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2895 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2896 fi
2897 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2898 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2899 fi
2900
2901 _LT_DECL([], [variables_saved_for_relink], [1],
2902 [Variables whose values should be saved in libtool wrapper scripts and
2903 restored at link time])
2904 _LT_DECL([], [need_lib_prefix], [0],
2905 [Do we need the "lib" prefix for modules?])
2906 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2907 _LT_DECL([], [version_type], [0], [Library versioning type])
2908 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2909 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2910 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2911 [Is shlibpath searched before the hard-coded library search path?])
2912 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2913 _LT_DECL([], [library_names_spec], [1],
2914 [[List of archive names. First name is the real one, the rest are links.
2915 The last name is the one that the linker finds with -lNAME]])
2916 _LT_DECL([], [soname_spec], [1],
2917 [[The coded name of the library, if different from the real name]])
2918 _LT_DECL([], [install_override_mode], [1],
2919 [Permission mode override for installation of shared libraries])
2920 _LT_DECL([], [postinstall_cmds], [2],
2921 [Command to use after installation of a shared archive])
2922 _LT_DECL([], [postuninstall_cmds], [2],
2923 [Command to use after uninstallation of a shared archive])
2924 _LT_DECL([], [finish_cmds], [2],
2925 [Commands used to finish a libtool library installation in a directory])
2926 _LT_DECL([], [finish_eval], [1],
2927 [[As "finish_cmds", except a single script fragment to be evaled but
2928 not shown]])
2929 _LT_DECL([], [hardcode_into_libs], [0],
2930 [Whether we should hardcode library paths into libraries])
2931 _LT_DECL([], [sys_lib_search_path_spec], [2],
2932 [Compile-time system search path for libraries])
2933 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2934 [Run-time system search path for libraries])
2935 ])# _LT_SYS_DYNAMIC_LINKER
2936
2937
2938 # _LT_PATH_TOOL_PREFIX(TOOL)
2939 # --------------------------
2940 # find a file program which can recognize shared library
2941 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2942 [m4_require([_LT_DECL_EGREP])dnl
2943 AC_MSG_CHECKING([for $1])
2944 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2945 [case $MAGIC_CMD in
2946 [[\\/*] | ?:[\\/]*])
2947 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2948 ;;
2949 *)
2950 lt_save_MAGIC_CMD="$MAGIC_CMD"
2951 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2952 dnl $ac_dummy forces splitting on constant user-supplied paths.
2953 dnl POSIX.2 word splitting is done only on the output of word expansions,
2954 dnl not every word. This closes a longstanding sh security hole.
2955 ac_dummy="m4_if([$2], , $PATH, [$2])"
2956 for ac_dir in $ac_dummy; do
2957 IFS="$lt_save_ifs"
2958 test -z "$ac_dir" && ac_dir=.
2959 if test -f $ac_dir/$1; then
2960 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2961 if test -n "$file_magic_test_file"; then
2962 case $deplibs_check_method in
2963 "file_magic "*)
2964 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2965 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2966 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2967 $EGREP "$file_magic_regex" > /dev/null; then
2968 :
2969 else
2970 cat <<_LT_EOF 1>&2
2971
2972 *** Warning: the command libtool uses to detect shared libraries,
2973 *** $file_magic_cmd, produces output that libtool cannot recognize.
2974 *** The result is that libtool may fail to recognize shared libraries
2975 *** as such. This will affect the creation of libtool libraries that
2976 *** depend on shared libraries, but programs linked with such libtool
2977 *** libraries will work regardless of this problem. Nevertheless, you
2978 *** may want to report the problem to your system manager and/or to
2979 *** bug-libtool@gnu.org
2980
2981 _LT_EOF
2982 fi ;;
2983 esac
2984 fi
2985 break
2986 fi
2987 done
2988 IFS="$lt_save_ifs"
2989 MAGIC_CMD="$lt_save_MAGIC_CMD"
2990 ;;
2991 esac])
2992 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2993 if test -n "$MAGIC_CMD"; then
2994 AC_MSG_RESULT($MAGIC_CMD)
2995 else
2996 AC_MSG_RESULT(no)
2997 fi
2998 _LT_DECL([], [MAGIC_CMD], [0],
2999 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3000 ])# _LT_PATH_TOOL_PREFIX
3001
3002 # Old name:
3003 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3004 dnl aclocal-1.4 backwards compatibility:
3005 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3006
3007
3008 # _LT_PATH_MAGIC
3009 # --------------
3010 # find a file program which can recognize a shared library
3011 m4_defun([_LT_PATH_MAGIC],
3012 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3013 if test -z "$lt_cv_path_MAGIC_CMD"; then
3014 if test -n "$ac_tool_prefix"; then
3015 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3016 else
3017 MAGIC_CMD=:
3018 fi
3019 fi
3020 ])# _LT_PATH_MAGIC
3021
3022
3023 # LT_PATH_LD
3024 # ----------
3025 # find the pathname to the GNU or non-GNU linker
3026 AC_DEFUN([LT_PATH_LD],
3027 [AC_REQUIRE([AC_PROG_CC])dnl
3028 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3029 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3030 m4_require([_LT_DECL_SED])dnl
3031 m4_require([_LT_DECL_EGREP])dnl
3032 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3033
3034 AC_ARG_WITH([gnu-ld],
3035 [AS_HELP_STRING([--with-gnu-ld],
3036 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3037 [test "$withval" = no || with_gnu_ld=yes],
3038 [with_gnu_ld=no])dnl
3039
3040 ac_prog=ld
3041 if test "$GCC" = yes; then
3042 # Check if gcc -print-prog-name=ld gives a path.
3043 AC_MSG_CHECKING([for ld used by $CC])
3044 case $host in
3045 *-*-mingw*)
3046 # gcc leaves a trailing carriage return which upsets mingw
3047 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3048 *)
3049 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3050 esac
3051 case $ac_prog in
3052 # Accept absolute paths.
3053 [[\\/]]* | ?:[[\\/]]*)
3054 re_direlt='/[[^/]][[^/]]*/\.\./'
3055 # Canonicalize the pathname of ld
3056 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3057 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3058 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3059 done
3060 test -z "$LD" && LD="$ac_prog"
3061 ;;
3062 "")
3063 # If it fails, then pretend we aren't using GCC.
3064 ac_prog=ld
3065 ;;
3066 *)
3067 # If it is relative, then search for the first ld in PATH.
3068 with_gnu_ld=unknown
3069 ;;
3070 esac
3071 elif test "$with_gnu_ld" = yes; then
3072 AC_MSG_CHECKING([for GNU ld])
3073 else
3074 AC_MSG_CHECKING([for non-GNU ld])
3075 fi
3076 AC_CACHE_VAL(lt_cv_path_LD,
3077 [if test -z "$LD"; then
3078 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3079 for ac_dir in $PATH; do
3080 IFS="$lt_save_ifs"
3081 test -z "$ac_dir" && ac_dir=.
3082 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3083 lt_cv_path_LD="$ac_dir/$ac_prog"
3084 # Check to see if the program is GNU ld. I'd rather use --version,
3085 # but apparently some variants of GNU ld only accept -v.
3086 # Break only if it was the GNU/non-GNU ld that we prefer.
3087 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3088 *GNU* | *'with BFD'*)
3089 test "$with_gnu_ld" != no && break
3090 ;;
3091 *)
3092 test "$with_gnu_ld" != yes && break
3093 ;;
3094 esac
3095 fi
3096 done
3097 IFS="$lt_save_ifs"
3098 else
3099 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3100 fi])
3101 LD="$lt_cv_path_LD"
3102 if test -n "$LD"; then
3103 AC_MSG_RESULT($LD)
3104 else
3105 AC_MSG_RESULT(no)
3106 fi
3107 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3108 _LT_PATH_LD_GNU
3109 AC_SUBST([LD])
3110
3111 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3112 ])# LT_PATH_LD
3113
3114 # Old names:
3115 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3116 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3117 dnl aclocal-1.4 backwards compatibility:
3118 dnl AC_DEFUN([AM_PROG_LD], [])
3119 dnl AC_DEFUN([AC_PROG_LD], [])
3120
3121
3122 # _LT_PATH_LD_GNU
3123 #- --------------
3124 m4_defun([_LT_PATH_LD_GNU],
3125 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3126 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3127 case `$LD -v 2>&1 </dev/null` in
3128 *GNU* | *'with BFD'*)
3129 lt_cv_prog_gnu_ld=yes
3130 ;;
3131 *)
3132 lt_cv_prog_gnu_ld=no
3133 ;;
3134 esac])
3135 with_gnu_ld=$lt_cv_prog_gnu_ld
3136 ])# _LT_PATH_LD_GNU
3137
3138
3139 # _LT_CMD_RELOAD
3140 # --------------
3141 # find reload flag for linker
3142 # -- PORTME Some linkers may need a different reload flag.
3143 m4_defun([_LT_CMD_RELOAD],
3144 [AC_CACHE_CHECK([for $LD option to reload object files],
3145 lt_cv_ld_reload_flag,
3146 [lt_cv_ld_reload_flag='-r'])
3147 reload_flag=$lt_cv_ld_reload_flag
3148 case $reload_flag in
3149 "" | " "*) ;;
3150 *) reload_flag=" $reload_flag" ;;
3151 esac
3152 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3153 case $host_os in
3154 cygwin* | mingw* | pw32* | cegcc*)
3155 if test "$GCC" != yes; then
3156 reload_cmds=false
3157 fi
3158 ;;
3159 darwin*)
3160 if test "$GCC" = yes; then
3161 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3162 else
3163 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3164 fi
3165 ;;
3166 esac
3167 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3168 _LT_TAGDECL([], [reload_cmds], [2])dnl
3169 ])# _LT_CMD_RELOAD
3170
3171
3172 # _LT_CHECK_MAGIC_METHOD
3173 # ----------------------
3174 # how to check for library dependencies
3175 # -- PORTME fill in with the dynamic library characteristics
3176 m4_defun([_LT_CHECK_MAGIC_METHOD],
3177 [m4_require([_LT_DECL_EGREP])
3178 m4_require([_LT_DECL_OBJDUMP])
3179 AC_CACHE_CHECK([how to recognize dependent libraries],
3180 lt_cv_deplibs_check_method,
3181 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3182 lt_cv_file_magic_test_file=
3183 lt_cv_deplibs_check_method='unknown'
3184 # Need to set the preceding variable on all platforms that support
3185 # interlibrary dependencies.
3186 # 'none' -- dependencies not supported.
3187 # `unknown' -- same as none, but documents that we really don't know.
3188 # 'pass_all' -- all dependencies passed with no checks.
3189 # 'test_compile' -- check by making test program.
3190 # 'file_magic [[regex]]' -- check by looking for files in library path
3191 # which responds to the $file_magic_cmd with a given extended regex.
3192 # If you have `file' or equivalent on your system and you're not sure
3193 # whether `pass_all' will *always* work, you probably want this one.
3194
3195 case $host_os in
3196 aix[[4-9]]*)
3197 lt_cv_deplibs_check_method=pass_all
3198 ;;
3199
3200 beos*)
3201 lt_cv_deplibs_check_method=pass_all
3202 ;;
3203
3204 bsdi[[45]]*)
3205 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3206 lt_cv_file_magic_cmd='/usr/bin/file -L'
3207 lt_cv_file_magic_test_file=/shlib/libc.so
3208 ;;
3209
3210 cygwin*)
3211 # func_win32_libid is a shell function defined in ltmain.sh
3212 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3213 lt_cv_file_magic_cmd='func_win32_libid'
3214 ;;
3215
3216 mingw* | pw32*)
3217 # Base MSYS/MinGW do not provide the 'file' command needed by
3218 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3219 # unless we find 'file', for example because we are cross-compiling.
3220 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3221 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3222 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3223 lt_cv_file_magic_cmd='func_win32_libid'
3224 else
3225 # Keep this pattern in sync with the one in func_win32_libid.
3226 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3227 lt_cv_file_magic_cmd='$OBJDUMP -f'
3228 fi
3229 ;;
3230
3231 cegcc*)
3232 # use the weaker test based on 'objdump'. See mingw*.
3233 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3234 lt_cv_file_magic_cmd='$OBJDUMP -f'
3235 ;;
3236
3237 darwin* | rhapsody*)
3238 lt_cv_deplibs_check_method=pass_all
3239 ;;
3240
3241 freebsd* | dragonfly*)
3242 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3243 case $host_cpu in
3244 i*86 )
3245 # Not sure whether the presence of OpenBSD here was a mistake.
3246 # Let's accept both of them until this is cleared up.
3247 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3248 lt_cv_file_magic_cmd=/usr/bin/file
3249 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3250 ;;
3251 esac
3252 else
3253 lt_cv_deplibs_check_method=pass_all
3254 fi
3255 ;;
3256
3257 gnu*)
3258 lt_cv_deplibs_check_method=pass_all
3259 ;;
3260
3261 haiku*)
3262 lt_cv_deplibs_check_method=pass_all
3263 ;;
3264
3265 hpux10.20* | hpux11*)
3266 lt_cv_file_magic_cmd=/usr/bin/file
3267 case $host_cpu in
3268 ia64*)
3269 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3270 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3271 ;;
3272 hppa*64*)
3273 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3274 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3275 ;;
3276 *)
3277 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3278 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3279 ;;
3280 esac
3281 ;;
3282
3283 interix[[3-9]]*)
3284 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3285 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3286 ;;
3287
3288 irix5* | irix6* | nonstopux*)
3289 case $LD in
3290 *-32|*"-32 ") libmagic=32-bit;;
3291 *-n32|*"-n32 ") libmagic=N32;;
3292 *-64|*"-64 ") libmagic=64-bit;;
3293 *) libmagic=never-match;;
3294 esac
3295 lt_cv_deplibs_check_method=pass_all
3296 ;;
3297
3298 # This must be glibc/ELF.
3299 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3300 lt_cv_deplibs_check_method=pass_all
3301 ;;
3302
3303 netbsd* | netbsdelf*-gnu)
3304 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3305 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3306 else
3307 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3308 fi
3309 ;;
3310
3311 newos6*)
3312 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3313 lt_cv_file_magic_cmd=/usr/bin/file
3314 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3315 ;;
3316
3317 *nto* | *qnx*)
3318 lt_cv_deplibs_check_method=pass_all
3319 ;;
3320
3321 openbsd*)
3322 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3323 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3324 else
3325 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3326 fi
3327 ;;
3328
3329 osf3* | osf4* | osf5*)
3330 lt_cv_deplibs_check_method=pass_all
3331 ;;
3332
3333 rdos*)
3334 lt_cv_deplibs_check_method=pass_all
3335 ;;
3336
3337 solaris*)
3338 lt_cv_deplibs_check_method=pass_all
3339 ;;
3340
3341 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3342 lt_cv_deplibs_check_method=pass_all
3343 ;;
3344
3345 sysv4 | sysv4.3*)
3346 case $host_vendor in
3347 motorola)
3348 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3349 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3350 ;;
3351 ncr)
3352 lt_cv_deplibs_check_method=pass_all
3353 ;;
3354 sequent)
3355 lt_cv_file_magic_cmd='/bin/file'
3356 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3357 ;;
3358 sni)
3359 lt_cv_file_magic_cmd='/bin/file'
3360 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3361 lt_cv_file_magic_test_file=/lib/libc.so
3362 ;;
3363 siemens)
3364 lt_cv_deplibs_check_method=pass_all
3365 ;;
3366 pc)
3367 lt_cv_deplibs_check_method=pass_all
3368 ;;
3369 esac
3370 ;;
3371
3372 tpf*)
3373 lt_cv_deplibs_check_method=pass_all
3374 ;;
3375 esac
3376 ])
3377
3378 file_magic_glob=
3379 want_nocaseglob=no
3380 if test "$build" = "$host"; then
3381 case $host_os in
3382 mingw* | pw32*)
3383 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3384 want_nocaseglob=yes
3385 else
3386 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3387 fi
3388 ;;
3389 esac
3390 fi
3391
3392 file_magic_cmd=$lt_cv_file_magic_cmd
3393 deplibs_check_method=$lt_cv_deplibs_check_method
3394 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3395
3396 _LT_DECL([], [deplibs_check_method], [1],
3397 [Method to check whether dependent libraries are shared objects])
3398 _LT_DECL([], [file_magic_cmd], [1],
3399 [Command to use when deplibs_check_method = "file_magic"])
3400 _LT_DECL([], [file_magic_glob], [1],
3401 [How to find potential files when deplibs_check_method = "file_magic"])
3402 _LT_DECL([], [want_nocaseglob], [1],
3403 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3404 ])# _LT_CHECK_MAGIC_METHOD
3405
3406
3407 # LT_PATH_NM
3408 # ----------
3409 # find the pathname to a BSD- or MS-compatible name lister
3410 AC_DEFUN([LT_PATH_NM],
3411 [AC_REQUIRE([AC_PROG_CC])dnl
3412 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3413 [if test -n "$NM"; then
3414 # Let the user override the test.
3415 lt_cv_path_NM="$NM"
3416 else
3417 lt_nm_to_check="${ac_tool_prefix}nm"
3418 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3419 lt_nm_to_check="$lt_nm_to_check nm"
3420 fi
3421 for lt_tmp_nm in $lt_nm_to_check; do
3422 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3423 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3424 IFS="$lt_save_ifs"
3425 test -z "$ac_dir" && ac_dir=.
3426 tmp_nm="$ac_dir/$lt_tmp_nm"
3427 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3428 # Check to see if the nm accepts a BSD-compat flag.
3429 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3430 # nm: unknown option "B" ignored
3431 # Tru64's nm complains that /dev/null is an invalid object file
3432 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3433 */dev/null* | *'Invalid file or object type'*)
3434 lt_cv_path_NM="$tmp_nm -B"
3435 break
3436 ;;
3437 *)
3438 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3439 */dev/null*)
3440 lt_cv_path_NM="$tmp_nm -p"
3441 break
3442 ;;
3443 *)
3444 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3445 continue # so that we can try to find one that supports BSD flags
3446 ;;
3447 esac
3448 ;;
3449 esac
3450 fi
3451 done
3452 IFS="$lt_save_ifs"
3453 done
3454 : ${lt_cv_path_NM=no}
3455 fi])
3456 if test "$lt_cv_path_NM" != "no"; then
3457 NM="$lt_cv_path_NM"
3458 else
3459 # Didn't find any BSD compatible name lister, look for dumpbin.
3460 if test -n "$DUMPBIN"; then :
3461 # Let the user override the test.
3462 else
3463 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3464 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3465 *COFF*)
3466 DUMPBIN="$DUMPBIN -symbols"
3467 ;;
3468 *)
3469 DUMPBIN=:
3470 ;;
3471 esac
3472 fi
3473 AC_SUBST([DUMPBIN])
3474 if test "$DUMPBIN" != ":"; then
3475 NM="$DUMPBIN"
3476 fi
3477 fi
3478 test -z "$NM" && NM=nm
3479 AC_SUBST([NM])
3480 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3481
3482 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3483 [lt_cv_nm_interface="BSD nm"
3484 echo "int some_variable = 0;" > conftest.$ac_ext
3485 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3486 (eval "$ac_compile" 2>conftest.err)
3487 cat conftest.err >&AS_MESSAGE_LOG_FD
3488 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3489 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3490 cat conftest.err >&AS_MESSAGE_LOG_FD
3491 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3492 cat conftest.out >&AS_MESSAGE_LOG_FD
3493 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3494 lt_cv_nm_interface="MS dumpbin"
3495 fi
3496 rm -f conftest*])
3497 ])# LT_PATH_NM
3498
3499 # Old names:
3500 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3501 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3502 dnl aclocal-1.4 backwards compatibility:
3503 dnl AC_DEFUN([AM_PROG_NM], [])
3504 dnl AC_DEFUN([AC_PROG_NM], [])
3505
3506 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3507 # --------------------------------
3508 # how to determine the name of the shared library
3509 # associated with a specific link library.
3510 # -- PORTME fill in with the dynamic library characteristics
3511 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3512 [m4_require([_LT_DECL_EGREP])
3513 m4_require([_LT_DECL_OBJDUMP])
3514 m4_require([_LT_DECL_DLLTOOL])
3515 AC_CACHE_CHECK([how to associate runtime and link libraries],
3516 lt_cv_sharedlib_from_linklib_cmd,
3517 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3518
3519 case $host_os in
3520 cygwin* | mingw* | pw32* | cegcc*)
3521 # two different shell functions defined in ltmain.sh
3522 # decide which to use based on capabilities of $DLLTOOL
3523 case `$DLLTOOL --help 2>&1` in
3524 *--identify-strict*)
3525 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3526 ;;
3527 *)
3528 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3529 ;;
3530 esac
3531 ;;
3532 *)
3533 # fallback: assume linklib IS sharedlib
3534 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3535 ;;
3536 esac
3537 ])
3538 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3539 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3540
3541 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3542 [Command to associate shared and link libraries])
3543 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3544
3545
3546 # _LT_PATH_MANIFEST_TOOL
3547 # ----------------------
3548 # locate the manifest tool
3549 m4_defun([_LT_PATH_MANIFEST_TOOL],
3550 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3551 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3552 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3553 [lt_cv_path_mainfest_tool=no
3554 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3555 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3556 cat conftest.err >&AS_MESSAGE_LOG_FD
3557 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3558 lt_cv_path_mainfest_tool=yes
3559 fi
3560 rm -f conftest*])
3561 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3562 MANIFEST_TOOL=:
3563 fi
3564 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3565 ])# _LT_PATH_MANIFEST_TOOL
3566
3567
3568 # LT_LIB_M
3569 # --------
3570 # check for math library
3571 AC_DEFUN([LT_LIB_M],
3572 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3573 LIBM=
3574 case $host in
3575 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3576 # These system don't have libm, or don't need it
3577 ;;
3578 *-ncr-sysv4.3*)
3579 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3580 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3581 ;;
3582 *)
3583 AC_CHECK_LIB(m, cos, LIBM="-lm")
3584 ;;
3585 esac
3586 AC_SUBST([LIBM])
3587 ])# LT_LIB_M
3588
3589 # Old name:
3590 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3591 dnl aclocal-1.4 backwards compatibility:
3592 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3593
3594
3595 # _LT_COMPILER_NO_RTTI([TAGNAME])
3596 # -------------------------------
3597 m4_defun([_LT_COMPILER_NO_RTTI],
3598 [m4_require([_LT_TAG_COMPILER])dnl
3599
3600 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3601
3602 if test "$GCC" = yes; then
3603 case $cc_basename in
3604 nvcc*)
3605 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3606 *)
3607 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3608 esac
3609
3610 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3611 lt_cv_prog_compiler_rtti_exceptions,
3612 [-fno-rtti -fno-exceptions], [],
3613 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3614 fi
3615 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3616 [Compiler flag to turn off builtin functions])
3617 ])# _LT_COMPILER_NO_RTTI
3618
3619
3620 # _LT_CMD_GLOBAL_SYMBOLS
3621 # ----------------------
3622 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3623 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3624 AC_REQUIRE([AC_PROG_CC])dnl
3625 AC_REQUIRE([AC_PROG_AWK])dnl
3626 AC_REQUIRE([LT_PATH_NM])dnl
3627 AC_REQUIRE([LT_PATH_LD])dnl
3628 m4_require([_LT_DECL_SED])dnl
3629 m4_require([_LT_DECL_EGREP])dnl
3630 m4_require([_LT_TAG_COMPILER])dnl
3631
3632 # Check for command to grab the raw symbol name followed by C symbol from nm.
3633 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3634 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3635 [
3636 # These are sane defaults that work on at least a few old systems.
3637 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3638
3639 # Character class describing NM global symbol codes.
3640 symcode='[[BCDEGRST]]'
3641
3642 # Regexp to match symbols that can be accessed directly from C.
3643 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3644
3645 # Define system-specific variables.
3646 case $host_os in
3647 aix*)
3648 symcode='[[BCDT]]'
3649 ;;
3650 cygwin* | mingw* | pw32* | cegcc*)
3651 symcode='[[ABCDGISTW]]'
3652 ;;
3653 hpux*)
3654 if test "$host_cpu" = ia64; then
3655 symcode='[[ABCDEGRST]]'
3656 fi
3657 ;;
3658 irix* | nonstopux*)
3659 symcode='[[BCDEGRST]]'
3660 ;;
3661 osf*)
3662 symcode='[[BCDEGQRST]]'
3663 ;;
3664 solaris*)
3665 symcode='[[BDRT]]'
3666 ;;
3667 sco3.2v5*)
3668 symcode='[[DT]]'
3669 ;;
3670 sysv4.2uw2*)
3671 symcode='[[DT]]'
3672 ;;
3673 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3674 symcode='[[ABDT]]'
3675 ;;
3676 sysv4)
3677 symcode='[[DFNSTU]]'
3678 ;;
3679 esac
3680
3681 # If we're using GNU nm, then use its standard symbol codes.
3682 case `$NM -V 2>&1` in
3683 *GNU* | *'with BFD'*)
3684 symcode='[[ABCDGIRSTW]]' ;;
3685 esac
3686
3687 # Transform an extracted symbol line into a proper C declaration.
3688 # Some systems (esp. on ia64) link data and code symbols differently,
3689 # so use this general approach.
3690 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3691
3692 # Transform an extracted symbol line into symbol name and symbol address
3693 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3694 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3695
3696 # Handle CRLF in mingw tool chain
3697 opt_cr=
3698 case $build_os in
3699 mingw*)
3700 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3701 ;;
3702 esac
3703
3704 # Try without a prefix underscore, then with it.
3705 for ac_symprfx in "" "_"; do
3706
3707 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3708 symxfrm="\\1 $ac_symprfx\\2 \\2"
3709
3710 # Write the raw and C identifiers.
3711 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3712 # Fake it for dumpbin and say T for any non-static function
3713 # and D for any global variable.
3714 # Also find C++ and __fastcall symbols from MSVC++,
3715 # which start with @ or ?.
3716 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3717 " {last_section=section; section=\$ 3};"\
3718 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3719 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3720 " \$ 0!~/External *\|/{next};"\
3721 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3722 " {if(hide[section]) next};"\
3723 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3724 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3725 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3726 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3727 " ' prfx=^$ac_symprfx]"
3728 else
3729 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3730 fi
3731 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3732
3733 # Check to see that the pipe works correctly.
3734 pipe_works=no
3735
3736 rm -f conftest*
3737 cat > conftest.$ac_ext <<_LT_EOF
3738 #ifdef __cplusplus
3739 extern "C" {
3740 #endif
3741 char nm_test_var;
3742 void nm_test_func(void);
3743 void nm_test_func(void){}
3744 #ifdef __cplusplus
3745 }
3746 #endif
3747 int main(){nm_test_var='a';nm_test_func();return(0);}
3748 _LT_EOF
3749
3750 if AC_TRY_EVAL(ac_compile); then
3751 # Now try to grab the symbols.
3752 nlist=conftest.nm
3753 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3754 # Try sorting and uniquifying the output.
3755 if sort "$nlist" | uniq > "$nlist"T; then
3756 mv -f "$nlist"T "$nlist"
3757 else
3758 rm -f "$nlist"T
3759 fi
3760
3761 # Make sure that we snagged all the symbols we need.
3762 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3763 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3764 cat <<_LT_EOF > conftest.$ac_ext
3765 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3766 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3767 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3768 relocations are performed -- see ld's documentation on pseudo-relocs. */
3769 # define LT@&t@_DLSYM_CONST
3770 #elif defined(__osf__)
3771 /* This system does not cope well with relocations in const data. */
3772 # define LT@&t@_DLSYM_CONST
3773 #else
3774 # define LT@&t@_DLSYM_CONST const
3775 #endif
3776
3777 #ifdef __cplusplus
3778 extern "C" {
3779 #endif
3780
3781 _LT_EOF
3782 # Now generate the symbol file.
3783 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3784
3785 cat <<_LT_EOF >> conftest.$ac_ext
3786
3787 /* The mapping between symbol names and symbols. */
3788 LT@&t@_DLSYM_CONST struct {
3789 const char *name;
3790 void *address;
3791 }
3792 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3793 {
3794 { "@PROGRAM@", (void *) 0 },
3795 _LT_EOF
3796 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3797 cat <<\_LT_EOF >> conftest.$ac_ext
3798 {0, (void *) 0}
3799 };
3800
3801 /* This works around a problem in FreeBSD linker */
3802 #ifdef FREEBSD_WORKAROUND
3803 static const void *lt_preloaded_setup() {
3804 return lt__PROGRAM__LTX_preloaded_symbols;
3805 }
3806 #endif
3807
3808 #ifdef __cplusplus
3809 }
3810 #endif
3811 _LT_EOF
3812 # Now try linking the two files.
3813 mv conftest.$ac_objext conftstm.$ac_objext
3814 lt_globsym_save_LIBS=$LIBS
3815 lt_globsym_save_CFLAGS=$CFLAGS
3816 LIBS="conftstm.$ac_objext"
3817 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3818 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3819 pipe_works=yes
3820 fi
3821 LIBS=$lt_globsym_save_LIBS
3822 CFLAGS=$lt_globsym_save_CFLAGS
3823 else
3824 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3825 fi
3826 else
3827 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3828 fi
3829 else
3830 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3831 fi
3832 else
3833 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3834 cat conftest.$ac_ext >&5
3835 fi
3836 rm -rf conftest* conftst*
3837
3838 # Do not use the global_symbol_pipe unless it works.
3839 if test "$pipe_works" = yes; then
3840 break
3841 else
3842 lt_cv_sys_global_symbol_pipe=
3843 fi
3844 done
3845 ])
3846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3847 lt_cv_sys_global_symbol_to_cdecl=
3848 fi
3849 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3850 AC_MSG_RESULT(failed)
3851 else
3852 AC_MSG_RESULT(ok)
3853 fi
3854
3855 # Response file support.
3856 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3857 nm_file_list_spec='@'
3858 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3859 nm_file_list_spec='@'
3860 fi
3861
3862 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3863 [Take the output of nm and produce a listing of raw symbols and C names])
3864 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3865 [Transform the output of nm in a proper C declaration])
3866 _LT_DECL([global_symbol_to_c_name_address],
3867 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3868 [Transform the output of nm in a C name address pair])
3869 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3870 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3871 [Transform the output of nm in a C name address pair when lib prefix is needed])
3872 _LT_DECL([], [nm_file_list_spec], [1],
3873 [Specify filename containing input files for $NM])
3874 ]) # _LT_CMD_GLOBAL_SYMBOLS
3875
3876
3877 # _LT_COMPILER_PIC([TAGNAME])
3878 # ---------------------------
3879 m4_defun([_LT_COMPILER_PIC],
3880 [m4_require([_LT_TAG_COMPILER])dnl
3881 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3882 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3883 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3884
3885 m4_if([$1], [CXX], [
3886 # C++ specific cases for pic, static, wl, etc.
3887 if test "$GXX" = yes; then
3888 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3890
3891 case $host_os in
3892 aix*)
3893 # All AIX code is PIC.
3894 if test "$host_cpu" = ia64; then
3895 # AIX 5 now supports IA64 processor
3896 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3897 fi
3898 ;;
3899
3900 amigaos*)
3901 case $host_cpu in
3902 powerpc)
3903 # see comment about AmigaOS4 .so support
3904 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3905 ;;
3906 m68k)
3907 # FIXME: we need at least 68020 code to build shared libraries, but
3908 # adding the `-m68020' flag to GCC prevents building anything better,
3909 # like `-m68040'.
3910 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3911 ;;
3912 esac
3913 ;;
3914
3915 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3916 # PIC is the default for these OSes.
3917 ;;
3918 mingw* | cygwin* | os2* | pw32* | cegcc*)
3919 # This hack is so that the source file can tell whether it is being
3920 # built for inclusion in a dll (and should export symbols for example).
3921 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3922 # (--disable-auto-import) libraries
3923 m4_if([$1], [GCJ], [],
3924 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3925 ;;
3926 darwin* | rhapsody*)
3927 # PIC is the default on this platform
3928 # Common symbols not allowed in MH_DYLIB files
3929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3930 ;;
3931 *djgpp*)
3932 # DJGPP does not support shared libraries at all
3933 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3934 ;;
3935 haiku*)
3936 # PIC is the default for Haiku.
3937 # The "-static" flag exists, but is broken.
3938 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3939 ;;
3940 interix[[3-9]]*)
3941 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3942 # Instead, we relocate shared libraries at runtime.
3943 ;;
3944 sysv4*MP*)
3945 if test -d /usr/nec; then
3946 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3947 fi
3948 ;;
3949 hpux*)
3950 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3951 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3952 # sets the default TLS model and affects inlining.
3953 case $host_cpu in
3954 hppa*64*)
3955 ;;
3956 *)
3957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3958 ;;
3959 esac
3960 ;;
3961 *qnx* | *nto*)
3962 # QNX uses GNU C++, but need to define -shared option too, otherwise
3963 # it will coredump.
3964 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3965 ;;
3966 *)
3967 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3968 ;;
3969 esac
3970 else
3971 case $host_os in
3972 aix[[4-9]]*)
3973 # All AIX code is PIC.
3974 if test "$host_cpu" = ia64; then
3975 # AIX 5 now supports IA64 processor
3976 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3977 else
3978 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3979 fi
3980 ;;
3981 chorus*)
3982 case $cc_basename in
3983 cxch68*)
3984 # Green Hills C++ Compiler
3985 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3986 ;;
3987 esac
3988 ;;
3989 mingw* | cygwin* | os2* | pw32* | cegcc*)
3990 # This hack is so that the source file can tell whether it is being
3991 # built for inclusion in a dll (and should export symbols for example).
3992 m4_if([$1], [GCJ], [],
3993 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3994 ;;
3995 dgux*)
3996 case $cc_basename in
3997 ec++*)
3998 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3999 ;;
4000 ghcx*)
4001 # Green Hills C++ Compiler
4002 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4003 ;;
4004 *)
4005 ;;
4006 esac
4007 ;;
4008 freebsd* | dragonfly*)
4009 # FreeBSD uses GNU C++
4010 ;;
4011 hpux9* | hpux10* | hpux11*)
4012 case $cc_basename in
4013 CC*)
4014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4016 if test "$host_cpu" != ia64; then
4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4018 fi
4019 ;;
4020 aCC*)
4021 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4022 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4023 case $host_cpu in
4024 hppa*64*|ia64*)
4025 # +Z the default
4026 ;;
4027 *)
4028 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4029 ;;
4030 esac
4031 ;;
4032 *)
4033 ;;
4034 esac
4035 ;;
4036 interix*)
4037 # This is c89, which is MS Visual C++ (no shared libs)
4038 # Anyone wants to do a port?
4039 ;;
4040 irix5* | irix6* | nonstopux*)
4041 case $cc_basename in
4042 CC*)
4043 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4045 # CC pic flag -KPIC is the default.
4046 ;;
4047 *)
4048 ;;
4049 esac
4050 ;;
4051 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4052 case $cc_basename in
4053 KCC*)
4054 # KAI C++ Compiler
4055 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4056 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4057 ;;
4058 ecpc* )
4059 # old Intel C++ for x86_64 which still supported -KPIC.
4060 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4063 ;;
4064 icpc* )
4065 # Intel C++, used to be incompatible with GCC.
4066 # ICC 10 doesn't accept -KPIC any more.
4067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4068 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4070 ;;
4071 pgCC* | pgcpp*)
4072 # Portland Group C++ compiler
4073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4076 ;;
4077 cxx*)
4078 # Compaq C++
4079 # Make sure the PIC flag is empty. It appears that all Alpha
4080 # Linux and Compaq Tru64 Unix objects are PIC.
4081 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4083 ;;
4084 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4085 # IBM XL 8.0, 9.0 on PPC and BlueGene
4086 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4089 ;;
4090 *)
4091 case `$CC -V 2>&1 | sed 5q` in
4092 *Sun\ C*)
4093 # Sun C++ 5.9
4094 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4095 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4096 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4097 ;;
4098 esac
4099 ;;
4100 esac
4101 ;;
4102 lynxos*)
4103 ;;
4104 m88k*)
4105 ;;
4106 mvs*)
4107 case $cc_basename in
4108 cxx*)
4109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4110 ;;
4111 *)
4112 ;;
4113 esac
4114 ;;
4115 netbsd* | netbsdelf*-gnu)
4116 ;;
4117 *qnx* | *nto*)
4118 # QNX uses GNU C++, but need to define -shared option too, otherwise
4119 # it will coredump.
4120 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4121 ;;
4122 osf3* | osf4* | osf5*)
4123 case $cc_basename in
4124 KCC*)
4125 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4126 ;;
4127 RCC*)
4128 # Rational C++ 2.4.1
4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4130 ;;
4131 cxx*)
4132 # Digital/Compaq C++
4133 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4134 # Make sure the PIC flag is empty. It appears that all Alpha
4135 # Linux and Compaq Tru64 Unix objects are PIC.
4136 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4137 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4138 ;;
4139 *)
4140 ;;
4141 esac
4142 ;;
4143 psos*)
4144 ;;
4145 solaris*)
4146 case $cc_basename in
4147 CC* | sunCC*)
4148 # Sun C++ 4.2, 5.x and Centerline C++
4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4150 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4151 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4152 ;;
4153 gcx*)
4154 # Green Hills C++ Compiler
4155 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4156 ;;
4157 *)
4158 ;;
4159 esac
4160 ;;
4161 sunos4*)
4162 case $cc_basename in
4163 CC*)
4164 # Sun C++ 4.x
4165 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4166 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4167 ;;
4168 lcc*)
4169 # Lucid
4170 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4171 ;;
4172 *)
4173 ;;
4174 esac
4175 ;;
4176 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4177 case $cc_basename in
4178 CC*)
4179 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4182 ;;
4183 esac
4184 ;;
4185 tandem*)
4186 case $cc_basename in
4187 NCC*)
4188 # NonStop-UX NCC 3.20
4189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4190 ;;
4191 *)
4192 ;;
4193 esac
4194 ;;
4195 vxworks*)
4196 ;;
4197 *)
4198 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4199 ;;
4200 esac
4201 fi
4202 ],
4203 [
4204 if test "$GCC" = yes; then
4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4207
4208 case $host_os in
4209 aix*)
4210 # All AIX code is PIC.
4211 if test "$host_cpu" = ia64; then
4212 # AIX 5 now supports IA64 processor
4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4214 fi
4215 ;;
4216
4217 amigaos*)
4218 case $host_cpu in
4219 powerpc)
4220 # see comment about AmigaOS4 .so support
4221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4222 ;;
4223 m68k)
4224 # FIXME: we need at least 68020 code to build shared libraries, but
4225 # adding the `-m68020' flag to GCC prevents building anything better,
4226 # like `-m68040'.
4227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4228 ;;
4229 esac
4230 ;;
4231
4232 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4233 # PIC is the default for these OSes.
4234 ;;
4235
4236 mingw* | cygwin* | pw32* | os2* | cegcc*)
4237 # This hack is so that the source file can tell whether it is being
4238 # built for inclusion in a dll (and should export symbols for example).
4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4240 # (--disable-auto-import) libraries
4241 m4_if([$1], [GCJ], [],
4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243 ;;
4244
4245 darwin* | rhapsody*)
4246 # PIC is the default on this platform
4247 # Common symbols not allowed in MH_DYLIB files
4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4249 ;;
4250
4251 haiku*)
4252 # PIC is the default for Haiku.
4253 # The "-static" flag exists, but is broken.
4254 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4255 ;;
4256
4257 hpux*)
4258 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4259 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4260 # sets the default TLS model and affects inlining.
4261 case $host_cpu in
4262 hppa*64*)
4263 # +Z the default
4264 ;;
4265 *)
4266 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4267 ;;
4268 esac
4269 ;;
4270
4271 interix[[3-9]]*)
4272 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4273 # Instead, we relocate shared libraries at runtime.
4274 ;;
4275
4276 msdosdjgpp*)
4277 # Just because we use GCC doesn't mean we suddenly get shared libraries
4278 # on systems that don't support them.
4279 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4280 enable_shared=no
4281 ;;
4282
4283 *nto* | *qnx*)
4284 # QNX uses GNU C++, but need to define -shared option too, otherwise
4285 # it will coredump.
4286 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4287 ;;
4288
4289 sysv4*MP*)
4290 if test -d /usr/nec; then
4291 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4292 fi
4293 ;;
4294
4295 *)
4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4297 ;;
4298 esac
4299
4300 case $cc_basename in
4301 nvcc*) # Cuda Compiler Driver 2.2
4302 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4303 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4304 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4305 fi
4306 ;;
4307 esac
4308 else
4309 # PORTME Check for flag to pass linker flags through the system compiler.
4310 case $host_os in
4311 aix*)
4312 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4313 if test "$host_cpu" = ia64; then
4314 # AIX 5 now supports IA64 processor
4315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4316 else
4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4318 fi
4319 ;;
4320
4321 mingw* | cygwin* | pw32* | os2* | cegcc*)
4322 # This hack is so that the source file can tell whether it is being
4323 # built for inclusion in a dll (and should export symbols for example).
4324 m4_if([$1], [GCJ], [],
4325 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4326 ;;
4327
4328 hpux9* | hpux10* | hpux11*)
4329 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4330 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4331 # not for PA HP-UX.
4332 case $host_cpu in
4333 hppa*64*|ia64*)
4334 # +Z the default
4335 ;;
4336 *)
4337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4338 ;;
4339 esac
4340 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4341 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4342 ;;
4343
4344 irix5* | irix6* | nonstopux*)
4345 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4346 # PIC (with -KPIC) is the default.
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4348 ;;
4349
4350 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4351 case $cc_basename in
4352 # old Intel for x86_64 which still supported -KPIC.
4353 ecc*)
4354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4357 ;;
4358 # icc used to be incompatible with GCC.
4359 # ICC 10 doesn't accept -KPIC any more.
4360 icc* | ifort*)
4361 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4363 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4364 ;;
4365 # Lahey Fortran 8.1.
4366 lf95*)
4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4368 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4370 ;;
4371 nagfor*)
4372 # NAG Fortran compiler
4373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4376 ;;
4377 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4378 # Portland Group compilers (*not* the Pentium gcc compiler,
4379 # which looks to be a dead project)
4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4383 ;;
4384 ccc*)
4385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386 # All Alpha code is PIC.
4387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4388 ;;
4389 xl* | bgxl* | bgf* | mpixl*)
4390 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4394 ;;
4395 *)
4396 case `$CC -V 2>&1 | sed 5q` in
4397 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4398 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4401 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4402 ;;
4403 *Sun\ F* | *Sun*Fortran*)
4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4407 ;;
4408 *Sun\ C*)
4409 # Sun C 5.9
4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4412 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4413 ;;
4414 *Intel*\ [[CF]]*Compiler*)
4415 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4417 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4418 ;;
4419 *Portland\ Group*)
4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4422 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4423 ;;
4424 esac
4425 ;;
4426 esac
4427 ;;
4428
4429 newsos6)
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4431 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4432 ;;
4433
4434 *nto* | *qnx*)
4435 # QNX uses GNU C++, but need to define -shared option too, otherwise
4436 # it will coredump.
4437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4438 ;;
4439
4440 osf3* | osf4* | osf5*)
4441 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4442 # All OSF/1 code is PIC.
4443 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4444 ;;
4445
4446 rdos*)
4447 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4448 ;;
4449
4450 solaris*)
4451 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4452 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4453 case $cc_basename in
4454 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4456 *)
4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4458 esac
4459 ;;
4460
4461 sunos4*)
4462 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4463 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4464 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4465 ;;
4466
4467 sysv4 | sysv4.2uw2* | sysv4.3*)
4468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4471 ;;
4472
4473 sysv4*MP*)
4474 if test -d /usr/nec ;then
4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4477 fi
4478 ;;
4479
4480 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4484 ;;
4485
4486 unicos*)
4487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4488 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4489 ;;
4490
4491 uts4*)
4492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494 ;;
4495
4496 *)
4497 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4498 ;;
4499 esac
4500 fi
4501 ])
4502 case $host_os in
4503 # For platforms which do not support PIC, -DPIC is meaningless:
4504 *djgpp*)
4505 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4506 ;;
4507 *)
4508 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4509 ;;
4510 esac
4511
4512 AC_CACHE_CHECK([for $compiler option to produce PIC],
4513 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4514 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4515 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4516
4517 #
4518 # Check to make sure the PIC flag actually works.
4519 #
4520 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4521 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4522 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4523 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4524 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4525 "" | " "*) ;;
4526 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4527 esac],
4528 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4529 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4530 fi
4531 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4532 [Additional compiler flags for building library objects])
4533
4534 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4535 [How to pass a linker flag through the compiler])
4536 #
4537 # Check to make sure the static flag actually works.
4538 #
4539 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4540 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4541 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4542 $lt_tmp_static_flag,
4543 [],
4544 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4545 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4546 [Compiler flag to prevent dynamic linking])
4547 ])# _LT_COMPILER_PIC
4548
4549
4550 # _LT_LINKER_SHLIBS([TAGNAME])
4551 # ----------------------------
4552 # See if the linker supports building shared libraries.
4553 m4_defun([_LT_LINKER_SHLIBS],
4554 [AC_REQUIRE([LT_PATH_LD])dnl
4555 AC_REQUIRE([LT_PATH_NM])dnl
4556 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4557 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4558 m4_require([_LT_DECL_EGREP])dnl
4559 m4_require([_LT_DECL_SED])dnl
4560 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4561 m4_require([_LT_TAG_COMPILER])dnl
4562 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4563 m4_if([$1], [CXX], [
4564 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4565 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4566 case $host_os in
4567 aix[[4-9]]*)
4568 # If we're using GNU nm, then we don't want the "-C" option.
4569 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4570 # Also, AIX nm treats weak defined symbols like other global defined
4571 # symbols, whereas GNU nm marks them as "W".
4572 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4573 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4574 else
4575 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4576 fi
4577 ;;
4578 pw32*)
4579 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4580 ;;
4581 cygwin* | mingw* | cegcc*)
4582 case $cc_basename in
4583 cl*)
4584 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4585 ;;
4586 *)
4587 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4588 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4589 ;;
4590 esac
4591 ;;
4592 linux* | k*bsd*-gnu | gnu*)
4593 _LT_TAGVAR(link_all_deplibs, $1)=no
4594 ;;
4595 *)
4596 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4597 ;;
4598 esac
4599 ], [
4600 runpath_var=
4601 _LT_TAGVAR(allow_undefined_flag, $1)=
4602 _LT_TAGVAR(always_export_symbols, $1)=no
4603 _LT_TAGVAR(archive_cmds, $1)=
4604 _LT_TAGVAR(archive_expsym_cmds, $1)=
4605 _LT_TAGVAR(compiler_needs_object, $1)=no
4606 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4607 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4608 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4609 _LT_TAGVAR(hardcode_automatic, $1)=no
4610 _LT_TAGVAR(hardcode_direct, $1)=no
4611 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4613 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4614 _LT_TAGVAR(hardcode_minus_L, $1)=no
4615 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4616 _LT_TAGVAR(inherit_rpath, $1)=no
4617 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4618 _LT_TAGVAR(module_cmds, $1)=
4619 _LT_TAGVAR(module_expsym_cmds, $1)=
4620 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4621 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4622 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4623 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4624 # include_expsyms should be a list of space-separated symbols to be *always*
4625 # included in the symbol list
4626 _LT_TAGVAR(include_expsyms, $1)=
4627 # exclude_expsyms can be an extended regexp of symbols to exclude
4628 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4629 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4630 # as well as any symbol that contains `d'.
4631 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4632 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4633 # platforms (ab)use it in PIC code, but their linkers get confused if
4634 # the symbol is explicitly referenced. Since portable code cannot
4635 # rely on this symbol name, it's probably fine to never include it in
4636 # preloaded symbol tables.
4637 # Exclude shared library initialization/finalization symbols.
4638 dnl Note also adjust exclude_expsyms for C++ above.
4639 extract_expsyms_cmds=
4640
4641 case $host_os in
4642 cygwin* | mingw* | pw32* | cegcc*)
4643 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4644 # When not using gcc, we currently assume that we are using
4645 # Microsoft Visual C++.
4646 if test "$GCC" != yes; then
4647 with_gnu_ld=no
4648 fi
4649 ;;
4650 interix*)
4651 # we just hope/assume this is gcc and not c89 (= MSVC++)
4652 with_gnu_ld=yes
4653 ;;
4654 openbsd*)
4655 with_gnu_ld=no
4656 ;;
4657 linux* | k*bsd*-gnu | gnu*)
4658 _LT_TAGVAR(link_all_deplibs, $1)=no
4659 ;;
4660 esac
4661
4662 _LT_TAGVAR(ld_shlibs, $1)=yes
4663
4664 # On some targets, GNU ld is compatible enough with the native linker
4665 # that we're better off using the native interface for both.
4666 lt_use_gnu_ld_interface=no
4667 if test "$with_gnu_ld" = yes; then
4668 case $host_os in
4669 aix*)
4670 # The AIX port of GNU ld has always aspired to compatibility
4671 # with the native linker. However, as the warning in the GNU ld
4672 # block says, versions before 2.19.5* couldn't really create working
4673 # shared libraries, regardless of the interface used.
4674 case `$LD -v 2>&1` in
4675 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4676 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4677 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4678 *)
4679 lt_use_gnu_ld_interface=yes
4680 ;;
4681 esac
4682 ;;
4683 *)
4684 lt_use_gnu_ld_interface=yes
4685 ;;
4686 esac
4687 fi
4688
4689 if test "$lt_use_gnu_ld_interface" = yes; then
4690 # If archive_cmds runs LD, not CC, wlarc should be empty
4691 wlarc='${wl}'
4692
4693 # Set some defaults for GNU ld with shared library support. These
4694 # are reset later if shared libraries are not supported. Putting them
4695 # here allows them to be overridden if necessary.
4696 runpath_var=LD_RUN_PATH
4697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4699 # ancient GNU ld didn't support --whole-archive et. al.
4700 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4701 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4702 else
4703 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4704 fi
4705 supports_anon_versioning=no
4706 case `$LD -v 2>&1` in
4707 *GNU\ gold*) supports_anon_versioning=yes ;;
4708 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4709 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4710 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4711 *\ 2.11.*) ;; # other 2.11 versions
4712 *) supports_anon_versioning=yes ;;
4713 esac
4714
4715 # See if GNU ld supports shared libraries.
4716 case $host_os in
4717 aix[[3-9]]*)
4718 # On AIX/PPC, the GNU linker is very broken
4719 if test "$host_cpu" != ia64; then
4720 _LT_TAGVAR(ld_shlibs, $1)=no
4721 cat <<_LT_EOF 1>&2
4722
4723 *** Warning: the GNU linker, at least up to release 2.19, is reported
4724 *** to be unable to reliably create shared libraries on AIX.
4725 *** Therefore, libtool is disabling shared libraries support. If you
4726 *** really care for shared libraries, you may want to install binutils
4727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4728 *** You will then need to restart the configuration process.
4729
4730 _LT_EOF
4731 fi
4732 ;;
4733
4734 amigaos*)
4735 case $host_cpu in
4736 powerpc)
4737 # see comment about AmigaOS4 .so support
4738 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4739 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4740 ;;
4741 m68k)
4742 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4744 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745 ;;
4746 esac
4747 ;;
4748
4749 beos*)
4750 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4751 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4752 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4753 # support --undefined. This deserves some investigation. FIXME
4754 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4755 else
4756 _LT_TAGVAR(ld_shlibs, $1)=no
4757 fi
4758 ;;
4759
4760 cygwin* | mingw* | pw32* | cegcc*)
4761 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4762 # as there is no search path for DLLs.
4763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4765 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4766 _LT_TAGVAR(always_export_symbols, $1)=no
4767 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4768 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4769 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4770
4771 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4773 # If the export-symbols file already is a .def file (1st line
4774 # is EXPORTS), use it as is; otherwise, prepend...
4775 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4776 cp $export_symbols $output_objdir/$soname.def;
4777 else
4778 echo EXPORTS > $output_objdir/$soname.def;
4779 cat $export_symbols >> $output_objdir/$soname.def;
4780 fi~
4781 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4782 else
4783 _LT_TAGVAR(ld_shlibs, $1)=no
4784 fi
4785 ;;
4786
4787 haiku*)
4788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4789 _LT_TAGVAR(link_all_deplibs, $1)=yes
4790 ;;
4791
4792 interix[[3-9]]*)
4793 _LT_TAGVAR(hardcode_direct, $1)=no
4794 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4797 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4798 # Instead, shared libraries are loaded at an image base (0x10000000 by
4799 # default) and relocated if they conflict, which is a slow very memory
4800 # consuming and fragmenting process. To avoid this, we pick a random,
4801 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4802 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4804 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4805 ;;
4806
4807 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4808 tmp_diet=no
4809 if test "$host_os" = linux-dietlibc; then
4810 case $cc_basename in
4811 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4812 esac
4813 fi
4814 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4815 && test "$tmp_diet" = no
4816 then
4817 tmp_addflag=' $pic_flag'
4818 tmp_sharedflag='-shared'
4819 case $cc_basename,$host_cpu in
4820 pgcc*) # Portland Group C compiler
4821 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4822 tmp_addflag=' $pic_flag'
4823 ;;
4824 pgf77* | pgf90* | pgf95* | pgfortran*)
4825 # Portland Group f77 and f90 compilers
4826 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4827 tmp_addflag=' $pic_flag -Mnomain' ;;
4828 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4829 tmp_addflag=' -i_dynamic' ;;
4830 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4831 tmp_addflag=' -i_dynamic -nofor_main' ;;
4832 ifc* | ifort*) # Intel Fortran compiler
4833 tmp_addflag=' -nofor_main' ;;
4834 lf95*) # Lahey Fortran 8.1
4835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4836 tmp_sharedflag='--shared' ;;
4837 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4838 tmp_sharedflag='-qmkshrobj'
4839 tmp_addflag= ;;
4840 nvcc*) # Cuda Compiler Driver 2.2
4841 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4842 _LT_TAGVAR(compiler_needs_object, $1)=yes
4843 ;;
4844 esac
4845 case `$CC -V 2>&1 | sed 5q` in
4846 *Sun\ C*) # Sun C 5.9
4847 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4848 _LT_TAGVAR(compiler_needs_object, $1)=yes
4849 tmp_sharedflag='-G' ;;
4850 *Sun\ F*) # Sun Fortran 8.3
4851 tmp_sharedflag='-G' ;;
4852 esac
4853 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4854
4855 if test "x$supports_anon_versioning" = xyes; then
4856 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4857 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4858 echo "local: *; };" >> $output_objdir/$libname.ver~
4859 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4860 fi
4861
4862 case $cc_basename in
4863 xlf* | bgf* | bgxlf* | mpixlf*)
4864 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4865 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4867 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4868 if test "x$supports_anon_versioning" = xyes; then
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4870 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4871 echo "local: *; };" >> $output_objdir/$libname.ver~
4872 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4873 fi
4874 ;;
4875 esac
4876 else
4877 _LT_TAGVAR(ld_shlibs, $1)=no
4878 fi
4879 ;;
4880
4881 netbsd* | netbsdelf*-gnu)
4882 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4883 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4884 wlarc=
4885 else
4886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4887 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4888 fi
4889 ;;
4890
4891 solaris*)
4892 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4893 _LT_TAGVAR(ld_shlibs, $1)=no
4894 cat <<_LT_EOF 1>&2
4895
4896 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4897 *** create shared libraries on Solaris systems. Therefore, libtool
4898 *** is disabling shared libraries support. We urge you to upgrade GNU
4899 *** binutils to release 2.9.1 or newer. Another option is to modify
4900 *** your PATH or compiler configuration so that the native linker is
4901 *** used, and then restart.
4902
4903 _LT_EOF
4904 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4906 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4907 else
4908 _LT_TAGVAR(ld_shlibs, $1)=no
4909 fi
4910 ;;
4911
4912 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4913 case `$LD -v 2>&1` in
4914 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4915 _LT_TAGVAR(ld_shlibs, $1)=no
4916 cat <<_LT_EOF 1>&2
4917
4918 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4919 *** reliably create shared libraries on SCO systems. Therefore, libtool
4920 *** is disabling shared libraries support. We urge you to upgrade GNU
4921 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4922 *** your PATH or compiler configuration so that the native linker is
4923 *** used, and then restart.
4924
4925 _LT_EOF
4926 ;;
4927 *)
4928 # For security reasons, it is highly recommended that you always
4929 # use absolute paths for naming shared libraries, and exclude the
4930 # DT_RUNPATH tag from executables and libraries. But doing so
4931 # requires that you compile everything twice, which is a pain.
4932 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4934 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4935 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4936 else
4937 _LT_TAGVAR(ld_shlibs, $1)=no
4938 fi
4939 ;;
4940 esac
4941 ;;
4942
4943 sunos4*)
4944 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4945 wlarc=
4946 _LT_TAGVAR(hardcode_direct, $1)=yes
4947 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4948 ;;
4949
4950 *)
4951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4953 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4954 else
4955 _LT_TAGVAR(ld_shlibs, $1)=no
4956 fi
4957 ;;
4958 esac
4959
4960 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4961 runpath_var=
4962 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4963 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4964 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4965 fi
4966 else
4967 # PORTME fill in a description of your system's linker (not GNU ld)
4968 case $host_os in
4969 aix3*)
4970 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4971 _LT_TAGVAR(always_export_symbols, $1)=yes
4972 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4973 # Note: this linker hardcodes the directories in LIBPATH if there
4974 # are no directories specified by -L.
4975 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4976 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4977 # Neither direct hardcoding nor static linking is supported with a
4978 # broken collect2.
4979 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4980 fi
4981 ;;
4982
4983 aix[[4-9]]*)
4984 if test "$host_cpu" = ia64; then
4985 # On IA64, the linker does run time linking by default, so we don't
4986 # have to do anything special.
4987 aix_use_runtimelinking=no
4988 exp_sym_flag='-Bexport'
4989 no_entry_flag=""
4990 else
4991 # If we're using GNU nm, then we don't want the "-C" option.
4992 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4993 # Also, AIX nm treats weak defined symbols like other global
4994 # defined symbols, whereas GNU nm marks them as "W".
4995 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4996 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4997 else
4998 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4999 fi
5000 aix_use_runtimelinking=no
5001
5002 # Test if we are trying to use run time linking or normal
5003 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5004 # need to do runtime linking.
5005 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5006 for ld_flag in $LDFLAGS; do
5007 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5008 aix_use_runtimelinking=yes
5009 break
5010 fi
5011 done
5012 ;;
5013 esac
5014
5015 exp_sym_flag='-bexport'
5016 no_entry_flag='-bnoentry'
5017 fi
5018
5019 # When large executables or shared objects are built, AIX ld can
5020 # have problems creating the table of contents. If linking a library
5021 # or program results in "error TOC overflow" add -mminimal-toc to
5022 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5023 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5024
5025 _LT_TAGVAR(archive_cmds, $1)=''
5026 _LT_TAGVAR(hardcode_direct, $1)=yes
5027 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5028 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5029 _LT_TAGVAR(link_all_deplibs, $1)=yes
5030 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5031
5032 if test "$GCC" = yes; then
5033 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5034 # We only want to do this on AIX 4.2 and lower, the check
5035 # below for broken collect2 doesn't work under 4.3+
5036 collect2name=`${CC} -print-prog-name=collect2`
5037 if test -f "$collect2name" &&
5038 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5039 then
5040 # We have reworked collect2
5041 :
5042 else
5043 # We have old collect2
5044 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5045 # It fails to find uninstalled libraries when the uninstalled
5046 # path is not listed in the libpath. Setting hardcode_minus_L
5047 # to unsupported forces relinking
5048 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5050 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5051 fi
5052 ;;
5053 esac
5054 shared_flag='-shared'
5055 if test "$aix_use_runtimelinking" = yes; then
5056 shared_flag="$shared_flag "'${wl}-G'
5057 fi
5058 _LT_TAGVAR(link_all_deplibs, $1)=no
5059 else
5060 # not using gcc
5061 if test "$host_cpu" = ia64; then
5062 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5063 # chokes on -Wl,-G. The following line is correct:
5064 shared_flag='-G'
5065 else
5066 if test "$aix_use_runtimelinking" = yes; then
5067 shared_flag='${wl}-G'
5068 else
5069 shared_flag='${wl}-bM:SRE'
5070 fi
5071 fi
5072 fi
5073
5074 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5075 # It seems that -bexpall does not export symbols beginning with
5076 # underscore (_), so it is better to generate a list of symbols to export.
5077 _LT_TAGVAR(always_export_symbols, $1)=yes
5078 if test "$aix_use_runtimelinking" = yes; then
5079 # Warning - without using the other runtime loading flags (-brtl),
5080 # -berok will link without error, but may produce a broken library.
5081 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5082 # Determine the default libpath from the value encoded in an
5083 # empty executable.
5084 _LT_SYS_MODULE_PATH_AIX([$1])
5085 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5086 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5087 else
5088 if test "$host_cpu" = ia64; then
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5090 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5091 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5092 else
5093 # Determine the default libpath from the value encoded in an
5094 # empty executable.
5095 _LT_SYS_MODULE_PATH_AIX([$1])
5096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5097 # Warning - without using the other run time loading flags,
5098 # -berok will link without error, but may produce a broken library.
5099 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5100 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5101 if test "$with_gnu_ld" = yes; then
5102 # We only use this code for GNU lds that support --whole-archive.
5103 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5104 else
5105 # Exported symbols can be pulled into shared objects from archives
5106 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5107 fi
5108 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5109 # This is similar to how AIX traditionally builds its shared libraries.
5110 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5111 fi
5112 fi
5113 ;;
5114
5115 amigaos*)
5116 case $host_cpu in
5117 powerpc)
5118 # see comment about AmigaOS4 .so support
5119 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5120 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5121 ;;
5122 m68k)
5123 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5125 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5126 ;;
5127 esac
5128 ;;
5129
5130 bsdi[[45]]*)
5131 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5132 ;;
5133
5134 cygwin* | mingw* | pw32* | cegcc*)
5135 # When not using gcc, we currently assume that we are using
5136 # Microsoft Visual C++.
5137 # hardcode_libdir_flag_spec is actually meaningless, as there is
5138 # no search path for DLLs.
5139 case $cc_basename in
5140 cl*)
5141 # Native MSVC
5142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5143 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5144 _LT_TAGVAR(always_export_symbols, $1)=yes
5145 _LT_TAGVAR(file_list_spec, $1)='@'
5146 # Tell ltmain to make .lib files, not .a files.
5147 libext=lib
5148 # Tell ltmain to make .dll files, not .so files.
5149 shrext_cmds=".dll"
5150 # FIXME: Setting linknames here is a bad hack.
5151 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5152 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5153 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5154 else
5155 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5156 fi~
5157 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5158 linknames='
5159 # The linker will not automatically build a static lib if we build a DLL.
5160 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5161 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5162 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5163 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5164 # Don't use ranlib
5165 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5166 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5167 lt_tool_outputfile="@TOOL_OUTPUT@"~
5168 case $lt_outputfile in
5169 *.exe|*.EXE) ;;
5170 *)
5171 lt_outputfile="$lt_outputfile.exe"
5172 lt_tool_outputfile="$lt_tool_outputfile.exe"
5173 ;;
5174 esac~
5175 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5176 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5177 $RM "$lt_outputfile.manifest";
5178 fi'
5179 ;;
5180 *)
5181 # Assume MSVC wrapper
5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5183 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5184 # Tell ltmain to make .lib files, not .a files.
5185 libext=lib
5186 # Tell ltmain to make .dll files, not .so files.
5187 shrext_cmds=".dll"
5188 # FIXME: Setting linknames here is a bad hack.
5189 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5190 # The linker will automatically build a .lib file if we build a DLL.
5191 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5192 # FIXME: Should let the user specify the lib program.
5193 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5194 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5195 ;;
5196 esac
5197 ;;
5198
5199 darwin* | rhapsody*)
5200 _LT_DARWIN_LINKER_FEATURES($1)
5201 ;;
5202
5203 dgux*)
5204 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5205 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5206 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5207 ;;
5208
5209 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5210 # support. Future versions do this automatically, but an explicit c++rt0.o
5211 # does not break anything, and helps significantly (at the cost of a little
5212 # extra space).
5213 freebsd2.2*)
5214 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5216 _LT_TAGVAR(hardcode_direct, $1)=yes
5217 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5218 ;;
5219
5220 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5221 freebsd2.*)
5222 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5223 _LT_TAGVAR(hardcode_direct, $1)=yes
5224 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5225 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5226 ;;
5227
5228 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5229 freebsd* | dragonfly*)
5230 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5231 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5232 _LT_TAGVAR(hardcode_direct, $1)=yes
5233 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5234 ;;
5235
5236 hpux9*)
5237 if test "$GCC" = yes; then
5238 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5239 else
5240 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5241 fi
5242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5243 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5244 _LT_TAGVAR(hardcode_direct, $1)=yes
5245
5246 # hardcode_minus_L: Not really in the search PATH,
5247 # but as the default location of the library.
5248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5249 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5250 ;;
5251
5252 hpux10*)
5253 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5254 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5255 else
5256 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5257 fi
5258 if test "$with_gnu_ld" = no; then
5259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5260 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5261 _LT_TAGVAR(hardcode_direct, $1)=yes
5262 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5263 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5264 # hardcode_minus_L: Not really in the search PATH,
5265 # but as the default location of the library.
5266 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5267 fi
5268 ;;
5269
5270 hpux11*)
5271 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5272 case $host_cpu in
5273 hppa*64*)
5274 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5275 ;;
5276 ia64*)
5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5278 ;;
5279 *)
5280 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5281 ;;
5282 esac
5283 else
5284 case $host_cpu in
5285 hppa*64*)
5286 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5287 ;;
5288 ia64*)
5289 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5290 ;;
5291 *)
5292 m4_if($1, [], [
5293 # Older versions of the 11.00 compiler do not understand -b yet
5294 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5295 _LT_LINKER_OPTION([if $CC understands -b],
5296 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5297 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5298 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5299 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5300 ;;
5301 esac
5302 fi
5303 if test "$with_gnu_ld" = no; then
5304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5305 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5306
5307 case $host_cpu in
5308 hppa*64*|ia64*)
5309 _LT_TAGVAR(hardcode_direct, $1)=no
5310 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5311 ;;
5312 *)
5313 _LT_TAGVAR(hardcode_direct, $1)=yes
5314 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5315 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5316
5317 # hardcode_minus_L: Not really in the search PATH,
5318 # but as the default location of the library.
5319 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5320 ;;
5321 esac
5322 fi
5323 ;;
5324
5325 irix5* | irix6* | nonstopux*)
5326 if test "$GCC" = yes; then
5327 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5328 # Try to use the -exported_symbol ld option, if it does not
5329 # work, assume that -exports_file does not work either and
5330 # implicitly export all symbols.
5331 # This should be the same for all languages, so no per-tag cache variable.
5332 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5333 [lt_cv_irix_exported_symbol],
5334 [save_LDFLAGS="$LDFLAGS"
5335 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5336 AC_LINK_IFELSE(
5337 [AC_LANG_SOURCE(
5338 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5339 [C++], [[int foo (void) { return 0; }]],
5340 [Fortran 77], [[
5341 subroutine foo
5342 end]],
5343 [Fortran], [[
5344 subroutine foo
5345 end]])])],
5346 [lt_cv_irix_exported_symbol=yes],
5347 [lt_cv_irix_exported_symbol=no])
5348 LDFLAGS="$save_LDFLAGS"])
5349 if test "$lt_cv_irix_exported_symbol" = yes; then
5350 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5351 fi
5352 else
5353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5354 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5355 fi
5356 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5358 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5359 _LT_TAGVAR(inherit_rpath, $1)=yes
5360 _LT_TAGVAR(link_all_deplibs, $1)=yes
5361 ;;
5362
5363 netbsd* | netbsdelf*-gnu)
5364 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5365 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5366 else
5367 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5368 fi
5369 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5370 _LT_TAGVAR(hardcode_direct, $1)=yes
5371 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5372 ;;
5373
5374 newsos6)
5375 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5376 _LT_TAGVAR(hardcode_direct, $1)=yes
5377 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5378 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5379 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5380 ;;
5381
5382 *nto* | *qnx*)
5383 ;;
5384
5385 openbsd*)
5386 if test -f /usr/libexec/ld.so; then
5387 _LT_TAGVAR(hardcode_direct, $1)=yes
5388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5389 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5390 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5391 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5392 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5394 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5395 else
5396 case $host_os in
5397 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5398 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5400 ;;
5401 *)
5402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5404 ;;
5405 esac
5406 fi
5407 else
5408 _LT_TAGVAR(ld_shlibs, $1)=no
5409 fi
5410 ;;
5411
5412 os2*)
5413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5414 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5415 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5416 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5417 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5418 ;;
5419
5420 osf3*)
5421 if test "$GCC" = yes; then
5422 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5423 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5424 else
5425 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5426 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5427 fi
5428 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5429 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5430 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5431 ;;
5432
5433 osf4* | osf5*) # as osf3* with the addition of -msym flag
5434 if test "$GCC" = yes; then
5435 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5437 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5438 else
5439 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5441 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5442 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5443
5444 # Both c and cxx compiler support -rpath directly
5445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5446 fi
5447 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5448 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5449 ;;
5450
5451 solaris*)
5452 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5453 if test "$GCC" = yes; then
5454 wlarc='${wl}'
5455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5456 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5457 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5458 else
5459 case `$CC -V 2>&1` in
5460 *"Compilers 5.0"*)
5461 wlarc=''
5462 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5463 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5464 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5465 ;;
5466 *)
5467 wlarc='${wl}'
5468 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5469 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5470 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5471 ;;
5472 esac
5473 fi
5474 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5475 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5476 case $host_os in
5477 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5478 *)
5479 # The compiler driver will combine and reorder linker options,
5480 # but understands `-z linker_flag'. GCC discards it without `$wl',
5481 # but is careful enough not to reorder.
5482 # Supported since Solaris 2.6 (maybe 2.5.1?)
5483 if test "$GCC" = yes; then
5484 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5485 else
5486 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5487 fi
5488 ;;
5489 esac
5490 _LT_TAGVAR(link_all_deplibs, $1)=yes
5491 ;;
5492
5493 sunos4*)
5494 if test "x$host_vendor" = xsequent; then
5495 # Use $CC to link under sequent, because it throws in some extra .o
5496 # files that make .init and .fini sections work.
5497 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5498 else
5499 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5500 fi
5501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5502 _LT_TAGVAR(hardcode_direct, $1)=yes
5503 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5504 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5505 ;;
5506
5507 sysv4)
5508 case $host_vendor in
5509 sni)
5510 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5511 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5512 ;;
5513 siemens)
5514 ## LD is ld it makes a PLAMLIB
5515 ## CC just makes a GrossModule.
5516 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5517 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5518 _LT_TAGVAR(hardcode_direct, $1)=no
5519 ;;
5520 motorola)
5521 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5522 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5523 ;;
5524 esac
5525 runpath_var='LD_RUN_PATH'
5526 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5527 ;;
5528
5529 sysv4.3*)
5530 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5531 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5532 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5533 ;;
5534
5535 sysv4*MP*)
5536 if test -d /usr/nec; then
5537 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5538 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5539 runpath_var=LD_RUN_PATH
5540 hardcode_runpath_var=yes
5541 _LT_TAGVAR(ld_shlibs, $1)=yes
5542 fi
5543 ;;
5544
5545 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5546 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5547 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5548 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5549 runpath_var='LD_RUN_PATH'
5550
5551 if test "$GCC" = yes; then
5552 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5553 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5554 else
5555 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5556 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5557 fi
5558 ;;
5559
5560 sysv5* | sco3.2v5* | sco5v6*)
5561 # Note: We can NOT use -z defs as we might desire, because we do not
5562 # link with -lc, and that would cause any symbols used from libc to
5563 # always be unresolved, which means just about no library would
5564 # ever link correctly. If we're not using GNU ld we use -z text
5565 # though, which does catch some bad symbols but isn't as heavy-handed
5566 # as -z defs.
5567 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5568 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5569 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5570 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5572 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5573 _LT_TAGVAR(link_all_deplibs, $1)=yes
5574 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5575 runpath_var='LD_RUN_PATH'
5576
5577 if test "$GCC" = yes; then
5578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5579 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5580 else
5581 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5582 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5583 fi
5584 ;;
5585
5586 uts4*)
5587 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5589 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5590 ;;
5591
5592 *)
5593 _LT_TAGVAR(ld_shlibs, $1)=no
5594 ;;
5595 esac
5596
5597 if test x$host_vendor = xsni; then
5598 case $host in
5599 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5600 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5601 ;;
5602 esac
5603 fi
5604 fi
5605 ])
5606 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5607 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5608
5609 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5610
5611 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5612 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5613 _LT_DECL([], [extract_expsyms_cmds], [2],
5614 [The commands to extract the exported symbol list from a shared archive])
5615
5616 #
5617 # Do we need to explicitly link libc?
5618 #
5619 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5620 x|xyes)
5621 # Assume -lc should be added
5622 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5623
5624 if test "$enable_shared" = yes && test "$GCC" = yes; then
5625 case $_LT_TAGVAR(archive_cmds, $1) in
5626 *'~'*)
5627 # FIXME: we may have to deal with multi-command sequences.
5628 ;;
5629 '$CC '*)
5630 # Test whether the compiler implicitly links with -lc since on some
5631 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5632 # to ld, don't add -lc before -lgcc.
5633 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5634 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5635 [$RM conftest*
5636 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5637
5638 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5639 soname=conftest
5640 lib=conftest
5641 libobjs=conftest.$ac_objext
5642 deplibs=
5643 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5644 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5645 compiler_flags=-v
5646 linker_flags=-v
5647 verstring=
5648 output_objdir=.
5649 libname=conftest
5650 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5651 _LT_TAGVAR(allow_undefined_flag, $1)=
5652 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5653 then
5654 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5655 else
5656 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5657 fi
5658 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5659 else
5660 cat conftest.err 1>&5
5661 fi
5662 $RM conftest*
5663 ])
5664 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5665 ;;
5666 esac
5667 fi
5668 ;;
5669 esac
5670
5671 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5672 [Whether or not to add -lc for building shared libraries])
5673 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5674 [enable_shared_with_static_runtimes], [0],
5675 [Whether or not to disallow shared libs when runtime libs are static])
5676 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5677 [Compiler flag to allow reflexive dlopens])
5678 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5679 [Compiler flag to generate shared objects directly from archives])
5680 _LT_TAGDECL([], [compiler_needs_object], [1],
5681 [Whether the compiler copes with passing no objects directly])
5682 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5683 [Create an old-style archive from a shared archive])
5684 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5685 [Create a temporary old-style archive to link instead of a shared archive])
5686 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5687 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5688 _LT_TAGDECL([], [module_cmds], [2],
5689 [Commands used to build a loadable module if different from building
5690 a shared archive.])
5691 _LT_TAGDECL([], [module_expsym_cmds], [2])
5692 _LT_TAGDECL([], [with_gnu_ld], [1],
5693 [Whether we are building with GNU ld or not])
5694 _LT_TAGDECL([], [allow_undefined_flag], [1],
5695 [Flag that allows shared libraries with undefined symbols to be built])
5696 _LT_TAGDECL([], [no_undefined_flag], [1],
5697 [Flag that enforces no undefined symbols])
5698 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5699 [Flag to hardcode $libdir into a binary during linking.
5700 This must work even if $libdir does not exist])
5701 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5702 [Whether we need a single "-rpath" flag with a separated argument])
5703 _LT_TAGDECL([], [hardcode_direct], [0],
5704 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5705 DIR into the resulting binary])
5706 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5707 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5708 DIR into the resulting binary and the resulting library dependency is
5709 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5710 library is relocated])
5711 _LT_TAGDECL([], [hardcode_minus_L], [0],
5712 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5713 into the resulting binary])
5714 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5715 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5716 into the resulting binary])
5717 _LT_TAGDECL([], [hardcode_automatic], [0],
5718 [Set to "yes" if building a shared library automatically hardcodes DIR
5719 into the library and all subsequent libraries and executables linked
5720 against it])
5721 _LT_TAGDECL([], [inherit_rpath], [0],
5722 [Set to yes if linker adds runtime paths of dependent libraries
5723 to runtime path list])
5724 _LT_TAGDECL([], [link_all_deplibs], [0],
5725 [Whether libtool must link a program against all its dependency libraries])
5726 _LT_TAGDECL([], [always_export_symbols], [0],
5727 [Set to "yes" if exported symbols are required])
5728 _LT_TAGDECL([], [export_symbols_cmds], [2],
5729 [The commands to list exported symbols])
5730 _LT_TAGDECL([], [exclude_expsyms], [1],
5731 [Symbols that should not be listed in the preloaded symbols])
5732 _LT_TAGDECL([], [include_expsyms], [1],
5733 [Symbols that must always be exported])
5734 _LT_TAGDECL([], [prelink_cmds], [2],
5735 [Commands necessary for linking programs (against libraries) with templates])
5736 _LT_TAGDECL([], [postlink_cmds], [2],
5737 [Commands necessary for finishing linking programs])
5738 _LT_TAGDECL([], [file_list_spec], [1],
5739 [Specify filename containing input files])
5740 dnl FIXME: Not yet implemented
5741 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5742 dnl [Compiler flag to generate thread safe objects])
5743 ])# _LT_LINKER_SHLIBS
5744
5745
5746 # _LT_LANG_C_CONFIG([TAG])
5747 # ------------------------
5748 # Ensure that the configuration variables for a C compiler are suitably
5749 # defined. These variables are subsequently used by _LT_CONFIG to write
5750 # the compiler configuration to `libtool'.
5751 m4_defun([_LT_LANG_C_CONFIG],
5752 [m4_require([_LT_DECL_EGREP])dnl
5753 lt_save_CC="$CC"
5754 AC_LANG_PUSH(C)
5755
5756 # Source file extension for C test sources.
5757 ac_ext=c
5758
5759 # Object file extension for compiled C test sources.
5760 objext=o
5761 _LT_TAGVAR(objext, $1)=$objext
5762
5763 # Code to be used in simple compile tests
5764 lt_simple_compile_test_code="int some_variable = 0;"
5765
5766 # Code to be used in simple link tests
5767 lt_simple_link_test_code='int main(){return(0);}'
5768
5769 _LT_TAG_COMPILER
5770 # Save the default compiler, since it gets overwritten when the other
5771 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5772 compiler_DEFAULT=$CC
5773
5774 # save warnings/boilerplate of simple test code
5775 _LT_COMPILER_BOILERPLATE
5776 _LT_LINKER_BOILERPLATE
5777
5778 ## CAVEAT EMPTOR:
5779 ## There is no encapsulation within the following macros, do not change
5780 ## the running order or otherwise move them around unless you know exactly
5781 ## what you are doing...
5782 if test -n "$compiler"; then
5783 _LT_COMPILER_NO_RTTI($1)
5784 _LT_COMPILER_PIC($1)
5785 _LT_COMPILER_C_O($1)
5786 _LT_COMPILER_FILE_LOCKS($1)
5787 _LT_LINKER_SHLIBS($1)
5788 _LT_SYS_DYNAMIC_LINKER($1)
5789 _LT_LINKER_HARDCODE_LIBPATH($1)
5790 LT_SYS_DLOPEN_SELF
5791 _LT_CMD_STRIPLIB
5792
5793 # Report which library types will actually be built
5794 AC_MSG_CHECKING([if libtool supports shared libraries])
5795 AC_MSG_RESULT([$can_build_shared])
5796
5797 AC_MSG_CHECKING([whether to build shared libraries])
5798 test "$can_build_shared" = "no" && enable_shared=no
5799
5800 # On AIX, shared libraries and static libraries use the same namespace, and
5801 # are all built from PIC.
5802 case $host_os in
5803 aix3*)
5804 test "$enable_shared" = yes && enable_static=no
5805 if test -n "$RANLIB"; then
5806 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5807 postinstall_cmds='$RANLIB $lib'
5808 fi
5809 ;;
5810
5811 aix[[4-9]]*)
5812 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5813 test "$enable_shared" = yes && enable_static=no
5814 fi
5815 ;;
5816 esac
5817 AC_MSG_RESULT([$enable_shared])
5818
5819 AC_MSG_CHECKING([whether to build static libraries])
5820 # Make sure either enable_shared or enable_static is yes.
5821 test "$enable_shared" = yes || enable_static=yes
5822 AC_MSG_RESULT([$enable_static])
5823
5824 _LT_CONFIG($1)
5825 fi
5826 AC_LANG_POP
5827 CC="$lt_save_CC"
5828 ])# _LT_LANG_C_CONFIG
5829
5830
5831 # _LT_LANG_CXX_CONFIG([TAG])
5832 # --------------------------
5833 # Ensure that the configuration variables for a C++ compiler are suitably
5834 # defined. These variables are subsequently used by _LT_CONFIG to write
5835 # the compiler configuration to `libtool'.
5836 m4_defun([_LT_LANG_CXX_CONFIG],
5837 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5838 m4_require([_LT_DECL_EGREP])dnl
5839 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5840 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5841 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5842 (test "X$CXX" != "Xg++"))) ; then
5843 AC_PROG_CXXCPP
5844 else
5845 _lt_caught_CXX_error=yes
5846 fi
5847
5848 AC_LANG_PUSH(C++)
5849 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5850 _LT_TAGVAR(allow_undefined_flag, $1)=
5851 _LT_TAGVAR(always_export_symbols, $1)=no
5852 _LT_TAGVAR(archive_expsym_cmds, $1)=
5853 _LT_TAGVAR(compiler_needs_object, $1)=no
5854 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5855 _LT_TAGVAR(hardcode_direct, $1)=no
5856 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5858 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5859 _LT_TAGVAR(hardcode_minus_L, $1)=no
5860 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5861 _LT_TAGVAR(hardcode_automatic, $1)=no
5862 _LT_TAGVAR(inherit_rpath, $1)=no
5863 _LT_TAGVAR(module_cmds, $1)=
5864 _LT_TAGVAR(module_expsym_cmds, $1)=
5865 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5866 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5867 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5868 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5869 _LT_TAGVAR(no_undefined_flag, $1)=
5870 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5871 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5872
5873 # Source file extension for C++ test sources.
5874 ac_ext=cpp
5875
5876 # Object file extension for compiled C++ test sources.
5877 objext=o
5878 _LT_TAGVAR(objext, $1)=$objext
5879
5880 # No sense in running all these tests if we already determined that
5881 # the CXX compiler isn't working. Some variables (like enable_shared)
5882 # are currently assumed to apply to all compilers on this platform,
5883 # and will be corrupted by setting them based on a non-working compiler.
5884 if test "$_lt_caught_CXX_error" != yes; then
5885 # Code to be used in simple compile tests
5886 lt_simple_compile_test_code="int some_variable = 0;"
5887
5888 # Code to be used in simple link tests
5889 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5890
5891 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5892 _LT_TAG_COMPILER
5893
5894 # save warnings/boilerplate of simple test code
5895 _LT_COMPILER_BOILERPLATE
5896 _LT_LINKER_BOILERPLATE
5897
5898 # Allow CC to be a program name with arguments.
5899 lt_save_CC=$CC
5900 lt_save_CFLAGS=$CFLAGS
5901 lt_save_LD=$LD
5902 lt_save_GCC=$GCC
5903 GCC=$GXX
5904 lt_save_with_gnu_ld=$with_gnu_ld
5905 lt_save_path_LD=$lt_cv_path_LD
5906 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5907 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5908 else
5909 $as_unset lt_cv_prog_gnu_ld
5910 fi
5911 if test -n "${lt_cv_path_LDCXX+set}"; then
5912 lt_cv_path_LD=$lt_cv_path_LDCXX
5913 else
5914 $as_unset lt_cv_path_LD
5915 fi
5916 test -z "${LDCXX+set}" || LD=$LDCXX
5917 CC=${CXX-"c++"}
5918 CFLAGS=$CXXFLAGS
5919 compiler=$CC
5920 _LT_TAGVAR(compiler, $1)=$CC
5921 _LT_CC_BASENAME([$compiler])
5922
5923 if test -n "$compiler"; then
5924 # We don't want -fno-exception when compiling C++ code, so set the
5925 # no_builtin_flag separately
5926 if test "$GXX" = yes; then
5927 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5928 else
5929 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5930 fi
5931
5932 if test "$GXX" = yes; then
5933 # Set up default GNU C++ configuration
5934
5935 LT_PATH_LD
5936
5937 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5938 # archiving commands below assume that GNU ld is being used.
5939 if test "$with_gnu_ld" = yes; then
5940 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5941 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5942
5943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5944 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5945
5946 # If archive_cmds runs LD, not CC, wlarc should be empty
5947 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5948 # investigate it a little bit more. (MM)
5949 wlarc='${wl}'
5950
5951 # ancient GNU ld didn't support --whole-archive et. al.
5952 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5953 $GREP 'no-whole-archive' > /dev/null; then
5954 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5955 else
5956 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5957 fi
5958 else
5959 with_gnu_ld=no
5960 wlarc=
5961
5962 # A generic and very simple default shared library creation
5963 # command for GNU C++ for the case where it uses the native
5964 # linker, instead of GNU ld. If possible, this setting should
5965 # overridden to take advantage of the native linker features on
5966 # the platform it is being used on.
5967 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5968 fi
5969
5970 # Commands to make compiler produce verbose output that lists
5971 # what "hidden" libraries, object files and flags are used when
5972 # linking a shared library.
5973 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5974
5975 else
5976 GXX=no
5977 with_gnu_ld=no
5978 wlarc=
5979 fi
5980
5981 # PORTME: fill in a description of your system's C++ link characteristics
5982 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5983 _LT_TAGVAR(ld_shlibs, $1)=yes
5984 case $host_os in
5985 aix3*)
5986 # FIXME: insert proper C++ library support
5987 _LT_TAGVAR(ld_shlibs, $1)=no
5988 ;;
5989 aix[[4-9]]*)
5990 if test "$host_cpu" = ia64; then
5991 # On IA64, the linker does run time linking by default, so we don't
5992 # have to do anything special.
5993 aix_use_runtimelinking=no
5994 exp_sym_flag='-Bexport'
5995 no_entry_flag=""
5996 else
5997 aix_use_runtimelinking=no
5998
5999 # Test if we are trying to use run time linking or normal
6000 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6001 # need to do runtime linking.
6002 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6003 for ld_flag in $LDFLAGS; do
6004 case $ld_flag in
6005 *-brtl*)
6006 aix_use_runtimelinking=yes
6007 break
6008 ;;
6009 esac
6010 done
6011 ;;
6012 esac
6013
6014 exp_sym_flag='-bexport'
6015 no_entry_flag='-bnoentry'
6016 fi
6017
6018 # When large executables or shared objects are built, AIX ld can
6019 # have problems creating the table of contents. If linking a library
6020 # or program results in "error TOC overflow" add -mminimal-toc to
6021 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6022 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6023
6024 _LT_TAGVAR(archive_cmds, $1)=''
6025 _LT_TAGVAR(hardcode_direct, $1)=yes
6026 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6027 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6028 _LT_TAGVAR(link_all_deplibs, $1)=yes
6029 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6030
6031 if test "$GXX" = yes; then
6032 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6033 # We only want to do this on AIX 4.2 and lower, the check
6034 # below for broken collect2 doesn't work under 4.3+
6035 collect2name=`${CC} -print-prog-name=collect2`
6036 if test -f "$collect2name" &&
6037 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6038 then
6039 # We have reworked collect2
6040 :
6041 else
6042 # We have old collect2
6043 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6044 # It fails to find uninstalled libraries when the uninstalled
6045 # path is not listed in the libpath. Setting hardcode_minus_L
6046 # to unsupported forces relinking
6047 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6048 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6049 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6050 fi
6051 esac
6052 shared_flag='-shared'
6053 if test "$aix_use_runtimelinking" = yes; then
6054 shared_flag="$shared_flag "'${wl}-G'
6055 fi
6056 else
6057 # not using gcc
6058 if test "$host_cpu" = ia64; then
6059 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6060 # chokes on -Wl,-G. The following line is correct:
6061 shared_flag='-G'
6062 else
6063 if test "$aix_use_runtimelinking" = yes; then
6064 shared_flag='${wl}-G'
6065 else
6066 shared_flag='${wl}-bM:SRE'
6067 fi
6068 fi
6069 fi
6070
6071 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6072 # It seems that -bexpall does not export symbols beginning with
6073 # underscore (_), so it is better to generate a list of symbols to
6074 # export.
6075 _LT_TAGVAR(always_export_symbols, $1)=yes
6076 if test "$aix_use_runtimelinking" = yes; then
6077 # Warning - without using the other runtime loading flags (-brtl),
6078 # -berok will link without error, but may produce a broken library.
6079 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6080 # Determine the default libpath from the value encoded in an empty
6081 # executable.
6082 _LT_SYS_MODULE_PATH_AIX([$1])
6083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6084
6085 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6086 else
6087 if test "$host_cpu" = ia64; then
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6089 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6090 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6091 else
6092 # Determine the default libpath from the value encoded in an
6093 # empty executable.
6094 _LT_SYS_MODULE_PATH_AIX([$1])
6095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6096 # Warning - without using the other run time loading flags,
6097 # -berok will link without error, but may produce a broken library.
6098 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6100 if test "$with_gnu_ld" = yes; then
6101 # We only use this code for GNU lds that support --whole-archive.
6102 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6103 else
6104 # Exported symbols can be pulled into shared objects from archives
6105 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6106 fi
6107 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6108 # This is similar to how AIX traditionally builds its shared
6109 # libraries.
6110 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6111 fi
6112 fi
6113 ;;
6114
6115 beos*)
6116 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6117 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6118 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6119 # support --undefined. This deserves some investigation. FIXME
6120 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6121 else
6122 _LT_TAGVAR(ld_shlibs, $1)=no
6123 fi
6124 ;;
6125
6126 chorus*)
6127 case $cc_basename in
6128 *)
6129 # FIXME: insert proper C++ library support
6130 _LT_TAGVAR(ld_shlibs, $1)=no
6131 ;;
6132 esac
6133 ;;
6134
6135 cygwin* | mingw* | pw32* | cegcc*)
6136 case $GXX,$cc_basename in
6137 ,cl* | no,cl*)
6138 # Native MSVC
6139 # hardcode_libdir_flag_spec is actually meaningless, as there is
6140 # no search path for DLLs.
6141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6142 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6143 _LT_TAGVAR(always_export_symbols, $1)=yes
6144 _LT_TAGVAR(file_list_spec, $1)='@'
6145 # Tell ltmain to make .lib files, not .a files.
6146 libext=lib
6147 # Tell ltmain to make .dll files, not .so files.
6148 shrext_cmds=".dll"
6149 # FIXME: Setting linknames here is a bad hack.
6150 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6151 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6152 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6153 else
6154 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6155 fi~
6156 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6157 linknames='
6158 # The linker will not automatically build a static lib if we build a DLL.
6159 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6160 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6161 # Don't use ranlib
6162 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6163 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6164 lt_tool_outputfile="@TOOL_OUTPUT@"~
6165 case $lt_outputfile in
6166 *.exe|*.EXE) ;;
6167 *)
6168 lt_outputfile="$lt_outputfile.exe"
6169 lt_tool_outputfile="$lt_tool_outputfile.exe"
6170 ;;
6171 esac~
6172 func_to_tool_file "$lt_outputfile"~
6173 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6174 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6175 $RM "$lt_outputfile.manifest";
6176 fi'
6177 ;;
6178 *)
6179 # g++
6180 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6181 # as there is no search path for DLLs.
6182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6183 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6184 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6185 _LT_TAGVAR(always_export_symbols, $1)=no
6186 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6187
6188 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6190 # If the export-symbols file already is a .def file (1st line
6191 # is EXPORTS), use it as is; otherwise, prepend...
6192 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6193 cp $export_symbols $output_objdir/$soname.def;
6194 else
6195 echo EXPORTS > $output_objdir/$soname.def;
6196 cat $export_symbols >> $output_objdir/$soname.def;
6197 fi~
6198 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6199 else
6200 _LT_TAGVAR(ld_shlibs, $1)=no
6201 fi
6202 ;;
6203 esac
6204 ;;
6205 darwin* | rhapsody*)
6206 _LT_DARWIN_LINKER_FEATURES($1)
6207 ;;
6208
6209 dgux*)
6210 case $cc_basename in
6211 ec++*)
6212 # FIXME: insert proper C++ library support
6213 _LT_TAGVAR(ld_shlibs, $1)=no
6214 ;;
6215 ghcx*)
6216 # Green Hills C++ Compiler
6217 # FIXME: insert proper C++ library support
6218 _LT_TAGVAR(ld_shlibs, $1)=no
6219 ;;
6220 *)
6221 # FIXME: insert proper C++ library support
6222 _LT_TAGVAR(ld_shlibs, $1)=no
6223 ;;
6224 esac
6225 ;;
6226
6227 freebsd2.*)
6228 # C++ shared libraries reported to be fairly broken before
6229 # switch to ELF
6230 _LT_TAGVAR(ld_shlibs, $1)=no
6231 ;;
6232
6233 freebsd-elf*)
6234 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6235 ;;
6236
6237 freebsd* | dragonfly*)
6238 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6239 # conventions
6240 _LT_TAGVAR(ld_shlibs, $1)=yes
6241 ;;
6242
6243 gnu*)
6244 ;;
6245
6246 haiku*)
6247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6248 _LT_TAGVAR(link_all_deplibs, $1)=yes
6249 ;;
6250
6251 hpux9*)
6252 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6253 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6254 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6255 _LT_TAGVAR(hardcode_direct, $1)=yes
6256 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6257 # but as the default
6258 # location of the library.
6259
6260 case $cc_basename in
6261 CC*)
6262 # FIXME: insert proper C++ library support
6263 _LT_TAGVAR(ld_shlibs, $1)=no
6264 ;;
6265 aCC*)
6266 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6267 # Commands to make compiler produce verbose output that lists
6268 # what "hidden" libraries, object files and flags are used when
6269 # linking a shared library.
6270 #
6271 # There doesn't appear to be a way to prevent this compiler from
6272 # explicitly linking system object files so we need to strip them
6273 # from the output so that they don't get included in the library
6274 # dependencies.
6275 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6276 ;;
6277 *)
6278 if test "$GXX" = yes; then
6279 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6280 else
6281 # FIXME: insert proper C++ library support
6282 _LT_TAGVAR(ld_shlibs, $1)=no
6283 fi
6284 ;;
6285 esac
6286 ;;
6287
6288 hpux10*|hpux11*)
6289 if test $with_gnu_ld = no; then
6290 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6291 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6292
6293 case $host_cpu in
6294 hppa*64*|ia64*)
6295 ;;
6296 *)
6297 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6298 ;;
6299 esac
6300 fi
6301 case $host_cpu in
6302 hppa*64*|ia64*)
6303 _LT_TAGVAR(hardcode_direct, $1)=no
6304 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6305 ;;
6306 *)
6307 _LT_TAGVAR(hardcode_direct, $1)=yes
6308 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6309 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6310 # but as the default
6311 # location of the library.
6312 ;;
6313 esac
6314
6315 case $cc_basename in
6316 CC*)
6317 # FIXME: insert proper C++ library support
6318 _LT_TAGVAR(ld_shlibs, $1)=no
6319 ;;
6320 aCC*)
6321 case $host_cpu in
6322 hppa*64*)
6323 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6324 ;;
6325 ia64*)
6326 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6327 ;;
6328 *)
6329 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6330 ;;
6331 esac
6332 # Commands to make compiler produce verbose output that lists
6333 # what "hidden" libraries, object files and flags are used when
6334 # linking a shared library.
6335 #
6336 # There doesn't appear to be a way to prevent this compiler from
6337 # explicitly linking system object files so we need to strip them
6338 # from the output so that they don't get included in the library
6339 # dependencies.
6340 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6341 ;;
6342 *)
6343 if test "$GXX" = yes; then
6344 if test $with_gnu_ld = no; then
6345 case $host_cpu in
6346 hppa*64*)
6347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6348 ;;
6349 ia64*)
6350 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6351 ;;
6352 *)
6353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6354 ;;
6355 esac
6356 fi
6357 else
6358 # FIXME: insert proper C++ library support
6359 _LT_TAGVAR(ld_shlibs, $1)=no
6360 fi
6361 ;;
6362 esac
6363 ;;
6364
6365 interix[[3-9]]*)
6366 _LT_TAGVAR(hardcode_direct, $1)=no
6367 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6369 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6370 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6371 # Instead, shared libraries are loaded at an image base (0x10000000 by
6372 # default) and relocated if they conflict, which is a slow very memory
6373 # consuming and fragmenting process. To avoid this, we pick a random,
6374 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6375 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6376 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6377 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6378 ;;
6379 irix5* | irix6*)
6380 case $cc_basename in
6381 CC*)
6382 # SGI C++
6383 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6384
6385 # Archives containing C++ object files must be created using
6386 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6387 # necessary to make sure instantiated templates are included
6388 # in the archive.
6389 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6390 ;;
6391 *)
6392 if test "$GXX" = yes; then
6393 if test "$with_gnu_ld" = no; then
6394 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6395 else
6396 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6397 fi
6398 fi
6399 _LT_TAGVAR(link_all_deplibs, $1)=yes
6400 ;;
6401 esac
6402 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6403 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6404 _LT_TAGVAR(inherit_rpath, $1)=yes
6405 ;;
6406
6407 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6408 case $cc_basename in
6409 KCC*)
6410 # Kuck and Associates, Inc. (KAI) C++ Compiler
6411
6412 # KCC will only create a shared library if the output file
6413 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6414 # to its proper name (with version) after linking.
6415 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6416 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6417 # Commands to make compiler produce verbose output that lists
6418 # what "hidden" libraries, object files and flags are used when
6419 # linking a shared library.
6420 #
6421 # There doesn't appear to be a way to prevent this compiler from
6422 # explicitly linking system object files so we need to strip them
6423 # from the output so that they don't get included in the library
6424 # dependencies.
6425 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6426
6427 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6428 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6429
6430 # Archives containing C++ object files must be created using
6431 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6432 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6433 ;;
6434 icpc* | ecpc* )
6435 # Intel C++
6436 with_gnu_ld=yes
6437 # version 8.0 and above of icpc choke on multiply defined symbols
6438 # if we add $predep_objects and $postdep_objects, however 7.1 and
6439 # earlier do not add the objects themselves.
6440 case `$CC -V 2>&1` in
6441 *"Version 7."*)
6442 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6443 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6444 ;;
6445 *) # Version 8.0 or newer
6446 tmp_idyn=
6447 case $host_cpu in
6448 ia64*) tmp_idyn=' -i_dynamic';;
6449 esac
6450 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6451 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6452 ;;
6453 esac
6454 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6455 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6456 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6457 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6458 ;;
6459 pgCC* | pgcpp*)
6460 # Portland Group C++ compiler
6461 case `$CC -V` in
6462 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6463 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6464 rm -rf $tpldir~
6465 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6466 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6467 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6468 rm -rf $tpldir~
6469 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6470 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6471 $RANLIB $oldlib'
6472 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6473 rm -rf $tpldir~
6474 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6475 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6476 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6477 rm -rf $tpldir~
6478 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6479 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6480 ;;
6481 *) # Version 6 and above use weak symbols
6482 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6483 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6484 ;;
6485 esac
6486
6487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6488 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6489 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6490 ;;
6491 cxx*)
6492 # Compaq C++
6493 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6494 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6495
6496 runpath_var=LD_RUN_PATH
6497 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6498 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6499
6500 # Commands to make compiler produce verbose output that lists
6501 # what "hidden" libraries, object files and flags are used when
6502 # linking a shared library.
6503 #
6504 # There doesn't appear to be a way to prevent this compiler from
6505 # explicitly linking system object files so we need to strip them
6506 # from the output so that they don't get included in the library
6507 # dependencies.
6508 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6509 ;;
6510 xl* | mpixl* | bgxl*)
6511 # IBM XL 8.0 on PPC, with GNU ld
6512 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6513 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6514 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6515 if test "x$supports_anon_versioning" = xyes; then
6516 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6517 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6518 echo "local: *; };" >> $output_objdir/$libname.ver~
6519 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6520 fi
6521 ;;
6522 *)
6523 case `$CC -V 2>&1 | sed 5q` in
6524 *Sun\ C*)
6525 # Sun C++ 5.9
6526 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6527 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6528 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6529 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6530 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6531 _LT_TAGVAR(compiler_needs_object, $1)=yes
6532
6533 # Not sure whether something based on
6534 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6535 # would be better.
6536 output_verbose_link_cmd='func_echo_all'
6537
6538 # Archives containing C++ object files must be created using
6539 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6540 # necessary to make sure instantiated templates are included
6541 # in the archive.
6542 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6543 ;;
6544 esac
6545 ;;
6546 esac
6547 ;;
6548
6549 lynxos*)
6550 # FIXME: insert proper C++ library support
6551 _LT_TAGVAR(ld_shlibs, $1)=no
6552 ;;
6553
6554 m88k*)
6555 # FIXME: insert proper C++ library support
6556 _LT_TAGVAR(ld_shlibs, $1)=no
6557 ;;
6558
6559 mvs*)
6560 case $cc_basename in
6561 cxx*)
6562 # FIXME: insert proper C++ library support
6563 _LT_TAGVAR(ld_shlibs, $1)=no
6564 ;;
6565 *)
6566 # FIXME: insert proper C++ library support
6567 _LT_TAGVAR(ld_shlibs, $1)=no
6568 ;;
6569 esac
6570 ;;
6571
6572 netbsd*)
6573 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6574 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6575 wlarc=
6576 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6577 _LT_TAGVAR(hardcode_direct, $1)=yes
6578 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6579 fi
6580 # Workaround some broken pre-1.5 toolchains
6581 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6582 ;;
6583
6584 *nto* | *qnx*)
6585 _LT_TAGVAR(ld_shlibs, $1)=yes
6586 ;;
6587
6588 openbsd2*)
6589 # C++ shared libraries are fairly broken
6590 _LT_TAGVAR(ld_shlibs, $1)=no
6591 ;;
6592
6593 openbsd*)
6594 if test -f /usr/libexec/ld.so; then
6595 _LT_TAGVAR(hardcode_direct, $1)=yes
6596 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6597 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6598 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6599 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6600 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6601 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6602 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6603 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6604 fi
6605 output_verbose_link_cmd=func_echo_all
6606 else
6607 _LT_TAGVAR(ld_shlibs, $1)=no
6608 fi
6609 ;;
6610
6611 osf3* | osf4* | osf5*)
6612 case $cc_basename in
6613 KCC*)
6614 # Kuck and Associates, Inc. (KAI) C++ Compiler
6615
6616 # KCC will only create a shared library if the output file
6617 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6618 # to its proper name (with version) after linking.
6619 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6620
6621 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6622 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6623
6624 # Archives containing C++ object files must be created using
6625 # the KAI C++ compiler.
6626 case $host in
6627 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6628 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6629 esac
6630 ;;
6631 RCC*)
6632 # Rational C++ 2.4.1
6633 # FIXME: insert proper C++ library support
6634 _LT_TAGVAR(ld_shlibs, $1)=no
6635 ;;
6636 cxx*)
6637 case $host in
6638 osf3*)
6639 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6640 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6641 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6642 ;;
6643 *)
6644 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6645 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6646 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6647 echo "-hidden">> $lib.exp~
6648 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6649 $RM $lib.exp'
6650 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6651 ;;
6652 esac
6653
6654 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6655
6656 # Commands to make compiler produce verbose output that lists
6657 # what "hidden" libraries, object files and flags are used when
6658 # linking a shared library.
6659 #
6660 # There doesn't appear to be a way to prevent this compiler from
6661 # explicitly linking system object files so we need to strip them
6662 # from the output so that they don't get included in the library
6663 # dependencies.
6664 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6665 ;;
6666 *)
6667 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6668 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6669 case $host in
6670 osf3*)
6671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6672 ;;
6673 *)
6674 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6675 ;;
6676 esac
6677
6678 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6679 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6680
6681 # Commands to make compiler produce verbose output that lists
6682 # what "hidden" libraries, object files and flags are used when
6683 # linking a shared library.
6684 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6685
6686 else
6687 # FIXME: insert proper C++ library support
6688 _LT_TAGVAR(ld_shlibs, $1)=no
6689 fi
6690 ;;
6691 esac
6692 ;;
6693
6694 psos*)
6695 # FIXME: insert proper C++ library support
6696 _LT_TAGVAR(ld_shlibs, $1)=no
6697 ;;
6698
6699 sunos4*)
6700 case $cc_basename in
6701 CC*)
6702 # Sun C++ 4.x
6703 # FIXME: insert proper C++ library support
6704 _LT_TAGVAR(ld_shlibs, $1)=no
6705 ;;
6706 lcc*)
6707 # Lucid
6708 # FIXME: insert proper C++ library support
6709 _LT_TAGVAR(ld_shlibs, $1)=no
6710 ;;
6711 *)
6712 # FIXME: insert proper C++ library support
6713 _LT_TAGVAR(ld_shlibs, $1)=no
6714 ;;
6715 esac
6716 ;;
6717
6718 solaris*)
6719 case $cc_basename in
6720 CC* | sunCC*)
6721 # Sun C++ 4.2, 5.x and Centerline C++
6722 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6723 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6724 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6725 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6726 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6727
6728 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6729 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6730 case $host_os in
6731 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6732 *)
6733 # The compiler driver will combine and reorder linker options,
6734 # but understands `-z linker_flag'.
6735 # Supported since Solaris 2.6 (maybe 2.5.1?)
6736 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6737 ;;
6738 esac
6739 _LT_TAGVAR(link_all_deplibs, $1)=yes
6740
6741 output_verbose_link_cmd='func_echo_all'
6742
6743 # Archives containing C++ object files must be created using
6744 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6745 # necessary to make sure instantiated templates are included
6746 # in the archive.
6747 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6748 ;;
6749 gcx*)
6750 # Green Hills C++ Compiler
6751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6752
6753 # The C++ compiler must be used to create the archive.
6754 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6755 ;;
6756 *)
6757 # GNU C++ compiler with Solaris linker
6758 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6759 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6760 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6761 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6762 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6763 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6764
6765 # Commands to make compiler produce verbose output that lists
6766 # what "hidden" libraries, object files and flags are used when
6767 # linking a shared library.
6768 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6769 else
6770 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6771 # platform.
6772 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6773 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6774 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6775
6776 # Commands to make compiler produce verbose output that lists
6777 # what "hidden" libraries, object files and flags are used when
6778 # linking a shared library.
6779 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6780 fi
6781
6782 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6783 case $host_os in
6784 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6785 *)
6786 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6787 ;;
6788 esac
6789 fi
6790 ;;
6791 esac
6792 ;;
6793
6794 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6795 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6796 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6797 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6798 runpath_var='LD_RUN_PATH'
6799
6800 case $cc_basename in
6801 CC*)
6802 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6803 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6804 ;;
6805 *)
6806 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6807 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6808 ;;
6809 esac
6810 ;;
6811
6812 sysv5* | sco3.2v5* | sco5v6*)
6813 # Note: We can NOT use -z defs as we might desire, because we do not
6814 # link with -lc, and that would cause any symbols used from libc to
6815 # always be unresolved, which means just about no library would
6816 # ever link correctly. If we're not using GNU ld we use -z text
6817 # though, which does catch some bad symbols but isn't as heavy-handed
6818 # as -z defs.
6819 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6820 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6821 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6822 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6824 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6825 _LT_TAGVAR(link_all_deplibs, $1)=yes
6826 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6827 runpath_var='LD_RUN_PATH'
6828
6829 case $cc_basename in
6830 CC*)
6831 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6832 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6833 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6834 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6835 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6836 '"$_LT_TAGVAR(reload_cmds, $1)"
6837 ;;
6838 *)
6839 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6840 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6841 ;;
6842 esac
6843 ;;
6844
6845 tandem*)
6846 case $cc_basename in
6847 NCC*)
6848 # NonStop-UX NCC 3.20
6849 # FIXME: insert proper C++ library support
6850 _LT_TAGVAR(ld_shlibs, $1)=no
6851 ;;
6852 *)
6853 # FIXME: insert proper C++ library support
6854 _LT_TAGVAR(ld_shlibs, $1)=no
6855 ;;
6856 esac
6857 ;;
6858
6859 vxworks*)
6860 # FIXME: insert proper C++ library support
6861 _LT_TAGVAR(ld_shlibs, $1)=no
6862 ;;
6863
6864 *)
6865 # FIXME: insert proper C++ library support
6866 _LT_TAGVAR(ld_shlibs, $1)=no
6867 ;;
6868 esac
6869
6870 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6871 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6872
6873 _LT_TAGVAR(GCC, $1)="$GXX"
6874 _LT_TAGVAR(LD, $1)="$LD"
6875
6876 ## CAVEAT EMPTOR:
6877 ## There is no encapsulation within the following macros, do not change
6878 ## the running order or otherwise move them around unless you know exactly
6879 ## what you are doing...
6880 _LT_SYS_HIDDEN_LIBDEPS($1)
6881 _LT_COMPILER_PIC($1)
6882 _LT_COMPILER_C_O($1)
6883 _LT_COMPILER_FILE_LOCKS($1)
6884 _LT_LINKER_SHLIBS($1)
6885 _LT_SYS_DYNAMIC_LINKER($1)
6886 _LT_LINKER_HARDCODE_LIBPATH($1)
6887
6888 _LT_CONFIG($1)
6889 fi # test -n "$compiler"
6890
6891 CC=$lt_save_CC
6892 CFLAGS=$lt_save_CFLAGS
6893 LDCXX=$LD
6894 LD=$lt_save_LD
6895 GCC=$lt_save_GCC
6896 with_gnu_ld=$lt_save_with_gnu_ld
6897 lt_cv_path_LDCXX=$lt_cv_path_LD
6898 lt_cv_path_LD=$lt_save_path_LD
6899 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6900 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6901 fi # test "$_lt_caught_CXX_error" != yes
6902
6903 AC_LANG_POP
6904 ])# _LT_LANG_CXX_CONFIG
6905
6906
6907 # _LT_FUNC_STRIPNAME_CNF
6908 # ----------------------
6909 # func_stripname_cnf prefix suffix name
6910 # strip PREFIX and SUFFIX off of NAME.
6911 # PREFIX and SUFFIX must not contain globbing or regex special
6912 # characters, hashes, percent signs, but SUFFIX may contain a leading
6913 # dot (in which case that matches only a dot).
6914 #
6915 # This function is identical to the (non-XSI) version of func_stripname,
6916 # except this one can be used by m4 code that may be executed by configure,
6917 # rather than the libtool script.
6918 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6919 AC_REQUIRE([_LT_DECL_SED])
6920 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6921 func_stripname_cnf ()
6922 {
6923 case ${2} in
6924 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6925 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6926 esac
6927 } # func_stripname_cnf
6928 ])# _LT_FUNC_STRIPNAME_CNF
6929
6930 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6931 # ---------------------------------
6932 # Figure out "hidden" library dependencies from verbose
6933 # compiler output when linking a shared library.
6934 # Parse the compiler output and extract the necessary
6935 # objects, libraries and library flags.
6936 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6937 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6938 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6939 # Dependencies to place before and after the object being linked:
6940 _LT_TAGVAR(predep_objects, $1)=
6941 _LT_TAGVAR(postdep_objects, $1)=
6942 _LT_TAGVAR(predeps, $1)=
6943 _LT_TAGVAR(postdeps, $1)=
6944 _LT_TAGVAR(compiler_lib_search_path, $1)=
6945
6946 dnl we can't use the lt_simple_compile_test_code here,
6947 dnl because it contains code intended for an executable,
6948 dnl not a library. It's possible we should let each
6949 dnl tag define a new lt_????_link_test_code variable,
6950 dnl but it's only used here...
6951 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6952 int a;
6953 void foo (void) { a = 0; }
6954 _LT_EOF
6955 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6956 class Foo
6957 {
6958 public:
6959 Foo (void) { a = 0; }
6960 private:
6961 int a;
6962 };
6963 _LT_EOF
6964 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6965 subroutine foo
6966 implicit none
6967 integer*4 a
6968 a=0
6969 return
6970 end
6971 _LT_EOF
6972 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6973 subroutine foo
6974 implicit none
6975 integer a
6976 a=0
6977 return
6978 end
6979 _LT_EOF
6980 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6981 public class foo {
6982 private int a;
6983 public void bar (void) {
6984 a = 0;
6985 }
6986 };
6987 _LT_EOF
6988 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6989 package foo
6990 func foo() {
6991 }
6992 _LT_EOF
6993 ])
6994
6995 _lt_libdeps_save_CFLAGS=$CFLAGS
6996 case "$CC $CFLAGS " in #(
6997 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6998 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6999 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7000 esac
7001
7002 dnl Parse the compiler output and extract the necessary
7003 dnl objects, libraries and library flags.
7004 if AC_TRY_EVAL(ac_compile); then
7005 # Parse the compiler output and extract the necessary
7006 # objects, libraries and library flags.
7007
7008 # Sentinel used to keep track of whether or not we are before
7009 # the conftest object file.
7010 pre_test_object_deps_done=no
7011
7012 for p in `eval "$output_verbose_link_cmd"`; do
7013 case ${prev}${p} in
7014
7015 -L* | -R* | -l*)
7016 # Some compilers place space between "-{L,R}" and the path.
7017 # Remove the space.
7018 if test $p = "-L" ||
7019 test $p = "-R"; then
7020 prev=$p
7021 continue
7022 fi
7023
7024 # Expand the sysroot to ease extracting the directories later.
7025 if test -z "$prev"; then
7026 case $p in
7027 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7028 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7029 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7030 esac
7031 fi
7032 case $p in
7033 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7034 esac
7035 if test "$pre_test_object_deps_done" = no; then
7036 case ${prev} in
7037 -L | -R)
7038 # Internal compiler library paths should come after those
7039 # provided the user. The postdeps already come after the
7040 # user supplied libs so there is no need to process them.
7041 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7042 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7043 else
7044 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7045 fi
7046 ;;
7047 # The "-l" case would never come before the object being
7048 # linked, so don't bother handling this case.
7049 esac
7050 else
7051 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7052 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7053 else
7054 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7055 fi
7056 fi
7057 prev=
7058 ;;
7059
7060 *.lto.$objext) ;; # Ignore GCC LTO objects
7061 *.$objext)
7062 # This assumes that the test object file only shows up
7063 # once in the compiler output.
7064 if test "$p" = "conftest.$objext"; then
7065 pre_test_object_deps_done=yes
7066 continue
7067 fi
7068
7069 if test "$pre_test_object_deps_done" = no; then
7070 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7071 _LT_TAGVAR(predep_objects, $1)="$p"
7072 else
7073 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7074 fi
7075 else
7076 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7077 _LT_TAGVAR(postdep_objects, $1)="$p"
7078 else
7079 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7080 fi
7081 fi
7082 ;;
7083
7084 *) ;; # Ignore the rest.
7085
7086 esac
7087 done
7088
7089 # Clean up.
7090 rm -f a.out a.exe
7091 else
7092 echo "libtool.m4: error: problem compiling $1 test program"
7093 fi
7094
7095 $RM -f confest.$objext
7096 CFLAGS=$_lt_libdeps_save_CFLAGS
7097
7098 # PORTME: override above test on systems where it is broken
7099 m4_if([$1], [CXX],
7100 [case $host_os in
7101 interix[[3-9]]*)
7102 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7103 # hack all around it, let's just trust "g++" to DTRT.
7104 _LT_TAGVAR(predep_objects,$1)=
7105 _LT_TAGVAR(postdep_objects,$1)=
7106 _LT_TAGVAR(postdeps,$1)=
7107 ;;
7108
7109 linux*)
7110 case `$CC -V 2>&1 | sed 5q` in
7111 *Sun\ C*)
7112 # Sun C++ 5.9
7113
7114 # The more standards-conforming stlport4 library is
7115 # incompatible with the Cstd library. Avoid specifying
7116 # it if it's in CXXFLAGS. Ignore libCrun as
7117 # -library=stlport4 depends on it.
7118 case " $CXX $CXXFLAGS " in
7119 *" -library=stlport4 "*)
7120 solaris_use_stlport4=yes
7121 ;;
7122 esac
7123
7124 if test "$solaris_use_stlport4" != yes; then
7125 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7126 fi
7127 ;;
7128 esac
7129 ;;
7130
7131 solaris*)
7132 case $cc_basename in
7133 CC* | sunCC*)
7134 # The more standards-conforming stlport4 library is
7135 # incompatible with the Cstd library. Avoid specifying
7136 # it if it's in CXXFLAGS. Ignore libCrun as
7137 # -library=stlport4 depends on it.
7138 case " $CXX $CXXFLAGS " in
7139 *" -library=stlport4 "*)
7140 solaris_use_stlport4=yes
7141 ;;
7142 esac
7143
7144 # Adding this requires a known-good setup of shared libraries for
7145 # Sun compiler versions before 5.6, else PIC objects from an old
7146 # archive will be linked into the output, leading to subtle bugs.
7147 if test "$solaris_use_stlport4" != yes; then
7148 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7149 fi
7150 ;;
7151 esac
7152 ;;
7153 esac
7154 ])
7155
7156 case " $_LT_TAGVAR(postdeps, $1) " in
7157 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7158 esac
7159 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7160 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7161 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7162 fi
7163 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7164 [The directories searched by this compiler when creating a shared library])
7165 _LT_TAGDECL([], [predep_objects], [1],
7166 [Dependencies to place before and after the objects being linked to
7167 create a shared library])
7168 _LT_TAGDECL([], [postdep_objects], [1])
7169 _LT_TAGDECL([], [predeps], [1])
7170 _LT_TAGDECL([], [postdeps], [1])
7171 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7172 [The library search path used internally by the compiler when linking
7173 a shared library])
7174 ])# _LT_SYS_HIDDEN_LIBDEPS
7175
7176
7177 # _LT_LANG_F77_CONFIG([TAG])
7178 # --------------------------
7179 # Ensure that the configuration variables for a Fortran 77 compiler are
7180 # suitably defined. These variables are subsequently used by _LT_CONFIG
7181 # to write the compiler configuration to `libtool'.
7182 m4_defun([_LT_LANG_F77_CONFIG],
7183 [AC_LANG_PUSH(Fortran 77)
7184 if test -z "$F77" || test "X$F77" = "Xno"; then
7185 _lt_disable_F77=yes
7186 fi
7187
7188 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7189 _LT_TAGVAR(allow_undefined_flag, $1)=
7190 _LT_TAGVAR(always_export_symbols, $1)=no
7191 _LT_TAGVAR(archive_expsym_cmds, $1)=
7192 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7193 _LT_TAGVAR(hardcode_direct, $1)=no
7194 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7196 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7197 _LT_TAGVAR(hardcode_minus_L, $1)=no
7198 _LT_TAGVAR(hardcode_automatic, $1)=no
7199 _LT_TAGVAR(inherit_rpath, $1)=no
7200 _LT_TAGVAR(module_cmds, $1)=
7201 _LT_TAGVAR(module_expsym_cmds, $1)=
7202 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7203 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7204 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7205 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7206 _LT_TAGVAR(no_undefined_flag, $1)=
7207 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7208 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7209
7210 # Source file extension for f77 test sources.
7211 ac_ext=f
7212
7213 # Object file extension for compiled f77 test sources.
7214 objext=o
7215 _LT_TAGVAR(objext, $1)=$objext
7216
7217 # No sense in running all these tests if we already determined that
7218 # the F77 compiler isn't working. Some variables (like enable_shared)
7219 # are currently assumed to apply to all compilers on this platform,
7220 # and will be corrupted by setting them based on a non-working compiler.
7221 if test "$_lt_disable_F77" != yes; then
7222 # Code to be used in simple compile tests
7223 lt_simple_compile_test_code="\
7224 subroutine t
7225 return
7226 end
7227 "
7228
7229 # Code to be used in simple link tests
7230 lt_simple_link_test_code="\
7231 program t
7232 end
7233 "
7234
7235 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7236 _LT_TAG_COMPILER
7237
7238 # save warnings/boilerplate of simple test code
7239 _LT_COMPILER_BOILERPLATE
7240 _LT_LINKER_BOILERPLATE
7241
7242 # Allow CC to be a program name with arguments.
7243 lt_save_CC="$CC"
7244 lt_save_GCC=$GCC
7245 lt_save_CFLAGS=$CFLAGS
7246 CC=${F77-"f77"}
7247 CFLAGS=$FFLAGS
7248 compiler=$CC
7249 _LT_TAGVAR(compiler, $1)=$CC
7250 _LT_CC_BASENAME([$compiler])
7251 GCC=$G77
7252 if test -n "$compiler"; then
7253 AC_MSG_CHECKING([if libtool supports shared libraries])
7254 AC_MSG_RESULT([$can_build_shared])
7255
7256 AC_MSG_CHECKING([whether to build shared libraries])
7257 test "$can_build_shared" = "no" && enable_shared=no
7258
7259 # On AIX, shared libraries and static libraries use the same namespace, and
7260 # are all built from PIC.
7261 case $host_os in
7262 aix3*)
7263 test "$enable_shared" = yes && enable_static=no
7264 if test -n "$RANLIB"; then
7265 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7266 postinstall_cmds='$RANLIB $lib'
7267 fi
7268 ;;
7269 aix[[4-9]]*)
7270 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7271 test "$enable_shared" = yes && enable_static=no
7272 fi
7273 ;;
7274 esac
7275 AC_MSG_RESULT([$enable_shared])
7276
7277 AC_MSG_CHECKING([whether to build static libraries])
7278 # Make sure either enable_shared or enable_static is yes.
7279 test "$enable_shared" = yes || enable_static=yes
7280 AC_MSG_RESULT([$enable_static])
7281
7282 _LT_TAGVAR(GCC, $1)="$G77"
7283 _LT_TAGVAR(LD, $1)="$LD"
7284
7285 ## CAVEAT EMPTOR:
7286 ## There is no encapsulation within the following macros, do not change
7287 ## the running order or otherwise move them around unless you know exactly
7288 ## what you are doing...
7289 _LT_COMPILER_PIC($1)
7290 _LT_COMPILER_C_O($1)
7291 _LT_COMPILER_FILE_LOCKS($1)
7292 _LT_LINKER_SHLIBS($1)
7293 _LT_SYS_DYNAMIC_LINKER($1)
7294 _LT_LINKER_HARDCODE_LIBPATH($1)
7295
7296 _LT_CONFIG($1)
7297 fi # test -n "$compiler"
7298
7299 GCC=$lt_save_GCC
7300 CC="$lt_save_CC"
7301 CFLAGS="$lt_save_CFLAGS"
7302 fi # test "$_lt_disable_F77" != yes
7303
7304 AC_LANG_POP
7305 ])# _LT_LANG_F77_CONFIG
7306
7307
7308 # _LT_LANG_FC_CONFIG([TAG])
7309 # -------------------------
7310 # Ensure that the configuration variables for a Fortran compiler are
7311 # suitably defined. These variables are subsequently used by _LT_CONFIG
7312 # to write the compiler configuration to `libtool'.
7313 m4_defun([_LT_LANG_FC_CONFIG],
7314 [AC_LANG_PUSH(Fortran)
7315
7316 if test -z "$FC" || test "X$FC" = "Xno"; then
7317 _lt_disable_FC=yes
7318 fi
7319
7320 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7321 _LT_TAGVAR(allow_undefined_flag, $1)=
7322 _LT_TAGVAR(always_export_symbols, $1)=no
7323 _LT_TAGVAR(archive_expsym_cmds, $1)=
7324 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7325 _LT_TAGVAR(hardcode_direct, $1)=no
7326 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7327 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7328 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7329 _LT_TAGVAR(hardcode_minus_L, $1)=no
7330 _LT_TAGVAR(hardcode_automatic, $1)=no
7331 _LT_TAGVAR(inherit_rpath, $1)=no
7332 _LT_TAGVAR(module_cmds, $1)=
7333 _LT_TAGVAR(module_expsym_cmds, $1)=
7334 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7335 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7336 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7337 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7338 _LT_TAGVAR(no_undefined_flag, $1)=
7339 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7340 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7341
7342 # Source file extension for fc test sources.
7343 ac_ext=${ac_fc_srcext-f}
7344
7345 # Object file extension for compiled fc test sources.
7346 objext=o
7347 _LT_TAGVAR(objext, $1)=$objext
7348
7349 # No sense in running all these tests if we already determined that
7350 # the FC compiler isn't working. Some variables (like enable_shared)
7351 # are currently assumed to apply to all compilers on this platform,
7352 # and will be corrupted by setting them based on a non-working compiler.
7353 if test "$_lt_disable_FC" != yes; then
7354 # Code to be used in simple compile tests
7355 lt_simple_compile_test_code="\
7356 subroutine t
7357 return
7358 end
7359 "
7360
7361 # Code to be used in simple link tests
7362 lt_simple_link_test_code="\
7363 program t
7364 end
7365 "
7366
7367 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7368 _LT_TAG_COMPILER
7369
7370 # save warnings/boilerplate of simple test code
7371 _LT_COMPILER_BOILERPLATE
7372 _LT_LINKER_BOILERPLATE
7373
7374 # Allow CC to be a program name with arguments.
7375 lt_save_CC="$CC"
7376 lt_save_GCC=$GCC
7377 lt_save_CFLAGS=$CFLAGS
7378 CC=${FC-"f95"}
7379 CFLAGS=$FCFLAGS
7380 compiler=$CC
7381 GCC=$ac_cv_fc_compiler_gnu
7382
7383 _LT_TAGVAR(compiler, $1)=$CC
7384 _LT_CC_BASENAME([$compiler])
7385
7386 if test -n "$compiler"; then
7387 AC_MSG_CHECKING([if libtool supports shared libraries])
7388 AC_MSG_RESULT([$can_build_shared])
7389
7390 AC_MSG_CHECKING([whether to build shared libraries])
7391 test "$can_build_shared" = "no" && enable_shared=no
7392
7393 # On AIX, shared libraries and static libraries use the same namespace, and
7394 # are all built from PIC.
7395 case $host_os in
7396 aix3*)
7397 test "$enable_shared" = yes && enable_static=no
7398 if test -n "$RANLIB"; then
7399 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7400 postinstall_cmds='$RANLIB $lib'
7401 fi
7402 ;;
7403 aix[[4-9]]*)
7404 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7405 test "$enable_shared" = yes && enable_static=no
7406 fi
7407 ;;
7408 esac
7409 AC_MSG_RESULT([$enable_shared])
7410
7411 AC_MSG_CHECKING([whether to build static libraries])
7412 # Make sure either enable_shared or enable_static is yes.
7413 test "$enable_shared" = yes || enable_static=yes
7414 AC_MSG_RESULT([$enable_static])
7415
7416 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7417 _LT_TAGVAR(LD, $1)="$LD"
7418
7419 ## CAVEAT EMPTOR:
7420 ## There is no encapsulation within the following macros, do not change
7421 ## the running order or otherwise move them around unless you know exactly
7422 ## what you are doing...
7423 _LT_SYS_HIDDEN_LIBDEPS($1)
7424 _LT_COMPILER_PIC($1)
7425 _LT_COMPILER_C_O($1)
7426 _LT_COMPILER_FILE_LOCKS($1)
7427 _LT_LINKER_SHLIBS($1)
7428 _LT_SYS_DYNAMIC_LINKER($1)
7429 _LT_LINKER_HARDCODE_LIBPATH($1)
7430
7431 _LT_CONFIG($1)
7432 fi # test -n "$compiler"
7433
7434 GCC=$lt_save_GCC
7435 CC=$lt_save_CC
7436 CFLAGS=$lt_save_CFLAGS
7437 fi # test "$_lt_disable_FC" != yes
7438
7439 AC_LANG_POP
7440 ])# _LT_LANG_FC_CONFIG
7441
7442
7443 # _LT_LANG_GCJ_CONFIG([TAG])
7444 # --------------------------
7445 # Ensure that the configuration variables for the GNU Java Compiler compiler
7446 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7447 # to write the compiler configuration to `libtool'.
7448 m4_defun([_LT_LANG_GCJ_CONFIG],
7449 [AC_REQUIRE([LT_PROG_GCJ])dnl
7450 AC_LANG_SAVE
7451
7452 # Source file extension for Java test sources.
7453 ac_ext=java
7454
7455 # Object file extension for compiled Java test sources.
7456 objext=o
7457 _LT_TAGVAR(objext, $1)=$objext
7458
7459 # Code to be used in simple compile tests
7460 lt_simple_compile_test_code="class foo {}"
7461
7462 # Code to be used in simple link tests
7463 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7464
7465 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7466 _LT_TAG_COMPILER
7467
7468 # save warnings/boilerplate of simple test code
7469 _LT_COMPILER_BOILERPLATE
7470 _LT_LINKER_BOILERPLATE
7471
7472 # Allow CC to be a program name with arguments.
7473 lt_save_CC=$CC
7474 lt_save_CFLAGS=$CFLAGS
7475 lt_save_GCC=$GCC
7476 GCC=yes
7477 CC=${GCJ-"gcj"}
7478 CFLAGS=$GCJFLAGS
7479 compiler=$CC
7480 _LT_TAGVAR(compiler, $1)=$CC
7481 _LT_TAGVAR(LD, $1)="$LD"
7482 _LT_CC_BASENAME([$compiler])
7483
7484 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7485 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7486
7487 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7488 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7489 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7490
7491 ## CAVEAT EMPTOR:
7492 ## There is no encapsulation within the following macros, do not change
7493 ## the running order or otherwise move them around unless you know exactly
7494 ## what you are doing...
7495 if test -n "$compiler"; then
7496 _LT_COMPILER_NO_RTTI($1)
7497 _LT_COMPILER_PIC($1)
7498 _LT_COMPILER_C_O($1)
7499 _LT_COMPILER_FILE_LOCKS($1)
7500 _LT_LINKER_SHLIBS($1)
7501 _LT_LINKER_HARDCODE_LIBPATH($1)
7502
7503 _LT_CONFIG($1)
7504 fi
7505
7506 AC_LANG_RESTORE
7507
7508 GCC=$lt_save_GCC
7509 CC=$lt_save_CC
7510 CFLAGS=$lt_save_CFLAGS
7511 ])# _LT_LANG_GCJ_CONFIG
7512
7513
7514 # _LT_LANG_GO_CONFIG([TAG])
7515 # --------------------------
7516 # Ensure that the configuration variables for the GNU Go compiler
7517 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7518 # to write the compiler configuration to `libtool'.
7519 m4_defun([_LT_LANG_GO_CONFIG],
7520 [AC_REQUIRE([LT_PROG_GO])dnl
7521 AC_LANG_SAVE
7522
7523 # Source file extension for Go test sources.
7524 ac_ext=go
7525
7526 # Object file extension for compiled Go test sources.
7527 objext=o
7528 _LT_TAGVAR(objext, $1)=$objext
7529
7530 # Code to be used in simple compile tests
7531 lt_simple_compile_test_code="package main; func main() { }"
7532
7533 # Code to be used in simple link tests
7534 lt_simple_link_test_code='package main; func main() { }'
7535
7536 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7537 _LT_TAG_COMPILER
7538
7539 # save warnings/boilerplate of simple test code
7540 _LT_COMPILER_BOILERPLATE
7541 _LT_LINKER_BOILERPLATE
7542
7543 # Allow CC to be a program name with arguments.
7544 lt_save_CC=$CC
7545 lt_save_CFLAGS=$CFLAGS
7546 lt_save_GCC=$GCC
7547 GCC=yes
7548 CC=${GOC-"gccgo"}
7549 CFLAGS=$GOFLAGS
7550 compiler=$CC
7551 _LT_TAGVAR(compiler, $1)=$CC
7552 _LT_TAGVAR(LD, $1)="$LD"
7553 _LT_CC_BASENAME([$compiler])
7554
7555 # Go did not exist at the time GCC didn't implicitly link libc in.
7556 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7557
7558 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7559 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7560 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7561
7562 ## CAVEAT EMPTOR:
7563 ## There is no encapsulation within the following macros, do not change
7564 ## the running order or otherwise move them around unless you know exactly
7565 ## what you are doing...
7566 if test -n "$compiler"; then
7567 _LT_COMPILER_NO_RTTI($1)
7568 _LT_COMPILER_PIC($1)
7569 _LT_COMPILER_C_O($1)
7570 _LT_COMPILER_FILE_LOCKS($1)
7571 _LT_LINKER_SHLIBS($1)
7572 _LT_LINKER_HARDCODE_LIBPATH($1)
7573
7574 _LT_CONFIG($1)
7575 fi
7576
7577 AC_LANG_RESTORE
7578
7579 GCC=$lt_save_GCC
7580 CC=$lt_save_CC
7581 CFLAGS=$lt_save_CFLAGS
7582 ])# _LT_LANG_GO_CONFIG
7583
7584
7585 # _LT_LANG_RC_CONFIG([TAG])
7586 # -------------------------
7587 # Ensure that the configuration variables for the Windows resource compiler
7588 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7589 # to write the compiler configuration to `libtool'.
7590 m4_defun([_LT_LANG_RC_CONFIG],
7591 [AC_REQUIRE([LT_PROG_RC])dnl
7592 AC_LANG_SAVE
7593
7594 # Source file extension for RC test sources.
7595 ac_ext=rc
7596
7597 # Object file extension for compiled RC test sources.
7598 objext=o
7599 _LT_TAGVAR(objext, $1)=$objext
7600
7601 # Code to be used in simple compile tests
7602 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7603
7604 # Code to be used in simple link tests
7605 lt_simple_link_test_code="$lt_simple_compile_test_code"
7606
7607 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7608 _LT_TAG_COMPILER
7609
7610 # save warnings/boilerplate of simple test code
7611 _LT_COMPILER_BOILERPLATE
7612 _LT_LINKER_BOILERPLATE
7613
7614 # Allow CC to be a program name with arguments.
7615 lt_save_CC="$CC"
7616 lt_save_CFLAGS=$CFLAGS
7617 lt_save_GCC=$GCC
7618 GCC=
7619 CC=${RC-"windres"}
7620 CFLAGS=
7621 compiler=$CC
7622 _LT_TAGVAR(compiler, $1)=$CC
7623 _LT_CC_BASENAME([$compiler])
7624 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7625
7626 if test -n "$compiler"; then
7627 :
7628 _LT_CONFIG($1)
7629 fi
7630
7631 GCC=$lt_save_GCC
7632 AC_LANG_RESTORE
7633 CC=$lt_save_CC
7634 CFLAGS=$lt_save_CFLAGS
7635 ])# _LT_LANG_RC_CONFIG
7636
7637
7638 # LT_PROG_GCJ
7639 # -----------
7640 AC_DEFUN([LT_PROG_GCJ],
7641 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7642 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7643 [AC_CHECK_TOOL(GCJ, gcj,)
7644 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7645 AC_SUBST(GCJFLAGS)])])[]dnl
7646 ])
7647
7648 # Old name:
7649 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7650 dnl aclocal-1.4 backwards compatibility:
7651 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7652
7653
7654 # LT_PROG_GO
7655 # ----------
7656 AC_DEFUN([LT_PROG_GO],
7657 [AC_CHECK_TOOL(GOC, gccgo,)
7658 ])
7659
7660
7661 # LT_PROG_RC
7662 # ----------
7663 AC_DEFUN([LT_PROG_RC],
7664 [AC_CHECK_TOOL(RC, windres,)
7665 ])
7666
7667 # Old name:
7668 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7669 dnl aclocal-1.4 backwards compatibility:
7670 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7671
7672
7673 # _LT_DECL_EGREP
7674 # --------------
7675 # If we don't have a new enough Autoconf to choose the best grep
7676 # available, choose the one first in the user's PATH.
7677 m4_defun([_LT_DECL_EGREP],
7678 [AC_REQUIRE([AC_PROG_EGREP])dnl
7679 AC_REQUIRE([AC_PROG_FGREP])dnl
7680 test -z "$GREP" && GREP=grep
7681 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7682 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7683 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7684 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7685 AC_SUBST([GREP])
7686 ])
7687
7688
7689 # _LT_DECL_OBJDUMP
7690 # --------------
7691 # If we don't have a new enough Autoconf to choose the best objdump
7692 # available, choose the one first in the user's PATH.
7693 m4_defun([_LT_DECL_OBJDUMP],
7694 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7695 test -z "$OBJDUMP" && OBJDUMP=objdump
7696 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7697 AC_SUBST([OBJDUMP])
7698 ])
7699
7700 # _LT_DECL_DLLTOOL
7701 # ----------------
7702 # Ensure DLLTOOL variable is set.
7703 m4_defun([_LT_DECL_DLLTOOL],
7704 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7705 test -z "$DLLTOOL" && DLLTOOL=dlltool
7706 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7707 AC_SUBST([DLLTOOL])
7708 ])
7709
7710 # _LT_DECL_SED
7711 # ------------
7712 # Check for a fully-functional sed program, that truncates
7713 # as few characters as possible. Prefer GNU sed if found.
7714 m4_defun([_LT_DECL_SED],
7715 [AC_PROG_SED
7716 test -z "$SED" && SED=sed
7717 Xsed="$SED -e 1s/^X//"
7718 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7719 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7720 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7721 ])# _LT_DECL_SED
7722
7723 m4_ifndef([AC_PROG_SED], [
7724 ############################################################
7725 # NOTE: This macro has been submitted for inclusion into #
7726 # GNU Autoconf as AC_PROG_SED. When it is available in #
7727 # a released version of Autoconf we should remove this #
7728 # macro and use it instead. #
7729 ############################################################
7730
7731 m4_defun([AC_PROG_SED],
7732 [AC_MSG_CHECKING([for a sed that does not truncate output])
7733 AC_CACHE_VAL(lt_cv_path_SED,
7734 [# Loop through the user's path and test for sed and gsed.
7735 # Then use that list of sed's as ones to test for truncation.
7736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7737 for as_dir in $PATH
7738 do
7739 IFS=$as_save_IFS
7740 test -z "$as_dir" && as_dir=.
7741 for lt_ac_prog in sed gsed; do
7742 for ac_exec_ext in '' $ac_executable_extensions; do
7743 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7744 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7745 fi
7746 done
7747 done
7748 done
7749 IFS=$as_save_IFS
7750 lt_ac_max=0
7751 lt_ac_count=0
7752 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7753 # along with /bin/sed that truncates output.
7754 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7755 test ! -f $lt_ac_sed && continue
7756 cat /dev/null > conftest.in
7757 lt_ac_count=0
7758 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7759 # Check for GNU sed and select it if it is found.
7760 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7761 lt_cv_path_SED=$lt_ac_sed
7762 break
7763 fi
7764 while true; do
7765 cat conftest.in conftest.in >conftest.tmp
7766 mv conftest.tmp conftest.in
7767 cp conftest.in conftest.nl
7768 echo >>conftest.nl
7769 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7770 cmp -s conftest.out conftest.nl || break
7771 # 10000 chars as input seems more than enough
7772 test $lt_ac_count -gt 10 && break
7773 lt_ac_count=`expr $lt_ac_count + 1`
7774 if test $lt_ac_count -gt $lt_ac_max; then
7775 lt_ac_max=$lt_ac_count
7776 lt_cv_path_SED=$lt_ac_sed
7777 fi
7778 done
7779 done
7780 ])
7781 SED=$lt_cv_path_SED
7782 AC_SUBST([SED])
7783 AC_MSG_RESULT([$SED])
7784 ])#AC_PROG_SED
7785 ])#m4_ifndef
7786
7787 # Old name:
7788 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7789 dnl aclocal-1.4 backwards compatibility:
7790 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7791
7792
7793 # _LT_CHECK_SHELL_FEATURES
7794 # ------------------------
7795 # Find out whether the shell is Bourne or XSI compatible,
7796 # or has some other useful features.
7797 m4_defun([_LT_CHECK_SHELL_FEATURES],
7798 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7799 # Try some XSI features
7800 xsi_shell=no
7801 ( _lt_dummy="a/b/c"
7802 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7803 = c,a/b,b/c, \
7804 && eval 'test $(( 1 + 1 )) -eq 2 \
7805 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7806 && xsi_shell=yes
7807 AC_MSG_RESULT([$xsi_shell])
7808 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7809
7810 AC_MSG_CHECKING([whether the shell understands "+="])
7811 lt_shell_append=no
7812 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7813 >/dev/null 2>&1 \
7814 && lt_shell_append=yes
7815 AC_MSG_RESULT([$lt_shell_append])
7816 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7817
7818 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7819 lt_unset=unset
7820 else
7821 lt_unset=false
7822 fi
7823 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7824
7825 # test EBCDIC or ASCII
7826 case `echo X|tr X '\101'` in
7827 A) # ASCII based system
7828 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7829 lt_SP2NL='tr \040 \012'
7830 lt_NL2SP='tr \015\012 \040\040'
7831 ;;
7832 *) # EBCDIC based system
7833 lt_SP2NL='tr \100 \n'
7834 lt_NL2SP='tr \r\n \100\100'
7835 ;;
7836 esac
7837 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7838 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7839 ])# _LT_CHECK_SHELL_FEATURES
7840
7841
7842 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7843 # ------------------------------------------------------
7844 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7845 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7846 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7847 [dnl {
7848 sed -e '/^$1 ()$/,/^} # $1 /c\
7849 $1 ()\
7850 {\
7851 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7852 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7853 && mv -f "$cfgfile.tmp" "$cfgfile" \
7854 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7855 test 0 -eq $? || _lt_function_replace_fail=:
7856 ])
7857
7858
7859 # _LT_PROG_REPLACE_SHELLFNS
7860 # -------------------------
7861 # Replace existing portable implementations of several shell functions with
7862 # equivalent extended shell implementations where those features are available..
7863 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7864 [if test x"$xsi_shell" = xyes; then
7865 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7866 case ${1} in
7867 */*) func_dirname_result="${1%/*}${2}" ;;
7868 * ) func_dirname_result="${3}" ;;
7869 esac])
7870
7871 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7872 func_basename_result="${1##*/}"])
7873
7874 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7875 case ${1} in
7876 */*) func_dirname_result="${1%/*}${2}" ;;
7877 * ) func_dirname_result="${3}" ;;
7878 esac
7879 func_basename_result="${1##*/}"])
7880
7881 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7882 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7883 # positional parameters, so assign one to ordinary parameter first.
7884 func_stripname_result=${3}
7885 func_stripname_result=${func_stripname_result#"${1}"}
7886 func_stripname_result=${func_stripname_result%"${2}"}])
7887
7888 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7889 func_split_long_opt_name=${1%%=*}
7890 func_split_long_opt_arg=${1#*=}])
7891
7892 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7893 func_split_short_opt_arg=${1#??}
7894 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7895
7896 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7897 case ${1} in
7898 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7899 *) func_lo2o_result=${1} ;;
7900 esac])
7901
7902 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7903
7904 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7905
7906 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7907 fi
7908
7909 if test x"$lt_shell_append" = xyes; then
7910 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7911
7912 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7913 func_quote_for_eval "${2}"
7914 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7915 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7916
7917 # Save a `func_append' function call where possible by direct use of '+='
7918 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7919 && mv -f "$cfgfile.tmp" "$cfgfile" \
7920 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7921 test 0 -eq $? || _lt_function_replace_fail=:
7922 else
7923 # Save a `func_append' function call even when '+=' is not available
7924 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7925 && mv -f "$cfgfile.tmp" "$cfgfile" \
7926 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7927 test 0 -eq $? || _lt_function_replace_fail=:
7928 fi
7929
7930 if test x"$_lt_function_replace_fail" = x":"; then
7931 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7932 fi
7933 ])
7934
7935 # _LT_PATH_CONVERSION_FUNCTIONS
7936 # -----------------------------
7937 # Determine which file name conversion functions should be used by
7938 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7939 # for certain cross-compile configurations and native mingw.
7940 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7941 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7942 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7943 AC_MSG_CHECKING([how to convert $build file names to $host format])
7944 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7945 [case $host in
7946 *-*-mingw* )
7947 case $build in
7948 *-*-mingw* ) # actually msys
7949 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7950 ;;
7951 *-*-cygwin* )
7952 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7953 ;;
7954 * ) # otherwise, assume *nix
7955 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7956 ;;
7957 esac
7958 ;;
7959 *-*-cygwin* )
7960 case $build in
7961 *-*-mingw* ) # actually msys
7962 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7963 ;;
7964 *-*-cygwin* )
7965 lt_cv_to_host_file_cmd=func_convert_file_noop
7966 ;;
7967 * ) # otherwise, assume *nix
7968 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7969 ;;
7970 esac
7971 ;;
7972 * ) # unhandled hosts (and "normal" native builds)
7973 lt_cv_to_host_file_cmd=func_convert_file_noop
7974 ;;
7975 esac
7976 ])
7977 to_host_file_cmd=$lt_cv_to_host_file_cmd
7978 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7979 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7980 [0], [convert $build file names to $host format])dnl
7981
7982 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7983 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7984 [#assume ordinary cross tools, or native build.
7985 lt_cv_to_tool_file_cmd=func_convert_file_noop
7986 case $host in
7987 *-*-mingw* )
7988 case $build in
7989 *-*-mingw* ) # actually msys
7990 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7991 ;;
7992 esac
7993 ;;
7994 esac
7995 ])
7996 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7997 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7998 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7999 [0], [convert $build files to toolchain format])dnl
8000 ])# _LT_PATH_CONVERSION_FUNCTIONS
0
1 # libtool (GNU libtool) 2.4.2
2 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
6 # This is free software; see the source for copying conditions. There is NO
7 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8
9 # GNU Libtool is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # As a special exception to the GNU General Public License,
15 # if you distribute this file as part of a program or library that
16 # is built using GNU Libtool, you may include this file under the
17 # same distribution terms that you use for the rest of that program.
18 #
19 # GNU Libtool is distributed in the hope that it will be useful, but
20 # WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
49 #
50 # MODE must be one of the following:
51 #
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
59 #
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
62 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
63 #
64 # When reporting a bug, please describe a test case to reproduce it and
65 # include the following information:
66 #
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
73 # automake: $automake_version
74 # autoconf: $autoconf_version
75 #
76 # Report bugs to <bug-libtool@gnu.org>.
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
79
80 PROGRAM=libtool
81 PACKAGE=libtool
82 VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
83 TIMESTAMP=""
84 package_revision=1.3337
85
86 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
88 emulate sh
89 NULLCMD=:
90 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
91 # is contrary to our usage. Disable this feature.
92 alias -g '${1+"$@"}'='"$@"'
93 setopt NO_GLOB_SUBST
94 else
95 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
96 fi
97 BIN_SH=xpg4; export BIN_SH # for Tru64
98 DUALCASE=1; export DUALCASE # for MKS sh
99
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
108 # NLS nuisances: We save the old values to restore during execute mode.
109 lt_user_locale=
110 lt_safe_locale=
111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
112 do
113 eval "if test \"\${$lt_var+set}\" = set; then
114 save_$lt_var=\$$lt_var
115 $lt_var=C
116 export $lt_var
117 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
119 fi"
120 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
124
125 $lt_unset CDPATH
126
127
128 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129 # is ksh but when the shell is invoked as "sh" and the current value of
130 # the _XPG environment variable is not equal to 1 (one), the special
131 # positional parameter $0, within a function call, is the name of the
132 # function.
133 progpath="$0"
134
135
136
137 : ${CP="cp -f"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
139 : ${MAKE="make"}
140 : ${MKDIR="mkdir"}
141 : ${MV="mv -f"}
142 : ${RM="rm -f"}
143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
144 : ${Xsed="$SED -e 1s/^X//"}
145
146 # Global variables:
147 EXIT_SUCCESS=0
148 EXIT_FAILURE=1
149 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
150 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
151
152 exit_status=$EXIT_SUCCESS
153
154 # Make sure IFS has a sensible default
155 lt_nl='
156 '
157 IFS=" $lt_nl"
158
159 dirname="s,/[^/]*$,,"
160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
163 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
182
183 # func_dirname_and_basename file append nondir_replacement
184 # perform func_basename and func_dirname in a single function
185 # call:
186 # dirname: Compute the dirname of FILE. If nonempty,
187 # add APPEND to the result, otherwise set result
188 # to NONDIR_REPLACEMENT.
189 # value returned in "$func_dirname_result"
190 # basename: Compute filename of FILE.
191 # value retuned in "$func_basename_result"
192 # Implementation must be kept synchronized with func_dirname
193 # and func_basename. For efficiency, we do not delegate to
194 # those functions but instead duplicate the functionality here.
195 func_dirname_and_basename ()
196 {
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
201 else
202 func_dirname_result="$func_dirname_result${2}"
203 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
232
233 # func_normal_abspath PATH
234 # Remove doubled-up and trailing slashes, "." path components,
235 # and cancel out any ".." path components in PATH after making
236 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238 func_normal_abspath ()
239 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
287 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
337 fi
338 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
360 fi
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
370
371 # The name of this program:
372 func_dirname_and_basename "$progpath"
373 progname=$func_basename_result
374
375 # Make sure we have an absolute path for reexecution:
376 case $progpath in
377 [\\/]*|[A-Za-z]:\\*) ;;
378 *[\\/]*)
379 progdir=$func_dirname_result
380 progdir=`cd "$progdir" && pwd`
381 progpath="$progdir/$progname"
382 ;;
383 *)
384 save_IFS="$IFS"
385 IFS=${PATH_SEPARATOR-:}
386 for progdir in $PATH; do
387 IFS="$save_IFS"
388 test -x "$progdir/$progname" && break
389 done
390 IFS="$save_IFS"
391 test -n "$progdir" || progdir=`pwd`
392 progpath="$progdir/$progname"
393 ;;
394 esac
395
396 # Sed substitution that helps us do robust quoting. It backslashifies
397 # metacharacters that are still active within double-quoted strings.
398 Xsed="${SED}"' -e 1s/^X//'
399 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
400
401 # Same as above, but do not quote variable references.
402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
412
413 # Re-`\' parameter expansions in output of double_quote_subst that were
414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
415 # in input to double_quote_subst, that '$' was protected from expansion.
416 # Since each input `\' is now two `\'s, look for any number of runs of
417 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
418 bs='\\'
419 bs2='\\\\'
420 bs4='\\\\\\\\'
421 dollar='\$'
422 sed_double_backslash="\
423 s/$bs4/&\\
424 /g
425 s/^$bs2$dollar/$bs&/
426 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
427 s/\n//g"
428
429 # Standard options:
430 opt_dry_run=false
431 opt_help=false
432 opt_quiet=false
433 opt_verbose=false
434 opt_warning=:
435
436 # func_echo arg...
437 # Echo program name prefixed message, along with the current mode
438 # name if it has been set yet.
439 func_echo ()
440 {
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
442 }
443
444 # func_verbose arg...
445 # Echo program name prefixed message in verbose mode only.
446 func_verbose ()
447 {
448 $opt_verbose && func_echo ${1+"$@"}
449
450 # A bug in bash halts the script if the last line of a function
451 # fails when set -e is in force, so we need another command to
452 # work around that:
453 :
454 }
455
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
463 # func_error arg...
464 # Echo program name prefixed message to standard error.
465 func_error ()
466 {
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
468 }
469
470 # func_warning arg...
471 # Echo program name prefixed warning message to standard error.
472 func_warning ()
473 {
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
475
476 # bash bug again:
477 :
478 }
479
480 # func_fatal_error arg...
481 # Echo program name prefixed message to standard error, and exit.
482 func_fatal_error ()
483 {
484 func_error ${1+"$@"}
485 exit $EXIT_FAILURE
486 }
487
488 # func_fatal_help arg...
489 # Echo program name prefixed message to standard error, followed by
490 # a help hint, and exit.
491 func_fatal_help ()
492 {
493 func_error ${1+"$@"}
494 func_fatal_error "$help"
495 }
496 help="Try \`$progname --help' for more information." ## default
497
498
499 # func_grep expression filename
500 # Check whether EXPRESSION matches any line of FILENAME, without output.
501 func_grep ()
502 {
503 $GREP "$1" "$2" >/dev/null 2>&1
504 }
505
506
507 # func_mkdir_p directory-path
508 # Make sure the entire path to DIRECTORY-PATH is available.
509 func_mkdir_p ()
510 {
511 my_directory_path="$1"
512 my_dir_list=
513
514 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
515
516 # Protect directory names starting with `-'
517 case $my_directory_path in
518 -*) my_directory_path="./$my_directory_path" ;;
519 esac
520
521 # While some portion of DIR does not yet exist...
522 while test ! -d "$my_directory_path"; do
523 # ...make a list in topmost first order. Use a colon delimited
524 # list incase some portion of path contains whitespace.
525 my_dir_list="$my_directory_path:$my_dir_list"
526
527 # If the last portion added has no slash in it, the list is done
528 case $my_directory_path in */*) ;; *) break ;; esac
529
530 # ...otherwise throw away the child directory and loop
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
532 done
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
534
535 save_mkdir_p_IFS="$IFS"; IFS=':'
536 for my_dir in $my_dir_list; do
537 IFS="$save_mkdir_p_IFS"
538 # mkdir can fail with a `File exist' error if two processes
539 # try to create one of the directories concurrently. Don't
540 # stop in that case!
541 $MKDIR "$my_dir" 2>/dev/null || :
542 done
543 IFS="$save_mkdir_p_IFS"
544
545 # Bail out if we (or some other process) failed to create a directory.
546 test -d "$my_directory_path" || \
547 func_fatal_error "Failed to create \`$1'"
548 fi
549 }
550
551
552 # func_mktempdir [string]
553 # Make a temporary directory that won't clash with other running
554 # libtool processes, and avoids race conditions if possible. If
555 # given, STRING is the basename for that directory.
556 func_mktempdir ()
557 {
558 my_template="${TMPDIR-/tmp}/${1-$progname}"
559
560 if test "$opt_dry_run" = ":"; then
561 # Return a directory name, but don't create it in dry-run mode
562 my_tmpdir="${my_template}-$$"
563 else
564
565 # If mktemp works, use that first and foremost
566 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
567
568 if test ! -d "$my_tmpdir"; then
569 # Failing that, at least try and use $RANDOM to avoid a race
570 my_tmpdir="${my_template}-${RANDOM-0}$$"
571
572 save_mktempdir_umask=`umask`
573 umask 0077
574 $MKDIR "$my_tmpdir"
575 umask $save_mktempdir_umask
576 fi
577
578 # If we're not in dry-run mode, bomb out on failure
579 test -d "$my_tmpdir" || \
580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
581 fi
582
583 $ECHO "$my_tmpdir"
584 }
585
586
587 # func_quote_for_eval arg
588 # Aesthetically quote ARG to be evaled later.
589 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
590 # is double-quoted, suitable for a subsequent eval, whereas
591 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
592 # which are still active within double quotes backslashified.
593 func_quote_for_eval ()
594 {
595 case $1 in
596 *[\\\`\"\$]*)
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
598 *)
599 func_quote_for_eval_unquoted_result="$1" ;;
600 esac
601
602 case $func_quote_for_eval_unquoted_result in
603 # Double-quote args containing shell metacharacters to delay
604 # word splitting, command substitution and and variable
605 # expansion for a subsequent eval.
606 # Many Bourne shells cannot handle close brackets correctly
607 # in scan sets, so we specify it separately.
608 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
609 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
610 ;;
611 *)
612 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
613 esac
614 }
615
616
617 # func_quote_for_expand arg
618 # Aesthetically quote ARG to be evaled later; same as above,
619 # but do not quote variable references.
620 func_quote_for_expand ()
621 {
622 case $1 in
623 *[\\\`\"]*)
624 my_arg=`$ECHO "$1" | $SED \
625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
626 *)
627 my_arg="$1" ;;
628 esac
629
630 case $my_arg in
631 # Double-quote args containing shell metacharacters to delay
632 # word splitting and command substitution for a subsequent eval.
633 # Many Bourne shells cannot handle close brackets correctly
634 # in scan sets, so we specify it separately.
635 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
636 my_arg="\"$my_arg\""
637 ;;
638 esac
639
640 func_quote_for_expand_result="$my_arg"
641 }
642
643
644 # func_show_eval cmd [fail_exp]
645 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
646 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
647 # is given, then evaluate it.
648 func_show_eval ()
649 {
650 my_cmd="$1"
651 my_fail_exp="${2-:}"
652
653 ${opt_silent-false} || {
654 func_quote_for_expand "$my_cmd"
655 eval "func_echo $func_quote_for_expand_result"
656 }
657
658 if ${opt_dry_run-false}; then :; else
659 eval "$my_cmd"
660 my_status=$?
661 if test "$my_status" -eq 0; then :; else
662 eval "(exit $my_status); $my_fail_exp"
663 fi
664 fi
665 }
666
667
668 # func_show_eval_locale cmd [fail_exp]
669 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
670 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
671 # is given, then evaluate it. Use the saved locale for evaluation.
672 func_show_eval_locale ()
673 {
674 my_cmd="$1"
675 my_fail_exp="${2-:}"
676
677 ${opt_silent-false} || {
678 func_quote_for_expand "$my_cmd"
679 eval "func_echo $func_quote_for_expand_result"
680 }
681
682 if ${opt_dry_run-false}; then :; else
683 eval "$lt_user_locale
684 $my_cmd"
685 my_status=$?
686 eval "$lt_safe_locale"
687 if test "$my_status" -eq 0; then :; else
688 eval "(exit $my_status); $my_fail_exp"
689 fi
690 fi
691 }
692
693 # func_tr_sh
694 # Turn $1 into a string suitable for a shell variable name.
695 # Result is stored in $func_tr_sh_result. All characters
696 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
697 # if $1 begins with a digit, a '_' is prepended as well.
698 func_tr_sh ()
699 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
709
710
711 # func_version
712 # Echo version message to standard output and exit.
713 func_version ()
714 {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
726 s/^# //
727 s/^# *$//
728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
729 p
730 }' < "$progpath"
731 exit $?
732 }
733
734 # func_usage
735 # Echo short help message to standard output and exit.
736 func_usage ()
737 {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
741 s/^# //
742 s/^# *$//
743 s/\$progname/'$progname'/
744 p
745 }' < "$progpath"
746 echo
747 $ECHO "run \`$progname --help | more' for full usage"
748 exit $?
749 }
750
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
754 func_help ()
755 {
756 $opt_debug
757
758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
760 s/^# //
761 s/^# *$//
762 s*\$progname*'$progname'*
763 s*\$host*'"$host"'*
764 s*\$SHELL*'"$SHELL"'*
765 s*\$LTCC*'"$LTCC"'*
766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
767 s*\$LD*'"$LD"'*
768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
771 p
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
781 }
782
783 # func_missing_arg argname
784 # Echo program name prefixed message to standard error and set global
785 # exit_cmd.
786 func_missing_arg ()
787 {
788 $opt_debug
789
790 func_error "missing argument for $1."
791 exit_cmd=exit
792 }
793
794
795 # func_split_short_opt shortopt
796 # Set func_split_short_opt_name and func_split_short_opt_arg shell
797 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
820 exit_cmd=:
821
822
823
824
825
826 magic="%%%MAGIC variable%%%"
827 magic_exe="%%%MAGIC EXE variable%%%"
828
829 # Global variables.
830 nonopt=
831 preserve_args=
832 lo2o="s/\\.lo\$/.${objext}/"
833 o2lo="s/\\.${objext}\$/.lo/"
834 extracted_archives=
835 extracted_serial=0
836
837 # If this variable is set in any of the actions, the command in it
838 # will be execed at the end. This prevents here-documents from being
839 # left over by shells.
840 exec_cmd=
841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
888 # func_fatal_configuration arg...
889 # Echo program name prefixed message to standard error, followed by
890 # a configuration failure hint, and exit.
891 func_fatal_configuration ()
892 {
893 func_error ${1+"$@"}
894 func_error "See the $PACKAGE documentation for more information."
895 func_fatal_error "Fatal configuration error."
896 }
897
898
899 # func_config
900 # Display the configuration for all the tags in this script.
901 func_config ()
902 {
903 re_begincf='^# ### BEGIN LIBTOOL'
904 re_endcf='^# ### END LIBTOOL'
905
906 # Default configuration.
907 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
908
909 # Now print the configurations for the tags.
910 for tagname in $taglist; do
911 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
912 done
913
914 exit $?
915 }
916
917 # func_features
918 # Display the features supported by this script.
919 func_features ()
920 {
921 echo "host: $host"
922 if test "$build_libtool_libs" = yes; then
923 echo "enable shared libraries"
924 else
925 echo "disable shared libraries"
926 fi
927 if test "$build_old_libs" = yes; then
928 echo "enable static libraries"
929 else
930 echo "disable static libraries"
931 fi
932
933 exit $?
934 }
935
936 # func_enable_tag tagname
937 # Verify that TAGNAME is valid, and either flag an error and exit, or
938 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
939 # variable here.
940 func_enable_tag ()
941 {
942 # Global variable:
943 tagname="$1"
944
945 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
946 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
947 sed_extractcf="/$re_begincf/,/$re_endcf/p"
948
949 # Validate tagname.
950 case $tagname in
951 *[!-_A-Za-z0-9,/]*)
952 func_fatal_error "invalid tag name: $tagname"
953 ;;
954 esac
955
956 # Don't test for the "default" C tag, as we know it's
957 # there but not specially marked.
958 case $tagname in
959 CC) ;;
960 *)
961 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
962 taglist="$taglist $tagname"
963
964 # Evaluate the configuration. Be careful to quote the path
965 # and the sed script, to avoid splitting on whitespace, but
966 # also don't use non-portable quotes within backquotes within
967 # quotes we have to do it in 2 steps:
968 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
969 eval "$extractedcf"
970 else
971 func_error "ignoring unknown tag $tagname"
972 fi
973 ;;
974 esac
975 }
976
977 # func_check_version_match
978 # Ensure that we are using m4 macros, and libtool script from the same
979 # release of libtool.
980 func_check_version_match ()
981 {
982 if test "$package_revision" != "$macro_revision"; then
983 if test "$VERSION" != "$macro_version"; then
984 if test -z "$macro_version"; then
985 cat >&2 <<_LT_EOF
986 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
987 $progname: definition of this LT_INIT comes from an older release.
988 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
989 $progname: and run autoconf again.
990 _LT_EOF
991 else
992 cat >&2 <<_LT_EOF
993 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
994 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
995 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
996 $progname: and run autoconf again.
997 _LT_EOF
998 fi
999 else
1000 cat >&2 <<_LT_EOF
1001 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1002 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1003 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1004 $progname: of $PACKAGE $VERSION and run autoconf again.
1005 _LT_EOF
1006 fi
1007
1008 exit $EXIT_MISMATCH
1009 fi
1010 }
1011
1012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1167 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
1197 fi
1198
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
1219
1220
1221
1222 ## ----------- ##
1223 ## Main. ##
1224 ## ----------- ##
1225
1226 # func_lalib_p file
1227 # True iff FILE is a libtool `.la' library or `.lo' object file.
1228 # This function is only a basic sanity check; it will hardly flush out
1229 # determined imposters.
1230 func_lalib_p ()
1231 {
1232 test -f "$1" &&
1233 $SED -e 4q "$1" 2>/dev/null \
1234 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
1235 }
1236
1237 # func_lalib_unsafe_p file
1238 # True iff FILE is a libtool `.la' library or `.lo' object file.
1239 # This function implements the same check as func_lalib_p without
1240 # resorting to external programs. To this end, it redirects stdin and
1241 # closes it afterwards, without saving the original file descriptor.
1242 # As a safety measure, use it only where a negative result would be
1243 # fatal anyway. Works if `file' does not exist.
1244 func_lalib_unsafe_p ()
1245 {
1246 lalib_p=no
1247 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
1248 for lalib_p_l in 1 2 3 4
1249 do
1250 read lalib_p_line
1251 case "$lalib_p_line" in
1252 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
1253 esac
1254 done
1255 exec 0<&5 5<&-
1256 fi
1257 test "$lalib_p" = yes
1258 }
1259
1260 # func_ltwrapper_script_p file
1261 # True iff FILE is a libtool wrapper script
1262 # This function is only a basic sanity check; it will hardly flush out
1263 # determined imposters.
1264 func_ltwrapper_script_p ()
1265 {
1266 func_lalib_p "$1"
1267 }
1268
1269 # func_ltwrapper_executable_p file
1270 # True iff FILE is a libtool wrapper executable
1271 # This function is only a basic sanity check; it will hardly flush out
1272 # determined imposters.
1273 func_ltwrapper_executable_p ()
1274 {
1275 func_ltwrapper_exec_suffix=
1276 case $1 in
1277 *.exe) ;;
1278 *) func_ltwrapper_exec_suffix=.exe ;;
1279 esac
1280 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
1281 }
1282
1283 # func_ltwrapper_scriptname file
1284 # Assumes file is an ltwrapper_executable
1285 # uses $file to determine the appropriate filename for a
1286 # temporary ltwrapper_script.
1287 func_ltwrapper_scriptname ()
1288 {
1289 func_dirname_and_basename "$1" "" "."
1290 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1292 }
1293
1294 # func_ltwrapper_p file
1295 # True iff FILE is a libtool wrapper script or wrapper executable
1296 # This function is only a basic sanity check; it will hardly flush out
1297 # determined imposters.
1298 func_ltwrapper_p ()
1299 {
1300 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
1301 }
1302
1303
1304 # func_execute_cmds commands fail_cmd
1305 # Execute tilde-delimited COMMANDS.
1306 # If FAIL_CMD is given, eval that upon failure.
1307 # FAIL_CMD may read-access the current command in variable CMD!
1308 func_execute_cmds ()
1309 {
1310 $opt_debug
1311 save_ifs=$IFS; IFS='~'
1312 for cmd in $1; do
1313 IFS=$save_ifs
1314 eval cmd=\"$cmd\"
1315 func_show_eval "$cmd" "${2-:}"
1316 done
1317 IFS=$save_ifs
1318 }
1319
1320
1321 # func_source file
1322 # Source FILE, adding directory component if necessary.
1323 # Note that it is not necessary on cygwin/mingw to append a dot to
1324 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
1325 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1326 # `FILE.' does not work on cygwin managed mounts.
1327 func_source ()
1328 {
1329 $opt_debug
1330 case $1 in
1331 */* | *\\*) . "$1" ;;
1332 *) . "./$1" ;;
1333 esac
1334 }
1335
1336
1337 # func_resolve_sysroot PATH
1338 # Replace a leading = in PATH with a sysroot. Store the result into
1339 # func_resolve_sysroot_result
1340 func_resolve_sysroot ()
1341 {
1342 func_resolve_sysroot_result=$1
1343 case $func_resolve_sysroot_result in
1344 =*)
1345 func_stripname '=' '' "$func_resolve_sysroot_result"
1346 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1347 ;;
1348 esac
1349 }
1350
1351 # func_replace_sysroot PATH
1352 # If PATH begins with the sysroot, replace it with = and
1353 # store the result into func_replace_sysroot_result.
1354 func_replace_sysroot ()
1355 {
1356 case "$lt_sysroot:$1" in
1357 ?*:"$lt_sysroot"*)
1358 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
1360 ;;
1361 *)
1362 # Including no sysroot.
1363 func_replace_sysroot_result=$1
1364 ;;
1365 esac
1366 }
1367
1368 # func_infer_tag arg
1369 # Infer tagged configuration to use if any are available and
1370 # if one wasn't chosen via the "--tag" command line option.
1371 # Only attempt this if the compiler in the base compile
1372 # command doesn't match the default compiler.
1373 # arg is usually of the form 'gcc ...'
1374 func_infer_tag ()
1375 {
1376 $opt_debug
1377 if test -n "$available_tags" && test -z "$tagname"; then
1378 CC_quoted=
1379 for arg in $CC; do
1380 func_append_quoted CC_quoted "$arg"
1381 done
1382 CC_expanded=`func_echo_all $CC`
1383 CC_quoted_expanded=`func_echo_all $CC_quoted`
1384 case $@ in
1385 # Blanks in the command may have been stripped by the calling shell,
1386 # but not from the CC environment variable when configure was run.
1387 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1388 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1389 # Blanks at the start of $base_compile will cause this to fail
1390 # if we don't check for them as well.
1391 *)
1392 for z in $available_tags; do
1393 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1394 # Evaluate the configuration.
1395 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1396 CC_quoted=
1397 for arg in $CC; do
1398 # Double-quote args containing other shell metacharacters.
1399 func_append_quoted CC_quoted "$arg"
1400 done
1401 CC_expanded=`func_echo_all $CC`
1402 CC_quoted_expanded=`func_echo_all $CC_quoted`
1403 case "$@ " in
1404 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1405 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1406 # The compiler in the base compile command matches
1407 # the one in the tagged configuration.
1408 # Assume this is the tagged configuration we want.
1409 tagname=$z
1410 break
1411 ;;
1412 esac
1413 fi
1414 done
1415 # If $tagname still isn't set, then no tagged configuration
1416 # was found and let the user know that the "--tag" command
1417 # line option must be used.
1418 if test -z "$tagname"; then
1419 func_echo "unable to infer tagged configuration"
1420 func_fatal_error "specify a tag with \`--tag'"
1421 # else
1422 # func_verbose "using $tagname tagged configuration"
1423 fi
1424 ;;
1425 esac
1426 fi
1427 }
1428
1429
1430
1431 # func_write_libtool_object output_name pic_name nonpic_name
1432 # Create a libtool object file (analogous to a ".la" file),
1433 # but don't create it if we're doing a dry run.
1434 func_write_libtool_object ()
1435 {
1436 write_libobj=${1}
1437 if test "$build_libtool_libs" = yes; then
1438 write_lobj=\'${2}\'
1439 else
1440 write_lobj=none
1441 fi
1442
1443 if test "$build_old_libs" = yes; then
1444 write_oldobj=\'${3}\'
1445 else
1446 write_oldobj=none
1447 fi
1448
1449 $opt_dry_run || {
1450 cat >${write_libobj}T <<EOF
1451 # $write_libobj - a libtool object file
1452 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1453 #
1454 # Please DO NOT delete this file!
1455 # It is necessary for linking the library.
1456
1457 # Name of the PIC object.
1458 pic_object=$write_lobj
1459
1460 # Name of the non-PIC object
1461 non_pic_object=$write_oldobj
1462
1463 EOF
1464 $MV "${write_libobj}T" "${write_libobj}"
1465 }
1466 }
1467
1468
1469 ##################################################
1470 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1471 ##################################################
1472
1473 # func_convert_core_file_wine_to_w32 ARG
1474 # Helper function used by file name conversion functions when $build is *nix,
1475 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1476 # correctly configured wine environment available, with the winepath program
1477 # in $build's $PATH.
1478 #
1479 # ARG is the $build file name to be converted to w32 format.
1480 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1481 # be empty on error (or when ARG is empty)
1482 func_convert_core_file_wine_to_w32 ()
1483 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
1486 if test -n "$1"; then
1487 # Unfortunately, winepath does not exit with a non-zero error code, so we
1488 # are forced to check the contents of stdout. On the other hand, if the
1489 # command is not found, the shell will set an exit code of 127 and print
1490 # *an error message* to stdout. So we must check for both error code of
1491 # zero AND non-empty stdout, which explains the odd construction:
1492 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1494 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
1496 else
1497 func_convert_core_file_wine_to_w32_result=
1498 fi
1499 fi
1500 }
1501 # end: func_convert_core_file_wine_to_w32
1502
1503
1504 # func_convert_core_path_wine_to_w32 ARG
1505 # Helper function used by path conversion functions when $build is *nix, and
1506 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1507 # configured wine environment available, with the winepath program in $build's
1508 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1509 #
1510 # ARG is path to be converted from $build format to win32.
1511 # Result is available in $func_convert_core_path_wine_to_w32_result.
1512 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1513 # are convertible, then the result may be empty.
1514 func_convert_core_path_wine_to_w32 ()
1515 {
1516 $opt_debug
1517 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
1519 if test -n "$1"; then
1520 oldIFS=$IFS
1521 IFS=:
1522 for func_convert_core_path_wine_to_w32_f in $1; do
1523 IFS=$oldIFS
1524 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1526 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1528 else
1529 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1530 fi
1531 fi
1532 done
1533 IFS=$oldIFS
1534 fi
1535 }
1536 # end: func_convert_core_path_wine_to_w32
1537
1538
1539 # func_cygpath ARGS...
1540 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1541 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1542 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1543 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1544 # file name or path is assumed to be in w32 format, as previously converted
1545 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1546 # or path in func_cygpath_result (input file name or path is assumed to be in
1547 # Cygwin format). Returns an empty string on error.
1548 #
1549 # ARGS are passed to cygpath, with the last one being the file name or path to
1550 # be converted.
1551 #
1552 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1553 # environment variable; do not put it in $PATH.
1554 func_cygpath ()
1555 {
1556 $opt_debug
1557 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1558 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1559 if test "$?" -ne 0; then
1560 # on failure, ensure result is empty
1561 func_cygpath_result=
1562 fi
1563 else
1564 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1566 fi
1567 }
1568 #end: func_cygpath
1569
1570
1571 # func_convert_core_msys_to_w32 ARG
1572 # Convert file name or path ARG from MSYS format to w32 format. Return
1573 # result in func_convert_core_msys_to_w32_result.
1574 func_convert_core_msys_to_w32 ()
1575 {
1576 $opt_debug
1577 # awkward: cmd appends spaces to result
1578 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1580 }
1581 #end: func_convert_core_msys_to_w32
1582
1583
1584 # func_convert_file_check ARG1 ARG2
1585 # Verify that ARG1 (a file name in $build format) was converted to $host
1586 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1587 # func_to_host_file_result to ARG1).
1588 func_convert_file_check ()
1589 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
1592 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
1594 func_error "Continuing, but uninstalled executables may not work."
1595 # Fallback:
1596 func_to_host_file_result="$1"
1597 fi
1598 }
1599 # end func_convert_file_check
1600
1601
1602 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1603 # Verify that FROM_PATH (a path in $build format) was converted to $host
1604 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1605 # func_to_host_file_result to a simplistic fallback value (see below).
1606 func_convert_path_check ()
1607 {
1608 $opt_debug
1609 if test -z "$4" && test -n "$3"; then
1610 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
1612 func_error "Continuing, but uninstalled executables may not work."
1613 # Fallback. This is a deliberately simplistic "conversion" and
1614 # should not be "improved". See libtool.info.
1615 if test "x$1" != "x$2"; then
1616 lt_replace_pathsep_chars="s|$1|$2|g"
1617 func_to_host_path_result=`echo "$3" |
1618 $SED -e "$lt_replace_pathsep_chars"`
1619 else
1620 func_to_host_path_result="$3"
1621 fi
1622 fi
1623 }
1624 # end func_convert_path_check
1625
1626
1627 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1628 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1629 # and appending REPL if ORIG matches BACKPAT.
1630 func_convert_path_front_back_pathsep ()
1631 {
1632 $opt_debug
1633 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1635 ;;
1636 esac
1637 case $4 in
1638 $2 ) func_append func_to_host_path_result "$3"
1639 ;;
1640 esac
1641 }
1642 # end func_convert_path_front_back_pathsep
1643
1644
1645 ##################################################
1646 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1647 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
1649 #
1650 # In each case, ARG is the path to be converted from $build to $host format.
1651 # Result will be available in $func_to_host_file_result.
1652
1653
1654 # func_to_host_file ARG
1655 # Converts the file name ARG from $build format to $host format. Return result
1656 # in func_to_host_file_result.
1657 func_to_host_file ()
1658 {
1659 $opt_debug
1660 $to_host_file_cmd "$1"
1661 }
1662 # end func_to_host_file
1663
1664
1665 # func_to_tool_file ARG LAZY
1666 # converts the file name ARG from $build format to toolchain format. Return
1667 # result in func_to_tool_file_result. If the conversion in use is listed
1668 # in (the comma separated) LAZY, no conversion takes place.
1669 func_to_tool_file ()
1670 {
1671 $opt_debug
1672 case ,$2, in
1673 *,"$to_tool_file_cmd",*)
1674 func_to_tool_file_result=$1
1675 ;;
1676 *)
1677 $to_tool_file_cmd "$1"
1678 func_to_tool_file_result=$func_to_host_file_result
1679 ;;
1680 esac
1681 }
1682 # end func_to_tool_file
1683
1684
1685 # func_convert_file_noop ARG
1686 # Copy ARG to func_to_host_file_result.
1687 func_convert_file_noop ()
1688 {
1689 func_to_host_file_result="$1"
1690 }
1691 # end func_convert_file_noop
1692
1693
1694 # func_convert_file_msys_to_w32 ARG
1695 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1696 # conversion to w32 is not available inside the cwrapper. Returns result in
1697 # func_to_host_file_result.
1698 func_convert_file_msys_to_w32 ()
1699 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
1702 if test -n "$1"; then
1703 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1705 fi
1706 func_convert_file_check "$1" "$func_to_host_file_result"
1707 }
1708 # end func_convert_file_msys_to_w32
1709
1710
1711 # func_convert_file_cygwin_to_w32 ARG
1712 # Convert file name ARG from Cygwin to w32 format. Returns result in
1713 # func_to_host_file_result.
1714 func_convert_file_cygwin_to_w32 ()
1715 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
1718 if test -n "$1"; then
1719 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1720 # LT_CYGPATH in this case.
1721 func_to_host_file_result=`cygpath -m "$1"`
1722 fi
1723 func_convert_file_check "$1" "$func_to_host_file_result"
1724 }
1725 # end func_convert_file_cygwin_to_w32
1726
1727
1728 # func_convert_file_nix_to_w32 ARG
1729 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1730 # and a working winepath. Returns result in func_to_host_file_result.
1731 func_convert_file_nix_to_w32 ()
1732 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
1735 if test -n "$1"; then
1736 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1738 fi
1739 func_convert_file_check "$1" "$func_to_host_file_result"
1740 }
1741 # end func_convert_file_nix_to_w32
1742
1743
1744 # func_convert_file_msys_to_cygwin ARG
1745 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1746 # Returns result in func_to_host_file_result.
1747 func_convert_file_msys_to_cygwin ()
1748 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
1751 if test -n "$1"; then
1752 func_convert_core_msys_to_w32 "$1"
1753 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
1755 fi
1756 func_convert_file_check "$1" "$func_to_host_file_result"
1757 }
1758 # end func_convert_file_msys_to_cygwin
1759
1760
1761 # func_convert_file_nix_to_cygwin ARG
1762 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1763 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1764 # in func_to_host_file_result.
1765 func_convert_file_nix_to_cygwin ()
1766 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
1769 if test -n "$1"; then
1770 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1771 func_convert_core_file_wine_to_w32 "$1"
1772 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
1774 fi
1775 func_convert_file_check "$1" "$func_to_host_file_result"
1776 }
1777 # end func_convert_file_nix_to_cygwin
1778
1779
1780 #############################################
1781 # $build to $host PATH CONVERSION FUNCTIONS #
1782 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
1784 #
1785 # In each case, ARG is the path to be converted from $build to $host format.
1786 # The result will be available in $func_to_host_path_result.
1787 #
1788 # Path separators are also converted from $build format to $host format. If
1789 # ARG begins or ends with a path separator character, it is preserved (but
1790 # converted to $host format) on output.
1791 #
1792 # All path conversion functions are named using the following convention:
1793 # file name conversion function : func_convert_file_X_to_Y ()
1794 # path conversion function : func_convert_path_X_to_Y ()
1795 # where, for any given $build/$host combination the 'X_to_Y' value is the
1796 # same. If conversion functions are added for new $build/$host combinations,
1797 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1798 # will break.
1799
1800
1801 # func_init_to_host_path_cmd
1802 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1803 # appropriate value, based on the value of $to_host_file_cmd.
1804 to_host_path_cmd=
1805 func_init_to_host_path_cmd ()
1806 {
1807 $opt_debug
1808 if test -z "$to_host_path_cmd"; then
1809 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1811 fi
1812 }
1813
1814
1815 # func_to_host_path ARG
1816 # Converts the path ARG from $build format to $host format. Return result
1817 # in func_to_host_path_result.
1818 func_to_host_path ()
1819 {
1820 $opt_debug
1821 func_init_to_host_path_cmd
1822 $to_host_path_cmd "$1"
1823 }
1824 # end func_to_host_path
1825
1826
1827 # func_convert_path_noop ARG
1828 # Copy ARG to func_to_host_path_result.
1829 func_convert_path_noop ()
1830 {
1831 func_to_host_path_result="$1"
1832 }
1833 # end func_convert_path_noop
1834
1835
1836 # func_convert_path_msys_to_w32 ARG
1837 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1838 # conversion to w32 is not available inside the cwrapper. Returns result in
1839 # func_to_host_path_result.
1840 func_convert_path_msys_to_w32 ()
1841 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
1844 if test -n "$1"; then
1845 # Remove leading and trailing path separator characters from ARG. MSYS
1846 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1847 # and winepath ignores them completely.
1848 func_stripname : : "$1"
1849 func_to_host_path_tmp1=$func_stripname_result
1850 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1852 func_convert_path_check : ";" \
1853 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1854 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1855 fi
1856 }
1857 # end func_convert_path_msys_to_w32
1858
1859
1860 # func_convert_path_cygwin_to_w32 ARG
1861 # Convert path ARG from Cygwin to w32 format. Returns result in
1862 # func_to_host_file_result.
1863 func_convert_path_cygwin_to_w32 ()
1864 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
1867 if test -n "$1"; then
1868 # See func_convert_path_msys_to_w32:
1869 func_stripname : : "$1"
1870 func_to_host_path_tmp1=$func_stripname_result
1871 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1872 func_convert_path_check : ";" \
1873 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1874 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1875 fi
1876 }
1877 # end func_convert_path_cygwin_to_w32
1878
1879
1880 # func_convert_path_nix_to_w32 ARG
1881 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1882 # a working winepath. Returns result in func_to_host_file_result.
1883 func_convert_path_nix_to_w32 ()
1884 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
1887 if test -n "$1"; then
1888 # See func_convert_path_msys_to_w32:
1889 func_stripname : : "$1"
1890 func_to_host_path_tmp1=$func_stripname_result
1891 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1893 func_convert_path_check : ";" \
1894 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1895 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1896 fi
1897 }
1898 # end func_convert_path_nix_to_w32
1899
1900
1901 # func_convert_path_msys_to_cygwin ARG
1902 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1903 # Returns result in func_to_host_file_result.
1904 func_convert_path_msys_to_cygwin ()
1905 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
1908 if test -n "$1"; then
1909 # See func_convert_path_msys_to_w32:
1910 func_stripname : : "$1"
1911 func_to_host_path_tmp1=$func_stripname_result
1912 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1913 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
1915 func_convert_path_check : : \
1916 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1917 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1918 fi
1919 }
1920 # end func_convert_path_msys_to_cygwin
1921
1922
1923 # func_convert_path_nix_to_cygwin ARG
1924 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1925 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1926 # func_to_host_file_result.
1927 func_convert_path_nix_to_cygwin ()
1928 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
1931 if test -n "$1"; then
1932 # Remove leading and trailing path separator characters from
1933 # ARG. msys behavior is inconsistent here, cygpath turns them
1934 # into '.;' and ';.', and winepath ignores them completely.
1935 func_stripname : : "$1"
1936 func_to_host_path_tmp1=$func_stripname_result
1937 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1938 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
1940 func_convert_path_check : : \
1941 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1942 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1943 fi
1944 }
1945 # end func_convert_path_nix_to_cygwin
1946
1947
1948 # func_mode_compile arg...
1949 func_mode_compile ()
1950 {
1951 $opt_debug
1952 # Get the compilation command and the source file.
1953 base_compile=
1954 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1955 suppress_opt=yes
1956 suppress_output=
1957 arg_mode=normal
1958 libobj=
1959 later=
1960 pie_flag=
1961
1962 for arg
1963 do
1964 case $arg_mode in
1965 arg )
1966 # do not "continue". Instead, add this to base_compile
1967 lastarg="$arg"
1968 arg_mode=normal
1969 ;;
1970
1971 target )
1972 libobj="$arg"
1973 arg_mode=normal
1974 continue
1975 ;;
1976
1977 normal )
1978 # Accept any command-line options.
1979 case $arg in
1980 -o)
1981 test -n "$libobj" && \
1982 func_fatal_error "you cannot specify \`-o' more than once"
1983 arg_mode=target
1984 continue
1985 ;;
1986
1987 -pie | -fpie | -fPIE)
1988 func_append pie_flag " $arg"
1989 continue
1990 ;;
1991
1992 -shared | -static | -prefer-pic | -prefer-non-pic)
1993 func_append later " $arg"
1994 continue
1995 ;;
1996
1997 -no-suppress)
1998 suppress_opt=no
1999 continue
2000 ;;
2001
2002 -Xcompiler)
2003 arg_mode=arg # the next one goes into the "base_compile" arg list
2004 continue # The current "srcfile" will either be retained or
2005 ;; # replaced later. I would guess that would be a bug.
2006
2007 -Wc,*)
2008 func_stripname '-Wc,' '' "$arg"
2009 args=$func_stripname_result
2010 lastarg=
2011 save_ifs="$IFS"; IFS=','
2012 for arg in $args; do
2013 IFS="$save_ifs"
2014 func_append_quoted lastarg "$arg"
2015 done
2016 IFS="$save_ifs"
2017 func_stripname ' ' '' "$lastarg"
2018 lastarg=$func_stripname_result
2019
2020 # Add the arguments to base_compile.
2021 func_append base_compile " $lastarg"
2022 continue
2023 ;;
2024
2025 *)
2026 # Accept the current argument as the source file.
2027 # The previous "srcfile" becomes the current argument.
2028 #
2029 lastarg="$srcfile"
2030 srcfile="$arg"
2031 ;;
2032 esac # case $arg
2033 ;;
2034 esac # case $arg_mode
2035
2036 # Aesthetically quote the previous argument.
2037 func_append_quoted base_compile "$lastarg"
2038 done # for arg
2039
2040 case $arg_mode in
2041 arg)
2042 func_fatal_error "you must specify an argument for -Xcompile"
2043 ;;
2044 target)
2045 func_fatal_error "you must specify a target with \`-o'"
2046 ;;
2047 *)
2048 # Get the name of the library object.
2049 test -z "$libobj" && {
2050 func_basename "$srcfile"
2051 libobj="$func_basename_result"
2052 }
2053 ;;
2054 esac
2055
2056 # Recognize several different file suffixes.
2057 # If the user specifies -o file.o, it is replaced with file.lo
2058 case $libobj in
2059 *.[cCFSifmso] | \
2060 *.ada | *.adb | *.ads | *.asm | \
2061 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
2062 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
2063 func_xform "$libobj"
2064 libobj=$func_xform_result
2065 ;;
2066 esac
2067
2068 case $libobj in
2069 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
2070 *)
2071 func_fatal_error "cannot determine name of library object from \`$libobj'"
2072 ;;
2073 esac
2074
2075 func_infer_tag $base_compile
2076
2077 for arg in $later; do
2078 case $arg in
2079 -shared)
2080 test "$build_libtool_libs" != yes && \
2081 func_fatal_configuration "can not build a shared library"
2082 build_old_libs=no
2083 continue
2084 ;;
2085
2086 -static)
2087 build_libtool_libs=no
2088 build_old_libs=yes
2089 continue
2090 ;;
2091
2092 -prefer-pic)
2093 pic_mode=yes
2094 continue
2095 ;;
2096
2097 -prefer-non-pic)
2098 pic_mode=no
2099 continue
2100 ;;
2101 esac
2102 done
2103
2104 func_quote_for_eval "$libobj"
2105 test "X$libobj" != "X$func_quote_for_eval_result" \
2106 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
2107 && func_warning "libobj name \`$libobj' may not contain shell special characters."
2108 func_dirname_and_basename "$obj" "/" ""
2109 objname="$func_basename_result"
2110 xdir="$func_dirname_result"
2111 lobj=${xdir}$objdir/$objname
2112
2113 test -z "$base_compile" && \
2114 func_fatal_help "you must specify a compilation command"
2115
2116 # Delete any leftover library objects.
2117 if test "$build_old_libs" = yes; then
2118 removelist="$obj $lobj $libobj ${libobj}T"
2119 else
2120 removelist="$lobj $libobj ${libobj}T"
2121 fi
2122
2123 # On Cygwin there's no "real" PIC flag so we must build both object types
2124 case $host_os in
2125 cygwin* | mingw* | pw32* | os2* | cegcc*)
2126 pic_mode=default
2127 ;;
2128 esac
2129 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
2130 # non-PIC code in shared libraries is not supported
2131 pic_mode=default
2132 fi
2133
2134 # Calculate the filename of the output object if compiler does
2135 # not support -o with -c
2136 if test "$compiler_c_o" = no; then
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
2138 lockfile="$output_obj.lock"
2139 else
2140 output_obj=
2141 need_locks=no
2142 lockfile=
2143 fi
2144
2145 # Lock this critical section if it is needed
2146 # We use this script file to make the link, it avoids creating a new file
2147 if test "$need_locks" = yes; then
2148 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2149 func_echo "Waiting for $lockfile to be removed"
2150 sleep 2
2151 done
2152 elif test "$need_locks" = warn; then
2153 if test -f "$lockfile"; then
2154 $ECHO "\
2155 *** ERROR, $lockfile exists and contains:
2156 `cat $lockfile 2>/dev/null`
2157
2158 This indicates that another process is trying to use the same
2159 temporary object file, and libtool could not work around it because
2160 your compiler does not support \`-c' and \`-o' together. If you
2161 repeat this compilation, it may succeed, by chance, but you had better
2162 avoid parallel builds (make -j) in this platform, or get a better
2163 compiler."
2164
2165 $opt_dry_run || $RM $removelist
2166 exit $EXIT_FAILURE
2167 fi
2168 func_append removelist " $output_obj"
2169 $ECHO "$srcfile" > "$lockfile"
2170 fi
2171
2172 $opt_dry_run || $RM $removelist
2173 func_append removelist " $lockfile"
2174 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
2175
2176 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2177 srcfile=$func_to_tool_file_result
2178 func_quote_for_eval "$srcfile"
2179 qsrcfile=$func_quote_for_eval_result
2180
2181 # Only build a PIC object if we are building libtool libraries.
2182 if test "$build_libtool_libs" = yes; then
2183 # Without this assignment, base_compile gets emptied.
2184 fbsd_hideous_sh_bug=$base_compile
2185
2186 if test "$pic_mode" != no; then
2187 command="$base_compile $qsrcfile $pic_flag"
2188 else
2189 # Don't build PIC code
2190 command="$base_compile $qsrcfile"
2191 fi
2192
2193 func_mkdir_p "$xdir$objdir"
2194
2195 if test -z "$output_obj"; then
2196 # Place PIC objects in $objdir
2197 func_append command " -o $lobj"
2198 fi
2199
2200 func_show_eval_locale "$command" \
2201 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
2202
2203 if test "$need_locks" = warn &&
2204 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2205 $ECHO "\
2206 *** ERROR, $lockfile contains:
2207 `cat $lockfile 2>/dev/null`
2208
2209 but it should contain:
2210 $srcfile
2211
2212 This indicates that another process is trying to use the same
2213 temporary object file, and libtool could not work around it because
2214 your compiler does not support \`-c' and \`-o' together. If you
2215 repeat this compilation, it may succeed, by chance, but you had better
2216 avoid parallel builds (make -j) in this platform, or get a better
2217 compiler."
2218
2219 $opt_dry_run || $RM $removelist
2220 exit $EXIT_FAILURE
2221 fi
2222
2223 # Just move the object if needed, then go on to compile the next one
2224 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
2225 func_show_eval '$MV "$output_obj" "$lobj"' \
2226 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2227 fi
2228
2229 # Allow error messages only from the first compilation.
2230 if test "$suppress_opt" = yes; then
2231 suppress_output=' >/dev/null 2>&1'
2232 fi
2233 fi
2234
2235 # Only build a position-dependent object if we build old libraries.
2236 if test "$build_old_libs" = yes; then
2237 if test "$pic_mode" != yes; then
2238 # Don't build PIC code
2239 command="$base_compile $qsrcfile$pie_flag"
2240 else
2241 command="$base_compile $qsrcfile $pic_flag"
2242 fi
2243 if test "$compiler_c_o" = yes; then
2244 func_append command " -o $obj"
2245 fi
2246
2247 # Suppress compiler output if we already did a PIC compilation.
2248 func_append command "$suppress_output"
2249 func_show_eval_locale "$command" \
2250 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
2251
2252 if test "$need_locks" = warn &&
2253 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2254 $ECHO "\
2255 *** ERROR, $lockfile contains:
2256 `cat $lockfile 2>/dev/null`
2257
2258 but it should contain:
2259 $srcfile
2260
2261 This indicates that another process is trying to use the same
2262 temporary object file, and libtool could not work around it because
2263 your compiler does not support \`-c' and \`-o' together. If you
2264 repeat this compilation, it may succeed, by chance, but you had better
2265 avoid parallel builds (make -j) in this platform, or get a better
2266 compiler."
2267
2268 $opt_dry_run || $RM $removelist
2269 exit $EXIT_FAILURE
2270 fi
2271
2272 # Just move the object if needed
2273 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
2274 func_show_eval '$MV "$output_obj" "$obj"' \
2275 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2276 fi
2277 fi
2278
2279 $opt_dry_run || {
2280 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
2281
2282 # Unlock the critical section if it was locked
2283 if test "$need_locks" != no; then
2284 removelist=$lockfile
2285 $RM "$lockfile"
2286 fi
2287 }
2288
2289 exit $EXIT_SUCCESS
2290 }
2291
2292 $opt_help || {
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
2294 }
2295
2296 func_mode_help ()
2297 {
2298 # We need to display help for each of the modes.
2299 case $opt_mode in
2300 "")
2301 # Generic help is extracted from the usage comments
2302 # at the start of this file.
2303 func_help
2304 ;;
2305
2306 clean)
2307 $ECHO \
2308 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
2309
2310 Remove files from the build directory.
2311
2312 RM is the name of the program to use to delete files associated with each FILE
2313 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2314 to RM.
2315
2316 If FILE is a libtool library, object or program, all the files associated
2317 with it are deleted. Otherwise, only FILE itself is deleted using RM."
2318 ;;
2319
2320 compile)
2321 $ECHO \
2322 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
2323
2324 Compile a source file into a libtool library object.
2325
2326 This mode accepts the following additional options:
2327
2328 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
2329 -no-suppress do not suppress compiler output for multiple passes
2330 -prefer-pic try to build PIC objects only
2331 -prefer-non-pic try to build non-PIC objects only
2332 -shared do not build a \`.o' file suitable for static linking
2333 -static only build a \`.o' file suitable for static linking
2334 -Wc,FLAG pass FLAG directly to the compiler
2335
2336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
2337 from the given SOURCEFILE.
2338
2339 The output file name is determined by removing the directory component from
2340 SOURCEFILE, then substituting the C source code suffix \`.c' with the
2341 library object suffix, \`.lo'."
2342 ;;
2343
2344 execute)
2345 $ECHO \
2346 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
2347
2348 Automatically set library path, then run a program.
2349
2350 This mode accepts the following additional options:
2351
2352 -dlopen FILE add the directory containing FILE to the library path
2353
2354 This mode sets the library path environment variable according to \`-dlopen'
2355 flags.
2356
2357 If any of the ARGS are libtool executable wrappers, then they are translated
2358 into their corresponding uninstalled binary, and any of their required library
2359 directories are added to the library path.
2360
2361 Then, COMMAND is executed, with ARGS as arguments."
2362 ;;
2363
2364 finish)
2365 $ECHO \
2366 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
2367
2368 Complete the installation of libtool libraries.
2369
2370 Each LIBDIR is a directory that contains libtool libraries.
2371
2372 The commands that this mode executes may require superuser privileges. Use
2373 the \`--dry-run' option if you just want to see what would be executed."
2374 ;;
2375
2376 install)
2377 $ECHO \
2378 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
2379
2380 Install executables or libraries.
2381
2382 INSTALL-COMMAND is the installation command. The first component should be
2383 either the \`install' or \`cp' program.
2384
2385 The following components of INSTALL-COMMAND are treated specially:
2386
2387 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2388
2389 The rest of the components are interpreted as arguments to that command (only
2390 BSD-compatible install options are recognized)."
2391 ;;
2392
2393 link)
2394 $ECHO \
2395 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
2396
2397 Link object files or libraries together to form another library, or to
2398 create an executable program.
2399
2400 LINK-COMMAND is a command using the C compiler that you would use to create
2401 a program from several object files.
2402
2403 The following components of LINK-COMMAND are treated specially:
2404
2405 -all-static do not do any dynamic linking at all
2406 -avoid-version do not add a version suffix if possible
2407 -bindir BINDIR specify path to binaries directory (for systems where
2408 libraries must be found in the PATH setting at runtime)
2409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
2410 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
2411 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
2412 -export-symbols SYMFILE
2413 try to export only the symbols listed in SYMFILE
2414 -export-symbols-regex REGEX
2415 try to export only the symbols matching REGEX
2416 -LLIBDIR search LIBDIR for required installed libraries
2417 -lNAME OUTPUT-FILE requires the installed library libNAME
2418 -module build a library that can dlopened
2419 -no-fast-install disable the fast-install mode
2420 -no-install link a not-installable executable
2421 -no-undefined declare that a library does not refer to external symbols
2422 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2423 -objectlist FILE Use a list of object files found in FILE to specify objects
2424 -precious-files-regex REGEX
2425 don't remove output files matching REGEX
2426 -release RELEASE specify package release information
2427 -rpath LIBDIR the created library will eventually be installed in LIBDIR
2428 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
2429 -shared only do dynamic linking of libtool libraries
2430 -shrext SUFFIX override the standard shared library file extension
2431 -static do not do any dynamic linking of uninstalled libtool libraries
2432 -static-libtool-libs
2433 do not do any dynamic linking of libtool libraries
2434 -version-info CURRENT[:REVISION[:AGE]]
2435 specify library version info [each variable defaults to 0]
2436 -weak LIBNAME declare that the target provides the LIBNAME interface
2437 -Wc,FLAG
2438 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2439 -Wl,FLAG
2440 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2441 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
2442
2443 All other options (arguments beginning with \`-') are ignored.
2444
2445 Every other argument is treated as a filename. Files ending in \`.la' are
2446 treated as uninstalled libtool libraries, other files are standard or library
2447 object files.
2448
2449 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
2450 only library objects (\`.lo' files) may be specified, and \`-rpath' is
2451 required, except when creating a convenience library.
2452
2453 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
2454 using \`ar' and \`ranlib', or on Windows using \`lib'.
2455
2456 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
2457 is created, otherwise an executable program is created."
2458 ;;
2459
2460 uninstall)
2461 $ECHO \
2462 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
2463
2464 Remove libraries from an installation directory.
2465
2466 RM is the name of the program to use to delete files associated with each FILE
2467 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2468 to RM.
2469
2470 If FILE is a libtool library, all the files associated with it are deleted.
2471 Otherwise, only FILE itself is deleted using RM."
2472 ;;
2473
2474 *)
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
2476 ;;
2477 esac
2478
2479 echo
2480 $ECHO "Try \`$progname --help' for more information about other modes."
2481 }
2482
2483 # Now that we've collected a possible --mode arg, show help if necessary
2484 if $opt_help; then
2485 if test "$opt_help" = :; then
2486 func_mode_help
2487 else
2488 {
2489 func_help noexit
2490 for opt_mode in compile link execute install finish uninstall clean; do
2491 func_mode_help
2492 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2494 {
2495 func_help noexit
2496 for opt_mode in compile link execute install finish uninstall clean; do
2497 echo
2498 func_mode_help
2499 done
2500 } |
2501 sed '1d
2502 /^When reporting/,/^Report/{
2503 H
2504 d
2505 }
2506 $x
2507 /information about other modes/d
2508 /more detailed .*MODE/d
2509 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2510 fi
2511 exit $?
2512 fi
2513
2514
2515 # func_mode_execute arg...
2516 func_mode_execute ()
2517 {
2518 $opt_debug
2519 # The first argument is the command name.
2520 cmd="$nonopt"
2521 test -z "$cmd" && \
2522 func_fatal_help "you must specify a COMMAND"
2523
2524 # Handle -dlopen flags immediately.
2525 for file in $opt_dlopen; do
2526 test -f "$file" \
2527 || func_fatal_help "\`$file' is not a file"
2528
2529 dir=
2530 case $file in
2531 *.la)
2532 func_resolve_sysroot "$file"
2533 file=$func_resolve_sysroot_result
2534
2535 # Check to see that this really is a libtool archive.
2536 func_lalib_unsafe_p "$file" \
2537 || func_fatal_help "\`$lib' is not a valid libtool archive"
2538
2539 # Read the libtool library.
2540 dlname=
2541 library_names=
2542 func_source "$file"
2543
2544 # Skip this library if it cannot be dlopened.
2545 if test -z "$dlname"; then
2546 # Warn if it was a shared library.
2547 test -n "$library_names" && \
2548 func_warning "\`$file' was not linked with \`-export-dynamic'"
2549 continue
2550 fi
2551
2552 func_dirname "$file" "" "."
2553 dir="$func_dirname_result"
2554
2555 if test -f "$dir/$objdir/$dlname"; then
2556 func_append dir "/$objdir"
2557 else
2558 if test ! -f "$dir/$dlname"; then
2559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
2560 fi
2561 fi
2562 ;;
2563
2564 *.lo)
2565 # Just add the directory containing the .lo file.
2566 func_dirname "$file" "" "."
2567 dir="$func_dirname_result"
2568 ;;
2569
2570 *)
2571 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
2572 continue
2573 ;;
2574 esac
2575
2576 # Get the absolute pathname.
2577 absdir=`cd "$dir" && pwd`
2578 test -n "$absdir" && dir="$absdir"
2579
2580 # Now add the directory to shlibpath_var.
2581 if eval "test -z \"\$$shlibpath_var\""; then
2582 eval "$shlibpath_var=\"\$dir\""
2583 else
2584 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
2585 fi
2586 done
2587
2588 # This variable tells wrapper scripts just to set shlibpath_var
2589 # rather than running their programs.
2590 libtool_execute_magic="$magic"
2591
2592 # Check if any of the arguments is a wrapper script.
2593 args=
2594 for file
2595 do
2596 case $file in
2597 -* | *.la | *.lo ) ;;
2598 *)
2599 # Do a test to see if this is really a libtool program.
2600 if func_ltwrapper_script_p "$file"; then
2601 func_source "$file"
2602 # Transform arg to wrapped name.
2603 file="$progdir/$program"
2604 elif func_ltwrapper_executable_p "$file"; then
2605 func_ltwrapper_scriptname "$file"
2606 func_source "$func_ltwrapper_scriptname_result"
2607 # Transform arg to wrapped name.
2608 file="$progdir/$program"
2609 fi
2610 ;;
2611 esac
2612 # Quote arguments (to preserve shell metacharacters).
2613 func_append_quoted args "$file"
2614 done
2615
2616 if test "X$opt_dry_run" = Xfalse; then
2617 if test -n "$shlibpath_var"; then
2618 # Export the shlibpath_var.
2619 eval "export $shlibpath_var"
2620 fi
2621
2622 # Restore saved environment variables
2623 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
2624 do
2625 eval "if test \"\${save_$lt_var+set}\" = set; then
2626 $lt_var=\$save_$lt_var; export $lt_var
2627 else
2628 $lt_unset $lt_var
2629 fi"
2630 done
2631
2632 # Now prepare to actually exec the command.
2633 exec_cmd="\$cmd$args"
2634 else
2635 # Display what would be done.
2636 if test -n "$shlibpath_var"; then
2637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
2638 echo "export $shlibpath_var"
2639 fi
2640 $ECHO "$cmd$args"
2641 exit $EXIT_SUCCESS
2642 fi
2643 }
2644
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
2646
2647
2648 # func_mode_finish arg...
2649 func_mode_finish ()
2650 {
2651 $opt_debug
2652 libs=
2653 libdirs=
2654 admincmds=
2655
2656 for opt in "$nonopt" ${1+"$@"}
2657 do
2658 if test -d "$opt"; then
2659 func_append libdirs " $opt"
2660
2661 elif test -f "$opt"; then
2662 if func_lalib_unsafe_p "$opt"; then
2663 func_append libs " $opt"
2664 else
2665 func_warning "\`$opt' is not a valid libtool archive"
2666 fi
2667
2668 else
2669 func_fatal_error "invalid argument \`$opt'"
2670 fi
2671 done
2672
2673 if test -n "$libs"; then
2674 if test -n "$lt_sysroot"; then
2675 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2676 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2677 else
2678 sysroot_cmd=
2679 fi
2680
2681 # Remove sysroot references
2682 if $opt_dry_run; then
2683 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2685 done
2686 else
2687 tmpdir=`func_mktempdir`
2688 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2690 > $tmpdir/tmp-la
2691 mv -f $tmpdir/tmp-la $lib
2692 done
2693 ${RM}r "$tmpdir"
2694 fi
2695 fi
2696
2697 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2698 for libdir in $libdirs; do
2699 if test -n "$finish_cmds"; then
2700 # Do each command in the finish commands.
2701 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
2702 '"$cmd"'"'
2703 fi
2704 if test -n "$finish_eval"; then
2705 # Do the single finish_eval.
2706 eval cmds=\"$finish_eval\"
2707 $opt_dry_run || eval "$cmds" || func_append admincmds "
2708 $cmds"
2709 fi
2710 done
2711 fi
2712
2713 # Exit here if they wanted silent mode.
2714 $opt_silent && exit $EXIT_SUCCESS
2715
2716 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2717 echo "----------------------------------------------------------------------"
2718 echo "Libraries have been installed in:"
2719 for libdir in $libdirs; do
2720 $ECHO " $libdir"
2721 done
2722 echo
2723 echo "If you ever happen to want to link against installed libraries"
2724 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2726 echo "flag during linking and do at least one of the following:"
2727 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2729 echo " during execution"
2730 fi
2731 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2733 echo " during linking"
2734 fi
2735 if test -n "$hardcode_libdir_flag_spec"; then
2736 libdir=LIBDIR
2737 eval flag=\"$hardcode_libdir_flag_spec\"
2738
2739 $ECHO " - use the \`$flag' linker flag"
2740 fi
2741 if test -n "$admincmds"; then
2742 $ECHO " - have your system administrator run these commands:$admincmds"
2743 fi
2744 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2746 fi
2747 echo
2748
2749 echo "See any operating system documentation about shared libraries for"
2750 case $host in
2751 solaris2.[6789]|solaris2.1[0-9])
2752 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2753 echo "pages."
2754 ;;
2755 *)
2756 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2757 ;;
2758 esac
2759 echo "----------------------------------------------------------------------"
2760 fi
2761 exit $EXIT_SUCCESS
2762 }
2763
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2765
2766
2767 # func_mode_install arg...
2768 func_mode_install ()
2769 {
2770 $opt_debug
2771 # There may be an optional sh(1) argument at the beginning of
2772 # install_prog (especially on Windows NT).
2773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
2774 # Allow the use of GNU shtool's install command.
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
2776 # Aesthetically quote it.
2777 func_quote_for_eval "$nonopt"
2778 install_prog="$func_quote_for_eval_result "
2779 arg=$1
2780 shift
2781 else
2782 install_prog=
2783 arg=$nonopt
2784 fi
2785
2786 # The real first argument should be the name of the installation program.
2787 # Aesthetically quote it.
2788 func_quote_for_eval "$arg"
2789 func_append install_prog "$func_quote_for_eval_result"
2790 install_shared_prog=$install_prog
2791 case " $install_prog " in
2792 *[\\\ /]cp\ *) install_cp=: ;;
2793 *) install_cp=false ;;
2794 esac
2795
2796 # We need to accept at least all the BSD install flags.
2797 dest=
2798 files=
2799 opts=
2800 prev=
2801 install_type=
2802 isdir=no
2803 stripme=
2804 no_mode=:
2805 for arg
2806 do
2807 arg2=
2808 if test -n "$dest"; then
2809 func_append files " $dest"
2810 dest=$arg
2811 continue
2812 fi
2813
2814 case $arg in
2815 -d) isdir=yes ;;
2816 -f)
2817 if $install_cp; then :; else
2818 prev=$arg
2819 fi
2820 ;;
2821 -g | -m | -o)
2822 prev=$arg
2823 ;;
2824 -s)
2825 stripme=" -s"
2826 continue
2827 ;;
2828 -*)
2829 ;;
2830 *)
2831 # If the previous option needed an argument, then skip it.
2832 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2834 arg2=$install_override_mode
2835 no_mode=false
2836 fi
2837 prev=
2838 else
2839 dest=$arg
2840 continue
2841 fi
2842 ;;
2843 esac
2844
2845 # Aesthetically quote the argument.
2846 func_quote_for_eval "$arg"
2847 func_append install_prog " $func_quote_for_eval_result"
2848 if test -n "$arg2"; then
2849 func_quote_for_eval "$arg2"
2850 fi
2851 func_append install_shared_prog " $func_quote_for_eval_result"
2852 done
2853
2854 test -z "$install_prog" && \
2855 func_fatal_help "you must specify an install program"
2856
2857 test -n "$prev" && \
2858 func_fatal_help "the \`$prev' option requires an argument"
2859
2860 if test -n "$install_override_mode" && $no_mode; then
2861 if $install_cp; then :; else
2862 func_quote_for_eval "$install_override_mode"
2863 func_append install_shared_prog " -m $func_quote_for_eval_result"
2864 fi
2865 fi
2866
2867 if test -z "$files"; then
2868 if test -z "$dest"; then
2869 func_fatal_help "no file or destination specified"
2870 else
2871 func_fatal_help "you must specify a destination"
2872 fi
2873 fi
2874
2875 # Strip any trailing slash from the destination.
2876 func_stripname '' '/' "$dest"
2877 dest=$func_stripname_result
2878
2879 # Check to see that the destination is a directory.
2880 test -d "$dest" && isdir=yes
2881 if test "$isdir" = yes; then
2882 destdir="$dest"
2883 destname=
2884 else
2885 func_dirname_and_basename "$dest" "" "."
2886 destdir="$func_dirname_result"
2887 destname="$func_basename_result"
2888
2889 # Not a directory, so check to see that there is only one file specified.
2890 set dummy $files; shift
2891 test "$#" -gt 1 && \
2892 func_fatal_help "\`$dest' is not a directory"
2893 fi
2894 case $destdir in
2895 [\\/]* | [A-Za-z]:[\\/]*) ;;
2896 *)
2897 for file in $files; do
2898 case $file in
2899 *.lo) ;;
2900 *)
2901 func_fatal_help "\`$destdir' must be an absolute directory name"
2902 ;;
2903 esac
2904 done
2905 ;;
2906 esac
2907
2908 # This variable tells wrapper scripts just to set variables rather
2909 # than running their programs.
2910 libtool_install_magic="$magic"
2911
2912 staticlibs=
2913 future_libdirs=
2914 current_libdirs=
2915 for file in $files; do
2916
2917 # Do each installation.
2918 case $file in
2919 *.$libext)
2920 # Do the static libraries later.
2921 func_append staticlibs " $file"
2922 ;;
2923
2924 *.la)
2925 func_resolve_sysroot "$file"
2926 file=$func_resolve_sysroot_result
2927
2928 # Check to see that this really is a libtool archive.
2929 func_lalib_unsafe_p "$file" \
2930 || func_fatal_help "\`$file' is not a valid libtool archive"
2931
2932 library_names=
2933 old_library=
2934 relink_command=
2935 func_source "$file"
2936
2937 # Add the libdir to current_libdirs if it is the destination.
2938 if test "X$destdir" = "X$libdir"; then
2939 case "$current_libdirs " in
2940 *" $libdir "*) ;;
2941 *) func_append current_libdirs " $libdir" ;;
2942 esac
2943 else
2944 # Note the libdir as a future libdir.
2945 case "$future_libdirs " in
2946 *" $libdir "*) ;;
2947 *) func_append future_libdirs " $libdir" ;;
2948 esac
2949 fi
2950
2951 func_dirname "$file" "/" ""
2952 dir="$func_dirname_result"
2953 func_append dir "$objdir"
2954
2955 if test -n "$relink_command"; then
2956 # Determine the prefix the user has applied to our future dir.
2957 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
2958
2959 # Don't allow the user to place us outside of our expected
2960 # location b/c this prevents finding dependent libraries that
2961 # are installed to the same prefix.
2962 # At present, this check doesn't affect windows .dll's that
2963 # are installed into $libdir/../bin (currently, that works fine)
2964 # but it's something to keep an eye on.
2965 test "$inst_prefix_dir" = "$destdir" && \
2966 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2967
2968 if test -n "$inst_prefix_dir"; then
2969 # Stick the inst_prefix_dir data into the link command.
2970 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2971 else
2972 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
2973 fi
2974
2975 func_warning "relinking \`$file'"
2976 func_show_eval "$relink_command" \
2977 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2978 fi
2979
2980 # See the names of the shared library.
2981 set dummy $library_names; shift
2982 if test -n "$1"; then
2983 realname="$1"
2984 shift
2985
2986 srcname="$realname"
2987 test -n "$relink_command" && srcname="$realname"T
2988
2989 # Install the shared library and build the symlinks.
2990 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
2991 'exit $?'
2992 tstripme="$stripme"
2993 case $host_os in
2994 cygwin* | mingw* | pw32* | cegcc*)
2995 case $realname in
2996 *.dll.a)
2997 tstripme=""
2998 ;;
2999 esac
3000 ;;
3001 esac
3002 if test -n "$tstripme" && test -n "$striplib"; then
3003 func_show_eval "$striplib $destdir/$realname" 'exit $?'
3004 fi
3005
3006 if test "$#" -gt 0; then
3007 # Delete the old symlinks, and create new ones.
3008 # Try `ln -sf' first, because the `ln' binary might depend on
3009 # the symlink we replace! Solaris /bin/ln does not understand -f,
3010 # so we also need to try rm && ln -s.
3011 for linkname
3012 do
3013 test "$linkname" != "$realname" \
3014 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
3015 done
3016 fi
3017
3018 # Do each command in the postinstall commands.
3019 lib="$destdir/$realname"
3020 func_execute_cmds "$postinstall_cmds" 'exit $?'
3021 fi
3022
3023 # Install the pseudo-library for information purposes.
3024 func_basename "$file"
3025 name="$func_basename_result"
3026 instname="$dir/$name"i
3027 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3028
3029 # Maybe install the static library, too.
3030 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3031 ;;
3032
3033 *.lo)
3034 # Install (i.e. copy) a libtool object.
3035
3036 # Figure out destination file name, if it wasn't already specified.
3037 if test -n "$destname"; then
3038 destfile="$destdir/$destname"
3039 else
3040 func_basename "$file"
3041 destfile="$func_basename_result"
3042 destfile="$destdir/$destfile"
3043 fi
3044
3045 # Deduce the name of the destination old-style object file.
3046 case $destfile in
3047 *.lo)
3048 func_lo2o "$destfile"
3049 staticdest=$func_lo2o_result
3050 ;;
3051 *.$objext)
3052 staticdest="$destfile"
3053 destfile=
3054 ;;
3055 *)
3056 func_fatal_help "cannot copy a libtool object to \`$destfile'"
3057 ;;
3058 esac
3059
3060 # Install the libtool object if requested.
3061 test -n "$destfile" && \
3062 func_show_eval "$install_prog $file $destfile" 'exit $?'
3063
3064 # Install the old object if enabled.
3065 if test "$build_old_libs" = yes; then
3066 # Deduce the name of the old-style object file.
3067 func_lo2o "$file"
3068 staticobj=$func_lo2o_result
3069 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
3070 fi
3071 exit $EXIT_SUCCESS
3072 ;;
3073
3074 *)
3075 # Figure out destination file name, if it wasn't already specified.
3076 if test -n "$destname"; then
3077 destfile="$destdir/$destname"
3078 else
3079 func_basename "$file"
3080 destfile="$func_basename_result"
3081 destfile="$destdir/$destfile"
3082 fi
3083
3084 # If the file is missing, and there is a .exe on the end, strip it
3085 # because it is most likely a libtool script we actually want to
3086 # install
3087 stripped_ext=""
3088 case $file in
3089 *.exe)
3090 if test ! -f "$file"; then
3091 func_stripname '' '.exe' "$file"
3092 file=$func_stripname_result
3093 stripped_ext=".exe"
3094 fi
3095 ;;
3096 esac
3097
3098 # Do a test to see if this is really a libtool program.
3099 case $host in
3100 *cygwin* | *mingw*)
3101 if func_ltwrapper_executable_p "$file"; then
3102 func_ltwrapper_scriptname "$file"
3103 wrapper=$func_ltwrapper_scriptname_result
3104 else
3105 func_stripname '' '.exe' "$file"
3106 wrapper=$func_stripname_result
3107 fi
3108 ;;
3109 *)
3110 wrapper=$file
3111 ;;
3112 esac
3113 if func_ltwrapper_script_p "$wrapper"; then
3114 notinst_deplibs=
3115 relink_command=
3116
3117 func_source "$wrapper"
3118
3119 # Check the variables that should have been set.
3120 test -z "$generated_by_libtool_version" && \
3121 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
3122
3123 finalize=yes
3124 for lib in $notinst_deplibs; do
3125 # Check to see that each library is installed.
3126 libdir=
3127 if test -f "$lib"; then
3128 func_source "$lib"
3129 fi
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
3131 if test -n "$libdir" && test ! -f "$libfile"; then
3132 func_warning "\`$lib' has not been installed in \`$libdir'"
3133 finalize=no
3134 fi
3135 done
3136
3137 relink_command=
3138 func_source "$wrapper"
3139
3140 outputname=
3141 if test "$fast_install" = no && test -n "$relink_command"; then
3142 $opt_dry_run || {
3143 if test "$finalize" = yes; then
3144 tmpdir=`func_mktempdir`
3145 func_basename "$file$stripped_ext"
3146 file="$func_basename_result"
3147 outputname="$tmpdir/$file"
3148 # Replace the output file specification.
3149 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
3150
3151 $opt_silent || {
3152 func_quote_for_expand "$relink_command"
3153 eval "func_echo $func_quote_for_expand_result"
3154 }
3155 if eval "$relink_command"; then :
3156 else
3157 func_error "error: relink \`$file' with the above command before installing it"
3158 $opt_dry_run || ${RM}r "$tmpdir"
3159 continue
3160 fi
3161 file="$outputname"
3162 else
3163 func_warning "cannot relink \`$file'"
3164 fi
3165 }
3166 else
3167 # Install the binary that we compiled earlier.
3168 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
3169 fi
3170 fi
3171
3172 # remove .exe since cygwin /usr/bin/install will append another
3173 # one anyway
3174 case $install_prog,$host in
3175 */usr/bin/install*,*cygwin*)
3176 case $file:$destfile in
3177 *.exe:*.exe)
3178 # this is ok
3179 ;;
3180 *.exe:*)
3181 destfile=$destfile.exe
3182 ;;
3183 *:*.exe)
3184 func_stripname '' '.exe' "$destfile"
3185 destfile=$func_stripname_result
3186 ;;
3187 esac
3188 ;;
3189 esac
3190 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
3191 $opt_dry_run || if test -n "$outputname"; then
3192 ${RM}r "$tmpdir"
3193 fi
3194 ;;
3195 esac
3196 done
3197
3198 for file in $staticlibs; do
3199 func_basename "$file"
3200 name="$func_basename_result"
3201
3202 # Set up the ranlib parameters.
3203 oldlib="$destdir/$name"
3204 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3205 tool_oldlib=$func_to_tool_file_result
3206
3207 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3208
3209 if test -n "$stripme" && test -n "$old_striplib"; then
3210 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3211 fi
3212
3213 # Do each command in the postinstall commands.
3214 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
3215 done
3216
3217 test -n "$future_libdirs" && \
3218 func_warning "remember to run \`$progname --finish$future_libdirs'"
3219
3220 if test -n "$current_libdirs"; then
3221 # Maybe just do a dry run.
3222 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
3224 else
3225 exit $EXIT_SUCCESS
3226 fi
3227 }
3228
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
3230
3231
3232 # func_generate_dlsyms outputname originator pic_p
3233 # Extract symbols from dlprefiles and create ${outputname}S.o with
3234 # a dlpreopen symbol table.
3235 func_generate_dlsyms ()
3236 {
3237 $opt_debug
3238 my_outputname="$1"
3239 my_originator="$2"
3240 my_pic_p="${3-no}"
3241 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
3242 my_dlsyms=
3243
3244 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3245 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3246 my_dlsyms="${my_outputname}S.c"
3247 else
3248 func_error "not configured to extract global symbols from dlpreopened files"
3249 fi
3250 fi
3251
3252 if test -n "$my_dlsyms"; then
3253 case $my_dlsyms in
3254 "") ;;
3255 *.c)
3256 # Discover the nlist of each of the dlfiles.
3257 nlist="$output_objdir/${my_outputname}.nm"
3258
3259 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
3260
3261 # Parse the name list into a source file.
3262 func_verbose "creating $output_objdir/$my_dlsyms"
3263
3264 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
3265 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
3266 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
3267
3268 #ifdef __cplusplus
3269 extern \"C\" {
3270 #endif
3271
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3273 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3274 #endif
3275
3276 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3279 relocations are performed -- see ld's documentation on pseudo-relocs. */
3280 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
3282 /* This system does not cope well with relocations in const data. */
3283 # define LT_DLSYM_CONST
3284 #else
3285 # define LT_DLSYM_CONST const
3286 #endif
3287
3288 /* External symbol declarations for the compiler. */\
3289 "
3290
3291 if test "$dlself" = yes; then
3292 func_verbose "generating symbol list for \`$output'"
3293
3294 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
3295
3296 # Add our own program objects to the symbol list.
3297 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3298 for progfile in $progfiles; do
3299 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3301 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3302 done
3303
3304 if test -n "$exclude_expsyms"; then
3305 $opt_dry_run || {
3306 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3307 eval '$MV "$nlist"T "$nlist"'
3308 }
3309 fi
3310
3311 if test -n "$export_symbols_regex"; then
3312 $opt_dry_run || {
3313 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3314 eval '$MV "$nlist"T "$nlist"'
3315 }
3316 fi
3317
3318 # Prepare the list of exported symbols
3319 if test -z "$export_symbols"; then
3320 export_symbols="$output_objdir/$outputname.exp"
3321 $opt_dry_run || {
3322 $RM $export_symbols
3323 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3324 case $host in
3325 *cygwin* | *mingw* | *cegcc* )
3326 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3327 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
3328 ;;
3329 esac
3330 }
3331 else
3332 $opt_dry_run || {
3333 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
3334 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
3335 eval '$MV "$nlist"T "$nlist"'
3336 case $host in
3337 *cygwin* | *mingw* | *cegcc* )
3338 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3339 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
3340 ;;
3341 esac
3342 }
3343 fi
3344 fi
3345
3346 for dlprefile in $dlprefiles; do
3347 func_verbose "extracting global C symbols from \`$dlprefile'"
3348 func_basename "$dlprefile"
3349 name="$func_basename_result"
3350 case $host in
3351 *cygwin* | *mingw* | *cegcc* )
3352 # if an import library, we need to obtain dlname
3353 if func_win32_import_lib_p "$dlprefile"; then
3354 func_tr_sh "$dlprefile"
3355 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
3357 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3358 # Use subshell, to avoid clobbering current variable values
3359 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
3361 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
3363 else
3364 # no lafile. user explicitly requested -dlpreopen <import library>.
3365 $sharedlib_from_linklib_cmd "$dlprefile"
3366 dlprefile_dlbasename=$sharedlib_from_linklib_result
3367 fi
3368 fi
3369 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
3371 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3372 else
3373 func_warning "Could not compute DLL name from $name"
3374 eval '$ECHO ": $name " >> "$nlist"'
3375 fi
3376 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3377 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3378 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3379 }
3380 else # not an import lib
3381 $opt_dry_run || {
3382 eval '$ECHO ": $name " >> "$nlist"'
3383 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3384 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3385 }
3386 fi
3387 ;;
3388 *)
3389 $opt_dry_run || {
3390 eval '$ECHO ": $name " >> "$nlist"'
3391 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3392 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3393 }
3394 ;;
3395 esac
3396 done
3397
3398 $opt_dry_run || {
3399 # Make sure we have at least an empty file.
3400 test -f "$nlist" || : > "$nlist"
3401
3402 if test -n "$exclude_expsyms"; then
3403 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3404 $MV "$nlist"T "$nlist"
3405 fi
3406
3407 # Try sorting and uniquifying the output.
3408 if $GREP -v "^: " < "$nlist" |
3409 if sort -k 3 </dev/null >/dev/null 2>&1; then
3410 sort -k 3
3411 else
3412 sort +2
3413 fi |
3414 uniq > "$nlist"S; then
3415 :
3416 else
3417 $GREP -v "^: " < "$nlist" > "$nlist"S
3418 fi
3419
3420 if test -f "$nlist"S; then
3421 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
3422 else
3423 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
3424 fi
3425
3426 echo >> "$output_objdir/$my_dlsyms" "\
3427
3428 /* The mapping between symbol names and symbols. */
3429 typedef struct {
3430 const char *name;
3431 void *address;
3432 } lt_dlsymlist;
3433 extern LT_DLSYM_CONST lt_dlsymlist
3434 lt_${my_prefix}_LTX_preloaded_symbols[];
3435 LT_DLSYM_CONST lt_dlsymlist
3436 lt_${my_prefix}_LTX_preloaded_symbols[] =
3437 {\
3438 { \"$my_originator\", (void *) 0 },"
3439
3440 case $need_lib_prefix in
3441 no)
3442 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
3443 ;;
3444 *)
3445 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
3446 ;;
3447 esac
3448 echo >> "$output_objdir/$my_dlsyms" "\
3449 {0, (void *) 0}
3450 };
3451
3452 /* This works around a problem in FreeBSD linker */
3453 #ifdef FREEBSD_WORKAROUND
3454 static const void *lt_preloaded_setup() {
3455 return lt_${my_prefix}_LTX_preloaded_symbols;
3456 }
3457 #endif
3458
3459 #ifdef __cplusplus
3460 }
3461 #endif\
3462 "
3463 } # !$opt_dry_run
3464
3465 pic_flag_for_symtable=
3466 case "$compile_command " in
3467 *" -static "*) ;;
3468 *)
3469 case $host in
3470 # compiling the symbol table file with pic_flag works around
3471 # a FreeBSD bug that causes programs to crash when -lm is
3472 # linked before any other PIC object. But we must not use
3473 # pic_flag when linking with -static. The problem exists in
3474 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3475 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3476 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3477 *-*-hpux*)
3478 pic_flag_for_symtable=" $pic_flag" ;;
3479 *)
3480 if test "X$my_pic_p" != Xno; then
3481 pic_flag_for_symtable=" $pic_flag"
3482 fi
3483 ;;
3484 esac
3485 ;;
3486 esac
3487 symtab_cflags=
3488 for arg in $LTCFLAGS; do
3489 case $arg in
3490 -pie | -fpie | -fPIE) ;;
3491 *) func_append symtab_cflags " $arg" ;;
3492 esac
3493 done
3494
3495 # Now compile the dynamic symbol file.
3496 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
3497
3498 # Clean up the generated files.
3499 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
3500
3501 # Transform the symbol file into the correct name.
3502 symfileobj="$output_objdir/${my_outputname}S.$objext"
3503 case $host in
3504 *cygwin* | *mingw* | *cegcc* )
3505 if test -f "$output_objdir/$my_outputname.def"; then
3506 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3507 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3508 else
3509 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3510 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3511 fi
3512 ;;
3513 *)
3514 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3515 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3516 ;;
3517 esac
3518 ;;
3519 *)
3520 func_fatal_error "unknown suffix for \`$my_dlsyms'"
3521 ;;
3522 esac
3523 else
3524 # We keep going just in case the user didn't refer to
3525 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3526 # really was required.
3527
3528 # Nullify the symbol file.
3529 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3530 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
3531 fi
3532 }
3533
3534 # func_win32_libid arg
3535 # return the library type of file 'arg'
3536 #
3537 # Need a lot of goo to handle *both* DLLs and import libs
3538 # Has to be a shell function in order to 'eat' the argument
3539 # that is supplied when $file_magic_command is called.
3540 # Despite the name, also deal with 64 bit binaries.
3541 func_win32_libid ()
3542 {
3543 $opt_debug
3544 win32_libid_type="unknown"
3545 win32_fileres=`file -L $1 2>/dev/null`
3546 case $win32_fileres in
3547 *ar\ archive\ import\ library*) # definitely import
3548 win32_libid_type="x86 archive import"
3549 ;;
3550 *ar\ archive*) # could be an import, or static
3551 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
3552 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
3553 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3556 $SED -n -e '
3557 1,100{
3558 / I /{
3559 s,.*,import,
3560 p
3561 q
3562 }
3563 }'`
3564 case $win32_nmres in
3565 import*) win32_libid_type="x86 archive import";;
3566 *) win32_libid_type="x86 archive static";;
3567 esac
3568 fi
3569 ;;
3570 *DLL*)
3571 win32_libid_type="x86 DLL"
3572 ;;
3573 *executable*) # but shell scripts are "executable" too...
3574 case $win32_fileres in
3575 *MS\ Windows\ PE\ Intel*)
3576 win32_libid_type="x86 DLL"
3577 ;;
3578 esac
3579 ;;
3580 esac
3581 $ECHO "$win32_libid_type"
3582 }
3583
3584 # func_cygming_dll_for_implib ARG
3585 #
3586 # Platform-specific function to extract the
3587 # name of the DLL associated with the specified
3588 # import library ARG.
3589 # Invoked by eval'ing the libtool variable
3590 # $sharedlib_from_linklib_cmd
3591 # Result is available in the variable
3592 # $sharedlib_from_linklib_result
3593 func_cygming_dll_for_implib ()
3594 {
3595 $opt_debug
3596 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3597 }
3598
3599 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3600 #
3601 # The is the core of a fallback implementation of a
3602 # platform-specific function to extract the name of the
3603 # DLL associated with the specified import library LIBNAME.
3604 #
3605 # SECTION_NAME is either .idata$6 or .idata$7, depending
3606 # on the platform and compiler that created the implib.
3607 #
3608 # Echos the name of the DLL associated with the
3609 # specified import library.
3610 func_cygming_dll_for_implib_fallback_core ()
3611 {
3612 $opt_debug
3613 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3614 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3615 $SED '/^Contents of section '"$match_literal"':/{
3616 # Place marker at beginning of archive member dllname section
3617 s/.*/====MARK====/
3618 p
3619 d
3620 }
3621 # These lines can sometimes be longer than 43 characters, but
3622 # are always uninteresting
3623 /:[ ]*file format pe[i]\{,1\}-/d
3624 /^In archive [^:]*:/d
3625 # Ensure marker is printed
3626 /^====MARK====/p
3627 # Remove all lines with less than 43 characters
3628 /^.\{43\}/!d
3629 # From remaining lines, remove first 43 characters
3630 s/^.\{43\}//' |
3631 $SED -n '
3632 # Join marker and all lines until next marker into a single line
3633 /^====MARK====/ b para
3634 H
3635 $ b para
3636 b
3637 :para
3638 x
3639 s/\n//g
3640 # Remove the marker
3641 s/^====MARK====//
3642 # Remove trailing dots and whitespace
3643 s/[\. \t]*$//
3644 # Print
3645 /./p' |
3646 # we now have a list, one entry per line, of the stringified
3647 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
3650 # a '.' (that is, objdump's representation of an unprintable
3651 # character.) This should work for all archives with less than
3652 # 0x302f exports -- but will fail for DLLs whose name actually
3653 # begins with a literal '.' or a single character followed by
3654 # a '.'.
3655 #
3656 # Of those that remain, print the first one.
3657 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 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)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
3682 }
3683
3684 # func_cygming_dll_for_implib_fallback ARG
3685 # Platform-specific function to extract the
3686 # name of the DLL associated with the specified
3687 # import library ARG.
3688 #
3689 # This fallback implementation is for use when $DLLTOOL
3690 # does not support the --identify-strict option.
3691 # Invoked by eval'ing the libtool variable
3692 # $sharedlib_from_linklib_cmd
3693 # Result is available in the variable
3694 # $sharedlib_from_linklib_result
3695 func_cygming_dll_for_implib_fallback ()
3696 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
3699 # binutils import library
3700 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
3702 # ms-generated import library
3703 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3704 else
3705 # unknown
3706 sharedlib_from_linklib_result=""
3707 fi
3708 }
3709
3710
3711 # func_extract_an_archive dir oldlib
3712 func_extract_an_archive ()
3713 {
3714 $opt_debug
3715 f_ex_an_ar_dir="$1"; shift
3716 f_ex_an_ar_oldlib="$1"
3717 if test "$lock_old_archive_extraction" = yes; then
3718 lockfile=$f_ex_an_ar_oldlib.lock
3719 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3720 func_echo "Waiting for $lockfile to be removed"
3721 sleep 2
3722 done
3723 fi
3724 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3725 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
3727 $opt_dry_run || rm -f "$lockfile"
3728 fi
3729 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
3730 :
3731 else
3732 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
3733 fi
3734 }
3735
3736
3737 # func_extract_archives gentop oldlib ...
3738 func_extract_archives ()
3739 {
3740 $opt_debug
3741 my_gentop="$1"; shift
3742 my_oldlibs=${1+"$@"}
3743 my_oldobjs=""
3744 my_xlib=""
3745 my_xabs=""
3746 my_xdir=""
3747
3748 for my_xlib in $my_oldlibs; do
3749 # Extract the objects.
3750 case $my_xlib in
3751 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
3752 *) my_xabs=`pwd`"/$my_xlib" ;;
3753 esac
3754 func_basename "$my_xlib"
3755 my_xlib="$func_basename_result"
3756 my_xlib_u=$my_xlib
3757 while :; do
3758 case " $extracted_archives " in
3759 *" $my_xlib_u "*)
3760 func_arith $extracted_serial + 1
3761 extracted_serial=$func_arith_result
3762 my_xlib_u=lt$extracted_serial-$my_xlib ;;
3763 *) break ;;
3764 esac
3765 done
3766 extracted_archives="$extracted_archives $my_xlib_u"
3767 my_xdir="$my_gentop/$my_xlib_u"
3768
3769 func_mkdir_p "$my_xdir"
3770
3771 case $host in
3772 *-darwin*)
3773 func_verbose "Extracting $my_xabs"
3774 # Do not bother doing anything if just a dry run
3775 $opt_dry_run || {
3776 darwin_orig_dir=`pwd`
3777 cd $my_xdir || exit $?
3778 darwin_archive=$my_xabs
3779 darwin_curdir=`pwd`
3780 darwin_base_archive=`basename "$darwin_archive"`
3781 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
3782 if test -n "$darwin_arches"; then
3783 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
3784 darwin_arch=
3785 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
3786 for darwin_arch in $darwin_arches ; do
3787 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3788 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3789 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3790 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
3791 cd "$darwin_curdir"
3792 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
3793 done # $darwin_arches
3794 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
3795 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
3796 darwin_file=
3797 darwin_files=
3798 for darwin_file in $darwin_filelist; do
3799 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
3800 $LIPO -create -output "$darwin_file" $darwin_files
3801 done # $darwin_filelist
3802 $RM -rf unfat-$$
3803 cd "$darwin_orig_dir"
3804 else
3805 cd $darwin_orig_dir
3806 func_extract_an_archive "$my_xdir" "$my_xabs"
3807 fi # $darwin_arches
3808 } # !$opt_dry_run
3809 ;;
3810 *)
3811 func_extract_an_archive "$my_xdir" "$my_xabs"
3812 ;;
3813 esac
3814 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
3815 done
3816
3817 func_extract_archives_result="$my_oldobjs"
3818 }
3819
3820
3821 # func_emit_wrapper [arg=no]
3822 #
3823 # Emit a libtool wrapper script on stdout.
3824 # Don't directly open a file because we may want to
3825 # incorporate the script contents within a cygwin/mingw
3826 # wrapper executable. Must ONLY be called from within
3827 # func_mode_link because it depends on a number of variables
3828 # set therein.
3829 #
3830 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
3831 # variable will take. If 'yes', then the emitted script
3832 # will assume that the directory in which it is stored is
3833 # the $objdir directory. This is a cygwin/mingw-specific
3834 # behavior.
3835 func_emit_wrapper ()
3836 {
3837 func_emit_wrapper_arg1=${1-no}
3838
3839 $ECHO "\
3840 #! $SHELL
3841
3842 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3844 #
3845 # The $output program cannot be directly executed until all the libtool
3846 # libraries that it depends on are installed.
3847 #
3848 # This wrapper script should never be moved out of the build directory.
3849 # If it is, it will not operate correctly.
3850
3851 # Sed substitution that helps us do robust quoting. It backslashifies
3852 # metacharacters that are still active within double-quoted strings.
3853 sed_quote_subst='$sed_quote_subst'
3854
3855 # Be Bourne compatible
3856 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3857 emulate sh
3858 NULLCMD=:
3859 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3860 # is contrary to our usage. Disable this feature.
3861 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3862 setopt NO_GLOB_SUBST
3863 else
3864 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3865 fi
3866 BIN_SH=xpg4; export BIN_SH # for Tru64
3867 DUALCASE=1; export DUALCASE # for MKS sh
3868
3869 # The HP-UX ksh and POSIX shell print the target directory to stdout
3870 # if CDPATH is set.
3871 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3872
3873 relink_command=\"$relink_command\"
3874
3875 # This environment variable determines our operation mode.
3876 if test \"\$libtool_install_magic\" = \"$magic\"; then
3877 # install mode needs the following variables:
3878 generated_by_libtool_version='$macro_version'
3879 notinst_deplibs='$notinst_deplibs'
3880 else
3881 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3882 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3883 file=\"\$0\""
3884
3885 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3886 $ECHO "\
3887
3888 # A function that is used when there is no print builtin or printf.
3889 func_fallback_echo ()
3890 {
3891 eval 'cat <<_LTECHO_EOF
3892 \$1
3893 _LTECHO_EOF'
3894 }
3895 ECHO=\"$qECHO\"
3896 fi
3897
3898 # Very basic option parsing. These options are (a) specific to
3899 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
3901 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
3903 # this pattern).
3904 #
3905 # There are only two supported options: --lt-debug and
3906 # --lt-dump-script. There is, deliberately, no --lt-help.
3907 #
3908 # The first argument to this parsing function should be the
3909 # script's $0 value, followed by "$@".
3910 lt_option_debug=
3911 func_parse_lt_options ()
3912 {
3913 lt_script_arg0=\$0
3914 shift
3915 for lt_opt
3916 do
3917 case \"\$lt_opt\" in
3918 --lt-debug) lt_option_debug=1 ;;
3919 --lt-dump-script)
3920 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3921 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3922 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3923 cat \"\$lt_dump_D/\$lt_dump_F\"
3924 exit 0
3925 ;;
3926 --lt-*)
3927 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3928 exit 1
3929 ;;
3930 esac
3931 done
3932
3933 # Print the debug banner immediately:
3934 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3936 fi
3937 }
3938
3939 # Used when --lt-debug. Prints its arguments to stdout
3940 # (redirection is the responsibility of the caller)
3941 func_lt_dump_args ()
3942 {
3943 lt_dump_args_N=1;
3944 for lt_arg
3945 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3947 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3948 done
3949 }
3950
3951 # Core function for launching the target application
3952 func_exec_program_core ()
3953 {
3954 "
3955 case $host in
3956 # Backslashes separate directories on plain windows
3957 *-*-mingw | *-*-os2* | *-cegcc*)
3958 $ECHO "\
3959 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3961 func_lt_dump_args \${1+\"\$@\"} 1>&2
3962 fi
3963 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3964 "
3965 ;;
3966
3967 *)
3968 $ECHO "\
3969 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3971 func_lt_dump_args \${1+\"\$@\"} 1>&2
3972 fi
3973 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3974 "
3975 ;;
3976 esac
3977 $ECHO "\
3978 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3979 exit 1
3980 }
3981
3982 # A function to encapsulate launching the target application
3983 # Strips options in the --lt-* namespace from \$@ and
3984 # launches target application with the remaining arguments.
3985 func_exec_program ()
3986 {
3987 case \" \$* \" in
3988 *\\ --lt-*)
3989 for lt_wr_arg
3990 do
3991 case \$lt_wr_arg in
3992 --lt-*) ;;
3993 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3994 esac
3995 shift
3996 done ;;
3997 esac
3998 func_exec_program_core \${1+\"\$@\"}
3999 }
4000
4001 # Parse options
4002 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4003
4004 # Find the directory that this script lives in.
4005 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4006 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4007
4008 # Follow symbolic links until we get to the real thisdir.
4009 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4010 while test -n \"\$file\"; do
4011 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4012
4013 # If there was a directory component, then change thisdir.
4014 if test \"x\$destdir\" != \"x\$file\"; then
4015 case \"\$destdir\" in
4016 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4017 *) thisdir=\"\$thisdir/\$destdir\" ;;
4018 esac
4019 fi
4020
4021 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4022 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4023 done
4024
4025 # Usually 'no', except on cygwin/mingw when embedded into
4026 # the cwrapper.
4027 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4028 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4029 # special case for '.'
4030 if test \"\$thisdir\" = \".\"; then
4031 thisdir=\`pwd\`
4032 fi
4033 # remove .libs from thisdir
4034 case \"\$thisdir\" in
4035 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4036 $objdir ) thisdir=. ;;
4037 esac
4038 fi
4039
4040 # Try to get the absolute directory name.
4041 absdir=\`cd \"\$thisdir\" && pwd\`
4042 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4043 "
4044
4045 if test "$fast_install" = yes; then
4046 $ECHO "\
4047 program=lt-'$outputname'$exeext
4048 progdir=\"\$thisdir/$objdir\"
4049
4050 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4052 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4053
4054 file=\"\$\$-\$program\"
4055
4056 if test ! -d \"\$progdir\"; then
4057 $MKDIR \"\$progdir\"
4058 else
4059 $RM \"\$progdir/\$file\"
4060 fi"
4061
4062 $ECHO "\
4063
4064 # relink executable if necessary
4065 if test -n \"\$relink_command\"; then
4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4067 else
4068 $ECHO \"\$relink_command_output\" >&2
4069 $RM \"\$progdir/\$file\"
4070 exit 1
4071 fi
4072 fi
4073
4074 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4075 { $RM \"\$progdir/\$program\";
4076 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4077 $RM \"\$progdir/\$file\"
4078 fi"
4079 else
4080 $ECHO "\
4081 program='$outputname'
4082 progdir=\"\$thisdir/$objdir\"
4083 "
4084 fi
4085
4086 $ECHO "\
4087
4088 if test -f \"\$progdir/\$program\"; then"
4089
4090 # fixup the dll searchpath if we need to.
4091 #
4092 # Fix the DLL searchpath if we need to. Do this before prepending
4093 # to shlibpath, because on Windows, both are PATH and uninstalled
4094 # libraries must come first.
4095 if test -n "$dllsearchpath"; then
4096 $ECHO "\
4097 # Add the dll search path components to the executable PATH
4098 PATH=$dllsearchpath:\$PATH
4099 "
4100 fi
4101
4102 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4104 $ECHO "\
4105 # Add our own library path to $shlibpath_var
4106 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4107
4108 # Some systems cannot cope with colon-terminated $shlibpath_var
4109 # The second colon is a workaround for a bug in BeOS R4 sed
4110 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4111
4112 export $shlibpath_var
4113 "
4114 fi
4115
4116 $ECHO "\
4117 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4118 # Run the actual program with our arguments.
4119 func_exec_program \${1+\"\$@\"}
4120 fi
4121 else
4122 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4124 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4125 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4126 exit 1
4127 fi
4128 fi\
4129 "
4130 }
4131
4132
4133 # func_emit_cwrapperexe_src
4134 # emit the source code for a wrapper executable on stdout
4135 # Must ONLY be called from within func_mode_link because
4136 # it depends on a number of variable set therein.
4137 func_emit_cwrapperexe_src ()
4138 {
4139 cat <<EOF
4140
4141 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4142 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
4143
4144 The $output program cannot be directly executed until all the libtool
4145 libraries that it depends on are installed.
4146
4147 This wrapper executable should never be moved out of the build directory.
4148 If it is, it will not operate correctly.
4149 */
4150 EOF
4151 cat <<"EOF"
4152 #ifdef _MSC_VER
4153 # define _CRT_SECURE_NO_DEPRECATE 1
4154 #endif
4155 #include <stdio.h>
4156 #include <stdlib.h>
4157 #ifdef _MSC_VER
4158 # include <direct.h>
4159 # include <process.h>
4160 # include <io.h>
4161 #else
4162 # include <unistd.h>
4163 # include <stdint.h>
4164 # ifdef __CYGWIN__
4165 # include <io.h>
4166 # endif
4167 #endif
4168 #include <malloc.h>
4169 #include <stdarg.h>
4170 #include <assert.h>
4171 #include <string.h>
4172 #include <ctype.h>
4173 #include <errno.h>
4174 #include <fcntl.h>
4175 #include <sys/stat.h>
4176
4177 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
4179 # ifdef __STRICT_ANSI__
4180 int _putenv (const char *);
4181 # endif
4182 #elif defined(__CYGWIN__)
4183 # ifdef __STRICT_ANSI__
4184 char *realpath (const char *, char *);
4185 int putenv (char *);
4186 int setenv (const char *, const char *, int);
4187 # endif
4188 /* #elif defined (other platforms) ... */
4189 #endif
4190
4191 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
4193 # define setmode _setmode
4194 # define stat _stat
4195 # define chmod _chmod
4196 # define getcwd _getcwd
4197 # define putenv _putenv
4198 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
4204 # define setmode _setmode
4205 # define stat _stat
4206 # define chmod _chmod
4207 # define getcwd _getcwd
4208 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
4210 # define HAVE_SETENV
4211 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
4213 #endif
4214
4215 #if defined(PATH_MAX)
4216 # define LT_PATHMAX PATH_MAX
4217 #elif defined(MAXPATHLEN)
4218 # define LT_PATHMAX MAXPATHLEN
4219 #else
4220 # define LT_PATHMAX 1024
4221 #endif
4222
4223 #ifndef S_IXOTH
4224 # define S_IXOTH 0
4225 #endif
4226 #ifndef S_IXGRP
4227 # define S_IXGRP 0
4228 #endif
4229
4230 /* path handling portability macros */
4231 #ifndef DIR_SEPARATOR
4232 # define DIR_SEPARATOR '/'
4233 # define PATH_SEPARATOR ':'
4234 #endif
4235
4236 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4237 defined (__OS2__)
4238 # define HAVE_DOS_BASED_FILE_SYSTEM
4239 # define FOPEN_WB "wb"
4240 # ifndef DIR_SEPARATOR_2
4241 # define DIR_SEPARATOR_2 '\\'
4242 # endif
4243 # ifndef PATH_SEPARATOR_2
4244 # define PATH_SEPARATOR_2 ';'
4245 # endif
4246 #endif
4247
4248 #ifndef DIR_SEPARATOR_2
4249 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4250 #else /* DIR_SEPARATOR_2 */
4251 # define IS_DIR_SEPARATOR(ch) \
4252 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4253 #endif /* DIR_SEPARATOR_2 */
4254
4255 #ifndef PATH_SEPARATOR_2
4256 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4257 #else /* PATH_SEPARATOR_2 */
4258 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4259 #endif /* PATH_SEPARATOR_2 */
4260
4261 #ifndef FOPEN_WB
4262 # define FOPEN_WB "w"
4263 #endif
4264 #ifndef _O_BINARY
4265 # define _O_BINARY 0
4266 #endif
4267
4268 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4269 #define XFREE(stale) do { \
4270 if (stale) { free ((void *) stale); stale = 0; } \
4271 } while (0)
4272
4273 #if defined(LT_DEBUGWRAPPER)
4274 static int lt_debug = 1;
4275 #else
4276 static int lt_debug = 0;
4277 #endif
4278
4279 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
4280
4281 void *xmalloc (size_t num);
4282 char *xstrdup (const char *string);
4283 const char *base_name (const char *name);
4284 char *find_executable (const char *wrapper);
4285 char *chase_symlinks (const char *pathspec);
4286 int make_executable (const char *path);
4287 int check_executable (const char *path);
4288 char *strendzap (char *str, const char *pat);
4289 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4290 void lt_fatal (const char *file, int line, const char *message, ...);
4291 static const char *nonnull (const char *s);
4292 static const char *nonempty (const char *s);
4293 void lt_setenv (const char *name, const char *value);
4294 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
4295 void lt_update_exe_path (const char *name, const char *value);
4296 void lt_update_lib_path (const char *name, const char *value);
4297 char **prepare_spawn (char **argv);
4298 void lt_dump_script (FILE *f);
4299 EOF
4300
4301 cat <<EOF
4302 volatile const char * MAGIC_EXE = "$magic_exe";
4303 const char * LIB_PATH_VARNAME = "$shlibpath_var";
4304 EOF
4305
4306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4307 func_to_host_path "$temp_rpath"
4308 cat <<EOF
4309 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
4310 EOF
4311 else
4312 cat <<"EOF"
4313 const char * LIB_PATH_VALUE = "";
4314 EOF
4315 fi
4316
4317 if test -n "$dllsearchpath"; then
4318 func_to_host_path "$dllsearchpath:"
4319 cat <<EOF
4320 const char * EXE_PATH_VARNAME = "PATH";
4321 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
4322 EOF
4323 else
4324 cat <<"EOF"
4325 const char * EXE_PATH_VARNAME = "";
4326 const char * EXE_PATH_VALUE = "";
4327 EOF
4328 fi
4329
4330 if test "$fast_install" = yes; then
4331 cat <<EOF
4332 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
4333 EOF
4334 else
4335 cat <<EOF
4336 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
4337 EOF
4338 fi
4339
4340
4341 cat <<"EOF"
4342
4343 #define LTWRAPPER_OPTION_PREFIX "--lt-"
4344
4345 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
4346 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
4347 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
4348
4349 int
4350 main (int argc, char *argv[])
4351 {
4352 char **newargz;
4353 int newargc;
4354 char *tmp_pathspec;
4355 char *actual_cwrapper_path;
4356 char *actual_cwrapper_name;
4357 char *target_name;
4358 char *lt_argv_zero;
4359 intptr_t rval = 127;
4360
4361 int i;
4362
4363 program_name = (char *) xstrdup (base_name (argv[0]));
4364 newargz = XMALLOC (char *, argc + 1);
4365
4366 /* very simple arg parsing; don't want to rely on getopt
4367 * also, copy all non cwrapper options to newargz, except
4368 * argz[0], which is handled differently
4369 */
4370 newargc=0;
4371 for (i = 1; i < argc; i++)
4372 {
4373 if (strcmp (argv[i], dumpscript_opt) == 0)
4374 {
4375 EOF
4376 case "$host" in
4377 *mingw* | *cygwin* )
4378 # make stdout use "unix" line endings
4379 echo " setmode(1,_O_BINARY);"
4380 ;;
4381 esac
4382
4383 cat <<"EOF"
4384 lt_dump_script (stdout);
4385 return 0;
4386 }
4387 if (strcmp (argv[i], debug_opt) == 0)
4388 {
4389 lt_debug = 1;
4390 continue;
4391 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4393 {
4394 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4395 namespace, but it is not one of the ones we know about and
4396 have already dealt with, above (inluding dump-script), then
4397 report an error. Otherwise, targets might begin to believe
4398 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4399 namespace. The first time any user complains about this, we'll
4400 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4401 or a configure.ac-settable value.
4402 */
4403 lt_fatal (__FILE__, __LINE__,
4404 "unrecognized %s option: '%s'",
4405 ltwrapper_option_prefix, argv[i]);
4406 }
4407 /* otherwise ... */
4408 newargz[++newargc] = xstrdup (argv[i]);
4409 }
4410 newargz[++newargc] = NULL;
4411
4412 EOF
4413 cat <<EOF
4414 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4416 EOF
4417 cat <<"EOF"
4418 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4419 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4420
4421 tmp_pathspec = find_executable (argv[0]);
4422 if (tmp_pathspec == NULL)
4423 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4424 lt_debugprintf (__FILE__, __LINE__,
4425 "(main) found exe (before symlink chase) at: %s\n",
4426 tmp_pathspec);
4427
4428 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
4429 lt_debugprintf (__FILE__, __LINE__,
4430 "(main) found exe (after symlink chase) at: %s\n",
4431 actual_cwrapper_path);
4432 XFREE (tmp_pathspec);
4433
4434 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
4435 strendzap (actual_cwrapper_path, actual_cwrapper_name);
4436
4437 /* wrapper name transforms */
4438 strendzap (actual_cwrapper_name, ".exe");
4439 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
4440 XFREE (actual_cwrapper_name);
4441 actual_cwrapper_name = tmp_pathspec;
4442 tmp_pathspec = 0;
4443
4444 /* target_name transforms -- use actual target program name; might have lt- prefix */
4445 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
4446 strendzap (target_name, ".exe");
4447 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
4448 XFREE (target_name);
4449 target_name = tmp_pathspec;
4450 tmp_pathspec = 0;
4451
4452 lt_debugprintf (__FILE__, __LINE__,
4453 "(main) libtool target name: %s\n",
4454 target_name);
4455 EOF
4456
4457 cat <<EOF
4458 newargz[0] =
4459 XMALLOC (char, (strlen (actual_cwrapper_path) +
4460 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
4461 strcpy (newargz[0], actual_cwrapper_path);
4462 strcat (newargz[0], "$objdir");
4463 strcat (newargz[0], "/");
4464 EOF
4465
4466 cat <<"EOF"
4467 /* stop here, and copy so we don't have to do this twice */
4468 tmp_pathspec = xstrdup (newargz[0]);
4469
4470 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
4471 strcat (newargz[0], actual_cwrapper_name);
4472
4473 /* DO want the lt- prefix here if it exists, so use target_name */
4474 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
4475 XFREE (tmp_pathspec);
4476 tmp_pathspec = NULL;
4477 EOF
4478
4479 case $host_os in
4480 mingw*)
4481 cat <<"EOF"
4482 {
4483 char* p;
4484 while ((p = strchr (newargz[0], '\\')) != NULL)
4485 {
4486 *p = '/';
4487 }
4488 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
4489 {
4490 *p = '/';
4491 }
4492 }
4493 EOF
4494 ;;
4495 esac
4496
4497 cat <<"EOF"
4498 XFREE (target_name);
4499 XFREE (actual_cwrapper_path);
4500 XFREE (actual_cwrapper_name);
4501
4502 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
4503 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4504 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4505 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4506 because on Windows, both *_VARNAMEs are PATH but uninstalled
4507 libraries must come first. */
4508 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4509 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4510
4511 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4512 nonnull (lt_argv_zero));
4513 for (i = 0; i < newargc; i++)
4514 {
4515 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4516 i, nonnull (newargz[i]));
4517 }
4518
4519 EOF
4520
4521 case $host_os in
4522 mingw*)
4523 cat <<"EOF"
4524 /* execv doesn't actually work on mingw as expected on unix */
4525 newargz = prepare_spawn (newargz);
4526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
4527 if (rval == -1)
4528 {
4529 /* failed to start process */
4530 lt_debugprintf (__FILE__, __LINE__,
4531 "(main) failed to launch target \"%s\": %s\n",
4532 lt_argv_zero, nonnull (strerror (errno)));
4533 return 127;
4534 }
4535 return rval;
4536 EOF
4537 ;;
4538 *)
4539 cat <<"EOF"
4540 execv (lt_argv_zero, newargz);
4541 return rval; /* =127, but avoids unused variable warning */
4542 EOF
4543 ;;
4544 esac
4545
4546 cat <<"EOF"
4547 }
4548
4549 void *
4550 xmalloc (size_t num)
4551 {
4552 void *p = (void *) malloc (num);
4553 if (!p)
4554 lt_fatal (__FILE__, __LINE__, "memory exhausted");
4555
4556 return p;
4557 }
4558
4559 char *
4560 xstrdup (const char *string)
4561 {
4562 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
4563 string) : NULL;
4564 }
4565
4566 const char *
4567 base_name (const char *name)
4568 {
4569 const char *base;
4570
4571 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4572 /* Skip over the disk name in MSDOS pathnames. */
4573 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
4574 name += 2;
4575 #endif
4576
4577 for (base = name; *name; name++)
4578 if (IS_DIR_SEPARATOR (*name))
4579 base = name + 1;
4580 return base;
4581 }
4582
4583 int
4584 check_executable (const char *path)
4585 {
4586 struct stat st;
4587
4588 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4589 nonempty (path));
4590 if ((!path) || (!*path))
4591 return 0;
4592
4593 if ((stat (path, &st) >= 0)
4594 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
4595 return 1;
4596 else
4597 return 0;
4598 }
4599
4600 int
4601 make_executable (const char *path)
4602 {
4603 int rval = 0;
4604 struct stat st;
4605
4606 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4607 nonempty (path));
4608 if ((!path) || (!*path))
4609 return 0;
4610
4611 if (stat (path, &st) >= 0)
4612 {
4613 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
4614 }
4615 return rval;
4616 }
4617
4618 /* Searches for the full path of the wrapper. Returns
4619 newly allocated full path name if found, NULL otherwise
4620 Does not chase symlinks, even on platforms that support them.
4621 */
4622 char *
4623 find_executable (const char *wrapper)
4624 {
4625 int has_slash = 0;
4626 const char *p;
4627 const char *p_next;
4628 /* static buffer for getcwd */
4629 char tmp[LT_PATHMAX + 1];
4630 int tmp_len;
4631 char *concat_name;
4632
4633 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4634 nonempty (wrapper));
4635
4636 if ((wrapper == NULL) || (*wrapper == '\0'))
4637 return NULL;
4638
4639 /* Absolute path? */
4640 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4641 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
4642 {
4643 concat_name = xstrdup (wrapper);
4644 if (check_executable (concat_name))
4645 return concat_name;
4646 XFREE (concat_name);
4647 }
4648 else
4649 {
4650 #endif
4651 if (IS_DIR_SEPARATOR (wrapper[0]))
4652 {
4653 concat_name = xstrdup (wrapper);
4654 if (check_executable (concat_name))
4655 return concat_name;
4656 XFREE (concat_name);
4657 }
4658 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4659 }
4660 #endif
4661
4662 for (p = wrapper; *p; p++)
4663 if (*p == '/')
4664 {
4665 has_slash = 1;
4666 break;
4667 }
4668 if (!has_slash)
4669 {
4670 /* no slashes; search PATH */
4671 const char *path = getenv ("PATH");
4672 if (path != NULL)
4673 {
4674 for (p = path; *p; p = p_next)
4675 {
4676 const char *q;
4677 size_t p_len;
4678 for (q = p; *q; q++)
4679 if (IS_PATH_SEPARATOR (*q))
4680 break;
4681 p_len = q - p;
4682 p_next = (*q == '\0' ? q : q + 1);
4683 if (p_len == 0)
4684 {
4685 /* empty path: current directory */
4686 if (getcwd (tmp, LT_PATHMAX) == NULL)
4687 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4688 nonnull (strerror (errno)));
4689 tmp_len = strlen (tmp);
4690 concat_name =
4691 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4692 memcpy (concat_name, tmp, tmp_len);
4693 concat_name[tmp_len] = '/';
4694 strcpy (concat_name + tmp_len + 1, wrapper);
4695 }
4696 else
4697 {
4698 concat_name =
4699 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
4700 memcpy (concat_name, p, p_len);
4701 concat_name[p_len] = '/';
4702 strcpy (concat_name + p_len + 1, wrapper);
4703 }
4704 if (check_executable (concat_name))
4705 return concat_name;
4706 XFREE (concat_name);
4707 }
4708 }
4709 /* not found in PATH; assume curdir */
4710 }
4711 /* Relative path | not found in path: prepend cwd */
4712 if (getcwd (tmp, LT_PATHMAX) == NULL)
4713 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4714 nonnull (strerror (errno)));
4715 tmp_len = strlen (tmp);
4716 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4717 memcpy (concat_name, tmp, tmp_len);
4718 concat_name[tmp_len] = '/';
4719 strcpy (concat_name + tmp_len + 1, wrapper);
4720
4721 if (check_executable (concat_name))
4722 return concat_name;
4723 XFREE (concat_name);
4724 return NULL;
4725 }
4726
4727 char *
4728 chase_symlinks (const char *pathspec)
4729 {
4730 #ifndef S_ISLNK
4731 return xstrdup (pathspec);
4732 #else
4733 char buf[LT_PATHMAX];
4734 struct stat s;
4735 char *tmp_pathspec = xstrdup (pathspec);
4736 char *p;
4737 int has_symlinks = 0;
4738 while (strlen (tmp_pathspec) && !has_symlinks)
4739 {
4740 lt_debugprintf (__FILE__, __LINE__,
4741 "checking path component for symlinks: %s\n",
4742 tmp_pathspec);
4743 if (lstat (tmp_pathspec, &s) == 0)
4744 {
4745 if (S_ISLNK (s.st_mode) != 0)
4746 {
4747 has_symlinks = 1;
4748 break;
4749 }
4750
4751 /* search backwards for last DIR_SEPARATOR */
4752 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
4753 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4754 p--;
4755 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4756 {
4757 /* no more DIR_SEPARATORS left */
4758 break;
4759 }
4760 *p = '\0';
4761 }
4762 else
4763 {
4764 lt_fatal (__FILE__, __LINE__,
4765 "error accessing file \"%s\": %s",
4766 tmp_pathspec, nonnull (strerror (errno)));
4767 }
4768 }
4769 XFREE (tmp_pathspec);
4770
4771 if (!has_symlinks)
4772 {
4773 return xstrdup (pathspec);
4774 }
4775
4776 tmp_pathspec = realpath (pathspec, buf);
4777 if (tmp_pathspec == 0)
4778 {
4779 lt_fatal (__FILE__, __LINE__,
4780 "could not follow symlinks for %s", pathspec);
4781 }
4782 return xstrdup (tmp_pathspec);
4783 #endif
4784 }
4785
4786 char *
4787 strendzap (char *str, const char *pat)
4788 {
4789 size_t len, patlen;
4790
4791 assert (str != NULL);
4792 assert (pat != NULL);
4793
4794 len = strlen (str);
4795 patlen = strlen (pat);
4796
4797 if (patlen <= len)
4798 {
4799 str += len - patlen;
4800 if (strcmp (str, pat) == 0)
4801 *str = '\0';
4802 }
4803 return str;
4804 }
4805
4806 void
4807 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4808 {
4809 va_list args;
4810 if (lt_debug)
4811 {
4812 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4813 va_start (args, fmt);
4814 (void) vfprintf (stderr, fmt, args);
4815 va_end (args);
4816 }
4817 }
4818
4819 static void
4820 lt_error_core (int exit_status, const char *file,
4821 int line, const char *mode,
4822 const char *message, va_list ap)
4823 {
4824 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
4825 vfprintf (stderr, message, ap);
4826 fprintf (stderr, ".\n");
4827
4828 if (exit_status >= 0)
4829 exit (exit_status);
4830 }
4831
4832 void
4833 lt_fatal (const char *file, int line, const char *message, ...)
4834 {
4835 va_list ap;
4836 va_start (ap, message);
4837 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
4838 va_end (ap);
4839 }
4840
4841 static const char *
4842 nonnull (const char *s)
4843 {
4844 return s ? s : "(null)";
4845 }
4846
4847 static const char *
4848 nonempty (const char *s)
4849 {
4850 return (s && !*s) ? "(empty)" : nonnull (s);
4851 }
4852
4853 void
4854 lt_setenv (const char *name, const char *value)
4855 {
4856 lt_debugprintf (__FILE__, __LINE__,
4857 "(lt_setenv) setting '%s' to '%s'\n",
4858 nonnull (name), nonnull (value));
4859 {
4860 #ifdef HAVE_SETENV
4861 /* always make a copy, for consistency with !HAVE_SETENV */
4862 char *str = xstrdup (value);
4863 setenv (name, str, 1);
4864 #else
4865 int len = strlen (name) + 1 + strlen (value) + 1;
4866 char *str = XMALLOC (char, len);
4867 sprintf (str, "%s=%s", name, value);
4868 if (putenv (str) != EXIT_SUCCESS)
4869 {
4870 XFREE (str);
4871 }
4872 #endif
4873 }
4874 }
4875
4876 char *
4877 lt_extend_str (const char *orig_value, const char *add, int to_end)
4878 {
4879 char *new_value;
4880 if (orig_value && *orig_value)
4881 {
4882 int orig_value_len = strlen (orig_value);
4883 int add_len = strlen (add);
4884 new_value = XMALLOC (char, add_len + orig_value_len + 1);
4885 if (to_end)
4886 {
4887 strcpy (new_value, orig_value);
4888 strcpy (new_value + orig_value_len, add);
4889 }
4890 else
4891 {
4892 strcpy (new_value, add);
4893 strcpy (new_value + add_len, orig_value);
4894 }
4895 }
4896 else
4897 {
4898 new_value = xstrdup (add);
4899 }
4900 return new_value;
4901 }
4902
4903 void
4904 lt_update_exe_path (const char *name, const char *value)
4905 {
4906 lt_debugprintf (__FILE__, __LINE__,
4907 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4908 nonnull (name), nonnull (value));
4909
4910 if (name && *name && value && *value)
4911 {
4912 char *new_value = lt_extend_str (getenv (name), value, 0);
4913 /* some systems can't cope with a ':'-terminated path #' */
4914 int len = strlen (new_value);
4915 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4916 {
4917 new_value[len-1] = '\0';
4918 }
4919 lt_setenv (name, new_value);
4920 XFREE (new_value);
4921 }
4922 }
4923
4924 void
4925 lt_update_lib_path (const char *name, const char *value)
4926 {
4927 lt_debugprintf (__FILE__, __LINE__,
4928 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4929 nonnull (name), nonnull (value));
4930
4931 if (name && *name && value && *value)
4932 {
4933 char *new_value = lt_extend_str (getenv (name), value, 0);
4934 lt_setenv (name, new_value);
4935 XFREE (new_value);
4936 }
4937 }
4938
4939 EOF
4940 case $host_os in
4941 mingw*)
4942 cat <<"EOF"
4943
4944 /* Prepares an argument vector before calling spawn().
4945 Note that spawn() does not by itself call the command interpreter
4946 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4947 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4948 GetVersionEx(&v);
4949 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4950 }) ? "cmd.exe" : "command.com").
4951 Instead it simply concatenates the arguments, separated by ' ', and calls
4952 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4953 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4954 special way:
4955 - Space and tab are interpreted as delimiters. They are not treated as
4956 delimiters if they are surrounded by double quotes: "...".
4957 - Unescaped double quotes are removed from the input. Their only effect is
4958 that within double quotes, space and tab are treated like normal
4959 characters.
4960 - Backslashes not followed by double quotes are not special.
4961 - But 2*n+1 backslashes followed by a double quote become
4962 n backslashes followed by a double quote (n >= 0):
4963 \" -> "
4964 \\\" -> \"
4965 \\\\\" -> \\"
4966 */
4967 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4968 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4969 char **
4970 prepare_spawn (char **argv)
4971 {
4972 size_t argc;
4973 char **new_argv;
4974 size_t i;
4975
4976 /* Count number of arguments. */
4977 for (argc = 0; argv[argc] != NULL; argc++)
4978 ;
4979
4980 /* Allocate new argument vector. */
4981 new_argv = XMALLOC (char *, argc + 1);
4982
4983 /* Put quoted arguments into the new argument vector. */
4984 for (i = 0; i < argc; i++)
4985 {
4986 const char *string = argv[i];
4987
4988 if (string[0] == '\0')
4989 new_argv[i] = xstrdup ("\"\"");
4990 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4991 {
4992 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4993 size_t length;
4994 unsigned int backslashes;
4995 const char *s;
4996 char *quoted_string;
4997 char *p;
4998
4999 length = 0;
5000 backslashes = 0;
5001 if (quote_around)
5002 length++;
5003 for (s = string; *s != '\0'; s++)
5004 {
5005 char c = *s;
5006 if (c == '"')
5007 length += backslashes + 1;
5008 length++;
5009 if (c == '\\')
5010 backslashes++;
5011 else
5012 backslashes = 0;
5013 }
5014 if (quote_around)
5015 length += backslashes + 1;
5016
5017 quoted_string = XMALLOC (char, length + 1);
5018
5019 p = quoted_string;
5020 backslashes = 0;
5021 if (quote_around)
5022 *p++ = '"';
5023 for (s = string; *s != '\0'; s++)
5024 {
5025 char c = *s;
5026 if (c == '"')
5027 {
5028 unsigned int j;
5029 for (j = backslashes + 1; j > 0; j--)
5030 *p++ = '\\';
5031 }
5032 *p++ = c;
5033 if (c == '\\')
5034 backslashes++;
5035 else
5036 backslashes = 0;
5037 }
5038 if (quote_around)
5039 {
5040 unsigned int j;
5041 for (j = backslashes; j > 0; j--)
5042 *p++ = '\\';
5043 *p++ = '"';
5044 }
5045 *p = '\0';
5046
5047 new_argv[i] = quoted_string;
5048 }
5049 else
5050 new_argv[i] = (char *) string;
5051 }
5052 new_argv[argc] = NULL;
5053
5054 return new_argv;
5055 }
5056 EOF
5057 ;;
5058 esac
5059
5060 cat <<"EOF"
5061 void lt_dump_script (FILE* f)
5062 {
5063 EOF
5064 func_emit_wrapper yes |
5065 $SED -n -e '
5066 s/^\(.\{79\}\)\(..*\)/\1\
5067 \2/
5068 h
5069 s/\([\\"]\)/\\\1/g
5070 s/$/\\n/
5071 s/\([^\n]*\).*/ fputs ("\1", f);/p
5072 g
5073 D'
5074 cat <<"EOF"
5075 }
5076 EOF
5077 }
5078 # end: func_emit_cwrapperexe_src
5079
5080 # func_win32_import_lib_p ARG
5081 # True if ARG is an import lib, as indicated by $file_magic_cmd
5082 func_win32_import_lib_p ()
5083 {
5084 $opt_debug
5085 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5086 *import*) : ;;
5087 *) false ;;
5088 esac
5089 }
5090
5091 # func_mode_link arg...
5092 func_mode_link ()
5093 {
5094 $opt_debug
5095 case $host in
5096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5097 # It is impossible to link a dll without this setting, and
5098 # we shouldn't force the makefile maintainer to figure out
5099 # which system we are compiling for in order to pass an extra
5100 # flag for every libtool invocation.
5101 # allow_undefined=no
5102
5103 # FIXME: Unfortunately, there are problems with the above when trying
5104 # to make a dll which has undefined symbols, in which case not
5105 # even a static library is built. For now, we need to specify
5106 # -no-undefined on the libtool link line when we can be certain
5107 # that all symbols are satisfied, otherwise we get a static library.
5108 allow_undefined=yes
5109 ;;
5110 *)
5111 allow_undefined=yes
5112 ;;
5113 esac
5114 libtool_args=$nonopt
5115 base_compile="$nonopt $@"
5116 compile_command=$nonopt
5117 finalize_command=$nonopt
5118
5119 compile_rpath=
5120 finalize_rpath=
5121 compile_shlibpath=
5122 finalize_shlibpath=
5123 convenience=
5124 old_convenience=
5125 deplibs=
5126 old_deplibs=
5127 compiler_flags=
5128 linker_flags=
5129 dllsearchpath=
5130 lib_search_path=`pwd`
5131 inst_prefix_dir=
5132 new_inherited_linker_flags=
5133
5134 avoid_version=no
5135 bindir=
5136 dlfiles=
5137 dlprefiles=
5138 dlself=no
5139 export_dynamic=no
5140 export_symbols=
5141 export_symbols_regex=
5142 generated=
5143 libobjs=
5144 ltlibs=
5145 module=no
5146 no_install=no
5147 objs=
5148 non_pic_objects=
5149 precious_files_regex=
5150 prefer_static_libs=no
5151 preload=no
5152 prev=
5153 prevarg=
5154 release=
5155 rpath=
5156 xrpath=
5157 perm_rpath=
5158 temp_rpath=
5159 thread_safe=no
5160 vinfo=
5161 vinfo_number=no
5162 weak_libs=
5163 single_module="${wl}-single_module"
5164 func_infer_tag $base_compile
5165
5166 # We need to know -static, to get the right output filenames.
5167 for arg
5168 do
5169 case $arg in
5170 -shared)
5171 test "$build_libtool_libs" != yes && \
5172 func_fatal_configuration "can not build a shared library"
5173 build_old_libs=no
5174 break
5175 ;;
5176 -all-static | -static | -static-libtool-libs)
5177 case $arg in
5178 -all-static)
5179 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
5180 func_warning "complete static linking is impossible in this configuration"
5181 fi
5182 if test -n "$link_static_flag"; then
5183 dlopen_self=$dlopen_self_static
5184 fi
5185 prefer_static_libs=yes
5186 ;;
5187 -static)
5188 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5189 dlopen_self=$dlopen_self_static
5190 fi
5191 prefer_static_libs=built
5192 ;;
5193 -static-libtool-libs)
5194 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5195 dlopen_self=$dlopen_self_static
5196 fi
5197 prefer_static_libs=yes
5198 ;;
5199 esac
5200 build_libtool_libs=no
5201 build_old_libs=yes
5202 break
5203 ;;
5204 esac
5205 done
5206
5207 # See if our shared archives depend on static archives.
5208 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
5209
5210 # Go through the arguments, transforming them on the way.
5211 while test "$#" -gt 0; do
5212 arg="$1"
5213 shift
5214 func_quote_for_eval "$arg"
5215 qarg=$func_quote_for_eval_unquoted_result
5216 func_append libtool_args " $func_quote_for_eval_result"
5217
5218 # If the previous option needs an argument, assign it.
5219 if test -n "$prev"; then
5220 case $prev in
5221 output)
5222 func_append compile_command " @OUTPUT@"
5223 func_append finalize_command " @OUTPUT@"
5224 ;;
5225 esac
5226
5227 case $prev in
5228 bindir)
5229 bindir="$arg"
5230 prev=
5231 continue
5232 ;;
5233 dlfiles|dlprefiles)
5234 if test "$preload" = no; then
5235 # Add the symbol object into the linking commands.
5236 func_append compile_command " @SYMFILE@"
5237 func_append finalize_command " @SYMFILE@"
5238 preload=yes
5239 fi
5240 case $arg in
5241 *.la | *.lo) ;; # We handle these cases below.
5242 force)
5243 if test "$dlself" = no; then
5244 dlself=needless
5245 export_dynamic=yes
5246 fi
5247 prev=
5248 continue
5249 ;;
5250 self)
5251 if test "$prev" = dlprefiles; then
5252 dlself=yes
5253 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
5254 dlself=yes
5255 else
5256 dlself=needless
5257 export_dynamic=yes
5258 fi
5259 prev=
5260 continue
5261 ;;
5262 *)
5263 if test "$prev" = dlfiles; then
5264 func_append dlfiles " $arg"
5265 else
5266 func_append dlprefiles " $arg"
5267 fi
5268 prev=
5269 continue
5270 ;;
5271 esac
5272 ;;
5273 expsyms)
5274 export_symbols="$arg"
5275 test -f "$arg" \
5276 || func_fatal_error "symbol file \`$arg' does not exist"
5277 prev=
5278 continue
5279 ;;
5280 expsyms_regex)
5281 export_symbols_regex="$arg"
5282 prev=
5283 continue
5284 ;;
5285 framework)
5286 case $host in
5287 *-*-darwin*)
5288 case "$deplibs " in
5289 *" $qarg.ltframework "*) ;;
5290 *) func_append deplibs " $qarg.ltframework" # this is fixed later
5291 ;;
5292 esac
5293 ;;
5294 esac
5295 prev=
5296 continue
5297 ;;
5298 inst_prefix)
5299 inst_prefix_dir="$arg"
5300 prev=
5301 continue
5302 ;;
5303 objectlist)
5304 if test -f "$arg"; then
5305 save_arg=$arg
5306 moreargs=
5307 for fil in `cat "$save_arg"`
5308 do
5309 # func_append moreargs " $fil"
5310 arg=$fil
5311 # A libtool-controlled object.
5312
5313 # Check to see that this really is a libtool object.
5314 if func_lalib_unsafe_p "$arg"; then
5315 pic_object=
5316 non_pic_object=
5317
5318 # Read the .lo file
5319 func_source "$arg"
5320
5321 if test -z "$pic_object" ||
5322 test -z "$non_pic_object" ||
5323 test "$pic_object" = none &&
5324 test "$non_pic_object" = none; then
5325 func_fatal_error "cannot find name of object for \`$arg'"
5326 fi
5327
5328 # Extract subdirectory from the argument.
5329 func_dirname "$arg" "/" ""
5330 xdir="$func_dirname_result"
5331
5332 if test "$pic_object" != none; then
5333 # Prepend the subdirectory the object is found in.
5334 pic_object="$xdir$pic_object"
5335
5336 if test "$prev" = dlfiles; then
5337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5338 func_append dlfiles " $pic_object"
5339 prev=
5340 continue
5341 else
5342 # If libtool objects are unsupported, then we need to preload.
5343 prev=dlprefiles
5344 fi
5345 fi
5346
5347 # CHECK ME: I think I busted this. -Ossama
5348 if test "$prev" = dlprefiles; then
5349 # Preload the old-style object.
5350 func_append dlprefiles " $pic_object"
5351 prev=
5352 fi
5353
5354 # A PIC object.
5355 func_append libobjs " $pic_object"
5356 arg="$pic_object"
5357 fi
5358
5359 # Non-PIC object.
5360 if test "$non_pic_object" != none; then
5361 # Prepend the subdirectory the object is found in.
5362 non_pic_object="$xdir$non_pic_object"
5363
5364 # A standard non-PIC object
5365 func_append non_pic_objects " $non_pic_object"
5366 if test -z "$pic_object" || test "$pic_object" = none ; then
5367 arg="$non_pic_object"
5368 fi
5369 else
5370 # If the PIC object exists, use it instead.
5371 # $xdir was prepended to $pic_object above.
5372 non_pic_object="$pic_object"
5373 func_append non_pic_objects " $non_pic_object"
5374 fi
5375 else
5376 # Only an error if not doing a dry-run.
5377 if $opt_dry_run; then
5378 # Extract subdirectory from the argument.
5379 func_dirname "$arg" "/" ""
5380 xdir="$func_dirname_result"
5381
5382 func_lo2o "$arg"
5383 pic_object=$xdir$objdir/$func_lo2o_result
5384 non_pic_object=$xdir$func_lo2o_result
5385 func_append libobjs " $pic_object"
5386 func_append non_pic_objects " $non_pic_object"
5387 else
5388 func_fatal_error "\`$arg' is not a valid libtool object"
5389 fi
5390 fi
5391 done
5392 else
5393 func_fatal_error "link input file \`$arg' does not exist"
5394 fi
5395 arg=$save_arg
5396 prev=
5397 continue
5398 ;;
5399 precious_regex)
5400 precious_files_regex="$arg"
5401 prev=
5402 continue
5403 ;;
5404 release)
5405 release="-$arg"
5406 prev=
5407 continue
5408 ;;
5409 rpath | xrpath)
5410 # We need an absolute path.
5411 case $arg in
5412 [\\/]* | [A-Za-z]:[\\/]*) ;;
5413 *)
5414 func_fatal_error "only absolute run-paths are allowed"
5415 ;;
5416 esac
5417 if test "$prev" = rpath; then
5418 case "$rpath " in
5419 *" $arg "*) ;;
5420 *) func_append rpath " $arg" ;;
5421 esac
5422 else
5423 case "$xrpath " in
5424 *" $arg "*) ;;
5425 *) func_append xrpath " $arg" ;;
5426 esac
5427 fi
5428 prev=
5429 continue
5430 ;;
5431 shrext)
5432 shrext_cmds="$arg"
5433 prev=
5434 continue
5435 ;;
5436 weak)
5437 func_append weak_libs " $arg"
5438 prev=
5439 continue
5440 ;;
5441 xcclinker)
5442 func_append linker_flags " $qarg"
5443 func_append compiler_flags " $qarg"
5444 prev=
5445 func_append compile_command " $qarg"
5446 func_append finalize_command " $qarg"
5447 continue
5448 ;;
5449 xcompiler)
5450 func_append compiler_flags " $qarg"
5451 prev=
5452 func_append compile_command " $qarg"
5453 func_append finalize_command " $qarg"
5454 continue
5455 ;;
5456 xlinker)
5457 func_append linker_flags " $qarg"
5458 func_append compiler_flags " $wl$qarg"
5459 prev=
5460 func_append compile_command " $wl$qarg"
5461 func_append finalize_command " $wl$qarg"
5462 continue
5463 ;;
5464 *)
5465 eval "$prev=\"\$arg\""
5466 prev=
5467 continue
5468 ;;
5469 esac
5470 fi # test -n "$prev"
5471
5472 prevarg="$arg"
5473
5474 case $arg in
5475 -all-static)
5476 if test -n "$link_static_flag"; then
5477 # See comment for -static flag below, for more details.
5478 func_append compile_command " $link_static_flag"
5479 func_append finalize_command " $link_static_flag"
5480 fi
5481 continue
5482 ;;
5483
5484 -allow-undefined)
5485 # FIXME: remove this flag sometime in the future.
5486 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
5487 ;;
5488
5489 -avoid-version)
5490 avoid_version=yes
5491 continue
5492 ;;
5493
5494 -bindir)
5495 prev=bindir
5496 continue
5497 ;;
5498
5499 -dlopen)
5500 prev=dlfiles
5501 continue
5502 ;;
5503
5504 -dlpreopen)
5505 prev=dlprefiles
5506 continue
5507 ;;
5508
5509 -export-dynamic)
5510 export_dynamic=yes
5511 continue
5512 ;;
5513
5514 -export-symbols | -export-symbols-regex)
5515 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
5516 func_fatal_error "more than one -exported-symbols argument is not allowed"
5517 fi
5518 if test "X$arg" = "X-export-symbols"; then
5519 prev=expsyms
5520 else
5521 prev=expsyms_regex
5522 fi
5523 continue
5524 ;;
5525
5526 -framework)
5527 prev=framework
5528 continue
5529 ;;
5530
5531 -inst-prefix-dir)
5532 prev=inst_prefix
5533 continue
5534 ;;
5535
5536 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
5537 # so, if we see these flags be careful not to treat them like -L
5538 -L[A-Z][A-Z]*:*)
5539 case $with_gcc/$host in
5540 no/*-*-irix* | /*-*-irix*)
5541 func_append compile_command " $arg"
5542 func_append finalize_command " $arg"
5543 ;;
5544 esac
5545 continue
5546 ;;
5547
5548 -L*)
5549 func_stripname "-L" '' "$arg"
5550 if test -z "$func_stripname_result"; then
5551 if test "$#" -gt 0; then
5552 func_fatal_error "require no space between \`-L' and \`$1'"
5553 else
5554 func_fatal_error "need path for \`-L' option"
5555 fi
5556 fi
5557 func_resolve_sysroot "$func_stripname_result"
5558 dir=$func_resolve_sysroot_result
5559 # We need an absolute path.
5560 case $dir in
5561 [\\/]* | [A-Za-z]:[\\/]*) ;;
5562 *)
5563 absdir=`cd "$dir" && pwd`
5564 test -z "$absdir" && \
5565 func_fatal_error "cannot determine absolute directory name of \`$dir'"
5566 dir="$absdir"
5567 ;;
5568 esac
5569 case "$deplibs " in
5570 *" -L$dir "* | *" $arg "*)
5571 # Will only happen for absolute or sysroot arguments
5572 ;;
5573 *)
5574 # Preserve sysroot, but never include relative directories
5575 case $dir in
5576 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5577 *) func_append deplibs " -L$dir" ;;
5578 esac
5579 func_append lib_search_path " $dir"
5580 ;;
5581 esac
5582 case $host in
5583 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5584 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
5585 case :$dllsearchpath: in
5586 *":$dir:"*) ;;
5587 ::) dllsearchpath=$dir;;
5588 *) func_append dllsearchpath ":$dir";;
5589 esac
5590 case :$dllsearchpath: in
5591 *":$testbindir:"*) ;;
5592 ::) dllsearchpath=$testbindir;;
5593 *) func_append dllsearchpath ":$testbindir";;
5594 esac
5595 ;;
5596 esac
5597 continue
5598 ;;
5599
5600 -l*)
5601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
5602 case $host in
5603 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
5604 # These systems don't actually have a C or math library (as such)
5605 continue
5606 ;;
5607 *-*-os2*)
5608 # These systems don't actually have a C library (as such)
5609 test "X$arg" = "X-lc" && continue
5610 ;;
5611 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5612 # Do not include libc due to us having libc/libc_r.
5613 test "X$arg" = "X-lc" && continue
5614 ;;
5615 *-*-rhapsody* | *-*-darwin1.[012])
5616 # Rhapsody C and math libraries are in the System framework
5617 func_append deplibs " System.ltframework"
5618 continue
5619 ;;
5620 *-*-sco3.2v5* | *-*-sco5v6*)
5621 # Causes problems with __ctype
5622 test "X$arg" = "X-lc" && continue
5623 ;;
5624 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
5625 # Compiler inserts libc in the correct place for threads to work
5626 test "X$arg" = "X-lc" && continue
5627 ;;
5628 esac
5629 elif test "X$arg" = "X-lc_r"; then
5630 case $host in
5631 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5632 # Do not include libc_r directly, use -pthread flag.
5633 continue
5634 ;;
5635 esac
5636 fi
5637 func_append deplibs " $arg"
5638 continue
5639 ;;
5640
5641 -module)
5642 module=yes
5643 continue
5644 ;;
5645
5646 # Tru64 UNIX uses -model [arg] to determine the layout of C++
5647 # classes, name mangling, and exception handling.
5648 # Darwin uses the -arch flag to determine output architecture.
5649 -model|-arch|-isysroot|--sysroot)
5650 func_append compiler_flags " $arg"
5651 func_append compile_command " $arg"
5652 func_append finalize_command " $arg"
5653 prev=xcompiler
5654 continue
5655 ;;
5656
5657 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5658 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5659 func_append compiler_flags " $arg"
5660 func_append compile_command " $arg"
5661 func_append finalize_command " $arg"
5662 case "$new_inherited_linker_flags " in
5663 *" $arg "*) ;;
5664 * ) func_append new_inherited_linker_flags " $arg" ;;
5665 esac
5666 continue
5667 ;;
5668
5669 -multi_module)
5670 single_module="${wl}-multi_module"
5671 continue
5672 ;;
5673
5674 -no-fast-install)
5675 fast_install=no
5676 continue
5677 ;;
5678
5679 -no-install)
5680 case $host in
5681 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
5682 # The PATH hackery in wrapper scripts is required on Windows
5683 # and Darwin in order for the loader to find any dlls it needs.
5684 func_warning "\`-no-install' is ignored for $host"
5685 func_warning "assuming \`-no-fast-install' instead"
5686 fast_install=no
5687 ;;
5688 *) no_install=yes ;;
5689 esac
5690 continue
5691 ;;
5692
5693 -no-undefined)
5694 allow_undefined=no
5695 continue
5696 ;;
5697
5698 -objectlist)
5699 prev=objectlist
5700 continue
5701 ;;
5702
5703 -o) prev=output ;;
5704
5705 -precious-files-regex)
5706 prev=precious_regex
5707 continue
5708 ;;
5709
5710 -release)
5711 prev=release
5712 continue
5713 ;;
5714
5715 -rpath)
5716 prev=rpath
5717 continue
5718 ;;
5719
5720 -R)
5721 prev=xrpath
5722 continue
5723 ;;
5724
5725 -R*)
5726 func_stripname '-R' '' "$arg"
5727 dir=$func_stripname_result
5728 # We need an absolute path.
5729 case $dir in
5730 [\\/]* | [A-Za-z]:[\\/]*) ;;
5731 =*)
5732 func_stripname '=' '' "$dir"
5733 dir=$lt_sysroot$func_stripname_result
5734 ;;
5735 *)
5736 func_fatal_error "only absolute run-paths are allowed"
5737 ;;
5738 esac
5739 case "$xrpath " in
5740 *" $dir "*) ;;
5741 *) func_append xrpath " $dir" ;;
5742 esac
5743 continue
5744 ;;
5745
5746 -shared)
5747 # The effects of -shared are defined in a previous loop.
5748 continue
5749 ;;
5750
5751 -shrext)
5752 prev=shrext
5753 continue
5754 ;;
5755
5756 -static | -static-libtool-libs)
5757 # The effects of -static are defined in a previous loop.
5758 # We used to do the same as -all-static on platforms that
5759 # didn't have a PIC flag, but the assumption that the effects
5760 # would be equivalent was wrong. It would break on at least
5761 # Digital Unix and AIX.
5762 continue
5763 ;;
5764
5765 -thread-safe)
5766 thread_safe=yes
5767 continue
5768 ;;
5769
5770 -version-info)
5771 prev=vinfo
5772 continue
5773 ;;
5774
5775 -version-number)
5776 prev=vinfo
5777 vinfo_number=yes
5778 continue
5779 ;;
5780
5781 -weak)
5782 prev=weak
5783 continue
5784 ;;
5785
5786 -Wc,*)
5787 func_stripname '-Wc,' '' "$arg"
5788 args=$func_stripname_result
5789 arg=
5790 save_ifs="$IFS"; IFS=','
5791 for flag in $args; do
5792 IFS="$save_ifs"
5793 func_quote_for_eval "$flag"
5794 func_append arg " $func_quote_for_eval_result"
5795 func_append compiler_flags " $func_quote_for_eval_result"
5796 done
5797 IFS="$save_ifs"
5798 func_stripname ' ' '' "$arg"
5799 arg=$func_stripname_result
5800 ;;
5801
5802 -Wl,*)
5803 func_stripname '-Wl,' '' "$arg"
5804 args=$func_stripname_result
5805 arg=
5806 save_ifs="$IFS"; IFS=','
5807 for flag in $args; do
5808 IFS="$save_ifs"
5809 func_quote_for_eval "$flag"
5810 func_append arg " $wl$func_quote_for_eval_result"
5811 func_append compiler_flags " $wl$func_quote_for_eval_result"
5812 func_append linker_flags " $func_quote_for_eval_result"
5813 done
5814 IFS="$save_ifs"
5815 func_stripname ' ' '' "$arg"
5816 arg=$func_stripname_result
5817 ;;
5818
5819 -Xcompiler)
5820 prev=xcompiler
5821 continue
5822 ;;
5823
5824 -Xlinker)
5825 prev=xlinker
5826 continue
5827 ;;
5828
5829 -XCClinker)
5830 prev=xcclinker
5831 continue
5832 ;;
5833
5834 # -msg_* for osf cc
5835 -msg_*)
5836 func_quote_for_eval "$arg"
5837 arg="$func_quote_for_eval_result"
5838 ;;
5839
5840 # Flags to be passed through unchanged, with rationale:
5841 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5842 # -r[0-9][0-9]* specify processor for the SGI compiler
5843 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5844 # +DA*, +DD* enable 64-bit mode for the HP compiler
5845 # -q* compiler args for the IBM compiler
5846 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5847 # -F/path path to uninstalled frameworks, gcc on darwin
5848 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5849 # @file GCC response files
5850 # -tp=* Portland pgcc target processor selection
5851 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
5853 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5854 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
5856 func_quote_for_eval "$arg"
5857 arg="$func_quote_for_eval_result"
5858 func_append compile_command " $arg"
5859 func_append finalize_command " $arg"
5860 func_append compiler_flags " $arg"
5861 continue
5862 ;;
5863
5864 # Some other compiler flag.
5865 -* | +*)
5866 func_quote_for_eval "$arg"
5867 arg="$func_quote_for_eval_result"
5868 ;;
5869
5870 *.$objext)
5871 # A standard object.
5872 func_append objs " $arg"
5873 ;;
5874
5875 *.lo)
5876 # A libtool-controlled object.
5877
5878 # Check to see that this really is a libtool object.
5879 if func_lalib_unsafe_p "$arg"; then
5880 pic_object=
5881 non_pic_object=
5882
5883 # Read the .lo file
5884 func_source "$arg"
5885
5886 if test -z "$pic_object" ||
5887 test -z "$non_pic_object" ||
5888 test "$pic_object" = none &&
5889 test "$non_pic_object" = none; then
5890 func_fatal_error "cannot find name of object for \`$arg'"
5891 fi
5892
5893 # Extract subdirectory from the argument.
5894 func_dirname "$arg" "/" ""
5895 xdir="$func_dirname_result"
5896
5897 if test "$pic_object" != none; then
5898 # Prepend the subdirectory the object is found in.
5899 pic_object="$xdir$pic_object"
5900
5901 if test "$prev" = dlfiles; then
5902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5903 func_append dlfiles " $pic_object"
5904 prev=
5905 continue
5906 else
5907 # If libtool objects are unsupported, then we need to preload.
5908 prev=dlprefiles
5909 fi
5910 fi
5911
5912 # CHECK ME: I think I busted this. -Ossama
5913 if test "$prev" = dlprefiles; then
5914 # Preload the old-style object.
5915 func_append dlprefiles " $pic_object"
5916 prev=
5917 fi
5918
5919 # A PIC object.
5920 func_append libobjs " $pic_object"
5921 arg="$pic_object"
5922 fi
5923
5924 # Non-PIC object.
5925 if test "$non_pic_object" != none; then
5926 # Prepend the subdirectory the object is found in.
5927 non_pic_object="$xdir$non_pic_object"
5928
5929 # A standard non-PIC object
5930 func_append non_pic_objects " $non_pic_object"
5931 if test -z "$pic_object" || test "$pic_object" = none ; then
5932 arg="$non_pic_object"
5933 fi
5934 else
5935 # If the PIC object exists, use it instead.
5936 # $xdir was prepended to $pic_object above.
5937 non_pic_object="$pic_object"
5938 func_append non_pic_objects " $non_pic_object"
5939 fi
5940 else
5941 # Only an error if not doing a dry-run.
5942 if $opt_dry_run; then
5943 # Extract subdirectory from the argument.
5944 func_dirname "$arg" "/" ""
5945 xdir="$func_dirname_result"
5946
5947 func_lo2o "$arg"
5948 pic_object=$xdir$objdir/$func_lo2o_result
5949 non_pic_object=$xdir$func_lo2o_result
5950 func_append libobjs " $pic_object"
5951 func_append non_pic_objects " $non_pic_object"
5952 else
5953 func_fatal_error "\`$arg' is not a valid libtool object"
5954 fi
5955 fi
5956 ;;
5957
5958 *.$libext)
5959 # An archive.
5960 func_append deplibs " $arg"
5961 func_append old_deplibs " $arg"
5962 continue
5963 ;;
5964
5965 *.la)
5966 # A libtool-controlled library.
5967
5968 func_resolve_sysroot "$arg"
5969 if test "$prev" = dlfiles; then
5970 # This library was specified with -dlopen.
5971 func_append dlfiles " $func_resolve_sysroot_result"
5972 prev=
5973 elif test "$prev" = dlprefiles; then
5974 # The library was specified with -dlpreopen.
5975 func_append dlprefiles " $func_resolve_sysroot_result"
5976 prev=
5977 else
5978 func_append deplibs " $func_resolve_sysroot_result"
5979 fi
5980 continue
5981 ;;
5982
5983 # Some other compiler argument.
5984 *)
5985 # Unknown arguments in both finalize_command and compile_command need
5986 # to be aesthetically quoted because they are evaled later.
5987 func_quote_for_eval "$arg"
5988 arg="$func_quote_for_eval_result"
5989 ;;
5990 esac # arg
5991
5992 # Now actually substitute the argument into the commands.
5993 if test -n "$arg"; then
5994 func_append compile_command " $arg"
5995 func_append finalize_command " $arg"
5996 fi
5997 done # argument parsing loop
5998
5999 test -n "$prev" && \
6000 func_fatal_help "the \`$prevarg' option requires an argument"
6001
6002 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
6003 eval arg=\"$export_dynamic_flag_spec\"
6004 func_append compile_command " $arg"
6005 func_append finalize_command " $arg"
6006 fi
6007
6008 oldlibs=
6009 # calculate the name of the file, without its directory
6010 func_basename "$output"
6011 outputname="$func_basename_result"
6012 libobjs_save="$libobjs"
6013
6014 if test -n "$shlibpath_var"; then
6015 # get the directories listed in $shlibpath_var
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
6017 else
6018 shlib_search_path=
6019 fi
6020 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
6021 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
6022
6023 func_dirname "$output" "/" ""
6024 output_objdir="$func_dirname_result$objdir"
6025 func_to_tool_file "$output_objdir/"
6026 tool_output_objdir=$func_to_tool_file_result
6027 # Create the object directory.
6028 func_mkdir_p "$output_objdir"
6029
6030 # Determine the type of output
6031 case $output in
6032 "")
6033 func_fatal_help "you must specify an output file"
6034 ;;
6035 *.$libext) linkmode=oldlib ;;
6036 *.lo | *.$objext) linkmode=obj ;;
6037 *.la) linkmode=lib ;;
6038 *) linkmode=prog ;; # Anything else should be a program.
6039 esac
6040
6041 specialdeplibs=
6042
6043 libs=
6044 # Find all interdependent deplibs by searching for libraries
6045 # that are linked more than once (e.g. -la -lb -la)
6046 for deplib in $deplibs; do
6047 if $opt_preserve_dup_deps ; then
6048 case "$libs " in
6049 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6050 esac
6051 fi
6052 func_append libs " $deplib"
6053 done
6054
6055 if test "$linkmode" = lib; then
6056 libs="$predeps $libs $compiler_lib_search_path $postdeps"
6057
6058 # Compute libraries that are listed more than once in $predeps
6059 # $postdeps and mark them as special (i.e., whose duplicates are
6060 # not to be eliminated).
6061 pre_post_deps=
6062 if $opt_duplicate_compiler_generated_deps; then
6063 for pre_post_dep in $predeps $postdeps; do
6064 case "$pre_post_deps " in
6065 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
6066 esac
6067 func_append pre_post_deps " $pre_post_dep"
6068 done
6069 fi
6070 pre_post_deps=
6071 fi
6072
6073 deplibs=
6074 newdependency_libs=
6075 newlib_search_path=
6076 need_relink=no # whether we're linking any uninstalled libtool libraries
6077 notinst_deplibs= # not-installed libtool libraries
6078 notinst_path= # paths that contain not-installed libtool libraries
6079
6080 case $linkmode in
6081 lib)
6082 passes="conv dlpreopen link"
6083 for file in $dlfiles $dlprefiles; do
6084 case $file in
6085 *.la) ;;
6086 *)
6087 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
6088 ;;
6089 esac
6090 done
6091 ;;
6092 prog)
6093 compile_deplibs=
6094 finalize_deplibs=
6095 alldeplibs=no
6096 newdlfiles=
6097 newdlprefiles=
6098 passes="conv scan dlopen dlpreopen link"
6099 ;;
6100 *) passes="conv"
6101 ;;
6102 esac
6103
6104 for pass in $passes; do
6105 # The preopen pass in lib mode reverses $deplibs; put it back here
6106 # so that -L comes before libs that need it for instance...
6107 if test "$linkmode,$pass" = "lib,link"; then
6108 ## FIXME: Find the place where the list is rebuilt in the wrong
6109 ## order, and fix it there properly
6110 tmp_deplibs=
6111 for deplib in $deplibs; do
6112 tmp_deplibs="$deplib $tmp_deplibs"
6113 done
6114 deplibs="$tmp_deplibs"
6115 fi
6116
6117 if test "$linkmode,$pass" = "lib,link" ||
6118 test "$linkmode,$pass" = "prog,scan"; then
6119 libs="$deplibs"
6120 deplibs=
6121 fi
6122 if test "$linkmode" = prog; then
6123 case $pass in
6124 dlopen) libs="$dlfiles" ;;
6125 dlpreopen) libs="$dlprefiles" ;;
6126 link)
6127 libs="$deplibs %DEPLIBS%"
6128 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6129 ;;
6130 esac
6131 fi
6132 if test "$linkmode,$pass" = "lib,dlpreopen"; then
6133 # Collect and forward deplibs of preopened libtool libs
6134 for lib in $dlprefiles; do
6135 # Ignore non-libtool-libs
6136 dependency_libs=
6137 func_resolve_sysroot "$lib"
6138 case $lib in
6139 *.la) func_source "$func_resolve_sysroot_result" ;;
6140 esac
6141
6142 # Collect preopened libtool deplibs, except any this library
6143 # has declared as weak libs
6144 for deplib in $dependency_libs; do
6145 func_basename "$deplib"
6146 deplib_base=$func_basename_result
6147 case " $weak_libs " in
6148 *" $deplib_base "*) ;;
6149 *) func_append deplibs " $deplib" ;;
6150 esac
6151 done
6152 done
6153 libs="$dlprefiles"
6154 fi
6155 if test "$pass" = dlopen; then
6156 # Collect dlpreopened libraries
6157 save_deplibs="$deplibs"
6158 deplibs=
6159 fi
6160
6161 for deplib in $libs; do
6162 lib=
6163 found=no
6164 case $deplib in
6165 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6166 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6167 if test "$linkmode,$pass" = "prog,link"; then
6168 compile_deplibs="$deplib $compile_deplibs"
6169 finalize_deplibs="$deplib $finalize_deplibs"
6170 else
6171 func_append compiler_flags " $deplib"
6172 if test "$linkmode" = lib ; then
6173 case "$new_inherited_linker_flags " in
6174 *" $deplib "*) ;;
6175 * ) func_append new_inherited_linker_flags " $deplib" ;;
6176 esac
6177 fi
6178 fi
6179 continue
6180 ;;
6181 -l*)
6182 if test "$linkmode" != lib && test "$linkmode" != prog; then
6183 func_warning "\`-l' is ignored for archives/objects"
6184 continue
6185 fi
6186 func_stripname '-l' '' "$deplib"
6187 name=$func_stripname_result
6188 if test "$linkmode" = lib; then
6189 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
6190 else
6191 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
6192 fi
6193 for searchdir in $searchdirs; do
6194 for search_ext in .la $std_shrext .so .a; do
6195 # Search the libtool library
6196 lib="$searchdir/lib${name}${search_ext}"
6197 if test -f "$lib"; then
6198 if test "$search_ext" = ".la"; then
6199 found=yes
6200 else
6201 found=no
6202 fi
6203 break 2
6204 fi
6205 done
6206 done
6207 if test "$found" != yes; then
6208 # deplib doesn't seem to be a libtool library
6209 if test "$linkmode,$pass" = "prog,link"; then
6210 compile_deplibs="$deplib $compile_deplibs"
6211 finalize_deplibs="$deplib $finalize_deplibs"
6212 else
6213 deplibs="$deplib $deplibs"
6214 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6215 fi
6216 continue
6217 else # deplib is a libtool library
6218 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
6219 # We need to do some special things here, and not later.
6220 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6221 case " $predeps $postdeps " in
6222 *" $deplib "*)
6223 if func_lalib_p "$lib"; then
6224 library_names=
6225 old_library=
6226 func_source "$lib"
6227 for l in $old_library $library_names; do
6228 ll="$l"
6229 done
6230 if test "X$ll" = "X$old_library" ; then # only static version available
6231 found=no
6232 func_dirname "$lib" "" "."
6233 ladir="$func_dirname_result"
6234 lib=$ladir/$old_library
6235 if test "$linkmode,$pass" = "prog,link"; then
6236 compile_deplibs="$deplib $compile_deplibs"
6237 finalize_deplibs="$deplib $finalize_deplibs"
6238 else
6239 deplibs="$deplib $deplibs"
6240 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6241 fi
6242 continue
6243 fi
6244 fi
6245 ;;
6246 *) ;;
6247 esac
6248 fi
6249 fi
6250 ;; # -l
6251 *.ltframework)
6252 if test "$linkmode,$pass" = "prog,link"; then
6253 compile_deplibs="$deplib $compile_deplibs"
6254 finalize_deplibs="$deplib $finalize_deplibs"
6255 else
6256 deplibs="$deplib $deplibs"
6257 if test "$linkmode" = lib ; then
6258 case "$new_inherited_linker_flags " in
6259 *" $deplib "*) ;;
6260 * ) func_append new_inherited_linker_flags " $deplib" ;;
6261 esac
6262 fi
6263 fi
6264 continue
6265 ;;
6266 -L*)
6267 case $linkmode in
6268 lib)
6269 deplibs="$deplib $deplibs"
6270 test "$pass" = conv && continue
6271 newdependency_libs="$deplib $newdependency_libs"
6272 func_stripname '-L' '' "$deplib"
6273 func_resolve_sysroot "$func_stripname_result"
6274 func_append newlib_search_path " $func_resolve_sysroot_result"
6275 ;;
6276 prog)
6277 if test "$pass" = conv; then
6278 deplibs="$deplib $deplibs"
6279 continue
6280 fi
6281 if test "$pass" = scan; then
6282 deplibs="$deplib $deplibs"
6283 else
6284 compile_deplibs="$deplib $compile_deplibs"
6285 finalize_deplibs="$deplib $finalize_deplibs"
6286 fi
6287 func_stripname '-L' '' "$deplib"
6288 func_resolve_sysroot "$func_stripname_result"
6289 func_append newlib_search_path " $func_resolve_sysroot_result"
6290 ;;
6291 *)
6292 func_warning "\`-L' is ignored for archives/objects"
6293 ;;
6294 esac # linkmode
6295 continue
6296 ;; # -L
6297 -R*)
6298 if test "$pass" = link; then
6299 func_stripname '-R' '' "$deplib"
6300 func_resolve_sysroot "$func_stripname_result"
6301 dir=$func_resolve_sysroot_result
6302 # Make sure the xrpath contains only unique directories.
6303 case "$xrpath " in
6304 *" $dir "*) ;;
6305 *) func_append xrpath " $dir" ;;
6306 esac
6307 fi
6308 deplibs="$deplib $deplibs"
6309 continue
6310 ;;
6311 *.la)
6312 func_resolve_sysroot "$deplib"
6313 lib=$func_resolve_sysroot_result
6314 ;;
6315 *.$libext)
6316 if test "$pass" = conv; then
6317 deplibs="$deplib $deplibs"
6318 continue
6319 fi
6320 case $linkmode in
6321 lib)
6322 # Linking convenience modules into shared libraries is allowed,
6323 # but linking other static libraries is non-portable.
6324 case " $dlpreconveniencelibs " in
6325 *" $deplib "*) ;;
6326 *)
6327 valid_a_lib=no
6328 case $deplibs_check_method in
6329 match_pattern*)
6330 set dummy $deplibs_check_method; shift
6331 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6332 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
6333 | $EGREP "$match_pattern_regex" > /dev/null; then
6334 valid_a_lib=yes
6335 fi
6336 ;;
6337 pass_all)
6338 valid_a_lib=yes
6339 ;;
6340 esac
6341 if test "$valid_a_lib" != yes; then
6342 echo
6343 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
6344 echo "*** I have the capability to make that library automatically link in when"
6345 echo "*** you link to this library. But I can only do this if you have a"
6346 echo "*** shared version of the library, which you do not appear to have"
6347 echo "*** because the file extensions .$libext of this argument makes me believe"
6348 echo "*** that it is just a static archive that I should not use here."
6349 else
6350 echo
6351 $ECHO "*** Warning: Linking the shared library $output against the"
6352 $ECHO "*** static library $deplib is not portable!"
6353 deplibs="$deplib $deplibs"
6354 fi
6355 ;;
6356 esac
6357 continue
6358 ;;
6359 prog)
6360 if test "$pass" != link; then
6361 deplibs="$deplib $deplibs"
6362 else
6363 compile_deplibs="$deplib $compile_deplibs"
6364 finalize_deplibs="$deplib $finalize_deplibs"
6365 fi
6366 continue
6367 ;;
6368 esac # linkmode
6369 ;; # *.$libext
6370 *.lo | *.$objext)
6371 if test "$pass" = conv; then
6372 deplibs="$deplib $deplibs"
6373 elif test "$linkmode" = prog; then
6374 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
6375 # If there is no dlopen support or we're linking statically,
6376 # we need to preload.
6377 func_append newdlprefiles " $deplib"
6378 compile_deplibs="$deplib $compile_deplibs"
6379 finalize_deplibs="$deplib $finalize_deplibs"
6380 else
6381 func_append newdlfiles " $deplib"
6382 fi
6383 fi
6384 continue
6385 ;;
6386 %DEPLIBS%)
6387 alldeplibs=yes
6388 continue
6389 ;;
6390 esac # case $deplib
6391
6392 if test "$found" = yes || test -f "$lib"; then :
6393 else
6394 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
6395 fi
6396
6397 # Check to see that this really is a libtool archive.
6398 func_lalib_unsafe_p "$lib" \
6399 || func_fatal_error "\`$lib' is not a valid libtool archive"
6400
6401 func_dirname "$lib" "" "."
6402 ladir="$func_dirname_result"
6403
6404 dlname=
6405 dlopen=
6406 dlpreopen=
6407 libdir=
6408 library_names=
6409 old_library=
6410 inherited_linker_flags=
6411 # If the library was installed with an old release of libtool,
6412 # it will not redefine variables installed, or shouldnotlink
6413 installed=yes
6414 shouldnotlink=no
6415 avoidtemprpath=
6416
6417
6418 # Read the .la file
6419 func_source "$lib"
6420
6421 # Convert "-framework foo" to "foo.ltframework"
6422 if test -n "$inherited_linker_flags"; then
6423 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
6424 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
6425 case " $new_inherited_linker_flags " in
6426 *" $tmp_inherited_linker_flag "*) ;;
6427 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
6428 esac
6429 done
6430 fi
6431 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6432 if test "$linkmode,$pass" = "lib,link" ||
6433 test "$linkmode,$pass" = "prog,scan" ||
6434 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
6435 test -n "$dlopen" && func_append dlfiles " $dlopen"
6436 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
6437 fi
6438
6439 if test "$pass" = conv; then
6440 # Only check for convenience libraries
6441 deplibs="$lib $deplibs"
6442 if test -z "$libdir"; then
6443 if test -z "$old_library"; then
6444 func_fatal_error "cannot find name of link library for \`$lib'"
6445 fi
6446 # It is a libtool convenience library, so add in its objects.
6447 func_append convenience " $ladir/$objdir/$old_library"
6448 func_append old_convenience " $ladir/$objdir/$old_library"
6449 tmp_libs=
6450 for deplib in $dependency_libs; do
6451 deplibs="$deplib $deplibs"
6452 if $opt_preserve_dup_deps ; then
6453 case "$tmp_libs " in
6454 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6455 esac
6456 fi
6457 func_append tmp_libs " $deplib"
6458 done
6459 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6460 func_fatal_error "\`$lib' is not a convenience library"
6461 fi
6462 continue
6463 fi # $pass = conv
6464
6465
6466 # Get the name of the library we link against.
6467 linklib=
6468 if test -n "$old_library" &&
6469 { test "$prefer_static_libs" = yes ||
6470 test "$prefer_static_libs,$installed" = "built,no"; }; then
6471 linklib=$old_library
6472 else
6473 for l in $old_library $library_names; do
6474 linklib="$l"
6475 done
6476 fi
6477 if test -z "$linklib"; then
6478 func_fatal_error "cannot find name of link library for \`$lib'"
6479 fi
6480
6481 # This library was specified with -dlopen.
6482 if test "$pass" = dlopen; then
6483 if test -z "$libdir"; then
6484 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
6485 fi
6486 if test -z "$dlname" ||
6487 test "$dlopen_support" != yes ||
6488 test "$build_libtool_libs" = no; then
6489 # If there is no dlname, no dlopen support or we're linking
6490 # statically, we need to preload. We also need to preload any
6491 # dependent libraries so libltdl's deplib preloader doesn't
6492 # bomb out in the load deplibs phase.
6493 func_append dlprefiles " $lib $dependency_libs"
6494 else
6495 func_append newdlfiles " $lib"
6496 fi
6497 continue
6498 fi # $pass = dlopen
6499
6500 # We need an absolute path.
6501 case $ladir in
6502 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
6503 *)
6504 abs_ladir=`cd "$ladir" && pwd`
6505 if test -z "$abs_ladir"; then
6506 func_warning "cannot determine absolute directory name of \`$ladir'"
6507 func_warning "passing it literally to the linker, although it might fail"
6508 abs_ladir="$ladir"
6509 fi
6510 ;;
6511 esac
6512 func_basename "$lib"
6513 laname="$func_basename_result"
6514
6515 # Find the relevant object directory and library name.
6516 if test "X$installed" = Xyes; then
6517 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6518 func_warning "library \`$lib' was moved."
6519 dir="$ladir"
6520 absdir="$abs_ladir"
6521 libdir="$abs_ladir"
6522 else
6523 dir="$lt_sysroot$libdir"
6524 absdir="$lt_sysroot$libdir"
6525 fi
6526 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
6527 else
6528 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6529 dir="$ladir"
6530 absdir="$abs_ladir"
6531 # Remove this search path later
6532 func_append notinst_path " $abs_ladir"
6533 else
6534 dir="$ladir/$objdir"
6535 absdir="$abs_ladir/$objdir"
6536 # Remove this search path later
6537 func_append notinst_path " $abs_ladir"
6538 fi
6539 fi # $installed = yes
6540 func_stripname 'lib' '.la' "$laname"
6541 name=$func_stripname_result
6542
6543 # This library was specified with -dlpreopen.
6544 if test "$pass" = dlpreopen; then
6545 if test -z "$libdir" && test "$linkmode" = prog; then
6546 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
6547 fi
6548 case "$host" in
6549 # special handling for platforms with PE-DLLs.
6550 *cygwin* | *mingw* | *cegcc* )
6551 # Linker will automatically link against shared library if both
6552 # static and shared are present. Therefore, ensure we extract
6553 # symbols from the import library if a shared library is present
6554 # (otherwise, the dlopen module name will be incorrect). We do
6555 # this by putting the import library name into $newdlprefiles.
6556 # We recover the dlopen module name by 'saving' the la file
6557 # name in a special purpose variable, and (later) extracting the
6558 # dlname from the la file.
6559 if test -n "$dlname"; then
6560 func_tr_sh "$dir/$linklib"
6561 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6562 func_append newdlprefiles " $dir/$linklib"
6563 else
6564 func_append newdlprefiles " $dir/$old_library"
6565 # Keep a list of preopened convenience libraries to check
6566 # that they are being used correctly in the link pass.
6567 test -z "$libdir" && \
6568 func_append dlpreconveniencelibs " $dir/$old_library"
6569 fi
6570 ;;
6571 * )
6572 # Prefer using a static library (so that no silly _DYNAMIC symbols
6573 # are required to link).
6574 if test -n "$old_library"; then
6575 func_append newdlprefiles " $dir/$old_library"
6576 # Keep a list of preopened convenience libraries to check
6577 # that they are being used correctly in the link pass.
6578 test -z "$libdir" && \
6579 func_append dlpreconveniencelibs " $dir/$old_library"
6580 # Otherwise, use the dlname, so that lt_dlopen finds it.
6581 elif test -n "$dlname"; then
6582 func_append newdlprefiles " $dir/$dlname"
6583 else
6584 func_append newdlprefiles " $dir/$linklib"
6585 fi
6586 ;;
6587 esac
6588 fi # $pass = dlpreopen
6589
6590 if test -z "$libdir"; then
6591 # Link the convenience library
6592 if test "$linkmode" = lib; then
6593 deplibs="$dir/$old_library $deplibs"
6594 elif test "$linkmode,$pass" = "prog,link"; then
6595 compile_deplibs="$dir/$old_library $compile_deplibs"
6596 finalize_deplibs="$dir/$old_library $finalize_deplibs"
6597 else
6598 deplibs="$lib $deplibs" # used for prog,scan pass
6599 fi
6600 continue
6601 fi
6602
6603
6604 if test "$linkmode" = prog && test "$pass" != link; then
6605 func_append newlib_search_path " $ladir"
6606 deplibs="$lib $deplibs"
6607
6608 linkalldeplibs=no
6609 if test "$link_all_deplibs" != no || test -z "$library_names" ||
6610 test "$build_libtool_libs" = no; then
6611 linkalldeplibs=yes
6612 fi
6613
6614 tmp_libs=
6615 for deplib in $dependency_libs; do
6616 case $deplib in
6617 -L*) func_stripname '-L' '' "$deplib"
6618 func_resolve_sysroot "$func_stripname_result"
6619 func_append newlib_search_path " $func_resolve_sysroot_result"
6620 ;;
6621 esac
6622 # Need to link against all dependency_libs?
6623 if test "$linkalldeplibs" = yes; then
6624 deplibs="$deplib $deplibs"
6625 else
6626 # Need to hardcode shared library paths
6627 # or/and link against static libraries
6628 newdependency_libs="$deplib $newdependency_libs"
6629 fi
6630 if $opt_preserve_dup_deps ; then
6631 case "$tmp_libs " in
6632 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6633 esac
6634 fi
6635 func_append tmp_libs " $deplib"
6636 done # for deplib
6637 continue
6638 fi # $linkmode = prog...
6639
6640 if test "$linkmode,$pass" = "prog,link"; then
6641 if test -n "$library_names" &&
6642 { { test "$prefer_static_libs" = no ||
6643 test "$prefer_static_libs,$installed" = "built,yes"; } ||
6644 test -z "$old_library"; }; then
6645 # We need to hardcode the library path
6646 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
6647 # Make sure the rpath contains only unique directories.
6648 case "$temp_rpath:" in
6649 *"$absdir:"*) ;;
6650 *) func_append temp_rpath "$absdir:" ;;
6651 esac
6652 fi
6653
6654 # Hardcode the library path.
6655 # Skip directories that are in the system default run-time
6656 # search path.
6657 case " $sys_lib_dlsearch_path " in
6658 *" $absdir "*) ;;
6659 *)
6660 case "$compile_rpath " in
6661 *" $absdir "*) ;;
6662 *) func_append compile_rpath " $absdir" ;;
6663 esac
6664 ;;
6665 esac
6666 case " $sys_lib_dlsearch_path " in
6667 *" $libdir "*) ;;
6668 *)
6669 case "$finalize_rpath " in
6670 *" $libdir "*) ;;
6671 *) func_append finalize_rpath " $libdir" ;;
6672 esac
6673 ;;
6674 esac
6675 fi # $linkmode,$pass = prog,link...
6676
6677 if test "$alldeplibs" = yes &&
6678 { test "$deplibs_check_method" = pass_all ||
6679 { test "$build_libtool_libs" = yes &&
6680 test -n "$library_names"; }; }; then
6681 # We only need to search for static libraries
6682 continue
6683 fi
6684 fi
6685
6686 link_static=no # Whether the deplib will be linked statically
6687 use_static_libs=$prefer_static_libs
6688 if test "$use_static_libs" = built && test "$installed" = yes; then
6689 use_static_libs=no
6690 fi
6691 if test -n "$library_names" &&
6692 { test "$use_static_libs" = no || test -z "$old_library"; }; then
6693 case $host in
6694 *cygwin* | *mingw* | *cegcc*)
6695 # No point in relinking DLLs because paths are not encoded
6696 func_append notinst_deplibs " $lib"
6697 need_relink=no
6698 ;;
6699 *)
6700 if test "$installed" = no; then
6701 func_append notinst_deplibs " $lib"
6702 need_relink=yes
6703 fi
6704 ;;
6705 esac
6706 # This is a shared library
6707
6708 # Warn about portability, can't link against -module's on some
6709 # systems (darwin). Don't bleat about dlopened modules though!
6710 dlopenmodule=""
6711 for dlpremoduletest in $dlprefiles; do
6712 if test "X$dlpremoduletest" = "X$lib"; then
6713 dlopenmodule="$dlpremoduletest"
6714 break
6715 fi
6716 done
6717 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
6718 echo
6719 if test "$linkmode" = prog; then
6720 $ECHO "*** Warning: Linking the executable $output against the loadable module"
6721 else
6722 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
6723 fi
6724 $ECHO "*** $linklib is not portable!"
6725 fi
6726 if test "$linkmode" = lib &&
6727 test "$hardcode_into_libs" = yes; then
6728 # Hardcode the library path.
6729 # Skip directories that are in the system default run-time
6730 # search path.
6731 case " $sys_lib_dlsearch_path " in
6732 *" $absdir "*) ;;
6733 *)
6734 case "$compile_rpath " in
6735 *" $absdir "*) ;;
6736 *) func_append compile_rpath " $absdir" ;;
6737 esac
6738 ;;
6739 esac
6740 case " $sys_lib_dlsearch_path " in
6741 *" $libdir "*) ;;
6742 *)
6743 case "$finalize_rpath " in
6744 *" $libdir "*) ;;
6745 *) func_append finalize_rpath " $libdir" ;;
6746 esac
6747 ;;
6748 esac
6749 fi
6750
6751 if test -n "$old_archive_from_expsyms_cmds"; then
6752 # figure out the soname
6753 set dummy $library_names
6754 shift
6755 realname="$1"
6756 shift
6757 libname=`eval "\\$ECHO \"$libname_spec\""`
6758 # use dlname if we got it. it's perfectly good, no?
6759 if test -n "$dlname"; then
6760 soname="$dlname"
6761 elif test -n "$soname_spec"; then
6762 # bleh windows
6763 case $host in
6764 *cygwin* | mingw* | *cegcc*)
6765 func_arith $current - $age
6766 major=$func_arith_result
6767 versuffix="-$major"
6768 ;;
6769 esac
6770 eval soname=\"$soname_spec\"
6771 else
6772 soname="$realname"
6773 fi
6774
6775 # Make a new name for the extract_expsyms_cmds to use
6776 soroot="$soname"
6777 func_basename "$soroot"
6778 soname="$func_basename_result"
6779 func_stripname 'lib' '.dll' "$soname"
6780 newlib=libimp-$func_stripname_result.a
6781
6782 # If the library has no export list, then create one now
6783 if test -f "$output_objdir/$soname-def"; then :
6784 else
6785 func_verbose "extracting exported symbol list from \`$soname'"
6786 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
6787 fi
6788
6789 # Create $newlib
6790 if test -f "$output_objdir/$newlib"; then :; else
6791 func_verbose "generating import library for \`$soname'"
6792 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
6793 fi
6794 # make sure the library variables are pointing to the new library
6795 dir=$output_objdir
6796 linklib=$newlib
6797 fi # test -n "$old_archive_from_expsyms_cmds"
6798
6799 if test "$linkmode" = prog || test "$opt_mode" != relink; then
6800 add_shlibpath=
6801 add_dir=
6802 add=
6803 lib_linked=yes
6804 case $hardcode_action in
6805 immediate | unsupported)
6806 if test "$hardcode_direct" = no; then
6807 add="$dir/$linklib"
6808 case $host in
6809 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6810 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
6811 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6812 *-*-unixware7*) add_dir="-L$dir" ;;
6813 *-*-darwin* )
6814 # if the lib is a (non-dlopened) module then we can not
6815 # link against it, someone is ignoring the earlier warnings
6816 if /usr/bin/file -L $add 2> /dev/null |
6817 $GREP ": [^:]* bundle" >/dev/null ; then
6818 if test "X$dlopenmodule" != "X$lib"; then
6819 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
6820 if test -z "$old_library" ; then
6821 echo
6822 echo "*** And there doesn't seem to be a static archive available"
6823 echo "*** The link will probably fail, sorry"
6824 else
6825 add="$dir/$old_library"
6826 fi
6827 elif test -n "$old_library"; then
6828 add="$dir/$old_library"
6829 fi
6830 fi
6831 esac
6832 elif test "$hardcode_minus_L" = no; then
6833 case $host in
6834 *-*-sunos*) add_shlibpath="$dir" ;;
6835 esac
6836 add_dir="-L$dir"
6837 add="-l$name"
6838 elif test "$hardcode_shlibpath_var" = no; then
6839 add_shlibpath="$dir"
6840 add="-l$name"
6841 else
6842 lib_linked=no
6843 fi
6844 ;;
6845 relink)
6846 if test "$hardcode_direct" = yes &&
6847 test "$hardcode_direct_absolute" = no; then
6848 add="$dir/$linklib"
6849 elif test "$hardcode_minus_L" = yes; then
6850 add_dir="-L$absdir"
6851 # Try looking first in the location we're being installed to.
6852 if test -n "$inst_prefix_dir"; then
6853 case $libdir in
6854 [\\/]*)
6855 func_append add_dir " -L$inst_prefix_dir$libdir"
6856 ;;
6857 esac
6858 fi
6859 add="-l$name"
6860 elif test "$hardcode_shlibpath_var" = yes; then
6861 add_shlibpath="$dir"
6862 add="-l$name"
6863 else
6864 lib_linked=no
6865 fi
6866 ;;
6867 *) lib_linked=no ;;
6868 esac
6869
6870 if test "$lib_linked" != yes; then
6871 func_fatal_configuration "unsupported hardcode properties"
6872 fi
6873
6874 if test -n "$add_shlibpath"; then
6875 case :$compile_shlibpath: in
6876 *":$add_shlibpath:"*) ;;
6877 *) func_append compile_shlibpath "$add_shlibpath:" ;;
6878 esac
6879 fi
6880 if test "$linkmode" = prog; then
6881 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
6882 test -n "$add" && compile_deplibs="$add $compile_deplibs"
6883 else
6884 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6885 test -n "$add" && deplibs="$add $deplibs"
6886 if test "$hardcode_direct" != yes &&
6887 test "$hardcode_minus_L" != yes &&
6888 test "$hardcode_shlibpath_var" = yes; then
6889 case :$finalize_shlibpath: in
6890 *":$libdir:"*) ;;
6891 *) func_append finalize_shlibpath "$libdir:" ;;
6892 esac
6893 fi
6894 fi
6895 fi
6896
6897 if test "$linkmode" = prog || test "$opt_mode" = relink; then
6898 add_shlibpath=
6899 add_dir=
6900 add=
6901 # Finalize command for both is simple: just hardcode it.
6902 if test "$hardcode_direct" = yes &&
6903 test "$hardcode_direct_absolute" = no; then
6904 add="$libdir/$linklib"
6905 elif test "$hardcode_minus_L" = yes; then
6906 add_dir="-L$libdir"
6907 add="-l$name"
6908 elif test "$hardcode_shlibpath_var" = yes; then
6909 case :$finalize_shlibpath: in
6910 *":$libdir:"*) ;;
6911 *) func_append finalize_shlibpath "$libdir:" ;;
6912 esac
6913 add="-l$name"
6914 elif test "$hardcode_automatic" = yes; then
6915 if test -n "$inst_prefix_dir" &&
6916 test -f "$inst_prefix_dir$libdir/$linklib" ; then
6917 add="$inst_prefix_dir$libdir/$linklib"
6918 else
6919 add="$libdir/$linklib"
6920 fi
6921 else
6922 # We cannot seem to hardcode it, guess we'll fake it.
6923 add_dir="-L$libdir"
6924 # Try looking first in the location we're being installed to.
6925 if test -n "$inst_prefix_dir"; then
6926 case $libdir in
6927 [\\/]*)
6928 func_append add_dir " -L$inst_prefix_dir$libdir"
6929 ;;
6930 esac
6931 fi
6932 add="-l$name"
6933 fi
6934
6935 if test "$linkmode" = prog; then
6936 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
6937 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
6938 else
6939 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6940 test -n "$add" && deplibs="$add $deplibs"
6941 fi
6942 fi
6943 elif test "$linkmode" = prog; then
6944 # Here we assume that one of hardcode_direct or hardcode_minus_L
6945 # is not unsupported. This is valid on all known static and
6946 # shared platforms.
6947 if test "$hardcode_direct" != unsupported; then
6948 test -n "$old_library" && linklib="$old_library"
6949 compile_deplibs="$dir/$linklib $compile_deplibs"
6950 finalize_deplibs="$dir/$linklib $finalize_deplibs"
6951 else
6952 compile_deplibs="-l$name -L$dir $compile_deplibs"
6953 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
6954 fi
6955 elif test "$build_libtool_libs" = yes; then
6956 # Not a shared library
6957 if test "$deplibs_check_method" != pass_all; then
6958 # We're trying link a shared library against a static one
6959 # but the system doesn't support it.
6960
6961 # Just print a warning and add the library to dependency_libs so
6962 # that the program can be linked against the static library.
6963 echo
6964 $ECHO "*** Warning: This system can not link to static lib archive $lib."
6965 echo "*** I have the capability to make that library automatically link in when"
6966 echo "*** you link to this library. But I can only do this if you have a"
6967 echo "*** shared version of the library, which you do not appear to have."
6968 if test "$module" = yes; then
6969 echo "*** But as you try to build a module library, libtool will still create "
6970 echo "*** a static module, that should work as long as the dlopening application"
6971 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
6972 if test -z "$global_symbol_pipe"; then
6973 echo
6974 echo "*** However, this would only work if libtool was able to extract symbol"
6975 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6976 echo "*** not find such a program. So, this module is probably useless."
6977 echo "*** \`nm' from GNU binutils and a full rebuild may help."
6978 fi
6979 if test "$build_old_libs" = no; then
6980 build_libtool_libs=module
6981 build_old_libs=yes
6982 else
6983 build_libtool_libs=no
6984 fi
6985 fi
6986 else
6987 deplibs="$dir/$old_library $deplibs"
6988 link_static=yes
6989 fi
6990 fi # link shared/static library?
6991
6992 if test "$linkmode" = lib; then
6993 if test -n "$dependency_libs" &&
6994 { test "$hardcode_into_libs" != yes ||
6995 test "$build_old_libs" = yes ||
6996 test "$link_static" = yes; }; then
6997 # Extract -R from dependency_libs
6998 temp_deplibs=
6999 for libdir in $dependency_libs; do
7000 case $libdir in
7001 -R*) func_stripname '-R' '' "$libdir"
7002 temp_xrpath=$func_stripname_result
7003 case " $xrpath " in
7004 *" $temp_xrpath "*) ;;
7005 *) func_append xrpath " $temp_xrpath";;
7006 esac;;
7007 *) func_append temp_deplibs " $libdir";;
7008 esac
7009 done
7010 dependency_libs="$temp_deplibs"
7011 fi
7012
7013 func_append newlib_search_path " $absdir"
7014 # Link against this library
7015 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
7016 # ... and its dependency_libs
7017 tmp_libs=
7018 for deplib in $dependency_libs; do
7019 newdependency_libs="$deplib $newdependency_libs"
7020 case $deplib in
7021 -L*) func_stripname '-L' '' "$deplib"
7022 func_resolve_sysroot "$func_stripname_result";;
7023 *) func_resolve_sysroot "$deplib" ;;
7024 esac
7025 if $opt_preserve_dup_deps ; then
7026 case "$tmp_libs " in
7027 *" $func_resolve_sysroot_result "*)
7028 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
7029 esac
7030 fi
7031 func_append tmp_libs " $func_resolve_sysroot_result"
7032 done
7033
7034 if test "$link_all_deplibs" != no; then
7035 # Add the search paths of all dependency libraries
7036 for deplib in $dependency_libs; do
7037 path=
7038 case $deplib in
7039 -L*) path="$deplib" ;;
7040 *.la)
7041 func_resolve_sysroot "$deplib"
7042 deplib=$func_resolve_sysroot_result
7043 func_dirname "$deplib" "" "."
7044 dir=$func_dirname_result
7045 # We need an absolute path.
7046 case $dir in
7047 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
7048 *)
7049 absdir=`cd "$dir" && pwd`
7050 if test -z "$absdir"; then
7051 func_warning "cannot determine absolute directory name of \`$dir'"
7052 absdir="$dir"
7053 fi
7054 ;;
7055 esac
7056 if $GREP "^installed=no" $deplib > /dev/null; then
7057 case $host in
7058 *-*-darwin*)
7059 depdepl=
7060 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
7061 if test -n "$deplibrary_names" ; then
7062 for tmp in $deplibrary_names ; do
7063 depdepl=$tmp
7064 done
7065 if test -f "$absdir/$objdir/$depdepl" ; then
7066 depdepl="$absdir/$objdir/$depdepl"
7067 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7068 if test -z "$darwin_install_name"; then
7069 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7070 fi
7071 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7072 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
7073 path=
7074 fi
7075 fi
7076 ;;
7077 *)
7078 path="-L$absdir/$objdir"
7079 ;;
7080 esac
7081 else
7082 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
7083 test -z "$libdir" && \
7084 func_fatal_error "\`$deplib' is not a valid libtool archive"
7085 test "$absdir" != "$libdir" && \
7086 func_warning "\`$deplib' seems to be moved"
7087
7088 path="-L$absdir"
7089 fi
7090 ;;
7091 esac
7092 case " $deplibs " in
7093 *" $path "*) ;;
7094 *) deplibs="$path $deplibs" ;;
7095 esac
7096 done
7097 fi # link_all_deplibs != no
7098 fi # linkmode = lib
7099 done # for deplib in $libs
7100 if test "$pass" = link; then
7101 if test "$linkmode" = "prog"; then
7102 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
7103 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
7104 else
7105 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7106 fi
7107 fi
7108 dependency_libs="$newdependency_libs"
7109 if test "$pass" = dlpreopen; then
7110 # Link the dlpreopened libraries before other libraries
7111 for deplib in $save_deplibs; do
7112 deplibs="$deplib $deplibs"
7113 done
7114 fi
7115 if test "$pass" != dlopen; then
7116 if test "$pass" != conv; then
7117 # Make sure lib_search_path contains only unique directories.
7118 lib_search_path=
7119 for dir in $newlib_search_path; do
7120 case "$lib_search_path " in
7121 *" $dir "*) ;;
7122 *) func_append lib_search_path " $dir" ;;
7123 esac
7124 done
7125 newlib_search_path=
7126 fi
7127
7128 if test "$linkmode,$pass" != "prog,link"; then
7129 vars="deplibs"
7130 else
7131 vars="compile_deplibs finalize_deplibs"
7132 fi
7133 for var in $vars dependency_libs; do
7134 # Add libraries to $var in reverse order
7135 eval tmp_libs=\"\$$var\"
7136 new_libs=
7137 for deplib in $tmp_libs; do
7138 # FIXME: Pedantically, this is the right thing to do, so
7139 # that some nasty dependency loop isn't accidentally
7140 # broken:
7141 #new_libs="$deplib $new_libs"
7142 # Pragmatically, this seems to cause very few problems in
7143 # practice:
7144 case $deplib in
7145 -L*) new_libs="$deplib $new_libs" ;;
7146 -R*) ;;
7147 *)
7148 # And here is the reason: when a library appears more
7149 # than once as an explicit dependence of a library, or
7150 # is implicitly linked in more than once by the
7151 # compiler, it is considered special, and multiple
7152 # occurrences thereof are not removed. Compare this
7153 # with having the same library being listed as a
7154 # dependency of multiple other libraries: in this case,
7155 # we know (pedantically, we assume) the library does not
7156 # need to be listed more than once, so we keep only the
7157 # last copy. This is not always right, but it is rare
7158 # enough that we require users that really mean to play
7159 # such unportable linking tricks to link the library
7160 # using -Wl,-lname, so that libtool does not consider it
7161 # for duplicate removal.
7162 case " $specialdeplibs " in
7163 *" $deplib "*) new_libs="$deplib $new_libs" ;;
7164 *)
7165 case " $new_libs " in
7166 *" $deplib "*) ;;
7167 *) new_libs="$deplib $new_libs" ;;
7168 esac
7169 ;;
7170 esac
7171 ;;
7172 esac
7173 done
7174 tmp_libs=
7175 for deplib in $new_libs; do
7176 case $deplib in
7177 -L*)
7178 case " $tmp_libs " in
7179 *" $deplib "*) ;;
7180 *) func_append tmp_libs " $deplib" ;;
7181 esac
7182 ;;
7183 *) func_append tmp_libs " $deplib" ;;
7184 esac
7185 done
7186 eval $var=\"$tmp_libs\"
7187 done # for var
7188 fi
7189 # Last step: remove runtime libs from dependency_libs
7190 # (they stay in deplibs)
7191 tmp_libs=
7192 for i in $dependency_libs ; do
7193 case " $predeps $postdeps $compiler_lib_search_path " in
7194 *" $i "*)
7195 i=""
7196 ;;
7197 esac
7198 if test -n "$i" ; then
7199 func_append tmp_libs " $i"
7200 fi
7201 done
7202 dependency_libs=$tmp_libs
7203 done # for pass
7204 if test "$linkmode" = prog; then
7205 dlfiles="$newdlfiles"
7206 fi
7207 if test "$linkmode" = prog || test "$linkmode" = lib; then
7208 dlprefiles="$newdlprefiles"
7209 fi
7210
7211 case $linkmode in
7212 oldlib)
7213 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7214 func_warning "\`-dlopen' is ignored for archives"
7215 fi
7216
7217 case " $deplibs" in
7218 *\ -l* | *\ -L*)
7219 func_warning "\`-l' and \`-L' are ignored for archives" ;;
7220 esac
7221
7222 test -n "$rpath" && \
7223 func_warning "\`-rpath' is ignored for archives"
7224
7225 test -n "$xrpath" && \
7226 func_warning "\`-R' is ignored for archives"
7227
7228 test -n "$vinfo" && \
7229 func_warning "\`-version-info/-version-number' is ignored for archives"
7230
7231 test -n "$release" && \
7232 func_warning "\`-release' is ignored for archives"
7233
7234 test -n "$export_symbols$export_symbols_regex" && \
7235 func_warning "\`-export-symbols' is ignored for archives"
7236
7237 # Now set the variables for building old libraries.
7238 build_libtool_libs=no
7239 oldlibs="$output"
7240 func_append objs "$old_deplibs"
7241 ;;
7242
7243 lib)
7244 # Make sure we only generate libraries of the form `libNAME.la'.
7245 case $outputname in
7246 lib*)
7247 func_stripname 'lib' '.la' "$outputname"
7248 name=$func_stripname_result
7249 eval shared_ext=\"$shrext_cmds\"
7250 eval libname=\"$libname_spec\"
7251 ;;
7252 *)
7253 test "$module" = no && \
7254 func_fatal_help "libtool library \`$output' must begin with \`lib'"
7255
7256 if test "$need_lib_prefix" != no; then
7257 # Add the "lib" prefix for modules if required
7258 func_stripname '' '.la' "$outputname"
7259 name=$func_stripname_result
7260 eval shared_ext=\"$shrext_cmds\"
7261 eval libname=\"$libname_spec\"
7262 else
7263 func_stripname '' '.la' "$outputname"
7264 libname=$func_stripname_result
7265 fi
7266 ;;
7267 esac
7268
7269 if test -n "$objs"; then
7270 if test "$deplibs_check_method" != pass_all; then
7271 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
7272 else
7273 echo
7274 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
7275 $ECHO "*** objects $objs is not portable!"
7276 func_append libobjs " $objs"
7277 fi
7278 fi
7279
7280 test "$dlself" != no && \
7281 func_warning "\`-dlopen self' is ignored for libtool libraries"
7282
7283 set dummy $rpath
7284 shift
7285 test "$#" -gt 1 && \
7286 func_warning "ignoring multiple \`-rpath's for a libtool library"
7287
7288 install_libdir="$1"
7289
7290 oldlibs=
7291 if test -z "$rpath"; then
7292 if test "$build_libtool_libs" = yes; then
7293 # Building a libtool convenience library.
7294 # Some compilers have problems with a `.al' extension so
7295 # convenience libraries should have the same extension an
7296 # archive normally would.
7297 oldlibs="$output_objdir/$libname.$libext $oldlibs"
7298 build_libtool_libs=convenience
7299 build_old_libs=yes
7300 fi
7301
7302 test -n "$vinfo" && \
7303 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
7304
7305 test -n "$release" && \
7306 func_warning "\`-release' is ignored for convenience libraries"
7307 else
7308
7309 # Parse the version information argument.
7310 save_ifs="$IFS"; IFS=':'
7311 set dummy $vinfo 0 0 0
7312 shift
7313 IFS="$save_ifs"
7314
7315 test -n "$7" && \
7316 func_fatal_help "too many parameters to \`-version-info'"
7317
7318 # convert absolute version numbers to libtool ages
7319 # this retains compatibility with .la files and attempts
7320 # to make the code below a bit more comprehensible
7321
7322 case $vinfo_number in
7323 yes)
7324 number_major="$1"
7325 number_minor="$2"
7326 number_revision="$3"
7327 #
7328 # There are really only two kinds -- those that
7329 # use the current revision as the major version
7330 # and those that subtract age and use age as
7331 # a minor version. But, then there is irix
7332 # which has an extra 1 added just for fun
7333 #
7334 case $version_type in
7335 # correct linux to gnu/linux during the next big refactor
7336 darwin|linux|osf|windows|none)
7337 func_arith $number_major + $number_minor
7338 current=$func_arith_result
7339 age="$number_minor"
7340 revision="$number_revision"
7341 ;;
7342 freebsd-aout|freebsd-elf|qnx|sunos)
7343 current="$number_major"
7344 revision="$number_minor"
7345 age="0"
7346 ;;
7347 irix|nonstopux)
7348 func_arith $number_major + $number_minor
7349 current=$func_arith_result
7350 age="$number_minor"
7351 revision="$number_minor"
7352 lt_irix_increment=no
7353 ;;
7354 *)
7355 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7356 ;;
7357 esac
7358 ;;
7359 no)
7360 current="$1"
7361 revision="$2"
7362 age="$3"
7363 ;;
7364 esac
7365
7366 # Check that each of the things are valid numbers.
7367 case $current in
7368 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7369 *)
7370 func_error "CURRENT \`$current' must be a nonnegative integer"
7371 func_fatal_error "\`$vinfo' is not valid version information"
7372 ;;
7373 esac
7374
7375 case $revision in
7376 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7377 *)
7378 func_error "REVISION \`$revision' must be a nonnegative integer"
7379 func_fatal_error "\`$vinfo' is not valid version information"
7380 ;;
7381 esac
7382
7383 case $age in
7384 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
7385 *)
7386 func_error "AGE \`$age' must be a nonnegative integer"
7387 func_fatal_error "\`$vinfo' is not valid version information"
7388 ;;
7389 esac
7390
7391 if test "$age" -gt "$current"; then
7392 func_error "AGE \`$age' is greater than the current interface number \`$current'"
7393 func_fatal_error "\`$vinfo' is not valid version information"
7394 fi
7395
7396 # Calculate the version variables.
7397 major=
7398 versuffix=
7399 verstring=
7400 case $version_type in
7401 none) ;;
7402
7403 darwin)
7404 # Like Linux, but with the current version available in
7405 # verstring for coding it into the library header
7406 func_arith $current - $age
7407 major=.$func_arith_result
7408 versuffix="$major.$age.$revision"
7409 # Darwin ld doesn't like 0 for these options...
7410 func_arith $current + 1
7411 minor_current=$func_arith_result
7412 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
7413 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
7414 ;;
7415
7416 freebsd-aout)
7417 major=".$current"
7418 versuffix=".$current.$revision";
7419 ;;
7420
7421 freebsd-elf)
7422 major=".$current"
7423 versuffix=".$current"
7424 ;;
7425
7426 irix | nonstopux)
7427 if test "X$lt_irix_increment" = "Xno"; then
7428 func_arith $current - $age
7429 else
7430 func_arith $current - $age + 1
7431 fi
7432 major=$func_arith_result
7433
7434 case $version_type in
7435 nonstopux) verstring_prefix=nonstopux ;;
7436 *) verstring_prefix=sgi ;;
7437 esac
7438 verstring="$verstring_prefix$major.$revision"
7439
7440 # Add in all the interfaces that we are compatible with.
7441 loop=$revision
7442 while test "$loop" -ne 0; do
7443 func_arith $revision - $loop
7444 iface=$func_arith_result
7445 func_arith $loop - 1
7446 loop=$func_arith_result
7447 verstring="$verstring_prefix$major.$iface:$verstring"
7448 done
7449
7450 # Before this point, $major must not contain `.'.
7451 major=.$major
7452 versuffix="$major.$revision"
7453 ;;
7454
7455 linux) # correct to gnu/linux during the next big refactor
7456 func_arith $current - $age
7457 major=.$func_arith_result
7458 versuffix="$major.$age.$revision"
7459 ;;
7460
7461 osf)
7462 func_arith $current - $age
7463 major=.$func_arith_result
7464 versuffix=".$current.$age.$revision"
7465 verstring="$current.$age.$revision"
7466
7467 # Add in all the interfaces that we are compatible with.
7468 loop=$age
7469 while test "$loop" -ne 0; do
7470 func_arith $current - $loop
7471 iface=$func_arith_result
7472 func_arith $loop - 1
7473 loop=$func_arith_result
7474 verstring="$verstring:${iface}.0"
7475 done
7476
7477 # Make executables depend on our current version.
7478 func_append verstring ":${current}.0"
7479 ;;
7480
7481 qnx)
7482 major=".$current"
7483 versuffix=".$current"
7484 ;;
7485
7486 sunos)
7487 major=".$current"
7488 versuffix=".$current.$revision"
7489 ;;
7490
7491 windows)
7492 # Use '-' rather than '.', since we only want one
7493 # extension on DOS 8.3 filesystems.
7494 func_arith $current - $age
7495 major=$func_arith_result
7496 versuffix="-$major"
7497 ;;
7498
7499 *)
7500 func_fatal_configuration "unknown library version type \`$version_type'"
7501 ;;
7502 esac
7503
7504 # Clear the version info if we defaulted, and they specified a release.
7505 if test -z "$vinfo" && test -n "$release"; then
7506 major=
7507 case $version_type in
7508 darwin)
7509 # we can't check for "0.0" in archive_cmds due to quoting
7510 # problems, so we reset it completely
7511 verstring=
7512 ;;
7513 *)
7514 verstring="0.0"
7515 ;;
7516 esac
7517 if test "$need_version" = no; then
7518 versuffix=
7519 else
7520 versuffix=".0.0"
7521 fi
7522 fi
7523
7524 # Remove version info from name if versioning should be avoided
7525 if test "$avoid_version" = yes && test "$need_version" = no; then
7526 major=
7527 versuffix=
7528 verstring=""
7529 fi
7530
7531 # Check to see if the archive will have undefined symbols.
7532 if test "$allow_undefined" = yes; then
7533 if test "$allow_undefined_flag" = unsupported; then
7534 func_warning "undefined symbols not allowed in $host shared libraries"
7535 build_libtool_libs=no
7536 build_old_libs=yes
7537 fi
7538 else
7539 # Don't allow undefined symbols.
7540 allow_undefined_flag="$no_undefined_flag"
7541 fi
7542
7543 fi
7544
7545 func_generate_dlsyms "$libname" "$libname" "yes"
7546 func_append libobjs " $symfileobj"
7547 test "X$libobjs" = "X " && libobjs=
7548
7549 if test "$opt_mode" != relink; then
7550 # Remove our outputs, but don't remove object files since they
7551 # may have been created when compiling PIC objects.
7552 removelist=
7553 tempremovelist=`$ECHO "$output_objdir/*"`
7554 for p in $tempremovelist; do
7555 case $p in
7556 *.$objext | *.gcno)
7557 ;;
7558 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7559 if test "X$precious_files_regex" != "X"; then
7560 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
7561 then
7562 continue
7563 fi
7564 fi
7565 func_append removelist " $p"
7566 ;;
7567 *) ;;
7568 esac
7569 done
7570 test -n "$removelist" && \
7571 func_show_eval "${RM}r \$removelist"
7572 fi
7573
7574 # Now set the variables for building old libraries.
7575 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
7576 func_append oldlibs " $output_objdir/$libname.$libext"
7577
7578 # Transform .lo files to .o files.
7579 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
7580 fi
7581
7582 # Eliminate all temporary directories.
7583 #for path in $notinst_path; do
7584 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7585 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7586 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
7587 #done
7588
7589 if test -n "$xrpath"; then
7590 # If the user specified any rpath flags, then add them.
7591 temp_xrpath=
7592 for libdir in $xrpath; do
7593 func_replace_sysroot "$libdir"
7594 func_append temp_xrpath " -R$func_replace_sysroot_result"
7595 case "$finalize_rpath " in
7596 *" $libdir "*) ;;
7597 *) func_append finalize_rpath " $libdir" ;;
7598 esac
7599 done
7600 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
7601 dependency_libs="$temp_xrpath $dependency_libs"
7602 fi
7603 fi
7604
7605 # Make sure dlfiles contains only unique files that won't be dlpreopened
7606 old_dlfiles="$dlfiles"
7607 dlfiles=
7608 for lib in $old_dlfiles; do
7609 case " $dlprefiles $dlfiles " in
7610 *" $lib "*) ;;
7611 *) func_append dlfiles " $lib" ;;
7612 esac
7613 done
7614
7615 # Make sure dlprefiles contains only unique files
7616 old_dlprefiles="$dlprefiles"
7617 dlprefiles=
7618 for lib in $old_dlprefiles; do
7619 case "$dlprefiles " in
7620 *" $lib "*) ;;
7621 *) func_append dlprefiles " $lib" ;;
7622 esac
7623 done
7624
7625 if test "$build_libtool_libs" = yes; then
7626 if test -n "$rpath"; then
7627 case $host in
7628 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
7629 # these systems don't actually have a c library (as such)!
7630 ;;
7631 *-*-rhapsody* | *-*-darwin1.[012])
7632 # Rhapsody C library is in the System framework
7633 func_append deplibs " System.ltframework"
7634 ;;
7635 *-*-netbsd*)
7636 # Don't link with libc until the a.out ld.so is fixed.
7637 ;;
7638 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7639 # Do not include libc due to us having libc/libc_r.
7640 ;;
7641 *-*-sco3.2v5* | *-*-sco5v6*)
7642 # Causes problems with __ctype
7643 ;;
7644 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7645 # Compiler inserts libc in the correct place for threads to work
7646 ;;
7647 *)
7648 # Add libc to deplibs on all other systems if necessary.
7649 if test "$build_libtool_need_lc" = "yes"; then
7650 func_append deplibs " -lc"
7651 fi
7652 ;;
7653 esac
7654 fi
7655
7656 # Transform deplibs into only deplibs that can be linked in shared.
7657 name_save=$name
7658 libname_save=$libname
7659 release_save=$release
7660 versuffix_save=$versuffix
7661 major_save=$major
7662 # I'm not sure if I'm treating the release correctly. I think
7663 # release should show up in the -l (ie -lgmp5) so we don't want to
7664 # add it in twice. Is that correct?
7665 release=""
7666 versuffix=""
7667 major=""
7668 newdeplibs=
7669 droppeddeps=no
7670 case $deplibs_check_method in
7671 pass_all)
7672 # Don't check for shared/static. Everything works.
7673 # This might be a little naive. We might want to check
7674 # whether the library exists or not. But this is on
7675 # osf3 & osf4 and I'm not really sure... Just
7676 # implementing what was already the behavior.
7677 newdeplibs=$deplibs
7678 ;;
7679 test_compile)
7680 # This code stresses the "libraries are programs" paradigm to its
7681 # limits. Maybe even breaks it. We compile a program, linking it
7682 # against the deplibs as a proxy for the library. Then we can check
7683 # whether they linked in statically or dynamically with ldd.
7684 $opt_dry_run || $RM conftest.c
7685 cat > conftest.c <<EOF
7686 int main() { return 0; }
7687 EOF
7688 $opt_dry_run || $RM conftest
7689 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
7690 ldd_output=`ldd conftest`
7691 for i in $deplibs; do
7692 case $i in
7693 -l*)
7694 func_stripname -l '' "$i"
7695 name=$func_stripname_result
7696 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7697 case " $predeps $postdeps " in
7698 *" $i "*)
7699 func_append newdeplibs " $i"
7700 i=""
7701 ;;
7702 esac
7703 fi
7704 if test -n "$i" ; then
7705 libname=`eval "\\$ECHO \"$libname_spec\""`
7706 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7707 set dummy $deplib_matches; shift
7708 deplib_match=$1
7709 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7710 func_append newdeplibs " $i"
7711 else
7712 droppeddeps=yes
7713 echo
7714 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7715 echo "*** I have the capability to make that library automatically link in when"
7716 echo "*** you link to this library. But I can only do this if you have a"
7717 echo "*** shared version of the library, which I believe you do not have"
7718 echo "*** because a test_compile did reveal that the linker did not use it for"
7719 echo "*** its dynamic dependency list that programs get resolved with at runtime."
7720 fi
7721 fi
7722 ;;
7723 *)
7724 func_append newdeplibs " $i"
7725 ;;
7726 esac
7727 done
7728 else
7729 # Error occurred in the first compile. Let's try to salvage
7730 # the situation: Compile a separate program for each library.
7731 for i in $deplibs; do
7732 case $i in
7733 -l*)
7734 func_stripname -l '' "$i"
7735 name=$func_stripname_result
7736 $opt_dry_run || $RM conftest
7737 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
7738 ldd_output=`ldd conftest`
7739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7740 case " $predeps $postdeps " in
7741 *" $i "*)
7742 func_append newdeplibs " $i"
7743 i=""
7744 ;;
7745 esac
7746 fi
7747 if test -n "$i" ; then
7748 libname=`eval "\\$ECHO \"$libname_spec\""`
7749 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7750 set dummy $deplib_matches; shift
7751 deplib_match=$1
7752 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7753 func_append newdeplibs " $i"
7754 else
7755 droppeddeps=yes
7756 echo
7757 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7758 echo "*** I have the capability to make that library automatically link in when"
7759 echo "*** you link to this library. But I can only do this if you have a"
7760 echo "*** shared version of the library, which you do not appear to have"
7761 echo "*** because a test_compile did reveal that the linker did not use this one"
7762 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
7763 fi
7764 fi
7765 else
7766 droppeddeps=yes
7767 echo
7768 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
7769 echo "*** make it link in! You will probably need to install it or some"
7770 echo "*** library that it depends on before this library will be fully"
7771 echo "*** functional. Installing it before continuing would be even better."
7772 fi
7773 ;;
7774 *)
7775 func_append newdeplibs " $i"
7776 ;;
7777 esac
7778 done
7779 fi
7780 ;;
7781 file_magic*)
7782 set dummy $deplibs_check_method; shift
7783 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7784 for a_deplib in $deplibs; do
7785 case $a_deplib in
7786 -l*)
7787 func_stripname -l '' "$a_deplib"
7788 name=$func_stripname_result
7789 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7790 case " $predeps $postdeps " in
7791 *" $a_deplib "*)
7792 func_append newdeplibs " $a_deplib"
7793 a_deplib=""
7794 ;;
7795 esac
7796 fi
7797 if test -n "$a_deplib" ; then
7798 libname=`eval "\\$ECHO \"$libname_spec\""`
7799 if test -n "$file_magic_glob"; then
7800 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7801 else
7802 libnameglob=$libname
7803 fi
7804 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
7805 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7806 if test "$want_nocaseglob" = yes; then
7807 shopt -s nocaseglob
7808 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7809 $nocaseglob
7810 else
7811 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7812 fi
7813 for potent_lib in $potential_libs; do
7814 # Follow soft links.
7815 if ls -lLd "$potent_lib" 2>/dev/null |
7816 $GREP " -> " >/dev/null; then
7817 continue
7818 fi
7819 # The statement above tries to avoid entering an
7820 # endless loop below, in case of cyclic links.
7821 # We might still enter an endless loop, since a link
7822 # loop can be closed while we follow links,
7823 # but so what?
7824 potlib="$potent_lib"
7825 while test -h "$potlib" 2>/dev/null; do
7826 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
7827 case $potliblink in
7828 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7829 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
7830 esac
7831 done
7832 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
7833 $SED -e 10q |
7834 $EGREP "$file_magic_regex" > /dev/null; then
7835 func_append newdeplibs " $a_deplib"
7836 a_deplib=""
7837 break 2
7838 fi
7839 done
7840 done
7841 fi
7842 if test -n "$a_deplib" ; then
7843 droppeddeps=yes
7844 echo
7845 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7846 echo "*** I have the capability to make that library automatically link in when"
7847 echo "*** you link to this library. But I can only do this if you have a"
7848 echo "*** shared version of the library, which you do not appear to have"
7849 echo "*** because I did check the linker path looking for a file starting"
7850 if test -z "$potlib" ; then
7851 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
7852 else
7853 $ECHO "*** with $libname and none of the candidates passed a file format test"
7854 $ECHO "*** using a file magic. Last file checked: $potlib"
7855 fi
7856 fi
7857 ;;
7858 *)
7859 # Add a -L argument.
7860 func_append newdeplibs " $a_deplib"
7861 ;;
7862 esac
7863 done # Gone through all deplibs.
7864 ;;
7865 match_pattern*)
7866 set dummy $deplibs_check_method; shift
7867 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7868 for a_deplib in $deplibs; do
7869 case $a_deplib in
7870 -l*)
7871 func_stripname -l '' "$a_deplib"
7872 name=$func_stripname_result
7873 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7874 case " $predeps $postdeps " in
7875 *" $a_deplib "*)
7876 func_append newdeplibs " $a_deplib"
7877 a_deplib=""
7878 ;;
7879 esac
7880 fi
7881 if test -n "$a_deplib" ; then
7882 libname=`eval "\\$ECHO \"$libname_spec\""`
7883 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7884 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7885 for potent_lib in $potential_libs; do
7886 potlib="$potent_lib" # see symlink-check above in file_magic test
7887 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
7888 $EGREP "$match_pattern_regex" > /dev/null; then
7889 func_append newdeplibs " $a_deplib"
7890 a_deplib=""
7891 break 2
7892 fi
7893 done
7894 done
7895 fi
7896 if test -n "$a_deplib" ; then
7897 droppeddeps=yes
7898 echo
7899 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7900 echo "*** I have the capability to make that library automatically link in when"
7901 echo "*** you link to this library. But I can only do this if you have a"
7902 echo "*** shared version of the library, which you do not appear to have"
7903 echo "*** because I did check the linker path looking for a file starting"
7904 if test -z "$potlib" ; then
7905 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
7906 else
7907 $ECHO "*** with $libname and none of the candidates passed a file format test"
7908 $ECHO "*** using a regex pattern. Last file checked: $potlib"
7909 fi
7910 fi
7911 ;;
7912 *)
7913 # Add a -L argument.
7914 func_append newdeplibs " $a_deplib"
7915 ;;
7916 esac
7917 done # Gone through all deplibs.
7918 ;;
7919 none | unknown | *)
7920 newdeplibs=""
7921 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
7922 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7923 for i in $predeps $postdeps ; do
7924 # can't use Xsed below, because $i might contain '/'
7925 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
7926 done
7927 fi
7928 case $tmp_deplibs in
7929 *[!\ \ ]*)
7930 echo
7931 if test "X$deplibs_check_method" = "Xnone"; then
7932 echo "*** Warning: inter-library dependencies are not supported in this platform."
7933 else
7934 echo "*** Warning: inter-library dependencies are not known to be supported."
7935 fi
7936 echo "*** All declared inter-library dependencies are being dropped."
7937 droppeddeps=yes
7938 ;;
7939 esac
7940 ;;
7941 esac
7942 versuffix=$versuffix_save
7943 major=$major_save
7944 release=$release_save
7945 libname=$libname_save
7946 name=$name_save
7947
7948 case $host in
7949 *-*-rhapsody* | *-*-darwin1.[012])
7950 # On Rhapsody replace the C library with the System framework
7951 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
7952 ;;
7953 esac
7954
7955 if test "$droppeddeps" = yes; then
7956 if test "$module" = yes; then
7957 echo
7958 echo "*** Warning: libtool could not satisfy all declared inter-library"
7959 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
7960 echo "*** a static module, that should work as long as the dlopening"
7961 echo "*** application is linked with the -dlopen flag."
7962 if test -z "$global_symbol_pipe"; then
7963 echo
7964 echo "*** However, this would only work if libtool was able to extract symbol"
7965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7966 echo "*** not find such a program. So, this module is probably useless."
7967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
7968 fi
7969 if test "$build_old_libs" = no; then
7970 oldlibs="$output_objdir/$libname.$libext"
7971 build_libtool_libs=module
7972 build_old_libs=yes
7973 else
7974 build_libtool_libs=no
7975 fi
7976 else
7977 echo "*** The inter-library dependencies that have been dropped here will be"
7978 echo "*** automatically added whenever a program is linked with this library"
7979 echo "*** or is declared to -dlopen it."
7980
7981 if test "$allow_undefined" = no; then
7982 echo
7983 echo "*** Since this library must not contain undefined symbols,"
7984 echo "*** because either the platform does not support them or"
7985 echo "*** it was explicitly requested with -no-undefined,"
7986 echo "*** libtool will only create a static version of it."
7987 if test "$build_old_libs" = no; then
7988 oldlibs="$output_objdir/$libname.$libext"
7989 build_libtool_libs=module
7990 build_old_libs=yes
7991 else
7992 build_libtool_libs=no
7993 fi
7994 fi
7995 fi
7996 fi
7997 # Done checking deplibs!
7998 deplibs=$newdeplibs
7999 fi
8000 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8001 case $host in
8002 *-*-darwin*)
8003 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8004 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8005 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8006 ;;
8007 esac
8008
8009 # move library search paths that coincide with paths to not yet
8010 # installed libraries to the beginning of the library search list
8011 new_libs=
8012 for path in $notinst_path; do
8013 case " $new_libs " in
8014 *" -L$path/$objdir "*) ;;
8015 *)
8016 case " $deplibs " in
8017 *" -L$path/$objdir "*)
8018 func_append new_libs " -L$path/$objdir" ;;
8019 esac
8020 ;;
8021 esac
8022 done
8023 for deplib in $deplibs; do
8024 case $deplib in
8025 -L*)
8026 case " $new_libs " in
8027 *" $deplib "*) ;;
8028 *) func_append new_libs " $deplib" ;;
8029 esac
8030 ;;
8031 *) func_append new_libs " $deplib" ;;
8032 esac
8033 done
8034 deplibs="$new_libs"
8035
8036 # All the library-specific variables (install_libdir is set above).
8037 library_names=
8038 old_library=
8039 dlname=
8040
8041 # Test again, we may have decided not to build it any more
8042 if test "$build_libtool_libs" = yes; then
8043 # Remove ${wl} instances when linking with ld.
8044 # FIXME: should test the right _cmds variable.
8045 case $archive_cmds in
8046 *\$LD\ *) wl= ;;
8047 esac
8048 if test "$hardcode_into_libs" = yes; then
8049 # Hardcode the library paths
8050 hardcode_libdirs=
8051 dep_rpath=
8052 rpath="$finalize_rpath"
8053 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
8054 for libdir in $rpath; do
8055 if test -n "$hardcode_libdir_flag_spec"; then
8056 if test -n "$hardcode_libdir_separator"; then
8057 func_replace_sysroot "$libdir"
8058 libdir=$func_replace_sysroot_result
8059 if test -z "$hardcode_libdirs"; then
8060 hardcode_libdirs="$libdir"
8061 else
8062 # Just accumulate the unique libdirs.
8063 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8064 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8065 ;;
8066 *)
8067 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8068 ;;
8069 esac
8070 fi
8071 else
8072 eval flag=\"$hardcode_libdir_flag_spec\"
8073 func_append dep_rpath " $flag"
8074 fi
8075 elif test -n "$runpath_var"; then
8076 case "$perm_rpath " in
8077 *" $libdir "*) ;;
8078 *) func_append perm_rpath " $libdir" ;;
8079 esac
8080 fi
8081 done
8082 # Substitute the hardcoded libdirs into the rpath.
8083 if test -n "$hardcode_libdir_separator" &&
8084 test -n "$hardcode_libdirs"; then
8085 libdir="$hardcode_libdirs"
8086 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
8087 fi
8088 if test -n "$runpath_var" && test -n "$perm_rpath"; then
8089 # We should set the runpath_var.
8090 rpath=
8091 for dir in $perm_rpath; do
8092 func_append rpath "$dir:"
8093 done
8094 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
8095 fi
8096 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
8097 fi
8098
8099 shlibpath="$finalize_shlibpath"
8100 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8101 if test -n "$shlibpath"; then
8102 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
8103 fi
8104
8105 # Get the real and link names of the library.
8106 eval shared_ext=\"$shrext_cmds\"
8107 eval library_names=\"$library_names_spec\"
8108 set dummy $library_names
8109 shift
8110 realname="$1"
8111 shift
8112
8113 if test -n "$soname_spec"; then
8114 eval soname=\"$soname_spec\"
8115 else
8116 soname="$realname"
8117 fi
8118 if test -z "$dlname"; then
8119 dlname=$soname
8120 fi
8121
8122 lib="$output_objdir/$realname"
8123 linknames=
8124 for link
8125 do
8126 func_append linknames " $link"
8127 done
8128
8129 # Use standard objects if they are pic
8130 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
8131 test "X$libobjs" = "X " && libobjs=
8132
8133 delfiles=
8134 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8135 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
8136 export_symbols="$output_objdir/$libname.uexp"
8137 func_append delfiles " $export_symbols"
8138 fi
8139
8140 orig_export_symbols=
8141 case $host_os in
8142 cygwin* | mingw* | cegcc*)
8143 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
8144 # exporting using user supplied symfile
8145 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
8146 # and it's NOT already a .def file. Must figure out
8147 # which of the given symbols are data symbols and tag
8148 # them as such. So, trigger use of export_symbols_cmds.
8149 # export_symbols gets reassigned inside the "prepare
8150 # the list of exported symbols" if statement, so the
8151 # include_expsyms logic still works.
8152 orig_export_symbols="$export_symbols"
8153 export_symbols=
8154 always_export_symbols=yes
8155 fi
8156 fi
8157 ;;
8158 esac
8159
8160 # Prepare the list of exported symbols
8161 if test -z "$export_symbols"; then
8162 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
8163 func_verbose "generating symbol list for \`$libname.la'"
8164 export_symbols="$output_objdir/$libname.exp"
8165 $opt_dry_run || $RM $export_symbols
8166 cmds=$export_symbols_cmds
8167 save_ifs="$IFS"; IFS='~'
8168 for cmd1 in $cmds; do
8169 IFS="$save_ifs"
8170 # Take the normal branch if the nm_file_list_spec branch
8171 # doesn't work or if tool conversion is not needed.
8172 case $nm_file_list_spec~$to_tool_file_cmd in
8173 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8174 try_normal_branch=yes
8175 eval cmd=\"$cmd1\"
8176 func_len " $cmd"
8177 len=$func_len_result
8178 ;;
8179 *)
8180 try_normal_branch=no
8181 ;;
8182 esac
8183 if test "$try_normal_branch" = yes \
8184 && { test "$len" -lt "$max_cmd_len" \
8185 || test "$max_cmd_len" -le -1; }
8186 then
8187 func_show_eval "$cmd" 'exit $?'
8188 skipped_export=false
8189 elif test -n "$nm_file_list_spec"; then
8190 func_basename "$output"
8191 output_la=$func_basename_result
8192 save_libobjs=$libobjs
8193 save_output=$output
8194 output=${output_objdir}/${output_la}.nm
8195 func_to_tool_file "$output"
8196 libobjs=$nm_file_list_spec$func_to_tool_file_result
8197 func_append delfiles " $output"
8198 func_verbose "creating $NM input file list: $output"
8199 for obj in $save_libobjs; do
8200 func_to_tool_file "$obj"
8201 $ECHO "$func_to_tool_file_result"
8202 done > "$output"
8203 eval cmd=\"$cmd1\"
8204 func_show_eval "$cmd" 'exit $?'
8205 output=$save_output
8206 libobjs=$save_libobjs
8207 skipped_export=false
8208 else
8209 # The command line is too long to execute in one step.
8210 func_verbose "using reloadable object file for export list..."
8211 skipped_export=:
8212 # Break out early, otherwise skipped_export may be
8213 # set to false by a later but shorter cmd.
8214 break
8215 fi
8216 done
8217 IFS="$save_ifs"
8218 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
8219 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8220 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8221 fi
8222 fi
8223 fi
8224
8225 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8226 tmp_export_symbols="$export_symbols"
8227 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8228 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8229 fi
8230
8231 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
8232 # The given exports_symbols file has to be filtered, so filter it.
8233 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8234 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8235 # 's' commands which not all seds can handle. GNU sed should be fine
8236 # though. Also, the filter scales superlinearly with the number of
8237 # global variables. join(1) would be nice here, but unfortunately
8238 # isn't a blessed tool.
8239 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8240 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8241 export_symbols=$output_objdir/$libname.def
8242 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8243 fi
8244
8245 tmp_deplibs=
8246 for test_deplib in $deplibs; do
8247 case " $convenience " in
8248 *" $test_deplib "*) ;;
8249 *)
8250 func_append tmp_deplibs " $test_deplib"
8251 ;;
8252 esac
8253 done
8254 deplibs="$tmp_deplibs"
8255
8256 if test -n "$convenience"; then
8257 if test -n "$whole_archive_flag_spec" &&
8258 test "$compiler_needs_object" = yes &&
8259 test -z "$libobjs"; then
8260 # extract the archives, so we have objects to list.
8261 # TODO: could optimize this to just extract one archive.
8262 whole_archive_flag_spec=
8263 fi
8264 if test -n "$whole_archive_flag_spec"; then
8265 save_libobjs=$libobjs
8266 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8267 test "X$libobjs" = "X " && libobjs=
8268 else
8269 gentop="$output_objdir/${outputname}x"
8270 func_append generated " $gentop"
8271
8272 func_extract_archives $gentop $convenience
8273 func_append libobjs " $func_extract_archives_result"
8274 test "X$libobjs" = "X " && libobjs=
8275 fi
8276 fi
8277
8278 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
8279 eval flag=\"$thread_safe_flag_spec\"
8280 func_append linker_flags " $flag"
8281 fi
8282
8283 # Make a backup of the uninstalled library when relinking
8284 if test "$opt_mode" = relink; then
8285 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
8286 fi
8287
8288 # Do each of the archive commands.
8289 if test "$module" = yes && test -n "$module_cmds" ; then
8290 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8291 eval test_cmds=\"$module_expsym_cmds\"
8292 cmds=$module_expsym_cmds
8293 else
8294 eval test_cmds=\"$module_cmds\"
8295 cmds=$module_cmds
8296 fi
8297 else
8298 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8299 eval test_cmds=\"$archive_expsym_cmds\"
8300 cmds=$archive_expsym_cmds
8301 else
8302 eval test_cmds=\"$archive_cmds\"
8303 cmds=$archive_cmds
8304 fi
8305 fi
8306
8307 if test "X$skipped_export" != "X:" &&
8308 func_len " $test_cmds" &&
8309 len=$func_len_result &&
8310 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8311 :
8312 else
8313 # The command line is too long to link in one step, link piecewise
8314 # or, if using GNU ld and skipped_export is not :, use a linker
8315 # script.
8316
8317 # Save the value of $output and $libobjs because we want to
8318 # use them later. If we have whole_archive_flag_spec, we
8319 # want to use save_libobjs as it was before
8320 # whole_archive_flag_spec was expanded, because we can't
8321 # assume the linker understands whole_archive_flag_spec.
8322 # This may have to be revisited, in case too many
8323 # convenience libraries get linked in and end up exceeding
8324 # the spec.
8325 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
8326 save_libobjs=$libobjs
8327 fi
8328 save_output=$output
8329 func_basename "$output"
8330 output_la=$func_basename_result
8331
8332 # Clear the reloadable object creation command queue and
8333 # initialize k to one.
8334 test_cmds=
8335 concat_cmds=
8336 objlist=
8337 last_robj=
8338 k=1
8339
8340 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
8341 output=${output_objdir}/${output_la}.lnkscript
8342 func_verbose "creating GNU ld script: $output"
8343 echo 'INPUT (' > $output
8344 for obj in $save_libobjs
8345 do
8346 func_to_tool_file "$obj"
8347 $ECHO "$func_to_tool_file_result" >> $output
8348 done
8349 echo ')' >> $output
8350 func_append delfiles " $output"
8351 func_to_tool_file "$output"
8352 output=$func_to_tool_file_result
8353 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
8354 output=${output_objdir}/${output_la}.lnk
8355 func_verbose "creating linker input file list: $output"
8356 : > $output
8357 set x $save_libobjs
8358 shift
8359 firstobj=
8360 if test "$compiler_needs_object" = yes; then
8361 firstobj="$1 "
8362 shift
8363 fi
8364 for obj
8365 do
8366 func_to_tool_file "$obj"
8367 $ECHO "$func_to_tool_file_result" >> $output
8368 done
8369 func_append delfiles " $output"
8370 func_to_tool_file "$output"
8371 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
8372 else
8373 if test -n "$save_libobjs"; then
8374 func_verbose "creating reloadable object files..."
8375 output=$output_objdir/$output_la-${k}.$objext
8376 eval test_cmds=\"$reload_cmds\"
8377 func_len " $test_cmds"
8378 len0=$func_len_result
8379 len=$len0
8380
8381 # Loop over the list of objects to be linked.
8382 for obj in $save_libobjs
8383 do
8384 func_len " $obj"
8385 func_arith $len + $func_len_result
8386 len=$func_arith_result
8387 if test "X$objlist" = X ||
8388 test "$len" -lt "$max_cmd_len"; then
8389 func_append objlist " $obj"
8390 else
8391 # The command $test_cmds is almost too long, add a
8392 # command to the queue.
8393 if test "$k" -eq 1 ; then
8394 # The first file doesn't have a previous command to add.
8395 reload_objs=$objlist
8396 eval concat_cmds=\"$reload_cmds\"
8397 else
8398 # All subsequent reloadable object files will link in
8399 # the last one created.
8400 reload_objs="$objlist $last_robj"
8401 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
8402 fi
8403 last_robj=$output_objdir/$output_la-${k}.$objext
8404 func_arith $k + 1
8405 k=$func_arith_result
8406 output=$output_objdir/$output_la-${k}.$objext
8407 objlist=" $obj"
8408 func_len " $last_robj"
8409 func_arith $len0 + $func_len_result
8410 len=$func_arith_result
8411 fi
8412 done
8413 # Handle the remaining objects by creating one last
8414 # reloadable object file. All subsequent reloadable object
8415 # files will link in the last one created.
8416 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8417 reload_objs="$objlist $last_robj"
8418 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
8419 if test -n "$last_robj"; then
8420 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
8421 fi
8422 func_append delfiles " $output"
8423
8424 else
8425 output=
8426 fi
8427
8428 if ${skipped_export-false}; then
8429 func_verbose "generating symbol list for \`$libname.la'"
8430 export_symbols="$output_objdir/$libname.exp"
8431 $opt_dry_run || $RM $export_symbols
8432 libobjs=$output
8433 # Append the command to create the export file.
8434 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8435 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
8436 if test -n "$last_robj"; then
8437 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
8438 fi
8439 fi
8440
8441 test -n "$save_libobjs" &&
8442 func_verbose "creating a temporary reloadable object file: $output"
8443
8444 # Loop through the commands generated above and execute them.
8445 save_ifs="$IFS"; IFS='~'
8446 for cmd in $concat_cmds; do
8447 IFS="$save_ifs"
8448 $opt_silent || {
8449 func_quote_for_expand "$cmd"
8450 eval "func_echo $func_quote_for_expand_result"
8451 }
8452 $opt_dry_run || eval "$cmd" || {
8453 lt_exit=$?
8454
8455 # Restore the uninstalled library and exit
8456 if test "$opt_mode" = relink; then
8457 ( cd "$output_objdir" && \
8458 $RM "${realname}T" && \
8459 $MV "${realname}U" "$realname" )
8460 fi
8461
8462 exit $lt_exit
8463 }
8464 done
8465 IFS="$save_ifs"
8466
8467 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
8468 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8469 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8470 fi
8471 fi
8472
8473 if ${skipped_export-false}; then
8474 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8475 tmp_export_symbols="$export_symbols"
8476 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8477 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8478 fi
8479
8480 if test -n "$orig_export_symbols"; then
8481 # The given exports_symbols file has to be filtered, so filter it.
8482 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8483 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8484 # 's' commands which not all seds can handle. GNU sed should be fine
8485 # though. Also, the filter scales superlinearly with the number of
8486 # global variables. join(1) would be nice here, but unfortunately
8487 # isn't a blessed tool.
8488 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8489 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8490 export_symbols=$output_objdir/$libname.def
8491 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8492 fi
8493 fi
8494
8495 libobjs=$output
8496 # Restore the value of output.
8497 output=$save_output
8498
8499 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
8500 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8501 test "X$libobjs" = "X " && libobjs=
8502 fi
8503 # Expand the library linking commands again to reset the
8504 # value of $libobjs for piecewise linking.
8505
8506 # Do each of the archive commands.
8507 if test "$module" = yes && test -n "$module_cmds" ; then
8508 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8509 cmds=$module_expsym_cmds
8510 else
8511 cmds=$module_cmds
8512 fi
8513 else
8514 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8515 cmds=$archive_expsym_cmds
8516 else
8517 cmds=$archive_cmds
8518 fi
8519 fi
8520 fi
8521
8522 if test -n "$delfiles"; then
8523 # Append the command to remove temporary files to $cmds.
8524 eval cmds=\"\$cmds~\$RM $delfiles\"
8525 fi
8526
8527 # Add any objects from preloaded convenience libraries
8528 if test -n "$dlprefiles"; then
8529 gentop="$output_objdir/${outputname}x"
8530 func_append generated " $gentop"
8531
8532 func_extract_archives $gentop $dlprefiles
8533 func_append libobjs " $func_extract_archives_result"
8534 test "X$libobjs" = "X " && libobjs=
8535 fi
8536
8537 save_ifs="$IFS"; IFS='~'
8538 for cmd in $cmds; do
8539 IFS="$save_ifs"
8540 eval cmd=\"$cmd\"
8541 $opt_silent || {
8542 func_quote_for_expand "$cmd"
8543 eval "func_echo $func_quote_for_expand_result"
8544 }
8545 $opt_dry_run || eval "$cmd" || {
8546 lt_exit=$?
8547
8548 # Restore the uninstalled library and exit
8549 if test "$opt_mode" = relink; then
8550 ( cd "$output_objdir" && \
8551 $RM "${realname}T" && \
8552 $MV "${realname}U" "$realname" )
8553 fi
8554
8555 exit $lt_exit
8556 }
8557 done
8558 IFS="$save_ifs"
8559
8560 # Restore the uninstalled library and exit
8561 if test "$opt_mode" = relink; then
8562 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
8563
8564 if test -n "$convenience"; then
8565 if test -z "$whole_archive_flag_spec"; then
8566 func_show_eval '${RM}r "$gentop"'
8567 fi
8568 fi
8569
8570 exit $EXIT_SUCCESS
8571 fi
8572
8573 # Create links to the real library.
8574 for linkname in $linknames; do
8575 if test "$realname" != "$linkname"; then
8576 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
8577 fi
8578 done
8579
8580 # If -module or -export-dynamic was specified, set the dlname.
8581 if test "$module" = yes || test "$export_dynamic" = yes; then
8582 # On all known operating systems, these are identical.
8583 dlname="$soname"
8584 fi
8585 fi
8586 ;;
8587
8588 obj)
8589 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
8590 func_warning "\`-dlopen' is ignored for objects"
8591 fi
8592
8593 case " $deplibs" in
8594 *\ -l* | *\ -L*)
8595 func_warning "\`-l' and \`-L' are ignored for objects" ;;
8596 esac
8597
8598 test -n "$rpath" && \
8599 func_warning "\`-rpath' is ignored for objects"
8600
8601 test -n "$xrpath" && \
8602 func_warning "\`-R' is ignored for objects"
8603
8604 test -n "$vinfo" && \
8605 func_warning "\`-version-info' is ignored for objects"
8606
8607 test -n "$release" && \
8608 func_warning "\`-release' is ignored for objects"
8609
8610 case $output in
8611 *.lo)
8612 test -n "$objs$old_deplibs" && \
8613 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
8614
8615 libobj=$output
8616 func_lo2o "$libobj"
8617 obj=$func_lo2o_result
8618 ;;
8619 *)
8620 libobj=
8621 obj="$output"
8622 ;;
8623 esac
8624
8625 # Delete the old objects.
8626 $opt_dry_run || $RM $obj $libobj
8627
8628 # Objects from convenience libraries. This assumes
8629 # single-version convenience libraries. Whenever we create
8630 # different ones for PIC/non-PIC, this we'll have to duplicate
8631 # the extraction.
8632 reload_conv_objs=
8633 gentop=
8634 # reload_cmds runs $LD directly, so let us get rid of
8635 # -Wl from whole_archive_flag_spec and hope we can get by with
8636 # turning comma into space..
8637 wl=
8638
8639 if test -n "$convenience"; then
8640 if test -n "$whole_archive_flag_spec"; then
8641 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
8642 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
8643 else
8644 gentop="$output_objdir/${obj}x"
8645 func_append generated " $gentop"
8646
8647 func_extract_archives $gentop $convenience
8648 reload_conv_objs="$reload_objs $func_extract_archives_result"
8649 fi
8650 fi
8651
8652 # If we're not building shared, we need to use non_pic_objs
8653 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8654
8655 # Create the old-style object.
8656 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8657
8658 output="$obj"
8659 func_execute_cmds "$reload_cmds" 'exit $?'
8660
8661 # Exit if we aren't doing a library object file.
8662 if test -z "$libobj"; then
8663 if test -n "$gentop"; then
8664 func_show_eval '${RM}r "$gentop"'
8665 fi
8666
8667 exit $EXIT_SUCCESS
8668 fi
8669
8670 if test "$build_libtool_libs" != yes; then
8671 if test -n "$gentop"; then
8672 func_show_eval '${RM}r "$gentop"'
8673 fi
8674
8675 # Create an invalid libtool object if no PIC, so that we don't
8676 # accidentally link it into a program.
8677 # $show "echo timestamp > $libobj"
8678 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
8679 exit $EXIT_SUCCESS
8680 fi
8681
8682 if test -n "$pic_flag" || test "$pic_mode" != default; then
8683 # Only do commands if we really have different PIC objects.
8684 reload_objs="$libobjs $reload_conv_objs"
8685 output="$libobj"
8686 func_execute_cmds "$reload_cmds" 'exit $?'
8687 fi
8688
8689 if test -n "$gentop"; then
8690 func_show_eval '${RM}r "$gentop"'
8691 fi
8692
8693 exit $EXIT_SUCCESS
8694 ;;
8695
8696 prog)
8697 case $host in
8698 *cygwin*) func_stripname '' '.exe' "$output"
8699 output=$func_stripname_result.exe;;
8700 esac
8701 test -n "$vinfo" && \
8702 func_warning "\`-version-info' is ignored for programs"
8703
8704 test -n "$release" && \
8705 func_warning "\`-release' is ignored for programs"
8706
8707 test "$preload" = yes \
8708 && test "$dlopen_support" = unknown \
8709 && test "$dlopen_self" = unknown \
8710 && test "$dlopen_self_static" = unknown && \
8711 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
8712
8713 case $host in
8714 *-*-rhapsody* | *-*-darwin1.[012])
8715 # On Rhapsody replace the C library is the System framework
8716 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8717 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
8718 ;;
8719 esac
8720
8721 case $host in
8722 *-*-darwin*)
8723 # Don't allow lazy linking, it breaks C++ global constructors
8724 # But is supposedly fixed on 10.4 or later (yay!).
8725 if test "$tagname" = CXX ; then
8726 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
8727 10.[0123])
8728 func_append compile_command " ${wl}-bind_at_load"
8729 func_append finalize_command " ${wl}-bind_at_load"
8730 ;;
8731 esac
8732 fi
8733 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8734 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8735 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8736 ;;
8737 esac
8738
8739
8740 # move library search paths that coincide with paths to not yet
8741 # installed libraries to the beginning of the library search list
8742 new_libs=
8743 for path in $notinst_path; do
8744 case " $new_libs " in
8745 *" -L$path/$objdir "*) ;;
8746 *)
8747 case " $compile_deplibs " in
8748 *" -L$path/$objdir "*)
8749 func_append new_libs " -L$path/$objdir" ;;
8750 esac
8751 ;;
8752 esac
8753 done
8754 for deplib in $compile_deplibs; do
8755 case $deplib in
8756 -L*)
8757 case " $new_libs " in
8758 *" $deplib "*) ;;
8759 *) func_append new_libs " $deplib" ;;
8760 esac
8761 ;;
8762 *) func_append new_libs " $deplib" ;;
8763 esac
8764 done
8765 compile_deplibs="$new_libs"
8766
8767
8768 func_append compile_command " $compile_deplibs"
8769 func_append finalize_command " $finalize_deplibs"
8770
8771 if test -n "$rpath$xrpath"; then
8772 # If the user specified any rpath flags, then add them.
8773 for libdir in $rpath $xrpath; do
8774 # This is the magic to use -rpath.
8775 case "$finalize_rpath " in
8776 *" $libdir "*) ;;
8777 *) func_append finalize_rpath " $libdir" ;;
8778 esac
8779 done
8780 fi
8781
8782 # Now hardcode the library paths
8783 rpath=
8784 hardcode_libdirs=
8785 for libdir in $compile_rpath $finalize_rpath; do
8786 if test -n "$hardcode_libdir_flag_spec"; then
8787 if test -n "$hardcode_libdir_separator"; then
8788 if test -z "$hardcode_libdirs"; then
8789 hardcode_libdirs="$libdir"
8790 else
8791 # Just accumulate the unique libdirs.
8792 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8793 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8794 ;;
8795 *)
8796 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8797 ;;
8798 esac
8799 fi
8800 else
8801 eval flag=\"$hardcode_libdir_flag_spec\"
8802 func_append rpath " $flag"
8803 fi
8804 elif test -n "$runpath_var"; then
8805 case "$perm_rpath " in
8806 *" $libdir "*) ;;
8807 *) func_append perm_rpath " $libdir" ;;
8808 esac
8809 fi
8810 case $host in
8811 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
8812 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
8813 case :$dllsearchpath: in
8814 *":$libdir:"*) ;;
8815 ::) dllsearchpath=$libdir;;
8816 *) func_append dllsearchpath ":$libdir";;
8817 esac
8818 case :$dllsearchpath: in
8819 *":$testbindir:"*) ;;
8820 ::) dllsearchpath=$testbindir;;
8821 *) func_append dllsearchpath ":$testbindir";;
8822 esac
8823 ;;
8824 esac
8825 done
8826 # Substitute the hardcoded libdirs into the rpath.
8827 if test -n "$hardcode_libdir_separator" &&
8828 test -n "$hardcode_libdirs"; then
8829 libdir="$hardcode_libdirs"
8830 eval rpath=\" $hardcode_libdir_flag_spec\"
8831 fi
8832 compile_rpath="$rpath"
8833
8834 rpath=
8835 hardcode_libdirs=
8836 for libdir in $finalize_rpath; do
8837 if test -n "$hardcode_libdir_flag_spec"; then
8838 if test -n "$hardcode_libdir_separator"; then
8839 if test -z "$hardcode_libdirs"; then
8840 hardcode_libdirs="$libdir"
8841 else
8842 # Just accumulate the unique libdirs.
8843 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8844 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8845 ;;
8846 *)
8847 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8848 ;;
8849 esac
8850 fi
8851 else
8852 eval flag=\"$hardcode_libdir_flag_spec\"
8853 func_append rpath " $flag"
8854 fi
8855 elif test -n "$runpath_var"; then
8856 case "$finalize_perm_rpath " in
8857 *" $libdir "*) ;;
8858 *) func_append finalize_perm_rpath " $libdir" ;;
8859 esac
8860 fi
8861 done
8862 # Substitute the hardcoded libdirs into the rpath.
8863 if test -n "$hardcode_libdir_separator" &&
8864 test -n "$hardcode_libdirs"; then
8865 libdir="$hardcode_libdirs"
8866 eval rpath=\" $hardcode_libdir_flag_spec\"
8867 fi
8868 finalize_rpath="$rpath"
8869
8870 if test -n "$libobjs" && test "$build_old_libs" = yes; then
8871 # Transform all the library objects into standard objects.
8872 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8873 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8874 fi
8875
8876 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
8877
8878 # template prelinking step
8879 if test -n "$prelink_cmds"; then
8880 func_execute_cmds "$prelink_cmds" 'exit $?'
8881 fi
8882
8883 wrappers_required=yes
8884 case $host in
8885 *cegcc* | *mingw32ce*)
8886 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8887 wrappers_required=no
8888 ;;
8889 *cygwin* | *mingw* )
8890 if test "$build_libtool_libs" != yes; then
8891 wrappers_required=no
8892 fi
8893 ;;
8894 *)
8895 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8896 wrappers_required=no
8897 fi
8898 ;;
8899 esac
8900 if test "$wrappers_required" = no; then
8901 # Replace the output file specification.
8902 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8903 link_command="$compile_command$compile_rpath"
8904
8905 # We have no uninstalled library dependencies, so finalize right now.
8906 exit_status=0
8907 func_show_eval "$link_command" 'exit_status=$?'
8908
8909 if test -n "$postlink_cmds"; then
8910 func_to_tool_file "$output"
8911 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8912 func_execute_cmds "$postlink_cmds" 'exit $?'
8913 fi
8914
8915 # Delete the generated files.
8916 if test -f "$output_objdir/${outputname}S.${objext}"; then
8917 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
8918 fi
8919
8920 exit $exit_status
8921 fi
8922
8923 if test -n "$compile_shlibpath$finalize_shlibpath"; then
8924 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
8925 fi
8926 if test -n "$finalize_shlibpath"; then
8927 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
8928 fi
8929
8930 compile_var=
8931 finalize_var=
8932 if test -n "$runpath_var"; then
8933 if test -n "$perm_rpath"; then
8934 # We should set the runpath_var.
8935 rpath=
8936 for dir in $perm_rpath; do
8937 func_append rpath "$dir:"
8938 done
8939 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
8940 fi
8941 if test -n "$finalize_perm_rpath"; then
8942 # We should set the runpath_var.
8943 rpath=
8944 for dir in $finalize_perm_rpath; do
8945 func_append rpath "$dir:"
8946 done
8947 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
8948 fi
8949 fi
8950
8951 if test "$no_install" = yes; then
8952 # We don't need to create a wrapper script.
8953 link_command="$compile_var$compile_command$compile_rpath"
8954 # Replace the output file specification.
8955 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8956 # Delete the old output file.
8957 $opt_dry_run || $RM $output
8958 # Link the executable and exit
8959 func_show_eval "$link_command" 'exit $?'
8960
8961 if test -n "$postlink_cmds"; then
8962 func_to_tool_file "$output"
8963 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8964 func_execute_cmds "$postlink_cmds" 'exit $?'
8965 fi
8966
8967 exit $EXIT_SUCCESS
8968 fi
8969
8970 if test "$hardcode_action" = relink; then
8971 # Fast installation is not supported
8972 link_command="$compile_var$compile_command$compile_rpath"
8973 relink_command="$finalize_var$finalize_command$finalize_rpath"
8974
8975 func_warning "this platform does not like uninstalled shared libraries"
8976 func_warning "\`$output' will be relinked during installation"
8977 else
8978 if test "$fast_install" != no; then
8979 link_command="$finalize_var$compile_command$finalize_rpath"
8980 if test "$fast_install" = yes; then
8981 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
8982 else
8983 # fast_install is set to needless
8984 relink_command=
8985 fi
8986 else
8987 link_command="$compile_var$compile_command$compile_rpath"
8988 relink_command="$finalize_var$finalize_command$finalize_rpath"
8989 fi
8990 fi
8991
8992 # Replace the output file specification.
8993 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8994
8995 # Delete the old output files.
8996 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
8997
8998 func_show_eval "$link_command" 'exit $?'
8999
9000 if test -n "$postlink_cmds"; then
9001 func_to_tool_file "$output_objdir/$outputname"
9002 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9003 func_execute_cmds "$postlink_cmds" 'exit $?'
9004 fi
9005
9006 # Now create the wrapper script.
9007 func_verbose "creating $output"
9008
9009 # Quote the relink command for shipping.
9010 if test -n "$relink_command"; then
9011 # Preserve any variables that may affect compiler behavior
9012 for var in $variables_saved_for_relink; do
9013 if eval test -z \"\${$var+set}\"; then
9014 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9015 elif eval var_value=\$$var; test -z "$var_value"; then
9016 relink_command="$var=; export $var; $relink_command"
9017 else
9018 func_quote_for_eval "$var_value"
9019 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9020 fi
9021 done
9022 relink_command="(cd `pwd`; $relink_command)"
9023 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9024 fi
9025
9026 # Only actually do things if not in dry run mode.
9027 $opt_dry_run || {
9028 # win32 will think the script is a binary if it has
9029 # a .exe suffix, so we strip it off here.
9030 case $output in
9031 *.exe) func_stripname '' '.exe' "$output"
9032 output=$func_stripname_result ;;
9033 esac
9034 # test for cygwin because mv fails w/o .exe extensions
9035 case $host in
9036 *cygwin*)
9037 exeext=.exe
9038 func_stripname '' '.exe' "$outputname"
9039 outputname=$func_stripname_result ;;
9040 *) exeext= ;;
9041 esac
9042 case $host in
9043 *cygwin* | *mingw* )
9044 func_dirname_and_basename "$output" "" "."
9045 output_name=$func_basename_result
9046 output_path=$func_dirname_result
9047 cwrappersource="$output_path/$objdir/lt-$output_name.c"
9048 cwrapper="$output_path/$output_name.exe"
9049 $RM $cwrappersource $cwrapper
9050 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
9051
9052 func_emit_cwrapperexe_src > $cwrappersource
9053
9054 # The wrapper executable is built using the $host compiler,
9055 # because it contains $host paths and files. If cross-
9056 # compiling, it, like the target executable, must be
9057 # executed on the $host or under an emulation environment.
9058 $opt_dry_run || {
9059 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
9060 $STRIP $cwrapper
9061 }
9062
9063 # Now, create the wrapper script for func_source use:
9064 func_ltwrapper_scriptname $cwrapper
9065 $RM $func_ltwrapper_scriptname_result
9066 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
9067 $opt_dry_run || {
9068 # note: this script will not be executed, so do not chmod.
9069 if test "x$build" = "x$host" ; then
9070 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
9071 else
9072 func_emit_wrapper no > $func_ltwrapper_scriptname_result
9073 fi
9074 }
9075 ;;
9076 * )
9077 $RM $output
9078 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
9079
9080 func_emit_wrapper no > $output
9081 chmod +x $output
9082 ;;
9083 esac
9084 }
9085 exit $EXIT_SUCCESS
9086 ;;
9087 esac
9088
9089 # See if we need to build an old-fashioned archive.
9090 for oldlib in $oldlibs; do
9091
9092 if test "$build_libtool_libs" = convenience; then
9093 oldobjs="$libobjs_save $symfileobj"
9094 addlibs="$convenience"
9095 build_libtool_libs=no
9096 else
9097 if test "$build_libtool_libs" = module; then
9098 oldobjs="$libobjs_save"
9099 build_libtool_libs=no
9100 else
9101 oldobjs="$old_deplibs $non_pic_objects"
9102 if test "$preload" = yes && test -f "$symfileobj"; then
9103 func_append oldobjs " $symfileobj"
9104 fi
9105 fi
9106 addlibs="$old_convenience"
9107 fi
9108
9109 if test -n "$addlibs"; then
9110 gentop="$output_objdir/${outputname}x"
9111 func_append generated " $gentop"
9112
9113 func_extract_archives $gentop $addlibs
9114 func_append oldobjs " $func_extract_archives_result"
9115 fi
9116
9117 # Do each command in the archive commands.
9118 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
9119 cmds=$old_archive_from_new_cmds
9120 else
9121
9122 # Add any objects from preloaded convenience libraries
9123 if test -n "$dlprefiles"; then
9124 gentop="$output_objdir/${outputname}x"
9125 func_append generated " $gentop"
9126
9127 func_extract_archives $gentop $dlprefiles
9128 func_append oldobjs " $func_extract_archives_result"
9129 fi
9130
9131 # POSIX demands no paths to be encoded in archives. We have
9132 # to avoid creating archives with duplicate basenames if we
9133 # might have to extract them afterwards, e.g., when creating a
9134 # static archive out of a convenience library, or when linking
9135 # the entirety of a libtool archive into another (currently
9136 # not supported by libtool).
9137 if (for obj in $oldobjs
9138 do
9139 func_basename "$obj"
9140 $ECHO "$func_basename_result"
9141 done | sort | sort -uc >/dev/null 2>&1); then
9142 :
9143 else
9144 echo "copying selected object files to avoid basename conflicts..."
9145 gentop="$output_objdir/${outputname}x"
9146 func_append generated " $gentop"
9147 func_mkdir_p "$gentop"
9148 save_oldobjs=$oldobjs
9149 oldobjs=
9150 counter=1
9151 for obj in $save_oldobjs
9152 do
9153 func_basename "$obj"
9154 objbase="$func_basename_result"
9155 case " $oldobjs " in
9156 " ") oldobjs=$obj ;;
9157 *[\ /]"$objbase "*)
9158 while :; do
9159 # Make sure we don't pick an alternate name that also
9160 # overlaps.
9161 newobj=lt$counter-$objbase
9162 func_arith $counter + 1
9163 counter=$func_arith_result
9164 case " $oldobjs " in
9165 *[\ /]"$newobj "*) ;;
9166 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
9167 esac
9168 done
9169 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
9170 func_append oldobjs " $gentop/$newobj"
9171 ;;
9172 *) func_append oldobjs " $obj" ;;
9173 esac
9174 done
9175 fi
9176 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9177 tool_oldlib=$func_to_tool_file_result
9178 eval cmds=\"$old_archive_cmds\"
9179
9180 func_len " $cmds"
9181 len=$func_len_result
9182 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9183 cmds=$old_archive_cmds
9184 elif test -n "$archiver_list_spec"; then
9185 func_verbose "using command file archive linking..."
9186 for obj in $oldobjs
9187 do
9188 func_to_tool_file "$obj"
9189 $ECHO "$func_to_tool_file_result"
9190 done > $output_objdir/$libname.libcmd
9191 func_to_tool_file "$output_objdir/$libname.libcmd"
9192 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
9193 cmds=$old_archive_cmds
9194 else
9195 # the command line is too long to link in one step, link in parts
9196 func_verbose "using piecewise archive linking..."
9197 save_RANLIB=$RANLIB
9198 RANLIB=:
9199 objlist=
9200 concat_cmds=
9201 save_oldobjs=$oldobjs
9202 oldobjs=
9203 # Is there a better way of finding the last object in the list?
9204 for obj in $save_oldobjs
9205 do
9206 last_oldobj=$obj
9207 done
9208 eval test_cmds=\"$old_archive_cmds\"
9209 func_len " $test_cmds"
9210 len0=$func_len_result
9211 len=$len0
9212 for obj in $save_oldobjs
9213 do
9214 func_len " $obj"
9215 func_arith $len + $func_len_result
9216 len=$func_arith_result
9217 func_append objlist " $obj"
9218 if test "$len" -lt "$max_cmd_len"; then
9219 :
9220 else
9221 # the above command should be used before it gets too long
9222 oldobjs=$objlist
9223 if test "$obj" = "$last_oldobj" ; then
9224 RANLIB=$save_RANLIB
9225 fi
9226 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9227 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
9228 objlist=
9229 len=$len0
9230 fi
9231 done
9232 RANLIB=$save_RANLIB
9233 oldobjs=$objlist
9234 if test "X$oldobjs" = "X" ; then
9235 eval cmds=\"\$concat_cmds\"
9236 else
9237 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
9238 fi
9239 fi
9240 fi
9241 func_execute_cmds "$cmds" 'exit $?'
9242 done
9243
9244 test -n "$generated" && \
9245 func_show_eval "${RM}r$generated"
9246
9247 # Now create the libtool archive.
9248 case $output in
9249 *.la)
9250 old_library=
9251 test "$build_old_libs" = yes && old_library="$libname.$libext"
9252 func_verbose "creating $output"
9253
9254 # Preserve any variables that may affect compiler behavior
9255 for var in $variables_saved_for_relink; do
9256 if eval test -z \"\${$var+set}\"; then
9257 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9258 elif eval var_value=\$$var; test -z "$var_value"; then
9259 relink_command="$var=; export $var; $relink_command"
9260 else
9261 func_quote_for_eval "$var_value"
9262 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9263 fi
9264 done
9265 # Quote the link command for shipping.
9266 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
9267 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9268 if test "$hardcode_automatic" = yes ; then
9269 relink_command=
9270 fi
9271
9272 # Only create the output if not a dry run.
9273 $opt_dry_run || {
9274 for installed in no yes; do
9275 if test "$installed" = yes; then
9276 if test -z "$install_libdir"; then
9277 break
9278 fi
9279 output="$output_objdir/$outputname"i
9280 # Replace all uninstalled libtool libraries with the installed ones
9281 newdependency_libs=
9282 for deplib in $dependency_libs; do
9283 case $deplib in
9284 *.la)
9285 func_basename "$deplib"
9286 name="$func_basename_result"
9287 func_resolve_sysroot "$deplib"
9288 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
9289 test -z "$libdir" && \
9290 func_fatal_error "\`$deplib' is not a valid libtool archive"
9291 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
9292 ;;
9293 -L*)
9294 func_stripname -L '' "$deplib"
9295 func_replace_sysroot "$func_stripname_result"
9296 func_append newdependency_libs " -L$func_replace_sysroot_result"
9297 ;;
9298 -R*)
9299 func_stripname -R '' "$deplib"
9300 func_replace_sysroot "$func_stripname_result"
9301 func_append newdependency_libs " -R$func_replace_sysroot_result"
9302 ;;
9303 *) func_append newdependency_libs " $deplib" ;;
9304 esac
9305 done
9306 dependency_libs="$newdependency_libs"
9307 newdlfiles=
9308
9309 for lib in $dlfiles; do
9310 case $lib in
9311 *.la)
9312 func_basename "$lib"
9313 name="$func_basename_result"
9314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9315 test -z "$libdir" && \
9316 func_fatal_error "\`$lib' is not a valid libtool archive"
9317 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
9318 ;;
9319 *) func_append newdlfiles " $lib" ;;
9320 esac
9321 done
9322 dlfiles="$newdlfiles"
9323 newdlprefiles=
9324 for lib in $dlprefiles; do
9325 case $lib in
9326 *.la)
9327 # Only pass preopened files to the pseudo-archive (for
9328 # eventual linking with the app. that links it) if we
9329 # didn't already link the preopened objects directly into
9330 # the library:
9331 func_basename "$lib"
9332 name="$func_basename_result"
9333 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9334 test -z "$libdir" && \
9335 func_fatal_error "\`$lib' is not a valid libtool archive"
9336 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
9337 ;;
9338 esac
9339 done
9340 dlprefiles="$newdlprefiles"
9341 else
9342 newdlfiles=
9343 for lib in $dlfiles; do
9344 case $lib in
9345 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9346 *) abs=`pwd`"/$lib" ;;
9347 esac
9348 func_append newdlfiles " $abs"
9349 done
9350 dlfiles="$newdlfiles"
9351 newdlprefiles=
9352 for lib in $dlprefiles; do
9353 case $lib in
9354 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9355 *) abs=`pwd`"/$lib" ;;
9356 esac
9357 func_append newdlprefiles " $abs"
9358 done
9359 dlprefiles="$newdlprefiles"
9360 fi
9361 $RM $output
9362 # place dlname in correct position for cygwin
9363 # In fact, it would be nice if we could use this code for all target
9364 # systems that can't hard-code library paths into their executables
9365 # and that have no shared library path variable independent of PATH,
9366 # but it turns out we can't easily determine that from inspecting
9367 # libtool variables, so we have to hard-code the OSs to which it
9368 # applies here; at the moment, that means platforms that use the PE
9369 # object format with DLL files. See the long comment at the top of
9370 # tests/bindir.at for full details.
9371 tdlname=$dlname
9372 case $host,$output,$installed,$module,$dlname in
9373 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9374 # If a -bindir argument was supplied, place the dll there.
9375 if test "x$bindir" != x ;
9376 then
9377 func_relative_path "$install_libdir" "$bindir"
9378 tdlname=$func_relative_path_result$dlname
9379 else
9380 # Otherwise fall back on heuristic.
9381 tdlname=../bin/$dlname
9382 fi
9383 ;;
9384 esac
9385 $ECHO > $output "\
9386 # $outputname - a libtool library file
9387 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
9388 #
9389 # Please DO NOT delete this file!
9390 # It is necessary for linking the library.
9391
9392 # The name that we can dlopen(3).
9393 dlname='$tdlname'
9394
9395 # Names of this library.
9396 library_names='$library_names'
9397
9398 # The name of the static archive.
9399 old_library='$old_library'
9400
9401 # Linker flags that can not go in dependency_libs.
9402 inherited_linker_flags='$new_inherited_linker_flags'
9403
9404 # Libraries that this one depends upon.
9405 dependency_libs='$dependency_libs'
9406
9407 # Names of additional weak libraries provided by this library
9408 weak_library_names='$weak_libs'
9409
9410 # Version information for $libname.
9411 current=$current
9412 age=$age
9413 revision=$revision
9414
9415 # Is this an already installed library?
9416 installed=$installed
9417
9418 # Should we warn about portability when linking against -modules?
9419 shouldnotlink=$module
9420
9421 # Files to dlopen/dlpreopen
9422 dlopen='$dlfiles'
9423 dlpreopen='$dlprefiles'
9424
9425 # Directory that this library needs to be installed in:
9426 libdir='$install_libdir'"
9427 if test "$installed" = no && test "$need_relink" = yes; then
9428 $ECHO >> $output "\
9429 relink_command=\"$relink_command\""
9430 fi
9431 done
9432 }
9433
9434 # Do a symbolic link so that the libtool archive can be found in
9435 # LD_LIBRARY_PATH before the program is installed.
9436 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
9437 ;;
9438 esac
9439 exit $EXIT_SUCCESS
9440 }
9441
9442 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
9443 func_mode_link ${1+"$@"}
9444
9445
9446 # func_mode_uninstall arg...
9447 func_mode_uninstall ()
9448 {
9449 $opt_debug
9450 RM="$nonopt"
9451 files=
9452 rmforce=
9453 exit_status=0
9454
9455 # This variable tells wrapper scripts just to set variables rather
9456 # than running their programs.
9457 libtool_install_magic="$magic"
9458
9459 for arg
9460 do
9461 case $arg in
9462 -f) func_append RM " $arg"; rmforce=yes ;;
9463 -*) func_append RM " $arg" ;;
9464 *) func_append files " $arg" ;;
9465 esac
9466 done
9467
9468 test -z "$RM" && \
9469 func_fatal_help "you must specify an RM program"
9470
9471 rmdirs=
9472
9473 for file in $files; do
9474 func_dirname "$file" "" "."
9475 dir="$func_dirname_result"
9476 if test "X$dir" = X.; then
9477 odir="$objdir"
9478 else
9479 odir="$dir/$objdir"
9480 fi
9481 func_basename "$file"
9482 name="$func_basename_result"
9483 test "$opt_mode" = uninstall && odir="$dir"
9484
9485 # Remember odir for removal later, being careful to avoid duplicates
9486 if test "$opt_mode" = clean; then
9487 case " $rmdirs " in
9488 *" $odir "*) ;;
9489 *) func_append rmdirs " $odir" ;;
9490 esac
9491 fi
9492
9493 # Don't error if the file doesn't exist and rm -f was used.
9494 if { test -L "$file"; } >/dev/null 2>&1 ||
9495 { test -h "$file"; } >/dev/null 2>&1 ||
9496 test -f "$file"; then
9497 :
9498 elif test -d "$file"; then
9499 exit_status=1
9500 continue
9501 elif test "$rmforce" = yes; then
9502 continue
9503 fi
9504
9505 rmfiles="$file"
9506
9507 case $name in
9508 *.la)
9509 # Possibly a libtool archive, so verify it.
9510 if func_lalib_p "$file"; then
9511 func_source $dir/$name
9512
9513 # Delete the libtool libraries and symlinks.
9514 for n in $library_names; do
9515 func_append rmfiles " $odir/$n"
9516 done
9517 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9518
9519 case "$opt_mode" in
9520 clean)
9521 case " $library_names " in
9522 *" $dlname "*) ;;
9523 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
9524 esac
9525 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
9526 ;;
9527 uninstall)
9528 if test -n "$library_names"; then
9529 # Do each command in the postuninstall commands.
9530 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9531 fi
9532
9533 if test -n "$old_library"; then
9534 # Do each command in the old_postuninstall commands.
9535 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9536 fi
9537 # FIXME: should reinstall the best remaining shared library.
9538 ;;
9539 esac
9540 fi
9541 ;;
9542
9543 *.lo)
9544 # Possibly a libtool object, so verify it.
9545 if func_lalib_p "$file"; then
9546
9547 # Read the .lo file
9548 func_source $dir/$name
9549
9550 # Add PIC object to the list of files to remove.
9551 if test -n "$pic_object" &&
9552 test "$pic_object" != none; then
9553 func_append rmfiles " $dir/$pic_object"
9554 fi
9555
9556 # Add non-PIC object to the list of files to remove.
9557 if test -n "$non_pic_object" &&
9558 test "$non_pic_object" != none; then
9559 func_append rmfiles " $dir/$non_pic_object"
9560 fi
9561 fi
9562 ;;
9563
9564 *)
9565 if test "$opt_mode" = clean ; then
9566 noexename=$name
9567 case $file in
9568 *.exe)
9569 func_stripname '' '.exe' "$file"
9570 file=$func_stripname_result
9571 func_stripname '' '.exe' "$name"
9572 noexename=$func_stripname_result
9573 # $file with .exe has already been added to rmfiles,
9574 # add $file without .exe
9575 func_append rmfiles " $file"
9576 ;;
9577 esac
9578 # Do a test to see if this is a libtool program.
9579 if func_ltwrapper_p "$file"; then
9580 if func_ltwrapper_executable_p "$file"; then
9581 func_ltwrapper_scriptname "$file"
9582 relink_command=
9583 func_source $func_ltwrapper_scriptname_result
9584 func_append rmfiles " $func_ltwrapper_scriptname_result"
9585 else
9586 relink_command=
9587 func_source $dir/$noexename
9588 fi
9589
9590 # note $name still contains .exe if it was in $file originally
9591 # as does the version of $file that was added into $rmfiles
9592 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
9593 if test "$fast_install" = yes && test -n "$relink_command"; then
9594 func_append rmfiles " $odir/lt-$name"
9595 fi
9596 if test "X$noexename" != "X$name" ; then
9597 func_append rmfiles " $odir/lt-${noexename}.c"
9598 fi
9599 fi
9600 fi
9601 ;;
9602 esac
9603 func_show_eval "$RM $rmfiles" 'exit_status=1'
9604 done
9605
9606 # Try to remove the ${objdir}s in the directories where we deleted files
9607 for dir in $rmdirs; do
9608 if test -d "$dir"; then
9609 func_show_eval "rmdir $dir >/dev/null 2>&1"
9610 fi
9611 done
9612
9613 exit $exit_status
9614 }
9615
9616 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
9617 func_mode_uninstall ${1+"$@"}
9618
9619 test -z "$opt_mode" && {
9620 help="$generic_help"
9621 func_fatal_help "you must specify a MODE"
9622 }
9623
9624 test -z "$exec_cmd" && \
9625 func_fatal_help "invalid operation mode \`$opt_mode'"
9626
9627 if test -n "$exec_cmd"; then
9628 eval exec "$exec_cmd"
9629 exit $EXIT_FAILURE
9630 fi
9631
9632 exit $exit_status
9633
9634
9635 # The TAGs below are defined such that we never get into a situation
9636 # in which we disable both kinds of libraries. Given conflicting
9637 # choices, we go for a static library, that is the most portable,
9638 # since we can't tell whether shared libraries were disabled because
9639 # the user asked for that or because the platform doesn't support
9640 # them. This is particularly important on AIX, because we don't
9641 # support having both static and shared libraries enabled at the same
9642 # time on that platform, so we default to a shared-only configuration.
9643 # If a disable-shared tag is given, we'll fallback to a static-only
9644 # configuration. But we'll never go from static-only to shared-only.
9645
9646 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
9647 build_libtool_libs=no
9648 build_old_libs=yes
9649 # ### END LIBTOOL TAG CONFIG: disable-shared
9650
9651 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
9652 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
9653 # ### END LIBTOOL TAG CONFIG: disable-static
9654
9655 # Local Variables:
9656 # mode:shell-script
9657 # sh-indentation:2
9658 # End:
9659 # vi:sw=2
9660
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [lt_p=${PACKAGE-default}
331 case $withval in
332 yes|no) pic_mode=$withval ;;
333 *)
334 pic_mode=default
335 # Look at the argument we got. We use all the common list separators.
336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
337 for lt_pkg in $withval; do
338 IFS="$lt_save_ifs"
339 if test "X$lt_pkg" = "X$lt_p"; then
340 pic_mode=yes
341 fi
342 done
343 IFS="$lt_save_ifs"
344 ;;
345 esac],
346 [pic_mode=default])
347
348 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
349
350 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
351 ])# _LT_WITH_PIC
352
353 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
354 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
355
356 # Old name:
357 AU_DEFUN([AC_LIBTOOL_PICMODE],
358 [_LT_SET_OPTION([LT_INIT], [pic-only])
359 AC_DIAGNOSE([obsolete],
360 [$0: Remove this warning and the call to _LT_SET_OPTION when you
361 put the `pic-only' option into LT_INIT's first parameter.])
362 ])
363
364 dnl aclocal-1.4 backwards compatibility:
365 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
366
367 ## ----------------- ##
368 ## LTDL_INIT Options ##
369 ## ----------------- ##
370
371 m4_define([_LTDL_MODE], [])
372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
373 [m4_define([_LTDL_MODE], [nonrecursive])])
374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
375 [m4_define([_LTDL_MODE], [recursive])])
376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
377 [m4_define([_LTDL_MODE], [subproject])])
378
379 m4_define([_LTDL_TYPE], [])
380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
381 [m4_define([_LTDL_TYPE], [installable])])
382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
383 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3337 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.2])
15 m4_define([LT_PACKAGE_REVISION], [1.3337])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.2'
19 macro_revision='1.3337'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2012-01-06.13; # UTC
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
6 # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 if test $# -eq 0; then
28 echo 1>&2 "Try \`$0 --help' for more information"
29 exit 1
30 fi
31
32 run=:
33 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
34 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
35
36 # In the cases where this matters, `missing' is being run in the
37 # srcdir already.
38 if test -f configure.ac; then
39 configure_ac=configure.ac
40 else
41 configure_ac=configure.in
42 fi
43
44 msg="missing on your system"
45
46 case $1 in
47 --run)
48 # Try to run requested program, and just exit if it succeeds.
49 run=
50 shift
51 "$@" && exit 0
52 # Exit code 63 means version mismatch. This often happens
53 # when the user try to use an ancient version of a tool on
54 # a file that requires a minimum version. In this case we
55 # we should proceed has if the program had been absent, or
56 # if --run hadn't been passed.
57 if test $? = 63; then
58 run=:
59 msg="probably too old"
60 fi
61 ;;
62
63 -h|--h|--he|--hel|--help)
64 echo "\
65 $0 [OPTION]... PROGRAM [ARGUMENT]...
66
67 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68 error status if there is no known handling for PROGRAM.
69
70 Options:
71 -h, --help display this help and exit
72 -v, --version output version information and exit
73 --run try to run the given command, and emulate it if it fails
74
75 Supported PROGRAM values:
76 aclocal touch file \`aclocal.m4'
77 autoconf touch file \`configure'
78 autoheader touch file \`config.h.in'
79 autom4te touch the output file, or create a stub one
80 automake touch all \`Makefile.in' files
81 bison create \`y.tab.[ch]', if possible, from existing .[ch]
82 flex create \`lex.yy.c', if possible, from existing .c
83 help2man touch the output file
84 lex create \`lex.yy.c', if possible, from existing .c
85 makeinfo touch the output file
86 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
87
88 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
89 \`g' are ignored when checking the name.
90
91 Send bug reports to <bug-automake@gnu.org>."
92 exit $?
93 ;;
94
95 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96 echo "missing $scriptversion (GNU Automake)"
97 exit $?
98 ;;
99
100 -*)
101 echo 1>&2 "$0: Unknown \`$1' option"
102 echo 1>&2 "Try \`$0 --help' for more information"
103 exit 1
104 ;;
105
106 esac
107
108 # normalize program name to check for.
109 program=`echo "$1" | sed '
110 s/^gnu-//; t
111 s/^gnu//; t
112 s/^g//; t'`
113
114 # Now exit if we have it, but it failed. Also exit now if we
115 # don't have it and --version was passed (most likely to detect
116 # the program). This is about non-GNU programs, so use $1 not
117 # $program.
118 case $1 in
119 lex*|yacc*)
120 # Not GNU programs, they don't have --version.
121 ;;
122
123 *)
124 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
125 # We have it, but it failed.
126 exit 1
127 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
128 # Could not run --version or --help. This is probably someone
129 # running `$TOOL --version' or `$TOOL --help' to check whether
130 # $TOOL exists and not knowing $TOOL uses missing.
131 exit 1
132 fi
133 ;;
134 esac
135
136 # If it does not exist, or fails to run (possibly an outdated version),
137 # try to emulate it.
138 case $program in
139 aclocal*)
140 echo 1>&2 "\
141 WARNING: \`$1' is $msg. You should only need it if
142 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
143 to install the \`Automake' and \`Perl' packages. Grab them from
144 any GNU archive site."
145 touch aclocal.m4
146 ;;
147
148 autoconf*)
149 echo 1>&2 "\
150 WARNING: \`$1' is $msg. You should only need it if
151 you modified \`${configure_ac}'. You might want to install the
152 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
153 archive site."
154 touch configure
155 ;;
156
157 autoheader*)
158 echo 1>&2 "\
159 WARNING: \`$1' is $msg. You should only need it if
160 you modified \`acconfig.h' or \`${configure_ac}'. You might want
161 to install the \`Autoconf' and \`GNU m4' packages. Grab them
162 from any GNU archive site."
163 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
164 test -z "$files" && files="config.h"
165 touch_files=
166 for f in $files; do
167 case $f in
168 *:*) touch_files="$touch_files "`echo "$f" |
169 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
170 *) touch_files="$touch_files $f.in";;
171 esac
172 done
173 touch $touch_files
174 ;;
175
176 automake*)
177 echo 1>&2 "\
178 WARNING: \`$1' is $msg. You should only need it if
179 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
180 You might want to install the \`Automake' and \`Perl' packages.
181 Grab them from any GNU archive site."
182 find . -type f -name Makefile.am -print |
183 sed 's/\.am$/.in/' |
184 while read f; do touch "$f"; done
185 ;;
186
187 autom4te*)
188 echo 1>&2 "\
189 WARNING: \`$1' is needed, but is $msg.
190 You might have modified some files without having the
191 proper tools for further handling them.
192 You can get \`$1' as part of \`Autoconf' from any GNU
193 archive site."
194
195 file=`echo "$*" | sed -n "$sed_output"`
196 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
197 if test -f "$file"; then
198 touch $file
199 else
200 test -z "$file" || exec >$file
201 echo "#! /bin/sh"
202 echo "# Created by GNU Automake missing as a replacement of"
203 echo "# $ $@"
204 echo "exit 0"
205 chmod +x $file
206 exit 1
207 fi
208 ;;
209
210 bison*|yacc*)
211 echo 1>&2 "\
212 WARNING: \`$1' $msg. You should only need it if
213 you modified a \`.y' file. You may need the \`Bison' package
214 in order for those modifications to take effect. You can get
215 \`Bison' from any GNU archive site."
216 rm -f y.tab.c y.tab.h
217 if test $# -ne 1; then
218 eval LASTARG=\${$#}
219 case $LASTARG in
220 *.y)
221 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
222 if test -f "$SRCFILE"; then
223 cp "$SRCFILE" y.tab.c
224 fi
225 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
226 if test -f "$SRCFILE"; then
227 cp "$SRCFILE" y.tab.h
228 fi
229 ;;
230 esac
231 fi
232 if test ! -f y.tab.h; then
233 echo >y.tab.h
234 fi
235 if test ! -f y.tab.c; then
236 echo 'main() { return 0; }' >y.tab.c
237 fi
238 ;;
239
240 lex*|flex*)
241 echo 1>&2 "\
242 WARNING: \`$1' is $msg. You should only need it if
243 you modified a \`.l' file. You may need the \`Flex' package
244 in order for those modifications to take effect. You can get
245 \`Flex' from any GNU archive site."
246 rm -f lex.yy.c
247 if test $# -ne 1; then
248 eval LASTARG=\${$#}
249 case $LASTARG in
250 *.l)
251 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
252 if test -f "$SRCFILE"; then
253 cp "$SRCFILE" lex.yy.c
254 fi
255 ;;
256 esac
257 fi
258 if test ! -f lex.yy.c; then
259 echo 'main() { return 0; }' >lex.yy.c
260 fi
261 ;;
262
263 help2man*)
264 echo 1>&2 "\
265 WARNING: \`$1' is $msg. You should only need it if
266 you modified a dependency of a manual page. You may need the
267 \`Help2man' package in order for those modifications to take
268 effect. You can get \`Help2man' from any GNU archive site."
269
270 file=`echo "$*" | sed -n "$sed_output"`
271 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
272 if test -f "$file"; then
273 touch $file
274 else
275 test -z "$file" || exec >$file
276 echo ".ab help2man is required to generate this page"
277 exit $?
278 fi
279 ;;
280
281 makeinfo*)
282 echo 1>&2 "\
283 WARNING: \`$1' is $msg. You should only need it if
284 you modified a \`.texi' or \`.texinfo' file, or any other file
285 indirectly affecting the aspect of the manual. The spurious
286 call might also be the consequence of using a buggy \`make' (AIX,
287 DU, IRIX). You might want to install the \`Texinfo' package or
288 the \`GNU make' package. Grab either from any GNU archive site."
289 # The file to touch is that specified with -o ...
290 file=`echo "$*" | sed -n "$sed_output"`
291 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
292 if test -z "$file"; then
293 # ... or it is the one specified with @setfilename ...
294 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
295 file=`sed -n '
296 /^@setfilename/{
297 s/.* \([^ ]*\) *$/\1/
298 p
299 q
300 }' $infile`
301 # ... or it is derived from the source name (dir/f.texi becomes f.info)
302 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
303 fi
304 # If the file does not exist, the user really needs makeinfo;
305 # let's fail without touching anything.
306 test -f $file || exit 1
307 touch $file
308 ;;
309
310 *)
311 echo 1>&2 "\
312 WARNING: \`$1' is needed, and is $msg.
313 You might have modified some files without having the
314 proper tools for further handling them. Check the \`README' file,
315 it often tells you about the needed prerequisites for installing
316 this package. You may also peek at any GNU archive site, in case
317 some other package would contain this missing \`$1' program."
318 exit 1
319 ;;
320 esac
321
322 exit 0
323
324 # Local variables:
325 # eval: (add-hook 'write-file-hooks 'time-stamp)
326 # time-stamp-start: "scriptversion="
327 # time-stamp-format: "%:y-%02m-%02d.%02H"
328 # time-stamp-time-zone: "UTC"
329 # time-stamp-end: "; # UTC"
330 # End:
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-06-10'
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-02-10'
77
88 # This file is free software; you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License as published by
1616 # General Public License for more details.
1717 #
1818 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
19 # along with this program; if not, see <http://www.gnu.org/licenses/>.
2220 #
2321 # As a special exception to the GNU General Public License, if you
2422 # distribute this file as part of a program that contains a
2624 # the same distribution terms that you use for the rest of that program.
2725
2826
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
27 # Originally written by Per Bothner. Please send patches (context
28 # diff format) to <config-patches@gnu.org> and include a ChangeLog
29 # entry.
3230 #
3331 # This script attempts to guess a canonical system name similar to
3432 # config.sub. If it succeeds, it prints the system name on stdout, and
3533 # exits with 0. Otherwise, it exits with 1.
3634 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
35 # You can get the latest version of this script from:
36 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3937
4038 me=`echo "$0" | sed -e 's,.*/,,'`
4139
5553 GNU config.guess ($timestamp)
5654
5755 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
59 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
57 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
58 Free Software Foundation, Inc.
6059
6160 This is free software; see the source for copying conditions. There is NO
6261 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
143142 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144143 *:NetBSD:*:*)
145144 # NetBSD (nbsd) targets should (where applicable) match one or
146 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
145 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
147146 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
148147 # switched to ELF, *-*-netbsd* would select the old
149148 # object file format. This provides both forward
179178 fi
180179 ;;
181180 *)
182 os=netbsd
181 os=netbsd
183182 ;;
184183 esac
185184 # The OS release
222221 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223222 ;;
224223 *5.*)
225 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226225 ;;
227226 esac
228227 # According to Compaq, /usr/sbin/psrinfo has been available on
268267 # A Xn.n version is an unreleased experimental baselevel.
269268 # 1.2 uses "1.2" for uname -r.
270269 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271 exit ;;
270 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
271 exitcode=$?
272 trap '' 0
273 exit $exitcode ;;
272274 Alpha\ *:Windows_NT*:*)
273275 # How do we know it's Interix rather than the generic POSIX subsystem?
274276 # Should we change UNAME_MACHINE based on the output of uname instead
294296 echo s390-ibm-zvmoe
295297 exit ;;
296298 *:OS400:*:*)
297 echo powerpc-ibm-os400
299 echo powerpc-ibm-os400
298300 exit ;;
299301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300302 echo arm-acorn-riscix${UNAME_RELEASE}
331333 exit ;;
332334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
333335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
334339 exit ;;
335340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336341 eval $set_cc_for_build
390395 # MiNT. But MiNT is downward compatible to TOS, so this should
391396 # be no problem.
392397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
393 echo m68k-atari-mint${UNAME_RELEASE}
398 echo m68k-atari-mint${UNAME_RELEASE}
394399 exit ;;
395400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
396401 echo m68k-atari-mint${UNAME_RELEASE}
397 exit ;;
402 exit ;;
398403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
399 echo m68k-atari-mint${UNAME_RELEASE}
404 echo m68k-atari-mint${UNAME_RELEASE}
400405 exit ;;
401406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
402 echo m68k-milan-mint${UNAME_RELEASE}
403 exit ;;
407 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;;
404409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
405 echo m68k-hades-mint${UNAME_RELEASE}
406 exit ;;
410 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;;
407412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
408 echo m68k-unknown-mint${UNAME_RELEASE}
409 exit ;;
413 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;;
410415 m68k:machten:*:*)
411416 echo m68k-apple-machten${UNAME_RELEASE}
412417 exit ;;
476481 echo m88k-motorola-sysv3
477482 exit ;;
478483 AViiON:dgux:*:*)
479 # DG/UX returns AViiON for all architectures
480 UNAME_PROCESSOR=`/usr/bin/uname -p`
484 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p`
481486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
482487 then
483488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
490495 else
491496 echo i586-dg-dgux${UNAME_RELEASE}
492497 fi
493 exit ;;
498 exit ;;
494499 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
495500 echo m88k-dolphin-sysv3
496501 exit ;;
547552 echo rs6000-ibm-aix3.2
548553 fi
549554 exit ;;
550 *:AIX:*:[456])
555 *:AIX:*:[4567])
551556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
552557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
553558 IBM_ARCH=rs6000
590595 9000/[678][0-9][0-9])
591596 if [ -x /usr/bin/getconf ]; then
592597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
593 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
594 case "${sc_cpu_version}" in
595 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
596 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
597 532) # CPU_PA_RISC2_0
598 case "${sc_kernel_bits}" in
599 32) HP_ARCH="hppa2.0n" ;;
600 64) HP_ARCH="hppa2.0w" ;;
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;;
601606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
602 esac ;;
603 esac
607 esac ;;
608 esac
604609 fi
605610 if [ "${HP_ARCH}" = "" ]; then
606611 eval $set_cc_for_build
607 sed 's/^ //' << EOF >$dummy.c
608
609 #define _HPUX_SOURCE
610 #include <stdlib.h>
611 #include <unistd.h>
612
613 int main ()
614 {
615 #if defined(_SC_KERNEL_BITS)
616 long bits = sysconf(_SC_KERNEL_BITS);
617 #endif
618 long cpu = sysconf (_SC_CPU_VERSION);
619
620 switch (cpu)
621 {
622 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
623 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
624 case CPU_PA_RISC2_0:
625 #if defined(_SC_KERNEL_BITS)
626 switch (bits)
627 {
628 case 64: puts ("hppa2.0w"); break;
629 case 32: puts ("hppa2.0n"); break;
630 default: puts ("hppa2.0"); break;
631 } break;
632 #else /* !defined(_SC_KERNEL_BITS) */
633 puts ("hppa2.0"); break;
634 #endif
635 default: puts ("hppa1.0"); break;
636 }
637 exit (0);
638 }
612 sed 's/^ //' << EOF >$dummy.c
613
614 #define _HPUX_SOURCE
615 #include <stdlib.h>
616 #include <unistd.h>
617
618 int main ()
619 {
620 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif
623 long cpu = sysconf (_SC_CPU_VERSION);
624
625 switch (cpu)
626 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS)
631 switch (bits)
632 {
633 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break;
636 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break;
639 #endif
640 default: puts ("hppa1.0"); break;
641 }
642 exit (0);
643 }
639644 EOF
640645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
641646 test -z "$HP_ARCH" && HP_ARCH=hppa
726731 exit ;;
727732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
728733 echo c1-convex-bsd
729 exit ;;
734 exit ;;
730735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
731736 if getsysinfo -f scalar_acc
732737 then echo c32-convex-bsd
733738 else echo c2-convex-bsd
734739 fi
735 exit ;;
740 exit ;;
736741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
737742 echo c34-convex-bsd
738 exit ;;
743 exit ;;
739744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
740745 echo c38-convex-bsd
741 exit ;;
746 exit ;;
742747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
743748 echo c4-convex-bsd
744 exit ;;
749 exit ;;
745750 CRAY*Y-MP:*:*:*)
746751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
747752 exit ;;
765770 exit ;;
766771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
767772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
768 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
769 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
770 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
771 exit ;;
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
772777 5000:UNIX_System_V:4.*:*)
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
775 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776781 exit ;;
777782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
778783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
785790 exit ;;
786791 *:FreeBSD:*:*)
787 case ${UNAME_MACHINE} in
788 pc98)
789 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
792 UNAME_PROCESSOR=`/usr/bin/uname -p`
793 case ${UNAME_PROCESSOR} in
790794 amd64)
791795 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
792796 *)
793 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
794798 esac
795799 exit ;;
796800 i*:CYGWIN*:*)
799803 *:MINGW*:*)
800804 echo ${UNAME_MACHINE}-pc-mingw32
801805 exit ;;
806 i*:MSYS*:*)
807 echo ${UNAME_MACHINE}-pc-msys
808 exit ;;
802809 i*:windows32*:*)
803 # uname -m includes "-pc" on this system.
804 echo ${UNAME_MACHINE}-mingw32
810 # uname -m includes "-pc" on this system.
811 echo ${UNAME_MACHINE}-mingw32
805812 exit ;;
806813 i*:PW*:*)
807814 echo ${UNAME_MACHINE}-pc-pw32
808815 exit ;;
809 *:Interix*:[3456]*)
810 case ${UNAME_MACHINE} in
816 *:Interix*:*)
817 case ${UNAME_MACHINE} in
811818 x86)
812819 echo i586-pc-interix${UNAME_RELEASE}
813820 exit ;;
814 EM64T | authenticamd | genuineintel)
821 authenticamd | genuineintel | EM64T)
815822 echo x86_64-unknown-interix${UNAME_RELEASE}
816823 exit ;;
817824 IA64)
853860 i*86:Minix:*:*)
854861 echo ${UNAME_MACHINE}-pc-minix
855862 exit ;;
863 aarch64:Linux:*:*)
864 echo ${UNAME_MACHINE}-unknown-linux-gnu
865 exit ;;
866 aarch64_be:Linux:*:*)
867 UNAME_MACHINE=aarch64_be
868 echo ${UNAME_MACHINE}-unknown-linux-gnu
869 exit ;;
870 alpha:Linux:*:*)
871 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
872 EV5) UNAME_MACHINE=alphaev5 ;;
873 EV56) UNAME_MACHINE=alphaev56 ;;
874 PCA56) UNAME_MACHINE=alphapca56 ;;
875 PCA57) UNAME_MACHINE=alphapca56 ;;
876 EV6) UNAME_MACHINE=alphaev6 ;;
877 EV67) UNAME_MACHINE=alphaev67 ;;
878 EV68*) UNAME_MACHINE=alphaev68 ;;
879 esac
880 objdump --private-headers /bin/sh | grep -q ld.so.1
881 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
882 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
883 exit ;;
856884 arm*:Linux:*:*)
857885 eval $set_cc_for_build
858886 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
860888 then
861889 echo ${UNAME_MACHINE}-unknown-linux-gnu
862890 else
863 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
891 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
892 | grep -q __ARM_PCS_VFP
893 then
894 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
895 else
896 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
897 fi
864898 fi
865899 exit ;;
866900 avr32*:Linux:*:*)
867901 echo ${UNAME_MACHINE}-unknown-linux-gnu
868902 exit ;;
869903 cris:Linux:*:*)
870 echo cris-axis-linux-gnu
904 echo ${UNAME_MACHINE}-axis-linux-gnu
871905 exit ;;
872906 crisv32:Linux:*:*)
873 echo crisv32-axis-linux-gnu
907 echo ${UNAME_MACHINE}-axis-linux-gnu
874908 exit ;;
875909 frv:Linux:*:*)
876 echo frv-unknown-linux-gnu
910 echo ${UNAME_MACHINE}-unknown-linux-gnu
911 exit ;;
912 hexagon:Linux:*:*)
913 echo ${UNAME_MACHINE}-unknown-linux-gnu
914 exit ;;
915 i*86:Linux:*:*)
916 LIBC=gnu
917 eval $set_cc_for_build
918 sed 's/^ //' << EOF >$dummy.c
919 #ifdef __dietlibc__
920 LIBC=dietlibc
921 #endif
922 EOF
923 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
924 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
877925 exit ;;
878926 ia64:Linux:*:*)
879927 echo ${UNAME_MACHINE}-unknown-linux-gnu
900948 #endif
901949 #endif
902950 EOF
903 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
904 /^CPU/{
905 s: ::g
906 p
907 }'`"
951 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
908952 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
909953 ;;
910954 or32:Linux:*:*)
911 echo or32-unknown-linux-gnu
912 exit ;;
913 ppc:Linux:*:*)
914 echo powerpc-unknown-linux-gnu
915 exit ;;
916 ppc64:Linux:*:*)
917 echo powerpc64-unknown-linux-gnu
918 exit ;;
919 alpha:Linux:*:*)
920 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
921 EV5) UNAME_MACHINE=alphaev5 ;;
922 EV56) UNAME_MACHINE=alphaev56 ;;
923 PCA56) UNAME_MACHINE=alphapca56 ;;
924 PCA57) UNAME_MACHINE=alphapca56 ;;
925 EV6) UNAME_MACHINE=alphaev6 ;;
926 EV67) UNAME_MACHINE=alphaev67 ;;
927 EV68*) UNAME_MACHINE=alphaev68 ;;
928 esac
929 objdump --private-headers /bin/sh | grep -q ld.so.1
930 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
931 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
955 echo ${UNAME_MACHINE}-unknown-linux-gnu
932956 exit ;;
933957 padre:Linux:*:*)
934958 echo sparc-unknown-linux-gnu
959 exit ;;
960 parisc64:Linux:*:* | hppa64:Linux:*:*)
961 echo hppa64-unknown-linux-gnu
935962 exit ;;
936963 parisc:Linux:*:* | hppa:Linux:*:*)
937964 # Look for CPU level
941968 *) echo hppa-unknown-linux-gnu ;;
942969 esac
943970 exit ;;
944 parisc64:Linux:*:* | hppa64:Linux:*:*)
945 echo hppa64-unknown-linux-gnu
971 ppc64:Linux:*:*)
972 echo powerpc64-unknown-linux-gnu
973 exit ;;
974 ppc:Linux:*:*)
975 echo powerpc-unknown-linux-gnu
946976 exit ;;
947977 s390:Linux:*:* | s390x:Linux:*:*)
948978 echo ${UNAME_MACHINE}-ibm-linux
949979 exit ;;
950980 sh64*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-gnu
981 echo ${UNAME_MACHINE}-unknown-linux-gnu
952982 exit ;;
953983 sh*:Linux:*:*)
954984 echo ${UNAME_MACHINE}-unknown-linux-gnu
956986 sparc:Linux:*:* | sparc64:Linux:*:*)
957987 echo ${UNAME_MACHINE}-unknown-linux-gnu
958988 exit ;;
989 tile*:Linux:*:*)
990 echo ${UNAME_MACHINE}-unknown-linux-gnu
991 exit ;;
959992 vax:Linux:*:*)
960993 echo ${UNAME_MACHINE}-dec-linux-gnu
961994 exit ;;
962995 x86_64:Linux:*:*)
963 echo x86_64-unknown-linux-gnu
996 echo ${UNAME_MACHINE}-unknown-linux-gnu
964997 exit ;;
965998 xtensa*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu
967 exit ;;
968 i*86:Linux:*:*)
969 # The BFD linker knows what the default object file format is, so
970 # first see if it will tell us. cd to the root directory to prevent
971 # problems with other programs or directories called `ld' in the path.
972 # Set LC_ALL=C to ensure ld outputs messages in English.
973 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
974 | sed -ne '/supported targets:/!d
975 s/[ ][ ]*/ /g
976 s/.*supported targets: *//
977 s/ .*//
978 p'`
979 case "$ld_supported_targets" in
980 elf32-i386)
981 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
982 ;;
983 esac
984 # Determine whether the default compiler is a.out or elf
985 eval $set_cc_for_build
986 sed 's/^ //' << EOF >$dummy.c
987 #include <features.h>
988 #ifdef __ELF__
989 # ifdef __GLIBC__
990 # if __GLIBC__ >= 2
991 LIBC=gnu
992 # else
993 LIBC=gnulibc1
994 # endif
995 # else
996 LIBC=gnulibc1
997 # endif
998 #else
999 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1000 LIBC=gnu
1001 #else
1002 LIBC=gnuaout
1003 #endif
1004 #endif
1005 #ifdef __dietlibc__
1006 LIBC=dietlibc
1007 #endif
1008 EOF
1009 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1010 /^LIBC/{
1011 s: ::g
1012 p
1013 }'`"
1014 test x"${LIBC}" != x && {
1015 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1016 exit
1017 }
1018 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1019 ;;
999 echo ${UNAME_MACHINE}-unknown-linux-gnu
1000 exit ;;
10201001 i*86:DYNIX/ptx:4*:*)
10211002 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10221003 # earlier versions are messed up and put the nodename in both
10241005 echo i386-sequent-sysv4
10251006 exit ;;
10261007 i*86:UNIX_SV:4.2MP:2.*)
1027 # Unixware is an offshoot of SVR4, but it has its own version
1028 # number series starting with 2...
1029 # I am not positive that other SVR4 systems won't match this,
1008 # Unixware is an offshoot of SVR4, but it has its own version
1009 # number series starting with 2...
1010 # I am not positive that other SVR4 systems won't match this,
10301011 # I just have to hope. -- rms.
1031 # Use sysv4.2uw... so that sysv4* matches it.
1012 # Use sysv4.2uw... so that sysv4* matches it.
10321013 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
10331014 exit ;;
10341015 i*86:OS/2:*:*)
10601041 fi
10611042 exit ;;
10621043 i*86:*:5:[678]*)
1063 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1044 # UnixWare 7.x, OpenUNIX and OpenServer 6.
10641045 case `/bin/uname -X | grep "^Machine"` in
10651046 *486*) UNAME_MACHINE=i486 ;;
10661047 *Pentium) UNAME_MACHINE=i586 ;;
10881069 exit ;;
10891070 pc:*:*:*)
10901071 # Left here for compatibility:
1091 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1092 # the processor, so we play safe by assuming i586.
1072 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1073 # the processor, so we play safe by assuming i586.
10931074 # Note: whatever this is, it MUST be the same as what config.sub
10941075 # prints for the "djgpp" host, or else GDB configury will decide that
10951076 # this is a cross-build.
10961077 echo i586-pc-msdosdjgpp
1097 exit ;;
1078 exit ;;
10981079 Intel:Mach:3*:*)
10991080 echo i386-pc-mach3
11001081 exit ;;
11291110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11301111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
11311112 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1132 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1133 && { echo i486-ncr-sysv4; exit; } ;;
1113 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1114 && { echo i486-ncr-sysv4; exit; } ;;
11341115 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
11351116 OS_REL='.3'
11361117 test -r /etc/.relid \
11731154 echo ns32k-sni-sysv
11741155 fi
11751156 exit ;;
1176 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1177 # says <Richard.M.Bartel@ccMail.Census.GOV>
1178 echo i586-unisys-sysv4
1179 exit ;;
1157 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1158 # says <Richard.M.Bartel@ccMail.Census.GOV>
1159 echo i586-unisys-sysv4
1160 exit ;;
11801161 *:UNIX_System_V:4*:FTX*)
11811162 # From Gerald Hewes <hewes@openmarket.com>.
11821163 # How about differentiating between stratus architectures? -djm
12021183 exit ;;
12031184 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12041185 if [ -d /usr/nec ]; then
1205 echo mips-nec-sysv${UNAME_RELEASE}
1186 echo mips-nec-sysv${UNAME_RELEASE}
12061187 else
1207 echo mips-unknown-sysv${UNAME_RELEASE}
1208 fi
1209 exit ;;
1188 echo mips-unknown-sysv${UNAME_RELEASE}
1189 fi
1190 exit ;;
12101191 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12111192 echo powerpc-be-beos
12121193 exit ;;
12461227 *:Darwin:*:*)
12471228 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12481229 case $UNAME_PROCESSOR in
1230 i386)
1231 eval $set_cc_for_build
1232 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1233 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1234 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1235 grep IS_64BIT_ARCH >/dev/null
1236 then
1237 UNAME_PROCESSOR="x86_64"
1238 fi
1239 fi ;;
12491240 unknown) UNAME_PROCESSOR=powerpc ;;
12501241 esac
12511242 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12601251 exit ;;
12611252 *:QNX:*:4*)
12621253 echo i386-pc-qnx
1254 exit ;;
1255 NEO-?:NONSTOP_KERNEL:*:*)
1256 echo neo-tandem-nsk${UNAME_RELEASE}
12631257 exit ;;
12641258 NSE-?:NONSTOP_KERNEL:*:*)
12651259 echo nse-tandem-nsk${UNAME_RELEASE}
13061300 echo pdp10-unknown-its
13071301 exit ;;
13081302 SEI:*:*:SEIUX)
1309 echo mips-sei-seiux${UNAME_RELEASE}
1303 echo mips-sei-seiux${UNAME_RELEASE}
13101304 exit ;;
13111305 *:DragonFly:*:*)
13121306 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13131307 exit ;;
13141308 *:*VMS:*:*)
1315 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1309 UNAME_MACHINE=`(uname -p) 2>/dev/null`
13161310 case "${UNAME_MACHINE}" in
13171311 A*) echo alpha-dec-vms ; exit ;;
13181312 I*) echo ia64-dec-vms ; exit ;;
13291323 exit ;;
13301324 i*86:AROS:*:*)
13311325 echo ${UNAME_MACHINE}-pc-aros
1326 exit ;;
1327 x86_64:VMkernel:*:*)
1328 echo ${UNAME_MACHINE}-unknown-esx
13321329 exit ;;
13331330 esac
13341331
13521349 #include <sys/param.h>
13531350 printf ("m68k-sony-newsos%s\n",
13541351 #ifdef NEWSOS4
1355 "4"
1352 "4"
13561353 #else
1357 ""
1358 #endif
1359 ); exit (0);
1354 ""
1355 #endif
1356 ); exit (0);
13601357 #endif
13611358 #endif
13621359
00 #! /bin/sh
11 # Configuration validation subroutine script.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-06-11'
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-02-10'
77
88 # This file is (in principle) common to ALL GNU software.
99 # The presence of a machine in this file suggests that SOME GNU software
2020 # GNU General Public License for more details.
2121 #
2222 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
23 # along with this program; if not, see <http://www.gnu.org/licenses/>.
2624 #
2725 # As a special exception to the GNU General Public License, if you
2826 # distribute this file as part of a program that contains a
3129
3230
3331 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
32 # diff and a properly formatted GNU ChangeLog entry.
3533 #
3634 # Configuration subroutine to validate and canonicalize a configuration type.
3735 # Supply the specified configuration type as an argument.
3836 # If it is invalid, we print an error message on stderr and exit with code 1.
3937 # Otherwise, we print the canonical config type on stdout and succeed.
38
39 # You can get the latest version of this script from:
40 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
4041
4142 # This file is supposed to be the same for all GNU packages
4243 # and recognize all the CPU types, system types and aliases
7172 version="\
7273 GNU config.sub ($timestamp)
7374
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
75 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
76 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
77 Free Software Foundation, Inc.
7678
7779 This is free software; see the source for copying conditions. There is NO
7880 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
119121 # Here we must recognize all the valid KERNEL-OS combinations.
120122 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121123 case $maybe_os in
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
125 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
126 knetbsd*-gnu* | netbsd*-gnu* | \
124127 kopensolaris*-gnu* | \
125128 storm-chaos* | os2-emx* | rtmk-nova*)
126129 os=-$maybe_os
127130 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
131 ;;
132 android-linux)
133 os=-linux-android
134 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128135 ;;
129136 *)
130137 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
148155 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149156 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150157 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
158 -apple | -axis | -knuth | -cray | -microblaze)
152159 os=
153160 basic_machine=$1
154161 ;;
155 -bluegene*)
156 os=-cnk
162 -bluegene*)
163 os=-cnk
157164 ;;
158165 -sim | -cisco | -oki | -wec | -winbond)
159166 os=
169176 os=-chorusos
170177 basic_machine=$1
171178 ;;
172 -chorusrdb)
173 os=-chorusrdb
179 -chorusrdb)
180 os=-chorusrdb
174181 basic_machine=$1
175 ;;
182 ;;
176183 -hiux*)
177184 os=-hiuxwe2
178185 ;;
241248 # Some are omitted here because they have special meanings below.
242249 1750a | 580 \
243250 | a29k \
251 | aarch64 | aarch64_be \
244252 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
245253 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
246254 | am33_2.0 \
247255 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
256 | be32 | be64 \
248257 | bfin \
249258 | c4x | clipper \
250259 | d10v | d30v | dlx | dsp16xx \
260 | epiphany \
251261 | fido | fr30 | frv \
252262 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
263 | hexagon \
253264 | i370 | i860 | i960 | ia64 \
254265 | ip2k | iq2000 \
266 | le32 | le64 \
255267 | lm32 \
256268 | m32c | m32r | m32rle | m68000 | m68k | m88k \
257269 | maxq | mb | microblaze | mcore | mep | metag \
277289 | moxie \
278290 | mt \
279291 | msp430 \
292 | nds32 | nds32le | nds32be \
280293 | nios | nios2 \
281294 | ns16k | ns32k \
295 | open8 \
282296 | or32 \
283297 | pdp10 | pdp11 | pj | pjl \
284 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
298 | powerpc | powerpc64 | powerpc64le | powerpcle \
285299 | pyramid \
300 | rl78 | rx \
286301 | score \
287302 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
288303 | sh64 | sh64le \
289304 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
290305 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
291 | spu | strongarm \
292 | tahoe | thumb | tic4x | tic80 | tron \
293 | v850 | v850e \
306 | spu \
307 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
308 | ubicom32 \
309 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
294310 | we32k \
295 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
311 | x86 | xc16x | xstormy16 | xtensa \
296312 | z8k | z80)
297313 basic_machine=$basic_machine-unknown
298314 ;;
299 m6811 | m68hc11 | m6812 | m68hc12)
300 # Motorola 68HC11/12.
315 c54x)
316 basic_machine=tic54x-unknown
317 ;;
318 c55x)
319 basic_machine=tic55x-unknown
320 ;;
321 c6x)
322 basic_machine=tic6x-unknown
323 ;;
324 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
301325 basic_machine=$basic_machine-unknown
302326 os=-none
303327 ;;
305329 ;;
306330 ms1)
307331 basic_machine=mt-unknown
332 ;;
333
334 strongarm | thumb | xscale)
335 basic_machine=arm-unknown
336 ;;
337 xgate)
338 basic_machine=$basic_machine-unknown
339 os=-none
340 ;;
341 xscaleeb)
342 basic_machine=armeb-unknown
343 ;;
344
345 xscaleel)
346 basic_machine=armel-unknown
308347 ;;
309348
310349 # We use `pc' rather than `unknown'
321360 # Recognize the basic CPU types with company name.
322361 580-* \
323362 | a29k-* \
363 | aarch64-* | aarch64_be-* \
324364 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
325365 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
326366 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
327367 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
328368 | avr-* | avr32-* \
369 | be32-* | be64-* \
329370 | bfin-* | bs2000-* \
330 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
371 | c[123]* | c30-* | [cjt]90-* | c4x-* \
331372 | clipper-* | craynv-* | cydra-* \
332373 | d10v-* | d30v-* | dlx-* \
333374 | elxsi-* \
334375 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
335376 | h8300-* | h8500-* \
336377 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
378 | hexagon-* \
337379 | i*86-* | i860-* | i960-* | ia64-* \
338380 | ip2k-* | iq2000-* \
381 | le32-* | le64-* \
339382 | lm32-* \
340383 | m32c-* | m32r-* | m32rle-* \
341384 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
342 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
385 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
343386 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
344387 | mips16-* \
345388 | mips64-* | mips64el-* \
361404 | mmix-* \
362405 | mt-* \
363406 | msp430-* \
407 | nds32-* | nds32le-* | nds32be-* \
364408 | nios-* | nios2-* \
365409 | none-* | np1-* | ns16k-* | ns32k-* \
410 | open8-* \
366411 | orion-* \
367412 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
368 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
413 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
369414 | pyramid-* \
370 | romp-* | rs6000-* \
415 | rl78-* | romp-* | rs6000-* | rx-* \
371416 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
372417 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
373418 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
374419 | sparclite-* \
375 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
376 | tahoe-* | thumb-* \
377 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
420 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
421 | tahoe-* \
422 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
423 | tile*-* \
378424 | tron-* \
379 | v850-* | v850e-* | vax-* \
425 | ubicom32-* \
426 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
427 | vax-* \
380428 | we32k-* \
381 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
429 | x86-* | x86_64-* | xc16x-* | xps100-* \
382430 | xstormy16-* | xtensa*-* \
383431 | ymp-* \
384432 | z8k-* | z80-*)
403451 basic_machine=a29k-amd
404452 os=-udi
405453 ;;
406 abacus)
454 abacus)
407455 basic_machine=abacus-unknown
408456 ;;
409457 adobe68k)
473521 basic_machine=powerpc-ibm
474522 os=-cnk
475523 ;;
524 c54x-*)
525 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
526 ;;
527 c55x-*)
528 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
529 ;;
530 c6x-*)
531 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
532 ;;
476533 c90)
477534 basic_machine=c90-cray
478535 os=-unicos
479536 ;;
480 cegcc)
537 cegcc)
481538 basic_machine=arm-unknown
482539 os=-cegcc
483540 ;;
509566 basic_machine=craynv-cray
510567 os=-unicosmp
511568 ;;
512 cr16)
569 cr16 | cr16-*)
513570 basic_machine=cr16-unknown
514571 os=-elf
515572 ;;
667724 i370-ibm* | ibm*)
668725 basic_machine=i370-ibm
669726 ;;
670 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
671727 i*86v32)
672728 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
673729 os=-sysv32
725781 basic_machine=ns32k-utek
726782 os=-sysv
727783 ;;
784 microblaze)
785 basic_machine=microblaze-xilinx
786 ;;
728787 mingw32)
729788 basic_machine=i386-pc
730789 os=-mingw32
761820 ms1-*)
762821 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
763822 ;;
823 msys)
824 basic_machine=i386-pc
825 os=-msys
826 ;;
764827 mvs)
765828 basic_machine=i370-ibm
766829 os=-mvs
830 ;;
831 nacl)
832 basic_machine=le32-unknown
833 os=-nacl
767834 ;;
768835 ncr3000)
769836 basic_machine=i486-ncr
829896 np1)
830897 basic_machine=np1-gould
831898 ;;
899 neo-tandem)
900 basic_machine=neo-tandem
901 ;;
902 nse-tandem)
903 basic_machine=nse-tandem
904 ;;
832905 nsr-tandem)
833906 basic_machine=nsr-tandem
834907 ;;
911984 ;;
912985 power) basic_machine=power-ibm
913986 ;;
914 ppc) basic_machine=powerpc-unknown
915 ;;
916 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
987 ppc | ppcbe) basic_machine=powerpc-unknown
988 ;;
989 ppc-* | ppcbe-*)
990 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
917991 ;;
918992 ppcle | powerpclittle | ppc-le | powerpc-little)
919993 basic_machine=powerpcle-unknown
10071081 basic_machine=i860-stratus
10081082 os=-sysv4
10091083 ;;
1084 strongarm-* | thumb-*)
1085 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1086 ;;
10101087 sun2)
10111088 basic_machine=m68000-sun
10121089 ;;
10631140 basic_machine=t90-cray
10641141 os=-unicos
10651142 ;;
1066 tic54x | c54x*)
1067 basic_machine=tic54x-unknown
1068 os=-coff
1069 ;;
1070 tic55x | c55x*)
1071 basic_machine=tic55x-unknown
1072 os=-coff
1073 ;;
1074 tic6x | c6x*)
1075 basic_machine=tic6x-unknown
1076 os=-coff
1077 ;;
10781143 tile*)
1079 basic_machine=tile-unknown
1144 basic_machine=$basic_machine-unknown
10801145 os=-linux-gnu
10811146 ;;
10821147 tx39)
11451210 ;;
11461211 xps | xps100)
11471212 basic_machine=xps100-honeywell
1213 ;;
1214 xscale-* | xscalee[bl]-*)
1215 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
11481216 ;;
11491217 ymp)
11501218 basic_machine=ymp-cray
12431311 if [ x"$os" != x"" ]
12441312 then
12451313 case $os in
1246 # First match some system type aliases
1247 # that might get confused with valid system types.
1314 # First match some system type aliases
1315 # that might get confused with valid system types.
12481316 # -solaris* is a basic system type, with this one exception.
1317 -auroraux)
1318 os=-auroraux
1319 ;;
12491320 -solaris1 | -solaris1.*)
12501321 os=`echo $os | sed -e 's|solaris1|sunos4|'`
12511322 ;;
12671338 # -sysv* is not here because it comes later, after sysvr4.
12681339 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
12691340 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1270 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1271 | -kopensolaris* \
1341 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1342 | -sym* | -kopensolaris* \
12721343 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12731344 | -aos* | -aros* \
12741345 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
12801351 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
12811352 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
12821353 | -chorusos* | -chorusrdb* | -cegcc* \
1283 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1284 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1354 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1355 | -mingw32* | -linux-gnu* | -linux-android* \
1356 | -linux-newlib* | -linux-uclibc* \
12851357 | -uxpv* | -beos* | -mpeix* | -udk* \
12861358 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
12871359 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
12891361 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
12901362 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12911363 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1292 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1364 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
12931365 # Remember, each alternative MUST END IN *, to match a version number.
12941366 ;;
12951367 -qnx*)
13281400 -opened*)
13291401 os=-openedition
13301402 ;;
1331 -os400*)
1403 -os400*)
13321404 os=-os400
13331405 ;;
13341406 -wince*)
13771449 -sinix*)
13781450 os=-sysv4
13791451 ;;
1380 -tpf*)
1452 -tpf*)
13811453 os=-tpf
13821454 ;;
13831455 -triton*)
14211493 ;;
14221494 -dicos*)
14231495 os=-dicos
1496 ;;
1497 -nacl*)
14241498 ;;
14251499 -none)
14261500 ;;
14441518 # system, and we'll never get to this point.
14451519
14461520 case $basic_machine in
1447 score-*)
1521 score-*)
14481522 os=-elf
14491523 ;;
1450 spu-*)
1524 spu-*)
14511525 os=-elf
14521526 ;;
14531527 *-acorn)
14591533 arm*-semi)
14601534 os=-aout
14611535 ;;
1462 c4x-* | tic4x-*)
1463 os=-coff
1536 c4x-* | tic4x-*)
1537 os=-coff
1538 ;;
1539 tic54x-*)
1540 os=-coff
1541 ;;
1542 tic55x-*)
1543 os=-coff
1544 ;;
1545 tic6x-*)
1546 os=-coff
14641547 ;;
14651548 # This must come before the *-dec entry.
14661549 pdp10-*)
14801563 ;;
14811564 m68000-sun)
14821565 os=-sunos3
1483 # This also exists in the configure program, but was not the
1484 # default.
1485 # os=-sunos4
14861566 ;;
14871567 m68*-cisco)
14881568 os=-aout
14891569 ;;
1490 mep-*)
1570 mep-*)
14911571 os=-elf
14921572 ;;
14931573 mips*-cisco)
15141594 *-ibm)
15151595 os=-aix
15161596 ;;
1517 *-knuth)
1597 *-knuth)
15181598 os=-mmixware
15191599 ;;
15201600 *-wec)
+2260
-1220
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.65.
2 # Generated by GNU Autoconf 2.68 for libotr 4.1.0.
3 #
4 # Report bugs to <otr@cypherpunks.ca>.
35 #
46 #
57 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
7 # Inc.
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
9 # Foundation, Inc.
810 #
911 #
1012 # This configure script is free software; the Free Software Foundation
8890 IFS=" "" $as_nl"
8991
9092 # Find who we are. Look in the path if we contain no directory separator.
93 as_myself=
9194 case $0 in #((
9295 *[\\/]* ) as_myself=$0 ;;
9396 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
170173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176
177 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
178 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
179 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
180 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
181 PATH=/empty FPATH=/empty; export PATH FPATH
182 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
183 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
173184 test \$(( 1 + 1 )) = 2 || exit 1"
174185 if (eval "$as_required") 2>/dev/null; then :
175186 as_have_required=yes
213224 # We cannot yet assume a decent shell, so we have to provide a
214225 # neutralization value for shells without unset; and this also
215226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
216228 BASH_ENV=/dev/null
217229 ENV=/dev/null
218230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219231 export CONFIG_SHELL
220 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
232 case $- in # ((((
233 *v*x* | *x*v* ) as_opts=-vx ;;
234 *v* ) as_opts=-v ;;
235 *x* ) as_opts=-x ;;
236 * ) as_opts= ;;
237 esac
238 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
221239 fi
222240
223241 if test x$as_have_required = xno; then :
227245 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
228246 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
229247 else
230 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
231 $0: including any error possibly output before this
232 $0: message. Then install a modern shell, or manually run
233 $0: the script under such a shell if you do have one."
248 $as_echo "$0: Please tell bug-autoconf@gnu.org and otr@cypherpunks.ca
249 $0: about your system, including any error possibly output
250 $0: before this message. Then install a modern shell, or
251 $0: manually run the script under such a shell if you do
252 $0: have one."
234253 fi
235254 exit 1
236255 fi
315334 test -d "$as_dir" && break
316335 done
317336 test -z "$as_dirs" || eval "mkdir $as_dirs"
318 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
337 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
319338
320339
321340 } # as_fn_mkdir_p
355374 fi # as_fn_arith
356375
357376
358 # as_fn_error ERROR [LINENO LOG_FD]
359 # ---------------------------------
377 # as_fn_error STATUS ERROR [LINENO LOG_FD]
378 # ----------------------------------------
360379 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
361380 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
362 # script with status $?, using 1 if that was 0.
381 # script with STATUS, using 1 if that was 0.
363382 as_fn_error ()
364383 {
365 as_status=$?; test $as_status -eq 0 && as_status=1
366 if test "$3"; then
367 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
368 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
369 fi
370 $as_echo "$as_me: error: $1" >&2
384 as_status=$1; test $as_status -eq 0 && as_status=1
385 if test "$4"; then
386 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
387 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
388 fi
389 $as_echo "$as_me: error: $2" >&2
371390 as_fn_exit $as_status
372391 } # as_fn_error
373392
524543 # Sed expression to map a string onto a valid variable name.
525544 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
526545
527
528
529 # Check that we are running under the correct shell.
530546 SHELL=${CONFIG_SHELL-/bin/sh}
531
532 case X$lt_ECHO in
533 X*--fallback-echo)
534 # Remove one level of quotation (which was required for Make).
535 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
536 ;;
537 esac
538
539 ECHO=${lt_ECHO-echo}
540 if test "X$1" = X--no-reexec; then
541 # Discard the --no-reexec flag, and continue.
542 shift
543 elif test "X$1" = X--fallback-echo; then
544 # Avoid inline document here, it may be left over
545 :
546 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
547 # Yippee, $ECHO works!
548 :
549 else
550 # Restart under the correct shell.
551 exec $SHELL "$0" --no-reexec ${1+"$@"}
552 fi
553
554 if test "X$1" = X--fallback-echo; then
555 # used as fallback echo
556 shift
557 cat <<_LT_EOF
558 $*
559 _LT_EOF
560 exit 0
561 fi
562
563 # The HP-UX ksh and POSIX shell print the target directory to stdout
564 # if CDPATH is set.
565 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
566
567 if test -z "$lt_ECHO"; then
568 if test "X${echo_test_string+set}" != Xset; then
569 # find a string as large as possible, as long as the shell can cope with it
570 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
571 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
572 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
573 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
574 then
575 break
576 fi
577 done
578 fi
579
580 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
581 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
582 test "X$echo_testing_string" = "X$echo_test_string"; then
583 :
584 else
585 # The Solaris, AIX, and Digital Unix default echo programs unquote
586 # backslashes. This makes it impossible to quote backslashes using
587 # echo "$something" | sed 's/\\/\\\\/g'
588 #
589 # So, first we look for a working echo in the user's PATH.
590
591 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
592 for dir in $PATH /usr/ucb; do
593 IFS="$lt_save_ifs"
594 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
595 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
596 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
597 test "X$echo_testing_string" = "X$echo_test_string"; then
598 ECHO="$dir/echo"
599 break
600 fi
601 done
602 IFS="$lt_save_ifs"
603
604 if test "X$ECHO" = Xecho; then
605 # We didn't find a better echo, so look for alternatives.
606 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
607 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
608 test "X$echo_testing_string" = "X$echo_test_string"; then
609 # This shell has a builtin print -r that does the trick.
610 ECHO='print -r'
611 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
612 test "X$CONFIG_SHELL" != X/bin/ksh; then
613 # If we have ksh, try running configure again with it.
614 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
615 export ORIGINAL_CONFIG_SHELL
616 CONFIG_SHELL=/bin/ksh
617 export CONFIG_SHELL
618 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
619 else
620 # Try using printf.
621 ECHO='printf %s\n'
622 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
623 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
624 test "X$echo_testing_string" = "X$echo_test_string"; then
625 # Cool, printf works
626 :
627 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
628 test "X$echo_testing_string" = 'X\t' &&
629 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
630 test "X$echo_testing_string" = "X$echo_test_string"; then
631 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
632 export CONFIG_SHELL
633 SHELL="$CONFIG_SHELL"
634 export SHELL
635 ECHO="$CONFIG_SHELL $0 --fallback-echo"
636 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
637 test "X$echo_testing_string" = 'X\t' &&
638 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
639 test "X$echo_testing_string" = "X$echo_test_string"; then
640 ECHO="$CONFIG_SHELL $0 --fallback-echo"
641 else
642 # maybe with a smaller string...
643 prev=:
644
645 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
646 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
647 then
648 break
649 fi
650 prev="$cmd"
651 done
652
653 if test "$prev" != 'sed 50q "$0"'; then
654 echo_test_string=`eval $prev`
655 export echo_test_string
656 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
657 else
658 # Oops. We lost completely, so just stick with echo.
659 ECHO=echo
660 fi
661 fi
662 fi
663 fi
664 fi
665 fi
666
667 # Copy echo and quote the copy suitably for passing to libtool from
668 # the Makefile, instead of quoting the original, which is used later.
669 lt_ECHO=$ECHO
670 if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
671 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
672 fi
673
674
675547
676548
677549 test -n "$DJDIR" || exec 7<&0 </dev/null
678550 exec 6>&1
679551
680552 # Name of the host.
681 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
553 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
682554 # so uname gets run too.
683555 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
684556
695567 MAKEFLAGS=
696568
697569 # Identity of this package.
698 PACKAGE_NAME=
699 PACKAGE_TARNAME=
700 PACKAGE_VERSION=
701 PACKAGE_STRING=
702 PACKAGE_BUGREPORT=
703 PACKAGE_URL=
704
705 ac_unique_file="toolkit/parse.c"
570 PACKAGE_NAME='libotr'
571 PACKAGE_TARNAME='libotr'
572 PACKAGE_VERSION='4.1.0'
573 PACKAGE_STRING='libotr 4.1.0'
574 PACKAGE_BUGREPORT='otr@cypherpunks.ca'
575 PACKAGE_URL='https://otr.cypherpunks.ca'
576
706577 # Factoring default headers for most tests.
707578 ac_includes_default="\
708579 #include <stdio.h>
754625 LIPO
755626 NMEDIT
756627 DSYMUTIL
757 lt_ECHO
628 MANIFEST_TOOL
758629 RANLIB
630 ac_ct_AR
759631 AR
632 DLLTOOL
760633 OBJDUMP
761634 LN_S
762635 NM
779652 am__fastdepCC_FALSE
780653 am__fastdepCC_TRUE
781654 CCDEPMODE
655 am__nodep
782656 AMDEPBACKSLASH
783657 AMDEP_FALSE
784658 AMDEP_TRUE
793667 CFLAGS
794668 CC
795669 LIBOTR_LIBTOOL_VERSION
670 AM_BACKSLASH
671 AM_DEFAULT_VERBOSITY
672 AM_DEFAULT_V
673 AM_V
796674 am__untar
797675 am__tar
798676 AMTAR
857735 ac_subst_files=''
858736 ac_user_opts='
859737 enable_option_checking
738 enable_silent_rules
860739 enable_dependency_tracking
861740 enable_shared
862741 enable_static
863742 with_pic
864743 enable_fast_install
865744 with_gnu_ld
745 with_sysroot
866746 enable_libtool_lock
867747 with_libgcrypt_prefix
868748 enable_gcc_hardening
917797 localstatedir='${prefix}/var'
918798 includedir='${prefix}/include'
919799 oldincludedir='/usr/include'
920 docdir='${datarootdir}/doc/${PACKAGE}'
800 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
921801 infodir='${datarootdir}/info'
922802 htmldir='${docdir}'
923803 dvidir='${docdir}'
939819 fi
940820
941821 case $ac_option in
942 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
943 *) ac_optarg=yes ;;
822 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
823 *=) ac_optarg= ;;
824 *) ac_optarg=yes ;;
944825 esac
945826
946827 # Accept the important Cygnus configure options, so we can diagnose typos.
985866 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
986867 # Reject names that are not valid shell variable names.
987868 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
988 as_fn_error "invalid feature name: $ac_useropt"
869 as_fn_error $? "invalid feature name: $ac_useropt"
989870 ac_useropt_orig=$ac_useropt
990871 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991872 case $ac_user_opts in
1011892 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1012893 # Reject names that are not valid shell variable names.
1013894 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1014 as_fn_error "invalid feature name: $ac_useropt"
895 as_fn_error $? "invalid feature name: $ac_useropt"
1015896 ac_useropt_orig=$ac_useropt
1016897 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1017898 case $ac_user_opts in
12151096 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
12161097 # Reject names that are not valid shell variable names.
12171098 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1218 as_fn_error "invalid package name: $ac_useropt"
1099 as_fn_error $? "invalid package name: $ac_useropt"
12191100 ac_useropt_orig=$ac_useropt
12201101 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12211102 case $ac_user_opts in
12311112 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
12321113 # Reject names that are not valid shell variable names.
12331114 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1234 as_fn_error "invalid package name: $ac_useropt"
1115 as_fn_error $? "invalid package name: $ac_useropt"
12351116 ac_useropt_orig=$ac_useropt
12361117 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12371118 case $ac_user_opts in
12611142 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
12621143 x_libraries=$ac_optarg ;;
12631144
1264 -*) as_fn_error "unrecognized option: \`$ac_option'
1265 Try \`$0 --help' for more information."
1145 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1146 Try \`$0 --help' for more information"
12661147 ;;
12671148
12681149 *=*)
12701151 # Reject names that are not valid shell variable names.
12711152 case $ac_envvar in #(
12721153 '' | [0-9]* | *[!_$as_cr_alnum]* )
1273 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1154 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
12741155 esac
12751156 eval $ac_envvar=\$ac_optarg
12761157 export $ac_envvar ;;
12801161 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
12811162 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
12821163 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1283 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1164 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
12841165 ;;
12851166
12861167 esac
12881169
12891170 if test -n "$ac_prev"; then
12901171 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1291 as_fn_error "missing argument to $ac_option"
1172 as_fn_error $? "missing argument to $ac_option"
12921173 fi
12931174
12941175 if test -n "$ac_unrecognized_opts"; then
12951176 case $enable_option_checking in
12961177 no) ;;
1297 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1178 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
12981179 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
12991180 esac
13001181 fi
13171198 [\\/$]* | ?:[\\/]* ) continue;;
13181199 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
13191200 esac
1320 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1201 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
13211202 done
13221203
13231204 # There might be people who depend on the old broken behavior: `$host'
13311212 if test "x$host_alias" != x; then
13321213 if test "x$build_alias" = x; then
13331214 cross_compiling=maybe
1334 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1335 If a cross compiler is detected then cross compile mode will be used." >&2
1215 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1216 If a cross compiler is detected then cross compile mode will be used" >&2
13361217 elif test "x$build_alias" != "x$host_alias"; then
13371218 cross_compiling=yes
13381219 fi
13471228 ac_pwd=`pwd` && test -n "$ac_pwd" &&
13481229 ac_ls_di=`ls -di .` &&
13491230 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1350 as_fn_error "working directory cannot be determined"
1231 as_fn_error $? "working directory cannot be determined"
13511232 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1352 as_fn_error "pwd does not report name of working directory"
1233 as_fn_error $? "pwd does not report name of working directory"
13531234
13541235
13551236 # Find the source files, if location was not specified.
13881269 fi
13891270 if test ! -r "$srcdir/$ac_unique_file"; then
13901271 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1391 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1272 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
13921273 fi
13931274 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
13941275 ac_abs_confdir=`(
1395 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1276 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
13961277 pwd)`
13971278 # When building in place, set srcdir=.
13981279 if test "$ac_abs_confdir" = "$ac_pwd"; then
14181299 # Omit some internal or obsolete options to make the list less imposing.
14191300 # This message is too long to be a string in the A/UX 3.1 sh.
14201301 cat <<_ACEOF
1421 \`configure' configures this package to adapt to many kinds of systems.
1302 \`configure' configures libotr 4.1.0 to adapt to many kinds of systems.
14221303
14231304 Usage: $0 [OPTION]... [VAR=VALUE]...
14241305
14321313 --help=short display options specific to this package
14331314 --help=recursive display the short help of all the included packages
14341315 -V, --version display version information and exit
1435 -q, --quiet, --silent do not print \`checking...' messages
1316 -q, --quiet, --silent do not print \`checking ...' messages
14361317 --cache-file=FILE cache test results in FILE [disabled]
14371318 -C, --config-cache alias for \`--cache-file=config.cache'
14381319 -n, --no-create do not create output files
14661347 --infodir=DIR info documentation [DATAROOTDIR/info]
14671348 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
14681349 --mandir=DIR man documentation [DATAROOTDIR/man]
1469 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1350 --docdir=DIR documentation root [DATAROOTDIR/doc/libotr]
14701351 --htmldir=DIR html documentation [DOCDIR]
14711352 --dvidir=DIR dvi documentation [DOCDIR]
14721353 --pdfdir=DIR pdf documentation [DOCDIR]
14871368 fi
14881369
14891370 if test -n "$ac_init_help"; then
1490
1371 case $ac_init_help in
1372 short | recursive ) echo "Configuration of libotr 4.1.0:";;
1373 esac
14911374 cat <<\_ACEOF
14921375
14931376 Optional Features:
14941377 --disable-option-checking ignore unrecognized --enable/--with options
14951378 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
14961379 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1380 --enable-silent-rules less verbose build output (undo: `make V=1')
1381 --disable-silent-rules verbose build output (undo: `make V=0')
14971382 --disable-dependency-tracking speeds up one-time build
14981383 --enable-dependency-tracking do not reject slow dependency extractors
14991384 --enable-shared[=PKGS] build shared libraries [default=yes]
15081393 Optional Packages:
15091394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
15101395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1511 --with-pic try to use only PIC/non-PIC objects [default=use
1396 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
15121397 both]
15131398 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1399 --with-sysroot=DIR Search for dependent libraries within DIR
1400 (or the compiler's sysroot if not specified).
15141401 --with-libgcrypt-prefix=PFX
15151402 prefix where LIBGCRYPT is installed (optional)
15161403
15271414 Use these variables to override the choices made by `configure' or to help
15281415 it to find libraries and programs with nonstandard names/locations.
15291416
1530 Report bugs to the package provider.
1417 Report bugs to <otr@cypherpunks.ca>.
1418 libotr home page: <https://otr.cypherpunks.ca>.
15311419 _ACEOF
15321420 ac_status=$?
15331421 fi
15901478 test -n "$ac_init_help" && exit $ac_status
15911479 if $ac_init_version; then
15921480 cat <<\_ACEOF
1593 configure
1594 generated by GNU Autoconf 2.65
1595
1596 Copyright (C) 2009 Free Software Foundation, Inc.
1481 libotr configure 4.1.0
1482 generated by GNU Autoconf 2.68
1483
1484 Copyright (C) 2010 Free Software Foundation, Inc.
15971485 This configure script is free software; the Free Software Foundation
15981486 gives unlimited permission to copy, distribute and modify it.
15991487 _ACEOF
16371525
16381526 ac_retval=1
16391527 fi
1640 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1528 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16411529 as_fn_set_status $ac_retval
16421530
16431531 } # ac_fn_c_try_compile
16831571 # interfere with the next link command; also delete a directory that is
16841572 # left behind by Apple's compiler. We do this before executing the actions.
16851573 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1686 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1574 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16871575 as_fn_set_status $ac_retval
16881576
16891577 } # ac_fn_c_try_link
16971585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16981586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
16991587 $as_echo_n "checking for $2... " >&6; }
1700 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1588 if eval \${$3+:} false; then :
17011589 $as_echo_n "(cached) " >&6
17021590 else
17031591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17151603 eval ac_res=\$$3
17161604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17171605 $as_echo "$ac_res" >&6; }
1718 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1606 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17191607
17201608 } # ac_fn_c_check_header_compile
17211609
17401628 mv -f conftest.er1 conftest.err
17411629 fi
17421630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1743 test $ac_status = 0; } >/dev/null && {
1631 test $ac_status = 0; } > conftest.i && {
17441632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17451633 test ! -s conftest.err
17461634 }; then :
17511639
17521640 ac_retval=1
17531641 fi
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17551643 as_fn_set_status $ac_retval
17561644
17571645 } # ac_fn_c_try_cpp
17931681 ac_retval=$ac_status
17941682 fi
17951683 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1796 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17971685 as_fn_set_status $ac_retval
17981686
17991687 } # ac_fn_c_try_run
18061694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18071695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18081696 $as_echo_n "checking for $2... " >&6; }
1809 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1697 if eval \${$3+:} false; then :
18101698 $as_echo_n "(cached) " >&6
18111699 else
18121700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18611749 eval ac_res=\$$3
18621750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18631751 $as_echo "$ac_res" >&6; }
1864 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
18651753
18661754 } # ac_fn_c_check_func
18671755 cat >config.log <<_ACEOF
18681756 This file contains any messages produced by compilers while
18691757 running configure, to aid debugging if configure makes a mistake.
18701758
1871 It was created by $as_me, which was
1872 generated by GNU Autoconf 2.65. Invocation command line was
1759 It was created by libotr $as_me 4.1.0, which was
1760 generated by GNU Autoconf 2.68. Invocation command line was
18731761
18741762 $ $0 $@
18751763
19791867 {
19801868 echo
19811869
1982 cat <<\_ASBOX
1983 ## ---------------- ##
1870 $as_echo "## ---------------- ##
19841871 ## Cache variables. ##
1985 ## ---------------- ##
1986 _ASBOX
1872 ## ---------------- ##"
19871873 echo
19881874 # The following way of writing the cache mishandles newlines in values,
19891875 (
20171903 )
20181904 echo
20191905
2020 cat <<\_ASBOX
2021 ## ----------------- ##
1906 $as_echo "## ----------------- ##
20221907 ## Output variables. ##
2023 ## ----------------- ##
2024 _ASBOX
1908 ## ----------------- ##"
20251909 echo
20261910 for ac_var in $ac_subst_vars
20271911 do
20341918 echo
20351919
20361920 if test -n "$ac_subst_files"; then
2037 cat <<\_ASBOX
2038 ## ------------------- ##
1921 $as_echo "## ------------------- ##
20391922 ## File substitutions. ##
2040 ## ------------------- ##
2041 _ASBOX
1923 ## ------------------- ##"
20421924 echo
20431925 for ac_var in $ac_subst_files
20441926 do
20521934 fi
20531935
20541936 if test -s confdefs.h; then
2055 cat <<\_ASBOX
2056 ## ----------- ##
1937 $as_echo "## ----------- ##
20571938 ## confdefs.h. ##
2058 ## ----------- ##
2059 _ASBOX
1939 ## ----------- ##"
20601940 echo
20611941 cat confdefs.h
20621942 echo
21111991 ac_site_file1=NONE
21121992 ac_site_file2=NONE
21131993 if test -n "$CONFIG_SITE"; then
2114 ac_site_file1=$CONFIG_SITE
1994 # We do not want a PATH search for config.site.
1995 case $CONFIG_SITE in #((
1996 -*) ac_site_file1=./$CONFIG_SITE;;
1997 */*) ac_site_file1=$CONFIG_SITE;;
1998 *) ac_site_file1=./$CONFIG_SITE;;
1999 esac
21152000 elif test "x$prefix" != xNONE; then
21162001 ac_site_file1=$prefix/share/config.site
21172002 ac_site_file2=$prefix/etc/config.site
21262011 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
21272012 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
21282013 sed 's/^/| /' "$ac_site_file" >&5
2129 . "$ac_site_file"
2014 . "$ac_site_file" \
2015 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2016 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2017 as_fn_error $? "failed to load site script $ac_site_file
2018 See \`config.log' for more details" "$LINENO" 5; }
21302019 fi
21312020 done
21322021
22022091 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22032092 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
22042093 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2205 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2094 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
22062095 fi
22072096 ## -------------------- ##
22082097 ## Main body of script. ##
22182107
22192108 ac_config_headers="$ac_config_headers config.h"
22202109
2221
2222
2223 am__api_version='1.11'
2224
22252110 ac_aux_dir=
2226 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2227 for ac_t in install-sh install.sh shtool; do
2228 if test -f "$ac_dir/$ac_t"; then
2229 ac_aux_dir=$ac_dir
2230 ac_install_sh="$ac_aux_dir/$ac_t -c"
2231 break 2
2232 fi
2233 done
2111 for ac_dir in config "$srcdir"/config; do
2112 if test -f "$ac_dir/install-sh"; then
2113 ac_aux_dir=$ac_dir
2114 ac_install_sh="$ac_aux_dir/install-sh -c"
2115 break
2116 elif test -f "$ac_dir/install.sh"; then
2117 ac_aux_dir=$ac_dir
2118 ac_install_sh="$ac_aux_dir/install.sh -c"
2119 break
2120 elif test -f "$ac_dir/shtool"; then
2121 ac_aux_dir=$ac_dir
2122 ac_install_sh="$ac_aux_dir/shtool install -c"
2123 break
2124 fi
22342125 done
22352126 if test -z "$ac_aux_dir"; then
2236 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2127 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
22372128 fi
22382129
22392130 # These three variables are undocumented and unsupported,
22442135 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
22452136 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
22462137
2138
2139
2140 am__api_version='1.11'
22472141
22482142 # Find a good install program. We prefer a C program (faster),
22492143 # so one script is as good as another. But avoid the broken or
22622156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
22632157 $as_echo_n "checking for a BSD-compatible install... " >&6; }
22642158 if test -z "$INSTALL"; then
2265 if test "${ac_cv_path_install+set}" = set; then :
2159 if ${ac_cv_path_install+:} false; then :
22662160 $as_echo_n "(cached) " >&6
22672161 else
22682162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23492243 '
23502244 case `pwd` in
23512245 *[\\\"\#\$\&\'\`$am_lf]*)
2352 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
2246 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
23532247 esac
23542248 case $srcdir in
23552249 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2356 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2250 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
23572251 esac
23582252
23592253 # Do `set' in a subshell so we don't clobber the current shell's
23752269 # if, for instance, CONFIG_SHELL is bash and it inherits a
23762270 # broken ls alias from the environment. This has actually
23772271 # happened. Such a system could not be considered "sane".
2378 as_fn_error "ls -t appears to fail. Make sure there is not a broken
2272 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
23792273 alias in your environment" "$LINENO" 5
23802274 fi
23812275
23852279 # Ok.
23862280 :
23872281 else
2388 as_fn_error "newly created file is older than distributed files!
2282 as_fn_error $? "newly created file is older than distributed files!
23892283 Check your system clock" "$LINENO" 5
23902284 fi
23912285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24392333 set dummy ${ac_tool_prefix}strip; ac_word=$2
24402334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24412335 $as_echo_n "checking for $ac_word... " >&6; }
2442 if test "${ac_cv_prog_STRIP+set}" = set; then :
2336 if ${ac_cv_prog_STRIP+:} false; then :
24432337 $as_echo_n "(cached) " >&6
24442338 else
24452339 if test -n "$STRIP"; then
24792373 set dummy strip; ac_word=$2
24802374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24812375 $as_echo_n "checking for $ac_word... " >&6; }
2482 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2376 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
24832377 $as_echo_n "(cached) " >&6
24842378 else
24852379 if test -n "$ac_ct_STRIP"; then
25322426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
25332427 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
25342428 if test -z "$MKDIR_P"; then
2535 if test "${ac_cv_path_mkdir+set}" = set; then :
2429 if ${ac_cv_path_mkdir+:} false; then :
25362430 $as_echo_n "(cached) " >&6
25372431 else
25382432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25832477 set dummy $ac_prog; ac_word=$2
25842478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25852479 $as_echo_n "checking for $ac_word... " >&6; }
2586 if test "${ac_cv_prog_AWK+set}" = set; then :
2480 if ${ac_cv_prog_AWK+:} false; then :
25872481 $as_echo_n "(cached) " >&6
25882482 else
25892483 if test -n "$AWK"; then
26232517 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26242518 set x ${MAKE-make}
26252519 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2626 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
2520 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
26272521 $as_echo_n "(cached) " >&6
26282522 else
26292523 cat >conftest.make <<\_ACEOF
26312525 all:
26322526 @echo '@@@%%%=$(MAKE)=@@@%%%'
26332527 _ACEOF
2634 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2528 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
26352529 case `${MAKE-make} -f conftest.make 2>/dev/null` in
26362530 *@@@%%%=?*=@@@%%%*)
26372531 eval ac_cv_prog_make_${ac_make}_set=yes;;
26652559 am__isrc=' -I$(srcdir)'
26662560 # test to see if srcdir already configured
26672561 if test -f $srcdir/config.status; then
2668 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2562 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
26692563 fi
26702564 fi
26712565
26802574
26812575
26822576 # Define the identity of the package.
2683 PACKAGE=libotr
2684 VERSION=4.0.0
2577 PACKAGE='libotr'
2578 VERSION='4.1.0'
26852579
26862580
26872581 cat >>confdefs.h <<_ACEOF
27112605
27122606 # We need awk for the "check" target. The system "awk" is bad on
27132607 # some platforms.
2714 # Always define AMTAR for backward compatibility.
2715
2716 AMTAR=${AMTAR-"${am_missing_run}tar"}
2717
2718 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2719
2720
2721
2722
2723
2724 LIBOTR_LIBTOOL_VERSION="5:0:0"
2608 # Always define AMTAR for backward compatibility. Yes, it's still used
2609 # in the wild :-( We should find a proper way to deprecate it ...
2610 AMTAR='$${TAR-tar}'
2611
2612 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
2613
2614
2615
2616
2617
2618 LIBOTR_LIBTOOL_VERSION="6:0:1"
2619
2620
2621 # Silent compilation so warnings can be spotted.
2622 # Check whether --enable-silent-rules was given.
2623 if test "${enable_silent_rules+set}" = set; then :
2624 enableval=$enable_silent_rules;
2625 fi
2626
2627 case $enable_silent_rules in
2628 yes) AM_DEFAULT_VERBOSITY=0;;
2629 no) AM_DEFAULT_VERBOSITY=1;;
2630 *) AM_DEFAULT_VERBOSITY=0;;
2631 esac
2632 am_make=${MAKE-make}
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2634 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2635 if ${am_cv_make_support_nested_variables+:} false; then :
2636 $as_echo_n "(cached) " >&6
2637 else
2638 if $as_echo 'TRUE=$(BAR$(V))
2639 BAR0=false
2640 BAR1=true
2641 V=1
2642 am__doit:
2643 @$(TRUE)
2644 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2645 am_cv_make_support_nested_variables=yes
2646 else
2647 am_cv_make_support_nested_variables=no
2648 fi
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2651 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2652 if test $am_cv_make_support_nested_variables = yes; then
2653 AM_V='$(V)'
2654 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2655 else
2656 AM_V=$AM_DEFAULT_VERBOSITY
2657 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2658 fi
2659 AM_BACKSLASH='\'
2660
27252661
27262662
27272663
27352671 set dummy ${ac_tool_prefix}gcc; ac_word=$2
27362672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27372673 $as_echo_n "checking for $ac_word... " >&6; }
2738 if test "${ac_cv_prog_CC+set}" = set; then :
2674 if ${ac_cv_prog_CC+:} false; then :
27392675 $as_echo_n "(cached) " >&6
27402676 else
27412677 if test -n "$CC"; then
27752711 set dummy gcc; ac_word=$2
27762712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27772713 $as_echo_n "checking for $ac_word... " >&6; }
2778 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2714 if ${ac_cv_prog_ac_ct_CC+:} false; then :
27792715 $as_echo_n "(cached) " >&6
27802716 else
27812717 if test -n "$ac_ct_CC"; then
28282764 set dummy ${ac_tool_prefix}cc; ac_word=$2
28292765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28302766 $as_echo_n "checking for $ac_word... " >&6; }
2831 if test "${ac_cv_prog_CC+set}" = set; then :
2767 if ${ac_cv_prog_CC+:} false; then :
28322768 $as_echo_n "(cached) " >&6
28332769 else
28342770 if test -n "$CC"; then
28682804 set dummy cc; ac_word=$2
28692805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28702806 $as_echo_n "checking for $ac_word... " >&6; }
2871 if test "${ac_cv_prog_CC+set}" = set; then :
2807 if ${ac_cv_prog_CC+:} false; then :
28722808 $as_echo_n "(cached) " >&6
28732809 else
28742810 if test -n "$CC"; then
29272863 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29282864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29292865 $as_echo_n "checking for $ac_word... " >&6; }
2930 if test "${ac_cv_prog_CC+set}" = set; then :
2866 if ${ac_cv_prog_CC+:} false; then :
29312867 $as_echo_n "(cached) " >&6
29322868 else
29332869 if test -n "$CC"; then
29712907 set dummy $ac_prog; ac_word=$2
29722908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29732909 $as_echo_n "checking for $ac_word... " >&6; }
2974 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2910 if ${ac_cv_prog_ac_ct_CC+:} false; then :
29752911 $as_echo_n "(cached) " >&6
29762912 else
29772913 if test -n "$ac_ct_CC"; then
30252961
30262962 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30272963 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3028 as_fn_error "no acceptable C compiler found in \$PATH
3029 See \`config.log' for more details." "$LINENO" 5; }
2964 as_fn_error $? "no acceptable C compiler found in \$PATH
2965 See \`config.log' for more details" "$LINENO" 5; }
30302966
30312967 # Provide some information about the compiler.
30322968 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
31403076
31413077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31423078 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3143 { as_fn_set_status 77
3144 as_fn_error "C compiler cannot create executables
3145 See \`config.log' for more details." "$LINENO" 5; }; }
3079 as_fn_error 77 "C compiler cannot create executables
3080 See \`config.log' for more details" "$LINENO" 5; }
31463081 else
31473082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31483083 $as_echo "yes" >&6; }
31843119 else
31853120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31863121 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187 as_fn_error "cannot compute suffix of executables: cannot compile and link
3188 See \`config.log' for more details." "$LINENO" 5; }
3122 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3123 See \`config.log' for more details" "$LINENO" 5; }
31893124 fi
31903125 rm -f conftest conftest$ac_cv_exeext
31913126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32423177 else
32433178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32443179 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3245 as_fn_error "cannot run C compiled programs.
3180 as_fn_error $? "cannot run C compiled programs.
32463181 If you meant to cross compile, use \`--host'.
3247 See \`config.log' for more details." "$LINENO" 5; }
3182 See \`config.log' for more details" "$LINENO" 5; }
32483183 fi
32493184 fi
32503185 fi
32553190 ac_clean_files=$ac_clean_files_save
32563191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32573192 $as_echo_n "checking for suffix of object files... " >&6; }
3258 if test "${ac_cv_objext+set}" = set; then :
3193 if ${ac_cv_objext+:} false; then :
32593194 $as_echo_n "(cached) " >&6
32603195 else
32613196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32953230
32963231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32973232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298 as_fn_error "cannot compute suffix of object files: cannot compile
3299 See \`config.log' for more details." "$LINENO" 5; }
3233 as_fn_error $? "cannot compute suffix of object files: cannot compile
3234 See \`config.log' for more details" "$LINENO" 5; }
33003235 fi
33013236 rm -f conftest.$ac_cv_objext conftest.$ac_ext
33023237 fi
33063241 ac_objext=$OBJEXT
33073242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33083243 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3309 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3244 if ${ac_cv_c_compiler_gnu+:} false; then :
33103245 $as_echo_n "(cached) " >&6
33113246 else
33123247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33433278 ac_save_CFLAGS=$CFLAGS
33443279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33453280 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3346 if test "${ac_cv_prog_cc_g+set}" = set; then :
3281 if ${ac_cv_prog_cc_g+:} false; then :
33473282 $as_echo_n "(cached) " >&6
33483283 else
33493284 ac_save_c_werror_flag=$ac_c_werror_flag
34213356 fi
34223357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34233358 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3424 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3359 if ${ac_cv_prog_cc_c89+:} false; then :
34253360 $as_echo_n "(cached) " >&6
34263361 else
34273362 ac_cv_prog_cc_c89=no
35673502 if test "x$enable_dependency_tracking" != xno; then
35683503 am_depcomp="$ac_aux_dir/depcomp"
35693504 AMDEPBACKSLASH='\'
3505 am__nodep='_no'
35703506 fi
35713507 if test "x$enable_dependency_tracking" != xno; then
35723508 AMDEP_TRUE=
35823518
35833519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
35843520 $as_echo_n "checking dependency style of $depcc... " >&6; }
3585 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
3521 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
35863522 $as_echo_n "(cached) " >&6
35873523 else
35883524 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
35913527 # instance it was reported that on HP-UX the gcc test will end up
35923528 # making a dummy file named `D' -- because `-MD' means `put the output
35933529 # in D'.
3530 rm -rf conftest.dir
35943531 mkdir conftest.dir
35953532 # Copy depcomp to subdir because otherwise we won't find it if we're
35963533 # using a relative directory.
36503587 break
36513588 fi
36523589 ;;
3653 msvisualcpp | msvcmsys)
3590 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
36543591 # This compiler won't grok `-c -o', but also, the minuso test has
36553592 # not run yet. These depmodes are late enough in the game, and
36563593 # so weak that their functioning should not be impacted.
37053642 fi
37063643
37073644
3708
3709
37103645 case `pwd` in
37113646 *\ * | *\ *)
37123647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
37153650
37163651
37173652
3718 macro_version='2.2.6b'
3719 macro_revision='1.3017'
3653 macro_version='2.4.2'
3654 macro_revision='1.3337'
37203655
37213656
37223657
37343669
37353670 # Make sure we can run config.sub.
37363671 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3737 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3672 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
37383673
37393674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
37403675 $as_echo_n "checking build system type... " >&6; }
3741 if test "${ac_cv_build+set}" = set; then :
3676 if ${ac_cv_build+:} false; then :
37423677 $as_echo_n "(cached) " >&6
37433678 else
37443679 ac_build_alias=$build_alias
37453680 test "x$ac_build_alias" = x &&
37463681 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
37473682 test "x$ac_build_alias" = x &&
3748 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3683 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
37493684 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3750 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3685 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
37513686
37523687 fi
37533688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
37543689 $as_echo "$ac_cv_build" >&6; }
37553690 case $ac_cv_build in
37563691 *-*-*) ;;
3757 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3692 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
37583693 esac
37593694 build=$ac_cv_build
37603695 ac_save_IFS=$IFS; IFS='-'
37723707
37733708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
37743709 $as_echo_n "checking host system type... " >&6; }
3775 if test "${ac_cv_host+set}" = set; then :
3710 if ${ac_cv_host+:} false; then :
37763711 $as_echo_n "(cached) " >&6
37773712 else
37783713 if test "x$host_alias" = x; then
37793714 ac_cv_host=$ac_cv_build
37803715 else
37813716 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3782 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3717 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
37833718 fi
37843719
37853720 fi
37873722 $as_echo "$ac_cv_host" >&6; }
37883723 case $ac_cv_host in
37893724 *-*-*) ;;
3790 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3725 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
37913726 esac
37923727 host=$ac_cv_host
37933728 ac_save_IFS=$IFS; IFS='-'
38033738 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
38043739
38053740
3741 # Backslashify metacharacters that are still active within
3742 # double-quoted strings.
3743 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
3744
3745 # Same as above, but do not quote variable references.
3746 double_quote_subst='s/\(["`\\]\)/\\\1/g'
3747
3748 # Sed substitution to delay expansion of an escaped shell variable in a
3749 # double_quote_subst'ed string.
3750 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3751
3752 # Sed substitution to delay expansion of an escaped single quote.
3753 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3754
3755 # Sed substitution to avoid accidental globbing in evaled expressions
3756 no_glob_subst='s/\*/\\\*/g'
3757
3758 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3759 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3760 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3761
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
3763 $as_echo_n "checking how to print strings... " >&6; }
3764 # Test print first, because it will be a builtin if present.
3765 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3766 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3767 ECHO='print -r --'
3768 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3769 ECHO='printf %s\n'
3770 else
3771 # Use this function as a fallback that always works.
3772 func_fallback_echo ()
3773 {
3774 eval 'cat <<_LTECHO_EOF
3775 $1
3776 _LTECHO_EOF'
3777 }
3778 ECHO='func_fallback_echo'
3779 fi
3780
3781 # func_echo_all arg...
3782 # Invoke $ECHO with all args, space-separated.
3783 func_echo_all ()
3784 {
3785 $ECHO ""
3786 }
3787
3788 case "$ECHO" in
3789 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
3790 $as_echo "printf" >&6; } ;;
3791 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
3792 $as_echo "print -r" >&6; } ;;
3793 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
3794 $as_echo "cat" >&6; } ;;
3795 esac
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
38063810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
38073811 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
3808 if test "${ac_cv_path_SED+set}" = set; then :
3812 if ${ac_cv_path_SED+:} false; then :
38093813 $as_echo_n "(cached) " >&6
38103814 else
38113815 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
38603864 done
38613865 IFS=$as_save_IFS
38623866 if test -z "$ac_cv_path_SED"; then
3863 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
3867 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
38643868 fi
38653869 else
38663870 ac_cv_path_SED=$SED
38873891
38883892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
38893893 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3890 if test "${ac_cv_path_GREP+set}" = set; then :
3894 if ${ac_cv_path_GREP+:} false; then :
38913895 $as_echo_n "(cached) " >&6
38923896 else
38933897 if test -z "$GREP"; then
39363940 done
39373941 IFS=$as_save_IFS
39383942 if test -z "$ac_cv_path_GREP"; then
3939 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3943 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
39403944 fi
39413945 else
39423946 ac_cv_path_GREP=$GREP
39503954
39513955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
39523956 $as_echo_n "checking for egrep... " >&6; }
3953 if test "${ac_cv_path_EGREP+set}" = set; then :
3957 if ${ac_cv_path_EGREP+:} false; then :
39543958 $as_echo_n "(cached) " >&6
39553959 else
39563960 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
40024006 done
40034007 IFS=$as_save_IFS
40044008 if test -z "$ac_cv_path_EGREP"; then
4005 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4009 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
40064010 fi
40074011 else
40084012 ac_cv_path_EGREP=$EGREP
40174021
40184022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
40194023 $as_echo_n "checking for fgrep... " >&6; }
4020 if test "${ac_cv_path_FGREP+set}" = set; then :
4024 if ${ac_cv_path_FGREP+:} false; then :
40214025 $as_echo_n "(cached) " >&6
40224026 else
40234027 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
40694073 done
40704074 IFS=$as_save_IFS
40714075 if test -z "$ac_cv_path_FGREP"; then
4072 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4076 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
40734077 fi
40744078 else
40754079 ac_cv_path_FGREP=$FGREP
41484152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
41494153 $as_echo_n "checking for non-GNU ld... " >&6; }
41504154 fi
4151 if test "${lt_cv_path_LD+set}" = set; then :
4155 if ${lt_cv_path_LD+:} false; then :
41524156 $as_echo_n "(cached) " >&6
41534157 else
41544158 if test -z "$LD"; then
41854189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41864190 $as_echo "no" >&6; }
41874191 fi
4188 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
4192 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
41894193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
41904194 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4191 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
4195 if ${lt_cv_prog_gnu_ld+:} false; then :
41924196 $as_echo_n "(cached) " >&6
41934197 else
41944198 # I'd rather use --version here, but apparently some GNU lds only accept -v.
42154219
42164220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
42174221 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4218 if test "${lt_cv_path_NM+set}" = set; then :
4222 if ${lt_cv_path_NM+:} false; then :
42194223 $as_echo_n "(cached) " >&6
42204224 else
42214225 if test -n "$NM"; then
42684272 NM="$lt_cv_path_NM"
42694273 else
42704274 # Didn't find any BSD compatible name lister, look for dumpbin.
4271 if test -n "$ac_tool_prefix"; then
4272 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4275 if test -n "$DUMPBIN"; then :
4276 # Let the user override the test.
4277 else
4278 if test -n "$ac_tool_prefix"; then
4279 for ac_prog in dumpbin "link -dump"
42734280 do
42744281 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42754282 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42764283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42774284 $as_echo_n "checking for $ac_word... " >&6; }
4278 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
4285 if ${ac_cv_prog_DUMPBIN+:} false; then :
42794286 $as_echo_n "(cached) " >&6
42804287 else
42814288 if test -n "$DUMPBIN"; then
43134320 fi
43144321 if test -z "$DUMPBIN"; then
43154322 ac_ct_DUMPBIN=$DUMPBIN
4316 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4323 for ac_prog in dumpbin "link -dump"
43174324 do
43184325 # Extract the first word of "$ac_prog", so it can be a program name with args.
43194326 set dummy $ac_prog; ac_word=$2
43204327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43214328 $as_echo_n "checking for $ac_word... " >&6; }
4322 if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
4329 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
43234330 $as_echo_n "(cached) " >&6
43244331 else
43254332 if test -n "$ac_ct_DUMPBIN"; then
43684375 fi
43694376 fi
43704377
4378 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4379 *COFF*)
4380 DUMPBIN="$DUMPBIN -symbols"
4381 ;;
4382 *)
4383 DUMPBIN=:
4384 ;;
4385 esac
4386 fi
43714387
43724388 if test "$DUMPBIN" != ":"; then
43734389 NM="$DUMPBIN"
43824398
43834399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
43844400 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
4385 if test "${lt_cv_nm_interface+set}" = set; then :
4401 if ${lt_cv_nm_interface+:} false; then :
43864402 $as_echo_n "(cached) " >&6
43874403 else
43884404 lt_cv_nm_interface="BSD nm"
43894405 echo "int some_variable = 0;" > conftest.$ac_ext
4390 (eval echo "\"\$as_me:4391: $ac_compile\"" >&5)
4406 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
43914407 (eval "$ac_compile" 2>conftest.err)
43924408 cat conftest.err >&5
4393 (eval echo "\"\$as_me:4394: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4409 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
43944410 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
43954411 cat conftest.err >&5
4396 (eval echo "\"\$as_me:4397: output\"" >&5)
4412 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
43974413 cat conftest.out >&5
43984414 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
43994415 lt_cv_nm_interface="MS dumpbin"
44174433 # find the maximum length of command line arguments
44184434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
44194435 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
4420 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
4436 if ${lt_cv_sys_max_cmd_len+:} false; then :
44214437 $as_echo_n "(cached) " >&6
44224438 else
44234439 i=0
44474463 # the test eventually succeeds (with a max line length of 256k).
44484464 # Instead, let's just punt: use the minimum linelength reported by
44494465 # all of the supported platforms: 8192 (on NT/2K/XP).
4466 lt_cv_sys_max_cmd_len=8192;
4467 ;;
4468
4469 mint*)
4470 # On MiNT this can take a long time and run out of memory.
44504471 lt_cv_sys_max_cmd_len=8192;
44514472 ;;
44524473
44734494 interix*)
44744495 # We know the value 262144 and hardcode it with a safety zone (like BSD)
44754496 lt_cv_sys_max_cmd_len=196608
4497 ;;
4498
4499 os2*)
4500 # The test takes a long time on OS/2.
4501 lt_cv_sys_max_cmd_len=8192
44764502 ;;
44774503
44784504 osf*)
45144540 # If test is not a shell built-in, we'll probably end up computing a
45154541 # maximum length that is only half of the actual maximum length, but
45164542 # we can't tell.
4517 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
4518 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
4543 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4544 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
45194545 test $i != 17 # 1/2 MB should be enough
45204546 do
45214547 i=`expr $i + 1`
45574583 # Try some XSI features
45584584 xsi_shell=no
45594585 ( _lt_dummy="a/b/c"
4560 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
4561 = c,a/b,, \
4586 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
4587 = c,a/b,b/c, \
45624588 && eval 'test $(( 1 + 1 )) -eq 2 \
45634589 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
45644590 && xsi_shell=yes
46074633
46084634
46094635
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
4637 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
4638 if ${lt_cv_to_host_file_cmd+:} false; then :
4639 $as_echo_n "(cached) " >&6
4640 else
4641 case $host in
4642 *-*-mingw* )
4643 case $build in
4644 *-*-mingw* ) # actually msys
4645 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
4646 ;;
4647 *-*-cygwin* )
4648 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
4649 ;;
4650 * ) # otherwise, assume *nix
4651 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
4652 ;;
4653 esac
4654 ;;
4655 *-*-cygwin* )
4656 case $build in
4657 *-*-mingw* ) # actually msys
4658 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
4659 ;;
4660 *-*-cygwin* )
4661 lt_cv_to_host_file_cmd=func_convert_file_noop
4662 ;;
4663 * ) # otherwise, assume *nix
4664 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
4665 ;;
4666 esac
4667 ;;
4668 * ) # unhandled hosts (and "normal" native builds)
4669 lt_cv_to_host_file_cmd=func_convert_file_noop
4670 ;;
4671 esac
4672
4673 fi
4674
4675 to_host_file_cmd=$lt_cv_to_host_file_cmd
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
4677 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
4678
4679
4680
4681
4682
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
4684 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
4685 if ${lt_cv_to_tool_file_cmd+:} false; then :
4686 $as_echo_n "(cached) " >&6
4687 else
4688 #assume ordinary cross tools, or native build.
4689 lt_cv_to_tool_file_cmd=func_convert_file_noop
4690 case $host in
4691 *-*-mingw* )
4692 case $build in
4693 *-*-mingw* ) # actually msys
4694 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
4695 ;;
4696 esac
4697 ;;
4698 esac
4699
4700 fi
4701
4702 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
4704 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
4705
4706
4707
4708
4709
46104710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
46114711 $as_echo_n "checking for $LD option to reload object files... " >&6; }
4612 if test "${lt_cv_ld_reload_flag+set}" = set; then :
4712 if ${lt_cv_ld_reload_flag+:} false; then :
46134713 $as_echo_n "(cached) " >&6
46144714 else
46154715 lt_cv_ld_reload_flag='-r'
46234723 esac
46244724 reload_cmds='$LD$reload_flag -o $output$reload_objs'
46254725 case $host_os in
4726 cygwin* | mingw* | pw32* | cegcc*)
4727 if test "$GCC" != yes; then
4728 reload_cmds=false
4729 fi
4730 ;;
46264731 darwin*)
46274732 if test "$GCC" = yes; then
46284733 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
46454750 set dummy ${ac_tool_prefix}objdump; ac_word=$2
46464751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46474752 $as_echo_n "checking for $ac_word... " >&6; }
4648 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
4753 if ${ac_cv_prog_OBJDUMP+:} false; then :
46494754 $as_echo_n "(cached) " >&6
46504755 else
46514756 if test -n "$OBJDUMP"; then
46854790 set dummy objdump; ac_word=$2
46864791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46874792 $as_echo_n "checking for $ac_word... " >&6; }
4688 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
4793 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
46894794 $as_echo_n "(cached) " >&6
46904795 else
46914796 if test -n "$ac_ct_OBJDUMP"; then
47444849
47454850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
47464851 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
4747 if test "${lt_cv_deplibs_check_method+set}" = set; then :
4852 if ${lt_cv_deplibs_check_method+:} false; then :
47484853 $as_echo_n "(cached) " >&6
47494854 else
47504855 lt_cv_file_magic_cmd='$MAGIC_CMD'
47864891 # Base MSYS/MinGW do not provide the 'file' command needed by
47874892 # func_win32_libid shell function, so use a weaker test based on 'objdump',
47884893 # unless we find 'file', for example because we are cross-compiling.
4789 if ( file / ) >/dev/null 2>&1; then
4894 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4895 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
47904896 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
47914897 lt_cv_file_magic_cmd='func_win32_libid'
47924898 else
4793 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4899 # Keep this pattern in sync with the one in func_win32_libid.
4900 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
47944901 lt_cv_file_magic_cmd='$OBJDUMP -f'
47954902 fi
47964903 ;;
47974904
4798 cegcc)
4905 cegcc*)
47994906 # use the weaker test based on 'objdump'. See mingw*.
48004907 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
48014908 lt_cv_file_magic_cmd='$OBJDUMP -f'
48254932 lt_cv_deplibs_check_method=pass_all
48264933 ;;
48274934
4935 haiku*)
4936 lt_cv_deplibs_check_method=pass_all
4937 ;;
4938
48284939 hpux10.20* | hpux11*)
48294940 lt_cv_file_magic_cmd=/usr/bin/file
48304941 case $host_cpu in
48334944 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
48344945 ;;
48354946 hppa*64*)
4836 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
4947 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
48374948 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
48384949 ;;
48394950 *)
4840 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4951 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
48414952 lt_cv_file_magic_test_file=/usr/lib/libc.sl
48424953 ;;
48434954 esac
48584969 lt_cv_deplibs_check_method=pass_all
48594970 ;;
48604971
4861 # This must be Linux ELF.
4972 # This must be glibc/ELF.
48624973 linux* | k*bsd*-gnu | kopensolaris*-gnu)
48634974 lt_cv_deplibs_check_method=pass_all
48644975 ;;
49405051 fi
49415052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
49425053 $as_echo "$lt_cv_deplibs_check_method" >&6; }
5054
5055 file_magic_glob=
5056 want_nocaseglob=no
5057 if test "$build" = "$host"; then
5058 case $host_os in
5059 mingw* | pw32*)
5060 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5061 want_nocaseglob=yes
5062 else
5063 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
5064 fi
5065 ;;
5066 esac
5067 fi
5068
49435069 file_magic_cmd=$lt_cv_file_magic_cmd
49445070 deplibs_check_method=$lt_cv_deplibs_check_method
49455071 test -z "$deplibs_check_method" && deplibs_check_method=unknown
49555081
49565082
49575083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
49585094 if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4960 set dummy ${ac_tool_prefix}ar; ac_word=$2
5095 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5096 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
49615097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49625098 $as_echo_n "checking for $ac_word... " >&6; }
4963 if test "${ac_cv_prog_AR+set}" = set; then :
5099 if ${ac_cv_prog_DLLTOOL+:} false; then :
49645100 $as_echo_n "(cached) " >&6
49655101 else
4966 if test -n "$AR"; then
4967 ac_cv_prog_AR="$AR" # Let the user override the test.
5102 if test -n "$DLLTOOL"; then
5103 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
49685104 else
49695105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49705106 for as_dir in $PATH
49735109 test -z "$as_dir" && as_dir=.
49745110 for ac_exec_ext in '' $ac_executable_extensions; do
49755111 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4976 ac_cv_prog_AR="${ac_tool_prefix}ar"
5112 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
49775113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49785114 break 2
49795115 fi
49835119
49845120 fi
49855121 fi
4986 AR=$ac_cv_prog_AR
4987 if test -n "$AR"; then
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4989 $as_echo "$AR" >&6; }
5122 DLLTOOL=$ac_cv_prog_DLLTOOL
5123 if test -n "$DLLTOOL"; then
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5125 $as_echo "$DLLTOOL" >&6; }
49905126 else
49915127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49925128 $as_echo "no" >&6; }
49945130
49955131
49965132 fi
4997 if test -z "$ac_cv_prog_AR"; then
4998 ac_ct_AR=$AR
4999 # Extract the first word of "ar", so it can be a program name with args.
5000 set dummy ar; ac_word=$2
5133 if test -z "$ac_cv_prog_DLLTOOL"; then
5134 ac_ct_DLLTOOL=$DLLTOOL
5135 # Extract the first word of "dlltool", so it can be a program name with args.
5136 set dummy dlltool; ac_word=$2
50015137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50025138 $as_echo_n "checking for $ac_word... " >&6; }
5003 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5139 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
50045140 $as_echo_n "(cached) " >&6
50055141 else
5006 if test -n "$ac_ct_AR"; then
5007 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5142 if test -n "$ac_ct_DLLTOOL"; then
5143 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
50085144 else
50095145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50105146 for as_dir in $PATH
50135149 test -z "$as_dir" && as_dir=.
50145150 for ac_exec_ext in '' $ac_executable_extensions; do
50155151 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_ac_ct_AR="ar"
5152 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5154 break 2
5155 fi
5156 done
5157 done
5158 IFS=$as_save_IFS
5159
5160 fi
5161 fi
5162 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5163 if test -n "$ac_ct_DLLTOOL"; then
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5165 $as_echo "$ac_ct_DLLTOOL" >&6; }
5166 else
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168 $as_echo "no" >&6; }
5169 fi
5170
5171 if test "x$ac_ct_DLLTOOL" = x; then
5172 DLLTOOL="false"
5173 else
5174 case $cross_compiling:$ac_tool_warned in
5175 yes:)
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5178 ac_tool_warned=yes ;;
5179 esac
5180 DLLTOOL=$ac_ct_DLLTOOL
5181 fi
5182 else
5183 DLLTOOL="$ac_cv_prog_DLLTOOL"
5184 fi
5185
5186 test -z "$DLLTOOL" && DLLTOOL=dlltool
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
5198 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
5199 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
5200 $as_echo_n "(cached) " >&6
5201 else
5202 lt_cv_sharedlib_from_linklib_cmd='unknown'
5203
5204 case $host_os in
5205 cygwin* | mingw* | pw32* | cegcc*)
5206 # two different shell functions defined in ltmain.sh
5207 # decide which to use based on capabilities of $DLLTOOL
5208 case `$DLLTOOL --help 2>&1` in
5209 *--identify-strict*)
5210 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5211 ;;
5212 *)
5213 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5214 ;;
5215 esac
5216 ;;
5217 *)
5218 # fallback: assume linklib IS sharedlib
5219 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5220 ;;
5221 esac
5222
5223 fi
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
5225 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
5226 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5227 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5228
5229
5230
5231
5232
5233
5234
5235
5236 if test -n "$ac_tool_prefix"; then
5237 for ac_prog in ar
5238 do
5239 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5240 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5242 $as_echo_n "checking for $ac_word... " >&6; }
5243 if ${ac_cv_prog_AR+:} false; then :
5244 $as_echo_n "(cached) " >&6
5245 else
5246 if test -n "$AR"; then
5247 ac_cv_prog_AR="$AR" # Let the user override the test.
5248 else
5249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250 for as_dir in $PATH
5251 do
5252 IFS=$as_save_IFS
5253 test -z "$as_dir" && as_dir=.
5254 for ac_exec_ext in '' $ac_executable_extensions; do
5255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5256 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5258 break 2
5259 fi
5260 done
5261 done
5262 IFS=$as_save_IFS
5263
5264 fi
5265 fi
5266 AR=$ac_cv_prog_AR
5267 if test -n "$AR"; then
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5269 $as_echo "$AR" >&6; }
5270 else
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272 $as_echo "no" >&6; }
5273 fi
5274
5275
5276 test -n "$AR" && break
5277 done
5278 fi
5279 if test -z "$AR"; then
5280 ac_ct_AR=$AR
5281 for ac_prog in ar
5282 do
5283 # Extract the first word of "$ac_prog", so it can be a program name with args.
5284 set dummy $ac_prog; ac_word=$2
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5286 $as_echo_n "checking for $ac_word... " >&6; }
5287 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5288 $as_echo_n "(cached) " >&6
5289 else
5290 if test -n "$ac_ct_AR"; then
5291 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5292 else
5293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5294 for as_dir in $PATH
5295 do
5296 IFS=$as_save_IFS
5297 test -z "$as_dir" && as_dir=.
5298 for ac_exec_ext in '' $ac_executable_extensions; do
5299 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5300 ac_cv_prog_ac_ct_AR="$ac_prog"
50175301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50185302 break 2
50195303 fi
50315315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50325316 $as_echo "no" >&6; }
50335317 fi
5318
5319
5320 test -n "$ac_ct_AR" && break
5321 done
50345322
50355323 if test "x$ac_ct_AR" = x; then
50365324 AR="false"
50435331 esac
50445332 AR=$ac_ct_AR
50455333 fi
5046 else
5047 AR="$ac_cv_prog_AR"
5048 fi
5049
5050 test -z "$AR" && AR=ar
5051 test -z "$AR_FLAGS" && AR_FLAGS=cru
5052
5053
5054
5055
5334 fi
5335
5336 : ${AR=ar}
5337 : ${AR_FLAGS=cru}
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
5350 $as_echo_n "checking for archiver @FILE support... " >&6; }
5351 if ${lt_cv_ar_at_file+:} false; then :
5352 $as_echo_n "(cached) " >&6
5353 else
5354 lt_cv_ar_at_file=no
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356 /* end confdefs.h. */
5357
5358 int
5359 main ()
5360 {
5361
5362 ;
5363 return 0;
5364 }
5365 _ACEOF
5366 if ac_fn_c_try_compile "$LINENO"; then :
5367 echo conftest.$ac_objext > conftest.lst
5368 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
5369 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5370 (eval $lt_ar_try) 2>&5
5371 ac_status=$?
5372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5373 test $ac_status = 0; }
5374 if test "$ac_status" -eq 0; then
5375 # Ensure the archiver fails upon bogus file names.
5376 rm -f conftest.$ac_objext libconftest.a
5377 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5378 (eval $lt_ar_try) 2>&5
5379 ac_status=$?
5380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5381 test $ac_status = 0; }
5382 if test "$ac_status" -ne 0; then
5383 lt_cv_ar_at_file=@
5384 fi
5385 fi
5386 rm -f conftest.* libconftest.a
5387
5388 fi
5389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390
5391 fi
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
5393 $as_echo "$lt_cv_ar_at_file" >&6; }
5394
5395 if test "x$lt_cv_ar_at_file" = xno; then
5396 archiver_list_spec=
5397 else
5398 archiver_list_spec=$lt_cv_ar_at_file
5399 fi
50565400
50575401
50585402
50655409 set dummy ${ac_tool_prefix}strip; ac_word=$2
50665410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50675411 $as_echo_n "checking for $ac_word... " >&6; }
5068 if test "${ac_cv_prog_STRIP+set}" = set; then :
5412 if ${ac_cv_prog_STRIP+:} false; then :
50695413 $as_echo_n "(cached) " >&6
50705414 else
50715415 if test -n "$STRIP"; then
51055449 set dummy strip; ac_word=$2
51065450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51075451 $as_echo_n "checking for $ac_word... " >&6; }
5108 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
5452 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
51095453 $as_echo_n "(cached) " >&6
51105454 else
51115455 if test -n "$ac_ct_STRIP"; then
51645508 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
51655509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51665510 $as_echo_n "checking for $ac_word... " >&6; }
5167 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5511 if ${ac_cv_prog_RANLIB+:} false; then :
51685512 $as_echo_n "(cached) " >&6
51695513 else
51705514 if test -n "$RANLIB"; then
52045548 set dummy ranlib; ac_word=$2
52055549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52065550 $as_echo_n "checking for $ac_word... " >&6; }
5207 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5551 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
52085552 $as_echo_n "(cached) " >&6
52095553 else
52105554 if test -n "$ac_ct_RANLIB"; then
52665610 if test -n "$RANLIB"; then
52675611 case $host_os in
52685612 openbsd*)
5269 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
5613 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
52705614 ;;
52715615 *)
5272 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
5616 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
52735617 ;;
52745618 esac
5275 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5276 fi
5619 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5620 fi
5621
5622 case $host_os in
5623 darwin*)
5624 lock_old_archive_extraction=yes ;;
5625 *)
5626 lock_old_archive_extraction=no ;;
5627 esac
5628
5629
5630
5631
5632
52775633
52785634
52795635
53215677 # Check for command to grab the raw symbol name followed by C symbol from nm.
53225678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
53235679 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5324 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
5680 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
53255681 $as_echo_n "(cached) " >&6
53265682 else
53275683
53825738 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
53835739
53845740 # Transform an extracted symbol line into symbol name and symbol address
5385 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5386 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
5741 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5742 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
53875743
53885744 # Handle CRLF in mingw tool chain
53895745 opt_cr=
54075763 # which start with @ or ?.
54085764 lt_cv_sys_global_symbol_pipe="$AWK '"\
54095765 " {last_section=section; section=\$ 3};"\
5766 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
54105767 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
54115768 " \$ 0!~/External *\|/{next};"\
54125769 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
54195776 else
54205777 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
54215778 fi
5779 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
54225780
54235781 # Check to see that the pipe works correctly.
54245782 pipe_works=no
54445802 test $ac_status = 0; }; then
54455803 # Now try to grab the symbols.
54465804 nlist=conftest.nm
5447 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
5448 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
5805 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
5806 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
54495807 ac_status=$?
54505808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54515809 test $ac_status = 0; } && test -s "$nlist"; then
54605818 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
54615819 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
54625820 cat <<_LT_EOF > conftest.$ac_ext
5821 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5822 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5823 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5824 relocations are performed -- see ld's documentation on pseudo-relocs. */
5825 # define LT_DLSYM_CONST
5826 #elif defined(__osf__)
5827 /* This system does not cope well with relocations in const data. */
5828 # define LT_DLSYM_CONST
5829 #else
5830 # define LT_DLSYM_CONST const
5831 #endif
5832
54635833 #ifdef __cplusplus
54645834 extern "C" {
54655835 #endif
54715841 cat <<_LT_EOF >> conftest.$ac_ext
54725842
54735843 /* The mapping between symbol names and symbols. */
5474 const struct {
5844 LT_DLSYM_CONST struct {
54755845 const char *name;
54765846 void *address;
54775847 }
54975867 _LT_EOF
54985868 # Now try linking the two files.
54995869 mv conftest.$ac_objext conftstm.$ac_objext
5500 lt_save_LIBS="$LIBS"
5501 lt_save_CFLAGS="$CFLAGS"
5870 lt_globsym_save_LIBS=$LIBS
5871 lt_globsym_save_CFLAGS=$CFLAGS
55025872 LIBS="conftstm.$ac_objext"
55035873 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
55045874 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55085878 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
55095879 pipe_works=yes
55105880 fi
5511 LIBS="$lt_save_LIBS"
5512 CFLAGS="$lt_save_CFLAGS"
5881 LIBS=$lt_globsym_save_LIBS
5882 CFLAGS=$lt_globsym_save_CFLAGS
55135883 else
55145884 echo "cannot find nm_test_func in $nlist" >&5
55155885 fi
55465916 $as_echo "ok" >&6; }
55475917 fi
55485918
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5919 # Response file support.
5920 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5921 nm_file_list_spec='@'
5922 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
5923 nm_file_list_spec='@'
5924 fi
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
5953 $as_echo_n "checking for sysroot... " >&6; }
5954
5955 # Check whether --with-sysroot was given.
5956 if test "${with_sysroot+set}" = set; then :
5957 withval=$with_sysroot;
5958 else
5959 with_sysroot=no
5960 fi
5961
5962
5963 lt_sysroot=
5964 case ${with_sysroot} in #(
5965 yes)
5966 if test "$GCC" = yes; then
5967 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
5968 fi
5969 ;; #(
5970 /*)
5971 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
5972 ;; #(
5973 no|'')
5974 ;; #(
5975 *)
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
5977 $as_echo "${with_sysroot}" >&6; }
5978 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
5979 ;;
5980 esac
5981
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
5983 $as_echo "${lt_sysroot:-no}" >&6; }
55665984
55675985
55685986
55996017 ;;
56006018 *-*-irix6*)
56016019 # Find out which ABI we are using.
5602 echo '#line 5603 "configure"' > conftest.$ac_ext
6020 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
56036021 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
56046022 (eval $ac_compile) 2>&5
56056023 ac_status=$?
56936111 CFLAGS="$CFLAGS -belf"
56946112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
56956113 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
5696 if test "${lt_cv_cc_needs_belf+set}" = set; then :
6114 if ${lt_cv_cc_needs_belf+:} false; then :
56976115 $as_echo_n "(cached) " >&6
56986116 else
56996117 ac_ext=c
57346152 CFLAGS="$SAVE_CFLAGS"
57356153 fi
57366154 ;;
5737 sparc*-*solaris*)
6155 *-*solaris*)
57386156 # Find out which ABI we are using.
57396157 echo 'int i;' > conftest.$ac_ext
57406158 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
57456163 case `/usr/bin/file conftest.o` in
57466164 *64-bit*)
57476165 case $lt_cv_prog_gnu_ld in
5748 yes*) LD="${LD-ld} -m elf64_sparc" ;;
6166 yes*)
6167 case $host in
6168 i?86-*-solaris*)
6169 LD="${LD-ld} -m elf_x86_64"
6170 ;;
6171 sparc*-*-solaris*)
6172 LD="${LD-ld} -m elf64_sparc"
6173 ;;
6174 esac
6175 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
6176 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
6177 LD="${LD-ld}_sol2"
6178 fi
6179 ;;
57496180 *)
57506181 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
57516182 LD="${LD-ld} -64"
57616192
57626193 need_locks="$enable_libtool_lock"
57636194
6195 if test -n "$ac_tool_prefix"; then
6196 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
6197 set dummy ${ac_tool_prefix}mt; ac_word=$2
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6199 $as_echo_n "checking for $ac_word... " >&6; }
6200 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
6201 $as_echo_n "(cached) " >&6
6202 else
6203 if test -n "$MANIFEST_TOOL"; then
6204 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
6205 else
6206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207 for as_dir in $PATH
6208 do
6209 IFS=$as_save_IFS
6210 test -z "$as_dir" && as_dir=.
6211 for ac_exec_ext in '' $ac_executable_extensions; do
6212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6213 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
6214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215 break 2
6216 fi
6217 done
6218 done
6219 IFS=$as_save_IFS
6220
6221 fi
6222 fi
6223 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
6224 if test -n "$MANIFEST_TOOL"; then
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
6226 $as_echo "$MANIFEST_TOOL" >&6; }
6227 else
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229 $as_echo "no" >&6; }
6230 fi
6231
6232
6233 fi
6234 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
6235 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
6236 # Extract the first word of "mt", so it can be a program name with args.
6237 set dummy mt; ac_word=$2
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6239 $as_echo_n "checking for $ac_word... " >&6; }
6240 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
6241 $as_echo_n "(cached) " >&6
6242 else
6243 if test -n "$ac_ct_MANIFEST_TOOL"; then
6244 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
6245 else
6246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247 for as_dir in $PATH
6248 do
6249 IFS=$as_save_IFS
6250 test -z "$as_dir" && as_dir=.
6251 for ac_exec_ext in '' $ac_executable_extensions; do
6252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6253 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
6254 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255 break 2
6256 fi
6257 done
6258 done
6259 IFS=$as_save_IFS
6260
6261 fi
6262 fi
6263 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
6264 if test -n "$ac_ct_MANIFEST_TOOL"; then
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
6266 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
6267 else
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269 $as_echo "no" >&6; }
6270 fi
6271
6272 if test "x$ac_ct_MANIFEST_TOOL" = x; then
6273 MANIFEST_TOOL=":"
6274 else
6275 case $cross_compiling:$ac_tool_warned in
6276 yes:)
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6278 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6279 ac_tool_warned=yes ;;
6280 esac
6281 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
6282 fi
6283 else
6284 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
6285 fi
6286
6287 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
6289 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
6290 if ${lt_cv_path_mainfest_tool+:} false; then :
6291 $as_echo_n "(cached) " >&6
6292 else
6293 lt_cv_path_mainfest_tool=no
6294 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
6295 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6296 cat conftest.err >&5
6297 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6298 lt_cv_path_mainfest_tool=yes
6299 fi
6300 rm -f conftest*
6301 fi
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
6303 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
6304 if test "x$lt_cv_path_mainfest_tool" != xyes; then
6305 MANIFEST_TOOL=:
6306 fi
6307
6308
6309
6310
6311
57646312
57656313 case $host_os in
57666314 rhapsody* | darwin*)
57696317 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
57706318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57716319 $as_echo_n "checking for $ac_word... " >&6; }
5772 if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
6320 if ${ac_cv_prog_DSYMUTIL+:} false; then :
57736321 $as_echo_n "(cached) " >&6
57746322 else
57756323 if test -n "$DSYMUTIL"; then
58096357 set dummy dsymutil; ac_word=$2
58106358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58116359 $as_echo_n "checking for $ac_word... " >&6; }
5812 if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
6360 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
58136361 $as_echo_n "(cached) " >&6
58146362 else
58156363 if test -n "$ac_ct_DSYMUTIL"; then
58616409 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
58626410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58636411 $as_echo_n "checking for $ac_word... " >&6; }
5864 if test "${ac_cv_prog_NMEDIT+set}" = set; then :
6412 if ${ac_cv_prog_NMEDIT+:} false; then :
58656413 $as_echo_n "(cached) " >&6
58666414 else
58676415 if test -n "$NMEDIT"; then
59016449 set dummy nmedit; ac_word=$2
59026450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59036451 $as_echo_n "checking for $ac_word... " >&6; }
5904 if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
6452 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
59056453 $as_echo_n "(cached) " >&6
59066454 else
59076455 if test -n "$ac_ct_NMEDIT"; then
59536501 set dummy ${ac_tool_prefix}lipo; ac_word=$2
59546502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59556503 $as_echo_n "checking for $ac_word... " >&6; }
5956 if test "${ac_cv_prog_LIPO+set}" = set; then :
6504 if ${ac_cv_prog_LIPO+:} false; then :
59576505 $as_echo_n "(cached) " >&6
59586506 else
59596507 if test -n "$LIPO"; then
59936541 set dummy lipo; ac_word=$2
59946542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59956543 $as_echo_n "checking for $ac_word... " >&6; }
5996 if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
6544 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
59976545 $as_echo_n "(cached) " >&6
59986546 else
59996547 if test -n "$ac_ct_LIPO"; then
60456593 set dummy ${ac_tool_prefix}otool; ac_word=$2
60466594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60476595 $as_echo_n "checking for $ac_word... " >&6; }
6048 if test "${ac_cv_prog_OTOOL+set}" = set; then :
6596 if ${ac_cv_prog_OTOOL+:} false; then :
60496597 $as_echo_n "(cached) " >&6
60506598 else
60516599 if test -n "$OTOOL"; then
60856633 set dummy otool; ac_word=$2
60866634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60876635 $as_echo_n "checking for $ac_word... " >&6; }
6088 if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
6636 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
60896637 $as_echo_n "(cached) " >&6
60906638 else
60916639 if test -n "$ac_ct_OTOOL"; then
61376685 set dummy ${ac_tool_prefix}otool64; ac_word=$2
61386686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61396687 $as_echo_n "checking for $ac_word... " >&6; }
6140 if test "${ac_cv_prog_OTOOL64+set}" = set; then :
6688 if ${ac_cv_prog_OTOOL64+:} false; then :
61416689 $as_echo_n "(cached) " >&6
61426690 else
61436691 if test -n "$OTOOL64"; then
61776725 set dummy otool64; ac_word=$2
61786726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61796727 $as_echo_n "checking for $ac_word... " >&6; }
6180 if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
6728 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
61816729 $as_echo_n "(cached) " >&6
61826730 else
61836731 if test -n "$ac_ct_OTOOL64"; then
62526800
62536801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
62546802 $as_echo_n "checking for -single_module linker flag... " >&6; }
6255 if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
6803 if ${lt_cv_apple_cc_single_mod+:} false; then :
62566804 $as_echo_n "(cached) " >&6
62576805 else
62586806 lt_cv_apple_cc_single_mod=no
62686816 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
62696817 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
62706818 _lt_result=$?
6271 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
6819 # If there is a non-empty error log, and "single_module"
6820 # appears in it, assume the flag caused a linker warning
6821 if test -s conftest.err && $GREP single_module conftest.err; then
6822 cat conftest.err >&5
6823 # Otherwise, if the output was created with a 0 exit code from
6824 # the compiler, it worked.
6825 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
62726826 lt_cv_apple_cc_single_mod=yes
62736827 else
62746828 cat conftest.err >&5
62796833 fi
62806834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
62816835 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6836
62826837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
62836838 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6284 if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
6839 if ${lt_cv_ld_exported_symbols_list+:} false; then :
62856840 $as_echo_n "(cached) " >&6
62866841 else
62876842 lt_cv_ld_exported_symbols_list=no
63116866 fi
63126867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
63136868 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6869
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
6871 $as_echo_n "checking for -force_load linker flag... " >&6; }
6872 if ${lt_cv_ld_force_load+:} false; then :
6873 $as_echo_n "(cached) " >&6
6874 else
6875 lt_cv_ld_force_load=no
6876 cat > conftest.c << _LT_EOF
6877 int forced_loaded() { return 2;}
6878 _LT_EOF
6879 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
6880 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
6881 echo "$AR cru libconftest.a conftest.o" >&5
6882 $AR cru libconftest.a conftest.o 2>&5
6883 echo "$RANLIB libconftest.a" >&5
6884 $RANLIB libconftest.a 2>&5
6885 cat > conftest.c << _LT_EOF
6886 int main() { return 0;}
6887 _LT_EOF
6888 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
6889 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
6890 _lt_result=$?
6891 if test -s conftest.err && $GREP force_load conftest.err; then
6892 cat conftest.err >&5
6893 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
6894 lt_cv_ld_force_load=yes
6895 else
6896 cat conftest.err >&5
6897 fi
6898 rm -f conftest.err libconftest.a conftest conftest.c
6899 rm -rf conftest.dSYM
6900
6901 fi
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
6903 $as_echo "$lt_cv_ld_force_load" >&6; }
63146904 case $host_os in
63156905 rhapsody* | darwin1.[012])
63166906 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
63386928 else
63396929 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
63406930 fi
6341 if test "$DSYMUTIL" != ":"; then
6931 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
63426932 _lt_dsymutil='~$DSYMUTIL $lib || :'
63436933 else
63446934 _lt_dsymutil=
63586948 CPP=
63596949 fi
63606950 if test -z "$CPP"; then
6361 if test "${ac_cv_prog_CPP+set}" = set; then :
6951 if ${ac_cv_prog_CPP+:} false; then :
63626952 $as_echo_n "(cached) " >&6
63636953 else
63646954 # Double quotes because CPP needs to be expanded
63886978 # Broken: fails on valid input.
63896979 continue
63906980 fi
6391 rm -f conftest.err conftest.$ac_ext
6981 rm -f conftest.err conftest.i conftest.$ac_ext
63926982
63936983 # OK, works on sane cases. Now check whether nonexistent headers
63946984 # can be detected and how.
64046994 ac_preproc_ok=:
64056995 break
64066996 fi
6407 rm -f conftest.err conftest.$ac_ext
6997 rm -f conftest.err conftest.i conftest.$ac_ext
64086998
64096999 done
64107000 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6411 rm -f conftest.err conftest.$ac_ext
7001 rm -f conftest.i conftest.err conftest.$ac_ext
64127002 if $ac_preproc_ok; then :
64137003 break
64147004 fi
64477037 # Broken: fails on valid input.
64487038 continue
64497039 fi
6450 rm -f conftest.err conftest.$ac_ext
7040 rm -f conftest.err conftest.i conftest.$ac_ext
64517041
64527042 # OK, works on sane cases. Now check whether nonexistent headers
64537043 # can be detected and how.
64637053 ac_preproc_ok=:
64647054 break
64657055 fi
6466 rm -f conftest.err conftest.$ac_ext
7056 rm -f conftest.err conftest.i conftest.$ac_ext
64677057
64687058 done
64697059 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6470 rm -f conftest.err conftest.$ac_ext
7060 rm -f conftest.i conftest.err conftest.$ac_ext
64717061 if $ac_preproc_ok; then :
64727062
64737063 else
64747064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
64757065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6476 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6477 See \`config.log' for more details." "$LINENO" 5; }
7066 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7067 See \`config.log' for more details" "$LINENO" 5; }
64787068 fi
64797069
64807070 ac_ext=c
64867076
64877077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
64887078 $as_echo_n "checking for ANSI C header files... " >&6; }
6489 if test "${ac_cv_header_stdc+set}" = set; then :
7079 if ${ac_cv_header_stdc+:} false; then :
64907080 $as_echo_n "(cached) " >&6
64917081 else
64927082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66037193 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
66047194 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
66057195 "
6606 eval as_val=\$$as_ac_Header
6607 if test "x$as_val" = x""yes; then :
7196 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
66087197 cat >>confdefs.h <<_ACEOF
66097198 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
66107199 _ACEOF
66187207 do :
66197208 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
66207209 "
6621 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7210 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
66227211 cat >>confdefs.h <<_ACEOF
66237212 #define HAVE_DLFCN_H 1
66247213 _ACEOF
66267215 fi
66277216
66287217 done
7218
7219
66297220
66307221
66317222
67047295
67057296 # Check whether --with-pic was given.
67067297 if test "${with_pic+set}" = set; then :
6707 withval=$with_pic; pic_mode="$withval"
7298 withval=$with_pic; lt_p=${PACKAGE-default}
7299 case $withval in
7300 yes|no) pic_mode=$withval ;;
7301 *)
7302 pic_mode=default
7303 # Look at the argument we got. We use all the common list separators.
7304 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7305 for lt_pkg in $withval; do
7306 IFS="$lt_save_ifs"
7307 if test "X$lt_pkg" = "X$lt_p"; then
7308 pic_mode=yes
7309 fi
7310 done
7311 IFS="$lt_save_ifs"
7312 ;;
7313 esac
67087314 else
67097315 pic_mode=default
67107316 fi
67817387
67827388
67837389
7390
7391
7392
7393
7394
67847395 test -z "$LN_S" && LN_S="ln -s"
67857396
67867397
68027413
68037414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
68047415 $as_echo_n "checking for objdir... " >&6; }
6805 if test "${lt_cv_objdir+set}" = set; then :
7416 if ${lt_cv_objdir+:} false; then :
68067417 $as_echo_n "(cached) " >&6
68077418 else
68087419 rm -f .libs 2>/dev/null
68267437 cat >>confdefs.h <<_ACEOF
68277438 #define LT_OBJDIR "$lt_cv_objdir/"
68287439 _ACEOF
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
68427440
68437441
68447442
68557453 ;;
68567454 esac
68577455
6858 # Sed substitution that helps us do robust quoting. It backslashifies
6859 # metacharacters that are still active within double-quoted strings.
6860 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6861
6862 # Same as above, but do not quote variable references.
6863 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6864
6865 # Sed substitution to delay expansion of an escaped shell variable in a
6866 # double_quote_subst'ed string.
6867 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6868
6869 # Sed substitution to delay expansion of an escaped single quote.
6870 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6871
6872 # Sed substitution to avoid accidental globbing in evaled expressions
6873 no_glob_subst='s/\*/\\\*/g'
6874
68757456 # Global variables:
68767457 ofile=libtool
68777458 can_build_shared=yes
69007481 *) break;;
69017482 esac
69027483 done
6903 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7484 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
69047485
69057486
69067487 # Only perform the check for file, if the check method requires it
69107491 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
69117492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
69127493 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
6913 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7494 if ${lt_cv_path_MAGIC_CMD+:} false; then :
69147495 $as_echo_n "(cached) " >&6
69157496 else
69167497 case $MAGIC_CMD in
69767557 if test -n "$ac_tool_prefix"; then
69777558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
69787559 $as_echo_n "checking for file... " >&6; }
6979 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7560 if ${lt_cv_path_MAGIC_CMD+:} false; then :
69807561 $as_echo_n "(cached) " >&6
69817562 else
69827563 case $MAGIC_CMD in
71007681 $RM -r conftest*
71017682
71027683
7684 ## CAVEAT EMPTOR:
7685 ## There is no encapsulation within the following macros, do not change
7686 ## the running order or otherwise move them around unless you know exactly
7687 ## what you are doing...
71037688 if test -n "$compiler"; then
71047689
71057690 lt_prog_compiler_no_builtin_flag=
71067691
71077692 if test "$GCC" = yes; then
7108 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7693 case $cc_basename in
7694 nvcc*)
7695 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
7696 *)
7697 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
7698 esac
71097699
71107700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
71117701 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7112 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
7702 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
71137703 $as_echo_n "(cached) " >&6
71147704 else
71157705 lt_cv_prog_compiler_rtti_exceptions=no
71257715 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
71267716 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
71277717 -e 's:$: $lt_compiler_flag:'`
7128 (eval echo "\"\$as_me:7129: $lt_compile\"" >&5)
7718 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
71297719 (eval "$lt_compile" 2>conftest.err)
71307720 ac_status=$?
71317721 cat conftest.err >&5
7132 echo "$as_me:7133: \$? = $ac_status" >&5
7722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
71337723 if (exit $ac_status) && test -s "$ac_outfile"; then
71347724 # The compiler can only warn and ignore the option if not recognized
71357725 # So say no if there are warnings other than the usual output.
7136 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7726 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
71377727 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
71387728 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
71397729 lt_cv_prog_compiler_rtti_exceptions=yes
71627752 lt_prog_compiler_pic=
71637753 lt_prog_compiler_static=
71647754
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7166 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
71677755
71687756 if test "$GCC" = yes; then
71697757 lt_prog_compiler_wl='-Wl,'
72117799 lt_prog_compiler_pic='-fno-common'
72127800 ;;
72137801
7802 haiku*)
7803 # PIC is the default for Haiku.
7804 # The "-static" flag exists, but is broken.
7805 lt_prog_compiler_static=
7806 ;;
7807
72147808 hpux*)
72157809 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
72167810 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
72517845
72527846 *)
72537847 lt_prog_compiler_pic='-fPIC'
7848 ;;
7849 esac
7850
7851 case $cc_basename in
7852 nvcc*) # Cuda Compiler Driver 2.2
7853 lt_prog_compiler_wl='-Xlinker '
7854 if test -n "$lt_prog_compiler_pic"; then
7855 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
7856 fi
72547857 ;;
72557858 esac
72567859 else
73157918 lt_prog_compiler_pic='--shared'
73167919 lt_prog_compiler_static='--static'
73177920 ;;
7318 pgcc* | pgf77* | pgf90* | pgf95*)
7921 nagfor*)
7922 # NAG Fortran compiler
7923 lt_prog_compiler_wl='-Wl,-Wl,,'
7924 lt_prog_compiler_pic='-PIC'
7925 lt_prog_compiler_static='-Bstatic'
7926 ;;
7927 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
73197928 # Portland Group compilers (*not* the Pentium gcc compiler,
73207929 # which looks to be a dead project)
73217930 lt_prog_compiler_wl='-Wl,'
73277936 # All Alpha code is PIC.
73287937 lt_prog_compiler_static='-non_shared'
73297938 ;;
7330 xl*)
7331 # IBM XL C 8.0/Fortran 10.1 on PPC
7939 xl* | bgxl* | bgf* | mpixl*)
7940 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
73327941 lt_prog_compiler_wl='-Wl,'
73337942 lt_prog_compiler_pic='-qpic'
73347943 lt_prog_compiler_static='-qstaticlink'
73357944 ;;
73367945 *)
73377946 case `$CC -V 2>&1 | sed 5q` in
7947 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
7948 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7949 lt_prog_compiler_pic='-KPIC'
7950 lt_prog_compiler_static='-Bstatic'
7951 lt_prog_compiler_wl=''
7952 ;;
7953 *Sun\ F* | *Sun*Fortran*)
7954 lt_prog_compiler_pic='-KPIC'
7955 lt_prog_compiler_static='-Bstatic'
7956 lt_prog_compiler_wl='-Qoption ld '
7957 ;;
73387958 *Sun\ C*)
73397959 # Sun C 5.9
73407960 lt_prog_compiler_pic='-KPIC'
73417961 lt_prog_compiler_static='-Bstatic'
73427962 lt_prog_compiler_wl='-Wl,'
73437963 ;;
7344 *Sun\ F*)
7345 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7346 lt_prog_compiler_pic='-KPIC'
7964 *Intel*\ [CF]*Compiler*)
7965 lt_prog_compiler_wl='-Wl,'
7966 lt_prog_compiler_pic='-fPIC'
7967 lt_prog_compiler_static='-static'
7968 ;;
7969 *Portland\ Group*)
7970 lt_prog_compiler_wl='-Wl,'
7971 lt_prog_compiler_pic='-fpic'
73477972 lt_prog_compiler_static='-Bstatic'
7348 lt_prog_compiler_wl=''
73497973 ;;
73507974 esac
73517975 ;;
73778001 lt_prog_compiler_pic='-KPIC'
73788002 lt_prog_compiler_static='-Bstatic'
73798003 case $cc_basename in
7380 f77* | f90* | f95*)
8004 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
73818005 lt_prog_compiler_wl='-Qoption ld ';;
73828006 *)
73838007 lt_prog_compiler_wl='-Wl,';;
74348058 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
74358059 ;;
74368060 esac
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7438 $as_echo "$lt_prog_compiler_pic" >&6; }
7439
7440
7441
7442
7443
8061
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8063 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8064 if ${lt_cv_prog_compiler_pic+:} false; then :
8065 $as_echo_n "(cached) " >&6
8066 else
8067 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
8068 fi
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
8070 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
8071 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
74448072
74458073 #
74468074 # Check to make sure the PIC flag actually works.
74488076 if test -n "$lt_prog_compiler_pic"; then
74498077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
74508078 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7451 if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
8079 if ${lt_cv_prog_compiler_pic_works+:} false; then :
74528080 $as_echo_n "(cached) " >&6
74538081 else
74548082 lt_cv_prog_compiler_pic_works=no
74648092 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
74658093 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
74668094 -e 's:$: $lt_compiler_flag:'`
7467 (eval echo "\"\$as_me:7468: $lt_compile\"" >&5)
8095 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
74688096 (eval "$lt_compile" 2>conftest.err)
74698097 ac_status=$?
74708098 cat conftest.err >&5
7471 echo "$as_me:7472: \$? = $ac_status" >&5
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
74728100 if (exit $ac_status) && test -s "$ac_outfile"; then
74738101 # The compiler can only warn and ignore the option if not recognized
74748102 # So say no if there are warnings other than the usual output.
7475 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8103 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
74768104 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
74778105 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
74788106 lt_cv_prog_compiler_pic_works=yes
75018129
75028130
75038131
8132
8133
8134
8135
8136
75048137 #
75058138 # Check to make sure the static flag actually works.
75068139 #
75078140 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
75088141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
75098142 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
7510 if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
8143 if ${lt_cv_prog_compiler_static_works+:} false; then :
75118144 $as_echo_n "(cached) " >&6
75128145 else
75138146 lt_cv_prog_compiler_static_works=no
75208153 if test -s conftest.err; then
75218154 # Append any errors to the config.log.
75228155 cat conftest.err 1>&5
7523 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
8156 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
75248157 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
75258158 if diff conftest.exp conftest.er2 >/dev/null; then
75268159 lt_cv_prog_compiler_static_works=yes
75508183
75518184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
75528185 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
7553 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8186 if ${lt_cv_prog_compiler_c_o+:} false; then :
75548187 $as_echo_n "(cached) " >&6
75558188 else
75568189 lt_cv_prog_compiler_c_o=no
75698202 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
75708203 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
75718204 -e 's:$: $lt_compiler_flag:'`
7572 (eval echo "\"\$as_me:7573: $lt_compile\"" >&5)
8205 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
75738206 (eval "$lt_compile" 2>out/conftest.err)
75748207 ac_status=$?
75758208 cat out/conftest.err >&5
7576 echo "$as_me:7577: \$? = $ac_status" >&5
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
75778210 if (exit $ac_status) && test -s out/conftest2.$ac_objext
75788211 then
75798212 # The compiler can only warn and ignore the option if not recognized
75808213 # So say no if there are warnings
7581 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8214 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
75828215 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
75838216 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
75848217 lt_cv_prog_compiler_c_o=yes
76058238
76068239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
76078240 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
7608 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8241 if ${lt_cv_prog_compiler_c_o+:} false; then :
76098242 $as_echo_n "(cached) " >&6
76108243 else
76118244 lt_cv_prog_compiler_c_o=no
76248257 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
76258258 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
76268259 -e 's:$: $lt_compiler_flag:'`
7627 (eval echo "\"\$as_me:7628: $lt_compile\"" >&5)
8260 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
76288261 (eval "$lt_compile" 2>out/conftest.err)
76298262 ac_status=$?
76308263 cat out/conftest.err >&5
7631 echo "$as_me:7632: \$? = $ac_status" >&5
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
76328265 if (exit $ac_status) && test -s out/conftest2.$ac_objext
76338266 then
76348267 # The compiler can only warn and ignore the option if not recognized
76358268 # So say no if there are warnings
7636 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8269 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
76378270 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
76388271 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
76398272 lt_cv_prog_compiler_c_o=yes
76998332 hardcode_direct=no
77008333 hardcode_direct_absolute=no
77018334 hardcode_libdir_flag_spec=
7702 hardcode_libdir_flag_spec_ld=
77038335 hardcode_libdir_separator=
77048336 hardcode_minus_L=no
77058337 hardcode_shlibpath_var=unsupported
77438375 openbsd*)
77448376 with_gnu_ld=no
77458377 ;;
7746 linux* | k*bsd*-gnu)
8378 linux* | k*bsd*-gnu | gnu*)
77478379 link_all_deplibs=no
77488380 ;;
77498381 esac
77508382
77518383 ld_shlibs=yes
8384
8385 # On some targets, GNU ld is compatible enough with the native linker
8386 # that we're better off using the native interface for both.
8387 lt_use_gnu_ld_interface=no
77528388 if test "$with_gnu_ld" = yes; then
8389 case $host_os in
8390 aix*)
8391 # The AIX port of GNU ld has always aspired to compatibility
8392 # with the native linker. However, as the warning in the GNU ld
8393 # block says, versions before 2.19.5* couldn't really create working
8394 # shared libraries, regardless of the interface used.
8395 case `$LD -v 2>&1` in
8396 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8397 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
8398 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
8399 *)
8400 lt_use_gnu_ld_interface=yes
8401 ;;
8402 esac
8403 ;;
8404 *)
8405 lt_use_gnu_ld_interface=yes
8406 ;;
8407 esac
8408 fi
8409
8410 if test "$lt_use_gnu_ld_interface" = yes; then
77538411 # If archive_cmds runs LD, not CC, wlarc should be empty
77548412 wlarc='${wl}'
77558413
77838441 ld_shlibs=no
77848442 cat <<_LT_EOF 1>&2
77858443
7786 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8444 *** Warning: the GNU linker, at least up to release 2.19, is reported
77878445 *** to be unable to reliably create shared libraries on AIX.
77888446 *** Therefore, libtool is disabling shared libraries support. If you
7789 *** really care for shared libraries, you may want to modify your PATH
7790 *** so that a non-GNU linker is found, and then restart.
8447 *** really care for shared libraries, you may want to install binutils
8448 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8449 *** You will then need to restart the configuration process.
77918450
77928451 _LT_EOF
77938452 fi
78238482 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
78248483 # as there is no search path for DLLs.
78258484 hardcode_libdir_flag_spec='-L$libdir'
8485 export_dynamic_flag_spec='${wl}--export-all-symbols'
78268486 allow_undefined_flag=unsupported
78278487 always_export_symbols=no
78288488 enable_shared_with_static_runtimes=yes
7829 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8489 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
8490 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
78308491
78318492 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
78328493 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
78448505 fi
78458506 ;;
78468507
8508 haiku*)
8509 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8510 link_all_deplibs=yes
8511 ;;
8512
78478513 interix[3-9]*)
78488514 hardcode_direct=no
78498515 hardcode_shlibpath_var=no
78698535 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
78708536 && test "$tmp_diet" = no
78718537 then
7872 tmp_addflag=
8538 tmp_addflag=' $pic_flag'
78738539 tmp_sharedflag='-shared'
78748540 case $cc_basename,$host_cpu in
78758541 pgcc*) # Portland Group C compiler
7876 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8542 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
78778543 tmp_addflag=' $pic_flag'
78788544 ;;
7879 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7880 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8545 pgf77* | pgf90* | pgf95* | pgfortran*)
8546 # Portland Group f77 and f90 compilers
8547 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
78818548 tmp_addflag=' $pic_flag -Mnomain' ;;
78828549 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
78838550 tmp_addflag=' -i_dynamic' ;;
78888555 lf95*) # Lahey Fortran 8.1
78898556 whole_archive_flag_spec=
78908557 tmp_sharedflag='--shared' ;;
7891 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8558 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
78928559 tmp_sharedflag='-qmkshrobj'
78938560 tmp_addflag= ;;
8561 nvcc*) # Cuda Compiler Driver 2.2
8562 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8563 compiler_needs_object=yes
8564 ;;
78948565 esac
78958566 case `$CC -V 2>&1 | sed 5q` in
78968567 *Sun\ C*) # Sun C 5.9
7897 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8568 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
78988569 compiler_needs_object=yes
78998570 tmp_sharedflag='-G' ;;
79008571 *Sun\ F*) # Sun Fortran 8.3
79108581 fi
79118582
79128583 case $cc_basename in
7913 xlf*)
8584 xlf* | bgf* | bgxlf* | mpixlf*)
79148585 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
79158586 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
7916 hardcode_libdir_flag_spec=
7917 hardcode_libdir_flag_spec_ld='-rpath $libdir'
7918 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
8587 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8588 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
79198589 if test "x$supports_anon_versioning" = xyes; then
79208590 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
79218591 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
79228592 echo "local: *; };" >> $output_objdir/$libname.ver~
7923 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8593 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
79248594 fi
79258595 ;;
79268596 esac
79348604 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
79358605 wlarc=
79368606 else
7937 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7938 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8607 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8608 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
79398609 fi
79408610 ;;
79418611
79538623
79548624 _LT_EOF
79558625 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7956 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7957 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8626 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8627 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
79588628 else
79598629 ld_shlibs=no
79608630 fi
80008670
80018671 *)
80028672 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8003 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8004 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8673 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8674 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
80058675 else
80068676 ld_shlibs=no
80078677 fi
80418711 else
80428712 # If we're using GNU nm, then we don't want the "-C" option.
80438713 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8714 # Also, AIX nm treats weak defined symbols like other global
8715 # defined symbols, whereas GNU nm marks them as "W".
80448716 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8045 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8717 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
80468718 else
80478719 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
80488720 fi
81308802 allow_undefined_flag='-berok'
81318803 # Determine the default libpath from the value encoded in an
81328804 # empty executable.
8133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805 if test "${lt_cv_aix_libpath+set}" = set; then
8806 aix_libpath=$lt_cv_aix_libpath
8807 else
8808 if ${lt_cv_aix_libpath_+:} false; then :
8809 $as_echo_n "(cached) " >&6
8810 else
8811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81348812 /* end confdefs.h. */
81358813
81368814 int
81438821 _ACEOF
81448822 if ac_fn_c_try_link "$LINENO"; then :
81458823
8146 lt_aix_libpath_sed='
8147 /Import File Strings/,/^$/ {
8148 /^0/ {
8149 s/^0 *\(.*\)$/\1/
8150 p
8151 }
8152 }'
8153 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8154 # Check for a 64-bit object if we didn't find anything.
8155 if test -z "$aix_libpath"; then
8156 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8157 fi
8824 lt_aix_libpath_sed='
8825 /Import File Strings/,/^$/ {
8826 /^0/ {
8827 s/^0 *\([^ ]*\) *$/\1/
8828 p
8829 }
8830 }'
8831 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8832 # Check for a 64-bit object if we didn't find anything.
8833 if test -z "$lt_cv_aix_libpath_"; then
8834 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8835 fi
81588836 fi
81598837 rm -f core conftest.err conftest.$ac_objext \
81608838 conftest$ac_exeext conftest.$ac_ext
8161 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8839 if test -z "$lt_cv_aix_libpath_"; then
8840 lt_cv_aix_libpath_="/usr/lib:/lib"
8841 fi
8842
8843 fi
8844
8845 aix_libpath=$lt_cv_aix_libpath_
8846 fi
81628847
81638848 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8164 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8849 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
81658850 else
81668851 if test "$host_cpu" = ia64; then
81678852 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
81708855 else
81718856 # Determine the default libpath from the value encoded in an
81728857 # empty executable.
8173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858 if test "${lt_cv_aix_libpath+set}" = set; then
8859 aix_libpath=$lt_cv_aix_libpath
8860 else
8861 if ${lt_cv_aix_libpath_+:} false; then :
8862 $as_echo_n "(cached) " >&6
8863 else
8864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81748865 /* end confdefs.h. */
81758866
81768867 int
81838874 _ACEOF
81848875 if ac_fn_c_try_link "$LINENO"; then :
81858876
8186 lt_aix_libpath_sed='
8187 /Import File Strings/,/^$/ {
8188 /^0/ {
8189 s/^0 *\(.*\)$/\1/
8190 p
8191 }
8192 }'
8193 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8194 # Check for a 64-bit object if we didn't find anything.
8195 if test -z "$aix_libpath"; then
8196 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8197 fi
8877 lt_aix_libpath_sed='
8878 /Import File Strings/,/^$/ {
8879 /^0/ {
8880 s/^0 *\([^ ]*\) *$/\1/
8881 p
8882 }
8883 }'
8884 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8885 # Check for a 64-bit object if we didn't find anything.
8886 if test -z "$lt_cv_aix_libpath_"; then
8887 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8888 fi
81988889 fi
81998890 rm -f core conftest.err conftest.$ac_objext \
82008891 conftest$ac_exeext conftest.$ac_ext
8201 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8892 if test -z "$lt_cv_aix_libpath_"; then
8893 lt_cv_aix_libpath_="/usr/lib:/lib"
8894 fi
8895
8896 fi
8897
8898 aix_libpath=$lt_cv_aix_libpath_
8899 fi
82028900
82038901 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
82048902 # Warning - without using the other run time loading flags,
82058903 # -berok will link without error, but may produce a broken library.
82068904 no_undefined_flag=' ${wl}-bernotok'
82078905 allow_undefined_flag=' ${wl}-berok'
8208 # Exported symbols can be pulled into shared objects from archives
8209 whole_archive_flag_spec='$convenience'
8906 if test "$with_gnu_ld" = yes; then
8907 # We only use this code for GNU lds that support --whole-archive.
8908 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8909 else
8910 # Exported symbols can be pulled into shared objects from archives
8911 whole_archive_flag_spec='$convenience'
8912 fi
82108913 archive_cmds_need_lc=yes
82118914 # This is similar to how AIX traditionally builds its shared libraries.
82128915 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
82388941 # Microsoft Visual C++.
82398942 # hardcode_libdir_flag_spec is actually meaningless, as there is
82408943 # no search path for DLLs.
8241 hardcode_libdir_flag_spec=' '
8242 allow_undefined_flag=unsupported
8243 # Tell ltmain to make .lib files, not .a files.
8244 libext=lib
8245 # Tell ltmain to make .dll files, not .so files.
8246 shrext_cmds=".dll"
8247 # FIXME: Setting linknames here is a bad hack.
8248 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
8249 # The linker will automatically build a .lib file if we build a DLL.
8250 old_archive_from_new_cmds='true'
8251 # FIXME: Should let the user specify the lib program.
8252 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8253 fix_srcfile_path='`cygpath -w "$srcfile"`'
8254 enable_shared_with_static_runtimes=yes
8944 case $cc_basename in
8945 cl*)
8946 # Native MSVC
8947 hardcode_libdir_flag_spec=' '
8948 allow_undefined_flag=unsupported
8949 always_export_symbols=yes
8950 file_list_spec='@'
8951 # Tell ltmain to make .lib files, not .a files.
8952 libext=lib
8953 # Tell ltmain to make .dll files, not .so files.
8954 shrext_cmds=".dll"
8955 # FIXME: Setting linknames here is a bad hack.
8956 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8957 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8958 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8959 else
8960 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8961 fi~
8962 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8963 linknames='
8964 # The linker will not automatically build a static lib if we build a DLL.
8965 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
8966 enable_shared_with_static_runtimes=yes
8967 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8968 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8969 # Don't use ranlib
8970 old_postinstall_cmds='chmod 644 $oldlib'
8971 postlink_cmds='lt_outputfile="@OUTPUT@"~
8972 lt_tool_outputfile="@TOOL_OUTPUT@"~
8973 case $lt_outputfile in
8974 *.exe|*.EXE) ;;
8975 *)
8976 lt_outputfile="$lt_outputfile.exe"
8977 lt_tool_outputfile="$lt_tool_outputfile.exe"
8978 ;;
8979 esac~
8980 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8981 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8982 $RM "$lt_outputfile.manifest";
8983 fi'
8984 ;;
8985 *)
8986 # Assume MSVC wrapper
8987 hardcode_libdir_flag_spec=' '
8988 allow_undefined_flag=unsupported
8989 # Tell ltmain to make .lib files, not .a files.
8990 libext=lib
8991 # Tell ltmain to make .dll files, not .so files.
8992 shrext_cmds=".dll"
8993 # FIXME: Setting linknames here is a bad hack.
8994 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8995 # The linker will automatically build a .lib file if we build a DLL.
8996 old_archive_from_new_cmds='true'
8997 # FIXME: Should let the user specify the lib program.
8998 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8999 enable_shared_with_static_runtimes=yes
9000 ;;
9001 esac
82559002 ;;
82569003
82579004 darwin* | rhapsody*)
82619008 hardcode_direct=no
82629009 hardcode_automatic=yes
82639010 hardcode_shlibpath_var=unsupported
8264 whole_archive_flag_spec=''
9011 if test "$lt_cv_ld_force_load" = "yes"; then
9012 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
9013
9014 else
9015 whole_archive_flag_spec=''
9016 fi
82659017 link_all_deplibs=yes
82669018 allow_undefined_flag="$_lt_dar_allow_undefined"
82679019 case $cc_basename in
82699021 *) _lt_dar_can_shared=$GCC ;;
82709022 esac
82719023 if test "$_lt_dar_can_shared" = "yes"; then
8272 output_verbose_link_cmd=echo
9024 output_verbose_link_cmd=func_echo_all
82739025 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
82749026 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
82759027 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
82859037 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
82869038 hardcode_libdir_flag_spec='-L$libdir'
82879039 hardcode_shlibpath_var=no
8288 ;;
8289
8290 freebsd1*)
8291 ld_shlibs=no
82929040 ;;
82939041
82949042 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
83039051 ;;
83049052
83059053 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8306 freebsd2*)
9054 freebsd2.*)
83079055 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
83089056 hardcode_direct=yes
83099057 hardcode_minus_L=yes
83129060
83139061 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
83149062 freebsd* | dragonfly*)
8315 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9063 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
83169064 hardcode_libdir_flag_spec='-R$libdir'
83179065 hardcode_direct=yes
83189066 hardcode_shlibpath_var=no
83209068
83219069 hpux9*)
83229070 if test "$GCC" = yes; then
8323 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9071 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
83249072 else
83259073 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
83269074 fi
83359083 ;;
83369084
83379085 hpux10*)
8338 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8339 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9086 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9087 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
83409088 else
83419089 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
83429090 fi
83439091 if test "$with_gnu_ld" = no; then
83449092 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8345 hardcode_libdir_flag_spec_ld='+b $libdir'
83469093 hardcode_libdir_separator=:
83479094 hardcode_direct=yes
83489095 hardcode_direct_absolute=yes
83549101 ;;
83559102
83569103 hpux11*)
8357 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9104 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
83589105 case $host_cpu in
83599106 hppa*64*)
83609107 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
83619108 ;;
83629109 ia64*)
8363 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9110 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
83649111 ;;
83659112 *)
8366 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9113 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
83679114 ;;
83689115 esac
83699116 else
83759122 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
83769123 ;;
83779124 *)
8378 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9125
9126 # Older versions of the 11.00 compiler do not understand -b yet
9127 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9129 $as_echo_n "checking if $CC understands -b... " >&6; }
9130 if ${lt_cv_prog_compiler__b+:} false; then :
9131 $as_echo_n "(cached) " >&6
9132 else
9133 lt_cv_prog_compiler__b=no
9134 save_LDFLAGS="$LDFLAGS"
9135 LDFLAGS="$LDFLAGS -b"
9136 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9137 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9138 # The linker can only warn and ignore the option if not recognized
9139 # So say no if there are warnings
9140 if test -s conftest.err; then
9141 # Append any errors to the config.log.
9142 cat conftest.err 1>&5
9143 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9144 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9145 if diff conftest.exp conftest.er2 >/dev/null; then
9146 lt_cv_prog_compiler__b=yes
9147 fi
9148 else
9149 lt_cv_prog_compiler__b=yes
9150 fi
9151 fi
9152 $RM -r conftest*
9153 LDFLAGS="$save_LDFLAGS"
9154
9155 fi
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9157 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9158
9159 if test x"$lt_cv_prog_compiler__b" = xyes; then
9160 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9161 else
9162 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9163 fi
9164
83799165 ;;
83809166 esac
83819167 fi
84039189
84049190 irix5* | irix6* | nonstopux*)
84059191 if test "$GCC" = yes; then
8406 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9192 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
84079193 # Try to use the -exported_symbol ld option, if it does not
84089194 # work, assume that -exports_file does not work either and
84099195 # implicitly export all symbols.
8410 save_LDFLAGS="$LDFLAGS"
8411 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196 # This should be the same for all languages, so no per-tag cache variable.
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
9198 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
9199 if ${lt_cv_irix_exported_symbol+:} false; then :
9200 $as_echo_n "(cached) " >&6
9201 else
9202 save_LDFLAGS="$LDFLAGS"
9203 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84139205 /* end confdefs.h. */
8414 int foo(void) {}
9206 int foo (void) { return 0; }
84159207 _ACEOF
84169208 if ac_fn_c_try_link "$LINENO"; then :
8417 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8418
9209 lt_cv_irix_exported_symbol=yes
9210 else
9211 lt_cv_irix_exported_symbol=no
84199212 fi
84209213 rm -f core conftest.err conftest.$ac_objext \
84219214 conftest$ac_exeext conftest.$ac_ext
8422 LDFLAGS="$save_LDFLAGS"
9215 LDFLAGS="$save_LDFLAGS"
9216 fi
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
9218 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
9219 if test "$lt_cv_irix_exported_symbol" = yes; then
9220 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9221 fi
84239222 else
8424 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8425 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
9223 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9224 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
84269225 fi
84279226 archive_cmds_need_lc='no'
84289227 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
84849283 hardcode_libdir_flag_spec='-L$libdir'
84859284 hardcode_minus_L=yes
84869285 allow_undefined_flag=unsupported
8487 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9286 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
84889287 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
84899288 ;;
84909289
84919290 osf3*)
84929291 if test "$GCC" = yes; then
84939292 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8494 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9293 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
84959294 else
84969295 allow_undefined_flag=' -expect_unresolved \*'
8497 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9296 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
84989297 fi
84999298 archive_cmds_need_lc='no'
85009299 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
85049303 osf4* | osf5*) # as osf3* with the addition of -msym flag
85059304 if test "$GCC" = yes; then
85069305 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8507 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9306 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
85089307 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
85099308 else
85109309 allow_undefined_flag=' -expect_unresolved \*'
8511 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9310 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
85129311 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
8513 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9312 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
85149313
85159314 # Both c and cxx compiler support -rpath directly
85169315 hardcode_libdir_flag_spec='-rpath $libdir'
85239322 no_undefined_flag=' -z defs'
85249323 if test "$GCC" = yes; then
85259324 wlarc='${wl}'
8526 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9325 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
85279326 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8528 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9327 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
85299328 else
85309329 case `$CC -V 2>&1` in
85319330 *"Compilers 5.0"*)
87139512 # to ld, don't add -lc before -lgcc.
87149513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
87159514 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
8716 $RM conftest*
8717 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8718
8719 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9515 if ${lt_cv_archive_cmds_need_lc+:} false; then :
9516 $as_echo_n "(cached) " >&6
9517 else
9518 $RM conftest*
9519 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9520
9521 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
87209522 (eval $ac_compile) 2>&5
87219523 ac_status=$?
87229524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
87239525 test $ac_status = 0; } 2>conftest.err; then
8724 soname=conftest
8725 lib=conftest
8726 libobjs=conftest.$ac_objext
8727 deplibs=
8728 wl=$lt_prog_compiler_wl
8729 pic_flag=$lt_prog_compiler_pic
8730 compiler_flags=-v
8731 linker_flags=-v
8732 verstring=
8733 output_objdir=.
8734 libname=conftest
8735 lt_save_allow_undefined_flag=$allow_undefined_flag
8736 allow_undefined_flag=
8737 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9526 soname=conftest
9527 lib=conftest
9528 libobjs=conftest.$ac_objext
9529 deplibs=
9530 wl=$lt_prog_compiler_wl
9531 pic_flag=$lt_prog_compiler_pic
9532 compiler_flags=-v
9533 linker_flags=-v
9534 verstring=
9535 output_objdir=.
9536 libname=conftest
9537 lt_save_allow_undefined_flag=$allow_undefined_flag
9538 allow_undefined_flag=
9539 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
87389540 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
87399541 ac_status=$?
87409542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
87419543 test $ac_status = 0; }
8742 then
8743 archive_cmds_need_lc=no
8744 else
8745 archive_cmds_need_lc=yes
8746 fi
8747 allow_undefined_flag=$lt_save_allow_undefined_flag
8748 else
8749 cat conftest.err 1>&5
8750 fi
8751 $RM conftest*
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
8753 $as_echo "$archive_cmds_need_lc" >&6; }
9544 then
9545 lt_cv_archive_cmds_need_lc=no
9546 else
9547 lt_cv_archive_cmds_need_lc=yes
9548 fi
9549 allow_undefined_flag=$lt_save_allow_undefined_flag
9550 else
9551 cat conftest.err 1>&5
9552 fi
9553 $RM conftest*
9554
9555 fi
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
9557 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
9558 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
87549559 ;;
87559560 esac
87569561 fi
87579562 ;;
87589563 esac
8759
8760
8761
8762
8763
87649564
87659565
87669566
89219721 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
89229722 *) lt_awk_arg="/^libraries:/" ;;
89239723 esac
8924 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8925 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
9724 case $host_os in
9725 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
9726 *) lt_sed_strip_eq="s,=/,/,g" ;;
9727 esac
9728 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
9729 case $lt_search_path_spec in
9730 *\;*)
89269731 # if the path contains ";" then we assume it to be the separator
89279732 # otherwise default to the standard path separator (i.e. ":") - it is
89289733 # assumed that no part of a normal pathname contains ";" but that should
89299734 # okay in the real world where ";" in dirpaths is itself problematic.
8930 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
8931 else
8932 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8933 fi
9735 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
9736 ;;
9737 *)
9738 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
9739 ;;
9740 esac
89349741 # Ok, now we have the path, separated by spaces, we can step through it
89359742 # and add multilib dir if necessary.
89369743 lt_tmp_lt_search_path_spec=
89439750 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
89449751 fi
89459752 done
8946 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
9753 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
89479754 BEGIN {RS=" "; FS="/|\n";} {
89489755 lt_foo="";
89499756 lt_count=0;
89639770 if (lt_foo != "") { lt_freq[lt_foo]++; }
89649771 if (lt_freq[lt_foo] == 1) { print lt_foo; }
89659772 }'`
8966 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
9773 # AWK program above erroneously prepends '/' to C:/dos/paths
9774 # for these hosts.
9775 case $host_os in
9776 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
9777 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
9778 esac
9779 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
89679780 else
89689781 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
89699782 fi
89899802
89909803 case $host_os in
89919804 aix3*)
8992 version_type=linux
9805 version_type=linux # correct to gnu/linux during the next big refactor
89939806 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
89949807 shlibpath_var=LIBPATH
89959808
89989811 ;;
89999812
90009813 aix[4-9]*)
9001 version_type=linux
9814 version_type=linux # correct to gnu/linux during the next big refactor
90029815 need_lib_prefix=no
90039816 need_version=no
90049817 hardcode_into_libs=yes
90519864 m68k)
90529865 library_names_spec='$libname.ixlibrary $libname.a'
90539866 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9054 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
9867 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
90559868 ;;
90569869 esac
90579870 ;;
90639876 ;;
90649877
90659878 bsdi[45]*)
9066 version_type=linux
9879 version_type=linux # correct to gnu/linux during the next big refactor
90679880 need_version=no
90689881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
90699882 soname_spec='${libname}${release}${shared_ext}$major'
90829895 need_version=no
90839896 need_lib_prefix=no
90849897
9085 case $GCC,$host_os in
9086 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
9898 case $GCC,$cc_basename in
9899 yes,*)
9900 # gcc
90879901 library_names_spec='$libname.dll.a'
90889902 # DLL is installed to $(libdir)/../bin by postinstall_cmds
90899903 postinstall_cmds='base_file=`basename \${file}`~
91049918 cygwin*)
91059919 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
91069920 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9107 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9921
9922 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
91089923 ;;
91099924 mingw* | cegcc*)
91109925 # MinGW DLLs use traditional 'lib' prefix
91119926 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9112 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9113 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
9114 # It is most probably a Windows format PATH printed by
9115 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9116 # path with ; separators, and with drive letters. We can handle the
9117 # drive letters (cygwin fileutils understands them), so leave them,
9118 # especially as we might pass files found there to a mingw objdump,
9119 # which wouldn't understand a cygwinified path. Ahh.
9120 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9121 else
9122 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9123 fi
91249927 ;;
91259928 pw32*)
91269929 # pw32 DLLs use 'pw' prefix rather than 'lib'
91279930 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
91289931 ;;
91299932 esac
9933 dynamic_linker='Win32 ld.exe'
91309934 ;;
91319935
9936 *,cl*)
9937 # Native MSVC
9938 libname_spec='$name'
9939 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9940 library_names_spec='${libname}.dll.lib'
9941
9942 case $build_os in
9943 mingw*)
9944 sys_lib_search_path_spec=
9945 lt_save_ifs=$IFS
9946 IFS=';'
9947 for lt_path in $LIB
9948 do
9949 IFS=$lt_save_ifs
9950 # Let DOS variable expansion print the short 8.3 style file name.
9951 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
9952 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
9953 done
9954 IFS=$lt_save_ifs
9955 # Convert to MSYS style.
9956 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
9957 ;;
9958 cygwin*)
9959 # Convert to unix form, then to dos form, then back to unix form
9960 # but this time dos style (no spaces!) so that the unix form looks
9961 # like /cygdrive/c/PROGRA~1:/cygdr...
9962 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
9963 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
9964 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9965 ;;
9966 *)
9967 sys_lib_search_path_spec="$LIB"
9968 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
9969 # It is most probably a Windows format PATH.
9970 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9971 else
9972 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9973 fi
9974 # FIXME: find the short name or the path components, as spaces are
9975 # common. (e.g. "Program Files" -> "PROGRA~1")
9976 ;;
9977 esac
9978
9979 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9980 postinstall_cmds='base_file=`basename \${file}`~
9981 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
9982 dldir=$destdir/`dirname \$dlpath`~
9983 test -d \$dldir || mkdir -p \$dldir~
9984 $install_prog $dir/$dlname \$dldir/$dlname'
9985 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9986 dlpath=$dir/\$dldll~
9987 $RM \$dlpath'
9988 shlibpath_overrides_runpath=yes
9989 dynamic_linker='Win32 link.exe'
9990 ;;
9991
91329992 *)
9993 # Assume MSVC wrapper
91339994 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9995 dynamic_linker='Win32 ld.exe'
91349996 ;;
91359997 esac
9136 dynamic_linker='Win32 ld.exe'
91379998 # FIXME: first we should search . and the directory the executable is in
91389999 shlibpath_var=PATH
913910000 ;;
915410015 ;;
915510016
915610017 dgux*)
9157 version_type=linux
10018 version_type=linux # correct to gnu/linux during the next big refactor
915810019 need_lib_prefix=no
915910020 need_version=no
916010021 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
916110022 soname_spec='${libname}${release}${shared_ext}$major'
916210023 shlibpath_var=LD_LIBRARY_PATH
9163 ;;
9164
9165 freebsd1*)
9166 dynamic_linker=no
916710024 ;;
916810025
916910026 freebsd* | dragonfly*)
917310030 objformat=`/usr/bin/objformat`
917410031 else
917510032 case $host_os in
9176 freebsd[123]*) objformat=aout ;;
10033 freebsd[23].*) objformat=aout ;;
917710034 *) objformat=elf ;;
917810035 esac
917910036 fi
919110048 esac
919210049 shlibpath_var=LD_LIBRARY_PATH
919310050 case $host_os in
9194 freebsd2*)
10051 freebsd2.*)
919510052 shlibpath_overrides_runpath=yes
919610053 ;;
919710054 freebsd3.[01]* | freebsdelf3.[01]*)
921110068 ;;
921210069
921310070 gnu*)
9214 version_type=linux
10071 version_type=linux # correct to gnu/linux during the next big refactor
921510072 need_lib_prefix=no
921610073 need_version=no
921710074 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
921810075 soname_spec='${libname}${release}${shared_ext}$major'
921910076 shlibpath_var=LD_LIBRARY_PATH
10077 shlibpath_overrides_runpath=no
10078 hardcode_into_libs=yes
10079 ;;
10080
10081 haiku*)
10082 version_type=linux # correct to gnu/linux during the next big refactor
10083 need_lib_prefix=no
10084 need_version=no
10085 dynamic_linker="$host_os runtime_loader"
10086 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10087 soname_spec='${libname}${release}${shared_ext}$major'
10088 shlibpath_var=LIBRARY_PATH
10089 shlibpath_overrides_runpath=yes
10090 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
922010091 hardcode_into_libs=yes
922110092 ;;
922210093
926210133 soname_spec='${libname}${release}${shared_ext}$major'
926310134 ;;
926410135 esac
9265 # HP-UX runs *really* slowly unless shared libraries are mode 555.
10136 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
926610137 postinstall_cmds='chmod 555 $lib'
10138 # or fails outright, so override atomically:
10139 install_override_mode=555
926710140 ;;
926810141
926910142 interix[3-9]*)
9270 version_type=linux
10143 version_type=linux # correct to gnu/linux during the next big refactor
927110144 need_lib_prefix=no
927210145 need_version=no
927310146 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
928310156 nonstopux*) version_type=nonstopux ;;
928410157 *)
928510158 if test "$lt_cv_prog_gnu_ld" = yes; then
9286 version_type=linux
10159 version_type=linux # correct to gnu/linux during the next big refactor
928710160 else
928810161 version_type=irix
928910162 fi ;;
932010193 dynamic_linker=no
932110194 ;;
932210195
9323 # This must be Linux ELF.
10196 # This must be glibc/ELF.
932410197 linux* | k*bsd*-gnu | kopensolaris*-gnu)
9325 version_type=linux
10198 version_type=linux # correct to gnu/linux during the next big refactor
932610199 need_lib_prefix=no
932710200 need_version=no
932810201 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
933010203 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
933110204 shlibpath_var=LD_LIBRARY_PATH
933210205 shlibpath_overrides_runpath=no
10206
933310207 # Some binutils ld are patched to set DT_RUNPATH
9334 save_LDFLAGS=$LDFLAGS
9335 save_libdir=$libdir
9336 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
9337 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
9338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10208 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10209 $as_echo_n "(cached) " >&6
10210 else
10211 lt_cv_shlibpath_overrides_runpath=no
10212 save_LDFLAGS=$LDFLAGS
10213 save_libdir=$libdir
10214 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10215 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
933910217 /* end confdefs.h. */
934010218
934110219 int
934810226 _ACEOF
934910227 if ac_fn_c_try_link "$LINENO"; then :
935010228 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
9351 shlibpath_overrides_runpath=yes
10229 lt_cv_shlibpath_overrides_runpath=yes
935210230 fi
935310231 fi
935410232 rm -f core conftest.err conftest.$ac_objext \
935510233 conftest$ac_exeext conftest.$ac_ext
9356 LDFLAGS=$save_LDFLAGS
9357 libdir=$save_libdir
10234 LDFLAGS=$save_LDFLAGS
10235 libdir=$save_libdir
10236
10237 fi
10238
10239 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
935810240
935910241 # This implies no fast_install, which is unacceptable.
936010242 # Some rework will be needed to allow for fast_install
936310245
936410246 # Append ld.so.conf contents to the search path
936510247 if test -f /etc/ld.so.conf; then
9366 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10248 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
936710249 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
936810250 fi
936910251
940710289 ;;
940810290
940910291 newsos6)
9410 version_type=linux
10292 version_type=linux # correct to gnu/linux during the next big refactor
941110293 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
941210294 shlibpath_var=LD_LIBRARY_PATH
941310295 shlibpath_overrides_runpath=yes
947610358 ;;
947710359
947810360 solaris*)
9479 version_type=linux
10361 version_type=linux # correct to gnu/linux during the next big refactor
948010362 need_lib_prefix=no
948110363 need_version=no
948210364 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
950110383 ;;
950210384
950310385 sysv4 | sysv4.3*)
9504 version_type=linux
10386 version_type=linux # correct to gnu/linux during the next big refactor
950510387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
950610388 soname_spec='${libname}${release}${shared_ext}$major'
950710389 shlibpath_var=LD_LIBRARY_PATH
952510407
952610408 sysv4*MP*)
952710409 if test -d /usr/nec ;then
9528 version_type=linux
10410 version_type=linux # correct to gnu/linux during the next big refactor
952910411 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
953010412 soname_spec='$libname${shared_ext}.$major'
953110413 shlibpath_var=LD_LIBRARY_PATH
955610438
955710439 tpf*)
955810440 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
9559 version_type=linux
10441 version_type=linux # correct to gnu/linux during the next big refactor
956010442 need_lib_prefix=no
956110443 need_version=no
956210444 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
956610448 ;;
956710449
956810450 uts4*)
9569 version_type=linux
10451 version_type=linux # correct to gnu/linux during the next big refactor
957010452 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
957110453 soname_spec='${libname}${release}${shared_ext}$major'
957210454 shlibpath_var=LD_LIBRARY_PATH
959110473 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
959210474 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
959310475 fi
10476
10477
10478
10479
10480
959410481
959510482
959610483
975010637 # if libdl is installed we need to link against it
975110638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
975210639 $as_echo_n "checking for dlopen in -ldl... " >&6; }
9753 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10640 if ${ac_cv_lib_dl_dlopen+:} false; then :
975410641 $as_echo_n "(cached) " >&6
975510642 else
975610643 ac_check_lib_save_LIBS=$LIBS
978410671 fi
978510672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
978610673 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9787 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10674 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
978810675 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
978910676 else
979010677
979810685
979910686 *)
980010687 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
9801 if test "x$ac_cv_func_shl_load" = x""yes; then :
10688 if test "x$ac_cv_func_shl_load" = xyes; then :
980210689 lt_cv_dlopen="shl_load"
980310690 else
980410691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
980510692 $as_echo_n "checking for shl_load in -ldld... " >&6; }
9806 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10693 if ${ac_cv_lib_dld_shl_load+:} false; then :
980710694 $as_echo_n "(cached) " >&6
980810695 else
980910696 ac_check_lib_save_LIBS=$LIBS
983710724 fi
983810725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
983910726 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9840 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10727 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
984110728 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
984210729 else
984310730 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9844 if test "x$ac_cv_func_dlopen" = x""yes; then :
10731 if test "x$ac_cv_func_dlopen" = xyes; then :
984510732 lt_cv_dlopen="dlopen"
984610733 else
984710734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
984810735 $as_echo_n "checking for dlopen in -ldl... " >&6; }
9849 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10736 if ${ac_cv_lib_dl_dlopen+:} false; then :
985010737 $as_echo_n "(cached) " >&6
985110738 else
985210739 ac_check_lib_save_LIBS=$LIBS
988010767 fi
988110768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
988210769 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9883 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10770 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
988410771 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
988510772 else
988610773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
988710774 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
9888 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10775 if ${ac_cv_lib_svld_dlopen+:} false; then :
988910776 $as_echo_n "(cached) " >&6
989010777 else
989110778 ac_check_lib_save_LIBS=$LIBS
991910806 fi
992010807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
992110808 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
9922 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10809 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
992310810 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
992410811 else
992510812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
992610813 $as_echo_n "checking for dld_link in -ldld... " >&6; }
9927 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10814 if ${ac_cv_lib_dld_dld_link+:} false; then :
992810815 $as_echo_n "(cached) " >&6
992910816 else
993010817 ac_check_lib_save_LIBS=$LIBS
995810845 fi
995910846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
996010847 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
9961 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10848 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
996210849 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
996310850 fi
996410851
999910886
1000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
1000110888 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10002 if test "${lt_cv_dlopen_self+set}" = set; then :
10889 if ${lt_cv_dlopen_self+:} false; then :
1000310890 $as_echo_n "(cached) " >&6
1000410891 else
1000510892 if test "$cross_compiling" = yes; then :
1000810895 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1000910896 lt_status=$lt_dlunknown
1001010897 cat > conftest.$ac_ext <<_LT_EOF
10011 #line 10012 "configure"
10898 #line $LINENO "configure"
1001210899 #include "confdefs.h"
1001310900
1001410901 #if HAVE_DLFCN_H
1004910936 # endif
1005010937 #endif
1005110938
10052 void fnord() { int i=42;}
10939 /* When -fvisbility=hidden is used, assume the code has been annotated
10940 correspondingly for the symbols needed. */
10941 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
10942 int fnord () __attribute__((visibility("default")));
10943 #endif
10944
10945 int fnord () { return 42; }
1005310946 int main ()
1005410947 {
1005510948 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1005810951 if (self)
1005910952 {
1006010953 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10061 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10954 else
10955 {
10956 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10957 else puts (dlerror ());
10958 }
1006210959 /* dlclose (self); */
1006310960 }
1006410961 else
1009510992 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1009610993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
1009710994 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10098 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10995 if ${lt_cv_dlopen_self_static+:} false; then :
1009910996 $as_echo_n "(cached) " >&6
1010010997 else
1010110998 if test "$cross_compiling" = yes; then :
1010411001 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1010511002 lt_status=$lt_dlunknown
1010611003 cat > conftest.$ac_ext <<_LT_EOF
10107 #line 10108 "configure"
11004 #line $LINENO "configure"
1010811005 #include "confdefs.h"
1010911006
1011011007 #if HAVE_DLFCN_H
1014511042 # endif
1014611043 #endif
1014711044
10148 void fnord() { int i=42;}
11045 /* When -fvisbility=hidden is used, assume the code has been annotated
11046 correspondingly for the symbols needed. */
11047 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11048 int fnord () __attribute__((visibility("default")));
11049 #endif
11050
11051 int fnord () { return 42; }
1014911052 int main ()
1015011053 {
1015111054 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1015411057 if (self)
1015511058 {
1015611059 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10157 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11060 else
11061 {
11062 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11063 else puts (dlerror ());
11064 }
1015811065 /* dlclose (self); */
1015911066 }
1016011067 else
1032311230
1032411231
1032511232
11233
11234
1032611235 ac_config_commands="$ac_config_commands libtool"
1032711236
1032811237
1034611255 fi
1034711256 fi
1034811257
10349 # Extract the first word of "libgcrypt-config", so it can be a program name with args.
10350 set dummy libgcrypt-config; ac_word=$2
11258 if test -n "$ac_tool_prefix"; then
11259 # Extract the first word of "${ac_tool_prefix}libgcrypt-config", so it can be a program name with args.
11260 set dummy ${ac_tool_prefix}libgcrypt-config; ac_word=$2
1035111261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1035211262 $as_echo_n "checking for $ac_word... " >&6; }
10353 if test "${ac_cv_path_LIBGCRYPT_CONFIG+set}" = set; then :
11263 if ${ac_cv_path_LIBGCRYPT_CONFIG+:} false; then :
1035411264 $as_echo_n "(cached) " >&6
1035511265 else
1035611266 case $LIBGCRYPT_CONFIG in
1037311283 done
1037411284 IFS=$as_save_IFS
1037511285
10376 test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no"
1037711286 ;;
1037811287 esac
1037911288 fi
1038611295 $as_echo "no" >&6; }
1038711296 fi
1038811297
11298
11299 fi
11300 if test -z "$ac_cv_path_LIBGCRYPT_CONFIG"; then
11301 ac_pt_LIBGCRYPT_CONFIG=$LIBGCRYPT_CONFIG
11302 # Extract the first word of "libgcrypt-config", so it can be a program name with args.
11303 set dummy libgcrypt-config; ac_word=$2
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11305 $as_echo_n "checking for $ac_word... " >&6; }
11306 if ${ac_cv_path_ac_pt_LIBGCRYPT_CONFIG+:} false; then :
11307 $as_echo_n "(cached) " >&6
11308 else
11309 case $ac_pt_LIBGCRYPT_CONFIG in
11310 [\\/]* | ?:[\\/]*)
11311 ac_cv_path_ac_pt_LIBGCRYPT_CONFIG="$ac_pt_LIBGCRYPT_CONFIG" # Let the user override the test with a path.
11312 ;;
11313 *)
11314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11315 for as_dir in $PATH
11316 do
11317 IFS=$as_save_IFS
11318 test -z "$as_dir" && as_dir=.
11319 for ac_exec_ext in '' $ac_executable_extensions; do
11320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11321 ac_cv_path_ac_pt_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11323 break 2
11324 fi
11325 done
11326 done
11327 IFS=$as_save_IFS
11328
11329 ;;
11330 esac
11331 fi
11332 ac_pt_LIBGCRYPT_CONFIG=$ac_cv_path_ac_pt_LIBGCRYPT_CONFIG
11333 if test -n "$ac_pt_LIBGCRYPT_CONFIG"; then
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LIBGCRYPT_CONFIG" >&5
11335 $as_echo "$ac_pt_LIBGCRYPT_CONFIG" >&6; }
11336 else
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338 $as_echo "no" >&6; }
11339 fi
11340
11341 if test "x$ac_pt_LIBGCRYPT_CONFIG" = x; then
11342 LIBGCRYPT_CONFIG="no"
11343 else
11344 case $cross_compiling:$ac_tool_warned in
11345 yes:)
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11347 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11348 ac_tool_warned=yes ;;
11349 esac
11350 LIBGCRYPT_CONFIG=$ac_pt_LIBGCRYPT_CONFIG
11351 fi
11352 else
11353 LIBGCRYPT_CONFIG="$ac_cv_path_LIBGCRYPT_CONFIG"
11354 fi
1038911355
1039011356 tmp=1:1.2.0
1039111357 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
1045911425 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
1046011426 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
1046111427 :
11428 if test x"$host" != x ; then
11429 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
11430 if test x"$libgcrypt_config_host" != xnone ; then
11431 if test x"$libgcrypt_config_host" != x"$host" ; then
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11433 ***
11434 *** The config script $LIBGCRYPT_CONFIG was
11435 *** built for $libgcrypt_config_host and thus may not match the
11436 *** used host $host.
11437 *** You may want to use the configure option --with-libgcrypt-prefix
11438 *** to specify a matching config script.
11439 ***" >&5
11440 $as_echo "$as_me: WARNING:
11441 ***
11442 *** The config script $LIBGCRYPT_CONFIG was
11443 *** built for $libgcrypt_config_host and thus may not match the
11444 *** used host $host.
11445 *** You may want to use the configure option --with-libgcrypt-prefix
11446 *** to specify a matching config script.
11447 ***" >&2;}
11448 fi
11449 fi
11450 fi
1046211451 else
1046311452 LIBGCRYPT_CFLAGS=""
1046411453 LIBGCRYPT_LIBS=""
10465 as_fn_error "libgcrypt 1.2.0 or newer is required." "$LINENO" 5
11454 as_fn_error $? "libgcrypt 1.2.0 or newer is required." "$LINENO" 5
1046611455 fi
1046711456
1046811457
1058511574
1058611575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Qunused-arguments" >&5
1058711576 $as_echo_n "checking whether the compiler accepts -Qunused-arguments... " >&6; }
10588 if test "${otr_cv_cflags__Qunused_arguments+set}" = set; then :
11577 if ${otr_cv_cflags__Qunused_arguments+:} false; then :
1058911578 $as_echo_n "(cached) " >&6
1059011579 else
1059111580
1062311612
1062411613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fstack-protector-all" >&5
1062511614 $as_echo_n "checking whether the compiler accepts -fstack-protector-all... " >&6; }
10626 if test "${otr_cv_cflags__fstack_protector_all+set}" = set; then :
11615 if ${otr_cv_cflags__fstack_protector_all+:} false; then :
1062711616 $as_echo_n "(cached) " >&6
1062811617 else
1062911618
1066011649
1066111650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wstack-protector" >&5
1066211651 $as_echo_n "checking whether the compiler accepts -Wstack-protector... " >&6; }
10663 if test "${otr_cv_cflags__Wstack_protector+set}" = set; then :
11652 if ${otr_cv_cflags__Wstack_protector+:} false; then :
1066411653 $as_echo_n "(cached) " >&6
1066511654 else
1066611655
1069711686
1069811687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fwrapv" >&5
1069911688 $as_echo_n "checking whether the compiler accepts -fwrapv... " >&6; }
10700 if test "${otr_cv_cflags__fwrapv+set}" = set; then :
11689 if ${otr_cv_cflags__fwrapv+:} false; then :
1070111690 $as_echo_n "(cached) " >&6
1070211691 else
1070311692
1073511724
1073611725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fno-strict-overflow" >&5
1073711726 $as_echo_n "checking whether the compiler accepts -fno-strict-overflow... " >&6; }
10738 if test "${otr_cv_cflags__fno_strict_overflow+set}" = set; then :
11727 if ${otr_cv_cflags__fno_strict_overflow+:} false; then :
1073911728 $as_echo_n "(cached) " >&6
1074011729 else
1074111730
1077211761
1077311762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wall" >&5
1077411763 $as_echo_n "checking whether the compiler accepts -Wall... " >&6; }
10775 if test "${otr_cv_cflags__Wall+set}" = set; then :
11764 if ${otr_cv_cflags__Wall+:} false; then :
1077611765 $as_echo_n "(cached) " >&6
1077711766 else
1077811767
1080911798
1081011799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wextra -Wno-unused-parameter" >&5
1081111800 $as_echo_n "checking whether the compiler accepts -Wextra -Wno-unused-parameter... " >&6; }
10812 if test "${otr_cv_cflags__Wextra__Wno_unused_parameter+set}" = set; then :
11801 if ${otr_cv_cflags__Wextra__Wno_unused_parameter+:} false; then :
1081311802 $as_echo_n "(cached) " >&6
1081411803 else
1081511804
1084611835
1084711836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wformat-security" >&5
1084811837 $as_echo_n "checking whether the compiler accepts -Wformat-security... " >&6; }
10849 if test "${otr_cv_cflags__Wformat_security+set}" = set; then :
11838 if ${otr_cv_cflags__Wformat_security+:} false; then :
1085011839 $as_echo_n "(cached) " >&6
1085111840 else
1085211841
1088111870
1088211871
1088311872
11873 as_VAR=`$as_echo "otr_cv_cflags_--param ssp-buffer-size=1" | $as_tr_sh`
1088411874
1088511875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts --param ssp-buffer-size=1" >&5
1088611876 $as_echo_n "checking whether the compiler accepts --param ssp-buffer-size=1... " >&6; }
10887 if test "${otr_cv_cflags___param_ssp_buffer_size_1+set}" = set; then :
11877 if eval \${$as_VAR+:} false; then :
1088811878 $as_echo_n "(cached) " >&6
1088911879 else
1089011880
1090211892 }
1090311893 _ACEOF
1090411894 if ac_fn_c_try_compile "$LINENO"; then :
10905 otr_cv_cflags___param_ssp_buffer_size_1=yes
10906 else
10907 otr_cv_cflags___param_ssp_buffer_size_1=no
11895 eval "$as_VAR=yes"
11896 else
11897 eval "$as_VAR=no"
1090811898 fi
1090911899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1091011900 CFLAGS="$otr_saved_CFLAGS"
1091111901
1091211902 fi
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags___param_ssp_buffer_size_1" >&5
10914 $as_echo "$otr_cv_cflags___param_ssp_buffer_size_1" >&6; }
10915 if test x$otr_cv_cflags___param_ssp_buffer_size_1 = xyes; then
11903 eval ac_res=\$$as_VAR
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11905 $as_echo "$ac_res" >&6; }
11906 if test x$$as_VAR = xyes; then
1091611907 CFLAGS="$CFLAGS --param ssp-buffer-size=1"
1091711908 fi
1091811909
1092211913
1092311914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fPIE" >&5
1092411915 $as_echo_n "checking whether the compiler accepts -fPIE... " >&6; }
10925 if test "${otr_cv_cflags__fPIE+set}" = set; then :
11916 if ${otr_cv_cflags__fPIE+:} false; then :
1092611917 $as_echo_n "(cached) " >&6
1092711918 else
1092811919
1095911950
1096011951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5
1096111952 $as_echo_n "checking whether the linker accepts -pie... " >&6; }
10962 if test "${otr_cv_ldflags__pie+set}" = set; then :
11953 if ${otr_cv_ldflags__pie+:} false; then :
1096311954 $as_echo_n "(cached) " >&6
1096411955 else
1096511956
1102612017
1102712018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fPIE" >&5
1102812019 $as_echo_n "checking whether the compiler accepts -fPIE... " >&6; }
11029 if test "${otr_cv_cflags__fPIE+set}" = set; then :
12020 if ${otr_cv_cflags__fPIE+:} false; then :
1103012021 $as_echo_n "(cached) " >&6
1103112022 else
1103212023
1106312054
1106412055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5
1106512056 $as_echo_n "checking whether the linker accepts -pie... " >&6; }
11066 if test "${otr_cv_ldflags__pie+set}" = set; then :
12057 if ${otr_cv_ldflags__pie+:} false; then :
1106712058 $as_echo_n "(cached) " >&6
1106812059 else
1106912060
1112712118
1112812119
1112912120
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts --dynamicbase" >&5
11131 $as_echo_n "checking whether the linker accepts --dynamicbase... " >&6; }
11132 if test "${otr_cv_ldflags___dynamicbase+set}" = set; then :
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--dynamicbase" >&5
12122 $as_echo_n "checking whether the linker accepts -Wl,--dynamicbase... " >&6; }
12123 if ${otr_cv_ldflags__Wl___dynamicbase+:} false; then :
1113312124 $as_echo_n "(cached) " >&6
1113412125 else
1113512126
1113712128 otr_saved_LDFLAGS="$LDFLAGS"
1113812129 otr_saved_LIBS="$LIBS"
1113912130 CFLAGS="$CFLAGS -pedantic -Werror"
11140 LDFLAGS="$LDFLAGS "$all_ldflags_for_check" --dynamicbase"
12131 LDFLAGS="$LDFLAGS "$all_ldflags_for_check" -Wl,--dynamicbase"
1114112132 LIBS="$LIBS "$all_libs_for_check""
1114212133 if test "$cross_compiling" = yes; then :
1114312134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1115212143 }
1115312144 _ACEOF
1115412145 if ac_fn_c_try_link "$LINENO"; then :
11155 otr_cv_ldflags___dynamicbase=yes
11156 else
11157 otr_cv_ldflags___dynamicbase=no
12146 otr_cv_ldflags__Wl___dynamicbase=yes
12147 else
12148 otr_cv_ldflags__Wl___dynamicbase=no
1115812149 fi
1115912150 rm -f core conftest.err conftest.$ac_objext \
1116012151 conftest$ac_exeext conftest.$ac_ext
1117112162 }
1117212163 _ACEOF
1117312164 if ac_fn_c_try_run "$LINENO"; then :
11174 otr_cv_ldflags___dynamicbase=yes
11175 else
11176 otr_cv_ldflags___dynamicbase=no
12165 otr_cv_ldflags__Wl___dynamicbase=yes
12166 else
12167 otr_cv_ldflags__Wl___dynamicbase=no
1117712168 fi
1117812169 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1117912170 conftest.$ac_objext conftest.beam conftest.$ac_ext
1118412175 LIBS="$otr_saved_LIBS"
1118512176
1118612177 fi
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags___dynamicbase" >&5
11188 $as_echo "$otr_cv_ldflags___dynamicbase" >&6; }
11189 if test x$otr_cv_ldflags___dynamicbase = xyes; then
11190 LDFLAGS="$LDFLAGS --dynamicbase"
11191 fi
11192
11193
11194
11195
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts --nxcompat" >&5
11197 $as_echo_n "checking whether the linker accepts --nxcompat... " >&6; }
11198 if test "${otr_cv_ldflags___nxcompat+set}" = set; then :
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags__Wl___dynamicbase" >&5
12179 $as_echo "$otr_cv_ldflags__Wl___dynamicbase" >&6; }
12180 if test x$otr_cv_ldflags__Wl___dynamicbase = xyes; then
12181 LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
12182 fi
12183
12184
12185
12186
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--nxcompat" >&5
12188 $as_echo_n "checking whether the linker accepts -Wl,--nxcompat... " >&6; }
12189 if ${otr_cv_ldflags__Wl___nxcompat+:} false; then :
1119912190 $as_echo_n "(cached) " >&6
1120012191 else
1120112192
1120312194 otr_saved_LDFLAGS="$LDFLAGS"
1120412195 otr_saved_LIBS="$LIBS"
1120512196 CFLAGS="$CFLAGS -pedantic -Werror"
11206 LDFLAGS="$LDFLAGS "$all_ldflags_for_check" --nxcompat"
12197 LDFLAGS="$LDFLAGS "$all_ldflags_for_check" -Wl,--nxcompat"
1120712198 LIBS="$LIBS "$all_libs_for_check""
1120812199 if test "$cross_compiling" = yes; then :
1120912200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1121812209 }
1121912210 _ACEOF
1122012211 if ac_fn_c_try_link "$LINENO"; then :
11221 otr_cv_ldflags___nxcompat=yes
11222 else
11223 otr_cv_ldflags___nxcompat=no
12212 otr_cv_ldflags__Wl___nxcompat=yes
12213 else
12214 otr_cv_ldflags__Wl___nxcompat=no
1122412215 fi
1122512216 rm -f core conftest.err conftest.$ac_objext \
1122612217 conftest$ac_exeext conftest.$ac_ext
1123712228 }
1123812229 _ACEOF
1123912230 if ac_fn_c_try_run "$LINENO"; then :
11240 otr_cv_ldflags___nxcompat=yes
11241 else
11242 otr_cv_ldflags___nxcompat=no
12231 otr_cv_ldflags__Wl___nxcompat=yes
12232 else
12233 otr_cv_ldflags__Wl___nxcompat=no
1124312234 fi
1124412235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1124512236 conftest.$ac_objext conftest.beam conftest.$ac_ext
1125012241 LIBS="$otr_saved_LIBS"
1125112242
1125212243 fi
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags___nxcompat" >&5
11254 $as_echo "$otr_cv_ldflags___nxcompat" >&6; }
11255 if test x$otr_cv_ldflags___nxcompat = xyes; then
11256 LDFLAGS="$LDFLAGS --nxcompat"
12244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags__Wl___nxcompat" >&5
12245 $as_echo "$otr_cv_ldflags__Wl___nxcompat" >&6; }
12246 if test x$otr_cv_ldflags__Wl___nxcompat = xyes; then
12247 LDFLAGS="$LDFLAGS -Wl,--nxcompat"
1125712248 fi
1125812249
1125912250
1126512256
1126612257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5
1126712258 $as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; }
11268 if test "${otr_cv_ldflags__z_relro__z_now+set}" = set; then :
12259 if ${otr_cv_ldflags__z_relro__z_now+:} false; then :
1126912260 $as_echo_n "(cached) " >&6
1127012261 else
1127112262
1133012321 fi
1133112322
1133212323 ac_config_files="$ac_config_files Makefile src/Makefile toolkit/Makefile libotr.pc"
12324
1133312325
1133412326 cat >confcache <<\_ACEOF
1133512327 # This file is a shell script that caches the results of configure
1139512387 :end' >>confcache
1139612388 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1139712389 if test -w "$cache_file"; then
11398 test "x$cache_file" != "x/dev/null" &&
12390 if test "x$cache_file" != "x/dev/null"; then
1139912391 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
1140012392 $as_echo "$as_me: updating cache $cache_file" >&6;}
11401 cat confcache >$cache_file
12393 if test ! -f "$cache_file" || test -h "$cache_file"; then
12394 cat confcache >"$cache_file"
12395 else
12396 case $cache_file in #(
12397 */* | ?:*)
12398 mv -f confcache "$cache_file"$$ &&
12399 mv -f "$cache_file"$$ "$cache_file" ;; #(
12400 *)
12401 mv -f confcache "$cache_file" ;;
12402 esac
12403 fi
12404 fi
1140212405 else
1140312406 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
1140412407 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
1141412417
1141512418 ac_libobjs=
1141612419 ac_ltlibobjs=
12420 U=
1141712421 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
1141812422 # 1. Remove the extension, and $U if already installed.
1141912423 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
1143712441 fi
1143812442
1143912443 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
11440 as_fn_error "conditional \"AMDEP\" was never defined.
12444 as_fn_error $? "conditional \"AMDEP\" was never defined.
1144112445 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1144212446 fi
1144312447 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
11444 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12448 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
1144512449 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1144612450 fi
1144712451 if test -z "${BUILD_NT_SERVICES_TRUE}" && test -z "${BUILD_NT_SERVICES_FALSE}"; then
11448 as_fn_error "conditional \"BUILD_NT_SERVICES\" was never defined.
12452 as_fn_error $? "conditional \"BUILD_NT_SERVICES\" was never defined.
1144912453 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1145012454 fi
1145112455
11452 : ${CONFIG_STATUS=./config.status}
12456 : "${CONFIG_STATUS=./config.status}"
1145312457 ac_write_fail=0
1145412458 ac_clean_files_save=$ac_clean_files
1145512459 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1155012554 IFS=" "" $as_nl"
1155112555
1155212556 # Find who we are. Look in the path if we contain no directory separator.
12557 as_myself=
1155312558 case $0 in #((
1155412559 *[\\/]* ) as_myself=$0 ;;
1155512560 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1159512600 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1159612601
1159712602
11598 # as_fn_error ERROR [LINENO LOG_FD]
11599 # ---------------------------------
12603 # as_fn_error STATUS ERROR [LINENO LOG_FD]
12604 # ----------------------------------------
1160012605 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
1160112606 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11602 # script with status $?, using 1 if that was 0.
12607 # script with STATUS, using 1 if that was 0.
1160312608 as_fn_error ()
1160412609 {
11605 as_status=$?; test $as_status -eq 0 && as_status=1
11606 if test "$3"; then
11607 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11608 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
11609 fi
11610 $as_echo "$as_me: error: $1" >&2
12610 as_status=$1; test $as_status -eq 0 && as_status=1
12611 if test "$4"; then
12612 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12613 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12614 fi
12615 $as_echo "$as_me: error: $2" >&2
1161112616 as_fn_exit $as_status
1161212617 } # as_fn_error
1161312618
1180312808 test -d "$as_dir" && break
1180412809 done
1180512810 test -z "$as_dirs" || eval "mkdir $as_dirs"
11806 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
12811 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
1180712812
1180812813
1180912814 } # as_fn_mkdir_p
1185612861 # report actual input values of CONFIG_FILES etc. instead of their
1185712862 # values after options handling.
1185812863 ac_log="
11859 This file was extended by $as_me, which was
11860 generated by GNU Autoconf 2.65. Invocation command line was
12864 This file was extended by libotr $as_me 4.1.0, which was
12865 generated by GNU Autoconf 2.68. Invocation command line was
1186112866
1186212867 CONFIG_FILES = $CONFIG_FILES
1186312868 CONFIG_HEADERS = $CONFIG_HEADERS
1191612921 Configuration commands:
1191712922 $config_commands
1191812923
11919 Report bugs to the package provider."
12924 Report bugs to <otr@cypherpunks.ca>.
12925 libotr home page: <https://otr.cypherpunks.ca>."
1192012926
1192112927 _ACEOF
1192212928 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1192312929 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1192412930 ac_cs_version="\\
11925 config.status
11926 configured by $0, generated by GNU Autoconf 2.65,
12931 libotr config.status 4.1.0
12932 configured by $0, generated by GNU Autoconf 2.68,
1192712933 with options \\"\$ac_cs_config\\"
1192812934
11929 Copyright (C) 2009 Free Software Foundation, Inc.
12935 Copyright (C) 2010 Free Software Foundation, Inc.
1193012936 This config.status script is free software; the Free Software Foundation
1193112937 gives unlimited permission to copy, distribute and modify it."
1193212938
1194412950 while test $# != 0
1194512951 do
1194612952 case $1 in
11947 --*=*)
12953 --*=?*)
1194812954 ac_option=`expr "X$1" : 'X\([^=]*\)='`
1194912955 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12956 ac_shift=:
12957 ;;
12958 --*=)
12959 ac_option=`expr "X$1" : 'X\([^=]*\)='`
12960 ac_optarg=
1195012961 ac_shift=:
1195112962 ;;
1195212963 *)
1197012981 $ac_shift
1197112982 case $ac_optarg in
1197212983 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12984 '') as_fn_error $? "missing file argument" ;;
1197312985 esac
1197412986 as_fn_append CONFIG_FILES " '$ac_optarg'"
1197512987 ac_need_defaults=false;;
1198212994 ac_need_defaults=false;;
1198312995 --he | --h)
1198412996 # Conflict between --help and --header
11985 as_fn_error "ambiguous option: \`$1'
12997 as_fn_error $? "ambiguous option: \`$1'
1198612998 Try \`$0 --help' for more information.";;
1198712999 --help | --hel | -h )
1198813000 $as_echo "$ac_cs_usage"; exit ;;
1199113003 ac_cs_silent=: ;;
1199213004
1199313005 # This is an error.
11994 -*) as_fn_error "unrecognized option: \`$1'
13006 -*) as_fn_error $? "unrecognized option: \`$1'
1199513007 Try \`$0 --help' for more information." ;;
1199613008
1199713009 *) as_fn_append ac_config_targets " $1"
1204513057 sed_quote_subst='$sed_quote_subst'
1204613058 double_quote_subst='$double_quote_subst'
1204713059 delay_variable_subst='$delay_variable_subst'
12048 macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
12049 macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
12050 enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
12051 enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
12052 pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
12053 enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
12054 host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
12055 host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
12056 host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
12057 build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
12058 build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
12059 build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
12060 SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
12061 Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
12062 GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
12063 EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
12064 FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
12065 LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
12066 NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
12067 LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
12068 max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
12069 ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
12070 exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
12071 lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
12072 lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
12073 lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
12074 reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
12075 reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12076 OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
12077 deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
12078 file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
12079 AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
12080 AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
12081 STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
12082 RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
12083 old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12084 old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12085 old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12086 CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
12087 CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
12088 compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
12089 GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
12090 lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
12091 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
12092 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
12093 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
12094 objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
12095 SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
12096 ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
12097 MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
12098 lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
12099 lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
12100 lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
12101 lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
12102 lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
12103 need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
12104 DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
12105 NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
12106 LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
12107 OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
12108 OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
12109 libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
12110 shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12111 extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12112 archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
12113 enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
12114 export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12115 whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12116 compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
12117 old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12118 old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12119 archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12120 archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12121 module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12122 module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12123 with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
12124 allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
12125 no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
12126 hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
12127 hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
12128 hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
12129 hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
12130 hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
12131 hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
12132 hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12133 hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
12134 inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
12135 link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
12136 fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
12137 always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
12138 export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12139 exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
12140 include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
12141 prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12142 file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
12143 variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
12144 need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
12145 need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
12146 version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
12147 runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12148 shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
12149 shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
12150 libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
12151 library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
12152 soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
12153 postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12154 postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12155 finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
12156 finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
12157 hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
12158 sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
12159 sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
12160 hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
12161 enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
12162 enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
12163 enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
12164 old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
12165 striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
13060 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
13061 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
13062 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
13063 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
13064 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
13065 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
13066 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
13067 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
13068 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
13069 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
13070 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
13071 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
13072 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
13073 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
13074 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
13075 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
13076 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
13077 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
13078 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
13079 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
13080 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
13081 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
13082 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
13083 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
13084 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
13085 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
13086 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
13087 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
13088 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
13089 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
13090 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
13091 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
13092 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
13093 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
13094 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
13095 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
13096 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
13097 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
13098 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
13099 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
13100 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
13101 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
13102 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
13103 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
13104 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
13105 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13106 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13107 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
13108 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
13109 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
13110 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
13111 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
13112 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
13113 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
13114 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
13115 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
13116 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
13117 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
13118 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
13119 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
13120 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
13121 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
13122 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
13123 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
13124 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
13125 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
13126 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
13127 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
13128 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
13129 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
13130 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
13131 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
13132 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
13133 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
13134 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
13135 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13136 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
13137 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
13138 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
13139 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
13140 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
13141 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
13142 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13143 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
13144 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13145 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
13146 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13147 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
13148 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
13149 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
13150 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
13151 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
13152 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
13153 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
13154 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
13155 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
13156 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
13157 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
13158 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
13159 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
13160 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
13161 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
13162 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
13163 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
13164 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
13165 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
13166 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
13167 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
13168 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
13169 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
13170 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
13171 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
13172 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
13173 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
13174 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
13175 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
13176 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
13177 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13178 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13179 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
13180 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
13181 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
13182 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
13183 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
13184 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
13185 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
13186 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
13187 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
13188 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
13189 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
1216613190
1216713191 LTCC='$LTCC'
1216813192 LTCFLAGS='$LTCFLAGS'
1216913193 compiler='$compiler_DEFAULT'
1217013194
13195 # A function that is used when there is no print builtin or printf.
13196 func_fallback_echo ()
13197 {
13198 eval 'cat <<_LTECHO_EOF
13199 \$1
13200 _LTECHO_EOF'
13201 }
13202
1217113203 # Quote evaled strings.
12172 for var in SED \
13204 for var in SHELL \
13205 ECHO \
13206 PATH_SEPARATOR \
13207 SED \
1217313208 GREP \
1217413209 EGREP \
1217513210 FGREP \
1218213217 OBJDUMP \
1218313218 deplibs_check_method \
1218413219 file_magic_cmd \
13220 file_magic_glob \
13221 want_nocaseglob \
13222 DLLTOOL \
13223 sharedlib_from_linklib_cmd \
1218513224 AR \
1218613225 AR_FLAGS \
13226 archiver_list_spec \
1218713227 STRIP \
1218813228 RANLIB \
1218913229 CC \
1219313233 lt_cv_sys_global_symbol_to_cdecl \
1219413234 lt_cv_sys_global_symbol_to_c_name_address \
1219513235 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
12196 SHELL \
12197 ECHO \
13236 nm_file_list_spec \
1219813237 lt_prog_compiler_no_builtin_flag \
13238 lt_prog_compiler_pic \
1219913239 lt_prog_compiler_wl \
12200 lt_prog_compiler_pic \
1220113240 lt_prog_compiler_static \
1220213241 lt_cv_prog_compiler_c_o \
1220313242 need_locks \
13243 MANIFEST_TOOL \
1220413244 DSYMUTIL \
1220513245 NMEDIT \
1220613246 LIPO \
1221413254 allow_undefined_flag \
1221513255 no_undefined_flag \
1221613256 hardcode_libdir_flag_spec \
12217 hardcode_libdir_flag_spec_ld \
1221813257 hardcode_libdir_separator \
12219 fix_srcfile_path \
1222013258 exclude_expsyms \
1222113259 include_expsyms \
1222213260 file_list_spec \
1222413262 libname_spec \
1222513263 library_names_spec \
1222613264 soname_spec \
13265 install_override_mode \
1222713266 finish_eval \
1222813267 old_striplib \
1222913268 striplib; do
12230 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
13269 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1223113270 *[\\\\\\\`\\"\\\$]*)
12232 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
13271 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1223313272 ;;
1223413273 *)
1223513274 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1225113290 module_expsym_cmds \
1225213291 export_symbols_cmds \
1225313292 prelink_cmds \
13293 postlink_cmds \
1225413294 postinstall_cmds \
1225513295 postuninstall_cmds \
1225613296 finish_cmds \
1225713297 sys_lib_search_path_spec \
1225813298 sys_lib_dlsearch_path_spec; do
12259 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
13299 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1226013300 *[\\\\\\\`\\"\\\$]*)
12261 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
13301 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1226213302 ;;
1226313303 *)
1226413304 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1226513305 ;;
1226613306 esac
1226713307 done
12268
12269 # Fix-up fallback echo if it was mangled by the above quoting rules.
12270 case \$lt_ECHO in
12271 *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
12272 ;;
12273 esac
1227413308
1227513309 ac_aux_dir='$ac_aux_dir'
1227613310 xsi_shell='$xsi_shell'
1230813342 "toolkit/Makefile") CONFIG_FILES="$CONFIG_FILES toolkit/Makefile" ;;
1230913343 "libotr.pc") CONFIG_FILES="$CONFIG_FILES libotr.pc" ;;
1231013344
12311 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13345 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1231213346 esac
1231313347 done
1231413348
1233113365 # after its creation but before its name has been assigned to `$tmp'.
1233213366 $debug ||
1233313367 {
12334 tmp=
13368 tmp= ac_tmp=
1233513369 trap 'exit_status=$?
12336 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
13370 : "${ac_tmp:=$tmp}"
13371 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
1233713372 ' 0
1233813373 trap 'as_fn_exit 1' 1 2 13 15
1233913374 }
1234113376
1234213377 {
1234313378 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12344 test -n "$tmp" && test -d "$tmp"
13379 test -d "$tmp"
1234513380 } ||
1234613381 {
1234713382 tmp=./conf$$-$RANDOM
1234813383 (umask 077 && mkdir "$tmp")
12349 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
13384 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13385 ac_tmp=$tmp
1235013386
1235113387 # Set up the scripts for CONFIG_FILES section.
1235213388 # No need to generate them if there are no CONFIG_FILES.
1236313399 fi
1236413400 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
1236513401 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12366 ac_cs_awk_cr='\r'
13402 ac_cs_awk_cr='\\r'
1236713403 else
1236813404 ac_cs_awk_cr=$ac_cr
1236913405 fi
1237013406
12371 echo 'BEGIN {' >"$tmp/subs1.awk" &&
13407 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
1237213408 _ACEOF
1237313409
1237413410
1237713413 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
1237813414 echo "_ACEOF"
1237913415 } >conf$$subs.sh ||
12380 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
12381 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
13416 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13417 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
1238213418 ac_delim='%!_!# '
1238313419 for ac_last_try in false false false false false :; do
1238413420 . ./conf$$subs.sh ||
12385 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13421 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1238613422
1238713423 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
1238813424 if test $ac_delim_n = $ac_delim_num; then
1238913425 break
1239013426 elif $ac_last_try; then
12391 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13427 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1239213428 else
1239313429 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1239413430 fi
1239613432 rm -f conf$$subs.sh
1239713433
1239813434 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12399 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
13435 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
1240013436 _ACEOF
1240113437 sed -n '
1240213438 h
1244413480 rm -f conf$$subs.awk
1244513481 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1244613482 _ACAWK
12447 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
13483 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
1244813484 for (key in S) S_is_set[key] = 1
1244913485 FS = ""
1245013486
1247613512 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
1247713513 else
1247813514 cat
12479 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
12480 || as_fn_error "could not setup config files machinery" "$LINENO" 5
13515 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13516 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
1248113517 _ACEOF
1248213518
12483 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12484 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13519 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13520 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
1248513521 # trailing colons and then remove the whole line if VPATH becomes empty
1248613522 # (actually we leave an empty line to preserve line numbers).
1248713523 if test "x$srcdir" = x.; then
12488 ac_vpsub='/^[ ]*VPATH[ ]*=/{
12489 s/:*\$(srcdir):*/:/
12490 s/:*\${srcdir}:*/:/
12491 s/:*@srcdir@:*/:/
12492 s/^\([^=]*=[ ]*\):*/\1/
13524 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
13525 h
13526 s///
13527 s/^/:/
13528 s/[ ]*$/:/
13529 s/:\$(srcdir):/:/g
13530 s/:\${srcdir}:/:/g
13531 s/:@srcdir@:/:/g
13532 s/^:*//
1249313533 s/:*$//
13534 x
13535 s/\(=[ ]*\).*/\1/
13536 G
13537 s/\n//
1249413538 s/^[^=]*=[ ]*$//
1249513539 }'
1249613540 fi
1250213546 # No need to generate them if there are no CONFIG_HEADERS.
1250313547 # This happens for instance with `./config.status Makefile'.
1250413548 if test -n "$CONFIG_HEADERS"; then
12505 cat >"$tmp/defines.awk" <<\_ACAWK ||
13549 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
1250613550 BEGIN {
1250713551 _ACEOF
1250813552
1251413558 # handling of long lines.
1251513559 ac_delim='%!_!# '
1251613560 for ac_last_try in false false :; do
12517 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
12518 if test -z "$ac_t"; then
13561 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13562 if test -z "$ac_tt"; then
1251913563 break
1252013564 elif $ac_last_try; then
12521 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
13565 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
1252213566 else
1252313567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1252413568 fi
1260313647 _ACAWK
1260413648 _ACEOF
1260513649 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12606 as_fn_error "could not setup config headers machinery" "$LINENO" 5
13650 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
1260713651 fi # test -n "$CONFIG_HEADERS"
1260813652
1260913653
1261613660 esac
1261713661 case $ac_mode$ac_tag in
1261813662 :[FHL]*:*);;
12619 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
13663 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
1262013664 :[FH]-) ac_tag=-:-;;
1262113665 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
1262213666 esac
1263513679 for ac_f
1263613680 do
1263713681 case $ac_f in
12638 -) ac_f="$tmp/stdin";;
13682 -) ac_f="$ac_tmp/stdin";;
1263913683 *) # Look for the file first in the build tree, then in the source tree
1264013684 # (if the path is not absolute). The absolute path cannot be DOS-style,
1264113685 # because $ac_f cannot contain `:'.
1264413688 [\\/$]*) false;;
1264513689 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1264613690 esac ||
12647 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13691 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
1264813692 esac
1264913693 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
1265013694 as_fn_append ac_file_inputs " '$ac_f'"
1267013714 esac
1267113715
1267213716 case $ac_tag in
12673 *:-:* | *:-) cat >"$tmp/stdin" \
12674 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
13717 *:-:* | *:-) cat >"$ac_tmp/stdin" \
13718 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
1267513719 esac
1267613720 ;;
1267713721 esac
1280713851 s&@MKDIR_P@&$ac_MKDIR_P&;t t
1280813852 $ac_datarootdir_hack
1280913853 "
12810 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
12811 || as_fn_error "could not create $ac_file" "$LINENO" 5
13854 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13855 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1281213856
1281313857 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12814 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12815 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13858 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13859 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13860 "$ac_tmp/out"`; test -z "$ac_out"; } &&
1281613861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12817 which seems to be undefined. Please make sure it is defined." >&5
13862 which seems to be undefined. Please make sure it is defined" >&5
1281813863 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12819 which seems to be undefined. Please make sure it is defined." >&2;}
12820
12821 rm -f "$tmp/stdin"
13864 which seems to be undefined. Please make sure it is defined" >&2;}
13865
13866 rm -f "$ac_tmp/stdin"
1282213867 case $ac_file in
12823 -) cat "$tmp/out" && rm -f "$tmp/out";;
12824 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
13868 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13869 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
1282513870 esac \
12826 || as_fn_error "could not create $ac_file" "$LINENO" 5
13871 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1282713872 ;;
1282813873 :H)
1282913874 #
1283213877 if test x"$ac_file" != x-; then
1283313878 {
1283413879 $as_echo "/* $configure_input */" \
12835 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
12836 } >"$tmp/config.h" \
12837 || as_fn_error "could not create $ac_file" "$LINENO" 5
12838 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
13880 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13881 } >"$ac_tmp/config.h" \
13882 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13883 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
1283913884 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
1284013885 $as_echo "$as_me: $ac_file is unchanged" >&6;}
1284113886 else
1284213887 rm -f "$ac_file"
12843 mv "$tmp/config.h" "$ac_file" \
12844 || as_fn_error "could not create $ac_file" "$LINENO" 5
13888 mv "$ac_tmp/config.h" "$ac_file" \
13889 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1284513890 fi
1284613891 else
1284713892 $as_echo "/* $configure_input */" \
12848 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
12849 || as_fn_error "could not create -" "$LINENO" 5
13893 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13894 || as_fn_error $? "could not create -" "$LINENO" 5
1285013895 fi
1285113896 # Compute "$ac_file"'s index in $config_headers.
1285213897 _am_arg="$ac_file"
1300714052 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1300814053 #
1300914054 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13010 # 2006, 2007, 2008 Free Software Foundation, Inc.
14055 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14056 # Foundation, Inc.
1301114057 # Written by Gordon Matzigkeit, 1996
1301214058 #
1301314059 # This file is part of GNU Libtool.
1305514101 # Whether or not to optimize for fast installation.
1305614102 fast_install=$enable_fast_install
1305714103
14104 # Shell to use when invoking shell scripts.
14105 SHELL=$lt_SHELL
14106
14107 # An echo program that protects backslashes.
14108 ECHO=$lt_ECHO
14109
14110 # The PATH separator for the build system.
14111 PATH_SEPARATOR=$lt_PATH_SEPARATOR
14112
1305814113 # The host system.
1305914114 host_alias=$host_alias
1306014115 host=$host
1310414159 # turn newlines into spaces.
1310514160 NL2SP=$lt_lt_NL2SP
1310614161
13107 # How to create reloadable object files.
13108 reload_flag=$lt_reload_flag
13109 reload_cmds=$lt_reload_cmds
14162 # convert \$build file names to \$host format.
14163 to_host_file_cmd=$lt_cv_to_host_file_cmd
14164
14165 # convert \$build files to toolchain format.
14166 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
1311014167
1311114168 # An object symbol dumper.
1311214169 OBJDUMP=$lt_OBJDUMP
1311414171 # Method to check whether dependent libraries are shared objects.
1311514172 deplibs_check_method=$lt_deplibs_check_method
1311614173
13117 # Command to use when deplibs_check_method == "file_magic".
14174 # Command to use when deplibs_check_method = "file_magic".
1311814175 file_magic_cmd=$lt_file_magic_cmd
14176
14177 # How to find potential files when deplibs_check_method = "file_magic".
14178 file_magic_glob=$lt_file_magic_glob
14179
14180 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
14181 want_nocaseglob=$lt_want_nocaseglob
14182
14183 # DLL creation program.
14184 DLLTOOL=$lt_DLLTOOL
14185
14186 # Command to associate shared and link libraries.
14187 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
1311914188
1312014189 # The archiver.
1312114190 AR=$lt_AR
14191
14192 # Flags to create an archive.
1312214193 AR_FLAGS=$lt_AR_FLAGS
14194
14195 # How to feed a file listing to the archiver.
14196 archiver_list_spec=$lt_archiver_list_spec
1312314197
1312414198 # A symbol stripping program.
1312514199 STRIP=$lt_STRIP
1312914203 old_postinstall_cmds=$lt_old_postinstall_cmds
1313014204 old_postuninstall_cmds=$lt_old_postuninstall_cmds
1313114205
14206 # Whether to use a lock for old archive extraction.
14207 lock_old_archive_extraction=$lock_old_archive_extraction
14208
1313214209 # A C compiler.
1313314210 LTCC=$lt_CC
1313414211
1314714224 # Transform the output of nm in a C name address pair when lib prefix is needed.
1314814225 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
1314914226
14227 # Specify filename containing input files for \$NM.
14228 nm_file_list_spec=$lt_nm_file_list_spec
14229
14230 # The root where to search for dependent libraries,and in which our libraries should be installed.
14231 lt_sysroot=$lt_sysroot
14232
1315014233 # The name of the directory that contains temporary libtool files.
1315114234 objdir=$objdir
1315214235
13153 # Shell to use when invoking shell scripts.
13154 SHELL=$lt_SHELL
13155
13156 # An echo program that does not interpret backslashes.
13157 ECHO=$lt_ECHO
13158
1315914236 # Used to examine libraries when file_magic_cmd begins with "file".
1316014237 MAGIC_CMD=$MAGIC_CMD
1316114238
1316214239 # Must we lock files when doing compilation?
1316314240 need_locks=$lt_need_locks
14241
14242 # Manifest tool.
14243 MANIFEST_TOOL=$lt_MANIFEST_TOOL
1316414244
1316514245 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
1316614246 DSYMUTIL=$lt_DSYMUTIL
1321814298 # The coded name of the library, if different from the real name.
1321914299 soname_spec=$lt_soname_spec
1322014300
14301 # Permission mode override for installation of shared libraries.
14302 install_override_mode=$lt_install_override_mode
14303
1322114304 # Command to use after installation of a shared archive.
1322214305 postinstall_cmds=$lt_postinstall_cmds
1322314306
1325714340 # The linker used to build libraries.
1325814341 LD=$lt_LD
1325914342
14343 # How to create reloadable object files.
14344 reload_flag=$lt_reload_flag
14345 reload_cmds=$lt_reload_cmds
14346
1326014347 # Commands used to build an old-style archive.
1326114348 old_archive_cmds=$lt_old_archive_cmds
1326214349
1326914356 # Compiler flag to turn off builtin functions.
1327014357 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
1327114358
14359 # Additional compiler flags for building library objects.
14360 pic_flag=$lt_lt_prog_compiler_pic
14361
1327214362 # How to pass a linker flag through the compiler.
1327314363 wl=$lt_lt_prog_compiler_wl
13274
13275 # Additional compiler flags for building library objects.
13276 pic_flag=$lt_lt_prog_compiler_pic
1327714364
1327814365 # Compiler flag to prevent dynamic linking.
1327914366 link_static_flag=$lt_lt_prog_compiler_static
1332314410 # Flag to hardcode \$libdir into a binary during linking.
1332414411 # This must work even if \$libdir does not exist
1332514412 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
13326
13327 # If ld is used when linking, flag to hardcode \$libdir into a binary
13328 # during linking. This must work even if \$libdir does not exist.
13329 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
1333014413
1333114414 # Whether we need a single "-rpath" flag with a separated argument.
1333214415 hardcode_libdir_separator=$lt_hardcode_libdir_separator
1336114444 # Whether libtool must link a program against all its dependency libraries.
1336214445 link_all_deplibs=$link_all_deplibs
1336314446
13364 # Fix the shell variable \$srcfile for the compiler.
13365 fix_srcfile_path=$lt_fix_srcfile_path
13366
1336714447 # Set to "yes" if exported symbols are required.
1336814448 always_export_symbols=$always_export_symbols
1336914449
1337814458
1337914459 # Commands necessary for linking programs (against libraries) with templates.
1338014460 prelink_cmds=$lt_prelink_cmds
14461
14462 # Commands necessary for finishing linking programs.
14463 postlink_cmds=$lt_postlink_cmds
1338114464
1338214465 # Specify filename containing input files.
1338314466 file_list_spec=$lt_file_list_spec
1341114494 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1341214495 # text mode, it properly converts lines to CR/LF. This bash problem
1341314496 # is reportedly fixed, but why not run on old versions too?
13414 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
13415 || (rm -f "$cfgfile"; exit 1)
13416
13417 case $xsi_shell in
13418 yes)
13419 cat << \_LT_EOF >> "$cfgfile"
13420
13421 # func_dirname file append nondir_replacement
13422 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
13423 # otherwise set result to NONDIR_REPLACEMENT.
13424 func_dirname ()
13425 {
13426 case ${1} in
13427 */*) func_dirname_result="${1%/*}${2}" ;;
13428 * ) func_dirname_result="${3}" ;;
13429 esac
13430 }
13431
13432 # func_basename file
13433 func_basename ()
13434 {
13435 func_basename_result="${1##*/}"
13436 }
13437
13438 # func_dirname_and_basename file append nondir_replacement
13439 # perform func_basename and func_dirname in a single function
13440 # call:
13441 # dirname: Compute the dirname of FILE. If nonempty,
13442 # add APPEND to the result, otherwise set result
13443 # to NONDIR_REPLACEMENT.
13444 # value returned in "$func_dirname_result"
13445 # basename: Compute filename of FILE.
13446 # value retuned in "$func_basename_result"
13447 # Implementation must be kept synchronized with func_dirname
13448 # and func_basename. For efficiency, we do not delegate to
13449 # those functions but instead duplicate the functionality here.
13450 func_dirname_and_basename ()
13451 {
13452 case ${1} in
13453 */*) func_dirname_result="${1%/*}${2}" ;;
13454 * ) func_dirname_result="${3}" ;;
13455 esac
13456 func_basename_result="${1##*/}"
13457 }
13458
13459 # func_stripname prefix suffix name
13460 # strip PREFIX and SUFFIX off of NAME.
13461 # PREFIX and SUFFIX must not contain globbing or regex special
13462 # characters, hashes, percent signs, but SUFFIX may contain a leading
13463 # dot (in which case that matches only a dot).
13464 func_stripname ()
13465 {
13466 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
13467 # positional parameters, so assign one to ordinary parameter first.
13468 func_stripname_result=${3}
13469 func_stripname_result=${func_stripname_result#"${1}"}
13470 func_stripname_result=${func_stripname_result%"${2}"}
13471 }
13472
13473 # func_opt_split
13474 func_opt_split ()
13475 {
13476 func_opt_split_opt=${1%%=*}
13477 func_opt_split_arg=${1#*=}
13478 }
13479
13480 # func_lo2o object
13481 func_lo2o ()
13482 {
13483 case ${1} in
13484 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
13485 *) func_lo2o_result=${1} ;;
13486 esac
13487 }
13488
13489 # func_xform libobj-or-source
13490 func_xform ()
13491 {
13492 func_xform_result=${1%.*}.lo
13493 }
13494
13495 # func_arith arithmetic-term...
13496 func_arith ()
13497 {
13498 func_arith_result=$(( $* ))
13499 }
13500
13501 # func_len string
13502 # STRING may not start with a hyphen.
13503 func_len ()
13504 {
13505 func_len_result=${#1}
13506 }
13507
13508 _LT_EOF
13509 ;;
13510 *) # Bourne compatible functions.
13511 cat << \_LT_EOF >> "$cfgfile"
13512
13513 # func_dirname file append nondir_replacement
13514 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
13515 # otherwise set result to NONDIR_REPLACEMENT.
13516 func_dirname ()
13517 {
13518 # Extract subdirectory from the argument.
13519 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
13520 if test "X$func_dirname_result" = "X${1}"; then
13521 func_dirname_result="${3}"
13522 else
13523 func_dirname_result="$func_dirname_result${2}"
13524 fi
13525 }
13526
13527 # func_basename file
13528 func_basename ()
13529 {
13530 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
13531 }
13532
13533
13534 # func_stripname prefix suffix name
13535 # strip PREFIX and SUFFIX off of NAME.
13536 # PREFIX and SUFFIX must not contain globbing or regex special
13537 # characters, hashes, percent signs, but SUFFIX may contain a leading
13538 # dot (in which case that matches only a dot).
13539 # func_strip_suffix prefix name
13540 func_stripname ()
13541 {
13542 case ${2} in
13543 .*) func_stripname_result=`$ECHO "X${3}" \
13544 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
13545 *) func_stripname_result=`$ECHO "X${3}" \
13546 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
13547 esac
13548 }
13549
13550 # sed scripts:
13551 my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
13552 my_sed_long_arg='1s/^-[^=]*=//'
13553
13554 # func_opt_split
13555 func_opt_split ()
13556 {
13557 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
13558 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
13559 }
13560
13561 # func_lo2o object
13562 func_lo2o ()
13563 {
13564 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
13565 }
13566
13567 # func_xform libobj-or-source
13568 func_xform ()
13569 {
13570 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
13571 }
13572
13573 # func_arith arithmetic-term...
13574 func_arith ()
13575 {
13576 func_arith_result=`expr "$@"`
13577 }
13578
13579 # func_len string
13580 # STRING may not start with a hyphen.
13581 func_len ()
13582 {
13583 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
13584 }
13585
13586 _LT_EOF
13587 esac
13588
13589 case $lt_shell_append in
13590 yes)
13591 cat << \_LT_EOF >> "$cfgfile"
13592
13593 # func_append var value
13594 # Append VALUE to the end of shell variable VAR.
13595 func_append ()
13596 {
13597 eval "$1+=\$2"
13598 }
13599 _LT_EOF
13600 ;;
13601 *)
13602 cat << \_LT_EOF >> "$cfgfile"
13603
13604 # func_append var value
13605 # Append VALUE to the end of shell variable VAR.
13606 func_append ()
13607 {
13608 eval "$1=\$$1\$2"
13609 }
13610
13611 _LT_EOF
13612 ;;
13613 esac
13614
13615
13616 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
13617 || (rm -f "$cfgfile"; exit 1)
13618
13619 mv -f "$cfgfile" "$ofile" ||
14497 sed '$q' "$ltmain" >> "$cfgfile" \
14498 || (rm -f "$cfgfile"; exit 1)
14499
14500 if test x"$xsi_shell" = xyes; then
14501 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
14502 func_dirname ()\
14503 {\
14504 \ case ${1} in\
14505 \ */*) func_dirname_result="${1%/*}${2}" ;;\
14506 \ * ) func_dirname_result="${3}" ;;\
14507 \ esac\
14508 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
14509 && mv -f "$cfgfile.tmp" "$cfgfile" \
14510 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14511 test 0 -eq $? || _lt_function_replace_fail=:
14512
14513
14514 sed -e '/^func_basename ()$/,/^} # func_basename /c\
14515 func_basename ()\
14516 {\
14517 \ func_basename_result="${1##*/}"\
14518 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
14519 && mv -f "$cfgfile.tmp" "$cfgfile" \
14520 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14521 test 0 -eq $? || _lt_function_replace_fail=:
14522
14523
14524 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
14525 func_dirname_and_basename ()\
14526 {\
14527 \ case ${1} in\
14528 \ */*) func_dirname_result="${1%/*}${2}" ;;\
14529 \ * ) func_dirname_result="${3}" ;;\
14530 \ esac\
14531 \ func_basename_result="${1##*/}"\
14532 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
14533 && mv -f "$cfgfile.tmp" "$cfgfile" \
14534 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14535 test 0 -eq $? || _lt_function_replace_fail=:
14536
14537
14538 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
14539 func_stripname ()\
14540 {\
14541 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
14542 \ # positional parameters, so assign one to ordinary parameter first.\
14543 \ func_stripname_result=${3}\
14544 \ func_stripname_result=${func_stripname_result#"${1}"}\
14545 \ func_stripname_result=${func_stripname_result%"${2}"}\
14546 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
14547 && mv -f "$cfgfile.tmp" "$cfgfile" \
14548 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14549 test 0 -eq $? || _lt_function_replace_fail=:
14550
14551
14552 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
14553 func_split_long_opt ()\
14554 {\
14555 \ func_split_long_opt_name=${1%%=*}\
14556 \ func_split_long_opt_arg=${1#*=}\
14557 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
14558 && mv -f "$cfgfile.tmp" "$cfgfile" \
14559 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14560 test 0 -eq $? || _lt_function_replace_fail=:
14561
14562
14563 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
14564 func_split_short_opt ()\
14565 {\
14566 \ func_split_short_opt_arg=${1#??}\
14567 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
14568 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
14569 && mv -f "$cfgfile.tmp" "$cfgfile" \
14570 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14571 test 0 -eq $? || _lt_function_replace_fail=:
14572
14573
14574 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
14575 func_lo2o ()\
14576 {\
14577 \ case ${1} in\
14578 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
14579 \ *) func_lo2o_result=${1} ;;\
14580 \ esac\
14581 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
14582 && mv -f "$cfgfile.tmp" "$cfgfile" \
14583 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14584 test 0 -eq $? || _lt_function_replace_fail=:
14585
14586
14587 sed -e '/^func_xform ()$/,/^} # func_xform /c\
14588 func_xform ()\
14589 {\
14590 func_xform_result=${1%.*}.lo\
14591 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
14592 && mv -f "$cfgfile.tmp" "$cfgfile" \
14593 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14594 test 0 -eq $? || _lt_function_replace_fail=:
14595
14596
14597 sed -e '/^func_arith ()$/,/^} # func_arith /c\
14598 func_arith ()\
14599 {\
14600 func_arith_result=$(( $* ))\
14601 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
14602 && mv -f "$cfgfile.tmp" "$cfgfile" \
14603 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14604 test 0 -eq $? || _lt_function_replace_fail=:
14605
14606
14607 sed -e '/^func_len ()$/,/^} # func_len /c\
14608 func_len ()\
14609 {\
14610 func_len_result=${#1}\
14611 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
14612 && mv -f "$cfgfile.tmp" "$cfgfile" \
14613 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14614 test 0 -eq $? || _lt_function_replace_fail=:
14615
14616 fi
14617
14618 if test x"$lt_shell_append" = xyes; then
14619 sed -e '/^func_append ()$/,/^} # func_append /c\
14620 func_append ()\
14621 {\
14622 eval "${1}+=\\${2}"\
14623 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
14624 && mv -f "$cfgfile.tmp" "$cfgfile" \
14625 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14626 test 0 -eq $? || _lt_function_replace_fail=:
14627
14628
14629 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
14630 func_append_quoted ()\
14631 {\
14632 \ func_quote_for_eval "${2}"\
14633 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
14634 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
14635 && mv -f "$cfgfile.tmp" "$cfgfile" \
14636 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14637 test 0 -eq $? || _lt_function_replace_fail=:
14638
14639
14640 # Save a `func_append' function call where possible by direct use of '+='
14641 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
14642 && mv -f "$cfgfile.tmp" "$cfgfile" \
14643 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14644 test 0 -eq $? || _lt_function_replace_fail=:
14645 else
14646 # Save a `func_append' function call even when '+=' is not available
14647 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
14648 && mv -f "$cfgfile.tmp" "$cfgfile" \
14649 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14650 test 0 -eq $? || _lt_function_replace_fail=:
14651 fi
14652
14653 if test x"$_lt_function_replace_fail" = x":"; then
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
14655 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
14656 fi
14657
14658
14659 mv -f "$cfgfile" "$ofile" ||
1362014660 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1362114661 chmod +x "$ofile"
1362214662
1363114671 ac_clean_files=$ac_clean_files_save
1363214672
1363314673 test $ac_write_fail = 0 ||
13634 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14674 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
1363514675
1363614676
1363714677 # configure is writing to config.log, and then calls config.status.
1365214692 exec 5>>config.log
1365314693 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1365414694 # would make configure fail if this is the last instruction.
13655 $ac_cs_success || as_fn_exit $?
14695 $ac_cs_success || as_fn_exit 1
1365614696 fi
1365714697 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1365814698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
00 dnl Process this file with autoconf to produce configure.
1
2 AC_INIT(toolkit/parse.c)
3
4 AM_CONFIG_HEADER(config.h)
51
62 dnl Notes on version numbering:
73 dnl For an implementation-only change:
1410 dnl For a backwards-incompatible API change (e.g. changing data structures):
1511 dnl Change the libotr package version from a.b.c to (a+1).0.0
1612 dnl Change the libotr libtool version from x:y:z to (x+1):0:0
13 AC_INIT([libotr],[4.1.0],[otr@cypherpunks.ca],[],[https://otr.cypherpunks.ca])
1714
18 AM_INIT_AUTOMAKE(libotr, 4.0.0)
19 LIBOTR_LIBTOOL_VERSION="5:0:0"
15 AM_CONFIG_HEADER(config.h)
16 AC_CONFIG_AUX_DIR([config])
17
18 AM_INIT_AUTOMAKE
19 LIBOTR_LIBTOOL_VERSION="6:0:1"
20
21 AC_CONFIG_MACRO_DIR([config])
22 # Silent compilation so warnings can be spotted.
23 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
2024
2125 AC_SUBST(LIBOTR_LIBTOOL_VERSION)
2226
2327 AC_PROG_CC
24
25
26 AM_PROG_LIBTOOL
28 LT_INIT
2729
2830 AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
2931
158160 else
159161 OTR_CHECK_CFLAGS(-fPIE)
160162 OTR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
161 OTR_CHECK_LDFLAGS(--dynamicbase, "$all_ldflags_for_check", "$all_libs_for_check")
162 OTR_CHECK_LDFLAGS(--nxcompat, "$all_ldflags_for_check", "$all_libs_for_check")
163 OTR_CHECK_LDFLAGS([-Wl,--dynamicbase], "$all_ldflags_for_check", "$all_libs_for_check")
164 OTR_CHECK_LDFLAGS([-Wl,--nxcompat], "$all_ldflags_for_check", "$all_libs_for_check")
163165 fi
164166 fi
165167
167169 OTR_CHECK_LDFLAGS(-z relro -z now, "$all_ldflags_for_check", "$all_libs_for_check")
168170 fi
169171
170 AC_OUTPUT([Makefile src/Makefile toolkit/Makefile libotr.pc])
172 AC_CONFIG_FILES([
173 Makefile
174 src/Makefile
175 toolkit/Makefile
176 libotr.pc
177 ])
178
179 AC_OUTPUT
00 #! /bin/sh
11 # depcomp - compile a program generating dependencies as side-effects
22
3 scriptversion=2009-04-28.21; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
6 # Software Foundation, Inc.
3 scriptversion=2011-12-04.11; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
6 # 2011 Free Software Foundation, Inc.
77
88 # This program is free software; you can redistribute it and/or modify
99 # it under the terms of the GNU General Public License as published by
4343 object Object file output by `PROGRAMS ARGS'.
4444 DEPDIR directory where to store dependencies.
4545 depfile Dependency file to output.
46 tmpdepfile Temporary file to use when outputing dependencies.
46 tmpdepfile Temporary file to use when outputting dependencies.
4747 libtool Whether libtool is used (yes/no).
4848
4949 Report bugs to <bug-automake@gnu.org>.
8989 # This is just like msvisualcpp but w/o cygpath translation.
9090 # Just convert the backslash-escaped backslashes to single forward
9191 # slashes to satisfy depend.m4
92 cygpath_u="sed s,\\\\\\\\,/,g"
92 cygpath_u='sed s,\\\\,/,g'
9393 depmode=msvisualcpp
94 fi
95
96 if test "$depmode" = msvc7msys; then
97 # This is just like msvc7 but w/o cygpath translation.
98 # Just convert the backslash-escaped backslashes to single forward
99 # slashes to satisfy depend.m4
100 cygpath_u='sed s,\\\\,/,g'
101 depmode=msvc7
94102 fi
95103
96104 case "$depmode" in
157165 ' < "$tmpdepfile" |
158166 ## Some versions of gcc put a space before the `:'. On the theory
159167 ## that the space means something, we add a space to the output as
160 ## well.
168 ## well. hp depmode also adds that space, but also prefixes the VPATH
169 ## to the object. Take care to not repeat it in the output.
161170 ## Some versions of the HPUX 10.20 sed can't process this invocation
162171 ## correctly. Breaking it into two sed invocations is a workaround.
163 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
172 sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
173 | sed -e 's/$/ :/' >> "$depfile"
164174 rm -f "$tmpdepfile"
165175 ;;
166176
404414 rm -f "$tmpdepfile"
405415 ;;
406416
417 msvc7)
418 if test "$libtool" = yes; then
419 showIncludes=-Wc,-showIncludes
420 else
421 showIncludes=-showIncludes
422 fi
423 "$@" $showIncludes > "$tmpdepfile"
424 stat=$?
425 grep -v '^Note: including file: ' "$tmpdepfile"
426 if test "$stat" = 0; then :
427 else
428 rm -f "$tmpdepfile"
429 exit $stat
430 fi
431 rm -f "$depfile"
432 echo "$object : \\" > "$depfile"
433 # The first sed program below extracts the file names and escapes
434 # backslashes for cygpath. The second sed program outputs the file
435 # name when reading, but also accumulates all include files in the
436 # hold buffer in order to output them again at the end. This only
437 # works with sed implementations that can handle large buffers.
438 sed < "$tmpdepfile" -n '
439 /^Note: including file: *\(.*\)/ {
440 s//\1/
441 s/\\/\\\\/g
442 p
443 }' | $cygpath_u | sort -u | sed -n '
444 s/ /\\ /g
445 s/\(.*\)/ \1 \\/p
446 s/.\(.*\) \\/\1:/
447 H
448 $ {
449 s/.*/ /
450 G
451 p
452 }' >> "$depfile"
453 rm -f "$tmpdepfile"
454 ;;
455
456 msvc7msys)
457 # This case exists only to let depend.m4 do its work. It works by
458 # looking at the text of this script. This case will never be run,
459 # since it is checked for above.
460 exit 1
461 ;;
462
407463 #nosideeffect)
408464 # This comment above is used by automake to tell side-effect
409465 # dependency tracking mechanisms from slower ones.
502558 touch "$tmpdepfile"
503559 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
504560 rm -f "$depfile"
505 cat < "$tmpdepfile" > "$depfile"
561 # makedepend may prepend the VPATH from the source file name to the object.
562 # No need to regex-escape $object, excess matching of '.' is harmless.
563 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
506564 sed '1,2d' "$tmpdepfile" | tr ' ' '
507565 ' | \
508566 ## Some versions of the HPUX 10.20 sed can't process this invocation
55 Name: libotr
66 Description: Off-the-Record Messaging Library
77 Version: @VERSION@
8 URL: http://otr.cypherpunks.ca/
8 URL: https://otr.cypherpunks.ca/
99 Libs: -L${libdir} -lotr
1010 Cflags: -I${includedir}
+2790
-1542
ltmain.sh less more
0 # Generated from ltmain.m4sh.
1
2 # ltmain.sh (GNU libtool) 2.2.6b
0
1 # libtool (GNU libtool) 2.4.2
32 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
43
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
66 # This is free software; see the source for copying conditions. There is NO
77 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88
3131 #
3232 # Provide generalized library-building support services.
3333 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --tag=TAG use configuration variables from tag TAG
42 # -v, --verbose print informational messages (default)
43 # --version print version information
44 # -h, --help print short or long help message
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
4549 #
4650 # MODE must be one of the following:
4751 #
48 # clean remove files from the build directory
49 # compile compile a source file into a libtool object
50 # execute automatically set library path, then run a program
51 # finish complete the installation of libtool libraries
52 # install install libraries or executables
53 # link create a library or an executable
54 # uninstall remove libraries from an installed directory
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
5559 #
56 # MODE-ARGS vary depending on the MODE.
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
5762 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
5863 #
5964 # When reporting a bug, please describe a test case to reproduce it and
6065 # include the following information:
6166 #
62 # host-triplet: $host
63 # shell: $SHELL
64 # compiler: $LTCC
65 # compiler flags: $LTCFLAGS
66 # linker: $LD (gnu? $with_gnu_ld)
67 # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
68 # automake: $automake_version
69 # autoconf: $autoconf_version
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
73 # automake: $automake_version
74 # autoconf: $autoconf_version
7075 #
7176 # Report bugs to <bug-libtool@gnu.org>.
72
73 PROGRAM=ltmain.sh
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
79
80 PROGRAM=libtool
7481 PACKAGE=libtool
75 VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
82 VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
7683 TIMESTAMP=""
77 package_revision=1.3017
84 package_revision=1.3337
7885
7986 # Be Bourne compatible
8087 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9097 BIN_SH=xpg4; export BIN_SH # for Tru64
9198 DUALCASE=1; export DUALCASE # for MKS sh
9299
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
93108 # NLS nuisances: We save the old values to restore during execute mode.
94 # Only set LANG and LC_ALL to C if already set.
95 # These must not be set unconditionally because not all systems understand
96 # e.g. LANG=C (notably SCO).
97109 lt_user_locale=
98110 lt_safe_locale=
99111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
106118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
107119 fi"
108120 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
109124
110125 $lt_unset CDPATH
111126
112127
128 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129 # is ksh but when the shell is invoked as "sh" and the current value of
130 # the _XPG environment variable is not equal to 1 (one), the special
131 # positional parameter $0, within a function call, is the name of the
132 # function.
133 progpath="$0"
113134
114135
115136
116137 : ${CP="cp -f"}
117 : ${ECHO="echo"}
118 : ${EGREP="/bin/grep -E"}
119 : ${FGREP="/bin/grep -F"}
120 : ${GREP="/bin/grep"}
121 : ${LN_S="ln -s"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
122139 : ${MAKE="make"}
123140 : ${MKDIR="mkdir"}
124141 : ${MV="mv -f"}
125142 : ${RM="rm -f"}
126 : ${SED="/bin/sed"}
127143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
128144 : ${Xsed="$SED -e 1s/^X//"}
129145
142158
143159 dirname="s,/[^/]*$,,"
144160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
163 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
145182
146183 # func_dirname_and_basename file append nondir_replacement
147184 # perform func_basename and func_dirname in a single function
157194 # those functions but instead duplicate the functionality here.
158195 func_dirname_and_basename ()
159196 {
160 # Extract subdirectory from the argument.
161 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
162 if test "X$func_dirname_result" = "X${1}"; then
163 func_dirname_result="${3}"
164 else
165 func_dirname_result="$func_dirname_result${2}"
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
201 else
202 func_dirname_result="$func_dirname_result${2}"
203 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
232
233 # func_normal_abspath PATH
234 # Remove doubled-up and trailing slashes, "." path components,
235 # and cancel out any ".." path components in PATH after making
236 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238 func_normal_abspath ()
239 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
287 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
337 fi
338 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
166360 fi
167 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
168 }
169
170 # Generated shell functions inserted here.
171
172 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
173 # is ksh but when the shell is invoked as "sh" and the current value of
174 # the _XPG environment variable is not equal to 1 (one), the special
175 # positional parameter $0, within a function call, is the name of the
176 # function.
177 progpath="$0"
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
178370
179371 # The name of this program:
180 # In the unlikely event $progname began with a '-', it would play havoc with
181 # func_echo (imagine progname=-n), so we prepend ./ in that case:
182372 func_dirname_and_basename "$progpath"
183373 progname=$func_basename_result
184 case $progname in
185 -*) progname=./$progname ;;
186 esac
187374
188375 # Make sure we have an absolute path for reexecution:
189376 case $progpath in
195382 ;;
196383 *)
197384 save_IFS="$IFS"
198 IFS=:
385 IFS=${PATH_SEPARATOR-:}
199386 for progdir in $PATH; do
200387 IFS="$save_IFS"
201388 test -x "$progdir/$progname" && break
213400
214401 # Same as above, but do not quote variable references.
215402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
216412
217413 # Re-`\' parameter expansions in output of double_quote_subst that were
218414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
242438 # name if it has been set yet.
243439 func_echo ()
244440 {
245 $ECHO "$progname${mode+: }$mode: $*"
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
246442 }
247443
248444 # func_verbose arg...
257453 :
258454 }
259455
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
260463 # func_error arg...
261464 # Echo program name prefixed message to standard error.
262465 func_error ()
263466 {
264 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
265468 }
266469
267470 # func_warning arg...
268471 # Echo program name prefixed warning message to standard error.
269472 func_warning ()
270473 {
271 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
272475
273476 # bash bug again:
274477 :
325528 case $my_directory_path in */*) ;; *) break ;; esac
326529
327530 # ...otherwise throw away the child directory and loop
328 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
329532 done
330 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
331534
332535 save_mkdir_p_IFS="$IFS"; IFS=':'
333536 for my_dir in $my_dir_list; do
377580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
378581 fi
379582
380 $ECHO "X$my_tmpdir" | $Xsed
583 $ECHO "$my_tmpdir"
381584 }
382585
383586
391594 {
392595 case $1 in
393596 *[\\\`\"\$]*)
394 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
395598 *)
396599 func_quote_for_eval_unquoted_result="$1" ;;
397600 esac
418621 {
419622 case $1 in
420623 *[\\\`\"]*)
421 my_arg=`$ECHO "X$1" | $Xsed \
624 my_arg=`$ECHO "$1" | $SED \
422625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
423626 *)
424627 my_arg="$1" ;;
487690 fi
488691 }
489692
490
491
693 # func_tr_sh
694 # Turn $1 into a string suitable for a shell variable name.
695 # Result is stored in $func_tr_sh_result. All characters
696 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
697 # if $1 begins with a digit, a '_' is prepended as well.
698 func_tr_sh ()
699 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
492709
493710
494711 # func_version
495712 # Echo version message to standard output and exit.
496713 func_version ()
497714 {
498 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
499726 s/^# //
500727 s/^# *$//
501728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
508735 # Echo short help message to standard output and exit.
509736 func_usage ()
510737 {
511 $SED -n '/^# Usage:/,/# -h/ {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
512741 s/^# //
513742 s/^# *$//
514743 s/\$progname/'$progname'/
515744 p
516745 }' < "$progpath"
517 $ECHO
746 echo
518747 $ECHO "run \`$progname --help | more' for full usage"
519748 exit $?
520749 }
521750
522 # func_help
523 # Echo long help message to standard output and exit.
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
524754 func_help ()
525755 {
756 $opt_debug
757
526758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
527760 s/^# //
528761 s/^# *$//
529762 s*\$progname*'$progname'*
533766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
534767 s*\$LD*'"$LD"'*
535768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
536 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
537 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
538771 p
539 }' < "$progpath"
540 exit $?
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
541781 }
542782
543783 # func_missing_arg argname
545785 # exit_cmd.
546786 func_missing_arg ()
547787 {
548 func_error "missing argument for $1"
788 $opt_debug
789
790 func_error "missing argument for $1."
549791 exit_cmd=exit
550792 }
551793
794
795 # func_split_short_opt shortopt
796 # Set func_split_short_opt_name and func_split_short_opt_arg shell
797 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
552820 exit_cmd=:
553821
554822
555823
556824
557
558 # Check that we have a working $ECHO.
559 if test "X$1" = X--no-reexec; then
560 # Discard the --no-reexec flag, and continue.
561 shift
562 elif test "X$1" = X--fallback-echo; then
563 # Avoid inline document here, it may be left over
564 :
565 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
566 # Yippee, $ECHO works!
567 :
568 else
569 # Restart under the correct shell, and then maybe $ECHO will work.
570 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
571 fi
572
573 if test "X$1" = X--fallback-echo; then
574 # used as fallback echo
575 shift
576 cat <<EOF
577 $*
578 EOF
579 exit $EXIT_SUCCESS
580 fi
581825
582826 magic="%%%MAGIC variable%%%"
583827 magic_exe="%%%MAGIC EXE variable%%%"
584828
585829 # Global variables.
586 # $mode is unset
587830 nonopt=
588 execute_dlfiles=
589831 preserve_args=
590832 lo2o="s/\\.lo\$/.${objext}/"
591833 o2lo="s/\\.${objext}\$/.lo/"
592834 extracted_archives=
593835 extracted_serial=0
594836
595 opt_dry_run=false
596 opt_duplicate_deps=false
597 opt_silent=false
598 opt_debug=:
599
600837 # If this variable is set in any of the actions, the command in it
601838 # will be execed at the end. This prevents here-documents from being
602839 # left over by shells.
603840 exec_cmd=
604841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
605888 # func_fatal_configuration arg...
606889 # Echo program name prefixed message to standard error, followed by
607890 # a configuration failure hint, and exit.
635918 # Display the features supported by this script.
636919 func_features ()
637920 {
638 $ECHO "host: $host"
921 echo "host: $host"
639922 if test "$build_libtool_libs" = yes; then
640 $ECHO "enable shared libraries"
923 echo "enable shared libraries"
641924 else
642 $ECHO "disable shared libraries"
925 echo "disable shared libraries"
643926 fi
644927 if test "$build_old_libs" = yes; then
645 $ECHO "enable static libraries"
928 echo "enable static libraries"
646929 else
647 $ECHO "disable static libraries"
930 echo "disable static libraries"
648931 fi
649932
650933 exit $?
689972 fi
690973 ;;
691974 esac
692 }
693
694 # Parse options once, thoroughly. This comes as soon as possible in
695 # the script to make things like `libtool --version' happen quickly.
696 {
697
698 # Shorthand for --mode=foo, only valid as the first argument
699 case $1 in
700 clean|clea|cle|cl)
701 shift; set dummy --mode clean ${1+"$@"}; shift
702 ;;
703 compile|compil|compi|comp|com|co|c)
704 shift; set dummy --mode compile ${1+"$@"}; shift
705 ;;
706 execute|execut|execu|exec|exe|ex|e)
707 shift; set dummy --mode execute ${1+"$@"}; shift
708 ;;
709 finish|finis|fini|fin|fi|f)
710 shift; set dummy --mode finish ${1+"$@"}; shift
711 ;;
712 install|instal|insta|inst|ins|in|i)
713 shift; set dummy --mode install ${1+"$@"}; shift
714 ;;
715 link|lin|li|l)
716 shift; set dummy --mode link ${1+"$@"}; shift
717 ;;
718 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
719 shift; set dummy --mode uninstall ${1+"$@"}; shift
720 ;;
721 esac
722
723 # Parse non-mode specific arguments:
724 while test "$#" -gt 0; do
725 opt="$1"
726 shift
727
728 case $opt in
729 --config) func_config ;;
730
731 --debug) preserve_args="$preserve_args $opt"
732 func_echo "enabling shell trace mode"
733 opt_debug='set -x'
734 $opt_debug
735 ;;
736
737 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
738 execute_dlfiles="$execute_dlfiles $1"
739 shift
740 ;;
741
742 --dry-run | -n) opt_dry_run=: ;;
743 --features) func_features ;;
744 --finish) mode="finish" ;;
745
746 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
747 case $1 in
748 # Valid mode arguments:
749 clean) ;;
750 compile) ;;
751 execute) ;;
752 finish) ;;
753 install) ;;
754 link) ;;
755 relink) ;;
756 uninstall) ;;
757
758 # Catch anything else as an error
759 *) func_error "invalid argument for $opt"
760 exit_cmd=exit
761 break
762 ;;
763 esac
764
765 mode="$1"
766 shift
767 ;;
768
769 --preserve-dup-deps)
770 opt_duplicate_deps=: ;;
771
772 --quiet|--silent) preserve_args="$preserve_args $opt"
773 opt_silent=:
774 ;;
775
776 --verbose| -v) preserve_args="$preserve_args $opt"
777 opt_silent=false
778 ;;
779
780 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
781 preserve_args="$preserve_args $opt $1"
782 func_enable_tag "$1" # tagname is set here
783 shift
784 ;;
785
786 # Separate optargs to long options:
787 -dlopen=*|--mode=*|--tag=*)
788 func_opt_split "$opt"
789 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
790 shift
791 ;;
792
793 -\?|-h) func_usage ;;
794 --help) opt_help=: ;;
795 --version) func_version ;;
796
797 -*) func_fatal_help "unrecognized option \`$opt'" ;;
798
799 *) nonopt="$opt"
800 break
801 ;;
802 esac
803 done
804
805
806 case $host in
807 *cygwin* | *mingw* | *pw32* | *cegcc*)
808 # don't eliminate duplications in $postdeps and $predeps
809 opt_duplicate_compiler_generated_deps=:
810 ;;
811 *)
812 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
813 ;;
814 esac
815
816 # Having warned about all mis-specified options, bail out if
817 # anything was wrong.
818 $exit_cmd $EXIT_FAILURE
819975 }
820976
821977 # func_check_version_match
8541010 }
8551011
8561012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1167 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
1197 fi
1198
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
1219
1220
1221
8571222 ## ----------- ##
8581223 ## Main. ##
8591224 ## ----------- ##
860
861 $opt_help || {
862 # Sanity checks first:
863 func_check_version_match
864
865 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
866 func_fatal_configuration "not configured to build any kind of library"
867 fi
868
869 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
870
871
872 # Darwin sucks
873 eval std_shrext=\"$shrext_cmds\"
874
875
876 # Only execute mode is allowed to have -dlopen flags.
877 if test -n "$execute_dlfiles" && test "$mode" != execute; then
878 func_error "unrecognized option \`-dlopen'"
879 $ECHO "$help" 1>&2
880 exit $EXIT_FAILURE
881 fi
882
883 # Change the help message to a mode-specific one.
884 generic_help="$help"
885 help="Try \`$progname --help --mode=$mode' for more information."
886 }
887
8881225
8891226 # func_lalib_p file
8901227 # True iff FILE is a libtool `.la' library or `.lo' object file.
9491286 # temporary ltwrapper_script.
9501287 func_ltwrapper_scriptname ()
9511288 {
952 func_ltwrapper_scriptname_result=""
953 if func_ltwrapper_executable_p "$1"; then
954 func_dirname_and_basename "$1" "" "."
955 func_stripname '' '.exe' "$func_basename_result"
956 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
957 fi
1289 func_dirname_and_basename "$1" "" "."
1290 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
9581292 }
9591293
9601294 # func_ltwrapper_p file
10001334 }
10011335
10021336
1337 # func_resolve_sysroot PATH
1338 # Replace a leading = in PATH with a sysroot. Store the result into
1339 # func_resolve_sysroot_result
1340 func_resolve_sysroot ()
1341 {
1342 func_resolve_sysroot_result=$1
1343 case $func_resolve_sysroot_result in
1344 =*)
1345 func_stripname '=' '' "$func_resolve_sysroot_result"
1346 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1347 ;;
1348 esac
1349 }
1350
1351 # func_replace_sysroot PATH
1352 # If PATH begins with the sysroot, replace it with = and
1353 # store the result into func_replace_sysroot_result.
1354 func_replace_sysroot ()
1355 {
1356 case "$lt_sysroot:$1" in
1357 ?*:"$lt_sysroot"*)
1358 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
1360 ;;
1361 *)
1362 # Including no sysroot.
1363 func_replace_sysroot_result=$1
1364 ;;
1365 esac
1366 }
1367
10031368 # func_infer_tag arg
10041369 # Infer tagged configuration to use if any are available and
10051370 # if one wasn't chosen via the "--tag" command line option.
10121377 if test -n "$available_tags" && test -z "$tagname"; then
10131378 CC_quoted=
10141379 for arg in $CC; do
1015 func_quote_for_eval "$arg"
1016 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1380 func_append_quoted CC_quoted "$arg"
10171381 done
1382 CC_expanded=`func_echo_all $CC`
1383 CC_quoted_expanded=`func_echo_all $CC_quoted`
10181384 case $@ in
10191385 # Blanks in the command may have been stripped by the calling shell,
10201386 # but not from the CC environment variable when configure was run.
1021 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1387 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1388 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
10221389 # Blanks at the start of $base_compile will cause this to fail
10231390 # if we don't check for them as well.
10241391 *)
10291396 CC_quoted=
10301397 for arg in $CC; do
10311398 # Double-quote args containing other shell metacharacters.
1032 func_quote_for_eval "$arg"
1033 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1399 func_append_quoted CC_quoted "$arg"
10341400 done
1401 CC_expanded=`func_echo_all $CC`
1402 CC_quoted_expanded=`func_echo_all $CC_quoted`
10351403 case "$@ " in
1036 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1404 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1405 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
10371406 # The compiler in the base compile command matches
10381407 # the one in the tagged configuration.
10391408 # Assume this is the tagged configuration we want.
10961465 }
10971466 }
10981467
1468
1469 ##################################################
1470 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1471 ##################################################
1472
1473 # func_convert_core_file_wine_to_w32 ARG
1474 # Helper function used by file name conversion functions when $build is *nix,
1475 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1476 # correctly configured wine environment available, with the winepath program
1477 # in $build's $PATH.
1478 #
1479 # ARG is the $build file name to be converted to w32 format.
1480 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1481 # be empty on error (or when ARG is empty)
1482 func_convert_core_file_wine_to_w32 ()
1483 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
1486 if test -n "$1"; then
1487 # Unfortunately, winepath does not exit with a non-zero error code, so we
1488 # are forced to check the contents of stdout. On the other hand, if the
1489 # command is not found, the shell will set an exit code of 127 and print
1490 # *an error message* to stdout. So we must check for both error code of
1491 # zero AND non-empty stdout, which explains the odd construction:
1492 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1494 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
1496 else
1497 func_convert_core_file_wine_to_w32_result=
1498 fi
1499 fi
1500 }
1501 # end: func_convert_core_file_wine_to_w32
1502
1503
1504 # func_convert_core_path_wine_to_w32 ARG
1505 # Helper function used by path conversion functions when $build is *nix, and
1506 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1507 # configured wine environment available, with the winepath program in $build's
1508 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1509 #
1510 # ARG is path to be converted from $build format to win32.
1511 # Result is available in $func_convert_core_path_wine_to_w32_result.
1512 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1513 # are convertible, then the result may be empty.
1514 func_convert_core_path_wine_to_w32 ()
1515 {
1516 $opt_debug
1517 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
1519 if test -n "$1"; then
1520 oldIFS=$IFS
1521 IFS=:
1522 for func_convert_core_path_wine_to_w32_f in $1; do
1523 IFS=$oldIFS
1524 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1526 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1528 else
1529 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1530 fi
1531 fi
1532 done
1533 IFS=$oldIFS
1534 fi
1535 }
1536 # end: func_convert_core_path_wine_to_w32
1537
1538
1539 # func_cygpath ARGS...
1540 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1541 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1542 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1543 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1544 # file name or path is assumed to be in w32 format, as previously converted
1545 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1546 # or path in func_cygpath_result (input file name or path is assumed to be in
1547 # Cygwin format). Returns an empty string on error.
1548 #
1549 # ARGS are passed to cygpath, with the last one being the file name or path to
1550 # be converted.
1551 #
1552 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1553 # environment variable; do not put it in $PATH.
1554 func_cygpath ()
1555 {
1556 $opt_debug
1557 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1558 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1559 if test "$?" -ne 0; then
1560 # on failure, ensure result is empty
1561 func_cygpath_result=
1562 fi
1563 else
1564 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1566 fi
1567 }
1568 #end: func_cygpath
1569
1570
1571 # func_convert_core_msys_to_w32 ARG
1572 # Convert file name or path ARG from MSYS format to w32 format. Return
1573 # result in func_convert_core_msys_to_w32_result.
1574 func_convert_core_msys_to_w32 ()
1575 {
1576 $opt_debug
1577 # awkward: cmd appends spaces to result
1578 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1580 }
1581 #end: func_convert_core_msys_to_w32
1582
1583
1584 # func_convert_file_check ARG1 ARG2
1585 # Verify that ARG1 (a file name in $build format) was converted to $host
1586 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1587 # func_to_host_file_result to ARG1).
1588 func_convert_file_check ()
1589 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
1592 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
1594 func_error "Continuing, but uninstalled executables may not work."
1595 # Fallback:
1596 func_to_host_file_result="$1"
1597 fi
1598 }
1599 # end func_convert_file_check
1600
1601
1602 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1603 # Verify that FROM_PATH (a path in $build format) was converted to $host
1604 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1605 # func_to_host_file_result to a simplistic fallback value (see below).
1606 func_convert_path_check ()
1607 {
1608 $opt_debug
1609 if test -z "$4" && test -n "$3"; then
1610 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
1612 func_error "Continuing, but uninstalled executables may not work."
1613 # Fallback. This is a deliberately simplistic "conversion" and
1614 # should not be "improved". See libtool.info.
1615 if test "x$1" != "x$2"; then
1616 lt_replace_pathsep_chars="s|$1|$2|g"
1617 func_to_host_path_result=`echo "$3" |
1618 $SED -e "$lt_replace_pathsep_chars"`
1619 else
1620 func_to_host_path_result="$3"
1621 fi
1622 fi
1623 }
1624 # end func_convert_path_check
1625
1626
1627 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1628 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1629 # and appending REPL if ORIG matches BACKPAT.
1630 func_convert_path_front_back_pathsep ()
1631 {
1632 $opt_debug
1633 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1635 ;;
1636 esac
1637 case $4 in
1638 $2 ) func_append func_to_host_path_result "$3"
1639 ;;
1640 esac
1641 }
1642 # end func_convert_path_front_back_pathsep
1643
1644
1645 ##################################################
1646 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1647 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
1649 #
1650 # In each case, ARG is the path to be converted from $build to $host format.
1651 # Result will be available in $func_to_host_file_result.
1652
1653
1654 # func_to_host_file ARG
1655 # Converts the file name ARG from $build format to $host format. Return result
1656 # in func_to_host_file_result.
1657 func_to_host_file ()
1658 {
1659 $opt_debug
1660 $to_host_file_cmd "$1"
1661 }
1662 # end func_to_host_file
1663
1664
1665 # func_to_tool_file ARG LAZY
1666 # converts the file name ARG from $build format to toolchain format. Return
1667 # result in func_to_tool_file_result. If the conversion in use is listed
1668 # in (the comma separated) LAZY, no conversion takes place.
1669 func_to_tool_file ()
1670 {
1671 $opt_debug
1672 case ,$2, in
1673 *,"$to_tool_file_cmd",*)
1674 func_to_tool_file_result=$1
1675 ;;
1676 *)
1677 $to_tool_file_cmd "$1"
1678 func_to_tool_file_result=$func_to_host_file_result
1679 ;;
1680 esac
1681 }
1682 # end func_to_tool_file
1683
1684
1685 # func_convert_file_noop ARG
1686 # Copy ARG to func_to_host_file_result.
1687 func_convert_file_noop ()
1688 {
1689 func_to_host_file_result="$1"
1690 }
1691 # end func_convert_file_noop
1692
1693
1694 # func_convert_file_msys_to_w32 ARG
1695 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1696 # conversion to w32 is not available inside the cwrapper. Returns result in
1697 # func_to_host_file_result.
1698 func_convert_file_msys_to_w32 ()
1699 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
1702 if test -n "$1"; then
1703 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1705 fi
1706 func_convert_file_check "$1" "$func_to_host_file_result"
1707 }
1708 # end func_convert_file_msys_to_w32
1709
1710
1711 # func_convert_file_cygwin_to_w32 ARG
1712 # Convert file name ARG from Cygwin to w32 format. Returns result in
1713 # func_to_host_file_result.
1714 func_convert_file_cygwin_to_w32 ()
1715 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
1718 if test -n "$1"; then
1719 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1720 # LT_CYGPATH in this case.
1721 func_to_host_file_result=`cygpath -m "$1"`
1722 fi
1723 func_convert_file_check "$1" "$func_to_host_file_result"
1724 }
1725 # end func_convert_file_cygwin_to_w32
1726
1727
1728 # func_convert_file_nix_to_w32 ARG
1729 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1730 # and a working winepath. Returns result in func_to_host_file_result.
1731 func_convert_file_nix_to_w32 ()
1732 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
1735 if test -n "$1"; then
1736 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1738 fi
1739 func_convert_file_check "$1" "$func_to_host_file_result"
1740 }
1741 # end func_convert_file_nix_to_w32
1742
1743
1744 # func_convert_file_msys_to_cygwin ARG
1745 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1746 # Returns result in func_to_host_file_result.
1747 func_convert_file_msys_to_cygwin ()
1748 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
1751 if test -n "$1"; then
1752 func_convert_core_msys_to_w32 "$1"
1753 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
1755 fi
1756 func_convert_file_check "$1" "$func_to_host_file_result"
1757 }
1758 # end func_convert_file_msys_to_cygwin
1759
1760
1761 # func_convert_file_nix_to_cygwin ARG
1762 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1763 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1764 # in func_to_host_file_result.
1765 func_convert_file_nix_to_cygwin ()
1766 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
1769 if test -n "$1"; then
1770 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1771 func_convert_core_file_wine_to_w32 "$1"
1772 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
1774 fi
1775 func_convert_file_check "$1" "$func_to_host_file_result"
1776 }
1777 # end func_convert_file_nix_to_cygwin
1778
1779
1780 #############################################
1781 # $build to $host PATH CONVERSION FUNCTIONS #
1782 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
1784 #
1785 # In each case, ARG is the path to be converted from $build to $host format.
1786 # The result will be available in $func_to_host_path_result.
1787 #
1788 # Path separators are also converted from $build format to $host format. If
1789 # ARG begins or ends with a path separator character, it is preserved (but
1790 # converted to $host format) on output.
1791 #
1792 # All path conversion functions are named using the following convention:
1793 # file name conversion function : func_convert_file_X_to_Y ()
1794 # path conversion function : func_convert_path_X_to_Y ()
1795 # where, for any given $build/$host combination the 'X_to_Y' value is the
1796 # same. If conversion functions are added for new $build/$host combinations,
1797 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1798 # will break.
1799
1800
1801 # func_init_to_host_path_cmd
1802 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1803 # appropriate value, based on the value of $to_host_file_cmd.
1804 to_host_path_cmd=
1805 func_init_to_host_path_cmd ()
1806 {
1807 $opt_debug
1808 if test -z "$to_host_path_cmd"; then
1809 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1811 fi
1812 }
1813
1814
1815 # func_to_host_path ARG
1816 # Converts the path ARG from $build format to $host format. Return result
1817 # in func_to_host_path_result.
1818 func_to_host_path ()
1819 {
1820 $opt_debug
1821 func_init_to_host_path_cmd
1822 $to_host_path_cmd "$1"
1823 }
1824 # end func_to_host_path
1825
1826
1827 # func_convert_path_noop ARG
1828 # Copy ARG to func_to_host_path_result.
1829 func_convert_path_noop ()
1830 {
1831 func_to_host_path_result="$1"
1832 }
1833 # end func_convert_path_noop
1834
1835
1836 # func_convert_path_msys_to_w32 ARG
1837 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1838 # conversion to w32 is not available inside the cwrapper. Returns result in
1839 # func_to_host_path_result.
1840 func_convert_path_msys_to_w32 ()
1841 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
1844 if test -n "$1"; then
1845 # Remove leading and trailing path separator characters from ARG. MSYS
1846 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1847 # and winepath ignores them completely.
1848 func_stripname : : "$1"
1849 func_to_host_path_tmp1=$func_stripname_result
1850 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1852 func_convert_path_check : ";" \
1853 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1854 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1855 fi
1856 }
1857 # end func_convert_path_msys_to_w32
1858
1859
1860 # func_convert_path_cygwin_to_w32 ARG
1861 # Convert path ARG from Cygwin to w32 format. Returns result in
1862 # func_to_host_file_result.
1863 func_convert_path_cygwin_to_w32 ()
1864 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
1867 if test -n "$1"; then
1868 # See func_convert_path_msys_to_w32:
1869 func_stripname : : "$1"
1870 func_to_host_path_tmp1=$func_stripname_result
1871 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1872 func_convert_path_check : ";" \
1873 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1874 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1875 fi
1876 }
1877 # end func_convert_path_cygwin_to_w32
1878
1879
1880 # func_convert_path_nix_to_w32 ARG
1881 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1882 # a working winepath. Returns result in func_to_host_file_result.
1883 func_convert_path_nix_to_w32 ()
1884 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
1887 if test -n "$1"; then
1888 # See func_convert_path_msys_to_w32:
1889 func_stripname : : "$1"
1890 func_to_host_path_tmp1=$func_stripname_result
1891 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1893 func_convert_path_check : ";" \
1894 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1895 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1896 fi
1897 }
1898 # end func_convert_path_nix_to_w32
1899
1900
1901 # func_convert_path_msys_to_cygwin ARG
1902 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1903 # Returns result in func_to_host_file_result.
1904 func_convert_path_msys_to_cygwin ()
1905 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
1908 if test -n "$1"; then
1909 # See func_convert_path_msys_to_w32:
1910 func_stripname : : "$1"
1911 func_to_host_path_tmp1=$func_stripname_result
1912 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1913 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
1915 func_convert_path_check : : \
1916 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1917 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1918 fi
1919 }
1920 # end func_convert_path_msys_to_cygwin
1921
1922
1923 # func_convert_path_nix_to_cygwin ARG
1924 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1925 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1926 # func_to_host_file_result.
1927 func_convert_path_nix_to_cygwin ()
1928 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
1931 if test -n "$1"; then
1932 # Remove leading and trailing path separator characters from
1933 # ARG. msys behavior is inconsistent here, cygpath turns them
1934 # into '.;' and ';.', and winepath ignores them completely.
1935 func_stripname : : "$1"
1936 func_to_host_path_tmp1=$func_stripname_result
1937 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1938 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
1940 func_convert_path_check : : \
1941 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1942 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1943 fi
1944 }
1945 # end func_convert_path_nix_to_cygwin
1946
1947
10991948 # func_mode_compile arg...
11001949 func_mode_compile ()
11011950 {
11361985 ;;
11371986
11381987 -pie | -fpie | -fPIE)
1139 pie_flag="$pie_flag $arg"
1988 func_append pie_flag " $arg"
11401989 continue
11411990 ;;
11421991
11431992 -shared | -static | -prefer-pic | -prefer-non-pic)
1144 later="$later $arg"
1993 func_append later " $arg"
11451994 continue
11461995 ;;
11471996
11622011 save_ifs="$IFS"; IFS=','
11632012 for arg in $args; do
11642013 IFS="$save_ifs"
1165 func_quote_for_eval "$arg"
1166 lastarg="$lastarg $func_quote_for_eval_result"
2014 func_append_quoted lastarg "$arg"
11672015 done
11682016 IFS="$save_ifs"
11692017 func_stripname ' ' '' "$lastarg"
11702018 lastarg=$func_stripname_result
11712019
11722020 # Add the arguments to base_compile.
1173 base_compile="$base_compile $lastarg"
2021 func_append base_compile " $lastarg"
11742022 continue
11752023 ;;
11762024
11862034 esac # case $arg_mode
11872035
11882036 # Aesthetically quote the previous argument.
1189 func_quote_for_eval "$lastarg"
1190 base_compile="$base_compile $func_quote_for_eval_result"
2037 func_append_quoted base_compile "$lastarg"
11912038 done # for arg
11922039
11932040 case $arg_mode in
12122059 *.[cCFSifmso] | \
12132060 *.ada | *.adb | *.ads | *.asm | \
12142061 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1215 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
2062 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
12162063 func_xform "$libobj"
12172064 libobj=$func_xform_result
12182065 ;;
12872134 # Calculate the filename of the output object if compiler does
12882135 # not support -o with -c
12892136 if test "$compiler_c_o" = no; then
1290 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
12912138 lockfile="$output_obj.lock"
12922139 else
12932140 output_obj=
13182165 $opt_dry_run || $RM $removelist
13192166 exit $EXIT_FAILURE
13202167 fi
1321 removelist="$removelist $output_obj"
2168 func_append removelist " $output_obj"
13222169 $ECHO "$srcfile" > "$lockfile"
13232170 fi
13242171
13252172 $opt_dry_run || $RM $removelist
1326 removelist="$removelist $lockfile"
2173 func_append removelist " $lockfile"
13272174 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
13282175
1329 if test -n "$fix_srcfile_path"; then
1330 eval srcfile=\"$fix_srcfile_path\"
1331 fi
2176 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2177 srcfile=$func_to_tool_file_result
13322178 func_quote_for_eval "$srcfile"
13332179 qsrcfile=$func_quote_for_eval_result
13342180
13482194
13492195 if test -z "$output_obj"; then
13502196 # Place PIC objects in $objdir
1351 command="$command -o $lobj"
2197 func_append command " -o $lobj"
13522198 fi
13532199
13542200 func_show_eval_locale "$command" \
13952241 command="$base_compile $qsrcfile $pic_flag"
13962242 fi
13972243 if test "$compiler_c_o" = yes; then
1398 command="$command -o $obj"
2244 func_append command " -o $obj"
13992245 fi
14002246
14012247 # Suppress compiler output if we already did a PIC compilation.
1402 command="$command$suppress_output"
2248 func_append command "$suppress_output"
14032249 func_show_eval_locale "$command" \
14042250 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
14052251
14442290 }
14452291
14462292 $opt_help || {
1447 test "$mode" = compile && func_mode_compile ${1+"$@"}
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
14482294 }
14492295
14502296 func_mode_help ()
14512297 {
14522298 # We need to display help for each of the modes.
1453 case $mode in
2299 case $opt_mode in
14542300 "")
14552301 # Generic help is extracted from the usage comments
14562302 # at the start of this file.
14812327
14822328 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
14832329 -no-suppress do not suppress compiler output for multiple passes
1484 -prefer-pic try to building PIC objects only
1485 -prefer-non-pic try to building non-PIC objects only
2330 -prefer-pic try to build PIC objects only
2331 -prefer-non-pic try to build non-PIC objects only
14862332 -shared do not build a \`.o' file suitable for static linking
14872333 -static only build a \`.o' file suitable for static linking
2334 -Wc,FLAG pass FLAG directly to the compiler
14882335
14892336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
14902337 from the given SOURCEFILE.
15372384
15382385 The following components of INSTALL-COMMAND are treated specially:
15392386
1540 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2387 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
15412388
15422389 The rest of the components are interpreted as arguments to that command (only
15432390 BSD-compatible install options are recognized)."
15572404
15582405 -all-static do not do any dynamic linking at all
15592406 -avoid-version do not add a version suffix if possible
2407 -bindir BINDIR specify path to binaries directory (for systems where
2408 libraries must be found in the PATH setting at runtime)
15602409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
15612410 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
15622411 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
15852434 -version-info CURRENT[:REVISION[:AGE]]
15862435 specify library version info [each variable defaults to 0]
15872436 -weak LIBNAME declare that the target provides the LIBNAME interface
2437 -Wc,FLAG
2438 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2439 -Wl,FLAG
2440 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2441 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
15882442
15892443 All other options (arguments beginning with \`-') are ignored.
15902444
16182472 ;;
16192473
16202474 *)
1621 func_fatal_help "invalid operation mode \`$mode'"
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
16222476 ;;
16232477 esac
16242478
1625 $ECHO
2479 echo
16262480 $ECHO "Try \`$progname --help' for more information about other modes."
1627
1628 exit $?
1629 }
1630
1631 # Now that we've collected a possible --mode arg, show help if necessary
1632 $opt_help && func_mode_help
2481 }
2482
2483 # Now that we've collected a possible --mode arg, show help if necessary
2484 if $opt_help; then
2485 if test "$opt_help" = :; then
2486 func_mode_help
2487 else
2488 {
2489 func_help noexit
2490 for opt_mode in compile link execute install finish uninstall clean; do
2491 func_mode_help
2492 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2494 {
2495 func_help noexit
2496 for opt_mode in compile link execute install finish uninstall clean; do
2497 echo
2498 func_mode_help
2499 done
2500 } |
2501 sed '1d
2502 /^When reporting/,/^Report/{
2503 H
2504 d
2505 }
2506 $x
2507 /information about other modes/d
2508 /more detailed .*MODE/d
2509 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2510 fi
2511 exit $?
2512 fi
16332513
16342514
16352515 # func_mode_execute arg...
16422522 func_fatal_help "you must specify a COMMAND"
16432523
16442524 # Handle -dlopen flags immediately.
1645 for file in $execute_dlfiles; do
2525 for file in $opt_dlopen; do
16462526 test -f "$file" \
16472527 || func_fatal_help "\`$file' is not a file"
16482528
16492529 dir=
16502530 case $file in
16512531 *.la)
2532 func_resolve_sysroot "$file"
2533 file=$func_resolve_sysroot_result
2534
16522535 # Check to see that this really is a libtool archive.
16532536 func_lalib_unsafe_p "$file" \
16542537 || func_fatal_help "\`$lib' is not a valid libtool archive"
16702553 dir="$func_dirname_result"
16712554
16722555 if test -f "$dir/$objdir/$dlname"; then
1673 dir="$dir/$objdir"
2556 func_append dir "/$objdir"
16742557 else
16752558 if test ! -f "$dir/$dlname"; then
16762559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
17112594 for file
17122595 do
17132596 case $file in
1714 -*) ;;
2597 -* | *.la | *.lo ) ;;
17152598 *)
17162599 # Do a test to see if this is really a libtool program.
17172600 if func_ltwrapper_script_p "$file"; then
17272610 ;;
17282611 esac
17292612 # Quote arguments (to preserve shell metacharacters).
1730 func_quote_for_eval "$file"
1731 args="$args $func_quote_for_eval_result"
2613 func_append_quoted args "$file"
17322614 done
17332615
17342616 if test "X$opt_dry_run" = Xfalse; then
17532635 # Display what would be done.
17542636 if test -n "$shlibpath_var"; then
17552637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1756 $ECHO "export $shlibpath_var"
2638 echo "export $shlibpath_var"
17572639 fi
17582640 $ECHO "$cmd$args"
17592641 exit $EXIT_SUCCESS
17602642 fi
17612643 }
17622644
1763 test "$mode" = execute && func_mode_execute ${1+"$@"}
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
17642646
17652647
17662648 # func_mode_finish arg...
17672649 func_mode_finish ()
17682650 {
17692651 $opt_debug
1770 libdirs="$nonopt"
2652 libs=
2653 libdirs=
17712654 admincmds=
17722655
2656 for opt in "$nonopt" ${1+"$@"}
2657 do
2658 if test -d "$opt"; then
2659 func_append libdirs " $opt"
2660
2661 elif test -f "$opt"; then
2662 if func_lalib_unsafe_p "$opt"; then
2663 func_append libs " $opt"
2664 else
2665 func_warning "\`$opt' is not a valid libtool archive"
2666 fi
2667
2668 else
2669 func_fatal_error "invalid argument \`$opt'"
2670 fi
2671 done
2672
2673 if test -n "$libs"; then
2674 if test -n "$lt_sysroot"; then
2675 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2676 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2677 else
2678 sysroot_cmd=
2679 fi
2680
2681 # Remove sysroot references
2682 if $opt_dry_run; then
2683 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2685 done
2686 else
2687 tmpdir=`func_mktempdir`
2688 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2690 > $tmpdir/tmp-la
2691 mv -f $tmpdir/tmp-la $lib
2692 done
2693 ${RM}r "$tmpdir"
2694 fi
2695 fi
2696
17732697 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1774 for dir
1775 do
1776 libdirs="$libdirs $dir"
1777 done
1778
17792698 for libdir in $libdirs; do
17802699 if test -n "$finish_cmds"; then
17812700 # Do each command in the finish commands.
17852704 if test -n "$finish_eval"; then
17862705 # Do the single finish_eval.
17872706 eval cmds=\"$finish_eval\"
1788 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
2707 $opt_dry_run || eval "$cmds" || func_append admincmds "
17892708 $cmds"
17902709 fi
17912710 done
17942713 # Exit here if they wanted silent mode.
17952714 $opt_silent && exit $EXIT_SUCCESS
17962715
1797 $ECHO "X----------------------------------------------------------------------" | $Xsed
1798 $ECHO "Libraries have been installed in:"
1799 for libdir in $libdirs; do
1800 $ECHO " $libdir"
1801 done
1802 $ECHO
1803 $ECHO "If you ever happen to want to link against installed libraries"
1804 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1805 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1806 $ECHO "flag during linking and do at least one of the following:"
1807 if test -n "$shlibpath_var"; then
1808 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1809 $ECHO " during execution"
2716 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2717 echo "----------------------------------------------------------------------"
2718 echo "Libraries have been installed in:"
2719 for libdir in $libdirs; do
2720 $ECHO " $libdir"
2721 done
2722 echo
2723 echo "If you ever happen to want to link against installed libraries"
2724 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2726 echo "flag during linking and do at least one of the following:"
2727 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2729 echo " during execution"
2730 fi
2731 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2733 echo " during linking"
2734 fi
2735 if test -n "$hardcode_libdir_flag_spec"; then
2736 libdir=LIBDIR
2737 eval flag=\"$hardcode_libdir_flag_spec\"
2738
2739 $ECHO " - use the \`$flag' linker flag"
2740 fi
2741 if test -n "$admincmds"; then
2742 $ECHO " - have your system administrator run these commands:$admincmds"
2743 fi
2744 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2746 fi
2747 echo
2748
2749 echo "See any operating system documentation about shared libraries for"
2750 case $host in
2751 solaris2.[6789]|solaris2.1[0-9])
2752 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2753 echo "pages."
2754 ;;
2755 *)
2756 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2757 ;;
2758 esac
2759 echo "----------------------------------------------------------------------"
18102760 fi
1811 if test -n "$runpath_var"; then
1812 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1813 $ECHO " during linking"
1814 fi
1815 if test -n "$hardcode_libdir_flag_spec"; then
1816 libdir=LIBDIR
1817 eval flag=\"$hardcode_libdir_flag_spec\"
1818
1819 $ECHO " - use the \`$flag' linker flag"
1820 fi
1821 if test -n "$admincmds"; then
1822 $ECHO " - have your system administrator run these commands:$admincmds"
1823 fi
1824 if test -f /etc/ld.so.conf; then
1825 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1826 fi
1827 $ECHO
1828
1829 $ECHO "See any operating system documentation about shared libraries for"
1830 case $host in
1831 solaris2.[6789]|solaris2.1[0-9])
1832 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1833 $ECHO "pages."
1834 ;;
1835 *)
1836 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1837 ;;
1838 esac
1839 $ECHO "X----------------------------------------------------------------------" | $Xsed
18402761 exit $EXIT_SUCCESS
18412762 }
18422763
1843 test "$mode" = finish && func_mode_finish ${1+"$@"}
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
18442765
18452766
18462767 # func_mode_install arg...
18512772 # install_prog (especially on Windows NT).
18522773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
18532774 # Allow the use of GNU shtool's install command.
1854 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
18552776 # Aesthetically quote it.
18562777 func_quote_for_eval "$nonopt"
18572778 install_prog="$func_quote_for_eval_result "
18652786 # The real first argument should be the name of the installation program.
18662787 # Aesthetically quote it.
18672788 func_quote_for_eval "$arg"
1868 install_prog="$install_prog$func_quote_for_eval_result"
2789 func_append install_prog "$func_quote_for_eval_result"
2790 install_shared_prog=$install_prog
2791 case " $install_prog " in
2792 *[\\\ /]cp\ *) install_cp=: ;;
2793 *) install_cp=false ;;
2794 esac
18692795
18702796 # We need to accept at least all the BSD install flags.
18712797 dest=
18752801 install_type=
18762802 isdir=no
18772803 stripme=
2804 no_mode=:
18782805 for arg
18792806 do
2807 arg2=
18802808 if test -n "$dest"; then
1881 files="$files $dest"
2809 func_append files " $dest"
18822810 dest=$arg
18832811 continue
18842812 fi
18862814 case $arg in
18872815 -d) isdir=yes ;;
18882816 -f)
1889 case " $install_prog " in
1890 *[\\\ /]cp\ *) ;;
1891 *) prev=$arg ;;
1892 esac
2817 if $install_cp; then :; else
2818 prev=$arg
2819 fi
18932820 ;;
18942821 -g | -m | -o)
18952822 prev=$arg
19032830 *)
19042831 # If the previous option needed an argument, then skip it.
19052832 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2834 arg2=$install_override_mode
2835 no_mode=false
2836 fi
19062837 prev=
19072838 else
19082839 dest=$arg
19132844
19142845 # Aesthetically quote the argument.
19152846 func_quote_for_eval "$arg"
1916 install_prog="$install_prog $func_quote_for_eval_result"
2847 func_append install_prog " $func_quote_for_eval_result"
2848 if test -n "$arg2"; then
2849 func_quote_for_eval "$arg2"
2850 fi
2851 func_append install_shared_prog " $func_quote_for_eval_result"
19172852 done
19182853
19192854 test -z "$install_prog" && \
19212856
19222857 test -n "$prev" && \
19232858 func_fatal_help "the \`$prev' option requires an argument"
2859
2860 if test -n "$install_override_mode" && $no_mode; then
2861 if $install_cp; then :; else
2862 func_quote_for_eval "$install_override_mode"
2863 func_append install_shared_prog " -m $func_quote_for_eval_result"
2864 fi
2865 fi
19242866
19252867 if test -z "$files"; then
19262868 if test -z "$dest"; then
19762918 case $file in
19772919 *.$libext)
19782920 # Do the static libraries later.
1979 staticlibs="$staticlibs $file"
2921 func_append staticlibs " $file"
19802922 ;;
19812923
19822924 *.la)
2925 func_resolve_sysroot "$file"
2926 file=$func_resolve_sysroot_result
2927
19832928 # Check to see that this really is a libtool archive.
19842929 func_lalib_unsafe_p "$file" \
19852930 || func_fatal_help "\`$file' is not a valid libtool archive"
19932938 if test "X$destdir" = "X$libdir"; then
19942939 case "$current_libdirs " in
19952940 *" $libdir "*) ;;
1996 *) current_libdirs="$current_libdirs $libdir" ;;
2941 *) func_append current_libdirs " $libdir" ;;
19972942 esac
19982943 else
19992944 # Note the libdir as a future libdir.
20002945 case "$future_libdirs " in
20012946 *" $libdir "*) ;;
2002 *) future_libdirs="$future_libdirs $libdir" ;;
2947 *) func_append future_libdirs " $libdir" ;;
20032948 esac
20042949 fi
20052950
20062951 func_dirname "$file" "/" ""
20072952 dir="$func_dirname_result"
2008 dir="$dir$objdir"
2953 func_append dir "$objdir"
20092954
20102955 if test -n "$relink_command"; then
20112956 # Determine the prefix the user has applied to our future dir.
2012 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2957 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
20132958
20142959 # Don't allow the user to place us outside of our expected
20152960 # location b/c this prevents finding dependent libraries that
20222967
20232968 if test -n "$inst_prefix_dir"; then
20242969 # Stick the inst_prefix_dir data into the link command.
2025 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2970 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
20262971 else
2027 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2972 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
20282973 fi
20292974
20302975 func_warning "relinking \`$file'"
20422987 test -n "$relink_command" && srcname="$realname"T
20432988
20442989 # Install the shared library and build the symlinks.
2045 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2990 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
20462991 'exit $?'
20472992 tstripme="$stripme"
20482993 case $host_os in
20823027 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
20833028
20843029 # Maybe install the static library, too.
2085 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3030 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
20863031 ;;
20873032
20883033 *.lo)
21823127 if test -f "$lib"; then
21833128 func_source "$lib"
21843129 fi
2185 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
21863131 if test -n "$libdir" && test ! -f "$libfile"; then
21873132 func_warning "\`$lib' has not been installed in \`$libdir'"
21883133 finalize=no
22013146 file="$func_basename_result"
22023147 outputname="$tmpdir/$file"
22033148 # Replace the output file specification.
2204 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3149 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
22053150
22063151 $opt_silent || {
22073152 func_quote_for_expand "$relink_command"
22203165 }
22213166 else
22223167 # Install the binary that we compiled earlier.
2223 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3168 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
22243169 fi
22253170 fi
22263171
22563201
22573202 # Set up the ranlib parameters.
22583203 oldlib="$destdir/$name"
3204 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3205 tool_oldlib=$func_to_tool_file_result
22593206
22603207 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
22613208
22623209 if test -n "$stripme" && test -n "$old_striplib"; then
2263 func_show_eval "$old_striplib $oldlib" 'exit $?'
3210 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
22643211 fi
22653212
22663213 # Do each command in the postinstall commands.
22793226 fi
22803227 }
22813228
2282 test "$mode" = install && func_mode_install ${1+"$@"}
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
22833230
22843231
22853232 # func_generate_dlsyms outputname originator pic_p
23223269 extern \"C\" {
23233270 #endif
23243271
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3273 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3274 #endif
3275
3276 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3279 relocations are performed -- see ld's documentation on pseudo-relocs. */
3280 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
3282 /* This system does not cope well with relocations in const data. */
3283 # define LT_DLSYM_CONST
3284 #else
3285 # define LT_DLSYM_CONST const
3286 #endif
3287
23253288 /* External symbol declarations for the compiler. */\
23263289 "
23273290
23313294 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
23323295
23333296 # Add our own program objects to the symbol list.
2334 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3297 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
23353298 for progfile in $progfiles; do
2336 func_verbose "extracting global C symbols from \`$progfile'"
2337 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3299 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3301 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
23383302 done
23393303
23403304 if test -n "$exclude_expsyms"; then
23703334 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
23713335 eval '$MV "$nlist"T "$nlist"'
23723336 case $host in
2373 *cygwin | *mingw* | *cegcc* )
3337 *cygwin* | *mingw* | *cegcc* )
23743338 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
23753339 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
23763340 ;;
23833347 func_verbose "extracting global C symbols from \`$dlprefile'"
23843348 func_basename "$dlprefile"
23853349 name="$func_basename_result"
2386 $opt_dry_run || {
2387 eval '$ECHO ": $name " >> "$nlist"'
2388 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2389 }
3350 case $host in
3351 *cygwin* | *mingw* | *cegcc* )
3352 # if an import library, we need to obtain dlname
3353 if func_win32_import_lib_p "$dlprefile"; then
3354 func_tr_sh "$dlprefile"
3355 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
3357 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3358 # Use subshell, to avoid clobbering current variable values
3359 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
3361 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
3363 else
3364 # no lafile. user explicitly requested -dlpreopen <import library>.
3365 $sharedlib_from_linklib_cmd "$dlprefile"
3366 dlprefile_dlbasename=$sharedlib_from_linklib_result
3367 fi
3368 fi
3369 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
3371 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3372 else
3373 func_warning "Could not compute DLL name from $name"
3374 eval '$ECHO ": $name " >> "$nlist"'
3375 fi
3376 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3377 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3378 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3379 }
3380 else # not an import lib
3381 $opt_dry_run || {
3382 eval '$ECHO ": $name " >> "$nlist"'
3383 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3384 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3385 }
3386 fi
3387 ;;
3388 *)
3389 $opt_dry_run || {
3390 eval '$ECHO ": $name " >> "$nlist"'
3391 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3392 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3393 }
3394 ;;
3395 esac
23903396 done
23913397
23923398 $opt_dry_run || {
24143420 if test -f "$nlist"S; then
24153421 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
24163422 else
2417 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
3423 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
24183424 fi
24193425
2420 $ECHO >> "$output_objdir/$my_dlsyms" "\
3426 echo >> "$output_objdir/$my_dlsyms" "\
24213427
24223428 /* The mapping between symbol names and symbols. */
24233429 typedef struct {
24243430 const char *name;
24253431 void *address;
24263432 } lt_dlsymlist;
2427 "
2428 case $host in
2429 *cygwin* | *mingw* | *cegcc* )
2430 $ECHO >> "$output_objdir/$my_dlsyms" "\
2431 /* DATA imports from DLLs on WIN32 con't be const, because
2432 runtime relocations are performed -- see ld's documentation
2433 on pseudo-relocs. */"
2434 lt_dlsym_const= ;;
2435 *osf5*)
2436 echo >> "$output_objdir/$my_dlsyms" "\
2437 /* This system does not cope well with relocations in const data */"
2438 lt_dlsym_const= ;;
2439 *)
2440 lt_dlsym_const=const ;;
2441 esac
2442
2443 $ECHO >> "$output_objdir/$my_dlsyms" "\
2444 extern $lt_dlsym_const lt_dlsymlist
3433 extern LT_DLSYM_CONST lt_dlsymlist
24453434 lt_${my_prefix}_LTX_preloaded_symbols[];
2446 $lt_dlsym_const lt_dlsymlist
3435 LT_DLSYM_CONST lt_dlsymlist
24473436 lt_${my_prefix}_LTX_preloaded_symbols[] =
24483437 {\
24493438 { \"$my_originator\", (void *) 0 },"
24563445 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
24573446 ;;
24583447 esac
2459 $ECHO >> "$output_objdir/$my_dlsyms" "\
3448 echo >> "$output_objdir/$my_dlsyms" "\
24603449 {0, (void *) 0}
24613450 };
24623451
24833472 # linked before any other PIC object. But we must not use
24843473 # pic_flag when linking with -static. The problem exists in
24853474 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2486 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3475 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
24873476 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
24883477 *-*-hpux*)
24893478 pic_flag_for_symtable=" $pic_flag" ;;
24993488 for arg in $LTCFLAGS; do
25003489 case $arg in
25013490 -pie | -fpie | -fPIE) ;;
2502 *) symtab_cflags="$symtab_cflags $arg" ;;
3491 *) func_append symtab_cflags " $arg" ;;
25033492 esac
25043493 done
25053494
25143503 case $host in
25153504 *cygwin* | *mingw* | *cegcc* )
25163505 if test -f "$output_objdir/$my_outputname.def"; then
2517 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2518 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3506 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3507 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
25193508 else
2520 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2521 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3509 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3510 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25223511 fi
25233512 ;;
25243513 *)
2525 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2526 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3514 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3515 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25273516 ;;
25283517 esac
25293518 ;;
25373526 # really was required.
25383527
25393528 # Nullify the symbol file.
2540 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2541 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3529 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3530 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
25423531 fi
25433532 }
25443533
25483537 # Need a lot of goo to handle *both* DLLs and import libs
25493538 # Has to be a shell function in order to 'eat' the argument
25503539 # that is supplied when $file_magic_command is called.
3540 # Despite the name, also deal with 64 bit binaries.
25513541 func_win32_libid ()
25523542 {
25533543 $opt_debug
25583548 win32_libid_type="x86 archive import"
25593549 ;;
25603550 *ar\ archive*) # could be an import, or static
3551 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
25613552 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2562 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2563 win32_nmres=`eval $NM -f posix -A $1 |
3553 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
25643556 $SED -n -e '
25653557 1,100{
25663558 / I /{
25893581 $ECHO "$win32_libid_type"
25903582 }
25913583
3584 # func_cygming_dll_for_implib ARG
3585 #
3586 # Platform-specific function to extract the
3587 # name of the DLL associated with the specified
3588 # import library ARG.
3589 # Invoked by eval'ing the libtool variable
3590 # $sharedlib_from_linklib_cmd
3591 # Result is available in the variable
3592 # $sharedlib_from_linklib_result
3593 func_cygming_dll_for_implib ()
3594 {
3595 $opt_debug
3596 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3597 }
3598
3599 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3600 #
3601 # The is the core of a fallback implementation of a
3602 # platform-specific function to extract the name of the
3603 # DLL associated with the specified import library LIBNAME.
3604 #
3605 # SECTION_NAME is either .idata$6 or .idata$7, depending
3606 # on the platform and compiler that created the implib.
3607 #
3608 # Echos the name of the DLL associated with the
3609 # specified import library.
3610 func_cygming_dll_for_implib_fallback_core ()
3611 {
3612 $opt_debug
3613 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3614 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3615 $SED '/^Contents of section '"$match_literal"':/{
3616 # Place marker at beginning of archive member dllname section
3617 s/.*/====MARK====/
3618 p
3619 d
3620 }
3621 # These lines can sometimes be longer than 43 characters, but
3622 # are always uninteresting
3623 /:[ ]*file format pe[i]\{,1\}-/d
3624 /^In archive [^:]*:/d
3625 # Ensure marker is printed
3626 /^====MARK====/p
3627 # Remove all lines with less than 43 characters
3628 /^.\{43\}/!d
3629 # From remaining lines, remove first 43 characters
3630 s/^.\{43\}//' |
3631 $SED -n '
3632 # Join marker and all lines until next marker into a single line
3633 /^====MARK====/ b para
3634 H
3635 $ b para
3636 b
3637 :para
3638 x
3639 s/\n//g
3640 # Remove the marker
3641 s/^====MARK====//
3642 # Remove trailing dots and whitespace
3643 s/[\. \t]*$//
3644 # Print
3645 /./p' |
3646 # we now have a list, one entry per line, of the stringified
3647 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
3650 # a '.' (that is, objdump's representation of an unprintable
3651 # character.) This should work for all archives with less than
3652 # 0x302f exports -- but will fail for DLLs whose name actually
3653 # begins with a literal '.' or a single character followed by
3654 # a '.'.
3655 #
3656 # Of those that remain, print the first one.
3657 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 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)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
3682 }
3683
3684 # func_cygming_dll_for_implib_fallback ARG
3685 # Platform-specific function to extract the
3686 # name of the DLL associated with the specified
3687 # import library ARG.
3688 #
3689 # This fallback implementation is for use when $DLLTOOL
3690 # does not support the --identify-strict option.
3691 # Invoked by eval'ing the libtool variable
3692 # $sharedlib_from_linklib_cmd
3693 # Result is available in the variable
3694 # $sharedlib_from_linklib_result
3695 func_cygming_dll_for_implib_fallback ()
3696 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
3699 # binutils import library
3700 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
3702 # ms-generated import library
3703 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3704 else
3705 # unknown
3706 sharedlib_from_linklib_result=""
3707 fi
3708 }
25923709
25933710
25943711 # func_extract_an_archive dir oldlib
25973714 $opt_debug
25983715 f_ex_an_ar_dir="$1"; shift
25993716 f_ex_an_ar_oldlib="$1"
2600 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
3717 if test "$lock_old_archive_extraction" = yes; then
3718 lockfile=$f_ex_an_ar_oldlib.lock
3719 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3720 func_echo "Waiting for $lockfile to be removed"
3721 sleep 2
3722 done
3723 fi
3724 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3725 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
3727 $opt_dry_run || rm -f "$lockfile"
3728 fi
26013729 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
26023730 :
26033731 else
26683796 darwin_file=
26693797 darwin_files=
26703798 for darwin_file in $darwin_filelist; do
2671 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
3799 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
26723800 $LIPO -create -output "$darwin_file" $darwin_files
26733801 done # $darwin_filelist
26743802 $RM -rf unfat-$$
26833811 func_extract_an_archive "$my_xdir" "$my_xabs"
26843812 ;;
26853813 esac
2686 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3814 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
26873815 done
26883816
26893817 func_extract_archives_result="$my_oldobjs"
26903818 }
2691
2692
2693
2694 # func_emit_wrapper_part1 [arg=no]
2695 #
2696 # Emit the first part of a libtool wrapper script on stdout.
2697 # For more information, see the description associated with
2698 # func_emit_wrapper(), below.
2699 func_emit_wrapper_part1 ()
2700 {
2701 func_emit_wrapper_part1_arg1=no
2702 if test -n "$1" ; then
2703 func_emit_wrapper_part1_arg1=$1
2704 fi
2705
2706 $ECHO "\
2707 #! $SHELL
2708
2709 # $output - temporary wrapper script for $objdir/$outputname
2710 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2711 #
2712 # The $output program cannot be directly executed until all the libtool
2713 # libraries that it depends on are installed.
2714 #
2715 # This wrapper script should never be moved out of the build directory.
2716 # If it is, it will not operate correctly.
2717
2718 # Sed substitution that helps us do robust quoting. It backslashifies
2719 # metacharacters that are still active within double-quoted strings.
2720 Xsed='${SED} -e 1s/^X//'
2721 sed_quote_subst='$sed_quote_subst'
2722
2723 # Be Bourne compatible
2724 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2725 emulate sh
2726 NULLCMD=:
2727 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2728 # is contrary to our usage. Disable this feature.
2729 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2730 setopt NO_GLOB_SUBST
2731 else
2732 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2733 fi
2734 BIN_SH=xpg4; export BIN_SH # for Tru64
2735 DUALCASE=1; export DUALCASE # for MKS sh
2736
2737 # The HP-UX ksh and POSIX shell print the target directory to stdout
2738 # if CDPATH is set.
2739 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2740
2741 relink_command=\"$relink_command\"
2742
2743 # This environment variable determines our operation mode.
2744 if test \"\$libtool_install_magic\" = \"$magic\"; then
2745 # install mode needs the following variables:
2746 generated_by_libtool_version='$macro_version'
2747 notinst_deplibs='$notinst_deplibs'
2748 else
2749 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2750 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2751 ECHO=\"$qecho\"
2752 file=\"\$0\"
2753 # Make sure echo works.
2754 if test \"X\$1\" = X--no-reexec; then
2755 # Discard the --no-reexec flag, and continue.
2756 shift
2757 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2758 # Yippee, \$ECHO works!
2759 :
2760 else
2761 # Restart under the correct shell, and then maybe \$ECHO will work.
2762 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2763 fi
2764 fi\
2765 "
2766 $ECHO "\
2767
2768 # Find the directory that this script lives in.
2769 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2770 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2771
2772 # Follow symbolic links until we get to the real thisdir.
2773 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2774 while test -n \"\$file\"; do
2775 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2776
2777 # If there was a directory component, then change thisdir.
2778 if test \"x\$destdir\" != \"x\$file\"; then
2779 case \"\$destdir\" in
2780 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2781 *) thisdir=\"\$thisdir/\$destdir\" ;;
2782 esac
2783 fi
2784
2785 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2786 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2787 done
2788 "
2789 }
2790 # end: func_emit_wrapper_part1
2791
2792 # func_emit_wrapper_part2 [arg=no]
2793 #
2794 # Emit the second part of a libtool wrapper script on stdout.
2795 # For more information, see the description associated with
2796 # func_emit_wrapper(), below.
2797 func_emit_wrapper_part2 ()
2798 {
2799 func_emit_wrapper_part2_arg1=no
2800 if test -n "$1" ; then
2801 func_emit_wrapper_part2_arg1=$1
2802 fi
2803
2804 $ECHO "\
2805
2806 # Usually 'no', except on cygwin/mingw when embedded into
2807 # the cwrapper.
2808 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2809 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2810 # special case for '.'
2811 if test \"\$thisdir\" = \".\"; then
2812 thisdir=\`pwd\`
2813 fi
2814 # remove .libs from thisdir
2815 case \"\$thisdir\" in
2816 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2817 $objdir ) thisdir=. ;;
2818 esac
2819 fi
2820
2821 # Try to get the absolute directory name.
2822 absdir=\`cd \"\$thisdir\" && pwd\`
2823 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2824 "
2825
2826 if test "$fast_install" = yes; then
2827 $ECHO "\
2828 program=lt-'$outputname'$exeext
2829 progdir=\"\$thisdir/$objdir\"
2830
2831 if test ! -f \"\$progdir/\$program\" ||
2832 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2833 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2834
2835 file=\"\$\$-\$program\"
2836
2837 if test ! -d \"\$progdir\"; then
2838 $MKDIR \"\$progdir\"
2839 else
2840 $RM \"\$progdir/\$file\"
2841 fi"
2842
2843 $ECHO "\
2844
2845 # relink executable if necessary
2846 if test -n \"\$relink_command\"; then
2847 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2848 else
2849 $ECHO \"\$relink_command_output\" >&2
2850 $RM \"\$progdir/\$file\"
2851 exit 1
2852 fi
2853 fi
2854
2855 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2856 { $RM \"\$progdir/\$program\";
2857 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2858 $RM \"\$progdir/\$file\"
2859 fi"
2860 else
2861 $ECHO "\
2862 program='$outputname'
2863 progdir=\"\$thisdir/$objdir\"
2864 "
2865 fi
2866
2867 $ECHO "\
2868
2869 if test -f \"\$progdir/\$program\"; then"
2870
2871 # Export our shlibpath_var if we have one.
2872 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2873 $ECHO "\
2874 # Add our own library path to $shlibpath_var
2875 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2876
2877 # Some systems cannot cope with colon-terminated $shlibpath_var
2878 # The second colon is a workaround for a bug in BeOS R4 sed
2879 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2880
2881 export $shlibpath_var
2882 "
2883 fi
2884
2885 # fixup the dll searchpath if we need to.
2886 if test -n "$dllsearchpath"; then
2887 $ECHO "\
2888 # Add the dll search path components to the executable PATH
2889 PATH=$dllsearchpath:\$PATH
2890 "
2891 fi
2892
2893 $ECHO "\
2894 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2895 # Run the actual program with our arguments.
2896 "
2897 case $host in
2898 # Backslashes separate directories on plain windows
2899 *-*-mingw | *-*-os2* | *-cegcc*)
2900 $ECHO "\
2901 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2902 "
2903 ;;
2904
2905 *)
2906 $ECHO "\
2907 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2908 "
2909 ;;
2910 esac
2911 $ECHO "\
2912 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2913 exit 1
2914 fi
2915 else
2916 # The program doesn't exist.
2917 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2918 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2919 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2920 exit 1
2921 fi
2922 fi\
2923 "
2924 }
2925 # end: func_emit_wrapper_part2
29263819
29273820
29283821 # func_emit_wrapper [arg=no]
29413834 # behavior.
29423835 func_emit_wrapper ()
29433836 {
2944 func_emit_wrapper_arg1=no
2945 if test -n "$1" ; then
2946 func_emit_wrapper_arg1=$1
2947 fi
2948
2949 # split this up so that func_emit_cwrapperexe_src
2950 # can call each part independently.
2951 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2952 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2953 }
2954
2955
2956 # func_to_host_path arg
3837 func_emit_wrapper_arg1=${1-no}
3838
3839 $ECHO "\
3840 #! $SHELL
3841
3842 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
29573844 #
2958 # Convert paths to host format when used with build tools.
2959 # Intended for use with "native" mingw (where libtool itself
2960 # is running under the msys shell), or in the following cross-
2961 # build environments:
2962 # $build $host
2963 # mingw (msys) mingw [e.g. native]
2964 # cygwin mingw
2965 # *nix + wine mingw
2966 # where wine is equipped with the `winepath' executable.
2967 # In the native mingw case, the (msys) shell automatically
2968 # converts paths for any non-msys applications it launches,
2969 # but that facility isn't available from inside the cwrapper.
2970 # Similar accommodations are necessary for $host mingw and
2971 # $build cygwin. Calling this function does no harm for other
2972 # $host/$build combinations not listed above.
3845 # The $output program cannot be directly executed until all the libtool
3846 # libraries that it depends on are installed.
29733847 #
2974 # ARG is the path (on $build) that should be converted to
2975 # the proper representation for $host. The result is stored
2976 # in $func_to_host_path_result.
2977 func_to_host_path ()
2978 {
2979 func_to_host_path_result="$1"
2980 if test -n "$1" ; then
2981 case $host in
2982 *mingw* )
2983 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2984 case $build in
2985 *mingw* ) # actually, msys
2986 # awkward: cmd appends spaces to result
2987 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2988 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2989 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2990 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2991 $SED -e "$lt_sed_naive_backslashify"`
2992 ;;
2993 *cygwin* )
2994 func_to_host_path_tmp1=`cygpath -w "$1"`
2995 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2996 $SED -e "$lt_sed_naive_backslashify"`
2997 ;;
2998 * )
2999 # Unfortunately, winepath does not exit with a non-zero
3000 # error code, so we are forced to check the contents of
3001 # stdout. On the other hand, if the command is not
3002 # found, the shell will set an exit code of 127 and print
3003 # *an error message* to stdout. So we must check for both
3004 # error code of zero AND non-empty stdout, which explains
3005 # the odd construction:
3006 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3007 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3008 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3009 $SED -e "$lt_sed_naive_backslashify"`
3010 else
3011 # Allow warning below.
3012 func_to_host_path_result=""
3013 fi
3014 ;;
3015 esac
3016 if test -z "$func_to_host_path_result" ; then
3017 func_error "Could not determine host path corresponding to"
3018 func_error " '$1'"
3019 func_error "Continuing, but uninstalled executables may not work."
3020 # Fallback:
3021 func_to_host_path_result="$1"
3022 fi
3023 ;;
3848 # This wrapper script should never be moved out of the build directory.
3849 # If it is, it will not operate correctly.
3850
3851 # Sed substitution that helps us do robust quoting. It backslashifies
3852 # metacharacters that are still active within double-quoted strings.
3853 sed_quote_subst='$sed_quote_subst'
3854
3855 # Be Bourne compatible
3856 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3857 emulate sh
3858 NULLCMD=:
3859 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3860 # is contrary to our usage. Disable this feature.
3861 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3862 setopt NO_GLOB_SUBST
3863 else
3864 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3865 fi
3866 BIN_SH=xpg4; export BIN_SH # for Tru64
3867 DUALCASE=1; export DUALCASE # for MKS sh
3868
3869 # The HP-UX ksh and POSIX shell print the target directory to stdout
3870 # if CDPATH is set.
3871 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3872
3873 relink_command=\"$relink_command\"
3874
3875 # This environment variable determines our operation mode.
3876 if test \"\$libtool_install_magic\" = \"$magic\"; then
3877 # install mode needs the following variables:
3878 generated_by_libtool_version='$macro_version'
3879 notinst_deplibs='$notinst_deplibs'
3880 else
3881 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3882 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3883 file=\"\$0\""
3884
3885 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3886 $ECHO "\
3887
3888 # A function that is used when there is no print builtin or printf.
3889 func_fallback_echo ()
3890 {
3891 eval 'cat <<_LTECHO_EOF
3892 \$1
3893 _LTECHO_EOF'
3894 }
3895 ECHO=\"$qECHO\"
3896 fi
3897
3898 # Very basic option parsing. These options are (a) specific to
3899 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
3901 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
3903 # this pattern).
3904 #
3905 # There are only two supported options: --lt-debug and
3906 # --lt-dump-script. There is, deliberately, no --lt-help.
3907 #
3908 # The first argument to this parsing function should be the
3909 # script's $0 value, followed by "$@".
3910 lt_option_debug=
3911 func_parse_lt_options ()
3912 {
3913 lt_script_arg0=\$0
3914 shift
3915 for lt_opt
3916 do
3917 case \"\$lt_opt\" in
3918 --lt-debug) lt_option_debug=1 ;;
3919 --lt-dump-script)
3920 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3921 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3922 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3923 cat \"\$lt_dump_D/\$lt_dump_F\"
3924 exit 0
3925 ;;
3926 --lt-*)
3927 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3928 exit 1
3929 ;;
3930 esac
3931 done
3932
3933 # Print the debug banner immediately:
3934 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3936 fi
3937 }
3938
3939 # Used when --lt-debug. Prints its arguments to stdout
3940 # (redirection is the responsibility of the caller)
3941 func_lt_dump_args ()
3942 {
3943 lt_dump_args_N=1;
3944 for lt_arg
3945 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3947 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3948 done
3949 }
3950
3951 # Core function for launching the target application
3952 func_exec_program_core ()
3953 {
3954 "
3955 case $host in
3956 # Backslashes separate directories on plain windows
3957 *-*-mingw | *-*-os2* | *-cegcc*)
3958 $ECHO "\
3959 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3961 func_lt_dump_args \${1+\"\$@\"} 1>&2
3962 fi
3963 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3964 "
3965 ;;
3966
3967 *)
3968 $ECHO "\
3969 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3971 func_lt_dump_args \${1+\"\$@\"} 1>&2
3972 fi
3973 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3974 "
3975 ;;
3976 esac
3977 $ECHO "\
3978 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3979 exit 1
3980 }
3981
3982 # A function to encapsulate launching the target application
3983 # Strips options in the --lt-* namespace from \$@ and
3984 # launches target application with the remaining arguments.
3985 func_exec_program ()
3986 {
3987 case \" \$* \" in
3988 *\\ --lt-*)
3989 for lt_wr_arg
3990 do
3991 case \$lt_wr_arg in
3992 --lt-*) ;;
3993 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3994 esac
3995 shift
3996 done ;;
3997 esac
3998 func_exec_program_core \${1+\"\$@\"}
3999 }
4000
4001 # Parse options
4002 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4003
4004 # Find the directory that this script lives in.
4005 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4006 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4007
4008 # Follow symbolic links until we get to the real thisdir.
4009 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4010 while test -n \"\$file\"; do
4011 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4012
4013 # If there was a directory component, then change thisdir.
4014 if test \"x\$destdir\" != \"x\$file\"; then
4015 case \"\$destdir\" in
4016 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4017 *) thisdir=\"\$thisdir/\$destdir\" ;;
4018 esac
4019 fi
4020
4021 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4022 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4023 done
4024
4025 # Usually 'no', except on cygwin/mingw when embedded into
4026 # the cwrapper.
4027 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4028 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4029 # special case for '.'
4030 if test \"\$thisdir\" = \".\"; then
4031 thisdir=\`pwd\`
4032 fi
4033 # remove .libs from thisdir
4034 case \"\$thisdir\" in
4035 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4036 $objdir ) thisdir=. ;;
30244037 esac
30254038 fi
3026 }
3027 # end: func_to_host_path
3028
3029 # func_to_host_pathlist arg
3030 #
3031 # Convert pathlists to host format when used with build tools.
3032 # See func_to_host_path(), above. This function supports the
3033 # following $build/$host combinations (but does no harm for
3034 # combinations not listed here):
3035 # $build $host
3036 # mingw (msys) mingw [e.g. native]
3037 # cygwin mingw
3038 # *nix + wine mingw
3039 #
3040 # Path separators are also converted from $build format to
3041 # $host format. If ARG begins or ends with a path separator
3042 # character, it is preserved (but converted to $host format)
3043 # on output.
3044 #
3045 # ARG is a pathlist (on $build) that should be converted to
3046 # the proper representation on $host. The result is stored
3047 # in $func_to_host_pathlist_result.
3048 func_to_host_pathlist ()
3049 {
3050 func_to_host_pathlist_result="$1"
3051 if test -n "$1" ; then
3052 case $host in
3053 *mingw* )
3054 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3055 # Remove leading and trailing path separator characters from
3056 # ARG. msys behavior is inconsistent here, cygpath turns them
3057 # into '.;' and ';.', and winepath ignores them completely.
3058 func_to_host_pathlist_tmp2="$1"
3059 # Once set for this call, this variable should not be
3060 # reassigned. It is used in tha fallback case.
3061 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3062 $SED -e 's|^:*||' -e 's|:*$||'`
3063 case $build in
3064 *mingw* ) # Actually, msys.
3065 # Awkward: cmd appends spaces to result.
3066 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3067 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3068 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3069 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3070 $SED -e "$lt_sed_naive_backslashify"`
3071 ;;
3072 *cygwin* )
3073 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3074 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3075 $SED -e "$lt_sed_naive_backslashify"`
3076 ;;
3077 * )
3078 # unfortunately, winepath doesn't convert pathlists
3079 func_to_host_pathlist_result=""
3080 func_to_host_pathlist_oldIFS=$IFS
3081 IFS=:
3082 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3083 IFS=$func_to_host_pathlist_oldIFS
3084 if test -n "$func_to_host_pathlist_f" ; then
3085 func_to_host_path "$func_to_host_pathlist_f"
3086 if test -n "$func_to_host_path_result" ; then
3087 if test -z "$func_to_host_pathlist_result" ; then
3088 func_to_host_pathlist_result="$func_to_host_path_result"
3089 else
3090 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3091 fi
3092 fi
3093 fi
3094 IFS=:
3095 done
3096 IFS=$func_to_host_pathlist_oldIFS
3097 ;;
3098 esac
3099 if test -z "$func_to_host_pathlist_result" ; then
3100 func_error "Could not determine the host path(s) corresponding to"
3101 func_error " '$1'"
3102 func_error "Continuing, but uninstalled executables may not work."
3103 # Fallback. This may break if $1 contains DOS-style drive
3104 # specifications. The fix is not to complicate the expression
3105 # below, but for the user to provide a working wine installation
3106 # with winepath so that path translation in the cross-to-mingw
3107 # case works properly.
3108 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3109 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3110 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3111 fi
3112 # Now, add the leading and trailing path separators back
3113 case "$1" in
3114 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3115 ;;
3116 esac
3117 case "$1" in
3118 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3119 ;;
3120 esac
3121 ;;
3122 esac
4039
4040 # Try to get the absolute directory name.
4041 absdir=\`cd \"\$thisdir\" && pwd\`
4042 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4043 "
4044
4045 if test "$fast_install" = yes; then
4046 $ECHO "\
4047 program=lt-'$outputname'$exeext
4048 progdir=\"\$thisdir/$objdir\"
4049
4050 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4052 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4053
4054 file=\"\$\$-\$program\"
4055
4056 if test ! -d \"\$progdir\"; then
4057 $MKDIR \"\$progdir\"
4058 else
4059 $RM \"\$progdir/\$file\"
4060 fi"
4061
4062 $ECHO "\
4063
4064 # relink executable if necessary
4065 if test -n \"\$relink_command\"; then
4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4067 else
4068 $ECHO \"\$relink_command_output\" >&2
4069 $RM \"\$progdir/\$file\"
4070 exit 1
4071 fi
4072 fi
4073
4074 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4075 { $RM \"\$progdir/\$program\";
4076 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4077 $RM \"\$progdir/\$file\"
4078 fi"
4079 else
4080 $ECHO "\
4081 program='$outputname'
4082 progdir=\"\$thisdir/$objdir\"
4083 "
4084 fi
4085
4086 $ECHO "\
4087
4088 if test -f \"\$progdir/\$program\"; then"
4089
4090 # fixup the dll searchpath if we need to.
4091 #
4092 # Fix the DLL searchpath if we need to. Do this before prepending
4093 # to shlibpath, because on Windows, both are PATH and uninstalled
4094 # libraries must come first.
4095 if test -n "$dllsearchpath"; then
4096 $ECHO "\
4097 # Add the dll search path components to the executable PATH
4098 PATH=$dllsearchpath:\$PATH
4099 "
4100 fi
4101
4102 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4104 $ECHO "\
4105 # Add our own library path to $shlibpath_var
4106 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4107
4108 # Some systems cannot cope with colon-terminated $shlibpath_var
4109 # The second colon is a workaround for a bug in BeOS R4 sed
4110 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4111
4112 export $shlibpath_var
4113 "
4114 fi
4115
4116 $ECHO "\
4117 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4118 # Run the actual program with our arguments.
4119 func_exec_program \${1+\"\$@\"}
4120 fi
4121 else
4122 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4124 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4125 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4126 exit 1
31234127 fi
3124 }
3125 # end: func_to_host_pathlist
4128 fi\
4129 "
4130 }
4131
31264132
31274133 # func_emit_cwrapperexe_src
31284134 # emit the source code for a wrapper executable on stdout
31404146
31414147 This wrapper executable should never be moved out of the build directory.
31424148 If it is, it will not operate correctly.
3143
3144 Currently, it simply execs the wrapper *script* "$SHELL $output",
3145 but could eventually absorb all of the scripts functionality and
3146 exec $objdir/$outputname directly.
31474149 */
31484150 EOF
31494151 cat <<"EOF"
4152 #ifdef _MSC_VER
4153 # define _CRT_SECURE_NO_DEPRECATE 1
4154 #endif
31504155 #include <stdio.h>
31514156 #include <stdlib.h>
31524157 #ifdef _MSC_VER
31534158 # include <direct.h>
31544159 # include <process.h>
31554160 # include <io.h>
3156 # define setmode _setmode
31574161 #else
31584162 # include <unistd.h>
31594163 # include <stdint.h>
31604164 # ifdef __CYGWIN__
31614165 # include <io.h>
3162 # define HAVE_SETENV
3163 # ifdef __STRICT_ANSI__
3164 char *realpath (const char *, char *);
3165 int putenv (char *);
3166 int setenv (const char *, const char *, int);
3167 # endif
31684166 # endif
31694167 #endif
31704168 #include <malloc.h>
31764174 #include <fcntl.h>
31774175 #include <sys/stat.h>
31784176
4177 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
4179 # ifdef __STRICT_ANSI__
4180 int _putenv (const char *);
4181 # endif
4182 #elif defined(__CYGWIN__)
4183 # ifdef __STRICT_ANSI__
4184 char *realpath (const char *, char *);
4185 int putenv (char *);
4186 int setenv (const char *, const char *, int);
4187 # endif
4188 /* #elif defined (other platforms) ... */
4189 #endif
4190
4191 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
4193 # define setmode _setmode
4194 # define stat _stat
4195 # define chmod _chmod
4196 # define getcwd _getcwd
4197 # define putenv _putenv
4198 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
4204 # define setmode _setmode
4205 # define stat _stat
4206 # define chmod _chmod
4207 # define getcwd _getcwd
4208 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
4210 # define HAVE_SETENV
4211 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
4213 #endif
4214
31794215 #if defined(PATH_MAX)
31804216 # define LT_PATHMAX PATH_MAX
31814217 #elif defined(MAXPATHLEN)
31914227 # define S_IXGRP 0
31924228 #endif
31934229
3194 #ifdef _MSC_VER
3195 # define S_IXUSR _S_IEXEC
3196 # define stat _stat
3197 # ifndef _INTPTR_T_DEFINED
3198 # define intptr_t int
3199 # endif
3200 #endif
3201
4230 /* path handling portability macros */
32024231 #ifndef DIR_SEPARATOR
32034232 # define DIR_SEPARATOR '/'
32044233 # define PATH_SEPARATOR ':'
32294258 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
32304259 #endif /* PATH_SEPARATOR_2 */
32314260
3232 #ifdef __CYGWIN__
3233 # define FOPEN_WB "wb"
3234 #endif
3235
32364261 #ifndef FOPEN_WB
32374262 # define FOPEN_WB "w"
32384263 #endif
32454270 if (stale) { free ((void *) stale); stale = 0; } \
32464271 } while (0)
32474272
3248 #undef LTWRAPPER_DEBUGPRINTF
3249 #if defined DEBUGWRAPPER
3250 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3251 static void
3252 ltwrapper_debugprintf (const char *fmt, ...)
3253 {
3254 va_list args;
3255 va_start (args, fmt);
3256 (void) vfprintf (stderr, fmt, args);
3257 va_end (args);
3258 }
4273 #if defined(LT_DEBUGWRAPPER)
4274 static int lt_debug = 1;
32594275 #else
3260 # define LTWRAPPER_DEBUGPRINTF(args)
4276 static int lt_debug = 0;
32614277 #endif
32624278
3263 const char *program_name = NULL;
4279 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
32644280
32654281 void *xmalloc (size_t num);
32664282 char *xstrdup (const char *string);
32704286 int make_executable (const char *path);
32714287 int check_executable (const char *path);
32724288 char *strendzap (char *str, const char *pat);
3273 void lt_fatal (const char *message, ...);
4289 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4290 void lt_fatal (const char *file, int line, const char *message, ...);
4291 static const char *nonnull (const char *s);
4292 static const char *nonempty (const char *s);
32744293 void lt_setenv (const char *name, const char *value);
32754294 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3276 void lt_opt_process_env_set (const char *arg);
3277 void lt_opt_process_env_prepend (const char *arg);
3278 void lt_opt_process_env_append (const char *arg);
3279 int lt_split_name_value (const char *arg, char** name, char** value);
32804295 void lt_update_exe_path (const char *name, const char *value);
32814296 void lt_update_lib_path (const char *name, const char *value);
3282
3283 static const char *script_text_part1 =
4297 char **prepare_spawn (char **argv);
4298 void lt_dump_script (FILE *f);
32844299 EOF
32854300
3286 func_emit_wrapper_part1 yes |
3287 $SED -e 's/\([\\"]\)/\\\1/g' \
3288 -e 's/^/ "/' -e 's/$/\\n"/'
3289 echo ";"
32904301 cat <<EOF
3291
3292 static const char *script_text_part2 =
3293 EOF
3294 func_emit_wrapper_part2 yes |
3295 $SED -e 's/\([\\"]\)/\\\1/g' \
3296 -e 's/^/ "/' -e 's/$/\\n"/'
3297 echo ";"
3298
3299 cat <<EOF
3300 const char * MAGIC_EXE = "$magic_exe";
4302 volatile const char * MAGIC_EXE = "$magic_exe";
33014303 const char * LIB_PATH_VARNAME = "$shlibpath_var";
33024304 EOF
33034305
33044306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3305 func_to_host_pathlist "$temp_rpath"
4307 func_to_host_path "$temp_rpath"
33064308 cat <<EOF
3307 const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4309 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
33084310 EOF
33094311 else
33104312 cat <<"EOF"
33134315 fi
33144316
33154317 if test -n "$dllsearchpath"; then
3316 func_to_host_pathlist "$dllsearchpath:"
4318 func_to_host_path "$dllsearchpath:"
33174319 cat <<EOF
33184320 const char * EXE_PATH_VARNAME = "PATH";
3319 const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4321 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
33204322 EOF
33214323 else
33224324 cat <<"EOF"
33394341 cat <<"EOF"
33404342
33414343 #define LTWRAPPER_OPTION_PREFIX "--lt-"
3342 #define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3343
3344 static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
4344
33454345 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3346
33474346 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3348
3349 static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3350 static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3351 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3352
3353 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3354 static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3355 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3356
3357 static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3358 static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3359 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
4347 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
33604348
33614349 int
33624350 main (int argc, char *argv[])
33734361 int i;
33744362
33754363 program_name = (char *) xstrdup (base_name (argv[0]));
3376 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3378
3379 /* very simple arg parsing; don't want to rely on getopt */
4364 newargz = XMALLOC (char *, argc + 1);
4365
4366 /* very simple arg parsing; don't want to rely on getopt
4367 * also, copy all non cwrapper options to newargz, except
4368 * argz[0], which is handled differently
4369 */
4370 newargc=0;
33804371 for (i = 1; i < argc; i++)
33814372 {
33824373 if (strcmp (argv[i], dumpscript_opt) == 0)
33904381 esac
33914382
33924383 cat <<"EOF"
3393 printf ("%s", script_text_part1);
3394 printf ("%s", script_text_part2);
4384 lt_dump_script (stdout);
33954385 return 0;
33964386 }
4387 if (strcmp (argv[i], debug_opt) == 0)
4388 {
4389 lt_debug = 1;
4390 continue;
4391 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4393 {
4394 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4395 namespace, but it is not one of the ones we know about and
4396 have already dealt with, above (inluding dump-script), then
4397 report an error. Otherwise, targets might begin to believe
4398 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4399 namespace. The first time any user complains about this, we'll
4400 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4401 or a configure.ac-settable value.
4402 */
4403 lt_fatal (__FILE__, __LINE__,
4404 "unrecognized %s option: '%s'",
4405 ltwrapper_option_prefix, argv[i]);
4406 }
4407 /* otherwise ... */
4408 newargz[++newargc] = xstrdup (argv[i]);
33974409 }
3398
3399 newargz = XMALLOC (char *, argc + 1);
4410 newargz[++newargc] = NULL;
4411
4412 EOF
4413 cat <<EOF
4414 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4416 EOF
4417 cat <<"EOF"
4418 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4419 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4420
34004421 tmp_pathspec = find_executable (argv[0]);
34014422 if (tmp_pathspec == NULL)
3402 lt_fatal ("Couldn't find %s", argv[0]);
3403 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3404 tmp_pathspec));
4423 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4424 lt_debugprintf (__FILE__, __LINE__,
4425 "(main) found exe (before symlink chase) at: %s\n",
4426 tmp_pathspec);
34054427
34064428 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3407 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3408 actual_cwrapper_path));
4429 lt_debugprintf (__FILE__, __LINE__,
4430 "(main) found exe (after symlink chase) at: %s\n",
4431 actual_cwrapper_path);
34094432 XFREE (tmp_pathspec);
34104433
3411 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
4434 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
34124435 strendzap (actual_cwrapper_path, actual_cwrapper_name);
34134436
34144437 /* wrapper name transforms */
34264449 target_name = tmp_pathspec;
34274450 tmp_pathspec = 0;
34284451
3429 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3430 target_name));
4452 lt_debugprintf (__FILE__, __LINE__,
4453 "(main) libtool target name: %s\n",
4454 target_name);
34314455 EOF
34324456
34334457 cat <<EOF
34774501
34784502 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
34794503 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4504 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4505 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4506 because on Windows, both *_VARNAMEs are PATH but uninstalled
4507 libraries must come first. */
4508 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
34804509 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3481 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3482
3483 newargc=0;
3484 for (i = 1; i < argc; i++)
3485 {
3486 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3487 {
3488 if (argv[i][env_set_opt_len] == '=')
3489 {
3490 const char *p = argv[i] + env_set_opt_len + 1;
3491 lt_opt_process_env_set (p);
3492 }
3493 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3494 {
3495 lt_opt_process_env_set (argv[++i]); /* don't copy */
3496 }
3497 else
3498 lt_fatal ("%s missing required argument", env_set_opt);
3499 continue;
3500 }
3501 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3502 {
3503 if (argv[i][env_prepend_opt_len] == '=')
3504 {
3505 const char *p = argv[i] + env_prepend_opt_len + 1;
3506 lt_opt_process_env_prepend (p);
3507 }
3508 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3509 {
3510 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3511 }
3512 else
3513 lt_fatal ("%s missing required argument", env_prepend_opt);
3514 continue;
3515 }
3516 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3517 {
3518 if (argv[i][env_append_opt_len] == '=')
3519 {
3520 const char *p = argv[i] + env_append_opt_len + 1;
3521 lt_opt_process_env_append (p);
3522 }
3523 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3524 {
3525 lt_opt_process_env_append (argv[++i]); /* don't copy */
3526 }
3527 else
3528 lt_fatal ("%s missing required argument", env_append_opt);
3529 continue;
3530 }
3531 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3532 {
3533 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3534 namespace, but it is not one of the ones we know about and
3535 have already dealt with, above (inluding dump-script), then
3536 report an error. Otherwise, targets might begin to believe
3537 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3538 namespace. The first time any user complains about this, we'll
3539 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3540 or a configure.ac-settable value.
3541 */
3542 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3543 ltwrapper_option_prefix, argv[i]);
3544 }
3545 /* otherwise ... */
3546 newargz[++newargc] = xstrdup (argv[i]);
3547 }
3548 newargz[++newargc] = NULL;
3549
3550 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
4510
4511 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4512 nonnull (lt_argv_zero));
35514513 for (i = 0; i < newargc; i++)
35524514 {
3553 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
4515 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4516 i, nonnull (newargz[i]));
35544517 }
35554518
35564519 EOF
35594522 mingw*)
35604523 cat <<"EOF"
35614524 /* execv doesn't actually work on mingw as expected on unix */
4525 newargz = prepare_spawn (newargz);
35624526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
35634527 if (rval == -1)
35644528 {
35654529 /* failed to start process */
3566 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
4530 lt_debugprintf (__FILE__, __LINE__,
4531 "(main) failed to launch target \"%s\": %s\n",
4532 lt_argv_zero, nonnull (strerror (errno)));
35674533 return 127;
35684534 }
35694535 return rval;
35854551 {
35864552 void *p = (void *) malloc (num);
35874553 if (!p)
3588 lt_fatal ("Memory exhausted");
4554 lt_fatal (__FILE__, __LINE__, "memory exhausted");
35894555
35904556 return p;
35914557 }
36194585 {
36204586 struct stat st;
36214587
3622 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3623 path ? (*path ? path : "EMPTY!") : "NULL!"));
4588 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4589 nonempty (path));
36244590 if ((!path) || (!*path))
36254591 return 0;
36264592
36374603 int rval = 0;
36384604 struct stat st;
36394605
3640 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3641 path ? (*path ? path : "EMPTY!") : "NULL!"));
4606 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4607 nonempty (path));
36424608 if ((!path) || (!*path))
36434609 return 0;
36444610
36644630 int tmp_len;
36654631 char *concat_name;
36664632
3667 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3668 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
4633 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4634 nonempty (wrapper));
36694635
36704636 if ((wrapper == NULL) || (*wrapper == '\0'))
36714637 return NULL;
37184684 {
37194685 /* empty path: current directory */
37204686 if (getcwd (tmp, LT_PATHMAX) == NULL)
3721 lt_fatal ("getcwd failed");
4687 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4688 nonnull (strerror (errno)));
37224689 tmp_len = strlen (tmp);
37234690 concat_name =
37244691 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37434710 }
37444711 /* Relative path | not found in path: prepend cwd */
37454712 if (getcwd (tmp, LT_PATHMAX) == NULL)
3746 lt_fatal ("getcwd failed");
4713 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4714 nonnull (strerror (errno)));
37474715 tmp_len = strlen (tmp);
37484716 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37494717 memcpy (concat_name, tmp, tmp_len);
37694737 int has_symlinks = 0;
37704738 while (strlen (tmp_pathspec) && !has_symlinks)
37714739 {
3772 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3773 tmp_pathspec));
4740 lt_debugprintf (__FILE__, __LINE__,
4741 "checking path component for symlinks: %s\n",
4742 tmp_pathspec);
37744743 if (lstat (tmp_pathspec, &s) == 0)
37754744 {
37764745 if (S_ISLNK (s.st_mode) != 0)
37924761 }
37934762 else
37944763 {
3795 char *errstr = strerror (errno);
3796 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
4764 lt_fatal (__FILE__, __LINE__,
4765 "error accessing file \"%s\": %s",
4766 tmp_pathspec, nonnull (strerror (errno)));
37974767 }
37984768 }
37994769 XFREE (tmp_pathspec);
38064776 tmp_pathspec = realpath (pathspec, buf);
38074777 if (tmp_pathspec == 0)
38084778 {
3809 lt_fatal ("Could not follow symlinks for %s", pathspec);
4779 lt_fatal (__FILE__, __LINE__,
4780 "could not follow symlinks for %s", pathspec);
38104781 }
38114782 return xstrdup (tmp_pathspec);
38124783 #endif
38324803 return str;
38334804 }
38344805
4806 void
4807 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4808 {
4809 va_list args;
4810 if (lt_debug)
4811 {
4812 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4813 va_start (args, fmt);
4814 (void) vfprintf (stderr, fmt, args);
4815 va_end (args);
4816 }
4817 }
4818
38354819 static void
3836 lt_error_core (int exit_status, const char *mode,
4820 lt_error_core (int exit_status, const char *file,
4821 int line, const char *mode,
38374822 const char *message, va_list ap)
38384823 {
3839 fprintf (stderr, "%s: %s: ", program_name, mode);
4824 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
38404825 vfprintf (stderr, message, ap);
38414826 fprintf (stderr, ".\n");
38424827
38454830 }
38464831
38474832 void
3848 lt_fatal (const char *message, ...)
4833 lt_fatal (const char *file, int line, const char *message, ...)
38494834 {
38504835 va_list ap;
38514836 va_start (ap, message);
3852 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4837 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
38534838 va_end (ap);
4839 }
4840
4841 static const char *
4842 nonnull (const char *s)
4843 {
4844 return s ? s : "(null)";
4845 }
4846
4847 static const char *
4848 nonempty (const char *s)
4849 {
4850 return (s && !*s) ? "(empty)" : nonnull (s);
38544851 }
38554852
38564853 void
38574854 lt_setenv (const char *name, const char *value)
38584855 {
3859 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3860 (name ? name : "<NULL>"),
3861 (value ? value : "<NULL>")));
4856 lt_debugprintf (__FILE__, __LINE__,
4857 "(lt_setenv) setting '%s' to '%s'\n",
4858 nonnull (name), nonnull (value));
38624859 {
38634860 #ifdef HAVE_SETENV
38644861 /* always make a copy, for consistency with !HAVE_SETENV */
39034900 return new_value;
39044901 }
39054902
3906 int
3907 lt_split_name_value (const char *arg, char** name, char** value)
3908 {
3909 const char *p;
3910 int len;
3911 if (!arg || !*arg)
3912 return 1;
3913
3914 p = strchr (arg, (int)'=');
3915
3916 if (!p)
3917 return 1;
3918
3919 *value = xstrdup (++p);
3920
3921 len = strlen (arg) - strlen (*value);
3922 *name = XMALLOC (char, len);
3923 strncpy (*name, arg, len-1);
3924 (*name)[len - 1] = '\0';
3925
3926 return 0;
3927 }
3928
3929 void
3930 lt_opt_process_env_set (const char *arg)
3931 {
3932 char *name = NULL;
3933 char *value = NULL;
3934
3935 if (lt_split_name_value (arg, &name, &value) != 0)
3936 {
3937 XFREE (name);
3938 XFREE (value);
3939 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3940 }
3941
3942 lt_setenv (name, value);
3943 XFREE (name);
3944 XFREE (value);
3945 }
3946
3947 void
3948 lt_opt_process_env_prepend (const char *arg)
3949 {
3950 char *name = NULL;
3951 char *value = NULL;
3952 char *new_value = NULL;
3953
3954 if (lt_split_name_value (arg, &name, &value) != 0)
3955 {
3956 XFREE (name);
3957 XFREE (value);
3958 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3959 }
3960
3961 new_value = lt_extend_str (getenv (name), value, 0);
3962 lt_setenv (name, new_value);
3963 XFREE (new_value);
3964 XFREE (name);
3965 XFREE (value);
3966 }
3967
3968 void
3969 lt_opt_process_env_append (const char *arg)
3970 {
3971 char *name = NULL;
3972 char *value = NULL;
3973 char *new_value = NULL;
3974
3975 if (lt_split_name_value (arg, &name, &value) != 0)
3976 {
3977 XFREE (name);
3978 XFREE (value);
3979 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3980 }
3981
3982 new_value = lt_extend_str (getenv (name), value, 1);
3983 lt_setenv (name, new_value);
3984 XFREE (new_value);
3985 XFREE (name);
3986 XFREE (value);
3987 }
3988
39894903 void
39904904 lt_update_exe_path (const char *name, const char *value)
39914905 {
3992 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3993 (name ? name : "<NULL>"),
3994 (value ? value : "<NULL>")));
4906 lt_debugprintf (__FILE__, __LINE__,
4907 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4908 nonnull (name), nonnull (value));
39954909
39964910 if (name && *name && value && *value)
39974911 {
40104924 void
40114925 lt_update_lib_path (const char *name, const char *value)
40124926 {
4013 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4014 (name ? name : "<NULL>"),
4015 (value ? value : "<NULL>")));
4927 lt_debugprintf (__FILE__, __LINE__,
4928 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4929 nonnull (name), nonnull (value));
40164930
40174931 if (name && *name && value && *value)
40184932 {
40224936 }
40234937 }
40244938
4025
40264939 EOF
4940 case $host_os in
4941 mingw*)
4942 cat <<"EOF"
4943
4944 /* Prepares an argument vector before calling spawn().
4945 Note that spawn() does not by itself call the command interpreter
4946 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4947 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4948 GetVersionEx(&v);
4949 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4950 }) ? "cmd.exe" : "command.com").
4951 Instead it simply concatenates the arguments, separated by ' ', and calls
4952 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4953 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4954 special way:
4955 - Space and tab are interpreted as delimiters. They are not treated as
4956 delimiters if they are surrounded by double quotes: "...".
4957 - Unescaped double quotes are removed from the input. Their only effect is
4958 that within double quotes, space and tab are treated like normal
4959 characters.
4960 - Backslashes not followed by double quotes are not special.
4961 - But 2*n+1 backslashes followed by a double quote become
4962 n backslashes followed by a double quote (n >= 0):
4963 \" -> "
4964 \\\" -> \"
4965 \\\\\" -> \\"
4966 */
4967 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4968 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4969 char **
4970 prepare_spawn (char **argv)
4971 {
4972 size_t argc;
4973 char **new_argv;
4974 size_t i;
4975
4976 /* Count number of arguments. */
4977 for (argc = 0; argv[argc] != NULL; argc++)
4978 ;
4979
4980 /* Allocate new argument vector. */
4981 new_argv = XMALLOC (char *, argc + 1);
4982
4983 /* Put quoted arguments into the new argument vector. */
4984 for (i = 0; i < argc; i++)
4985 {
4986 const char *string = argv[i];
4987
4988 if (string[0] == '\0')
4989 new_argv[i] = xstrdup ("\"\"");
4990 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4991 {
4992 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4993 size_t length;
4994 unsigned int backslashes;
4995 const char *s;
4996 char *quoted_string;
4997 char *p;
4998
4999 length = 0;
5000 backslashes = 0;
5001 if (quote_around)
5002 length++;
5003 for (s = string; *s != '\0'; s++)
5004 {
5005 char c = *s;
5006 if (c == '"')
5007 length += backslashes + 1;
5008 length++;
5009 if (c == '\\')
5010 backslashes++;
5011 else
5012 backslashes = 0;
5013 }
5014 if (quote_around)
5015 length += backslashes + 1;
5016
5017 quoted_string = XMALLOC (char, length + 1);
5018
5019 p = quoted_string;
5020 backslashes = 0;
5021 if (quote_around)
5022 *p++ = '"';
5023 for (s = string; *s != '\0'; s++)
5024 {
5025 char c = *s;
5026 if (c == '"')
5027 {
5028 unsigned int j;
5029 for (j = backslashes + 1; j > 0; j--)
5030 *p++ = '\\';
5031 }
5032 *p++ = c;
5033 if (c == '\\')
5034 backslashes++;
5035 else
5036 backslashes = 0;
5037 }
5038 if (quote_around)
5039 {
5040 unsigned int j;
5041 for (j = backslashes; j > 0; j--)
5042 *p++ = '\\';
5043 *p++ = '"';
5044 }
5045 *p = '\0';
5046
5047 new_argv[i] = quoted_string;
5048 }
5049 else
5050 new_argv[i] = (char *) string;
5051 }
5052 new_argv[argc] = NULL;
5053
5054 return new_argv;
5055 }
5056 EOF
5057 ;;
5058 esac
5059
5060 cat <<"EOF"
5061 void lt_dump_script (FILE* f)
5062 {
5063 EOF
5064 func_emit_wrapper yes |
5065 $SED -n -e '
5066 s/^\(.\{79\}\)\(..*\)/\1\
5067 \2/
5068 h
5069 s/\([\\"]\)/\\\1/g
5070 s/$/\\n/
5071 s/\([^\n]*\).*/ fputs ("\1", f);/p
5072 g
5073 D'
5074 cat <<"EOF"
5075 }
5076 EOF
40275077 }
40285078 # end: func_emit_cwrapperexe_src
5079
5080 # func_win32_import_lib_p ARG
5081 # True if ARG is an import lib, as indicated by $file_magic_cmd
5082 func_win32_import_lib_p ()
5083 {
5084 $opt_debug
5085 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5086 *import*) : ;;
5087 *) false ;;
5088 esac
5089 }
40295090
40305091 # func_mode_link arg...
40315092 func_mode_link ()
40715132 new_inherited_linker_flags=
40725133
40735134 avoid_version=no
5135 bindir=
40745136 dlfiles=
40755137 dlprefiles=
40765138 dlself=no
41635225 esac
41645226
41655227 case $prev in
5228 bindir)
5229 bindir="$arg"
5230 prev=
5231 continue
5232 ;;
41665233 dlfiles|dlprefiles)
41675234 if test "$preload" = no; then
41685235 # Add the symbol object into the linking commands.
41945261 ;;
41955262 *)
41965263 if test "$prev" = dlfiles; then
4197 dlfiles="$dlfiles $arg"
5264 func_append dlfiles " $arg"
41985265 else
4199 dlprefiles="$dlprefiles $arg"
5266 func_append dlprefiles " $arg"
42005267 fi
42015268 prev=
42025269 continue
42205287 *-*-darwin*)
42215288 case "$deplibs " in
42225289 *" $qarg.ltframework "*) ;;
4223 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
5290 *) func_append deplibs " $qarg.ltframework" # this is fixed later
42245291 ;;
42255292 esac
42265293 ;;
42395306 moreargs=
42405307 for fil in `cat "$save_arg"`
42415308 do
4242 # moreargs="$moreargs $fil"
5309 # func_append moreargs " $fil"
42435310 arg=$fil
42445311 # A libtool-controlled object.
42455312
42685335
42695336 if test "$prev" = dlfiles; then
42705337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4271 dlfiles="$dlfiles $pic_object"
5338 func_append dlfiles " $pic_object"
42725339 prev=
42735340 continue
42745341 else
42805347 # CHECK ME: I think I busted this. -Ossama
42815348 if test "$prev" = dlprefiles; then
42825349 # Preload the old-style object.
4283 dlprefiles="$dlprefiles $pic_object"
5350 func_append dlprefiles " $pic_object"
42845351 prev=
42855352 fi
42865353
43505417 if test "$prev" = rpath; then
43515418 case "$rpath " in
43525419 *" $arg "*) ;;
4353 *) rpath="$rpath $arg" ;;
5420 *) func_append rpath " $arg" ;;
43545421 esac
43555422 else
43565423 case "$xrpath " in
43575424 *" $arg "*) ;;
4358 *) xrpath="$xrpath $arg" ;;
5425 *) func_append xrpath " $arg" ;;
43595426 esac
43605427 fi
43615428 prev=
43675434 continue
43685435 ;;
43695436 weak)
4370 weak_libs="$weak_libs $arg"
5437 func_append weak_libs " $arg"
43715438 prev=
43725439 continue
43735440 ;;
43745441 xcclinker)
4375 linker_flags="$linker_flags $qarg"
4376 compiler_flags="$compiler_flags $qarg"
5442 func_append linker_flags " $qarg"
5443 func_append compiler_flags " $qarg"
43775444 prev=
43785445 func_append compile_command " $qarg"
43795446 func_append finalize_command " $qarg"
43805447 continue
43815448 ;;
43825449 xcompiler)
4383 compiler_flags="$compiler_flags $qarg"
5450 func_append compiler_flags " $qarg"
43845451 prev=
43855452 func_append compile_command " $qarg"
43865453 func_append finalize_command " $qarg"
43875454 continue
43885455 ;;
43895456 xlinker)
4390 linker_flags="$linker_flags $qarg"
4391 compiler_flags="$compiler_flags $wl$qarg"
5457 func_append linker_flags " $qarg"
5458 func_append compiler_flags " $wl$qarg"
43925459 prev=
43935460 func_append compile_command " $wl$qarg"
43945461 func_append finalize_command " $wl$qarg"
44245491 continue
44255492 ;;
44265493
5494 -bindir)
5495 prev=bindir
5496 continue
5497 ;;
5498
44275499 -dlopen)
44285500 prev=dlfiles
44295501 continue
44745546 ;;
44755547
44765548 -L*)
4477 func_stripname '-L' '' "$arg"
4478 dir=$func_stripname_result
4479 if test -z "$dir"; then
5549 func_stripname "-L" '' "$arg"
5550 if test -z "$func_stripname_result"; then
44805551 if test "$#" -gt 0; then
44815552 func_fatal_error "require no space between \`-L' and \`$1'"
44825553 else
44835554 func_fatal_error "need path for \`-L' option"
44845555 fi
44855556 fi
5557 func_resolve_sysroot "$func_stripname_result"
5558 dir=$func_resolve_sysroot_result
44865559 # We need an absolute path.
44875560 case $dir in
44885561 [\\/]* | [A-Za-z]:[\\/]*) ;;
44945567 ;;
44955568 esac
44965569 case "$deplibs " in
4497 *" -L$dir "*) ;;
5570 *" -L$dir "* | *" $arg "*)
5571 # Will only happen for absolute or sysroot arguments
5572 ;;
44985573 *)
4499 deplibs="$deplibs -L$dir"
4500 lib_search_path="$lib_search_path $dir"
5574 # Preserve sysroot, but never include relative directories
5575 case $dir in
5576 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5577 *) func_append deplibs " -L$dir" ;;
5578 esac
5579 func_append lib_search_path " $dir"
45015580 ;;
45025581 esac
45035582 case $host in
45045583 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4505 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
5584 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
45065585 case :$dllsearchpath: in
45075586 *":$dir:"*) ;;
45085587 ::) dllsearchpath=$dir;;
4509 *) dllsearchpath="$dllsearchpath:$dir";;
5588 *) func_append dllsearchpath ":$dir";;
45105589 esac
45115590 case :$dllsearchpath: in
45125591 *":$testbindir:"*) ;;
45135592 ::) dllsearchpath=$testbindir;;
4514 *) dllsearchpath="$dllsearchpath:$testbindir";;
5593 *) func_append dllsearchpath ":$testbindir";;
45155594 esac
45165595 ;;
45175596 esac
45215600 -l*)
45225601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
45235602 case $host in
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
5603 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
45255604 # These systems don't actually have a C or math library (as such)
45265605 continue
45275606 ;;
45355614 ;;
45365615 *-*-rhapsody* | *-*-darwin1.[012])
45375616 # Rhapsody C and math libraries are in the System framework
4538 deplibs="$deplibs System.ltframework"
5617 func_append deplibs " System.ltframework"
45395618 continue
45405619 ;;
45415620 *-*-sco3.2v5* | *-*-sco5v6*)
45555634 ;;
45565635 esac
45575636 fi
4558 deplibs="$deplibs $arg"
5637 func_append deplibs " $arg"
45595638 continue
45605639 ;;
45615640
45675646 # Tru64 UNIX uses -model [arg] to determine the layout of C++
45685647 # classes, name mangling, and exception handling.
45695648 # Darwin uses the -arch flag to determine output architecture.
4570 -model|-arch|-isysroot)
4571 compiler_flags="$compiler_flags $arg"
5649 -model|-arch|-isysroot|--sysroot)
5650 func_append compiler_flags " $arg"
45725651 func_append compile_command " $arg"
45735652 func_append finalize_command " $arg"
45745653 prev=xcompiler
45755654 continue
45765655 ;;
45775656
4578 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4579 compiler_flags="$compiler_flags $arg"
5657 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5658 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5659 func_append compiler_flags " $arg"
45805660 func_append compile_command " $arg"
45815661 func_append finalize_command " $arg"
45825662 case "$new_inherited_linker_flags " in
45835663 *" $arg "*) ;;
4584 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
5664 * ) func_append new_inherited_linker_flags " $arg" ;;
45855665 esac
45865666 continue
45875667 ;;
46485728 # We need an absolute path.
46495729 case $dir in
46505730 [\\/]* | [A-Za-z]:[\\/]*) ;;
5731 =*)
5732 func_stripname '=' '' "$dir"
5733 dir=$lt_sysroot$func_stripname_result
5734 ;;
46515735 *)
46525736 func_fatal_error "only absolute run-paths are allowed"
46535737 ;;
46545738 esac
46555739 case "$xrpath " in
46565740 *" $dir "*) ;;
4657 *) xrpath="$xrpath $dir" ;;
5741 *) func_append xrpath " $dir" ;;
46585742 esac
46595743 continue
46605744 ;;
47075791 for flag in $args; do
47085792 IFS="$save_ifs"
47095793 func_quote_for_eval "$flag"
4710 arg="$arg $wl$func_quote_for_eval_result"
4711 compiler_flags="$compiler_flags $func_quote_for_eval_result"
5794 func_append arg " $func_quote_for_eval_result"
5795 func_append compiler_flags " $func_quote_for_eval_result"
47125796 done
47135797 IFS="$save_ifs"
47145798 func_stripname ' ' '' "$arg"
47235807 for flag in $args; do
47245808 IFS="$save_ifs"
47255809 func_quote_for_eval "$flag"
4726 arg="$arg $wl$func_quote_for_eval_result"
4727 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4728 linker_flags="$linker_flags $func_quote_for_eval_result"
5810 func_append arg " $wl$func_quote_for_eval_result"
5811 func_append compiler_flags " $wl$func_quote_for_eval_result"
5812 func_append linker_flags " $func_quote_for_eval_result"
47295813 done
47305814 IFS="$save_ifs"
47315815 func_stripname ' ' '' "$arg"
47535837 arg="$func_quote_for_eval_result"
47545838 ;;
47555839
4756 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4757 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4758 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4759 # +DA*, +DD* enable 64-bit mode on the HP compiler
4760 # -q* pass through compiler args for the IBM compiler
4761 # -m*, -t[45]*, -txscale* pass through architecture-specific
4762 # compiler args for GCC
4763 # -F/path gives path to uninstalled frameworks, gcc on darwin
4764 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4765 # @file GCC response files
5840 # Flags to be passed through unchanged, with rationale:
5841 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5842 # -r[0-9][0-9]* specify processor for the SGI compiler
5843 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5844 # +DA*, +DD* enable 64-bit mode for the HP compiler
5845 # -q* compiler args for the IBM compiler
5846 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5847 # -F/path path to uninstalled frameworks, gcc on darwin
5848 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5849 # @file GCC response files
5850 # -tp=* Portland pgcc target processor selection
5851 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
47665853 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4767 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
5854 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
47685856 func_quote_for_eval "$arg"
47695857 arg="$func_quote_for_eval_result"
47705858 func_append compile_command " $arg"
47715859 func_append finalize_command " $arg"
4772 compiler_flags="$compiler_flags $arg"
5860 func_append compiler_flags " $arg"
47735861 continue
47745862 ;;
47755863
47815869
47825870 *.$objext)
47835871 # A standard object.
4784 objs="$objs $arg"
5872 func_append objs " $arg"
47855873 ;;
47865874
47875875 *.lo)
48125900
48135901 if test "$prev" = dlfiles; then
48145902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4815 dlfiles="$dlfiles $pic_object"
5903 func_append dlfiles " $pic_object"
48165904 prev=
48175905 continue
48185906 else
48245912 # CHECK ME: I think I busted this. -Ossama
48255913 if test "$prev" = dlprefiles; then
48265914 # Preload the old-style object.
4827 dlprefiles="$dlprefiles $pic_object"
5915 func_append dlprefiles " $pic_object"
48285916 prev=
48295917 fi
48305918
48695957
48705958 *.$libext)
48715959 # An archive.
4872 deplibs="$deplibs $arg"
4873 old_deplibs="$old_deplibs $arg"
5960 func_append deplibs " $arg"
5961 func_append old_deplibs " $arg"
48745962 continue
48755963 ;;
48765964
48775965 *.la)
48785966 # A libtool-controlled library.
48795967
5968 func_resolve_sysroot "$arg"
48805969 if test "$prev" = dlfiles; then
48815970 # This library was specified with -dlopen.
4882 dlfiles="$dlfiles $arg"
5971 func_append dlfiles " $func_resolve_sysroot_result"
48835972 prev=
48845973 elif test "$prev" = dlprefiles; then
48855974 # The library was specified with -dlpreopen.
4886 dlprefiles="$dlprefiles $arg"
5975 func_append dlprefiles " $func_resolve_sysroot_result"
48875976 prev=
48885977 else
4889 deplibs="$deplibs $arg"
5978 func_append deplibs " $func_resolve_sysroot_result"
48905979 fi
48915980 continue
48925981 ;;
49246013
49256014 if test -n "$shlibpath_var"; then
49266015 # get the directories listed in $shlibpath_var
4927 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
49286017 else
49296018 shlib_search_path=
49306019 fi
49336022
49346023 func_dirname "$output" "/" ""
49356024 output_objdir="$func_dirname_result$objdir"
6025 func_to_tool_file "$output_objdir/"
6026 tool_output_objdir=$func_to_tool_file_result
49366027 # Create the object directory.
49376028 func_mkdir_p "$output_objdir"
49386029
49536044 # Find all interdependent deplibs by searching for libraries
49546045 # that are linked more than once (e.g. -la -lb -la)
49556046 for deplib in $deplibs; do
4956 if $opt_duplicate_deps ; then
6047 if $opt_preserve_dup_deps ; then
49576048 case "$libs " in
4958 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6049 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
49596050 esac
49606051 fi
4961 libs="$libs $deplib"
6052 func_append libs " $deplib"
49626053 done
49636054
49646055 if test "$linkmode" = lib; then
49716062 if $opt_duplicate_compiler_generated_deps; then
49726063 for pre_post_dep in $predeps $postdeps; do
49736064 case "$pre_post_deps " in
4974 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
6065 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
49756066 esac
4976 pre_post_deps="$pre_post_deps $pre_post_dep"
6067 func_append pre_post_deps " $pre_post_dep"
49776068 done
49786069 fi
49796070 pre_post_deps=
50436134 for lib in $dlprefiles; do
50446135 # Ignore non-libtool-libs
50456136 dependency_libs=
6137 func_resolve_sysroot "$lib"
50466138 case $lib in
5047 *.la) func_source "$lib" ;;
6139 *.la) func_source "$func_resolve_sysroot_result" ;;
50486140 esac
50496141
50506142 # Collect preopened libtool deplibs, except any this library
50516143 # has declared as weak libs
50526144 for deplib in $dependency_libs; do
5053 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
6145 func_basename "$deplib"
6146 deplib_base=$func_basename_result
50546147 case " $weak_libs " in
50556148 *" $deplib_base "*) ;;
5056 *) deplibs="$deplibs $deplib" ;;
6149 *) func_append deplibs " $deplib" ;;
50576150 esac
50586151 done
50596152 done
50696162 lib=
50706163 found=no
50716164 case $deplib in
5072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
6165 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6166 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
50736167 if test "$linkmode,$pass" = "prog,link"; then
50746168 compile_deplibs="$deplib $compile_deplibs"
50756169 finalize_deplibs="$deplib $finalize_deplibs"
50766170 else
5077 compiler_flags="$compiler_flags $deplib"
6171 func_append compiler_flags " $deplib"
50786172 if test "$linkmode" = lib ; then
50796173 case "$new_inherited_linker_flags " in
50806174 *" $deplib "*) ;;
5081 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6175 * ) func_append new_inherited_linker_flags " $deplib" ;;
50826176 esac
50836177 fi
50846178 fi
51636257 if test "$linkmode" = lib ; then
51646258 case "$new_inherited_linker_flags " in
51656259 *" $deplib "*) ;;
5166 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6260 * ) func_append new_inherited_linker_flags " $deplib" ;;
51676261 esac
51686262 fi
51696263 fi
51766270 test "$pass" = conv && continue
51776271 newdependency_libs="$deplib $newdependency_libs"
51786272 func_stripname '-L' '' "$deplib"
5179 newlib_search_path="$newlib_search_path $func_stripname_result"
6273 func_resolve_sysroot "$func_stripname_result"
6274 func_append newlib_search_path " $func_resolve_sysroot_result"
51806275 ;;
51816276 prog)
51826277 if test "$pass" = conv; then
51906285 finalize_deplibs="$deplib $finalize_deplibs"
51916286 fi
51926287 func_stripname '-L' '' "$deplib"
5193 newlib_search_path="$newlib_search_path $func_stripname_result"
6288 func_resolve_sysroot "$func_stripname_result"
6289 func_append newlib_search_path " $func_resolve_sysroot_result"
51946290 ;;
51956291 *)
51966292 func_warning "\`-L' is ignored for archives/objects"
52016297 -R*)
52026298 if test "$pass" = link; then
52036299 func_stripname '-R' '' "$deplib"
5204 dir=$func_stripname_result
6300 func_resolve_sysroot "$func_stripname_result"
6301 dir=$func_resolve_sysroot_result
52056302 # Make sure the xrpath contains only unique directories.
52066303 case "$xrpath " in
52076304 *" $dir "*) ;;
5208 *) xrpath="$xrpath $dir" ;;
6305 *) func_append xrpath " $dir" ;;
52096306 esac
52106307 fi
52116308 deplibs="$deplib $deplibs"
52126309 continue
52136310 ;;
5214 *.la) lib="$deplib" ;;
6311 *.la)
6312 func_resolve_sysroot "$deplib"
6313 lib=$func_resolve_sysroot_result
6314 ;;
52156315 *.$libext)
52166316 if test "$pass" = conv; then
52176317 deplibs="$deplib $deplibs"
52296329 match_pattern*)
52306330 set dummy $deplibs_check_method; shift
52316331 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5232 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
6332 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
52336333 | $EGREP "$match_pattern_regex" > /dev/null; then
52346334 valid_a_lib=yes
52356335 fi
52396339 ;;
52406340 esac
52416341 if test "$valid_a_lib" != yes; then
5242 $ECHO
6342 echo
52436343 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5244 $ECHO "*** I have the capability to make that library automatically link in when"
5245 $ECHO "*** you link to this library. But I can only do this if you have a"
5246 $ECHO "*** shared version of the library, which you do not appear to have"
5247 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5248 $ECHO "*** that it is just a static archive that I should not use here."
6344 echo "*** I have the capability to make that library automatically link in when"
6345 echo "*** you link to this library. But I can only do this if you have a"
6346 echo "*** shared version of the library, which you do not appear to have"
6347 echo "*** because the file extensions .$libext of this argument makes me believe"
6348 echo "*** that it is just a static archive that I should not use here."
52496349 else
5250 $ECHO
6350 echo
52516351 $ECHO "*** Warning: Linking the shared library $output against the"
52526352 $ECHO "*** static library $deplib is not portable!"
52536353 deplibs="$deplib $deplibs"
52746374 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
52756375 # If there is no dlopen support or we're linking statically,
52766376 # we need to preload.
5277 newdlprefiles="$newdlprefiles $deplib"
6377 func_append newdlprefiles " $deplib"
52786378 compile_deplibs="$deplib $compile_deplibs"
52796379 finalize_deplibs="$deplib $finalize_deplibs"
52806380 else
5281 newdlfiles="$newdlfiles $deplib"
6381 func_append newdlfiles " $deplib"
52826382 fi
52836383 fi
52846384 continue
53206420
53216421 # Convert "-framework foo" to "foo.ltframework"
53226422 if test -n "$inherited_linker_flags"; then
5323 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
6423 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
53246424 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
53256425 case " $new_inherited_linker_flags " in
53266426 *" $tmp_inherited_linker_flag "*) ;;
5327 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
6427 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
53286428 esac
53296429 done
53306430 fi
5331 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6431 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
53326432 if test "$linkmode,$pass" = "lib,link" ||
53336433 test "$linkmode,$pass" = "prog,scan" ||
53346434 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5335 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5336 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
6435 test -n "$dlopen" && func_append dlfiles " $dlopen"
6436 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
53376437 fi
53386438
53396439 if test "$pass" = conv; then
53446444 func_fatal_error "cannot find name of link library for \`$lib'"
53456445 fi
53466446 # It is a libtool convenience library, so add in its objects.
5347 convenience="$convenience $ladir/$objdir/$old_library"
5348 old_convenience="$old_convenience $ladir/$objdir/$old_library"
6447 func_append convenience " $ladir/$objdir/$old_library"
6448 func_append old_convenience " $ladir/$objdir/$old_library"
53496449 tmp_libs=
53506450 for deplib in $dependency_libs; do
53516451 deplibs="$deplib $deplibs"
5352 if $opt_duplicate_deps ; then
6452 if $opt_preserve_dup_deps ; then
53536453 case "$tmp_libs " in
5354 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6454 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
53556455 esac
53566456 fi
5357 tmp_libs="$tmp_libs $deplib"
6457 func_append tmp_libs " $deplib"
53586458 done
53596459 elif test "$linkmode" != prog && test "$linkmode" != lib; then
53606460 func_fatal_error "\`$lib' is not a convenience library"
53656465
53666466 # Get the name of the library we link against.
53676467 linklib=
5368 for l in $old_library $library_names; do
5369 linklib="$l"
5370 done
6468 if test -n "$old_library" &&
6469 { test "$prefer_static_libs" = yes ||
6470 test "$prefer_static_libs,$installed" = "built,no"; }; then
6471 linklib=$old_library
6472 else
6473 for l in $old_library $library_names; do
6474 linklib="$l"
6475 done
6476 fi
53716477 if test -z "$linklib"; then
53726478 func_fatal_error "cannot find name of link library for \`$lib'"
53736479 fi
53846490 # statically, we need to preload. We also need to preload any
53856491 # dependent libraries so libltdl's deplib preloader doesn't
53866492 # bomb out in the load deplibs phase.
5387 dlprefiles="$dlprefiles $lib $dependency_libs"
6493 func_append dlprefiles " $lib $dependency_libs"
53886494 else
5389 newdlfiles="$newdlfiles $lib"
6495 func_append newdlfiles " $lib"
53906496 fi
53916497 continue
53926498 fi # $pass = dlopen
54086514
54096515 # Find the relevant object directory and library name.
54106516 if test "X$installed" = Xyes; then
5411 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6517 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
54126518 func_warning "library \`$lib' was moved."
54136519 dir="$ladir"
54146520 absdir="$abs_ladir"
54156521 libdir="$abs_ladir"
54166522 else
5417 dir="$libdir"
5418 absdir="$libdir"
6523 dir="$lt_sysroot$libdir"
6524 absdir="$lt_sysroot$libdir"
54196525 fi
54206526 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
54216527 else
54236529 dir="$ladir"
54246530 absdir="$abs_ladir"
54256531 # Remove this search path later
5426 notinst_path="$notinst_path $abs_ladir"
6532 func_append notinst_path " $abs_ladir"
54276533 else
54286534 dir="$ladir/$objdir"
54296535 absdir="$abs_ladir/$objdir"
54306536 # Remove this search path later
5431 notinst_path="$notinst_path $abs_ladir"
6537 func_append notinst_path " $abs_ladir"
54326538 fi
54336539 fi # $installed = yes
54346540 func_stripname 'lib' '.la' "$laname"
54396545 if test -z "$libdir" && test "$linkmode" = prog; then
54406546 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
54416547 fi
5442 # Prefer using a static library (so that no silly _DYNAMIC symbols
5443 # are required to link).
5444 if test -n "$old_library"; then
5445 newdlprefiles="$newdlprefiles $dir/$old_library"
5446 # Keep a list of preopened convenience libraries to check
5447 # that they are being used correctly in the link pass.
5448 test -z "$libdir" && \
5449 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5450 # Otherwise, use the dlname, so that lt_dlopen finds it.
5451 elif test -n "$dlname"; then
5452 newdlprefiles="$newdlprefiles $dir/$dlname"
5453 else
5454 newdlprefiles="$newdlprefiles $dir/$linklib"
5455 fi
6548 case "$host" in
6549 # special handling for platforms with PE-DLLs.
6550 *cygwin* | *mingw* | *cegcc* )
6551 # Linker will automatically link against shared library if both
6552 # static and shared are present. Therefore, ensure we extract
6553 # symbols from the import library if a shared library is present
6554 # (otherwise, the dlopen module name will be incorrect). We do
6555 # this by putting the import library name into $newdlprefiles.
6556 # We recover the dlopen module name by 'saving' the la file
6557 # name in a special purpose variable, and (later) extracting the
6558 # dlname from the la file.
6559 if test -n "$dlname"; then
6560 func_tr_sh "$dir/$linklib"
6561 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6562 func_append newdlprefiles " $dir/$linklib"
6563 else
6564 func_append newdlprefiles " $dir/$old_library"
6565 # Keep a list of preopened convenience libraries to check
6566 # that they are being used correctly in the link pass.
6567 test -z "$libdir" && \
6568 func_append dlpreconveniencelibs " $dir/$old_library"
6569 fi
6570 ;;
6571 * )
6572 # Prefer using a static library (so that no silly _DYNAMIC symbols
6573 # are required to link).
6574 if test -n "$old_library"; then
6575 func_append newdlprefiles " $dir/$old_library"
6576 # Keep a list of preopened convenience libraries to check
6577 # that they are being used correctly in the link pass.
6578 test -z "$libdir" && \
6579 func_append dlpreconveniencelibs " $dir/$old_library"
6580 # Otherwise, use the dlname, so that lt_dlopen finds it.
6581 elif test -n "$dlname"; then
6582 func_append newdlprefiles " $dir/$dlname"
6583 else
6584 func_append newdlprefiles " $dir/$linklib"
6585 fi
6586 ;;
6587 esac
54566588 fi # $pass = dlpreopen
54576589
54586590 if test -z "$libdir"; then
54706602
54716603
54726604 if test "$linkmode" = prog && test "$pass" != link; then
5473 newlib_search_path="$newlib_search_path $ladir"
6605 func_append newlib_search_path " $ladir"
54746606 deplibs="$lib $deplibs"
54756607
54766608 linkalldeplibs=no
54836615 for deplib in $dependency_libs; do
54846616 case $deplib in
54856617 -L*) func_stripname '-L' '' "$deplib"
5486 newlib_search_path="$newlib_search_path $func_stripname_result"
6618 func_resolve_sysroot "$func_stripname_result"
6619 func_append newlib_search_path " $func_resolve_sysroot_result"
54876620 ;;
54886621 esac
54896622 # Need to link against all dependency_libs?
54946627 # or/and link against static libraries
54956628 newdependency_libs="$deplib $newdependency_libs"
54966629 fi
5497 if $opt_duplicate_deps ; then
6630 if $opt_preserve_dup_deps ; then
54986631 case "$tmp_libs " in
5499 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6632 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
55006633 esac
55016634 fi
5502 tmp_libs="$tmp_libs $deplib"
6635 func_append tmp_libs " $deplib"
55036636 done # for deplib
55046637 continue
55056638 fi # $linkmode = prog...
55146647 # Make sure the rpath contains only unique directories.
55156648 case "$temp_rpath:" in
55166649 *"$absdir:"*) ;;
5517 *) temp_rpath="$temp_rpath$absdir:" ;;
6650 *) func_append temp_rpath "$absdir:" ;;
55186651 esac
55196652 fi
55206653
55266659 *)
55276660 case "$compile_rpath " in
55286661 *" $absdir "*) ;;
5529 *) compile_rpath="$compile_rpath $absdir"
6662 *) func_append compile_rpath " $absdir" ;;
55306663 esac
55316664 ;;
55326665 esac
55356668 *)
55366669 case "$finalize_rpath " in
55376670 *" $libdir "*) ;;
5538 *) finalize_rpath="$finalize_rpath $libdir"
6671 *) func_append finalize_rpath " $libdir" ;;
55396672 esac
55406673 ;;
55416674 esac
55606693 case $host in
55616694 *cygwin* | *mingw* | *cegcc*)
55626695 # No point in relinking DLLs because paths are not encoded
5563 notinst_deplibs="$notinst_deplibs $lib"
6696 func_append notinst_deplibs " $lib"
55646697 need_relink=no
55656698 ;;
55666699 *)
55676700 if test "$installed" = no; then
5568 notinst_deplibs="$notinst_deplibs $lib"
6701 func_append notinst_deplibs " $lib"
55696702 need_relink=yes
55706703 fi
55716704 ;;
55826715 fi
55836716 done
55846717 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5585 $ECHO
6718 echo
55866719 if test "$linkmode" = prog; then
55876720 $ECHO "*** Warning: Linking the executable $output against the loadable module"
55886721 else
56006733 *)
56016734 case "$compile_rpath " in
56026735 *" $absdir "*) ;;
5603 *) compile_rpath="$compile_rpath $absdir"
6736 *) func_append compile_rpath " $absdir" ;;
56046737 esac
56056738 ;;
56066739 esac
56096742 *)
56106743 case "$finalize_rpath " in
56116744 *" $libdir "*) ;;
5612 *) finalize_rpath="$finalize_rpath $libdir"
6745 *) func_append finalize_rpath " $libdir" ;;
56136746 esac
56146747 ;;
56156748 esac
56636796 linklib=$newlib
56646797 fi # test -n "$old_archive_from_expsyms_cmds"
56656798
5666 if test "$linkmode" = prog || test "$mode" != relink; then
6799 if test "$linkmode" = prog || test "$opt_mode" != relink; then
56676800 add_shlibpath=
56686801 add_dir=
56696802 add=
56856818 if test "X$dlopenmodule" != "X$lib"; then
56866819 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
56876820 if test -z "$old_library" ; then
5688 $ECHO
5689 $ECHO "*** And there doesn't seem to be a static archive available"
5690 $ECHO "*** The link will probably fail, sorry"
6821 echo
6822 echo "*** And there doesn't seem to be a static archive available"
6823 echo "*** The link will probably fail, sorry"
56916824 else
56926825 add="$dir/$old_library"
56936826 fi
57146847 test "$hardcode_direct_absolute" = no; then
57156848 add="$dir/$linklib"
57166849 elif test "$hardcode_minus_L" = yes; then
5717 add_dir="-L$dir"
6850 add_dir="-L$absdir"
57186851 # Try looking first in the location we're being installed to.
57196852 if test -n "$inst_prefix_dir"; then
57206853 case $libdir in
57216854 [\\/]*)
5722 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6855 func_append add_dir " -L$inst_prefix_dir$libdir"
57236856 ;;
57246857 esac
57256858 fi
57416874 if test -n "$add_shlibpath"; then
57426875 case :$compile_shlibpath: in
57436876 *":$add_shlibpath:"*) ;;
5744 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
6877 *) func_append compile_shlibpath "$add_shlibpath:" ;;
57456878 esac
57466879 fi
57476880 if test "$linkmode" = prog; then
57556888 test "$hardcode_shlibpath_var" = yes; then
57566889 case :$finalize_shlibpath: in
57576890 *":$libdir:"*) ;;
5758 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6891 *) func_append finalize_shlibpath "$libdir:" ;;
57596892 esac
57606893 fi
57616894 fi
57626895 fi
57636896
5764 if test "$linkmode" = prog || test "$mode" = relink; then
6897 if test "$linkmode" = prog || test "$opt_mode" = relink; then
57656898 add_shlibpath=
57666899 add_dir=
57676900 add=
57756908 elif test "$hardcode_shlibpath_var" = yes; then
57766909 case :$finalize_shlibpath: in
57776910 *":$libdir:"*) ;;
5778 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6911 *) func_append finalize_shlibpath "$libdir:" ;;
57796912 esac
57806913 add="-l$name"
57816914 elif test "$hardcode_automatic" = yes; then
57926925 if test -n "$inst_prefix_dir"; then
57936926 case $libdir in
57946927 [\\/]*)
5795 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6928 func_append add_dir " -L$inst_prefix_dir$libdir"
57966929 ;;
57976930 esac
57986931 fi
58276960
58286961 # Just print a warning and add the library to dependency_libs so
58296962 # that the program can be linked against the static library.
5830 $ECHO
6963 echo
58316964 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5832 $ECHO "*** I have the capability to make that library automatically link in when"
5833 $ECHO "*** you link to this library. But I can only do this if you have a"
5834 $ECHO "*** shared version of the library, which you do not appear to have."
6965 echo "*** I have the capability to make that library automatically link in when"
6966 echo "*** you link to this library. But I can only do this if you have a"
6967 echo "*** shared version of the library, which you do not appear to have."
58356968 if test "$module" = yes; then
5836 $ECHO "*** But as you try to build a module library, libtool will still create "
5837 $ECHO "*** a static module, that should work as long as the dlopening application"
5838 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
6969 echo "*** But as you try to build a module library, libtool will still create "
6970 echo "*** a static module, that should work as long as the dlopening application"
6971 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
58396972 if test -z "$global_symbol_pipe"; then
5840 $ECHO
5841 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5842 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5843 $ECHO "*** not find such a program. So, this module is probably useless."
5844 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6973 echo
6974 echo "*** However, this would only work if libtool was able to extract symbol"
6975 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6976 echo "*** not find such a program. So, this module is probably useless."
6977 echo "*** \`nm' from GNU binutils and a full rebuild may help."
58456978 fi
58466979 if test "$build_old_libs" = no; then
58476980 build_libtool_libs=module
58697002 temp_xrpath=$func_stripname_result
58707003 case " $xrpath " in
58717004 *" $temp_xrpath "*) ;;
5872 *) xrpath="$xrpath $temp_xrpath";;
7005 *) func_append xrpath " $temp_xrpath";;
58737006 esac;;
5874 *) temp_deplibs="$temp_deplibs $libdir";;
7007 *) func_append temp_deplibs " $libdir";;
58757008 esac
58767009 done
58777010 dependency_libs="$temp_deplibs"
58787011 fi
58797012
5880 newlib_search_path="$newlib_search_path $absdir"
7013 func_append newlib_search_path " $absdir"
58817014 # Link against this library
58827015 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
58837016 # ... and its dependency_libs
58847017 tmp_libs=
58857018 for deplib in $dependency_libs; do
58867019 newdependency_libs="$deplib $newdependency_libs"
5887 if $opt_duplicate_deps ; then
7020 case $deplib in
7021 -L*) func_stripname '-L' '' "$deplib"
7022 func_resolve_sysroot "$func_stripname_result";;
7023 *) func_resolve_sysroot "$deplib" ;;
7024 esac
7025 if $opt_preserve_dup_deps ; then
58887026 case "$tmp_libs " in
5889 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
7027 *" $func_resolve_sysroot_result "*)
7028 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
58907029 esac
58917030 fi
5892 tmp_libs="$tmp_libs $deplib"
7031 func_append tmp_libs " $func_resolve_sysroot_result"
58937032 done
58947033
58957034 if test "$link_all_deplibs" != no; then
58997038 case $deplib in
59007039 -L*) path="$deplib" ;;
59017040 *.la)
7041 func_resolve_sysroot "$deplib"
7042 deplib=$func_resolve_sysroot_result
59027043 func_dirname "$deplib" "" "."
5903 dir="$func_dirname_result"
7044 dir=$func_dirname_result
59047045 # We need an absolute path.
59057046 case $dir in
59067047 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
59277068 if test -z "$darwin_install_name"; then
59287069 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
59297070 fi
5930 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5931 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
7071 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7072 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
59327073 path=
59337074 fi
59347075 fi
59617102 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
59627103 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
59637104 else
5964 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7105 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
59657106 fi
59667107 fi
59677108 dependency_libs="$newdependency_libs"
59787119 for dir in $newlib_search_path; do
59797120 case "$lib_search_path " in
59807121 *" $dir "*) ;;
5981 *) lib_search_path="$lib_search_path $dir" ;;
7122 *) func_append lib_search_path " $dir" ;;
59827123 esac
59837124 done
59847125 newlib_search_path=
60367177 -L*)
60377178 case " $tmp_libs " in
60387179 *" $deplib "*) ;;
6039 *) tmp_libs="$tmp_libs $deplib" ;;
7180 *) func_append tmp_libs " $deplib" ;;
60407181 esac
60417182 ;;
6042 *) tmp_libs="$tmp_libs $deplib" ;;
7183 *) func_append tmp_libs " $deplib" ;;
60437184 esac
60447185 done
60457186 eval $var=\"$tmp_libs\"
60557196 ;;
60567197 esac
60577198 if test -n "$i" ; then
6058 tmp_libs="$tmp_libs $i"
7199 func_append tmp_libs " $i"
60597200 fi
60607201 done
60617202 dependency_libs=$tmp_libs
60967237 # Now set the variables for building old libraries.
60977238 build_libtool_libs=no
60987239 oldlibs="$output"
6099 objs="$objs$old_deplibs"
7240 func_append objs "$old_deplibs"
61007241 ;;
61017242
61027243 lib)
61297270 if test "$deplibs_check_method" != pass_all; then
61307271 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
61317272 else
6132 $ECHO
7273 echo
61337274 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
61347275 $ECHO "*** objects $objs is not portable!"
6135 libobjs="$libobjs $objs"
7276 func_append libobjs " $objs"
61367277 fi
61377278 fi
61387279
61917332 # which has an extra 1 added just for fun
61927333 #
61937334 case $version_type in
7335 # correct linux to gnu/linux during the next big refactor
61947336 darwin|linux|osf|windows|none)
61957337 func_arith $number_major + $number_minor
61967338 current=$func_arith_result
61977339 age="$number_minor"
61987340 revision="$number_revision"
61997341 ;;
6200 freebsd-aout|freebsd-elf|sunos)
7342 freebsd-aout|freebsd-elf|qnx|sunos)
62017343 current="$number_major"
62027344 revision="$number_minor"
62037345 age="0"
63107452 versuffix="$major.$revision"
63117453 ;;
63127454
6313 linux)
7455 linux) # correct to gnu/linux during the next big refactor
63147456 func_arith $current - $age
63157457 major=.$func_arith_result
63167458 versuffix="$major.$age.$revision"
63337475 done
63347476
63357477 # Make executables depend on our current version.
6336 verstring="$verstring:${current}.0"
7478 func_append verstring ":${current}.0"
63377479 ;;
63387480
63397481 qnx)
64017543 fi
64027544
64037545 func_generate_dlsyms "$libname" "$libname" "yes"
6404 libobjs="$libobjs $symfileobj"
7546 func_append libobjs " $symfileobj"
64057547 test "X$libobjs" = "X " && libobjs=
64067548
6407 if test "$mode" != relink; then
7549 if test "$opt_mode" != relink; then
64087550 # Remove our outputs, but don't remove object files since they
64097551 # may have been created when compiling PIC objects.
64107552 removelist=
64207562 continue
64217563 fi
64227564 fi
6423 removelist="$removelist $p"
7565 func_append removelist " $p"
64247566 ;;
64257567 *) ;;
64267568 esac
64317573
64327574 # Now set the variables for building old libraries.
64337575 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6434 oldlibs="$oldlibs $output_objdir/$libname.$libext"
7576 func_append oldlibs " $output_objdir/$libname.$libext"
64357577
64367578 # Transform .lo files to .o files.
6437 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
7579 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
64387580 fi
64397581
64407582 # Eliminate all temporary directories.
64417583 #for path in $notinst_path; do
6442 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6443 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6444 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
7584 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7585 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7586 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
64457587 #done
64467588
64477589 if test -n "$xrpath"; then
64487590 # If the user specified any rpath flags, then add them.
64497591 temp_xrpath=
64507592 for libdir in $xrpath; do
6451 temp_xrpath="$temp_xrpath -R$libdir"
7593 func_replace_sysroot "$libdir"
7594 func_append temp_xrpath " -R$func_replace_sysroot_result"
64527595 case "$finalize_rpath " in
64537596 *" $libdir "*) ;;
6454 *) finalize_rpath="$finalize_rpath $libdir" ;;
7597 *) func_append finalize_rpath " $libdir" ;;
64557598 esac
64567599 done
64577600 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
64657608 for lib in $old_dlfiles; do
64667609 case " $dlprefiles $dlfiles " in
64677610 *" $lib "*) ;;
6468 *) dlfiles="$dlfiles $lib" ;;
7611 *) func_append dlfiles " $lib" ;;
64697612 esac
64707613 done
64717614
64757618 for lib in $old_dlprefiles; do
64767619 case "$dlprefiles " in
64777620 *" $lib "*) ;;
6478 *) dlprefiles="$dlprefiles $lib" ;;
7621 *) func_append dlprefiles " $lib" ;;
64797622 esac
64807623 done
64817624
64827625 if test "$build_libtool_libs" = yes; then
64837626 if test -n "$rpath"; then
64847627 case $host in
6485 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
7628 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
64867629 # these systems don't actually have a c library (as such)!
64877630 ;;
64887631 *-*-rhapsody* | *-*-darwin1.[012])
64897632 # Rhapsody C library is in the System framework
6490 deplibs="$deplibs System.ltframework"
7633 func_append deplibs " System.ltframework"
64917634 ;;
64927635 *-*-netbsd*)
64937636 # Don't link with libc until the a.out ld.so is fixed.
65047647 *)
65057648 # Add libc to deplibs on all other systems if necessary.
65067649 if test "$build_libtool_need_lc" = "yes"; then
6507 deplibs="$deplibs -lc"
7650 func_append deplibs " -lc"
65087651 fi
65097652 ;;
65107653 esac
65537696 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65547697 case " $predeps $postdeps " in
65557698 *" $i "*)
6556 newdeplibs="$newdeplibs $i"
7699 func_append newdeplibs " $i"
65577700 i=""
65587701 ;;
65597702 esac
65647707 set dummy $deplib_matches; shift
65657708 deplib_match=$1
65667709 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6567 newdeplibs="$newdeplibs $i"
7710 func_append newdeplibs " $i"
65687711 else
65697712 droppeddeps=yes
6570 $ECHO
7713 echo
65717714 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6572 $ECHO "*** I have the capability to make that library automatically link in when"
6573 $ECHO "*** you link to this library. But I can only do this if you have a"
6574 $ECHO "*** shared version of the library, which I believe you do not have"
6575 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6576 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
7715 echo "*** I have the capability to make that library automatically link in when"
7716 echo "*** you link to this library. But I can only do this if you have a"
7717 echo "*** shared version of the library, which I believe you do not have"
7718 echo "*** because a test_compile did reveal that the linker did not use it for"
7719 echo "*** its dynamic dependency list that programs get resolved with at runtime."
65777720 fi
65787721 fi
65797722 ;;
65807723 *)
6581 newdeplibs="$newdeplibs $i"
7724 func_append newdeplibs " $i"
65827725 ;;
65837726 esac
65847727 done
65967739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65977740 case " $predeps $postdeps " in
65987741 *" $i "*)
6599 newdeplibs="$newdeplibs $i"
7742 func_append newdeplibs " $i"
66007743 i=""
66017744 ;;
66027745 esac
66077750 set dummy $deplib_matches; shift
66087751 deplib_match=$1
66097752 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6610 newdeplibs="$newdeplibs $i"
7753 func_append newdeplibs " $i"
66117754 else
66127755 droppeddeps=yes
6613 $ECHO
7756 echo
66147757 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6615 $ECHO "*** I have the capability to make that library automatically link in when"
6616 $ECHO "*** you link to this library. But I can only do this if you have a"
6617 $ECHO "*** shared version of the library, which you do not appear to have"
6618 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6619 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
7758 echo "*** I have the capability to make that library automatically link in when"
7759 echo "*** you link to this library. But I can only do this if you have a"
7760 echo "*** shared version of the library, which you do not appear to have"
7761 echo "*** because a test_compile did reveal that the linker did not use this one"
7762 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
66207763 fi
66217764 fi
66227765 else
66237766 droppeddeps=yes
6624 $ECHO
7767 echo
66257768 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6626 $ECHO "*** make it link in! You will probably need to install it or some"
6627 $ECHO "*** library that it depends on before this library will be fully"
6628 $ECHO "*** functional. Installing it before continuing would be even better."
7769 echo "*** make it link in! You will probably need to install it or some"
7770 echo "*** library that it depends on before this library will be fully"
7771 echo "*** functional. Installing it before continuing would be even better."
66297772 fi
66307773 ;;
66317774 *)
6632 newdeplibs="$newdeplibs $i"
7775 func_append newdeplibs " $i"
66337776 ;;
66347777 esac
66357778 done
66467789 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
66477790 case " $predeps $postdeps " in
66487791 *" $a_deplib "*)
6649 newdeplibs="$newdeplibs $a_deplib"
7792 func_append newdeplibs " $a_deplib"
66507793 a_deplib=""
66517794 ;;
66527795 esac
66537796 fi
66547797 if test -n "$a_deplib" ; then
66557798 libname=`eval "\\$ECHO \"$libname_spec\""`
7799 if test -n "$file_magic_glob"; then
7800 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7801 else
7802 libnameglob=$libname
7803 fi
7804 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
66567805 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6657 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7806 if test "$want_nocaseglob" = yes; then
7807 shopt -s nocaseglob
7808 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7809 $nocaseglob
7810 else
7811 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7812 fi
66587813 for potent_lib in $potential_libs; do
66597814 # Follow soft links.
66607815 if ls -lLd "$potent_lib" 2>/dev/null |
66717826 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
66727827 case $potliblink in
66737828 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6674 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
7829 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
66757830 esac
66767831 done
66777832 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
66787833 $SED -e 10q |
66797834 $EGREP "$file_magic_regex" > /dev/null; then
6680 newdeplibs="$newdeplibs $a_deplib"
7835 func_append newdeplibs " $a_deplib"
66817836 a_deplib=""
66827837 break 2
66837838 fi
66867841 fi
66877842 if test -n "$a_deplib" ; then
66887843 droppeddeps=yes
6689 $ECHO
7844 echo
66907845 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6691 $ECHO "*** I have the capability to make that library automatically link in when"
6692 $ECHO "*** you link to this library. But I can only do this if you have a"
6693 $ECHO "*** shared version of the library, which you do not appear to have"
6694 $ECHO "*** because I did check the linker path looking for a file starting"
7846 echo "*** I have the capability to make that library automatically link in when"
7847 echo "*** you link to this library. But I can only do this if you have a"
7848 echo "*** shared version of the library, which you do not appear to have"
7849 echo "*** because I did check the linker path looking for a file starting"
66957850 if test -z "$potlib" ; then
66967851 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
66977852 else
67027857 ;;
67037858 *)
67047859 # Add a -L argument.
6705 newdeplibs="$newdeplibs $a_deplib"
7860 func_append newdeplibs " $a_deplib"
67067861 ;;
67077862 esac
67087863 done # Gone through all deplibs.
67187873 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67197874 case " $predeps $postdeps " in
67207875 *" $a_deplib "*)
6721 newdeplibs="$newdeplibs $a_deplib"
7876 func_append newdeplibs " $a_deplib"
67227877 a_deplib=""
67237878 ;;
67247879 esac
67297884 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
67307885 for potent_lib in $potential_libs; do
67317886 potlib="$potent_lib" # see symlink-check above in file_magic test
6732 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
7887 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
67337888 $EGREP "$match_pattern_regex" > /dev/null; then
6734 newdeplibs="$newdeplibs $a_deplib"
7889 func_append newdeplibs " $a_deplib"
67357890 a_deplib=""
67367891 break 2
67377892 fi
67407895 fi
67417896 if test -n "$a_deplib" ; then
67427897 droppeddeps=yes
6743 $ECHO
7898 echo
67447899 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6745 $ECHO "*** I have the capability to make that library automatically link in when"
6746 $ECHO "*** you link to this library. But I can only do this if you have a"
6747 $ECHO "*** shared version of the library, which you do not appear to have"
6748 $ECHO "*** because I did check the linker path looking for a file starting"
7900 echo "*** I have the capability to make that library automatically link in when"
7901 echo "*** you link to this library. But I can only do this if you have a"
7902 echo "*** shared version of the library, which you do not appear to have"
7903 echo "*** because I did check the linker path looking for a file starting"
67497904 if test -z "$potlib" ; then
67507905 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
67517906 else
67567911 ;;
67577912 *)
67587913 # Add a -L argument.
6759 newdeplibs="$newdeplibs $a_deplib"
7914 func_append newdeplibs " $a_deplib"
67607915 ;;
67617916 esac
67627917 done # Gone through all deplibs.
67637918 ;;
67647919 none | unknown | *)
67657920 newdeplibs=""
6766 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6767 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
7921 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
67687922 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67697923 for i in $predeps $postdeps ; do
67707924 # can't use Xsed below, because $i might contain '/'
6771 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
7925 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
67727926 done
67737927 fi
6774 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6775 $GREP . >/dev/null; then
6776 $ECHO
7928 case $tmp_deplibs in
7929 *[!\ \ ]*)
7930 echo
67777931 if test "X$deplibs_check_method" = "Xnone"; then
6778 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
7932 echo "*** Warning: inter-library dependencies are not supported in this platform."
67797933 else
6780 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
7934 echo "*** Warning: inter-library dependencies are not known to be supported."
67817935 fi
6782 $ECHO "*** All declared inter-library dependencies are being dropped."
7936 echo "*** All declared inter-library dependencies are being dropped."
67837937 droppeddeps=yes
6784 fi
7938 ;;
7939 esac
67857940 ;;
67867941 esac
67877942 versuffix=$versuffix_save
67937948 case $host in
67947949 *-*-rhapsody* | *-*-darwin1.[012])
67957950 # On Rhapsody replace the C library with the System framework
6796 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7951 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
67977952 ;;
67987953 esac
67997954
68007955 if test "$droppeddeps" = yes; then
68017956 if test "$module" = yes; then
6802 $ECHO
6803 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
7957 echo
7958 echo "*** Warning: libtool could not satisfy all declared inter-library"
68047959 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6805 $ECHO "*** a static module, that should work as long as the dlopening"
6806 $ECHO "*** application is linked with the -dlopen flag."
7960 echo "*** a static module, that should work as long as the dlopening"
7961 echo "*** application is linked with the -dlopen flag."
68077962 if test -z "$global_symbol_pipe"; then
6808 $ECHO
6809 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6810 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6811 $ECHO "*** not find such a program. So, this module is probably useless."
6812 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
7963 echo
7964 echo "*** However, this would only work if libtool was able to extract symbol"
7965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7966 echo "*** not find such a program. So, this module is probably useless."
7967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
68137968 fi
68147969 if test "$build_old_libs" = no; then
68157970 oldlibs="$output_objdir/$libname.$libext"
68197974 build_libtool_libs=no
68207975 fi
68217976 else
6822 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6823 $ECHO "*** automatically added whenever a program is linked with this library"
6824 $ECHO "*** or is declared to -dlopen it."
7977 echo "*** The inter-library dependencies that have been dropped here will be"
7978 echo "*** automatically added whenever a program is linked with this library"
7979 echo "*** or is declared to -dlopen it."
68257980
68267981 if test "$allow_undefined" = no; then
6827 $ECHO
6828 $ECHO "*** Since this library must not contain undefined symbols,"
6829 $ECHO "*** because either the platform does not support them or"
6830 $ECHO "*** it was explicitly requested with -no-undefined,"
6831 $ECHO "*** libtool will only create a static version of it."
7982 echo
7983 echo "*** Since this library must not contain undefined symbols,"
7984 echo "*** because either the platform does not support them or"
7985 echo "*** it was explicitly requested with -no-undefined,"
7986 echo "*** libtool will only create a static version of it."
68327987 if test "$build_old_libs" = no; then
68337988 oldlibs="$output_objdir/$libname.$libext"
68347989 build_libtool_libs=module
68458000 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
68468001 case $host in
68478002 *-*-darwin*)
6848 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6849 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
8003 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8004 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8005 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
68518006 ;;
68528007 esac
68538008
68608015 *)
68618016 case " $deplibs " in
68628017 *" -L$path/$objdir "*)
6863 new_libs="$new_libs -L$path/$objdir" ;;
8018 func_append new_libs " -L$path/$objdir" ;;
68648019 esac
68658020 ;;
68668021 esac
68708025 -L*)
68718026 case " $new_libs " in
68728027 *" $deplib "*) ;;
6873 *) new_libs="$new_libs $deplib" ;;
8028 *) func_append new_libs " $deplib" ;;
68748029 esac
68758030 ;;
6876 *) new_libs="$new_libs $deplib" ;;
8031 *) func_append new_libs " $deplib" ;;
68778032 esac
68788033 done
68798034 deplibs="$new_libs"
68858040
68868041 # Test again, we may have decided not to build it any more
68878042 if test "$build_libtool_libs" = yes; then
8043 # Remove ${wl} instances when linking with ld.
8044 # FIXME: should test the right _cmds variable.
8045 case $archive_cmds in
8046 *\$LD\ *) wl= ;;
8047 esac
68888048 if test "$hardcode_into_libs" = yes; then
68898049 # Hardcode the library paths
68908050 hardcode_libdirs=
68918051 dep_rpath=
68928052 rpath="$finalize_rpath"
6893 test "$mode" != relink && rpath="$compile_rpath$rpath"
8053 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
68948054 for libdir in $rpath; do
68958055 if test -n "$hardcode_libdir_flag_spec"; then
68968056 if test -n "$hardcode_libdir_separator"; then
8057 func_replace_sysroot "$libdir"
8058 libdir=$func_replace_sysroot_result
68978059 if test -z "$hardcode_libdirs"; then
68988060 hardcode_libdirs="$libdir"
68998061 else
69028064 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
69038065 ;;
69048066 *)
6905 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8067 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
69068068 ;;
69078069 esac
69088070 fi
69098071 else
69108072 eval flag=\"$hardcode_libdir_flag_spec\"
6911 dep_rpath="$dep_rpath $flag"
8073 func_append dep_rpath " $flag"
69128074 fi
69138075 elif test -n "$runpath_var"; then
69148076 case "$perm_rpath " in
69158077 *" $libdir "*) ;;
6916 *) perm_rpath="$perm_rpath $libdir" ;;
8078 *) func_append perm_rpath " $libdir" ;;
69178079 esac
69188080 fi
69198081 done
69218083 if test -n "$hardcode_libdir_separator" &&
69228084 test -n "$hardcode_libdirs"; then
69238085 libdir="$hardcode_libdirs"
6924 if test -n "$hardcode_libdir_flag_spec_ld"; then
6925 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6926 else
6927 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6928 fi
8086 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
69298087 fi
69308088 if test -n "$runpath_var" && test -n "$perm_rpath"; then
69318089 # We should set the runpath_var.
69328090 rpath=
69338091 for dir in $perm_rpath; do
6934 rpath="$rpath$dir:"
8092 func_append rpath "$dir:"
69358093 done
69368094 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
69378095 fi
69398097 fi
69408098
69418099 shlibpath="$finalize_shlibpath"
6942 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8100 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
69438101 if test -n "$shlibpath"; then
69448102 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
69458103 fi
69658123 linknames=
69668124 for link
69678125 do
6968 linknames="$linknames $link"
8126 func_append linknames " $link"
69698127 done
69708128
69718129 # Use standard objects if they are pic
6972 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8130 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
69738131 test "X$libobjs" = "X " && libobjs=
69748132
69758133 delfiles=
69768134 if test -n "$export_symbols" && test -n "$include_expsyms"; then
69778135 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
69788136 export_symbols="$output_objdir/$libname.uexp"
6979 delfiles="$delfiles $export_symbols"
8137 func_append delfiles " $export_symbols"
69808138 fi
69818139
69828140 orig_export_symbols=
70078165 $opt_dry_run || $RM $export_symbols
70088166 cmds=$export_symbols_cmds
70098167 save_ifs="$IFS"; IFS='~'
7010 for cmd in $cmds; do
8168 for cmd1 in $cmds; do
70118169 IFS="$save_ifs"
7012 eval cmd=\"$cmd\"
7013 func_len " $cmd"
7014 len=$func_len_result
7015 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8170 # Take the normal branch if the nm_file_list_spec branch
8171 # doesn't work or if tool conversion is not needed.
8172 case $nm_file_list_spec~$to_tool_file_cmd in
8173 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8174 try_normal_branch=yes
8175 eval cmd=\"$cmd1\"
8176 func_len " $cmd"
8177 len=$func_len_result
8178 ;;
8179 *)
8180 try_normal_branch=no
8181 ;;
8182 esac
8183 if test "$try_normal_branch" = yes \
8184 && { test "$len" -lt "$max_cmd_len" \
8185 || test "$max_cmd_len" -le -1; }
8186 then
70168187 func_show_eval "$cmd" 'exit $?'
8188 skipped_export=false
8189 elif test -n "$nm_file_list_spec"; then
8190 func_basename "$output"
8191 output_la=$func_basename_result
8192 save_libobjs=$libobjs
8193 save_output=$output
8194 output=${output_objdir}/${output_la}.nm
8195 func_to_tool_file "$output"
8196 libobjs=$nm_file_list_spec$func_to_tool_file_result
8197 func_append delfiles " $output"
8198 func_verbose "creating $NM input file list: $output"
8199 for obj in $save_libobjs; do
8200 func_to_tool_file "$obj"
8201 $ECHO "$func_to_tool_file_result"
8202 done > "$output"
8203 eval cmd=\"$cmd1\"
8204 func_show_eval "$cmd" 'exit $?'
8205 output=$save_output
8206 libobjs=$save_libobjs
70178207 skipped_export=false
70188208 else
70198209 # The command line is too long to execute in one step.
70358225 if test -n "$export_symbols" && test -n "$include_expsyms"; then
70368226 tmp_export_symbols="$export_symbols"
70378227 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7038 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8228 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
70398229 fi
70408230
70418231 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
70478237 # global variables. join(1) would be nice here, but unfortunately
70488238 # isn't a blessed tool.
70498239 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7050 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8240 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
70518241 export_symbols=$output_objdir/$libname.def
70528242 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
70538243 fi
70578247 case " $convenience " in
70588248 *" $test_deplib "*) ;;
70598249 *)
7060 tmp_deplibs="$tmp_deplibs $test_deplib"
8250 func_append tmp_deplibs " $test_deplib"
70618251 ;;
70628252 esac
70638253 done
70778267 test "X$libobjs" = "X " && libobjs=
70788268 else
70798269 gentop="$output_objdir/${outputname}x"
7080 generated="$generated $gentop"
8270 func_append generated " $gentop"
70818271
70828272 func_extract_archives $gentop $convenience
7083 libobjs="$libobjs $func_extract_archives_result"
8273 func_append libobjs " $func_extract_archives_result"
70848274 test "X$libobjs" = "X " && libobjs=
70858275 fi
70868276 fi
70878277
70888278 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
70898279 eval flag=\"$thread_safe_flag_spec\"
7090 linker_flags="$linker_flags $flag"
8280 func_append linker_flags " $flag"
70918281 fi
70928282
70938283 # Make a backup of the uninstalled library when relinking
7094 if test "$mode" = relink; then
8284 if test "$opt_mode" = relink; then
70958285 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
70968286 fi
70978287
71368326 save_libobjs=$libobjs
71378327 fi
71388328 save_output=$output
7139 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
8329 func_basename "$output"
8330 output_la=$func_basename_result
71408331
71418332 # Clear the reloadable object creation command queue and
71428333 # initialize k to one.
71498340 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
71508341 output=${output_objdir}/${output_la}.lnkscript
71518342 func_verbose "creating GNU ld script: $output"
7152 $ECHO 'INPUT (' > $output
8343 echo 'INPUT (' > $output
71538344 for obj in $save_libobjs
71548345 do
7155 $ECHO "$obj" >> $output
8346 func_to_tool_file "$obj"
8347 $ECHO "$func_to_tool_file_result" >> $output
71568348 done
7157 $ECHO ')' >> $output
7158 delfiles="$delfiles $output"
8349 echo ')' >> $output
8350 func_append delfiles " $output"
8351 func_to_tool_file "$output"
8352 output=$func_to_tool_file_result
71598353 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
71608354 output=${output_objdir}/${output_la}.lnk
71618355 func_verbose "creating linker input file list: $output"
71698363 fi
71708364 for obj
71718365 do
7172 $ECHO "$obj" >> $output
8366 func_to_tool_file "$obj"
8367 $ECHO "$func_to_tool_file_result" >> $output
71738368 done
7174 delfiles="$delfiles $output"
7175 output=$firstobj\"$file_list_spec$output\"
8369 func_append delfiles " $output"
8370 func_to_tool_file "$output"
8371 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
71768372 else
71778373 if test -n "$save_libobjs"; then
71788374 func_verbose "creating reloadable object files..."
71968392 # command to the queue.
71978393 if test "$k" -eq 1 ; then
71988394 # The first file doesn't have a previous command to add.
7199 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
8395 reload_objs=$objlist
8396 eval concat_cmds=\"$reload_cmds\"
72008397 else
72018398 # All subsequent reloadable object files will link in
72028399 # the last one created.
7203 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
8400 reload_objs="$objlist $last_robj"
8401 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
72048402 fi
72058403 last_robj=$output_objdir/$output_la-${k}.$objext
72068404 func_arith $k + 1
72078405 k=$func_arith_result
72088406 output=$output_objdir/$output_la-${k}.$objext
7209 objlist=$obj
8407 objlist=" $obj"
72108408 func_len " $last_robj"
72118409 func_arith $len0 + $func_len_result
72128410 len=$func_arith_result
72168414 # reloadable object file. All subsequent reloadable object
72178415 # files will link in the last one created.
72188416 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7219 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
8417 reload_objs="$objlist $last_robj"
8418 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
72208419 if test -n "$last_robj"; then
72218420 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
72228421 fi
7223 delfiles="$delfiles $output"
8422 func_append delfiles " $output"
72248423
72258424 else
72268425 output=
72548453 lt_exit=$?
72558454
72568455 # Restore the uninstalled library and exit
7257 if test "$mode" = relink; then
8456 if test "$opt_mode" = relink; then
72588457 ( cd "$output_objdir" && \
72598458 $RM "${realname}T" && \
72608459 $MV "${realname}U" "$realname" )
72758474 if test -n "$export_symbols" && test -n "$include_expsyms"; then
72768475 tmp_export_symbols="$export_symbols"
72778476 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7278 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8477 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
72798478 fi
72808479
72818480 if test -n "$orig_export_symbols"; then
72878486 # global variables. join(1) would be nice here, but unfortunately
72888487 # isn't a blessed tool.
72898488 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7290 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8489 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
72918490 export_symbols=$output_objdir/$libname.def
72928491 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
72938492 fi
73288527 # Add any objects from preloaded convenience libraries
73298528 if test -n "$dlprefiles"; then
73308529 gentop="$output_objdir/${outputname}x"
7331 generated="$generated $gentop"
8530 func_append generated " $gentop"
73328531
73338532 func_extract_archives $gentop $dlprefiles
7334 libobjs="$libobjs $func_extract_archives_result"
8533 func_append libobjs " $func_extract_archives_result"
73358534 test "X$libobjs" = "X " && libobjs=
73368535 fi
73378536
73478546 lt_exit=$?
73488547
73498548 # Restore the uninstalled library and exit
7350 if test "$mode" = relink; then
8549 if test "$opt_mode" = relink; then
73518550 ( cd "$output_objdir" && \
73528551 $RM "${realname}T" && \
73538552 $MV "${realname}U" "$realname" )
73598558 IFS="$save_ifs"
73608559
73618560 # Restore the uninstalled library and exit
7362 if test "$mode" = relink; then
8561 if test "$opt_mode" = relink; then
73638562 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
73648563
73658564 if test -n "$convenience"; then
74408639 if test -n "$convenience"; then
74418640 if test -n "$whole_archive_flag_spec"; then
74428641 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7443 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
8642 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
74448643 else
74458644 gentop="$output_objdir/${obj}x"
7446 generated="$generated $gentop"
8645 func_append generated " $gentop"
74478646
74488647 func_extract_archives $gentop $convenience
74498648 reload_conv_objs="$reload_objs $func_extract_archives_result"
74508649 fi
74518650 fi
74528651
8652 # If we're not building shared, we need to use non_pic_objs
8653 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8654
74538655 # Create the old-style object.
7454 reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8656 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
74558657
74568658 output="$obj"
74578659 func_execute_cmds "$reload_cmds" 'exit $?'
75118713 case $host in
75128714 *-*-rhapsody* | *-*-darwin1.[012])
75138715 # On Rhapsody replace the C library is the System framework
7514 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7515 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
8716 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8717 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
75168718 ;;
75178719 esac
75188720
75238725 if test "$tagname" = CXX ; then
75248726 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
75258727 10.[0123])
7526 compile_command="$compile_command ${wl}-bind_at_load"
7527 finalize_command="$finalize_command ${wl}-bind_at_load"
8728 func_append compile_command " ${wl}-bind_at_load"
8729 func_append finalize_command " ${wl}-bind_at_load"
75288730 ;;
75298731 esac
75308732 fi
75318733 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7532 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7533 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
8734 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8735 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
75348736 ;;
75358737 esac
75368738
75448746 *)
75458747 case " $compile_deplibs " in
75468748 *" -L$path/$objdir "*)
7547 new_libs="$new_libs -L$path/$objdir" ;;
8749 func_append new_libs " -L$path/$objdir" ;;
75488750 esac
75498751 ;;
75508752 esac
75548756 -L*)
75558757 case " $new_libs " in
75568758 *" $deplib "*) ;;
7557 *) new_libs="$new_libs $deplib" ;;
8759 *) func_append new_libs " $deplib" ;;
75588760 esac
75598761 ;;
7560 *) new_libs="$new_libs $deplib" ;;
8762 *) func_append new_libs " $deplib" ;;
75618763 esac
75628764 done
75638765 compile_deplibs="$new_libs"
75648766
75658767
7566 compile_command="$compile_command $compile_deplibs"
7567 finalize_command="$finalize_command $finalize_deplibs"
8768 func_append compile_command " $compile_deplibs"
8769 func_append finalize_command " $finalize_deplibs"
75688770
75698771 if test -n "$rpath$xrpath"; then
75708772 # If the user specified any rpath flags, then add them.
75728774 # This is the magic to use -rpath.
75738775 case "$finalize_rpath " in
75748776 *" $libdir "*) ;;
7575 *) finalize_rpath="$finalize_rpath $libdir" ;;
8777 *) func_append finalize_rpath " $libdir" ;;
75768778 esac
75778779 done
75788780 fi
75918793 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
75928794 ;;
75938795 *)
7594 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8796 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
75958797 ;;
75968798 esac
75978799 fi
75988800 else
75998801 eval flag=\"$hardcode_libdir_flag_spec\"
7600 rpath="$rpath $flag"
8802 func_append rpath " $flag"
76018803 fi
76028804 elif test -n "$runpath_var"; then
76038805 case "$perm_rpath " in
76048806 *" $libdir "*) ;;
7605 *) perm_rpath="$perm_rpath $libdir" ;;
8807 *) func_append perm_rpath " $libdir" ;;
76068808 esac
76078809 fi
76088810 case $host in
76118813 case :$dllsearchpath: in
76128814 *":$libdir:"*) ;;
76138815 ::) dllsearchpath=$libdir;;
7614 *) dllsearchpath="$dllsearchpath:$libdir";;
8816 *) func_append dllsearchpath ":$libdir";;
76158817 esac
76168818 case :$dllsearchpath: in
76178819 *":$testbindir:"*) ;;
76188820 ::) dllsearchpath=$testbindir;;
7619 *) dllsearchpath="$dllsearchpath:$testbindir";;
8821 *) func_append dllsearchpath ":$testbindir";;
76208822 esac
76218823 ;;
76228824 esac
76428844 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
76438845 ;;
76448846 *)
7645 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8847 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
76468848 ;;
76478849 esac
76488850 fi
76498851 else
76508852 eval flag=\"$hardcode_libdir_flag_spec\"
7651 rpath="$rpath $flag"
8853 func_append rpath " $flag"
76528854 fi
76538855 elif test -n "$runpath_var"; then
76548856 case "$finalize_perm_rpath " in
76558857 *" $libdir "*) ;;
7656 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
8858 *) func_append finalize_perm_rpath " $libdir" ;;
76578859 esac
76588860 fi
76598861 done
76678869
76688870 if test -n "$libobjs" && test "$build_old_libs" = yes; then
76698871 # Transform all the library objects into standard objects.
7670 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7671 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8872 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8873 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
76728874 fi
76738875
76748876 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
76808882
76818883 wrappers_required=yes
76828884 case $host in
8885 *cegcc* | *mingw32ce*)
8886 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8887 wrappers_required=no
8888 ;;
76838889 *cygwin* | *mingw* )
76848890 if test "$build_libtool_libs" != yes; then
76858891 wrappers_required=no
76868892 fi
7687 ;;
7688 *cegcc)
7689 # Disable wrappers for cegcc, we are cross compiling anyway.
7690 wrappers_required=no
76918893 ;;
76928894 *)
76938895 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
76978899 esac
76988900 if test "$wrappers_required" = no; then
76998901 # Replace the output file specification.
7700 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8902 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77018903 link_command="$compile_command$compile_rpath"
77028904
77038905 # We have no uninstalled library dependencies, so finalize right now.
77048906 exit_status=0
77058907 func_show_eval "$link_command" 'exit_status=$?'
8908
8909 if test -n "$postlink_cmds"; then
8910 func_to_tool_file "$output"
8911 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8912 func_execute_cmds "$postlink_cmds" 'exit $?'
8913 fi
77068914
77078915 # Delete the generated files.
77088916 if test -f "$output_objdir/${outputname}S.${objext}"; then
77268934 # We should set the runpath_var.
77278935 rpath=
77288936 for dir in $perm_rpath; do
7729 rpath="$rpath$dir:"
8937 func_append rpath "$dir:"
77308938 done
77318939 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
77328940 fi
77348942 # We should set the runpath_var.
77358943 rpath=
77368944 for dir in $finalize_perm_rpath; do
7737 rpath="$rpath$dir:"
8945 func_append rpath "$dir:"
77388946 done
77398947 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
77408948 fi
77448952 # We don't need to create a wrapper script.
77458953 link_command="$compile_var$compile_command$compile_rpath"
77468954 # Replace the output file specification.
7747 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8955 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77488956 # Delete the old output file.
77498957 $opt_dry_run || $RM $output
77508958 # Link the executable and exit
77518959 func_show_eval "$link_command" 'exit $?'
8960
8961 if test -n "$postlink_cmds"; then
8962 func_to_tool_file "$output"
8963 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8964 func_execute_cmds "$postlink_cmds" 'exit $?'
8965 fi
8966
77528967 exit $EXIT_SUCCESS
77538968 fi
77548969
77638978 if test "$fast_install" != no; then
77648979 link_command="$finalize_var$compile_command$finalize_rpath"
77658980 if test "$fast_install" = yes; then
7766 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
8981 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
77678982 else
77688983 # fast_install is set to needless
77698984 relink_command=
77758990 fi
77768991
77778992 # Replace the output file specification.
7778 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8993 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
77798994
77808995 # Delete the old output files.
77818996 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
77828997
77838998 func_show_eval "$link_command" 'exit $?'
8999
9000 if test -n "$postlink_cmds"; then
9001 func_to_tool_file "$output_objdir/$outputname"
9002 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9003 func_execute_cmds "$postlink_cmds" 'exit $?'
9004 fi
77849005
77859006 # Now create the wrapper script.
77869007 func_verbose "creating $output"
77999020 fi
78009021 done
78019022 relink_command="(cd `pwd`; $relink_command)"
7802 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7803 fi
7804
7805 # Quote $ECHO for shipping.
7806 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7807 case $progpath in
7808 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7809 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7810 esac
7811 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7812 else
7813 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
9023 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
78149024 fi
78159025
78169026 # Only actually do things if not in dry run mode.
78909100 else
78919101 oldobjs="$old_deplibs $non_pic_objects"
78929102 if test "$preload" = yes && test -f "$symfileobj"; then
7893 oldobjs="$oldobjs $symfileobj"
9103 func_append oldobjs " $symfileobj"
78949104 fi
78959105 fi
78969106 addlibs="$old_convenience"
78989108
78999109 if test -n "$addlibs"; then
79009110 gentop="$output_objdir/${outputname}x"
7901 generated="$generated $gentop"
9111 func_append generated " $gentop"
79029112
79039113 func_extract_archives $gentop $addlibs
7904 oldobjs="$oldobjs $func_extract_archives_result"
9114 func_append oldobjs " $func_extract_archives_result"
79059115 fi
79069116
79079117 # Do each command in the archive commands.
79129122 # Add any objects from preloaded convenience libraries
79139123 if test -n "$dlprefiles"; then
79149124 gentop="$output_objdir/${outputname}x"
7915 generated="$generated $gentop"
9125 func_append generated " $gentop"
79169126
79179127 func_extract_archives $gentop $dlprefiles
7918 oldobjs="$oldobjs $func_extract_archives_result"
9128 func_append oldobjs " $func_extract_archives_result"
79199129 fi
79209130
79219131 # POSIX demands no paths to be encoded in archives. We have
79319141 done | sort | sort -uc >/dev/null 2>&1); then
79329142 :
79339143 else
7934 $ECHO "copying selected object files to avoid basename conflicts..."
9144 echo "copying selected object files to avoid basename conflicts..."
79359145 gentop="$output_objdir/${outputname}x"
7936 generated="$generated $gentop"
9146 func_append generated " $gentop"
79379147 func_mkdir_p "$gentop"
79389148 save_oldobjs=$oldobjs
79399149 oldobjs=
79579167 esac
79589168 done
79599169 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7960 oldobjs="$oldobjs $gentop/$newobj"
9170 func_append oldobjs " $gentop/$newobj"
79619171 ;;
7962 *) oldobjs="$oldobjs $obj" ;;
9172 *) func_append oldobjs " $obj" ;;
79639173 esac
79649174 done
79659175 fi
9176 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9177 tool_oldlib=$func_to_tool_file_result
79669178 eval cmds=\"$old_archive_cmds\"
79679179
79689180 func_len " $cmds"
79699181 len=$func_len_result
79709182 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9183 cmds=$old_archive_cmds
9184 elif test -n "$archiver_list_spec"; then
9185 func_verbose "using command file archive linking..."
9186 for obj in $oldobjs
9187 do
9188 func_to_tool_file "$obj"
9189 $ECHO "$func_to_tool_file_result"
9190 done > $output_objdir/$libname.libcmd
9191 func_to_tool_file "$output_objdir/$libname.libcmd"
9192 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
79719193 cmds=$old_archive_cmds
79729194 else
79739195 # the command line is too long to link in one step, link in parts
80429264 done
80439265 # Quote the link command for shipping.
80449266 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8045 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9267 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
80469268 if test "$hardcode_automatic" = yes ; then
80479269 relink_command=
80489270 fi
80629284 *.la)
80639285 func_basename "$deplib"
80649286 name="$func_basename_result"
8065 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9287 func_resolve_sysroot "$deplib"
9288 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
80669289 test -z "$libdir" && \
80679290 func_fatal_error "\`$deplib' is not a valid libtool archive"
8068 newdependency_libs="$newdependency_libs $libdir/$name"
9291 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
80699292 ;;
8070 *) newdependency_libs="$newdependency_libs $deplib" ;;
9293 -L*)
9294 func_stripname -L '' "$deplib"
9295 func_replace_sysroot "$func_stripname_result"
9296 func_append newdependency_libs " -L$func_replace_sysroot_result"
9297 ;;
9298 -R*)
9299 func_stripname -R '' "$deplib"
9300 func_replace_sysroot "$func_stripname_result"
9301 func_append newdependency_libs " -R$func_replace_sysroot_result"
9302 ;;
9303 *) func_append newdependency_libs " $deplib" ;;
80719304 esac
80729305 done
80739306 dependency_libs="$newdependency_libs"
80819314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
80829315 test -z "$libdir" && \
80839316 func_fatal_error "\`$lib' is not a valid libtool archive"
8084 newdlfiles="$newdlfiles $libdir/$name"
9317 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
80859318 ;;
8086 *) newdlfiles="$newdlfiles $lib" ;;
9319 *) func_append newdlfiles " $lib" ;;
80879320 esac
80889321 done
80899322 dlfiles="$newdlfiles"
81009333 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
81019334 test -z "$libdir" && \
81029335 func_fatal_error "\`$lib' is not a valid libtool archive"
8103 newdlprefiles="$newdlprefiles $libdir/$name"
9336 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
81049337 ;;
81059338 esac
81069339 done
81129345 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81139346 *) abs=`pwd`"/$lib" ;;
81149347 esac
8115 newdlfiles="$newdlfiles $abs"
9348 func_append newdlfiles " $abs"
81169349 done
81179350 dlfiles="$newdlfiles"
81189351 newdlprefiles=
81219354 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81229355 *) abs=`pwd`"/$lib" ;;
81239356 esac
8124 newdlprefiles="$newdlprefiles $abs"
9357 func_append newdlprefiles " $abs"
81259358 done
81269359 dlprefiles="$newdlprefiles"
81279360 fi
81289361 $RM $output
81299362 # place dlname in correct position for cygwin
9363 # In fact, it would be nice if we could use this code for all target
9364 # systems that can't hard-code library paths into their executables
9365 # and that have no shared library path variable independent of PATH,
9366 # but it turns out we can't easily determine that from inspecting
9367 # libtool variables, so we have to hard-code the OSs to which it
9368 # applies here; at the moment, that means platforms that use the PE
9369 # object format with DLL files. See the long comment at the top of
9370 # tests/bindir.at for full details.
81309371 tdlname=$dlname
81319372 case $host,$output,$installed,$module,$dlname in
8132 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
9373 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9374 # If a -bindir argument was supplied, place the dll there.
9375 if test "x$bindir" != x ;
9376 then
9377 func_relative_path "$install_libdir" "$bindir"
9378 tdlname=$func_relative_path_result$dlname
9379 else
9380 # Otherwise fall back on heuristic.
9381 tdlname=../bin/$dlname
9382 fi
9383 ;;
81339384 esac
81349385 $ECHO > $output "\
81359386 # $outputname - a libtool library file
81889439 exit $EXIT_SUCCESS
81899440 }
81909441
8191 { test "$mode" = link || test "$mode" = relink; } &&
9442 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
81929443 func_mode_link ${1+"$@"}
81939444
81949445
82089459 for arg
82099460 do
82109461 case $arg in
8211 -f) RM="$RM $arg"; rmforce=yes ;;
8212 -*) RM="$RM $arg" ;;
8213 *) files="$files $arg" ;;
9462 -f) func_append RM " $arg"; rmforce=yes ;;
9463 -*) func_append RM " $arg" ;;
9464 *) func_append files " $arg" ;;
82149465 esac
82159466 done
82169467
82199470
82209471 rmdirs=
82219472
8222 origobjdir="$objdir"
82239473 for file in $files; do
82249474 func_dirname "$file" "" "."
82259475 dir="$func_dirname_result"
82269476 if test "X$dir" = X.; then
8227 objdir="$origobjdir"
9477 odir="$objdir"
82289478 else
8229 objdir="$dir/$origobjdir"
9479 odir="$dir/$objdir"
82309480 fi
82319481 func_basename "$file"
82329482 name="$func_basename_result"
8233 test "$mode" = uninstall && objdir="$dir"
8234
8235 # Remember objdir for removal later, being careful to avoid duplicates
8236 if test "$mode" = clean; then
9483 test "$opt_mode" = uninstall && odir="$dir"
9484
9485 # Remember odir for removal later, being careful to avoid duplicates
9486 if test "$opt_mode" = clean; then
82379487 case " $rmdirs " in
8238 *" $objdir "*) ;;
8239 *) rmdirs="$rmdirs $objdir" ;;
9488 *" $odir "*) ;;
9489 *) func_append rmdirs " $odir" ;;
82409490 esac
82419491 fi
82429492
82629512
82639513 # Delete the libtool libraries and symlinks.
82649514 for n in $library_names; do
8265 rmfiles="$rmfiles $objdir/$n"
9515 func_append rmfiles " $odir/$n"
82669516 done
8267 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8268
8269 case "$mode" in
9517 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9518
9519 case "$opt_mode" in
82709520 clean)
8271 case " $library_names " in
8272 # " " in the beginning catches empty $dlname
9521 case " $library_names " in
82739522 *" $dlname "*) ;;
8274 *) rmfiles="$rmfiles $objdir/$dlname" ;;
9523 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
82759524 esac
8276 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
9525 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
82779526 ;;
82789527 uninstall)
82799528 if test -n "$library_names"; then
83019550 # Add PIC object to the list of files to remove.
83029551 if test -n "$pic_object" &&
83039552 test "$pic_object" != none; then
8304 rmfiles="$rmfiles $dir/$pic_object"
9553 func_append rmfiles " $dir/$pic_object"
83059554 fi
83069555
83079556 # Add non-PIC object to the list of files to remove.
83089557 if test -n "$non_pic_object" &&
83099558 test "$non_pic_object" != none; then
8310 rmfiles="$rmfiles $dir/$non_pic_object"
9559 func_append rmfiles " $dir/$non_pic_object"
83119560 fi
83129561 fi
83139562 ;;
83149563
83159564 *)
8316 if test "$mode" = clean ; then
9565 if test "$opt_mode" = clean ; then
83179566 noexename=$name
83189567 case $file in
83199568 *.exe)
83239572 noexename=$func_stripname_result
83249573 # $file with .exe has already been added to rmfiles,
83259574 # add $file without .exe
8326 rmfiles="$rmfiles $file"
9575 func_append rmfiles " $file"
83279576 ;;
83289577 esac
83299578 # Do a test to see if this is a libtool program.
83329581 func_ltwrapper_scriptname "$file"
83339582 relink_command=
83349583 func_source $func_ltwrapper_scriptname_result
8335 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
9584 func_append rmfiles " $func_ltwrapper_scriptname_result"
83369585 else
83379586 relink_command=
83389587 func_source $dir/$noexename
83409589
83419590 # note $name still contains .exe if it was in $file originally
83429591 # as does the version of $file that was added into $rmfiles
8343 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
9592 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
83449593 if test "$fast_install" = yes && test -n "$relink_command"; then
8345 rmfiles="$rmfiles $objdir/lt-$name"
9594 func_append rmfiles " $odir/lt-$name"
83469595 fi
83479596 if test "X$noexename" != "X$name" ; then
8348 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
9597 func_append rmfiles " $odir/lt-${noexename}.c"
83499598 fi
83509599 fi
83519600 fi
83539602 esac
83549603 func_show_eval "$RM $rmfiles" 'exit_status=1'
83559604 done
8356 objdir="$origobjdir"
83579605
83589606 # Try to remove the ${objdir}s in the directories where we deleted files
83599607 for dir in $rmdirs; do
83659613 exit $exit_status
83669614 }
83679615
8368 { test "$mode" = uninstall || test "$mode" = clean; } &&
9616 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
83699617 func_mode_uninstall ${1+"$@"}
83709618
8371 test -z "$mode" && {
9619 test -z "$opt_mode" && {
83729620 help="$generic_help"
83739621 func_fatal_help "you must specify a MODE"
83749622 }
83759623
83769624 test -z "$exec_cmd" && \
8377 func_fatal_help "invalid operation mode \`$mode'"
9625 func_fatal_help "invalid operation mode \`$opt_mode'"
83789626
83799627 if test -n "$exec_cmd"; then
83809628 eval exec "$exec_cmd"
00 #! /bin/sh
11 # Common stub for a few missing GNU programs while installing.
22
3 scriptversion=2009-04-28.21; # UTC
3 scriptversion=2012-01-06.13; # UTC
44
55 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
6 # 2008, 2009 Free Software Foundation, Inc.
6 # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
77 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
88
99 # This program is free software; you can redistribute it and/or modify
8383 help2man touch the output file
8484 lex create \`lex.yy.c', if possible, from existing .c
8585 makeinfo touch the output file
86 tar try tar, gnutar, gtar, then tar without non-portable flags
8786 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
8887
8988 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
119118 case $1 in
120119 lex*|yacc*)
121120 # Not GNU programs, they don't have --version.
122 ;;
123
124 tar*)
125 if test -n "$run"; then
126 echo 1>&2 "ERROR: \`tar' requires --run"
127 exit 1
128 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
129 exit 1
130 fi
131121 ;;
132122
133123 *)
225215 \`Bison' from any GNU archive site."
226216 rm -f y.tab.c y.tab.h
227217 if test $# -ne 1; then
228 eval LASTARG="\${$#}"
218 eval LASTARG=\${$#}
229219 case $LASTARG in
230220 *.y)
231221 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
255245 \`Flex' from any GNU archive site."
256246 rm -f lex.yy.c
257247 if test $# -ne 1; then
258 eval LASTARG="\${$#}"
248 eval LASTARG=\${$#}
259249 case $LASTARG in
260250 *.l)
261251 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
317307 touch $file
318308 ;;
319309
320 tar*)
321 shift
322
323 # We have already tried tar in the generic part.
324 # Look for gnutar/gtar before invocation to avoid ugly error
325 # messages.
326 if (gnutar --version > /dev/null 2>&1); then
327 gnutar "$@" && exit 0
328 fi
329 if (gtar --version > /dev/null 2>&1); then
330 gtar "$@" && exit 0
331 fi
332 firstarg="$1"
333 if shift; then
334 case $firstarg in
335 *o*)
336 firstarg=`echo "$firstarg" | sed s/o//`
337 tar "$firstarg" "$@" && exit 0
338 ;;
339 esac
340 case $firstarg in
341 *h*)
342 firstarg=`echo "$firstarg" | sed s/h//`
343 tar "$firstarg" "$@" && exit 0
344 ;;
345 esac
346 fi
347
348 echo 1>&2 "\
349 WARNING: I can't seem to be able to run \`tar' with the given arguments.
350 You may want to install GNU tar or Free paxutils, or check the
351 command line arguments."
352 exit 1
353 ;;
354
355310 *)
356311 echo 1>&2 "\
357312 WARNING: \`$1' is needed, and is $msg.
0 %global snapshot 0
01 Summary: Off-The-Record Messaging library and toolkit
12 Name: libotr
23 Version: 4.0.0
34 Release: 1%{?dist}
45 License: GPLv2 and LGPLv2
56 Group: System Environment/Libraries
6 Source0: http://otr.cypherpunks.ca/%{name}-%{version}.tar.gz
7 Url: http://otr.cypherpunks.ca/
7 Source0: https://otr.cypherpunks.ca/%{name}-%{version}.tar.gz
8 Url: https://otr.cypherpunks.ca/
89 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
910 Provides: libotr-toolkit = %{version}
1011 Obsoletes: libotr-toolkit < %{version}
11 Requires: libgcrypt >= 1.2.0,
12 BuildRequires: libgcrypt-devel >= 1.2.0, libgpg-error-devel
12 Requires: libgcrypt >= 1.2.0
13 Requires: pkgconfig
14 BuildRequires: libgcrypt-devel >= 1.2.0, libgpg-error-devel
15 %if %{snapshot}
16 Buildrequires: libtool automake autoconf
17 %endif
1318
1419 %description
1520 Off-the-Record Messaging Library and Toolkit
2328 Requires: %{name} = %{version}-%{release}, libgcrypt-devel >= 1.2.0
2429
2530 %description devel
26
27 The devel package contains the libotr library and the include files
31 The devel package contains the libotr library and include files.
2832
2933 %prep
3034 %setup -q
3135
36 %if %{snapshot}
37 aclocal
38 intltoolize --force --copy
39 autoreconf -s -i
40 %endif
41
3242 %build
33 if [ \! -f configure ]; then
34 echo "Building from pre-release"
35 autoreconf -s -i
36 fi
37
38 %configure --with-pic --disable-rpath
43 %configure --with-pic --disable-rpath --disable-static
44 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
45 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
3946 make %{?_smp_mflags} all
4047
4148 %install
6471 %defattr(-,root,root,-)
6572 %doc ChangeLog
6673 %{_libdir}/libotr.so
67 %{_libdir}/libotr.a
6874 %{_libdir}/pkgconfig/libotr.pc
6975 %dir %{_includedir}/libotr
7076 %{_includedir}/libotr/*
7278
7379
7480 %changelog
75 * Thu Jun 11 2009 Paul Wouters <paul@xelerance.com> - 4.0.0-1
76 - Upgraded to 4.0.0.
77 - Fix license tag
81 * Sat Jul 27 2013 Paul Wouters <pwouters@redhat.com> - 4.0.0-1
82 - Upgraded to libotr-4.0.0
83 - Since this is API incompatible, there is also a libotr3 package
7884
79 * Thu Jul 26 2007 Paul Wouters <paul@cypherpunks.ca> 3.1.0-preview2
85 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
86 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
87
88 * Wed Aug 15 2012 Paul Wouters <pwouters@redhat.com> - 3.2.1-1
89 - Updated to 3.2.1, updates patch for rhbz#846377, CVE-2012-3461
90
91 * Wed Aug 08 2012 Paul Wouters <pwouters@redhat.com> - 3.2.0-9
92 - Patch for Multiple heap-based buffer overflows in the Base64 decoder
93 (rhbz#846377, upstream will not release 3.2.1 for this)
94
95 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-8
96 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
97
98 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-7
99 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
100
101 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-6
102 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
103
104 * Mon May 24 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2.0-5
105 - disable static libs
106 - disable rpath
107
108 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-4
109 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
110
111 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-3
112 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
113
114 * Thu Aug 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2.0-2
115 - fix license tag
116
117 * Sun Jun 15 2008 Paul Wouters <paul@cypherpunks.ca> 3.2.0-1
118 - Upgraded to 3.2.0
119
120 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.1.0-2
121 - Autorebuild for GCC 4.3
122
123 * Wed Aug 1 2007 Paul Wouters <paul@cypherpunks.ca> 3.1.0-1
80124 - Upgraded to current version
125 - Updated URLS and configure line
126
127 * Mon Sep 11 2006 Paul Wouters <paul@cypherpunks.ca> 3.0.0-2
128 - Rebuild requested for PT_GNU_HASH support from gcc
81129
82130 * Mon Oct 17 2005 Paul Wouters <paul@cypherpunks.ca> 3.0.0-1
83131 - Minor change to allow for new documentation files. Fixed Requires:
90138
91139 * Tue May 3 2005 Ian Goldberg <ian@cypherpunks.ca>
92140 - Bumped version number to 2.0.2
93
94141 * Wed Feb 16 2005 Ian Goldberg <ian@cypherpunks.ca>
95142 - Bumped version number to 2.0.1
96
97143 * Tue Feb 8 2005 Ian Goldberg <ian@cypherpunks.ca>
98144 - Bumped version number to 2.0.0
99
100145 * Wed Feb 2 2005 Ian Goldberg <ian@cypherpunks.ca>
101146 - Added libotr.m4 to the devel package
102147 - Bumped version number to 1.99.0
103
104148 * Wed Jan 19 2005 Paul Wouters <paul@cypherpunks.ca>
105149 - Updated spec file for the gaim-otr libotr split
106
107150 * Tue Dec 21 2004 Ian Goldberg <otr@cypherpunks.ca>
108151 - Bumped to version 1.0.2.
109
110152 * Fri Dec 17 2004 Paul Wouters <paul@cypherpunks.ca>
111153 - instll fix for x86_64
112
113154 * Sun Dec 12 2004 Ian Goldberg <otr@cypherpunks.ca>
114155 - Bumped to version 1.0.0.
115
116156 * Fri Dec 10 2004 Ian Goldberg <otr@cypherpunks.ca>
117157 - Bumped to version 0.9.9rc2.
118
119158 * Thu Dec 9 2004 Ian Goldberg <otr@cypherpunks.ca>
120159 - Added CFLAGS to "make all", removed DESTDIR
121
122160 * Wed Dec 8 2004 Ian Goldberg <otr@cypherpunks.ca>
123161 - Bumped to version 0.9.9rc1.
124
125162 * Fri Dec 3 2004 Ian Goldberg <otr@cypherpunks.ca>
126163 - Bumped to version 0.9.1.
127
128164 * Wed Dec 1 2004 Paul Wouters <paul@cypherpunks.ca>
129165 - Bumped to version 0.9.0.
130166 - Fixed install for tools and cos
131167 - Added Obsoletes: target for otr-plugin so rpm-Uhv gaim-otr removes it.
132
133168 * Mon Nov 22 2004 Ian Goldberg <otr@cypherpunks.ca>
134169 - Bumped version to 0.8.1
135170 * Sun Nov 21 2004 Paul Wouters <paul@cypherpunks.ca>
0 INCLUDES = @LIBGCRYPT_CFLAGS@
0 AM_CPPFLAGS = @LIBGCRYPT_CFLAGS@
11
22 lib_LTLIBRARIES = libotr.la
33
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
66 # This Makefile.in is free software; the Free Software Foundation
77 # gives unlimited permission to copy and/or distribute it,
88 # with or without modifications, as long as this notice is preserved.
3838 DIST_COMMON = $(otrinc_HEADERS) $(srcdir)/Makefile.am \
3939 $(srcdir)/Makefile.in
4040 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
41 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
42 $(top_srcdir)/config/ltoptions.m4 \
43 $(top_srcdir)/config/ltsugar.m4 \
44 $(top_srcdir)/config/ltversion.m4 \
45 $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac
4246 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4347 $(ACLOCAL_M4)
4448 mkinstalldirs = $(install_sh) -d
6670 am__base_list = \
6771 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
6872 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
73 am__uninstall_files_from_dir = { \
74 test -z "$$files" \
75 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
76 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
77 $(am__cd) "$$dir" && rm -f $$files; }; \
78 }
6979 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(otrincdir)"
7080 LTLIBRARIES = $(lib_LTLIBRARIES)
7181 libotr_la_LIBADD =
7383 mem.lo message.lo userstate.lo tlv.lo auth.lo sm.lo \
7484 context_priv.lo instag.lo
7585 libotr_la_OBJECTS = $(am_libotr_la_OBJECTS)
76 libotr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
86 AM_V_lt = $(am__v_lt_@AM_V@)
87 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
88 am__v_lt_0 = --silent
89 libotr_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
7790 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
7891 $(libotr_la_LDFLAGS) $(LDFLAGS) -o $@
7992 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
80 depcomp = $(SHELL) $(top_srcdir)/depcomp
93 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
8194 am__depfiles_maybe = depfiles
8295 am__mv = mv -f
8396 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
8497 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
85 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
86 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
87 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
98 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
99 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
100 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
101 $(AM_CFLAGS) $(CFLAGS)
102 AM_V_CC = $(am__v_CC_@AM_V@)
103 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
104 am__v_CC_0 = @echo " CC " $@;
105 AM_V_at = $(am__v_at_@AM_V@)
106 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
107 am__v_at_0 = @
88108 CCLD = $(CC)
89 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
90 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
91 $(LDFLAGS) -o $@
109 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
110 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
111 $(AM_LDFLAGS) $(LDFLAGS) -o $@
112 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
113 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
114 am__v_CCLD_0 = @echo " CCLD " $@;
115 AM_V_GEN = $(am__v_GEN_@AM_V@)
116 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
117 am__v_GEN_0 = @echo " GEN " $@;
92118 SOURCES = $(libotr_la_SOURCES)
93119 DIST_SOURCES = $(libotr_la_SOURCES)
94120 HEADERS = $(otrinc_HEADERS)
97123 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98124 ACLOCAL = @ACLOCAL@
99125 AMTAR = @AMTAR@
126 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
100127 AR = @AR@
101128 AUTOCONF = @AUTOCONF@
102129 AUTOHEADER = @AUTOHEADER@
110137 CYGPATH_W = @CYGPATH_W@
111138 DEFS = @DEFS@
112139 DEPDIR = @DEPDIR@
140 DLLTOOL = @DLLTOOL@
113141 DSYMUTIL = @DSYMUTIL@
114142 DUMPBIN = @DUMPBIN@
115143 ECHO_C = @ECHO_C@
137165 LN_S = @LN_S@
138166 LTLIBOBJS = @LTLIBOBJS@
139167 MAKEINFO = @MAKEINFO@
168 MANIFEST_TOOL = @MANIFEST_TOOL@
140169 MKDIR_P = @MKDIR_P@
141170 NM = @NM@
142171 NMEDIT = @NMEDIT@
162191 abs_srcdir = @abs_srcdir@
163192 abs_top_builddir = @abs_top_builddir@
164193 abs_top_srcdir = @abs_top_srcdir@
194 ac_ct_AR = @ac_ct_AR@
165195 ac_ct_CC = @ac_ct_CC@
166196 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
167197 am__include = @am__include@
194224 libexecdir = @libexecdir@
195225 localedir = @localedir@
196226 localstatedir = @localstatedir@
197 lt_ECHO = @lt_ECHO@
198227 mandir = @mandir@
199228 mkdir_p = @mkdir_p@
200229 oldincludedir = @oldincludedir@
210239 top_build_prefix = @top_build_prefix@
211240 top_builddir = @top_builddir@
212241 top_srcdir = @top_srcdir@
213 INCLUDES = @LIBGCRYPT_CFLAGS@
242 AM_CPPFLAGS = @LIBGCRYPT_CFLAGS@
214243 lib_LTLIBRARIES = libotr.la
215244 libotr_la_SOURCES = privkey.c context.c proto.c b64.c dh.c mem.c message.c \
216245 userstate.c tlv.c auth.c sm.c context_priv.c instag.c
286315 echo "rm -f \"$${dir}/so_locations\""; \
287316 rm -f "$${dir}/so_locations"; \
288317 done
289 libotr.la: $(libotr_la_OBJECTS) $(libotr_la_DEPENDENCIES)
290 $(libotr_la_LINK) -rpath $(libdir) $(libotr_la_OBJECTS) $(libotr_la_LIBADD) $(LIBS)
318 libotr.la: $(libotr_la_OBJECTS) $(libotr_la_DEPENDENCIES) $(EXTRA_libotr_la_DEPENDENCIES)
319 $(AM_V_CCLD)$(libotr_la_LINK) -rpath $(libdir) $(libotr_la_OBJECTS) $(libotr_la_LIBADD) $(LIBS)
291320
292321 mostlyclean-compile:
293322 -rm -f *.$(OBJEXT)
310339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userstate.Plo@am__quote@
311340
312341 .c.o:
313 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
314 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
315 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
342 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
343 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
344 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
316345 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
317 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
346 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
318347
319348 .c.obj:
320 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
321 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
322 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
349 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
350 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
351 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
323352 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
324 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
353 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
325354
326355 .c.lo:
327 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
328 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
329 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
356 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
357 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
358 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
330359 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
331 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
360 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
332361
333362 mostlyclean-libtool:
334363 -rm -f *.lo
352381 @$(NORMAL_UNINSTALL)
353382 @list='$(otrinc_HEADERS)'; test -n "$(otrincdir)" || list=; \
354383 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
355 test -n "$$files" || exit 0; \
356 echo " ( cd '$(DESTDIR)$(otrincdir)' && rm -f" $$files ")"; \
357 cd "$(DESTDIR)$(otrincdir)" && rm -f $$files
384 dir='$(DESTDIR)$(otrincdir)'; $(am__uninstall_files_from_dir)
358385
359386 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
360387 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
455482
456483 installcheck: installcheck-am
457484 install-strip:
458 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
459 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
460 `test -z '$(STRIP)' || \
461 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
485 if test -z '$(STRIP)'; then \
486 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
487 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
488 install; \
489 else \
490 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
491 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
492 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
493 fi
462494 mostlyclean-generic:
463495
464496 clean-generic:
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
2930 #include "serial.h"
3031 #include "proto.h"
3132 #include "context.h"
33 #include "mem.h"
3234
3335 #if OTRL_DEBUGGING
3436 #include <stdio.h>
369371 * while in case some other logged in instance of our buddy
370372 * replied with a DHKEY message. In that case, use the
371373 * incoming parameters. Otherwise, compare the hashgx
372 * values to see which one wins. */
374 * values to see which one wins.
375 *
376 * This does NOT use constant time comparison because these
377 * are two public values thus don't need it. Also, this checks
378 * which pubkey is larger and not if they are the same. */
373379 if (!is_master && memcmp(auth->hashgx, hashbuf, 32) > 0) {
374380 /* Ours wins. Ignore the message we received, and just
375381 * resend the same D-H Commit message again. */
975981 /* Check the hash */
976982 gcry_md_hash_buffer(GCRY_MD_SHA256, hashbuf, gxbuf,
977983 auth->encgx_len);
978 if (memcmp(hashbuf, auth->hashgx, 32)) goto decfail;
984 /* This isn't comparing secret data, but may as well use the
985 * constant-time version. */
986 if (otrl_mem_differ(hashbuf, auth->hashgx, 32)) goto decfail;
979987
980988 /* Extract g^x */
981989 bufp = gxbuf;
10041012 gcry_md_reset(auth->mac_m2);
10051013 gcry_md_write(auth->mac_m2, authstart, authend - authstart);
10061014
1007 if (memcmp(macstart,
1015 if (otrl_mem_differ(macstart,
10081016 gcry_md_read(auth->mac_m2, GCRY_MD_SHA256),
10091017 20)) goto invval;
10101018
11201128 /* Check the MAC */
11211129 gcry_md_reset(auth->mac_m2p);
11221130 gcry_md_write(auth->mac_m2p, authstart, authend - authstart);
1123 if (memcmp(macstart,
1131 if (otrl_mem_differ(macstart,
11241132 gcry_md_read(auth->mac_m2p, GCRY_MD_SHA256),
11251133 20)) goto invval;
11261134
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
247248 * add_app_data(data, context) so that app_data and app_data_free can be
248249 * filled in by the application, and set *addedp to 1.
249250 * In the 'their_instance' field note that you can also specify a 'meta-
250 * instance' value such as OTRL_INSTAG_MASTER, OTRL_INSTAL_RECENT,
251 * instance' value such as OTRL_INSTAG_MASTER, OTRL_INSTAG_RECENT,
251252 * OTRL_INSTAG_RECENT_RECEIVED and OTRL_INSTAG_RECENT_SENT. */
252253 ConnContext * otrl_context_find(OtrlUserState us, const char *user,
253254 const char *accountname, const char *protocol,
482483 for (c_iter = context; c_iter &&
483484 c_iter->m_context == context->m_context;
484485 c_iter = c_iter->next) {
485 if (context->msgstate != OTRL_MSGSTATE_PLAINTEXT) return 1;
486 if (c_iter->msgstate != OTRL_MSGSTATE_PLAINTEXT) return 1;
486487 }
487488
488489 c_iter = context->next;
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
179180 /* Forget all the contexts in a given OtrlUserState. */
180181 void otrl_context_forget_all(OtrlUserState us);
181182
183 /* Find requested recent instance */
184 ConnContext * otrl_context_find_recent_instance(ConnContext * context,
185 otrl_instag_t recent_instag);
186
187 /* Find the instance of this context that has the best security level, and for
188 * which we have most recently received a message from. Note that most recent
189 * in this case is limited to a one-second resolution. */
190 ConnContext * otrl_context_find_recent_secure_instance(ConnContext * context);
191
182192 #endif
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Willy Lew,
3 * Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
137138 }
138139
139140 /* Calculate the shared secret MPI */
140 gab = gcry_mpi_new(DH1536_MOD_LEN_BITS);
141 gab = gcry_mpi_snew(DH1536_MOD_LEN_BITS);
141142 gcry_mpi_powm(gab, y, kp->priv, DH1536_MODULUS);
142143
143144 /* Output it in the right format */
255256 }
256257
257258 /* Calculate the shared secret MPI */
258 s = gcry_mpi_new(DH1536_MOD_LEN_BITS);
259 s = gcry_mpi_snew(DH1536_MOD_LEN_BITS);
259260 gcry_mpi_powm(s, their_pub, our_dh->priv, DH1536_MODULUS);
260261
261262 /* Output it in the right format */
380381 }
381382
382383 /* Calculate the shared secret MPI */
383 s = gcry_mpi_new(DH1536_MOD_LEN_BITS);
384 s = gcry_mpi_snew(DH1536_MOD_LEN_BITS);
384385 gcry_mpi_powm(s, their_pub, our_dh->priv, DH1536_MODULUS);
385386
386387 /* Output it in the right format */
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Willy Lew,
3 * Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
161162 otrl_mem_free
162163 );
163164 }
165
166 /* Compare two memory blocks in time dependent on the length of the
167 * blocks, but not their contents. Returns 1 if they differ, 0 if they
168 * are the same. */
169 int otrl_mem_differ(const unsigned char *buf1, const unsigned char *buf2,
170 size_t len)
171 {
172 volatile unsigned char diff = 0;
173 size_t i;
174
175 for (i = 0; i < len; ++i) {
176 diff |= (buf1[i] ^ buf2[i]);
177 }
178 return (diff != 0);
179 }
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Willy Lew,
3 * Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
2021 #ifndef __MEM_H__
2122 #define __MEM_H__
2223
24 #include <stdlib.h>
25
2326 void otrl_mem_init(void);
2427
28 /* Compare two memory blocks in time dependent on the length of the
29 * blocks, but not their contents. Returns 1 if they differ, 0 if they
30 * are the same. */
31 int otrl_mem_differ(const unsigned char *buf1, const unsigned char *buf2,
32 size_t len);
33
2534 #endif
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
440441 /* Fragment and send according to policy */
441442 if (!err && messagep && *messagep) {
442443 if (context) {
443 err = fragment_and_send(ops, NULL, context, *messagep,
444 fragPolicy, messagep);
444 char *rmessagep = NULL;
445 err = fragment_and_send(ops, opdata, context, *messagep,
446 fragPolicy, &rmessagep);
447 if (rmessagep) {
448 /* Free the current message pointer and return back the
449 * returned fragmented one. */
450 free(*messagep);
451 *messagep = rmessagep;
452 }
445453 }
446454 }
447455 return err;
929937 OtrlMessageType msgtype;
930938 int context_added = 0;
931939 OtrlPolicy policy = OTRL_POLICY_DEFAULT;
932 int fragment_assembled = 0;
933940 char *unfragmessage = NULL, *otrtag = NULL;
934941 EncrData edata;
935942 otrl_instag_t our_instance = 0, their_instance = 0;
10131020 return 1;
10141021 case OTRL_FRAGMENT_COMPLETE:
10151022 /* We've got a new complete message, in unfragmessage. */
1016 fragment_assembled = 1;
10171023 message = unfragmessage;
10181024 otrtag = strstr(message, "?OTR");
10191025 break;
10381044 if (((version == 3) && !(policy & OTRL_POLICY_ALLOW_V3))
10391045 || ((version == 2) && !(policy & OTRL_POLICY_ALLOW_V2))
10401046 || ((version == 1) && !(policy & OTRL_POLICY_ALLOW_V1))) {
1041 return 1;
1047 edata.ignore_message = 1;
1048 goto end;
10421049 }
10431050 /* Check the to and from instance tags */
10441051 if (version == 3) {
10561063 OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE,
10571064 m_context, NULL, gcry_error(GPG_ERR_NO_ERROR));
10581065 }
1059 return 1; /* ignore message intended for a different instance */
1066 /* ignore message intended for a different instance */
1067 edata.ignore_message = 1;
1068 goto end;
10601069 }
10611070
10621071 if (their_instance >= OTRL_MIN_VALID_INSTAG) {
10681077
10691078 if (err || their_instance < OTRL_MIN_VALID_INSTAG) {
10701079 message_malformed(ops, opdata, context);
1071 return 1;
1080 edata.ignore_message = 1;
1081 goto end;
10721082 }
10731083
10741084 if (context_added) {
10771087 /* Copy information from m_context to the new instance context */
10781088 context->auth.protocol_version = 3;
10791089 context->protocol_version = 3;
1080
1081 if (context_added) {
1082 context->msgstate = m_context->msgstate;
1090 context->msgstate = m_context->msgstate;
1091
1092 if (m_context->context_priv->may_retransmit) {
1093 gcry_free(context->context_priv->lastmessage);
1094 context->context_priv->lastmessage = m_context->context_priv->lastmessage;
1095 m_context->context_priv->lastmessage = NULL;
1096 context->context_priv->may_retransmit = m_context->context_priv->may_retransmit;
1097 m_context->context_priv->may_retransmit = 0;
10831098 }
10841099
10851100 if (msgtype == OTRL_MSGTYPE_DH_KEY) {
10861101 otrl_auth_copy_on_key(&(m_context->auth), &(context->auth));
10871102 } else if (msgtype != OTRL_MSGTYPE_DH_COMMIT) {
1088 return 1; /* Ignore unexpected message */
1103 edata.ignore_message = 1;
1104 goto end;
10891105 }
10901106
10911107 /* Update the context list */
18561872 break;
18571873 }
18581874
1875 end:
18591876 /* If we reassembled a fragmented message, we need to free the
18601877 * allocated memory now. */
1861 if (fragment_assembled) {
1862 free(unfragmessage);
1863 }
1878 free(unfragmessage);
18641879
18651880 if (edata.ignore_message == -1) edata.ignore_message = 0;
18661881 return edata.ignore_message;
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
229230 * Received a general OTR error. The argument 'message' will
230231 * also be passed and it will contain the OTR error message.
231232 * - OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED
232 * Received an unencrypted message. The argument 'smessage' will
233 * Received an unencrypted message. The argument 'message' will
233234 * also be passed and it will contain the plaintext message.
234235 * - OTRL_MSGEVENT_RCVDMSG_UNRECOGNIZED
235236 * Cannot recognize the type of OTR message received.
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander,
3 * Willy Lew, Lisa Du, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
241242 * get passed to the main IM application for processing (and
242243 * free()ing). */
243244 const char *format = "?OTR%s\n<b>%s</b> has requested an "
244 "<a href=\"http://otr.cypherpunks.ca/\">Off-the-Record "
245 "<a href=\"https://otr.cypherpunks.ca/\">Off-the-Record "
245246 "private conversation</a>. However, you do not have a plugin "
246 "to support that.\nSee <a href=\"http://otr.cypherpunks.ca/\">"
247 "http://otr.cypherpunks.ca/</a> for more information.";
247 "to support that.\nSee <a href=\"https://otr.cypherpunks.ca/\">"
248 "https://otr.cypherpunks.ca/</a> for more information.";
248249
249250 /* Figure out the version tag */
250251 v1_supported = (policy & OTRL_POLICY_ALLOW_V1);
293294
294295
295296 otrtag = strstr(otrquerymsg, "?OTR");
297 if (!otrtag) {
298 return 0;
299 }
296300 otrtag += 4;
297301
298 if (otrtag && *otrtag == '?') {
302 if (*otrtag == '?') {
299303 query_versions = (1<<0);
300304 ++otrtag;
301305 }
302 if (otrtag && *otrtag == 'v') {
306 if (*otrtag == 'v') {
303307 for(++otrtag; *otrtag && *otrtag != '?'; ++otrtag) {
304308 switch(*otrtag) {
305309 case '2':
462466 free(bufp_head);
463467 return gcry_error(GPG_ERR_NO_ERROR);
464468 invval:
469 free(bufp_head);
465470 err = gcry_error(GPG_ERR_INV_VALUE);
466471 return err;
467472 }
822827
823828 gcry_md_reset(sess->rcvmac);
824829 gcry_md_write(sess->rcvmac, macstart, macend-macstart);
825 if (memcmp(givenmac, gcry_md_read(sess->rcvmac, GCRY_MD_SHA1), 20)) {
830 if (otrl_mem_differ(givenmac, gcry_md_read(sess->rcvmac, GCRY_MD_SHA1),
831 20)) {
826832 /* The MACs didn't match! */
827833 goto conflict;
828834 }
989995 {
990996 char *fragdata;
991997 int fragdatalen = 0;
992 unsigned short curfrag = 0;
998 int curfrag = 0;
993999 int index = 0;
9941000 int msglen = strlen(message);
9951001 /* Should vary by number of msgs */
9961002 int headerlen = context->protocol_version == 3 ? 37 : 19;
9971003
998 char **fragmentarray = malloc(fragment_count * sizeof(char*));
1004 char **fragmentarray;
1005
1006 if (fragment_count < 1 || fragment_count > 65535) {
1007 return gcry_error(GPG_ERR_INV_VALUE);
1008 }
1009
1010 fragmentarray = malloc(fragment_count * sizeof(char*));
9991011 if(!fragmentarray) return gcry_error(GPG_ERR_ENOMEM);
10001012
10011013 /*
10331045 */
10341046 if (context->auth.protocol_version != 3) {
10351047 snprintf(fragmentmsg, fragdatalen + headerlen,
1036 "?OTR,%05hu,%05hu,%s,", curfrag, fragment_count, fragdata);
1048 "?OTR,%05hu,%05hu,%s,", (unsigned short)curfrag,
1049 (unsigned short)fragment_count, fragdata);
10371050 } else {
10381051 /* V3 messages require instance tags in the header */
10391052 snprintf(fragmentmsg, fragdatalen + headerlen,
10401053 "?OTR|%08x|%08x,%05hu,%05hu,%s,",
1041 context->our_instance, context->their_instance, curfrag,
1042 fragment_count, fragdata);
1054 context->our_instance, context->their_instance,
1055 (unsigned short)curfrag, (unsigned short)fragment_count,
1056 fragdata);
10431057 }
10441058 fragmentmsg[fragdatalen + headerlen] = 0;
10451059
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Willy Lew,
3 * Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
132133 void otrl_sm_state_init(OtrlSMState *smst)
133134 {
134135 otrl_sm_state_free(smst);
135 smst->secret = gcry_mpi_new(SM_MOD_LEN_BITS);
136 smst->secret = gcry_mpi_snew(SM_MOD_LEN_BITS);
136137 smst->x2 = NULL;
137138 smst->x3 = NULL;
138139 smst->g1 = gcry_mpi_copy(SM_GENERATOR);
430431 const gcry_mpi_t g, const gcry_mpi_t x, int version)
431432 {
432433 gcry_mpi_t r = randomExponent();
433 gcry_mpi_t temp = gcry_mpi_new(SM_MOD_LEN_BITS);
434 gcry_mpi_t temp = gcry_mpi_snew(SM_MOD_LEN_BITS);
434435 gcry_mpi_powm(temp, g, r, SM_MODULUS);
435436 otrl_sm_hash(c, version, temp, NULL);
436437 gcry_mpi_mulm(temp, x, *c, SM_ORDER);
00 /*
11 * Off-the-Record Messaging library
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Willy Lew,
3 * Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
3 * Chris Alexander, Willy Lew, Lisa Du,
4 * Nikita Borisov
45 * <otr@cypherpunks.ca>
56 *
67 * This library is free software; you can redistribute it and/or
2021 #ifndef __VERSION_H__
2122 #define __VERSION_H__
2223
23 #define OTRL_VERSION "4.0.0"
24 #define OTRL_VERSION "4.1.0"
2425
2526 #define OTRL_VERSION_MAJOR 4
26 #define OTRL_VERSION_MINOR 0
27 #define OTRL_VERSION_MINOR 1
2728 #define OTRL_VERSION_SUB 0
2829
2930 #endif
0 INCLUDES = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@
0 AM_CPPFLAGS = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@
11
22 noinst_HEADERS = aes.h ctrmode.h parse.h sesskeys.h readotr.h sha1hmac.h
33
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
66 # This Makefile.in is free software; the Free Software Foundation
77 # gives unlimited permission to copy and/or distribute it,
88 # with or without modifications, as long as this notice is preserved.
4141 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
4242 $(srcdir)/Makefile.in
4343 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
44 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
45 $(top_srcdir)/config/ltoptions.m4 \
46 $(top_srcdir)/config/ltsugar.m4 \
47 $(top_srcdir)/config/ltversion.m4 \
48 $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac
4549 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4650 $(ACLOCAL_M4)
4751 mkinstalldirs = $(install_sh) -d
5660 otr_mackey_OBJECTS = $(am_otr_mackey_OBJECTS)
5761 am__DEPENDENCIES_1 = ../src/libotr.la
5862 otr_mackey_DEPENDENCIES = $(am__DEPENDENCIES_1)
63 AM_V_lt = $(am__v_lt_@AM_V@)
64 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
65 am__v_lt_0 = --silent
5966 am_otr_modify_OBJECTS = otr_modify.$(OBJEXT) readotr.$(OBJEXT) \
6067 $(am__objects_1)
6168 otr_modify_OBJECTS = $(am_otr_modify_OBJECTS)
7784 otr_sesskeys_OBJECTS = $(am_otr_sesskeys_OBJECTS)
7885 otr_sesskeys_DEPENDENCIES = $(am__DEPENDENCIES_1)
7986 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
80 depcomp = $(SHELL) $(top_srcdir)/depcomp
87 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
8188 am__depfiles_maybe = depfiles
8289 am__mv = mv -f
8390 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
8491 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
85 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
86 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
87 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
92 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
93 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
94 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
95 $(AM_CFLAGS) $(CFLAGS)
96 AM_V_CC = $(am__v_CC_@AM_V@)
97 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
98 am__v_CC_0 = @echo " CC " $@;
99 AM_V_at = $(am__v_at_@AM_V@)
100 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
101 am__v_at_0 = @
88102 CCLD = $(CC)
89 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
90 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
91 $(LDFLAGS) -o $@
103 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
104 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
105 $(AM_LDFLAGS) $(LDFLAGS) -o $@
106 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
107 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
108 am__v_CCLD_0 = @echo " CCLD " $@;
109 AM_V_GEN = $(am__v_GEN_@AM_V@)
110 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
111 am__v_GEN_0 = @echo " GEN " $@;
92112 SOURCES = $(otr_mackey_SOURCES) $(otr_modify_SOURCES) \
93113 $(otr_parse_SOURCES) $(otr_readforge_SOURCES) \
94114 $(otr_remac_SOURCES) $(otr_sesskeys_SOURCES)
116136 am__base_list = \
117137 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
118138 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
139 am__uninstall_files_from_dir = { \
140 test -z "$$files" \
141 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
142 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
143 $(am__cd) "$$dir" && rm -f $$files; }; \
144 }
119145 man1dir = $(mandir)/man1
120146 NROFF = nroff
121147 MANS = $(man_MANS)
125151 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
126152 ACLOCAL = @ACLOCAL@
127153 AMTAR = @AMTAR@
154 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
128155 AR = @AR@
129156 AUTOCONF = @AUTOCONF@
130157 AUTOHEADER = @AUTOHEADER@
138165 CYGPATH_W = @CYGPATH_W@
139166 DEFS = @DEFS@
140167 DEPDIR = @DEPDIR@
168 DLLTOOL = @DLLTOOL@
141169 DSYMUTIL = @DSYMUTIL@
142170 DUMPBIN = @DUMPBIN@
143171 ECHO_C = @ECHO_C@
165193 LN_S = @LN_S@
166194 LTLIBOBJS = @LTLIBOBJS@
167195 MAKEINFO = @MAKEINFO@
196 MANIFEST_TOOL = @MANIFEST_TOOL@
168197 MKDIR_P = @MKDIR_P@
169198 NM = @NM@
170199 NMEDIT = @NMEDIT@
190219 abs_srcdir = @abs_srcdir@
191220 abs_top_builddir = @abs_top_builddir@
192221 abs_top_srcdir = @abs_top_srcdir@
222 ac_ct_AR = @ac_ct_AR@
193223 ac_ct_CC = @ac_ct_CC@
194224 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
195225 am__include = @am__include@
222252 libexecdir = @libexecdir@
223253 localedir = @localedir@
224254 localstatedir = @localstatedir@
225 lt_ECHO = @lt_ECHO@
226255 mandir = @mandir@
227256 mkdir_p = @mkdir_p@
228257 oldincludedir = @oldincludedir@
238267 top_build_prefix = @top_build_prefix@
239268 top_builddir = @top_builddir@
240269 top_srcdir = @top_srcdir@
241 INCLUDES = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@
270 AM_CPPFLAGS = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@
242271 noinst_HEADERS = aes.h ctrmode.h parse.h sesskeys.h readotr.h sha1hmac.h
243272 COMMON_S = parse.c sha1hmac.c
244273 COMMON_LD = ../src/libotr.la @LIBS@ @LIBGCRYPT_LIBS@
338367 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
339368 echo " rm -f" $$list; \
340369 rm -f $$list
341 otr_mackey$(EXEEXT): $(otr_mackey_OBJECTS) $(otr_mackey_DEPENDENCIES)
370 otr_mackey$(EXEEXT): $(otr_mackey_OBJECTS) $(otr_mackey_DEPENDENCIES) $(EXTRA_otr_mackey_DEPENDENCIES)
342371 @rm -f otr_mackey$(EXEEXT)
343 $(LINK) $(otr_mackey_OBJECTS) $(otr_mackey_LDADD) $(LIBS)
344 otr_modify$(EXEEXT): $(otr_modify_OBJECTS) $(otr_modify_DEPENDENCIES)
372 $(AM_V_CCLD)$(LINK) $(otr_mackey_OBJECTS) $(otr_mackey_LDADD) $(LIBS)
373 otr_modify$(EXEEXT): $(otr_modify_OBJECTS) $(otr_modify_DEPENDENCIES) $(EXTRA_otr_modify_DEPENDENCIES)
345374 @rm -f otr_modify$(EXEEXT)
346 $(LINK) $(otr_modify_OBJECTS) $(otr_modify_LDADD) $(LIBS)
347 otr_parse$(EXEEXT): $(otr_parse_OBJECTS) $(otr_parse_DEPENDENCIES)
375 $(AM_V_CCLD)$(LINK) $(otr_modify_OBJECTS) $(otr_modify_LDADD) $(LIBS)
376 otr_parse$(EXEEXT): $(otr_parse_OBJECTS) $(otr_parse_DEPENDENCIES) $(EXTRA_otr_parse_DEPENDENCIES)
348377 @rm -f otr_parse$(EXEEXT)
349 $(LINK) $(otr_parse_OBJECTS) $(otr_parse_LDADD) $(LIBS)
350 otr_readforge$(EXEEXT): $(otr_readforge_OBJECTS) $(otr_readforge_DEPENDENCIES)
378 $(AM_V_CCLD)$(LINK) $(otr_parse_OBJECTS) $(otr_parse_LDADD) $(LIBS)
379 otr_readforge$(EXEEXT): $(otr_readforge_OBJECTS) $(otr_readforge_DEPENDENCIES) $(EXTRA_otr_readforge_DEPENDENCIES)
351380 @rm -f otr_readforge$(EXEEXT)
352 $(LINK) $(otr_readforge_OBJECTS) $(otr_readforge_LDADD) $(LIBS)
353 otr_remac$(EXEEXT): $(otr_remac_OBJECTS) $(otr_remac_DEPENDENCIES)
381 $(AM_V_CCLD)$(LINK) $(otr_readforge_OBJECTS) $(otr_readforge_LDADD) $(LIBS)
382 otr_remac$(EXEEXT): $(otr_remac_OBJECTS) $(otr_remac_DEPENDENCIES) $(EXTRA_otr_remac_DEPENDENCIES)
354383 @rm -f otr_remac$(EXEEXT)
355 $(LINK) $(otr_remac_OBJECTS) $(otr_remac_LDADD) $(LIBS)
356 otr_sesskeys$(EXEEXT): $(otr_sesskeys_OBJECTS) $(otr_sesskeys_DEPENDENCIES)
384 $(AM_V_CCLD)$(LINK) $(otr_remac_OBJECTS) $(otr_remac_LDADD) $(LIBS)
385 otr_sesskeys$(EXEEXT): $(otr_sesskeys_OBJECTS) $(otr_sesskeys_DEPENDENCIES) $(EXTRA_otr_sesskeys_DEPENDENCIES)
357386 @rm -f otr_sesskeys$(EXEEXT)
358 $(LINK) $(otr_sesskeys_OBJECTS) $(otr_sesskeys_LDADD) $(LIBS)
387 $(AM_V_CCLD)$(LINK) $(otr_sesskeys_OBJECTS) $(otr_sesskeys_LDADD) $(LIBS)
359388
360389 mostlyclean-compile:
361390 -rm -f *.$(OBJEXT)
377406 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1hmac.Po@am__quote@
378407
379408 .c.o:
380 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
381 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
382 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
409 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
410 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
411 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
383412 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
384 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
413 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
385414
386415 .c.obj:
387 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
388 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
389 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
416 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
417 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
418 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
390419 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
391 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
420 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
392421
393422 .c.lo:
394 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
395 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
396 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
423 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
424 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
425 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
397426 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
398 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
427 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
399428
400429 mostlyclean-libtool:
401430 -rm -f *.lo
437466 sed -n '/\.1[a-z]*$$/p'; \
438467 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
439468 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
440 test -z "$$files" || { \
441 echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
442 cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
469 dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
443470
444471 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
445472 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
553580
554581 installcheck: installcheck-am
555582 install-strip:
556 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
557 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
558 `test -z '$(STRIP)' || \
559 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
583 if test -z '$(STRIP)'; then \
584 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
585 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
586 install; \
587 else \
588 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
589 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
590 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
591 fi
560592 mostlyclean-generic:
561593
562594 clean-generic:
102102 .SH SEE ALSO
103103 .BR "Off-the-Record Messaging" ,
104104 at
105 .UR http://www.cypherpunks.ca/otr/
106 http://www.cypherpunks.ca/otr/
105 .UR https://www.cypherpunks.ca/otr/
106 https://www.cypherpunks.ca/otr/
107107 .UE
108108 .SH AUTHOR
109109 otr_toolkit was written by the OTR Dev Team <otr@cypherpunks.ca>.
00 /*
11 * Off-the-Record Messaging Toolkit
2 * Copyright (C) 2004-2012 Ian Goldberg, Chris Alexander, Nikita Borisov
2 * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Chris Alexander,
3 * Nikita Borisov
34 * <otr@cypherpunks.ca>
45 *
56 * This program is free software; you can redistribute it and/or modify
3132 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"
3233 "83655D23DCA3AD961C62F356208552BB9ED529077096966D"
3334 "670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF";
35 static const int DH1536_MOD_LEN_BITS = 1536;
3436 static const char *DH1536_GENERATOR_S = "0x02";
3537
3638 /* Generate the session id and the two encryption keys from our private
5153 (const unsigned char *)DH1536_MODULUS_S, 0, NULL);
5254 gcry_mpi_scan(&generator, GCRYMPI_FMT_HEX,
5355 (const unsigned char *)DH1536_GENERATOR_S, 0, NULL);
54 *our_yp = gcry_mpi_new(0);
56 *our_yp = gcry_mpi_snew(DH1536_MOD_LEN_BITS);
5557 gcry_mpi_powm(*our_yp, generator, our_x, modulus);
56 secretv = gcry_mpi_new(0);
58 secretv = gcry_mpi_snew(DH1536_MOD_LEN_BITS);
5759 gcry_mpi_powm(secretv, their_y, our_x, modulus);
5860 gcry_mpi_release(generator);
5961 gcry_mpi_release(modulus);